@hmcts/ccd-case-ui-toolkit 7.3.54-exui-1855-rc-1 → 7.3.54-exui-4675
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.
|
@@ -10732,6 +10732,7 @@ function CaseEditFormComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
10732
10732
|
} }
|
|
10733
10733
|
class CaseEditFormComponent {
|
|
10734
10734
|
formValueService;
|
|
10735
|
+
conditionalShowFormDirectives;
|
|
10735
10736
|
fields = [];
|
|
10736
10737
|
formGroup;
|
|
10737
10738
|
caseFields = [];
|
|
@@ -10779,8 +10780,17 @@ class CaseEditFormComponent {
|
|
|
10779
10780
|
const current = JSON.stringify(this.formValueService.sanitise(changes));
|
|
10780
10781
|
this.initial !== current ? this.valuesChanged.emit(true) : this.valuesChanged.emit(false);
|
|
10781
10782
|
}
|
|
10783
|
+
// EXUI-4675 - needed for the race condition caused by the debounce in ConditionalShowFormDirective
|
|
10784
|
+
syncConditionalShowStates() {
|
|
10785
|
+
this.conditionalShowFormDirectives?.forEach(directive => directive.evalAllShowHideConditions());
|
|
10786
|
+
}
|
|
10782
10787
|
static ɵfac = function CaseEditFormComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaseEditFormComponent)(i0.ɵɵdirectiveInject(FormValueService)); };
|
|
10783
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEditFormComponent, selectors: [["ccd-case-edit-form"]],
|
|
10788
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEditFormComponent, selectors: [["ccd-case-edit-form"]], viewQuery: function CaseEditFormComponent_Query(rf, ctx) { if (rf & 1) {
|
|
10789
|
+
i0.ɵɵviewQuery(ConditionalShowFormDirective, 5);
|
|
10790
|
+
} if (rf & 2) {
|
|
10791
|
+
let _t;
|
|
10792
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.conditionalShowFormDirectives = _t);
|
|
10793
|
+
} }, inputs: { fields: "fields", formGroup: "formGroup", caseFields: "caseFields", pageChangeSubject: "pageChangeSubject" }, outputs: { valuesChanged: "valuesChanged" }, standalone: false, decls: 1, vars: 1, consts: [["CompoundRow", ""], ["ccdConditionalShowForm", "", 3, "formGroup", "caseFields", "contextFields", 4, "ngFor", "ngForOf"], ["ccdConditionalShowForm", "", 3, "formGroup", "caseFields", "contextFields"], ["ccdLabelSubstitutor", "", 3, "caseField", "formGroup", "contextFields"], [3, "ngSwitch"], [3, "caseField", "caseFields", "withLabel", "formGroup", 4, "ngSwitchCase"], [4, "ngSwitchCase"], [3, "caseField", "caseFields", "withLabel", "formGroup"], [4, "ngIf", "ngIfElse"], [3, "caseField", "caseFields", "formGroup", "idPrefix", "hidden"]], template: function CaseEditFormComponent_Template(rf, ctx) { if (rf & 1) {
|
|
10784
10794
|
i0.ɵɵtemplate(0, CaseEditFormComponent_ng_container_0_Template, 6, 11, "ng-container", 1);
|
|
10785
10795
|
} if (rf & 2) {
|
|
10786
10796
|
i0.ɵɵproperty("ngForOf", ctx.fields);
|
|
@@ -10789,7 +10799,10 @@ class CaseEditFormComponent {
|
|
|
10789
10799
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditFormComponent, [{
|
|
10790
10800
|
type: Component,
|
|
10791
10801
|
args: [{ selector: 'ccd-case-edit-form', standalone: false, template: "<ng-container ccdConditionalShowForm [formGroup]=\"formGroup\" [caseFields]=\"fields\" [contextFields]=\"caseFields\"\n *ngFor=\"let field of fields\">\n\n <div ccdLabelSubstitutor [caseField]=\"field\" [formGroup]=\"formGroup\" [contextFields]=\"caseFields\">\n <ng-container [ngSwitch]=\"field | ccdIsReadOnlyAndNotCollection\">\n\n <ccd-field-read *ngSwitchCase=\"true\" [caseField]=\"field\" [caseFields]=\"caseFields\" [withLabel]=\"true\"\n [formGroup]=\"formGroup\" [attr.field_id]=\"field.id\"\n [attr.field_type]=\"field.field_type.type\"></ccd-field-read>\n <ng-container *ngSwitchCase=\"false\">\n\n <ng-container *ngIf=\"!(field | ccdIsCompound); else CompoundRow\">\n <ccd-field-write [caseField]=\"field\"\n [caseFields]=\"caseFields\"\n [formGroup]=\"formGroup\"\n [idPrefix]=\"\"\n [hidden]=\"field.hidden\"\n [attr.field_id]=\"field.id\"\n [attr.field_type]=\"field.field_type.type\">\n </ccd-field-write>\n </ng-container>\n\n <ng-template #CompoundRow>\n <ccd-field-write [caseField]=\"field\"\n [caseFields]=\"caseFields\"\n [formGroup]=\"formGroup\"\n [idPrefix]=\"field.id + '_'\"\n [hidden]=\"field.hidden\"\n [attr.field_id]=\"field.id\"\n [attr.field_type]=\"field.field_type.type\"></ccd-field-write>\n </ng-template>\n </ng-container>\n </ng-container>\n </div>\n</ng-container>\n" }]
|
|
10792
|
-
}], () => [{ type: FormValueService }], {
|
|
10802
|
+
}], () => [{ type: FormValueService }], { conditionalShowFormDirectives: [{
|
|
10803
|
+
type: ViewChildren,
|
|
10804
|
+
args: [ConditionalShowFormDirective]
|
|
10805
|
+
}], fields: [{
|
|
10793
10806
|
type: Input
|
|
10794
10807
|
}], formGroup: [{
|
|
10795
10808
|
type: Input
|
|
@@ -10800,7 +10813,7 @@ class CaseEditFormComponent {
|
|
|
10800
10813
|
}], valuesChanged: [{
|
|
10801
10814
|
type: Output
|
|
10802
10815
|
}] }); })();
|
|
10803
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEditFormComponent, { className: "CaseEditFormComponent", filePath: "lib/shared/components/case-editor/case-edit-form/case-edit-form.component.ts", lineNumber:
|
|
10816
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEditFormComponent, { className: "CaseEditFormComponent", filePath: "lib/shared/components/case-editor/case-edit-form/case-edit-form.component.ts", lineNumber: 14 }); })();
|
|
10804
10817
|
|
|
10805
10818
|
class CaseEditDataService {
|
|
10806
10819
|
details$ = new BehaviorSubject(null);
|
|
@@ -11336,6 +11349,7 @@ class CaseEditPageComponent {
|
|
|
11336
11349
|
dialogRefAfterClosedSub;
|
|
11337
11350
|
saveDraftSub;
|
|
11338
11351
|
caseFormValidationErrorsSub;
|
|
11352
|
+
caseEditFormComponents;
|
|
11339
11353
|
static scrollToTop() {
|
|
11340
11354
|
window.scrollTo(0, 0);
|
|
11341
11355
|
}
|
|
@@ -11651,6 +11665,7 @@ class CaseEditPageComponent {
|
|
|
11651
11665
|
}
|
|
11652
11666
|
this.caseEditDataService.clearFormValidationErrors();
|
|
11653
11667
|
this.checkForStagesCompleted();
|
|
11668
|
+
this.caseEditFormComponents?.forEach(component => component.syncConditionalShowStates());
|
|
11654
11669
|
if (this.currentPageIsNotValid()) {
|
|
11655
11670
|
// The generateErrorMessage method filters out the hidden fields.
|
|
11656
11671
|
// The error message for LinkedCases journey will never get displayed because the
|
|
@@ -11982,7 +11997,12 @@ class CaseEditPageComponent {
|
|
|
11982
11997
|
});
|
|
11983
11998
|
}
|
|
11984
11999
|
static ɵfac = function CaseEditPageComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaseEditPageComponent)(i0.ɵɵdirectiveInject(CaseEditComponent), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(FormValueService), i0.ɵɵdirectiveInject(FormErrorService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(PageValidationService), i0.ɵɵdirectiveInject(i1$3.MatLegacyDialog), i0.ɵɵdirectiveInject(CaseFieldService), i0.ɵɵdirectiveInject(CaseEditDataService), i0.ɵɵdirectiveInject(LoadingService), i0.ɵɵdirectiveInject(ValidPageListCaseFieldsService), i0.ɵɵdirectiveInject(MultipageComponentStateService), i0.ɵɵdirectiveInject(AddressesService), i0.ɵɵdirectiveInject(LinkedCasesService), i0.ɵɵdirectiveInject(CaseFlagStateService)); };
|
|
11985
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEditPageComponent, selectors: [["ccd-case-edit-page"]],
|
|
12000
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEditPageComponent, selectors: [["ccd-case-edit-page"]], viewQuery: function CaseEditPageComponent_Query(rf, ctx) { if (rf & 1) {
|
|
12001
|
+
i0.ɵɵviewQuery(CaseEditFormComponent, 5);
|
|
12002
|
+
} if (rf & 2) {
|
|
12003
|
+
let _t;
|
|
12004
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.caseEditFormComponents = _t);
|
|
12005
|
+
} }, standalone: false, decls: 12, vars: 11, consts: [["titleBlock", ""], ["idBlock", ""], [4, "ngIf"], [4, "ngIf", "ngIfThen", "ngIfElse"], ["class", "govuk-error-summary", "aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 4, "ngIf"], [3, "error"], [3, "callbackErrorsContext", "triggerTextContinue", "triggerTextIgnore", "callbackErrorsSubject"], [1, "width-50"], ["class", "form", 3, "formGroup", "submit", 4, "ngIf"], [3, "eventCompletionParams", "eventCanBeCompleted", 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"], ["tabindex", "0", 1, "validation-error", 3, "click", "keyup.enter"], [1, "form", 3, "submit", "formGroup"], ["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"], ["class", "button button-secondary", "type", "button", 3, "disabled", "click", 4, "ngIf"], ["type", "submit", 1, "button", 3, "disabled"], [1, "cancel"], ["type", "button", 1, "govuk-js-link", 3, "click"], ["id", "caseEditForm", 3, "valuesChanged", "fields", "formGroup", "caseFields", "pageChangeSubject"], [1, "grid-row"], [1, "column-two-thirds", "rightBorderSeparator"], ["id", "caseEditForm1", 3, "fields", "formGroup", "caseFields"], [1, "column-one-third"], ["id", "caseEditForm2", 3, "fields", "formGroup", "caseFields"], ["type", "button", 1, "button", "button-secondary", 3, "click", "disabled"], [3, "eventCanBeCompleted", "eventCompletionParams"]], template: function CaseEditPageComponent_Template(rf, ctx) { if (rf & 1) {
|
|
11986
12006
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
11987
12007
|
i0.ɵɵtemplate(0, CaseEditPageComponent_ng_container_0_Template, 3, 2, "ng-container", 2)(1, CaseEditPageComponent_div_1_Template, 1, 0, "div", 3)(2, CaseEditPageComponent_ng_template_2_Template, 3, 7, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor)(4, CaseEditPageComponent_ng_template_4_Template, 1, 1, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor)(6, CaseEditPageComponent_div_6_Template, 5, 4, "div", 4);
|
|
11988
12008
|
i0.ɵɵelement(7, "ccd-case-edit-generic-errors", 5);
|
|
@@ -12014,8 +12034,11 @@ class CaseEditPageComponent {
|
|
|
12014
12034
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditPageComponent, [{
|
|
12015
12035
|
type: Component,
|
|
12016
12036
|
args: [{ selector: 'ccd-case-edit-page', standalone: false, template: "<ng-container *ngIf=\"currentPage\">\n <h1 *ngIf=\"!currentPage.label\" class=\"govuk-heading-l\">{{eventTrigger.name | rpxTranslate}}</h1>\n <ng-container *ngIf=\"currentPage.label\">\n <span class=\"govuk-caption-l\">{{ eventTrigger.name | rpxTranslate}}</span>\n <h1 class=\"govuk-heading-l\">{{currentPage.label | rpxTranslate}}</h1>\n </ng-container>\n</ng-container>\n\n<!--Case ID or Title -->\n<div *ngIf=\"getCaseTitle(); then titleBlock; else idBlock\"></div>\n<ng-template #titleBlock>\n <ccd-markdown [content]=\"getCaseTitle() | ccdCaseTitle: caseFields : editForm.controls['data'] | rpxTranslate\"></ccd-markdown>\n</ng-template>\n<ng-template #idBlock>\n <h2 *ngIf=\"getCaseId()\" class=\"heading-h2\">#{{ getCaseId() | ccdCaseReference }}</h2>\n</ng-template>\n\n<!-- Error message summary -->\n<div *ngIf=\"validationErrors.length > 0\" class=\"govuk-error-summary\" aria-labelledby=\"error-summary-title\" role=\"alert\" tabindex=\"-1\" data-module=\"govuk-error-summary\">\n <h2 class=\"govuk-error-summary__title\" id=\"error-summary-title\">\n {{'There is a problem' | rpxTranslate}}\n </h2>\n <div *ngFor=\"let validationError of validationErrors\" class=\"govuk-error-summary__body\">\n <ul class=\"govuk-list govuk-error-summary__list\">\n <li>\n <a (click)=\"navigateToErrorElement(validationError.id)\" (keyup.enter)=\"navigateToErrorElement(validationError.id)\" tabindex=\"0\" class=\"validation-error\">\n {{ validationError.message | rpxTranslate: getRpxTranslatePipeArgs(validationError.label | rpxTranslate): null }}\n </a>\n </li>\n </ul>\n </div>\n</div>\n\n<ccd-case-edit-generic-errors [error]=\"caseEdit.error\"></ccd-case-edit-generic-errors>\n\n<ccd-callback-errors\n [triggerTextContinue]=\"triggerTextStart\"\n [triggerTextIgnore]=\"triggerTextIgnoreWarnings\"\n [callbackErrorsSubject]=\"caseEdit.callbackErrorsSubject\"\n (callbackErrorsContext)=\"callbackErrorsNotify($event)\">\n</ccd-callback-errors>\n<div class=\"width-50\">\n <form *ngIf=\"currentPage\" class=\"form\" [formGroup]=\"editForm\" (submit)=\"nextStep()\">\n <fieldset id=\"fieldset-case-data\">\n <legend style=\"display: none;\"></legend>\n <!-- single column -->\n <ccd-case-edit-form id='caseEditForm' *ngIf=\"!currentPage.isMultiColumn()\" [fields]=\"currentPage.getCol1Fields()\"\n [formGroup]=\"editForm.controls['data']\" [caseFields]=\"caseFields\"\n [pageChangeSubject]=\"pageChangeSubject\"\n (valuesChanged)=\"applyValuesChanged($event)\"></ccd-case-edit-form>\n <!-- two columns -->\n <div *ngIf=\"currentPage.isMultiColumn()\" class=\"grid-row\">\n <div class=\"column-two-thirds rightBorderSeparator\">\n <ccd-case-edit-form id='caseEditForm1' [fields]=\"currentPage.getCol1Fields()\"\n [formGroup]=\"editForm.controls['data']\" [caseFields]=\"caseFields\"></ccd-case-edit-form>\n </div>\n <div class=\"column-one-third\">\n <ccd-case-edit-form id='caseEditForm2' [fields]=\"currentPage.getCol2Fields()\"\n [formGroup]=\"editForm.controls['data']\" [caseFields]=\"caseFields\"></ccd-case-edit-form>\n </div>\n </div>\n </fieldset>\n\n <div class=\"form-group form-group-related\">\n <button class=\"button button-secondary\" type=\"button\" (click)=\"toPreviousPage()\" *ngIf=\"!isAtStart()\" [disabled]=\"isDisabled()\">\n {{'Previous' | rpxTranslate}}\n </button>\n <button class=\"button\" type=\"submit\" [disabled]=\"submitting()\">{{triggerText | rpxTranslate}}</button>\n </div>\n\n <p class=\"cancel\"><button type=\"button\" (click)=\"cancel()\" class=\"govuk-js-link\">{{getCancelText() | rpxTranslate}}</button></p>\n </form>\n</div>\n\n<ccd-case-event-completion *ngIf=\"caseEdit.isEventCompletionChecksRequired\"\n [eventCompletionParams]=\"caseEdit.eventCompletionParams\"\n (eventCanBeCompleted)=\"onEventCanBeCompleted($event)\">\n</ccd-case-event-completion>\n", styles: [".rightBorderSeparator{border-right-width:4px;border-right-color:#ffcc02;border-right-style:solid}.validation-error{cursor:pointer;text-decoration:underline;color:#d4351c}\n"] }]
|
|
12017
|
-
}], () => [{ type: CaseEditComponent }, { type: i1$1.ActivatedRoute }, { type: FormValueService }, { type: FormErrorService }, { type: i0.ChangeDetectorRef }, { type: PageValidationService }, { type: i1$3.MatLegacyDialog }, { type: CaseFieldService }, { type: CaseEditDataService }, { type: LoadingService }, { type: ValidPageListCaseFieldsService }, { type: MultipageComponentStateService }, { type: AddressesService }, { type: LinkedCasesService }, { type: CaseFlagStateService }],
|
|
12018
|
-
|
|
12037
|
+
}], () => [{ type: CaseEditComponent }, { type: i1$1.ActivatedRoute }, { type: FormValueService }, { type: FormErrorService }, { type: i0.ChangeDetectorRef }, { type: PageValidationService }, { type: i1$3.MatLegacyDialog }, { type: CaseFieldService }, { type: CaseEditDataService }, { type: LoadingService }, { type: ValidPageListCaseFieldsService }, { type: MultipageComponentStateService }, { type: AddressesService }, { type: LinkedCasesService }, { type: CaseFlagStateService }], { caseEditFormComponents: [{
|
|
12038
|
+
type: ViewChildren,
|
|
12039
|
+
args: [CaseEditFormComponent]
|
|
12040
|
+
}] }); })();
|
|
12041
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEditPageComponent, { className: "CaseEditPageComponent", filePath: "lib/shared/components/case-editor/case-edit-page/case-edit-page.component.ts", lineNumber: 36 }); })();
|
|
12019
12042
|
|
|
12020
12043
|
class CallbackErrorsContext {
|
|
12021
12044
|
triggerText;
|