@hmcts/ccd-case-ui-toolkit 7.3.67 → 7.3.68-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.
|
@@ -10921,6 +10921,7 @@ function CaseEditFormComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
10921
10921
|
} }
|
|
10922
10922
|
class CaseEditFormComponent {
|
|
10923
10923
|
formValueService;
|
|
10924
|
+
conditionalShowFormDirectives;
|
|
10924
10925
|
fields = [];
|
|
10925
10926
|
formGroup;
|
|
10926
10927
|
caseFields = [];
|
|
@@ -10968,8 +10969,17 @@ class CaseEditFormComponent {
|
|
|
10968
10969
|
const current = JSON.stringify(this.formValueService.sanitise(changes));
|
|
10969
10970
|
this.initial !== current ? this.valuesChanged.emit(true) : this.valuesChanged.emit(false);
|
|
10970
10971
|
}
|
|
10972
|
+
// EXUI-4675 - needed for the race condition caused by the debounce in ConditionalShowFormDirective
|
|
10973
|
+
syncConditionalShowStates() {
|
|
10974
|
+
this.conditionalShowFormDirectives?.forEach(directive => directive.evalAllShowHideConditions());
|
|
10975
|
+
}
|
|
10971
10976
|
static ɵfac = function CaseEditFormComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaseEditFormComponent)(i0.ɵɵdirectiveInject(FormValueService)); };
|
|
10972
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEditFormComponent, selectors: [["ccd-case-edit-form"]],
|
|
10977
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEditFormComponent, selectors: [["ccd-case-edit-form"]], viewQuery: function CaseEditFormComponent_Query(rf, ctx) { if (rf & 1) {
|
|
10978
|
+
i0.ɵɵviewQuery(ConditionalShowFormDirective, 5);
|
|
10979
|
+
} if (rf & 2) {
|
|
10980
|
+
let _t;
|
|
10981
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.conditionalShowFormDirectives = _t);
|
|
10982
|
+
} }, 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) {
|
|
10973
10983
|
i0.ɵɵtemplate(0, CaseEditFormComponent_ng_container_0_Template, 6, 11, "ng-container", 1);
|
|
10974
10984
|
} if (rf & 2) {
|
|
10975
10985
|
i0.ɵɵproperty("ngForOf", ctx.fields);
|
|
@@ -10978,7 +10988,10 @@ class CaseEditFormComponent {
|
|
|
10978
10988
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditFormComponent, [{
|
|
10979
10989
|
type: Component,
|
|
10980
10990
|
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" }]
|
|
10981
|
-
}], () => [{ type: FormValueService }], {
|
|
10991
|
+
}], () => [{ type: FormValueService }], { conditionalShowFormDirectives: [{
|
|
10992
|
+
type: ViewChildren,
|
|
10993
|
+
args: [ConditionalShowFormDirective]
|
|
10994
|
+
}], fields: [{
|
|
10982
10995
|
type: Input
|
|
10983
10996
|
}], formGroup: [{
|
|
10984
10997
|
type: Input
|
|
@@ -10989,7 +11002,7 @@ class CaseEditFormComponent {
|
|
|
10989
11002
|
}], valuesChanged: [{
|
|
10990
11003
|
type: Output
|
|
10991
11004
|
}] }); })();
|
|
10992
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEditFormComponent, { className: "CaseEditFormComponent", filePath: "lib/shared/components/case-editor/case-edit-form/case-edit-form.component.ts", lineNumber:
|
|
11005
|
+
(() => { (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 }); })();
|
|
10993
11006
|
|
|
10994
11007
|
class CaseEditDataService {
|
|
10995
11008
|
details$ = new BehaviorSubject(null);
|
|
@@ -11526,6 +11539,7 @@ class CaseEditPageComponent {
|
|
|
11526
11539
|
saveDraftSub;
|
|
11527
11540
|
caseFormValidationErrorsSub;
|
|
11528
11541
|
logger = new StructuredLoggerService();
|
|
11542
|
+
caseEditFormComponents;
|
|
11529
11543
|
static scrollToTop() {
|
|
11530
11544
|
window.scrollTo(0, 0);
|
|
11531
11545
|
}
|
|
@@ -11843,6 +11857,7 @@ class CaseEditPageComponent {
|
|
|
11843
11857
|
}
|
|
11844
11858
|
this.clearValidationErrors();
|
|
11845
11859
|
this.checkForStagesCompleted();
|
|
11860
|
+
this.caseEditFormComponents?.forEach(component => component.syncConditionalShowStates());
|
|
11846
11861
|
if (this.currentPageIsNotValid()) {
|
|
11847
11862
|
// The generateErrorMessage method filters out the hidden fields.
|
|
11848
11863
|
// The error message for LinkedCases journey will never get displayed because the
|
|
@@ -12178,7 +12193,12 @@ class CaseEditPageComponent {
|
|
|
12178
12193
|
});
|
|
12179
12194
|
}
|
|
12180
12195
|
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)); };
|
|
12181
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEditPageComponent, selectors: [["ccd-case-edit-page"]],
|
|
12196
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEditPageComponent, selectors: [["ccd-case-edit-page"]], viewQuery: function CaseEditPageComponent_Query(rf, ctx) { if (rf & 1) {
|
|
12197
|
+
i0.ɵɵviewQuery(CaseEditFormComponent, 5);
|
|
12198
|
+
} if (rf & 2) {
|
|
12199
|
+
let _t;
|
|
12200
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.caseEditFormComponents = _t);
|
|
12201
|
+
} }, 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) {
|
|
12182
12202
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
12183
12203
|
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);
|
|
12184
12204
|
i0.ɵɵelement(7, "ccd-case-edit-generic-errors", 5);
|
|
@@ -12210,8 +12230,11 @@ class CaseEditPageComponent {
|
|
|
12210
12230
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditPageComponent, [{
|
|
12211
12231
|
type: Component,
|
|
12212
12232
|
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"] }]
|
|
12213
|
-
}], () => [{ 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 }],
|
|
12214
|
-
|
|
12233
|
+
}], () => [{ 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: [{
|
|
12234
|
+
type: ViewChildren,
|
|
12235
|
+
args: [CaseEditFormComponent]
|
|
12236
|
+
}] }); })();
|
|
12237
|
+
(() => { (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 }); })();
|
|
12215
12238
|
|
|
12216
12239
|
class CallbackErrorsContext {
|
|
12217
12240
|
triggerText;
|