@hmcts/ccd-case-ui-toolkit 7.4.15-EXUI-5378 → 7.4.15-exui-5388

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.
@@ -3689,6 +3689,7 @@ class CaseField {
3689
3689
  _value;
3690
3690
  _list_items = [];
3691
3691
  isTranslatedFlag = false;
3692
+ _translationHandledLocally;
3692
3693
  get value() {
3693
3694
  if (this.field_type && (this.field_type.type === 'DynamicList' || this.field_type.type === 'DynamicRadioList')) {
3694
3695
  return this._value && this._value.value ? this._value.value.code : this._value;
@@ -3810,11 +3811,17 @@ class CaseField {
3810
3811
  return this.id;
3811
3812
  }
3812
3813
  }
3814
+ get isTranslated() {
3815
+ return this.isTranslatedFlag;
3816
+ }
3813
3817
  set isTranslated(val) {
3814
3818
  this.isTranslatedFlag = val;
3815
3819
  }
3816
- get isTranslated() {
3817
- return this.isTranslatedFlag;
3820
+ get translationHandledLocally() {
3821
+ return !!this._translationHandledLocally;
3822
+ }
3823
+ set translationHandledLocally(value) {
3824
+ this._translationHandledLocally = value;
3818
3825
  }
3819
3826
  }
3820
3827
  __decorate([
@@ -7880,8 +7887,8 @@ ___
7880
7887
  class LabelSubstitutorDirective {
7881
7888
  fieldsUtils;
7882
7889
  placeholderService;
7883
- rpxTranslationPipe;
7884
7890
  rpxTranslationService;
7891
+ cdr;
7885
7892
  caseField;
7886
7893
  contextFields = [];
7887
7894
  formGroup;
@@ -7889,11 +7896,12 @@ class LabelSubstitutorDirective {
7889
7896
  initialLabel;
7890
7897
  initialHintText;
7891
7898
  languageSubscription;
7892
- constructor(fieldsUtils, placeholderService, rpxTranslationPipe, rpxTranslationService) {
7899
+ templateTranslationSubscription;
7900
+ constructor(fieldsUtils, placeholderService, rpxTranslationService, cdr) {
7893
7901
  this.fieldsUtils = fieldsUtils;
7894
7902
  this.placeholderService = placeholderService;
7895
- this.rpxTranslationPipe = rpxTranslationPipe;
7896
7903
  this.rpxTranslationService = rpxTranslationService;
7904
+ this.cdr = cdr;
7897
7905
  }
7898
7906
  ngOnInit() {
7899
7907
  this.initialLabel = this.caseField.label;
@@ -7922,10 +7930,12 @@ class LabelSubstitutorDirective {
7922
7930
  }
7923
7931
  }
7924
7932
  }
7925
- applySubstitutions(isLanguageChange = false) {
7933
+ applySubstitutions() {
7934
+ this.templateTranslationSubscription?.unsubscribe();
7926
7935
  const fields = this.getReadOnlyAndFormFields();
7936
+ this.caseField.translationHandledLocally = false;
7927
7937
  if (this.shouldSubstitute('label')) {
7928
- this.applyLabelSubstitution(fields, isLanguageChange);
7938
+ this.applyLabelSubstitution(fields);
7929
7939
  }
7930
7940
  if (this.shouldSubstitute('hint_text')) {
7931
7941
  this.caseField.hint_text = this.resolvePlaceholders(fields, this.caseField.hint_text);
@@ -7934,7 +7944,7 @@ class LabelSubstitutorDirective {
7934
7944
  this.caseField.value = this.resolvePlaceholders(fields, this.caseField.value);
7935
7945
  }
7936
7946
  }
7937
- applyLabelSubstitution(fields, isLanguageChange) {
7947
+ applyLabelSubstitution(fields) {
7938
7948
  const currentLabel = this.caseField.label;
7939
7949
  // `originalLabel` stores the label exactly as it came from the server, before any
7940
7950
  // placeholder values were inserted. That gives us a clean starting point when the user
@@ -7955,46 +7965,41 @@ class LabelSubstitutorDirective {
7955
7965
  }
7956
7966
  // Preserve the original template the first time we successfully interpolate it.
7957
7967
  this.caseField.originalLabel = this.caseField.originalLabel || originalLabel;
7958
- this.applyTranslatedLabelState(fields, originalLabel, substitutedLabel, isLanguageChange);
7959
- }
7960
- applyTranslatedLabelState(fields, originalLabel, substitutedLabel, isLanguageChange) {
7961
- // Some labels only translate correctly if we translate the template first and then
7962
- // substitute the helper values into the translated sentence.
7963
- const translatedTemplateLabel = this.resolvePlaceholders(fields, isLanguageChange ? this.translateLabelOnLanguageChange(originalLabel) : this.translateLabel(originalLabel));
7964
- // Other labels only translate correctly if we first resolve the English phrase and let
7965
- // the render layer translate that final resolved string.
7966
- const translatedResolvedLabel = isLanguageChange
7967
- ? this.translateLabelOnLanguageChange(substitutedLabel)
7968
- : this.translateLabel(substitutedLabel);
7969
- const languageIsWelsh = this.rpxTranslationService.language === 'cy';
7970
- const hasResolvedWelshTranslation = languageIsWelsh
7971
- && translatedResolvedLabel
7972
- && translatedResolvedLabel !== substitutedLabel;
7973
- const hasTemplateWelshTranslation = languageIsWelsh
7974
- && translatedTemplateLabel
7975
- && translatedTemplateLabel !== substitutedLabel;
7976
- if (hasResolvedWelshTranslation) {
7977
- // Keep the resolved English label and mark it as not yet translated so the field
7978
- // template can run `rpxTranslate` on the full phrase at render time.
7979
- this.setLabelState(substitutedLabel);
7980
- return;
7981
- }
7982
- if (hasTemplateWelshTranslation) {
7983
- // Use the template-translated result when translating the fully resolved label does
7984
- // not improve the Welsh output.
7985
- this.setLabelState(translatedTemplateLabel, true);
7968
+ this.applyTranslatedLabelState(fields, originalLabel, substitutedLabel);
7969
+ }
7970
+ applyTranslatedLabelState(fields, originalLabel, substitutedLabel) {
7971
+ // Interpolated content must be rendered without another translation request.
7972
+ this.caseField.translationHandledLocally = true;
7973
+ this.setLabelState(substitutedLabel, false);
7974
+ if (this.rpxTranslationService.language !== 'cy') {
7986
7975
  return;
7987
7976
  }
7988
- // English, untranslated Welsh, or labels whose translation is handled elsewhere.
7989
- this.setLabelState(substitutedLabel);
7990
- }
7991
- translateLabel(label) {
7992
- return this.rpxTranslationPipe.transform(label);
7993
- }
7994
- translateLabelOnLanguageChange(label) {
7995
- return this.rpxTranslationService.language === 'en'
7996
- ? label
7997
- : this.translateLabel(label);
7977
+ this.templateTranslationSubscription = this.rpxTranslationService
7978
+ .getTranslation$(originalLabel)
7979
+ .subscribe((translatedTemplate) => {
7980
+ if (this.rpxTranslationService.language !== 'cy' ||
7981
+ !translatedTemplate ||
7982
+ translatedTemplate.includes('[Translation in progress]')) {
7983
+ return;
7984
+ }
7985
+ // Initial English emissions and English fallbacks are not Welsh results.
7986
+ if (translatedTemplate.trim() === originalLabel.trim()) {
7987
+ this.setLabelState(substitutedLabel, false);
7988
+ this.cdr.markForCheck();
7989
+ return;
7990
+ }
7991
+ // Re-read values at emission time so delayed translations use the latest form/context values.
7992
+ const latestFields = this.getReadOnlyAndFormFields();
7993
+ const resolvedLabel = this.resolvePlaceholders(latestFields, translatedTemplate);
7994
+ // Keep usable existing content if the template cannot be resolved.
7995
+ if (resolvedLabel && resolvedLabel.trim()) {
7996
+ this.setLabelState(resolvedLabel, resolvedLabel !== substitutedLabel);
7997
+ }
7998
+ else {
7999
+ this.setLabelState(substitutedLabel, false);
8000
+ }
8001
+ this.cdr.markForCheck();
8002
+ });
7998
8003
  }
7999
8004
  setLabelState(label, isTranslated = false) {
8000
8005
  this.caseField.label = label;
@@ -8002,7 +8007,7 @@ class LabelSubstitutorDirective {
8002
8007
  }
8003
8008
  onLanguageChange() {
8004
8009
  this.resetToInitialValues(true);
8005
- this.applySubstitutions(true);
8010
+ this.applySubstitutions();
8006
8011
  }
8007
8012
  resetToInitialValues(isLanguageChange = false) {
8008
8013
  if (isLanguageChange && this.caseField?.originalLabel) {
@@ -8017,6 +8022,7 @@ class LabelSubstitutorDirective {
8017
8022
  // Check if isTranslated is a property on caseField before setting it
8018
8023
  if (this.caseField) {
8019
8024
  this.caseField.isTranslated = false;
8025
+ this.caseField.translationHandledLocally = false;
8020
8026
  }
8021
8027
  }
8022
8028
  ngOnDestroy() {
@@ -8024,6 +8030,9 @@ class LabelSubstitutorDirective {
8024
8030
  if (this.languageSubscription) {
8025
8031
  this.languageSubscription.unsubscribe();
8026
8032
  }
8033
+ if (this.templateTranslationSubscription) {
8034
+ this.templateTranslationSubscription.unsubscribe();
8035
+ }
8027
8036
  }
8028
8037
  shouldSubstitute(element) {
8029
8038
  return this.elementsToSubstitute.find(e => e === element) !== undefined;
@@ -8050,7 +8059,7 @@ class LabelSubstitutorDirective {
8050
8059
  resolvePlaceholders(fields, stringToResolve) {
8051
8060
  return this.placeholderService.resolvePlaceholders(fields, stringToResolve);
8052
8061
  }
8053
- static ɵfac = function LabelSubstitutorDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LabelSubstitutorDirective)(i0.ɵɵdirectiveInject(FieldsUtils), i0.ɵɵdirectiveInject(PlaceholderService), i0.ɵɵdirectiveInject(i1.RpxTranslatePipe), i0.ɵɵdirectiveInject(i1.RpxTranslationService)); };
8062
+ static ɵfac = function LabelSubstitutorDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LabelSubstitutorDirective)(i0.ɵɵdirectiveInject(FieldsUtils), i0.ɵɵdirectiveInject(PlaceholderService), i0.ɵɵdirectiveInject(i1.RpxTranslationService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
8054
8063
  static ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: LabelSubstitutorDirective, selectors: [["", "ccdLabelSubstitutor", ""]], inputs: { caseField: "caseField", contextFields: "contextFields", formGroup: "formGroup", elementsToSubstitute: "elementsToSubstitute" }, standalone: false });
8055
8064
  }
8056
8065
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LabelSubstitutorDirective, [{
@@ -8059,7 +8068,7 @@ class LabelSubstitutorDirective {
8059
8068
  selector: '[ccdLabelSubstitutor]',
8060
8069
  standalone: false
8061
8070
  }]
8062
- }], () => [{ type: FieldsUtils }, { type: PlaceholderService }, { type: i1.RpxTranslatePipe }, { type: i1.RpxTranslationService }], { caseField: [{
8071
+ }], () => [{ type: FieldsUtils }, { type: PlaceholderService }, { type: i1.RpxTranslationService }, { type: i0.ChangeDetectorRef }], { caseField: [{
8063
8072
  type: Input
8064
8073
  }], contextFields: [{
8065
8074
  type: Input
@@ -19252,16 +19261,16 @@ class LabelFieldComponent {
19252
19261
  } if (rf & 2) {
19253
19262
  i0.ɵɵproperty("hidden", ctx.caseField.hidden)("caseField", ctx.caseField)("contextFields", ctx.caseFields)("id", ctx.caseField.id);
19254
19263
  i0.ɵɵadvance(2);
19255
- i0.ɵɵproperty("ngIf", ctx.labelCanBeTranslated && !ctx.caseField.isTranslated);
19264
+ i0.ɵɵproperty("ngIf", ctx.labelCanBeTranslated && !ctx.caseField.isTranslated && !ctx.caseField.translationHandledLocally);
19256
19265
  i0.ɵɵadvance();
19257
- i0.ɵɵproperty("ngIf", ctx.labelCanBeTranslated && ctx.caseField.isTranslated);
19266
+ i0.ɵɵproperty("ngIf", ctx.labelCanBeTranslated && (ctx.caseField.isTranslated || ctx.caseField.translationHandledLocally));
19258
19267
  i0.ɵɵadvance();
19259
19268
  i0.ɵɵproperty("ngIf", !ctx.labelCanBeTranslated);
19260
19269
  } }, encapsulation: 2 });
19261
19270
  }
19262
19271
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LabelFieldComponent, [{
19263
19272
  type: Component,
19264
- args: [{ selector: 'ccd-label-field', standalone: false, template: "<dl [hidden]=\"caseField.hidden\" class=\"case-field\" ccdLabelSubstitutor [caseField]=\"caseField\" [contextFields]=\"caseFields\" [id]=\"caseField.id\">\n <dt>\n <ccd-markdown *ngIf=\"labelCanBeTranslated && !caseField.isTranslated\" [content]=\"caseField.label | rpxTranslate\">\n </ccd-markdown>\n\n <ccd-markdown *ngIf=\"labelCanBeTranslated && caseField.isTranslated\" [content]=\"caseField.label\">\n </ccd-markdown>\n\n <ccd-markdown *ngIf=\"!labelCanBeTranslated\" [content]=\"caseField.value || caseField.label\">\n </ccd-markdown>\n </dt>\n <dd></dd>\n</dl>\n" }]
19273
+ args: [{ selector: 'ccd-label-field', standalone: false, template: "<dl [hidden]=\"caseField.hidden\" class=\"case-field\" ccdLabelSubstitutor [caseField]=\"caseField\" [contextFields]=\"caseFields\" [id]=\"caseField.id\">\n <dt>\n <ccd-markdown *ngIf=\"labelCanBeTranslated && !caseField.isTranslated && !caseField.translationHandledLocally\"\n [content]=\"caseField.label | rpxTranslate\">\n </ccd-markdown>\n\n <ccd-markdown *ngIf=\"labelCanBeTranslated && (caseField.isTranslated || caseField.translationHandledLocally)\"\n [content]=\"caseField.label\">\n </ccd-markdown>\n\n <ccd-markdown *ngIf=\"!labelCanBeTranslated\" [content]=\"caseField.value || caseField.label\">\n </ccd-markdown>\n </dt>\n <dd></dd>\n</dl>\n" }]
19265
19274
  }], null, { caseField: [{
19266
19275
  type: Input
19267
19276
  }], caseFields: [{
@@ -33566,8 +33575,8 @@ class UpdateFlagComponent extends AbstractJourneyComponent {
33566
33575
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UpdateFlagComponent, { className: "UpdateFlagComponent", filePath: "lib/shared/components/palette/case-flag/components/update-flag/update-flag.component.ts", lineNumber: 23 }); })();
33567
33576
 
33568
33577
  const _c0$n = a0 => ({ "form-group-error": a0 });
33569
- function UpdateFlagAddTranslationFormComponent_div_10_div_5_Template(rf, ctx) { if (rf & 1) {
33570
- i0.ɵɵelementStart(0, "div", 18)(1, "span", 19);
33578
+ function UpdateFlagAddTranslationFormComponent_div_14_Template(rf, ctx) { if (rf & 1) {
33579
+ i0.ɵɵelementStart(0, "div", 17)(1, "span", 18);
33571
33580
  i0.ɵɵtext(2);
33572
33581
  i0.ɵɵpipe(3, "rpxTranslate");
33573
33582
  i0.ɵɵelementEnd();
@@ -33575,14 +33584,14 @@ function UpdateFlagAddTranslationFormComponent_div_10_div_5_Template(rf, ctx) {
33575
33584
  i0.ɵɵpipe(5, "rpxTranslate");
33576
33585
  i0.ɵɵelementEnd();
33577
33586
  } if (rf & 2) {
33578
- const ctx_r0 = i0.ɵɵnextContext(2);
33587
+ const ctx_r0 = i0.ɵɵnextContext();
33579
33588
  i0.ɵɵadvance(2);
33580
33589
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 2, "Error:"));
33581
33590
  i0.ɵɵadvance(2);
33582
33591
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 4, ctx_r0.otherFlagDescriptionCharLimitErrorMessage), " ");
33583
33592
  } }
33584
- function UpdateFlagAddTranslationFormComponent_div_10_div_15_Template(rf, ctx) { if (rf & 1) {
33585
- i0.ɵɵelementStart(0, "div", 20)(1, "span", 19);
33593
+ function UpdateFlagAddTranslationFormComponent_div_24_Template(rf, ctx) { if (rf & 1) {
33594
+ i0.ɵɵelementStart(0, "div", 19)(1, "span", 18);
33586
33595
  i0.ɵɵtext(2);
33587
33596
  i0.ɵɵpipe(3, "rpxTranslate");
33588
33597
  i0.ɵɵelementEnd();
@@ -33590,62 +33599,14 @@ function UpdateFlagAddTranslationFormComponent_div_10_div_15_Template(rf, ctx) {
33590
33599
  i0.ɵɵpipe(5, "rpxTranslate");
33591
33600
  i0.ɵɵelementEnd();
33592
33601
  } if (rf & 2) {
33593
- const ctx_r0 = i0.ɵɵnextContext(2);
33602
+ const ctx_r0 = i0.ɵɵnextContext();
33594
33603
  i0.ɵɵadvance(2);
33595
33604
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 2, "Error:"));
33596
33605
  i0.ɵɵadvance(2);
33597
33606
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 4, ctx_r0.otherFlagDescriptionWelshCharLimitErrorMessage), " ");
33598
33607
  } }
33599
- function UpdateFlagAddTranslationFormComponent_div_10_Template(rf, ctx) { if (rf & 1) {
33600
- i0.ɵɵelementStart(0, "div")(1, "div", 7)(2, "label", 8);
33601
- i0.ɵɵtext(3);
33602
- i0.ɵɵpipe(4, "rpxTranslate");
33603
- i0.ɵɵelementEnd();
33604
- i0.ɵɵtemplate(5, UpdateFlagAddTranslationFormComponent_div_10_div_5_Template, 6, 6, "div", 14);
33605
- i0.ɵɵelementStart(6, "textarea", 10);
33606
- i0.ɵɵtext(7, " ");
33607
- i0.ɵɵelementEnd();
33608
- i0.ɵɵelementStart(8, "div", 15);
33609
- i0.ɵɵtext(9);
33610
- i0.ɵɵpipe(10, "rpxTranslate");
33611
- i0.ɵɵelementEnd()();
33612
- i0.ɵɵelementStart(11, "div", 7)(12, "label", 8);
33613
- i0.ɵɵtext(13);
33614
- i0.ɵɵpipe(14, "rpxTranslate");
33615
- i0.ɵɵelementEnd();
33616
- i0.ɵɵtemplate(15, UpdateFlagAddTranslationFormComponent_div_10_div_15_Template, 6, 6, "div", 16);
33617
- i0.ɵɵelementStart(16, "textarea", 10);
33618
- i0.ɵɵtext(17, " ");
33619
- i0.ɵɵelementEnd();
33620
- i0.ɵɵelementStart(18, "div", 17);
33621
- i0.ɵɵtext(19);
33622
- i0.ɵɵpipe(20, "rpxTranslate");
33623
- i0.ɵɵelementEnd()()();
33624
- } if (rf & 2) {
33625
- const ctx_r0 = i0.ɵɵnextContext();
33626
- i0.ɵɵadvance(2);
33627
- i0.ɵɵproperty("for", ctx_r0.caseFlagFormFields.OTHER_FLAG_DESCRIPTION);
33628
- i0.ɵɵadvance();
33629
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 14, "Other description"));
33630
- i0.ɵɵadvance(2);
33631
- i0.ɵɵproperty("ngIf", ctx_r0.otherFlagDescriptionCharLimitErrorMessage);
33632
- i0.ɵɵadvance();
33633
- i0.ɵɵproperty("id", ctx_r0.caseFlagFormFields.OTHER_FLAG_DESCRIPTION)("name", ctx_r0.caseFlagFormFields.OTHER_FLAG_DESCRIPTION)("formControlName", ctx_r0.caseFlagFormFields.OTHER_FLAG_DESCRIPTION);
33634
- i0.ɵɵadvance(3);
33635
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(10, 16, ctx_r0.updateFlagAddTranslationStepEnum.CHARACTER_LIMIT_INFO), " ");
33636
- i0.ɵɵadvance(3);
33637
- i0.ɵɵproperty("for", ctx_r0.caseFlagFormFields.OTHER_FLAG_DESCRIPTION_WELSH);
33638
- i0.ɵɵadvance();
33639
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(14, 18, "Other description (Welsh)"));
33640
- i0.ɵɵadvance(2);
33641
- i0.ɵɵproperty("ngIf", ctx_r0.otherFlagDescriptionWelshCharLimitErrorMessage);
33642
- i0.ɵɵadvance();
33643
- i0.ɵɵproperty("id", ctx_r0.caseFlagFormFields.OTHER_FLAG_DESCRIPTION_WELSH)("name", ctx_r0.caseFlagFormFields.OTHER_FLAG_DESCRIPTION_WELSH)("formControlName", ctx_r0.caseFlagFormFields.OTHER_FLAG_DESCRIPTION_WELSH);
33644
- i0.ɵɵadvance(3);
33645
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(20, 20, ctx_r0.updateFlagAddTranslationStepEnum.CHARACTER_LIMIT_INFO), " ");
33646
- } }
33647
- function UpdateFlagAddTranslationFormComponent_div_15_Template(rf, ctx) { if (rf & 1) {
33648
- i0.ɵɵelementStart(0, "div", 21)(1, "span", 19);
33608
+ function UpdateFlagAddTranslationFormComponent_div_34_Template(rf, ctx) { if (rf & 1) {
33609
+ i0.ɵɵelementStart(0, "div", 20)(1, "span", 18);
33649
33610
  i0.ɵɵtext(2);
33650
33611
  i0.ɵɵpipe(3, "rpxTranslate");
33651
33612
  i0.ɵɵelementEnd();
@@ -33659,8 +33620,8 @@ function UpdateFlagAddTranslationFormComponent_div_15_Template(rf, ctx) { if (rf
33659
33620
  i0.ɵɵadvance(2);
33660
33621
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 4, ctx_r0.flagCommentsCharLimitErrorMessage), " ");
33661
33622
  } }
33662
- function UpdateFlagAddTranslationFormComponent_div_25_Template(rf, ctx) { if (rf & 1) {
33663
- i0.ɵɵelementStart(0, "div", 22)(1, "span", 19);
33623
+ function UpdateFlagAddTranslationFormComponent_div_44_Template(rf, ctx) { if (rf & 1) {
33624
+ i0.ɵɵelementStart(0, "div", 21)(1, "span", 18);
33664
33625
  i0.ɵɵtext(2);
33665
33626
  i0.ɵɵpipe(3, "rpxTranslate");
33666
33627
  i0.ɵɵelementEnd();
@@ -33680,7 +33641,6 @@ class UpdateFlagAddTranslationFormComponent extends AbstractJourneyComponent {
33680
33641
  selectedFlag;
33681
33642
  updateFlagAddTranslationTitle;
33682
33643
  errorMessages = [];
33683
- otherFlagType = false;
33684
33644
  otherFlagDescriptionCharLimitErrorMessage = null;
33685
33645
  otherFlagDescriptionWelshCharLimitErrorMessage = null;
33686
33646
  flagCommentsCharLimitErrorMessage = null;
@@ -33688,12 +33648,10 @@ class UpdateFlagAddTranslationFormComponent extends AbstractJourneyComponent {
33688
33648
  updateFlagAddTranslationStepEnum = UpdateFlagAddTranslationStep;
33689
33649
  caseFlagFormFields = CaseFlagFormFields;
33690
33650
  textMaxCharLimit = 200;
33691
- otherFlagTypeCode = 'OT0001';
33692
33651
  selectedManageCaseLocation = 'selectedManageCaseLocation';
33693
33652
  ngOnInit() {
33694
33653
  this.updateFlagAddTranslationTitle = CaseFlagWizardStepTitle.UPDATE_FLAG_ADD_TRANSLATION;
33695
33654
  this.selectedFlag = this.formGroup.get(this.selectedManageCaseLocation).value;
33696
- this.otherFlagType = this.selectedFlag?.flagDetailDisplay?.flagDetail?.flagCode === this.otherFlagTypeCode;
33697
33655
  this.multipageComponentStateService.getJourneyCollectionMainObject().journeyEndPageNumber++;
33698
33656
  const flagDetail = this.selectedFlag?.flagDetailDisplay?.flagDetail;
33699
33657
  this.formGroup.addControl(CaseFlagFormFields.OTHER_FLAG_DESCRIPTION, new FormControl(flagDetail?.otherDescription));
@@ -33722,23 +33680,21 @@ class UpdateFlagAddTranslationFormComponent extends AbstractJourneyComponent {
33722
33680
  this.flagCommentsCharLimitErrorMessage = null;
33723
33681
  this.flagCommentsWelshCharLimitErrorMessage = null;
33724
33682
  this.errorMessages = [];
33725
- if (this.otherFlagType) {
33726
- if (this.formGroup.get(CaseFlagFormFields.OTHER_FLAG_DESCRIPTION)?.value?.length > this.textMaxCharLimit) {
33727
- this.otherFlagDescriptionCharLimitErrorMessage = UpdateFlagAddTranslationErrorMessage.DESCRIPTION_CHAR_LIMIT_EXCEEDED;
33728
- this.errorMessages.push({
33729
- title: '',
33730
- description: UpdateFlagAddTranslationErrorMessage.DESCRIPTION_CHAR_LIMIT_EXCEEDED,
33731
- fieldId: CaseFlagFormFields.OTHER_FLAG_DESCRIPTION
33732
- });
33733
- }
33734
- if (this.formGroup.get(CaseFlagFormFields.OTHER_FLAG_DESCRIPTION_WELSH)?.value?.length > this.textMaxCharLimit) {
33735
- this.otherFlagDescriptionWelshCharLimitErrorMessage = UpdateFlagAddTranslationErrorMessage.DESCRIPTION_CHAR_LIMIT_EXCEEDED;
33736
- this.errorMessages.push({
33737
- title: '',
33738
- description: UpdateFlagAddTranslationErrorMessage.DESCRIPTION_CHAR_LIMIT_EXCEEDED,
33739
- fieldId: CaseFlagFormFields.OTHER_FLAG_DESCRIPTION_WELSH
33740
- });
33741
- }
33683
+ if (this.formGroup.get(CaseFlagFormFields.OTHER_FLAG_DESCRIPTION)?.value?.length > this.textMaxCharLimit) {
33684
+ this.otherFlagDescriptionCharLimitErrorMessage = UpdateFlagAddTranslationErrorMessage.DESCRIPTION_CHAR_LIMIT_EXCEEDED;
33685
+ this.errorMessages.push({
33686
+ title: '',
33687
+ description: UpdateFlagAddTranslationErrorMessage.DESCRIPTION_CHAR_LIMIT_EXCEEDED,
33688
+ fieldId: CaseFlagFormFields.OTHER_FLAG_DESCRIPTION
33689
+ });
33690
+ }
33691
+ if (this.formGroup.get(CaseFlagFormFields.OTHER_FLAG_DESCRIPTION_WELSH)?.value?.length > this.textMaxCharLimit) {
33692
+ this.otherFlagDescriptionWelshCharLimitErrorMessage = UpdateFlagAddTranslationErrorMessage.DESCRIPTION_CHAR_LIMIT_EXCEEDED;
33693
+ this.errorMessages.push({
33694
+ title: '',
33695
+ description: UpdateFlagAddTranslationErrorMessage.DESCRIPTION_CHAR_LIMIT_EXCEEDED,
33696
+ fieldId: CaseFlagFormFields.OTHER_FLAG_DESCRIPTION_WELSH
33697
+ });
33742
33698
  }
33743
33699
  if (this.formGroup.get(CaseFlagFormFields.COMMENTS)?.value?.length > this.textMaxCharLimit) {
33744
33700
  this.flagCommentsCharLimitErrorMessage = UpdateFlagAddTranslationErrorMessage.COMMENTS_CHAR_LIMIT_EXCEEDED;
@@ -33764,7 +33720,7 @@ class UpdateFlagAddTranslationFormComponent extends AbstractJourneyComponent {
33764
33720
  }
33765
33721
  }
33766
33722
  static ɵfac = /*@__PURE__*/ (() => { let ɵUpdateFlagAddTranslationFormComponent_BaseFactory; return function UpdateFlagAddTranslationFormComponent_Factory(__ngFactoryType__) { return (ɵUpdateFlagAddTranslationFormComponent_BaseFactory || (ɵUpdateFlagAddTranslationFormComponent_BaseFactory = i0.ɵɵgetInheritedFactory(UpdateFlagAddTranslationFormComponent)))(__ngFactoryType__ || UpdateFlagAddTranslationFormComponent); }; })();
33767
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UpdateFlagAddTranslationFormComponent, selectors: [["ccd-update-flag-add-translation-form"]], inputs: { formGroup: "formGroup" }, outputs: { caseFlagStateEmitter: "caseFlagStateEmitter" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 31, vars: 33, consts: [[3, "formGroup"], ["data-module", "govuk-character-count", "data-maxlength", "200", 1, "govuk-character-count"], [1, "govuk-form-group", 3, "ngClass"], [1, "govuk-label-wrapper", "govuk-!-margin-bottom-6"], [1, "govuk-label", "govuk-label--m"], ["id", "add-translation-form-hint", 1, "govuk-hint"], [4, "ngIf"], [1, "govuk-!-margin-bottom-4"], [1, "govuk-label", "govuk-label--s", 3, "for"], ["id", "add-translation-flag-comments-char-limit-error", "class", "govuk-error-message", 4, "ngIf"], ["rows", "5", 1, "govuk-textarea", 3, "id", "name", "formControlName"], ["id", "add-translation-flag-comments-char-limit-info", "aria-live", "polite", 1, "govuk-hint", "govuk-character-count__message"], ["id", "add-translation-flag-comments-welsh-char-limit-error", "class", "govuk-error-message", 4, "ngIf"], ["id", "add-translation-flag-comments-welsh-char-limit-info", "aria-live", "polite", 1, "govuk-hint", "govuk-character-count__message"], ["id", "add-translation-other-flag-description-char-limit-error", "class", "govuk-error-message", 4, "ngIf"], ["id", "add-translation-other-flag-description-char-limit-info", "aria-live", "polite", 1, "govuk-hint", "govuk-character-count__message"], ["id", "add-translation-other-flag-description-welsh-char-limit-error", "class", "govuk-error-message", 4, "ngIf"], ["id", "add-translation-other-flag-description-welsh-char-limit-info", "aria-live", "polite", 1, "govuk-hint", "govuk-character-count__message"], ["id", "add-translation-other-flag-description-char-limit-error", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], ["id", "add-translation-other-flag-description-welsh-char-limit-error", 1, "govuk-error-message"], ["id", "add-translation-flag-comments-char-limit-error", 1, "govuk-error-message"], ["id", "add-translation-flag-comments-welsh-char-limit-error", 1, "govuk-error-message"]], template: function UpdateFlagAddTranslationFormComponent_Template(rf, ctx) { if (rf & 1) {
33723
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UpdateFlagAddTranslationFormComponent, selectors: [["ccd-update-flag-add-translation-form"]], inputs: { formGroup: "formGroup" }, outputs: { caseFlagStateEmitter: "caseFlagStateEmitter" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 50, vars: 54, consts: [[3, "formGroup"], ["data-module", "govuk-character-count", "data-maxlength", "200", 1, "govuk-character-count"], [1, "govuk-form-group", 3, "ngClass"], [1, "govuk-label-wrapper", "govuk-!-margin-bottom-6"], [1, "govuk-label", "govuk-label--m"], ["id", "add-translation-form-hint", 1, "govuk-hint"], [1, "govuk-!-margin-bottom-4"], [1, "govuk-label", "govuk-label--s", 3, "for"], ["id", "add-translation-other-flag-description-char-limit-error", "class", "govuk-error-message", 4, "ngIf"], ["rows", "5", 1, "govuk-textarea", 3, "id", "name", "formControlName"], ["id", "add-translation-other-flag-description-char-limit-info", "aria-live", "polite", 1, "govuk-hint", "govuk-character-count__message"], ["id", "add-translation-other-flag-description-welsh-char-limit-error", "class", "govuk-error-message", 4, "ngIf"], ["id", "add-translation-other-flag-description-welsh-char-limit-info", "aria-live", "polite", 1, "govuk-hint", "govuk-character-count__message"], ["id", "add-translation-flag-comments-char-limit-error", "class", "govuk-error-message", 4, "ngIf"], ["id", "add-translation-flag-comments-char-limit-info", "aria-live", "polite", 1, "govuk-hint", "govuk-character-count__message"], ["id", "add-translation-flag-comments-welsh-char-limit-error", "class", "govuk-error-message", 4, "ngIf"], ["id", "add-translation-flag-comments-welsh-char-limit-info", "aria-live", "polite", 1, "govuk-hint", "govuk-character-count__message"], ["id", "add-translation-other-flag-description-char-limit-error", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], ["id", "add-translation-other-flag-description-welsh-char-limit-error", 1, "govuk-error-message"], ["id", "add-translation-flag-comments-char-limit-error", 1, "govuk-error-message"], ["id", "add-translation-flag-comments-welsh-char-limit-error", 1, "govuk-error-message"]], template: function UpdateFlagAddTranslationFormComponent_Template(rf, ctx) { if (rf & 1) {
33768
33724
  i0.ɵɵelementContainerStart(0, 0);
33769
33725
  i0.ɵɵelementStart(1, "div", 1)(2, "div", 2)(3, "h1", 3)(4, "label", 4);
33770
33726
  i0.ɵɵtext(5);
@@ -33774,67 +33730,108 @@ class UpdateFlagAddTranslationFormComponent extends AbstractJourneyComponent {
33774
33730
  i0.ɵɵtext(8);
33775
33731
  i0.ɵɵpipe(9, "rpxTranslate");
33776
33732
  i0.ɵɵelementEnd();
33777
- i0.ɵɵtemplate(10, UpdateFlagAddTranslationFormComponent_div_10_Template, 21, 22, "div", 6);
33778
- i0.ɵɵelementStart(11, "div", 7)(12, "label", 8);
33779
- i0.ɵɵtext(13);
33780
- i0.ɵɵpipe(14, "rpxTranslate");
33733
+ i0.ɵɵelementStart(10, "div", 6)(11, "label", 7);
33734
+ i0.ɵɵtext(12);
33735
+ i0.ɵɵpipe(13, "rpxTranslate");
33781
33736
  i0.ɵɵelementEnd();
33782
- i0.ɵɵtemplate(15, UpdateFlagAddTranslationFormComponent_div_15_Template, 6, 6, "div", 9);
33783
- i0.ɵɵelementStart(16, "textarea", 10);
33784
- i0.ɵɵtext(17, " ");
33737
+ i0.ɵɵtemplate(14, UpdateFlagAddTranslationFormComponent_div_14_Template, 6, 6, "div", 8);
33738
+ i0.ɵɵelementStart(15, "textarea", 9);
33739
+ i0.ɵɵtext(16, " ");
33785
33740
  i0.ɵɵelementEnd();
33786
- i0.ɵɵelementStart(18, "div", 11);
33787
- i0.ɵɵtext(19);
33788
- i0.ɵɵpipe(20, "rpxTranslate");
33741
+ i0.ɵɵelementStart(17, "div", 10);
33742
+ i0.ɵɵtext(18);
33743
+ i0.ɵɵpipe(19, "rpxTranslate");
33789
33744
  i0.ɵɵelementEnd()();
33790
- i0.ɵɵelementStart(21, "div", 7)(22, "label", 8);
33791
- i0.ɵɵtext(23);
33792
- i0.ɵɵpipe(24, "rpxTranslate");
33745
+ i0.ɵɵelementStart(20, "div", 6)(21, "label", 7);
33746
+ i0.ɵɵtext(22);
33747
+ i0.ɵɵpipe(23, "rpxTranslate");
33793
33748
  i0.ɵɵelementEnd();
33794
- i0.ɵɵtemplate(25, UpdateFlagAddTranslationFormComponent_div_25_Template, 6, 6, "div", 12);
33795
- i0.ɵɵelementStart(26, "textarea", 10);
33796
- i0.ɵɵtext(27, " ");
33749
+ i0.ɵɵtemplate(24, UpdateFlagAddTranslationFormComponent_div_24_Template, 6, 6, "div", 11);
33750
+ i0.ɵɵelementStart(25, "textarea", 9);
33751
+ i0.ɵɵtext(26, " ");
33797
33752
  i0.ɵɵelementEnd();
33798
- i0.ɵɵelementStart(28, "div", 13);
33799
- i0.ɵɵtext(29);
33800
- i0.ɵɵpipe(30, "rpxTranslate");
33753
+ i0.ɵɵelementStart(27, "div", 12);
33754
+ i0.ɵɵtext(28);
33755
+ i0.ɵɵpipe(29, "rpxTranslate");
33756
+ i0.ɵɵelementEnd()();
33757
+ i0.ɵɵelementStart(30, "div", 6)(31, "label", 7);
33758
+ i0.ɵɵtext(32);
33759
+ i0.ɵɵpipe(33, "rpxTranslate");
33760
+ i0.ɵɵelementEnd();
33761
+ i0.ɵɵtemplate(34, UpdateFlagAddTranslationFormComponent_div_34_Template, 6, 6, "div", 13);
33762
+ i0.ɵɵelementStart(35, "textarea", 9);
33763
+ i0.ɵɵtext(36, " ");
33764
+ i0.ɵɵelementEnd();
33765
+ i0.ɵɵelementStart(37, "div", 14);
33766
+ i0.ɵɵtext(38);
33767
+ i0.ɵɵpipe(39, "rpxTranslate");
33768
+ i0.ɵɵelementEnd()();
33769
+ i0.ɵɵelementStart(40, "div", 6)(41, "label", 7);
33770
+ i0.ɵɵtext(42);
33771
+ i0.ɵɵpipe(43, "rpxTranslate");
33772
+ i0.ɵɵelementEnd();
33773
+ i0.ɵɵtemplate(44, UpdateFlagAddTranslationFormComponent_div_44_Template, 6, 6, "div", 15);
33774
+ i0.ɵɵelementStart(45, "textarea", 9);
33775
+ i0.ɵɵtext(46, " ");
33776
+ i0.ɵɵelementEnd();
33777
+ i0.ɵɵelementStart(47, "div", 16);
33778
+ i0.ɵɵtext(48);
33779
+ i0.ɵɵpipe(49, "rpxTranslate");
33801
33780
  i0.ɵɵelementEnd()()()();
33802
33781
  i0.ɵɵelementContainerEnd();
33803
33782
  } if (rf & 2) {
33804
33783
  i0.ɵɵproperty("formGroup", ctx.formGroup);
33805
33784
  i0.ɵɵadvance(2);
33806
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(31, _c0$n, ctx.errorMessages.length > 0));
33785
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(52, _c0$n, ctx.errorMessages.length > 0));
33786
+ i0.ɵɵadvance(3);
33787
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 32, ctx.updateFlagAddTranslationTitle), " ");
33807
33788
  i0.ɵɵadvance(3);
33808
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 19, ctx.updateFlagAddTranslationTitle), " ");
33789
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(9, 34, ctx.updateFlagAddTranslationStepEnum.HINT_TEXT), " ");
33809
33790
  i0.ɵɵadvance(3);
33810
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(9, 21, ctx.updateFlagAddTranslationStepEnum.HINT_TEXT), " ");
33791
+ i0.ɵɵproperty("for", ctx.caseFlagFormFields.OTHER_FLAG_DESCRIPTION);
33792
+ i0.ɵɵadvance();
33793
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(13, 36, "Other description"));
33811
33794
  i0.ɵɵadvance(2);
33812
- i0.ɵɵproperty("ngIf", ctx.otherFlagType);
33795
+ i0.ɵɵproperty("ngIf", ctx.otherFlagDescriptionCharLimitErrorMessage);
33796
+ i0.ɵɵadvance();
33797
+ i0.ɵɵproperty("id", ctx.caseFlagFormFields.OTHER_FLAG_DESCRIPTION)("name", ctx.caseFlagFormFields.OTHER_FLAG_DESCRIPTION)("formControlName", ctx.caseFlagFormFields.OTHER_FLAG_DESCRIPTION);
33798
+ i0.ɵɵadvance(3);
33799
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(19, 38, ctx.updateFlagAddTranslationStepEnum.CHARACTER_LIMIT_INFO), " ");
33800
+ i0.ɵɵadvance(3);
33801
+ i0.ɵɵproperty("for", ctx.caseFlagFormFields.OTHER_FLAG_DESCRIPTION_WELSH);
33802
+ i0.ɵɵadvance();
33803
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(23, 40, "Other description (Welsh)"));
33813
33804
  i0.ɵɵadvance(2);
33805
+ i0.ɵɵproperty("ngIf", ctx.otherFlagDescriptionWelshCharLimitErrorMessage);
33806
+ i0.ɵɵadvance();
33807
+ i0.ɵɵproperty("id", ctx.caseFlagFormFields.OTHER_FLAG_DESCRIPTION_WELSH)("name", ctx.caseFlagFormFields.OTHER_FLAG_DESCRIPTION_WELSH)("formControlName", ctx.caseFlagFormFields.OTHER_FLAG_DESCRIPTION_WELSH);
33808
+ i0.ɵɵadvance(3);
33809
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(29, 42, ctx.updateFlagAddTranslationStepEnum.CHARACTER_LIMIT_INFO), " ");
33810
+ i0.ɵɵadvance(3);
33814
33811
  i0.ɵɵproperty("for", ctx.caseFlagFormFields.COMMENTS);
33815
33812
  i0.ɵɵadvance();
33816
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(14, 23, "Flag comments"));
33813
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(33, 44, "Flag comments"));
33817
33814
  i0.ɵɵadvance(2);
33818
33815
  i0.ɵɵproperty("ngIf", ctx.flagCommentsCharLimitErrorMessage);
33819
33816
  i0.ɵɵadvance();
33820
33817
  i0.ɵɵproperty("id", ctx.caseFlagFormFields.COMMENTS)("name", ctx.caseFlagFormFields.COMMENTS)("formControlName", ctx.caseFlagFormFields.COMMENTS);
33821
33818
  i0.ɵɵadvance(3);
33822
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(20, 25, ctx.updateFlagAddTranslationStepEnum.CHARACTER_LIMIT_INFO), " ");
33819
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(39, 46, ctx.updateFlagAddTranslationStepEnum.CHARACTER_LIMIT_INFO), " ");
33823
33820
  i0.ɵɵadvance(3);
33824
33821
  i0.ɵɵproperty("for", ctx.caseFlagFormFields.COMMENTS_WELSH);
33825
33822
  i0.ɵɵadvance();
33826
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(24, 27, "Flag comments (Welsh)"));
33823
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(43, 48, "Flag comments (Welsh)"));
33827
33824
  i0.ɵɵadvance(2);
33828
33825
  i0.ɵɵproperty("ngIf", ctx.flagCommentsWelshCharLimitErrorMessage);
33829
33826
  i0.ɵɵadvance();
33830
33827
  i0.ɵɵproperty("id", ctx.caseFlagFormFields.COMMENTS_WELSH)("name", ctx.caseFlagFormFields.COMMENTS_WELSH)("formControlName", ctx.caseFlagFormFields.COMMENTS_WELSH);
33831
33828
  i0.ɵɵadvance(3);
33832
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(30, 29, ctx.updateFlagAddTranslationStepEnum.CHARACTER_LIMIT_INFO), " ");
33829
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(49, 50, ctx.updateFlagAddTranslationStepEnum.CHARACTER_LIMIT_INFO), " ");
33833
33830
  } }, dependencies: [i5.NgClass, i5.NgIf, i4.DefaultValueAccessor, i4.NgControlStatus, i4.NgControlStatusGroup, i4.FormGroupDirective, i4.FormControlName, i1.RpxTranslatePipe], encapsulation: 2 });
33834
33831
  }
33835
33832
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UpdateFlagAddTranslationFormComponent, [{
33836
33833
  type: Component,
33837
- args: [{ selector: 'ccd-update-flag-add-translation-form', standalone: false, template: "<ng-container [formGroup]=\"formGroup\">\n <div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"200\">\n <div class=\"govuk-form-group\" [ngClass]=\"{'form-group-error': errorMessages.length > 0}\">\n <h1 class=\"govuk-label-wrapper govuk-!-margin-bottom-6\">\n <label class=\"govuk-label govuk-label--m\">\n {{ updateFlagAddTranslationTitle | rpxTranslate}}\n </label>\n </h1>\n <div id=\"add-translation-form-hint\" class=\"govuk-hint\">\n {{ updateFlagAddTranslationStepEnum.HINT_TEXT | rpxTranslate}}\n </div>\n\n <div *ngIf=\"otherFlagType\">\n <div class=\"govuk-!-margin-bottom-4\">\n <label [for]=\"caseFlagFormFields.OTHER_FLAG_DESCRIPTION\" class=\"govuk-label govuk-label--s\">{{'Other description' | rpxTranslate}}</label>\n <div id=\"add-translation-other-flag-description-char-limit-error\" class=\"govuk-error-message\"\n *ngIf=\"otherFlagDescriptionCharLimitErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{otherFlagDescriptionCharLimitErrorMessage | rpxTranslate}}\n </div>\n <textarea\n class=\"govuk-textarea\" rows=\"5\"\n [id]=\"caseFlagFormFields.OTHER_FLAG_DESCRIPTION\"\n [name]=\"caseFlagFormFields.OTHER_FLAG_DESCRIPTION\"\n [formControlName]=\"caseFlagFormFields.OTHER_FLAG_DESCRIPTION\">\n </textarea>\n <div id=\"add-translation-other-flag-description-char-limit-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n {{updateFlagAddTranslationStepEnum.CHARACTER_LIMIT_INFO | rpxTranslate}}\n </div>\n </div>\n\n <div class=\"govuk-!-margin-bottom-4\">\n <label [for]=\"caseFlagFormFields.OTHER_FLAG_DESCRIPTION_WELSH\" class=\"govuk-label govuk-label--s\">{{'Other description (Welsh)' | rpxTranslate}}</label>\n <div id=\"add-translation-other-flag-description-welsh-char-limit-error\" class=\"govuk-error-message\"\n *ngIf=\"otherFlagDescriptionWelshCharLimitErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{otherFlagDescriptionWelshCharLimitErrorMessage | rpxTranslate}}\n </div>\n <textarea\n class=\"govuk-textarea\" rows=\"5\"\n [id]=\"caseFlagFormFields.OTHER_FLAG_DESCRIPTION_WELSH\"\n [name]=\"caseFlagFormFields.OTHER_FLAG_DESCRIPTION_WELSH\"\n [formControlName]=\"caseFlagFormFields.OTHER_FLAG_DESCRIPTION_WELSH\">\n </textarea>\n <div id=\"add-translation-other-flag-description-welsh-char-limit-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n {{updateFlagAddTranslationStepEnum.CHARACTER_LIMIT_INFO | rpxTranslate}}\n </div>\n </div>\n </div>\n\n <div class=\"govuk-!-margin-bottom-4\">\n <label [for]=\"caseFlagFormFields.COMMENTS\" class=\"govuk-label govuk-label--s\">{{'Flag comments' | rpxTranslate}}</label>\n <div id=\"add-translation-flag-comments-char-limit-error\" class=\"govuk-error-message\"\n *ngIf=\"flagCommentsCharLimitErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{flagCommentsCharLimitErrorMessage | rpxTranslate}}\n </div>\n <textarea\n class=\"govuk-textarea\" rows=\"5\"\n [id]=\"caseFlagFormFields.COMMENTS\"\n [name]=\"caseFlagFormFields.COMMENTS\"\n [formControlName]=\"caseFlagFormFields.COMMENTS\">\n </textarea>\n <div id=\"add-translation-flag-comments-char-limit-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n {{updateFlagAddTranslationStepEnum.CHARACTER_LIMIT_INFO | rpxTranslate}}\n </div>\n </div>\n\n <div class=\"govuk-!-margin-bottom-4\">\n <label [for]=\"caseFlagFormFields.COMMENTS_WELSH\" class=\"govuk-label govuk-label--s\">{{'Flag comments (Welsh)' | rpxTranslate}}</label>\n <div id=\"add-translation-flag-comments-welsh-char-limit-error\" class=\"govuk-error-message\"\n *ngIf=\"flagCommentsWelshCharLimitErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{flagCommentsWelshCharLimitErrorMessage | rpxTranslate}}\n </div>\n <textarea\n class=\"govuk-textarea\" rows=\"5\"\n [id]=\"caseFlagFormFields.COMMENTS_WELSH\"\n [name]=\"caseFlagFormFields.COMMENTS_WELSH\"\n [formControlName]=\"caseFlagFormFields.COMMENTS_WELSH\">\n </textarea>\n <div id=\"add-translation-flag-comments-welsh-char-limit-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n {{updateFlagAddTranslationStepEnum.CHARACTER_LIMIT_INFO | rpxTranslate}}\n </div>\n </div>\n </div>\n </div>\n</ng-container>\n" }]
33834
+ args: [{ selector: 'ccd-update-flag-add-translation-form', standalone: false, template: "<ng-container [formGroup]=\"formGroup\">\n <div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"200\">\n <div class=\"govuk-form-group\" [ngClass]=\"{'form-group-error': errorMessages.length > 0}\">\n <h1 class=\"govuk-label-wrapper govuk-!-margin-bottom-6\">\n <label class=\"govuk-label govuk-label--m\">\n {{ updateFlagAddTranslationTitle | rpxTranslate}}\n </label>\n </h1>\n <div id=\"add-translation-form-hint\" class=\"govuk-hint\">\n {{ updateFlagAddTranslationStepEnum.HINT_TEXT | rpxTranslate}}\n </div>\n\n <div class=\"govuk-!-margin-bottom-4\">\n <label [for]=\"caseFlagFormFields.OTHER_FLAG_DESCRIPTION\" class=\"govuk-label govuk-label--s\">{{'Other description' | rpxTranslate}}</label>\n <div id=\"add-translation-other-flag-description-char-limit-error\" class=\"govuk-error-message\"\n *ngIf=\"otherFlagDescriptionCharLimitErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{otherFlagDescriptionCharLimitErrorMessage | rpxTranslate}}\n </div>\n <textarea\n class=\"govuk-textarea\" rows=\"5\"\n [id]=\"caseFlagFormFields.OTHER_FLAG_DESCRIPTION\"\n [name]=\"caseFlagFormFields.OTHER_FLAG_DESCRIPTION\"\n [formControlName]=\"caseFlagFormFields.OTHER_FLAG_DESCRIPTION\">\n </textarea>\n <div id=\"add-translation-other-flag-description-char-limit-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n {{updateFlagAddTranslationStepEnum.CHARACTER_LIMIT_INFO | rpxTranslate}}\n </div>\n </div>\n\n <div class=\"govuk-!-margin-bottom-4\">\n <label [for]=\"caseFlagFormFields.OTHER_FLAG_DESCRIPTION_WELSH\" class=\"govuk-label govuk-label--s\">{{'Other description (Welsh)' | rpxTranslate}}</label>\n <div id=\"add-translation-other-flag-description-welsh-char-limit-error\" class=\"govuk-error-message\"\n *ngIf=\"otherFlagDescriptionWelshCharLimitErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{otherFlagDescriptionWelshCharLimitErrorMessage | rpxTranslate}}\n </div>\n <textarea\n class=\"govuk-textarea\" rows=\"5\"\n [id]=\"caseFlagFormFields.OTHER_FLAG_DESCRIPTION_WELSH\"\n [name]=\"caseFlagFormFields.OTHER_FLAG_DESCRIPTION_WELSH\"\n [formControlName]=\"caseFlagFormFields.OTHER_FLAG_DESCRIPTION_WELSH\">\n </textarea>\n <div id=\"add-translation-other-flag-description-welsh-char-limit-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n {{updateFlagAddTranslationStepEnum.CHARACTER_LIMIT_INFO | rpxTranslate}}\n </div>\n </div>\n\n <div class=\"govuk-!-margin-bottom-4\">\n <label [for]=\"caseFlagFormFields.COMMENTS\" class=\"govuk-label govuk-label--s\">{{'Flag comments' | rpxTranslate}}</label>\n <div id=\"add-translation-flag-comments-char-limit-error\" class=\"govuk-error-message\"\n *ngIf=\"flagCommentsCharLimitErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{flagCommentsCharLimitErrorMessage | rpxTranslate}}\n </div>\n <textarea\n class=\"govuk-textarea\" rows=\"5\"\n [id]=\"caseFlagFormFields.COMMENTS\"\n [name]=\"caseFlagFormFields.COMMENTS\"\n [formControlName]=\"caseFlagFormFields.COMMENTS\">\n </textarea>\n <div id=\"add-translation-flag-comments-char-limit-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n {{updateFlagAddTranslationStepEnum.CHARACTER_LIMIT_INFO | rpxTranslate}}\n </div>\n </div>\n\n <div class=\"govuk-!-margin-bottom-4\">\n <label [for]=\"caseFlagFormFields.COMMENTS_WELSH\" class=\"govuk-label govuk-label--s\">{{'Flag comments (Welsh)' | rpxTranslate}}</label>\n <div id=\"add-translation-flag-comments-welsh-char-limit-error\" class=\"govuk-error-message\"\n *ngIf=\"flagCommentsWelshCharLimitErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{flagCommentsWelshCharLimitErrorMessage | rpxTranslate}}\n </div>\n <textarea\n class=\"govuk-textarea\" rows=\"5\"\n [id]=\"caseFlagFormFields.COMMENTS_WELSH\"\n [name]=\"caseFlagFormFields.COMMENTS_WELSH\"\n [formControlName]=\"caseFlagFormFields.COMMENTS_WELSH\">\n </textarea>\n <div id=\"add-translation-flag-comments-welsh-char-limit-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n {{updateFlagAddTranslationStepEnum.CHARACTER_LIMIT_INFO | rpxTranslate}}\n </div>\n </div>\n </div>\n </div>\n</ng-container>" }]
33838
33835
  }], null, { formGroup: [{
33839
33836
  type: Input
33840
33837
  }], caseFlagStateEmitter: [{