@hmcts/ccd-case-ui-toolkit 6.10.8-prevent-clear-page-from-cya → 6.10.8-summary-screen-fields-fix

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.
@@ -4622,7 +4622,7 @@
4622
4622
  return this.checkValueNotEquals(expectedValue, currentValue);
4623
4623
  }
4624
4624
  else {
4625
- return currentValue == expectedValue || this.okIfBothEmpty(expectedValue, currentValue); // tslint:disable-line
4625
+ return currentValue === undefined || currentValue == expectedValue || this.okIfBothEmpty(expectedValue, currentValue); // tslint:disable-line
4626
4626
  }
4627
4627
  }
4628
4628
  };
@@ -10320,35 +10320,12 @@
10320
10320
  return this.wizard.findWizardPage(caseFieldId);
10321
10321
  };
10322
10322
  CaseEditPageComponent.prototype.updateEventTriggerCaseFields = function (caseFieldId, jsonData, eventTrigger) {
10323
- var _this = this;
10324
- if (eventTrigger === null || eventTrigger === void 0 ? void 0 : eventTrigger.case_fields) {
10323
+ if (eventTrigger.case_fields) {
10325
10324
  eventTrigger.case_fields
10326
10325
  .filter(function (element) { return element.id === caseFieldId; })
10327
- .forEach(function (element) {
10328
- if (_this.isAnObject(element.value)) {
10329
- var updatedJsonDataObject = _this.updateJsonDataObject(caseFieldId, jsonData, element);
10330
- element.value = Object.assign(Object.assign({}, element.value), updatedJsonDataObject);
10331
- }
10332
- else {
10333
- element.value = jsonData.data[caseFieldId];
10334
- }
10335
- });
10326
+ .forEach(function (element) { return element.value = jsonData.data[caseFieldId]; });
10336
10327
  }
10337
10328
  };
10338
- CaseEditPageComponent.prototype.updateJsonDataObject = function (caseFieldId, jsonData, element) {
10339
- var _this = this;
10340
- return Object.keys(jsonData.data[caseFieldId]).reduce(function (acc, key) {
10341
- var _a;
10342
- var elementValue = element.value[key];
10343
- var jsonDataValue = jsonData.data[caseFieldId][key];
10344
- var hasElementGotValueProperty = _this.isAnObject(elementValue) && elementValue.value !== undefined;
10345
- var jsonDataOrElementValue = (jsonDataValue === null || jsonDataValue === void 0 ? void 0 : jsonDataValue.value) !== null && (jsonDataValue === null || jsonDataValue === void 0 ? void 0 : jsonDataValue.value) !== undefined ? jsonDataValue : elementValue;
10346
- return Object.assign(Object.assign({}, acc), (_a = {}, _a["" + key] = hasElementGotValueProperty ? jsonDataOrElementValue : jsonDataValue, _a));
10347
- }, {});
10348
- };
10349
- CaseEditPageComponent.prototype.isAnObject = function (property) {
10350
- return typeof property === 'object' && !Array.isArray(property) && property !== null;
10351
- };
10352
10329
  CaseEditPageComponent.prototype.updateFormControlsValue = function (formGroup, caseFieldId, value) {
10353
10330
  var theControl = formGroup.controls['data'].get(caseFieldId);
10354
10331
  if (theControl && theControl['status'] !== 'DISABLED') {
@@ -18095,7 +18072,7 @@
18095
18072
  i0__namespace.ɵɵadvance(2);
18096
18073
  i0__namespace.ɵɵproperty("ngForOf", ctx.currentCategories);
18097
18074
  }
18098
- }, directives: [i1__namespace.NgForOf, i1__namespace.NgTemplateOutlet], styles: [":host{position:relative;display:block}.folders{margin-bottom:20px}.folder{display:none;border-top:1px solid #ccc;margin:0 0 -1px}.folder,.folder:last-child{border-bottom:1px solid #ccc}.folders>.folder,input:checked~.folder{display:block}.iconImg{position:relative;display:inline-block;height:28px}.folder>.folder{margin-left:20px}.folder label:before{top:3px}.folder label:after{top:13px}p{font-weight:700}button{margin-right:20px}.close{float:right;width:30px;height:30px;background:url(/assets/img/x.PNG) no-repeat 50%}.cancel,.close{cursor:pointer}.cdk-overlay-pane{overflow:auto}.cdk-overlay-pane::-webkit-scrollbar{width:7px}.cdk-overlay-pane::-webkit-scrollbar-thumb{border:4px solid transparent;background-clip:padding-box;border-radius:9999px;background-color:#aaa}.cdk-overlay-pane::-webkit-scrollbar-button{display:none}.cdk-overlay-pane::-webkit-scrollbar-track-piece{background:#eee}.cdk-overlay-pane::-webkit-scrollbar-thumb{background:#ccc}"], encapsulation: 2 });
18075
+ }, directives: [i1__namespace.NgForOf, i1__namespace.NgTemplateOutlet], styles: [":host{position:relative;display:block}.folders{margin-bottom:20px}.folder{display:none;border-top:1px solid #ccc;margin:0 0 -1px}.folder:last-child{border-bottom:1px solid #ccc}.folders>.folder,input:checked~.folder{display:block}.iconImg{position:relative;display:inline-block;height:28px}.folder>.folder{margin-left:20px}.folder label:before{top:3px}.folder label:after{top:13px}p{font-weight:700}button{margin-right:20px}.close{float:right;width:30px;height:30px;background:url(/assets/img/x.PNG) no-repeat 50%}.cancel,.close{cursor:pointer}.cdk-overlay-pane{overflow:auto}.cdk-overlay-pane::-webkit-scrollbar{width:7px}.cdk-overlay-pane::-webkit-scrollbar-thumb{border:4px solid transparent;background-clip:padding-box;border-radius:9999px;background-color:#aaa}.cdk-overlay-pane::-webkit-scrollbar-button{display:none}.cdk-overlay-pane::-webkit-scrollbar-track-piece{background:#eee}.cdk-overlay-pane::-webkit-scrollbar-thumb{background:#ccc}"], encapsulation: 2 });
18099
18076
  (function () {
18100
18077
  (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CaseFileViewFolderSelectorComponent, [{
18101
18078
  type: i0.Component,