@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
|
@@ -10867,7 +10867,7 @@
|
|
|
10867
10867
|
this.wizard = this.caseEdit.wizard;
|
|
10868
10868
|
this.caseFields = this.getCaseFields();
|
|
10869
10869
|
this.syncCaseEditDataService();
|
|
10870
|
-
this.route.params
|
|
10870
|
+
this.routeParamsSub = this.route.params
|
|
10871
10871
|
.subscribe(function (params) {
|
|
10872
10872
|
var _a, _b;
|
|
10873
10873
|
var pageId = params['page'];
|
|
@@ -10889,13 +10889,14 @@
|
|
|
10889
10889
|
}
|
|
10890
10890
|
});
|
|
10891
10891
|
CaseEditPageComponent.setFocusToTop();
|
|
10892
|
-
this.caseEditDataService.caseEditForm$.subscribe({
|
|
10892
|
+
this.caseEditFormSub = this.caseEditDataService.caseEditForm$.subscribe({
|
|
10893
10893
|
next: function (editForm) { return _this.editForm = editForm; }
|
|
10894
10894
|
});
|
|
10895
|
-
this.
|
|
10896
|
-
|
|
10897
|
-
|
|
10898
|
-
|
|
10895
|
+
this.caseIsLinkedCasesJourneyAtFinalStepSub =
|
|
10896
|
+
this.caseEditDataService.caseIsLinkedCasesJourneyAtFinalStep$.subscribe({
|
|
10897
|
+
next: function (isLinkedCasesJourneyAtFinalStep) { return _this.isLinkedCasesJourneyAtFinalStep = isLinkedCasesJourneyAtFinalStep; }
|
|
10898
|
+
});
|
|
10899
|
+
this.caseTriggerSubmitEventSub = this.caseEditDataService.caseTriggerSubmitEvent$.subscribe({
|
|
10899
10900
|
next: function (state) {
|
|
10900
10901
|
if (state) {
|
|
10901
10902
|
_this.caseEditDataService.setTriggerSubmitEvent(false);
|
|
@@ -10908,6 +10909,17 @@
|
|
|
10908
10909
|
CaseEditPageComponent.prototype.ngAfterViewChecked = function () {
|
|
10909
10910
|
this.cdRef.detectChanges();
|
|
10910
10911
|
};
|
|
10912
|
+
CaseEditPageComponent.prototype.ngOnDestroy = function () {
|
|
10913
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
10914
|
+
(_a = this.routeParamsSub) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
10915
|
+
(_b = this.caseEditFormSub) === null || _b === void 0 ? void 0 : _b.unsubscribe();
|
|
10916
|
+
(_c = this.caseIsLinkedCasesJourneyAtFinalStepSub) === null || _c === void 0 ? void 0 : _c.unsubscribe();
|
|
10917
|
+
(_d = this.caseTriggerSubmitEventSub) === null || _d === void 0 ? void 0 : _d.unsubscribe();
|
|
10918
|
+
(_e = this.validateSub) === null || _e === void 0 ? void 0 : _e.unsubscribe();
|
|
10919
|
+
(_f = this.dialogRefAfterClosedSub) === null || _f === void 0 ? void 0 : _f.unsubscribe();
|
|
10920
|
+
(_g = this.saveDraftSub) === null || _g === void 0 ? void 0 : _g.unsubscribe();
|
|
10921
|
+
(_h = this.caseFormValidationErrorsSub) === null || _h === void 0 ? void 0 : _h.unsubscribe();
|
|
10922
|
+
};
|
|
10911
10923
|
CaseEditPageComponent.prototype.applyValuesChanged = function (valuesChanged) {
|
|
10912
10924
|
this.formValuesChanged = valuesChanged;
|
|
10913
10925
|
};
|
|
@@ -10982,7 +10994,7 @@
|
|
|
10982
10994
|
_this.generateErrorMessage(casefield.field_type.collection_field_type.complex_fields, c.get('value'), id_1);
|
|
10983
10995
|
});
|
|
10984
10996
|
}
|
|
10985
|
-
else if (FieldsUtils.
|
|
10997
|
+
else if (FieldsUtils.isCaseFieldOfType(casefield, ['FlagLauncher'])) {
|
|
10986
10998
|
// Check whether the case field DisplayContextParameter is signalling "create" mode or "update" mode
|
|
10987
10999
|
// (expected always to be one of the two), to set the correct error message
|
|
10988
11000
|
var action = '';
|
|
@@ -11037,7 +11049,7 @@
|
|
|
11037
11049
|
this.caseEdit.error = null;
|
|
11038
11050
|
var caseEventData = this.buildCaseEventData();
|
|
11039
11051
|
var loadingSpinnerToken_1 = this.loadingService.register();
|
|
11040
|
-
this.caseEdit.validate(caseEventData, this.currentPage.id)
|
|
11052
|
+
this.validateSub = this.caseEdit.validate(caseEventData, this.currentPage.id)
|
|
11041
11053
|
.pipe(operators.finalize(function () {
|
|
11042
11054
|
_this.loadingService.unregister(loadingSpinnerToken_1);
|
|
11043
11055
|
}))
|
|
@@ -11056,10 +11068,10 @@
|
|
|
11056
11068
|
CaseEditPageComponent.setFocusToTop();
|
|
11057
11069
|
};
|
|
11058
11070
|
CaseEditPageComponent.prototype.updateFormData = function (jsonData) {
|
|
11059
|
-
var e_1,
|
|
11071
|
+
var e_1, _j;
|
|
11060
11072
|
try {
|
|
11061
|
-
for (var
|
|
11062
|
-
var caseFieldId =
|
|
11073
|
+
for (var _k = __values(Object.keys(jsonData.data)), _l = _k.next(); !_l.done; _l = _k.next()) {
|
|
11074
|
+
var caseFieldId = _l.value;
|
|
11063
11075
|
/* istanbul ignore else */
|
|
11064
11076
|
if (this.pageWithFieldExists(caseFieldId)) {
|
|
11065
11077
|
this.updateEventTriggerCaseFields(caseFieldId, jsonData, this.caseEdit.eventTrigger);
|
|
@@ -11070,7 +11082,7 @@
|
|
|
11070
11082
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
11071
11083
|
finally {
|
|
11072
11084
|
try {
|
|
11073
|
-
if (
|
|
11085
|
+
if (_l && !_l.done && (_j = _k.return)) _j.call(_k);
|
|
11074
11086
|
}
|
|
11075
11087
|
finally { if (e_1) throw e_1.error; }
|
|
11076
11088
|
}
|
|
@@ -11099,12 +11111,12 @@
|
|
|
11099
11111
|
CaseEditPageComponent.prototype.updateJsonDataObject = function (caseFieldId, jsonData, element) {
|
|
11100
11112
|
var _this = this;
|
|
11101
11113
|
return Object.keys(jsonData.data[caseFieldId]).reduce(function (acc, key) {
|
|
11102
|
-
var
|
|
11114
|
+
var _j;
|
|
11103
11115
|
var elementValue = element.value[key];
|
|
11104
11116
|
var jsonDataValue = jsonData.data[caseFieldId][key];
|
|
11105
11117
|
var hasElementGotValueProperty = _this.isAnObject(elementValue) && elementValue.value !== undefined;
|
|
11106
11118
|
var jsonDataOrElementValue = (jsonDataValue === null || jsonDataValue === void 0 ? void 0 : jsonDataValue.value) !== null && (jsonDataValue === null || jsonDataValue === void 0 ? void 0 : jsonDataValue.value) !== undefined ? jsonDataValue : elementValue;
|
|
11107
|
-
return Object.assign(Object.assign({}, acc), (
|
|
11119
|
+
return Object.assign(Object.assign({}, acc), (_j = {}, _j["" + key] = hasElementGotValueProperty ? jsonDataOrElementValue : jsonDataValue, _j));
|
|
11108
11120
|
}, {});
|
|
11109
11121
|
};
|
|
11110
11122
|
CaseEditPageComponent.prototype.isAnObject = function (property) {
|
|
@@ -11152,7 +11164,7 @@
|
|
|
11152
11164
|
if (this.eventTrigger.can_save_draft) {
|
|
11153
11165
|
if (this.formValuesChanged) {
|
|
11154
11166
|
var dialogRef = this.dialog.open(SaveOrDiscardDialogComponent, this.dialogConfig);
|
|
11155
|
-
dialogRef.afterClosed().subscribe(function (result) {
|
|
11167
|
+
this.dialogRefAfterClosedSub = dialogRef.afterClosed().subscribe(function (result) {
|
|
11156
11168
|
if (result === 'Discard') {
|
|
11157
11169
|
_this.discard();
|
|
11158
11170
|
}
|
|
@@ -11239,7 +11251,7 @@
|
|
|
11239
11251
|
var draftCaseEventData = this.formValueService.sanitise(this.editForm.value);
|
|
11240
11252
|
draftCaseEventData.event_token = this.eventTrigger.event_token;
|
|
11241
11253
|
draftCaseEventData.ignore_warning = this.caseEdit.ignoreWarning;
|
|
11242
|
-
this.caseEdit.saveDraft(draftCaseEventData).subscribe(function (draft) { return _this.eventTrigger.case_id = DRAFT_PREFIX + draft.id; }, function (error) { return _this.handleError(error); });
|
|
11254
|
+
this.saveDraftSub = this.caseEdit.saveDraft(draftCaseEventData).subscribe(function (draft) { return _this.eventTrigger.case_id = DRAFT_PREFIX + draft.id; }, function (error) { return _this.handleError(error); });
|
|
11243
11255
|
}
|
|
11244
11256
|
};
|
|
11245
11257
|
CaseEditPageComponent.prototype.getCaseFields = function () {
|
|
@@ -11307,7 +11319,7 @@
|
|
|
11307
11319
|
this.caseEditDataService.setCaseEventTriggerName(this.eventTrigger.name);
|
|
11308
11320
|
this.caseEditDataService.setCaseTitle(this.getCaseTitle());
|
|
11309
11321
|
this.caseEditDataService.setCaseEditForm(this.editForm);
|
|
11310
|
-
this.caseEditDataService.caseFormValidationErrors$.subscribe({
|
|
11322
|
+
this.caseFormValidationErrorsSub = this.caseEditDataService.caseFormValidationErrors$.subscribe({
|
|
11311
11323
|
next: function (validationErrors) { return _this.validationErrors = validationErrors; }
|
|
11312
11324
|
});
|
|
11313
11325
|
};
|
|
@@ -13252,7 +13264,7 @@
|
|
|
13252
13264
|
if (rf & 2) {
|
|
13253
13265
|
var ctx_r0 = i0__namespace.ɵɵnextContext();
|
|
13254
13266
|
i0__namespace.ɵɵadvance(1);
|
|
13255
|
-
i0__namespace.ɵɵ
|
|
13267
|
+
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, i0__namespace.ɵɵpipeBind1(3, 3, ctx_r0.caseField)));
|
|
13256
13268
|
}
|
|
13257
13269
|
}
|
|
13258
13270
|
function WriteCaseLinkFieldComponent_span_3_Template(rf, ctx) {
|
|
@@ -32087,7 +32099,7 @@
|
|
|
32087
32099
|
if (rf & 2) {
|
|
32088
32100
|
var h_r6 = ctx.$implicit;
|
|
32089
32101
|
i0__namespace.ɵɵadvance(1);
|
|
32090
|
-
i0__namespace.ɵɵ
|
|
32102
|
+
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, h_r6.header));
|
|
32091
32103
|
}
|
|
32092
32104
|
}
|
|
32093
32105
|
function CaseListComponent_ng_container_9_th_2_Template(rf, ctx) {
|