@hmcts/ccd-case-ui-toolkit 6.13.10-dl-rc1 → 6.13.10-dl-rc3

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.
@@ -25264,23 +25264,26 @@
25264
25264
  || !ReadFieldsFilterPipe.isEmpty(value[field.id]);
25265
25265
  };
25266
25266
  ReadFieldsFilterPipe.getValue = function (field, values, index) {
25267
- var value;
25268
- if (index >= 0) {
25269
- value = values[index].value[field.id];
25270
- }
25271
- else {
25272
- value = values[field.id];
25267
+ if (ReadFieldsFilterPipe.isEmpty(field.value)) {
25268
+ var value = void 0;
25269
+ if (index >= 0) {
25270
+ value = values[index].value[field.id];
25271
+ }
25272
+ else {
25273
+ value = values[field.id];
25274
+ }
25275
+ return value;
25273
25276
  }
25274
- return ReadFieldsFilterPipe.isEmpty(field.value) ? value : field.value;
25277
+ return field.value;
25275
25278
  };
25276
- ReadFieldsFilterPipe.evaluateConditionalShow = function (field, formValue, path, formGroupAvaliable, fieldId) {
25279
+ ReadFieldsFilterPipe.evaluateConditionalShow = function (field, formValue, path, formGroupAvailable, fieldId) {
25277
25280
  if (field.display_context === 'HIDDEN') {
25278
25281
  field.hidden = true;
25279
25282
  }
25280
25283
  else if (field.show_condition) {
25281
25284
  var cond = void 0;
25282
- if (fieldId && field.show_condition.indexOf(fieldId) > -1 && !formGroupAvaliable && !!Object.keys(formValue).length) {
25283
- var search = fieldId + '.';
25285
+ if (fieldId && field.show_condition.indexOf(fieldId + ".") > -1 && !formGroupAvailable && !!Object.keys(formValue).length) {
25286
+ var search = fieldId + ".";
25284
25287
  var searchRegExp = new RegExp(search, 'g');
25285
25288
  var replaceWith = '';
25286
25289
  cond = ShowCondition.getInstance(field.show_condition.replace(searchRegExp, replaceWith));