@hmcts/ccd-case-ui-toolkit 7.3.79-exui-5006 → 7.3.79-exui-2837-1

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.
@@ -4158,6 +4158,7 @@ class WorkbasketInputModel {
4158
4158
  label;
4159
4159
  order;
4160
4160
  field;
4161
+ dataType;
4161
4162
  metadata;
4162
4163
  display_context_parameter;
4163
4164
  }
@@ -4207,6 +4208,16 @@ class FieldsUtils {
4207
4208
  }
4208
4209
  return obj;
4209
4210
  }
4211
+ static buildFieldId(fieldId, elementPath, dataType) {
4212
+ if (!fieldId || !elementPath) {
4213
+ return fieldId;
4214
+ }
4215
+ const normalizedType = typeof dataType === 'string' ? dataType.toLowerCase() : '';
4216
+ if (normalizedType === 'collection') {
4217
+ return `${fieldId}.value.${elementPath}`;
4218
+ }
4219
+ return `${fieldId}.${elementPath}`;
4220
+ }
4210
4221
  static toValuesMap(caseFields) {
4211
4222
  const valueMap = {};
4212
4223
  caseFields.forEach(field => {
@@ -35675,9 +35686,7 @@ class WorkbasketFiltersComponent {
35675
35686
  .sort(this.orderService.sortAsc);
35676
35687
  const formValue = this.windowService.getLocalStorage(FORM_GROUP_VAL_LOC_STORAGE);
35677
35688
  workbasketInputs.forEach(item => {
35678
- if (item.field.elementPath) {
35679
- item.field.id = `${item.field.id}.${item.field.elementPath}`;
35680
- }
35689
+ item.field.id = FieldsUtils.buildFieldId(item.field.id, item.field.elementPath, item.dataType);
35681
35690
  item.field.label = item.label;
35682
35691
  if (formValue) {
35683
35692
  const searchFormValueObject = JSON.parse(formValue);
@@ -41231,12 +41240,14 @@ class SearchInput {
41231
41240
  field;
41232
41241
  metadata;
41233
41242
  display_context_parameter;
41234
- constructor(label, order, field, metadata, display_context_parameter) {
41243
+ dataType;
41244
+ constructor(label, order, field, metadata, display_context_parameter, dataType) {
41235
41245
  this.label = label;
41236
41246
  this.order = order;
41237
41247
  this.field = field;
41238
41248
  this.metadata = metadata;
41239
41249
  this.display_context_parameter = display_context_parameter;
41250
+ this.dataType = dataType;
41240
41251
  }
41241
41252
  }
41242
41253
 
@@ -41435,9 +41446,7 @@ class SearchFiltersComponent {
41435
41446
  formValueObject = JSON.parse(formValue);
41436
41447
  }
41437
41448
  searchInputs.forEach(item => {
41438
- if (item.field.elementPath) {
41439
- item.field.id = `${item.field.id}.${item.field.elementPath}`;
41440
- }
41449
+ item.field.id = FieldsUtils.buildFieldId(item.field.id, item.field.elementPath, item.dataType);
41441
41450
  item.field.label = item.label;
41442
41451
  if (formValueObject) {
41443
41452
  item.field.value = formValueObject[item.field.id];