@hmcts/ccd-case-ui-toolkit 6.13.10-rc1 → 6.13.10-revert-EUI-7931

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