@hmcts/ccd-case-ui-toolkit 5.0.38-case-flags-table-alignment → 5.0.40-case-edit-module-for-integration
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 +105 -28
- 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/commons/case-edit-data/case-edit-data.module.js +19 -0
- package/esm2015/lib/shared/commons/case-edit-data/case-edit-data.service.js +34 -0
- package/esm2015/lib/shared/commons/case-edit-data/case-edit-validation.model.js +2 -0
- package/esm2015/lib/shared/commons/case-edit-data/index.js +4 -0
- package/esm2015/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.js +23 -11
- package/esm2015/lib/shared/components/case-editor/case-editor.module.js +7 -1
- package/esm2015/lib/shared/components/palette/case-link/components/write-linked-cases.component.js +19 -15
- package/esm2015/lib/shared/components/palette/case-link/write-case-link-field.component.js +4 -7
- package/esm2015/lib/shared/components/palette/palette.module.js +5 -1
- package/esm2015/lib/shared/index.js +2 -1
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js +97 -29
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
- package/lib/shared/commons/case-edit-data/case-edit-data.module.d.ts +9 -0
- package/lib/shared/commons/case-edit-data/case-edit-data.module.d.ts.map +1 -0
- package/lib/shared/commons/case-edit-data/case-edit-data.service.d.ts +20 -0
- package/lib/shared/commons/case-edit-data/case-edit-data.service.d.ts.map +1 -0
- package/lib/shared/commons/case-edit-data/case-edit-validation.model.d.ts +5 -0
- package/lib/shared/commons/case-edit-data/case-edit-validation.model.d.ts.map +1 -0
- package/lib/shared/commons/case-edit-data/index.d.ts +4 -0
- package/lib/shared/commons/case-edit-data/index.d.ts.map +1 -0
- package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts +4 -1
- package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts.map +1 -1
- package/lib/shared/components/case-editor/case-editor.module.d.ts +10 -9
- package/lib/shared/components/case-editor/case-editor.module.d.ts.map +1 -1
- package/lib/shared/components/palette/case-link/components/write-linked-cases.component.d.ts +4 -4
- package/lib/shared/components/palette/case-link/components/write-linked-cases.component.d.ts.map +1 -1
- package/lib/shared/components/palette/case-link/write-case-link-field.component.d.ts +1 -3
- package/lib/shared/components/palette/case-link/write-case-link-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/palette.module.d.ts +24 -23
- package/lib/shared/components/palette/palette.module.d.ts.map +1 -1
- package/lib/shared/index.d.ts +1 -0
- package/lib/shared/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -9833,6 +9833,61 @@
|
|
|
9833
9833
|
return dialogConfig;
|
|
9834
9834
|
}
|
|
9835
9835
|
|
|
9836
|
+
var CaseEditDataService = /** @class */ (function () {
|
|
9837
|
+
function CaseEditDataService() {
|
|
9838
|
+
this.title$ = new rxjs.BehaviorSubject(null);
|
|
9839
|
+
this.formValidationErrors$ = new rxjs.BehaviorSubject([]);
|
|
9840
|
+
this.linkError$ = new rxjs.BehaviorSubject(null);
|
|
9841
|
+
this.eventTriggerName$ = new rxjs.BehaviorSubject(null);
|
|
9842
|
+
this.caseFormValidationErrors$ = this.formValidationErrors$.asObservable();
|
|
9843
|
+
this.caseLinkError$ = this.linkError$.asObservable();
|
|
9844
|
+
this.caseEventTriggerName$ = this.eventTriggerName$.asObservable();
|
|
9845
|
+
}
|
|
9846
|
+
CaseEditDataService.prototype.setCaseTitle = function (caseTitle) {
|
|
9847
|
+
this.title$.next(caseTitle);
|
|
9848
|
+
};
|
|
9849
|
+
CaseEditDataService.prototype.setCaseEventTriggerName = function (triggerName) {
|
|
9850
|
+
this.eventTriggerName$.next(triggerName);
|
|
9851
|
+
};
|
|
9852
|
+
CaseEditDataService.prototype.setCaseLinkError = function (error) {
|
|
9853
|
+
this.linkError$.next(error);
|
|
9854
|
+
};
|
|
9855
|
+
CaseEditDataService.prototype.setFormValidationErrors = function (validationErrors) {
|
|
9856
|
+
this.formValidationErrors$.next(validationErrors);
|
|
9857
|
+
};
|
|
9858
|
+
CaseEditDataService.prototype.clearFormValidationErrors = function () {
|
|
9859
|
+
this.formValidationErrors$.next([]);
|
|
9860
|
+
};
|
|
9861
|
+
CaseEditDataService.prototype.clearCaseLinkError = function () {
|
|
9862
|
+
this.linkError$.next(null);
|
|
9863
|
+
};
|
|
9864
|
+
CaseEditDataService.prototype.addFormValidationError = function (validationError) {
|
|
9865
|
+
this.formValidationErrors$.next(this.formValidationErrors$.getValue().concat([validationError]));
|
|
9866
|
+
};
|
|
9867
|
+
return CaseEditDataService;
|
|
9868
|
+
}());
|
|
9869
|
+
|
|
9870
|
+
var CaseEditDataModule = /** @class */ (function () {
|
|
9871
|
+
function CaseEditDataModule() {
|
|
9872
|
+
}
|
|
9873
|
+
CaseEditDataModule.forRoot = function () {
|
|
9874
|
+
return {
|
|
9875
|
+
ngModule: CaseEditDataModule,
|
|
9876
|
+
providers: [CaseEditDataService],
|
|
9877
|
+
};
|
|
9878
|
+
};
|
|
9879
|
+
return CaseEditDataModule;
|
|
9880
|
+
}());
|
|
9881
|
+
CaseEditDataModule.ɵfac = function CaseEditDataModule_Factory(t) { return new (t || CaseEditDataModule)(); };
|
|
9882
|
+
CaseEditDataModule.ɵmod = i0__namespace.ɵɵdefineNgModule({ type: CaseEditDataModule });
|
|
9883
|
+
CaseEditDataModule.ɵinj = i0__namespace.ɵɵdefineInjector({});
|
|
9884
|
+
(function () {
|
|
9885
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CaseEditDataModule, [{
|
|
9886
|
+
type: i0.NgModule,
|
|
9887
|
+
args: [{}]
|
|
9888
|
+
}], null, null);
|
|
9889
|
+
})();
|
|
9890
|
+
|
|
9836
9891
|
function CaseEditPageComponent_ccd_loading_spinner_0_Template(rf, ctx) {
|
|
9837
9892
|
if (rf & 1) {
|
|
9838
9893
|
i0__namespace.ɵɵelement(0, "ccd-loading-spinner");
|
|
@@ -10097,7 +10152,7 @@
|
|
|
10097
10152
|
}
|
|
10098
10153
|
}
|
|
10099
10154
|
var CaseEditPageComponent = /** @class */ (function () {
|
|
10100
|
-
function CaseEditPageComponent(caseEdit, route, formValueService, formErrorService, cdRef, pageValidationService, dialog, caseFieldService) {
|
|
10155
|
+
function CaseEditPageComponent(caseEdit, route, formValueService, formErrorService, cdRef, pageValidationService, dialog, caseFieldService, caseEditDataService) {
|
|
10101
10156
|
this.caseEdit = caseEdit;
|
|
10102
10157
|
this.route = route;
|
|
10103
10158
|
this.formValueService = formValueService;
|
|
@@ -10106,6 +10161,7 @@
|
|
|
10106
10161
|
this.pageValidationService = pageValidationService;
|
|
10107
10162
|
this.dialog = dialog;
|
|
10108
10163
|
this.caseFieldService = caseFieldService;
|
|
10164
|
+
this.caseEditDataService = caseEditDataService;
|
|
10109
10165
|
this.callbackErrorsSubject = new rxjs.Subject();
|
|
10110
10166
|
this.ignoreWarning = false;
|
|
10111
10167
|
this.triggerTextStart = CaseEditPageComponent.TRIGGER_TEXT_START;
|
|
@@ -10133,6 +10189,7 @@
|
|
|
10133
10189
|
this.wizard = this.caseEdit.wizard;
|
|
10134
10190
|
this.caseFields = this.getCaseFields();
|
|
10135
10191
|
this.triggerText = this.getTriggerText();
|
|
10192
|
+
this.syncCaseEditDataService();
|
|
10136
10193
|
this.route.params
|
|
10137
10194
|
.subscribe(function (params) {
|
|
10138
10195
|
var pageId = params['page'];
|
|
@@ -10172,7 +10229,7 @@
|
|
|
10172
10229
|
* EUI-3732 - Breathing space data not persisted on Previous button click with ExpUI Demo
|
|
10173
10230
|
*/
|
|
10174
10231
|
CaseEditPageComponent.prototype.toPreviousPage = function () {
|
|
10175
|
-
this.
|
|
10232
|
+
this.caseEditDataService.clearFormValidationErrors();
|
|
10176
10233
|
var caseEventData = this.buildCaseEventData(true);
|
|
10177
10234
|
caseEventData.data = caseEventData.event_data;
|
|
10178
10235
|
this.updateFormData(caseEventData);
|
|
@@ -10199,19 +10256,19 @@
|
|
|
10199
10256
|
}
|
|
10200
10257
|
}
|
|
10201
10258
|
if (fieldElement.hasError('required')) {
|
|
10202
|
-
_this.
|
|
10259
|
+
_this.caseEditDataService.addFormValidationError({ id: id_1, message: label + " is required" });
|
|
10203
10260
|
fieldElement.markAsDirty();
|
|
10204
10261
|
}
|
|
10205
10262
|
else if (fieldElement.hasError('pattern')) {
|
|
10206
|
-
_this.
|
|
10263
|
+
_this.caseEditDataService.addFormValidationError({ id: id_1, message: label + " is not valid" });
|
|
10207
10264
|
fieldElement.markAsDirty();
|
|
10208
10265
|
}
|
|
10209
10266
|
else if (fieldElement.hasError('minlength')) {
|
|
10210
|
-
_this.
|
|
10267
|
+
_this.caseEditDataService.addFormValidationError({ id: id_1, message: label + " is below the minimum length" });
|
|
10211
10268
|
fieldElement.markAsDirty();
|
|
10212
10269
|
}
|
|
10213
10270
|
else if (fieldElement.hasError('maxlength')) {
|
|
10214
|
-
_this.
|
|
10271
|
+
_this.caseEditDataService.addFormValidationError({ id: id_1, message: label + " exceeds the maximum length" });
|
|
10215
10272
|
fieldElement.markAsDirty();
|
|
10216
10273
|
}
|
|
10217
10274
|
else if (_this.caseLinkError && FieldsUtils.isLinkedCasesCaseField(casefield)) {
|
|
@@ -10223,7 +10280,8 @@
|
|
|
10223
10280
|
}
|
|
10224
10281
|
else if (casefield.isCollection() && casefield.field_type.collection_field_type.type === 'Complex') {
|
|
10225
10282
|
if (_this.caseLinkError && FieldsUtils.isLinkedCasesCaseField(casefield)) {
|
|
10226
|
-
_this.
|
|
10283
|
+
_this.caseEditDataService.addFormValidationError({ id: _this.caseLinkError.componentId, message: _this.caseLinkError.errorMessage });
|
|
10284
|
+
// this.validationErrors.push({ id: this.caseLinkError.componentId, message: this.caseLinkError.errorMessage });
|
|
10227
10285
|
}
|
|
10228
10286
|
else {
|
|
10229
10287
|
var fieldArray = fieldElement;
|
|
@@ -10270,7 +10328,7 @@
|
|
|
10270
10328
|
};
|
|
10271
10329
|
CaseEditPageComponent.prototype.submit = function () {
|
|
10272
10330
|
var _this = this;
|
|
10273
|
-
this.
|
|
10331
|
+
this.caseEditDataService.clearFormValidationErrors();
|
|
10274
10332
|
if (this.currentPageIsNotValid()) {
|
|
10275
10333
|
this.generateErrorMessage(this.currentPage.case_fields);
|
|
10276
10334
|
}
|
|
@@ -10497,6 +10555,14 @@
|
|
|
10497
10555
|
this.formValueService.removeUnnecessaryFields(caseEventData.data, caseFields, clearEmpty, clearNonCase, fromPreviousPage, this.currentPage.case_fields);
|
|
10498
10556
|
return caseEventData;
|
|
10499
10557
|
};
|
|
10558
|
+
CaseEditPageComponent.prototype.syncCaseEditDataService = function () {
|
|
10559
|
+
var _this = this;
|
|
10560
|
+
this.caseEditDataService.setCaseEventTriggerName(this.eventTrigger.name);
|
|
10561
|
+
this.caseEditDataService.setCaseLinkError(this.caseLinkError);
|
|
10562
|
+
this.caseEditDataService.caseFormValidationErrors$.subscribe({
|
|
10563
|
+
next: function (validationErrors) { return _this.validationErrors = validationErrors; }
|
|
10564
|
+
});
|
|
10565
|
+
};
|
|
10500
10566
|
return CaseEditPageComponent;
|
|
10501
10567
|
}());
|
|
10502
10568
|
CaseEditPageComponent.RESUMED_FORM_DISCARD = 'RESUMED_FORM_DISCARD';
|
|
@@ -10506,7 +10572,7 @@
|
|
|
10506
10572
|
CaseEditPageComponent.TRIGGER_TEXT_START = 'Continue';
|
|
10507
10573
|
CaseEditPageComponent.TRIGGER_TEXT_SAVE = 'Save and continue';
|
|
10508
10574
|
CaseEditPageComponent.TRIGGER_TEXT_CONTINUE = 'Ignore Warning and Continue';
|
|
10509
|
-
CaseEditPageComponent.ɵfac = function CaseEditPageComponent_Factory(t) { return new (t || CaseEditPageComponent)(i0__namespace.ɵɵdirectiveInject(CaseEditComponent), i0__namespace.ɵɵdirectiveInject(i1__namespace$1.ActivatedRoute), i0__namespace.ɵɵdirectiveInject(FormValueService), i0__namespace.ɵɵdirectiveInject(FormErrorService), i0__namespace.ɵɵdirectiveInject(i0__namespace.ChangeDetectorRef), i0__namespace.ɵɵdirectiveInject(PageValidationService), i0__namespace.ɵɵdirectiveInject(i1__namespace$3.MatDialog), i0__namespace.ɵɵdirectiveInject(CaseFieldService)); };
|
|
10575
|
+
CaseEditPageComponent.ɵfac = function CaseEditPageComponent_Factory(t) { return new (t || CaseEditPageComponent)(i0__namespace.ɵɵdirectiveInject(CaseEditComponent), i0__namespace.ɵɵdirectiveInject(i1__namespace$1.ActivatedRoute), i0__namespace.ɵɵdirectiveInject(FormValueService), i0__namespace.ɵɵdirectiveInject(FormErrorService), i0__namespace.ɵɵdirectiveInject(i0__namespace.ChangeDetectorRef), i0__namespace.ɵɵdirectiveInject(PageValidationService), i0__namespace.ɵɵdirectiveInject(i1__namespace$3.MatDialog), i0__namespace.ɵɵdirectiveInject(CaseFieldService), i0__namespace.ɵɵdirectiveInject(CaseEditDataService)); };
|
|
10510
10576
|
CaseEditPageComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CaseEditPageComponent, selectors: [["ccd-case-edit-page"]], decls: 13, vars: 12, consts: [[4, "ngIf"], [4, "ngIf", "ngIfThen", "ngIfElse"], ["titleBlock", ""], ["idBlock", ""], ["class", "govuk-error-summary", "aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 4, "ngIf"], ["class", "error-summary", "role", "status", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 4, "ngIf"], [3, "triggerTextContinue", "triggerTextIgnore", "callbackErrorsSubject", "callbackErrorsContext"], [1, "width-50"], ["class", "form", 3, "formGroup", "submit", 4, "ngIf"], ["class", "govuk-heading-l", 4, "ngIf"], [1, "govuk-heading-l"], [1, "govuk-caption-l"], [3, "content"], ["class", "heading-h2", 4, "ngIf"], [1, "heading-h2"], ["aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 1, "govuk-error-summary"], ["id", "error-summary-title", 1, "govuk-error-summary__title"], ["class", "govuk-error-summary__body", 4, "ngFor", "ngForOf"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], [1, "validation-error", 3, "click"], ["role", "status", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 1, "error-summary"], ["id", "edit-case-event_error-summary-heading", 1, "heading-h1", "error-summary-heading"], ["id", "edit-case-event_error-summary-body", 1, "govuk-error-summary__body"], ["href", "get-help", "target", "_blank"], ["id", "edit-case-event_error-summary-heading-3", 1, "heading-h3", "error-summary-heading"], ["class", "error-summary-list", 4, "ngIf"], [1, "error-summary-list"], ["class", "ccd-error-summary-li", 4, "ngFor", "ngForOf"], [1, "ccd-error-summary-li"], [1, "form", 3, "formGroup", "submit"], ["id", "fieldset-case-data"], [2, "display", "none"], ["id", "caseEditForm", 3, "fields", "formGroup", "caseFields", "pageChangeSubject", "valuesChanged", 4, "ngIf"], ["class", "grid-row", 4, "ngIf"], [1, "form-group", "form-group-related"], ["type", "button", 1, "button", "button-secondary", 3, "disabled", "click"], ["type", "submit", 1, "button", 3, "disabled"], [1, "cancel"], ["href", "javascript:void(0)", 3, "click"], ["id", "caseEditForm", 3, "fields", "formGroup", "caseFields", "pageChangeSubject", "valuesChanged"], [1, "grid-row"], [1, "column-two-thirds", "rightBorderSeparator"], ["id", "caseEditForm1", 3, "fields", "formGroup", "caseFields"], [1, "column-one-third"], ["id", "caseEditForm2", 3, "fields", "formGroup", "caseFields"]], template: function CaseEditPageComponent_Template(rf, ctx) {
|
|
10511
10577
|
if (rf & 1) {
|
|
10512
10578
|
i0__namespace.ɵɵtemplate(0, CaseEditPageComponent_ccd_loading_spinner_0_Template, 1, 0, "ccd-loading-spinner", 0);
|
|
@@ -10552,7 +10618,7 @@
|
|
|
10552
10618
|
templateUrl: 'case-edit-page.html',
|
|
10553
10619
|
styleUrls: ['./case-edit-page.scss']
|
|
10554
10620
|
}]
|
|
10555
|
-
}], function () { return [{ type: CaseEditComponent }, { type: i1__namespace$1.ActivatedRoute }, { type: FormValueService }, { type: FormErrorService }, { type: i0__namespace.ChangeDetectorRef }, { type: PageValidationService }, { type: i1__namespace$3.MatDialog }, { type: CaseFieldService }]; }, null);
|
|
10621
|
+
}], function () { return [{ type: CaseEditComponent }, { type: i1__namespace$1.ActivatedRoute }, { type: FormValueService }, { type: FormErrorService }, { type: i0__namespace.ChangeDetectorRef }, { type: PageValidationService }, { type: i1__namespace$3.MatDialog }, { type: CaseFieldService }, { type: CaseEditDataService }]; }, null);
|
|
10556
10622
|
})();
|
|
10557
10623
|
|
|
10558
10624
|
var CallbackErrorsContext = /** @class */ (function () {
|
|
@@ -12996,7 +13062,7 @@
|
|
|
12996
13062
|
if (rf & 2) {
|
|
12997
13063
|
var ctx_r1 = i0__namespace.ɵɵnextContext();
|
|
12998
13064
|
i0__namespace.ɵɵadvance(1);
|
|
12999
|
-
i0__namespace.ɵɵproperty("caseFields", ctx_r1.caseFields)("caseField", ctx_r1.caseField)("formGroup", ctx_r1.formGroup)("
|
|
13065
|
+
i0__namespace.ɵɵproperty("caseFields", ctx_r1.caseFields)("caseField", ctx_r1.caseField)("formGroup", ctx_r1.formGroup)("isLinkedCasesJourney", ctx_r1.linkedCasesService.isLinkedCasesEventTrigger);
|
|
13000
13066
|
}
|
|
13001
13067
|
}
|
|
13002
13068
|
var WriteCaseLinkFieldComponent = /** @class */ (function (_super) {
|
|
@@ -13068,11 +13134,11 @@
|
|
|
13068
13134
|
var _t = void 0;
|
|
13069
13135
|
i0__namespace.ɵɵqueryRefresh(_t = i0__namespace.ɵɵloadQuery()) && (ctx.writeComplexFieldComponent = _t.first);
|
|
13070
13136
|
}
|
|
13071
|
-
}, inputs: { caseFields: "caseFields", formGroup: "formGroup"
|
|
13137
|
+
}, inputs: { caseFields: "caseFields", formGroup: "formGroup" }, features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 3, vars: 2, consts: [["class", "form-group", 4, "ngIf"], [1, "form-group"], [3, "for"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["type", "text", 1, "form-control", "bottom-30", 3, "id", "formControl"], [1, "form-label"], [1, "form-hint"], [3, "caseFields", "caseField", "formGroup", "isLinkedCasesJourney", "onLinkedCasesSelected"]], template: function WriteCaseLinkFieldComponent_Template(rf, ctx) {
|
|
13072
13138
|
if (rf & 1) {
|
|
13073
13139
|
i0__namespace.ɵɵelementContainerStart(0);
|
|
13074
13140
|
i0__namespace.ɵɵtemplate(1, WriteCaseLinkFieldComponent_div_1_Template, 5, 5, "div", 0);
|
|
13075
|
-
i0__namespace.ɵɵtemplate(2, WriteCaseLinkFieldComponent_div_2_Template, 2,
|
|
13141
|
+
i0__namespace.ɵɵtemplate(2, WriteCaseLinkFieldComponent_div_2_Template, 2, 4, "div", 0);
|
|
13076
13142
|
i0__namespace.ɵɵelementContainerEnd();
|
|
13077
13143
|
}
|
|
13078
13144
|
if (rf & 2) {
|
|
@@ -13093,8 +13159,6 @@
|
|
|
13093
13159
|
type: i0.Input
|
|
13094
13160
|
}], formGroup: [{
|
|
13095
13161
|
type: i0.Input
|
|
13096
|
-
}], caseEditPageComponent: [{
|
|
13097
|
-
type: i0.Input
|
|
13098
13162
|
}], writeComplexFieldComponent: [{
|
|
13099
13163
|
type: i0.ViewChild,
|
|
13100
13164
|
args: ['writeComplexFieldComponent', /* TODO: add static flag */ {}]
|
|
@@ -22512,13 +22576,14 @@
|
|
|
22512
22576
|
}
|
|
22513
22577
|
var WriteLinkedCasesComponent = /** @class */ (function (_super) {
|
|
22514
22578
|
__extends(WriteLinkedCasesComponent, _super);
|
|
22515
|
-
function WriteLinkedCasesComponent(caseEdit, appConfig, commonDataService, casesService, linkedCasesService) {
|
|
22579
|
+
function WriteLinkedCasesComponent(caseEdit, appConfig, commonDataService, casesService, linkedCasesService, caseEditDataService) {
|
|
22516
22580
|
var _this = _super.call(this) || this;
|
|
22517
22581
|
_this.caseEdit = caseEdit;
|
|
22518
22582
|
_this.appConfig = appConfig;
|
|
22519
22583
|
_this.commonDataService = commonDataService;
|
|
22520
22584
|
_this.casesService = casesService;
|
|
22521
22585
|
_this.linkedCasesService = linkedCasesService;
|
|
22586
|
+
_this.caseEditDataService = caseEditDataService;
|
|
22522
22587
|
_this.onLinkedCasesSelected = new i0.EventEmitter();
|
|
22523
22588
|
_this.isLinkedCasesJourney = false;
|
|
22524
22589
|
_this.linkedCasesPages = exports.LinkedCasesPages;
|
|
@@ -22540,8 +22605,12 @@
|
|
|
22540
22605
|
}
|
|
22541
22606
|
});
|
|
22542
22607
|
this.getLinkedCases();
|
|
22543
|
-
this.
|
|
22544
|
-
|
|
22608
|
+
this.caseEditDataService.caseEventTriggerName$.subscribe({
|
|
22609
|
+
next: function (name) {
|
|
22610
|
+
_this.linkedCasesService.isLinkedCasesEventTrigger
|
|
22611
|
+
= (name === exports.LinkedCasesEventTriggers.LINK_CASES);
|
|
22612
|
+
}
|
|
22613
|
+
});
|
|
22545
22614
|
};
|
|
22546
22615
|
WriteLinkedCasesComponent.prototype.ngAfterViewInit = function () {
|
|
22547
22616
|
var labelField = document.getElementsByClassName('govuk-heading-l');
|
|
@@ -22556,7 +22625,7 @@
|
|
|
22556
22625
|
WriteLinkedCasesComponent.prototype.onLinkedCasesStateEmitted = function (linkedCasesState) {
|
|
22557
22626
|
var _this = this;
|
|
22558
22627
|
this.errorMessages = [];
|
|
22559
|
-
this.
|
|
22628
|
+
this.caseEditDataService.clearFormValidationErrors();
|
|
22560
22629
|
if (linkedCasesState.navigateToNextPage) {
|
|
22561
22630
|
this.linkedCasesPage = this.getNextPage(linkedCasesState);
|
|
22562
22631
|
this.setContinueButtonValidationErrorMessage();
|
|
@@ -22565,7 +22634,7 @@
|
|
|
22565
22634
|
else {
|
|
22566
22635
|
if (linkedCasesState.errorMessages && linkedCasesState.errorMessages.length) {
|
|
22567
22636
|
linkedCasesState.errorMessages.forEach(function (errorMessage, index) {
|
|
22568
|
-
_this.
|
|
22637
|
+
_this.caseEditDataService.addFormValidationError({ id: errorMessage.fieldId, message: errorMessage.description });
|
|
22569
22638
|
});
|
|
22570
22639
|
}
|
|
22571
22640
|
}
|
|
@@ -22580,15 +22649,15 @@
|
|
|
22580
22649
|
var buttonId = this.linkedCasesService.linkedCases.length === 0
|
|
22581
22650
|
? 'back-button'
|
|
22582
22651
|
: 'next-button';
|
|
22583
|
-
this.
|
|
22652
|
+
this.caseEditDataService.setCaseLinkError({
|
|
22584
22653
|
componentId: buttonId,
|
|
22585
22654
|
errorMessage: errorMessage
|
|
22586
|
-
};
|
|
22655
|
+
});
|
|
22587
22656
|
};
|
|
22588
22657
|
WriteLinkedCasesComponent.prototype.proceedToNextPage = function () {
|
|
22589
22658
|
if (this.isAtFinalPage()) {
|
|
22590
22659
|
// Continue button event must be allowed in final page
|
|
22591
|
-
this.
|
|
22660
|
+
this.caseEditDataService.clearCaseLinkError();
|
|
22592
22661
|
// Trigger validation to clear the "notAtFinalPage" error if now at the final state
|
|
22593
22662
|
this.formGroup.updateValueAndValidity();
|
|
22594
22663
|
// update form value
|
|
@@ -22644,8 +22713,8 @@
|
|
|
22644
22713
|
};
|
|
22645
22714
|
return WriteLinkedCasesComponent;
|
|
22646
22715
|
}(AbstractFieldWriteComponent));
|
|
22647
|
-
WriteLinkedCasesComponent.ɵfac = function WriteLinkedCasesComponent_Factory(t) { return new (t || WriteLinkedCasesComponent)(i0__namespace.ɵɵdirectiveInject(CaseEditComponent), i0__namespace.ɵɵdirectiveInject(AbstractAppConfig), i0__namespace.ɵɵdirectiveInject(CommonDataService), i0__namespace.ɵɵdirectiveInject(CasesService), i0__namespace.ɵɵdirectiveInject(LinkedCasesService)); };
|
|
22648
|
-
WriteLinkedCasesComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteLinkedCasesComponent, selectors: [["ccd-write-linked-cases"]], inputs: { caseFields: "caseFields", caseField: "caseField",
|
|
22716
|
+
WriteLinkedCasesComponent.ɵfac = function WriteLinkedCasesComponent_Factory(t) { return new (t || WriteLinkedCasesComponent)(i0__namespace.ɵɵdirectiveInject(CaseEditComponent), i0__namespace.ɵɵdirectiveInject(AbstractAppConfig), i0__namespace.ɵɵdirectiveInject(CommonDataService), i0__namespace.ɵɵdirectiveInject(CasesService), i0__namespace.ɵɵdirectiveInject(LinkedCasesService), i0__namespace.ɵɵdirectiveInject(CaseEditDataService)); };
|
|
22717
|
+
WriteLinkedCasesComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteLinkedCasesComponent, selectors: [["ccd-write-linked-cases"]], inputs: { caseFields: "caseFields", caseField: "caseField", isLinkedCasesJourney: "isLinkedCasesJourney", formGroup: "formGroup" }, outputs: { onLinkedCasesSelected: "onLinkedCasesSelected" }, features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 8, vars: 8, consts: [["class", "govuk-error-summary", "aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 4, "ngIf"], [1, "form-group", "govuk-!-margin-bottom-2", 3, "formGroup"], [1, "govuk-form-group", 3, "ngSwitch"], [4, "ngSwitchCase"], ["aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 1, "govuk-error-summary"], ["id", "error-summary-title", 1, "govuk-error-summary__title"], ["class", "govuk-error-summary__body", 4, "ngFor", "ngForOf"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], [1, "validation-error", 3, "click"], [3, "linkedCasesStateEmitter"]], template: function WriteLinkedCasesComponent_Template(rf, ctx) {
|
|
22649
22718
|
if (rf & 1) {
|
|
22650
22719
|
i0__namespace.ɵɵtemplate(0, WriteLinkedCasesComponent_div_0_Template, 4, 1, "div", 0);
|
|
22651
22720
|
i0__namespace.ɵɵelementStart(1, "div", 1);
|
|
@@ -22683,12 +22752,10 @@
|
|
|
22683
22752
|
selector: 'ccd-write-linked-cases',
|
|
22684
22753
|
templateUrl: './write-linked-cases.component.html'
|
|
22685
22754
|
}]
|
|
22686
|
-
}], function () { return [{ type: CaseEditComponent }, { type: AbstractAppConfig }, { type: CommonDataService }, { type: CasesService }, { type: LinkedCasesService }]; }, { caseFields: [{
|
|
22755
|
+
}], function () { return [{ type: CaseEditComponent }, { type: AbstractAppConfig }, { type: CommonDataService }, { type: CasesService }, { type: LinkedCasesService }, { type: CaseEditDataService }]; }, { caseFields: [{
|
|
22687
22756
|
type: i0.Input
|
|
22688
22757
|
}], caseField: [{
|
|
22689
22758
|
type: i0.Input
|
|
22690
|
-
}], caseEditPageComponent: [{
|
|
22691
|
-
type: i0.Input
|
|
22692
22759
|
}], onLinkedCasesSelected: [{
|
|
22693
22760
|
type: i0.Output
|
|
22694
22761
|
}], isLinkedCasesJourney: [{
|
|
@@ -25048,6 +25115,7 @@
|
|
|
25048
25115
|
i1$1.RouterModule,
|
|
25049
25116
|
i2.FormsModule,
|
|
25050
25117
|
i2.ReactiveFormsModule,
|
|
25118
|
+
CaseEditDataModule,
|
|
25051
25119
|
PaletteUtilsModule,
|
|
25052
25120
|
PipesModule,
|
|
25053
25121
|
BannersModule,
|
|
@@ -25182,6 +25250,7 @@
|
|
|
25182
25250
|
i1$1.RouterModule,
|
|
25183
25251
|
i2.FormsModule,
|
|
25184
25252
|
i2.ReactiveFormsModule,
|
|
25253
|
+
CaseEditDataModule,
|
|
25185
25254
|
PaletteUtilsModule,
|
|
25186
25255
|
PipesModule,
|
|
25187
25256
|
BannersModule,
|
|
@@ -25306,6 +25375,7 @@
|
|
|
25306
25375
|
i1$1.RouterModule,
|
|
25307
25376
|
i2.FormsModule,
|
|
25308
25377
|
i2.ReactiveFormsModule,
|
|
25378
|
+
CaseEditDataModule,
|
|
25309
25379
|
PaletteUtilsModule,
|
|
25310
25380
|
PipesModule,
|
|
25311
25381
|
BannersModule,
|
|
@@ -26803,6 +26873,7 @@
|
|
|
26803
26873
|
CaseEditorModule.ɵfac = function CaseEditorModule_Factory(t) { return new (t || CaseEditorModule)(); };
|
|
26804
26874
|
CaseEditorModule.ɵmod = i0__namespace.ɵɵdefineNgModule({ type: CaseEditorModule });
|
|
26805
26875
|
CaseEditorModule.ɵinj = i0__namespace.ɵɵdefineInjector({ providers: [
|
|
26876
|
+
CaseEditDataService,
|
|
26806
26877
|
CaseNotifier,
|
|
26807
26878
|
FieldsUtils,
|
|
26808
26879
|
FieldsPurger,
|
|
@@ -26834,6 +26905,7 @@
|
|
|
26834
26905
|
i1$1.RouterModule,
|
|
26835
26906
|
i2.FormsModule,
|
|
26836
26907
|
i2.ReactiveFormsModule,
|
|
26908
|
+
CaseEditDataModule,
|
|
26837
26909
|
PaletteModule,
|
|
26838
26910
|
LabelSubstitutorModule,
|
|
26839
26911
|
ConditionalShowModule,
|
|
@@ -26856,6 +26928,7 @@
|
|
|
26856
26928
|
i1$1.RouterModule,
|
|
26857
26929
|
i2.FormsModule,
|
|
26858
26930
|
i2.ReactiveFormsModule,
|
|
26931
|
+
CaseEditDataModule,
|
|
26859
26932
|
PaletteModule,
|
|
26860
26933
|
LabelSubstitutorModule,
|
|
26861
26934
|
ConditionalShowModule,
|
|
@@ -26880,6 +26953,7 @@
|
|
|
26880
26953
|
i1$1.RouterModule,
|
|
26881
26954
|
i2.FormsModule,
|
|
26882
26955
|
i2.ReactiveFormsModule,
|
|
26956
|
+
CaseEditDataModule,
|
|
26883
26957
|
PaletteModule,
|
|
26884
26958
|
LabelSubstitutorModule,
|
|
26885
26959
|
ConditionalShowModule,
|
|
@@ -26911,6 +26985,7 @@
|
|
|
26911
26985
|
CallbackErrorsComponent
|
|
26912
26986
|
],
|
|
26913
26987
|
providers: [
|
|
26988
|
+
CaseEditDataService,
|
|
26914
26989
|
CaseNotifier,
|
|
26915
26990
|
FieldsUtils,
|
|
26916
26991
|
FieldsPurger,
|
|
@@ -35127,6 +35202,8 @@
|
|
|
35127
35202
|
exports.CaseDetails = CaseDetails;
|
|
35128
35203
|
exports.CaseEditComponent = CaseEditComponent;
|
|
35129
35204
|
exports.CaseEditConfirmComponent = CaseEditConfirmComponent;
|
|
35205
|
+
exports.CaseEditDataModule = CaseEditDataModule;
|
|
35206
|
+
exports.CaseEditDataService = CaseEditDataService;
|
|
35130
35207
|
exports.CaseEditFormComponent = CaseEditFormComponent;
|
|
35131
35208
|
exports.CaseEditPageComponent = CaseEditPageComponent;
|
|
35132
35209
|
exports.CaseEditSubmitComponent = CaseEditSubmitComponent;
|