@hmcts/ccd-case-ui-toolkit 6.19.11 → 6.19.12-exui-997

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/bundles/hmcts-ccd-case-ui-toolkit.umd.js +185 -121
  2. package/bundles/hmcts-ccd-case-ui-toolkit.umd.js.map +1 -1
  3. package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js +1 -1
  4. package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js.map +1 -1
  5. package/esm2015/lib/app.config.js +1 -1
  6. package/esm2015/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.js +6 -4
  7. package/esm2015/lib/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.js +4 -2
  8. 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
  9. package/esm2015/lib/shared/components/palette/case-file-view/components/case-file-view-folder/case-file-view-folder.component.js +43 -28
  10. package/esm2015/lib/shared/components/palette/case-file-view/test-data/categories-and-documents-test-data.js +233 -0
  11. package/esm2015/lib/shared/components/palette/complex/read-complex-field-collection-table.component.js +2 -2
  12. package/esm2015/lib/shared/domain/case-file-view/case-file-view-document.model.js +1 -1
  13. package/esm2015/lib/shared/domain/case-file-view/case-file-view-sort-columns.enum.js +6 -0
  14. package/esm2015/lib/shared/domain/case-file-view/document-tree-node/document-tree-node.model.js +39 -13
  15. package/esm2015/lib/shared/domain/case-file-view/index.js +3 -2
  16. package/esm2015/lib/shared/domain/index.js +10 -10
  17. package/esm2015/lib/shared/domain/search/sorting/sort-parameters.js +1 -1
  18. package/esm2015/lib/shared/domain/sort-order.enum.js +7 -0
  19. package/esm2015/lib/shared/pipes/complex/ccd-read-fields-filter.pipe.js +14 -7
  20. package/esm2015/lib/shared/pipes/search-result/sorting/sort-search-result.pipe.js +2 -2
  21. package/esm2015/lib/shared/services/case-file-view/case-file-view.service.js +1 -1
  22. package/fesm2015/hmcts-ccd-case-ui-toolkit.js +145 -89
  23. package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
  24. package/lib/app.config.d.ts +2 -0
  25. package/lib/app.config.d.ts.map +1 -1
  26. package/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.d.ts +1 -0
  27. package/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.d.ts.map +1 -1
  28. package/lib/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.d.ts.map +1 -1
  29. 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
  30. 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
  31. package/lib/shared/components/palette/case-file-view/components/case-file-view-folder/case-file-view-folder.component.d.ts +5 -3
  32. package/lib/shared/components/palette/case-file-view/components/case-file-view-folder/case-file-view-folder.component.d.ts.map +1 -1
  33. package/lib/shared/components/palette/case-file-view/test-data/categories-and-documents-test-data.d.ts +3 -0
  34. package/lib/shared/components/palette/case-file-view/test-data/categories-and-documents-test-data.d.ts.map +1 -0
  35. package/lib/shared/components/palette/complex/read-complex-field-collection-table.component.d.ts.map +1 -1
  36. package/lib/shared/domain/case-file-view/case-file-view-document.model.d.ts +1 -1
  37. package/lib/shared/domain/case-file-view/case-file-view-document.model.d.ts.map +1 -1
  38. package/lib/shared/domain/case-file-view/case-file-view-sort-columns.enum.d.ts +5 -0
  39. package/lib/shared/domain/case-file-view/case-file-view-sort-columns.enum.d.ts.map +1 -0
  40. package/lib/shared/domain/case-file-view/document-tree-node/document-tree-node.model.d.ts +4 -2
  41. package/lib/shared/domain/case-file-view/document-tree-node/document-tree-node.model.d.ts.map +1 -1
  42. package/lib/shared/domain/case-file-view/index.d.ts +2 -1
  43. package/lib/shared/domain/case-file-view/index.d.ts.map +1 -1
  44. package/lib/shared/domain/index.d.ts +9 -9
  45. package/lib/shared/domain/index.d.ts.map +1 -1
  46. package/lib/shared/domain/search/sorting/sort-parameters.d.ts +1 -1
  47. package/lib/shared/domain/search/sorting/sort-parameters.d.ts.map +1 -1
  48. package/lib/shared/domain/{search/sorting/sort-order.d.ts → sort-order.enum.d.ts} +1 -1
  49. package/lib/shared/domain/sort-order.enum.d.ts.map +1 -0
  50. package/lib/shared/pipes/complex/ccd-read-fields-filter.pipe.d.ts +1 -1
  51. package/lib/shared/pipes/complex/ccd-read-fields-filter.pipe.d.ts.map +1 -1
  52. package/lib/shared/services/case-file-view/case-file-view.service.d.ts.map +1 -1
  53. package/package.json +1 -1
  54. package/esm2015/lib/shared/components/palette/complex/sort-order.js +0 -7
  55. package/esm2015/lib/shared/domain/search/sorting/sort-order.js +0 -7
  56. package/lib/shared/components/palette/complex/sort-order.d.ts +0 -6
  57. package/lib/shared/components/palette/complex/sort-order.d.ts.map +0 -1
  58. 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, i7, i3$1, i4, momentAdapter, i5$1, i6$1, i12, i6$2, i1$6, i10) { 'use strict';
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 i7__namespace = /*#__PURE__*/_interopNamespace(i7);
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);
@@ -3501,6 +3501,20 @@
3501
3501
  return Alert;
3502
3502
  }());
3503
3503
 
3504
+ // tslint:disable:variable-name
3505
+ var CaseDetails = /** @class */ (function () {
3506
+ function CaseDetails() {
3507
+ }
3508
+ return CaseDetails;
3509
+ }());
3510
+
3511
+ // tslint:disable:variable-name
3512
+ var CaseEventData = /** @class */ (function () {
3513
+ function CaseEventData() {
3514
+ }
3515
+ return CaseEventData;
3516
+ }());
3517
+
3504
3518
  var WizardPageField = /** @class */ (function () {
3505
3519
  function WizardPageField() {
3506
3520
  }
@@ -3920,6 +3934,20 @@
3920
3934
  return FormDocument;
3921
3935
  }());
3922
3936
 
3937
+ var DRAFT_PREFIX = 'DRAFT';
3938
+ var DRAFT_QUERY_PARAM = 'draft';
3939
+ var Draft = /** @class */ (function () {
3940
+ function Draft() {
3941
+ }
3942
+ Draft.stripDraftId = function (draftId) {
3943
+ return draftId.slice(DRAFT_PREFIX.length);
3944
+ };
3945
+ Draft.isDraft = function (id) {
3946
+ return String(id).startsWith(DRAFT_PREFIX);
3947
+ };
3948
+ return Draft;
3949
+ }());
3950
+
3923
3951
  var OrganisationConverter = /** @class */ (function () {
3924
3952
  function OrganisationConverter() {
3925
3953
  }
@@ -3965,6 +3993,12 @@
3965
3993
  }], null, null);
3966
3994
  })();
3967
3995
 
3996
+ var PaginationMetadata = /** @class */ (function () {
3997
+ function PaginationMetadata() {
3998
+ }
3999
+ return PaginationMetadata;
4000
+ }());
4001
+
3968
4002
  function hasRoles(profile) {
3969
4003
  if (profile.user && profile.user.idam && Array.isArray(profile.user.idam.roles)) {
3970
4004
  return profile.user.idam.roles.length > 0;
@@ -4023,20 +4057,6 @@
4023
4057
  __metadata("design:type", Array)
4024
4058
  ], SearchResultViewItem.prototype, "hydrated_case_fields", void 0);
4025
4059
 
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
4060
  // @dynamic
4041
4061
  var SearchResultView = /** @class */ (function () {
4042
4062
  function SearchResultView() {
@@ -4057,19 +4077,20 @@
4057
4077
  __metadata("design:type", Array)
4058
4078
  ], SearchResultView.prototype, "results", void 0);
4059
4079
 
4060
- // tslint:disable:variable-name
4061
- var CaseDetails = /** @class */ (function () {
4062
- function CaseDetails() {
4080
+ var SortParameters = /** @class */ (function () {
4081
+ function SortParameters(comparator, sortOrder) {
4082
+ this.comparator = comparator;
4083
+ this.sortOrder = sortOrder;
4063
4084
  }
4064
- return CaseDetails;
4085
+ return SortParameters;
4065
4086
  }());
4066
4087
 
4067
- // tslint:disable:variable-name
4068
- var CaseEventData = /** @class */ (function () {
4069
- function CaseEventData() {
4070
- }
4071
- return CaseEventData;
4072
- }());
4088
+ exports.SortOrder = void 0;
4089
+ (function (SortOrder) {
4090
+ SortOrder[SortOrder["ASCENDING"] = 0] = "ASCENDING";
4091
+ SortOrder[SortOrder["DESCENDING"] = 1] = "DESCENDING";
4092
+ SortOrder[SortOrder["UNSORTED"] = 2] = "UNSORTED";
4093
+ })(exports.SortOrder || (exports.SortOrder = {}));
4073
4094
 
4074
4095
  var WorkbasketInputModel = /** @class */ (function () {
4075
4096
  function WorkbasketInputModel() {
@@ -4082,27 +4103,6 @@
4082
4103
  return WorkbasketInput;
4083
4104
  }());
4084
4105
 
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
4106
  // @dynamic
4107
4107
  var FieldsUtils = /** @class */ (function () {
4108
4108
  function FieldsUtils() {
@@ -21975,20 +21975,38 @@
21975
21975
  }] });
21976
21976
  })();
21977
21977
 
21978
+ var CaseFileViewSortColumns;
21979
+ (function (CaseFileViewSortColumns) {
21980
+ CaseFileViewSortColumns[CaseFileViewSortColumns["DOCUMENT_NAME"] = 0] = "DOCUMENT_NAME";
21981
+ CaseFileViewSortColumns[CaseFileViewSortColumns["DOCUMENT_UPLOAD_TIMESTAMP"] = 1] = "DOCUMENT_UPLOAD_TIMESTAMP";
21982
+ })(CaseFileViewSortColumns || (CaseFileViewSortColumns = {}));
21983
+
21978
21984
  var CaseFileViewFolderSortComponent = /** @class */ (function () {
21979
- function CaseFileViewFolderSortComponent() {
21985
+ function CaseFileViewFolderSortComponent(appConfig) {
21980
21986
  var _this = this;
21987
+ this.appConfig = appConfig;
21981
21988
  this.isOpen = false;
21982
21989
  this.sortAscending = new i0.EventEmitter();
21983
21990
  this.sortDescending = new i0.EventEmitter();
21984
21991
  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(); } },
21992
+ { actionText: 'A to Z ascending', iconSrc: '/assets/img/sort/sort-down-arrow.svg', actionFn: function () { return _this.sortAscending.emit(CaseFileViewSortColumns.DOCUMENT_NAME); } },
21993
+ { actionText: 'Z to A descending', iconSrc: '/assets/img/sort/sort-up-arrow.svg', actionFn: function () { return _this.sortDescending.emit(CaseFileViewSortColumns.DOCUMENT_NAME); } },
21987
21994
  ];
21988
21995
  }
21996
+ CaseFileViewFolderSortComponent.prototype.ngOnInit = function () {
21997
+ var _this = this;
21998
+ if (this.appConfig.getEnableCaseFileViewVersion1_1()) {
21999
+ this.overlayMenuItems = [
22000
+ { actionText: 'A to Z ascending', iconSrc: '/assets/img/sort/sort-down-arrow.svg', actionFn: function () { return _this.sortAscending.emit(CaseFileViewSortColumns.DOCUMENT_NAME); } },
22001
+ { actionText: 'Z to A descending', iconSrc: '/assets/img/sort/sort-up-arrow.svg', actionFn: function () { return _this.sortDescending.emit(CaseFileViewSortColumns.DOCUMENT_NAME); } },
22002
+ { actionText: 'Recent first', iconSrc: '/assets/img/sort/sort-down-arrow.svg', actionFn: function () { return _this.sortDescending.emit(CaseFileViewSortColumns.DOCUMENT_UPLOAD_TIMESTAMP); } },
22003
+ { actionText: 'Oldest first', iconSrc: '/assets/img/sort/sort-up-arrow.svg', actionFn: function () { return _this.sortAscending.emit(CaseFileViewSortColumns.DOCUMENT_UPLOAD_TIMESTAMP); } },
22004
+ ];
22005
+ }
22006
+ };
21989
22007
  return CaseFileViewFolderSortComponent;
21990
22008
  }());
21991
- CaseFileViewFolderSortComponent.ɵfac = function CaseFileViewFolderSortComponent_Factory(t) { return new (t || CaseFileViewFolderSortComponent)(); };
22009
+ CaseFileViewFolderSortComponent.ɵfac = function CaseFileViewFolderSortComponent_Factory(t) { return new (t || CaseFileViewFolderSortComponent)(i0__namespace.ɵɵdirectiveInject(AbstractAppConfig)); };
21992
22010
  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
22011
  if (rf & 1) {
21994
22012
  i0__namespace.ɵɵelementStart(0, "ccd-case-file-view-overlay-menu", 0);
@@ -22010,7 +22028,7 @@
22010
22028
  templateUrl: './case-file-view-folder-sort.component.html',
22011
22029
  styleUrls: ['./case-file-view-folder-sort.component.scss']
22012
22030
  }]
22013
- }], function () { return []; }, { sortAscending: [{
22031
+ }], function () { return [{ type: AbstractAppConfig }]; }, { sortAscending: [{
22014
22032
  type: i0.Output
22015
22033
  }], sortDescending: [{
22016
22034
  type: i0.Output
@@ -22067,48 +22085,56 @@
22067
22085
  enumerable: false,
22068
22086
  configurable: true
22069
22087
  });
22070
- DocumentTreeNode.prototype.sortChildrenAscending = function () {
22088
+ DocumentTreeNode.prototype.sortChildrenAscending = function (column, sortOrder) {
22089
+ var _this = this;
22071
22090
  var _a, _b;
22072
22091
  var sortAscending = function () {
22073
22092
  return function (a, b) {
22074
- var nameA = a.name.toUpperCase();
22075
- var nameB = b.name.toUpperCase();
22093
+ var nodeA = _this.getNodeToSort(a, column, sortOrder);
22094
+ var nodeB = _this.getNodeToSort(b, column, sortOrder);
22076
22095
  if (a.type === DocumentTreeNodeType.FOLDER || b.type === DocumentTreeNodeType.FOLDER) {
22077
22096
  return 0;
22078
22097
  }
22079
- if (nameA < nameB) {
22098
+ if (!nodeA || !nodeB) {
22099
+ return 0;
22100
+ }
22101
+ if (nodeA < nodeB) {
22080
22102
  return -1;
22081
22103
  }
22082
- if (nameA > nameB) {
22104
+ if (nodeA > nodeB) {
22083
22105
  return 1;
22084
22106
  }
22085
22107
  };
22086
22108
  };
22087
22109
  (_a = this.children) === null || _a === void 0 ? void 0 : _a.sort(sortAscending());
22088
22110
  (_b = this.children) === null || _b === void 0 ? void 0 : _b.forEach(function (childNodes) {
22089
- childNodes.sortChildrenAscending();
22111
+ childNodes.sortChildrenAscending(column, sortOrder);
22090
22112
  });
22091
22113
  };
22092
- DocumentTreeNode.prototype.sortChildrenDescending = function () {
22114
+ DocumentTreeNode.prototype.sortChildrenDescending = function (column, sortOrder) {
22115
+ var _this = this;
22093
22116
  var _a, _b;
22094
22117
  var sortDescending = function () {
22095
22118
  return function (a, b) {
22096
- var nameA = a.name.toUpperCase();
22097
- var nameB = b.name.toUpperCase();
22119
+ var nodeA = _this.getNodeToSort(a, column, sortOrder);
22120
+ var nodeB = _this.getNodeToSort(b, column, sortOrder);
22098
22121
  if (a.type === DocumentTreeNodeType.FOLDER || b.type === DocumentTreeNodeType.FOLDER) {
22099
22122
  return 0;
22100
22123
  }
22101
- if (nameA > nameB) {
22124
+ if (!nodeA || !nodeB) {
22125
+ return 0;
22126
+ }
22127
+ if (nodeA > nodeB) {
22102
22128
  return -1;
22103
22129
  }
22104
- if (nameA < nameB) {
22130
+ if (nodeA < nodeB) {
22105
22131
  return 1;
22106
22132
  }
22107
22133
  };
22108
22134
  };
22109
22135
  (_a = this.children) === null || _a === void 0 ? void 0 : _a.sort(sortDescending());
22110
22136
  (_b = this.children) === null || _b === void 0 ? void 0 : _b.forEach(function (childNodes) {
22111
- childNodes.sortChildrenDescending();
22137
+ childNodes.sortChildrenDescending(column, sortOrder);
22112
22138
  });
22113
22139
  };
22114
22140
  Object.defineProperty(DocumentTreeNode.prototype, "flattenedAll", {
@@ -22134,6 +22160,24 @@
22134
22160
  enumerable: false,
22135
22161
  configurable: true
22136
22162
  });
22163
+ DocumentTreeNode.prototype.getNodeToSort = function (node, column, sortOrder) {
22164
+ if (column === CaseFileViewSortColumns.DOCUMENT_NAME) {
22165
+ return (node === null || node === void 0 ? void 0 : node.name) ? node.name.toUpperCase()
22166
+ : '';
22167
+ }
22168
+ if (column === CaseFileViewSortColumns.DOCUMENT_UPLOAD_TIMESTAMP) {
22169
+ if (node === null || node === void 0 ? void 0 : node.upload_timestamp) {
22170
+ return new Date(node.upload_timestamp);
22171
+ }
22172
+ if (sortOrder === exports.SortOrder.ASCENDING) {
22173
+ return new Date(9999, 12, 31);
22174
+ }
22175
+ if (sortOrder === exports.SortOrder.DESCENDING) {
22176
+ return new Date(1111, 1, 1);
22177
+ }
22178
+ }
22179
+ return '';
22180
+ };
22137
22181
  return DocumentTreeNode;
22138
22182
  }());
22139
22183
  __decorate([
@@ -22164,10 +22208,14 @@
22164
22208
  i0__namespace.ɵɵelementEnd();
22165
22209
  i0__namespace.ɵɵelementStart(4, "span", 16);
22166
22210
  i0__namespace.ɵɵtext(5);
22211
+ i0__namespace.ɵɵelement(6, "br");
22212
+ i0__namespace.ɵɵelementStart(7, "span", 17);
22213
+ i0__namespace.ɵɵtext(8);
22167
22214
  i0__namespace.ɵɵelementEnd();
22168
- i0__namespace.ɵɵelementStart(6, "div", 17);
22169
- i0__namespace.ɵɵelementStart(7, "ccd-case-file-view-folder-document-actions", 18);
22170
- i0__namespace.ɵɵlistener("changeFolderAction", function CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_4_Template_ccd_case_file_view_folder_document_actions_changeFolderAction_7_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_7_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_7_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_7_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); });
22215
+ i0__namespace.ɵɵelementEnd();
22216
+ i0__namespace.ɵɵelementStart(9, "div", 18);
22217
+ i0__namespace.ɵɵelementStart(10, "ccd-case-file-view-folder-document-actions", 19);
22218
+ 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
22219
  i0__namespace.ɵɵelementEnd();
22172
22220
  i0__namespace.ɵɵelementEnd();
22173
22221
  i0__namespace.ɵɵelementEnd();
@@ -22179,27 +22227,29 @@
22179
22227
  i0__namespace.ɵɵadvance(1);
22180
22228
  i0__namespace.ɵɵclassProp("node--selected", (ctx_r2.selectedNodeItem == null ? null : ctx_r2.selectedNodeItem.name) === node_r4.name);
22181
22229
  i0__namespace.ɵɵadvance(4);
22182
- i0__namespace.ɵɵtextInterpolate(node_r4.name);
22230
+ i0__namespace.ɵɵtextInterpolate1(" ", node_r4.name, " ");
22231
+ i0__namespace.ɵɵadvance(3);
22232
+ i0__namespace.ɵɵtextInterpolate(node_r4.upload_timestamp);
22183
22233
  i0__namespace.ɵɵadvance(2);
22184
22234
  i0__namespace.ɵɵproperty("allowMoving", ctx_r2.allowMoving);
22185
22235
  }
22186
22236
  }
22187
22237
  function CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_5_Template(rf, ctx) {
22188
22238
  if (rf & 1) {
22189
- i0__namespace.ɵɵelementStart(0, "cdk-nested-tree-node", 19);
22190
- i0__namespace.ɵɵelementStart(1, "button", 20);
22191
- i0__namespace.ɵɵelementStart(2, "div", 21);
22192
- i0__namespace.ɵɵelement(3, "img", 22);
22193
- i0__namespace.ɵɵelementStart(4, "span", 23);
22239
+ i0__namespace.ɵɵelementStart(0, "cdk-nested-tree-node", 20);
22240
+ i0__namespace.ɵɵelementStart(1, "button", 21);
22241
+ i0__namespace.ɵɵelementStart(2, "div", 22);
22242
+ i0__namespace.ɵɵelement(3, "img", 23);
22243
+ i0__namespace.ɵɵelementStart(4, "span", 24);
22194
22244
  i0__namespace.ɵɵtext(5);
22195
22245
  i0__namespace.ɵɵelementEnd();
22196
22246
  i0__namespace.ɵɵelementEnd();
22197
- i0__namespace.ɵɵelementStart(6, "span", 24);
22247
+ i0__namespace.ɵɵelementStart(6, "span", 25);
22198
22248
  i0__namespace.ɵɵtext(7);
22199
22249
  i0__namespace.ɵɵelementEnd();
22200
22250
  i0__namespace.ɵɵelementEnd();
22201
22251
  i0__namespace.ɵɵelementStart(8, "div");
22202
- i0__namespace.ɵɵelementContainer(9, 25);
22252
+ i0__namespace.ɵɵelementContainer(9, 26);
22203
22253
  i0__namespace.ɵɵelementEnd();
22204
22254
  i0__namespace.ɵɵelementEnd();
22205
22255
  }
@@ -22224,7 +22274,7 @@
22224
22274
  i0__namespace.ɵɵtemplate(1, CaseFileViewFolderComponent_div_8_div_1_Template, 2, 0, "div", 8);
22225
22275
  i0__namespace.ɵɵelementStart(2, "div");
22226
22276
  i0__namespace.ɵɵelementStart(3, "cdk-tree", 9);
22227
- i0__namespace.ɵɵtemplate(4, CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_4_Template, 8, 4, "cdk-nested-tree-node", 10);
22277
+ i0__namespace.ɵɵtemplate(4, CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_4_Template, 11, 5, "cdk-nested-tree-node", 10);
22228
22278
  i0__namespace.ɵɵtemplate(5, CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_5_Template, 10, 6, "cdk-nested-tree-node", 11);
22229
22279
  i0__namespace.ɵɵelementEnd();
22230
22280
  i0__namespace.ɵɵelementEnd();
@@ -22242,17 +22292,18 @@
22242
22292
  }
22243
22293
  var MEDIA_VIEWER_LOCALSTORAGE_KEY = 'media-viewer-info';
22244
22294
  var CaseFileViewFolderComponent = /** @class */ (function () {
22245
- function CaseFileViewFolderComponent(windowService, router, documentManagementService, dialog) {
22295
+ function CaseFileViewFolderComponent(windowService, router, documentManagementService, dialog, appConfig) {
22246
22296
  this.windowService = windowService;
22247
22297
  this.router = router;
22248
22298
  this.documentManagementService = documentManagementService;
22249
22299
  this.dialog = dialog;
22300
+ this.appConfig = appConfig;
22250
22301
  this.clickedDocument = new i0.EventEmitter();
22251
22302
  this.moveDocument = new i0.EventEmitter();
22252
22303
  this.categories = [];
22253
22304
  this.getChildren = function (node) { return rxjs.of(node.children); };
22254
22305
  this.nestedChildren = function (_, nodeData) { return nodeData.children; };
22255
- this.nestedTreeControl = new i7.NestedTreeControl(this.getChildren);
22306
+ this.nestedTreeControl = new i8.NestedTreeControl(this.getChildren);
22256
22307
  }
22257
22308
  Object.defineProperty(CaseFileViewFolderComponent.prototype, "documentCount", {
22258
22309
  get: function () {
@@ -22311,6 +22362,7 @@
22311
22362
  }, []);
22312
22363
  };
22313
22364
  CaseFileViewFolderComponent.prototype.getDocuments = function (documents) {
22365
+ var _this = this;
22314
22366
  var documentsToReturn = [];
22315
22367
  documents.forEach(function (document) {
22316
22368
  var documentTreeNode = new DocumentTreeNode();
@@ -22319,11 +22371,14 @@
22319
22371
  documentTreeNode.document_filename = document.document_filename;
22320
22372
  documentTreeNode.document_binary_url = document.document_binary_url;
22321
22373
  documentTreeNode.attribute_path = document.attribute_path;
22374
+ documentTreeNode.upload_timestamp = _this.appConfig.getEnableCaseFileViewVersion1_1()
22375
+ && document.upload_timestamp ? moment__namespace(document.upload_timestamp).format('DD MMM YYYY') : '';
22322
22376
  documentsToReturn.push(documentTreeNode);
22323
22377
  });
22324
22378
  return documentsToReturn;
22325
22379
  };
22326
22380
  CaseFileViewFolderComponent.prototype.getUncategorisedDocuments = function (uncategorisedDocuments) {
22381
+ var _this = this;
22327
22382
  var documents = [];
22328
22383
  uncategorisedDocuments.forEach(function (document) {
22329
22384
  var documentTreeNode = new DocumentTreeNode();
@@ -22332,6 +22387,8 @@
22332
22387
  documentTreeNode.document_filename = document.document_filename;
22333
22388
  documentTreeNode.document_binary_url = document.document_binary_url;
22334
22389
  documentTreeNode.attribute_path = document.attribute_path;
22390
+ documentTreeNode.upload_timestamp = _this.appConfig.getEnableCaseFileViewVersion1_1()
22391
+ && document.upload_timestamp ? moment__namespace(document.upload_timestamp).format('DD MMM YYYY') : '';
22335
22392
  documents.push(documentTreeNode);
22336
22393
  });
22337
22394
  var uncategorisedNode = new DocumentTreeNode();
@@ -22386,16 +22443,16 @@
22386
22443
  return;
22387
22444
  }
22388
22445
  };
22389
- CaseFileViewFolderComponent.prototype.sortDataSourceAscAlphabetically = function () {
22446
+ CaseFileViewFolderComponent.prototype.sortDataSourceAscending = function (column) {
22390
22447
  var sortedData = this.nestedDataSource.map(function (item) {
22391
- item.sortChildrenAscending();
22448
+ item.sortChildrenAscending(column, exports.SortOrder.ASCENDING);
22392
22449
  return item;
22393
22450
  });
22394
22451
  this.updateNodeData(sortedData);
22395
22452
  };
22396
- CaseFileViewFolderComponent.prototype.sortDataSourceDescAlphabetically = function () {
22453
+ CaseFileViewFolderComponent.prototype.sortDataSourceDescending = function (column) {
22397
22454
  var sortedData = this.nestedDataSource.map(function (item) {
22398
- item.sortChildrenDescending();
22455
+ item.sortChildrenDescending(column, exports.SortOrder.DESCENDING);
22399
22456
  return item;
22400
22457
  });
22401
22458
  this.updateNodeData(sortedData);
@@ -22455,8 +22512,8 @@
22455
22512
  CaseFileViewFolderComponent.UNCATEGORISED_DOCUMENTS_TITLE = 'Uncategorised documents';
22456
22513
  CaseFileViewFolderComponent.DOCUMENT_SEARCH_FORM_CONTROL_NAME = 'documentSearchFormControl';
22457
22514
  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) {
22515
+ 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)); };
22516
+ 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
22517
  if (rf & 1) {
22461
22518
  i0__namespace.ɵɵelementStart(0, "div", 0);
22462
22519
  i0__namespace.ɵɵelementStart(1, "div", 1);
@@ -22469,7 +22526,7 @@
22469
22526
  i0__namespace.ɵɵelementEnd();
22470
22527
  i0__namespace.ɵɵelementStart(6, "div");
22471
22528
  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.sortDataSourceAscAlphabetically(); })("sortDescending", function CaseFileViewFolderComponent_Template_ccd_case_file_view_folder_sort_sortDescending_7_listener() { return ctx.sortDataSourceDescAlphabetically(); });
22529
+ 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
22530
  i0__namespace.ɵɵelementEnd();
22474
22531
  i0__namespace.ɵɵelementEnd();
22475
22532
  i0__namespace.ɵɵelementEnd();
@@ -22483,7 +22540,7 @@
22483
22540
  i0__namespace.ɵɵadvance(3);
22484
22541
  i0__namespace.ɵɵproperty("ngIf", ctx.documentTreeData);
22485
22542
  }
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, i7__namespace.CdkTree, i7__namespace.CdkTreeNodeDef, i7__namespace.CdkNestedTreeNode, CaseFileViewFolderDocumentActionsComponent, i7__namespace.CdkTreeNodeToggle, i7__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:6px;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}"] });
22543
+ }, 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
22544
  (function () {
22488
22545
  (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CaseFileViewFolderComponent, [{
22489
22546
  type: i0.Component,
@@ -22492,7 +22549,7 @@
22492
22549
  templateUrl: './case-file-view-folder.component.html',
22493
22550
  styleUrls: ['./case-file-view-folder.component.scss'],
22494
22551
  }]
22495
- }], function () { return [{ type: WindowService }, { type: i1__namespace$1.Router }, { type: DocumentManagementService }, { type: i1__namespace$3.MatDialog }]; }, { categoriesAndDocuments: [{
22552
+ }], function () { return [{ type: WindowService }, { type: i1__namespace$1.Router }, { type: DocumentManagementService }, { type: i1__namespace$3.MatDialog }, { type: AbstractAppConfig }]; }, { categoriesAndDocuments: [{
22496
22553
  type: i0.Input
22497
22554
  }], allowMoving: [{
22498
22555
  type: i0.Input
@@ -24399,13 +24456,6 @@
24399
24456
  }] });
24400
24457
  })();
24401
24458
 
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
24459
  function ReadComplexFieldCollectionTableComponent_th_10_Template(rf, ctx) {
24410
24460
  if (rf & 1) {
24411
24461
  var _r4_1 = i0__namespace.ɵɵgetCurrentView();
@@ -24679,7 +24729,7 @@
24679
24729
  return _this;
24680
24730
  }
24681
24731
  ReadComplexFieldCollectionTableComponent.isSortAscending = function (column) {
24682
- return !(column.sortOrder === SortOrder.UNSORTED || column.sortOrder === SortOrder.DESCENDING);
24732
+ return !(column.sortOrder === exports.SortOrder.UNSORTED || column.sortOrder === exports.SortOrder.DESCENDING);
24683
24733
  };
24684
24734
  ReadComplexFieldCollectionTableComponent.prototype.ngOnInit = function () {
24685
24735
  _super.prototype.ngOnInit.call(this);
@@ -24737,19 +24787,19 @@
24737
24787
  });
24738
24788
  };
24739
24789
  ReadComplexFieldCollectionTableComponent.prototype.sortRowsByColumns = function (column) {
24740
- var shouldSortInAscendingOrder = this.columnsHorizontalLabel[column].sortOrder === SortOrder.UNSORTED
24741
- || this.columnsHorizontalLabel[column].sortOrder === SortOrder.DESCENDING;
24790
+ var shouldSortInAscendingOrder = this.columnsHorizontalLabel[column].sortOrder === exports.SortOrder.UNSORTED
24791
+ || this.columnsHorizontalLabel[column].sortOrder === exports.SortOrder.DESCENDING;
24742
24792
  // tslint:disable-next-line:switch-default
24743
24793
  switch (this.columnsHorizontalLabel[column].type.type) {
24744
24794
  case 'Number':
24745
24795
  case 'MoneyGBP': {
24746
24796
  if (shouldSortInAscendingOrder) {
24747
24797
  this.rows.sort(function (a, b) { return a[column] - b[column]; });
24748
- this.columnsHorizontalLabel[column].sortOrder = SortOrder.ASCENDING;
24798
+ this.columnsHorizontalLabel[column].sortOrder = exports.SortOrder.ASCENDING;
24749
24799
  }
24750
24800
  else {
24751
24801
  this.rows.sort(function (a, b) { return b[column] - a[column]; });
24752
- this.columnsHorizontalLabel[column].sortOrder = SortOrder.DESCENDING;
24802
+ this.columnsHorizontalLabel[column].sortOrder = exports.SortOrder.DESCENDING;
24753
24803
  }
24754
24804
  break;
24755
24805
  }
@@ -24766,11 +24816,11 @@
24766
24816
  {
24767
24817
  if (shouldSortInAscendingOrder) {
24768
24818
  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;
24819
+ this.columnsHorizontalLabel[column].sortOrder = exports.SortOrder.ASCENDING;
24770
24820
  }
24771
24821
  else {
24772
24822
  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;
24823
+ this.columnsHorizontalLabel[column].sortOrder = exports.SortOrder.DESCENDING;
24774
24824
  }
24775
24825
  }
24776
24826
  break;
@@ -24786,7 +24836,7 @@
24786
24836
  var id = _c.value;
24787
24837
  var trimmedId = id.trim();
24788
24838
  labelsHorizontal[trimmedId] = allLabels[trimmedId];
24789
- labelsHorizontal[trimmedId].sortOrder = SortOrder.UNSORTED;
24839
+ labelsHorizontal[trimmedId].sortOrder = exports.SortOrder.UNSORTED;
24790
24840
  delete labelsVertical[trimmedId];
24791
24841
  }
24792
24842
  }
@@ -26511,7 +26561,7 @@
26511
26561
  /**
26512
26562
  * Filter out fields having no data to display and harmonise field values coming parent's value.
26513
26563
  */
26514
- ReadFieldsFilterPipe.prototype.transform = function (complexField, keepEmpty, index, setupHidden, formGroup, path, idPrefix) {
26564
+ ReadFieldsFilterPipe.prototype.transform = function (complexField, keepEmpty, index, setupHidden, formGroup, path, idPrefix, metadataFieldsObject) {
26515
26565
  if (setupHidden === void 0) { setupHidden = false; }
26516
26566
  if (!complexField || !complexField.field_type) {
26517
26567
  return [];
@@ -26521,12 +26571,19 @@
26521
26571
  var checkConditionalShowAgainst = values;
26522
26572
  var formGroupAvailable = false;
26523
26573
  if (formGroup) {
26524
- checkConditionalShowAgainst = formGroup.parent.getRawValue().data;
26574
+ checkConditionalShowAgainst = metadataFieldsObject ?
26575
+ Object.assign(formGroup.parent.getRawValue().data, metadataFieldsObject) : formGroup.parent.getRawValue().data;
26525
26576
  formGroupAvailable = true;
26526
- if (idPrefix) {
26527
- var fieldId = idPrefix.substring(0, idPrefix.indexOf('_'));
26528
- if (checkConditionalShowAgainst[fieldId]) {
26529
- checkConditionalShowAgainst = values;
26577
+ if (idPrefix !== undefined) {
26578
+ if (idPrefix !== '') {
26579
+ var fieldId = idPrefix.substring(0, idPrefix.indexOf('_'));
26580
+ if (checkConditionalShowAgainst[fieldId]) {
26581
+ checkConditionalShowAgainst = values;
26582
+ formGroupAvailable = false;
26583
+ }
26584
+ }
26585
+ else {
26586
+ checkConditionalShowAgainst = Object.assign(checkConditionalShowAgainst, values);
26530
26587
  formGroupAvailable = false;
26531
26588
  }
26532
26589
  }
@@ -26712,7 +26769,7 @@
26712
26769
  }
26713
26770
  return searchResults.sort(function (a, b) {
26714
26771
  return sortParameters.comparator.compare(a, b)
26715
- * (sortParameters.sortOrder === SortOrder.DESCENDING ? 1 : -1);
26772
+ * (sortParameters.sortOrder === exports.SortOrder.DESCENDING ? 1 : -1);
26716
26773
  });
26717
26774
  };
26718
26775
  return SortSearchResultPipe;
@@ -27008,12 +27065,12 @@
27008
27065
  i3$1.MatInputModule,
27009
27066
  i5$1.MatDatepickerModule,
27010
27067
  i5.MatAutocompleteModule,
27011
- i7.CdkTreeModule,
27068
+ i8.CdkTreeModule,
27012
27069
  i1$5.OverlayModule,
27013
27070
  i3.PaymentLibModule,
27014
27071
  i2$2.ScrollToModule.forRoot(),
27015
27072
  i1.RpxTranslationModule.forChild(),
27016
- i7.CdkTreeModule,
27073
+ i8.CdkTreeModule,
27017
27074
  i1$5.OverlayModule,
27018
27075
  i1$3.MatDialogModule,
27019
27076
  i12.MediaViewerModule,
@@ -27156,9 +27213,9 @@
27156
27213
  i3$1.MatInputModule,
27157
27214
  i5$1.MatDatepickerModule,
27158
27215
  i5.MatAutocompleteModule,
27159
- i7.CdkTreeModule,
27216
+ i8.CdkTreeModule,
27160
27217
  i1$5.OverlayModule,
27161
- i3.PaymentLibModule, i2__namespace$2.ScrollToModule, i1__namespace.RpxTranslationModule, i7.CdkTreeModule,
27218
+ i3.PaymentLibModule, i2__namespace$2.ScrollToModule, i1__namespace.RpxTranslationModule, i8.CdkTreeModule,
27162
27219
  i1$5.OverlayModule,
27163
27220
  i1$3.MatDialogModule,
27164
27221
  i12.MediaViewerModule,
@@ -27301,12 +27358,12 @@
27301
27358
  i3$1.MatInputModule,
27302
27359
  i5$1.MatDatepickerModule,
27303
27360
  i5.MatAutocompleteModule,
27304
- i7.CdkTreeModule,
27361
+ i8.CdkTreeModule,
27305
27362
  i1$5.OverlayModule,
27306
27363
  i3.PaymentLibModule,
27307
27364
  i2$2.ScrollToModule.forRoot(),
27308
27365
  i1.RpxTranslationModule.forChild(),
27309
- i7.CdkTreeModule,
27366
+ i8.CdkTreeModule,
27310
27367
  i1$5.OverlayModule,
27311
27368
  i1$3.MatDialogModule,
27312
27369
  i12.MediaViewerModule,
@@ -27519,7 +27576,7 @@
27519
27576
  i0__namespace.ɵɵproperty("ngIf", ctx_r15.canShowFieldInCYA(field_r16));
27520
27577
  }
27521
27578
  }
27522
- var _c0$f = function (a0, a4) { return [a0, false, undefined, true, a4]; };
27579
+ var _c0$f = function (a0, a4, a7) { return [a0, false, undefined, true, a4, undefined, undefined, a7]; };
27523
27580
  function CaseEditSubmitComponent_div_0_ng_container_11_ng_container_7_ng_container_1_Template(rf, ctx) {
27524
27581
  if (rf & 1) {
27525
27582
  i0__namespace.ɵɵelementContainerStart(0);
@@ -27533,13 +27590,13 @@
27533
27590
  var page_r13 = i0__namespace.ɵɵnextContext().$implicit;
27534
27591
  var ctx_r14 = i0__namespace.ɵɵnextContext(3);
27535
27592
  i0__namespace.ɵɵadvance(1);
27536
- i0__namespace.ɵɵproperty("ngForOf", i0__namespace.ɵɵpipeBind1(2, 1, i0__namespace.ɵɵpipeBindV(3, 3, i0__namespace.ɵɵpureFunction2(12, _c0$f, i0__namespace.ɵɵpipeBind2(4, 9, page_r13, ctx_r14.editForm), ctx_r14.editForm.controls["data"]))));
27593
+ i0__namespace.ɵɵproperty("ngForOf", i0__namespace.ɵɵpipeBind1(2, 1, i0__namespace.ɵɵpipeBindV(3, 3, i0__namespace.ɵɵpureFunction3(15, _c0$f, i0__namespace.ɵɵpipeBind2(4, 12, page_r13, ctx_r14.editForm), ctx_r14.editForm.controls["data"], ctx_r14.metadataFieldsObject))));
27537
27594
  }
27538
27595
  }
27539
27596
  function CaseEditSubmitComponent_div_0_ng_container_11_ng_container_7_Template(rf, ctx) {
27540
27597
  if (rf & 1) {
27541
27598
  i0__namespace.ɵɵelementContainerStart(0);
27542
- i0__namespace.ɵɵtemplate(1, CaseEditSubmitComponent_div_0_ng_container_11_ng_container_7_ng_container_1_Template, 5, 15, "ng-container", 0);
27599
+ i0__namespace.ɵɵtemplate(1, CaseEditSubmitComponent_div_0_ng_container_11_ng_container_7_ng_container_1_Template, 5, 19, "ng-container", 0);
27543
27600
  i0__namespace.ɵɵelementContainerEnd();
27544
27601
  }
27545
27602
  if (rf & 2) {
@@ -27786,6 +27843,7 @@
27786
27843
  });
27787
27844
  CaseEditSubmitComponent.prototype.ngOnInit = function () {
27788
27845
  var _this = this;
27846
+ var _a, _b, _c;
27789
27847
  this.profileSubscription = this.profileNotifier.profile.subscribe(function (_) { return _this.profile = _; });
27790
27848
  this.eventTrigger = this.caseEdit.eventTrigger;
27791
27849
  this.triggerText = this.eventTrigger.end_button_label || CallbackErrorsComponent.TRIGGER_TEXT_SUBMIT;
@@ -27794,6 +27852,10 @@
27794
27852
  this.showSummaryFields = this.sortFieldsByShowSummaryContent(this.eventTrigger.case_fields);
27795
27853
  this.caseEdit.isSubmitting = false;
27796
27854
  this.contextFields = this.getCaseFields();
27855
+ this.metadataFieldsObject = (_c = (_b = (_a = this.caseEdit) === null || _a === void 0 ? void 0 : _a.caseDetails) === null || _b === void 0 ? void 0 : _b.metadataFields) === null || _c === void 0 ? void 0 : _c.reduce(function (o, key) {
27856
+ var _d;
27857
+ return Object.assign(o, (_d = {}, _d[key.id] = key.value, _d));
27858
+ }, {});
27797
27859
  // Indicates if the submission is for a Case Flag, as opposed to a "regular" form submission, by the presence of
27798
27860
  // a FlagLauncher field in the event trigger
27799
27861
  this.caseEdit.isCaseFlagSubmission =
@@ -32395,12 +32457,13 @@
32395
32457
  };
32396
32458
  // Refactored under EXUI-110 to address infinite tab loop to use tabIndexChanged instead
32397
32459
  CaseFullAccessViewComponent.prototype.tabChanged = function (tabIndexChanged) {
32460
+ var _a;
32398
32461
  var matTab = this.tabGroup._tabs.find(function (tab) { return tab.isActive; });
32399
32462
  var tabLabel = matTab.textLabel;
32400
32463
  // sortedTabs are fragments
32401
32464
  // appended/prepepended tabs use router navigation
32402
32465
  if ((tabIndexChanged <= 1 && this.prependedTabs && this.prependedTabs.length) ||
32403
- (this.appendedTabs && this.appendedTabs.length && tabLabel === this.HEARINGS_TAB_LABEL)) {
32466
+ (((_a = this.appendedTabs) === null || _a === void 0 ? void 0 : _a.length) && tabLabel === this.HEARINGS_TAB_LABEL)) {
32404
32467
  // Hack to get ID from tab as it's not easily achieved through Angular Material Tabs
32405
32468
  var tab = matTab['_viewContainerRef'];
32406
32469
  var id = tab.element.nativeElement.id;
@@ -32420,6 +32483,7 @@
32420
32483
  var targetTabIndex = this.tabGroup._tabs.toArray().findIndex(function (tab) { return tab.textLabel === triggerOutputEventText; });
32421
32484
  if (targetTabIndex > -1) {
32422
32485
  this.selectedTabIndex = targetTabIndex;
32486
+ this.tabGroup.selectedIndex = targetTabIndex;
32423
32487
  }
32424
32488
  };
32425
32489
  CaseFullAccessViewComponent.prototype.hasActiveCaseFlags = function () {
@@ -32498,8 +32562,8 @@
32498
32562
  var value = {};
32499
32563
  if (caseFields) {
32500
32564
  caseFields.forEach(function (caseField) {
32501
- var _a;
32502
- value = Object.assign(Object.assign({}, value), (_a = {}, _a[caseField.id] = caseField.value, _a));
32565
+ var _b;
32566
+ value = Object.assign(Object.assign({}, value), (_b = {}, _b[caseField.id] = caseField.value, _b));
32503
32567
  });
32504
32568
  }
32505
32569
  return new i2$1.FormGroup({ data: new i2$1.FormControl(value) });