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

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 (61) hide show
  1. package/bundles/hmcts-ccd-case-ui-toolkit.umd.js +185 -137
  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/components/palette/document/write-document-field.component.js +2 -16
  13. package/esm2015/lib/shared/domain/case-file-view/case-file-view-document.model.js +1 -1
  14. package/esm2015/lib/shared/domain/case-file-view/case-file-view-sort-columns.enum.js +6 -0
  15. package/esm2015/lib/shared/domain/case-file-view/document-tree-node/document-tree-node.model.js +39 -13
  16. package/esm2015/lib/shared/domain/case-file-view/index.js +3 -2
  17. package/esm2015/lib/shared/domain/index.js +10 -10
  18. package/esm2015/lib/shared/domain/search/sorting/sort-parameters.js +1 -1
  19. package/esm2015/lib/shared/domain/sort-order.enum.js +7 -0
  20. package/esm2015/lib/shared/pipes/complex/ccd-read-fields-filter.pipe.js +14 -7
  21. package/esm2015/lib/shared/pipes/search-result/sorting/sort-search-result.pipe.js +2 -2
  22. package/esm2015/lib/shared/services/case-file-view/case-file-view.service.js +1 -1
  23. package/fesm2015/hmcts-ccd-case-ui-toolkit.js +145 -103
  24. package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
  25. package/lib/app.config.d.ts +2 -0
  26. package/lib/app.config.d.ts.map +1 -1
  27. package/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.d.ts +1 -0
  28. package/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.d.ts.map +1 -1
  29. package/lib/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.d.ts.map +1 -1
  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 +8 -5
  31. 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
  32. package/lib/shared/components/palette/case-file-view/components/case-file-view-folder/case-file-view-folder.component.d.ts +5 -3
  33. package/lib/shared/components/palette/case-file-view/components/case-file-view-folder/case-file-view-folder.component.d.ts.map +1 -1
  34. package/lib/shared/components/palette/case-file-view/test-data/categories-and-documents-test-data.d.ts +3 -0
  35. package/lib/shared/components/palette/case-file-view/test-data/categories-and-documents-test-data.d.ts.map +1 -0
  36. package/lib/shared/components/palette/complex/read-complex-field-collection-table.component.d.ts.map +1 -1
  37. package/lib/shared/components/palette/document/write-document-field.component.d.ts +0 -1
  38. package/lib/shared/components/palette/document/write-document-field.component.d.ts.map +1 -1
  39. package/lib/shared/domain/case-file-view/case-file-view-document.model.d.ts +1 -1
  40. package/lib/shared/domain/case-file-view/case-file-view-document.model.d.ts.map +1 -1
  41. package/lib/shared/domain/case-file-view/case-file-view-sort-columns.enum.d.ts +5 -0
  42. package/lib/shared/domain/case-file-view/case-file-view-sort-columns.enum.d.ts.map +1 -0
  43. package/lib/shared/domain/case-file-view/document-tree-node/document-tree-node.model.d.ts +4 -2
  44. package/lib/shared/domain/case-file-view/document-tree-node/document-tree-node.model.d.ts.map +1 -1
  45. package/lib/shared/domain/case-file-view/index.d.ts +2 -1
  46. package/lib/shared/domain/case-file-view/index.d.ts.map +1 -1
  47. package/lib/shared/domain/index.d.ts +9 -9
  48. package/lib/shared/domain/index.d.ts.map +1 -1
  49. package/lib/shared/domain/search/sorting/sort-parameters.d.ts +1 -1
  50. package/lib/shared/domain/search/sorting/sort-parameters.d.ts.map +1 -1
  51. package/lib/shared/domain/{search/sorting/sort-order.d.ts → sort-order.enum.d.ts} +1 -1
  52. package/lib/shared/domain/sort-order.enum.d.ts.map +1 -0
  53. package/lib/shared/pipes/complex/ccd-read-fields-filter.pipe.d.ts +1 -1
  54. package/lib/shared/pipes/complex/ccd-read-fields-filter.pipe.d.ts.map +1 -1
  55. package/lib/shared/services/case-file-view/case-file-view.service.d.ts.map +1 -1
  56. package/package.json +1 -1
  57. package/esm2015/lib/shared/components/palette/complex/sort-order.js +0 -7
  58. package/esm2015/lib/shared/domain/search/sorting/sort-order.js +0 -7
  59. package/lib/shared/components/palette/complex/sort-order.d.ts +0 -6
  60. package/lib/shared/components/palette/complex/sort-order.d.ts.map +0 -1
  61. 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() {
@@ -14696,15 +14696,6 @@
14696
14696
  _this.valid = true;
14697
14697
  return _this;
14698
14698
  }
14699
- WriteDocumentFieldComponent.prototype.clickout = function (event) {
14700
- // Capturing the event of the associated ElementRef <input type="file" #fileInpu
14701
- if (this.fileInput.nativeElement.contains(event.target)) {
14702
- this.clickInsideTheDocument = true;
14703
- }
14704
- else {
14705
- this.fileValidations();
14706
- }
14707
- };
14708
14699
  WriteDocumentFieldComponent.prototype.ngOnInit = function () {
14709
14700
  this.secureModeOn = this.appConfig.getDocumentSecureMode();
14710
14701
  if (this.secureModeOn) {
@@ -14966,10 +14957,6 @@
14966
14957
  var _t = void 0;
14967
14958
  i0__namespace.ɵɵqueryRefresh(_t = i0__namespace.ɵɵloadQuery()) && (ctx.fileInput = _t.first);
14968
14959
  }
14969
- }, hostBindings: function WriteDocumentFieldComponent_HostBindings(rf, ctx) {
14970
- if (rf & 1) {
14971
- i0__namespace.ɵɵlistener("click", function WriteDocumentFieldComponent_click_HostBindingHandler($event) { return ctx.clickout($event); }, false, i0__namespace.ɵɵresolveDocument);
14972
- }
14973
14960
  }, features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 19, vars: 22, consts: [[1, "form-group", 3, "ngClass"], [3, "for"], [1, "form-label"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], [3, "caseField", 4, "ngIf"], [2, "position", "relative"], [3, "id", "click"], ["type", "file", 1, "form-control", "bottom-30", 3, "id", "accept", "keydown.Tab", "change"], ["fileInput", ""], [1, "form-group", "bottom-30"], ["type", "button", "aria-label", "Cancel upload", 1, "button", "button-secondary", 3, "disabled", "click"], [1, "form-hint"], [1, "error-message"], [3, "caseField"]], template: function WriteDocumentFieldComponent_Template(rf, ctx) {
14974
14961
  if (rf & 1) {
14975
14962
  i0__namespace.ɵɵelementStart(0, "div", 0);
@@ -15038,9 +15025,6 @@
15038
15025
  }], function () { return [{ type: AbstractAppConfig }, { type: CaseNotifier }, { type: DocumentManagementService }, { type: i1__namespace$3.MatDialog }, { type: FileUploadStateService }, { type: JurisdictionService }]; }, { fileInput: [{
15039
15026
  type: i0.ViewChild,
15040
15027
  args: ['fileInput', { static: false }]
15041
- }], clickout: [{
15042
- type: i0.HostListener,
15043
- args: ['document:click', ['$event']]
15044
15028
  }] });
15045
15029
  })();
15046
15030
 
@@ -21975,20 +21959,38 @@
21975
21959
  }] });
21976
21960
  })();
21977
21961
 
21962
+ var CaseFileViewSortColumns;
21963
+ (function (CaseFileViewSortColumns) {
21964
+ CaseFileViewSortColumns[CaseFileViewSortColumns["DOCUMENT_NAME"] = 0] = "DOCUMENT_NAME";
21965
+ CaseFileViewSortColumns[CaseFileViewSortColumns["DOCUMENT_UPLOAD_TIMESTAMP"] = 1] = "DOCUMENT_UPLOAD_TIMESTAMP";
21966
+ })(CaseFileViewSortColumns || (CaseFileViewSortColumns = {}));
21967
+
21978
21968
  var CaseFileViewFolderSortComponent = /** @class */ (function () {
21979
- function CaseFileViewFolderSortComponent() {
21969
+ function CaseFileViewFolderSortComponent(appConfig) {
21980
21970
  var _this = this;
21971
+ this.appConfig = appConfig;
21981
21972
  this.isOpen = false;
21982
21973
  this.sortAscending = new i0.EventEmitter();
21983
21974
  this.sortDescending = new i0.EventEmitter();
21984
21975
  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(); } },
21976
+ { actionText: 'A to Z ascending', iconSrc: '/assets/img/sort/sort-down-arrow.svg', actionFn: function () { return _this.sortAscending.emit(CaseFileViewSortColumns.DOCUMENT_NAME); } },
21977
+ { actionText: 'Z to A descending', iconSrc: '/assets/img/sort/sort-up-arrow.svg', actionFn: function () { return _this.sortDescending.emit(CaseFileViewSortColumns.DOCUMENT_NAME); } },
21987
21978
  ];
21988
21979
  }
21980
+ CaseFileViewFolderSortComponent.prototype.ngOnInit = function () {
21981
+ var _this = this;
21982
+ if (this.appConfig.getEnableCaseFileViewVersion1_1()) {
21983
+ this.overlayMenuItems = [
21984
+ { actionText: 'A to Z ascending', iconSrc: '/assets/img/sort/sort-down-arrow.svg', actionFn: function () { return _this.sortAscending.emit(CaseFileViewSortColumns.DOCUMENT_NAME); } },
21985
+ { actionText: 'Z to A descending', iconSrc: '/assets/img/sort/sort-up-arrow.svg', actionFn: function () { return _this.sortDescending.emit(CaseFileViewSortColumns.DOCUMENT_NAME); } },
21986
+ { actionText: 'Recent first', iconSrc: '/assets/img/sort/sort-down-arrow.svg', actionFn: function () { return _this.sortDescending.emit(CaseFileViewSortColumns.DOCUMENT_UPLOAD_TIMESTAMP); } },
21987
+ { actionText: 'Oldest first', iconSrc: '/assets/img/sort/sort-up-arrow.svg', actionFn: function () { return _this.sortAscending.emit(CaseFileViewSortColumns.DOCUMENT_UPLOAD_TIMESTAMP); } },
21988
+ ];
21989
+ }
21990
+ };
21989
21991
  return CaseFileViewFolderSortComponent;
21990
21992
  }());
21991
- CaseFileViewFolderSortComponent.ɵfac = function CaseFileViewFolderSortComponent_Factory(t) { return new (t || CaseFileViewFolderSortComponent)(); };
21993
+ CaseFileViewFolderSortComponent.ɵfac = function CaseFileViewFolderSortComponent_Factory(t) { return new (t || CaseFileViewFolderSortComponent)(i0__namespace.ɵɵdirectiveInject(AbstractAppConfig)); };
21992
21994
  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
21995
  if (rf & 1) {
21994
21996
  i0__namespace.ɵɵelementStart(0, "ccd-case-file-view-overlay-menu", 0);
@@ -22010,7 +22012,7 @@
22010
22012
  templateUrl: './case-file-view-folder-sort.component.html',
22011
22013
  styleUrls: ['./case-file-view-folder-sort.component.scss']
22012
22014
  }]
22013
- }], function () { return []; }, { sortAscending: [{
22015
+ }], function () { return [{ type: AbstractAppConfig }]; }, { sortAscending: [{
22014
22016
  type: i0.Output
22015
22017
  }], sortDescending: [{
22016
22018
  type: i0.Output
@@ -22067,48 +22069,56 @@
22067
22069
  enumerable: false,
22068
22070
  configurable: true
22069
22071
  });
22070
- DocumentTreeNode.prototype.sortChildrenAscending = function () {
22072
+ DocumentTreeNode.prototype.sortChildrenAscending = function (column, sortOrder) {
22073
+ var _this = this;
22071
22074
  var _a, _b;
22072
22075
  var sortAscending = function () {
22073
22076
  return function (a, b) {
22074
- var nameA = a.name.toUpperCase();
22075
- var nameB = b.name.toUpperCase();
22077
+ var nodeA = _this.getNodeToSort(a, column, sortOrder);
22078
+ var nodeB = _this.getNodeToSort(b, column, sortOrder);
22076
22079
  if (a.type === DocumentTreeNodeType.FOLDER || b.type === DocumentTreeNodeType.FOLDER) {
22077
22080
  return 0;
22078
22081
  }
22079
- if (nameA < nameB) {
22082
+ if (!nodeA || !nodeB) {
22083
+ return 0;
22084
+ }
22085
+ if (nodeA < nodeB) {
22080
22086
  return -1;
22081
22087
  }
22082
- if (nameA > nameB) {
22088
+ if (nodeA > nodeB) {
22083
22089
  return 1;
22084
22090
  }
22085
22091
  };
22086
22092
  };
22087
22093
  (_a = this.children) === null || _a === void 0 ? void 0 : _a.sort(sortAscending());
22088
22094
  (_b = this.children) === null || _b === void 0 ? void 0 : _b.forEach(function (childNodes) {
22089
- childNodes.sortChildrenAscending();
22095
+ childNodes.sortChildrenAscending(column, sortOrder);
22090
22096
  });
22091
22097
  };
22092
- DocumentTreeNode.prototype.sortChildrenDescending = function () {
22098
+ DocumentTreeNode.prototype.sortChildrenDescending = function (column, sortOrder) {
22099
+ var _this = this;
22093
22100
  var _a, _b;
22094
22101
  var sortDescending = function () {
22095
22102
  return function (a, b) {
22096
- var nameA = a.name.toUpperCase();
22097
- var nameB = b.name.toUpperCase();
22103
+ var nodeA = _this.getNodeToSort(a, column, sortOrder);
22104
+ var nodeB = _this.getNodeToSort(b, column, sortOrder);
22098
22105
  if (a.type === DocumentTreeNodeType.FOLDER || b.type === DocumentTreeNodeType.FOLDER) {
22099
22106
  return 0;
22100
22107
  }
22101
- if (nameA > nameB) {
22108
+ if (!nodeA || !nodeB) {
22109
+ return 0;
22110
+ }
22111
+ if (nodeA > nodeB) {
22102
22112
  return -1;
22103
22113
  }
22104
- if (nameA < nameB) {
22114
+ if (nodeA < nodeB) {
22105
22115
  return 1;
22106
22116
  }
22107
22117
  };
22108
22118
  };
22109
22119
  (_a = this.children) === null || _a === void 0 ? void 0 : _a.sort(sortDescending());
22110
22120
  (_b = this.children) === null || _b === void 0 ? void 0 : _b.forEach(function (childNodes) {
22111
- childNodes.sortChildrenDescending();
22121
+ childNodes.sortChildrenDescending(column, sortOrder);
22112
22122
  });
22113
22123
  };
22114
22124
  Object.defineProperty(DocumentTreeNode.prototype, "flattenedAll", {
@@ -22134,6 +22144,24 @@
22134
22144
  enumerable: false,
22135
22145
  configurable: true
22136
22146
  });
22147
+ DocumentTreeNode.prototype.getNodeToSort = function (node, column, sortOrder) {
22148
+ if (column === CaseFileViewSortColumns.DOCUMENT_NAME) {
22149
+ return (node === null || node === void 0 ? void 0 : node.name) ? node.name.toUpperCase()
22150
+ : '';
22151
+ }
22152
+ if (column === CaseFileViewSortColumns.DOCUMENT_UPLOAD_TIMESTAMP) {
22153
+ if (node === null || node === void 0 ? void 0 : node.upload_timestamp) {
22154
+ return new Date(node.upload_timestamp);
22155
+ }
22156
+ if (sortOrder === exports.SortOrder.ASCENDING) {
22157
+ return new Date(9999, 12, 31);
22158
+ }
22159
+ if (sortOrder === exports.SortOrder.DESCENDING) {
22160
+ return new Date(1111, 1, 1);
22161
+ }
22162
+ }
22163
+ return '';
22164
+ };
22137
22165
  return DocumentTreeNode;
22138
22166
  }());
22139
22167
  __decorate([
@@ -22164,10 +22192,14 @@
22164
22192
  i0__namespace.ɵɵelementEnd();
22165
22193
  i0__namespace.ɵɵelementStart(4, "span", 16);
22166
22194
  i0__namespace.ɵɵtext(5);
22195
+ i0__namespace.ɵɵelement(6, "br");
22196
+ i0__namespace.ɵɵelementStart(7, "span", 17);
22197
+ i0__namespace.ɵɵtext(8);
22167
22198
  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); });
22199
+ i0__namespace.ɵɵelementEnd();
22200
+ i0__namespace.ɵɵelementStart(9, "div", 18);
22201
+ i0__namespace.ɵɵelementStart(10, "ccd-case-file-view-folder-document-actions", 19);
22202
+ 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
22203
  i0__namespace.ɵɵelementEnd();
22172
22204
  i0__namespace.ɵɵelementEnd();
22173
22205
  i0__namespace.ɵɵelementEnd();
@@ -22179,27 +22211,29 @@
22179
22211
  i0__namespace.ɵɵadvance(1);
22180
22212
  i0__namespace.ɵɵclassProp("node--selected", (ctx_r2.selectedNodeItem == null ? null : ctx_r2.selectedNodeItem.name) === node_r4.name);
22181
22213
  i0__namespace.ɵɵadvance(4);
22182
- i0__namespace.ɵɵtextInterpolate(node_r4.name);
22214
+ i0__namespace.ɵɵtextInterpolate1(" ", node_r4.name, " ");
22215
+ i0__namespace.ɵɵadvance(3);
22216
+ i0__namespace.ɵɵtextInterpolate(node_r4.upload_timestamp);
22183
22217
  i0__namespace.ɵɵadvance(2);
22184
22218
  i0__namespace.ɵɵproperty("allowMoving", ctx_r2.allowMoving);
22185
22219
  }
22186
22220
  }
22187
22221
  function CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_5_Template(rf, ctx) {
22188
22222
  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);
22223
+ i0__namespace.ɵɵelementStart(0, "cdk-nested-tree-node", 20);
22224
+ i0__namespace.ɵɵelementStart(1, "button", 21);
22225
+ i0__namespace.ɵɵelementStart(2, "div", 22);
22226
+ i0__namespace.ɵɵelement(3, "img", 23);
22227
+ i0__namespace.ɵɵelementStart(4, "span", 24);
22194
22228
  i0__namespace.ɵɵtext(5);
22195
22229
  i0__namespace.ɵɵelementEnd();
22196
22230
  i0__namespace.ɵɵelementEnd();
22197
- i0__namespace.ɵɵelementStart(6, "span", 24);
22231
+ i0__namespace.ɵɵelementStart(6, "span", 25);
22198
22232
  i0__namespace.ɵɵtext(7);
22199
22233
  i0__namespace.ɵɵelementEnd();
22200
22234
  i0__namespace.ɵɵelementEnd();
22201
22235
  i0__namespace.ɵɵelementStart(8, "div");
22202
- i0__namespace.ɵɵelementContainer(9, 25);
22236
+ i0__namespace.ɵɵelementContainer(9, 26);
22203
22237
  i0__namespace.ɵɵelementEnd();
22204
22238
  i0__namespace.ɵɵelementEnd();
22205
22239
  }
@@ -22224,7 +22258,7 @@
22224
22258
  i0__namespace.ɵɵtemplate(1, CaseFileViewFolderComponent_div_8_div_1_Template, 2, 0, "div", 8);
22225
22259
  i0__namespace.ɵɵelementStart(2, "div");
22226
22260
  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);
22261
+ i0__namespace.ɵɵtemplate(4, CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_4_Template, 11, 5, "cdk-nested-tree-node", 10);
22228
22262
  i0__namespace.ɵɵtemplate(5, CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_5_Template, 10, 6, "cdk-nested-tree-node", 11);
22229
22263
  i0__namespace.ɵɵelementEnd();
22230
22264
  i0__namespace.ɵɵelementEnd();
@@ -22242,17 +22276,18 @@
22242
22276
  }
22243
22277
  var MEDIA_VIEWER_LOCALSTORAGE_KEY = 'media-viewer-info';
22244
22278
  var CaseFileViewFolderComponent = /** @class */ (function () {
22245
- function CaseFileViewFolderComponent(windowService, router, documentManagementService, dialog) {
22279
+ function CaseFileViewFolderComponent(windowService, router, documentManagementService, dialog, appConfig) {
22246
22280
  this.windowService = windowService;
22247
22281
  this.router = router;
22248
22282
  this.documentManagementService = documentManagementService;
22249
22283
  this.dialog = dialog;
22284
+ this.appConfig = appConfig;
22250
22285
  this.clickedDocument = new i0.EventEmitter();
22251
22286
  this.moveDocument = new i0.EventEmitter();
22252
22287
  this.categories = [];
22253
22288
  this.getChildren = function (node) { return rxjs.of(node.children); };
22254
22289
  this.nestedChildren = function (_, nodeData) { return nodeData.children; };
22255
- this.nestedTreeControl = new i7.NestedTreeControl(this.getChildren);
22290
+ this.nestedTreeControl = new i8.NestedTreeControl(this.getChildren);
22256
22291
  }
22257
22292
  Object.defineProperty(CaseFileViewFolderComponent.prototype, "documentCount", {
22258
22293
  get: function () {
@@ -22311,6 +22346,7 @@
22311
22346
  }, []);
22312
22347
  };
22313
22348
  CaseFileViewFolderComponent.prototype.getDocuments = function (documents) {
22349
+ var _this = this;
22314
22350
  var documentsToReturn = [];
22315
22351
  documents.forEach(function (document) {
22316
22352
  var documentTreeNode = new DocumentTreeNode();
@@ -22319,11 +22355,14 @@
22319
22355
  documentTreeNode.document_filename = document.document_filename;
22320
22356
  documentTreeNode.document_binary_url = document.document_binary_url;
22321
22357
  documentTreeNode.attribute_path = document.attribute_path;
22358
+ documentTreeNode.upload_timestamp = _this.appConfig.getEnableCaseFileViewVersion1_1()
22359
+ && document.upload_timestamp ? moment__namespace(document.upload_timestamp).format('DD MMM YYYY') : '';
22322
22360
  documentsToReturn.push(documentTreeNode);
22323
22361
  });
22324
22362
  return documentsToReturn;
22325
22363
  };
22326
22364
  CaseFileViewFolderComponent.prototype.getUncategorisedDocuments = function (uncategorisedDocuments) {
22365
+ var _this = this;
22327
22366
  var documents = [];
22328
22367
  uncategorisedDocuments.forEach(function (document) {
22329
22368
  var documentTreeNode = new DocumentTreeNode();
@@ -22332,6 +22371,8 @@
22332
22371
  documentTreeNode.document_filename = document.document_filename;
22333
22372
  documentTreeNode.document_binary_url = document.document_binary_url;
22334
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') : '';
22335
22376
  documents.push(documentTreeNode);
22336
22377
  });
22337
22378
  var uncategorisedNode = new DocumentTreeNode();
@@ -22386,16 +22427,16 @@
22386
22427
  return;
22387
22428
  }
22388
22429
  };
22389
- CaseFileViewFolderComponent.prototype.sortDataSourceAscAlphabetically = function () {
22430
+ CaseFileViewFolderComponent.prototype.sortDataSourceAscending = function (column) {
22390
22431
  var sortedData = this.nestedDataSource.map(function (item) {
22391
- item.sortChildrenAscending();
22432
+ item.sortChildrenAscending(column, exports.SortOrder.ASCENDING);
22392
22433
  return item;
22393
22434
  });
22394
22435
  this.updateNodeData(sortedData);
22395
22436
  };
22396
- CaseFileViewFolderComponent.prototype.sortDataSourceDescAlphabetically = function () {
22437
+ CaseFileViewFolderComponent.prototype.sortDataSourceDescending = function (column) {
22397
22438
  var sortedData = this.nestedDataSource.map(function (item) {
22398
- item.sortChildrenDescending();
22439
+ item.sortChildrenDescending(column, exports.SortOrder.DESCENDING);
22399
22440
  return item;
22400
22441
  });
22401
22442
  this.updateNodeData(sortedData);
@@ -22455,8 +22496,8 @@
22455
22496
  CaseFileViewFolderComponent.UNCATEGORISED_DOCUMENTS_TITLE = 'Uncategorised documents';
22456
22497
  CaseFileViewFolderComponent.DOCUMENT_SEARCH_FORM_CONTROL_NAME = 'documentSearchFormControl';
22457
22498
  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) {
22499
+ 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)); };
22500
+ 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
22501
  if (rf & 1) {
22461
22502
  i0__namespace.ɵɵelementStart(0, "div", 0);
22462
22503
  i0__namespace.ɵɵelementStart(1, "div", 1);
@@ -22469,7 +22510,7 @@
22469
22510
  i0__namespace.ɵɵelementEnd();
22470
22511
  i0__namespace.ɵɵelementStart(6, "div");
22471
22512
  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(); });
22513
+ 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
22514
  i0__namespace.ɵɵelementEnd();
22474
22515
  i0__namespace.ɵɵelementEnd();
22475
22516
  i0__namespace.ɵɵelementEnd();
@@ -22483,7 +22524,7 @@
22483
22524
  i0__namespace.ɵɵadvance(3);
22484
22525
  i0__namespace.ɵɵproperty("ngIf", ctx.documentTreeData);
22485
22526
  }
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}"] });
22527
+ }, 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
22528
  (function () {
22488
22529
  (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CaseFileViewFolderComponent, [{
22489
22530
  type: i0.Component,
@@ -22492,7 +22533,7 @@
22492
22533
  templateUrl: './case-file-view-folder.component.html',
22493
22534
  styleUrls: ['./case-file-view-folder.component.scss'],
22494
22535
  }]
22495
- }], function () { return [{ type: WindowService }, { type: i1__namespace$1.Router }, { type: DocumentManagementService }, { type: i1__namespace$3.MatDialog }]; }, { categoriesAndDocuments: [{
22536
+ }], function () { return [{ type: WindowService }, { type: i1__namespace$1.Router }, { type: DocumentManagementService }, { type: i1__namespace$3.MatDialog }, { type: AbstractAppConfig }]; }, { categoriesAndDocuments: [{
22496
22537
  type: i0.Input
22497
22538
  }], allowMoving: [{
22498
22539
  type: i0.Input
@@ -24399,13 +24440,6 @@
24399
24440
  }] });
24400
24441
  })();
24401
24442
 
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
24443
  function ReadComplexFieldCollectionTableComponent_th_10_Template(rf, ctx) {
24410
24444
  if (rf & 1) {
24411
24445
  var _r4_1 = i0__namespace.ɵɵgetCurrentView();
@@ -24679,7 +24713,7 @@
24679
24713
  return _this;
24680
24714
  }
24681
24715
  ReadComplexFieldCollectionTableComponent.isSortAscending = function (column) {
24682
- return !(column.sortOrder === SortOrder.UNSORTED || column.sortOrder === SortOrder.DESCENDING);
24716
+ return !(column.sortOrder === exports.SortOrder.UNSORTED || column.sortOrder === exports.SortOrder.DESCENDING);
24683
24717
  };
24684
24718
  ReadComplexFieldCollectionTableComponent.prototype.ngOnInit = function () {
24685
24719
  _super.prototype.ngOnInit.call(this);
@@ -24737,19 +24771,19 @@
24737
24771
  });
24738
24772
  };
24739
24773
  ReadComplexFieldCollectionTableComponent.prototype.sortRowsByColumns = function (column) {
24740
- var shouldSortInAscendingOrder = this.columnsHorizontalLabel[column].sortOrder === SortOrder.UNSORTED
24741
- || this.columnsHorizontalLabel[column].sortOrder === SortOrder.DESCENDING;
24774
+ var shouldSortInAscendingOrder = this.columnsHorizontalLabel[column].sortOrder === exports.SortOrder.UNSORTED
24775
+ || this.columnsHorizontalLabel[column].sortOrder === exports.SortOrder.DESCENDING;
24742
24776
  // tslint:disable-next-line:switch-default
24743
24777
  switch (this.columnsHorizontalLabel[column].type.type) {
24744
24778
  case 'Number':
24745
24779
  case 'MoneyGBP': {
24746
24780
  if (shouldSortInAscendingOrder) {
24747
24781
  this.rows.sort(function (a, b) { return a[column] - b[column]; });
24748
- this.columnsHorizontalLabel[column].sortOrder = SortOrder.ASCENDING;
24782
+ this.columnsHorizontalLabel[column].sortOrder = exports.SortOrder.ASCENDING;
24749
24783
  }
24750
24784
  else {
24751
24785
  this.rows.sort(function (a, b) { return b[column] - a[column]; });
24752
- this.columnsHorizontalLabel[column].sortOrder = SortOrder.DESCENDING;
24786
+ this.columnsHorizontalLabel[column].sortOrder = exports.SortOrder.DESCENDING;
24753
24787
  }
24754
24788
  break;
24755
24789
  }
@@ -24766,11 +24800,11 @@
24766
24800
  {
24767
24801
  if (shouldSortInAscendingOrder) {
24768
24802
  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;
24803
+ this.columnsHorizontalLabel[column].sortOrder = exports.SortOrder.ASCENDING;
24770
24804
  }
24771
24805
  else {
24772
24806
  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;
24807
+ this.columnsHorizontalLabel[column].sortOrder = exports.SortOrder.DESCENDING;
24774
24808
  }
24775
24809
  }
24776
24810
  break;
@@ -24786,7 +24820,7 @@
24786
24820
  var id = _c.value;
24787
24821
  var trimmedId = id.trim();
24788
24822
  labelsHorizontal[trimmedId] = allLabels[trimmedId];
24789
- labelsHorizontal[trimmedId].sortOrder = SortOrder.UNSORTED;
24823
+ labelsHorizontal[trimmedId].sortOrder = exports.SortOrder.UNSORTED;
24790
24824
  delete labelsVertical[trimmedId];
24791
24825
  }
24792
24826
  }
@@ -26511,7 +26545,7 @@
26511
26545
  /**
26512
26546
  * Filter out fields having no data to display and harmonise field values coming parent's value.
26513
26547
  */
26514
- ReadFieldsFilterPipe.prototype.transform = function (complexField, keepEmpty, index, setupHidden, formGroup, path, idPrefix) {
26548
+ ReadFieldsFilterPipe.prototype.transform = function (complexField, keepEmpty, index, setupHidden, formGroup, path, idPrefix, metadataFieldsObject) {
26515
26549
  if (setupHidden === void 0) { setupHidden = false; }
26516
26550
  if (!complexField || !complexField.field_type) {
26517
26551
  return [];
@@ -26521,12 +26555,19 @@
26521
26555
  var checkConditionalShowAgainst = values;
26522
26556
  var formGroupAvailable = false;
26523
26557
  if (formGroup) {
26524
- checkConditionalShowAgainst = formGroup.parent.getRawValue().data;
26558
+ checkConditionalShowAgainst = metadataFieldsObject ?
26559
+ Object.assign(formGroup.parent.getRawValue().data, metadataFieldsObject) : formGroup.parent.getRawValue().data;
26525
26560
  formGroupAvailable = true;
26526
- if (idPrefix) {
26527
- var fieldId = idPrefix.substring(0, idPrefix.indexOf('_'));
26528
- if (checkConditionalShowAgainst[fieldId]) {
26529
- checkConditionalShowAgainst = values;
26561
+ if (idPrefix !== undefined) {
26562
+ if (idPrefix !== '') {
26563
+ var fieldId = idPrefix.substring(0, idPrefix.indexOf('_'));
26564
+ if (checkConditionalShowAgainst[fieldId]) {
26565
+ checkConditionalShowAgainst = values;
26566
+ formGroupAvailable = false;
26567
+ }
26568
+ }
26569
+ else {
26570
+ checkConditionalShowAgainst = Object.assign(checkConditionalShowAgainst, values);
26530
26571
  formGroupAvailable = false;
26531
26572
  }
26532
26573
  }
@@ -26712,7 +26753,7 @@
26712
26753
  }
26713
26754
  return searchResults.sort(function (a, b) {
26714
26755
  return sortParameters.comparator.compare(a, b)
26715
- * (sortParameters.sortOrder === SortOrder.DESCENDING ? 1 : -1);
26756
+ * (sortParameters.sortOrder === exports.SortOrder.DESCENDING ? 1 : -1);
26716
26757
  });
26717
26758
  };
26718
26759
  return SortSearchResultPipe;
@@ -27008,12 +27049,12 @@
27008
27049
  i3$1.MatInputModule,
27009
27050
  i5$1.MatDatepickerModule,
27010
27051
  i5.MatAutocompleteModule,
27011
- i7.CdkTreeModule,
27052
+ i8.CdkTreeModule,
27012
27053
  i1$5.OverlayModule,
27013
27054
  i3.PaymentLibModule,
27014
27055
  i2$2.ScrollToModule.forRoot(),
27015
27056
  i1.RpxTranslationModule.forChild(),
27016
- i7.CdkTreeModule,
27057
+ i8.CdkTreeModule,
27017
27058
  i1$5.OverlayModule,
27018
27059
  i1$3.MatDialogModule,
27019
27060
  i12.MediaViewerModule,
@@ -27156,9 +27197,9 @@
27156
27197
  i3$1.MatInputModule,
27157
27198
  i5$1.MatDatepickerModule,
27158
27199
  i5.MatAutocompleteModule,
27159
- i7.CdkTreeModule,
27200
+ i8.CdkTreeModule,
27160
27201
  i1$5.OverlayModule,
27161
- i3.PaymentLibModule, i2__namespace$2.ScrollToModule, i1__namespace.RpxTranslationModule, i7.CdkTreeModule,
27202
+ i3.PaymentLibModule, i2__namespace$2.ScrollToModule, i1__namespace.RpxTranslationModule, i8.CdkTreeModule,
27162
27203
  i1$5.OverlayModule,
27163
27204
  i1$3.MatDialogModule,
27164
27205
  i12.MediaViewerModule,
@@ -27301,12 +27342,12 @@
27301
27342
  i3$1.MatInputModule,
27302
27343
  i5$1.MatDatepickerModule,
27303
27344
  i5.MatAutocompleteModule,
27304
- i7.CdkTreeModule,
27345
+ i8.CdkTreeModule,
27305
27346
  i1$5.OverlayModule,
27306
27347
  i3.PaymentLibModule,
27307
27348
  i2$2.ScrollToModule.forRoot(),
27308
27349
  i1.RpxTranslationModule.forChild(),
27309
- i7.CdkTreeModule,
27350
+ i8.CdkTreeModule,
27310
27351
  i1$5.OverlayModule,
27311
27352
  i1$3.MatDialogModule,
27312
27353
  i12.MediaViewerModule,
@@ -27519,7 +27560,7 @@
27519
27560
  i0__namespace.ɵɵproperty("ngIf", ctx_r15.canShowFieldInCYA(field_r16));
27520
27561
  }
27521
27562
  }
27522
- var _c0$f = function (a0, a4) { return [a0, false, undefined, true, a4]; };
27563
+ var _c0$f = function (a0, a4, a7) { return [a0, false, undefined, true, a4, undefined, undefined, a7]; };
27523
27564
  function CaseEditSubmitComponent_div_0_ng_container_11_ng_container_7_ng_container_1_Template(rf, ctx) {
27524
27565
  if (rf & 1) {
27525
27566
  i0__namespace.ɵɵelementContainerStart(0);
@@ -27533,13 +27574,13 @@
27533
27574
  var page_r13 = i0__namespace.ɵɵnextContext().$implicit;
27534
27575
  var ctx_r14 = i0__namespace.ɵɵnextContext(3);
27535
27576
  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"]))));
27577
+ 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
27578
  }
27538
27579
  }
27539
27580
  function CaseEditSubmitComponent_div_0_ng_container_11_ng_container_7_Template(rf, ctx) {
27540
27581
  if (rf & 1) {
27541
27582
  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);
27583
+ i0__namespace.ɵɵtemplate(1, CaseEditSubmitComponent_div_0_ng_container_11_ng_container_7_ng_container_1_Template, 5, 19, "ng-container", 0);
27543
27584
  i0__namespace.ɵɵelementContainerEnd();
27544
27585
  }
27545
27586
  if (rf & 2) {
@@ -27786,6 +27827,7 @@
27786
27827
  });
27787
27828
  CaseEditSubmitComponent.prototype.ngOnInit = function () {
27788
27829
  var _this = this;
27830
+ var _a, _b, _c;
27789
27831
  this.profileSubscription = this.profileNotifier.profile.subscribe(function (_) { return _this.profile = _; });
27790
27832
  this.eventTrigger = this.caseEdit.eventTrigger;
27791
27833
  this.triggerText = this.eventTrigger.end_button_label || CallbackErrorsComponent.TRIGGER_TEXT_SUBMIT;
@@ -27794,6 +27836,10 @@
27794
27836
  this.showSummaryFields = this.sortFieldsByShowSummaryContent(this.eventTrigger.case_fields);
27795
27837
  this.caseEdit.isSubmitting = false;
27796
27838
  this.contextFields = this.getCaseFields();
27839
+ 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) {
27840
+ var _d;
27841
+ return Object.assign(o, (_d = {}, _d[key.id] = key.value, _d));
27842
+ }, {});
27797
27843
  // Indicates if the submission is for a Case Flag, as opposed to a "regular" form submission, by the presence of
27798
27844
  // a FlagLauncher field in the event trigger
27799
27845
  this.caseEdit.isCaseFlagSubmission =
@@ -32395,12 +32441,13 @@
32395
32441
  };
32396
32442
  // Refactored under EXUI-110 to address infinite tab loop to use tabIndexChanged instead
32397
32443
  CaseFullAccessViewComponent.prototype.tabChanged = function (tabIndexChanged) {
32444
+ var _a;
32398
32445
  var matTab = this.tabGroup._tabs.find(function (tab) { return tab.isActive; });
32399
32446
  var tabLabel = matTab.textLabel;
32400
32447
  // sortedTabs are fragments
32401
32448
  // appended/prepepended tabs use router navigation
32402
32449
  if ((tabIndexChanged <= 1 && this.prependedTabs && this.prependedTabs.length) ||
32403
- (this.appendedTabs && this.appendedTabs.length && tabLabel === this.HEARINGS_TAB_LABEL)) {
32450
+ (((_a = this.appendedTabs) === null || _a === void 0 ? void 0 : _a.length) && tabLabel === this.HEARINGS_TAB_LABEL)) {
32404
32451
  // Hack to get ID from tab as it's not easily achieved through Angular Material Tabs
32405
32452
  var tab = matTab['_viewContainerRef'];
32406
32453
  var id = tab.element.nativeElement.id;
@@ -32420,6 +32467,7 @@
32420
32467
  var targetTabIndex = this.tabGroup._tabs.toArray().findIndex(function (tab) { return tab.textLabel === triggerOutputEventText; });
32421
32468
  if (targetTabIndex > -1) {
32422
32469
  this.selectedTabIndex = targetTabIndex;
32470
+ this.tabGroup.selectedIndex = targetTabIndex;
32423
32471
  }
32424
32472
  };
32425
32473
  CaseFullAccessViewComponent.prototype.hasActiveCaseFlags = function () {
@@ -32498,8 +32546,8 @@
32498
32546
  var value = {};
32499
32547
  if (caseFields) {
32500
32548
  caseFields.forEach(function (caseField) {
32501
- var _a;
32502
- value = Object.assign(Object.assign({}, value), (_a = {}, _a[caseField.id] = caseField.value, _a));
32549
+ var _b;
32550
+ value = Object.assign(Object.assign({}, value), (_b = {}, _b[caseField.id] = caseField.value, _b));
32503
32551
  });
32504
32552
  }
32505
32553
  return new i2$1.FormGroup({ data: new i2$1.FormControl(value) });