@hmcts/ccd-case-ui-toolkit 6.18.0-welsh-release → 6.18.0-welsh-release-v1
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.
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.js +31 -19
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.js.map +1 -1
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js +1 -1
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js.map +1 -1
- package/esm2015/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.js +24 -12
- package/esm2015/lib/shared/components/case-list/case-list.component.js +2 -2
- package/esm2015/lib/shared/components/palette/case-link/write-case-link-field.component.js +2 -2
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js +25 -13
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
- package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts +12 -3
- package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -9390,7 +9390,7 @@ class CaseEditPageComponent {
|
|
|
9390
9390
|
this.wizard = this.caseEdit.wizard;
|
|
9391
9391
|
this.caseFields = this.getCaseFields();
|
|
9392
9392
|
this.syncCaseEditDataService();
|
|
9393
|
-
this.route.params
|
|
9393
|
+
this.routeParamsSub = this.route.params
|
|
9394
9394
|
.subscribe(params => {
|
|
9395
9395
|
var _a, _b;
|
|
9396
9396
|
const pageId = params['page'];
|
|
@@ -9412,13 +9412,14 @@ class CaseEditPageComponent {
|
|
|
9412
9412
|
}
|
|
9413
9413
|
});
|
|
9414
9414
|
CaseEditPageComponent.setFocusToTop();
|
|
9415
|
-
this.caseEditDataService.caseEditForm$.subscribe({
|
|
9415
|
+
this.caseEditFormSub = this.caseEditDataService.caseEditForm$.subscribe({
|
|
9416
9416
|
next: editForm => this.editForm = editForm
|
|
9417
9417
|
});
|
|
9418
|
-
this.
|
|
9419
|
-
|
|
9420
|
-
|
|
9421
|
-
|
|
9418
|
+
this.caseIsLinkedCasesJourneyAtFinalStepSub =
|
|
9419
|
+
this.caseEditDataService.caseIsLinkedCasesJourneyAtFinalStep$.subscribe({
|
|
9420
|
+
next: isLinkedCasesJourneyAtFinalStep => this.isLinkedCasesJourneyAtFinalStep = isLinkedCasesJourneyAtFinalStep
|
|
9421
|
+
});
|
|
9422
|
+
this.caseTriggerSubmitEventSub = this.caseEditDataService.caseTriggerSubmitEvent$.subscribe({
|
|
9422
9423
|
next: state => {
|
|
9423
9424
|
if (state) {
|
|
9424
9425
|
this.caseEditDataService.setTriggerSubmitEvent(false);
|
|
@@ -9431,6 +9432,17 @@ class CaseEditPageComponent {
|
|
|
9431
9432
|
ngAfterViewChecked() {
|
|
9432
9433
|
this.cdRef.detectChanges();
|
|
9433
9434
|
}
|
|
9435
|
+
ngOnDestroy() {
|
|
9436
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
9437
|
+
(_a = this.routeParamsSub) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
9438
|
+
(_b = this.caseEditFormSub) === null || _b === void 0 ? void 0 : _b.unsubscribe();
|
|
9439
|
+
(_c = this.caseIsLinkedCasesJourneyAtFinalStepSub) === null || _c === void 0 ? void 0 : _c.unsubscribe();
|
|
9440
|
+
(_d = this.caseTriggerSubmitEventSub) === null || _d === void 0 ? void 0 : _d.unsubscribe();
|
|
9441
|
+
(_e = this.validateSub) === null || _e === void 0 ? void 0 : _e.unsubscribe();
|
|
9442
|
+
(_f = this.dialogRefAfterClosedSub) === null || _f === void 0 ? void 0 : _f.unsubscribe();
|
|
9443
|
+
(_g = this.saveDraftSub) === null || _g === void 0 ? void 0 : _g.unsubscribe();
|
|
9444
|
+
(_h = this.caseFormValidationErrorsSub) === null || _h === void 0 ? void 0 : _h.unsubscribe();
|
|
9445
|
+
}
|
|
9434
9446
|
applyValuesChanged(valuesChanged) {
|
|
9435
9447
|
this.formValuesChanged = valuesChanged;
|
|
9436
9448
|
}
|
|
@@ -9504,7 +9516,7 @@ class CaseEditPageComponent {
|
|
|
9504
9516
|
this.generateErrorMessage(casefield.field_type.collection_field_type.complex_fields, c.get('value'), id);
|
|
9505
9517
|
});
|
|
9506
9518
|
}
|
|
9507
|
-
else if (FieldsUtils.
|
|
9519
|
+
else if (FieldsUtils.isCaseFieldOfType(casefield, ['FlagLauncher'])) {
|
|
9508
9520
|
// Check whether the case field DisplayContextParameter is signalling "create" mode or "update" mode
|
|
9509
9521
|
// (expected always to be one of the two), to set the correct error message
|
|
9510
9522
|
let action = '';
|
|
@@ -9558,7 +9570,7 @@ class CaseEditPageComponent {
|
|
|
9558
9570
|
this.caseEdit.error = null;
|
|
9559
9571
|
const caseEventData = this.buildCaseEventData();
|
|
9560
9572
|
const loadingSpinnerToken = this.loadingService.register();
|
|
9561
|
-
this.caseEdit.validate(caseEventData, this.currentPage.id)
|
|
9573
|
+
this.validateSub = this.caseEdit.validate(caseEventData, this.currentPage.id)
|
|
9562
9574
|
.pipe(finalize(() => {
|
|
9563
9575
|
this.loadingService.unregister(loadingSpinnerToken);
|
|
9564
9576
|
}))
|
|
@@ -9658,7 +9670,7 @@ class CaseEditPageComponent {
|
|
|
9658
9670
|
if (this.eventTrigger.can_save_draft) {
|
|
9659
9671
|
if (this.formValuesChanged) {
|
|
9660
9672
|
const dialogRef = this.dialog.open(SaveOrDiscardDialogComponent, this.dialogConfig);
|
|
9661
|
-
dialogRef.afterClosed().subscribe(result => {
|
|
9673
|
+
this.dialogRefAfterClosedSub = dialogRef.afterClosed().subscribe(result => {
|
|
9662
9674
|
if (result === 'Discard') {
|
|
9663
9675
|
this.discard();
|
|
9664
9676
|
}
|
|
@@ -9744,7 +9756,7 @@ class CaseEditPageComponent {
|
|
|
9744
9756
|
const draftCaseEventData = this.formValueService.sanitise(this.editForm.value);
|
|
9745
9757
|
draftCaseEventData.event_token = this.eventTrigger.event_token;
|
|
9746
9758
|
draftCaseEventData.ignore_warning = this.caseEdit.ignoreWarning;
|
|
9747
|
-
this.caseEdit.saveDraft(draftCaseEventData).subscribe((draft) => this.eventTrigger.case_id = DRAFT_PREFIX + draft.id, error => this.handleError(error));
|
|
9759
|
+
this.saveDraftSub = this.caseEdit.saveDraft(draftCaseEventData).subscribe((draft) => this.eventTrigger.case_id = DRAFT_PREFIX + draft.id, error => this.handleError(error));
|
|
9748
9760
|
}
|
|
9749
9761
|
}
|
|
9750
9762
|
getCaseFields() {
|
|
@@ -9807,7 +9819,7 @@ class CaseEditPageComponent {
|
|
|
9807
9819
|
this.caseEditDataService.setCaseEventTriggerName(this.eventTrigger.name);
|
|
9808
9820
|
this.caseEditDataService.setCaseTitle(this.getCaseTitle());
|
|
9809
9821
|
this.caseEditDataService.setCaseEditForm(this.editForm);
|
|
9810
|
-
this.caseEditDataService.caseFormValidationErrors$.subscribe({
|
|
9822
|
+
this.caseFormValidationErrorsSub = this.caseEditDataService.caseFormValidationErrors$.subscribe({
|
|
9811
9823
|
next: (validationErrors) => this.validationErrors = validationErrors
|
|
9812
9824
|
});
|
|
9813
9825
|
}
|
|
@@ -11809,7 +11821,7 @@ function WriteCaseLinkFieldComponent_span_2_Template(rf, ctx) { if (rf & 1) {
|
|
|
11809
11821
|
} if (rf & 2) {
|
|
11810
11822
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
11811
11823
|
i0.ɵɵadvance(1);
|
|
11812
|
-
i0.ɵɵ
|
|
11824
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, i0.ɵɵpipeBind1(3, 3, ctx_r0.caseField)));
|
|
11813
11825
|
} }
|
|
11814
11826
|
function WriteCaseLinkFieldComponent_span_3_Template(rf, ctx) { if (rf & 1) {
|
|
11815
11827
|
i0.ɵɵelementStart(0, "span", 7);
|
|
@@ -28002,7 +28014,7 @@ function CaseListComponent_th_7_Template(rf, ctx) { if (rf & 1) {
|
|
|
28002
28014
|
} if (rf & 2) {
|
|
28003
28015
|
const h_r6 = ctx.$implicit;
|
|
28004
28016
|
i0.ɵɵadvance(1);
|
|
28005
|
-
i0.ɵɵ
|
|
28017
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, h_r6.header));
|
|
28006
28018
|
} }
|
|
28007
28019
|
function CaseListComponent_ng_container_9_th_2_Template(rf, ctx) { if (rf & 1) {
|
|
28008
28020
|
const _r12 = i0.ɵɵgetCurrentView();
|