@hmcts/ccd-case-ui-toolkit 6.13.9-rc4 → 6.13.9-rc5

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.
@@ -25012,23 +25012,26 @@
25012
25012
  || !ReadFieldsFilterPipe.isEmpty(value[field.id]);
25013
25013
  };
25014
25014
  ReadFieldsFilterPipe.getValue = function (field, values, index) {
25015
- var value;
25016
- if (index >= 0) {
25017
- value = values[index].value[field.id];
25018
- }
25019
- else {
25020
- value = values[field.id];
25015
+ if (ReadFieldsFilterPipe.isEmpty(field.value)) {
25016
+ var value = void 0;
25017
+ if (index >= 0) {
25018
+ value = values[index].value[field.id];
25019
+ }
25020
+ else {
25021
+ value = values[field.id];
25022
+ }
25023
+ return value;
25021
25024
  }
25022
- return ReadFieldsFilterPipe.isEmpty(field.value) ? value : field.value;
25025
+ return field.value;
25023
25026
  };
25024
- ReadFieldsFilterPipe.evaluateConditionalShow = function (field, formValue, path, formGroupAvaliable, fieldId) {
25027
+ ReadFieldsFilterPipe.evaluateConditionalShow = function (field, formValue, path, formGroupAvailable, fieldId) {
25025
25028
  if (field.display_context === 'HIDDEN') {
25026
25029
  field.hidden = true;
25027
25030
  }
25028
25031
  else if (field.show_condition) {
25029
25032
  var cond = void 0;
25030
- if (fieldId && field.show_condition.indexOf(fieldId) > -1 && !formGroupAvaliable && !!Object.keys(formValue).length) {
25031
- var search = fieldId + '.';
25033
+ if (fieldId && field.show_condition.indexOf(fieldId + ".") > -1 && !formGroupAvailable && !!Object.keys(formValue).length) {
25034
+ var search = fieldId + ".";
25032
25035
  var searchRegExp = new RegExp(search, 'g');
25033
25036
  var replaceWith = '';
25034
25037
  cond = ShowCondition.getInstance(field.show_condition.replace(searchRegExp, replaceWith));