@hmcts/ccd-case-ui-toolkit 7.3.54-exui-4666-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.
|
@@ -4645,7 +4645,7 @@ const conditionSource = `{
|
|
|
4645
4645
|
/ OpenFormula
|
|
4646
4646
|
|
|
4647
4647
|
EnclosedFormula
|
|
4648
|
-
=
|
|
4648
|
+
= bracket formula:OpenFormula bracket join:(JoinComparator)*
|
|
4649
4649
|
{ return flat([ [formula], join[0] ], 1) }
|
|
4650
4650
|
|
|
4651
4651
|
OpenFormula
|
|
@@ -4658,7 +4658,7 @@ const conditionSource = `{
|
|
|
4658
4658
|
/ CompoundJoinComparator
|
|
4659
4659
|
|
|
4660
4660
|
CompoundJoinComparator
|
|
4661
|
-
= comp:Comparator
|
|
4661
|
+
= comp:Comparator bracket f:OpenFormula bracket
|
|
4662
4662
|
{ return [comp, f ] }
|
|
4663
4663
|
|
|
4664
4664
|
OpenEqualityCheck
|
|
@@ -4707,11 +4707,8 @@ const conditionSource = `{
|
|
|
4707
4707
|
= '"'val:[A-Za-z0-9.,* _&()/-]*'"'
|
|
4708
4708
|
{ return val.join(""); }
|
|
4709
4709
|
|
|
4710
|
-
|
|
4711
|
-
= _? "("+ _?
|
|
4712
|
-
|
|
4713
|
-
closeBracket
|
|
4714
|
-
= _? ")" _?
|
|
4710
|
+
bracket
|
|
4711
|
+
= (_? "("+ _? / _? ")"+ _? )
|
|
4715
4712
|
|
|
4716
4713
|
operator
|
|
4717
4714
|
= "=" / "!=" / "CONTAINS"
|
|
@@ -10735,6 +10732,7 @@ function CaseEditFormComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
10735
10732
|
} }
|
|
10736
10733
|
class CaseEditFormComponent {
|
|
10737
10734
|
formValueService;
|
|
10735
|
+
conditionalShowFormDirectives;
|
|
10738
10736
|
fields = [];
|
|
10739
10737
|
formGroup;
|
|
10740
10738
|
caseFields = [];
|
|
@@ -10782,8 +10780,17 @@ class CaseEditFormComponent {
|
|
|
10782
10780
|
const current = JSON.stringify(this.formValueService.sanitise(changes));
|
|
10783
10781
|
this.initial !== current ? this.valuesChanged.emit(true) : this.valuesChanged.emit(false);
|
|
10784
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
|
+
}
|
|
10785
10787
|
static ɵfac = function CaseEditFormComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaseEditFormComponent)(i0.ɵɵdirectiveInject(FormValueService)); };
|
|
10786
|
-
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) {
|
|
10787
10794
|
i0.ɵɵtemplate(0, CaseEditFormComponent_ng_container_0_Template, 6, 11, "ng-container", 1);
|
|
10788
10795
|
} if (rf & 2) {
|
|
10789
10796
|
i0.ɵɵproperty("ngForOf", ctx.fields);
|
|
@@ -10792,7 +10799,10 @@ class CaseEditFormComponent {
|
|
|
10792
10799
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditFormComponent, [{
|
|
10793
10800
|
type: Component,
|
|
10794
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" }]
|
|
10795
|
-
}], () => [{ type: FormValueService }], {
|
|
10802
|
+
}], () => [{ type: FormValueService }], { conditionalShowFormDirectives: [{
|
|
10803
|
+
type: ViewChildren,
|
|
10804
|
+
args: [ConditionalShowFormDirective]
|
|
10805
|
+
}], fields: [{
|
|
10796
10806
|
type: Input
|
|
10797
10807
|
}], formGroup: [{
|
|
10798
10808
|
type: Input
|
|
@@ -10803,7 +10813,7 @@ class CaseEditFormComponent {
|
|
|
10803
10813
|
}], valuesChanged: [{
|
|
10804
10814
|
type: Output
|
|
10805
10815
|
}] }); })();
|
|
10806
|
-
(() => { (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 }); })();
|
|
10807
10817
|
|
|
10808
10818
|
class CaseEditDataService {
|
|
10809
10819
|
details$ = new BehaviorSubject(null);
|
|
@@ -11339,6 +11349,7 @@ class CaseEditPageComponent {
|
|
|
11339
11349
|
dialogRefAfterClosedSub;
|
|
11340
11350
|
saveDraftSub;
|
|
11341
11351
|
caseFormValidationErrorsSub;
|
|
11352
|
+
caseEditFormComponents;
|
|
11342
11353
|
static scrollToTop() {
|
|
11343
11354
|
window.scrollTo(0, 0);
|
|
11344
11355
|
}
|
|
@@ -11654,6 +11665,7 @@ class CaseEditPageComponent {
|
|
|
11654
11665
|
}
|
|
11655
11666
|
this.caseEditDataService.clearFormValidationErrors();
|
|
11656
11667
|
this.checkForStagesCompleted();
|
|
11668
|
+
this.caseEditFormComponents?.forEach(component => component.syncConditionalShowStates());
|
|
11657
11669
|
if (this.currentPageIsNotValid()) {
|
|
11658
11670
|
// The generateErrorMessage method filters out the hidden fields.
|
|
11659
11671
|
// The error message for LinkedCases journey will never get displayed because the
|
|
@@ -11985,7 +11997,12 @@ class CaseEditPageComponent {
|
|
|
11985
11997
|
});
|
|
11986
11998
|
}
|
|
11987
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)); };
|
|
11988
|
-
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) {
|
|
11989
12006
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
11990
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);
|
|
11991
12008
|
i0.ɵɵelement(7, "ccd-case-edit-generic-errors", 5);
|
|
@@ -12017,8 +12034,11 @@ class CaseEditPageComponent {
|
|
|
12017
12034
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditPageComponent, [{
|
|
12018
12035
|
type: Component,
|
|
12019
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"] }]
|
|
12020
|
-
}], () => [{ 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 }],
|
|
12021
|
-
|
|
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 }); })();
|
|
12022
12042
|
|
|
12023
12043
|
class CallbackErrorsContext {
|
|
12024
12044
|
triggerText;
|