@hmcts/ccd-case-ui-toolkit 6.19.9 → 6.19.10

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.
@@ -8700,6 +8700,7 @@
8700
8700
  childrenCaseFields.forEach(function (e) { return _this.hideParentIfAllChildrenHidden(e); });
8701
8701
  if (childrenCaseFields.length > 0 && this.allCaseFieldsHidden(childrenCaseFields)) {
8702
8702
  caseField.hidden = true;
8703
+ caseField.display_context = 'HIDDEN';
8703
8704
  }
8704
8705
  };
8705
8706
  WizardPageFieldToCaseFieldMapper.prototype.getCaseFieldChildren = function (caseField) {
@@ -26413,17 +26414,17 @@
26413
26414
  /**
26414
26415
  * Complex type should have at least on simple field descendant with a value.
26415
26416
  */
26416
- ReadFieldsFilterPipe.isValidComplex = function (field, values) {
26417
+ ReadFieldsFilterPipe.isValidComplex = function (field, values, checkConditionalShowAgainst) {
26417
26418
  values = values || {};
26418
26419
  var type = field.field_type;
26419
26420
  var value = ReadFieldsFilterPipe.getValue(field, values);
26420
26421
  var hasChildrenWithValue = type.complex_fields.find(function (f) {
26421
- var willKeep = ReadFieldsFilterPipe.keepField(f, value, true);
26422
- return willKeep && ReadFieldsFilterPipe.evaluateConditionalShow(f, value).hidden !== true;
26422
+ var willKeep = ReadFieldsFilterPipe.keepField(f, value, true, checkConditionalShowAgainst);
26423
+ return willKeep && ReadFieldsFilterPipe.evaluateConditionalShow(f, checkConditionalShowAgainst).hidden !== true;
26423
26424
  });
26424
26425
  return !!hasChildrenWithValue;
26425
26426
  };
26426
- ReadFieldsFilterPipe.isValidCollection = function (field, values) {
26427
+ ReadFieldsFilterPipe.isValidCollection = function (field, values, checkConditionalShowAgainst) {
26427
26428
  // if field is collection and it has complex/collection child field; parent field doesnt have value defined
26428
26429
  if (!Array.isArray(field.value) && values && values.hasOwnProperty(field.id)) {
26429
26430
  return true;
@@ -26437,7 +26438,7 @@
26437
26438
  value: item.value,
26438
26439
  label: null,
26439
26440
  });
26440
- return ReadFieldsFilterPipe.isValidComplex(complexField);
26441
+ return ReadFieldsFilterPipe.isValidComplex(complexField, undefined, checkConditionalShowAgainst);
26441
26442
  });
26442
26443
  }
26443
26444
  return isNotEmpty;
@@ -26449,11 +26450,11 @@
26449
26450
  ReadFieldsFilterPipe.isCompound = function (field) {
26450
26451
  return ReadFieldsFilterPipe.NESTED_TYPES[field.field_type.type];
26451
26452
  };
26452
- ReadFieldsFilterPipe.isValidCompound = function (field, value) {
26453
+ ReadFieldsFilterPipe.isValidCompound = function (field, value, checkConditionalShowAgainst) {
26453
26454
  return ReadFieldsFilterPipe.isCompound(field)
26454
- && ReadFieldsFilterPipe.NESTED_TYPES[field.field_type.type](field, value);
26455
+ && ReadFieldsFilterPipe.NESTED_TYPES[field.field_type.type](field, value, checkConditionalShowAgainst);
26455
26456
  };
26456
- ReadFieldsFilterPipe.keepField = function (field, value, ignoreLabels) {
26457
+ ReadFieldsFilterPipe.keepField = function (field, value, ignoreLabels, checkConditionalShowAgainst) {
26457
26458
  if (ignoreLabels === void 0) { ignoreLabels = false; }
26458
26459
  // We shouldn't ditch labels.
26459
26460
  if (!ignoreLabels && field.field_type.type === 'Label' && (field.label || '').length > 0) {
@@ -26465,7 +26466,7 @@
26465
26466
  }
26466
26467
  value = value || {};
26467
26468
  if (ReadFieldsFilterPipe.isCompound(field)) {
26468
- return ReadFieldsFilterPipe.isValidCompound(field, value);
26469
+ return ReadFieldsFilterPipe.isValidCompound(field, value, checkConditionalShowAgainst);
26469
26470
  }
26470
26471
  return !ReadFieldsFilterPipe.isEmpty(field.value)
26471
26472
  || !ReadFieldsFilterPipe.isEmpty(value[field.id]);
@@ -26546,7 +26547,7 @@
26546
26547
  }
26547
26548
  return f;
26548
26549
  })
26549
- .filter(function (f) { return keepEmpty || ReadFieldsFilterPipe.keepField(f); });
26550
+ .filter(function (f) { return keepEmpty || ReadFieldsFilterPipe.keepField(f, undefined, false, checkConditionalShowAgainst); });
26550
26551
  };
26551
26552
  return ReadFieldsFilterPipe;
26552
26553
  }());
@@ -32417,6 +32418,7 @@
32417
32418
  var targetTabIndex = this.tabGroup._tabs.toArray().findIndex(function (tab) { return tab.textLabel === triggerOutputEventText; });
32418
32419
  if (targetTabIndex > -1) {
32419
32420
  this.selectedTabIndex = targetTabIndex;
32421
+ this.tabGroup.selectedIndex = targetTabIndex;
32420
32422
  }
32421
32423
  };
32422
32424
  CaseFullAccessViewComponent.prototype.hasActiveCaseFlags = function () {