@hmcts/ccd-case-ui-toolkit 6.19.12-rc2 → 6.19.12-restricted-case-access
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/bundles/hmcts-ccd-case-ui-toolkit.umd.js +182 -121
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.js.map +1 -1
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js +1 -1
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js.map +1 -1
- package/esm2015/lib/app.config.js +1 -1
- package/esm2015/lib/shared/components/case-viewer/services/case.resolver.js +16 -9
- package/esm2015/lib/shared/components/palette/case-file-view/components/case-file-view-folder/case-file-view-folder-sort/case-file-view-folder-sort.component.js +22 -8
- package/esm2015/lib/shared/components/palette/case-file-view/components/case-file-view-folder/case-file-view-folder.component.js +43 -28
- package/esm2015/lib/shared/components/palette/case-file-view/test-data/categories-and-documents-test-data.js +233 -0
- package/esm2015/lib/shared/components/palette/complex/read-complex-field-collection-table.component.js +2 -2
- package/esm2015/lib/shared/domain/case-file-view/case-file-view-document.model.js +1 -1
- package/esm2015/lib/shared/domain/case-file-view/case-file-view-sort-columns.enum.js +6 -0
- package/esm2015/lib/shared/domain/case-file-view/document-tree-node/document-tree-node.model.js +39 -13
- package/esm2015/lib/shared/domain/case-file-view/index.js +3 -2
- package/esm2015/lib/shared/domain/http/http-error.model.js +8 -1
- package/esm2015/lib/shared/domain/index.js +10 -10
- package/esm2015/lib/shared/domain/search/sorting/sort-parameters.js +1 -1
- package/esm2015/lib/shared/domain/sort-order.enum.js +7 -0
- package/esm2015/lib/shared/pipes/search-result/sorting/sort-search-result.pipe.js +2 -2
- package/esm2015/lib/shared/services/case-file-view/case-file-view.service.js +1 -1
- package/esm2015/lib/shared/services/http/http-error.service.js +4 -5
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js +147 -91
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
- package/lib/app.config.d.ts +4 -0
- package/lib/app.config.d.ts.map +1 -1
- package/lib/shared/components/case-viewer/services/case.resolver.d.ts +3 -1
- package/lib/shared/components/case-viewer/services/case.resolver.d.ts.map +1 -1
- package/lib/shared/components/palette/case-file-view/components/case-file-view-folder/case-file-view-folder-sort/case-file-view-folder-sort.component.d.ts +8 -5
- package/lib/shared/components/palette/case-file-view/components/case-file-view-folder/case-file-view-folder-sort/case-file-view-folder-sort.component.d.ts.map +1 -1
- package/lib/shared/components/palette/case-file-view/components/case-file-view-folder/case-file-view-folder.component.d.ts +5 -3
- package/lib/shared/components/palette/case-file-view/components/case-file-view-folder/case-file-view-folder.component.d.ts.map +1 -1
- package/lib/shared/components/palette/case-file-view/test-data/categories-and-documents-test-data.d.ts +3 -0
- package/lib/shared/components/palette/case-file-view/test-data/categories-and-documents-test-data.d.ts.map +1 -0
- package/lib/shared/components/palette/complex/read-complex-field-collection-table.component.d.ts.map +1 -1
- package/lib/shared/domain/case-file-view/case-file-view-document.model.d.ts +1 -1
- package/lib/shared/domain/case-file-view/case-file-view-document.model.d.ts.map +1 -1
- package/lib/shared/domain/case-file-view/case-file-view-sort-columns.enum.d.ts +5 -0
- package/lib/shared/domain/case-file-view/case-file-view-sort-columns.enum.d.ts.map +1 -0
- package/lib/shared/domain/case-file-view/document-tree-node/document-tree-node.model.d.ts +4 -2
- package/lib/shared/domain/case-file-view/document-tree-node/document-tree-node.model.d.ts.map +1 -1
- package/lib/shared/domain/case-file-view/index.d.ts +2 -1
- package/lib/shared/domain/case-file-view/index.d.ts.map +1 -1
- package/lib/shared/domain/http/http-error.model.d.ts.map +1 -1
- package/lib/shared/domain/index.d.ts +9 -9
- package/lib/shared/domain/index.d.ts.map +1 -1
- package/lib/shared/domain/search/sorting/sort-parameters.d.ts +1 -1
- package/lib/shared/domain/search/sorting/sort-parameters.d.ts.map +1 -1
- package/lib/shared/domain/{search/sorting/sort-order.d.ts → sort-order.enum.d.ts} +1 -1
- package/lib/shared/domain/sort-order.enum.d.ts.map +1 -0
- package/lib/shared/services/case-file-view/case-file-view.service.d.ts.map +1 -1
- package/lib/shared/services/http/http-error.service.d.ts.map +1 -1
- package/package.json +1 -1
- package/esm2015/lib/shared/components/palette/complex/sort-order.js +0 -7
- package/esm2015/lib/shared/domain/search/sorting/sort-order.js +0 -7
- package/lib/shared/components/palette/complex/sort-order.d.ts +0 -6
- package/lib/shared/components/palette/complex/sort-order.d.ts.map +0 -1
- package/lib/shared/domain/search/sorting/sort-order.d.ts.map +0 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('rpx-xui-translation'), require('@angular/router'), require('@angular/forms'), require('rx-polling'), require('rxjs'), require('@angular/common/http'), require('rxjs/operators'), require('class-transformer'), require('moment'), require('underscore'), require('pegjs'), require('util'), require('@edium/fsm'), require('@angular/material/dialog'), require('@nicky-lenaers/ngx-scroll-to'), require('ngx-md'), require('@angular/material/autocomplete'), require('@angular/material/core'), require('@hmcts/ccpay-web-component'), require('@angular/cdk/overlay'), require('@angular/cdk/tree'), require('@angular/material/input'), require('@angular-material-components/datetime-picker'), require('@angular-material-components/moment-adapter'), require('@angular/material/datepicker'), require('@angular/material/form-field'), require('@hmcts/media-viewer'), require('@angular/cdk/portal'), require('ngx-pagination'), require('@angular/material/tabs')) :
|
|
3
3
|
typeof define === 'function' && define.amd ? define('@hmcts/ccd-case-ui-toolkit', ['exports', '@angular/core', '@angular/common', 'rpx-xui-translation', '@angular/router', '@angular/forms', 'rx-polling', 'rxjs', '@angular/common/http', 'rxjs/operators', 'class-transformer', 'moment', 'underscore', 'pegjs', 'util', '@edium/fsm', '@angular/material/dialog', '@nicky-lenaers/ngx-scroll-to', 'ngx-md', '@angular/material/autocomplete', '@angular/material/core', '@hmcts/ccpay-web-component', '@angular/cdk/overlay', '@angular/cdk/tree', '@angular/material/input', '@angular-material-components/datetime-picker', '@angular-material-components/moment-adapter', '@angular/material/datepicker', '@angular/material/form-field', '@hmcts/media-viewer', '@angular/cdk/portal', 'ngx-pagination', '@angular/material/tabs'], factory) :
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.hmcts = global.hmcts || {}, global.hmcts["ccd-case-ui-toolkit"] = {}), global.ng.core, global.ng.common, global.i1, global.ng.router, global.ng.forms, global["rx-polling"], global.rxjs, global.ng.common.http, global.rxjs.operators, global["class-transformer"], global.moment, global.underscore, global.pegjs, global.util, global["@edium/fsm"], global.ng.material.dialog, global["@nicky-lenaers/ngx-scroll-to"], global["ngx-md"], global.ng.material.autocomplete, global.ng.material.core, global["@hmcts/ccpay-web-component"], global.ng.cdk.overlay, global.ng.cdk.tree, global.ng.material.input, global["@angular-material-components/datetime-picker"], global["@angular-material-components/moment-adapter"], global.ng.material.datepicker, global.ng.material.formField, global.i12, global.ng.cdk.portal, global["ngx-pagination"], global.ng.material.tabs));
|
|
5
|
-
})(this, (function (exports, i0, i2, i1, i1$1, i2$1, polling, rxjs, i1$2, operators, classTransformer, moment, _, pegjs, util, fsm, i1$3, i2$2, i1$4, i5, i6, i3, i1$5,
|
|
5
|
+
})(this, (function (exports, i0, i2, i1, i1$1, i2$1, polling, rxjs, i1$2, operators, classTransformer, moment, _, pegjs, util, fsm, i1$3, i2$2, i1$4, i5, i6, i3, i1$5, i8, i3$1, i4, momentAdapter, i5$1, i6$1, i12, i6$2, i1$6, i10) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
|
|
41
41
|
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
42
42
|
var i1__namespace$5 = /*#__PURE__*/_interopNamespace(i1$5);
|
|
43
|
-
var
|
|
43
|
+
var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
|
|
44
44
|
var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
|
|
45
45
|
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
46
46
|
var i5__namespace$1 = /*#__PURE__*/_interopNamespace(i5$1);
|
|
@@ -1985,6 +1985,13 @@
|
|
|
1985
1985
|
error[key] = response.error.hasOwnProperty(key) && response.error[key] ? response.error[key] : error[key];
|
|
1986
1986
|
});
|
|
1987
1987
|
}
|
|
1988
|
+
// Error object in HttpErrorResponse will be empty for 403 errors
|
|
1989
|
+
// Set the error properties of HttpError accordingly
|
|
1990
|
+
if ((response === null || response === void 0 ? void 0 : response.status) === 403) {
|
|
1991
|
+
error.error = response.statusText;
|
|
1992
|
+
error.status = response.status;
|
|
1993
|
+
error.message = response.message;
|
|
1994
|
+
}
|
|
1988
1995
|
return error;
|
|
1989
1996
|
};
|
|
1990
1997
|
return HttpError;
|
|
@@ -2083,14 +2090,13 @@
|
|
|
2083
2090
|
this.authService = authService;
|
|
2084
2091
|
}
|
|
2085
2092
|
HttpErrorService.convertToHttpError = function (error) {
|
|
2093
|
+
var _a;
|
|
2086
2094
|
if (error instanceof HttpError) {
|
|
2087
2095
|
return error;
|
|
2088
2096
|
}
|
|
2089
2097
|
var httpError = new HttpError();
|
|
2090
2098
|
if (error instanceof i1$2.HttpErrorResponse) {
|
|
2091
|
-
if (error.headers
|
|
2092
|
-
&& error.headers.get(HttpErrorService.CONTENT_TYPE)
|
|
2093
|
-
&& error.headers.get(HttpErrorService.CONTENT_TYPE).indexOf(HttpErrorService.JSON) !== -1) {
|
|
2099
|
+
if (((_a = error.headers) === null || _a === void 0 ? void 0 : _a.get(HttpErrorService.CONTENT_TYPE).indexOf(HttpErrorService.JSON)) !== -1) {
|
|
2094
2100
|
try {
|
|
2095
2101
|
httpError = HttpError.from(error);
|
|
2096
2102
|
}
|
|
@@ -2125,7 +2131,7 @@
|
|
|
2125
2131
|
console.error('Handling error in http error service.');
|
|
2126
2132
|
console.error(error);
|
|
2127
2133
|
var httpError = HttpErrorService.convertToHttpError(error);
|
|
2128
|
-
if (redirectIfNotAuthorised &&
|
|
2134
|
+
if (redirectIfNotAuthorised && httpError.status === 401) {
|
|
2129
2135
|
this.authService.signIn();
|
|
2130
2136
|
}
|
|
2131
2137
|
return rxjs.throwError(httpError);
|
|
@@ -3501,6 +3507,20 @@
|
|
|
3501
3507
|
return Alert;
|
|
3502
3508
|
}());
|
|
3503
3509
|
|
|
3510
|
+
// tslint:disable:variable-name
|
|
3511
|
+
var CaseDetails = /** @class */ (function () {
|
|
3512
|
+
function CaseDetails() {
|
|
3513
|
+
}
|
|
3514
|
+
return CaseDetails;
|
|
3515
|
+
}());
|
|
3516
|
+
|
|
3517
|
+
// tslint:disable:variable-name
|
|
3518
|
+
var CaseEventData = /** @class */ (function () {
|
|
3519
|
+
function CaseEventData() {
|
|
3520
|
+
}
|
|
3521
|
+
return CaseEventData;
|
|
3522
|
+
}());
|
|
3523
|
+
|
|
3504
3524
|
var WizardPageField = /** @class */ (function () {
|
|
3505
3525
|
function WizardPageField() {
|
|
3506
3526
|
}
|
|
@@ -3920,6 +3940,20 @@
|
|
|
3920
3940
|
return FormDocument;
|
|
3921
3941
|
}());
|
|
3922
3942
|
|
|
3943
|
+
var DRAFT_PREFIX = 'DRAFT';
|
|
3944
|
+
var DRAFT_QUERY_PARAM = 'draft';
|
|
3945
|
+
var Draft = /** @class */ (function () {
|
|
3946
|
+
function Draft() {
|
|
3947
|
+
}
|
|
3948
|
+
Draft.stripDraftId = function (draftId) {
|
|
3949
|
+
return draftId.slice(DRAFT_PREFIX.length);
|
|
3950
|
+
};
|
|
3951
|
+
Draft.isDraft = function (id) {
|
|
3952
|
+
return String(id).startsWith(DRAFT_PREFIX);
|
|
3953
|
+
};
|
|
3954
|
+
return Draft;
|
|
3955
|
+
}());
|
|
3956
|
+
|
|
3923
3957
|
var OrganisationConverter = /** @class */ (function () {
|
|
3924
3958
|
function OrganisationConverter() {
|
|
3925
3959
|
}
|
|
@@ -3965,6 +3999,12 @@
|
|
|
3965
3999
|
}], null, null);
|
|
3966
4000
|
})();
|
|
3967
4001
|
|
|
4002
|
+
var PaginationMetadata = /** @class */ (function () {
|
|
4003
|
+
function PaginationMetadata() {
|
|
4004
|
+
}
|
|
4005
|
+
return PaginationMetadata;
|
|
4006
|
+
}());
|
|
4007
|
+
|
|
3968
4008
|
function hasRoles(profile) {
|
|
3969
4009
|
if (profile.user && profile.user.idam && Array.isArray(profile.user.idam.roles)) {
|
|
3970
4010
|
return profile.user.idam.roles.length > 0;
|
|
@@ -4023,20 +4063,6 @@
|
|
|
4023
4063
|
__metadata("design:type", Array)
|
|
4024
4064
|
], SearchResultViewItem.prototype, "hydrated_case_fields", void 0);
|
|
4025
4065
|
|
|
4026
|
-
var DRAFT_PREFIX = 'DRAFT';
|
|
4027
|
-
var DRAFT_QUERY_PARAM = 'draft';
|
|
4028
|
-
var Draft = /** @class */ (function () {
|
|
4029
|
-
function Draft() {
|
|
4030
|
-
}
|
|
4031
|
-
Draft.stripDraftId = function (draftId) {
|
|
4032
|
-
return draftId.slice(DRAFT_PREFIX.length);
|
|
4033
|
-
};
|
|
4034
|
-
Draft.isDraft = function (id) {
|
|
4035
|
-
return String(id).startsWith(DRAFT_PREFIX);
|
|
4036
|
-
};
|
|
4037
|
-
return Draft;
|
|
4038
|
-
}());
|
|
4039
|
-
|
|
4040
4066
|
// @dynamic
|
|
4041
4067
|
var SearchResultView = /** @class */ (function () {
|
|
4042
4068
|
function SearchResultView() {
|
|
@@ -4057,19 +4083,20 @@
|
|
|
4057
4083
|
__metadata("design:type", Array)
|
|
4058
4084
|
], SearchResultView.prototype, "results", void 0);
|
|
4059
4085
|
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4086
|
+
var SortParameters = /** @class */ (function () {
|
|
4087
|
+
function SortParameters(comparator, sortOrder) {
|
|
4088
|
+
this.comparator = comparator;
|
|
4089
|
+
this.sortOrder = sortOrder;
|
|
4063
4090
|
}
|
|
4064
|
-
return
|
|
4091
|
+
return SortParameters;
|
|
4065
4092
|
}());
|
|
4066
4093
|
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
}());
|
|
4094
|
+
exports.SortOrder = void 0;
|
|
4095
|
+
(function (SortOrder) {
|
|
4096
|
+
SortOrder[SortOrder["ASCENDING"] = 0] = "ASCENDING";
|
|
4097
|
+
SortOrder[SortOrder["DESCENDING"] = 1] = "DESCENDING";
|
|
4098
|
+
SortOrder[SortOrder["UNSORTED"] = 2] = "UNSORTED";
|
|
4099
|
+
})(exports.SortOrder || (exports.SortOrder = {}));
|
|
4073
4100
|
|
|
4074
4101
|
var WorkbasketInputModel = /** @class */ (function () {
|
|
4075
4102
|
function WorkbasketInputModel() {
|
|
@@ -4082,27 +4109,6 @@
|
|
|
4082
4109
|
return WorkbasketInput;
|
|
4083
4110
|
}());
|
|
4084
4111
|
|
|
4085
|
-
var PaginationMetadata = /** @class */ (function () {
|
|
4086
|
-
function PaginationMetadata() {
|
|
4087
|
-
}
|
|
4088
|
-
return PaginationMetadata;
|
|
4089
|
-
}());
|
|
4090
|
-
|
|
4091
|
-
exports.SortOrder = void 0;
|
|
4092
|
-
(function (SortOrder) {
|
|
4093
|
-
SortOrder[SortOrder["ASCENDING"] = 0] = "ASCENDING";
|
|
4094
|
-
SortOrder[SortOrder["DESCENDING"] = 1] = "DESCENDING";
|
|
4095
|
-
SortOrder[SortOrder["UNSORTED"] = 2] = "UNSORTED";
|
|
4096
|
-
})(exports.SortOrder || (exports.SortOrder = {}));
|
|
4097
|
-
|
|
4098
|
-
var SortParameters = /** @class */ (function () {
|
|
4099
|
-
function SortParameters(comparator, sortOrder) {
|
|
4100
|
-
this.comparator = comparator;
|
|
4101
|
-
this.sortOrder = sortOrder;
|
|
4102
|
-
}
|
|
4103
|
-
return SortParameters;
|
|
4104
|
-
}());
|
|
4105
|
-
|
|
4106
4112
|
// @dynamic
|
|
4107
4113
|
var FieldsUtils = /** @class */ (function () {
|
|
4108
4114
|
function FieldsUtils() {
|
|
@@ -21975,20 +21981,38 @@
|
|
|
21975
21981
|
}] });
|
|
21976
21982
|
})();
|
|
21977
21983
|
|
|
21984
|
+
var CaseFileViewSortColumns;
|
|
21985
|
+
(function (CaseFileViewSortColumns) {
|
|
21986
|
+
CaseFileViewSortColumns[CaseFileViewSortColumns["DOCUMENT_NAME"] = 0] = "DOCUMENT_NAME";
|
|
21987
|
+
CaseFileViewSortColumns[CaseFileViewSortColumns["DOCUMENT_UPLOAD_TIMESTAMP"] = 1] = "DOCUMENT_UPLOAD_TIMESTAMP";
|
|
21988
|
+
})(CaseFileViewSortColumns || (CaseFileViewSortColumns = {}));
|
|
21989
|
+
|
|
21978
21990
|
var CaseFileViewFolderSortComponent = /** @class */ (function () {
|
|
21979
|
-
function CaseFileViewFolderSortComponent() {
|
|
21991
|
+
function CaseFileViewFolderSortComponent(appConfig) {
|
|
21980
21992
|
var _this = this;
|
|
21993
|
+
this.appConfig = appConfig;
|
|
21981
21994
|
this.isOpen = false;
|
|
21982
21995
|
this.sortAscending = new i0.EventEmitter();
|
|
21983
21996
|
this.sortDescending = new i0.EventEmitter();
|
|
21984
21997
|
this.overlayMenuItems = [
|
|
21985
|
-
{ actionText: 'A to Z ascending', iconSrc: '/assets/img/sort/sort-down-arrow.svg', actionFn: function () { return _this.sortAscending.emit(); } },
|
|
21986
|
-
{ actionText: 'Z to A descending', iconSrc: '/assets/img/sort/sort-up-arrow.svg', actionFn: function () { return _this.sortDescending.emit(); } },
|
|
21998
|
+
{ actionText: 'A to Z ascending', iconSrc: '/assets/img/sort/sort-down-arrow.svg', actionFn: function () { return _this.sortAscending.emit(CaseFileViewSortColumns.DOCUMENT_NAME); } },
|
|
21999
|
+
{ actionText: 'Z to A descending', iconSrc: '/assets/img/sort/sort-up-arrow.svg', actionFn: function () { return _this.sortDescending.emit(CaseFileViewSortColumns.DOCUMENT_NAME); } },
|
|
21987
22000
|
];
|
|
21988
22001
|
}
|
|
22002
|
+
CaseFileViewFolderSortComponent.prototype.ngOnInit = function () {
|
|
22003
|
+
var _this = this;
|
|
22004
|
+
if (this.appConfig.getEnableCaseFileViewVersion1_1()) {
|
|
22005
|
+
this.overlayMenuItems = [
|
|
22006
|
+
{ actionText: 'A to Z ascending', iconSrc: '/assets/img/sort/sort-down-arrow.svg', actionFn: function () { return _this.sortAscending.emit(CaseFileViewSortColumns.DOCUMENT_NAME); } },
|
|
22007
|
+
{ actionText: 'Z to A descending', iconSrc: '/assets/img/sort/sort-up-arrow.svg', actionFn: function () { return _this.sortDescending.emit(CaseFileViewSortColumns.DOCUMENT_NAME); } },
|
|
22008
|
+
{ actionText: 'Recent first', iconSrc: '/assets/img/sort/sort-down-arrow.svg', actionFn: function () { return _this.sortDescending.emit(CaseFileViewSortColumns.DOCUMENT_UPLOAD_TIMESTAMP); } },
|
|
22009
|
+
{ actionText: 'Oldest first', iconSrc: '/assets/img/sort/sort-up-arrow.svg', actionFn: function () { return _this.sortAscending.emit(CaseFileViewSortColumns.DOCUMENT_UPLOAD_TIMESTAMP); } },
|
|
22010
|
+
];
|
|
22011
|
+
}
|
|
22012
|
+
};
|
|
21989
22013
|
return CaseFileViewFolderSortComponent;
|
|
21990
22014
|
}());
|
|
21991
|
-
CaseFileViewFolderSortComponent.ɵfac = function CaseFileViewFolderSortComponent_Factory(t) { return new (t || CaseFileViewFolderSortComponent)(); };
|
|
22015
|
+
CaseFileViewFolderSortComponent.ɵfac = function CaseFileViewFolderSortComponent_Factory(t) { return new (t || CaseFileViewFolderSortComponent)(i0__namespace.ɵɵdirectiveInject(AbstractAppConfig)); };
|
|
21992
22016
|
CaseFileViewFolderSortComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CaseFileViewFolderSortComponent, selectors: [["ccd-case-file-view-folder-sort"]], outputs: { sortAscending: "sortAscending", sortDescending: "sortDescending" }, decls: 3, vars: 3, consts: [[3, "title", "menuItems", "isOpen", "isOpenChange"], ["trigger", ""], ["src", "/assets/img/sort/sort-arrows.svg", "alt", "Sort Arrows", 1, "sort-button-icon"]], template: function CaseFileViewFolderSortComponent_Template(rf, ctx) {
|
|
21993
22017
|
if (rf & 1) {
|
|
21994
22018
|
i0__namespace.ɵɵelementStart(0, "ccd-case-file-view-overlay-menu", 0);
|
|
@@ -22010,7 +22034,7 @@
|
|
|
22010
22034
|
templateUrl: './case-file-view-folder-sort.component.html',
|
|
22011
22035
|
styleUrls: ['./case-file-view-folder-sort.component.scss']
|
|
22012
22036
|
}]
|
|
22013
|
-
}], function () { return []; }, { sortAscending: [{
|
|
22037
|
+
}], function () { return [{ type: AbstractAppConfig }]; }, { sortAscending: [{
|
|
22014
22038
|
type: i0.Output
|
|
22015
22039
|
}], sortDescending: [{
|
|
22016
22040
|
type: i0.Output
|
|
@@ -22067,48 +22091,56 @@
|
|
|
22067
22091
|
enumerable: false,
|
|
22068
22092
|
configurable: true
|
|
22069
22093
|
});
|
|
22070
|
-
DocumentTreeNode.prototype.sortChildrenAscending = function () {
|
|
22094
|
+
DocumentTreeNode.prototype.sortChildrenAscending = function (column, sortOrder) {
|
|
22095
|
+
var _this = this;
|
|
22071
22096
|
var _a, _b;
|
|
22072
22097
|
var sortAscending = function () {
|
|
22073
22098
|
return function (a, b) {
|
|
22074
|
-
var
|
|
22075
|
-
var
|
|
22099
|
+
var nodeA = _this.getNodeToSort(a, column, sortOrder);
|
|
22100
|
+
var nodeB = _this.getNodeToSort(b, column, sortOrder);
|
|
22076
22101
|
if (a.type === DocumentTreeNodeType.FOLDER || b.type === DocumentTreeNodeType.FOLDER) {
|
|
22077
22102
|
return 0;
|
|
22078
22103
|
}
|
|
22079
|
-
if (
|
|
22104
|
+
if (!nodeA || !nodeB) {
|
|
22105
|
+
return 0;
|
|
22106
|
+
}
|
|
22107
|
+
if (nodeA < nodeB) {
|
|
22080
22108
|
return -1;
|
|
22081
22109
|
}
|
|
22082
|
-
if (
|
|
22110
|
+
if (nodeA > nodeB) {
|
|
22083
22111
|
return 1;
|
|
22084
22112
|
}
|
|
22085
22113
|
};
|
|
22086
22114
|
};
|
|
22087
22115
|
(_a = this.children) === null || _a === void 0 ? void 0 : _a.sort(sortAscending());
|
|
22088
22116
|
(_b = this.children) === null || _b === void 0 ? void 0 : _b.forEach(function (childNodes) {
|
|
22089
|
-
childNodes.sortChildrenAscending();
|
|
22117
|
+
childNodes.sortChildrenAscending(column, sortOrder);
|
|
22090
22118
|
});
|
|
22091
22119
|
};
|
|
22092
|
-
DocumentTreeNode.prototype.sortChildrenDescending = function () {
|
|
22120
|
+
DocumentTreeNode.prototype.sortChildrenDescending = function (column, sortOrder) {
|
|
22121
|
+
var _this = this;
|
|
22093
22122
|
var _a, _b;
|
|
22094
22123
|
var sortDescending = function () {
|
|
22095
22124
|
return function (a, b) {
|
|
22096
|
-
var
|
|
22097
|
-
var
|
|
22125
|
+
var nodeA = _this.getNodeToSort(a, column, sortOrder);
|
|
22126
|
+
var nodeB = _this.getNodeToSort(b, column, sortOrder);
|
|
22098
22127
|
if (a.type === DocumentTreeNodeType.FOLDER || b.type === DocumentTreeNodeType.FOLDER) {
|
|
22099
22128
|
return 0;
|
|
22100
22129
|
}
|
|
22101
|
-
if (
|
|
22130
|
+
if (!nodeA || !nodeB) {
|
|
22131
|
+
return 0;
|
|
22132
|
+
}
|
|
22133
|
+
if (nodeA > nodeB) {
|
|
22102
22134
|
return -1;
|
|
22103
22135
|
}
|
|
22104
|
-
if (
|
|
22136
|
+
if (nodeA < nodeB) {
|
|
22105
22137
|
return 1;
|
|
22106
22138
|
}
|
|
22107
22139
|
};
|
|
22108
22140
|
};
|
|
22109
22141
|
(_a = this.children) === null || _a === void 0 ? void 0 : _a.sort(sortDescending());
|
|
22110
22142
|
(_b = this.children) === null || _b === void 0 ? void 0 : _b.forEach(function (childNodes) {
|
|
22111
|
-
childNodes.sortChildrenDescending();
|
|
22143
|
+
childNodes.sortChildrenDescending(column, sortOrder);
|
|
22112
22144
|
});
|
|
22113
22145
|
};
|
|
22114
22146
|
Object.defineProperty(DocumentTreeNode.prototype, "flattenedAll", {
|
|
@@ -22134,6 +22166,24 @@
|
|
|
22134
22166
|
enumerable: false,
|
|
22135
22167
|
configurable: true
|
|
22136
22168
|
});
|
|
22169
|
+
DocumentTreeNode.prototype.getNodeToSort = function (node, column, sortOrder) {
|
|
22170
|
+
if (column === CaseFileViewSortColumns.DOCUMENT_NAME) {
|
|
22171
|
+
return (node === null || node === void 0 ? void 0 : node.name) ? node.name.toUpperCase()
|
|
22172
|
+
: '';
|
|
22173
|
+
}
|
|
22174
|
+
if (column === CaseFileViewSortColumns.DOCUMENT_UPLOAD_TIMESTAMP) {
|
|
22175
|
+
if (node === null || node === void 0 ? void 0 : node.upload_timestamp) {
|
|
22176
|
+
return new Date(node.upload_timestamp);
|
|
22177
|
+
}
|
|
22178
|
+
if (sortOrder === exports.SortOrder.ASCENDING) {
|
|
22179
|
+
return new Date(9999, 12, 31);
|
|
22180
|
+
}
|
|
22181
|
+
if (sortOrder === exports.SortOrder.DESCENDING) {
|
|
22182
|
+
return new Date(1111, 1, 1);
|
|
22183
|
+
}
|
|
22184
|
+
}
|
|
22185
|
+
return '';
|
|
22186
|
+
};
|
|
22137
22187
|
return DocumentTreeNode;
|
|
22138
22188
|
}());
|
|
22139
22189
|
__decorate([
|
|
@@ -22164,10 +22214,14 @@
|
|
|
22164
22214
|
i0__namespace.ɵɵelementEnd();
|
|
22165
22215
|
i0__namespace.ɵɵelementStart(4, "span", 16);
|
|
22166
22216
|
i0__namespace.ɵɵtext(5);
|
|
22217
|
+
i0__namespace.ɵɵelement(6, "br");
|
|
22218
|
+
i0__namespace.ɵɵelementStart(7, "span", 17);
|
|
22219
|
+
i0__namespace.ɵɵtext(8);
|
|
22167
22220
|
i0__namespace.ɵɵelementEnd();
|
|
22168
|
-
i0__namespace.ɵɵ
|
|
22169
|
-
i0__namespace.ɵɵelementStart(
|
|
22170
|
-
i0__namespace.ɵɵ
|
|
22221
|
+
i0__namespace.ɵɵelementEnd();
|
|
22222
|
+
i0__namespace.ɵɵelementStart(9, "div", 18);
|
|
22223
|
+
i0__namespace.ɵɵelementStart(10, "ccd-case-file-view-folder-document-actions", 19);
|
|
22224
|
+
i0__namespace.ɵɵlistener("changeFolderAction", function CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_4_Template_ccd_case_file_view_folder_document_actions_changeFolderAction_10_listener() { i0__namespace.ɵɵrestoreView(_r6_1); var node_r4 = ctx.$implicit; var ctx_r7 = i0__namespace.ɵɵnextContext(2); return ctx_r7.triggerDocumentAction("changeFolder", node_r4); })("openInANewTabAction", function CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_4_Template_ccd_case_file_view_folder_document_actions_openInANewTabAction_10_listener() { i0__namespace.ɵɵrestoreView(_r6_1); var node_r4 = ctx.$implicit; var ctx_r8 = i0__namespace.ɵɵnextContext(2); return ctx_r8.triggerDocumentAction("openInANewTab", node_r4); })("downloadAction", function CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_4_Template_ccd_case_file_view_folder_document_actions_downloadAction_10_listener() { i0__namespace.ɵɵrestoreView(_r6_1); var node_r4 = ctx.$implicit; var ctx_r9 = i0__namespace.ɵɵnextContext(2); return ctx_r9.triggerDocumentAction("download", node_r4); })("printAction", function CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_4_Template_ccd_case_file_view_folder_document_actions_printAction_10_listener() { i0__namespace.ɵɵrestoreView(_r6_1); var node_r4 = ctx.$implicit; var ctx_r10 = i0__namespace.ɵɵnextContext(2); return ctx_r10.triggerDocumentAction("print", node_r4); });
|
|
22171
22225
|
i0__namespace.ɵɵelementEnd();
|
|
22172
22226
|
i0__namespace.ɵɵelementEnd();
|
|
22173
22227
|
i0__namespace.ɵɵelementEnd();
|
|
@@ -22179,27 +22233,29 @@
|
|
|
22179
22233
|
i0__namespace.ɵɵadvance(1);
|
|
22180
22234
|
i0__namespace.ɵɵclassProp("node--selected", (ctx_r2.selectedNodeItem == null ? null : ctx_r2.selectedNodeItem.name) === node_r4.name);
|
|
22181
22235
|
i0__namespace.ɵɵadvance(4);
|
|
22182
|
-
i0__namespace.ɵɵ
|
|
22236
|
+
i0__namespace.ɵɵtextInterpolate1(" ", node_r4.name, " ");
|
|
22237
|
+
i0__namespace.ɵɵadvance(3);
|
|
22238
|
+
i0__namespace.ɵɵtextInterpolate(node_r4.upload_timestamp);
|
|
22183
22239
|
i0__namespace.ɵɵadvance(2);
|
|
22184
22240
|
i0__namespace.ɵɵproperty("allowMoving", ctx_r2.allowMoving);
|
|
22185
22241
|
}
|
|
22186
22242
|
}
|
|
22187
22243
|
function CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_5_Template(rf, ctx) {
|
|
22188
22244
|
if (rf & 1) {
|
|
22189
|
-
i0__namespace.ɵɵelementStart(0, "cdk-nested-tree-node",
|
|
22190
|
-
i0__namespace.ɵɵelementStart(1, "button",
|
|
22191
|
-
i0__namespace.ɵɵelementStart(2, "div",
|
|
22192
|
-
i0__namespace.ɵɵelement(3, "img",
|
|
22193
|
-
i0__namespace.ɵɵelementStart(4, "span",
|
|
22245
|
+
i0__namespace.ɵɵelementStart(0, "cdk-nested-tree-node", 20);
|
|
22246
|
+
i0__namespace.ɵɵelementStart(1, "button", 21);
|
|
22247
|
+
i0__namespace.ɵɵelementStart(2, "div", 22);
|
|
22248
|
+
i0__namespace.ɵɵelement(3, "img", 23);
|
|
22249
|
+
i0__namespace.ɵɵelementStart(4, "span", 24);
|
|
22194
22250
|
i0__namespace.ɵɵtext(5);
|
|
22195
22251
|
i0__namespace.ɵɵelementEnd();
|
|
22196
22252
|
i0__namespace.ɵɵelementEnd();
|
|
22197
|
-
i0__namespace.ɵɵelementStart(6, "span",
|
|
22253
|
+
i0__namespace.ɵɵelementStart(6, "span", 25);
|
|
22198
22254
|
i0__namespace.ɵɵtext(7);
|
|
22199
22255
|
i0__namespace.ɵɵelementEnd();
|
|
22200
22256
|
i0__namespace.ɵɵelementEnd();
|
|
22201
22257
|
i0__namespace.ɵɵelementStart(8, "div");
|
|
22202
|
-
i0__namespace.ɵɵelementContainer(9,
|
|
22258
|
+
i0__namespace.ɵɵelementContainer(9, 26);
|
|
22203
22259
|
i0__namespace.ɵɵelementEnd();
|
|
22204
22260
|
i0__namespace.ɵɵelementEnd();
|
|
22205
22261
|
}
|
|
@@ -22224,7 +22280,7 @@
|
|
|
22224
22280
|
i0__namespace.ɵɵtemplate(1, CaseFileViewFolderComponent_div_8_div_1_Template, 2, 0, "div", 8);
|
|
22225
22281
|
i0__namespace.ɵɵelementStart(2, "div");
|
|
22226
22282
|
i0__namespace.ɵɵelementStart(3, "cdk-tree", 9);
|
|
22227
|
-
i0__namespace.ɵɵtemplate(4, CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_4_Template,
|
|
22283
|
+
i0__namespace.ɵɵtemplate(4, CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_4_Template, 11, 5, "cdk-nested-tree-node", 10);
|
|
22228
22284
|
i0__namespace.ɵɵtemplate(5, CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_5_Template, 10, 6, "cdk-nested-tree-node", 11);
|
|
22229
22285
|
i0__namespace.ɵɵelementEnd();
|
|
22230
22286
|
i0__namespace.ɵɵelementEnd();
|
|
@@ -22242,17 +22298,18 @@
|
|
|
22242
22298
|
}
|
|
22243
22299
|
var MEDIA_VIEWER_LOCALSTORAGE_KEY = 'media-viewer-info';
|
|
22244
22300
|
var CaseFileViewFolderComponent = /** @class */ (function () {
|
|
22245
|
-
function CaseFileViewFolderComponent(windowService, router, documentManagementService, dialog) {
|
|
22301
|
+
function CaseFileViewFolderComponent(windowService, router, documentManagementService, dialog, appConfig) {
|
|
22246
22302
|
this.windowService = windowService;
|
|
22247
22303
|
this.router = router;
|
|
22248
22304
|
this.documentManagementService = documentManagementService;
|
|
22249
22305
|
this.dialog = dialog;
|
|
22306
|
+
this.appConfig = appConfig;
|
|
22250
22307
|
this.clickedDocument = new i0.EventEmitter();
|
|
22251
22308
|
this.moveDocument = new i0.EventEmitter();
|
|
22252
22309
|
this.categories = [];
|
|
22253
22310
|
this.getChildren = function (node) { return rxjs.of(node.children); };
|
|
22254
22311
|
this.nestedChildren = function (_, nodeData) { return nodeData.children; };
|
|
22255
|
-
this.nestedTreeControl = new
|
|
22312
|
+
this.nestedTreeControl = new i8.NestedTreeControl(this.getChildren);
|
|
22256
22313
|
}
|
|
22257
22314
|
Object.defineProperty(CaseFileViewFolderComponent.prototype, "documentCount", {
|
|
22258
22315
|
get: function () {
|
|
@@ -22311,6 +22368,7 @@
|
|
|
22311
22368
|
}, []);
|
|
22312
22369
|
};
|
|
22313
22370
|
CaseFileViewFolderComponent.prototype.getDocuments = function (documents) {
|
|
22371
|
+
var _this = this;
|
|
22314
22372
|
var documentsToReturn = [];
|
|
22315
22373
|
documents.forEach(function (document) {
|
|
22316
22374
|
var documentTreeNode = new DocumentTreeNode();
|
|
@@ -22319,11 +22377,14 @@
|
|
|
22319
22377
|
documentTreeNode.document_filename = document.document_filename;
|
|
22320
22378
|
documentTreeNode.document_binary_url = document.document_binary_url;
|
|
22321
22379
|
documentTreeNode.attribute_path = document.attribute_path;
|
|
22380
|
+
documentTreeNode.upload_timestamp = _this.appConfig.getEnableCaseFileViewVersion1_1()
|
|
22381
|
+
&& document.upload_timestamp ? moment__namespace(document.upload_timestamp).format('DD MMM YYYY') : '';
|
|
22322
22382
|
documentsToReturn.push(documentTreeNode);
|
|
22323
22383
|
});
|
|
22324
22384
|
return documentsToReturn;
|
|
22325
22385
|
};
|
|
22326
22386
|
CaseFileViewFolderComponent.prototype.getUncategorisedDocuments = function (uncategorisedDocuments) {
|
|
22387
|
+
var _this = this;
|
|
22327
22388
|
var documents = [];
|
|
22328
22389
|
uncategorisedDocuments.forEach(function (document) {
|
|
22329
22390
|
var documentTreeNode = new DocumentTreeNode();
|
|
@@ -22332,6 +22393,8 @@
|
|
|
22332
22393
|
documentTreeNode.document_filename = document.document_filename;
|
|
22333
22394
|
documentTreeNode.document_binary_url = document.document_binary_url;
|
|
22334
22395
|
documentTreeNode.attribute_path = document.attribute_path;
|
|
22396
|
+
documentTreeNode.upload_timestamp = _this.appConfig.getEnableCaseFileViewVersion1_1()
|
|
22397
|
+
&& document.upload_timestamp ? moment__namespace(document.upload_timestamp).format('DD MMM YYYY') : '';
|
|
22335
22398
|
documents.push(documentTreeNode);
|
|
22336
22399
|
});
|
|
22337
22400
|
var uncategorisedNode = new DocumentTreeNode();
|
|
@@ -22386,16 +22449,16 @@
|
|
|
22386
22449
|
return;
|
|
22387
22450
|
}
|
|
22388
22451
|
};
|
|
22389
|
-
CaseFileViewFolderComponent.prototype.
|
|
22452
|
+
CaseFileViewFolderComponent.prototype.sortDataSourceAscending = function (column) {
|
|
22390
22453
|
var sortedData = this.nestedDataSource.map(function (item) {
|
|
22391
|
-
item.sortChildrenAscending();
|
|
22454
|
+
item.sortChildrenAscending(column, exports.SortOrder.ASCENDING);
|
|
22392
22455
|
return item;
|
|
22393
22456
|
});
|
|
22394
22457
|
this.updateNodeData(sortedData);
|
|
22395
22458
|
};
|
|
22396
|
-
CaseFileViewFolderComponent.prototype.
|
|
22459
|
+
CaseFileViewFolderComponent.prototype.sortDataSourceDescending = function (column) {
|
|
22397
22460
|
var sortedData = this.nestedDataSource.map(function (item) {
|
|
22398
|
-
item.sortChildrenDescending();
|
|
22461
|
+
item.sortChildrenDescending(column, exports.SortOrder.DESCENDING);
|
|
22399
22462
|
return item;
|
|
22400
22463
|
});
|
|
22401
22464
|
this.updateNodeData(sortedData);
|
|
@@ -22455,8 +22518,8 @@
|
|
|
22455
22518
|
CaseFileViewFolderComponent.UNCATEGORISED_DOCUMENTS_TITLE = 'Uncategorised documents';
|
|
22456
22519
|
CaseFileViewFolderComponent.DOCUMENT_SEARCH_FORM_CONTROL_NAME = 'documentSearchFormControl';
|
|
22457
22520
|
CaseFileViewFolderComponent.MINIMUM_SEARCH_CHARACTERS = 1;
|
|
22458
|
-
CaseFileViewFolderComponent.ɵfac = function CaseFileViewFolderComponent_Factory(t) { return new (t || CaseFileViewFolderComponent)(i0__namespace.ɵɵdirectiveInject(WindowService), i0__namespace.ɵɵdirectiveInject(i1__namespace$1.Router), i0__namespace.ɵɵdirectiveInject(DocumentManagementService), i0__namespace.ɵɵdirectiveInject(i1__namespace$3.MatDialog)); };
|
|
22459
|
-
CaseFileViewFolderComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CaseFileViewFolderComponent, selectors: [["ccd-case-file-view-folder"]], inputs: { categoriesAndDocuments: "categoriesAndDocuments", allowMoving: "allowMoving" }, outputs: { clickedDocument: "clickedDocument", moveDocument: "moveDocument" }, decls: 9, vars: 3, consts: [[1, "document-filter-container"], [1, "form-group", "document-filter", 3, "formGroup"], ["type", "search", "id", "document-search", "name", "documentSearchFormControl", "formControlName", "documentSearchFormControl", "placeholder", "Search by document name", 1, "form-control", "document-search"], [1, "document-folders-header"], [1, "document-folders-header__title"], [3, "sortAscending", "sortDescending"], ["class", "document-tree-container", 4, "ngIf"], [1, "document-tree-container"], [4, "ngIf"], [3, "dataSource", "treeControl"], ["class", "document-tree-container__node document-tree-container__node--document", 4, "cdkTreeNodeDef"], ["class", "document-tree-container__node document-tree-container__folder", 4, "cdkTreeNodeDef", "cdkTreeNodeDefWhen"], [1, "document-tree-container__node", "document-tree-container__node--document"], [1, "node", 3, "click"], ["disabled", "", 1, "node__icon"], ["src", "/assets/img/case-file-view/case-file-view-document.svg", "alt", "Document icon", 1, "node__iconImg"], [1, "node__name", "node-name-document"], [1, "node__document-options"], [3, "allowMoving", "changeFolderAction", "openInANewTabAction", "downloadAction", "printAction"], [1, "document-tree-container__node", "document-tree-container__folder"], ["cdkTreeNodeToggle", "", 1, "node"], [1, "node__icon"], ["alt", "Folder icon", 1, "node__iconImg", 3, "src"], [1, "node__count"], [1, "node__name", "node__name--folder"], ["cdkTreeNodeOutlet", ""]], template: function CaseFileViewFolderComponent_Template(rf, ctx) {
|
|
22521
|
+
CaseFileViewFolderComponent.ɵfac = function CaseFileViewFolderComponent_Factory(t) { return new (t || CaseFileViewFolderComponent)(i0__namespace.ɵɵdirectiveInject(WindowService), i0__namespace.ɵɵdirectiveInject(i1__namespace$1.Router), i0__namespace.ɵɵdirectiveInject(DocumentManagementService), i0__namespace.ɵɵdirectiveInject(i1__namespace$3.MatDialog), i0__namespace.ɵɵdirectiveInject(AbstractAppConfig)); };
|
|
22522
|
+
CaseFileViewFolderComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CaseFileViewFolderComponent, selectors: [["ccd-case-file-view-folder"]], inputs: { categoriesAndDocuments: "categoriesAndDocuments", allowMoving: "allowMoving" }, outputs: { clickedDocument: "clickedDocument", moveDocument: "moveDocument" }, decls: 9, vars: 3, consts: [[1, "document-filter-container"], [1, "form-group", "document-filter", 3, "formGroup"], ["type", "search", "id", "document-search", "name", "documentSearchFormControl", "formControlName", "documentSearchFormControl", "placeholder", "Search by document name", 1, "form-control", "document-search"], [1, "document-folders-header"], [1, "document-folders-header__title"], [3, "sortAscending", "sortDescending"], ["class", "document-tree-container", 4, "ngIf"], [1, "document-tree-container"], [4, "ngIf"], [3, "dataSource", "treeControl"], ["class", "document-tree-container__node document-tree-container__node--document", 4, "cdkTreeNodeDef"], ["class", "document-tree-container__node document-tree-container__folder", 4, "cdkTreeNodeDef", "cdkTreeNodeDefWhen"], [1, "document-tree-container__node", "document-tree-container__node--document"], [1, "node", 3, "click"], ["disabled", "", 1, "node__icon"], ["src", "/assets/img/case-file-view/case-file-view-document.svg", "alt", "Document icon", 1, "node__iconImg"], [1, "node__name", "node-name-document"], [1, "node__document-upload-timestamp"], [1, "node__document-options"], [3, "allowMoving", "changeFolderAction", "openInANewTabAction", "downloadAction", "printAction"], [1, "document-tree-container__node", "document-tree-container__folder"], ["cdkTreeNodeToggle", "", 1, "node"], [1, "node__icon"], ["alt", "Folder icon", 1, "node__iconImg", 3, "src"], [1, "node__count"], [1, "node__name", "node__name--folder"], ["cdkTreeNodeOutlet", ""]], template: function CaseFileViewFolderComponent_Template(rf, ctx) {
|
|
22460
22523
|
if (rf & 1) {
|
|
22461
22524
|
i0__namespace.ɵɵelementStart(0, "div", 0);
|
|
22462
22525
|
i0__namespace.ɵɵelementStart(1, "div", 1);
|
|
@@ -22469,7 +22532,7 @@
|
|
|
22469
22532
|
i0__namespace.ɵɵelementEnd();
|
|
22470
22533
|
i0__namespace.ɵɵelementStart(6, "div");
|
|
22471
22534
|
i0__namespace.ɵɵelementStart(7, "ccd-case-file-view-folder-sort", 5);
|
|
22472
|
-
i0__namespace.ɵɵlistener("sortAscending", function CaseFileViewFolderComponent_Template_ccd_case_file_view_folder_sort_sortAscending_7_listener() { return ctx.
|
|
22535
|
+
i0__namespace.ɵɵlistener("sortAscending", function CaseFileViewFolderComponent_Template_ccd_case_file_view_folder_sort_sortAscending_7_listener($event) { return ctx.sortDataSourceAscending($event); })("sortDescending", function CaseFileViewFolderComponent_Template_ccd_case_file_view_folder_sort_sortDescending_7_listener($event) { return ctx.sortDataSourceDescending($event); });
|
|
22473
22536
|
i0__namespace.ɵɵelementEnd();
|
|
22474
22537
|
i0__namespace.ɵɵelementEnd();
|
|
22475
22538
|
i0__namespace.ɵɵelementEnd();
|
|
@@ -22483,7 +22546,7 @@
|
|
|
22483
22546
|
i0__namespace.ɵɵadvance(3);
|
|
22484
22547
|
i0__namespace.ɵɵproperty("ngIf", ctx.documentTreeData);
|
|
22485
22548
|
}
|
|
22486
|
-
}, directives: [i2__namespace$1.NgControlStatusGroup, i2__namespace$1.FormGroupDirective, i2__namespace$1.DefaultValueAccessor, i2__namespace$1.NgControlStatus, i2__namespace$1.FormControlName, CaseFileViewFolderSortComponent, i2__namespace.NgIf,
|
|
22549
|
+
}, directives: [i2__namespace$1.NgControlStatusGroup, i2__namespace$1.FormGroupDirective, i2__namespace$1.DefaultValueAccessor, i2__namespace$1.NgControlStatus, i2__namespace$1.FormControlName, CaseFileViewFolderSortComponent, i2__namespace.NgIf, i8__namespace.CdkTree, i8__namespace.CdkTreeNodeDef, i8__namespace.CdkNestedTreeNode, CaseFileViewFolderDocumentActionsComponent, i8__namespace.CdkTreeNodeToggle, i8__namespace.CdkTreeNodeOutlet], styles: ["[_nghost-%COMP%]{display:flex;height:100%;flex-direction:column}[_nghost-%COMP%] .document-tree-container[_ngcontent-%COMP%]{flex:1 0}.document-filter-container[_ngcontent-%COMP%]{border-bottom:2px solid #c9c9c9}.document-filter-container[_ngcontent-%COMP%] .document-filter[_ngcontent-%COMP%]{padding:10px}.document-filter-container[_ngcontent-%COMP%] .document-filter[_ngcontent-%COMP%] .document-search[_ngcontent-%COMP%]{background:url(/assets/images/icon-search-black.svg) no-repeat 100% #fff;background-position-x:calc(100% - 4px);padding-right:30px;width:100%}.document-filter-container[_ngcontent-%COMP%] .documents-title[_ngcontent-%COMP%]{height:30%;margin-left:8px;font-weight:700}.document-tree-container[_ngcontent-%COMP%]{padding:4px;overflow-x:hidden;overflow-y:scroll}.document-tree-container__node[_ngcontent-%COMP%]{display:block}.document-tree-container__node[_ngcontent-%COMP%] .document-tree-container__node[_ngcontent-%COMP%]{padding-left:40px}.document-tree-container[_ngcontent-%COMP%] .document-tree-invisible[_ngcontent-%COMP%]{display:none}.document-tree-container[_ngcontent-%COMP%]::-webkit-scrollbar{width:7px}.document-tree-container[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border:4px solid transparent;background-clip:padding-box;border-radius:9999px;background-color:#aaa}.document-tree-container[_ngcontent-%COMP%]::-webkit-scrollbar-button{display:none}.document-tree-container[_ngcontent-%COMP%]::-webkit-scrollbar-track-piece{background:#eee}.document-tree-container[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#ccc}.document-folders-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;border-bottom:2px solid #c9c9c9;padding:10px}.document-folders-header__title[_ngcontent-%COMP%]{font-weight:700}.node[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;padding:10px;background:none;border:0;cursor:pointer;white-space:nowrap}.node--selected[_ngcontent-%COMP%]{background:#fff2cc}.node__icon[_ngcontent-%COMP%]{position:relative;display:inline-block}.node__count[_ngcontent-%COMP%]{color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:.875rem;padding-top:4px}.node__iconImg[_ngcontent-%COMP%]{display:block;height:30px;width:30px}.node__name[_ngcontent-%COMP%]{margin-left:6px;font-size:1rem;overflow:hidden;text-overflow:ellipsis}.node__document-options[_ngcontent-%COMP%]{margin-left:auto;margin-right:0}.node__document-upload-timestamp[_ngcontent-%COMP%]{font-size:.8rem;float:left;padding-left:10px}"] });
|
|
22487
22550
|
(function () {
|
|
22488
22551
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CaseFileViewFolderComponent, [{
|
|
22489
22552
|
type: i0.Component,
|
|
@@ -22492,7 +22555,7 @@
|
|
|
22492
22555
|
templateUrl: './case-file-view-folder.component.html',
|
|
22493
22556
|
styleUrls: ['./case-file-view-folder.component.scss'],
|
|
22494
22557
|
}]
|
|
22495
|
-
}], function () { return [{ type: WindowService }, { type: i1__namespace$1.Router }, { type: DocumentManagementService }, { type: i1__namespace$3.MatDialog }]; }, { categoriesAndDocuments: [{
|
|
22558
|
+
}], function () { return [{ type: WindowService }, { type: i1__namespace$1.Router }, { type: DocumentManagementService }, { type: i1__namespace$3.MatDialog }, { type: AbstractAppConfig }]; }, { categoriesAndDocuments: [{
|
|
22496
22559
|
type: i0.Input
|
|
22497
22560
|
}], allowMoving: [{
|
|
22498
22561
|
type: i0.Input
|
|
@@ -24399,13 +24462,6 @@
|
|
|
24399
24462
|
}] });
|
|
24400
24463
|
})();
|
|
24401
24464
|
|
|
24402
|
-
var SortOrder;
|
|
24403
|
-
(function (SortOrder) {
|
|
24404
|
-
SortOrder[SortOrder["ASCENDING"] = 0] = "ASCENDING";
|
|
24405
|
-
SortOrder[SortOrder["DESCENDING"] = 1] = "DESCENDING";
|
|
24406
|
-
SortOrder[SortOrder["UNSORTED"] = 2] = "UNSORTED";
|
|
24407
|
-
})(SortOrder || (SortOrder = {}));
|
|
24408
|
-
|
|
24409
24465
|
function ReadComplexFieldCollectionTableComponent_th_10_Template(rf, ctx) {
|
|
24410
24466
|
if (rf & 1) {
|
|
24411
24467
|
var _r4_1 = i0__namespace.ɵɵgetCurrentView();
|
|
@@ -24679,7 +24735,7 @@
|
|
|
24679
24735
|
return _this;
|
|
24680
24736
|
}
|
|
24681
24737
|
ReadComplexFieldCollectionTableComponent.isSortAscending = function (column) {
|
|
24682
|
-
return !(column.sortOrder === SortOrder.UNSORTED || column.sortOrder === SortOrder.DESCENDING);
|
|
24738
|
+
return !(column.sortOrder === exports.SortOrder.UNSORTED || column.sortOrder === exports.SortOrder.DESCENDING);
|
|
24683
24739
|
};
|
|
24684
24740
|
ReadComplexFieldCollectionTableComponent.prototype.ngOnInit = function () {
|
|
24685
24741
|
_super.prototype.ngOnInit.call(this);
|
|
@@ -24737,19 +24793,19 @@
|
|
|
24737
24793
|
});
|
|
24738
24794
|
};
|
|
24739
24795
|
ReadComplexFieldCollectionTableComponent.prototype.sortRowsByColumns = function (column) {
|
|
24740
|
-
var shouldSortInAscendingOrder = this.columnsHorizontalLabel[column].sortOrder === SortOrder.UNSORTED
|
|
24741
|
-
|| this.columnsHorizontalLabel[column].sortOrder === SortOrder.DESCENDING;
|
|
24796
|
+
var shouldSortInAscendingOrder = this.columnsHorizontalLabel[column].sortOrder === exports.SortOrder.UNSORTED
|
|
24797
|
+
|| this.columnsHorizontalLabel[column].sortOrder === exports.SortOrder.DESCENDING;
|
|
24742
24798
|
// tslint:disable-next-line:switch-default
|
|
24743
24799
|
switch (this.columnsHorizontalLabel[column].type.type) {
|
|
24744
24800
|
case 'Number':
|
|
24745
24801
|
case 'MoneyGBP': {
|
|
24746
24802
|
if (shouldSortInAscendingOrder) {
|
|
24747
24803
|
this.rows.sort(function (a, b) { return a[column] - b[column]; });
|
|
24748
|
-
this.columnsHorizontalLabel[column].sortOrder = SortOrder.ASCENDING;
|
|
24804
|
+
this.columnsHorizontalLabel[column].sortOrder = exports.SortOrder.ASCENDING;
|
|
24749
24805
|
}
|
|
24750
24806
|
else {
|
|
24751
24807
|
this.rows.sort(function (a, b) { return b[column] - a[column]; });
|
|
24752
|
-
this.columnsHorizontalLabel[column].sortOrder = SortOrder.DESCENDING;
|
|
24808
|
+
this.columnsHorizontalLabel[column].sortOrder = exports.SortOrder.DESCENDING;
|
|
24753
24809
|
}
|
|
24754
24810
|
break;
|
|
24755
24811
|
}
|
|
@@ -24766,11 +24822,11 @@
|
|
|
24766
24822
|
{
|
|
24767
24823
|
if (shouldSortInAscendingOrder) {
|
|
24768
24824
|
this.rows.sort(function (a, b) { return a[column] < b[column] ? -1 : a[column] > b[column] ? 1 : 0; });
|
|
24769
|
-
this.columnsHorizontalLabel[column].sortOrder = SortOrder.ASCENDING;
|
|
24825
|
+
this.columnsHorizontalLabel[column].sortOrder = exports.SortOrder.ASCENDING;
|
|
24770
24826
|
}
|
|
24771
24827
|
else {
|
|
24772
24828
|
this.rows.sort(function (a, b) { return a[column] < b[column] ? 1 : a[column] > b[column] ? -1 : 0; });
|
|
24773
|
-
this.columnsHorizontalLabel[column].sortOrder = SortOrder.DESCENDING;
|
|
24829
|
+
this.columnsHorizontalLabel[column].sortOrder = exports.SortOrder.DESCENDING;
|
|
24774
24830
|
}
|
|
24775
24831
|
}
|
|
24776
24832
|
break;
|
|
@@ -24786,7 +24842,7 @@
|
|
|
24786
24842
|
var id = _c.value;
|
|
24787
24843
|
var trimmedId = id.trim();
|
|
24788
24844
|
labelsHorizontal[trimmedId] = allLabels[trimmedId];
|
|
24789
|
-
labelsHorizontal[trimmedId].sortOrder = SortOrder.UNSORTED;
|
|
24845
|
+
labelsHorizontal[trimmedId].sortOrder = exports.SortOrder.UNSORTED;
|
|
24790
24846
|
delete labelsVertical[trimmedId];
|
|
24791
24847
|
}
|
|
24792
24848
|
}
|
|
@@ -26718,7 +26774,7 @@
|
|
|
26718
26774
|
}
|
|
26719
26775
|
return searchResults.sort(function (a, b) {
|
|
26720
26776
|
return sortParameters.comparator.compare(a, b)
|
|
26721
|
-
* (sortParameters.sortOrder === SortOrder.DESCENDING ? 1 : -1);
|
|
26777
|
+
* (sortParameters.sortOrder === exports.SortOrder.DESCENDING ? 1 : -1);
|
|
26722
26778
|
});
|
|
26723
26779
|
};
|
|
26724
26780
|
return SortSearchResultPipe;
|
|
@@ -27014,12 +27070,12 @@
|
|
|
27014
27070
|
i3$1.MatInputModule,
|
|
27015
27071
|
i5$1.MatDatepickerModule,
|
|
27016
27072
|
i5.MatAutocompleteModule,
|
|
27017
|
-
|
|
27073
|
+
i8.CdkTreeModule,
|
|
27018
27074
|
i1$5.OverlayModule,
|
|
27019
27075
|
i3.PaymentLibModule,
|
|
27020
27076
|
i2$2.ScrollToModule.forRoot(),
|
|
27021
27077
|
i1.RpxTranslationModule.forChild(),
|
|
27022
|
-
|
|
27078
|
+
i8.CdkTreeModule,
|
|
27023
27079
|
i1$5.OverlayModule,
|
|
27024
27080
|
i1$3.MatDialogModule,
|
|
27025
27081
|
i12.MediaViewerModule,
|
|
@@ -27162,9 +27218,9 @@
|
|
|
27162
27218
|
i3$1.MatInputModule,
|
|
27163
27219
|
i5$1.MatDatepickerModule,
|
|
27164
27220
|
i5.MatAutocompleteModule,
|
|
27165
|
-
|
|
27221
|
+
i8.CdkTreeModule,
|
|
27166
27222
|
i1$5.OverlayModule,
|
|
27167
|
-
i3.PaymentLibModule, i2__namespace$2.ScrollToModule, i1__namespace.RpxTranslationModule,
|
|
27223
|
+
i3.PaymentLibModule, i2__namespace$2.ScrollToModule, i1__namespace.RpxTranslationModule, i8.CdkTreeModule,
|
|
27168
27224
|
i1$5.OverlayModule,
|
|
27169
27225
|
i1$3.MatDialogModule,
|
|
27170
27226
|
i12.MediaViewerModule,
|
|
@@ -27307,12 +27363,12 @@
|
|
|
27307
27363
|
i3$1.MatInputModule,
|
|
27308
27364
|
i5$1.MatDatepickerModule,
|
|
27309
27365
|
i5.MatAutocompleteModule,
|
|
27310
|
-
|
|
27366
|
+
i8.CdkTreeModule,
|
|
27311
27367
|
i1$5.OverlayModule,
|
|
27312
27368
|
i3.PaymentLibModule,
|
|
27313
27369
|
i2$2.ScrollToModule.forRoot(),
|
|
27314
27370
|
i1.RpxTranslationModule.forChild(),
|
|
27315
|
-
|
|
27371
|
+
i8.CdkTreeModule,
|
|
27316
27372
|
i1$5.OverlayModule,
|
|
27317
27373
|
i1$3.MatDialogModule,
|
|
27318
27374
|
i12.MediaViewerModule,
|
|
@@ -31042,13 +31098,14 @@
|
|
|
31042
31098
|
i0__namespace.ɵɵsetComponentScope(CaseTimelineComponent, [i2__namespace.NgIf, i2__namespace.NgSwitch, i2__namespace.NgSwitchCase, EventLogComponent, CaseHistoryComponent], [i1__namespace.RpxTranslatePipe]);
|
|
31043
31099
|
|
|
31044
31100
|
var CaseResolver = /** @class */ (function () {
|
|
31045
|
-
function CaseResolver(caseNotifier, draftService, navigationNotifierService, router, sessionStorage) {
|
|
31101
|
+
function CaseResolver(caseNotifier, draftService, navigationNotifierService, router, sessionStorage, appConfig) {
|
|
31046
31102
|
var _this = this;
|
|
31047
31103
|
this.caseNotifier = caseNotifier;
|
|
31048
31104
|
this.draftService = draftService;
|
|
31049
31105
|
this.navigationNotifierService = navigationNotifierService;
|
|
31050
31106
|
this.router = router;
|
|
31051
31107
|
this.sessionStorage = sessionStorage;
|
|
31108
|
+
this.appConfig = appConfig;
|
|
31052
31109
|
router.events.pipe(operators.filter(function (event) { return event instanceof i1$1.NavigationEnd; }))
|
|
31053
31110
|
.subscribe(function (event) {
|
|
31054
31111
|
_this.previousUrl = event.url;
|
|
@@ -31094,7 +31151,7 @@
|
|
|
31094
31151
|
else {
|
|
31095
31152
|
console.info('getAndCacheCaseView - Path B.');
|
|
31096
31153
|
return this.caseNotifier.fetchAndRefresh(cid)
|
|
31097
|
-
.pipe(operators.catchError(function (error) { return _this.processErrorInCaseFetch(error); }))
|
|
31154
|
+
.pipe(operators.catchError(function (error) { return _this.processErrorInCaseFetch(error, cid); }))
|
|
31098
31155
|
.toPromise();
|
|
31099
31156
|
}
|
|
31100
31157
|
}
|
|
@@ -31107,9 +31164,9 @@
|
|
|
31107
31164
|
_this.caseNotifier.cachedCaseView = classTransformer.plainToClassFromExist(new CaseView(), caseView);
|
|
31108
31165
|
_this.caseNotifier.announceCase(_this.caseNotifier.cachedCaseView);
|
|
31109
31166
|
return _this.caseNotifier.cachedCaseView;
|
|
31110
|
-
}), operators.catchError(function (error) { return _this.processErrorInCaseFetch(error); })).toPromise();
|
|
31167
|
+
}), operators.catchError(function (error) { return _this.processErrorInCaseFetch(error, cid); })).toPromise();
|
|
31111
31168
|
};
|
|
31112
|
-
CaseResolver.prototype.processErrorInCaseFetch = function (error) {
|
|
31169
|
+
CaseResolver.prototype.processErrorInCaseFetch = function (error, caseReference) {
|
|
31113
31170
|
console.error('!!! processErrorInCaseFetch !!!');
|
|
31114
31171
|
console.error(error);
|
|
31115
31172
|
// TODO Should be logged to remote logging infrastructure
|
|
@@ -31117,12 +31174,16 @@
|
|
|
31117
31174
|
this.router.navigate(['/search/noresults']);
|
|
31118
31175
|
return rxjs.of(null);
|
|
31119
31176
|
}
|
|
31120
|
-
console.error(error);
|
|
31121
31177
|
if (CaseResolver.EVENT_REGEX.test(this.previousUrl) && error.status === 404) {
|
|
31122
31178
|
this.router.navigate(['/list/case']);
|
|
31123
31179
|
return rxjs.of(null);
|
|
31124
31180
|
}
|
|
31125
|
-
|
|
31181
|
+
// Error 403 and enable-restricted-case-access Launch Darkly flag is enabled, navigate to restricted case access page
|
|
31182
|
+
if (error.status === 403 && this.appConfig.getEnableRestrictedCaseAccessConfig()) {
|
|
31183
|
+
this.router.navigate(["/cases/restricted-case-access/" + caseReference]);
|
|
31184
|
+
return rxjs.of(null);
|
|
31185
|
+
}
|
|
31186
|
+
if (error.status !== 401) {
|
|
31126
31187
|
this.router.navigate(['/error']);
|
|
31127
31188
|
}
|
|
31128
31189
|
this.goToDefaultPage();
|
|
@@ -31149,12 +31210,12 @@
|
|
|
31149
31210
|
CaseResolver.CASE_CREATED_MSG = 'The case has been created successfully';
|
|
31150
31211
|
CaseResolver.defaultWAPage = '/work/my-work/list';
|
|
31151
31212
|
CaseResolver.defaultPage = '/cases';
|
|
31152
|
-
CaseResolver.ɵfac = function CaseResolver_Factory(t) { return new (t || CaseResolver)(i0__namespace.ɵɵinject(CaseNotifier), i0__namespace.ɵɵinject(DraftService), i0__namespace.ɵɵinject(NavigationNotifierService), i0__namespace.ɵɵinject(i1__namespace$1.Router), i0__namespace.ɵɵinject(SessionStorageService)); };
|
|
31213
|
+
CaseResolver.ɵfac = function CaseResolver_Factory(t) { return new (t || CaseResolver)(i0__namespace.ɵɵinject(CaseNotifier), i0__namespace.ɵɵinject(DraftService), i0__namespace.ɵɵinject(NavigationNotifierService), i0__namespace.ɵɵinject(i1__namespace$1.Router), i0__namespace.ɵɵinject(SessionStorageService), i0__namespace.ɵɵinject(AbstractAppConfig)); };
|
|
31153
31214
|
CaseResolver.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: CaseResolver, factory: CaseResolver.ɵfac });
|
|
31154
31215
|
(function () {
|
|
31155
31216
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CaseResolver, [{
|
|
31156
31217
|
type: i0.Injectable
|
|
31157
|
-
}], function () { return [{ type: CaseNotifier }, { type: DraftService }, { type: NavigationNotifierService }, { type: i1__namespace$1.Router }, { type: SessionStorageService }]; }, null);
|
|
31218
|
+
}], function () { return [{ type: CaseNotifier }, { type: DraftService }, { type: NavigationNotifierService }, { type: i1__namespace$1.Router }, { type: SessionStorageService }, { type: AbstractAppConfig }]; }, null);
|
|
31158
31219
|
})();
|
|
31159
31220
|
|
|
31160
31221
|
var EventTriggerResolver = /** @class */ (function () {
|