@hmcts/ccd-case-ui-toolkit 7.3.44-exui-4368-2916 → 7.3.44-pofcc-75
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.
|
@@ -6624,7 +6624,6 @@ class LabelSubstitutorDirective {
|
|
|
6624
6624
|
contextFields = [];
|
|
6625
6625
|
formGroup;
|
|
6626
6626
|
elementsToSubstitute = ['label', 'hint_text'];
|
|
6627
|
-
initialLabel;
|
|
6628
6627
|
initialHintText;
|
|
6629
6628
|
languageSubscription;
|
|
6630
6629
|
constructor(fieldsUtils, placeholderService, rpxTranslationPipe, rpxTranslationService) {
|
|
@@ -6634,10 +6633,9 @@ class LabelSubstitutorDirective {
|
|
|
6634
6633
|
this.rpxTranslationService = rpxTranslationService;
|
|
6635
6634
|
}
|
|
6636
6635
|
ngOnInit() {
|
|
6637
|
-
this.initialLabel = this.caseField.label;
|
|
6638
6636
|
this.initialHintText = this.caseField.hint_text;
|
|
6637
|
+
this.caseField.originalLabel = this.caseField.label;
|
|
6639
6638
|
this.noCacheProcessing();
|
|
6640
|
-
this.caseField.originalLabel = this.caseField.originalLabel || this.caseField.label;
|
|
6641
6639
|
this.formGroup = this.formGroup || new FormGroup({});
|
|
6642
6640
|
this.languageSubscription = this.rpxTranslationService.language$.pipe(skip(1)).subscribe(() => {
|
|
6643
6641
|
this.onLanguageChange();
|
|
@@ -6660,56 +6658,22 @@ class LabelSubstitutorDirective {
|
|
|
6660
6658
|
}
|
|
6661
6659
|
}
|
|
6662
6660
|
}
|
|
6663
|
-
applySubstitutions(
|
|
6661
|
+
applySubstitutions() {
|
|
6664
6662
|
const fields = this.getReadOnlyAndFormFields();
|
|
6665
6663
|
if (this.shouldSubstitute('label')) {
|
|
6666
|
-
const
|
|
6667
|
-
|
|
6668
|
-
|
|
6669
|
-
|
|
6670
|
-
|
|
6671
|
-
|
|
6672
|
-
|
|
6673
|
-
|
|
6674
|
-
|
|
6675
|
-
const substitutedLabel = substitutedCurrentLabel || substitutedOriginalLabel;
|
|
6676
|
-
const languageIsWelsh = this.rpxTranslationService.language === 'cy';
|
|
6677
|
-
const hasAnyLabelSubstitution = (currentLabel && currentLabel !== substitutedCurrentLabel)
|
|
6678
|
-
|| (originalLabel && originalLabel !== substitutedOriginalLabel);
|
|
6679
|
-
if (hasAnyLabelSubstitution) {
|
|
6680
|
-
// Preserve the original template the first time we successfully interpolate it.
|
|
6681
|
-
this.caseField.originalLabel = this.caseField.originalLabel || originalLabel;
|
|
6682
|
-
// Some labels only translate correctly if we translate the template first and then
|
|
6683
|
-
// substitute the helper values into the translated sentence.
|
|
6684
|
-
const translatedTemplateLabel = this.resolvePlaceholders(fields, this.translateLabel(originalLabel, isLanguageChange));
|
|
6685
|
-
// Other labels only translate correctly if we first resolve the English phrase and let
|
|
6686
|
-
// the render layer translate that final resolved string.
|
|
6687
|
-
const translatedResolvedLabel = this.translateLabel(substitutedLabel, isLanguageChange);
|
|
6688
|
-
const hasResolvedWelshTranslation = languageIsWelsh
|
|
6689
|
-
&& translatedResolvedLabel
|
|
6690
|
-
&& translatedResolvedLabel !== substitutedLabel;
|
|
6691
|
-
const hasTemplateWelshTranslation = languageIsWelsh
|
|
6692
|
-
&& translatedTemplateLabel
|
|
6693
|
-
&& translatedTemplateLabel !== substitutedLabel;
|
|
6694
|
-
if (hasResolvedWelshTranslation) {
|
|
6695
|
-
// Keep the resolved English label and mark it as not yet translated so the field
|
|
6696
|
-
// template can run `rpxTranslate` on the full phrase at render time.
|
|
6697
|
-
this.setLabelState(substitutedLabel);
|
|
6698
|
-
}
|
|
6699
|
-
else if (hasTemplateWelshTranslation) {
|
|
6700
|
-
// Use the template-translated result when translating the fully resolved label does
|
|
6701
|
-
// not improve the Welsh output.
|
|
6702
|
-
this.setLabelState(translatedTemplateLabel, true);
|
|
6703
|
-
}
|
|
6704
|
-
else {
|
|
6705
|
-
// English, untranslated Welsh, or labels whose translation is handled elsewhere.
|
|
6706
|
-
this.setLabelState(substitutedLabel);
|
|
6707
|
-
}
|
|
6664
|
+
const oldLabel = this.caseField.label;
|
|
6665
|
+
const substitutedLabel = this.resolvePlaceholders(fields, this.caseField.label);
|
|
6666
|
+
if (oldLabel && oldLabel !== substitutedLabel) {
|
|
6667
|
+
// we need to translate the uninterpolated data then substitute the values in translated string
|
|
6668
|
+
this.caseField.originalLabel = substitutedLabel;
|
|
6669
|
+
const translated = this.rpxTranslationPipe.transform(oldLabel);
|
|
6670
|
+
const transSubstitutedLabel = this.resolvePlaceholders(fields, translated);
|
|
6671
|
+
this.caseField.label = transSubstitutedLabel;
|
|
6672
|
+
this.caseField.isTranslated = this.rpxTranslationService.language === 'cy' && translated !== oldLabel;
|
|
6708
6673
|
}
|
|
6709
6674
|
else {
|
|
6710
|
-
|
|
6711
|
-
|
|
6712
|
-
this.setLabelState(substitutedLabel);
|
|
6675
|
+
this.caseField.label = substitutedLabel;
|
|
6676
|
+
this.caseField.isTranslated = false;
|
|
6713
6677
|
}
|
|
6714
6678
|
}
|
|
6715
6679
|
if (this.shouldSubstitute('hint_text')) {
|
|
@@ -6719,26 +6683,14 @@ class LabelSubstitutorDirective {
|
|
|
6719
6683
|
this.caseField.value = this.resolvePlaceholders(fields, this.caseField.value);
|
|
6720
6684
|
}
|
|
6721
6685
|
}
|
|
6722
|
-
translateLabel(label, isLanguageChange) {
|
|
6723
|
-
return isLanguageChange && this.rpxTranslationService.language === 'en'
|
|
6724
|
-
? label
|
|
6725
|
-
: this.rpxTranslationPipe.transform(label);
|
|
6726
|
-
}
|
|
6727
|
-
setLabelState(label, isTranslated = false) {
|
|
6728
|
-
this.caseField.label = label;
|
|
6729
|
-
this.caseField.isTranslated = isTranslated;
|
|
6730
|
-
}
|
|
6731
6686
|
onLanguageChange() {
|
|
6732
|
-
this.resetToInitialValues(
|
|
6733
|
-
this.applySubstitutions(
|
|
6687
|
+
this.resetToInitialValues();
|
|
6688
|
+
this.applySubstitutions();
|
|
6734
6689
|
}
|
|
6735
|
-
resetToInitialValues(
|
|
6736
|
-
if (
|
|
6690
|
+
resetToInitialValues() {
|
|
6691
|
+
if (this.caseField?.originalLabel) {
|
|
6737
6692
|
this.caseField.label = this.caseField.originalLabel;
|
|
6738
6693
|
}
|
|
6739
|
-
if (!isLanguageChange && this.initialLabel) {
|
|
6740
|
-
this.caseField.label = this.initialLabel;
|
|
6741
|
-
}
|
|
6742
6694
|
if (this.initialHintText) {
|
|
6743
6695
|
this.caseField.hint_text = this.initialHintText;
|
|
6744
6696
|
}
|
|
@@ -11224,6 +11176,7 @@ class CaseEditPageComponent {
|
|
|
11224
11176
|
addressService;
|
|
11225
11177
|
linkedCasesService;
|
|
11226
11178
|
caseFlagStateService;
|
|
11179
|
+
zone;
|
|
11227
11180
|
static RESUMED_FORM_DISCARD = 'RESUMED_FORM_DISCARD';
|
|
11228
11181
|
static NEW_FORM_DISCARD = 'NEW_FORM_DISCARD';
|
|
11229
11182
|
static NEW_FORM_SAVE = 'NEW_FORM_CHANGED_SAVE';
|
|
@@ -11259,12 +11212,19 @@ class CaseEditPageComponent {
|
|
|
11259
11212
|
window.scrollTo(0, 0);
|
|
11260
11213
|
}
|
|
11261
11214
|
static setFocusToTop() {
|
|
11262
|
-
|
|
11263
|
-
|
|
11264
|
-
|
|
11265
|
-
|
|
11215
|
+
window.requestAnimationFrame(() => {
|
|
11216
|
+
const pageHeading = document.getElementById('page-heading');
|
|
11217
|
+
if (pageHeading) {
|
|
11218
|
+
pageHeading.focus();
|
|
11219
|
+
return;
|
|
11220
|
+
}
|
|
11221
|
+
const topContainer = document.getElementById('top');
|
|
11222
|
+
if (topContainer) {
|
|
11223
|
+
topContainer.focus();
|
|
11224
|
+
}
|
|
11225
|
+
});
|
|
11266
11226
|
}
|
|
11267
|
-
constructor(caseEdit, route, formValueService, formErrorService, cdRef, pageValidationService, dialog, caseFieldService, caseEditDataService, loadingService, validPageListCaseFieldsService, multipageComponentStateService, addressService, linkedCasesService, caseFlagStateService) {
|
|
11227
|
+
constructor(caseEdit, route, formValueService, formErrorService, cdRef, pageValidationService, dialog, caseFieldService, caseEditDataService, loadingService, validPageListCaseFieldsService, multipageComponentStateService, addressService, linkedCasesService, caseFlagStateService, zone) {
|
|
11268
11228
|
this.caseEdit = caseEdit;
|
|
11269
11229
|
this.route = route;
|
|
11270
11230
|
this.formValueService = formValueService;
|
|
@@ -11280,6 +11240,7 @@ class CaseEditPageComponent {
|
|
|
11280
11240
|
this.addressService = addressService;
|
|
11281
11241
|
this.linkedCasesService = linkedCasesService;
|
|
11282
11242
|
this.caseFlagStateService = caseFlagStateService;
|
|
11243
|
+
this.zone = zone;
|
|
11283
11244
|
this.multipageComponentStateService.setInstigator(this);
|
|
11284
11245
|
}
|
|
11285
11246
|
onFinalNext() {
|
|
@@ -11343,7 +11304,9 @@ class CaseEditPageComponent {
|
|
|
11343
11304
|
}
|
|
11344
11305
|
this.triggerText = this.getTriggerText();
|
|
11345
11306
|
});
|
|
11346
|
-
|
|
11307
|
+
this.zone.onStable.pipe(take(1)).subscribe(() => {
|
|
11308
|
+
CaseEditPageComponent.setFocusToTop();
|
|
11309
|
+
});
|
|
11347
11310
|
this.caseEditFormSub = this.caseEditDataService.caseEditForm$.subscribe({
|
|
11348
11311
|
next: editForm => this.editForm = editForm
|
|
11349
11312
|
});
|
|
@@ -11896,8 +11859,8 @@ class CaseEditPageComponent {
|
|
|
11896
11859
|
}
|
|
11897
11860
|
});
|
|
11898
11861
|
}
|
|
11899
|
-
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)); };
|
|
11900
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEditPageComponent, selectors: [["ccd-case-edit-page"]], 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) {
|
|
11862
|
+
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), i0.ɵɵdirectiveInject(i0.NgZone)); };
|
|
11863
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEditPageComponent, selectors: [["ccd-case-edit-page"]], 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", "id", "page-heading", "tabindex", "-1", 4, "ngIf"], ["id", "page-heading", "tabindex", "-1", 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) {
|
|
11901
11864
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
11902
11865
|
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);
|
|
11903
11866
|
i0.ɵɵelement(7, "ccd-case-edit-generic-errors", 5);
|
|
@@ -11924,12 +11887,12 @@ class CaseEditPageComponent {
|
|
|
11924
11887
|
i0.ɵɵproperty("ngIf", ctx.currentPage);
|
|
11925
11888
|
i0.ɵɵadvance();
|
|
11926
11889
|
i0.ɵɵproperty("ngIf", ctx.caseEdit.isEventCompletionChecksRequired);
|
|
11927
|
-
} }, styles: [".rightBorderSeparator[_ngcontent-%COMP%]{border-right-width:4px;border-right-color:#ffcc02;border-right-style:solid}.validation-error[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:#d4351c}"] });
|
|
11890
|
+
} }, styles: [".rightBorderSeparator[_ngcontent-%COMP%]{border-right-width:4px;border-right-color:#ffcc02;border-right-style:solid}.validation-error[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:#d4351c}#page-heading[_ngcontent-%COMP%]:focus{outline:none}"] });
|
|
11928
11891
|
}
|
|
11929
11892
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditPageComponent, [{
|
|
11930
11893
|
type: Component,
|
|
11931
|
-
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"] }]
|
|
11932
|
-
}], () => [{ 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 }], null); })();
|
|
11894
|
+
args: [{ selector: 'ccd-case-edit-page', standalone: false, template: "<ng-container *ngIf=\"currentPage\">\n <h1 *ngIf=\"!currentPage.label\" class=\"govuk-heading-l\" id=\"page-heading\" tabindex=\"-1\">{{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\" id=\"page-heading\" tabindex=\"-1\">{{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}#page-heading:focus{outline:none}\n"] }]
|
|
11895
|
+
}], () => [{ 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 }, { type: i0.NgZone }], null); })();
|
|
11933
11896
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEditPageComponent, { className: "CaseEditPageComponent", filePath: "lib/shared/components/case-editor/case-edit-page/case-edit-page.component.ts", lineNumber: 35 }); })();
|
|
11934
11897
|
|
|
11935
11898
|
class CallbackErrorsContext {
|