@hmcts/ccd-case-ui-toolkit 5.0.25-case-file-sort-documents-v5 → 5.0.25-case-file-view-all-document-count-v2

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.
@@ -9732,55 +9732,55 @@
9732
9732
  })();
9733
9733
 
9734
9734
  var _c0$G = ["tree"];
9735
- function CaseFileViewFolderComponent_cdk_nested_tree_node_8_Template(rf, ctx) {
9735
+ function CaseFileViewFolderComponent_cdk_nested_tree_node_7_Template(rf, ctx) {
9736
9736
  if (rf & 1) {
9737
- i0__namespace.ɵɵelementStart(0, "cdk-nested-tree-node", 8);
9738
- i0__namespace.ɵɵelementStart(1, "div", 9);
9739
- i0__namespace.ɵɵelementStart(2, "button", 10);
9740
- i0__namespace.ɵɵelement(3, "img", 11);
9737
+ i0__namespace.ɵɵelementStart(0, "cdk-nested-tree-node", 7);
9738
+ i0__namespace.ɵɵelementStart(1, "div", 8);
9739
+ i0__namespace.ɵɵelementStart(2, "button", 9);
9740
+ i0__namespace.ɵɵelement(3, "img", 10);
9741
9741
  i0__namespace.ɵɵelementEnd();
9742
- i0__namespace.ɵɵelementStart(4, "span", 12);
9742
+ i0__namespace.ɵɵelementStart(4, "span", 11);
9743
9743
  i0__namespace.ɵɵtext(5);
9744
9744
  i0__namespace.ɵɵelementEnd();
9745
9745
  i0__namespace.ɵɵelementEnd();
9746
9746
  i0__namespace.ɵɵelementEnd();
9747
9747
  }
9748
9748
  if (rf & 2) {
9749
- var node_r3 = ctx.$implicit;
9749
+ var node_r2 = ctx.$implicit;
9750
9750
  i0__namespace.ɵɵadvance(5);
9751
- i0__namespace.ɵɵtextInterpolate(node_r3.name);
9751
+ i0__namespace.ɵɵtextInterpolate(node_r2.name);
9752
9752
  }
9753
9753
  }
9754
- function CaseFileViewFolderComponent_cdk_nested_tree_node_9_Template(rf, ctx) {
9754
+ function CaseFileViewFolderComponent_cdk_nested_tree_node_8_Template(rf, ctx) {
9755
9755
  if (rf & 1) {
9756
- i0__namespace.ɵɵelementStart(0, "cdk-nested-tree-node", 8);
9757
- i0__namespace.ɵɵelementStart(1, "div", 13);
9758
- i0__namespace.ɵɵelementStart(2, "button", 14);
9759
- i0__namespace.ɵɵelement(3, "img", 15);
9760
- i0__namespace.ɵɵelementStart(4, "span", 16);
9756
+ i0__namespace.ɵɵelementStart(0, "cdk-nested-tree-node", 7);
9757
+ i0__namespace.ɵɵelementStart(1, "div", 12);
9758
+ i0__namespace.ɵɵelementStart(2, "button", 13);
9759
+ i0__namespace.ɵɵelement(3, "img", 14);
9760
+ i0__namespace.ɵɵelementStart(4, "span", 15);
9761
9761
  i0__namespace.ɵɵtext(5);
9762
9762
  i0__namespace.ɵɵelementEnd();
9763
9763
  i0__namespace.ɵɵelementEnd();
9764
- i0__namespace.ɵɵelementStart(6, "span", 17);
9764
+ i0__namespace.ɵɵelementStart(6, "span", 16);
9765
9765
  i0__namespace.ɵɵtext(7);
9766
9766
  i0__namespace.ɵɵelementEnd();
9767
9767
  i0__namespace.ɵɵelementEnd();
9768
9768
  i0__namespace.ɵɵelementStart(8, "div");
9769
- i0__namespace.ɵɵelementContainer(9, 18);
9769
+ i0__namespace.ɵɵelementContainer(9, 17);
9770
9770
  i0__namespace.ɵɵelementEnd();
9771
9771
  i0__namespace.ɵɵelementEnd();
9772
9772
  }
9773
9773
  if (rf & 2) {
9774
- var node_r4 = ctx.$implicit;
9775
- var ctx_r2 = i0__namespace.ɵɵnextContext();
9774
+ var node_r3 = ctx.$implicit;
9775
+ var ctx_r1 = i0__namespace.ɵɵnextContext();
9776
9776
  i0__namespace.ɵɵadvance(2);
9777
- i0__namespace.ɵɵattribute("aria-label", "toggle " + node_r4.name);
9777
+ i0__namespace.ɵɵattribute("aria-label", "toggle " + node_r3.name);
9778
9778
  i0__namespace.ɵɵadvance(3);
9779
- i0__namespace.ɵɵtextInterpolate(node_r4.childDocumentCount);
9779
+ i0__namespace.ɵɵtextInterpolate(node_r3.childDocumentCount);
9780
9780
  i0__namespace.ɵɵadvance(2);
9781
- i0__namespace.ɵɵtextInterpolate(node_r4.name);
9781
+ i0__namespace.ɵɵtextInterpolate(node_r3.name);
9782
9782
  i0__namespace.ɵɵadvance(1);
9783
- i0__namespace.ɵɵclassProp("document-tree-invisible", !ctx_r2.nestedTreeControl.isExpanded(node_r4));
9783
+ i0__namespace.ɵɵclassProp("document-tree-invisible", !ctx_r1.nestedTreeControl.isExpanded(node_r3));
9784
9784
  }
9785
9785
  }
9786
9786
  var CaseFileViewFolderComponent = /** @class */ (function () {
@@ -9790,6 +9790,21 @@
9790
9790
  this.nestedChildren = function (_, nodeData) { return nodeData.children; };
9791
9791
  this.nestedTreeControl = new i2.NestedTreeControl(this.getChildren);
9792
9792
  }
9793
+ Object.defineProperty(CaseFileViewFolderComponent.prototype, "documentCount", {
9794
+ get: function () {
9795
+ var _a;
9796
+ if ((_a = this.nestedDataSource) === null || _a === void 0 ? void 0 : _a.length) {
9797
+ return this.nestedDataSource.reduce(function (acc, item) {
9798
+ return acc + item.childDocumentCount;
9799
+ }, 0);
9800
+ }
9801
+ else {
9802
+ return 0;
9803
+ }
9804
+ },
9805
+ enumerable: false,
9806
+ configurable: true
9807
+ });
9793
9808
  CaseFileViewFolderComponent.prototype.ngOnInit = function () {
9794
9809
  var _this = this;
9795
9810
  this.categoriesAndDocumentsSubscription = this.categoriesAndDocuments.subscribe(function (categoriesAndDocuments) {
@@ -10072,11 +10087,11 @@
10072
10087
  var _t = void 0;
10073
10088
  i0__namespace.ɵɵqueryRefresh(_t = i0__namespace.ɵɵloadQuery()) && (ctx.tree = _t.first);
10074
10089
  }
10075
- }, inputs: { categoriesAndDocuments: "categoriesAndDocuments" }, decls: 10, vars: 3, consts: [[1, "document-folders-header"], [1, "document-folders-header__title"], [3, "sortAscending", "sortDescending"], [1, "document-tree-container"], [3, "dataSource", "treeControl"], ["tree", ""], ["class", "document-tree-node", 4, "cdkTreeNodeDef"], ["class", "document-tree-node", 4, "cdkTreeNodeDef", "cdkTreeNodeDefWhen"], [1, "document-tree-node"], [1, "node"], ["mat-icon-button", "", "disabled", "", 1, "node__icon"], ["src", "/assets/images/document.png", "alt", "Document icon", 1, "node__iconImg"], [1, "node__name", "node-name-document"], ["cdkTreeNodeToggle", "", 1, "node"], ["mat-icon-button", "", 1, "node__icon"], ["src", "/assets/images/folder.png", "alt", "Folder icon", 1, "node__iconImg"], [1, "node__count"], [1, "node__name", "node__name--folder"], ["cdkTreeNodeOutlet", ""]], template: function CaseFileViewFolderComponent_Template(rf, ctx) {
10090
+ }, inputs: { categoriesAndDocuments: "categoriesAndDocuments" }, decls: 9, vars: 4, consts: [[1, "document-folders-header"], [1, "document-folders-header__title"], [3, "sortAscending", "sortDescending"], [1, "document-tree-container"], [3, "dataSource", "treeControl"], ["class", "document-tree-node", 4, "cdkTreeNodeDef"], ["class", "document-tree-node", 4, "cdkTreeNodeDef", "cdkTreeNodeDefWhen"], [1, "document-tree-node"], [1, "node"], ["mat-icon-button", "", "disabled", "", 1, "node__icon"], ["src", "/assets/images/document.png", "alt", "Document icon", 1, "node__iconImg"], [1, "node__name", "node-name-document"], ["cdkTreeNodeToggle", "", 1, "node"], ["mat-icon-button", "", 1, "node__icon"], ["src", "/assets/images/folder.png", "alt", "Folder icon", 1, "node__iconImg"], [1, "node__count"], [1, "node__name", "node__name--folder"], ["cdkTreeNodeOutlet", ""]], template: function CaseFileViewFolderComponent_Template(rf, ctx) {
10076
10091
  if (rf & 1) {
10077
10092
  i0__namespace.ɵɵelementStart(0, "div", 0);
10078
10093
  i0__namespace.ɵɵelementStart(1, "div", 1);
10079
- i0__namespace.ɵɵtext(2, "Documents");
10094
+ i0__namespace.ɵɵtext(2);
10080
10095
  i0__namespace.ɵɵelementEnd();
10081
10096
  i0__namespace.ɵɵelementStart(3, "div");
10082
10097
  i0__namespace.ɵɵelementStart(4, "ccd-case-file-view-folder-sort", 2);
@@ -10085,19 +10100,21 @@
10085
10100
  i0__namespace.ɵɵelementEnd();
10086
10101
  i0__namespace.ɵɵelementEnd();
10087
10102
  i0__namespace.ɵɵelementStart(5, "div", 3);
10088
- i0__namespace.ɵɵelementStart(6, "cdk-tree", 4, 5);
10089
- i0__namespace.ɵɵtemplate(8, CaseFileViewFolderComponent_cdk_nested_tree_node_8_Template, 6, 1, "cdk-nested-tree-node", 6);
10090
- i0__namespace.ɵɵtemplate(9, CaseFileViewFolderComponent_cdk_nested_tree_node_9_Template, 10, 5, "cdk-nested-tree-node", 7);
10103
+ i0__namespace.ɵɵelementStart(6, "cdk-tree", 4);
10104
+ i0__namespace.ɵɵtemplate(7, CaseFileViewFolderComponent_cdk_nested_tree_node_7_Template, 6, 1, "cdk-nested-tree-node", 5);
10105
+ i0__namespace.ɵɵtemplate(8, CaseFileViewFolderComponent_cdk_nested_tree_node_8_Template, 10, 5, "cdk-nested-tree-node", 6);
10091
10106
  i0__namespace.ɵɵelementEnd();
10092
10107
  i0__namespace.ɵɵelementEnd();
10093
10108
  }
10094
10109
  if (rf & 2) {
10095
- i0__namespace.ɵɵadvance(6);
10110
+ i0__namespace.ɵɵadvance(2);
10111
+ i0__namespace.ɵɵtextInterpolate1("Documents (", ctx.documentCount, ")");
10112
+ i0__namespace.ɵɵadvance(4);
10096
10113
  i0__namespace.ɵɵproperty("dataSource", ctx.nestedDataSource)("treeControl", ctx.nestedTreeControl);
10097
- i0__namespace.ɵɵadvance(3);
10114
+ i0__namespace.ɵɵadvance(2);
10098
10115
  i0__namespace.ɵɵproperty("cdkTreeNodeDefWhen", ctx.nestedChildren);
10099
10116
  }
10100
- }, directives: [CaseFileViewFolderSortComponent, i2__namespace.CdkTree, i2__namespace.CdkTreeNodeDef, i2__namespace.CdkNestedTreeNode, i2__namespace.CdkTreeNodeToggle, i2__namespace.CdkTreeNodeOutlet], styles: [".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}.document-tree-container[_ngcontent-%COMP%]{margin:4px}.document-tree-container[_ngcontent-%COMP%] .document-tree-invisible[_ngcontent-%COMP%]{display:none}.document-tree-container[_ngcontent-%COMP%] .document-tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%], .document-tree-container[_ngcontent-%COMP%] .document-tree[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0;list-style-type:none}.document-tree-container[_ngcontent-%COMP%] .document-tree-node[_ngcontent-%COMP%]{display:block}.document-tree-container[_ngcontent-%COMP%] .document-tree-node[_ngcontent-%COMP%] .document-tree-node[_ngcontent-%COMP%]{padding-left:40px}.node[_ngcontent-%COMP%]{display:flex;align-items:center;padding:6px 0}.node__icon[_ngcontent-%COMP%]{position:relative;background:none;border:0;padding:6px}.node__iconImg[_ngcontent-%COMP%]{display:block;height:24px;width:24px}.node__count[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#fff;padding-top:4px}.node__name[_ngcontent-%COMP%]{margin-left:4px}"] });
10117
+ }, directives: [CaseFileViewFolderSortComponent, i2__namespace.CdkTree, i2__namespace.CdkTreeNodeDef, i2__namespace.CdkNestedTreeNode, i2__namespace.CdkTreeNodeToggle, i2__namespace.CdkTreeNodeOutlet], styles: [".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}.document-tree-container[_ngcontent-%COMP%]{margin:4px}.document-tree-container[_ngcontent-%COMP%] .document-tree-invisible[_ngcontent-%COMP%]{display:none}.document-tree-container[_ngcontent-%COMP%] .document-tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%], .document-tree-container[_ngcontent-%COMP%] .document-tree[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0;list-style-type:none}.document-tree-container[_ngcontent-%COMP%] .document-tree-node[_ngcontent-%COMP%]{display:block}.document-tree-container[_ngcontent-%COMP%] .document-tree-node[_ngcontent-%COMP%] .document-tree-node[_ngcontent-%COMP%]{padding-left:40px}.node[_ngcontent-%COMP%]{display:flex;align-items:center;padding:6px 0}.node__icon[_ngcontent-%COMP%]{position:relative;background:none;border:0}.node__iconImg[_ngcontent-%COMP%]{display:block;height:24px}.node__count[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#fff;padding-top:4px}.node__name[_ngcontent-%COMP%]{margin-left:6px}"] });
10101
10118
  (function () {
10102
10119
  (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CaseFileViewFolderComponent, [{
10103
10120
  type: i0.Component,