@hmcts/ccd-case-ui-toolkit 5.0.25-case-file-view-document-chlidren-count → 5.0.25-case-file-view-all-document-count-v8

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.
@@ -9824,6 +9824,21 @@
9824
9824
  this.nestedChildren = function (_, nodeData) { return nodeData.children; };
9825
9825
  this.nestedTreeControl = new i4.NestedTreeControl(this.getChildren);
9826
9826
  }
9827
+ Object.defineProperty(CaseFileViewFolderComponent.prototype, "documentCount", {
9828
+ get: function () {
9829
+ var _a;
9830
+ if ((_a = this.nestedDataSource) === null || _a === void 0 ? void 0 : _a.length) {
9831
+ return this.nestedDataSource.reduce(function (acc, item) {
9832
+ return acc + item.childDocumentCount;
9833
+ }, 0);
9834
+ }
9835
+ else {
9836
+ return 0;
9837
+ }
9838
+ },
9839
+ enumerable: false,
9840
+ configurable: true
9841
+ });
9827
9842
  CaseFileViewFolderComponent.prototype.ngOnInit = function () {
9828
9843
  var _this = this;
9829
9844
  this.documentFilterFormGroup = new i1$2.FormGroup({});
@@ -9958,7 +9973,7 @@
9958
9973
  CaseFileViewFolderComponent.DOCUMENT_SEARCH_FORM_CONTROL_NAME = 'documentSearchFormControl';
9959
9974
  CaseFileViewFolderComponent.MINIMUM_SEARCH_CHARACTERS = 3;
9960
9975
  CaseFileViewFolderComponent.ɵfac = function CaseFileViewFolderComponent_Factory(t) { return new (t || CaseFileViewFolderComponent)(); };
9961
- CaseFileViewFolderComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CaseFileViewFolderComponent, selectors: [["ccd-case-file-view-folder"]], inputs: { categoriesAndDocuments: "categoriesAndDocuments" }, decls: 9, vars: 2, 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-node", 4, "cdkTreeNodeDef"], ["class", "document-tree-node", 4, "cdkTreeNodeDef", "cdkTreeNodeDefWhen"], [1, "document-tree-node"], ["cdkTreeNodeToggle", "", 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"], ["mat-icon-button", "", 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) {
9976
+ CaseFileViewFolderComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CaseFileViewFolderComponent, selectors: [["ccd-case-file-view-folder"]], inputs: { categoriesAndDocuments: "categoriesAndDocuments" }, 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-node", 4, "cdkTreeNodeDef"], ["class", "document-tree-node", 4, "cdkTreeNodeDef", "cdkTreeNodeDefWhen"], [1, "document-tree-node"], ["cdkTreeNodeToggle", "", 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"], ["mat-icon-button", "", 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) {
9962
9977
  if (rf & 1) {
9963
9978
  i0__namespace.ɵɵelementStart(0, "div", 0);
9964
9979
  i0__namespace.ɵɵelementStart(1, "div", 1);
@@ -9967,7 +9982,7 @@
9967
9982
  i0__namespace.ɵɵelementEnd();
9968
9983
  i0__namespace.ɵɵelementStart(3, "div", 3);
9969
9984
  i0__namespace.ɵɵelementStart(4, "div", 4);
9970
- i0__namespace.ɵɵtext(5, "Documents");
9985
+ i0__namespace.ɵɵtext(5);
9971
9986
  i0__namespace.ɵɵelementEnd();
9972
9987
  i0__namespace.ɵɵelementStart(6, "div");
9973
9988
  i0__namespace.ɵɵelementStart(7, "ccd-case-file-view-folder-sort", 5);
@@ -9980,10 +9995,12 @@
9980
9995
  if (rf & 2) {
9981
9996
  i0__namespace.ɵɵadvance(1);
9982
9997
  i0__namespace.ɵɵproperty("formGroup", ctx.documentFilterFormGroup);
9983
- i0__namespace.ɵɵadvance(7);
9998
+ i0__namespace.ɵɵadvance(4);
9999
+ i0__namespace.ɵɵtextInterpolate1("Documents (", ctx.documentCount, ")");
10000
+ i0__namespace.ɵɵadvance(3);
9984
10001
  i0__namespace.ɵɵproperty("ngIf", ctx.documentTreeData);
9985
10002
  }
9986
- }, directives: [i1__namespace$3.NgControlStatusGroup, i1__namespace$3.FormGroupDirective, i1__namespace$3.DefaultValueAccessor, i1__namespace$3.NgControlStatus, i1__namespace$3.FormControlName, CaseFileViewFolderSortComponent, i1__namespace.NgIf, i4__namespace.CdkTree, i4__namespace.CdkTreeNodeDef, i4__namespace.CdkNestedTreeNode, i4__namespace.CdkTreeNodeToggle, i4__namespace.CdkTreeNodeOutlet], styles: [".document-filter-container[_ngcontent-%COMP%]{border-bottom:2px solid #c9c9c9;padding-bottom:4px}.document-filter-container[_ngcontent-%COMP%] .document-filter[_ngcontent-%COMP%]{height:70%;padding:8px 8px 0;margin-bottom: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-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;overflow-x:hidden;overflow-y:scroll;height:400px}.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;white-space:nowrap;cursor:pointer}.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%]{color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);padding-top:4px}.node__name[_ngcontent-%COMP%]{margin-left:4px}.document-tree[_ngcontent-%COMP%]::-webkit-scrollbar{width:.5em}.document-tree[_ngcontent-%COMP%]::-webkit-scrollbar-button{display:none}.document-tree[_ngcontent-%COMP%]::-webkit-scrollbar-track-piece{background:#eee}.document-tree[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#ccc}"] });
10003
+ }, directives: [i1__namespace$3.NgControlStatusGroup, i1__namespace$3.FormGroupDirective, i1__namespace$3.DefaultValueAccessor, i1__namespace$3.NgControlStatus, i1__namespace$3.FormControlName, CaseFileViewFolderSortComponent, i1__namespace.NgIf, i4__namespace.CdkTree, i4__namespace.CdkTreeNodeDef, i4__namespace.CdkNestedTreeNode, i4__namespace.CdkTreeNodeToggle, i4__namespace.CdkTreeNodeOutlet], styles: [".document-filter-container[_ngcontent-%COMP%]{border-bottom:2px solid #c9c9c9;padding-bottom:4px}.document-filter-container[_ngcontent-%COMP%] .document-filter[_ngcontent-%COMP%]{height:70%;padding:8px 8px 0;margin-bottom: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-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;overflow-x:hidden;overflow-y:scroll;height:400px}.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;white-space:nowrap;cursor:pointer}.node__icon[_ngcontent-%COMP%]{position:relative;background:none;border:0}.node__iconImg[_ngcontent-%COMP%]{display:block;height:24px}.node__count[_ngcontent-%COMP%]{color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);padding-top:4px}.node__name[_ngcontent-%COMP%]{margin-left:6px}.document-tree[_ngcontent-%COMP%]::-webkit-scrollbar{width:.5em}.document-tree[_ngcontent-%COMP%]::-webkit-scrollbar-button{display:none}.document-tree[_ngcontent-%COMP%]::-webkit-scrollbar-track-piece{background:#eee}.document-tree[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#ccc}"] });
9987
10004
  (function () {
9988
10005
  (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CaseFileViewFolderComponent, [{
9989
10006
  type: i0.Component,