@hmcts/ccd-case-ui-toolkit 7.3.54-exui-4309 → 7.3.54-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.
|
@@ -3985,6 +3985,7 @@ class WorkbasketInputModel {
|
|
|
3985
3985
|
label;
|
|
3986
3986
|
order;
|
|
3987
3987
|
field;
|
|
3988
|
+
dataType;
|
|
3988
3989
|
metadata;
|
|
3989
3990
|
display_context_parameter;
|
|
3990
3991
|
}
|
|
@@ -11398,7 +11399,6 @@ class CaseEditPageComponent {
|
|
|
11398
11399
|
}
|
|
11399
11400
|
ngOnInit() {
|
|
11400
11401
|
initDialog();
|
|
11401
|
-
this.clearValidationErrors();
|
|
11402
11402
|
this.eventTrigger = this.caseEdit.eventTrigger;
|
|
11403
11403
|
this.editForm = this.caseEdit.form;
|
|
11404
11404
|
this.wizard = this.caseEdit.wizard;
|
|
@@ -11454,7 +11454,6 @@ class CaseEditPageComponent {
|
|
|
11454
11454
|
this.dialogRefAfterClosedSub?.unsubscribe();
|
|
11455
11455
|
this.saveDraftSub?.unsubscribe();
|
|
11456
11456
|
this.caseFormValidationErrorsSub?.unsubscribe();
|
|
11457
|
-
this.clearValidationErrors();
|
|
11458
11457
|
this.multipageComponentStateService.reset();
|
|
11459
11458
|
}
|
|
11460
11459
|
applyValuesChanged(valuesChanged) {
|
|
@@ -11478,7 +11477,7 @@ class CaseEditPageComponent {
|
|
|
11478
11477
|
* EUI-3732 - Breathing space data not persisted on Previous button click with ExpUI Demo
|
|
11479
11478
|
*/
|
|
11480
11479
|
toPreviousPage() {
|
|
11481
|
-
this.
|
|
11480
|
+
this.caseEditDataService.clearFormValidationErrors();
|
|
11482
11481
|
const caseEventData = this.buildCaseEventData(true);
|
|
11483
11482
|
caseEventData.data = caseEventData.event_data;
|
|
11484
11483
|
this.updateFormData(caseEventData);
|
|
@@ -11651,7 +11650,7 @@ class CaseEditPageComponent {
|
|
|
11651
11650
|
this.editForm.controls['data'].removeControl('caseLinksFlag');
|
|
11652
11651
|
}
|
|
11653
11652
|
}
|
|
11654
|
-
this.
|
|
11653
|
+
this.caseEditDataService.clearFormValidationErrors();
|
|
11655
11654
|
this.checkForStagesCompleted();
|
|
11656
11655
|
if (this.currentPageIsNotValid()) {
|
|
11657
11656
|
// The generateErrorMessage method filters out the hidden fields.
|
|
@@ -11815,7 +11814,7 @@ class CaseEditPageComponent {
|
|
|
11815
11814
|
else {
|
|
11816
11815
|
this.caseEdit.cancelled.emit();
|
|
11817
11816
|
}
|
|
11818
|
-
this.
|
|
11817
|
+
this.caseEditDataService.clearFormValidationErrors();
|
|
11819
11818
|
this.multipageComponentStateService.reset();
|
|
11820
11819
|
}
|
|
11821
11820
|
resetLinkedCaseJourney() {
|
|
@@ -11883,7 +11882,6 @@ class CaseEditPageComponent {
|
|
|
11883
11882
|
console.log('handleError ', error);
|
|
11884
11883
|
}
|
|
11885
11884
|
resetErrors() {
|
|
11886
|
-
this.clearValidationErrors();
|
|
11887
11885
|
this.caseEdit.error = null;
|
|
11888
11886
|
this.caseEdit.ignoreWarning = false;
|
|
11889
11887
|
this.triggerText = this.getTriggerText();
|
|
@@ -11891,10 +11889,6 @@ class CaseEditPageComponent {
|
|
|
11891
11889
|
this.caseEdit.callbackErrorsSubject.next(null);
|
|
11892
11890
|
}
|
|
11893
11891
|
}
|
|
11894
|
-
clearValidationErrors() {
|
|
11895
|
-
this.validationErrors = [];
|
|
11896
|
-
this.caseEditDataService?.clearFormValidationErrors?.();
|
|
11897
|
-
}
|
|
11898
11892
|
saveDraft() {
|
|
11899
11893
|
if (this.eventTrigger.can_save_draft) {
|
|
11900
11894
|
const draftCaseEventData = this.formValueService.sanitise(this.editForm.value);
|
|
@@ -34503,9 +34497,7 @@ class WorkbasketFiltersComponent {
|
|
|
34503
34497
|
.sort(this.orderService.sortAsc);
|
|
34504
34498
|
const formValue = this.windowService.getLocalStorage(FORM_GROUP_VAL_LOC_STORAGE);
|
|
34505
34499
|
workbasketInputs.forEach(item => {
|
|
34506
|
-
|
|
34507
|
-
item.field.id = `${item.field.id}.${item.field.elementPath}`;
|
|
34508
|
-
}
|
|
34500
|
+
item.field.id = this.buildFieldId(item.field.id, item.field.elementPath, item.dataType);
|
|
34509
34501
|
item.field.label = item.label;
|
|
34510
34502
|
if (formValue) {
|
|
34511
34503
|
const searchFormValueObject = JSON.parse(formValue);
|
|
@@ -34654,6 +34646,16 @@ class WorkbasketFiltersComponent {
|
|
|
34654
34646
|
this.caseFields = this.workbasketInputs.map(item => FieldsUtils.convertToCaseField(item.field));
|
|
34655
34647
|
}
|
|
34656
34648
|
}
|
|
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
|
+
}
|
|
34657
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)); };
|
|
34658
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) {
|
|
34659
34661
|
i0.ɵɵelementStart(0, "form", 0)(1, "div", 1)(2, "fieldset", 2);
|
|
@@ -40068,12 +40070,14 @@ class SearchInput {
|
|
|
40068
40070
|
field;
|
|
40069
40071
|
metadata;
|
|
40070
40072
|
display_context_parameter;
|
|
40071
|
-
|
|
40073
|
+
dataType;
|
|
40074
|
+
constructor(label, order, field, metadata, display_context_parameter, dataType) {
|
|
40072
40075
|
this.label = label;
|
|
40073
40076
|
this.order = order;
|
|
40074
40077
|
this.field = field;
|
|
40075
40078
|
this.metadata = metadata;
|
|
40076
40079
|
this.display_context_parameter = display_context_parameter;
|
|
40080
|
+
this.dataType = dataType;
|
|
40077
40081
|
}
|
|
40078
40082
|
}
|
|
40079
40083
|
|
|
@@ -40271,9 +40275,7 @@ class SearchFiltersComponent {
|
|
|
40271
40275
|
formValueObject = JSON.parse(formValue);
|
|
40272
40276
|
}
|
|
40273
40277
|
searchInputs.forEach(item => {
|
|
40274
|
-
|
|
40275
|
-
item.field.id = `${item.field.id}.${item.field.elementPath}`;
|
|
40276
|
-
}
|
|
40278
|
+
item.field.id = this.buildFieldId(item.field.id, item.field.elementPath, item.dataType);
|
|
40277
40279
|
item.field.label = item.label;
|
|
40278
40280
|
if (formValueObject) {
|
|
40279
40281
|
item.field.value = formValueObject[item.field.id];
|
|
@@ -40335,6 +40337,16 @@ class SearchFiltersComponent {
|
|
|
40335
40337
|
this.caseFields = this.searchInputs.map(item => FieldsUtils.convertToCaseField(item.field));
|
|
40336
40338
|
}
|
|
40337
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
|
+
}
|
|
40338
40350
|
static ɵfac = function SearchFiltersComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SearchFiltersComponent)(i0.ɵɵdirectiveInject(SearchService), i0.ɵɵdirectiveInject(OrderService), i0.ɵɵdirectiveInject(JurisdictionService), i0.ɵɵdirectiveInject(WindowService)); };
|
|
40339
40351
|
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) {
|
|
40340
40352
|
i0.ɵɵelementStart(0, "h2", 0);
|