@hmcts/ccd-case-ui-toolkit 7.3.54-exui-2837 → 7.3.54-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.
@@ -4034,6 +4034,16 @@ class FieldsUtils {
4034
4034
  }
4035
4035
  return obj;
4036
4036
  }
4037
+ static buildFieldId(fieldId, elementPath, dataType) {
4038
+ if (!fieldId || !elementPath) {
4039
+ return fieldId;
4040
+ }
4041
+ const normalizedType = typeof dataType === 'string' ? dataType.toLowerCase() : '';
4042
+ if (normalizedType === 'collection') {
4043
+ return `${fieldId}.value.${elementPath}`;
4044
+ }
4045
+ return `${fieldId}.${elementPath}`;
4046
+ }
4037
4047
  static toValuesMap(caseFields) {
4038
4048
  const valueMap = {};
4039
4049
  caseFields.forEach(field => {
@@ -34497,7 +34507,7 @@ class WorkbasketFiltersComponent {
34497
34507
  .sort(this.orderService.sortAsc);
34498
34508
  const formValue = this.windowService.getLocalStorage(FORM_GROUP_VAL_LOC_STORAGE);
34499
34509
  workbasketInputs.forEach(item => {
34500
- item.field.id = this.buildFieldId(item.field.id, item.field.elementPath, item.dataType);
34510
+ item.field.id = FieldsUtils.buildFieldId(item.field.id, item.field.elementPath, item.dataType);
34501
34511
  item.field.label = item.label;
34502
34512
  if (formValue) {
34503
34513
  const searchFormValueObject = JSON.parse(formValue);
@@ -34646,16 +34656,6 @@ class WorkbasketFiltersComponent {
34646
34656
  this.caseFields = this.workbasketInputs.map(item => FieldsUtils.convertToCaseField(item.field));
34647
34657
  }
34648
34658
  }
34649
- buildFieldId(fieldId, elementPath, dataType) {
34650
- if (!fieldId || !elementPath) {
34651
- return fieldId;
34652
- }
34653
- const normalizedType = typeof dataType === 'string' ? dataType.toLowerCase() : '';
34654
- if (normalizedType === 'collection') {
34655
- return `${fieldId}.value.${elementPath}`;
34656
- }
34657
- return `${fieldId}.${elementPath}`;
34658
- }
34659
34659
  static ɵfac = function WorkbasketFiltersComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || WorkbasketFiltersComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(WorkbasketInputFilterService), i0.ɵɵdirectiveInject(OrderService), i0.ɵɵdirectiveInject(JurisdictionService), i0.ɵɵdirectiveInject(AlertService), i0.ɵɵdirectiveInject(WindowService)); };
34660
34660
  static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WorkbasketFiltersComponent, selectors: [["ccd-workbasket-filters"]], inputs: { jurisdictions: "jurisdictions", defaults: "defaults" }, outputs: { onApply: "onApply", onReset: "onReset" }, standalone: false, decls: 45, vars: 55, consts: [["id", "filters", 1, "global-display"], [1, "form-group", "flex"], ["aria-label", "Filters", 1, "heading-h2"], ["type", "button", 1, "button", "workbasket-filters-apply", 3, "click", "disabled", "title"], ["type", "button", 1, "button", "button-secondary", 3, "click", "title"], [1, "form-group"], ["for", "wb-jurisdiction", 1, "form-label"], ["id", "wb-jurisdiction", "name", "jurisdiction", "aria-controls", "search-result", 1, "form-control", "form-control-3-4", "ccd-dropdown", 3, "ngModelChange", "change", "ngModel"], [3, "ngValue", 4, "ngIf"], [3, "ngValue", 4, "ngFor", "ngForOf"], ["for", "wb-case-type", 1, "form-label"], ["id", "wb-case-type", "name", "case-type", "aria-controls", "search-result", 1, "form-control", "form-control-3-4", "ccd-dropdown", 3, "ngModelChange", "change", "ngModel", "disabled"], ["for", "wb-case-state", 1, "form-label"], ["id", "wb-case-state", "name", "state", "aria-controls", "search-result", 1, "form-control", "form-control-3-4", "ccd-dropdown", 3, "ngModelChange", "ngModel", "disabled"], [3, "ngValue"], ["ccdConditionalShowForm", "", 3, "formGroup", "contextFields", 4, "ngIf"], ["type", "button", 1, "button", 3, "click", "title"], ["ccdConditionalShowForm", "", 3, "formGroup", "contextFields"], ["id", "dynamicFilters"], ["class", "form-group", 4, "ngFor", "ngForOf"], [3, "keyup.enter", "caseField", "formGroup", "isExpanded", "isInSearchBlock"]], template: function WorkbasketFiltersComponent_Template(rf, ctx) { if (rf & 1) {
34661
34661
  i0.ɵɵelementStart(0, "form", 0)(1, "div", 1)(2, "fieldset", 2);
@@ -40275,7 +40275,7 @@ class SearchFiltersComponent {
40275
40275
  formValueObject = JSON.parse(formValue);
40276
40276
  }
40277
40277
  searchInputs.forEach(item => {
40278
- item.field.id = this.buildFieldId(item.field.id, item.field.elementPath, item.dataType);
40278
+ item.field.id = FieldsUtils.buildFieldId(item.field.id, item.field.elementPath, item.dataType);
40279
40279
  item.field.label = item.label;
40280
40280
  if (formValueObject) {
40281
40281
  item.field.value = formValueObject[item.field.id];
@@ -40337,16 +40337,6 @@ class SearchFiltersComponent {
40337
40337
  this.caseFields = this.searchInputs.map(item => FieldsUtils.convertToCaseField(item.field));
40338
40338
  }
40339
40339
  }
40340
- buildFieldId(fieldId, elementPath, dataType) {
40341
- if (!fieldId || !elementPath) {
40342
- return fieldId;
40343
- }
40344
- const normalizedType = typeof dataType === 'string' ? dataType.toLowerCase() : '';
40345
- if (normalizedType === 'collection') {
40346
- return `${fieldId}.value.${elementPath}`;
40347
- }
40348
- return `${fieldId}.${elementPath}`;
40349
- }
40350
40340
  static ɵfac = function SearchFiltersComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SearchFiltersComponent)(i0.ɵɵdirectiveInject(SearchService), i0.ɵɵdirectiveInject(OrderService), i0.ɵɵdirectiveInject(JurisdictionService), i0.ɵɵdirectiveInject(WindowService)); };
40351
40341
  static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SearchFiltersComponent, selectors: [["ccd-search-filters"]], inputs: { jurisdictions: "jurisdictions", autoApply: "autoApply" }, outputs: { onApply: "onApply", onReset: "onReset", onJurisdiction: "onJurisdiction" }, standalone: false, decls: 28, vars: 34, consts: [["aria-label", "Filters", 1, "heading-h2"], [1, "global-display"], [1, "form-group", 2, "margin-top", "13px"], ["for", "s-jurisdiction", 1, "form-label"], ["id", "s-jurisdiction", "name", "jurisdiction", "aria-controls", "search-result", 1, "form-control", "form-control-3-4", "ccd-dropdown", 3, "ngModelChange", "change", "ngModel"], [3, "ngValue", 4, "ngFor", "ngForOf"], [1, "form-group"], ["for", "s-case-type", 1, "form-label"], ["id", "s-case-type", "name", "case-type", "aria-controls", "search-result", 1, "form-control", "form-control-3-4", "ccd-dropdown", 3, "ngModelChange", "change", "disabled", "ngModel"], ["ccdConditionalShowForm", "", 3, "formGroup", "contextFields", 4, "ngIf"], ["type", "button", 1, "button", 3, "click", "keyup.enter", "disabled", "title"], ["id", "reset", "type", "button", 1, "button", "button-secondary", 3, "click", "title"], [3, "ngValue"], ["ccdConditionalShowForm", "", 3, "formGroup", "contextFields"], ["id", "dynamicFilters"], ["class", "form-group", 4, "ngFor", "ngForOf"], [3, "keyup.enter", "caseField", "formGroup", "isExpanded"]], template: function SearchFiltersComponent_Template(rf, ctx) { if (rf & 1) {
40352
40342
  i0.ɵɵelementStart(0, "h2", 0);