@hmcts/ccd-case-ui-toolkit 7.3.44-exui-4368-2916-1 → 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,10 +6658,23 @@ 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
|
-
this.
|
|
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;
|
|
6673
|
+
}
|
|
6674
|
+
else {
|
|
6675
|
+
this.caseField.label = substitutedLabel;
|
|
6676
|
+
this.caseField.isTranslated = false;
|
|
6677
|
+
}
|
|
6667
6678
|
}
|
|
6668
6679
|
if (this.shouldSubstitute('hint_text')) {
|
|
6669
6680
|
this.caseField.hint_text = this.resolvePlaceholders(fields, this.caseField.hint_text);
|
|
@@ -6672,83 +6683,14 @@ class LabelSubstitutorDirective {
|
|
|
6672
6683
|
this.caseField.value = this.resolvePlaceholders(fields, this.caseField.value);
|
|
6673
6684
|
}
|
|
6674
6685
|
}
|
|
6675
|
-
applyLabelSubstitution(fields, isLanguageChange) {
|
|
6676
|
-
const currentLabel = this.caseField.label;
|
|
6677
|
-
// `originalLabel` stores the label exactly as it came from the server, before any
|
|
6678
|
-
// placeholder values were inserted. That gives us a clean starting point when the user
|
|
6679
|
-
// changes language or returns to the page later.
|
|
6680
|
-
const originalLabel = this.caseField.originalLabel || currentLabel;
|
|
6681
|
-
const substitutedCurrentLabel = this.resolvePlaceholders(fields, currentLabel);
|
|
6682
|
-
const substitutedOriginalLabel = originalLabel === currentLabel
|
|
6683
|
-
? substitutedCurrentLabel
|
|
6684
|
-
: this.resolvePlaceholders(fields, originalLabel);
|
|
6685
|
-
const substitutedLabel = substitutedCurrentLabel || substitutedOriginalLabel;
|
|
6686
|
-
const hasAnyLabelSubstitution = (currentLabel && currentLabel !== substitutedCurrentLabel)
|
|
6687
|
-
|| (originalLabel && originalLabel !== substitutedOriginalLabel);
|
|
6688
|
-
if (!hasAnyLabelSubstitution) {
|
|
6689
|
-
// No placeholders were resolved, so keep the current label and allow the render layer
|
|
6690
|
-
// to translate it normally if needed.
|
|
6691
|
-
this.setLabelState(substitutedLabel);
|
|
6692
|
-
return;
|
|
6693
|
-
}
|
|
6694
|
-
// Preserve the original template the first time we successfully interpolate it.
|
|
6695
|
-
this.caseField.originalLabel = this.caseField.originalLabel || originalLabel;
|
|
6696
|
-
this.applyTranslatedLabelState(fields, originalLabel, substitutedLabel, isLanguageChange);
|
|
6697
|
-
}
|
|
6698
|
-
applyTranslatedLabelState(fields, originalLabel, substitutedLabel, isLanguageChange) {
|
|
6699
|
-
// Some labels only translate correctly if we translate the template first and then
|
|
6700
|
-
// substitute the helper values into the translated sentence.
|
|
6701
|
-
const translatedTemplateLabel = this.resolvePlaceholders(fields, isLanguageChange ? this.translateLabelOnLanguageChange(originalLabel) : this.translateLabel(originalLabel));
|
|
6702
|
-
// Other labels only translate correctly if we first resolve the English phrase and let
|
|
6703
|
-
// the render layer translate that final resolved string.
|
|
6704
|
-
const translatedResolvedLabel = isLanguageChange
|
|
6705
|
-
? this.translateLabelOnLanguageChange(substitutedLabel)
|
|
6706
|
-
: this.translateLabel(substitutedLabel);
|
|
6707
|
-
const languageIsWelsh = this.rpxTranslationService.language === 'cy';
|
|
6708
|
-
const hasResolvedWelshTranslation = languageIsWelsh
|
|
6709
|
-
&& translatedResolvedLabel
|
|
6710
|
-
&& translatedResolvedLabel !== substitutedLabel;
|
|
6711
|
-
const hasTemplateWelshTranslation = languageIsWelsh
|
|
6712
|
-
&& translatedTemplateLabel
|
|
6713
|
-
&& translatedTemplateLabel !== substitutedLabel;
|
|
6714
|
-
if (hasResolvedWelshTranslation) {
|
|
6715
|
-
// Keep the resolved English label and mark it as not yet translated so the field
|
|
6716
|
-
// template can run `rpxTranslate` on the full phrase at render time.
|
|
6717
|
-
this.setLabelState(substitutedLabel);
|
|
6718
|
-
return;
|
|
6719
|
-
}
|
|
6720
|
-
if (hasTemplateWelshTranslation) {
|
|
6721
|
-
// Use the template-translated result when translating the fully resolved label does
|
|
6722
|
-
// not improve the Welsh output.
|
|
6723
|
-
this.setLabelState(translatedTemplateLabel, true);
|
|
6724
|
-
return;
|
|
6725
|
-
}
|
|
6726
|
-
// English, untranslated Welsh, or labels whose translation is handled elsewhere.
|
|
6727
|
-
this.setLabelState(substitutedLabel);
|
|
6728
|
-
}
|
|
6729
|
-
translateLabel(label) {
|
|
6730
|
-
return this.rpxTranslationPipe.transform(label);
|
|
6731
|
-
}
|
|
6732
|
-
translateLabelOnLanguageChange(label) {
|
|
6733
|
-
return this.rpxTranslationService.language === 'en'
|
|
6734
|
-
? label
|
|
6735
|
-
: this.translateLabel(label);
|
|
6736
|
-
}
|
|
6737
|
-
setLabelState(label, isTranslated = false) {
|
|
6738
|
-
this.caseField.label = label;
|
|
6739
|
-
this.caseField.isTranslated = isTranslated;
|
|
6740
|
-
}
|
|
6741
6686
|
onLanguageChange() {
|
|
6742
|
-
this.resetToInitialValues(
|
|
6743
|
-
this.applySubstitutions(
|
|
6687
|
+
this.resetToInitialValues();
|
|
6688
|
+
this.applySubstitutions();
|
|
6744
6689
|
}
|
|
6745
|
-
resetToInitialValues(
|
|
6746
|
-
if (
|
|
6690
|
+
resetToInitialValues() {
|
|
6691
|
+
if (this.caseField?.originalLabel) {
|
|
6747
6692
|
this.caseField.label = this.caseField.originalLabel;
|
|
6748
6693
|
}
|
|
6749
|
-
if (!isLanguageChange && this.initialLabel) {
|
|
6750
|
-
this.caseField.label = this.initialLabel;
|
|
6751
|
-
}
|
|
6752
6694
|
if (this.initialHintText) {
|
|
6753
6695
|
this.caseField.hint_text = this.initialHintText;
|
|
6754
6696
|
}
|
|
@@ -11234,6 +11176,7 @@ class CaseEditPageComponent {
|
|
|
11234
11176
|
addressService;
|
|
11235
11177
|
linkedCasesService;
|
|
11236
11178
|
caseFlagStateService;
|
|
11179
|
+
zone;
|
|
11237
11180
|
static RESUMED_FORM_DISCARD = 'RESUMED_FORM_DISCARD';
|
|
11238
11181
|
static NEW_FORM_DISCARD = 'NEW_FORM_DISCARD';
|
|
11239
11182
|
static NEW_FORM_SAVE = 'NEW_FORM_CHANGED_SAVE';
|
|
@@ -11269,12 +11212,19 @@ class CaseEditPageComponent {
|
|
|
11269
11212
|
window.scrollTo(0, 0);
|
|
11270
11213
|
}
|
|
11271
11214
|
static setFocusToTop() {
|
|
11272
|
-
|
|
11273
|
-
|
|
11274
|
-
|
|
11275
|
-
|
|
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
|
+
});
|
|
11276
11226
|
}
|
|
11277
|
-
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) {
|
|
11278
11228
|
this.caseEdit = caseEdit;
|
|
11279
11229
|
this.route = route;
|
|
11280
11230
|
this.formValueService = formValueService;
|
|
@@ -11290,6 +11240,7 @@ class CaseEditPageComponent {
|
|
|
11290
11240
|
this.addressService = addressService;
|
|
11291
11241
|
this.linkedCasesService = linkedCasesService;
|
|
11292
11242
|
this.caseFlagStateService = caseFlagStateService;
|
|
11243
|
+
this.zone = zone;
|
|
11293
11244
|
this.multipageComponentStateService.setInstigator(this);
|
|
11294
11245
|
}
|
|
11295
11246
|
onFinalNext() {
|
|
@@ -11353,7 +11304,9 @@ class CaseEditPageComponent {
|
|
|
11353
11304
|
}
|
|
11354
11305
|
this.triggerText = this.getTriggerText();
|
|
11355
11306
|
});
|
|
11356
|
-
|
|
11307
|
+
this.zone.onStable.pipe(take(1)).subscribe(() => {
|
|
11308
|
+
CaseEditPageComponent.setFocusToTop();
|
|
11309
|
+
});
|
|
11357
11310
|
this.caseEditFormSub = this.caseEditDataService.caseEditForm$.subscribe({
|
|
11358
11311
|
next: editForm => this.editForm = editForm
|
|
11359
11312
|
});
|
|
@@ -11906,8 +11859,8 @@ class CaseEditPageComponent {
|
|
|
11906
11859
|
}
|
|
11907
11860
|
});
|
|
11908
11861
|
}
|
|
11909
|
-
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)); };
|
|
11910
|
-
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) {
|
|
11911
11864
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
11912
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);
|
|
11913
11866
|
i0.ɵɵelement(7, "ccd-case-edit-generic-errors", 5);
|
|
@@ -11934,12 +11887,12 @@ class CaseEditPageComponent {
|
|
|
11934
11887
|
i0.ɵɵproperty("ngIf", ctx.currentPage);
|
|
11935
11888
|
i0.ɵɵadvance();
|
|
11936
11889
|
i0.ɵɵproperty("ngIf", ctx.caseEdit.isEventCompletionChecksRequired);
|
|
11937
|
-
} }, 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}"] });
|
|
11938
11891
|
}
|
|
11939
11892
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditPageComponent, [{
|
|
11940
11893
|
type: Component,
|
|
11941
|
-
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"] }]
|
|
11942
|
-
}], () => [{ 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); })();
|
|
11943
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 }); })();
|
|
11944
11897
|
|
|
11945
11898
|
class CallbackErrorsContext {
|