@hmcts/ccd-case-ui-toolkit 7.3.85 → 7.3.86-exui-2837

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.
@@ -4166,6 +4166,7 @@ class WorkbasketInputModel {
4166
4166
  label;
4167
4167
  order;
4168
4168
  field;
4169
+ dataType;
4169
4170
  metadata;
4170
4171
  display_context_parameter;
4171
4172
  }
@@ -4215,6 +4216,16 @@ class FieldsUtils {
4215
4216
  }
4216
4217
  return obj;
4217
4218
  }
4219
+ static buildFieldId(fieldId, elementPath, dataType) {
4220
+ if (!fieldId || !elementPath) {
4221
+ return fieldId;
4222
+ }
4223
+ const normalizedType = typeof dataType === 'string' ? dataType.toLowerCase() : '';
4224
+ if (normalizedType === 'collection') {
4225
+ return `${fieldId}.value.${elementPath}`;
4226
+ }
4227
+ return `${fieldId}.${elementPath}`;
4228
+ }
4218
4229
  static toValuesMap(caseFields) {
4219
4230
  const valueMap = {};
4220
4231
  caseFields.forEach(field => {
@@ -35708,9 +35719,7 @@ class WorkbasketFiltersComponent {
35708
35719
  .sort(this.orderService.sortAsc);
35709
35720
  const formValue = this.windowService.getLocalStorage(FORM_GROUP_VAL_LOC_STORAGE);
35710
35721
  workbasketInputs.forEach(item => {
35711
- if (item.field.elementPath) {
35712
- item.field.id = `${item.field.id}.${item.field.elementPath}`;
35713
- }
35722
+ item.field.id = FieldsUtils.buildFieldId(item.field.id, item.field.elementPath, item.dataType);
35714
35723
  item.field.label = item.label;
35715
35724
  if (formValue) {
35716
35725
  const searchFormValueObject = JSON.parse(formValue);
@@ -41264,12 +41273,14 @@ class SearchInput {
41264
41273
  field;
41265
41274
  metadata;
41266
41275
  display_context_parameter;
41267
- constructor(label, order, field, metadata, display_context_parameter) {
41276
+ dataType;
41277
+ constructor(label, order, field, metadata, display_context_parameter, dataType) {
41268
41278
  this.label = label;
41269
41279
  this.order = order;
41270
41280
  this.field = field;
41271
41281
  this.metadata = metadata;
41272
41282
  this.display_context_parameter = display_context_parameter;
41283
+ this.dataType = dataType;
41273
41284
  }
41274
41285
  }
41275
41286
 
@@ -41468,9 +41479,7 @@ class SearchFiltersComponent {
41468
41479
  formValueObject = JSON.parse(formValue);
41469
41480
  }
41470
41481
  searchInputs.forEach(item => {
41471
- if (item.field.elementPath) {
41472
- item.field.id = `${item.field.id}.${item.field.elementPath}`;
41473
- }
41482
+ item.field.id = FieldsUtils.buildFieldId(item.field.id, item.field.elementPath, item.dataType);
41474
41483
  item.field.label = item.label;
41475
41484
  if (formValueObject) {
41476
41485
  item.field.value = formValueObject[item.field.id];