@hmcts/ccd-case-ui-toolkit 7.0.51-more-null-checks → 7.0.51-ungrey-back-button

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.
Files changed (94) hide show
  1. package/esm2022/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.mjs +46 -24
  2. package/esm2022/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.mjs +9 -6
  3. package/esm2022/lib/shared/components/case-editor/case-editor.module.mjs +7 -4
  4. package/esm2022/lib/shared/components/case-viewer/case-event-trigger/case-event-trigger.component.mjs +14 -4
  5. package/esm2022/lib/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.mjs +4 -4
  6. package/esm2022/lib/shared/components/palette/base-field/abstract-field-write-journey.component.mjs +92 -0
  7. package/esm2022/lib/shared/components/palette/base-field/abstract-journey.component.mjs +83 -0
  8. package/esm2022/lib/shared/components/palette/base-field/index.mjs +3 -1
  9. package/esm2022/lib/shared/components/palette/case-flag/components/add-comments/add-comments.component.mjs +21 -21
  10. package/esm2022/lib/shared/components/palette/case-flag/components/confirm-flag-status/confirm-flag-status.component.mjs +22 -22
  11. package/esm2022/lib/shared/components/palette/case-flag/components/manage-case-flags/manage-case-flags.component.mjs +18 -25
  12. package/esm2022/lib/shared/components/palette/case-flag/components/search-language-interpreter/search-language-interpreter.component.mjs +32 -29
  13. package/esm2022/lib/shared/components/palette/case-flag/components/select-flag-location/select-flag-location.component.mjs +21 -28
  14. package/esm2022/lib/shared/components/palette/case-flag/components/select-flag-type/select-flag-type.component.mjs +111 -63
  15. package/esm2022/lib/shared/components/palette/case-flag/components/update-flag/update-flag-add-translation-form/update-flag-add-translation-form.component.mjs +28 -28
  16. package/esm2022/lib/shared/components/palette/case-flag/components/update-flag/update-flag.component.mjs +107 -105
  17. package/esm2022/lib/shared/components/palette/case-flag/write-case-flag-field.component.mjs +86 -29
  18. package/esm2022/lib/shared/components/palette/complex/read-complex-field.component.mjs +2 -2
  19. package/esm2022/lib/shared/components/palette/dynamic-radio-list/write-dynamic-radio-list-field.component.mjs +3 -3
  20. package/esm2022/lib/shared/components/palette/linked-cases/components/before-you-start/before-you-start.component.mjs +27 -18
  21. package/esm2022/lib/shared/components/palette/linked-cases/components/check-your-answers/check-your-answers.component.mjs +19 -7
  22. package/esm2022/lib/shared/components/palette/linked-cases/components/link-cases/link-cases.component.mjs +46 -40
  23. package/esm2022/lib/shared/components/palette/linked-cases/components/no-linked-cases/no-linked-cases.component.mjs +13 -9
  24. package/esm2022/lib/shared/components/palette/linked-cases/components/unlink-cases/unlink-cases.component.mjs +45 -39
  25. package/esm2022/lib/shared/components/palette/linked-cases/write-linked-cases-field.component.mjs +41 -17
  26. package/esm2022/lib/shared/directives/conditional-show/services/condition-parser.service.mjs +2 -2
  27. package/esm2022/lib/shared/domain/index.mjs +2 -1
  28. package/esm2022/lib/shared/domain/journey/index.mjs +3 -0
  29. package/esm2022/lib/shared/domain/journey/journey-instigator.model.mjs +2 -0
  30. package/esm2022/lib/shared/domain/journey/journey.model.mjs +2 -0
  31. package/esm2022/lib/shared/services/form/field-type-sanitiser.mjs +2 -2
  32. package/esm2022/lib/shared/services/index.mjs +2 -1
  33. package/esm2022/lib/shared/services/journey/index.mjs +2 -0
  34. package/esm2022/lib/shared/services/journey/multipage-component-state.service.mjs +114 -0
  35. package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs +965 -524
  36. package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
  37. package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts +10 -3
  38. package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts.map +1 -1
  39. package/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.d.ts +3 -2
  40. package/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.d.ts.map +1 -1
  41. package/lib/shared/components/case-editor/case-editor.module.d.ts.map +1 -1
  42. package/lib/shared/components/case-viewer/case-event-trigger/case-event-trigger.component.d.ts +2 -1
  43. package/lib/shared/components/case-viewer/case-event-trigger/case-event-trigger.component.d.ts.map +1 -1
  44. package/lib/shared/components/palette/base-field/abstract-field-write-journey.component.d.ts +30 -0
  45. package/lib/shared/components/palette/base-field/abstract-field-write-journey.component.d.ts.map +1 -0
  46. package/lib/shared/components/palette/base-field/abstract-journey.component.d.ts +27 -0
  47. package/lib/shared/components/palette/base-field/abstract-journey.component.d.ts.map +1 -0
  48. package/lib/shared/components/palette/base-field/index.d.ts +2 -0
  49. package/lib/shared/components/palette/base-field/index.d.ts.map +1 -1
  50. package/lib/shared/components/palette/case-flag/components/add-comments/add-comments.component.d.ts +4 -2
  51. package/lib/shared/components/palette/case-flag/components/add-comments/add-comments.component.d.ts.map +1 -1
  52. package/lib/shared/components/palette/case-flag/components/confirm-flag-status/confirm-flag-status.component.d.ts +4 -2
  53. package/lib/shared/components/palette/case-flag/components/confirm-flag-status/confirm-flag-status.component.d.ts.map +1 -1
  54. package/lib/shared/components/palette/case-flag/components/manage-case-flags/manage-case-flags.component.d.ts +4 -2
  55. package/lib/shared/components/palette/case-flag/components/manage-case-flags/manage-case-flags.component.d.ts.map +1 -1
  56. package/lib/shared/components/palette/case-flag/components/search-language-interpreter/search-language-interpreter.component.d.ts +6 -3
  57. package/lib/shared/components/palette/case-flag/components/search-language-interpreter/search-language-interpreter.component.d.ts.map +1 -1
  58. package/lib/shared/components/palette/case-flag/components/select-flag-location/select-flag-location.component.d.ts +4 -2
  59. package/lib/shared/components/palette/case-flag/components/select-flag-location/select-flag-location.component.d.ts.map +1 -1
  60. package/lib/shared/components/palette/case-flag/components/select-flag-type/select-flag-type.component.d.ts +11 -5
  61. package/lib/shared/components/palette/case-flag/components/select-flag-type/select-flag-type.component.d.ts.map +1 -1
  62. package/lib/shared/components/palette/case-flag/components/update-flag/update-flag-add-translation-form/update-flag-add-translation-form.component.d.ts +4 -2
  63. package/lib/shared/components/palette/case-flag/components/update-flag/update-flag-add-translation-form/update-flag-add-translation-form.component.d.ts.map +1 -1
  64. package/lib/shared/components/palette/case-flag/components/update-flag/update-flag.component.d.ts +6 -3
  65. package/lib/shared/components/palette/case-flag/components/update-flag/update-flag.component.d.ts.map +1 -1
  66. package/lib/shared/components/palette/case-flag/write-case-flag-field.component.d.ts +8 -5
  67. package/lib/shared/components/palette/case-flag/write-case-flag-field.component.d.ts.map +1 -1
  68. package/lib/shared/components/palette/linked-cases/components/before-you-start/before-you-start.component.d.ts +6 -3
  69. package/lib/shared/components/palette/linked-cases/components/before-you-start/before-you-start.component.d.ts.map +1 -1
  70. package/lib/shared/components/palette/linked-cases/components/check-your-answers/check-your-answers.component.d.ts +6 -2
  71. package/lib/shared/components/palette/linked-cases/components/check-your-answers/check-your-answers.component.d.ts.map +1 -1
  72. package/lib/shared/components/palette/linked-cases/components/link-cases/link-cases.component.d.ts +6 -3
  73. package/lib/shared/components/palette/linked-cases/components/link-cases/link-cases.component.d.ts.map +1 -1
  74. package/lib/shared/components/palette/linked-cases/components/no-linked-cases/no-linked-cases.component.d.ts +5 -2
  75. package/lib/shared/components/palette/linked-cases/components/no-linked-cases/no-linked-cases.component.d.ts.map +1 -1
  76. package/lib/shared/components/palette/linked-cases/components/unlink-cases/unlink-cases.component.d.ts +6 -3
  77. package/lib/shared/components/palette/linked-cases/components/unlink-cases/unlink-cases.component.d.ts.map +1 -1
  78. package/lib/shared/components/palette/linked-cases/write-linked-cases-field.component.d.ts +6 -3
  79. package/lib/shared/components/palette/linked-cases/write-linked-cases-field.component.d.ts.map +1 -1
  80. package/lib/shared/domain/index.d.ts +1 -0
  81. package/lib/shared/domain/index.d.ts.map +1 -1
  82. package/lib/shared/domain/journey/index.d.ts +3 -0
  83. package/lib/shared/domain/journey/index.d.ts.map +1 -0
  84. package/lib/shared/domain/journey/journey-instigator.model.d.ts +5 -0
  85. package/lib/shared/domain/journey/journey-instigator.model.d.ts.map +1 -0
  86. package/lib/shared/domain/journey/journey.model.d.ts +16 -0
  87. package/lib/shared/domain/journey/journey.model.d.ts.map +1 -0
  88. package/lib/shared/services/index.d.ts +1 -0
  89. package/lib/shared/services/index.d.ts.map +1 -1
  90. package/lib/shared/services/journey/index.d.ts +2 -0
  91. package/lib/shared/services/journey/index.d.ts.map +1 -0
  92. package/lib/shared/services/journey/multipage-component-state.service.d.ts +25 -0
  93. package/lib/shared/services/journey/multipage-component-state.service.d.ts.map +1 -0
  94. package/package.json +1 -1
@@ -58,7 +58,7 @@ import * as i10 from '@angular/material/legacy-tabs';
58
58
  import { MatLegacyTabsModule } from '@angular/material/legacy-tabs';
59
59
  import { decompressFromUTF16, compressToUTF16 } from 'lz-string';
60
60
 
61
- const _c0$14 = [[["", "footerSolsNavLinks", ""]], [["", "footerCaseWorkerNavLinks", ""]]];
61
+ const _c0$16 = [[["", "footerSolsNavLinks", ""]], [["", "footerCaseWorkerNavLinks", ""]]];
62
62
  const _c1$u = ["[footerSolsNavLinks]", "[footerCaseWorkerNavLinks]"];
63
63
  function FooterComponent_div_2_Template(rf, ctx) { if (rf & 1) {
64
64
  i0.ɵɵelementStart(0, "div", 3)(1, "div", 4);
@@ -136,7 +136,7 @@ class FooterComponent {
136
136
  workhours;
137
137
  static ɵfac = function FooterComponent_Factory(t) { return new (t || FooterComponent)(); };
138
138
  static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FooterComponent, selectors: [["cut-footer-bar"]], inputs: { email: "email", isSolicitor: "isSolicitor", phone: "phone", workhours: "workhours" }, ngContentSelectors: _c1$u, decls: 4, vars: 4, consts: [["id", "footer", "role", "footer", 1, "group", "js-footer"], [1, "footer-wrapper"], ["class", "footer-meta", 4, "ngIf"], [1, "footer-meta"], [1, "footer-meta-inner"], [1, "open-government-licence"], [1, "logo"], ["href", "https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/", "rel", "license"], [1, "copyright"], ["href", "https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/"], [1, "title"], [1, "footer-text"], [1, "email"], [3, "href"], [1, "phone"], [1, "work-hours"]], template: function FooterComponent_Template(rf, ctx) { if (rf & 1) {
139
- i0.ɵɵprojectionDef(_c0$14);
139
+ i0.ɵɵprojectionDef(_c0$16);
140
140
  i0.ɵɵelementStart(0, "footer", 0)(1, "div", 1);
141
141
  i0.ɵɵtemplate(2, FooterComponent_div_2_Template, 20, 15, "div", 2)(3, FooterComponent_div_3_Template, 20, 16, "div", 2);
142
142
  i0.ɵɵelementEnd()();
@@ -163,7 +163,7 @@ class FooterComponent {
163
163
  }] }); })();
164
164
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(FooterComponent, { className: "FooterComponent", filePath: "lib/components/footer/footer.component.ts", lineNumber: 8 }); })();
165
165
 
166
- const _c0$13 = [[["", "headerNavigation", ""]]];
166
+ const _c0$15 = [[["", "headerNavigation", ""]]];
167
167
  const _c1$t = ["[headerNavigation]"];
168
168
  function HeaderBarComponent_div_3_Template(rf, ctx) { if (rf & 1) {
169
169
  i0.ɵɵelementStart(0, "div")(1, "a", 12);
@@ -207,7 +207,7 @@ class HeaderBarComponent {
207
207
  }
208
208
  static ɵfac = function HeaderBarComponent_Factory(t) { return new (t || HeaderBarComponent)(); };
209
209
  static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: HeaderBarComponent, selectors: [["cut-header-bar"]], inputs: { title: "title", isSolicitor: "isSolicitor", username: "username" }, outputs: { signOutRequest: "signOutRequest" }, ngContentSelectors: _c1$t, decls: 17, vars: 14, consts: [["role", "banner", "id", "global-header", 1, "with-proposition"], [1, "header-wrapper"], [1, "header-global"], [4, "ngIf"], ["class", "global-header", 4, "ngIf"], [1, "header-proposition"], [1, "content"], ["href", "#proposition-links", 1, "js-header-toggle", "menu"], ["id", "proposition-menu", 4, "ngIf"], [1, "proposition-right"], ["id", "user-name"], ["id", "sign-out", "href", "javascript:void(0)", 3, "click"], ["href", "https://www.gov.uk", "title", "Go to the GOV.UK homepage", "id", "logo", 1, "content", 2, "margin-left", "0px"], ["src", "/img/gov.uk_logotype_crown_invert_trans.png?0.23.0", "width", "36", "height", "32", "alt", ""], [1, "global-header"], [1, "title"], ["id", "proposition-menu"], [1, "title-solicitor"], ["id", "proposition-name"]], template: function HeaderBarComponent_Template(rf, ctx) { if (rf & 1) {
210
- i0.ɵɵprojectionDef(_c0$13);
210
+ i0.ɵɵprojectionDef(_c0$15);
211
211
  i0.ɵɵelementStart(0, "header", 0)(1, "div", 1)(2, "div", 2);
212
212
  i0.ɵɵtemplate(3, HeaderBarComponent_div_3_Template, 5, 3, "div", 3)(4, HeaderBarComponent_div_4_Template, 5, 3, "div", 4);
213
213
  i0.ɵɵelementEnd();
@@ -257,13 +257,13 @@ class HeaderBarComponent {
257
257
  }] }); })();
258
258
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(HeaderBarComponent, { className: "HeaderBarComponent", filePath: "lib/components/header/header-bar/header-bar.component.ts", lineNumber: 8 }); })();
259
259
 
260
- const _c0$12 = [[["", "leftNavLinks", ""]], [["", "rightNavLinks", ""]]];
260
+ const _c0$14 = [[["", "leftNavLinks", ""]], [["", "rightNavLinks", ""]]];
261
261
  const _c1$s = ["[leftNavLinks]", "[rightNavLinks]"];
262
262
  class NavigationComponent {
263
263
  isSolicitor;
264
264
  static ɵfac = function NavigationComponent_Factory(t) { return new (t || NavigationComponent)(); };
265
265
  static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NavigationComponent, selectors: [["cut-nav-bar"]], inputs: { isSolicitor: "isSolicitor" }, ngContentSelectors: _c1$s, decls: 4, vars: 2, consts: [[1, "cut-nav-bar"]], template: function NavigationComponent_Template(rf, ctx) { if (rf & 1) {
266
- i0.ɵɵprojectionDef(_c0$12);
266
+ i0.ɵɵprojectionDef(_c0$14);
267
267
  i0.ɵɵelementStart(0, "div")(1, "nav", 0);
268
268
  i0.ɵɵprojection(2);
269
269
  i0.ɵɵprojection(3, 1);
@@ -382,12 +382,12 @@ class HeadersModule {
382
382
  }], null, null); })();
383
383
  (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(HeadersModule, { declarations: [PhaseComponent, HeaderBarComponent, NavigationComponent, NavigationItemComponent], imports: [CommonModule, RouterModule, i1.RpxTranslationModule], exports: [PhaseComponent, HeaderBarComponent, NavigationComponent, NavigationItemComponent] }); })();
384
384
 
385
- const _c0$11 = [[["", "topBody", ""]], [["", "leftBody", ""]], [["", "rightBody", ""]]];
385
+ const _c0$13 = [[["", "topBody", ""]], [["", "leftBody", ""]], [["", "rightBody", ""]]];
386
386
  const _c1$r = ["[topBody]", "[leftBody]", "[rightBody]"];
387
387
  class BodyComponent {
388
388
  static ɵfac = function BodyComponent_Factory(t) { return new (t || BodyComponent)(); };
389
389
  static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: BodyComponent, selectors: [["cut-body"]], ngContentSelectors: _c1$r, decls: 4, vars: 0, consts: [[1, "global-display"]], template: function BodyComponent_Template(rf, ctx) { if (rf & 1) {
390
- i0.ɵɵprojectionDef(_c0$11);
390
+ i0.ɵɵprojectionDef(_c0$13);
391
391
  i0.ɵɵelementStart(0, "div", 0);
392
392
  i0.ɵɵprojection(1);
393
393
  i0.ɵɵprojection(2, 1);
@@ -401,7 +401,7 @@ class BodyComponent {
401
401
  }], null, null); })();
402
402
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(BodyComponent, { className: "BodyComponent", filePath: "lib/components/body/body.component.ts", lineNumber: 9 }); })();
403
403
 
404
- const _c0$10 = a0 => ({ "govuk-input--error": a0 });
404
+ const _c0$12 = a0 => ({ "govuk-input--error": a0 });
405
405
  function DateInputComponent_div_19_Template(rf, ctx) { if (rf & 1) {
406
406
  const _r5 = i0.ɵɵgetCurrentView();
407
407
  i0.ɵɵelementStart(0, "div", 15)(1, "label", 8);
@@ -418,7 +418,7 @@ function DateInputComponent_div_19_Template(rf, ctx) { if (rf & 1) {
418
418
  i0.ɵɵadvance();
419
419
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 6, "Hour"));
420
420
  i0.ɵɵadvance(2);
421
- i0.ɵɵproperty("id", ctx_r6.hourId())("name", ctx_r6.hourId())("value", ctx_r6.displayHour)("ngClass", i0.ɵɵpureFunction1(8, _c0$10, ctx_r6.isInvalid));
421
+ i0.ɵɵproperty("id", ctx_r6.hourId())("name", ctx_r6.hourId())("value", ctx_r6.displayHour)("ngClass", i0.ɵɵpureFunction1(8, _c0$12, ctx_r6.isInvalid));
422
422
  } }
423
423
  function DateInputComponent_div_20_Template(rf, ctx) { if (rf & 1) {
424
424
  const _r8 = i0.ɵɵgetCurrentView();
@@ -436,7 +436,7 @@ function DateInputComponent_div_20_Template(rf, ctx) { if (rf & 1) {
436
436
  i0.ɵɵadvance();
437
437
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 6, "Minute"));
438
438
  i0.ɵɵadvance(2);
439
- i0.ɵɵproperty("id", ctx_r6.minuteId())("name", ctx_r6.minuteId())("value", ctx_r6.displayMinute)("ngClass", i0.ɵɵpureFunction1(8, _c0$10, ctx_r6.isInvalid));
439
+ i0.ɵɵproperty("id", ctx_r6.minuteId())("name", ctx_r6.minuteId())("value", ctx_r6.displayMinute)("ngClass", i0.ɵɵpureFunction1(8, _c0$12, ctx_r6.isInvalid));
440
440
  } }
441
441
  function DateInputComponent_div_21_Template(rf, ctx) { if (rf & 1) {
442
442
  const _r10 = i0.ɵɵgetCurrentView();
@@ -454,7 +454,7 @@ function DateInputComponent_div_21_Template(rf, ctx) { if (rf & 1) {
454
454
  i0.ɵɵadvance();
455
455
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 6, "Second"));
456
456
  i0.ɵɵadvance(2);
457
- i0.ɵɵproperty("id", ctx_r6.secondId())("name", ctx_r6.secondId())("value", ctx_r6.displaySecond)("ngClass", i0.ɵɵpureFunction1(8, _c0$10, ctx_r6.isInvalid));
457
+ i0.ɵɵproperty("id", ctx_r6.secondId())("name", ctx_r6.secondId())("value", ctx_r6.displaySecond)("ngClass", i0.ɵɵpureFunction1(8, _c0$12, ctx_r6.isInvalid));
458
458
  } }
459
459
  class DateInputComponent {
460
460
  id;
@@ -689,19 +689,19 @@ class DateInputComponent {
689
689
  i0.ɵɵadvance();
690
690
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 21, "Day"));
691
691
  i0.ɵɵadvance(2);
692
- i0.ɵɵproperty("id", ctx.dayId())("name", ctx.dayId())("value", ctx.displayDay)("ngClass", i0.ɵɵpureFunction1(27, _c0$10, ctx.isInvalid));
692
+ i0.ɵɵproperty("id", ctx.dayId())("name", ctx.dayId())("value", ctx.displayDay)("ngClass", i0.ɵɵpureFunction1(27, _c0$12, ctx.isInvalid));
693
693
  i0.ɵɵadvance(3);
694
694
  i0.ɵɵproperty("for", ctx.monthId());
695
695
  i0.ɵɵadvance();
696
696
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(10, 23, "Month"));
697
697
  i0.ɵɵadvance(2);
698
- i0.ɵɵproperty("id", ctx.monthId())("name", ctx.monthId())("value", ctx.displayMonth)("ngClass", i0.ɵɵpureFunction1(29, _c0$10, ctx.isInvalid));
698
+ i0.ɵɵproperty("id", ctx.monthId())("name", ctx.monthId())("value", ctx.displayMonth)("ngClass", i0.ɵɵpureFunction1(29, _c0$12, ctx.isInvalid));
699
699
  i0.ɵɵadvance(3);
700
700
  i0.ɵɵproperty("for", ctx.yearId());
701
701
  i0.ɵɵadvance();
702
702
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(16, 25, "Year"));
703
703
  i0.ɵɵadvance(2);
704
- i0.ɵɵproperty("id", ctx.yearId())("name", ctx.yearId())("value", ctx.displayYear)("ngClass", i0.ɵɵpureFunction1(31, _c0$10, ctx.isInvalid));
704
+ i0.ɵɵproperty("id", ctx.yearId())("name", ctx.yearId())("value", ctx.displayYear)("ngClass", i0.ɵɵpureFunction1(31, _c0$12, ctx.isInvalid));
705
705
  i0.ɵɵadvance(2);
706
706
  i0.ɵɵproperty("ngIf", ctx.isDateTime);
707
707
  i0.ɵɵadvance();
@@ -737,7 +737,7 @@ class DateInputComponent {
737
737
  }] }); })();
738
738
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(DateInputComponent, { className: "DateInputComponent", filePath: "lib/components/form/date-input/date-input.component.ts", lineNumber: 20 }); })();
739
739
 
740
- const _c0$$ = ["*"];
740
+ const _c0$11 = ["*"];
741
741
  function AlertComponent_ng_container_2_Template(rf, ctx) { if (rf & 1) {
742
742
  i0.ɵɵelementContainerStart(0);
743
743
  i0.ɵɵnamespaceSVG();
@@ -787,7 +787,7 @@ class AlertComponent {
787
787
  showIcon = true;
788
788
  alertMessageType = AlertMessageType;
789
789
  static ɵfac = function AlertComponent_Factory(t) { return new (t || AlertComponent)(); };
790
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AlertComponent, selectors: [["cut-alert"]], inputs: { type: "type", showIcon: "showIcon" }, ngContentSelectors: _c0$$, decls: 11, vars: 12, consts: [[1, "hmcts-banner"], [3, "ngSwitch"], [4, "ngSwitchCase"], [1, "hmcts-banner__message"], [1, "hmcts-banner__assistive"], ["fill", "currentColor", "role", "presentation", "focusable", "false", "xmlns", "http://www.w3.org/2000/svg", "viewBox", "0 0 25 25", "height", "25", "width", "25", 1, "hmcts-banner__icon"], ["d", "M13.6,15.4h-2.3v-4.5h2.3V15.4z M13.6,19.8h-2.3v-2.2h2.3V19.8z M0,23.2h25L12.5,2L0,23.2z"], ["d", "M25,6.2L8.7,23.2L0,14.1l4-4.2l4.7,4.9L21,2L25,6.2z"], ["d", "M13.7,18.5h-2.4v-2.4h2.4V18.5z M12.5,13.7c-0.7,0-1.2-0.5-1.2-1.2V7.7c0-0.7,0.5-1.2,1.2-1.2s1.2,0.5,1.2,1.2v4.8\n C13.7,13.2,13.2,13.7,12.5,13.7z M12.5,0.5c-6.6,0-12,5.4-12,12s5.4,12,12,12s12-5.4,12-12S19.1,0.5,12.5,0.5z"]], template: function AlertComponent_Template(rf, ctx) { if (rf & 1) {
790
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AlertComponent, selectors: [["cut-alert"]], inputs: { type: "type", showIcon: "showIcon" }, ngContentSelectors: _c0$11, decls: 11, vars: 12, consts: [[1, "hmcts-banner"], [3, "ngSwitch"], [4, "ngSwitchCase"], [1, "hmcts-banner__message"], [1, "hmcts-banner__assistive"], ["fill", "currentColor", "role", "presentation", "focusable", "false", "xmlns", "http://www.w3.org/2000/svg", "viewBox", "0 0 25 25", "height", "25", "width", "25", 1, "hmcts-banner__icon"], ["d", "M13.6,15.4h-2.3v-4.5h2.3V15.4z M13.6,19.8h-2.3v-2.2h2.3V19.8z M0,23.2h25L12.5,2L0,23.2z"], ["d", "M25,6.2L8.7,23.2L0,14.1l4-4.2l4.7,4.9L21,2L25,6.2z"], ["d", "M13.7,18.5h-2.4v-2.4h2.4V18.5z M12.5,13.7c-0.7,0-1.2-0.5-1.2-1.2V7.7c0-0.7,0.5-1.2,1.2-1.2s1.2,0.5,1.2,1.2v4.8\n C13.7,13.2,13.2,13.7,12.5,13.7z M12.5,0.5c-6.6,0-12,5.4-12,12s5.4,12,12,12s12-5.4,12-12S19.1,0.5,12.5,0.5z"]], template: function AlertComponent_Template(rf, ctx) { if (rf & 1) {
791
791
  i0.ɵɵprojectionDef();
792
792
  i0.ɵɵelementStart(0, "div", 0);
793
793
  i0.ɵɵelementContainerStart(1, 1);
@@ -1000,14 +1000,14 @@ class NotificationBannerComponent {
1000
1000
  }] }); })();
1001
1001
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(NotificationBannerComponent, { className: "NotificationBannerComponent", filePath: "lib/components/banners/notification-banner/notification-banner.component.ts", lineNumber: 10 }); })();
1002
1002
 
1003
- const _c0$_ = ["*"];
1003
+ const _c0$10 = ["*"];
1004
1004
  const _c1$q = a0 => ({ "js-hidden": a0 });
1005
1005
  class TabComponent {
1006
1006
  id;
1007
1007
  title;
1008
1008
  selected;
1009
1009
  static ɵfac = function TabComponent_Factory(t) { return new (t || TabComponent)(); };
1010
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TabComponent, selectors: [["cut-tab"]], inputs: { id: "id", title: "title", selected: "selected" }, ngContentSelectors: _c0$_, decls: 2, vars: 5, consts: [["role", "tabpanel", 1, "tabs-panel", 3, "id", "ngClass"]], template: function TabComponent_Template(rf, ctx) { if (rf & 1) {
1010
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TabComponent, selectors: [["cut-tab"]], inputs: { id: "id", title: "title", selected: "selected" }, ngContentSelectors: _c0$10, decls: 2, vars: 5, consts: [["role", "tabpanel", 1, "tabs-panel", 3, "id", "ngClass"]], template: function TabComponent_Template(rf, ctx) { if (rf & 1) {
1011
1011
  i0.ɵɵprojectionDef();
1012
1012
  i0.ɵɵelementStart(0, "div", 0);
1013
1013
  i0.ɵɵprojection(1);
@@ -1029,7 +1029,7 @@ class TabComponent {
1029
1029
  }] }); })();
1030
1030
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TabComponent, { className: "TabComponent", filePath: "lib/components/tabs/tab.component.ts", lineNumber: 10 }); })();
1031
1031
 
1032
- const _c0$Z = ["tab"];
1032
+ const _c0$$ = ["tab"];
1033
1033
  const _c1$p = ["*"];
1034
1034
  const _c2$4 = () => ["."];
1035
1035
  const _c3 = a0 => ({ "tabs-toggle-selected": a0 });
@@ -1076,7 +1076,7 @@ class TabsComponent {
1076
1076
  let _t;
1077
1077
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.panels = _t);
1078
1078
  } }, viewQuery: function TabsComponent_Query(rf, ctx) { if (rf & 1) {
1079
- i0.ɵɵviewQuery(_c0$Z, 5);
1079
+ i0.ɵɵviewQuery(_c0$$, 5);
1080
1080
  } if (rf & 2) {
1081
1081
  let _t;
1082
1082
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.tabs = _t);
@@ -1135,7 +1135,7 @@ class TabsModule {
1135
1135
  RouterModule, i1.RpxTranslationModule], exports: [TabsComponent,
1136
1136
  TabComponent] }); })();
1137
1137
 
1138
- const _c0$Y = (a0, a1) => ({ caseLocked: a0, someoneViewing: a1 });
1138
+ const _c0$_ = (a0, a1) => ({ caseLocked: a0, someoneViewing: a1 });
1139
1139
  class ActivityBannerComponent {
1140
1140
  bannerType;
1141
1141
  description;
@@ -1154,7 +1154,7 @@ class ActivityBannerComponent {
1154
1154
  i0.ɵɵpipe(6, "rpxTranslate");
1155
1155
  i0.ɵɵelementEnd()();
1156
1156
  } if (rf & 2) {
1157
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(8, _c0$Y, ctx.bannerType === "editor", ctx.bannerType === "viewer"));
1157
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(8, _c0$_, ctx.bannerType === "editor", ctx.bannerType === "viewer"));
1158
1158
  i0.ɵɵadvance(2);
1159
1159
  i0.ɵɵpropertyInterpolate("alt", i0.ɵɵpipeBind1(3, 4, ctx.description));
1160
1160
  i0.ɵɵpropertyInterpolate("src", ctx.imageLink, i0.ɵɵsanitizeUrl);
@@ -4554,7 +4554,7 @@ class ConditionParser {
4554
4554
  }
4555
4555
  static getValue(fields, head) {
4556
4556
  if (this.isDynamicList(fields[head])) {
4557
- return fields[head]?.value?.code;
4557
+ return fields[head].value.code;
4558
4558
  }
4559
4559
  else {
4560
4560
  return fields[head];
@@ -5650,7 +5650,7 @@ class FieldTypeSanitiser {
5650
5650
  const stringValue = data[field.id];
5651
5651
  if (typeof stringValue === 'string') {
5652
5652
  const listItems = this.getListItems(field);
5653
- const matches = listItems.filter(value => value?.code === stringValue);
5653
+ const matches = listItems.filter(value => value.code === stringValue);
5654
5654
  if (matches && matches.length > 0) {
5655
5655
  data[field.id] = {
5656
5656
  value: matches[0],
@@ -7048,6 +7048,118 @@ class FormErrorService {
7048
7048
  type: Injectable
7049
7049
  }], null, null); })();
7050
7050
 
7051
+ class MultipageComponentStateService {
7052
+ //is journey at start will help keep track of the progress through the journey.
7053
+ isJourneyAtStart = false;
7054
+ //journey collection references an upto date list of all the journey components currently rendered!!!!
7055
+ journeyCollection = new Array();
7056
+ //the instigator references the case-edit-page component that will invoke the next and previous methods
7057
+ instigator = null;
7058
+ //each journey will store its state here. this could include form data if needed
7059
+ journeyState = new Map();
7060
+ //setJourneyComponent will be called by the app component to update the journey collection
7061
+ setJourneyCollection(journeyCollection) {
7062
+ this.journeyCollection = journeyCollection;
7063
+ }
7064
+ //getJourneyCollection will be called by the app component to get the journey collection
7065
+ getJourneyCollection() {
7066
+ return this.journeyCollection;
7067
+ }
7068
+ //addToJourneyCollection will be called from the journey
7069
+ addTojourneyCollection(journey) {
7070
+ this.journeyCollection.push(journey);
7071
+ }
7072
+ //resetJourneyCollection will be called
7073
+ resetJourneyCollection() {
7074
+ this.journeyCollection = [];
7075
+ }
7076
+ //setInstigator will be called by the app component to update the instigator
7077
+ setInstigator(instigator) {
7078
+ this.instigator = instigator;
7079
+ }
7080
+ //getInstigator will be called by the app component to get the instigator
7081
+ getInstigator() {
7082
+ return this.instigator;
7083
+ }
7084
+ //setJourneyState will be called by the journey component to update the journey state
7085
+ setJourneyState(journey) {
7086
+ this.journeyState.set(journey.journeyId, journey);
7087
+ }
7088
+ //getJourneyState will be called by the journey component to get the journey state
7089
+ getJourneyState(journey) {
7090
+ return this.journeyState.get(journey.journeyId) || null;
7091
+ }
7092
+ //resetJourneyState will be called by the journey component to reset the journey state
7093
+ resetJourneyState() {
7094
+ this.journeyState.clear();
7095
+ }
7096
+ //reset will be called to ensure that the entire state is reset
7097
+ reset() {
7098
+ this.isJourneyAtStart = false;
7099
+ this.journeyState.clear();
7100
+ this.instigator = null;
7101
+ this.journeyCollection = [];
7102
+ }
7103
+ //next will be called by the instigator that will invoke the next method of the journey component that will invoke the next method of the childpage component
7104
+ next() {
7105
+ if (this.journeyCollection.length <= 0) {
7106
+ this.instigator?.onFinalNext();
7107
+ return;
7108
+ }
7109
+ const isAnyObjectNotFinished = this.journeyCollection.some((journey) => !journey.isFinished());
7110
+ if (!isAnyObjectNotFinished) {
7111
+ this.instigator?.onFinalNext();
7112
+ return;
7113
+ }
7114
+ for (const journey of this.journeyCollection) {
7115
+ if (!journey) {
7116
+ continue;
7117
+ }
7118
+ if (!journey?.isFinished()) {
7119
+ journey?.next();
7120
+ break;
7121
+ }
7122
+ }
7123
+ }
7124
+ //previous will be called by the instigator that will invoke the previous method of the journey component that will invoke the previous method of the childpage component
7125
+ previous() {
7126
+ if (this.journeyCollection.length <= 0) {
7127
+ this.instigator?.onFinalPrevious();
7128
+ return;
7129
+ }
7130
+ const isAnyObjectNotAtStart = this.journeyCollection.some((journey) => !journey.isStart());
7131
+ if (!isAnyObjectNotAtStart) {
7132
+ this.instigator?.onFinalPrevious();
7133
+ return;
7134
+ }
7135
+ for (const journey of this.journeyCollection.slice().reverse()) {
7136
+ if (!journey) {
7137
+ continue;
7138
+ }
7139
+ if (!journey?.isStart()) {
7140
+ journey?.previous();
7141
+ break;
7142
+ }
7143
+ }
7144
+ }
7145
+ //isAtStart can be used to inform the instigator if we're at the start.
7146
+ get isAtStart() {
7147
+ return this.isJourneyAtStart;
7148
+ }
7149
+ //isAtStart can be used to update the value from a journey object, so the instigator knows.
7150
+ set isAtStart(isAtStart) {
7151
+ this.isJourneyAtStart = isAtStart;
7152
+ }
7153
+ static ɵfac = function MultipageComponentStateService_Factory(t) { return new (t || MultipageComponentStateService)(); };
7154
+ static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: MultipageComponentStateService, factory: MultipageComponentStateService.ɵfac, providedIn: 'root' });
7155
+ }
7156
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MultipageComponentStateService, [{
7157
+ type: Injectable,
7158
+ args: [{
7159
+ providedIn: 'root'
7160
+ }]
7161
+ }], null, null); })();
7162
+
7051
7163
  class JurisdictionService {
7052
7164
  httpService;
7053
7165
  // We retain the Subject observable because subscribing code couldn't happen a null value
@@ -10142,25 +10254,24 @@ function CaseEditPageComponent_form_10_div_4_Template(rf, ctx) { if (rf & 1) {
10142
10254
  function CaseEditPageComponent_form_10_Template(rf, ctx) { if (rf & 1) {
10143
10255
  const _r5 = i0.ɵɵgetCurrentView();
10144
10256
  i0.ɵɵelementStart(0, "form", 22);
10145
- i0.ɵɵlistener("submit", function CaseEditPageComponent_form_10_Template_form_submit_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.submit()); });
10257
+ i0.ɵɵlistener("submit", function CaseEditPageComponent_form_10_Template_form_submit_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.nextStep()); });
10146
10258
  i0.ɵɵelementStart(1, "fieldset", 23);
10147
10259
  i0.ɵɵelement(2, "legend", 24);
10148
10260
  i0.ɵɵtemplate(3, CaseEditPageComponent_form_10_ccd_case_edit_form_3_Template, 1, 4, "ccd-case-edit-form", 25)(4, CaseEditPageComponent_form_10_div_4_Template, 5, 6, "div", 26);
10149
10261
  i0.ɵɵelementEnd();
10150
10262
  i0.ɵɵelementStart(5, "div", 27)(6, "button", 28);
10151
- i0.ɵɵpipe(7, "async");
10152
10263
  i0.ɵɵlistener("click", function CaseEditPageComponent_form_10_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.toPreviousPage()); });
10153
- i0.ɵɵtext(8);
10154
- i0.ɵɵpipe(9, "rpxTranslate");
10264
+ i0.ɵɵtext(7);
10265
+ i0.ɵɵpipe(8, "rpxTranslate");
10155
10266
  i0.ɵɵelementEnd();
10156
- i0.ɵɵelementStart(10, "button", 29);
10157
- i0.ɵɵtext(11);
10158
- i0.ɵɵpipe(12, "rpxTranslate");
10267
+ i0.ɵɵelementStart(9, "button", 29);
10268
+ i0.ɵɵtext(10);
10269
+ i0.ɵɵpipe(11, "rpxTranslate");
10159
10270
  i0.ɵɵelementEnd()();
10160
- i0.ɵɵelementStart(13, "p", 30)(14, "a", 31);
10161
- i0.ɵɵlistener("click", function CaseEditPageComponent_form_10_Template_a_click_14_listener() { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.cancel()); });
10162
- i0.ɵɵtext(15);
10163
- i0.ɵɵpipe(16, "rpxTranslate");
10271
+ i0.ɵɵelementStart(12, "p", 30)(13, "a", 31);
10272
+ i0.ɵɵlistener("click", function CaseEditPageComponent_form_10_Template_a_click_13_listener() { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.cancel()); });
10273
+ i0.ɵɵtext(14);
10274
+ i0.ɵɵpipe(15, "rpxTranslate");
10164
10275
  i0.ɵɵelementEnd()()();
10165
10276
  } if (rf & 2) {
10166
10277
  const ctx_r1 = i0.ɵɵnextContext();
@@ -10170,15 +10281,15 @@ function CaseEditPageComponent_form_10_Template(rf, ctx) { if (rf & 1) {
10170
10281
  i0.ɵɵadvance();
10171
10282
  i0.ɵɵproperty("ngIf", ctx_r1.currentPage.isMultiColumn());
10172
10283
  i0.ɵɵadvance(2);
10173
- i0.ɵɵproperty("disabled", !i0.ɵɵpipeBind1(7, 8, ctx_r1.hasPreviousPage$));
10174
- i0.ɵɵadvance(2);
10175
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(9, 10, "Previous"), " ");
10284
+ i0.ɵɵproperty("disabled", ctx_r1.isAtStart());
10285
+ i0.ɵɵadvance();
10286
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(8, 8, "Previous"), " ");
10176
10287
  i0.ɵɵadvance(2);
10177
10288
  i0.ɵɵproperty("disabled", ctx_r1.submitting());
10178
10289
  i0.ɵɵadvance();
10179
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(12, 12, ctx_r1.triggerText));
10290
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(11, 10, ctx_r1.triggerText));
10180
10291
  i0.ɵɵadvance(4);
10181
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(16, 14, ctx_r1.getCancelText()));
10292
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(15, 12, ctx_r1.getCancelText()));
10182
10293
  } }
10183
10294
  function CaseEditPageComponent_ccd_case_event_completion_11_Template(rf, ctx) { if (rf & 1) {
10184
10295
  const _r7 = i0.ɵɵgetCurrentView();
@@ -10201,6 +10312,7 @@ class CaseEditPageComponent {
10201
10312
  caseEditDataService;
10202
10313
  loadingService;
10203
10314
  validPageListCaseFieldsService;
10315
+ multipageComponentStateService;
10204
10316
  addressService;
10205
10317
  static RESUMED_FORM_DISCARD = 'RESUMED_FORM_DISCARD';
10206
10318
  static NEW_FORM_DISCARD = 'NEW_FORM_DISCARD';
@@ -10242,7 +10354,7 @@ class CaseEditPageComponent {
10242
10354
  topContainer.focus();
10243
10355
  }
10244
10356
  }
10245
- constructor(caseEdit, route, formValueService, formErrorService, cdRef, pageValidationService, dialog, caseFieldService, caseEditDataService, loadingService, validPageListCaseFieldsService, addressService) {
10357
+ constructor(caseEdit, route, formValueService, formErrorService, cdRef, pageValidationService, dialog, caseFieldService, caseEditDataService, loadingService, validPageListCaseFieldsService, multipageComponentStateService, addressService) {
10246
10358
  this.caseEdit = caseEdit;
10247
10359
  this.route = route;
10248
10360
  this.formValueService = formValueService;
@@ -10254,7 +10366,26 @@ class CaseEditPageComponent {
10254
10366
  this.caseEditDataService = caseEditDataService;
10255
10367
  this.loadingService = loadingService;
10256
10368
  this.validPageListCaseFieldsService = validPageListCaseFieldsService;
10369
+ this.multipageComponentStateService = multipageComponentStateService;
10257
10370
  this.addressService = addressService;
10371
+ this.multipageComponentStateService.setInstigator(this);
10372
+ }
10373
+ onFinalNext() {
10374
+ this.submit();
10375
+ }
10376
+ onFinalPrevious() {
10377
+ this.cancel();
10378
+ }
10379
+ isAtStart() {
10380
+ return this.multipageComponentStateService.isAtStart;
10381
+ }
10382
+ // This method will be triggered by the next button in the app component
10383
+ nextStep() {
10384
+ this.multipageComponentStateService.next();
10385
+ }
10386
+ // This method will be triggered by the previous button in the app component
10387
+ previousStep() {
10388
+ this.multipageComponentStateService.previous();
10258
10389
  }
10259
10390
  ngOnInit() {
10260
10391
  initDialog();
@@ -10313,6 +10444,7 @@ class CaseEditPageComponent {
10313
10444
  this.dialogRefAfterClosedSub?.unsubscribe();
10314
10445
  this.saveDraftSub?.unsubscribe();
10315
10446
  this.caseFormValidationErrorsSub?.unsubscribe();
10447
+ this.multipageComponentStateService.reset();
10316
10448
  }
10317
10449
  applyValuesChanged(valuesChanged) {
10318
10450
  this.formValuesChanged = valuesChanged;
@@ -10339,6 +10471,7 @@ class CaseEditPageComponent {
10339
10471
  caseEventData.data = caseEventData.event_data;
10340
10472
  this.updateFormData(caseEventData);
10341
10473
  this.previous();
10474
+ this.previousStep();
10342
10475
  CaseEditPageComponent.setFocusToTop();
10343
10476
  }
10344
10477
  // Adding validation message to show it as Error Summary
@@ -10615,6 +10748,7 @@ class CaseEditPageComponent {
10615
10748
  this.caseEdit.cancelled.emit();
10616
10749
  }
10617
10750
  this.caseEditDataService.clearFormValidationErrors();
10751
+ this.multipageComponentStateService.reset();
10618
10752
  }
10619
10753
  submitting() {
10620
10754
  return this.caseEdit.isSubmitting;
@@ -10767,7 +10901,7 @@ class CaseEditPageComponent {
10767
10901
  }
10768
10902
  });
10769
10903
  }
10770
- static ɵfac = function CaseEditPageComponent_Factory(t) { return new (t || 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(AddressesService)); };
10904
+ static ɵfac = function CaseEditPageComponent_Factory(t) { return new (t || 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)); };
10771
10905
  static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEditPageComponent, selectors: [["ccd-case-edit-page"]], 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"], [1, "validation-error", 3, "click"], [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"], ["type", "button", 1, "button", "button-secondary", 3, "click", "disabled"], ["type", "submit", 1, "button", 3, "disabled"], [1, "cancel"], ["href", "javascript:void(0)", 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"], [3, "eventCanBeCompleted", "eventCompletionParams"]], template: function CaseEditPageComponent_Template(rf, ctx) { if (rf & 1) {
10772
10906
  const _r1 = i0.ɵɵgetCurrentView();
10773
10907
  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, 2, 5, "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);
@@ -10776,7 +10910,7 @@ class CaseEditPageComponent {
10776
10910
  i0.ɵɵlistener("callbackErrorsContext", function CaseEditPageComponent_Template_ccd_callback_errors_callbackErrorsContext_8_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.callbackErrorsNotify($event)); });
10777
10911
  i0.ɵɵelementEnd();
10778
10912
  i0.ɵɵelementStart(9, "div", 7);
10779
- i0.ɵɵtemplate(10, CaseEditPageComponent_form_10_Template, 17, 16, "form", 8);
10913
+ i0.ɵɵtemplate(10, CaseEditPageComponent_form_10_Template, 16, 14, "form", 8);
10780
10914
  i0.ɵɵelementEnd();
10781
10915
  i0.ɵɵtemplate(11, CaseEditPageComponent_ccd_case_event_completion_11_Template, 1, 1, "ccd-case-event-completion", 9);
10782
10916
  } if (rf & 2) {
@@ -10799,9 +10933,9 @@ class CaseEditPageComponent {
10799
10933
  }
10800
10934
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditPageComponent, [{
10801
10935
  type: Component,
10802
- args: [{ selector: 'ccd-case-edit-page', 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']\"></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)\" 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)=\"submit()\">\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\" [disabled]=\"!(hasPreviousPage$ | async)\" (click)=\"toPreviousPage()\">\n {{'Previous' | rpxTranslate}}\n </button>\n <button class=\"button\" type=\"submit\" [disabled]=\"submitting()\">{{triggerText | rpxTranslate}}</button>\n </div>\n\n <p class=\"cancel\"><a (click)=\"cancel()\" href=\"javascript:void(0)\">{{getCancelText() | rpxTranslate}}</a></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"] }]
10803
- }], () => [{ 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: AddressesService }], null); })();
10804
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEditPageComponent, { className: "CaseEditPageComponent", filePath: "lib/shared/components/case-editor/case-edit-page/case-edit-page.component.ts", lineNumber: 31 }); })();
10936
+ args: [{ selector: 'ccd-case-edit-page', 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']\"></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)\" 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()\" [disabled]=\"isAtStart()\">\n {{'Previous' | rpxTranslate}}\n </button>\n <button class=\"button\" type=\"submit\" [disabled]=\"submitting()\">{{triggerText | rpxTranslate}}</button>\n </div>\n\n <p class=\"cancel\"><a (click)=\"cancel()\" href=\"javascript:void(0)\">{{getCancelText() | rpxTranslate}}</a></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"] }]
10937
+ }], () => [{ 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 }], null); })();
10938
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEditPageComponent, { className: "CaseEditPageComponent", filePath: "lib/shared/components/case-editor/case-edit-page/case-edit-page.component.ts", lineNumber: 32 }); })();
10805
10939
 
10806
10940
  class CallbackErrorsContext {
10807
10941
  triggerText;
@@ -10950,7 +11084,7 @@ class CallbackErrorsComponent {
10950
11084
  }] }); })();
10951
11085
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CallbackErrorsComponent, { className: "CallbackErrorsComponent", filePath: "lib/shared/components/error/callback-errors.component.ts", lineNumber: 10 }); })();
10952
11086
 
10953
- const _c0$X = a0 => ["/", "cases", "case-details", a0, "tasks"];
11087
+ const _c0$Z = a0 => ["/", "cases", "case-details", a0, "tasks"];
10954
11088
  class CaseEventCompletionTaskCancelledComponent {
10955
11089
  parentComponent;
10956
11090
  caseId;
@@ -11013,7 +11147,7 @@ class CaseEventCompletionTaskCancelledComponent {
11013
11147
  i0.ɵɵadvance(4);
11014
11148
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(27, 21, "Continue"), " ");
11015
11149
  i0.ɵɵadvance(2);
11016
- i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction1(25, _c0$X, ctx.caseId));
11150
+ i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction1(25, _c0$Z, ctx.caseId));
11017
11151
  i0.ɵɵadvance();
11018
11152
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(30, 23, "Cancel"), " ");
11019
11153
  } }, dependencies: [i1$1.RouterLink, i1.RpxTranslatePipe], encapsulation: 2 });
@@ -11027,7 +11161,7 @@ class CaseEventCompletionTaskCancelledComponent {
11027
11161
  }] }], null); })();
11028
11162
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEventCompletionTaskCancelledComponent, { className: "CaseEventCompletionTaskCancelledComponent", filePath: "lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-cancelled/case-event-completion-task-cancelled.component.ts", lineNumber: 8 }); })();
11029
11163
 
11030
- const _c0$W = a0 => ["/", "cases", "case-details", a0, "tasks"];
11164
+ const _c0$Y = a0 => ["/", "cases", "case-details", a0, "tasks"];
11031
11165
  function CaseEventCompletionTaskReassignedComponent_div_0_Template(rf, ctx) { if (rf & 1) {
11032
11166
  const _r1 = i0.ɵɵgetCurrentView();
11033
11167
  i0.ɵɵelementStart(0, "div", 1)(1, "div", 2)(2, "h2", 3);
@@ -11080,7 +11214,7 @@ function CaseEventCompletionTaskReassignedComponent_div_0_Template(rf, ctx) { if
11080
11214
  i0.ɵɵadvance(4);
11081
11215
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(27, 22, "Continue"), " ");
11082
11216
  i0.ɵɵadvance(2);
11083
- i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction1(26, _c0$W, ctx_r1.caseId));
11217
+ i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction1(26, _c0$Y, ctx_r1.caseId));
11084
11218
  i0.ɵɵadvance();
11085
11219
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(30, 24, "Cancel"), " ");
11086
11220
  } }
@@ -11552,7 +11686,7 @@ class WriteComplexFieldComponent extends AbstractFieldWriteComponent {
11552
11686
  }] }); })();
11553
11687
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(WriteComplexFieldComponent, { className: "WriteComplexFieldComponent", filePath: "lib/shared/components/palette/complex/write-complex-field.component.ts", lineNumber: 21 }); })();
11554
11688
 
11555
- const _c0$V = ["writeComplexFieldComponent"];
11689
+ const _c0$X = ["writeComplexFieldComponent"];
11556
11690
  const _c1$o = a0 => ({ "form-group-error": a0 });
11557
11691
  const _c2$3 = a0 => ({ "govuk-input--error": a0 });
11558
11692
  function WriteAddressFieldComponent_div_1_div_4_span_5_Template(rf, ctx) { if (rf & 1) {
@@ -11794,7 +11928,7 @@ class WriteAddressFieldComponent extends AbstractFieldWriteComponent {
11794
11928
  }
11795
11929
  static ɵfac = function WriteAddressFieldComponent_Factory(t) { return new (t || WriteAddressFieldComponent)(i0.ɵɵdirectiveInject(AddressesService), i0.ɵɵdirectiveInject(IsCompoundPipe)); };
11796
11930
  static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteAddressFieldComponent, selectors: [["ccd-write-address-field"]], viewQuery: function WriteAddressFieldComponent_Query(rf, ctx) { if (rf & 1) {
11797
- i0.ɵɵviewQuery(_c0$V, 5);
11931
+ i0.ɵɵviewQuery(_c0$X, 5);
11798
11932
  i0.ɵɵviewQuery(FocusElementDirective, 5);
11799
11933
  } if (rf & 2) {
11800
11934
  let _t;
@@ -11857,6 +11991,172 @@ class AbstractFieldReadComponent extends AbstractFormFieldComponent {
11857
11991
  type: Input
11858
11992
  }] }); })();
11859
11993
 
11994
+ const _c0$W = ["journeyChild"];
11995
+ class AbstractFieldWriteJourneyComponent extends AbstractFieldWriteComponent {
11996
+ multipageComponentStateService;
11997
+ journeyStartPageNumber = 0;
11998
+ journeyEndPageNumber = 0;
11999
+ journeyPageNumber = 0;
12000
+ journeyPreviousPageNumber = 0;
12001
+ journeyId = 'journey';
12002
+ // todo...
12003
+ childJourney;
12004
+ constructor(multipageComponentStateService) {
12005
+ super();
12006
+ this.multipageComponentStateService = multipageComponentStateService;
12007
+ this.multipageComponentStateService.addTojourneyCollection(this);
12008
+ this.journeyPageNumber = this.journeyStartPageNumber;
12009
+ }
12010
+ next() {
12011
+ if (!this.hasNext()) {
12012
+ return;
12013
+ }
12014
+ this.childJourney.next();
12015
+ }
12016
+ previous() {
12017
+ if (!this.hasPrevious()) {
12018
+ return;
12019
+ }
12020
+ if (this.childJourney['cachedFlagType'] && this.childJourney['subJourneyIndex'] !== 0) {
12021
+ this.childJourney.previous();
12022
+ }
12023
+ else {
12024
+ this.previousPage();
12025
+ }
12026
+ }
12027
+ previousPage() {
12028
+ if (this.hasPrevious()) {
12029
+ this.journeyPageNumber--;
12030
+ this.onPageChange();
12031
+ }
12032
+ }
12033
+ nextPage() {
12034
+ if (this.hasNext()) {
12035
+ this.journeyPageNumber++;
12036
+ this.onPageChange();
12037
+ }
12038
+ }
12039
+ ngOnInit() {
12040
+ this.journeyPageNumber = this.journeyStartPageNumber;
12041
+ const state = this.multipageComponentStateService.getJourneyState(this);
12042
+ if (state) {
12043
+ const { journeyPageNumber, journeyStartPageNumber, journeyEndPageNumber } = state;
12044
+ this.journeyPageNumber = journeyPageNumber;
12045
+ this.journeyStartPageNumber = journeyStartPageNumber;
12046
+ this.journeyEndPageNumber = journeyEndPageNumber;
12047
+ }
12048
+ }
12049
+ ngOnDestroy() {
12050
+ this.multipageComponentStateService.setJourneyState(this);
12051
+ }
12052
+ hasNext() { return this.journeyPageNumber < this.journeyEndPageNumber; }
12053
+ ;
12054
+ hasPrevious() { return this.journeyPageNumber > this.journeyStartPageNumber; }
12055
+ ;
12056
+ isFinished() { return this.journeyPageNumber === this.journeyEndPageNumber; }
12057
+ ;
12058
+ isStart() { return this.journeyPageNumber === this.journeyStartPageNumber; }
12059
+ ;
12060
+ getId() { return this.journeyId; }
12061
+ ;
12062
+ onPageChange() { }
12063
+ ;
12064
+ static ɵfac = function AbstractFieldWriteJourneyComponent_Factory(t) { return new (t || AbstractFieldWriteJourneyComponent)(i0.ɵɵdirectiveInject(MultipageComponentStateService)); };
12065
+ static ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: AbstractFieldWriteJourneyComponent, viewQuery: function AbstractFieldWriteJourneyComponent_Query(rf, ctx) { if (rf & 1) {
12066
+ i0.ɵɵviewQuery(_c0$W, 5);
12067
+ } if (rf & 2) {
12068
+ let _t;
12069
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.childJourney = _t.first);
12070
+ } }, inputs: { journeyId: "journeyId" }, features: [i0.ɵɵInheritDefinitionFeature] });
12071
+ }
12072
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AbstractFieldWriteJourneyComponent, [{
12073
+ type: Directive
12074
+ }], () => [{ type: MultipageComponentStateService }], { journeyId: [{
12075
+ type: Input
12076
+ }], childJourney: [{
12077
+ type: ViewChild,
12078
+ args: ['journeyChild']
12079
+ }] }); })();
12080
+
12081
+ const _c0$V = ["journeyChild"];
12082
+ class AbstractJourneyComponent {
12083
+ multipageComponentStateService;
12084
+ journeyStartPageNumber = 0;
12085
+ journeyEndPageNumber = 0;
12086
+ journeyPageNumber = 0;
12087
+ journeyPreviousPageNumber;
12088
+ journeyId = 'journey';
12089
+ // todo...
12090
+ childJourney;
12091
+ constructor(multipageComponentStateService) {
12092
+ this.multipageComponentStateService = multipageComponentStateService;
12093
+ this.multipageComponentStateService.addTojourneyCollection(this);
12094
+ this.journeyPageNumber = this.journeyStartPageNumber;
12095
+ }
12096
+ next() {
12097
+ if (!this.hasNext()) {
12098
+ return;
12099
+ }
12100
+ this.childJourney.next();
12101
+ }
12102
+ previous() {
12103
+ if (!this.hasPrevious()) {
12104
+ return;
12105
+ }
12106
+ this.previousPage();
12107
+ }
12108
+ previousPage() {
12109
+ if (this.hasPrevious()) {
12110
+ this.journeyPageNumber--;
12111
+ }
12112
+ }
12113
+ ngOnInit() {
12114
+ this.journeyPageNumber = this.journeyStartPageNumber;
12115
+ const state = this.multipageComponentStateService.getJourneyState(this);
12116
+ console.log(this.journeyPageNumber);
12117
+ if (state) {
12118
+ const { journeyPageNumber, journeyStartPageNumber, journeyEndPageNumber } = state;
12119
+ this.journeyPageNumber = journeyPageNumber;
12120
+ this.journeyStartPageNumber = journeyStartPageNumber;
12121
+ this.journeyEndPageNumber = journeyEndPageNumber;
12122
+ }
12123
+ }
12124
+ ngOnDestroy() {
12125
+ this.multipageComponentStateService.setJourneyState(this);
12126
+ }
12127
+ hasNext() {
12128
+ return this.journeyPageNumber < this.journeyEndPageNumber;
12129
+ }
12130
+ hasPrevious() {
12131
+ return this.journeyPageNumber > this.journeyStartPageNumber;
12132
+ }
12133
+ isFinished() {
12134
+ return this.journeyPageNumber === this.journeyEndPageNumber;
12135
+ }
12136
+ isStart() {
12137
+ return this.journeyPageNumber === this.journeyStartPageNumber;
12138
+ }
12139
+ getId() {
12140
+ return this.journeyId;
12141
+ }
12142
+ onPageChange() { }
12143
+ static ɵfac = function AbstractJourneyComponent_Factory(t) { return new (t || AbstractJourneyComponent)(i0.ɵɵdirectiveInject(MultipageComponentStateService)); };
12144
+ static ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: AbstractJourneyComponent, viewQuery: function AbstractJourneyComponent_Query(rf, ctx) { if (rf & 1) {
12145
+ i0.ɵɵviewQuery(_c0$V, 5);
12146
+ } if (rf & 2) {
12147
+ let _t;
12148
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.childJourney = _t.first);
12149
+ } }, inputs: { journeyId: "journeyId" } });
12150
+ }
12151
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AbstractJourneyComponent, [{
12152
+ type: Directive
12153
+ }], () => [{ type: MultipageComponentStateService }], { journeyId: [{
12154
+ type: Input
12155
+ }], childJourney: [{
12156
+ type: ViewChild,
12157
+ args: ['journeyChild']
12158
+ }] }); })();
12159
+
11860
12160
  var DisplayContextParameter;
11861
12161
  (function (DisplayContextParameter) {
11862
12162
  DisplayContextParameter["Read"] = "READ";
@@ -12316,7 +12616,7 @@ class ReadCaseFlagFieldComponent extends AbstractFieldReadComponent {
12316
12616
 
12317
12617
  function WriteCaseFlagFieldComponent_div_0_div_4_Template(rf, ctx) { if (rf & 1) {
12318
12618
  const _r1 = i0.ɵɵgetCurrentView();
12319
- i0.ɵɵelementStart(0, "div", 5)(1, "ul", 6)(2, "li")(3, "a", 7);
12619
+ i0.ɵɵelementStart(0, "div", 6)(1, "ul", 7)(2, "li")(3, "a", 8);
12320
12620
  i0.ɵɵlistener("click", function WriteCaseFlagFieldComponent_div_0_div_4_Template_a_click_3_listener() { const errorMessage_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.navigateToErrorElement(errorMessage_r2.fieldId)); });
12321
12621
  i0.ɵɵtext(4);
12322
12622
  i0.ɵɵpipe(5, "rpxTranslate");
@@ -12327,11 +12627,11 @@ function WriteCaseFlagFieldComponent_div_0_div_4_Template(rf, ctx) { if (rf & 1)
12327
12627
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 1, errorMessage_r2.description));
12328
12628
  } }
12329
12629
  function WriteCaseFlagFieldComponent_div_0_Template(rf, ctx) { if (rf & 1) {
12330
- i0.ɵɵelementStart(0, "div", 2)(1, "h2", 3);
12630
+ i0.ɵɵelementStart(0, "div", 3)(1, "h2", 4);
12331
12631
  i0.ɵɵtext(2);
12332
12632
  i0.ɵɵpipe(3, "rpxTranslate");
12333
12633
  i0.ɵɵelementEnd();
12334
- i0.ɵɵtemplate(4, WriteCaseFlagFieldComponent_div_0_div_4_Template, 6, 3, "div", 4);
12634
+ i0.ɵɵtemplate(4, WriteCaseFlagFieldComponent_div_0_div_4_Template, 6, 3, "div", 5);
12335
12635
  i0.ɵɵelementEnd();
12336
12636
  } if (rf & 2) {
12337
12637
  const ctx_r2 = i0.ɵɵnextContext();
@@ -12343,7 +12643,7 @@ function WriteCaseFlagFieldComponent_div_0_Template(rf, ctx) { if (rf & 1) {
12343
12643
  function WriteCaseFlagFieldComponent_div_1_ng_container_2_Template(rf, ctx) { if (rf & 1) {
12344
12644
  const _r4 = i0.ɵɵgetCurrentView();
12345
12645
  i0.ɵɵelementContainerStart(0);
12346
- i0.ɵɵelementStart(1, "ccd-select-flag-location", 11);
12646
+ i0.ɵɵelementStart(1, "ccd-select-flag-location", 12, 0);
12347
12647
  i0.ɵɵlistener("caseFlagStateEmitter", function WriteCaseFlagFieldComponent_div_1_ng_container_2_Template_ccd_select_flag_location_caseFlagStateEmitter_1_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.onCaseFlagStateEmitted($event)); });
12348
12648
  i0.ɵɵelementEnd();
12349
12649
  i0.ɵɵelementContainerEnd();
@@ -12355,7 +12655,7 @@ function WriteCaseFlagFieldComponent_div_1_ng_container_2_Template(rf, ctx) { if
12355
12655
  function WriteCaseFlagFieldComponent_div_1_ng_container_3_Template(rf, ctx) { if (rf & 1) {
12356
12656
  const _r5 = i0.ɵɵgetCurrentView();
12357
12657
  i0.ɵɵelementContainerStart(0);
12358
- i0.ɵɵelementStart(1, "ccd-select-flag-type", 12);
12658
+ i0.ɵɵelementStart(1, "ccd-select-flag-type", 13, 0);
12359
12659
  i0.ɵɵlistener("caseFlagStateEmitter", function WriteCaseFlagFieldComponent_div_1_ng_container_3_Template_ccd_select_flag_type_caseFlagStateEmitter_1_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.onCaseFlagStateEmitted($event)); })("flagCommentsOptionalEmitter", function WriteCaseFlagFieldComponent_div_1_ng_container_3_Template_ccd_select_flag_type_flagCommentsOptionalEmitter_1_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.onFlagCommentsOptionalEmitted($event)); });
12360
12660
  i0.ɵɵelementEnd();
12361
12661
  i0.ɵɵelementContainerEnd();
@@ -12367,7 +12667,7 @@ function WriteCaseFlagFieldComponent_div_1_ng_container_3_Template(rf, ctx) { if
12367
12667
  function WriteCaseFlagFieldComponent_div_1_ng_container_4_Template(rf, ctx) { if (rf & 1) {
12368
12668
  const _r6 = i0.ɵɵgetCurrentView();
12369
12669
  i0.ɵɵelementContainerStart(0);
12370
- i0.ɵɵelementStart(1, "ccd-search-language-interpreter", 13);
12670
+ i0.ɵɵelementStart(1, "ccd-search-language-interpreter", 14, 0);
12371
12671
  i0.ɵɵlistener("caseFlagStateEmitter", function WriteCaseFlagFieldComponent_div_1_ng_container_4_Template_ccd_search_language_interpreter_caseFlagStateEmitter_1_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.onCaseFlagStateEmitted($event)); });
12372
12672
  i0.ɵɵelementEnd();
12373
12673
  i0.ɵɵelementContainerEnd();
@@ -12379,7 +12679,7 @@ function WriteCaseFlagFieldComponent_div_1_ng_container_4_Template(rf, ctx) { if
12379
12679
  function WriteCaseFlagFieldComponent_div_1_ng_container_5_Template(rf, ctx) { if (rf & 1) {
12380
12680
  const _r7 = i0.ɵɵgetCurrentView();
12381
12681
  i0.ɵɵelementContainerStart(0);
12382
- i0.ɵɵelementStart(1, "ccd-add-comments", 14);
12682
+ i0.ɵɵelementStart(1, "ccd-add-comments", 15, 0);
12383
12683
  i0.ɵɵlistener("caseFlagStateEmitter", function WriteCaseFlagFieldComponent_div_1_ng_container_5_Template_ccd_add_comments_caseFlagStateEmitter_1_listener($event) { i0.ɵɵrestoreView(_r7); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.onCaseFlagStateEmitted($event)); });
12384
12684
  i0.ɵɵelementEnd();
12385
12685
  i0.ɵɵelementContainerEnd();
@@ -12391,7 +12691,7 @@ function WriteCaseFlagFieldComponent_div_1_ng_container_5_Template(rf, ctx) { if
12391
12691
  function WriteCaseFlagFieldComponent_div_1_ng_container_6_Template(rf, ctx) { if (rf & 1) {
12392
12692
  const _r8 = i0.ɵɵgetCurrentView();
12393
12693
  i0.ɵɵelementContainerStart(0);
12394
- i0.ɵɵelementStart(1, "ccd-confirm-flag-status", 15);
12694
+ i0.ɵɵelementStart(1, "ccd-confirm-flag-status", 16, 0);
12395
12695
  i0.ɵɵlistener("caseFlagStateEmitter", function WriteCaseFlagFieldComponent_div_1_ng_container_6_Template_ccd_confirm_flag_status_caseFlagStateEmitter_1_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.onCaseFlagStateEmitted($event)); });
12396
12696
  i0.ɵɵelementEnd();
12397
12697
  i0.ɵɵelementContainerEnd();
@@ -12401,8 +12701,8 @@ function WriteCaseFlagFieldComponent_div_1_ng_container_6_Template(rf, ctx) { if
12401
12701
  i0.ɵɵproperty("formGroup", ctx_r2.caseFlagParentFormGroup)("defaultStatus", ctx_r2.flagType.defaultStatus);
12402
12702
  } }
12403
12703
  function WriteCaseFlagFieldComponent_div_1_Template(rf, ctx) { if (rf & 1) {
12404
- i0.ɵɵelementStart(0, "div", 8)(1, "div", 9);
12405
- i0.ɵɵtemplate(2, WriteCaseFlagFieldComponent_div_1_ng_container_2_Template, 2, 3, "ng-container", 10)(3, WriteCaseFlagFieldComponent_div_1_ng_container_3_Template, 2, 7, "ng-container", 10)(4, WriteCaseFlagFieldComponent_div_1_ng_container_4_Template, 2, 2, "ng-container", 10)(5, WriteCaseFlagFieldComponent_div_1_ng_container_5_Template, 2, 4, "ng-container", 10)(6, WriteCaseFlagFieldComponent_div_1_ng_container_6_Template, 2, 2, "ng-container", 10);
12704
+ i0.ɵɵelementStart(0, "div", 9)(1, "div", 10);
12705
+ i0.ɵɵtemplate(2, WriteCaseFlagFieldComponent_div_1_ng_container_2_Template, 3, 3, "ng-container", 11)(3, WriteCaseFlagFieldComponent_div_1_ng_container_3_Template, 3, 7, "ng-container", 11)(4, WriteCaseFlagFieldComponent_div_1_ng_container_4_Template, 3, 2, "ng-container", 11)(5, WriteCaseFlagFieldComponent_div_1_ng_container_5_Template, 3, 4, "ng-container", 11)(6, WriteCaseFlagFieldComponent_div_1_ng_container_6_Template, 3, 2, "ng-container", 11);
12406
12706
  i0.ɵɵelementEnd()();
12407
12707
  } if (rf & 2) {
12408
12708
  const ctx_r2 = i0.ɵɵnextContext();
@@ -12423,7 +12723,7 @@ function WriteCaseFlagFieldComponent_div_1_Template(rf, ctx) { if (rf & 1) {
12423
12723
  function WriteCaseFlagFieldComponent_div_2_ng_container_2_Template(rf, ctx) { if (rf & 1) {
12424
12724
  const _r9 = i0.ɵɵgetCurrentView();
12425
12725
  i0.ɵɵelementContainerStart(0);
12426
- i0.ɵɵelementStart(1, "ccd-manage-case-flags", 16);
12726
+ i0.ɵɵelementStart(1, "ccd-manage-case-flags", 17, 0);
12427
12727
  i0.ɵɵlistener("caseFlagStateEmitter", function WriteCaseFlagFieldComponent_div_2_ng_container_2_Template_ccd_manage_case_flags_caseFlagStateEmitter_1_listener($event) { i0.ɵɵrestoreView(_r9); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.onCaseFlagStateEmitted($event)); });
12428
12728
  i0.ɵɵelementEnd();
12429
12729
  i0.ɵɵelementContainerEnd();
@@ -12435,7 +12735,7 @@ function WriteCaseFlagFieldComponent_div_2_ng_container_2_Template(rf, ctx) { if
12435
12735
  function WriteCaseFlagFieldComponent_div_2_ng_container_3_Template(rf, ctx) { if (rf & 1) {
12436
12736
  const _r10 = i0.ɵɵgetCurrentView();
12437
12737
  i0.ɵɵelementContainerStart(0);
12438
- i0.ɵɵelementStart(1, "ccd-update-flag", 17);
12738
+ i0.ɵɵelementStart(1, "ccd-update-flag", 18, 0);
12439
12739
  i0.ɵɵlistener("caseFlagStateEmitter", function WriteCaseFlagFieldComponent_div_2_ng_container_3_Template_ccd_update_flag_caseFlagStateEmitter_1_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.onCaseFlagStateEmitted($event)); });
12440
12740
  i0.ɵɵelementEnd();
12441
12741
  i0.ɵɵelementContainerEnd();
@@ -12447,7 +12747,7 @@ function WriteCaseFlagFieldComponent_div_2_ng_container_3_Template(rf, ctx) { if
12447
12747
  function WriteCaseFlagFieldComponent_div_2_ng_container_4_Template(rf, ctx) { if (rf & 1) {
12448
12748
  const _r11 = i0.ɵɵgetCurrentView();
12449
12749
  i0.ɵɵelementContainerStart(0);
12450
- i0.ɵɵelementStart(1, "ccd-update-flag-add-translation-form", 18);
12750
+ i0.ɵɵelementStart(1, "ccd-update-flag-add-translation-form", 19, 0);
12451
12751
  i0.ɵɵlistener("caseFlagStateEmitter", function WriteCaseFlagFieldComponent_div_2_ng_container_4_Template_ccd_update_flag_add_translation_form_caseFlagStateEmitter_1_listener($event) { i0.ɵɵrestoreView(_r11); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.onCaseFlagStateEmitted($event)); });
12452
12752
  i0.ɵɵelementEnd();
12453
12753
  i0.ɵɵelementContainerEnd();
@@ -12457,8 +12757,8 @@ function WriteCaseFlagFieldComponent_div_2_ng_container_4_Template(rf, ctx) { if
12457
12757
  i0.ɵɵproperty("formGroup", ctx_r2.caseFlagParentFormGroup);
12458
12758
  } }
12459
12759
  function WriteCaseFlagFieldComponent_div_2_Template(rf, ctx) { if (rf & 1) {
12460
- i0.ɵɵelementStart(0, "div", 8)(1, "div", 9);
12461
- i0.ɵɵtemplate(2, WriteCaseFlagFieldComponent_div_2_ng_container_2_Template, 2, 4, "ng-container", 10)(3, WriteCaseFlagFieldComponent_div_2_ng_container_3_Template, 2, 2, "ng-container", 10)(4, WriteCaseFlagFieldComponent_div_2_ng_container_4_Template, 2, 1, "ng-container", 10);
12760
+ i0.ɵɵelementStart(0, "div", 9)(1, "div", 10);
12761
+ i0.ɵɵtemplate(2, WriteCaseFlagFieldComponent_div_2_ng_container_2_Template, 3, 4, "ng-container", 11)(3, WriteCaseFlagFieldComponent_div_2_ng_container_3_Template, 3, 2, "ng-container", 11)(4, WriteCaseFlagFieldComponent_div_2_ng_container_4_Template, 3, 1, "ng-container", 11);
12462
12762
  i0.ɵɵelementEnd()();
12463
12763
  } if (rf & 2) {
12464
12764
  const ctx_r2 = i0.ɵɵnextContext();
@@ -12472,11 +12772,12 @@ function WriteCaseFlagFieldComponent_div_2_Template(rf, ctx) { if (rf & 1) {
12472
12772
  i0.ɵɵadvance();
12473
12773
  i0.ɵɵproperty("ngSwitchCase", ctx_r2.caseFlagFieldState.FLAG_UPDATE_WELSH_TRANSLATION);
12474
12774
  } }
12475
- class WriteCaseFlagFieldComponent extends AbstractFieldWriteComponent {
12775
+ class WriteCaseFlagFieldComponent extends AbstractFieldWriteJourneyComponent {
12476
12776
  route;
12477
12777
  caseEditDataService;
12478
12778
  caseFlagStateService;
12479
12779
  rpxTranslationService;
12780
+ //public formGroup: FormGroup;
12480
12781
  fieldState;
12481
12782
  caseFlagFieldState = CaseFlagFieldState;
12482
12783
  errorMessages = [];
@@ -12510,24 +12811,26 @@ class WriteCaseFlagFieldComponent extends AbstractFieldWriteComponent {
12510
12811
  this.caseFlagParentFormGroup.value.selectedLocation = selectedLocation;
12511
12812
  }
12512
12813
  }
12513
- constructor(route, caseEditDataService, caseFlagStateService, rpxTranslationService) {
12514
- super();
12814
+ constructor(route, caseEditDataService, caseFlagStateService, rpxTranslationService, multipageComponentStateService) {
12815
+ super(multipageComponentStateService);
12515
12816
  this.route = route;
12516
12817
  this.caseEditDataService = caseEditDataService;
12517
12818
  this.caseFlagStateService = caseFlagStateService;
12518
12819
  this.rpxTranslationService = rpxTranslationService;
12519
12820
  }
12520
12821
  ngOnInit() {
12822
+ let navigatedTo = false;
12521
12823
  // If it is start of the journey or navigation from check your answers page then fieldStateToNavigate property
12522
12824
  // in case flag state service will contain the field state to navigate based on create or manage journey
12523
12825
  this.fieldState = this.caseFlagStateService.fieldStateToNavigate;
12524
- if (this.fieldState === undefined ||
12525
- this.fieldState === CaseFlagFieldState.FLAG_LOCATION ||
12526
- this.fieldState === CaseFlagFieldState.FLAG_MANAGE_CASE_FLAGS) {
12826
+ if (this.fieldState === undefined) {
12527
12827
  const params = this.route.snapshot.params;
12528
12828
  // Clear the form group, field state to navigate and set the page location
12529
12829
  this.caseFlagStateService.resetCache(`../${params['eid']}/${params['page']}`);
12530
12830
  }
12831
+ else {
12832
+ navigatedTo = true;
12833
+ }
12531
12834
  // Reassign the form group from the case flag state service
12532
12835
  this.caseFlagParentFormGroup = this.caseFlagStateService.formGroup;
12533
12836
  // Clear form validation errors as a new page will be rendered based on field state
@@ -12589,6 +12892,45 @@ class WriteCaseFlagFieldComponent extends AbstractFieldWriteComponent {
12589
12892
  });
12590
12893
  }
12591
12894
  }
12895
+ // CSFD-16.
12896
+ // Setup the page number to initially be the same value as
12897
+ // the start page number. Provided that some state exists within
12898
+ // the page state service, use that instaead.
12899
+ //
12900
+ // If isDisplayContextParameterUpdate is true, then the starting page must be
12901
+ // the value of 4. Otherwise, it's 0. However, we're using an enum to simplify
12902
+ // this process.
12903
+ //
12904
+ // It might help to take a look at the template file.
12905
+ if (this.isDisplayContextParameterUpdate) {
12906
+ this.journeyStartPageNumber = CaseFlagFieldState.FLAG_MANAGE_CASE_FLAGS;
12907
+ this.journeyEndPageNumber = CaseFlagFieldState.FLAG_UPDATE_WELSH_TRANSLATION;
12908
+ }
12909
+ else {
12910
+ this.journeyStartPageNumber = CaseFlagFieldState.FLAG_LOCATION;
12911
+ this.journeyEndPageNumber = CaseFlagFieldState.FLAG_STATUS;
12912
+ }
12913
+ // Now that we've set the start page number, let's set the current page number.
12914
+ this.journeyPageNumber = this.journeyStartPageNumber;
12915
+ // If we've navigated to this page, then we know by default, we want to set the
12916
+ // journey page number to the field state.
12917
+ if (navigatedTo) {
12918
+ this.journeyPageNumber = this.fieldState;
12919
+ this.journeyPreviousPageNumber = this.journeyEndPageNumber++;
12920
+ }
12921
+ // Provided we have some stored state, i.e. when going backwards, we want
12922
+ // to get the last visited page, etc.
12923
+ const state = this.multipageComponentStateService.getJourneyState(this);
12924
+ if (state) {
12925
+ const { journeyPageNumber, journeyStartPageNumber, journeyEndPageNumber } = state;
12926
+ this.journeyPageNumber = journeyPageNumber;
12927
+ this.journeyStartPageNumber = journeyStartPageNumber;
12928
+ this.journeyEndPageNumber = journeyEndPageNumber;
12929
+ }
12930
+ this.multipageComponentStateService.isAtStart = this.journeyPageNumber === this.journeyStartPageNumber;
12931
+ }
12932
+ onPageChange() {
12933
+ this.multipageComponentStateService.isAtStart = this.journeyPageNumber === this.journeyStartPageNumber;
12592
12934
  }
12593
12935
  setDisplayContextParameterUpdate(displayContextParameter) {
12594
12936
  return displayContextParameter === CaseFlagDisplayContextParameter.UPDATE ||
@@ -12644,6 +12986,7 @@ class WriteCaseFlagFieldComponent extends AbstractFieldWriteComponent {
12644
12986
  }
12645
12987
  proceedToNextState() {
12646
12988
  if (!this.isAtFinalState()) {
12989
+ this.journeyPreviousPageNumber = this.fieldState;
12647
12990
  // Skip the "language interpreter" state if current state is CaseFlagFieldState.FLAG_TYPE and the flag type doesn't
12648
12991
  // have a "list of values" - currently, this is present only for those flag types that require language interpreter
12649
12992
  // selection
@@ -12653,6 +12996,7 @@ class WriteCaseFlagFieldComponent extends AbstractFieldWriteComponent {
12653
12996
  else {
12654
12997
  this.fieldState++;
12655
12998
  }
12999
+ this.nextPage();
12656
13000
  }
12657
13001
  }
12658
13002
  setFlagsCaseFieldValue() {
@@ -12671,6 +13015,16 @@ class WriteCaseFlagFieldComponent extends AbstractFieldWriteComponent {
12671
13015
  break;
12672
13016
  }
12673
13017
  }
13018
+ previousPage() {
13019
+ this.journeyPreviousPageNumber = this.fieldState;
13020
+ if (this.hasPrevious() && this.fieldState === CaseFlagFieldState.FLAG_COMMENTS && !this.flagType?.listOfValues) {
13021
+ this.fieldState = CaseFlagFieldState.FLAG_TYPE;
13022
+ }
13023
+ else if (this.hasPrevious()) {
13024
+ this.fieldState--;
13025
+ }
13026
+ super.previousPage();
13027
+ }
12674
13028
  addFlagToCollection() {
12675
13029
  // Ensure no more than one new flag is being added at a time, by iterating through each Flags case field and removing
12676
13030
  // any previous entry from the details array where that entry has no id (hence it is new - and there should be only
@@ -12969,6 +13323,7 @@ class WriteCaseFlagFieldComponent extends AbstractFieldWriteComponent {
12969
13323
  }
12970
13324
  }
12971
13325
  ngOnDestroy() {
13326
+ this.multipageComponentStateService.setJourneyState(this);
12972
13327
  // Reset the fieldstateToNavigate as the write journey completes at this point
12973
13328
  this.caseFlagStateService.fieldStateToNavigate = undefined;
12974
13329
  this.caseTitleSubscription?.unsubscribe();
@@ -12980,9 +13335,9 @@ class WriteCaseFlagFieldComponent extends AbstractFieldWriteComponent {
12980
13335
  setDisplayContextParameter(caseFields) {
12981
13336
  return caseFields.find(caseField => FieldsUtils.isCaseFieldOfType(caseField, ['FlagLauncher']))?.display_context_parameter;
12982
13337
  }
12983
- static ɵfac = function WriteCaseFlagFieldComponent_Factory(t) { return new (t || WriteCaseFlagFieldComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(CaseEditDataService), i0.ɵɵdirectiveInject(CaseFlagStateService), i0.ɵɵdirectiveInject(i1.RpxTranslationService)); };
12984
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteCaseFlagFieldComponent, selectors: [["ccd-write-case-flag-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 3, consts: [["class", "govuk-error-summary", "aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 4, "ngIf"], ["class", "form-group", 3, "formGroup", 4, "ngIf"], ["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"], [1, "validation-error", 3, "click"], [1, "form-group", 3, "formGroup"], [1, "govuk-form-group", 3, "ngSwitch"], [4, "ngSwitchCase"], [3, "caseFlagStateEmitter", "formGroup", "flagsData", "isDisplayContextParameterExternal"], [3, "caseFlagStateEmitter", "flagCommentsOptionalEmitter", "formGroup", "jurisdiction", "caseTypeId", "hmctsServiceId", "isDisplayContextParameterExternal", "isDisplayContextParameter2Point1Enabled", "selectedFlagsLocation"], [3, "caseFlagStateEmitter", "formGroup", "flagType"], [3, "caseFlagStateEmitter", "formGroup", "optional", "isDisplayContextParameterExternal", "isDisplayContextParameter2Point1Enabled"], [3, "caseFlagStateEmitter", "formGroup", "defaultStatus"], [3, "caseFlagStateEmitter", "formGroup", "flagsData", "caseTitle", "displayContextParameter"], [3, "caseFlagStateEmitter", "formGroup", "displayContextParameter"], [3, "caseFlagStateEmitter", "formGroup"]], template: function WriteCaseFlagFieldComponent_Template(rf, ctx) { if (rf & 1) {
12985
- i0.ɵɵtemplate(0, WriteCaseFlagFieldComponent_div_0_Template, 5, 4, "div", 0)(1, WriteCaseFlagFieldComponent_div_1_Template, 7, 7, "div", 1)(2, WriteCaseFlagFieldComponent_div_2_Template, 5, 5, "div", 1);
13338
+ static ɵfac = function WriteCaseFlagFieldComponent_Factory(t) { return new (t || WriteCaseFlagFieldComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(CaseEditDataService), i0.ɵɵdirectiveInject(CaseFlagStateService), i0.ɵɵdirectiveInject(i1.RpxTranslationService), i0.ɵɵdirectiveInject(MultipageComponentStateService)); };
13339
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteCaseFlagFieldComponent, selectors: [["ccd-write-case-flag-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 3, consts: [["journeyChild", ""], ["class", "govuk-error-summary", "aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 4, "ngIf"], ["class", "form-group", 3, "formGroup", 4, "ngIf"], ["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"], [1, "validation-error", 3, "click"], [1, "form-group", 3, "formGroup"], [1, "govuk-form-group", 3, "ngSwitch"], [4, "ngSwitchCase"], [3, "caseFlagStateEmitter", "formGroup", "flagsData", "isDisplayContextParameterExternal"], [3, "caseFlagStateEmitter", "flagCommentsOptionalEmitter", "formGroup", "jurisdiction", "caseTypeId", "hmctsServiceId", "isDisplayContextParameterExternal", "isDisplayContextParameter2Point1Enabled", "selectedFlagsLocation"], [3, "caseFlagStateEmitter", "formGroup", "flagType"], [3, "caseFlagStateEmitter", "formGroup", "optional", "isDisplayContextParameterExternal", "isDisplayContextParameter2Point1Enabled"], [3, "caseFlagStateEmitter", "formGroup", "defaultStatus"], [3, "caseFlagStateEmitter", "formGroup", "flagsData", "caseTitle", "displayContextParameter"], [3, "caseFlagStateEmitter", "formGroup", "displayContextParameter"], [3, "caseFlagStateEmitter", "formGroup"]], template: function WriteCaseFlagFieldComponent_Template(rf, ctx) { if (rf & 1) {
13340
+ i0.ɵɵtemplate(0, WriteCaseFlagFieldComponent_div_0_Template, 5, 4, "div", 1)(1, WriteCaseFlagFieldComponent_div_1_Template, 7, 7, "div", 2)(2, WriteCaseFlagFieldComponent_div_2_Template, 5, 5, "div", 2);
12986
13341
  } if (rf & 2) {
12987
13342
  i0.ɵɵproperty("ngIf", ctx.errorMessages.length > 0);
12988
13343
  i0.ɵɵadvance();
@@ -12993,9 +13348,9 @@ class WriteCaseFlagFieldComponent extends AbstractFieldWriteComponent {
12993
13348
  }
12994
13349
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteCaseFlagFieldComponent, [{
12995
13350
  type: Component,
12996
- args: [{ selector: 'ccd-write-case-flag-field', template: "<!-- Error message summary -->\n<div *ngIf=\"errorMessages.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 errorMessage of errorMessages\" class=\"govuk-error-summary__body\">\n <ul class=\"govuk-list govuk-error-summary__list\">\n <li>\n <a (click)=\"navigateToErrorElement(errorMessage.fieldId)\" class=\"validation-error\">{{errorMessage.description | rpxTranslate}}</a>\n </li>\n </ul>\n </div>\n</div>\n<div *ngIf=\"!isDisplayContextParameterUpdate\" class=\"form-group\" [formGroup]=\"formGroup\">\n <div class=\"govuk-form-group\" [ngSwitch]=\"fieldState\">\n <ng-container *ngSwitchCase=\"caseFlagFieldState.FLAG_LOCATION\">\n <ccd-select-flag-location\n [formGroup]=\"caseFlagParentFormGroup\" [flagsData]=\"flagsData\"\n (caseFlagStateEmitter)=\"onCaseFlagStateEmitted($event)\"\n [isDisplayContextParameterExternal]=\"isDisplayContextParameterExternal\"\n ></ccd-select-flag-location>\n </ng-container>\n <ng-container *ngSwitchCase=\"caseFlagFieldState.FLAG_TYPE\">\n <ccd-select-flag-type [formGroup]=\"caseFlagParentFormGroup\" [jurisdiction]=\"jurisdiction\" [caseTypeId]=\"caseTypeId\"\n [hmctsServiceId]=\"hmctsServiceId\" [isDisplayContextParameterExternal]=\"isDisplayContextParameterExternal\"\n [isDisplayContextParameter2Point1Enabled]=\"isDisplayContextParameter2Point1Enabled\"\n [selectedFlagsLocation]=\"selectedFlagsLocation\"\n (caseFlagStateEmitter)=\"onCaseFlagStateEmitted($event)\"\n (flagCommentsOptionalEmitter)=\"onFlagCommentsOptionalEmitted($event)\"></ccd-select-flag-type>\n </ng-container>\n <ng-container *ngSwitchCase=\"caseFlagFieldState.FLAG_LANGUAGE_INTERPRETER\">\n <ccd-search-language-interpreter [formGroup]=\"caseFlagParentFormGroup\"\n [flagType]=\"flagType\"\n (caseFlagStateEmitter)=\"onCaseFlagStateEmitted($event)\">\n </ccd-search-language-interpreter>\n </ng-container>\n <ng-container *ngSwitchCase=\"caseFlagFieldState.FLAG_COMMENTS\">\n <ccd-add-comments [formGroup]=\"caseFlagParentFormGroup\" [optional]=\"flagCommentsOptional\"\n (caseFlagStateEmitter)=\"onCaseFlagStateEmitted($event)\"\n [isDisplayContextParameterExternal]=\"isDisplayContextParameterExternal\"\n [isDisplayContextParameter2Point1Enabled]=\"isDisplayContextParameter2Point1Enabled\">\n </ccd-add-comments>\n </ng-container>\n <ng-container *ngSwitchCase=\"caseFlagFieldState.FLAG_STATUS\">\n <ccd-confirm-flag-status [formGroup]=\"caseFlagParentFormGroup\" [defaultStatus]=\"flagType.defaultStatus\"\n (caseFlagStateEmitter)=\"onCaseFlagStateEmitted($event)\"></ccd-confirm-flag-status>\n </ng-container>\n </div>\n</div>\n<div *ngIf=\"isDisplayContextParameterUpdate\" class=\"form-group\" [formGroup]=\"formGroup\">\n <div class=\"govuk-form-group\" [ngSwitch]=\"fieldState\">\n <ng-container *ngSwitchCase=\"caseFlagFieldState.FLAG_MANAGE_CASE_FLAGS\">\n <ccd-manage-case-flags [formGroup]=\"caseFlagParentFormGroup\" [flagsData]=\"flagsData\" [caseTitle]=\"caseTitle\"\n [displayContextParameter]=\"displayContextParameter\"\n (caseFlagStateEmitter)=\"onCaseFlagStateEmitted($event)\"></ccd-manage-case-flags>\n </ng-container>\n <ng-container *ngSwitchCase=\"caseFlagFieldState.FLAG_UPDATE\">\n <ccd-update-flag [formGroup]=\"caseFlagParentFormGroup\"\n [displayContextParameter]=\"displayContextParameter\"\n (caseFlagStateEmitter)=\"onCaseFlagStateEmitted($event)\"></ccd-update-flag>\n </ng-container>\n <ng-container *ngSwitchCase=\"caseFlagFieldState.FLAG_UPDATE_WELSH_TRANSLATION\">\n <ccd-update-flag-add-translation-form\n [formGroup]=\"caseFlagParentFormGroup\"\n (caseFlagStateEmitter)=\"onCaseFlagStateEmitted($event)\"\n ></ccd-update-flag-add-translation-form>\n </ng-container>\n </div>\n</div>\n", styles: [".validation-error{cursor:pointer;text-decoration:underline;color:#d4351c}\n"] }]
12997
- }], () => [{ type: i1$1.ActivatedRoute }, { type: CaseEditDataService }, { type: CaseFlagStateService }, { type: i1.RpxTranslationService }], null); })();
12998
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(WriteCaseFlagFieldComponent, { className: "WriteCaseFlagFieldComponent", filePath: "lib/shared/components/palette/case-flag/write-case-flag-field.component.ts", lineNumber: 20 }); })();
13351
+ args: [{ selector: 'ccd-write-case-flag-field', template: "<!-- Error message summary -->\n<div *ngIf=\"errorMessages.length > 0\" class=\"govuk-error-summary\" aria-labelledby=\"error-summary-title\" role=\"alert\"\n 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 errorMessage of errorMessages\" class=\"govuk-error-summary__body\">\n <ul class=\"govuk-list govuk-error-summary__list\">\n <li>\n <a (click)=\"navigateToErrorElement(errorMessage.fieldId)\" class=\"validation-error\">{{errorMessage.description |\n rpxTranslate}}</a>\n </li>\n </ul>\n </div>\n</div>\n<div *ngIf=\"!isDisplayContextParameterUpdate\" class=\"form-group\" [formGroup]=\"formGroup\">\n <div class=\"govuk-form-group\" [ngSwitch]=\"fieldState\">\n <ng-container *ngSwitchCase=\"caseFlagFieldState.FLAG_LOCATION\">\n <ccd-select-flag-location \n #journeyChild \n [formGroup]=\"caseFlagParentFormGroup\" \n [flagsData]=\"flagsData\"\n [isDisplayContextParameterExternal]=\"isDisplayContextParameterExternal\"\n (caseFlagStateEmitter)=\"onCaseFlagStateEmitted($event)\">\n </ccd-select-flag-location>\n </ng-container>\n <ng-container *ngSwitchCase=\"caseFlagFieldState.FLAG_TYPE\">\n <ccd-select-flag-type \n #journeyChild \n [formGroup]=\"caseFlagParentFormGroup\" \n [jurisdiction]=\"jurisdiction\"\n [caseTypeId]=\"caseTypeId\" \n [hmctsServiceId]=\"hmctsServiceId\"\n [isDisplayContextParameterExternal]=\"isDisplayContextParameterExternal\"\n [isDisplayContextParameter2Point1Enabled]=\"isDisplayContextParameter2Point1Enabled\"\n [selectedFlagsLocation]=\"selectedFlagsLocation\" \n (caseFlagStateEmitter)=\"onCaseFlagStateEmitted($event)\"\n (flagCommentsOptionalEmitter)=\"onFlagCommentsOptionalEmitted($event)\">\n </ccd-select-flag-type>\n </ng-container>\n <ng-container *ngSwitchCase=\"caseFlagFieldState.FLAG_LANGUAGE_INTERPRETER\">\n <ccd-search-language-interpreter \n #journeyChild \n [formGroup]=\"caseFlagParentFormGroup\" \n [flagType]=\"flagType\" \n (caseFlagStateEmitter)=\"onCaseFlagStateEmitted($event)\">\n </ccd-search-language-interpreter>\n </ng-container>\n <ng-container *ngSwitchCase=\"caseFlagFieldState.FLAG_COMMENTS\">\n <ccd-add-comments \n #journeyChild \n [formGroup]=\"caseFlagParentFormGroup\" \n [optional]=\"flagCommentsOptional\"\n [isDisplayContextParameterExternal]=\"isDisplayContextParameterExternal\"\n [isDisplayContextParameter2Point1Enabled]=\"isDisplayContextParameter2Point1Enabled\"\n (caseFlagStateEmitter)=\"onCaseFlagStateEmitted($event)\">\n </ccd-add-comments>\n </ng-container>\n <ng-container *ngSwitchCase=\"caseFlagFieldState.FLAG_STATUS\">\n <ccd-confirm-flag-status \n #journeyChild \n [formGroup]=\"caseFlagParentFormGroup\"\n [defaultStatus]=\"flagType.defaultStatus\" \n (caseFlagStateEmitter)=\"onCaseFlagStateEmitted($event)\">\n </ccd-confirm-flag-status>\n </ng-container>\n </div>\n</div>\n<div *ngIf=\"isDisplayContextParameterUpdate\" class=\"form-group\" [formGroup]=\"formGroup\">\n <div class=\"govuk-form-group\" [ngSwitch]=\"fieldState\">\n <ng-container *ngSwitchCase=\"caseFlagFieldState.FLAG_MANAGE_CASE_FLAGS\">\n <ccd-manage-case-flags \n #journeyChild \n [formGroup]=\"caseFlagParentFormGroup\" \n [flagsData]=\"flagsData\"\n [caseTitle]=\"caseTitle\" \n [displayContextParameter]=\"displayContextParameter\"\n (caseFlagStateEmitter)=\"onCaseFlagStateEmitted($event)\">\n </ccd-manage-case-flags>\n </ng-container>\n <ng-container *ngSwitchCase=\"caseFlagFieldState.FLAG_UPDATE\">\n <ccd-update-flag \n #journeyChild \n [formGroup]=\"caseFlagParentFormGroup\"\n [displayContextParameter]=\"displayContextParameter\" \n (caseFlagStateEmitter)=\"onCaseFlagStateEmitted($event)\">\n </ccd-update-flag>\n </ng-container>\n <ng-container *ngSwitchCase=\"caseFlagFieldState.FLAG_UPDATE_WELSH_TRANSLATION\">\n <ccd-update-flag-add-translation-form \n #journeyChild \n [formGroup]=\"caseFlagParentFormGroup\"\n (caseFlagStateEmitter)=\"onCaseFlagStateEmitted($event)\">\n </ccd-update-flag-add-translation-form>\n </ng-container>\n </div>\n</div>", styles: [".validation-error{cursor:pointer;text-decoration:underline;color:#d4351c}\n"] }]
13352
+ }], () => [{ type: i1$1.ActivatedRoute }, { type: CaseEditDataService }, { type: CaseFlagStateService }, { type: i1.RpxTranslationService }, { type: MultipageComponentStateService }], null); })();
13353
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(WriteCaseFlagFieldComponent, { className: "WriteCaseFlagFieldComponent", filePath: "lib/shared/components/palette/case-flag/write-case-flag-field.component.ts", lineNumber: 21 }); })();
12999
13354
 
13000
13355
  class CaseReferencePipe {
13001
13356
  transform(caseReference) {
@@ -13768,7 +14123,7 @@ class ReadComplexFieldComponent extends AbstractFieldReadComponent {
13768
14123
  field.list_items = this.caseField.value[field.id]?.list_items;
13769
14124
  field.value = {
13770
14125
  list_items: field.list_items,
13771
- value: this.caseField.value[field.id]?.value && this.caseField.value[field.id].value?.code ?
14126
+ value: this.caseField.value[field.id]?.value && this.caseField.value[field.id].value.code ?
13772
14127
  this.caseField.value[field.id].value.code :
13773
14128
  this.caseField.value[field.id]?.value
13774
14129
  };
@@ -14970,8 +15325,8 @@ class WriteDynamicRadioListFieldComponent extends AbstractFieldWriteComponent {
14970
15325
  if (!this.caseField.list_items && this.caseField.formatted_value && this.caseField.formatted_value.list_items) {
14971
15326
  this.caseField.list_items = this.caseField.formatted_value.list_items;
14972
15327
  }
14973
- if (!this.caseField.value && this.caseField.formatted_value?.value) {
14974
- this.caseField.value = this.caseField.formatted_value.value?.code;
15328
+ if (!this.caseField.value && this.caseField.formatted_value && this.caseField.formatted_value.value) {
15329
+ this.caseField.value = this.caseField.formatted_value.value.code;
14975
15330
  }
14976
15331
  const isNull = this.caseField.value === undefined || this.caseField.value === '';
14977
15332
  if (isNull || typeof this.caseField.value === 'object') {
@@ -15893,7 +16248,7 @@ function BeforeYouStartComponent_div_1_Template(rf, ctx) { if (rf & 1) {
15893
16248
  i0.ɵɵproperty("ngIf", ctx_r1.serverLinkedApiError);
15894
16249
  } }
15895
16250
  function BeforeYouStartComponent_div_2_div_3_Template(rf, ctx) { if (rf & 1) {
15896
- i0.ɵɵelementStart(0, "div", 11)(1, "p", 3);
16251
+ i0.ɵɵelementStart(0, "div", 9)(1, "p", 3);
15897
16252
  i0.ɵɵtext(2, "If a group of linked cases has a lead case, you must start from the lead case.");
15898
16253
  i0.ɵɵelementEnd();
15899
16254
  i0.ɵɵelementStart(3, "p", 3);
@@ -15901,20 +16256,16 @@ function BeforeYouStartComponent_div_2_div_3_Template(rf, ctx) { if (rf & 1) {
15901
16256
  i0.ɵɵelementEnd()();
15902
16257
  } }
15903
16258
  function BeforeYouStartComponent_div_2_div_4_Template(rf, ctx) { if (rf & 1) {
15904
- i0.ɵɵelementStart(0, "div", 12)(1, "p", 3);
16259
+ i0.ɵɵelementStart(0, "div", 10)(1, "p", 3);
15905
16260
  i0.ɵɵtext(2, "If there are linked hearings for the case you need to un-link then you must unlink the hearing first.");
15906
16261
  i0.ɵɵelementEnd()();
15907
16262
  } }
15908
16263
  function BeforeYouStartComponent_div_2_Template(rf, ctx) { if (rf & 1) {
15909
- const _r3 = i0.ɵɵgetCurrentView();
15910
16264
  i0.ɵɵelementStart(0, "div")(1, "h1", 1);
15911
16265
  i0.ɵɵtext(2, "Before you start");
15912
16266
  i0.ɵɵelementEnd();
15913
16267
  i0.ɵɵtemplate(3, BeforeYouStartComponent_div_2_div_3_Template, 5, 0, "div", 7)(4, BeforeYouStartComponent_div_2_div_4_Template, 3, 0, "div", 8);
15914
- i0.ɵɵelementStart(5, "div", 9)(6, "button", 10);
15915
- i0.ɵɵlistener("click", function BeforeYouStartComponent_div_2_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onNext()); });
15916
- i0.ɵɵtext(7, "Next");
15917
- i0.ɵɵelementEnd()()();
16268
+ i0.ɵɵelementEnd();
15918
16269
  } if (rf & 2) {
15919
16270
  const ctx_r1 = i0.ɵɵnextContext();
15920
16271
  i0.ɵɵadvance(3);
@@ -15922,14 +16273,15 @@ function BeforeYouStartComponent_div_2_Template(rf, ctx) { if (rf & 1) {
15922
16273
  i0.ɵɵadvance();
15923
16274
  i0.ɵɵproperty("ngIf", !ctx_r1.isLinkCasesJourney);
15924
16275
  } }
15925
- class BeforeYouStartComponent {
16276
+ class BeforeYouStartComponent extends AbstractJourneyComponent {
15926
16277
  router;
15927
16278
  linkedCasesService;
15928
16279
  linkedCasesStateEmitter = new EventEmitter();
15929
16280
  isLinkCasesJourney = false;
15930
16281
  errorMessages;
15931
16282
  serverLinkedApiError;
15932
- constructor(router, linkedCasesService) {
16283
+ constructor(router, linkedCasesService, multipageComponentStateService) {
16284
+ super(multipageComponentStateService);
15933
16285
  this.router = router;
15934
16286
  this.linkedCasesService = linkedCasesService;
15935
16287
  this.isLinkCasesJourney = this.linkedCasesService.isLinkedCasesEventTrigger;
@@ -15946,13 +16298,22 @@ class BeforeYouStartComponent {
15946
16298
  navigateToNextPage: true
15947
16299
  });
15948
16300
  }
16301
+ next() {
16302
+ this.onNext();
16303
+ const isAnArray = Array.isArray(this.errorMessages);
16304
+ const isNotAnArray = !isAnArray;
16305
+ const isValid = (isAnArray && this.errorMessages.length === 0) || isNotAnArray;
16306
+ if (isValid) {
16307
+ super.next();
16308
+ }
16309
+ }
15949
16310
  onBack() {
15950
16311
  this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseId], { fragment: 'Linked cases' });
15951
16312
  }
15952
- static ɵfac = function BeforeYouStartComponent_Factory(t) { return new (t || BeforeYouStartComponent)(i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(LinkedCasesService)); };
15953
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: BeforeYouStartComponent, selectors: [["ccd-linked-cases-before-you-start"]], outputs: { linkedCasesStateEmitter: "linkedCasesStateEmitter" }, decls: 3, vars: 2, consts: [[4, "ngIf"], [1, "govuk-heading-xl"], ["id", "unlink-cases-error", "class", "govuk-error-message", 4, "ngIf"], [1, "govuk-body"], ["href", "javascript:void(0)", 1, "govuk-link", 3, "click"], ["id", "unlink-cases-error", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], ["id", "link-cases-journey", 4, "ngIf"], ["id", "manage-link-cases-journey", 4, "ngIf"], [1, "govuk-button-group"], ["type", "button", "id", "next-button", 1, "button", "button-primary", 3, "click"], ["id", "link-cases-journey"], ["id", "manage-link-cases-journey"]], template: function BeforeYouStartComponent_Template(rf, ctx) { if (rf & 1) {
16313
+ static ɵfac = function BeforeYouStartComponent_Factory(t) { return new (t || BeforeYouStartComponent)(i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(LinkedCasesService), i0.ɵɵdirectiveInject(MultipageComponentStateService)); };
16314
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: BeforeYouStartComponent, selectors: [["ccd-linked-cases-before-you-start"]], outputs: { linkedCasesStateEmitter: "linkedCasesStateEmitter" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 2, consts: [[4, "ngIf"], [1, "govuk-heading-xl"], ["id", "unlink-cases-error", "class", "govuk-error-message", 4, "ngIf"], [1, "govuk-body"], ["href", "javascript:void(0)", 1, "govuk-link", 3, "click"], ["id", "unlink-cases-error", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], ["id", "link-cases-journey", 4, "ngIf"], ["id", "manage-link-cases-journey", 4, "ngIf"], ["id", "link-cases-journey"], ["id", "manage-link-cases-journey"]], template: function BeforeYouStartComponent_Template(rf, ctx) { if (rf & 1) {
15954
16315
  i0.ɵɵelementStart(0, "div");
15955
- i0.ɵɵtemplate(1, BeforeYouStartComponent_div_1_Template, 7, 1, "div", 0)(2, BeforeYouStartComponent_div_2_Template, 8, 2, "div", 0);
16316
+ i0.ɵɵtemplate(1, BeforeYouStartComponent_div_1_Template, 7, 1, "div", 0)(2, BeforeYouStartComponent_div_2_Template, 5, 2, "div", 0);
15956
16317
  i0.ɵɵelementEnd();
15957
16318
  } if (rf & 2) {
15958
16319
  i0.ɵɵadvance();
@@ -15963,11 +16324,11 @@ class BeforeYouStartComponent {
15963
16324
  }
15964
16325
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BeforeYouStartComponent, [{
15965
16326
  type: Component,
15966
- args: [{ selector: 'ccd-linked-cases-before-you-start', template: "<div>\n <div *ngIf=\"serverLinkedApiError\">\n <h1 class=\"govuk-heading-xl\">There is a problem</h1>\n <p id=\"unlink-cases-error\" class=\"govuk-error-message\" *ngIf=\"serverLinkedApiError\">\n <span class=\"govuk-visually-hidden\">Error:</span> {{serverLinkedApiError.message}}\n </p>\n <p class=\"govuk-body\">\n <a class=\"govuk-link\" href=\"javascript:void(0)\" (click)=\"onBack()\">Go back to the Linked cases tab</a>\n </p>\n </div>\n <div *ngIf=\"!serverLinkedApiError\">\n <h1 class=\"govuk-heading-xl\">Before you start</h1>\n <div id=\"link-cases-journey\" *ngIf=\"isLinkCasesJourney\">\n <p class=\"govuk-body\">If a group of linked cases has a lead case, you must start from the lead case.</p>\n <p class=\"govuk-body\">If the cases to be linked has no lead, you can start the linking journey from any of those\n cases.</p>\n </div>\n <div id=\"manage-link-cases-journey\" *ngIf=\"!isLinkCasesJourney\">\n <p class=\"govuk-body\">If there are linked hearings for the case you need to un-link then you must unlink the\n hearing first.</p>\n </div>\n <div class=\"govuk-button-group\">\n <button class=\"button button-primary\" type=\"button\" id=\"next-button\" (click)=\"onNext()\">Next</button>\n </div>\n </div>\n</div>\n" }]
15967
- }], () => [{ type: i1$1.Router }, { type: LinkedCasesService }], { linkedCasesStateEmitter: [{
16327
+ args: [{ selector: 'ccd-linked-cases-before-you-start', template: "<div>\n <div *ngIf=\"serverLinkedApiError\">\n <h1 class=\"govuk-heading-xl\">There is a problem</h1>\n <p id=\"unlink-cases-error\" class=\"govuk-error-message\" *ngIf=\"serverLinkedApiError\">\n <span class=\"govuk-visually-hidden\">Error:</span> {{serverLinkedApiError.message}}\n </p>\n <p class=\"govuk-body\">\n <a class=\"govuk-link\" href=\"javascript:void(0)\" (click)=\"onBack()\">Go back to the Linked cases tab</a>\n </p>\n </div>\n <div *ngIf=\"!serverLinkedApiError\">\n <h1 class=\"govuk-heading-xl\">Before you start</h1>\n <div id=\"link-cases-journey\" *ngIf=\"isLinkCasesJourney\">\n <p class=\"govuk-body\">If a group of linked cases has a lead case, you must start from the lead case.</p>\n <p class=\"govuk-body\">If the cases to be linked has no lead, you can start the linking journey from any of those\n cases.</p>\n </div>\n <div id=\"manage-link-cases-journey\" *ngIf=\"!isLinkCasesJourney\">\n <p class=\"govuk-body\">If there are linked hearings for the case you need to un-link then you must unlink the\n hearing first.</p>\n </div>\n </div>\n</div>\n" }]
16328
+ }], () => [{ type: i1$1.Router }, { type: LinkedCasesService }, { type: MultipageComponentStateService }], { linkedCasesStateEmitter: [{
15968
16329
  type: Output
15969
16330
  }] }); })();
15970
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(BeforeYouStartComponent, { className: "BeforeYouStartComponent", filePath: "lib/shared/components/palette/linked-cases/components/before-you-start/before-you-start.component.ts", lineNumber: 12 }); })();
16331
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(BeforeYouStartComponent, { className: "BeforeYouStartComponent", filePath: "lib/shared/components/palette/linked-cases/components/before-you-start/before-you-start.component.ts", lineNumber: 14 }); })();
15971
16332
 
15972
16333
  function CheckYourAnswersComponent_table_4_tr_9_Template(rf, ctx) { if (rf & 1) {
15973
16334
  const _r1 = i0.ɵɵgetCurrentView();
@@ -16089,14 +16450,15 @@ function CheckYourAnswersComponent_tr_18_Template(rf, ctx) { if (rf & 1) {
16089
16450
  i0.ɵɵtext(2, " None ");
16090
16451
  i0.ɵɵelementEnd()();
16091
16452
  } }
16092
- class CheckYourAnswersComponent {
16453
+ class CheckYourAnswersComponent extends AbstractJourneyComponent {
16093
16454
  linkedCasesService;
16094
16455
  linkedCasesStateEmitter = new EventEmitter();
16095
16456
  linkedCases;
16096
16457
  casesToUnlink;
16097
16458
  isLinkCasesJourney;
16098
16459
  linkedCasesTableCaption;
16099
- constructor(linkedCasesService) {
16460
+ constructor(linkedCasesService, multipageComponentStateService) {
16461
+ super(multipageComponentStateService);
16100
16462
  this.linkedCasesService = linkedCasesService;
16101
16463
  }
16102
16464
  ngOnInit() {
@@ -16113,8 +16475,16 @@ class CheckYourAnswersComponent {
16113
16475
  navigateToNextPage: true
16114
16476
  });
16115
16477
  }
16116
- static ɵfac = function CheckYourAnswersComponent_Factory(t) { return new (t || CheckYourAnswersComponent)(i0.ɵɵdirectiveInject(LinkedCasesService)); };
16117
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CheckYourAnswersComponent, selectors: [["ccd-linked-cases-check-your-answers"]], outputs: { linkedCasesStateEmitter: "linkedCasesStateEmitter" }, decls: 19, vars: 5, consts: [[1, "govuk-grid-row"], [1, "govuk-grid-column-full"], [1, "govuk-heading-xl"], ["id", "cases-to-unlink-table", "class", "govuk-table", 4, "ngIf"], ["id", "linked-cases-table", 1, "govuk-table"], [1, "govuk-table__caption", "govuk-table__caption--m"], [1, "govuk-table__head"], [1, "govuk-table__row"], ["scope", "col", 1, "govuk-table__header"], ["scope", "col", "class", "govuk-table__header", 4, "ngIf"], [1, "govuk-table__body"], ["class", "govuk-table__row", 4, "ngFor", "ngForOf"], ["class", "govuk-table__row", 4, "ngIf"], ["id", "cases-to-unlink-table", 1, "govuk-table"], [1, "govuk-table__cell"], ["href", "javascript:void(0)", 1, "govuk-link", "govuk-link--no-visited-state", "float-right", 3, "click"], ["colspan", "2", 1, "govuk-table__cell"], [4, "ngFor", "ngForOf"], ["class", "govuk-table__cell", 4, "ngIf"], [4, "ngIf"], ["colspan", "4", 1, "govuk-table__cell"]], template: function CheckYourAnswersComponent_Template(rf, ctx) { if (rf & 1) {
16478
+ next() {
16479
+ this.linkedCasesStateEmitter.emit({
16480
+ currentLinkedCasesPage: LinkedCasesPages.CHECK_YOUR_ANSWERS,
16481
+ navigateToPreviousPage: false,
16482
+ navigateToNextPage: true
16483
+ });
16484
+ super.next();
16485
+ }
16486
+ static ɵfac = function CheckYourAnswersComponent_Factory(t) { return new (t || CheckYourAnswersComponent)(i0.ɵɵdirectiveInject(LinkedCasesService), i0.ɵɵdirectiveInject(MultipageComponentStateService)); };
16487
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CheckYourAnswersComponent, selectors: [["ccd-linked-cases-check-your-answers"]], outputs: { linkedCasesStateEmitter: "linkedCasesStateEmitter" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 19, vars: 5, consts: [[1, "govuk-grid-row"], [1, "govuk-grid-column-full"], [1, "govuk-heading-xl"], ["id", "cases-to-unlink-table", "class", "govuk-table", 4, "ngIf"], ["id", "linked-cases-table", 1, "govuk-table"], [1, "govuk-table__caption", "govuk-table__caption--m"], [1, "govuk-table__head"], [1, "govuk-table__row"], ["scope", "col", 1, "govuk-table__header"], ["scope", "col", "class", "govuk-table__header", 4, "ngIf"], [1, "govuk-table__body"], ["class", "govuk-table__row", 4, "ngFor", "ngForOf"], ["class", "govuk-table__row", 4, "ngIf"], ["id", "cases-to-unlink-table", 1, "govuk-table"], [1, "govuk-table__cell"], ["href", "javascript:void(0)", 1, "govuk-link", "govuk-link--no-visited-state", "float-right", 3, "click"], ["colspan", "2", 1, "govuk-table__cell"], [4, "ngFor", "ngForOf"], ["class", "govuk-table__cell", 4, "ngIf"], [4, "ngIf"], ["colspan", "4", 1, "govuk-table__cell"]], template: function CheckYourAnswersComponent_Template(rf, ctx) { if (rf & 1) {
16118
16488
  i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "h1", 2);
16119
16489
  i0.ɵɵtext(3, "Check your answers");
16120
16490
  i0.ɵɵelementEnd();
@@ -16150,10 +16520,10 @@ class CheckYourAnswersComponent {
16150
16520
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CheckYourAnswersComponent, [{
16151
16521
  type: Component,
16152
16522
  args: [{ selector: 'ccd-linked-cases-check-your-answers', template: "<div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-full\">\n <h1 class=\"govuk-heading-xl\">Check your answers</h1>\n <!-- Top table for manage link cases journey -->\n <table id=\"cases-to-unlink-table\" class=\"govuk-table\" *ngIf=\"!isLinkCasesJourney\">\n <caption class=\"govuk-table__caption govuk-table__caption--m\">Cases to unlink</caption>\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th scope=\"col\" class=\"govuk-table__header\">Case name and number</th>\n <th scope=\"col\" class=\"govuk-table__header\"></th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\" *ngFor=\"let case of casesToUnlink\">\n <td class=\"govuk-table__cell\">\n {{case.caseName}} <br> {{case.caseReference | ccdCaseReference}}\n </td>\n <td class=\"govuk-table__cell\">\n <a href=\"javascript:void(0)\" class=\"govuk-link govuk-link--no-visited-state float-right\" (click)=\"onChange()\">Change</a>\n </td>\n </tr>\n <tr class=\"govuk-table__row\" *ngIf=\"!casesToUnlink.length\">\n <td class=\"govuk-table__cell\" colspan=\"2\">\n None\n </td>\n </tr>\n </tbody>\n </table>\n <!-- Table for both link case and manage link case journeys -->\n <table id=\"linked-cases-table\" class=\"govuk-table\">\n <caption class=\"govuk-table__caption govuk-table__caption--m\">{{linkedCasesTableCaption}}</caption>\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th scope=\"col\" class=\"govuk-table__header\">Case name and number</th>\n <th scope=\"col\" class=\"govuk-table__header\">Reasons for case link</th>\n <th scope=\"col\" class=\"govuk-table__header\"></th>\n <th scope=\"col\" class=\"govuk-table__header\" *ngIf=\"isLinkCasesJourney\"></th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\" *ngFor=\"let case of linkedCases\">\n <td class=\"govuk-table__cell\">\n <span>{{case.caseName}} <br> {{case.caseReference | ccdCaseReference}} </span>\n </td>\n <td class=\"govuk-table__cell\">\n <span *ngFor=\"let reason of case.reasons; last as isLast\">\n <span *ngIf=\"isLinkCasesJourney\">\n {{reason | ccdLinkCasesReasonValue}}\n </span>\n <span *ngIf=\"!isLinkCasesJourney\">\n {{reason.Reason.value | ccdLinkCasesReasonValue}}\n </span>\n <br *ngIf=\"!isLast\">\n </span>\n </td>\n <td class=\"govuk-table__cell\"></td>\n <td class=\"govuk-table__cell\" *ngIf=\"isLinkCasesJourney\">\n <a href=\"javascript:void(0)\" class=\"govuk-link govuk-link--no-visited-state float-right\" (click)=\"onChange()\">Change</a>\n </td>\n </tr>\n <tr class=\"govuk-table__row\" *ngIf=\"!linkedCases.length\">\n <td class=\"govuk-table__cell\" colspan=\"4\">\n None\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n</div>\n", styles: [".float-right{float:right}\n"] }]
16153
- }], () => [{ type: LinkedCasesService }], { linkedCasesStateEmitter: [{
16523
+ }], () => [{ type: LinkedCasesService }, { type: MultipageComponentStateService }], { linkedCasesStateEmitter: [{
16154
16524
  type: Output
16155
16525
  }] }); })();
16156
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CheckYourAnswersComponent, { className: "CheckYourAnswersComponent", filePath: "lib/shared/components/palette/linked-cases/components/check-your-answers/check-your-answers.component.ts", lineNumber: 11 }); })();
16526
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CheckYourAnswersComponent, { className: "CheckYourAnswersComponent", filePath: "lib/shared/components/palette/linked-cases/components/check-your-answers/check-your-answers.component.ts", lineNumber: 14 }); })();
16157
16527
 
16158
16528
  class ValidatorsUtils {
16159
16529
  numberLengthValidator(inputLength) {
@@ -16183,7 +16553,7 @@ class ValidatorsUtils {
16183
16553
  const _c0$J = a0 => ({ "govuk-form-group--error": a0 });
16184
16554
  const _c1$g = a0 => ({ "table-group-error": a0 });
16185
16555
  function LinkCasesComponent_div_8_span_4_Template(rf, ctx) { if (rf & 1) {
16186
- i0.ɵɵelementStart(0, "span", 30)(1, "span", 31);
16556
+ i0.ɵɵelementStart(0, "span", 28)(1, "span", 29);
16187
16557
  i0.ɵɵtext(2, "Error:");
16188
16558
  i0.ɵɵelementEnd();
16189
16559
  i0.ɵɵtext(3);
@@ -16194,7 +16564,7 @@ function LinkCasesComponent_div_8_span_4_Template(rf, ctx) { if (rf & 1) {
16194
16564
  i0.ɵɵtextInterpolate1(" ", ctx_r1.caseNumberError, " ");
16195
16565
  } }
16196
16566
  function LinkCasesComponent_div_8_span_11_Template(rf, ctx) { if (rf & 1) {
16197
- i0.ɵɵelementStart(0, "span", 30)(1, "span", 31);
16567
+ i0.ɵɵelementStart(0, "span", 28)(1, "span", 29);
16198
16568
  i0.ɵɵtext(2, "Error:");
16199
16569
  i0.ɵɵelementEnd();
16200
16570
  i0.ɵɵtext(3);
@@ -16206,10 +16576,10 @@ function LinkCasesComponent_div_8_span_11_Template(rf, ctx) { if (rf & 1) {
16206
16576
  } }
16207
16577
  function LinkCasesComponent_div_8_div_13_Template(rf, ctx) { if (rf & 1) {
16208
16578
  const _r3 = i0.ɵɵgetCurrentView();
16209
- i0.ɵɵelementStart(0, "div", 32)(1, "input", 33);
16579
+ i0.ɵɵelementStart(0, "div", 30)(1, "input", 31);
16210
16580
  i0.ɵɵlistener("change", function LinkCasesComponent_div_8_div_13_Template_input_change_1_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.toggleLinkCaseReasonOtherComments($event)); });
16211
16581
  i0.ɵɵelementEnd();
16212
- i0.ɵɵelementStart(2, "label", 34);
16582
+ i0.ɵɵelementStart(2, "label", 32);
16213
16583
  i0.ɵɵtext(3);
16214
16584
  i0.ɵɵelementEnd()();
16215
16585
  } if (rf & 2) {
@@ -16225,7 +16595,7 @@ function LinkCasesComponent_div_8_div_13_Template(rf, ctx) { if (rf & 1) {
16225
16595
  i0.ɵɵtextInterpolate(reason_r4.value_en);
16226
16596
  } }
16227
16597
  function LinkCasesComponent_div_8_div_14_span_3_Template(rf, ctx) { if (rf & 1) {
16228
- i0.ɵɵelementStart(0, "span", 30)(1, "span", 31);
16598
+ i0.ɵɵelementStart(0, "span", 28)(1, "span", 29);
16229
16599
  i0.ɵɵtext(2, "Error:");
16230
16600
  i0.ɵɵelementEnd();
16231
16601
  i0.ɵɵtext(3);
@@ -16236,14 +16606,14 @@ function LinkCasesComponent_div_8_div_14_span_3_Template(rf, ctx) { if (rf & 1)
16236
16606
  i0.ɵɵtextInterpolate1(" ", ctx_r1.caseReasonCommentsError, " ");
16237
16607
  } }
16238
16608
  function LinkCasesComponent_div_8_div_14_Template(rf, ctx) { if (rf & 1) {
16239
- i0.ɵɵelementStart(0, "div", 35)(1, "h3", 22);
16609
+ i0.ɵɵelementStart(0, "div", 33)(1, "h3", 20);
16240
16610
  i0.ɵɵtext(2, "Comments");
16241
16611
  i0.ɵɵelementEnd();
16242
16612
  i0.ɵɵtemplate(3, LinkCasesComponent_div_8_div_14_span_3_Template, 4, 1, "span", 6);
16243
- i0.ɵɵelementStart(4, "textarea", 36);
16613
+ i0.ɵɵelementStart(4, "textarea", 34);
16244
16614
  i0.ɵɵtext(5, " ");
16245
16615
  i0.ɵɵelementEnd();
16246
- i0.ɵɵelementStart(6, "div", 37);
16616
+ i0.ɵɵelementStart(6, "div", 35);
16247
16617
  i0.ɵɵtext(7, " You can enter up to 100 characters ");
16248
16618
  i0.ɵɵelementEnd()();
16249
16619
  } if (rf & 2) {
@@ -16253,7 +16623,7 @@ function LinkCasesComponent_div_8_div_14_Template(rf, ctx) { if (rf & 1) {
16253
16623
  i0.ɵɵproperty("ngIf", ctx_r1.caseReasonCommentsError);
16254
16624
  } }
16255
16625
  function LinkCasesComponent_div_8_span_17_Template(rf, ctx) { if (rf & 1) {
16256
- i0.ɵɵelementStart(0, "span", 30)(1, "span", 31);
16626
+ i0.ɵɵelementStart(0, "span", 28)(1, "span", 29);
16257
16627
  i0.ɵɵtext(2, "Error:");
16258
16628
  i0.ɵɵelementEnd();
16259
16629
  i0.ɵɵtext(3);
@@ -16265,26 +16635,26 @@ function LinkCasesComponent_div_8_span_17_Template(rf, ctx) { if (rf & 1) {
16265
16635
  } }
16266
16636
  function LinkCasesComponent_div_8_Template(rf, ctx) { if (rf & 1) {
16267
16637
  const _r1 = i0.ɵɵgetCurrentView();
16268
- i0.ɵɵelementStart(0, "div", 21)(1, "div", 5)(2, "h3", 22);
16638
+ i0.ɵɵelementStart(0, "div", 19)(1, "div", 5)(2, "h3", 20);
16269
16639
  i0.ɵɵtext(3, "Enter case reference");
16270
16640
  i0.ɵɵelementEnd();
16271
16641
  i0.ɵɵtemplate(4, LinkCasesComponent_div_8_span_4_Template, 4, 1, "span", 6);
16272
- i0.ɵɵelement(5, "input", 23);
16642
+ i0.ɵɵelement(5, "input", 21);
16273
16643
  i0.ɵɵelementEnd();
16274
- i0.ɵɵelementStart(6, "div", 24)(7, "h3", 22);
16644
+ i0.ɵɵelementStart(6, "div", 22)(7, "h3", 20);
16275
16645
  i0.ɵɵtext(8, "Why should these cases be linked?");
16276
16646
  i0.ɵɵelementEnd();
16277
- i0.ɵɵelementStart(9, "div", 25);
16647
+ i0.ɵɵelementStart(9, "div", 23);
16278
16648
  i0.ɵɵtext(10, " Select all that apply. ");
16279
16649
  i0.ɵɵelementEnd();
16280
16650
  i0.ɵɵtemplate(11, LinkCasesComponent_div_8_span_11_Template, 4, 1, "span", 6);
16281
- i0.ɵɵelementStart(12, "div", 26);
16282
- i0.ɵɵtemplate(13, LinkCasesComponent_div_8_div_13_Template, 4, 5, "div", 27);
16651
+ i0.ɵɵelementStart(12, "div", 24);
16652
+ i0.ɵɵtemplate(13, LinkCasesComponent_div_8_div_13_Template, 4, 5, "div", 25);
16283
16653
  i0.ɵɵelementEnd()();
16284
- i0.ɵɵtemplate(14, LinkCasesComponent_div_8_div_14_Template, 8, 4, "div", 28);
16654
+ i0.ɵɵtemplate(14, LinkCasesComponent_div_8_div_14_Template, 8, 4, "div", 26);
16285
16655
  i0.ɵɵelement(15, "br")(16, "br");
16286
16656
  i0.ɵɵtemplate(17, LinkCasesComponent_div_8_span_17_Template, 4, 1, "span", 6);
16287
- i0.ɵɵelementStart(18, "button", 29);
16657
+ i0.ɵɵelementStart(18, "button", 27);
16288
16658
  i0.ɵɵlistener("click", function LinkCasesComponent_div_8_Template_button_click_18_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.submitCaseInfo()); });
16289
16659
  i0.ɵɵtext(19, "Propose case link");
16290
16660
  i0.ɵɵelementEnd()();
@@ -16307,7 +16677,7 @@ function LinkCasesComponent_div_8_Template(rf, ctx) { if (rf & 1) {
16307
16677
  i0.ɵɵproperty("ngIf", ctx_r1.caseSelectionError);
16308
16678
  } }
16309
16679
  function LinkCasesComponent_span_13_Template(rf, ctx) { if (rf & 1) {
16310
- i0.ɵɵelementStart(0, "span", 30)(1, "span", 31);
16680
+ i0.ɵɵelementStart(0, "span", 28)(1, "span", 29);
16311
16681
  i0.ɵɵtext(2, "Error:");
16312
16682
  i0.ɵɵelementEnd();
16313
16683
  i0.ɵɵtext(3);
@@ -16330,27 +16700,27 @@ function LinkCasesComponent_tr_31_span_15_Template(rf, ctx) { if (rf & 1) {
16330
16700
  } }
16331
16701
  function LinkCasesComponent_tr_31_Template(rf, ctx) { if (rf & 1) {
16332
16702
  const _r6 = i0.ɵɵgetCurrentView();
16333
- i0.ɵɵelementStart(0, "tr", 10)(1, "td", 38);
16334
- i0.ɵɵelement(2, "div", 39);
16703
+ i0.ɵɵelementStart(0, "tr", 10)(1, "td", 36);
16704
+ i0.ɵɵelement(2, "div", 37);
16335
16705
  i0.ɵɵelementStart(3, "span");
16336
16706
  i0.ɵɵtext(4);
16337
16707
  i0.ɵɵelement(5, "br");
16338
16708
  i0.ɵɵtext(6);
16339
16709
  i0.ɵɵpipe(7, "ccdCaseReference");
16340
16710
  i0.ɵɵelementEnd()();
16341
- i0.ɵɵelementStart(8, "td", 40);
16711
+ i0.ɵɵelementStart(8, "td", 38);
16342
16712
  i0.ɵɵtext(9);
16343
16713
  i0.ɵɵelementEnd();
16344
- i0.ɵɵelementStart(10, "td", 38);
16714
+ i0.ɵɵelementStart(10, "td", 36);
16345
16715
  i0.ɵɵtext(11);
16346
16716
  i0.ɵɵelementEnd();
16347
- i0.ɵɵelementStart(12, "td", 40);
16717
+ i0.ɵɵelementStart(12, "td", 38);
16348
16718
  i0.ɵɵtext(13);
16349
16719
  i0.ɵɵelementEnd();
16350
- i0.ɵɵelementStart(14, "td", 38);
16351
- i0.ɵɵtemplate(15, LinkCasesComponent_tr_31_span_15_Template, 4, 3, "span", 41);
16720
+ i0.ɵɵelementStart(14, "td", 36);
16721
+ i0.ɵɵtemplate(15, LinkCasesComponent_tr_31_span_15_Template, 4, 3, "span", 39);
16352
16722
  i0.ɵɵelementEnd();
16353
- i0.ɵɵelementStart(16, "td", 38)(17, "a", 42);
16723
+ i0.ɵɵelementStart(16, "td", 36)(17, "a", 40);
16354
16724
  i0.ɵɵlistener("click", function LinkCasesComponent_tr_31_Template_a_click_17_listener() { const ctx_r7 = i0.ɵɵrestoreView(_r6); const case_r9 = ctx_r7.$implicit; const pos_r10 = ctx_r7.index; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onSelectedLinkedCaseRemove(pos_r10, case_r9.caseReference)); });
16355
16725
  i0.ɵɵtext(18, "Remove");
16356
16726
  i0.ɵɵelementEnd()()();
@@ -16379,11 +16749,11 @@ function LinkCasesComponent_tr_31_Template(rf, ctx) { if (rf & 1) {
16379
16749
  i0.ɵɵattribute("id", case_r9.caseReference);
16380
16750
  } }
16381
16751
  function LinkCasesComponent_tr_32_Template(rf, ctx) { if (rf & 1) {
16382
- i0.ɵɵelementStart(0, "tr", 10)(1, "td", 43);
16752
+ i0.ɵɵelementStart(0, "tr", 10)(1, "td", 41);
16383
16753
  i0.ɵɵtext(2, " None ");
16384
16754
  i0.ɵɵelementEnd()();
16385
16755
  } }
16386
- class LinkCasesComponent {
16756
+ class LinkCasesComponent extends AbstractJourneyComponent {
16387
16757
  casesService;
16388
16758
  fb;
16389
16759
  validatorsUtils;
@@ -16402,7 +16772,8 @@ class LinkCasesComponent {
16402
16772
  linkCaseReasons;
16403
16773
  showComments = false;
16404
16774
  ISO_FORMAT = 'YYYY-MM-DDTHH:mm:ss.SSS';
16405
- constructor(casesService, fb, validatorsUtils, linkedCasesService) {
16775
+ constructor(casesService, fb, validatorsUtils, linkedCasesService, multipageComponentStateService) {
16776
+ super(multipageComponentStateService);
16406
16777
  this.casesService = casesService;
16407
16778
  this.fb = fb;
16408
16779
  this.validatorsUtils = validatorsUtils;
@@ -16647,8 +17018,14 @@ class LinkCasesComponent {
16647
17018
  }
16648
17019
  this.emitLinkedCasesState(navigateToNextPage);
16649
17020
  }
16650
- static ɵfac = function LinkCasesComponent_Factory(t) { return new (t || LinkCasesComponent)(i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(i4.FormBuilder), i0.ɵɵdirectiveInject(ValidatorsUtils), i0.ɵɵdirectiveInject(LinkedCasesService)); };
16651
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LinkCasesComponent, selectors: [["ccd-link-cases"]], outputs: { linkedCasesStateEmitter: "linkedCasesStateEmitter" }, decls: 36, vars: 11, consts: [[1, "govuk-grid-row"], [1, "govuk-grid-column-full"], [1, "govuk-caption-l"], [1, "govuk-heading-xl"], ["class", "form-group", 3, "formGroup", 4, "ngIf"], ["id", "caseNumber", 1, "govuk-form-group", 3, "ngClass"], ["class", "govuk-error-message", 4, "ngIf"], [1, "govuk-table"], [1, "govuk-table__caption", "govuk-table__caption--m"], [1, "govuk-table__head"], [1, "govuk-table__row"], ["scope", "col", "width", "300", 1, "govuk-table__header"], ["scope", "col", "width", "150", 1, "govuk-table__header"], ["scope", "col", "width", "200", 1, "govuk-table__header"], ["scope", "col", "width", "400", 1, "govuk-table__header"], ["scope", "col", "width", "50", 1, "govuk-table__header"], [1, "govuk-table__body"], ["class", "govuk-table__row", 4, "ngFor", "ngForOf"], ["class", "govuk-table__row", 4, "ngIf"], [1, "govuk-button-group"], ["type", "button", "id", "next-button", 1, "button", "button-primary", 3, "click"], [1, "form-group", 3, "formGroup"], [1, "govuk-heading-s"], ["formControlName", "caseNumber", "id", "width-20", "name", "width-20", "type", "text", 1, "govuk-input", "govuk-input--width-20"], [1, "govuk-!-margin-top-3", 3, "ngClass"], ["id", "waste-hint", 1, "govuk-hint"], ["data-module", "govuk-checkboxes", "formArrayName", "reasonType", "id", "caseReason", 1, "govuk-checkboxes"], ["class", "govuk-checkboxes__item", 3, "formGroupName", 4, "ngFor", "ngForOf"], ["id", "other-description-char-limit-error", "class", "govuk-!-margin-top-3", 3, "ngClass", 4, "ngIf"], ["id", "propose", "type", "button", "data-module", "govuk-button", 1, "govuk-button", "govuk-button--secondary", 3, "click"], [1, "govuk-error-message"], [1, "govuk-visually-hidden"], [1, "govuk-checkboxes__item", 3, "formGroupName"], ["formControlName", "selected", "name", "pos", "type", "checkbox", 1, "govuk-checkboxes__input", 3, "change", "id", "value"], [1, "govuk-label", "govuk-checkboxes__label", 3, "for"], ["id", "other-description-char-limit-error", 1, "govuk-!-margin-top-3", 3, "ngClass"], ["id", "otherDescription", "name", "otherDescription", "formControlName", "otherDescription", "rows", "5", "aria-describedby", "other-description-hint other-description-char-limit-info other-description-char-limit-error", 1, "govuk-textarea", "govuk-input--width-30"], ["id", "other-description-char-limit-info", "aria-live", "polite", 1, "govuk-hint", "govuk-character-count__message"], [1, "govuk-table__cell"], [1, "govuk-form-group--error", 3, "ngClass"], [1, "govuk-table__cell", 3, "title"], [4, "ngFor", "ngForOf"], [1, "govuk-link", "no-visited-state", 3, "click"], ["colspan", "6", 1, "govuk-table__cell"]], template: function LinkCasesComponent_Template(rf, ctx) { if (rf & 1) {
17021
+ next() {
17022
+ this.onNext();
17023
+ if (this.errorMessages.length === 0) {
17024
+ super.next();
17025
+ }
17026
+ }
17027
+ static ɵfac = function LinkCasesComponent_Factory(t) { return new (t || LinkCasesComponent)(i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(i4.FormBuilder), i0.ɵɵdirectiveInject(ValidatorsUtils), i0.ɵɵdirectiveInject(LinkedCasesService), i0.ɵɵdirectiveInject(MultipageComponentStateService)); };
17028
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LinkCasesComponent, selectors: [["ccd-link-cases"]], outputs: { linkedCasesStateEmitter: "linkedCasesStateEmitter" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 33, vars: 11, consts: [[1, "govuk-grid-row"], [1, "govuk-grid-column-full"], [1, "govuk-caption-l"], [1, "govuk-heading-xl"], ["class", "form-group", 3, "formGroup", 4, "ngIf"], ["id", "caseNumber", 1, "govuk-form-group", 3, "ngClass"], ["class", "govuk-error-message", 4, "ngIf"], [1, "govuk-table"], [1, "govuk-table__caption", "govuk-table__caption--m"], [1, "govuk-table__head"], [1, "govuk-table__row"], ["scope", "col", "width", "300", 1, "govuk-table__header"], ["scope", "col", "width", "150", 1, "govuk-table__header"], ["scope", "col", "width", "200", 1, "govuk-table__header"], ["scope", "col", "width", "400", 1, "govuk-table__header"], ["scope", "col", "width", "50", 1, "govuk-table__header"], [1, "govuk-table__body"], ["class", "govuk-table__row", 4, "ngFor", "ngForOf"], ["class", "govuk-table__row", 4, "ngIf"], [1, "form-group", 3, "formGroup"], [1, "govuk-heading-s"], ["formControlName", "caseNumber", "id", "width-20", "name", "width-20", "type", "text", 1, "govuk-input", "govuk-input--width-20"], [1, "govuk-!-margin-top-3", 3, "ngClass"], ["id", "waste-hint", 1, "govuk-hint"], ["data-module", "govuk-checkboxes", "formArrayName", "reasonType", "id", "caseReason", 1, "govuk-checkboxes"], ["class", "govuk-checkboxes__item", 3, "formGroupName", 4, "ngFor", "ngForOf"], ["id", "other-description-char-limit-error", "class", "govuk-!-margin-top-3", 3, "ngClass", 4, "ngIf"], ["id", "propose", "type", "button", "data-module", "govuk-button", 1, "govuk-button", "govuk-button--secondary", 3, "click"], [1, "govuk-error-message"], [1, "govuk-visually-hidden"], [1, "govuk-checkboxes__item", 3, "formGroupName"], ["formControlName", "selected", "name", "pos", "type", "checkbox", 1, "govuk-checkboxes__input", 3, "change", "id", "value"], [1, "govuk-label", "govuk-checkboxes__label", 3, "for"], ["id", "other-description-char-limit-error", 1, "govuk-!-margin-top-3", 3, "ngClass"], ["id", "otherDescription", "name", "otherDescription", "formControlName", "otherDescription", "rows", "5", "aria-describedby", "other-description-hint other-description-char-limit-info other-description-char-limit-error", 1, "govuk-textarea", "govuk-input--width-30"], ["id", "other-description-char-limit-info", "aria-live", "polite", 1, "govuk-hint", "govuk-character-count__message"], [1, "govuk-table__cell"], [1, "govuk-form-group--error", 3, "ngClass"], [1, "govuk-table__cell", 3, "title"], [4, "ngFor", "ngForOf"], [1, "govuk-link", "no-visited-state", 3, "click"], ["colspan", "6", 1, "govuk-table__cell"]], template: function LinkCasesComponent_Template(rf, ctx) { if (rf & 1) {
16652
17029
  i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "div")(3, "span", 2);
16653
17030
  i0.ɵɵtext(4);
16654
17031
  i0.ɵɵpipe(5, "ccdCaseReference");
@@ -16682,11 +17059,7 @@ class LinkCasesComponent {
16682
17059
  i0.ɵɵelementEnd()();
16683
17060
  i0.ɵɵelementStart(30, "tbody", 16);
16684
17061
  i0.ɵɵtemplate(31, LinkCasesComponent_tr_31_Template, 19, 14, "tr", 17)(32, LinkCasesComponent_tr_32_Template, 3, 0, "tr", 18);
16685
- i0.ɵɵelementEnd()()();
16686
- i0.ɵɵelementStart(33, "div", 19)(34, "button", 20);
16687
- i0.ɵɵlistener("click", function LinkCasesComponent_Template_button_click_34_listener() { return ctx.onNext(); });
16688
- i0.ɵɵtext(35, "Next");
16689
- i0.ɵɵelementEnd()()()()();
17062
+ i0.ɵɵelementEnd()()()()()();
16690
17063
  } if (rf & 2) {
16691
17064
  i0.ɵɵadvance(4);
16692
17065
  i0.ɵɵtextInterpolate2("Link cases to ", ctx.caseName, " ", i0.ɵɵpipeBind1(5, 7, ctx.caseId), "");
@@ -16704,11 +17077,11 @@ class LinkCasesComponent {
16704
17077
  }
16705
17078
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LinkCasesComponent, [{
16706
17079
  type: Component,
16707
- args: [{ selector: 'ccd-link-cases', template: "<div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-full\">\n <div>\n <span class=\"govuk-caption-l\">Link cases to {{caseName}} {{caseId | ccdCaseReference}}</span>\n <h1 class=\"govuk-heading-xl\">Select a&nbsp;case you want to link to this case</h1>\n <div class=\"form-group\" [formGroup]=\"linkCaseForm\" *ngIf=\"linkCaseForm\">\n <div class=\"govuk-form-group\" id=\"caseNumber\" [ngClass]=\"{'govuk-form-group--error': !!caseNumberError}\">\n <h3 class=\"govuk-heading-s\">Enter case reference</h3>\n <span class=\"govuk-error-message\" *ngIf=\"caseNumberError\">\n <span class=\"govuk-visually-hidden\">Error:</span> {{caseNumberError}}\n </span>\n <input class=\"govuk-input govuk-input--width-20\" formControlName=\"caseNumber\" id=\"width-20\" name=\"width-20\"\n type=\"text\">\n </div>\n <div [ngClass]=\"{'govuk-form-group--error': !!caseReasonError}\" class=\"govuk-!-margin-top-3\">\n <h3 class=\"govuk-heading-s\">Why should these cases be linked?</h3>\n <div id=\"waste-hint\" class=\"govuk-hint\">\n Select all that apply.\n </div>\n <span class=\"govuk-error-message\" *ngIf=\"caseReasonError\">\n <span class=\"govuk-visually-hidden\">Error:</span> {{caseReasonError}}\n </span>\n <div class=\"govuk-checkboxes\" data-module=\"govuk-checkboxes\" formArrayName=\"reasonType\" id=\"caseReason\">\n <div class=\"govuk-checkboxes__item\" *ngFor=\"let reason of linkCaseReasons;index as pos\" [formGroupName]=\"pos\">\n <input class=\"govuk-checkboxes__input\" id=\"{{reason.key}}\" formControlName=\"selected\" name=\"pos\"\n type=\"checkbox\" [value]=\"reason.value_en\" (change)=\"toggleLinkCaseReasonOtherComments($event)\">\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"{{reason.key}}\">{{reason.value_en}}</label>\n </div>\n </div>\n </div>\n <div id=\"other-description-char-limit-error\" [ngClass]=\"{'govuk-form-group--error': !!caseReasonCommentsError}\" class=\"govuk-!-margin-top-3\" *ngIf=\"showComments\">\n <h3 class=\"govuk-heading-s\">Comments</h3>\n <span class=\"govuk-error-message\" *ngIf=\"caseReasonCommentsError\">\n <span class=\"govuk-visually-hidden\">Error:</span> {{caseReasonCommentsError}}\n </span>\n <textarea class=\"govuk-textarea govuk-input--width-30\" id=\"otherDescription\"\n name=\"otherDescription\" formControlName=\"otherDescription\" rows=\"5\"\n aria-describedby=\"other-description-hint other-description-char-limit-info other-description-char-limit-error\">\n </textarea>\n <div id=\"other-description-char-limit-info\" aria-live=\"polite\" class=\"govuk-hint govuk-character-count__message\">\n You can enter up to 100 characters\n </div>\n </div>\n <br><br>\n <span class=\"govuk-error-message\" *ngIf=\"caseSelectionError\">\n <span class=\"govuk-visually-hidden\">Error:</span> {{caseSelectionError}}\n </span>\n <button id=\"propose\" type=\"button\" class=\"govuk-button govuk-button--secondary\" data-module=\"govuk-button\"\n (click)=\"submitCaseInfo()\">Propose case link</button>\n </div>\n <hr>\n <br><br>\n <div class=\"govuk-form-group\" id=\"caseNumber\" [ngClass]=\"{'govuk-form-group--error': !!noSelectedCaseError}\">\n <span class=\"govuk-error-message\" *ngIf=\"noSelectedCaseError\">\n <span class=\"govuk-visually-hidden\">Error:</span> {{noSelectedCaseError}}\n </span>\n <table class=\"govuk-table\">\n <caption class=\"govuk-table__caption govuk-table__caption--m\">Proposed case links </caption>\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th scope=\"col\" class=\"govuk-table__header\" width=\"300\">Case name and number</th>\n <th scope=\"col\" class=\"govuk-table__header\" width=\"150\">Case type </th>\n <th scope=\"col\" class=\"govuk-table__header\" width=\"200\">Service</th>\n <th scope=\"col\" class=\"govuk-table__header\" width=\"200\">State</th>\n <th scope=\"col\" class=\"govuk-table__header\" width=\"400\">Reasons for case link</th>\n <th scope=\"col\" class=\"govuk-table__header\" width=\"50\"></th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\" *ngFor=\"let case of selectedCases; let pos = index\">\n <td class=\"govuk-table__cell\">\n <div class=\"govuk-form-group--error\"\n [ngClass]=\"{'table-group-error':caseSelectionError && case.caseReference === linkCaseForm.value.caseNumber}\">\n </div>\n <span>{{case.caseName}} <br> {{case.caseReference | ccdCaseReference}}</span>\n </td>\n <td class=\"govuk-table__cell\" [title]=\"case.caseTypeDescription\">{{case.caseType}}</td>\n <td class=\"govuk-table__cell\">{{case.caseService}}</td>\n <td class=\"govuk-table__cell\" [title]=\"case.caseStateDescription\">{{case.caseState}}</td>\n <td class=\"govuk-table__cell\"><span\n *ngFor=\"let reason of case.reasons\">{{reason | ccdLinkCasesReasonValue}}<br></span></td>\n <td class=\"govuk-table__cell\"><a [attr.id]=\"case.caseReference\" (click)=\"onSelectedLinkedCaseRemove(pos, case.caseReference);\"\n class=\"govuk-link no-visited-state\">Remove</a></td>\n </tr>\n <tr class=\"govuk-table__row\" *ngIf=\"!selectedCases.length\">\n <td class=\"govuk-table__cell\" colspan=\"6\">\n None\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n <div class=\"govuk-button-group\">\n <button class=\"button button-primary\" type=\"button\" id=\"next-button\" (click)=\"onNext()\">Next</button>\n </div>\n </div>\n </div>\n</div>\n", styles: [".no-visited-state{color:#1d70b8;cursor:pointer}.no-visited-state:hover{color:#003078}.govuk-checkboxes{display:flex;flex-direction:column;flex-wrap:wrap;max-height:500px;width:100%;overflow-x:auto;overflow-y:hidden;padding-top:5px}.govuk-checkboxes .govuk-checkboxes__item{display:flex}::ng-deep .govuk-width-container .screen-990 .width-50{width:100%}.govuk-table__row{position:relative}.govuk-table__row .table-group-error{position:absolute;height:calc(100% - 20px);margin-left:-15px}\n"] }]
16708
- }], () => [{ type: CasesService }, { type: i4.FormBuilder }, { type: ValidatorsUtils }, { type: LinkedCasesService }], { linkedCasesStateEmitter: [{
17080
+ args: [{ selector: 'ccd-link-cases', template: "<div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-full\">\n <div>\n <span class=\"govuk-caption-l\">Link cases to {{caseName}} {{caseId | ccdCaseReference}}</span>\n <h1 class=\"govuk-heading-xl\">Select a&nbsp;case you want to link to this case</h1>\n <div class=\"form-group\" [formGroup]=\"linkCaseForm\" *ngIf=\"linkCaseForm\">\n <div class=\"govuk-form-group\" id=\"caseNumber\" [ngClass]=\"{'govuk-form-group--error': !!caseNumberError}\">\n <h3 class=\"govuk-heading-s\">Enter case reference</h3>\n <span class=\"govuk-error-message\" *ngIf=\"caseNumberError\">\n <span class=\"govuk-visually-hidden\">Error:</span> {{caseNumberError}}\n </span>\n <input class=\"govuk-input govuk-input--width-20\" formControlName=\"caseNumber\" id=\"width-20\" name=\"width-20\"\n type=\"text\">\n </div>\n <div [ngClass]=\"{'govuk-form-group--error': !!caseReasonError}\" class=\"govuk-!-margin-top-3\">\n <h3 class=\"govuk-heading-s\">Why should these cases be linked?</h3>\n <div id=\"waste-hint\" class=\"govuk-hint\">\n Select all that apply.\n </div>\n <span class=\"govuk-error-message\" *ngIf=\"caseReasonError\">\n <span class=\"govuk-visually-hidden\">Error:</span> {{caseReasonError}}\n </span>\n <div class=\"govuk-checkboxes\" data-module=\"govuk-checkboxes\" formArrayName=\"reasonType\" id=\"caseReason\">\n <div class=\"govuk-checkboxes__item\" *ngFor=\"let reason of linkCaseReasons;index as pos\" [formGroupName]=\"pos\">\n <input class=\"govuk-checkboxes__input\" id=\"{{reason.key}}\" formControlName=\"selected\" name=\"pos\"\n type=\"checkbox\" [value]=\"reason.value_en\" (change)=\"toggleLinkCaseReasonOtherComments($event)\">\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"{{reason.key}}\">{{reason.value_en}}</label>\n </div>\n </div>\n </div>\n <div id=\"other-description-char-limit-error\" [ngClass]=\"{'govuk-form-group--error': !!caseReasonCommentsError}\" class=\"govuk-!-margin-top-3\" *ngIf=\"showComments\">\n <h3 class=\"govuk-heading-s\">Comments</h3>\n <span class=\"govuk-error-message\" *ngIf=\"caseReasonCommentsError\">\n <span class=\"govuk-visually-hidden\">Error:</span> {{caseReasonCommentsError}}\n </span>\n <textarea class=\"govuk-textarea govuk-input--width-30\" id=\"otherDescription\"\n name=\"otherDescription\" formControlName=\"otherDescription\" rows=\"5\"\n aria-describedby=\"other-description-hint other-description-char-limit-info other-description-char-limit-error\">\n </textarea>\n <div id=\"other-description-char-limit-info\" aria-live=\"polite\" class=\"govuk-hint govuk-character-count__message\">\n You can enter up to 100 characters\n </div>\n </div>\n <br><br>\n <span class=\"govuk-error-message\" *ngIf=\"caseSelectionError\">\n <span class=\"govuk-visually-hidden\">Error:</span> {{caseSelectionError}}\n </span>\n <button id=\"propose\" type=\"button\" class=\"govuk-button govuk-button--secondary\" data-module=\"govuk-button\"\n (click)=\"submitCaseInfo()\">Propose case link</button>\n </div>\n <hr>\n <br><br>\n <div class=\"govuk-form-group\" id=\"caseNumber\" [ngClass]=\"{'govuk-form-group--error': !!noSelectedCaseError}\">\n <span class=\"govuk-error-message\" *ngIf=\"noSelectedCaseError\">\n <span class=\"govuk-visually-hidden\">Error:</span> {{noSelectedCaseError}}\n </span>\n <table class=\"govuk-table\">\n <caption class=\"govuk-table__caption govuk-table__caption--m\">Proposed case links </caption>\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th scope=\"col\" class=\"govuk-table__header\" width=\"300\">Case name and number</th>\n <th scope=\"col\" class=\"govuk-table__header\" width=\"150\">Case type </th>\n <th scope=\"col\" class=\"govuk-table__header\" width=\"200\">Service</th>\n <th scope=\"col\" class=\"govuk-table__header\" width=\"200\">State</th>\n <th scope=\"col\" class=\"govuk-table__header\" width=\"400\">Reasons for case link</th>\n <th scope=\"col\" class=\"govuk-table__header\" width=\"50\"></th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\" *ngFor=\"let case of selectedCases; let pos = index\">\n <td class=\"govuk-table__cell\">\n <div class=\"govuk-form-group--error\"\n [ngClass]=\"{'table-group-error':caseSelectionError && case.caseReference === linkCaseForm.value.caseNumber}\">\n </div>\n <span>{{case.caseName}} <br> {{case.caseReference | ccdCaseReference}}</span>\n </td>\n <td class=\"govuk-table__cell\" [title]=\"case.caseTypeDescription\">{{case.caseType}}</td>\n <td class=\"govuk-table__cell\">{{case.caseService}}</td>\n <td class=\"govuk-table__cell\" [title]=\"case.caseStateDescription\">{{case.caseState}}</td>\n <td class=\"govuk-table__cell\"><span\n *ngFor=\"let reason of case.reasons\">{{reason | ccdLinkCasesReasonValue}}<br></span></td>\n <td class=\"govuk-table__cell\"><a [attr.id]=\"case.caseReference\" (click)=\"onSelectedLinkedCaseRemove(pos, case.caseReference);\"\n class=\"govuk-link no-visited-state\">Remove</a></td>\n </tr>\n <tr class=\"govuk-table__row\" *ngIf=\"!selectedCases.length\">\n <td class=\"govuk-table__cell\" colspan=\"6\">\n None\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n </div>\n</div>\n", styles: [".no-visited-state{color:#1d70b8;cursor:pointer}.no-visited-state:hover{color:#003078}.govuk-checkboxes{display:flex;flex-direction:column;flex-wrap:wrap;max-height:500px;width:100%;overflow-x:auto;overflow-y:hidden;padding-top:5px}.govuk-checkboxes .govuk-checkboxes__item{display:flex}::ng-deep .govuk-width-container .screen-990 .width-50{width:100%}.govuk-table__row{position:relative}.govuk-table__row .table-group-error{position:absolute;height:calc(100% - 20px);margin-left:-15px}\n"] }]
17081
+ }], () => [{ type: CasesService }, { type: i4.FormBuilder }, { type: ValidatorsUtils }, { type: LinkedCasesService }, { type: MultipageComponentStateService }], { linkedCasesStateEmitter: [{
16709
17082
  type: Output
16710
17083
  }] }); })();
16711
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LinkCasesComponent, { className: "LinkCasesComponent", filePath: "lib/shared/components/palette/linked-cases/components/link-cases/link-cases.component.ts", lineNumber: 24 }); })();
17084
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LinkCasesComponent, { className: "LinkCasesComponent", filePath: "lib/shared/components/palette/linked-cases/components/link-cases/link-cases.component.ts", lineNumber: 26 }); })();
16712
17085
 
16713
17086
  function LinkedCasesFromTableComponent_a_0_Template(rf, ctx) { if (rf & 1) {
16714
17087
  const _r1 = i0.ɵɵgetCurrentView();
@@ -17244,11 +17617,12 @@ function NoLinkedCasesComponent_ng_template_4_Template(rf, ctx) { if (rf & 1) {
17244
17617
  i0.ɵɵtext(1, "There are no cases linked to this one.");
17245
17618
  i0.ɵɵelementEnd();
17246
17619
  } }
17247
- class NoLinkedCasesComponent {
17620
+ class NoLinkedCasesComponent extends AbstractJourneyComponent {
17248
17621
  router;
17249
17622
  linkedCasesService;
17250
17623
  serverLinkedApiError;
17251
- constructor(router, linkedCasesService) {
17624
+ constructor(router, linkedCasesService, multipageComponentStateService) {
17625
+ super(multipageComponentStateService);
17252
17626
  this.router = router;
17253
17627
  this.linkedCasesService = linkedCasesService;
17254
17628
  }
@@ -17258,8 +17632,8 @@ class NoLinkedCasesComponent {
17258
17632
  onBack() {
17259
17633
  this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseId], { fragment: 'Linked cases' });
17260
17634
  }
17261
- static ɵfac = function NoLinkedCasesComponent_Factory(t) { return new (t || NoLinkedCasesComponent)(i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(LinkedCasesService)); };
17262
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NoLinkedCasesComponent, selectors: [["ccd-no-linked-cases"]], decls: 12, vars: 3, consts: [["noLinkedCases", ""], [1, "govuk-grid-row"], [1, "govuk-grid-column-full"], ["class", "govuk-heading-xl", 4, "ngIf"], ["id", "unlink-cases-error", "class", "govuk-error-message", 4, "ngIf", "ngIfElse"], [1, "govuk-body"], ["href", "javascript:void(0)", 1, "govuk-link", 3, "click"], [1, "govuk-button-group"], ["type", "button", "id", "back-button", 1, "button", "button-primary", 3, "click"], [1, "govuk-heading-xl"], ["id", "unlink-cases-error", 1, "govuk-error-message"], [1, "govuk-visually-hidden"]], template: function NoLinkedCasesComponent_Template(rf, ctx) { if (rf & 1) {
17635
+ static ɵfac = function NoLinkedCasesComponent_Factory(t) { return new (t || NoLinkedCasesComponent)(i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(LinkedCasesService), i0.ɵɵdirectiveInject(MultipageComponentStateService)); };
17636
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NoLinkedCasesComponent, selectors: [["ccd-no-linked-cases"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 12, vars: 3, consts: [["noLinkedCases", ""], [1, "govuk-grid-row"], [1, "govuk-grid-column-full"], ["class", "govuk-heading-xl", 4, "ngIf"], ["id", "unlink-cases-error", "class", "govuk-error-message", 4, "ngIf", "ngIfElse"], [1, "govuk-body"], ["href", "javascript:void(0)", 1, "govuk-link", 3, "click"], [1, "govuk-button-group"], ["type", "button", "id", "back-button", 1, "button", "button-primary", 3, "click"], [1, "govuk-heading-xl"], ["id", "unlink-cases-error", 1, "govuk-error-message"], [1, "govuk-visually-hidden"]], template: function NoLinkedCasesComponent_Template(rf, ctx) { if (rf & 1) {
17263
17637
  const _r1 = i0.ɵɵgetCurrentView();
17264
17638
  i0.ɵɵelementStart(0, "div", 1)(1, "div", 2);
17265
17639
  i0.ɵɵtemplate(2, NoLinkedCasesComponent_h1_2_Template, 2, 0, "h1", 3)(3, NoLinkedCasesComponent_p_3_Template, 4, 1, "p", 4)(4, NoLinkedCasesComponent_ng_template_4_Template, 2, 0, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
@@ -17282,70 +17656,66 @@ class NoLinkedCasesComponent {
17282
17656
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NoLinkedCasesComponent, [{
17283
17657
  type: Component,
17284
17658
  args: [{ selector: 'ccd-no-linked-cases', template: "<div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-full\">\n <h1 class=\"govuk-heading-xl\" *ngIf=\"serverLinkedApiError\">There is a problem</h1>\n <p id=\"unlink-cases-error\" class=\"govuk-error-message\"\n *ngIf=\"serverLinkedApiError;else noLinkedCases;\">\n <span class=\"govuk-visually-hidden\">Error:</span> {{serverLinkedApiError.message}}\n </p>\n <ng-template #noLinkedCases>\n <p class=\"govuk-body\">There are no cases linked to this one.</p>\n </ng-template>\n <p class=\"govuk-body\">\n <a class=\"govuk-link\" href=\"javascript:void(0)\" (click)=\"onBack()\">Go back to the Linked cases tab</a>\n </p>\n <div class=\"govuk-button-group\">\n <button class=\"button button-primary\" type=\"button\" id=\"back-button\" (click)=\"onBack()\">Back</button>\n </div>\n </div>\n</div>\n" }]
17285
- }], () => [{ type: i1$1.Router }, { type: LinkedCasesService }], null); })();
17286
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(NoLinkedCasesComponent, { className: "NoLinkedCasesComponent", filePath: "lib/shared/components/palette/linked-cases/components/no-linked-cases/no-linked-cases.component.ts", lineNumber: 9 }); })();
17659
+ }], () => [{ type: i1$1.Router }, { type: LinkedCasesService }, { type: MultipageComponentStateService }], null); })();
17660
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(NoLinkedCasesComponent, { className: "NoLinkedCasesComponent", filePath: "lib/shared/components/palette/linked-cases/components/no-linked-cases/no-linked-cases.component.ts", lineNumber: 12 }); })();
17287
17661
 
17288
17662
  const _c0$I = a0 => ({ "govuk-form-group--error": a0 });
17289
17663
  function UnLinkCasesComponent_div_0_div_4_p_1_Template(rf, ctx) { if (rf & 1) {
17290
- i0.ɵɵelementStart(0, "p", 11)(1, "span", 12);
17664
+ i0.ɵɵelementStart(0, "p", 9)(1, "span", 10);
17291
17665
  i0.ɵɵtext(2, "Error:");
17292
17666
  i0.ɵɵelementEnd();
17293
17667
  i0.ɵɵtext(3);
17294
17668
  i0.ɵɵelementEnd();
17295
17669
  } if (rf & 2) {
17296
- const ctx_r1 = i0.ɵɵnextContext(3);
17670
+ const ctx_r0 = i0.ɵɵnextContext(3);
17297
17671
  i0.ɵɵadvance(3);
17298
- i0.ɵɵtextInterpolate1(" ", ctx_r1.unlinkErrorMessage, " ");
17672
+ i0.ɵɵtextInterpolate1(" ", ctx_r0.unlinkErrorMessage, " ");
17299
17673
  } }
17300
17674
  function UnLinkCasesComponent_div_0_div_4_div_3_Template(rf, ctx) { if (rf & 1) {
17301
- const _r3 = i0.ɵɵgetCurrentView();
17302
- i0.ɵɵelementStart(0, "div", 13)(1, "input", 14);
17303
- i0.ɵɵlistener("change", function UnLinkCasesComponent_div_0_div_4_div_3_Template_input_change_1_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.onChange($event.target)); });
17675
+ const _r2 = i0.ɵɵgetCurrentView();
17676
+ i0.ɵɵelementStart(0, "div", 11)(1, "input", 12);
17677
+ i0.ɵɵlistener("change", function UnLinkCasesComponent_div_0_div_4_div_3_Template_input_change_1_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.onChange($event.target)); });
17304
17678
  i0.ɵɵelementEnd();
17305
- i0.ɵɵelementStart(2, "label", 15);
17679
+ i0.ɵɵelementStart(2, "label", 13);
17306
17680
  i0.ɵɵtext(3);
17307
17681
  i0.ɵɵpipe(4, "ccdCaseReference");
17308
17682
  i0.ɵɵelementEnd()();
17309
17683
  } if (rf & 2) {
17310
- const case_r4 = ctx.$implicit;
17684
+ const case_r3 = ctx.$implicit;
17311
17685
  i0.ɵɵadvance();
17312
- i0.ɵɵpropertyInterpolate1("id", "case-reference-", case_r4.caseReference, "");
17313
- i0.ɵɵproperty("value", case_r4.caseReference)("checked", case_r4.unlink);
17686
+ i0.ɵɵpropertyInterpolate1("id", "case-reference-", case_r3.caseReference, "");
17687
+ i0.ɵɵproperty("value", case_r3.caseReference)("checked", case_r3.unlink);
17314
17688
  i0.ɵɵadvance();
17315
- i0.ɵɵpropertyInterpolate("for", case_r4.caseReference);
17689
+ i0.ɵɵpropertyInterpolate("for", case_r3.caseReference);
17316
17690
  i0.ɵɵadvance();
17317
- i0.ɵɵtextInterpolate2(" ", case_r4.caseName, " ", i0.ɵɵpipeBind1(4, 7, case_r4.caseReference), " ");
17691
+ i0.ɵɵtextInterpolate2(" ", case_r3.caseName, " ", i0.ɵɵpipeBind1(4, 7, case_r3.caseReference), " ");
17318
17692
  } }
17319
17693
  function UnLinkCasesComponent_div_0_div_4_Template(rf, ctx) { if (rf & 1) {
17320
- i0.ɵɵelementStart(0, "div", 7);
17321
- i0.ɵɵtemplate(1, UnLinkCasesComponent_div_0_div_4_p_1_Template, 4, 1, "p", 8);
17322
- i0.ɵɵelementStart(2, "div", 9);
17323
- i0.ɵɵtemplate(3, UnLinkCasesComponent_div_0_div_4_div_3_Template, 5, 9, "div", 10);
17694
+ i0.ɵɵelementStart(0, "div", 5);
17695
+ i0.ɵɵtemplate(1, UnLinkCasesComponent_div_0_div_4_p_1_Template, 4, 1, "p", 6);
17696
+ i0.ɵɵelementStart(2, "div", 7);
17697
+ i0.ɵɵtemplate(3, UnLinkCasesComponent_div_0_div_4_div_3_Template, 5, 9, "div", 8);
17324
17698
  i0.ɵɵelementEnd()();
17325
17699
  } if (rf & 2) {
17326
- const ctx_r1 = i0.ɵɵnextContext(2);
17327
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c0$I, ctx_r1.unlinkErrorMessage))("formGroup", ctx_r1.unlinkCaseForm);
17700
+ const ctx_r0 = i0.ɵɵnextContext(2);
17701
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c0$I, ctx_r0.unlinkErrorMessage))("formGroup", ctx_r0.unlinkCaseForm);
17328
17702
  i0.ɵɵadvance();
17329
- i0.ɵɵproperty("ngIf", ctx_r1.unlinkErrorMessage);
17703
+ i0.ɵɵproperty("ngIf", ctx_r0.unlinkErrorMessage);
17330
17704
  i0.ɵɵadvance(2);
17331
- i0.ɵɵproperty("ngForOf", ctx_r1.linkedCases);
17705
+ i0.ɵɵproperty("ngForOf", ctx_r0.linkedCases);
17332
17706
  } }
17333
17707
  function UnLinkCasesComponent_div_0_Template(rf, ctx) { if (rf & 1) {
17334
- const _r1 = i0.ɵɵgetCurrentView();
17335
17708
  i0.ɵɵelementStart(0, "div", 1)(1, "div", 2)(2, "h1", 3);
17336
17709
  i0.ɵɵtext(3, "Select the cases you want to unlink from this case");
17337
17710
  i0.ɵɵelementEnd();
17338
17711
  i0.ɵɵtemplate(4, UnLinkCasesComponent_div_0_div_4_Template, 4, 6, "div", 4);
17339
- i0.ɵɵelementStart(5, "div", 5)(6, "button", 6);
17340
- i0.ɵɵlistener("click", function UnLinkCasesComponent_div_0_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onNext()); });
17341
- i0.ɵɵtext(7, "Next");
17342
- i0.ɵɵelementEnd()()()();
17712
+ i0.ɵɵelementEnd()();
17343
17713
  } if (rf & 2) {
17344
- const ctx_r1 = i0.ɵɵnextContext();
17714
+ const ctx_r0 = i0.ɵɵnextContext();
17345
17715
  i0.ɵɵadvance(4);
17346
- i0.ɵɵproperty("ngIf", ctx_r1.unlinkCaseForm);
17716
+ i0.ɵɵproperty("ngIf", ctx_r0.unlinkCaseForm);
17347
17717
  } }
17348
- class UnLinkCasesComponent {
17718
+ class UnLinkCasesComponent extends AbstractFieldWriteJourneyComponent {
17349
17719
  fb;
17350
17720
  casesService;
17351
17721
  linkedCasesService;
@@ -17360,7 +17730,8 @@ class UnLinkCasesComponent {
17360
17730
  unlinkErrorMessage;
17361
17731
  isLoaded;
17362
17732
  isServerError = false;
17363
- constructor(fb, casesService, linkedCasesService) {
17733
+ constructor(fb, casesService, linkedCasesService, multipageComponentStateService) {
17734
+ super(multipageComponentStateService);
17364
17735
  this.fb = fb;
17365
17736
  this.casesService = casesService;
17366
17737
  this.linkedCasesService = linkedCasesService;
@@ -17453,6 +17824,12 @@ class UnLinkCasesComponent {
17453
17824
  // Return linked cases state and error messages to the parent
17454
17825
  this.emitLinkedCasesState(navigateToNextPage);
17455
17826
  }
17827
+ next() {
17828
+ this.onNext();
17829
+ if (this.errorMessages.length === 0) {
17830
+ super.next();
17831
+ }
17832
+ }
17456
17833
  // Return linked cases state and error messages to the parent
17457
17834
  emitLinkedCasesState(isNavigateToNextPage) {
17458
17835
  this.linkedCasesStateEmitter.emit({
@@ -17465,22 +17842,22 @@ class UnLinkCasesComponent {
17465
17842
  this.errorMessages = [];
17466
17843
  this.unlinkErrorMessage = null;
17467
17844
  }
17468
- static ɵfac = function UnLinkCasesComponent_Factory(t) { return new (t || UnLinkCasesComponent)(i0.ɵɵdirectiveInject(i4.FormBuilder), i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(LinkedCasesService)); };
17469
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UnLinkCasesComponent, selectors: [["ccd-unlink-cases"]], outputs: { linkedCasesStateEmitter: "linkedCasesStateEmitter", notifyAPIFailure: "notifyAPIFailure" }, decls: 1, vars: 1, consts: [["class", "govuk-grid-row", 4, "ngIf"], [1, "govuk-grid-row"], [1, "govuk-grid-column-full"], [1, "govuk-heading-xl"], ["class", "govuk-form-group form-group", 3, "ngClass", "formGroup", 4, "ngIf"], [1, "govuk-button-group"], ["type", "button", "id", "next-button", 1, "button", "button-primary", 3, "click"], [1, "govuk-form-group", "form-group", 3, "ngClass", "formGroup"], ["id", "unlink-cases-error", "class", "govuk-error-message", 4, "ngIf"], ["data-module", "govuk-checkboxes", 1, "govuk-checkboxes"], ["class", "govuk-checkboxes__item", 4, "ngFor", "ngForOf"], ["id", "unlink-cases-error", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], [1, "govuk-checkboxes__item"], ["formArrayName", "linkedCases", "name", "linkedCases", "type", "checkbox", 1, "govuk-checkboxes__input", 3, "change", "id", "value", "checked"], [1, "govuk-label", "govuk-checkboxes__label", 3, "for"]], template: function UnLinkCasesComponent_Template(rf, ctx) { if (rf & 1) {
17470
- i0.ɵɵtemplate(0, UnLinkCasesComponent_div_0_Template, 8, 1, "div", 0);
17845
+ static ɵfac = function UnLinkCasesComponent_Factory(t) { return new (t || UnLinkCasesComponent)(i0.ɵɵdirectiveInject(i4.FormBuilder), i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(LinkedCasesService), i0.ɵɵdirectiveInject(MultipageComponentStateService)); };
17846
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UnLinkCasesComponent, selectors: [["ccd-unlink-cases"]], outputs: { linkedCasesStateEmitter: "linkedCasesStateEmitter", notifyAPIFailure: "notifyAPIFailure" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [["class", "govuk-grid-row", 4, "ngIf"], [1, "govuk-grid-row"], [1, "govuk-grid-column-full"], [1, "govuk-heading-xl"], ["class", "govuk-form-group form-group", 3, "ngClass", "formGroup", 4, "ngIf"], [1, "govuk-form-group", "form-group", 3, "ngClass", "formGroup"], ["id", "unlink-cases-error", "class", "govuk-error-message", 4, "ngIf"], ["data-module", "govuk-checkboxes", 1, "govuk-checkboxes"], ["class", "govuk-checkboxes__item", 4, "ngFor", "ngForOf"], ["id", "unlink-cases-error", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], [1, "govuk-checkboxes__item"], ["formArrayName", "linkedCases", "name", "linkedCases", "type", "checkbox", 1, "govuk-checkboxes__input", 3, "change", "id", "value", "checked"], [1, "govuk-label", "govuk-checkboxes__label", 3, "for"]], template: function UnLinkCasesComponent_Template(rf, ctx) { if (rf & 1) {
17847
+ i0.ɵɵtemplate(0, UnLinkCasesComponent_div_0_Template, 5, 1, "div", 0);
17471
17848
  } if (rf & 2) {
17472
17849
  i0.ɵɵproperty("ngIf", ctx.linkedCases.length > 0);
17473
17850
  } }, dependencies: [i5.NgClass, i5.NgForOf, i5.NgIf, i4.NgControlStatusGroup, i4.FormGroupDirective, i4.FormArrayName, CaseReferencePipe], encapsulation: 2 });
17474
17851
  }
17475
17852
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UnLinkCasesComponent, [{
17476
17853
  type: Component,
17477
- args: [{ selector: 'ccd-unlink-cases', template: "<div class=\"govuk-grid-row\" *ngIf=\"linkedCases.length > 0\">\n <div class=\"govuk-grid-column-full\">\n <h1 class=\"govuk-heading-xl\">Select the cases you want to unlink from this case</h1>\n <div class=\"govuk-form-group form-group\" [ngClass]=\"{'govuk-form-group--error': unlinkErrorMessage}\" [formGroup]=\"unlinkCaseForm\" *ngIf=\"unlinkCaseForm\">\n <p id=\"unlink-cases-error\" class=\"govuk-error-message\" *ngIf=\"unlinkErrorMessage\">\n <span class=\"govuk-visually-hidden\">Error:</span> {{unlinkErrorMessage}}\n </p>\n <div class=\"govuk-checkboxes\" data-module=\"govuk-checkboxes\">\n <div class=\"govuk-checkboxes__item\" *ngFor=\"let case of linkedCases\">\n <input class=\"govuk-checkboxes__input\" id=\"case-reference-{{case.caseReference}}\" formArrayName=\"linkedCases\" name=\"linkedCases\"\n type=\"checkbox\" [value]=\"case.caseReference\" [checked]=\"case.unlink\" (change)=\"onChange($event.target)\">\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"{{case.caseReference}}\">\n {{case.caseName }} {{case.caseReference | ccdCaseReference}}\n </label>\n </div>\n </div>\n </div>\n <div class=\"govuk-button-group\">\n <button class=\"button button-primary\" type=\"button\" id=\"next-button\" (click)=\"onNext()\">Next</button>\n </div>\n </div>\n</div>\n" }]
17478
- }], () => [{ type: i4.FormBuilder }, { type: CasesService }, { type: LinkedCasesService }], { linkedCasesStateEmitter: [{
17854
+ args: [{ selector: 'ccd-unlink-cases', template: "<div class=\"govuk-grid-row\" *ngIf=\"linkedCases.length > 0\">\n <div class=\"govuk-grid-column-full\">\n <h1 class=\"govuk-heading-xl\">Select the cases you want to unlink from this case</h1>\n <div class=\"govuk-form-group form-group\" [ngClass]=\"{'govuk-form-group--error': unlinkErrorMessage}\" [formGroup]=\"unlinkCaseForm\" *ngIf=\"unlinkCaseForm\">\n <p id=\"unlink-cases-error\" class=\"govuk-error-message\" *ngIf=\"unlinkErrorMessage\">\n <span class=\"govuk-visually-hidden\">Error:</span> {{unlinkErrorMessage}}\n </p>\n <div class=\"govuk-checkboxes\" data-module=\"govuk-checkboxes\">\n <div class=\"govuk-checkboxes__item\" *ngFor=\"let case of linkedCases\">\n <input class=\"govuk-checkboxes__input\" id=\"case-reference-{{case.caseReference}}\" formArrayName=\"linkedCases\" name=\"linkedCases\"\n type=\"checkbox\" [value]=\"case.caseReference\" [checked]=\"case.unlink\" (change)=\"onChange($event.target)\">\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"{{case.caseReference}}\">\n {{case.caseName }} {{case.caseReference | ccdCaseReference}}\n </label>\n </div>\n </div>\n </div>\n </div>\n</div>\n" }]
17855
+ }], () => [{ type: i4.FormBuilder }, { type: CasesService }, { type: LinkedCasesService }, { type: MultipageComponentStateService }], { linkedCasesStateEmitter: [{
17479
17856
  type: Output
17480
17857
  }], notifyAPIFailure: [{
17481
17858
  type: Output
17482
17859
  }] }); })();
17483
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UnLinkCasesComponent, { className: "UnLinkCasesComponent", filePath: "lib/shared/components/palette/linked-cases/components/unlink-cases/unlink-cases.component.ts", lineNumber: 14 }); })();
17860
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UnLinkCasesComponent, { className: "UnLinkCasesComponent", filePath: "lib/shared/components/palette/linked-cases/components/unlink-cases/unlink-cases.component.ts", lineNumber: 16 }); })();
17484
17861
 
17485
17862
  // tslint:disable:variable-name
17486
17863
  class LinkCaseReason {
@@ -17734,7 +18111,7 @@ class ReadLinkedCasesFieldComponent {
17734
18111
  function WriteLinkedCasesFieldComponent_ng_container_2_Template(rf, ctx) { if (rf & 1) {
17735
18112
  const _r1 = i0.ɵɵgetCurrentView();
17736
18113
  i0.ɵɵelementContainerStart(0);
17737
- i0.ɵɵelementStart(1, "ccd-linked-cases-before-you-start", 3);
18114
+ i0.ɵɵelementStart(1, "ccd-linked-cases-before-you-start", 4, 0);
17738
18115
  i0.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesFieldComponent_ng_container_2_Template_ccd_linked_cases_before_you_start_linkedCasesStateEmitter_1_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onLinkedCasesStateEmitted($event)); });
17739
18116
  i0.ɵɵelementEnd();
17740
18117
  i0.ɵɵelementContainerEnd();
@@ -17742,7 +18119,7 @@ function WriteLinkedCasesFieldComponent_ng_container_2_Template(rf, ctx) { if (r
17742
18119
  function WriteLinkedCasesFieldComponent_ng_container_3_Template(rf, ctx) { if (rf & 1) {
17743
18120
  const _r3 = i0.ɵɵgetCurrentView();
17744
18121
  i0.ɵɵelementContainerStart(0);
17745
- i0.ɵɵelementStart(1, "ccd-no-linked-cases", 3);
18122
+ i0.ɵɵelementStart(1, "ccd-no-linked-cases", 4, 0);
17746
18123
  i0.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesFieldComponent_ng_container_3_Template_ccd_no_linked_cases_linkedCasesStateEmitter_1_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onLinkedCasesStateEmitted($event)); });
17747
18124
  i0.ɵɵelementEnd();
17748
18125
  i0.ɵɵelementContainerEnd();
@@ -17750,7 +18127,7 @@ function WriteLinkedCasesFieldComponent_ng_container_3_Template(rf, ctx) { if (r
17750
18127
  function WriteLinkedCasesFieldComponent_ng_container_4_Template(rf, ctx) { if (rf & 1) {
17751
18128
  const _r4 = i0.ɵɵgetCurrentView();
17752
18129
  i0.ɵɵelementContainerStart(0);
17753
- i0.ɵɵelementStart(1, "ccd-link-cases", 3);
18130
+ i0.ɵɵelementStart(1, "ccd-link-cases", 4, 0);
17754
18131
  i0.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesFieldComponent_ng_container_4_Template_ccd_link_cases_linkedCasesStateEmitter_1_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onLinkedCasesStateEmitted($event)); });
17755
18132
  i0.ɵɵelementEnd();
17756
18133
  i0.ɵɵelementContainerEnd();
@@ -17758,7 +18135,7 @@ function WriteLinkedCasesFieldComponent_ng_container_4_Template(rf, ctx) { if (r
17758
18135
  function WriteLinkedCasesFieldComponent_ng_container_5_Template(rf, ctx) { if (rf & 1) {
17759
18136
  const _r5 = i0.ɵɵgetCurrentView();
17760
18137
  i0.ɵɵelementContainerStart(0);
17761
- i0.ɵɵelementStart(1, "ccd-unlink-cases", 3);
18138
+ i0.ɵɵelementStart(1, "ccd-unlink-cases", 4, 0);
17762
18139
  i0.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesFieldComponent_ng_container_5_Template_ccd_unlink_cases_linkedCasesStateEmitter_1_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onLinkedCasesStateEmitted($event)); });
17763
18140
  i0.ɵɵelementEnd();
17764
18141
  i0.ɵɵelementContainerEnd();
@@ -17766,12 +18143,12 @@ function WriteLinkedCasesFieldComponent_ng_container_5_Template(rf, ctx) { if (r
17766
18143
  function WriteLinkedCasesFieldComponent_ng_container_6_Template(rf, ctx) { if (rf & 1) {
17767
18144
  const _r6 = i0.ɵɵgetCurrentView();
17768
18145
  i0.ɵɵelementContainerStart(0);
17769
- i0.ɵɵelementStart(1, "ccd-linked-cases-check-your-answers", 3);
18146
+ i0.ɵɵelementStart(1, "ccd-linked-cases-check-your-answers", 4, 0);
17770
18147
  i0.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesFieldComponent_ng_container_6_Template_ccd_linked_cases_check_your_answers_linkedCasesStateEmitter_1_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onLinkedCasesStateEmitted($event)); });
17771
18148
  i0.ɵɵelementEnd();
17772
18149
  i0.ɵɵelementContainerEnd();
17773
18150
  } }
17774
- class WriteLinkedCasesFieldComponent extends AbstractFieldWriteComponent {
18151
+ class WriteLinkedCasesFieldComponent extends AbstractFieldWriteJourneyComponent {
17775
18152
  appConfig;
17776
18153
  commonDataService;
17777
18154
  casesService;
@@ -17784,8 +18161,8 @@ class WriteLinkedCasesFieldComponent extends AbstractFieldWriteComponent {
17784
18161
  linkedCasesEventTriggers = LinkedCasesEventTriggers;
17785
18162
  linkedCases = [];
17786
18163
  subscriptions = new Subscription();
17787
- constructor(appConfig, commonDataService, casesService, linkedCasesService, caseEditDataService) {
17788
- super();
18164
+ constructor(appConfig, commonDataService, casesService, linkedCasesService, caseEditDataService, multipageComponentStateService) {
18165
+ super(multipageComponentStateService);
17789
18166
  this.appConfig = appConfig;
17790
18167
  this.commonDataService = commonDataService;
17791
18168
  this.casesService = casesService;
@@ -17810,6 +18187,13 @@ class WriteLinkedCasesFieldComponent extends AbstractFieldWriteComponent {
17810
18187
  this.subscriptions.add(this.caseEditDataService.caseEditForm$.subscribe({
17811
18188
  next: editForm => this.caseEditForm = editForm
17812
18189
  }));
18190
+ this.journeyPageNumber = this.journeyStartPageNumber = LinkedCasesPages.BEFORE_YOU_START;
18191
+ this.journeyEndPageNumber = LinkedCasesPages.CHECK_YOUR_ANSWERS;
18192
+ this.multipageComponentStateService.isAtStart = this.journeyPageNumber === this.journeyStartPageNumber;
18193
+ }
18194
+ onPageChange() {
18195
+ const isAtStart = this.journeyPageNumber === this.journeyStartPageNumber || this.linkedCasesPage === LinkedCasesPages.BEFORE_YOU_START;
18196
+ this.multipageComponentStateService.isAtStart = isAtStart;
17813
18197
  }
17814
18198
  initialiseCaseDetails(caseDetails) {
17815
18199
  if (caseDetails) {
@@ -17867,6 +18251,8 @@ class WriteLinkedCasesFieldComponent extends AbstractFieldWriteComponent {
17867
18251
  }
17868
18252
  proceedToNextPage() {
17869
18253
  if (this.isAtFinalPage()) {
18254
+ // Set the journey page to the end page.
18255
+ this.journeyPageNumber = this.journeyEndPageNumber;
17870
18256
  // Continue button event must be allowed in final page
17871
18257
  this.caseEditDataService.setLinkedCasesJourneyAtFinalStep(true);
17872
18258
  // Trigger validation to clear the "notAtFinalPage" error if now at the final state
@@ -17878,6 +18264,7 @@ class WriteLinkedCasesFieldComponent extends AbstractFieldWriteComponent {
17878
18264
  // Continue button event must not be allowed if not in final page
17879
18265
  this.caseEditDataService.setLinkedCasesJourneyAtFinalStep(false);
17880
18266
  }
18267
+ this.nextPage();
17881
18268
  }
17882
18269
  submitLinkedCases() {
17883
18270
  if (!this.linkedCasesService.isLinkedCasesEventTrigger) {
@@ -17922,10 +18309,22 @@ class WriteLinkedCasesFieldComponent extends AbstractFieldWriteComponent {
17922
18309
  ngOnDestroy() {
17923
18310
  this.subscriptions.unsubscribe();
17924
18311
  }
17925
- static ɵfac = function WriteLinkedCasesFieldComponent_Factory(t) { return new (t || WriteLinkedCasesFieldComponent)(i0.ɵɵdirectiveInject(AbstractAppConfig), i0.ɵɵdirectiveInject(CommonDataService), i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(LinkedCasesService), i0.ɵɵdirectiveInject(CaseEditDataService)); };
17926
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteLinkedCasesFieldComponent, selectors: [["ccd-write-linked-cases-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 7, vars: 7, consts: [[1, "form-group", "govuk-!-margin-bottom-2", 3, "formGroup"], [1, "govuk-form-group", 3, "ngSwitch"], [4, "ngSwitchCase"], [3, "linkedCasesStateEmitter"]], template: function WriteLinkedCasesFieldComponent_Template(rf, ctx) { if (rf & 1) {
17927
- i0.ɵɵelementStart(0, "div", 0)(1, "div", 1);
17928
- i0.ɵɵtemplate(2, WriteLinkedCasesFieldComponent_ng_container_2_Template, 2, 0, "ng-container", 2)(3, WriteLinkedCasesFieldComponent_ng_container_3_Template, 2, 0, "ng-container", 2)(4, WriteLinkedCasesFieldComponent_ng_container_4_Template, 2, 0, "ng-container", 2)(5, WriteLinkedCasesFieldComponent_ng_container_5_Template, 2, 0, "ng-container", 2)(6, WriteLinkedCasesFieldComponent_ng_container_6_Template, 2, 0, "ng-container", 2);
18312
+ previousPage() {
18313
+ if (this.linkedCasesPage === LinkedCasesPages.CHECK_YOUR_ANSWERS) {
18314
+ this.linkedCasesPage = LinkedCasesPages.LINK_CASE;
18315
+ }
18316
+ else if (this.linkedCasesPage === LinkedCasesPages.LINK_CASE) {
18317
+ this.linkedCasesPage = LinkedCasesPages.BEFORE_YOU_START;
18318
+ }
18319
+ else {
18320
+ this.linkedCasesPage--;
18321
+ }
18322
+ super.previousPage();
18323
+ }
18324
+ static ɵfac = function WriteLinkedCasesFieldComponent_Factory(t) { return new (t || WriteLinkedCasesFieldComponent)(i0.ɵɵdirectiveInject(AbstractAppConfig), i0.ɵɵdirectiveInject(CommonDataService), i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(LinkedCasesService), i0.ɵɵdirectiveInject(CaseEditDataService), i0.ɵɵdirectiveInject(MultipageComponentStateService)); };
18325
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteLinkedCasesFieldComponent, selectors: [["ccd-write-linked-cases-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 7, vars: 7, consts: [["journeyChild", ""], [1, "form-group", "govuk-!-margin-bottom-2", 3, "formGroup"], [1, "govuk-form-group", 3, "ngSwitch"], [4, "ngSwitchCase"], [3, "linkedCasesStateEmitter"]], template: function WriteLinkedCasesFieldComponent_Template(rf, ctx) { if (rf & 1) {
18326
+ i0.ɵɵelementStart(0, "div", 1)(1, "div", 2);
18327
+ i0.ɵɵtemplate(2, WriteLinkedCasesFieldComponent_ng_container_2_Template, 3, 0, "ng-container", 3)(3, WriteLinkedCasesFieldComponent_ng_container_3_Template, 3, 0, "ng-container", 3)(4, WriteLinkedCasesFieldComponent_ng_container_4_Template, 3, 0, "ng-container", 3)(5, WriteLinkedCasesFieldComponent_ng_container_5_Template, 3, 0, "ng-container", 3)(6, WriteLinkedCasesFieldComponent_ng_container_6_Template, 3, 0, "ng-container", 3);
17929
18328
  i0.ɵɵelementEnd()();
17930
18329
  } if (rf & 2) {
17931
18330
  i0.ɵɵproperty("formGroup", ctx.formGroup);
@@ -17945,9 +18344,9 @@ class WriteLinkedCasesFieldComponent extends AbstractFieldWriteComponent {
17945
18344
  }
17946
18345
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteLinkedCasesFieldComponent, [{
17947
18346
  type: Component,
17948
- args: [{ selector: 'ccd-write-linked-cases-field', template: "<div class=\"form-group govuk-!-margin-bottom-2\" [formGroup]=\"formGroup\">\n <div class=\"govuk-form-group\" [ngSwitch]=\"linkedCasesPage\">\n <ng-container *ngSwitchCase=\"linkedCasesPages.BEFORE_YOU_START\">\n <ccd-linked-cases-before-you-start\n (linkedCasesStateEmitter)=\"onLinkedCasesStateEmitted($event)\"></ccd-linked-cases-before-you-start>\n </ng-container>\n <ng-container *ngSwitchCase=\"linkedCasesPages.NO_LINKED_CASES\">\n <ccd-no-linked-cases\n (linkedCasesStateEmitter)=\"onLinkedCasesStateEmitted($event)\"></ccd-no-linked-cases>\n </ng-container>\n <ng-container *ngSwitchCase=\"linkedCasesPages.LINK_CASE\">\n <ccd-link-cases\n (linkedCasesStateEmitter)=\"onLinkedCasesStateEmitted($event)\"></ccd-link-cases>\n </ng-container>\n <ng-container *ngSwitchCase=\"linkedCasesPages.UNLINK_CASE\">\n <ccd-unlink-cases\n (linkedCasesStateEmitter)=\"onLinkedCasesStateEmitted($event)\"></ccd-unlink-cases>\n </ng-container>\n <ng-container *ngSwitchCase=\"linkedCasesPages.CHECK_YOUR_ANSWERS\">\n <ccd-linked-cases-check-your-answers\n (linkedCasesStateEmitter)=\"onLinkedCasesStateEmitted($event)\"></ccd-linked-cases-check-your-answers>\n </ng-container>\n </div>\n</div>\n" }]
17949
- }], () => [{ type: AbstractAppConfig }, { type: CommonDataService }, { type: CasesService }, { type: LinkedCasesService }, { type: CaseEditDataService }], null); })();
17950
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(WriteLinkedCasesFieldComponent, { className: "WriteLinkedCasesFieldComponent", filePath: "lib/shared/components/palette/linked-cases/write-linked-cases-field.component.ts", lineNumber: 19 }); })();
18347
+ args: [{ selector: 'ccd-write-linked-cases-field', template: "<div class=\"form-group govuk-!-margin-bottom-2\" [formGroup]=\"formGroup\">\n <div class=\"govuk-form-group\" [ngSwitch]=\"linkedCasesPage\">\n <ng-container *ngSwitchCase=\"linkedCasesPages.BEFORE_YOU_START\">\n <ccd-linked-cases-before-you-start\n #journeyChild \n (linkedCasesStateEmitter)=\"onLinkedCasesStateEmitted($event)\">\n </ccd-linked-cases-before-you-start>\n </ng-container>\n <ng-container *ngSwitchCase=\"linkedCasesPages.NO_LINKED_CASES\">\n <ccd-no-linked-cases\n #journeyChild \n (linkedCasesStateEmitter)=\"onLinkedCasesStateEmitted($event)\">\n </ccd-no-linked-cases>\n </ng-container>\n <ng-container *ngSwitchCase=\"linkedCasesPages.LINK_CASE\">\n <ccd-link-cases\n #journeyChild \n (linkedCasesStateEmitter)=\"onLinkedCasesStateEmitted($event)\">\n </ccd-link-cases>\n </ng-container>\n <ng-container *ngSwitchCase=\"linkedCasesPages.UNLINK_CASE\">\n <ccd-unlink-cases\n #journeyChild \n (linkedCasesStateEmitter)=\"onLinkedCasesStateEmitted($event)\">\n </ccd-unlink-cases>\n </ng-container>\n <ng-container *ngSwitchCase=\"linkedCasesPages.CHECK_YOUR_ANSWERS\">\n <ccd-linked-cases-check-your-answers\n #journeyChild \n (linkedCasesStateEmitter)=\"onLinkedCasesStateEmitted($event)\">\n </ccd-linked-cases-check-your-answers>\n </ng-container>\n </div>\n</div>\n" }]
18348
+ }], () => [{ type: AbstractAppConfig }, { type: CommonDataService }, { type: CasesService }, { type: LinkedCasesService }, { type: CaseEditDataService }, { type: MultipageComponentStateService }], null); })();
18349
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(WriteLinkedCasesFieldComponent, { className: "WriteLinkedCasesFieldComponent", filePath: "lib/shared/components/palette/linked-cases/write-linked-cases-field.component.ts", lineNumber: 20 }); })();
17951
18350
 
17952
18351
  function ReadMoneyGbpFieldComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
17953
18352
  i0.ɵɵelementContainerStart(0);
@@ -22709,10 +23108,10 @@ function AddCommentsComponent_span_7_Template(rf, ctx) { if (rf & 1) {
22709
23108
  i0.ɵɵtextInterpolate1(" (", i0.ɵɵpipeBind1(2, 1, "optional"), ")");
22710
23109
  } }
22711
23110
  function AddCommentsComponent_div_11_Template(rf, ctx) { if (rf & 1) {
22712
- i0.ɵɵelementStart(0, "div", 14)(1, "span", 15);
23111
+ i0.ɵɵelementStart(0, "div", 12)(1, "span", 13);
22713
23112
  i0.ɵɵtext(2, "!");
22714
23113
  i0.ɵɵelementEnd();
22715
- i0.ɵɵelementStart(3, "strong", 16)(4, "span", 17);
23114
+ i0.ɵɵelementStart(3, "strong", 14)(4, "span", 15);
22716
23115
  i0.ɵɵtext(5);
22717
23116
  i0.ɵɵpipe(6, "rpxTranslate");
22718
23117
  i0.ɵɵelementEnd();
@@ -22727,7 +23126,7 @@ function AddCommentsComponent_div_11_Template(rf, ctx) { if (rf & 1) {
22727
23126
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(8, 4, ctx_r0.addCommentsStepEnum.WARNING_TEXT), " ");
22728
23127
  } }
22729
23128
  function AddCommentsComponent_div_12_Template(rf, ctx) { if (rf & 1) {
22730
- i0.ɵɵelementStart(0, "div", 18)(1, "span", 19);
23129
+ i0.ɵɵelementStart(0, "div", 16)(1, "span", 17);
22731
23130
  i0.ɵɵtext(2);
22732
23131
  i0.ɵɵpipe(3, "rpxTranslate");
22733
23132
  i0.ɵɵelementEnd();
@@ -22742,7 +23141,7 @@ function AddCommentsComponent_div_12_Template(rf, ctx) { if (rf & 1) {
22742
23141
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 4, ctx_r0.flagCommentsNotEnteredErrorMessage), " ");
22743
23142
  } }
22744
23143
  function AddCommentsComponent_div_13_Template(rf, ctx) { if (rf & 1) {
22745
- i0.ɵɵelementStart(0, "div", 20)(1, "span", 19);
23144
+ i0.ɵɵelementStart(0, "div", 18)(1, "span", 17);
22746
23145
  i0.ɵɵtext(2);
22747
23146
  i0.ɵɵpipe(3, "rpxTranslate");
22748
23147
  i0.ɵɵelementEnd();
@@ -22756,7 +23155,7 @@ function AddCommentsComponent_div_13_Template(rf, ctx) { if (rf & 1) {
22756
23155
  i0.ɵɵadvance(2);
22757
23156
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 4, ctx_r0.flagCommentsCharLimitErrorMessage), " ");
22758
23157
  } }
22759
- class AddCommentsComponent {
23158
+ class AddCommentsComponent extends AbstractJourneyComponent {
22760
23159
  formGroup;
22761
23160
  optional = false;
22762
23161
  isDisplayContextParameterExternal = false;
@@ -22815,8 +23214,14 @@ class AddCommentsComponent {
22815
23214
  });
22816
23215
  }
22817
23216
  }
22818
- static ɵfac = function AddCommentsComponent_Factory(t) { return new (t || AddCommentsComponent)(); };
22819
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AddCommentsComponent, selectors: [["ccd-add-comments"]], inputs: { formGroup: "formGroup", optional: "optional", isDisplayContextParameterExternal: "isDisplayContextParameterExternal", isDisplayContextParameter2Point1Enabled: "isDisplayContextParameter2Point1Enabled" }, outputs: { caseFlagStateEmitter: "caseFlagStateEmitter" }, decls: 22, vars: 24, 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"], [1, "govuk-label", "govuk-label--m", 3, "for"], [4, "ngIf"], ["id", "add-comments-hint", 1, "govuk-hint"], ["class", "govuk-warning-text", 4, "ngIf"], ["id", "flag-comments-not-entered-error-message", "class", "govuk-error-message", 4, "ngIf"], ["id", "add-comments-char-limit-error", "class", "govuk-error-message", 4, "ngIf"], ["rows", "5", "aria-describedby", "add-comments-hint add-comments-char-limit-info add-comments-char-limit-error", 1, "govuk-textarea", 3, "id", "name", "formControlName"], ["id", "add-comments-char-limit-info", "aria-live", "polite", 1, "govuk-hint", "govuk-character-count__message"], [1, "govuk-button-group"], ["type", "button", 1, "button", "button-primary", 3, "click"], [1, "govuk-warning-text"], ["aria-hidden", "true", 1, "govuk-warning-text__icon"], [1, "govuk-warning-text__text"], [1, "govuk-warning-text__assistive"], ["id", "flag-comments-not-entered-error-message", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], ["id", "add-comments-char-limit-error", 1, "govuk-error-message"]], template: function AddCommentsComponent_Template(rf, ctx) { if (rf & 1) {
23217
+ next() {
23218
+ this.onNext();
23219
+ if (this.errorMessages.length === 0) {
23220
+ super.next();
23221
+ }
23222
+ }
23223
+ static ɵfac = /*@__PURE__*/ (() => { let ɵAddCommentsComponent_BaseFactory; return function AddCommentsComponent_Factory(t) { return (ɵAddCommentsComponent_BaseFactory || (ɵAddCommentsComponent_BaseFactory = i0.ɵɵgetInheritedFactory(AddCommentsComponent)))(t || AddCommentsComponent); }; })();
23224
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AddCommentsComponent, selectors: [["ccd-add-comments"]], inputs: { formGroup: "formGroup", optional: "optional", isDisplayContextParameterExternal: "isDisplayContextParameterExternal", isDisplayContextParameter2Point1Enabled: "isDisplayContextParameter2Point1Enabled" }, outputs: { caseFlagStateEmitter: "caseFlagStateEmitter" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 18, vars: 21, 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"], [1, "govuk-label", "govuk-label--m", 3, "for"], [4, "ngIf"], ["id", "add-comments-hint", 1, "govuk-hint"], ["class", "govuk-warning-text", 4, "ngIf"], ["id", "flag-comments-not-entered-error-message", "class", "govuk-error-message", 4, "ngIf"], ["id", "add-comments-char-limit-error", "class", "govuk-error-message", 4, "ngIf"], ["rows", "5", "aria-describedby", "add-comments-hint add-comments-char-limit-info add-comments-char-limit-error", 1, "govuk-textarea", 3, "id", "name", "formControlName"], ["id", "add-comments-char-limit-info", "aria-live", "polite", 1, "govuk-hint", "govuk-character-count__message"], [1, "govuk-warning-text"], ["aria-hidden", "true", 1, "govuk-warning-text__icon"], [1, "govuk-warning-text__text"], [1, "govuk-warning-text__assistive"], ["id", "flag-comments-not-entered-error-message", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], ["id", "add-comments-char-limit-error", 1, "govuk-error-message"]], template: function AddCommentsComponent_Template(rf, ctx) { if (rf & 1) {
22820
23225
  i0.ɵɵelementContainerStart(0, 0);
22821
23226
  i0.ɵɵelementStart(1, "div", 1)(2, "div", 2)(3, "h1", 3)(4, "label", 4);
22822
23227
  i0.ɵɵtext(5);
@@ -22834,23 +23239,18 @@ class AddCommentsComponent {
22834
23239
  i0.ɵɵpipe(17, "rpxTranslate");
22835
23240
  i0.ɵɵelementEnd()()();
22836
23241
  i0.ɵɵelementContainerEnd();
22837
- i0.ɵɵelementStart(18, "div", 12)(19, "button", 13);
22838
- i0.ɵɵlistener("click", function AddCommentsComponent_Template_button_click_19_listener() { return ctx.onNext(); });
22839
- i0.ɵɵtext(20);
22840
- i0.ɵɵpipe(21, "rpxTranslate");
22841
- i0.ɵɵelementEnd()();
22842
23242
  } if (rf & 2) {
22843
23243
  i0.ɵɵproperty("formGroup", ctx.formGroup);
22844
23244
  i0.ɵɵadvance(2);
22845
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(22, _c0$s, ctx.errorMessages.length > 0));
23245
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(19, _c0$s, ctx.errorMessages.length > 0));
22846
23246
  i0.ɵɵadvance(2);
22847
23247
  i0.ɵɵproperty("for", ctx.flagCommentsControlName);
22848
23248
  i0.ɵɵadvance();
22849
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 14, ctx.addCommentsTitle), "");
23249
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 13, ctx.addCommentsTitle), "");
22850
23250
  i0.ɵɵadvance(2);
22851
23251
  i0.ɵɵproperty("ngIf", ctx.optional);
22852
23252
  i0.ɵɵadvance(2);
22853
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(10, 16, ctx.addCommentsHint), " ");
23253
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(10, 15, ctx.addCommentsHint), " ");
22854
23254
  i0.ɵɵadvance(2);
22855
23255
  i0.ɵɵproperty("ngIf", !ctx.isDisplayContextParameterExternal && ctx.isDisplayContextParameter2Point1Enabled && !ctx.otherInternalFlagTypeSelected);
22856
23256
  i0.ɵɵadvance();
@@ -22860,14 +23260,12 @@ class AddCommentsComponent {
22860
23260
  i0.ɵɵadvance();
22861
23261
  i0.ɵɵproperty("id", ctx.flagCommentsControlName)("name", ctx.flagCommentsControlName)("formControlName", ctx.flagCommentsControlName);
22862
23262
  i0.ɵɵadvance(2);
22863
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(17, 18, ctx.addCommentsStepEnum.CHARACTER_LIMIT_INFO), " ");
22864
- i0.ɵɵadvance(4);
22865
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(21, 20, "Next"));
23263
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(17, 17, ctx.addCommentsStepEnum.CHARACTER_LIMIT_INFO), " ");
22866
23264
  } }, dependencies: [i5.NgClass, i5.NgIf, i4.DefaultValueAccessor, i4.NgControlStatus, i4.NgControlStatusGroup, i4.FormGroupDirective, i4.FormControlName, i1.RpxTranslatePipe], encapsulation: 2 });
22867
23265
  }
22868
23266
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AddCommentsComponent, [{
22869
23267
  type: Component,
22870
- args: [{ selector: 'ccd-add-comments', 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\"><label class=\"govuk-label govuk-label--m\" [for]=\"flagCommentsControlName\">\n {{addCommentsTitle | rpxTranslate}}<span *ngIf=\"optional\"> ({{'optional' | rpxTranslate}})</span>\n </label>\n </h1>\n <div id=\"add-comments-hint\" class=\"govuk-hint\">\n {{addCommentsHint | rpxTranslate}}\n </div>\n <div class=\"govuk-warning-text\"\n *ngIf=\"!isDisplayContextParameterExternal && isDisplayContextParameter2Point1Enabled && !otherInternalFlagTypeSelected\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-warning-text__assistive\">{{'Warning' | rpxTranslate}}</span>\n {{addCommentsStepEnum.WARNING_TEXT | rpxTranslate}}\n </strong>\n </div>\n <div id=\"flag-comments-not-entered-error-message\" class=\"govuk-error-message\"\n *ngIf=\"flagCommentsNotEnteredErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{flagCommentsNotEnteredErrorMessage | rpxTranslate}}\n </div>\n <div id=\"add-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 class=\"govuk-textarea\" [id]=\"flagCommentsControlName\"\n [name]=\"flagCommentsControlName\" [formControlName]=\"flagCommentsControlName\" rows=\"5\"\n aria-describedby=\"add-comments-hint add-comments-char-limit-info add-comments-char-limit-error\"></textarea>\n <div id=\"add-comments-char-limit-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n {{addCommentsStepEnum.CHARACTER_LIMIT_INFO | rpxTranslate}}\n </div>\n </div>\n </div>\n</ng-container>\n\n<div class=\"govuk-button-group\">\n <button class=\"button button-primary\" type=\"button\" (click)=\"onNext()\">{{'Next' | rpxTranslate}}</button>\n</div>\n" }]
23268
+ args: [{ selector: 'ccd-add-comments', 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\"><label class=\"govuk-label govuk-label--m\" [for]=\"flagCommentsControlName\">\n {{addCommentsTitle | rpxTranslate}}<span *ngIf=\"optional\"> ({{'optional' | rpxTranslate}})</span>\n </label>\n </h1>\n <div id=\"add-comments-hint\" class=\"govuk-hint\">\n {{addCommentsHint | rpxTranslate}}\n </div>\n <div class=\"govuk-warning-text\"\n *ngIf=\"!isDisplayContextParameterExternal && isDisplayContextParameter2Point1Enabled && !otherInternalFlagTypeSelected\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-warning-text__assistive\">{{'Warning' | rpxTranslate}}</span>\n {{addCommentsStepEnum.WARNING_TEXT | rpxTranslate}}\n </strong>\n </div>\n <div id=\"flag-comments-not-entered-error-message\" class=\"govuk-error-message\"\n *ngIf=\"flagCommentsNotEnteredErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{flagCommentsNotEnteredErrorMessage | rpxTranslate}}\n </div>\n <div id=\"add-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 class=\"govuk-textarea\" [id]=\"flagCommentsControlName\"\n [name]=\"flagCommentsControlName\" [formControlName]=\"flagCommentsControlName\" rows=\"5\"\n aria-describedby=\"add-comments-hint add-comments-char-limit-info add-comments-char-limit-error\"></textarea>\n <div id=\"add-comments-char-limit-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n {{addCommentsStepEnum.CHARACTER_LIMIT_INFO | rpxTranslate}}\n </div>\n </div>\n </div>\n</ng-container>" }]
22871
23269
  }], null, { formGroup: [{
22872
23270
  type: Input
22873
23271
  }], optional: [{
@@ -22879,7 +23277,7 @@ class AddCommentsComponent {
22879
23277
  }], caseFlagStateEmitter: [{
22880
23278
  type: Output
22881
23279
  }] }); })();
22882
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(AddCommentsComponent, { className: "AddCommentsComponent", filePath: "lib/shared/components/palette/case-flag/components/add-comments/add-comments.component.ts", lineNumber: 11 }); })();
23280
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(AddCommentsComponent, { className: "AddCommentsComponent", filePath: "lib/shared/components/palette/case-flag/components/add-comments/add-comments.component.ts", lineNumber: 12 }); })();
22883
23281
 
22884
23282
  function CaseFlagSummaryListComponent_dl_0_div_28_Template(rf, ctx) { if (rf & 1) {
22885
23283
  const _r3 = i0.ɵɵgetCurrentView();
@@ -23381,7 +23779,7 @@ class CaseFlagTableComponent {
23381
23779
 
23382
23780
  const _c0$r = a0 => ({ "form-group-error": a0 });
23383
23781
  function ManageCaseFlagsComponent_div_7_Template(rf, ctx) { if (rf & 1) {
23384
- i0.ɵɵelementStart(0, "div", 9)(1, "span", 10);
23782
+ i0.ɵɵelementStart(0, "div", 8)(1, "span", 9);
23385
23783
  i0.ɵɵtext(2);
23386
23784
  i0.ɵɵpipe(3, "rpxTranslate");
23387
23785
  i0.ɵɵelementEnd();
@@ -23396,8 +23794,8 @@ function ManageCaseFlagsComponent_div_7_Template(rf, ctx) { if (rf & 1) {
23396
23794
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 4, ctx_r0.manageCaseFlagSelectedErrorMessage), " ");
23397
23795
  } }
23398
23796
  function ManageCaseFlagsComponent_div_9_Template(rf, ctx) { if (rf & 1) {
23399
- i0.ɵɵelementStart(0, "div", 11);
23400
- i0.ɵɵelement(1, "input", 12)(2, "label", 13);
23797
+ i0.ɵɵelementStart(0, "div", 10);
23798
+ i0.ɵɵelement(1, "input", 11)(2, "label", 12);
23401
23799
  i0.ɵɵpipe(3, "manageCaseFlagsLabelDisplay");
23402
23800
  i0.ɵɵelementEnd();
23403
23801
  } if (rf & 2) {
@@ -23411,18 +23809,7 @@ function ManageCaseFlagsComponent_div_9_Template(rf, ctx) { if (rf & 1) {
23411
23809
  i0.ɵɵpropertyInterpolate1("for", "flag-selection-", i_r3, "");
23412
23810
  i0.ɵɵproperty("innerHtml", i0.ɵɵpipeBind1(3, 8, flagDisplay_r2), i0.ɵɵsanitizeHtml);
23413
23811
  } }
23414
- function ManageCaseFlagsComponent_div_10_Template(rf, ctx) { if (rf & 1) {
23415
- const _r4 = i0.ɵɵgetCurrentView();
23416
- i0.ɵɵelementStart(0, "div", 14)(1, "button", 15);
23417
- i0.ɵɵlistener("click", function ManageCaseFlagsComponent_div_10_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r4); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onNext()); });
23418
- i0.ɵɵtext(2);
23419
- i0.ɵɵpipe(3, "rpxTranslate");
23420
- i0.ɵɵelementEnd()();
23421
- } if (rf & 2) {
23422
- i0.ɵɵadvance(2);
23423
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 1, "Next"));
23424
- } }
23425
- class ManageCaseFlagsComponent {
23812
+ class ManageCaseFlagsComponent extends AbstractJourneyComponent {
23426
23813
  formGroup;
23427
23814
  flagsData;
23428
23815
  caseTitle;
@@ -23556,8 +23943,14 @@ class ManageCaseFlagsComponent {
23556
23943
  errorMessages: this.errorMessages
23557
23944
  });
23558
23945
  }
23559
- static ɵfac = function ManageCaseFlagsComponent_Factory(t) { return new (t || ManageCaseFlagsComponent)(); };
23560
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ManageCaseFlagsComponent, selectors: [["ccd-manage-case-flags"]], inputs: { formGroup: "formGroup", flagsData: "flagsData", caseTitle: "caseTitle", displayContextParameter: "displayContextParameter" }, outputs: { caseFlagStateEmitter: "caseFlagStateEmitter" }, decls: 11, vars: 10, consts: [[3, "formGroup"], [1, "govuk-form-group", 3, "ngClass"], ["aria-describedby", "manage-case-flag-heading", 1, "govuk-fieldset"], [1, "govuk-fieldset__legend", "govuk-fieldset__legend--m"], ["id", "manage-case-flag-heading", 1, "govuk-fieldset__heading"], ["id", "manage-case-flag-not-selected-error-message", "class", "govuk-error-message", 4, "ngIf"], ["data-module", "govuk-radios", "id", "conditional-radios-list", 1, "govuk-radios", "govuk-radios--conditional"], ["class", "govuk-radios__item", 4, "ngFor", "ngForOf"], ["class", "govuk-button-group", 4, "ngIf"], ["id", "manage-case-flag-not-selected-error-message", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], [1, "govuk-radios__item"], ["type", "radio", 1, "govuk-radios__input", 3, "id", "name", "value", "formControlName"], [1, "govuk-label", "govuk-radios__label", 3, "for", "innerHtml"], [1, "govuk-button-group"], ["type", "button", 1, "button", "button-primary", 3, "click"]], template: function ManageCaseFlagsComponent_Template(rf, ctx) { if (rf & 1) {
23946
+ next() {
23947
+ this.onNext();
23948
+ if (this.errorMessages.length === 0) {
23949
+ super.next();
23950
+ }
23951
+ }
23952
+ static ɵfac = /*@__PURE__*/ (() => { let ɵManageCaseFlagsComponent_BaseFactory; return function ManageCaseFlagsComponent_Factory(t) { return (ɵManageCaseFlagsComponent_BaseFactory || (ɵManageCaseFlagsComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ManageCaseFlagsComponent)))(t || ManageCaseFlagsComponent); }; })();
23953
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ManageCaseFlagsComponent, selectors: [["ccd-manage-case-flags"]], inputs: { formGroup: "formGroup", flagsData: "flagsData", caseTitle: "caseTitle", displayContextParameter: "displayContextParameter" }, outputs: { caseFlagStateEmitter: "caseFlagStateEmitter" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 10, vars: 9, consts: [[3, "formGroup"], [1, "govuk-form-group", 3, "ngClass"], ["aria-describedby", "manage-case-flag-heading", 1, "govuk-fieldset"], [1, "govuk-fieldset__legend", "govuk-fieldset__legend--m"], ["id", "manage-case-flag-heading", 1, "govuk-fieldset__heading"], ["id", "manage-case-flag-not-selected-error-message", "class", "govuk-error-message", 4, "ngIf"], ["data-module", "govuk-radios", "id", "conditional-radios-list", 1, "govuk-radios", "govuk-radios--conditional"], ["class", "govuk-radios__item", 4, "ngFor", "ngForOf"], ["id", "manage-case-flag-not-selected-error-message", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], [1, "govuk-radios__item"], ["type", "radio", 1, "govuk-radios__input", 3, "id", "name", "value", "formControlName"], [1, "govuk-label", "govuk-radios__label", 3, "for", "innerHtml"]], template: function ManageCaseFlagsComponent_Template(rf, ctx) { if (rf & 1) {
23561
23954
  i0.ɵɵelementContainerStart(0, 0);
23562
23955
  i0.ɵɵelementStart(1, "div", 1)(2, "fieldset", 2)(3, "legend", 3)(4, "h1", 4);
23563
23956
  i0.ɵɵtext(5);
@@ -23568,24 +23961,21 @@ class ManageCaseFlagsComponent {
23568
23961
  i0.ɵɵtemplate(9, ManageCaseFlagsComponent_div_9_Template, 4, 10, "div", 7);
23569
23962
  i0.ɵɵelementEnd()()();
23570
23963
  i0.ɵɵelementContainerEnd();
23571
- i0.ɵɵtemplate(10, ManageCaseFlagsComponent_div_10_Template, 4, 3, "div", 8);
23572
23964
  } if (rf & 2) {
23573
23965
  i0.ɵɵproperty("formGroup", ctx.formGroup);
23574
23966
  i0.ɵɵadvance();
23575
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$r, ctx.errorMessages.length > 0));
23967
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$r, ctx.errorMessages.length > 0));
23576
23968
  i0.ɵɵadvance(4);
23577
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 6, ctx.manageCaseFlagTitle), " ");
23969
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 5, ctx.manageCaseFlagTitle), " ");
23578
23970
  i0.ɵɵadvance(2);
23579
23971
  i0.ɵɵproperty("ngIf", ctx.manageCaseFlagSelectedErrorMessage);
23580
23972
  i0.ɵɵadvance(2);
23581
23973
  i0.ɵɵproperty("ngForOf", ctx.flagsDisplayData);
23582
- i0.ɵɵadvance();
23583
- i0.ɵɵproperty("ngIf", !ctx.noFlagsError);
23584
23974
  } }, styles: [".flag-name-and-description{font-weight:700}\n"], encapsulation: 2 });
23585
23975
  }
23586
23976
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ManageCaseFlagsComponent, [{
23587
23977
  type: Component,
23588
- args: [{ selector: 'ccd-manage-case-flags', encapsulation: ViewEncapsulation.None, template: "<ng-container [formGroup]=\"formGroup\">\n <div class=\"govuk-form-group\" [ngClass]=\"{'form-group-error': errorMessages.length > 0}\">\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"manage-case-flag-heading\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--m\">\n <h1 id=\"manage-case-flag-heading\" class=\"govuk-fieldset__heading\">\n {{manageCaseFlagTitle | rpxTranslate}}\n </h1>\n </legend>\n <div id=\"manage-case-flag-not-selected-error-message\" class=\"govuk-error-message\"\n *ngIf=\"manageCaseFlagSelectedErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{manageCaseFlagSelectedErrorMessage | rpxTranslate}}\n </div>\n <div class=\"govuk-radios govuk-radios--conditional\" data-module=\"govuk-radios\" id=\"conditional-radios-list\">\n <div class=\"govuk-radios__item\" *ngFor=\"let flagDisplay of flagsDisplayData; index as i\">\n <input class=\"govuk-radios__input\" id=\"flag-selection-{{i}}\" [name]=\"selectedControlName\"\n type=\"radio\" [value]=\"flagDisplay\" [formControlName]=\"selectedControlName\"/>\n <label class=\"govuk-label govuk-radios__label\" for=\"flag-selection-{{i}}\" [innerHtml]=\"flagDisplay | manageCaseFlagsLabelDisplay\"></label>\n </div>\n </div>\n </fieldset>\n </div>\n</ng-container>\n\n<div class=\"govuk-button-group\" *ngIf=\"!noFlagsError\">\n <button class=\"button button-primary\" type=\"button\" (click)=\"onNext()\">{{'Next' | rpxTranslate}}</button>\n</div>\n", styles: [".flag-name-and-description{font-weight:700}\n"] }]
23978
+ args: [{ selector: 'ccd-manage-case-flags', encapsulation: ViewEncapsulation.None, template: "<ng-container [formGroup]=\"formGroup\">\n <div class=\"govuk-form-group\" [ngClass]=\"{'form-group-error': errorMessages.length > 0}\">\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"manage-case-flag-heading\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--m\">\n <h1 id=\"manage-case-flag-heading\" class=\"govuk-fieldset__heading\">\n {{manageCaseFlagTitle | rpxTranslate}}\n </h1>\n </legend>\n <div id=\"manage-case-flag-not-selected-error-message\" class=\"govuk-error-message\"\n *ngIf=\"manageCaseFlagSelectedErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{manageCaseFlagSelectedErrorMessage | rpxTranslate}}\n </div>\n <div class=\"govuk-radios govuk-radios--conditional\" data-module=\"govuk-radios\" id=\"conditional-radios-list\">\n <div class=\"govuk-radios__item\" *ngFor=\"let flagDisplay of flagsDisplayData; index as i\">\n <input class=\"govuk-radios__input\" id=\"flag-selection-{{i}}\" [name]=\"selectedControlName\"\n type=\"radio\" [value]=\"flagDisplay\" [formControlName]=\"selectedControlName\"/>\n <label class=\"govuk-label govuk-radios__label\" for=\"flag-selection-{{i}}\" [innerHtml]=\"flagDisplay | manageCaseFlagsLabelDisplay\"></label>\n </div>\n </div>\n </fieldset>\n </div>\n</ng-container>", styles: [".flag-name-and-description{font-weight:700}\n"] }]
23589
23979
  }], null, { formGroup: [{
23590
23980
  type: Input
23591
23981
  }], flagsData: [{
@@ -23597,7 +23987,7 @@ class ManageCaseFlagsComponent {
23597
23987
  }], caseFlagStateEmitter: [{
23598
23988
  type: Output
23599
23989
  }] }); })();
23600
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ManageCaseFlagsComponent, { className: "ManageCaseFlagsComponent", filePath: "lib/shared/components/palette/case-flag/components/manage-case-flags/manage-case-flags.component.ts", lineNumber: 14 }); })();
23990
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ManageCaseFlagsComponent, { className: "ManageCaseFlagsComponent", filePath: "lib/shared/components/palette/case-flag/components/manage-case-flags/manage-case-flags.component.ts", lineNumber: 15 }); })();
23601
23991
 
23602
23992
  // tslint:disable:variable-name
23603
23993
  /**
@@ -23662,7 +24052,7 @@ var SearchLanguageInterpreterControlNames;
23662
24052
 
23663
24053
  const _c0$q = a0 => ({ "form-group-error": a0 });
23664
24054
  function SearchLanguageInterpreterComponent_div_10_Template(rf, ctx) { if (rf & 1) {
23665
- i0.ɵɵelementStart(0, "div", 20)(1, "span", 21);
24055
+ i0.ɵɵelementStart(0, "div", 18)(1, "span", 19);
23666
24056
  i0.ɵɵtext(2);
23667
24057
  i0.ɵɵpipe(3, "rpxTranslate");
23668
24058
  i0.ɵɵelementEnd();
@@ -23677,7 +24067,7 @@ function SearchLanguageInterpreterComponent_div_10_Template(rf, ctx) { if (rf &
23677
24067
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 4, ctx_r1.languageNotSelectedErrorMessage), " ");
23678
24068
  } }
23679
24069
  function SearchLanguageInterpreterComponent_div_11_Template(rf, ctx) { if (rf & 1) {
23680
- i0.ɵɵelementStart(0, "div", 22)(1, "span", 21);
24070
+ i0.ɵɵelementStart(0, "div", 20)(1, "span", 19);
23681
24071
  i0.ɵɵtext(2);
23682
24072
  i0.ɵɵpipe(3, "rpxTranslate");
23683
24073
  i0.ɵɵelementEnd();
@@ -23692,7 +24082,7 @@ function SearchLanguageInterpreterComponent_div_11_Template(rf, ctx) { if (rf &
23692
24082
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 4, ctx_r1.languageEnteredInBothFieldsErrorMessage), " ");
23693
24083
  } }
23694
24084
  function SearchLanguageInterpreterComponent_mat_option_15_Template(rf, ctx) { if (rf & 1) {
23695
- i0.ɵɵelementStart(0, "mat-option", 23);
24085
+ i0.ɵɵelementStart(0, "mat-option", 21);
23696
24086
  i0.ɵɵtext(1);
23697
24087
  i0.ɵɵpipe(2, "languageInterpreterDisplay");
23698
24088
  i0.ɵɵelementEnd();
@@ -23703,7 +24093,7 @@ function SearchLanguageInterpreterComponent_mat_option_15_Template(rf, ctx) { if
23703
24093
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 2, language_r3), " ");
23704
24094
  } }
23705
24095
  function SearchLanguageInterpreterComponent_mat_option_17_Template(rf, ctx) { if (rf & 1) {
23706
- i0.ɵɵelementStart(0, "mat-option", 24);
24096
+ i0.ɵɵelementStart(0, "mat-option", 22);
23707
24097
  i0.ɵɵtext(1);
23708
24098
  i0.ɵɵpipe(2, "rpxTranslate");
23709
24099
  i0.ɵɵelementEnd();
@@ -23712,7 +24102,7 @@ function SearchLanguageInterpreterComponent_mat_option_17_Template(rf, ctx) { if
23712
24102
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "No results found"));
23713
24103
  } }
23714
24104
  function SearchLanguageInterpreterComponent_div_24_div_5_Template(rf, ctx) { if (rf & 1) {
23715
- i0.ɵɵelementStart(0, "div", 30)(1, "span", 21);
24105
+ i0.ɵɵelementStart(0, "div", 28)(1, "span", 19);
23716
24106
  i0.ɵɵtext(2);
23717
24107
  i0.ɵɵpipe(3, "rpxTranslate");
23718
24108
  i0.ɵɵelementEnd();
@@ -23727,7 +24117,7 @@ function SearchLanguageInterpreterComponent_div_24_div_5_Template(rf, ctx) { if
23727
24117
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 4, ctx_r1.languageNotEnteredErrorMessage), " ");
23728
24118
  } }
23729
24119
  function SearchLanguageInterpreterComponent_div_24_div_6_Template(rf, ctx) { if (rf & 1) {
23730
- i0.ɵɵelementStart(0, "div", 31)(1, "span", 21);
24120
+ i0.ɵɵelementStart(0, "div", 29)(1, "span", 19);
23731
24121
  i0.ɵɵtext(2);
23732
24122
  i0.ɵɵpipe(3, "rpxTranslate");
23733
24123
  i0.ɵɵelementEnd();
@@ -23742,12 +24132,12 @@ function SearchLanguageInterpreterComponent_div_24_div_6_Template(rf, ctx) { if
23742
24132
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 4, ctx_r1.languageCharLimitErrorMessage), " ");
23743
24133
  } }
23744
24134
  function SearchLanguageInterpreterComponent_div_24_Template(rf, ctx) { if (rf & 1) {
23745
- i0.ɵɵelementStart(0, "div", 25)(1, "div", 2)(2, "label", 26);
24135
+ i0.ɵɵelementStart(0, "div", 23)(1, "div", 2)(2, "label", 24);
23746
24136
  i0.ɵɵtext(3);
23747
24137
  i0.ɵɵpipe(4, "rpxTranslate");
23748
24138
  i0.ɵɵelementEnd();
23749
- i0.ɵɵtemplate(5, SearchLanguageInterpreterComponent_div_24_div_5_Template, 6, 6, "div", 27)(6, SearchLanguageInterpreterComponent_div_24_div_6_Template, 6, 6, "div", 28);
23750
- i0.ɵɵelement(7, "input", 29);
24139
+ i0.ɵɵtemplate(5, SearchLanguageInterpreterComponent_div_24_div_5_Template, 6, 6, "div", 25)(6, SearchLanguageInterpreterComponent_div_24_div_6_Template, 6, 6, "div", 26);
24140
+ i0.ɵɵelement(7, "input", 27);
23751
24141
  i0.ɵɵelementEnd()();
23752
24142
  } if (rf & 2) {
23753
24143
  const ctx_r1 = i0.ɵɵnextContext();
@@ -23762,7 +24152,7 @@ function SearchLanguageInterpreterComponent_div_24_Template(rf, ctx) { if (rf &
23762
24152
  i0.ɵɵadvance();
23763
24153
  i0.ɵɵproperty("name", ctx_r1.SearchLanguageInterpreterControlNames.MANUAL_LANGUAGE_ENTRY)("formControlName", ctx_r1.SearchLanguageInterpreterControlNames.MANUAL_LANGUAGE_ENTRY);
23764
24154
  } }
23765
- class SearchLanguageInterpreterComponent {
24155
+ class SearchLanguageInterpreterComponent extends AbstractJourneyComponent {
23766
24156
  rpxTranslationService;
23767
24157
  get searchLanguageInterpreterStep() {
23768
24158
  return SearchLanguageInterpreterStep;
@@ -23784,7 +24174,8 @@ class SearchLanguageInterpreterComponent {
23784
24174
  noResults = false;
23785
24175
  languageMaxCharLimit = 80;
23786
24176
  signLanguageFlagCode = 'RA0042';
23787
- constructor(rpxTranslationService) {
24177
+ constructor(rpxTranslationService, multipageComponentStateService) {
24178
+ super(multipageComponentStateService);
23788
24179
  this.rpxTranslationService = rpxTranslationService;
23789
24180
  }
23790
24181
  ngOnInit() {
@@ -23884,8 +24275,14 @@ class SearchLanguageInterpreterComponent {
23884
24275
  !language.value && language.value_cy.toLowerCase().includes(searchTerm.toLowerCase(), 0))
23885
24276
  : [];
23886
24277
  }
23887
- static ɵfac = function SearchLanguageInterpreterComponent_Factory(t) { return new (t || SearchLanguageInterpreterComponent)(i0.ɵɵdirectiveInject(i1.RpxTranslationService)); };
23888
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SearchLanguageInterpreterComponent, selectors: [["ccd-search-language-interpreter"]], inputs: { formGroup: "formGroup", flagType: "flagType" }, outputs: { caseFlagStateEmitter: "caseFlagStateEmitter" }, decls: 29, vars: 28, consts: [["autoSearchLanguage", "matAutocomplete"], [3, "formGroup"], [1, "govuk-form-group", 3, "ngClass"], [1, "govuk-label-wrapper"], [1, "govuk-label", "govuk-label--m", 3, "for"], ["id", "language-search-box-hint", 1, "govuk-hint"], [1, "auto-complete-container"], ["id", "language-not-selected-error-message", "class", "govuk-error-message", 4, "ngIf"], ["id", "language-entered-in-both-fields-error-message", "class", "govuk-error-message", 4, "ngIf"], ["aria-label", "Language search box", "matInput", "", "type", "text", 1, "govuk-input", "search-language__input", 3, "formControlName", "matAutocomplete"], ["autoActiveFirstOption", "", 1, "mat-autocomplete-panel-extend", 3, "displayWith"], [3, "value", 4, "ngFor", "ngForOf"], ["disabled", "", 4, "ngIf"], ["data-module", "govuk-checkboxes", 1, "govuk-checkboxes", "govuk-checkboxes--small", "govuk-checkboxes--conditional"], [1, "govuk-radios__item"], ["id", "enter-language-manually", "name", "enter-language-manually", "type", "checkbox", 1, "govuk-checkboxes__input", 3, "change"], ["for", "enter-language-manually", 1, "govuk-label", "govuk-checkboxes__label"], ["class", "govuk-radios__conditional", 4, "ngIf"], [1, "govuk-button-group"], ["type", "button", 1, "button", "button-primary", 3, "click"], ["id", "language-not-selected-error-message", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], ["id", "language-entered-in-both-fields-error-message", 1, "govuk-error-message"], [3, "value"], ["disabled", ""], [1, "govuk-radios__conditional"], ["for", "manual-language-entry", 1, "govuk-label"], ["id", "language-not-entered-error-message", "class", "govuk-error-message", 4, "ngIf"], ["id", "language-char-limit-error-message", "class", "govuk-error-message", 4, "ngIf"], ["id", "manual-language-entry", "type", "text", 1, "govuk-input", "govuk-input--width-20", 3, "name", "formControlName"], ["id", "language-not-entered-error-message", 1, "govuk-error-message"], ["id", "language-char-limit-error-message", 1, "govuk-error-message"]], template: function SearchLanguageInterpreterComponent_Template(rf, ctx) { if (rf & 1) {
24278
+ next() {
24279
+ this.onNext();
24280
+ if (this.errorMessages.length === 0) {
24281
+ super.next();
24282
+ }
24283
+ }
24284
+ static ɵfac = function SearchLanguageInterpreterComponent_Factory(t) { return new (t || SearchLanguageInterpreterComponent)(i0.ɵɵdirectiveInject(i1.RpxTranslationService), i0.ɵɵdirectiveInject(MultipageComponentStateService)); };
24285
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SearchLanguageInterpreterComponent, selectors: [["ccd-search-language-interpreter"]], inputs: { formGroup: "formGroup", flagType: "flagType" }, outputs: { caseFlagStateEmitter: "caseFlagStateEmitter" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 25, vars: 25, consts: [["autoSearchLanguage", "matAutocomplete"], [3, "formGroup"], [1, "govuk-form-group", 3, "ngClass"], [1, "govuk-label-wrapper"], [1, "govuk-label", "govuk-label--m", 3, "for"], ["id", "language-search-box-hint", 1, "govuk-hint"], [1, "auto-complete-container"], ["id", "language-not-selected-error-message", "class", "govuk-error-message", 4, "ngIf"], ["id", "language-entered-in-both-fields-error-message", "class", "govuk-error-message", 4, "ngIf"], ["aria-label", "Language search box", "matInput", "", "type", "text", 1, "govuk-input", "search-language__input", 3, "formControlName", "matAutocomplete"], ["autoActiveFirstOption", "", 1, "mat-autocomplete-panel-extend", 3, "displayWith"], [3, "value", 4, "ngFor", "ngForOf"], ["disabled", "", 4, "ngIf"], ["data-module", "govuk-checkboxes", 1, "govuk-checkboxes", "govuk-checkboxes--small", "govuk-checkboxes--conditional"], [1, "govuk-radios__item"], ["id", "enter-language-manually", "name", "enter-language-manually", "type", "checkbox", 1, "govuk-checkboxes__input", 3, "change"], ["for", "enter-language-manually", 1, "govuk-label", "govuk-checkboxes__label"], ["class", "govuk-radios__conditional", 4, "ngIf"], ["id", "language-not-selected-error-message", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], ["id", "language-entered-in-both-fields-error-message", 1, "govuk-error-message"], [3, "value"], ["disabled", ""], [1, "govuk-radios__conditional"], ["for", "manual-language-entry", 1, "govuk-label"], ["id", "language-not-entered-error-message", "class", "govuk-error-message", 4, "ngIf"], ["id", "language-char-limit-error-message", "class", "govuk-error-message", 4, "ngIf"], ["id", "manual-language-entry", "type", "text", 1, "govuk-input", "govuk-input--width-20", 3, "name", "formControlName"], ["id", "language-not-entered-error-message", 1, "govuk-error-message"], ["id", "language-char-limit-error-message", 1, "govuk-error-message"]], template: function SearchLanguageInterpreterComponent_Template(rf, ctx) { if (rf & 1) {
23889
24286
  const _r1 = i0.ɵɵgetCurrentView();
23890
24287
  i0.ɵɵelementContainerStart(0, 1);
23891
24288
  i0.ɵɵelementStart(1, "div", 2)(2, "h1", 3)(3, "label", 4);
@@ -23914,22 +24311,17 @@ class SearchLanguageInterpreterComponent {
23914
24311
  i0.ɵɵtemplate(24, SearchLanguageInterpreterComponent_div_24_Template, 8, 10, "div", 17);
23915
24312
  i0.ɵɵelementEnd()();
23916
24313
  i0.ɵɵelementContainerEnd();
23917
- i0.ɵɵelementStart(25, "div", 18)(26, "button", 19);
23918
- i0.ɵɵlistener("click", function SearchLanguageInterpreterComponent_Template_button_click_26_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onNext()); });
23919
- i0.ɵɵtext(27);
23920
- i0.ɵɵpipe(28, "rpxTranslate");
23921
- i0.ɵɵelementEnd()();
23922
24314
  } if (rf & 2) {
23923
24315
  const autoSearchLanguage_r4 = i0.ɵɵreference(14);
23924
24316
  i0.ɵɵproperty("formGroup", ctx.formGroup);
23925
24317
  i0.ɵɵadvance();
23926
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(26, _c0$q, ctx.languageNotSelectedErrorMessage || ctx.languageEnteredInBothFieldsErrorMessage));
24318
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(23, _c0$q, ctx.languageNotSelectedErrorMessage || ctx.languageEnteredInBothFieldsErrorMessage));
23927
24319
  i0.ɵɵadvance(2);
23928
24320
  i0.ɵɵproperty("for", ctx.SearchLanguageInterpreterControlNames.LANGUAGE_SEARCH_TERM);
23929
24321
  i0.ɵɵadvance();
23930
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(5, 15, ctx.flagType, "name"), " ");
24322
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(5, 14, ctx.flagType, "name"), " ");
23931
24323
  i0.ɵɵadvance(3);
23932
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(8, 18, ctx.searchLanguageInterpreterHint), " ");
24324
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(8, 17, ctx.searchLanguageInterpreterHint), " ");
23933
24325
  i0.ɵɵadvance(3);
23934
24326
  i0.ɵɵproperty("ngIf", ctx.languageNotSelectedErrorMessage);
23935
24327
  i0.ɵɵadvance();
@@ -23939,32 +24331,30 @@ class SearchLanguageInterpreterComponent {
23939
24331
  i0.ɵɵadvance();
23940
24332
  i0.ɵɵproperty("displayWith", ctx.displayLanguage);
23941
24333
  i0.ɵɵadvance(2);
23942
- i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBind1(16, 20, ctx.filteredLanguages$));
24334
+ i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBind1(16, 19, ctx.filteredLanguages$));
23943
24335
  i0.ɵɵadvance(2);
23944
24336
  i0.ɵɵproperty("ngIf", ctx.noResults && ctx.searchTerm && ctx.searchTerm.length >= ctx.minSearchCharacters);
23945
24337
  i0.ɵɵadvance(5);
23946
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(23, 22, ctx.searchLanguageInterpreterStep.CHECKBOX_LABEL), " ");
24338
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(23, 21, ctx.searchLanguageInterpreterStep.CHECKBOX_LABEL), " ");
23947
24339
  i0.ɵɵadvance(2);
23948
24340
  i0.ɵɵproperty("ngIf", ctx.isCheckboxEnabled);
23949
- i0.ɵɵadvance(3);
23950
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(28, 24, "Next"));
23951
24341
  } }, styles: [".autocomplete__input--show-all-values[_ngcontent-%COMP%]{padding:5px 34px 5px 5px;cursor:pointer}.autocomplete__dropdown-arrow-down[_ngcontent-%COMP%]{z-index:-1;display:inline-block;position:absolute;right:8px;width:24px;height:24px;top:10px}.autocomplete__menu[_ngcontent-%COMP%]{background-color:#fff;border:2px solid #0b0c0c;border-top:0;color:#0b0c0c;margin:0;max-height:342px;overflow-x:hidden;padding:0;width:100%;width:calc(100% - 4px)}.autocomplete__menu--visible[_ngcontent-%COMP%]{display:block}.autocomplete__menu--hidden[_ngcontent-%COMP%]{display:none}.autocomplete__menu--overlay[_ngcontent-%COMP%]{box-shadow:#00000042 0 2px 6px;left:0;position:absolute;top:100%;z-index:100}.autocomplete__menu--inline[_ngcontent-%COMP%]{position:relative}.autocomplete__option[_ngcontent-%COMP%]{border-bottom:solid #b1b4b6;border-width:1px 0;cursor:pointer;display:block;position:relative}.autocomplete__option[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{pointer-events:none}.autocomplete__option[_ngcontent-%COMP%]:first-of-type{border-top-width:0}.autocomplete__option[_ngcontent-%COMP%]:last-of-type{border-bottom-width:0}.autocomplete__option--odd[_ngcontent-%COMP%]{background-color:#fafafa}.autocomplete__option--focused[_ngcontent-%COMP%], .autocomplete__option[_ngcontent-%COMP%]:hover{background-color:#1d70b8;border-color:#1d70b8;color:#fff;outline:0}.autocomplete__option--no-results[_ngcontent-%COMP%]{background-color:#fafafa;color:#646b6f;cursor:not-allowed}.autocomplete__hint[_ngcontent-%COMP%], .autocomplete__input[_ngcontent-%COMP%], .autocomplete__option[_ngcontent-%COMP%]{font-size:13px;line-height:1.25}.autocomplete__hint[_ngcontent-%COMP%], .autocomplete__option[_ngcontent-%COMP%]{padding:5px}@media (min-width: 641px){.autocomplete__hint[_ngcontent-%COMP%], .autocomplete__input[_ngcontent-%COMP%], .autocomplete__option[_ngcontent-%COMP%]{font-size:13px;line-height:1.31579}}.div-action[_ngcontent-%COMP%]{display:inline-block}.add-location[_ngcontent-%COMP%]{display:inline}.remove-location-button[_ngcontent-%COMP%]{margin:5px}.hide-autocomplete[_ngcontent-%COMP%]{display:none}.auto-complete-container[_ngcontent-%COMP%]{min-width:550px;display:inline-block;margin-right:4px}.autocomplete__input[_ngcontent-%COMP%]{line-height:24px;font-size:19px}.hidden[_ngcontent-%COMP%]{display:none}.search-language__input[_ngcontent-%COMP%]{position:relative;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36' width='40' height='40'%3E%3Cpath d='M25.7 24.8L21.9 21c.7-1 1.1-2.2 1.1-3.5 0-3.6-2.9-6.5-6.5-6.5S10 13.9 10 17.5s2.9 6.5 6.5 6.5c1.6 0 3-.6 4.1-1.5l3.7 3.7 1.4-1.4zM12 17.5c0-2.5 2-4.5 4.5-4.5s4.5 2 4.5 4.5-2 4.5-4.5 4.5-4.5-2-4.5-4.5z' fill='%23505a5f'%3E%3C/path%3E%3C/svg%3E\");background-repeat:no-repeat;background-position:center left -2px;background-size:40px 40px;padding-left:35px}"] });
23952
24342
  }
23953
24343
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SearchLanguageInterpreterComponent, [{
23954
24344
  type: Component,
23955
- args: [{ selector: 'ccd-search-language-interpreter', template: "<ng-container [formGroup]=\"formGroup\">\n <div class=\"govuk-form-group\" [ngClass]=\"{'form-group-error': languageNotSelectedErrorMessage || languageEnteredInBothFieldsErrorMessage}\">\n <h1 class=\"govuk-label-wrapper\">\n <label class=\"govuk-label govuk-label--m\" [for]=\"SearchLanguageInterpreterControlNames.LANGUAGE_SEARCH_TERM\">\n {{flagType | flagFieldDisplay:'name'}}\n </label>\n </h1>\n <div id=\"language-search-box-hint\" class=\"govuk-hint\">\n {{searchLanguageInterpreterHint | rpxTranslate}}\n </div>\n <div class=\"auto-complete-container\">\n <div id=\"language-not-selected-error-message\" class=\"govuk-error-message\"\n *ngIf=\"languageNotSelectedErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{languageNotSelectedErrorMessage | rpxTranslate}}\n </div>\n <div id=\"language-entered-in-both-fields-error-message\" class=\"govuk-error-message\"\n *ngIf=\"languageEnteredInBothFieldsErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{languageEnteredInBothFieldsErrorMessage | rpxTranslate}}\n </div>\n <input aria-label=\"Language search box\" matInput [formControlName]=\"SearchLanguageInterpreterControlNames.LANGUAGE_SEARCH_TERM\" [matAutocomplete]=\"autoSearchLanguage\"\n class=\"govuk-input search-language__input\" type=\"text\">\n <mat-autocomplete class=\"mat-autocomplete-panel-extend\" autoActiveFirstOption #autoSearchLanguage=\"matAutocomplete\"\n [displayWith]=\"displayLanguage\">\n <mat-option *ngFor=\"let language of filteredLanguages$ | async\" [value]=\"language\">\n {{language | languageInterpreterDisplay}}\n </mat-option>\n <mat-option *ngIf=\"noResults && searchTerm && searchTerm.length >= minSearchCharacters\" disabled>{{'No results found' | rpxTranslate}}</mat-option>\n </mat-autocomplete>\n </div>\n <div class=\"govuk-checkboxes govuk-checkboxes--small govuk-checkboxes--conditional\" data-module=\"govuk-checkboxes\">\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-checkboxes__input\" id=\"enter-language-manually\" name=\"enter-language-manually\" type=\"checkbox\"\n (change)=\"onEnterLanguageManually($event)\">\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"enter-language-manually\">\n {{searchLanguageInterpreterStep.CHECKBOX_LABEL | rpxTranslate}}\n </label>\n </div>\n <div class=\"govuk-radios__conditional\" *ngIf=\"isCheckboxEnabled\">\n <div class=\"govuk-form-group\" [ngClass]=\"{'form-group-error': languageNotEnteredErrorMessage || languageCharLimitErrorMessage }\">\n <label class=\"govuk-label\" for=\"manual-language-entry\">{{searchLanguageInterpreterStep.INPUT_LABEL | rpxTranslate}}</label>\n <div id=\"language-not-entered-error-message\" class=\"govuk-error-message\"\n *ngIf=\"languageNotEnteredErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{languageNotEnteredErrorMessage | rpxTranslate}}\n </div>\n <div id=\"language-char-limit-error-message\" class=\"govuk-error-message\"\n *ngIf=\"languageCharLimitErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{languageCharLimitErrorMessage | rpxTranslate}}\n </div>\n <input class=\"govuk-input govuk-input--width-20\" id=\"manual-language-entry\" [name]=\"SearchLanguageInterpreterControlNames.MANUAL_LANGUAGE_ENTRY\" type=\"text\"\n [formControlName]=\"SearchLanguageInterpreterControlNames.MANUAL_LANGUAGE_ENTRY\">\n </div>\n </div>\n </div>\n </div>\n</ng-container>\n\n<div class=\"govuk-button-group\">\n <button class=\"button button-primary\" type=\"button\" (click)=\"onNext()\">{{'Next' | rpxTranslate}}</button>\n</div>\n", styles: [".autocomplete__input--show-all-values{padding:5px 34px 5px 5px;cursor:pointer}.autocomplete__dropdown-arrow-down{z-index:-1;display:inline-block;position:absolute;right:8px;width:24px;height:24px;top:10px}.autocomplete__menu{background-color:#fff;border:2px solid #0b0c0c;border-top:0;color:#0b0c0c;margin:0;max-height:342px;overflow-x:hidden;padding:0;width:100%;width:calc(100% - 4px)}.autocomplete__menu--visible{display:block}.autocomplete__menu--hidden{display:none}.autocomplete__menu--overlay{box-shadow:#00000042 0 2px 6px;left:0;position:absolute;top:100%;z-index:100}.autocomplete__menu--inline{position:relative}.autocomplete__option{border-bottom:solid #b1b4b6;border-width:1px 0;cursor:pointer;display:block;position:relative}.autocomplete__option>*{pointer-events:none}.autocomplete__option:first-of-type{border-top-width:0}.autocomplete__option:last-of-type{border-bottom-width:0}.autocomplete__option--odd{background-color:#fafafa}.autocomplete__option--focused,.autocomplete__option:hover{background-color:#1d70b8;border-color:#1d70b8;color:#fff;outline:0}.autocomplete__option--no-results{background-color:#fafafa;color:#646b6f;cursor:not-allowed}.autocomplete__hint,.autocomplete__input,.autocomplete__option{font-size:13px;line-height:1.25}.autocomplete__hint,.autocomplete__option{padding:5px}@media (min-width: 641px){.autocomplete__hint,.autocomplete__input,.autocomplete__option{font-size:13px;line-height:1.31579}}.div-action{display:inline-block}.add-location{display:inline}.remove-location-button{margin:5px}.hide-autocomplete{display:none}.auto-complete-container{min-width:550px;display:inline-block;margin-right:4px}.autocomplete__input{line-height:24px;font-size:19px}.hidden{display:none}.search-language__input{position:relative;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36' width='40' height='40'%3E%3Cpath d='M25.7 24.8L21.9 21c.7-1 1.1-2.2 1.1-3.5 0-3.6-2.9-6.5-6.5-6.5S10 13.9 10 17.5s2.9 6.5 6.5 6.5c1.6 0 3-.6 4.1-1.5l3.7 3.7 1.4-1.4zM12 17.5c0-2.5 2-4.5 4.5-4.5s4.5 2 4.5 4.5-2 4.5-4.5 4.5-4.5-2-4.5-4.5z' fill='%23505a5f'%3E%3C/path%3E%3C/svg%3E\");background-repeat:no-repeat;background-position:center left -2px;background-size:40px 40px;padding-left:35px}\n"] }]
23956
- }], () => [{ type: i1.RpxTranslationService }], { formGroup: [{
24345
+ args: [{ selector: 'ccd-search-language-interpreter', template: "<ng-container [formGroup]=\"formGroup\">\n <div class=\"govuk-form-group\" [ngClass]=\"{'form-group-error': languageNotSelectedErrorMessage || languageEnteredInBothFieldsErrorMessage}\">\n <h1 class=\"govuk-label-wrapper\">\n <label class=\"govuk-label govuk-label--m\" [for]=\"SearchLanguageInterpreterControlNames.LANGUAGE_SEARCH_TERM\">\n {{flagType | flagFieldDisplay:'name'}}\n </label>\n </h1>\n <div id=\"language-search-box-hint\" class=\"govuk-hint\">\n {{searchLanguageInterpreterHint | rpxTranslate}}\n </div>\n <div class=\"auto-complete-container\">\n <div id=\"language-not-selected-error-message\" class=\"govuk-error-message\"\n *ngIf=\"languageNotSelectedErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{languageNotSelectedErrorMessage | rpxTranslate}}\n </div>\n <div id=\"language-entered-in-both-fields-error-message\" class=\"govuk-error-message\"\n *ngIf=\"languageEnteredInBothFieldsErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{languageEnteredInBothFieldsErrorMessage | rpxTranslate}}\n </div>\n <input aria-label=\"Language search box\" matInput [formControlName]=\"SearchLanguageInterpreterControlNames.LANGUAGE_SEARCH_TERM\" [matAutocomplete]=\"autoSearchLanguage\"\n class=\"govuk-input search-language__input\" type=\"text\">\n <mat-autocomplete class=\"mat-autocomplete-panel-extend\" autoActiveFirstOption #autoSearchLanguage=\"matAutocomplete\"\n [displayWith]=\"displayLanguage\">\n <mat-option *ngFor=\"let language of filteredLanguages$ | async\" [value]=\"language\">\n {{language | languageInterpreterDisplay}}\n </mat-option>\n <mat-option *ngIf=\"noResults && searchTerm && searchTerm.length >= minSearchCharacters\" disabled>{{'No results found' | rpxTranslate}}</mat-option>\n </mat-autocomplete>\n </div>\n <div class=\"govuk-checkboxes govuk-checkboxes--small govuk-checkboxes--conditional\" data-module=\"govuk-checkboxes\">\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-checkboxes__input\" id=\"enter-language-manually\" name=\"enter-language-manually\" type=\"checkbox\"\n (change)=\"onEnterLanguageManually($event)\">\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"enter-language-manually\">\n {{searchLanguageInterpreterStep.CHECKBOX_LABEL | rpxTranslate}}\n </label>\n </div>\n <div class=\"govuk-radios__conditional\" *ngIf=\"isCheckboxEnabled\">\n <div class=\"govuk-form-group\" [ngClass]=\"{'form-group-error': languageNotEnteredErrorMessage || languageCharLimitErrorMessage }\">\n <label class=\"govuk-label\" for=\"manual-language-entry\">{{searchLanguageInterpreterStep.INPUT_LABEL | rpxTranslate}}</label>\n <div id=\"language-not-entered-error-message\" class=\"govuk-error-message\"\n *ngIf=\"languageNotEnteredErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{languageNotEnteredErrorMessage | rpxTranslate}}\n </div>\n <div id=\"language-char-limit-error-message\" class=\"govuk-error-message\"\n *ngIf=\"languageCharLimitErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{languageCharLimitErrorMessage | rpxTranslate}}\n </div>\n <input class=\"govuk-input govuk-input--width-20\" id=\"manual-language-entry\" [name]=\"SearchLanguageInterpreterControlNames.MANUAL_LANGUAGE_ENTRY\" type=\"text\"\n [formControlName]=\"SearchLanguageInterpreterControlNames.MANUAL_LANGUAGE_ENTRY\">\n </div>\n </div>\n </div>\n </div>\n</ng-container>\n", styles: [".autocomplete__input--show-all-values{padding:5px 34px 5px 5px;cursor:pointer}.autocomplete__dropdown-arrow-down{z-index:-1;display:inline-block;position:absolute;right:8px;width:24px;height:24px;top:10px}.autocomplete__menu{background-color:#fff;border:2px solid #0b0c0c;border-top:0;color:#0b0c0c;margin:0;max-height:342px;overflow-x:hidden;padding:0;width:100%;width:calc(100% - 4px)}.autocomplete__menu--visible{display:block}.autocomplete__menu--hidden{display:none}.autocomplete__menu--overlay{box-shadow:#00000042 0 2px 6px;left:0;position:absolute;top:100%;z-index:100}.autocomplete__menu--inline{position:relative}.autocomplete__option{border-bottom:solid #b1b4b6;border-width:1px 0;cursor:pointer;display:block;position:relative}.autocomplete__option>*{pointer-events:none}.autocomplete__option:first-of-type{border-top-width:0}.autocomplete__option:last-of-type{border-bottom-width:0}.autocomplete__option--odd{background-color:#fafafa}.autocomplete__option--focused,.autocomplete__option:hover{background-color:#1d70b8;border-color:#1d70b8;color:#fff;outline:0}.autocomplete__option--no-results{background-color:#fafafa;color:#646b6f;cursor:not-allowed}.autocomplete__hint,.autocomplete__input,.autocomplete__option{font-size:13px;line-height:1.25}.autocomplete__hint,.autocomplete__option{padding:5px}@media (min-width: 641px){.autocomplete__hint,.autocomplete__input,.autocomplete__option{font-size:13px;line-height:1.31579}}.div-action{display:inline-block}.add-location{display:inline}.remove-location-button{margin:5px}.hide-autocomplete{display:none}.auto-complete-container{min-width:550px;display:inline-block;margin-right:4px}.autocomplete__input{line-height:24px;font-size:19px}.hidden{display:none}.search-language__input{position:relative;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36' width='40' height='40'%3E%3Cpath d='M25.7 24.8L21.9 21c.7-1 1.1-2.2 1.1-3.5 0-3.6-2.9-6.5-6.5-6.5S10 13.9 10 17.5s2.9 6.5 6.5 6.5c1.6 0 3-.6 4.1-1.5l3.7 3.7 1.4-1.4zM12 17.5c0-2.5 2-4.5 4.5-4.5s4.5 2 4.5 4.5-2 4.5-4.5 4.5-4.5-2-4.5-4.5z' fill='%23505a5f'%3E%3C/path%3E%3C/svg%3E\");background-repeat:no-repeat;background-position:center left -2px;background-size:40px 40px;padding-left:35px}\n"] }]
24346
+ }], () => [{ type: i1.RpxTranslationService }, { type: MultipageComponentStateService }], { formGroup: [{
23957
24347
  type: Input
23958
24348
  }], flagType: [{
23959
24349
  type: Input
23960
24350
  }], caseFlagStateEmitter: [{
23961
24351
  type: Output
23962
24352
  }] }); })();
23963
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SearchLanguageInterpreterComponent, { className: "SearchLanguageInterpreterComponent", filePath: "lib/shared/components/palette/case-flag/components/search-language-interpreter/search-language-interpreter.component.ts", lineNumber: 17 }); })();
24353
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SearchLanguageInterpreterComponent, { className: "SearchLanguageInterpreterComponent", filePath: "lib/shared/components/palette/case-flag/components/search-language-interpreter/search-language-interpreter.component.ts", lineNumber: 20 }); })();
23964
24354
 
23965
24355
  const _c0$p = a0 => ({ "form-group-error": a0 });
23966
24356
  function SelectFlagLocationComponent_div_7_Template(rf, ctx) { if (rf & 1) {
23967
- i0.ɵɵelementStart(0, "div", 9)(1, "span", 10);
24357
+ i0.ɵɵelementStart(0, "div", 8)(1, "span", 9);
23968
24358
  i0.ɵɵtext(2);
23969
24359
  i0.ɵɵpipe(3, "rpxTranslate");
23970
24360
  i0.ɵɵelementEnd();
@@ -23991,7 +24381,7 @@ function SelectFlagLocationComponent_div_9_ng_container_3_ng_container_2_Templat
23991
24381
  function SelectFlagLocationComponent_div_9_ng_container_3_Template(rf, ctx) { if (rf & 1) {
23992
24382
  i0.ɵɵelementContainerStart(0);
23993
24383
  i0.ɵɵtext(1);
23994
- i0.ɵɵtemplate(2, SelectFlagLocationComponent_div_9_ng_container_3_ng_container_2_Template, 3, 3, "ng-container", 14);
24384
+ i0.ɵɵtemplate(2, SelectFlagLocationComponent_div_9_ng_container_3_ng_container_2_Template, 3, 3, "ng-container", 13);
23995
24385
  i0.ɵɵelementContainerEnd();
23996
24386
  } if (rf & 2) {
23997
24387
  const flagsInstance_r2 = i0.ɵɵnextContext().$implicit;
@@ -24011,10 +24401,10 @@ function SelectFlagLocationComponent_div_9_ng_container_4_Template(rf, ctx) { if
24011
24401
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, ctx_r0.caseLevelFlagLabel), " ");
24012
24402
  } }
24013
24403
  function SelectFlagLocationComponent_div_9_Template(rf, ctx) { if (rf & 1) {
24014
- i0.ɵɵelementStart(0, "div", 11);
24015
- i0.ɵɵelement(1, "input", 12);
24016
- i0.ɵɵelementStart(2, "label", 13);
24017
- i0.ɵɵtemplate(3, SelectFlagLocationComponent_div_9_ng_container_3_Template, 3, 2, "ng-container", 14)(4, SelectFlagLocationComponent_div_9_ng_container_4_Template, 3, 3, "ng-container", 14);
24404
+ i0.ɵɵelementStart(0, "div", 10);
24405
+ i0.ɵɵelement(1, "input", 11);
24406
+ i0.ɵɵelementStart(2, "label", 12);
24407
+ i0.ɵɵtemplate(3, SelectFlagLocationComponent_div_9_ng_container_3_Template, 3, 2, "ng-container", 13)(4, SelectFlagLocationComponent_div_9_ng_container_4_Template, 3, 3, "ng-container", 13);
24018
24408
  i0.ɵɵelementEnd()();
24019
24409
  } if (rf & 2) {
24020
24410
  const flagsInstance_r2 = ctx.$implicit;
@@ -24030,18 +24420,7 @@ function SelectFlagLocationComponent_div_9_Template(rf, ctx) { if (rf & 1) {
24030
24420
  i0.ɵɵadvance();
24031
24421
  i0.ɵɵproperty("ngIf", !flagsInstance_r2.flags.partyName);
24032
24422
  } }
24033
- function SelectFlagLocationComponent_div_10_Template(rf, ctx) { if (rf & 1) {
24034
- const _r4 = i0.ɵɵgetCurrentView();
24035
- i0.ɵɵelementStart(0, "div", 15)(1, "button", 16);
24036
- i0.ɵɵlistener("click", function SelectFlagLocationComponent_div_10_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r4); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onNext()); });
24037
- i0.ɵɵtext(2);
24038
- i0.ɵɵpipe(3, "rpxTranslate");
24039
- i0.ɵɵelementEnd()();
24040
- } if (rf & 2) {
24041
- i0.ɵɵadvance(2);
24042
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 1, "Next"));
24043
- } }
24044
- class SelectFlagLocationComponent {
24423
+ class SelectFlagLocationComponent extends AbstractJourneyComponent {
24045
24424
  formGroup;
24046
24425
  flagsData;
24047
24426
  isDisplayContextParameterExternal = false;
@@ -24116,8 +24495,14 @@ class SelectFlagLocationComponent {
24116
24495
  // Return case flag field state and error messages to the parent
24117
24496
  this.caseFlagStateEmitter.emit({ currentCaseFlagFieldState: CaseFlagFieldState.FLAG_TYPE, errorMessages: this.errorMessages });
24118
24497
  }
24119
- static ɵfac = function SelectFlagLocationComponent_Factory(t) { return new (t || SelectFlagLocationComponent)(); };
24120
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SelectFlagLocationComponent, selectors: [["ccd-select-flag-location"]], inputs: { formGroup: "formGroup", flagsData: "flagsData", isDisplayContextParameterExternal: "isDisplayContextParameterExternal" }, outputs: { caseFlagStateEmitter: "caseFlagStateEmitter" }, decls: 11, vars: 10, consts: [[3, "formGroup"], [1, "govuk-form-group", 3, "ngClass"], ["aria-describedby", "flag-location-heading", 1, "govuk-fieldset"], [1, "govuk-fieldset__legend", "govuk-fieldset__legend--m"], ["id", "flag-location-heading", 1, "govuk-fieldset__heading"], ["id", "flag-location-not-selected-error-message", "class", "govuk-error-message", 4, "ngIf"], ["data-module", "govuk-radios", "id", "conditional-radios-list", 1, "govuk-radios", "govuk-radios--conditional"], ["class", "govuk-radios__item", 4, "ngFor", "ngForOf"], ["class", "govuk-button-group", 4, "ngIf"], ["id", "flag-location-not-selected-error-message", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], [1, "govuk-radios__item"], ["type", "radio", 1, "govuk-radios__input", 3, "id", "name", "value", "formControlName"], [1, "govuk-label", "govuk-radios__label", 3, "for"], [4, "ngIf"], [1, "govuk-button-group"], ["type", "button", 1, "button", "button-primary", 3, "click"]], template: function SelectFlagLocationComponent_Template(rf, ctx) { if (rf & 1) {
24498
+ next() {
24499
+ this.onNext();
24500
+ if (this.errorMessages.length === 0) {
24501
+ super.next();
24502
+ }
24503
+ }
24504
+ static ɵfac = /*@__PURE__*/ (() => { let ɵSelectFlagLocationComponent_BaseFactory; return function SelectFlagLocationComponent_Factory(t) { return (ɵSelectFlagLocationComponent_BaseFactory || (ɵSelectFlagLocationComponent_BaseFactory = i0.ɵɵgetInheritedFactory(SelectFlagLocationComponent)))(t || SelectFlagLocationComponent); }; })();
24505
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SelectFlagLocationComponent, selectors: [["ccd-select-flag-location"]], inputs: { formGroup: "formGroup", flagsData: "flagsData", isDisplayContextParameterExternal: "isDisplayContextParameterExternal" }, outputs: { caseFlagStateEmitter: "caseFlagStateEmitter" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 10, vars: 9, consts: [[3, "formGroup"], [1, "govuk-form-group", 3, "ngClass"], ["aria-describedby", "flag-location-heading", 1, "govuk-fieldset"], [1, "govuk-fieldset__legend", "govuk-fieldset__legend--m"], ["id", "flag-location-heading", 1, "govuk-fieldset__heading"], ["id", "flag-location-not-selected-error-message", "class", "govuk-error-message", 4, "ngIf"], ["data-module", "govuk-radios", "id", "conditional-radios-list", 1, "govuk-radios", "govuk-radios--conditional"], ["class", "govuk-radios__item", 4, "ngFor", "ngForOf"], ["id", "flag-location-not-selected-error-message", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], [1, "govuk-radios__item"], ["type", "radio", 1, "govuk-radios__input", 3, "id", "name", "value", "formControlName"], [1, "govuk-label", "govuk-radios__label", 3, "for"], [4, "ngIf"]], template: function SelectFlagLocationComponent_Template(rf, ctx) { if (rf & 1) {
24121
24506
  i0.ɵɵelementContainerStart(0, 0);
24122
24507
  i0.ɵɵelementStart(1, "div", 1)(2, "fieldset", 2)(3, "legend", 3)(4, "h1", 4);
24123
24508
  i0.ɵɵtext(5);
@@ -24128,24 +24513,21 @@ class SelectFlagLocationComponent {
24128
24513
  i0.ɵɵtemplate(9, SelectFlagLocationComponent_div_9_Template, 5, 9, "div", 7);
24129
24514
  i0.ɵɵelementEnd()()();
24130
24515
  i0.ɵɵelementContainerEnd();
24131
- i0.ɵɵtemplate(10, SelectFlagLocationComponent_div_10_Template, 4, 3, "div", 8);
24132
24516
  } if (rf & 2) {
24133
24517
  i0.ɵɵproperty("formGroup", ctx.formGroup);
24134
24518
  i0.ɵɵadvance();
24135
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$p, ctx.errorMessages.length > 0));
24519
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$p, ctx.errorMessages.length > 0));
24136
24520
  i0.ɵɵadvance(4);
24137
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 6, ctx.flagLocationTitle), " ");
24521
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 5, ctx.flagLocationTitle), " ");
24138
24522
  i0.ɵɵadvance(2);
24139
24523
  i0.ɵɵproperty("ngIf", ctx.flagLocationNotSelectedErrorMessage);
24140
24524
  i0.ɵɵadvance(2);
24141
24525
  i0.ɵɵproperty("ngForOf", ctx.filteredFlagsData);
24142
- i0.ɵɵadvance();
24143
- i0.ɵɵproperty("ngIf", !ctx.caseFlagsConfigError);
24144
24526
  } }, dependencies: [i5.NgClass, i5.NgForOf, i5.NgIf, i4.DefaultValueAccessor, i4.RadioControlValueAccessor, i4.NgControlStatus, i4.NgControlStatusGroup, i4.FormGroupDirective, i4.FormControlName, i1.RpxTranslatePipe], encapsulation: 2 });
24145
24527
  }
24146
24528
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SelectFlagLocationComponent, [{
24147
24529
  type: Component,
24148
- args: [{ selector: 'ccd-select-flag-location', template: "<ng-container [formGroup]=\"formGroup\">\n <div class=\"govuk-form-group\" [ngClass]=\"{'form-group-error': errorMessages.length > 0}\">\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"flag-location-heading\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--m\">\n <h1 id=\"flag-location-heading\" class=\"govuk-fieldset__heading\">\n {{flagLocationTitle | rpxTranslate}}\n </h1>\n </legend>\n <div id=\"flag-location-not-selected-error-message\" class=\"govuk-error-message\"\n *ngIf=\"flagLocationNotSelectedErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{flagLocationNotSelectedErrorMessage | rpxTranslate}}\n </div>\n <div class=\"govuk-radios govuk-radios--conditional\" data-module=\"govuk-radios\" id=\"conditional-radios-list\">\n <div class=\"govuk-radios__item\" *ngFor=\"let flagsInstance of filteredFlagsData; index as i\">\n <input class=\"govuk-radios__input\" id=\"flag-location-{{i}}\" [name]=\"selectedLocationControlName\"\n type=\"radio\" [value]=\"flagsInstance\" [formControlName]=\"selectedLocationControlName\"/>\n <label class=\"govuk-label govuk-radios__label\" for=\"flag-location-{{i}}\">\n <ng-container *ngIf=\"flagsInstance.flags.partyName\">\n {{flagsInstance.flags.partyName}}\n <ng-container *ngIf=\"flagsInstance.flags.roleOnCase\">\n ({{flagsInstance.flags.roleOnCase | rpxTranslate}})\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!flagsInstance.flags.partyName\">\n {{caseLevelFlagLabel | rpxTranslate}}\n </ng-container>\n </label>\n </div>\n </div>\n </fieldset>\n </div>\n</ng-container>\n\n<div class=\"govuk-button-group\" *ngIf=\"!caseFlagsConfigError\">\n <button class=\"button button-primary\" type=\"button\" (click)=\"onNext()\">{{'Next' | rpxTranslate}}</button>\n</div>\n" }]
24530
+ args: [{ selector: 'ccd-select-flag-location', template: "<ng-container [formGroup]=\"formGroup\">\n <div class=\"govuk-form-group\" [ngClass]=\"{'form-group-error': errorMessages.length > 0}\">\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"flag-location-heading\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--m\">\n <h1 id=\"flag-location-heading\" class=\"govuk-fieldset__heading\">\n {{flagLocationTitle | rpxTranslate}}\n </h1>\n </legend>\n <div id=\"flag-location-not-selected-error-message\" class=\"govuk-error-message\"\n *ngIf=\"flagLocationNotSelectedErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{flagLocationNotSelectedErrorMessage | rpxTranslate}}\n </div>\n <div class=\"govuk-radios govuk-radios--conditional\" data-module=\"govuk-radios\" id=\"conditional-radios-list\">\n <div class=\"govuk-radios__item\" *ngFor=\"let flagsInstance of filteredFlagsData; index as i\">\n <input class=\"govuk-radios__input\" id=\"flag-location-{{i}}\" [name]=\"selectedLocationControlName\"\n type=\"radio\" [value]=\"flagsInstance\" [formControlName]=\"selectedLocationControlName\"/>\n <label class=\"govuk-label govuk-radios__label\" for=\"flag-location-{{i}}\">\n <ng-container *ngIf=\"flagsInstance.flags.partyName\">\n {{flagsInstance.flags.partyName}}\n <ng-container *ngIf=\"flagsInstance.flags.roleOnCase\">\n ({{flagsInstance.flags.roleOnCase | rpxTranslate}})\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!flagsInstance.flags.partyName\">\n {{caseLevelFlagLabel | rpxTranslate}}\n </ng-container>\n </label>\n </div>\n </div>\n </fieldset>\n </div>\n</ng-container>" }]
24149
24531
  }], null, { formGroup: [{
24150
24532
  type: Input
24151
24533
  }], flagsData: [{
@@ -24155,7 +24537,7 @@ class SelectFlagLocationComponent {
24155
24537
  }], caseFlagStateEmitter: [{
24156
24538
  type: Output
24157
24539
  }] }); })();
24158
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SelectFlagLocationComponent, { className: "SelectFlagLocationComponent", filePath: "lib/shared/components/palette/case-flag/components/select-flag-location/select-flag-location.component.ts", lineNumber: 11 }); })();
24540
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SelectFlagLocationComponent, { className: "SelectFlagLocationComponent", filePath: "lib/shared/components/palette/case-flag/components/select-flag-location/select-flag-location.component.ts", lineNumber: 12 }); })();
24159
24541
 
24160
24542
  const _c0$o = a0 => ({ "form-group-error": a0 });
24161
24543
  const _c1$8 = a0 => ({ "govuk-input--error": a0 });
@@ -24178,7 +24560,7 @@ function SelectFlagTypeComponent_ng_container_0_ng_template_6_Template(rf, ctx)
24178
24560
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(1, 1, ctx_r0.cachedFlagType, "name"), " ");
24179
24561
  } }
24180
24562
  function SelectFlagTypeComponent_ng_container_0_div_8_Template(rf, ctx) { if (rf & 1) {
24181
- i0.ɵɵelementStart(0, "div", 13)(1, "span", 14);
24563
+ i0.ɵɵelementStart(0, "div", 12)(1, "span", 13);
24182
24564
  i0.ɵɵtext(2);
24183
24565
  i0.ɵɵpipe(3, "rpxTranslate");
24184
24566
  i0.ɵɵelementEnd();
@@ -24193,9 +24575,9 @@ function SelectFlagTypeComponent_ng_container_0_div_8_Template(rf, ctx) { if (rf
24193
24575
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 4, ctx_r0.flagTypeNotSelectedErrorMessage), " ");
24194
24576
  } }
24195
24577
  function SelectFlagTypeComponent_ng_container_0_div_10_Template(rf, ctx) { if (rf & 1) {
24196
- i0.ɵɵelementStart(0, "div", 15);
24197
- i0.ɵɵelement(1, "input", 16);
24198
- i0.ɵɵelementStart(2, "label", 17);
24578
+ i0.ɵɵelementStart(0, "div", 14);
24579
+ i0.ɵɵelement(1, "input", 15);
24580
+ i0.ɵɵelementStart(2, "label", 16);
24199
24581
  i0.ɵɵtext(3);
24200
24582
  i0.ɵɵpipe(4, "flagFieldDisplay");
24201
24583
  i0.ɵɵelementEnd()();
@@ -24212,7 +24594,7 @@ function SelectFlagTypeComponent_ng_container_0_div_10_Template(rf, ctx) { if (r
24212
24594
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(4, 8, flagType_r2, "name"), " ");
24213
24595
  } }
24214
24596
  function SelectFlagTypeComponent_ng_container_0_div_11_div_6_Template(rf, ctx) { if (rf & 1) {
24215
- i0.ɵɵelementStart(0, "div", 23)(1, "span", 14);
24597
+ i0.ɵɵelementStart(0, "div", 22)(1, "span", 13);
24216
24598
  i0.ɵɵtext(2);
24217
24599
  i0.ɵɵpipe(3, "rpxTranslate");
24218
24600
  i0.ɵɵelementEnd();
@@ -24227,9 +24609,9 @@ function SelectFlagTypeComponent_ng_container_0_div_11_div_6_Template(rf, ctx) {
24227
24609
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 4, ctx_r0.flagTypeErrorMessage), " ");
24228
24610
  } }
24229
24611
  function SelectFlagTypeComponent_ng_container_0_div_11_div_8_Template(rf, ctx) { if (rf & 1) {
24230
- i0.ɵɵelementStart(0, "div", 24);
24231
- i0.ɵɵelement(1, "input", 25);
24232
- i0.ɵɵelementStart(2, "label", 26);
24612
+ i0.ɵɵelementStart(0, "div", 23);
24613
+ i0.ɵɵelement(1, "input", 24);
24614
+ i0.ɵɵelementStart(2, "label", 25);
24233
24615
  i0.ɵɵtext(3);
24234
24616
  i0.ɵɵpipe(4, "rpxTranslate");
24235
24617
  i0.ɵɵelementEnd()();
@@ -24241,14 +24623,14 @@ function SelectFlagTypeComponent_ng_container_0_div_11_div_8_Template(rf, ctx) {
24241
24623
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(4, 3, "This flag should only be visible to HMCTS Staff"), " ");
24242
24624
  } }
24243
24625
  function SelectFlagTypeComponent_ng_container_0_div_11_Template(rf, ctx) { if (rf & 1) {
24244
- i0.ɵɵelementStart(0, "div", 18)(1, "div", 4)(2, "label", 19);
24626
+ i0.ɵɵelementStart(0, "div", 17)(1, "div", 3)(2, "label", 18);
24245
24627
  i0.ɵɵtext(3);
24246
24628
  i0.ɵɵpipe(4, "rpxTranslate");
24247
24629
  i0.ɵɵpipe(5, "rpxTranslate");
24248
24630
  i0.ɵɵelementEnd();
24249
- i0.ɵɵtemplate(6, SelectFlagTypeComponent_ng_container_0_div_11_div_6_Template, 6, 6, "div", 20);
24250
- i0.ɵɵelement(7, "input", 21);
24251
- i0.ɵɵtemplate(8, SelectFlagTypeComponent_ng_container_0_div_11_div_8_Template, 5, 5, "div", 22);
24631
+ i0.ɵɵtemplate(6, SelectFlagTypeComponent_ng_container_0_div_11_div_6_Template, 6, 6, "div", 19);
24632
+ i0.ɵɵelement(7, "input", 20);
24633
+ i0.ɵɵtemplate(8, SelectFlagTypeComponent_ng_container_0_div_11_div_8_Template, 5, 5, "div", 21);
24252
24634
  i0.ɵɵelementEnd()();
24253
24635
  } if (rf & 2) {
24254
24636
  const ctx_r0 = i0.ɵɵnextContext(2);
@@ -24264,13 +24646,13 @@ function SelectFlagTypeComponent_ng_container_0_div_11_Template(rf, ctx) { if (r
24264
24646
  i0.ɵɵproperty("ngIf", !ctx_r0.isDisplayContextParameterExternal && !ctx_r0.isCaseLevelFlag && ctx_r0.isDisplayContextParameter2Point1Enabled);
24265
24647
  } }
24266
24648
  function SelectFlagTypeComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
24267
- i0.ɵɵelementContainerStart(0, 3);
24268
- i0.ɵɵelementStart(1, "div", 4)(2, "fieldset", 5)(3, "legend", 6)(4, "h1", 7);
24269
- i0.ɵɵtemplate(5, SelectFlagTypeComponent_ng_container_0_ng_container_5_Template, 4, 5, "ng-container", 8)(6, SelectFlagTypeComponent_ng_container_0_ng_template_6_Template, 2, 4, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
24649
+ i0.ɵɵelementContainerStart(0, 2);
24650
+ i0.ɵɵelementStart(1, "div", 3)(2, "fieldset", 4)(3, "legend", 5)(4, "h1", 6);
24651
+ i0.ɵɵtemplate(5, SelectFlagTypeComponent_ng_container_0_ng_container_5_Template, 4, 5, "ng-container", 7)(6, SelectFlagTypeComponent_ng_container_0_ng_template_6_Template, 2, 4, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
24270
24652
  i0.ɵɵelementEnd()();
24271
- i0.ɵɵtemplate(8, SelectFlagTypeComponent_ng_container_0_div_8_Template, 6, 6, "div", 9);
24272
- i0.ɵɵelementStart(9, "div", 10);
24273
- i0.ɵɵtemplate(10, SelectFlagTypeComponent_ng_container_0_div_10_Template, 5, 11, "div", 11)(11, SelectFlagTypeComponent_ng_container_0_div_11_Template, 9, 15, "div", 12);
24653
+ i0.ɵɵtemplate(8, SelectFlagTypeComponent_ng_container_0_div_8_Template, 6, 6, "div", 8);
24654
+ i0.ɵɵelementStart(9, "div", 9);
24655
+ i0.ɵɵtemplate(10, SelectFlagTypeComponent_ng_container_0_div_10_Template, 5, 11, "div", 10)(11, SelectFlagTypeComponent_ng_container_0_div_11_Template, 9, 15, "div", 11);
24274
24656
  i0.ɵɵelementEnd()()();
24275
24657
  i0.ɵɵelementContainerEnd();
24276
24658
  } if (rf & 2) {
@@ -24280,7 +24662,7 @@ function SelectFlagTypeComponent_ng_container_0_Template(rf, ctx) { if (rf & 1)
24280
24662
  i0.ɵɵadvance();
24281
24663
  i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$o, ctx_r0.flagTypeNotSelectedErrorMessage.length > 0));
24282
24664
  i0.ɵɵadvance(4);
24283
- i0.ɵɵproperty("ngIf", !ctx_r0.cachedFlagType)("ngIfElse", priorFlagTypeSelected_r4);
24665
+ i0.ɵɵproperty("ngIf", !ctx_r0.cachedFlagType || ctx_r0.subJourneyIndex == 0)("ngIfElse", priorFlagTypeSelected_r4);
24284
24666
  i0.ɵɵadvance(3);
24285
24667
  i0.ɵɵproperty("ngIf", ctx_r0.flagTypeNotSelectedErrorMessage.length > 0);
24286
24668
  i0.ɵɵadvance(2);
@@ -24288,18 +24670,7 @@ function SelectFlagTypeComponent_ng_container_0_Template(rf, ctx) { if (rf & 1)
24288
24670
  i0.ɵɵadvance();
24289
24671
  i0.ɵɵproperty("ngIf", ctx_r0.otherFlagTypeSelected);
24290
24672
  } }
24291
- function SelectFlagTypeComponent_div_1_Template(rf, ctx) { if (rf & 1) {
24292
- const _r5 = i0.ɵɵgetCurrentView();
24293
- i0.ɵɵelementStart(0, "div", 27)(1, "button", 28);
24294
- i0.ɵɵlistener("click", function SelectFlagTypeComponent_div_1_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r5); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onNext()); });
24295
- i0.ɵɵtext(2);
24296
- i0.ɵɵpipe(3, "rpxTranslate");
24297
- i0.ɵɵelementEnd()();
24298
- } if (rf & 2) {
24299
- i0.ɵɵadvance(2);
24300
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 1, "Next"));
24301
- } }
24302
- class SelectFlagTypeComponent {
24673
+ class SelectFlagTypeComponent extends AbstractJourneyComponent {
24303
24674
  caseFlagRefdataService;
24304
24675
  formGroup;
24305
24676
  jurisdiction;
@@ -24321,6 +24692,8 @@ class SelectFlagTypeComponent {
24321
24692
  flagTypeControlChangesSubscription;
24322
24693
  caseFlagFormField = CaseFlagFormFields;
24323
24694
  isCaseLevelFlag = false;
24695
+ cachedRDFlagTypes;
24696
+ subJourneyIndex = 0;
24324
24697
  maxCharactersForOtherFlagType = 80;
24325
24698
  // Code for "Other" flag type as defined in Reference Data
24326
24699
  otherFlagTypeCode = 'OT0001';
@@ -24328,15 +24701,16 @@ class SelectFlagTypeComponent {
24328
24701
  get caseFlagWizardStepTitle() {
24329
24702
  return CaseFlagWizardStepTitle;
24330
24703
  }
24704
+ constructor(caseFlagRefdataService, pageStateService) {
24705
+ super(pageStateService);
24706
+ this.caseFlagRefdataService = caseFlagRefdataService;
24707
+ }
24331
24708
  get selectedFlagType() {
24332
24709
  return this.formGroup.get(CaseFlagFormFields.FLAG_TYPE)?.value;
24333
24710
  }
24334
24711
  get otherFlagTypeSelected() {
24335
24712
  return this.formGroup.get(CaseFlagFormFields.FLAG_TYPE)?.value?.flagCode === this.otherFlagTypeCode;
24336
24713
  }
24337
- constructor(caseFlagRefdataService) {
24338
- this.caseFlagRefdataService = caseFlagRefdataService;
24339
- }
24340
24714
  ngOnInit() {
24341
24715
  this.isCaseLevelFlag = this.selectedFlagsLocation?.flags?.flagsCaseFieldId === this.caseLevelCaseFlagsFieldId;
24342
24716
  this.flagTypes = [];
@@ -24347,7 +24721,7 @@ class SelectFlagTypeComponent {
24347
24721
  this.formGroup.addControl(CaseFlagFormFields.IS_VISIBLE_INTERNALLY_ONLY, new FormControl(false));
24348
24722
  // Should clear descriptionControlName if flagTypeControlName is changed
24349
24723
  this.flagTypeControlChangesSubscription = this.formGroup.get(CaseFlagFormFields.FLAG_TYPE)?.valueChanges
24350
- .subscribe(_ => {
24724
+ .subscribe((_) => {
24351
24725
  this.formGroup.get(CaseFlagFormFields.OTHER_FLAG_DESCRIPTION)?.setValue('');
24352
24726
  this.cachedPath = [];
24353
24727
  // required to clear language interpreter
@@ -24361,8 +24735,8 @@ class SelectFlagTypeComponent {
24361
24735
  this.flagRefdata$ = this.caseFlagRefdataService
24362
24736
  .getCaseFlagsRefdata(this.hmctsServiceId, flagType, true, this.isDisplayContextParameterExternal)
24363
24737
  .subscribe({
24364
- next: flagTypes => this.processFlagTypes(flagTypes),
24365
- error: error => this.onRefdataError(error)
24738
+ next: (flagTypes) => this.processFlagTypes(flagTypes),
24739
+ error: (error) => this.onRefdataError(error)
24366
24740
  });
24367
24741
  }
24368
24742
  else {
@@ -24370,13 +24744,13 @@ class SelectFlagTypeComponent {
24370
24744
  this.flagRefdata$ = this.caseFlagRefdataService.getHmctsServiceDetailsByCaseType(this.caseTypeId)
24371
24745
  .pipe(
24372
24746
  // If an error occurs retrieving HMCTS service details by case type ID, try by service name instead
24373
- catchError(_ => this.caseFlagRefdataService.getHmctsServiceDetailsByServiceName(this.jurisdiction)),
24747
+ catchError((_) => this.caseFlagRefdataService.getHmctsServiceDetailsByServiceName(this.jurisdiction)),
24374
24748
  // Use switchMap to return an inner Observable of the flag types data, having received the service details
24375
24749
  // including service_code. This avoids having nested `subscribe`s, which is an anti-pattern!
24376
- switchMap(serviceDetails => this.caseFlagRefdataService.getCaseFlagsRefdata(serviceDetails[0].service_code, flagType, true, this.isDisplayContextParameterExternal)))
24750
+ switchMap((serviceDetails) => this.caseFlagRefdataService.getCaseFlagsRefdata(serviceDetails[0].service_code, flagType, true, this.isDisplayContextParameterExternal)))
24377
24751
  .subscribe({
24378
- next: flagTypes => this.processFlagTypes(flagTypes),
24379
- error: error => this.onRefdataError(error)
24752
+ next: (flagTypes) => this.processFlagTypes(flagTypes),
24753
+ error: (error) => this.onRefdataError(error)
24380
24754
  });
24381
24755
  }
24382
24756
  }
@@ -24404,9 +24778,39 @@ class SelectFlagTypeComponent {
24404
24778
  // when displaying the next set of child flags
24405
24779
  this.cachedFlagType = this.selectedFlagType;
24406
24780
  this.flagTypes = this.selectedFlagType.childFlags;
24407
- this.cachedPath?.shift();
24408
- this.formGroup.get(CaseFlagFormFields.FLAG_TYPE)?.setValue(this.cachedPath?.length ? this.cachedPath[0] : null, { emitEvent: false });
24781
+ if (this.cachedPath.length !== 0 && this.cachedPath[this.subJourneyIndex] === this.selectedFlagType) {
24782
+ this.formGroup.get(CaseFlagFormFields.FLAG_TYPE)?.setValue(this.cachedPath[this.subJourneyIndex + 1], { emitEvent: false });
24783
+ }
24784
+ else {
24785
+ this.cachedPath?.shift();
24786
+ const value = this.cachedPath?.length ? this.cachedPath[0] : null;
24787
+ this.formGroup.get(CaseFlagFormFields.FLAG_TYPE)?.setValue(value, { emitEvent: false });
24788
+ }
24789
+ this.subJourneyIndex++;
24790
+ }
24791
+ }
24792
+ // Simplified version of the onPrevious method with optimized code
24793
+ onPrevious() {
24794
+ if (this.cachedFlagType) {
24795
+ if (this.cachedFlagType.Path.length === 1) {
24796
+ this.formGroup.get(CaseFlagFormFields.FLAG_TYPE)?.setValue(this.cachedFlagType, { emitEvent: false });
24797
+ this.flagTypes = this.cachedRDFlagTypes[0].childFlags;
24798
+ }
24799
+ else {
24800
+ let currentPath = this.cachedRDFlagTypes[0];
24801
+ const pathToSearch = this.cachedFlagType.Path.slice(1);
24802
+ for (const pathElement of pathToSearch) {
24803
+ const foundFlag = currentPath.childFlags.find((flag) => flag.name === pathElement);
24804
+ if (foundFlag) {
24805
+ currentPath = foundFlag;
24806
+ }
24807
+ }
24808
+ this.formGroup.get(CaseFlagFormFields.FLAG_TYPE)?.setValue(this.cachedFlagType, { emitEvent: false });
24809
+ this.flagTypes = currentPath.childFlags;
24810
+ this.cachedFlagType = currentPath;
24811
+ }
24409
24812
  }
24813
+ this.subJourneyIndex = Math.max(0, this.subJourneyIndex - 1);
24410
24814
  }
24411
24815
  // Identity function for trackBy use by *ngFor for flagTypes in HTML template
24412
24816
  identifyFlagType(_, flagType) {
@@ -24445,18 +24849,33 @@ class SelectFlagTypeComponent {
24445
24849
  }
24446
24850
  }
24447
24851
  processFlagTypes(flagTypes) {
24448
- // First (and only) object in the returned array should be the top-level "Party" flag type
24449
- // The "Other" flag type should be removed from the top level if the user is external
24450
- this.flagTypes = flagTypes[0].childFlags.filter((flag) => this.isDisplayContextParameterExternal ? flag.flagCode !== this.otherFlagTypeCode : true);
24852
+ const prevJourneyPage = this.multipageComponentStateService.getJourneyCollection()[0];
24853
+ const { journeyPreviousPageNumber, journeyPageNumber } = prevJourneyPage;
24854
+ this.cachedRDFlagTypes = flagTypes;
24855
+ if (this.selectedFlagType && (journeyPreviousPageNumber > journeyPageNumber)) {
24856
+ const selectedFlagType = this.selectedFlagType;
24857
+ const pathToSearch = selectedFlagType.Path.slice(1);
24858
+ let currentPath = flagTypes[0];
24859
+ for (const pathElement of pathToSearch) {
24860
+ const foundFlag = currentPath.childFlags.find((flag) => flag.name === pathElement);
24861
+ if (foundFlag) {
24862
+ currentPath = foundFlag;
24863
+ }
24864
+ }
24865
+ this.flagTypes = currentPath.childFlags;
24866
+ this.cachedFlagType = currentPath;
24867
+ }
24868
+ else {
24869
+ this.flagTypes = flagTypes[0].childFlags.filter((flag) => this.isDisplayContextParameterExternal ? flag.flagCode !== this.otherFlagTypeCode : true);
24870
+ }
24451
24871
  const formControl = this.formGroup.get(CaseFlagFormFields.FLAG_TYPE);
24452
24872
  if (formControl?.value) {
24453
- // Cache Path based on existing flagCode -- needed for nested choices
24454
- const [foundFlagType, path] = FlagType.searchPathByFlagTypeObject(formControl.value, this.flagTypes);
24455
- this.cachedPath = [
24456
- ...path,
24457
- foundFlagType
24458
- ];
24459
- formControl.setValue(this.cachedPath[0], { emitEvent: false });
24873
+ const [foundFlagType, path] = FlagType.searchPathByFlagTypeObject(formControl.value, this.cachedRDFlagTypes[0].childFlags);
24874
+ this.cachedPath = [...path, foundFlagType];
24875
+ formControl.setValue((this.selectedFlagType && (journeyPreviousPageNumber > journeyPageNumber)) ? this.cachedPath[this.cachedPath.length - 1] : this.cachedPath[0], { emitEvent: false });
24876
+ if (this.cachedPath.length !== 0) {
24877
+ this.subJourneyIndex = this.cachedPath.length - 1;
24878
+ }
24460
24879
  }
24461
24880
  }
24462
24881
  onRefdataError(error) {
@@ -24467,19 +24886,29 @@ class SelectFlagTypeComponent {
24467
24886
  // Return case flag field state and error messages to the parent
24468
24887
  this.caseFlagStateEmitter.emit({ currentCaseFlagFieldState: CaseFlagFieldState.FLAG_TYPE, errorMessages: this.errorMessages });
24469
24888
  }
24470
- static ɵfac = function SelectFlagTypeComponent_Factory(t) { return new (t || SelectFlagTypeComponent)(i0.ɵɵdirectiveInject(CaseFlagRefdataService)); };
24471
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SelectFlagTypeComponent, selectors: [["ccd-select-flag-type"]], inputs: { formGroup: "formGroup", jurisdiction: "jurisdiction", caseTypeId: "caseTypeId", hmctsServiceId: "hmctsServiceId", isDisplayContextParameterExternal: "isDisplayContextParameterExternal", isDisplayContextParameter2Point1Enabled: "isDisplayContextParameter2Point1Enabled", selectedFlagsLocation: "selectedFlagsLocation" }, outputs: { caseFlagStateEmitter: "caseFlagStateEmitter", flagCommentsOptionalEmitter: "flagCommentsOptionalEmitter" }, decls: 2, vars: 2, consts: [["priorFlagTypeSelected", ""], [3, "formGroup", 4, "ngIf"], ["class", "govuk-button-group", 4, "ngIf"], [3, "formGroup"], [1, "govuk-form-group", 3, "ngClass"], ["aria-describedby", "flag-type-heading", 1, "govuk-fieldset"], [1, "govuk-fieldset__legend", "govuk-fieldset__legend--m"], ["id", "flag-type-heading", 1, "govuk-fieldset__heading", "govuk-!-margin-bottom-1"], [4, "ngIf", "ngIfElse"], ["id", "flag-type-not-selected-error-message", "class", "govuk-error-message", 4, "ngIf"], ["data-module", "govuk-radios", "id", "conditional-radios-list", 1, "govuk-radios", "govuk-radios--conditional"], ["class", "govuk-radios__item", 4, "ngFor", "ngForOf", "ngForTrackBy"], ["class", "govuk-radios__conditional", "id", "conditional-flagType", 4, "ngIf"], ["id", "flag-type-not-selected-error-message", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], [1, "govuk-radios__item"], ["type", "radio", 1, "govuk-radios__input", 3, "id", "name", "value", "formControlName"], [1, "govuk-label", "govuk-radios__label", 3, "for"], ["id", "conditional-flagType", 1, "govuk-radios__conditional"], ["for", "other-flag-type-description", 1, "govuk-label"], ["id", "flag-type-error-message", "class", "govuk-error-message", 4, "ngIf"], ["id", "other-flag-type-description", "type", "text", 1, "govuk-input", "govuk-!-width-one-half", 3, "ngClass", "name", "formControlName"], ["class", "govuk-checkboxes__item govuk-!-margin-top-4", 4, "ngIf"], ["id", "flag-type-error-message", 1, "govuk-error-message"], [1, "govuk-checkboxes__item", "govuk-!-margin-top-4"], ["id", "is-visible-externally", "type", "checkbox", 1, "govuk-checkboxes__input", 3, "name", "formControlName"], ["for", "is-visible-externally", 1, "govuk-label", "govuk-checkboxes__label"], [1, "govuk-button-group"], ["type", "button", 1, "button", "button-primary", 3, "click"]], template: function SelectFlagTypeComponent_Template(rf, ctx) { if (rf & 1) {
24472
- i0.ɵɵtemplate(0, SelectFlagTypeComponent_ng_container_0_Template, 12, 10, "ng-container", 1)(1, SelectFlagTypeComponent_div_1_Template, 4, 3, "div", 2);
24889
+ next() {
24890
+ this.onNext();
24891
+ if (this.errorMessages.length === 0) {
24892
+ super.next();
24893
+ }
24894
+ }
24895
+ previous() {
24896
+ this.onPrevious();
24897
+ if (this.subJourneyIndex <= 0) {
24898
+ super.previous();
24899
+ }
24900
+ }
24901
+ static ɵfac = function SelectFlagTypeComponent_Factory(t) { return new (t || SelectFlagTypeComponent)(i0.ɵɵdirectiveInject(CaseFlagRefdataService), i0.ɵɵdirectiveInject(MultipageComponentStateService)); };
24902
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SelectFlagTypeComponent, selectors: [["ccd-select-flag-type"]], inputs: { formGroup: "formGroup", jurisdiction: "jurisdiction", caseTypeId: "caseTypeId", hmctsServiceId: "hmctsServiceId", isDisplayContextParameterExternal: "isDisplayContextParameterExternal", isDisplayContextParameter2Point1Enabled: "isDisplayContextParameter2Point1Enabled", selectedFlagsLocation: "selectedFlagsLocation" }, outputs: { caseFlagStateEmitter: "caseFlagStateEmitter", flagCommentsOptionalEmitter: "flagCommentsOptionalEmitter" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [["priorFlagTypeSelected", ""], [3, "formGroup", 4, "ngIf"], [3, "formGroup"], [1, "govuk-form-group", 3, "ngClass"], ["aria-describedby", "flag-type-heading", 1, "govuk-fieldset"], [1, "govuk-fieldset__legend", "govuk-fieldset__legend--m"], ["id", "flag-type-heading", 1, "govuk-fieldset__heading", "govuk-!-margin-bottom-1"], [4, "ngIf", "ngIfElse"], ["id", "flag-type-not-selected-error-message", "class", "govuk-error-message", 4, "ngIf"], ["data-module", "govuk-radios", "id", "conditional-radios-list", 1, "govuk-radios", "govuk-radios--conditional"], ["class", "govuk-radios__item", 4, "ngFor", "ngForOf", "ngForTrackBy"], ["class", "govuk-radios__conditional", "id", "conditional-flagType", 4, "ngIf"], ["id", "flag-type-not-selected-error-message", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], [1, "govuk-radios__item"], ["type", "radio", 1, "govuk-radios__input", 3, "id", "name", "value", "formControlName"], [1, "govuk-label", "govuk-radios__label", 3, "for"], ["id", "conditional-flagType", 1, "govuk-radios__conditional"], ["for", "other-flag-type-description", 1, "govuk-label"], ["id", "flag-type-error-message", "class", "govuk-error-message", 4, "ngIf"], ["id", "other-flag-type-description", "type", "text", 1, "govuk-input", "govuk-!-width-one-half", 3, "ngClass", "name", "formControlName"], ["class", "govuk-checkboxes__item govuk-!-margin-top-4", 4, "ngIf"], ["id", "flag-type-error-message", 1, "govuk-error-message"], [1, "govuk-checkboxes__item", "govuk-!-margin-top-4"], ["id", "is-visible-externally", "type", "checkbox", 1, "govuk-checkboxes__input", 3, "name", "formControlName"], ["for", "is-visible-externally", 1, "govuk-label", "govuk-checkboxes__label"]], template: function SelectFlagTypeComponent_Template(rf, ctx) { if (rf & 1) {
24903
+ i0.ɵɵtemplate(0, SelectFlagTypeComponent_ng_container_0_Template, 12, 10, "ng-container", 1);
24473
24904
  } if (rf & 2) {
24474
24905
  i0.ɵɵproperty("ngIf", ctx.flagTypes == null ? null : ctx.flagTypes.length);
24475
- i0.ɵɵadvance();
24476
- i0.ɵɵproperty("ngIf", !ctx.refdataError);
24477
24906
  } }, styles: [".hidden[_ngcontent-%COMP%]{display:none}.validation-error[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:#d4351c}"] });
24478
24907
  }
24479
24908
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SelectFlagTypeComponent, [{
24480
24909
  type: Component,
24481
- args: [{ selector: 'ccd-select-flag-type', template: "<ng-container *ngIf=\"flagTypes?.length\" [formGroup]=\"formGroup\">\n <div class=\"govuk-form-group\" [ngClass]=\"{'form-group-error': flagTypeNotSelectedErrorMessage.length > 0}\">\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"flag-type-heading\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--m\">\n <h1 id=\"flag-type-heading\" class=\"govuk-fieldset__heading govuk-!-margin-bottom-1\">\n <ng-container *ngIf=\"!cachedFlagType; else priorFlagTypeSelected\">\n {{\n isDisplayContextParameterExternal\n ? (caseFlagWizardStepTitle.SELECT_CASE_FLAG_EXTERNAL | rpxTranslate)\n : (caseFlagWizardStepTitle.SELECT_CASE_FLAG | rpxTranslate)\n }}\n </ng-container>\n <ng-template #priorFlagTypeSelected>\n {{cachedFlagType | flagFieldDisplay:'name'}}\n </ng-template>\n </h1>\n </legend>\n <div id=\"flag-type-not-selected-error-message\" class=\"govuk-error-message\"\n *ngIf=\"flagTypeNotSelectedErrorMessage.length > 0\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{flagTypeNotSelectedErrorMessage | rpxTranslate}}\n </div>\n <div class=\"govuk-radios govuk-radios--conditional\" data-module=\"govuk-radios\" id=\"conditional-radios-list\">\n <div class=\"govuk-radios__item\" *ngFor=\"let flagType of flagTypes; index as i; trackBy: identifyFlagType\">\n <input class=\"govuk-radios__input\" id=\"flag-type-{{i}}\" [name]=\"caseFlagFormField.FLAG_TYPE\"\n type=\"radio\" [value]=\"flagType\"\n [formControlName]=\"caseFlagFormField.FLAG_TYPE\"/>\n <label class=\"govuk-label govuk-radios__label\" for=\"flag-type-{{i}}\">\n {{flagType | flagFieldDisplay:'name'}}\n </label>\n </div>\n <div class=\"govuk-radios__conditional\" *ngIf=\"otherFlagTypeSelected\" id=\"conditional-flagType\">\n <div class=\"govuk-form-group\" [ngClass]=\"{'form-group-error': flagTypeErrorMessage.length > 0}\">\n <label class=\"govuk-label\" for=\"other-flag-type-description\">\n {{\n isDisplayContextParameterExternal\n ? (caseFlagWizardStepTitle.OTHER_FLAG_TYPE_DESCRIPTION_EXTERNAL | rpxTranslate)\n : (caseFlagWizardStepTitle.OTHER_FLAG_TYPE_DESCRIPTION | rpxTranslate)\n }}\n </label>\n <div id=\"flag-type-error-message\" class=\"govuk-error-message\" *ngIf=\"flagTypeErrorMessage.length > 0\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{flagTypeErrorMessage | rpxTranslate}}\n </div>\n <input class=\"govuk-input govuk-!-width-one-half\"\n [ngClass]=\"{'govuk-input--error': flagTypeErrorMessage.length > 0}\"\n id=\"other-flag-type-description\" [name]=\"caseFlagFormField.OTHER_FLAG_DESCRIPTION\" type=\"text\"\n [formControlName]=\"caseFlagFormField.OTHER_FLAG_DESCRIPTION\"/>\n <div class=\"govuk-checkboxes__item govuk-!-margin-top-4\"\n *ngIf=\"!isDisplayContextParameterExternal && !isCaseLevelFlag && isDisplayContextParameter2Point1Enabled\">\n <input class=\"govuk-checkboxes__input\" id=\"is-visible-externally\" type=\"checkbox\"\n [name]=\"caseFlagFormField.IS_VISIBLE_INTERNALLY_ONLY\" [formControlName]=\"caseFlagFormField.IS_VISIBLE_INTERNALLY_ONLY\">\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"is-visible-externally\">\n {{'This flag should only be visible to HMCTS Staff' | rpxTranslate}}\n </label>\n </div>\n </div>\n </div>\n </div>\n </fieldset>\n </div>\n</ng-container>\n\n<div class=\"govuk-button-group\" *ngIf=\"!refdataError\">\n <button class=\"button button-primary\" type=\"button\" (click)=\"onNext()\">{{'Next' | rpxTranslate}}</button>\n</div>\n", styles: [".hidden{display:none}.validation-error{cursor:pointer;text-decoration:underline;color:#d4351c}\n"] }]
24482
- }], () => [{ type: CaseFlagRefdataService }], { formGroup: [{
24910
+ args: [{ selector: 'ccd-select-flag-type', template: "<ng-container *ngIf=\"flagTypes?.length\" [formGroup]=\"formGroup\">\n <div class=\"govuk-form-group\" [ngClass]=\"{'form-group-error': flagTypeNotSelectedErrorMessage.length > 0}\">\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"flag-type-heading\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--m\">\n <h1 id=\"flag-type-heading\" class=\"govuk-fieldset__heading govuk-!-margin-bottom-1\">\n <ng-container *ngIf=\"!cachedFlagType || subJourneyIndex == 0; else priorFlagTypeSelected\">\n {{\n isDisplayContextParameterExternal\n ? (caseFlagWizardStepTitle.SELECT_CASE_FLAG_EXTERNAL | rpxTranslate)\n : (caseFlagWizardStepTitle.SELECT_CASE_FLAG | rpxTranslate)\n }}\n </ng-container>\n <ng-template #priorFlagTypeSelected>\n {{cachedFlagType | flagFieldDisplay:'name'}}\n </ng-template>\n </h1>\n </legend>\n <div id=\"flag-type-not-selected-error-message\" class=\"govuk-error-message\"\n *ngIf=\"flagTypeNotSelectedErrorMessage.length > 0\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{flagTypeNotSelectedErrorMessage |\n rpxTranslate}}\n </div>\n <div class=\"govuk-radios govuk-radios--conditional\" data-module=\"govuk-radios\" id=\"conditional-radios-list\">\n <div class=\"govuk-radios__item\" *ngFor=\"let flagType of flagTypes; index as i; trackBy: identifyFlagType\">\n <input class=\"govuk-radios__input\" id=\"flag-type-{{i}}\" [name]=\"caseFlagFormField.FLAG_TYPE\" type=\"radio\"\n [value]=\"flagType\" [formControlName]=\"caseFlagFormField.FLAG_TYPE\" />\n <label class=\"govuk-label govuk-radios__label\" for=\"flag-type-{{i}}\">\n {{flagType | flagFieldDisplay:'name'}}\n </label>\n </div>\n <div class=\"govuk-radios__conditional\" *ngIf=\"otherFlagTypeSelected\" id=\"conditional-flagType\">\n <div class=\"govuk-form-group\" [ngClass]=\"{'form-group-error': flagTypeErrorMessage.length > 0}\">\n <label class=\"govuk-label\" for=\"other-flag-type-description\">\n {{\n isDisplayContextParameterExternal\n ? (caseFlagWizardStepTitle.OTHER_FLAG_TYPE_DESCRIPTION_EXTERNAL | rpxTranslate)\n : (caseFlagWizardStepTitle.OTHER_FLAG_TYPE_DESCRIPTION | rpxTranslate)\n }}\n </label>\n <div id=\"flag-type-error-message\" class=\"govuk-error-message\" *ngIf=\"flagTypeErrorMessage.length > 0\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{flagTypeErrorMessage |\n rpxTranslate}}\n </div>\n <input class=\"govuk-input govuk-!-width-one-half\"\n [ngClass]=\"{'govuk-input--error': flagTypeErrorMessage.length > 0}\" id=\"other-flag-type-description\"\n [name]=\"caseFlagFormField.OTHER_FLAG_DESCRIPTION\" type=\"text\"\n [formControlName]=\"caseFlagFormField.OTHER_FLAG_DESCRIPTION\" />\n <div class=\"govuk-checkboxes__item govuk-!-margin-top-4\"\n *ngIf=\"!isDisplayContextParameterExternal && !isCaseLevelFlag && isDisplayContextParameter2Point1Enabled\">\n <input class=\"govuk-checkboxes__input\" id=\"is-visible-externally\" type=\"checkbox\"\n [name]=\"caseFlagFormField.IS_VISIBLE_INTERNALLY_ONLY\"\n [formControlName]=\"caseFlagFormField.IS_VISIBLE_INTERNALLY_ONLY\">\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"is-visible-externally\">\n {{'This flag should only be visible to HMCTS Staff' | rpxTranslate}}\n </label>\n </div>\n </div>\n </div>\n </div>\n </fieldset>\n </div>\n</ng-container>", styles: [".hidden{display:none}.validation-error{cursor:pointer;text-decoration:underline;color:#d4351c}\n"] }]
24911
+ }], () => [{ type: CaseFlagRefdataService }, { type: MultipageComponentStateService }], { formGroup: [{
24483
24912
  type: Input
24484
24913
  }], jurisdiction: [{
24485
24914
  type: Input
@@ -24498,35 +24927,35 @@ class SelectFlagTypeComponent {
24498
24927
  }], flagCommentsOptionalEmitter: [{
24499
24928
  type: Output
24500
24929
  }] }); })();
24501
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SelectFlagTypeComponent, { className: "SelectFlagTypeComponent", filePath: "lib/shared/components/palette/case-flag/components/select-flag-type/select-flag-type.component.ts", lineNumber: 18 }); })();
24930
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SelectFlagTypeComponent, { className: "SelectFlagTypeComponent", filePath: "lib/shared/components/palette/case-flag/components/select-flag-type/select-flag-type.component.ts", lineNumber: 19 }); })();
24502
24931
 
24503
24932
  const _c0$n = a0 => ({ "form-group-error": a0 });
24504
24933
  const _c1$7 = a0 => ({ "govuk-tag--grey": a0 });
24505
24934
  function UpdateFlagComponent_div_7_Template(rf, ctx) { if (rf & 1) {
24506
- i0.ɵɵelementStart(0, "div", 17);
24935
+ i0.ɵɵelementStart(0, "div", 15);
24507
24936
  i0.ɵɵtext(1);
24508
24937
  i0.ɵɵpipe(2, "updateFlagTitleDisplay");
24509
24938
  i0.ɵɵelementEnd();
24510
24939
  } if (rf & 2) {
24511
- const ctx_r1 = i0.ɵɵnextContext();
24940
+ const ctx_r0 = i0.ɵɵnextContext();
24512
24941
  i0.ɵɵadvance();
24513
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, ctx_r1.selectedFlag == null ? null : ctx_r1.selectedFlag.flagDetailDisplay == null ? null : ctx_r1.selectedFlag.flagDetailDisplay.flagDetail), " ");
24942
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, ctx_r0.selectedFlag == null ? null : ctx_r0.selectedFlag.flagDetailDisplay == null ? null : ctx_r0.selectedFlag.flagDetailDisplay.flagDetail), " ");
24514
24943
  } }
24515
24944
  function UpdateFlagComponent_div_14_Template(rf, ctx) { if (rf & 1) {
24516
- i0.ɵɵelementStart(0, "div", 18);
24945
+ i0.ɵɵelementStart(0, "div", 16);
24517
24946
  i0.ɵɵtext(1);
24518
24947
  i0.ɵɵpipe(2, "rpxTranslate");
24519
24948
  i0.ɵɵelementEnd();
24520
24949
  } if (rf & 2) {
24521
- const ctx_r1 = i0.ɵɵnextContext();
24950
+ const ctx_r0 = i0.ɵɵnextContext();
24522
24951
  i0.ɵɵadvance();
24523
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, ctx_r1.updateFlagStepEnum.COMMENT_HINT_TEXT_EXTERNAL), " ");
24952
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, ctx_r0.updateFlagStepEnum.COMMENT_HINT_TEXT_EXTERNAL), " ");
24524
24953
  } }
24525
24954
  function UpdateFlagComponent_ng_container_15_div_5_Template(rf, ctx) { if (rf & 1) {
24526
- i0.ɵɵelementStart(0, "div", 25)(1, "span", 26);
24955
+ i0.ɵɵelementStart(0, "div", 23)(1, "span", 24);
24527
24956
  i0.ɵɵtext(2, "!");
24528
24957
  i0.ɵɵelementEnd();
24529
- i0.ɵɵelementStart(3, "strong", 27)(4, "span", 28);
24958
+ i0.ɵɵelementStart(3, "strong", 25)(4, "span", 26);
24530
24959
  i0.ɵɵtext(5);
24531
24960
  i0.ɵɵpipe(6, "rpxTranslate");
24532
24961
  i0.ɵɵelementEnd();
@@ -24534,14 +24963,14 @@ function UpdateFlagComponent_ng_container_15_div_5_Template(rf, ctx) { if (rf &
24534
24963
  i0.ɵɵpipe(8, "rpxTranslate");
24535
24964
  i0.ɵɵelementEnd()();
24536
24965
  } if (rf & 2) {
24537
- const ctx_r1 = i0.ɵɵnextContext(2);
24966
+ const ctx_r0 = i0.ɵɵnextContext(2);
24538
24967
  i0.ɵɵadvance(5);
24539
24968
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 2, "Warning"));
24540
24969
  i0.ɵɵadvance(2);
24541
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(8, 4, ctx_r1.updateFlagStepEnum.WARNING_TEXT), " ");
24970
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(8, 4, ctx_r0.updateFlagStepEnum.WARNING_TEXT), " ");
24542
24971
  } }
24543
24972
  function UpdateFlagComponent_ng_container_15_div_6_Template(rf, ctx) { if (rf & 1) {
24544
- i0.ɵɵelementStart(0, "div", 29)(1, "span", 30);
24973
+ i0.ɵɵelementStart(0, "div", 27)(1, "span", 28);
24545
24974
  i0.ɵɵtext(2);
24546
24975
  i0.ɵɵpipe(3, "rpxTranslate");
24547
24976
  i0.ɵɵelementEnd();
@@ -24549,14 +24978,14 @@ function UpdateFlagComponent_ng_container_15_div_6_Template(rf, ctx) { if (rf &
24549
24978
  i0.ɵɵpipe(5, "rpxTranslate");
24550
24979
  i0.ɵɵelementEnd();
24551
24980
  } if (rf & 2) {
24552
- const ctx_r1 = i0.ɵɵnextContext(2);
24981
+ const ctx_r0 = i0.ɵɵnextContext(2);
24553
24982
  i0.ɵɵadvance(2);
24554
24983
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 2, "Error:"));
24555
24984
  i0.ɵɵadvance(2);
24556
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 4, ctx_r1.commentsNotEnteredErrorMessage), " ");
24985
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 4, ctx_r0.commentsNotEnteredErrorMessage), " ");
24557
24986
  } }
24558
24987
  function UpdateFlagComponent_ng_container_15_div_7_Template(rf, ctx) { if (rf & 1) {
24559
- i0.ɵɵelementStart(0, "div", 31)(1, "span", 30);
24988
+ i0.ɵɵelementStart(0, "div", 29)(1, "span", 28);
24560
24989
  i0.ɵɵtext(2);
24561
24990
  i0.ɵɵpipe(3, "rpxTranslate");
24562
24991
  i0.ɵɵelementEnd();
@@ -24564,64 +24993,64 @@ function UpdateFlagComponent_ng_container_15_div_7_Template(rf, ctx) { if (rf &
24564
24993
  i0.ɵɵpipe(5, "rpxTranslate");
24565
24994
  i0.ɵɵelementEnd();
24566
24995
  } if (rf & 2) {
24567
- const ctx_r1 = i0.ɵɵnextContext(2);
24996
+ const ctx_r0 = i0.ɵɵnextContext(2);
24568
24997
  i0.ɵɵadvance(2);
24569
24998
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 2, "Error:"));
24570
24999
  i0.ɵɵadvance(2);
24571
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 4, ctx_r1.commentsCharLimitErrorMessage), " ");
25000
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 4, ctx_r0.commentsCharLimitErrorMessage), " ");
24572
25001
  } }
24573
25002
  function UpdateFlagComponent_ng_container_15_Template(rf, ctx) { if (rf & 1) {
24574
25003
  i0.ɵɵelementContainerStart(0);
24575
- i0.ɵɵelementStart(1, "div", 19);
25004
+ i0.ɵɵelementStart(1, "div", 17);
24576
25005
  i0.ɵɵtext(2);
24577
25006
  i0.ɵɵpipe(3, "rpxTranslate");
24578
25007
  i0.ɵɵpipe(4, "rpxTranslate");
24579
25008
  i0.ɵɵelementEnd();
24580
- i0.ɵɵtemplate(5, UpdateFlagComponent_ng_container_15_div_5_Template, 9, 6, "div", 20)(6, UpdateFlagComponent_ng_container_15_div_6_Template, 6, 6, "div", 21)(7, UpdateFlagComponent_ng_container_15_div_7_Template, 6, 6, "div", 22);
24581
- i0.ɵɵelementStart(8, "textarea", 23);
25009
+ i0.ɵɵtemplate(5, UpdateFlagComponent_ng_container_15_div_5_Template, 9, 6, "div", 18)(6, UpdateFlagComponent_ng_container_15_div_6_Template, 6, 6, "div", 19)(7, UpdateFlagComponent_ng_container_15_div_7_Template, 6, 6, "div", 20);
25010
+ i0.ɵɵelementStart(8, "textarea", 21);
24582
25011
  i0.ɵɵtext(9, " ");
24583
25012
  i0.ɵɵelementEnd();
24584
- i0.ɵɵelementStart(10, "div", 24);
25013
+ i0.ɵɵelementStart(10, "div", 22);
24585
25014
  i0.ɵɵtext(11);
24586
25015
  i0.ɵɵpipe(12, "rpxTranslate");
24587
25016
  i0.ɵɵelementEnd();
24588
25017
  i0.ɵɵelementContainerEnd();
24589
25018
  } if (rf & 2) {
24590
- const ctx_r1 = i0.ɵɵnextContext();
25019
+ const ctx_r0 = i0.ɵɵnextContext();
24591
25020
  i0.ɵɵadvance(2);
24592
- i0.ɵɵtextInterpolate1(" ", ctx_r1.internalUserUpdate ? i0.ɵɵpipeBind1(3, 8, ctx_r1.updateFlagStepEnum.COMMENT_HINT_TEXT_INTERNAL) : i0.ɵɵpipeBind1(4, 10, ctx_r1.updateFlagStepEnum.COMMENT_HINT_TEXT_INTERNAL_2_POINT_1), " ");
25021
+ i0.ɵɵtextInterpolate1(" ", ctx_r0.internalUserUpdate ? i0.ɵɵpipeBind1(3, 8, ctx_r0.updateFlagStepEnum.COMMENT_HINT_TEXT_INTERNAL) : i0.ɵɵpipeBind1(4, 10, ctx_r0.updateFlagStepEnum.COMMENT_HINT_TEXT_INTERNAL_2_POINT_1), " ");
24593
25022
  i0.ɵɵadvance(3);
24594
- i0.ɵɵproperty("ngIf", ctx_r1.internalUser2Point1EnabledUpdate && ctx_r1.externallyVisibleFlag);
25023
+ i0.ɵɵproperty("ngIf", ctx_r0.internalUser2Point1EnabledUpdate && ctx_r0.externallyVisibleFlag);
24595
25024
  i0.ɵɵadvance();
24596
- i0.ɵɵproperty("ngIf", ctx_r1.commentsNotEnteredErrorMessage);
25025
+ i0.ɵɵproperty("ngIf", ctx_r0.commentsNotEnteredErrorMessage);
24597
25026
  i0.ɵɵadvance();
24598
- i0.ɵɵproperty("ngIf", ctx_r1.commentsCharLimitErrorMessage);
25027
+ i0.ɵɵproperty("ngIf", ctx_r0.commentsCharLimitErrorMessage);
24599
25028
  i0.ɵɵadvance();
24600
- i0.ɵɵproperty("id", ctx_r1.caseFlagFormFields.COMMENTS)("name", ctx_r1.caseFlagFormFields.COMMENTS)("formControlName", ctx_r1.caseFlagFormFields.COMMENTS);
25029
+ i0.ɵɵproperty("id", ctx_r0.caseFlagFormFields.COMMENTS)("name", ctx_r0.caseFlagFormFields.COMMENTS)("formControlName", ctx_r0.caseFlagFormFields.COMMENTS);
24601
25030
  i0.ɵɵadvance(3);
24602
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(12, 12, ctx_r1.updateFlagStepEnum.CHARACTER_LIMIT_INFO), " ");
25031
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(12, 12, ctx_r0.updateFlagStepEnum.CHARACTER_LIMIT_INFO), " ");
24603
25032
  } }
24604
25033
  function UpdateFlagComponent_ng_template_16_ng_container_0_ng_container_1_Template(rf, ctx) { if (rf & 1) {
24605
25034
  i0.ɵɵelementContainer(0);
24606
25035
  } }
24607
25036
  function UpdateFlagComponent_ng_template_16_ng_container_0_Template(rf, ctx) { if (rf & 1) {
24608
25037
  i0.ɵɵelementContainerStart(0);
24609
- i0.ɵɵtemplate(1, UpdateFlagComponent_ng_template_16_ng_container_0_ng_container_1_Template, 1, 0, "ng-container", 33);
25038
+ i0.ɵɵtemplate(1, UpdateFlagComponent_ng_template_16_ng_container_0_ng_container_1_Template, 1, 0, "ng-container", 31);
24610
25039
  i0.ɵɵelementContainerEnd();
24611
25040
  } if (rf & 2) {
24612
25041
  i0.ɵɵnextContext(2);
24613
- const updateFlagStatusReason_r3 = i0.ɵɵreference(19);
25042
+ const updateFlagStatusReason_r2 = i0.ɵɵreference(19);
24614
25043
  i0.ɵɵadvance();
24615
- i0.ɵɵproperty("ngTemplateOutlet", updateFlagStatusReason_r3);
25044
+ i0.ɵɵproperty("ngTemplateOutlet", updateFlagStatusReason_r2);
24616
25045
  } }
24617
25046
  function UpdateFlagComponent_ng_template_16_Template(rf, ctx) { if (rf & 1) {
24618
- i0.ɵɵtemplate(0, UpdateFlagComponent_ng_template_16_ng_container_0_Template, 2, 1, "ng-container", 32);
25047
+ i0.ɵɵtemplate(0, UpdateFlagComponent_ng_template_16_ng_container_0_Template, 2, 1, "ng-container", 30);
24619
25048
  } if (rf & 2) {
24620
- const ctx_r1 = i0.ɵɵnextContext();
24621
- i0.ɵɵproperty("ngIf", ctx_r1.externalUserUpdate);
25049
+ const ctx_r0 = i0.ɵɵnextContext();
25050
+ i0.ɵɵproperty("ngIf", ctx_r0.externalUserUpdate);
24622
25051
  } }
24623
25052
  function UpdateFlagComponent_ng_template_18_div_0_Template(rf, ctx) { if (rf & 1) {
24624
- i0.ɵɵelementStart(0, "div", 38)(1, "span", 30);
25053
+ i0.ɵɵelementStart(0, "div", 36)(1, "span", 28);
24625
25054
  i0.ɵɵtext(2);
24626
25055
  i0.ɵɵpipe(3, "rpxTranslate");
24627
25056
  i0.ɵɵelementEnd();
@@ -24629,14 +25058,14 @@ function UpdateFlagComponent_ng_template_18_div_0_Template(rf, ctx) { if (rf & 1
24629
25058
  i0.ɵɵpipe(5, "rpxTranslate");
24630
25059
  i0.ɵɵelementEnd();
24631
25060
  } if (rf & 2) {
24632
- const ctx_r1 = i0.ɵɵnextContext(2);
25061
+ const ctx_r0 = i0.ɵɵnextContext(2);
24633
25062
  i0.ɵɵadvance(2);
24634
25063
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 2, "Error:"));
24635
25064
  i0.ɵɵadvance(2);
24636
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 4, ctx_r1.statusReasonNotEnteredErrorMessage), " ");
25065
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 4, ctx_r0.statusReasonNotEnteredErrorMessage), " ");
24637
25066
  } }
24638
25067
  function UpdateFlagComponent_ng_template_18_div_1_Template(rf, ctx) { if (rf & 1) {
24639
- i0.ɵɵelementStart(0, "div", 39)(1, "span", 30);
25068
+ i0.ɵɵelementStart(0, "div", 37)(1, "span", 28);
24640
25069
  i0.ɵɵtext(2);
24641
25070
  i0.ɵɵpipe(3, "rpxTranslate");
24642
25071
  i0.ɵɵelementEnd();
@@ -24644,100 +25073,100 @@ function UpdateFlagComponent_ng_template_18_div_1_Template(rf, ctx) { if (rf & 1
24644
25073
  i0.ɵɵpipe(5, "rpxTranslate");
24645
25074
  i0.ɵɵelementEnd();
24646
25075
  } if (rf & 2) {
24647
- const ctx_r1 = i0.ɵɵnextContext(2);
25076
+ const ctx_r0 = i0.ɵɵnextContext(2);
24648
25077
  i0.ɵɵadvance(2);
24649
25078
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 2, "Error:"));
24650
25079
  i0.ɵɵadvance(2);
24651
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 4, ctx_r1.statusReasonCharLimitErrorMessage), " ");
25080
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 4, ctx_r0.statusReasonCharLimitErrorMessage), " ");
24652
25081
  } }
24653
25082
  function UpdateFlagComponent_ng_template_18_Template(rf, ctx) { if (rf & 1) {
24654
- i0.ɵɵtemplate(0, UpdateFlagComponent_ng_template_18_div_0_Template, 6, 6, "div", 34)(1, UpdateFlagComponent_ng_template_18_div_1_Template, 6, 6, "div", 35);
24655
- i0.ɵɵelementStart(2, "textarea", 36);
25083
+ i0.ɵɵtemplate(0, UpdateFlagComponent_ng_template_18_div_0_Template, 6, 6, "div", 32)(1, UpdateFlagComponent_ng_template_18_div_1_Template, 6, 6, "div", 33);
25084
+ i0.ɵɵelementStart(2, "textarea", 34);
24656
25085
  i0.ɵɵtext(3, " ");
24657
25086
  i0.ɵɵelementEnd();
24658
- i0.ɵɵelementStart(4, "div", 37);
25087
+ i0.ɵɵelementStart(4, "div", 35);
24659
25088
  i0.ɵɵtext(5);
24660
25089
  i0.ɵɵpipe(6, "rpxTranslate");
24661
25090
  i0.ɵɵelementEnd();
24662
25091
  } if (rf & 2) {
24663
- const ctx_r1 = i0.ɵɵnextContext();
24664
- i0.ɵɵproperty("ngIf", ctx_r1.statusReasonNotEnteredErrorMessage);
25092
+ const ctx_r0 = i0.ɵɵnextContext();
25093
+ i0.ɵɵproperty("ngIf", ctx_r0.statusReasonNotEnteredErrorMessage);
24665
25094
  i0.ɵɵadvance();
24666
- i0.ɵɵproperty("ngIf", ctx_r1.statusReasonCharLimitErrorMessage);
25095
+ i0.ɵɵproperty("ngIf", ctx_r0.statusReasonCharLimitErrorMessage);
24667
25096
  i0.ɵɵadvance();
24668
- i0.ɵɵproperty("id", ctx_r1.caseFlagFormFields.STATUS_CHANGE_REASON)("name", ctx_r1.caseFlagFormFields.STATUS_CHANGE_REASON)("formControlName", ctx_r1.caseFlagFormFields.STATUS_CHANGE_REASON);
25097
+ i0.ɵɵproperty("id", ctx_r0.caseFlagFormFields.STATUS_CHANGE_REASON)("name", ctx_r0.caseFlagFormFields.STATUS_CHANGE_REASON)("formControlName", ctx_r0.caseFlagFormFields.STATUS_CHANGE_REASON);
24669
25098
  i0.ɵɵadvance(3);
24670
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 6, ctx_r1.updateFlagStepEnum.CHARACTER_LIMIT_INFO), " ");
25099
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 6, ctx_r0.updateFlagStepEnum.CHARACTER_LIMIT_INFO), " ");
24671
25100
  } }
24672
25101
  function UpdateFlagComponent_div_20_div_8_Template(rf, ctx) { if (rf & 1) {
24673
- i0.ɵɵelementStart(0, "div", 47);
24674
- i0.ɵɵelement(1, "input", 48);
24675
- i0.ɵɵelementStart(2, "label", 49);
25102
+ i0.ɵɵelementStart(0, "div", 45);
25103
+ i0.ɵɵelement(1, "input", 46);
25104
+ i0.ɵɵelementStart(2, "label", 47);
24676
25105
  i0.ɵɵtext(3);
24677
25106
  i0.ɵɵpipe(4, "rpxTranslate");
24678
25107
  i0.ɵɵelementEnd()();
24679
25108
  } if (rf & 2) {
24680
- const status_r4 = ctx.$implicit;
24681
- const ctx_r1 = i0.ɵɵnextContext(2);
25109
+ const status_r3 = ctx.$implicit;
25110
+ const ctx_r0 = i0.ɵɵnextContext(2);
24682
25111
  i0.ɵɵadvance();
24683
- i0.ɵɵproperty("id", ctx_r1.caseFlagFormFields.STATUS + "_" + status_r4)("name", ctx_r1.caseFlagFormFields.STATUS)("formControlName", ctx_r1.caseFlagFormFields.STATUS)("value", status_r4);
25112
+ i0.ɵɵproperty("id", ctx_r0.caseFlagFormFields.STATUS + "_" + status_r3)("name", ctx_r0.caseFlagFormFields.STATUS)("formControlName", ctx_r0.caseFlagFormFields.STATUS)("value", status_r3);
24684
25113
  i0.ɵɵadvance();
24685
- i0.ɵɵproperty("for", ctx_r1.caseFlagFormFields.STATUS + "_" + status_r4);
25114
+ i0.ɵɵproperty("for", ctx_r0.caseFlagFormFields.STATUS + "_" + status_r3);
24686
25115
  i0.ɵɵadvance();
24687
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(4, 6, ctx_r1.caseFlagStatusEnum[status_r4]), " ");
25116
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(4, 6, ctx_r0.caseFlagStatusEnum[status_r3]), " ");
24688
25117
  } }
24689
25118
  function UpdateFlagComponent_div_20_ng_container_12_Template(rf, ctx) { if (rf & 1) {
24690
25119
  i0.ɵɵelementContainer(0);
24691
25120
  } }
24692
25121
  function UpdateFlagComponent_div_20_Template(rf, ctx) { if (rf & 1) {
24693
- i0.ɵɵelementStart(0, "div", 40)(1, "fieldset", 41)(2, "legend", 42)(3, "h1", 43);
25122
+ i0.ɵɵelementStart(0, "div", 38)(1, "fieldset", 39)(2, "legend", 40)(3, "h1", 41);
24694
25123
  i0.ɵɵtext(4);
24695
25124
  i0.ɵɵpipe(5, "rpxTranslate");
24696
25125
  i0.ɵɵpipe(6, "rpxTranslate");
24697
25126
  i0.ɵɵelementEnd()();
24698
- i0.ɵɵelementStart(7, "div", 44);
24699
- i0.ɵɵtemplate(8, UpdateFlagComponent_div_20_div_8_Template, 5, 8, "div", 45);
25127
+ i0.ɵɵelementStart(7, "div", 42);
25128
+ i0.ɵɵtemplate(8, UpdateFlagComponent_div_20_div_8_Template, 5, 8, "div", 43);
24700
25129
  i0.ɵɵelementEnd()();
24701
- i0.ɵɵelementStart(9, "div", 46);
25130
+ i0.ɵɵelementStart(9, "div", 44);
24702
25131
  i0.ɵɵtext(10);
24703
25132
  i0.ɵɵpipe(11, "rpxTranslate");
24704
25133
  i0.ɵɵelementEnd();
24705
- i0.ɵɵtemplate(12, UpdateFlagComponent_div_20_ng_container_12_Template, 1, 0, "ng-container", 33);
25134
+ i0.ɵɵtemplate(12, UpdateFlagComponent_div_20_ng_container_12_Template, 1, 0, "ng-container", 31);
24706
25135
  i0.ɵɵelementEnd();
24707
25136
  } if (rf & 2) {
24708
- const ctx_r1 = i0.ɵɵnextContext();
24709
- const updateFlagStatusReason_r3 = i0.ɵɵreference(19);
25137
+ const ctx_r0 = i0.ɵɵnextContext();
25138
+ const updateFlagStatusReason_r2 = i0.ɵɵreference(19);
24710
25139
  i0.ɵɵadvance(4);
24711
- i0.ɵɵtextInterpolate2(" ", i0.ɵɵpipeBind1(5, 6, ctx_r1.updateFlagTitle), " ", i0.ɵɵpipeBind1(6, 8, "status"), " ");
25140
+ i0.ɵɵtextInterpolate2(" ", i0.ɵɵpipeBind1(5, 6, ctx_r0.updateFlagTitle), " ", i0.ɵɵpipeBind1(6, 8, "status"), " ");
24712
25141
  i0.ɵɵadvance(3);
24713
- i0.ɵɵproperty("id", ctx_r1.caseFlagFormFields.STATUS);
25142
+ i0.ɵɵproperty("id", ctx_r0.caseFlagFormFields.STATUS);
24714
25143
  i0.ɵɵadvance();
24715
- i0.ɵɵproperty("ngForOf", ctx_r1.validStatusProgressions);
25144
+ i0.ɵɵproperty("ngForOf", ctx_r0.validStatusProgressions);
24716
25145
  i0.ɵɵadvance(2);
24717
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(11, 10, ctx_r1.updateFlagStepEnum.STATUS_HINT_TEXT), " ");
25146
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(11, 10, ctx_r0.updateFlagStepEnum.STATUS_HINT_TEXT), " ");
24718
25147
  i0.ɵɵadvance(2);
24719
- i0.ɵɵproperty("ngTemplateOutlet", updateFlagStatusReason_r3);
25148
+ i0.ɵɵproperty("ngTemplateOutlet", updateFlagStatusReason_r2);
24720
25149
  } }
24721
25150
  function UpdateFlagComponent_div_21_Template(rf, ctx) { if (rf & 1) {
24722
- i0.ɵɵelementStart(0, "div", 50)(1, "div", 51)(2, "div", 52);
24723
- i0.ɵɵelement(3, "input", 53);
24724
- i0.ɵɵelementStart(4, "label", 54);
25151
+ i0.ɵɵelementStart(0, "div", 48)(1, "div", 49)(2, "div", 50);
25152
+ i0.ɵɵelement(3, "input", 51);
25153
+ i0.ɵɵelementStart(4, "label", 52);
24725
25154
  i0.ɵɵtext(5);
24726
25155
  i0.ɵɵpipe(6, "rpxTranslate");
24727
25156
  i0.ɵɵelementEnd()()()();
24728
25157
  } if (rf & 2) {
24729
- const ctx_r1 = i0.ɵɵnextContext();
25158
+ const ctx_r0 = i0.ɵɵnextContext();
24730
25159
  i0.ɵɵadvance(3);
24731
- i0.ɵɵproperty("formControlName", ctx_r1.caseFlagFormFields.IS_WELSH_TRANSLATION_NEEDED)("id", ctx_r1.caseFlagFormFields.IS_WELSH_TRANSLATION_NEEDED)("name", ctx_r1.caseFlagFormFields.IS_WELSH_TRANSLATION_NEEDED);
25160
+ i0.ɵɵproperty("formControlName", ctx_r0.caseFlagFormFields.IS_WELSH_TRANSLATION_NEEDED)("id", ctx_r0.caseFlagFormFields.IS_WELSH_TRANSLATION_NEEDED)("name", ctx_r0.caseFlagFormFields.IS_WELSH_TRANSLATION_NEEDED);
24732
25161
  i0.ɵɵadvance();
24733
- i0.ɵɵproperty("for", ctx_r1.caseFlagFormFields.IS_WELSH_TRANSLATION_NEEDED);
25162
+ i0.ɵɵproperty("for", ctx_r0.caseFlagFormFields.IS_WELSH_TRANSLATION_NEEDED);
24734
25163
  i0.ɵɵadvance();
24735
25164
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 5, "I need to add a translation"), " ");
24736
25165
  } }
24737
25166
  function UpdateFlagComponent_div_22_button_10_Template(rf, ctx) { if (rf & 1) {
24738
- const _r5 = i0.ɵɵgetCurrentView();
24739
- i0.ɵɵelementStart(0, "button", 59);
24740
- i0.ɵɵlistener("click", function UpdateFlagComponent_div_22_button_10_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onMakeInactive()); });
25167
+ const _r4 = i0.ɵɵgetCurrentView();
25168
+ i0.ɵɵelementStart(0, "button", 57);
25169
+ i0.ɵɵlistener("click", function UpdateFlagComponent_div_22_button_10_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.onMakeInactive()); });
24741
25170
  i0.ɵɵtext(1);
24742
25171
  i0.ɵɵpipe(2, "rpxTranslate");
24743
25172
  i0.ɵɵelementEnd();
@@ -24746,28 +25175,28 @@ function UpdateFlagComponent_div_22_button_10_Template(rf, ctx) { if (rf & 1) {
24746
25175
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "Make inactive"), " ");
24747
25176
  } }
24748
25177
  function UpdateFlagComponent_div_22_Template(rf, ctx) { if (rf & 1) {
24749
- i0.ɵɵelementStart(0, "div", 55)(1, "div", 56)(2, "p");
25178
+ i0.ɵɵelementStart(0, "div", 53)(1, "div", 54)(2, "p");
24750
25179
  i0.ɵɵtext(3);
24751
25180
  i0.ɵɵpipe(4, "rpxTranslate");
24752
- i0.ɵɵelementStart(5, "span")(6, "strong", 57);
25181
+ i0.ɵɵelementStart(5, "span")(6, "strong", 55);
24753
25182
  i0.ɵɵtext(7);
24754
25183
  i0.ɵɵpipe(8, "rpxTranslate");
24755
25184
  i0.ɵɵelementEnd()()()();
24756
- i0.ɵɵelementStart(9, "div", 56);
24757
- i0.ɵɵtemplate(10, UpdateFlagComponent_div_22_button_10_Template, 3, 3, "button", 58);
25185
+ i0.ɵɵelementStart(9, "div", 54);
25186
+ i0.ɵɵtemplate(10, UpdateFlagComponent_div_22_button_10_Template, 3, 3, "button", 56);
24758
25187
  i0.ɵɵelementEnd()();
24759
25188
  } if (rf & 2) {
24760
- const ctx_r1 = i0.ɵɵnextContext();
25189
+ const ctx_r0 = i0.ɵɵnextContext();
24761
25190
  i0.ɵɵadvance(3);
24762
25191
  i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(4, 4, "Flag status:"), " ");
24763
25192
  i0.ɵɵadvance(3);
24764
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c1$7, ctx_r1.selectedFlag.flagDetailDisplay.flagDetail.status === "Inactive"));
25193
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c1$7, ctx_r0.selectedFlag.flagDetailDisplay.flagDetail.status === "Inactive"));
24765
25194
  i0.ɵɵadvance();
24766
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(8, 6, ctx_r1.selectedFlag == null ? null : ctx_r1.selectedFlag.flagDetailDisplay == null ? null : ctx_r1.selectedFlag.flagDetailDisplay.flagDetail == null ? null : ctx_r1.selectedFlag.flagDetailDisplay.flagDetail.status), " ");
25195
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(8, 6, ctx_r0.selectedFlag == null ? null : ctx_r0.selectedFlag.flagDetailDisplay == null ? null : ctx_r0.selectedFlag.flagDetailDisplay.flagDetail == null ? null : ctx_r0.selectedFlag.flagDetailDisplay.flagDetail.status), " ");
24767
25196
  i0.ɵɵadvance(3);
24768
- i0.ɵɵproperty("ngIf", ctx_r1.selectedFlag.flagDetailDisplay.flagDetail.status === "Active");
25197
+ i0.ɵɵproperty("ngIf", ctx_r0.selectedFlag.flagDetailDisplay.flagDetail.status === "Active");
24769
25198
  } }
24770
- class UpdateFlagComponent {
25199
+ class UpdateFlagComponent extends AbstractJourneyComponent {
24771
25200
  rpxTranslationService;
24772
25201
  formGroup;
24773
25202
  displayContextParameter;
@@ -24793,7 +25222,8 @@ class UpdateFlagComponent {
24793
25222
  get externallyVisibleFlag() {
24794
25223
  return this.selectedFlag.flagDetailDisplay.visibility?.toLowerCase() === 'external';
24795
25224
  }
24796
- constructor(rpxTranslationService) {
25225
+ constructor(rpxTranslationService, multipageComponentStateService) {
25226
+ super(multipageComponentStateService);
24797
25227
  this.rpxTranslationService = rpxTranslationService;
24798
25228
  }
24799
25229
  ngOnInit() {
@@ -24940,9 +25370,14 @@ class UpdateFlagComponent {
24940
25370
  });
24941
25371
  }
24942
25372
  }
24943
- static ɵfac = function UpdateFlagComponent_Factory(t) { return new (t || UpdateFlagComponent)(i0.ɵɵdirectiveInject(i1.RpxTranslationService)); };
24944
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UpdateFlagComponent, selectors: [["ccd-update-flag"]], inputs: { formGroup: "formGroup", displayContextParameter: "displayContextParameter" }, outputs: { caseFlagStateEmitter: "caseFlagStateEmitter" }, decls: 27, vars: 25, consts: [["externalUser", ""], ["updateFlagStatusReason", ""], [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-4"], [1, "govuk-label", "govuk-label--m"], ["id", "update-flag-hint-external", "class", "govuk-hint", 4, "ngIf"], [1, "govuk-!-margin-bottom-4"], [1, "govuk-label", "govuk-label--s", 3, "for"], ["id", "update-flag-comments-hint-external", "class", "govuk-hint", 4, "ngIf"], [4, "ngIf", "ngIfElse"], ["id", "flag-status-container-v2_1", "class", "govuk-!-margin-bottom-4", 4, "ngIf"], ["id", "translation-checkbox-container", "class", "govuk-!-margin-bottom-6", 4, "ngIf"], ["id", "flag-status-container-v1", "class", "govuk-grid-row", 4, "ngIf"], [1, "govuk-button-group"], ["id", "updateFlagNextButton", "type", "button", 1, "govuk-button", 3, "click"], ["id", "update-flag-hint-external", 1, "govuk-hint"], ["id", "update-flag-comments-hint-external", 1, "govuk-hint"], ["id", "update-flag-comments-hint", 1, "govuk-hint"], ["class", "govuk-warning-text", 4, "ngIf"], ["id", "update-flag-comments-not-entered-error-message", "class", "govuk-error-message", 4, "ngIf"], ["id", "update-flag-comments-char-limit-error", "class", "govuk-error-message", 4, "ngIf"], ["rows", "5", "aria-describedby", "update-flag-comments-hint update-flag-comments-char-limit-info update-flag-comments-char-limit-error", 1, "govuk-textarea", 3, "id", "name", "formControlName"], ["id", "update-flag-comments-char-limit-info", "aria-live", "polite", 1, "govuk-hint", "govuk-character-count__message"], [1, "govuk-warning-text"], ["aria-hidden", "true", 1, "govuk-warning-text__icon"], [1, "govuk-warning-text__text"], [1, "govuk-warning-text__assistive"], ["id", "update-flag-comments-not-entered-error-message", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], ["id", "update-flag-comments-char-limit-error", 1, "govuk-error-message"], [4, "ngIf"], [4, "ngTemplateOutlet"], ["id", "update-flag-status-reason-not-entered-error-message", "class", "govuk-error-message", 4, "ngIf"], ["id", "update-flag-status-reason-char-limit-error", "class", "govuk-error-message", 4, "ngIf"], ["rows", "5", "aria-describedby", "update-flag-comments-hint-external update-flag-status-hint update-flag-status-reason-char-limit-info\n update-flag-status-reason-char-limit-error", 1, "govuk-textarea", 3, "id", "name", "formControlName"], ["id", "update-flag-status-reason-char-limit-info", "aria-live", "polite", 1, "govuk-hint", "govuk-character-count__message"], ["id", "update-flag-status-reason-not-entered-error-message", 1, "govuk-error-message"], ["id", "update-flag-status-reason-char-limit-error", 1, "govuk-error-message"], ["id", "flag-status-container-v2_1", 1, "govuk-!-margin-bottom-4"], ["aria-describedby", "update-flag-status-heading", 1, "govuk-fieldset"], [1, "govuk-fieldset__legend", "govuk-fieldset__legend--s"], ["id", "update-flag-status-heading", 1, "govuk-fieldset__heading"], ["data-module", "govuk-radios", 1, "govuk-radios", "govuk-radios--conditional", "govuk-!-margin-bottom-4", 3, "id"], ["class", "govuk-radios__item", 4, "ngFor", "ngForOf"], ["id", "update-flag-status-hint", 1, "govuk-hint"], [1, "govuk-radios__item"], ["type", "radio", 1, "govuk-radios__input", 3, "id", "name", "formControlName", "value"], [1, "govuk-label", "govuk-radios__label", 3, "for"], ["id", "translation-checkbox-container", 1, "govuk-!-margin-bottom-6"], ["data-module", "govuk-checkboxes", 1, "govuk-checkboxes"], [1, "govuk-checkboxes__item"], ["type", "checkbox", 1, "govuk-checkboxes__input", 3, "formControlName", "id", "name"], [1, "govuk-label", "govuk-checkboxes__label", 3, "for"], ["id", "flag-status-container-v1", 1, "govuk-grid-row"], [1, "govuk-grid-column-one-half"], [1, "govuk-tag", 3, "ngClass"], ["class", "button button-secondary", "type", "button", 3, "click", 4, "ngIf"], ["type", "button", 1, "button", "button-secondary", 3, "click"]], template: function UpdateFlagComponent_Template(rf, ctx) { if (rf & 1) {
24945
- const _r1 = i0.ɵɵgetCurrentView();
25373
+ next() {
25374
+ this.onNext();
25375
+ if (this.errorMessages.length === 0) {
25376
+ super.next();
25377
+ }
25378
+ }
25379
+ static ɵfac = function UpdateFlagComponent_Factory(t) { return new (t || UpdateFlagComponent)(i0.ɵɵdirectiveInject(i1.RpxTranslationService), i0.ɵɵdirectiveInject(MultipageComponentStateService)); };
25380
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UpdateFlagComponent, selectors: [["ccd-update-flag"]], inputs: { formGroup: "formGroup", displayContextParameter: "displayContextParameter" }, outputs: { caseFlagStateEmitter: "caseFlagStateEmitter" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 23, vars: 22, consts: [["externalUser", ""], ["updateFlagStatusReason", ""], [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-4"], [1, "govuk-label", "govuk-label--m"], ["id", "update-flag-hint-external", "class", "govuk-hint", 4, "ngIf"], [1, "govuk-!-margin-bottom-4"], [1, "govuk-label", "govuk-label--s", 3, "for"], ["id", "update-flag-comments-hint-external", "class", "govuk-hint", 4, "ngIf"], [4, "ngIf", "ngIfElse"], ["id", "flag-status-container-v2_1", "class", "govuk-!-margin-bottom-4", 4, "ngIf"], ["id", "translation-checkbox-container", "class", "govuk-!-margin-bottom-6", 4, "ngIf"], ["id", "flag-status-container-v1", "class", "govuk-grid-row", 4, "ngIf"], ["id", "update-flag-hint-external", 1, "govuk-hint"], ["id", "update-flag-comments-hint-external", 1, "govuk-hint"], ["id", "update-flag-comments-hint", 1, "govuk-hint"], ["class", "govuk-warning-text", 4, "ngIf"], ["id", "update-flag-comments-not-entered-error-message", "class", "govuk-error-message", 4, "ngIf"], ["id", "update-flag-comments-char-limit-error", "class", "govuk-error-message", 4, "ngIf"], ["rows", "5", "aria-describedby", "update-flag-comments-hint update-flag-comments-char-limit-info update-flag-comments-char-limit-error", 1, "govuk-textarea", 3, "id", "name", "formControlName"], ["id", "update-flag-comments-char-limit-info", "aria-live", "polite", 1, "govuk-hint", "govuk-character-count__message"], [1, "govuk-warning-text"], ["aria-hidden", "true", 1, "govuk-warning-text__icon"], [1, "govuk-warning-text__text"], [1, "govuk-warning-text__assistive"], ["id", "update-flag-comments-not-entered-error-message", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], ["id", "update-flag-comments-char-limit-error", 1, "govuk-error-message"], [4, "ngIf"], [4, "ngTemplateOutlet"], ["id", "update-flag-status-reason-not-entered-error-message", "class", "govuk-error-message", 4, "ngIf"], ["id", "update-flag-status-reason-char-limit-error", "class", "govuk-error-message", 4, "ngIf"], ["rows", "5", "aria-describedby", "update-flag-comments-hint-external update-flag-status-hint update-flag-status-reason-char-limit-info\n update-flag-status-reason-char-limit-error", 1, "govuk-textarea", 3, "id", "name", "formControlName"], ["id", "update-flag-status-reason-char-limit-info", "aria-live", "polite", 1, "govuk-hint", "govuk-character-count__message"], ["id", "update-flag-status-reason-not-entered-error-message", 1, "govuk-error-message"], ["id", "update-flag-status-reason-char-limit-error", 1, "govuk-error-message"], ["id", "flag-status-container-v2_1", 1, "govuk-!-margin-bottom-4"], ["aria-describedby", "update-flag-status-heading", 1, "govuk-fieldset"], [1, "govuk-fieldset__legend", "govuk-fieldset__legend--s"], ["id", "update-flag-status-heading", 1, "govuk-fieldset__heading"], ["data-module", "govuk-radios", 1, "govuk-radios", "govuk-radios--conditional", "govuk-!-margin-bottom-4", 3, "id"], ["class", "govuk-radios__item", 4, "ngFor", "ngForOf"], ["id", "update-flag-status-hint", 1, "govuk-hint"], [1, "govuk-radios__item"], ["type", "radio", 1, "govuk-radios__input", 3, "id", "name", "formControlName", "value"], [1, "govuk-label", "govuk-radios__label", 3, "for"], ["id", "translation-checkbox-container", 1, "govuk-!-margin-bottom-6"], ["data-module", "govuk-checkboxes", 1, "govuk-checkboxes"], [1, "govuk-checkboxes__item"], ["type", "checkbox", 1, "govuk-checkboxes__input", 3, "formControlName", "id", "name"], [1, "govuk-label", "govuk-checkboxes__label", 3, "for"], ["id", "flag-status-container-v1", 1, "govuk-grid-row"], [1, "govuk-grid-column-one-half"], [1, "govuk-tag", 3, "ngClass"], ["class", "button button-secondary", "type", "button", 3, "click", 4, "ngIf"], ["type", "button", 1, "button", "button-secondary", 3, "click"]], template: function UpdateFlagComponent_Template(rf, ctx) { if (rf & 1) {
24946
25381
  i0.ɵɵelementContainerStart(0, 2);
24947
25382
  i0.ɵɵelementStart(1, "div", 3)(2, "div", 4)(3, "h1", 5)(4, "label", 6);
24948
25383
  i0.ɵɵtext(5);
@@ -24960,53 +25395,46 @@ class UpdateFlagComponent {
24960
25395
  i0.ɵɵtemplate(18, UpdateFlagComponent_ng_template_18_Template, 7, 8, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor)(20, UpdateFlagComponent_div_20_Template, 13, 12, "div", 12)(21, UpdateFlagComponent_div_21_Template, 7, 7, "div", 13)(22, UpdateFlagComponent_div_22_Template, 11, 10, "div", 14);
24961
25396
  i0.ɵɵelementEnd()();
24962
25397
  i0.ɵɵelementContainerEnd();
24963
- i0.ɵɵelementStart(23, "div", 15)(24, "button", 16);
24964
- i0.ɵɵlistener("click", function UpdateFlagComponent_Template_button_click_24_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onNext()); });
24965
- i0.ɵɵtext(25);
24966
- i0.ɵɵpipe(26, "rpxTranslate");
24967
- i0.ɵɵelementEnd()();
24968
25398
  } if (rf & 2) {
24969
- const externalUser_r6 = i0.ɵɵreference(17);
25399
+ const externalUser_r5 = i0.ɵɵreference(17);
24970
25400
  i0.ɵɵproperty("formGroup", ctx.formGroup);
24971
25401
  i0.ɵɵadvance(2);
24972
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(23, _c0$n, ctx.errorMessages.length > 0));
25402
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(20, _c0$n, ctx.errorMessages.length > 0));
24973
25403
  i0.ɵɵadvance(3);
24974
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 13, ctx.updateFlagTitle), " ");
25404
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 12, ctx.updateFlagTitle), " ");
24975
25405
  i0.ɵɵadvance(2);
24976
25406
  i0.ɵɵproperty("ngIf", ctx.externalUserUpdate);
24977
25407
  i0.ɵɵadvance(2);
24978
25408
  i0.ɵɵproperty("for", ctx.caseFlagFormFields.COMMENTS);
24979
25409
  i0.ɵɵadvance();
24980
- i0.ɵɵtextInterpolate1(" ", ctx.externalUserUpdate ? i0.ɵɵpipeBind1(11, 15, ctx.updateFlagStepEnum.COMMENT_FIELD_LABEL_EXTERNAL) : i0.ɵɵpipeBind1(12, 17, ctx.updateFlagTitle) + i0.ɵɵpipeBind1(13, 19, " comments"), " ");
25410
+ i0.ɵɵtextInterpolate1(" ", ctx.externalUserUpdate ? i0.ɵɵpipeBind1(11, 14, ctx.updateFlagStepEnum.COMMENT_FIELD_LABEL_EXTERNAL) : i0.ɵɵpipeBind1(12, 16, ctx.updateFlagTitle) + i0.ɵɵpipeBind1(13, 18, " comments"), " ");
24981
25411
  i0.ɵɵadvance(4);
24982
25412
  i0.ɵɵproperty("ngIf", ctx.externalUserUpdate);
24983
25413
  i0.ɵɵadvance();
24984
- i0.ɵɵproperty("ngIf", ctx.internalUserUpdate || ctx.internalUser2Point1EnabledUpdate || ctx.displayContextParameter === "")("ngIfElse", externalUser_r6);
25414
+ i0.ɵɵproperty("ngIf", ctx.internalUserUpdate || ctx.internalUser2Point1EnabledUpdate || ctx.displayContextParameter === "")("ngIfElse", externalUser_r5);
24985
25415
  i0.ɵɵadvance(5);
24986
25416
  i0.ɵɵproperty("ngIf", ctx.internalUser2Point1EnabledUpdate);
24987
25417
  i0.ɵɵadvance();
24988
25418
  i0.ɵɵproperty("ngIf", ctx.internalUser2Point1EnabledUpdate);
24989
25419
  i0.ɵɵadvance();
24990
25420
  i0.ɵɵproperty("ngIf", ctx.internalUserUpdate);
24991
- i0.ɵɵadvance(3);
24992
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(26, 21, "Next"), " ");
24993
25421
  } }, encapsulation: 2 });
24994
25422
  }
24995
25423
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UpdateFlagComponent, [{
24996
25424
  type: Component,
24997
- args: [{ selector: 'ccd-update-flag', 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-4\">\n <label class=\"govuk-label govuk-label--m\">\n {{updateFlagTitle | rpxTranslate}}\n </label>\n </h1>\n <div id=\"update-flag-hint-external\" class=\"govuk-hint\" *ngIf=\"externalUserUpdate\">\n {{selectedFlag?.flagDetailDisplay?.flagDetail | updateFlagTitleDisplay}}\n </div>\n\n <div class=\"govuk-!-margin-bottom-4\">\n <label class=\"govuk-label govuk-label--s\" [for]=\"caseFlagFormFields.COMMENTS\">\n {{\n externalUserUpdate\n ? (updateFlagStepEnum.COMMENT_FIELD_LABEL_EXTERNAL | rpxTranslate)\n : (updateFlagTitle | rpxTranslate) + (' comments' | rpxTranslate)\n }}\n </label>\n <div id=\"update-flag-comments-hint-external\" class=\"govuk-hint\" *ngIf=\"externalUserUpdate\">\n {{updateFlagStepEnum.COMMENT_HINT_TEXT_EXTERNAL | rpxTranslate}}\n </div>\n <ng-container *ngIf=\"internalUserUpdate || internalUser2Point1EnabledUpdate || displayContextParameter === '';\n else externalUser\">\n <div id=\"update-flag-comments-hint\" class=\"govuk-hint\">\n {{\n internalUserUpdate\n ? (updateFlagStepEnum.COMMENT_HINT_TEXT_INTERNAL | rpxTranslate)\n : (updateFlagStepEnum.COMMENT_HINT_TEXT_INTERNAL_2_POINT_1 | rpxTranslate)\n }}\n </div>\n <div class=\"govuk-warning-text\" *ngIf=\"internalUser2Point1EnabledUpdate && externallyVisibleFlag\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-warning-text__assistive\">{{'Warning' | rpxTranslate}}</span>\n {{updateFlagStepEnum.WARNING_TEXT | rpxTranslate}}\n </strong>\n </div>\n <div id=\"update-flag-comments-not-entered-error-message\" class=\"govuk-error-message\" *ngIf=\"commentsNotEnteredErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{commentsNotEnteredErrorMessage | rpxTranslate}}\n </div>\n <div id=\"update-flag-comments-char-limit-error\" class=\"govuk-error-message\" *ngIf=\"commentsCharLimitErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{commentsCharLimitErrorMessage | rpxTranslate}}\n </div>\n <textarea class=\"govuk-textarea\"\n [id]=\"caseFlagFormFields.COMMENTS\"\n [name]=\"caseFlagFormFields.COMMENTS\"\n [formControlName]=\"caseFlagFormFields.COMMENTS\"\n rows=\"5\"\n aria-describedby=\"update-flag-comments-hint update-flag-comments-char-limit-info update-flag-comments-char-limit-error\">\n </textarea>\n <div id=\"update-flag-comments-char-limit-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n {{updateFlagStepEnum.CHARACTER_LIMIT_INFO | rpxTranslate}}\n </div>\n </ng-container>\n <ng-template #externalUser>\n <ng-container *ngIf=\"externalUserUpdate\">\n <ng-container *ngTemplateOutlet=\"updateFlagStatusReason\"></ng-container>\n </ng-container>\n </ng-template>\n </div>\n\n <ng-template #updateFlagStatusReason>\n <div id=\"update-flag-status-reason-not-entered-error-message\" class=\"govuk-error-message\" *ngIf=\"statusReasonNotEnteredErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{statusReasonNotEnteredErrorMessage | rpxTranslate}}\n </div>\n <div id=\"update-flag-status-reason-char-limit-error\" class=\"govuk-error-message\" *ngIf=\"statusReasonCharLimitErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{statusReasonCharLimitErrorMessage | rpxTranslate}}\n </div>\n <textarea class=\"govuk-textarea\"\n [id]=\"caseFlagFormFields.STATUS_CHANGE_REASON\"\n [name]=\"caseFlagFormFields.STATUS_CHANGE_REASON\"\n [formControlName]=\"caseFlagFormFields.STATUS_CHANGE_REASON\"\n rows=\"5\"\n aria-describedby=\"update-flag-comments-hint-external update-flag-status-hint update-flag-status-reason-char-limit-info\n update-flag-status-reason-char-limit-error\">\n </textarea>\n <div id=\"update-flag-status-reason-char-limit-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n {{updateFlagStepEnum.CHARACTER_LIMIT_INFO | rpxTranslate}}\n </div>\n </ng-template>\n\n <div id=\"flag-status-container-v2_1\" class=\"govuk-!-margin-bottom-4\" *ngIf=\"internalUser2Point1EnabledUpdate\">\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"update-flag-status-heading\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--s\">\n <h1 id=\"update-flag-status-heading\" class=\"govuk-fieldset__heading\">\n {{updateFlagTitle | rpxTranslate}} {{'status' | rpxTranslate}}\n </h1>\n </legend>\n <div class=\"govuk-radios govuk-radios--conditional govuk-!-margin-bottom-4\" data-module=\"govuk-radios\" [id]=\"caseFlagFormFields.STATUS\">\n <div class=\"govuk-radios__item\" *ngFor=\"let status of validStatusProgressions\">\n <input class=\"govuk-radios__input\" type=\"radio\"\n [id]=\"caseFlagFormFields.STATUS + '_' + status\"\n [name]=\"caseFlagFormFields.STATUS\"\n [formControlName]=\"caseFlagFormFields.STATUS\"\n [value]=\"status\">\n <label class=\"govuk-label govuk-radios__label\" [for]=\"caseFlagFormFields.STATUS + '_' + status\">\n {{caseFlagStatusEnum[status] | rpxTranslate}}\n </label>\n </div>\n </div>\n </fieldset>\n\n <div id=\"update-flag-status-hint\" class=\"govuk-hint\">\n {{updateFlagStepEnum.STATUS_HINT_TEXT | rpxTranslate}}\n </div>\n <ng-container *ngTemplateOutlet=\"updateFlagStatusReason\"></ng-container>\n </div>\n\n <div id=\"translation-checkbox-container\" class=\"govuk-!-margin-bottom-6\" *ngIf=\"internalUser2Point1EnabledUpdate\">\n <div class=\"govuk-checkboxes\" data-module=\"govuk-checkboxes\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" type=\"checkbox\"\n [formControlName]=\"caseFlagFormFields.IS_WELSH_TRANSLATION_NEEDED\"\n [id]=\"caseFlagFormFields.IS_WELSH_TRANSLATION_NEEDED\"\n [name]=\"caseFlagFormFields.IS_WELSH_TRANSLATION_NEEDED\">\n <label class=\"govuk-label govuk-checkboxes__label\"\n [for]=\"caseFlagFormFields.IS_WELSH_TRANSLATION_NEEDED\">\n {{'I need to add a translation' | rpxTranslate}}\n </label>\n </div>\n </div>\n </div>\n\n <div id=\"flag-status-container-v1\" class=\"govuk-grid-row\" *ngIf=\"internalUserUpdate\">\n <div class=\"govuk-grid-column-one-half\">\n <p>{{'Flag status:' | rpxTranslate}}\n <span>\n <strong class=\"govuk-tag\" [ngClass]=\"{'govuk-tag--grey': selectedFlag.flagDetailDisplay.flagDetail.status === 'Inactive'}\">\n {{selectedFlag?.flagDetailDisplay?.flagDetail?.status | rpxTranslate}}\n </strong>\n </span>\n </p>\n </div>\n <div class=\"govuk-grid-column-one-half\">\n <button class=\"button button-secondary\" type=\"button\" (click)=\"onMakeInactive()\" *ngIf=\"selectedFlag.flagDetailDisplay.flagDetail.status === 'Active'\">\n {{'Make inactive' | rpxTranslate}}\n </button>\n </div>\n </div>\n </div>\n </div>\n</ng-container>\n\n<div class=\"govuk-button-group\">\n <button id=\"updateFlagNextButton\" class=\"govuk-button\" type=\"button\" (click)=\"onNext()\">\n {{'Next' | rpxTranslate}}\n </button>\n</div>\n" }]
24998
- }], () => [{ type: i1.RpxTranslationService }], { formGroup: [{
25425
+ args: [{ selector: 'ccd-update-flag', 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-4\">\n <label class=\"govuk-label govuk-label--m\">\n {{updateFlagTitle | rpxTranslate}}\n </label>\n </h1>\n <div id=\"update-flag-hint-external\" class=\"govuk-hint\" *ngIf=\"externalUserUpdate\">\n {{selectedFlag?.flagDetailDisplay?.flagDetail | updateFlagTitleDisplay}}\n </div>\n\n <div class=\"govuk-!-margin-bottom-4\">\n <label class=\"govuk-label govuk-label--s\" [for]=\"caseFlagFormFields.COMMENTS\">\n {{\n externalUserUpdate\n ? (updateFlagStepEnum.COMMENT_FIELD_LABEL_EXTERNAL | rpxTranslate)\n : (updateFlagTitle | rpxTranslate) + (' comments' | rpxTranslate)\n }}\n </label>\n <div id=\"update-flag-comments-hint-external\" class=\"govuk-hint\" *ngIf=\"externalUserUpdate\">\n {{updateFlagStepEnum.COMMENT_HINT_TEXT_EXTERNAL | rpxTranslate}}\n </div>\n <ng-container *ngIf=\"internalUserUpdate || internalUser2Point1EnabledUpdate || displayContextParameter === '';\n else externalUser\">\n <div id=\"update-flag-comments-hint\" class=\"govuk-hint\">\n {{\n internalUserUpdate\n ? (updateFlagStepEnum.COMMENT_HINT_TEXT_INTERNAL | rpxTranslate)\n : (updateFlagStepEnum.COMMENT_HINT_TEXT_INTERNAL_2_POINT_1 | rpxTranslate)\n }}\n </div>\n <div class=\"govuk-warning-text\" *ngIf=\"internalUser2Point1EnabledUpdate && externallyVisibleFlag\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-warning-text__assistive\">{{'Warning' | rpxTranslate}}</span>\n {{updateFlagStepEnum.WARNING_TEXT | rpxTranslate}}\n </strong>\n </div>\n <div id=\"update-flag-comments-not-entered-error-message\" class=\"govuk-error-message\" *ngIf=\"commentsNotEnteredErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{commentsNotEnteredErrorMessage | rpxTranslate}}\n </div>\n <div id=\"update-flag-comments-char-limit-error\" class=\"govuk-error-message\" *ngIf=\"commentsCharLimitErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{commentsCharLimitErrorMessage | rpxTranslate}}\n </div>\n <textarea class=\"govuk-textarea\"\n [id]=\"caseFlagFormFields.COMMENTS\"\n [name]=\"caseFlagFormFields.COMMENTS\"\n [formControlName]=\"caseFlagFormFields.COMMENTS\"\n rows=\"5\"\n aria-describedby=\"update-flag-comments-hint update-flag-comments-char-limit-info update-flag-comments-char-limit-error\">\n </textarea>\n <div id=\"update-flag-comments-char-limit-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n {{updateFlagStepEnum.CHARACTER_LIMIT_INFO | rpxTranslate}}\n </div>\n </ng-container>\n <ng-template #externalUser>\n <ng-container *ngIf=\"externalUserUpdate\">\n <ng-container *ngTemplateOutlet=\"updateFlagStatusReason\"></ng-container>\n </ng-container>\n </ng-template>\n </div>\n\n <ng-template #updateFlagStatusReason>\n <div id=\"update-flag-status-reason-not-entered-error-message\" class=\"govuk-error-message\" *ngIf=\"statusReasonNotEnteredErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{statusReasonNotEnteredErrorMessage | rpxTranslate}}\n </div>\n <div id=\"update-flag-status-reason-char-limit-error\" class=\"govuk-error-message\" *ngIf=\"statusReasonCharLimitErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{statusReasonCharLimitErrorMessage | rpxTranslate}}\n </div>\n <textarea class=\"govuk-textarea\"\n [id]=\"caseFlagFormFields.STATUS_CHANGE_REASON\"\n [name]=\"caseFlagFormFields.STATUS_CHANGE_REASON\"\n [formControlName]=\"caseFlagFormFields.STATUS_CHANGE_REASON\"\n rows=\"5\"\n aria-describedby=\"update-flag-comments-hint-external update-flag-status-hint update-flag-status-reason-char-limit-info\n update-flag-status-reason-char-limit-error\">\n </textarea>\n <div id=\"update-flag-status-reason-char-limit-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n {{updateFlagStepEnum.CHARACTER_LIMIT_INFO | rpxTranslate}}\n </div>\n </ng-template>\n\n <div id=\"flag-status-container-v2_1\" class=\"govuk-!-margin-bottom-4\" *ngIf=\"internalUser2Point1EnabledUpdate\">\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"update-flag-status-heading\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--s\">\n <h1 id=\"update-flag-status-heading\" class=\"govuk-fieldset__heading\">\n {{updateFlagTitle | rpxTranslate}} {{'status' | rpxTranslate}}\n </h1>\n </legend>\n <div class=\"govuk-radios govuk-radios--conditional govuk-!-margin-bottom-4\" data-module=\"govuk-radios\" [id]=\"caseFlagFormFields.STATUS\">\n <div class=\"govuk-radios__item\" *ngFor=\"let status of validStatusProgressions\">\n <input class=\"govuk-radios__input\" type=\"radio\"\n [id]=\"caseFlagFormFields.STATUS + '_' + status\"\n [name]=\"caseFlagFormFields.STATUS\"\n [formControlName]=\"caseFlagFormFields.STATUS\"\n [value]=\"status\">\n <label class=\"govuk-label govuk-radios__label\" [for]=\"caseFlagFormFields.STATUS + '_' + status\">\n {{caseFlagStatusEnum[status] | rpxTranslate}}\n </label>\n </div>\n </div>\n </fieldset>\n\n <div id=\"update-flag-status-hint\" class=\"govuk-hint\">\n {{updateFlagStepEnum.STATUS_HINT_TEXT | rpxTranslate}}\n </div>\n <ng-container *ngTemplateOutlet=\"updateFlagStatusReason\"></ng-container>\n </div>\n\n <div id=\"translation-checkbox-container\" class=\"govuk-!-margin-bottom-6\" *ngIf=\"internalUser2Point1EnabledUpdate\">\n <div class=\"govuk-checkboxes\" data-module=\"govuk-checkboxes\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" type=\"checkbox\"\n [formControlName]=\"caseFlagFormFields.IS_WELSH_TRANSLATION_NEEDED\"\n [id]=\"caseFlagFormFields.IS_WELSH_TRANSLATION_NEEDED\"\n [name]=\"caseFlagFormFields.IS_WELSH_TRANSLATION_NEEDED\">\n <label class=\"govuk-label govuk-checkboxes__label\"\n [for]=\"caseFlagFormFields.IS_WELSH_TRANSLATION_NEEDED\">\n {{'I need to add a translation' | rpxTranslate}}\n </label>\n </div>\n </div>\n </div>\n\n <div id=\"flag-status-container-v1\" class=\"govuk-grid-row\" *ngIf=\"internalUserUpdate\">\n <div class=\"govuk-grid-column-one-half\">\n <p>{{'Flag status:' | rpxTranslate}}\n <span>\n <strong class=\"govuk-tag\" [ngClass]=\"{'govuk-tag--grey': selectedFlag.flagDetailDisplay.flagDetail.status === 'Inactive'}\">\n {{selectedFlag?.flagDetailDisplay?.flagDetail?.status | rpxTranslate}}\n </strong>\n </span>\n </p>\n </div>\n <div class=\"govuk-grid-column-one-half\">\n <button class=\"button button-secondary\" type=\"button\" (click)=\"onMakeInactive()\" *ngIf=\"selectedFlag.flagDetailDisplay.flagDetail.status === 'Active'\">\n {{'Make inactive' | rpxTranslate}}\n </button>\n </div>\n </div>\n </div>\n </div>\n</ng-container>" }]
25426
+ }], () => [{ type: i1.RpxTranslationService }, { type: MultipageComponentStateService }], { formGroup: [{
24999
25427
  type: Input
25000
25428
  }], displayContextParameter: [{
25001
25429
  type: Input
25002
25430
  }], caseFlagStateEmitter: [{
25003
25431
  type: Output
25004
25432
  }] }); })();
25005
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UpdateFlagComponent, { className: "UpdateFlagComponent", filePath: "lib/shared/components/palette/case-flag/components/update-flag/update-flag.component.ts", lineNumber: 20 }); })();
25433
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UpdateFlagComponent, { className: "UpdateFlagComponent", filePath: "lib/shared/components/palette/case-flag/components/update-flag/update-flag.component.ts", lineNumber: 22 }); })();
25006
25434
 
25007
25435
  const _c0$m = a0 => ({ "form-group-error": a0 });
25008
25436
  function UpdateFlagAddTranslationFormComponent_div_14_Template(rf, ctx) { if (rf & 1) {
25009
- i0.ɵɵelementStart(0, "div", 19)(1, "span", 20);
25437
+ i0.ɵɵelementStart(0, "div", 17)(1, "span", 18);
25010
25438
  i0.ɵɵtext(2);
25011
25439
  i0.ɵɵpipe(3, "rpxTranslate");
25012
25440
  i0.ɵɵelementEnd();
@@ -25021,7 +25449,7 @@ function UpdateFlagAddTranslationFormComponent_div_14_Template(rf, ctx) { if (rf
25021
25449
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 4, ctx_r0.otherFlagDescriptionCharLimitErrorMessage), " ");
25022
25450
  } }
25023
25451
  function UpdateFlagAddTranslationFormComponent_div_24_Template(rf, ctx) { if (rf & 1) {
25024
- i0.ɵɵelementStart(0, "div", 21)(1, "span", 20);
25452
+ i0.ɵɵelementStart(0, "div", 19)(1, "span", 18);
25025
25453
  i0.ɵɵtext(2);
25026
25454
  i0.ɵɵpipe(3, "rpxTranslate");
25027
25455
  i0.ɵɵelementEnd();
@@ -25036,7 +25464,7 @@ function UpdateFlagAddTranslationFormComponent_div_24_Template(rf, ctx) { if (rf
25036
25464
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 4, ctx_r0.otherFlagDescriptionWelshCharLimitErrorMessage), " ");
25037
25465
  } }
25038
25466
  function UpdateFlagAddTranslationFormComponent_div_34_Template(rf, ctx) { if (rf & 1) {
25039
- i0.ɵɵelementStart(0, "div", 22)(1, "span", 20);
25467
+ i0.ɵɵelementStart(0, "div", 20)(1, "span", 18);
25040
25468
  i0.ɵɵtext(2);
25041
25469
  i0.ɵɵpipe(3, "rpxTranslate");
25042
25470
  i0.ɵɵelementEnd();
@@ -25051,7 +25479,7 @@ function UpdateFlagAddTranslationFormComponent_div_34_Template(rf, ctx) { if (rf
25051
25479
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 4, ctx_r0.flagCommentsCharLimitErrorMessage), " ");
25052
25480
  } }
25053
25481
  function UpdateFlagAddTranslationFormComponent_div_44_Template(rf, ctx) { if (rf & 1) {
25054
- i0.ɵɵelementStart(0, "div", 23)(1, "span", 20);
25482
+ i0.ɵɵelementStart(0, "div", 21)(1, "span", 18);
25055
25483
  i0.ɵɵtext(2);
25056
25484
  i0.ɵɵpipe(3, "rpxTranslate");
25057
25485
  i0.ɵɵelementEnd();
@@ -25065,7 +25493,7 @@ function UpdateFlagAddTranslationFormComponent_div_44_Template(rf, ctx) { if (rf
25065
25493
  i0.ɵɵadvance(2);
25066
25494
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 4, ctx_r0.flagCommentsWelshCharLimitErrorMessage), " ");
25067
25495
  } }
25068
- class UpdateFlagAddTranslationFormComponent {
25496
+ class UpdateFlagAddTranslationFormComponent extends AbstractJourneyComponent {
25069
25497
  formGroup;
25070
25498
  caseFlagStateEmitter = new EventEmitter();
25071
25499
  selectedFlag;
@@ -25139,8 +25567,14 @@ class UpdateFlagAddTranslationFormComponent {
25139
25567
  });
25140
25568
  }
25141
25569
  }
25142
- static ɵfac = function UpdateFlagAddTranslationFormComponent_Factory(t) { return new (t || UpdateFlagAddTranslationFormComponent)(); };
25143
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UpdateFlagAddTranslationFormComponent, selectors: [["ccd-update-flag-add-translation-form"]], inputs: { formGroup: "formGroup" }, outputs: { caseFlagStateEmitter: "caseFlagStateEmitter" }, decls: 54, vars: 57, 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"], [1, "govuk-button-group"], ["id", "updateFlagNextButton", "type", "button", 1, "govuk-button", 3, "click"], ["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) {
25570
+ next() {
25571
+ this.onNext();
25572
+ if (this.errorMessages.length === 0) {
25573
+ super.next();
25574
+ }
25575
+ }
25576
+ static ɵfac = /*@__PURE__*/ (() => { let ɵUpdateFlagAddTranslationFormComponent_BaseFactory; return function UpdateFlagAddTranslationFormComponent_Factory(t) { return (ɵUpdateFlagAddTranslationFormComponent_BaseFactory || (ɵUpdateFlagAddTranslationFormComponent_BaseFactory = i0.ɵɵgetInheritedFactory(UpdateFlagAddTranslationFormComponent)))(t || UpdateFlagAddTranslationFormComponent); }; })();
25577
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UpdateFlagAddTranslationFormComponent, selectors: [["ccd-update-flag-add-translation-form"]], inputs: { formGroup: "formGroup" }, outputs: { caseFlagStateEmitter: "caseFlagStateEmitter" }, 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) {
25144
25578
  i0.ɵɵelementContainerStart(0, 0);
25145
25579
  i0.ɵɵelementStart(1, "div", 1)(2, "div", 2)(3, "h1", 3)(4, "label", 4);
25146
25580
  i0.ɵɵtext(5);
@@ -25199,78 +25633,71 @@ class UpdateFlagAddTranslationFormComponent {
25199
25633
  i0.ɵɵpipe(49, "rpxTranslate");
25200
25634
  i0.ɵɵelementEnd()()()();
25201
25635
  i0.ɵɵelementContainerEnd();
25202
- i0.ɵɵelementStart(50, "div", 17)(51, "button", 18);
25203
- i0.ɵɵlistener("click", function UpdateFlagAddTranslationFormComponent_Template_button_click_51_listener() { return ctx.onNext(); });
25204
- i0.ɵɵtext(52);
25205
- i0.ɵɵpipe(53, "rpxTranslate");
25206
- i0.ɵɵelementEnd()();
25207
25636
  } if (rf & 2) {
25208
25637
  i0.ɵɵproperty("formGroup", ctx.formGroup);
25209
25638
  i0.ɵɵadvance(2);
25210
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(55, _c0$m, ctx.errorMessages.length > 0));
25639
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(52, _c0$m, ctx.errorMessages.length > 0));
25211
25640
  i0.ɵɵadvance(3);
25212
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 33, ctx.updateFlagAddTranslationTitle), " ");
25641
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 32, ctx.updateFlagAddTranslationTitle), " ");
25213
25642
  i0.ɵɵadvance(3);
25214
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(9, 35, ctx.updateFlagAddTranslationStepEnum.HINT_TEXT), " ");
25643
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(9, 34, ctx.updateFlagAddTranslationStepEnum.HINT_TEXT), " ");
25215
25644
  i0.ɵɵadvance(3);
25216
25645
  i0.ɵɵproperty("for", ctx.caseFlagFormFields.OTHER_FLAG_DESCRIPTION);
25217
25646
  i0.ɵɵadvance();
25218
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(13, 37, "Other description"));
25647
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(13, 36, "Other description"));
25219
25648
  i0.ɵɵadvance(2);
25220
25649
  i0.ɵɵproperty("ngIf", ctx.otherFlagDescriptionCharLimitErrorMessage);
25221
25650
  i0.ɵɵadvance();
25222
25651
  i0.ɵɵproperty("id", ctx.caseFlagFormFields.OTHER_FLAG_DESCRIPTION)("name", ctx.caseFlagFormFields.OTHER_FLAG_DESCRIPTION)("formControlName", ctx.caseFlagFormFields.OTHER_FLAG_DESCRIPTION);
25223
25652
  i0.ɵɵadvance(3);
25224
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(19, 39, ctx.updateFlagAddTranslationStepEnum.CHARACTER_LIMIT_INFO), " ");
25653
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(19, 38, ctx.updateFlagAddTranslationStepEnum.CHARACTER_LIMIT_INFO), " ");
25225
25654
  i0.ɵɵadvance(3);
25226
25655
  i0.ɵɵproperty("for", ctx.caseFlagFormFields.OTHER_FLAG_DESCRIPTION_WELSH);
25227
25656
  i0.ɵɵadvance();
25228
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(23, 41, "Other description (Welsh)"));
25657
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(23, 40, "Other description (Welsh)"));
25229
25658
  i0.ɵɵadvance(2);
25230
25659
  i0.ɵɵproperty("ngIf", ctx.otherFlagDescriptionWelshCharLimitErrorMessage);
25231
25660
  i0.ɵɵadvance();
25232
25661
  i0.ɵɵproperty("id", ctx.caseFlagFormFields.OTHER_FLAG_DESCRIPTION_WELSH)("name", ctx.caseFlagFormFields.OTHER_FLAG_DESCRIPTION_WELSH)("formControlName", ctx.caseFlagFormFields.OTHER_FLAG_DESCRIPTION_WELSH);
25233
25662
  i0.ɵɵadvance(3);
25234
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(29, 43, ctx.updateFlagAddTranslationStepEnum.CHARACTER_LIMIT_INFO), " ");
25663
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(29, 42, ctx.updateFlagAddTranslationStepEnum.CHARACTER_LIMIT_INFO), " ");
25235
25664
  i0.ɵɵadvance(3);
25236
25665
  i0.ɵɵproperty("for", ctx.caseFlagFormFields.COMMENTS);
25237
25666
  i0.ɵɵadvance();
25238
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(33, 45, "Flag comments"));
25667
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(33, 44, "Flag comments"));
25239
25668
  i0.ɵɵadvance(2);
25240
25669
  i0.ɵɵproperty("ngIf", ctx.flagCommentsCharLimitErrorMessage);
25241
25670
  i0.ɵɵadvance();
25242
25671
  i0.ɵɵproperty("id", ctx.caseFlagFormFields.COMMENTS)("name", ctx.caseFlagFormFields.COMMENTS)("formControlName", ctx.caseFlagFormFields.COMMENTS);
25243
25672
  i0.ɵɵadvance(3);
25244
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(39, 47, ctx.updateFlagAddTranslationStepEnum.CHARACTER_LIMIT_INFO), " ");
25673
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(39, 46, ctx.updateFlagAddTranslationStepEnum.CHARACTER_LIMIT_INFO), " ");
25245
25674
  i0.ɵɵadvance(3);
25246
25675
  i0.ɵɵproperty("for", ctx.caseFlagFormFields.COMMENTS_WELSH);
25247
25676
  i0.ɵɵadvance();
25248
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(43, 49, "Flag comments (Welsh)"));
25677
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(43, 48, "Flag comments (Welsh)"));
25249
25678
  i0.ɵɵadvance(2);
25250
25679
  i0.ɵɵproperty("ngIf", ctx.flagCommentsWelshCharLimitErrorMessage);
25251
25680
  i0.ɵɵadvance();
25252
25681
  i0.ɵɵproperty("id", ctx.caseFlagFormFields.COMMENTS_WELSH)("name", ctx.caseFlagFormFields.COMMENTS_WELSH)("formControlName", ctx.caseFlagFormFields.COMMENTS_WELSH);
25253
25682
  i0.ɵɵadvance(3);
25254
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(49, 51, ctx.updateFlagAddTranslationStepEnum.CHARACTER_LIMIT_INFO), " ");
25255
- i0.ɵɵadvance(4);
25256
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(53, 53, "Next"), " ");
25683
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(49, 50, ctx.updateFlagAddTranslationStepEnum.CHARACTER_LIMIT_INFO), " ");
25257
25684
  } }, dependencies: [i5.NgClass, i5.NgIf, i4.DefaultValueAccessor, i4.NgControlStatus, i4.NgControlStatusGroup, i4.FormGroupDirective, i4.FormControlName, i1.RpxTranslatePipe], encapsulation: 2 });
25258
25685
  }
25259
25686
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UpdateFlagAddTranslationFormComponent, [{
25260
25687
  type: Component,
25261
- args: [{ selector: 'ccd-update-flag-add-translation-form', 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>\n\n<div class=\"govuk-button-group\">\n <button id=\"updateFlagNextButton\" class=\"govuk-button\" type=\"button\" (click)=\"onNext()\">\n {{'Next' | rpxTranslate}}\n </button>\n</div>\n" }]
25688
+ args: [{ selector: 'ccd-update-flag-add-translation-form', 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>" }]
25262
25689
  }], null, { formGroup: [{
25263
25690
  type: Input
25264
25691
  }], caseFlagStateEmitter: [{
25265
25692
  type: Output
25266
25693
  }] }); })();
25267
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UpdateFlagAddTranslationFormComponent, { className: "UpdateFlagAddTranslationFormComponent", filePath: "lib/shared/components/palette/case-flag/components/update-flag/update-flag-add-translation-form/update-flag-add-translation-form.component.ts", lineNumber: 17 }); })();
25694
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UpdateFlagAddTranslationFormComponent, { className: "UpdateFlagAddTranslationFormComponent", filePath: "lib/shared/components/palette/case-flag/components/update-flag/update-flag-add-translation-form/update-flag-add-translation-form.component.ts", lineNumber: 18 }); })();
25268
25695
 
25269
25696
  const _c0$l = a0 => ({ "form-group-error": a0 });
25270
25697
  function ConfirmFlagStatusComponent_div_9_Template(rf, ctx) { if (rf & 1) {
25271
- i0.ɵɵelementStart(0, "div", 15);
25272
- i0.ɵɵelement(1, "input", 16);
25273
- i0.ɵɵelementStart(2, "label", 17);
25698
+ i0.ɵɵelementStart(0, "div", 13);
25699
+ i0.ɵɵelement(1, "input", 14);
25700
+ i0.ɵɵelementStart(2, "label", 15);
25274
25701
  i0.ɵɵtext(3);
25275
25702
  i0.ɵɵpipe(4, "rpxTranslate");
25276
25703
  i0.ɵɵelementEnd()();
@@ -25287,7 +25714,7 @@ function ConfirmFlagStatusComponent_div_9_Template(rf, ctx) { if (rf & 1) {
25287
25714
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(4, 8, ctx_r2.caseFlagStatusEnum[status_r1]), " ");
25288
25715
  } }
25289
25716
  function ConfirmFlagStatusComponent_div_13_Template(rf, ctx) { if (rf & 1) {
25290
- i0.ɵɵelementStart(0, "div", 18)(1, "span", 19);
25717
+ i0.ɵɵelementStart(0, "div", 16)(1, "span", 17);
25291
25718
  i0.ɵɵtext(2);
25292
25719
  i0.ɵɵpipe(3, "rpxTranslate");
25293
25720
  i0.ɵɵelementEnd();
@@ -25302,7 +25729,7 @@ function ConfirmFlagStatusComponent_div_13_Template(rf, ctx) { if (rf & 1) {
25302
25729
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 4, ctx_r2.statusReasonNotEnteredErrorMessage), " ");
25303
25730
  } }
25304
25731
  function ConfirmFlagStatusComponent_div_14_Template(rf, ctx) { if (rf & 1) {
25305
- i0.ɵɵelementStart(0, "div", 20)(1, "span", 19);
25732
+ i0.ɵɵelementStart(0, "div", 18)(1, "span", 17);
25306
25733
  i0.ɵɵtext(2);
25307
25734
  i0.ɵɵpipe(3, "rpxTranslate");
25308
25735
  i0.ɵɵelementEnd();
@@ -25316,7 +25743,7 @@ function ConfirmFlagStatusComponent_div_14_Template(rf, ctx) { if (rf & 1) {
25316
25743
  i0.ɵɵadvance(2);
25317
25744
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 4, ctx_r2.statusReasonCharLimitErrorMessage), " ");
25318
25745
  } }
25319
- class ConfirmFlagStatusComponent {
25746
+ class ConfirmFlagStatusComponent extends AbstractJourneyComponent {
25320
25747
  formGroup;
25321
25748
  defaultStatus;
25322
25749
  caseFlagStateEmitter = new EventEmitter();
@@ -25345,6 +25772,12 @@ class ConfirmFlagStatusComponent {
25345
25772
  // Return case flag field state and error messages to the parent
25346
25773
  this.caseFlagStateEmitter.emit({ currentCaseFlagFieldState: CaseFlagFieldState.FLAG_STATUS, errorMessages: this.errorMessages });
25347
25774
  }
25775
+ next() {
25776
+ this.onNext();
25777
+ if (this.errorMessages.length === 0) {
25778
+ super.next();
25779
+ }
25780
+ }
25348
25781
  validateTextEntry() {
25349
25782
  this.statusReasonNotEnteredErrorMessage = null;
25350
25783
  this.statusReasonCharLimitErrorMessage = null;
@@ -25368,8 +25801,8 @@ class ConfirmFlagStatusComponent {
25368
25801
  });
25369
25802
  }
25370
25803
  }
25371
- static ɵfac = function ConfirmFlagStatusComponent_Factory(t) { return new (t || ConfirmFlagStatusComponent)(); };
25372
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ConfirmFlagStatusComponent, selectors: [["ccd-confirm-flag-status"]], inputs: { formGroup: "formGroup", defaultStatus: "defaultStatus" }, outputs: { caseFlagStateEmitter: "caseFlagStateEmitter" }, decls: 23, vars: 22, consts: [[3, "formGroup"], ["data-module", "govuk-character-count", "data-maxlength", "200", 1, "govuk-character-count"], [1, "govuk-form-group", 3, "ngClass"], ["aria-describedby", "confirm-flag-status-heading", 1, "govuk-fieldset"], [1, "govuk-fieldset__legend", "govuk-fieldset__legend--m"], ["id", "confirm-flag-status-heading", 1, "govuk-fieldset__heading"], ["data-module", "govuk-radios", "id", "conditional-radios-list", 1, "govuk-radios", "govuk-radios--conditional", "govuk-!-margin-bottom-4"], ["class", "govuk-radios__item", 4, "ngFor", "ngForOf"], ["id", "status-reason-hint", 1, "govuk-hint"], ["id", "status-reason-not-entered-error-message", "class", "govuk-error-message", 4, "ngIf"], ["id", "status-reason-char-limit-error", "class", "govuk-error-message", 4, "ngIf"], ["rows", "5", "aria-describedby", "status-reason-hint status-reason-char-limit-info", 1, "govuk-textarea", 3, "id", "name", "formControlName"], ["id", "status-reason-char-limit-info", "aria-live", "polite", 1, "govuk-hint", "govuk-character-count__message"], [1, "govuk-button-group"], ["type", "button", 1, "button", "button-primary", 3, "click"], [1, "govuk-radios__item"], ["type", "radio", 1, "govuk-radios__input", 3, "id", "name", "value", "formControlName"], [1, "govuk-label", "govuk-radios__label", 3, "for"], ["id", "status-reason-not-entered-error-message", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], ["id", "status-reason-char-limit-error", 1, "govuk-error-message"]], template: function ConfirmFlagStatusComponent_Template(rf, ctx) { if (rf & 1) {
25804
+ static ɵfac = /*@__PURE__*/ (() => { let ɵConfirmFlagStatusComponent_BaseFactory; return function ConfirmFlagStatusComponent_Factory(t) { return (ɵConfirmFlagStatusComponent_BaseFactory || (ɵConfirmFlagStatusComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ConfirmFlagStatusComponent)))(t || ConfirmFlagStatusComponent); }; })();
25805
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ConfirmFlagStatusComponent, selectors: [["ccd-confirm-flag-status"]], inputs: { formGroup: "formGroup", defaultStatus: "defaultStatus" }, outputs: { caseFlagStateEmitter: "caseFlagStateEmitter" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 19, vars: 19, consts: [[3, "formGroup"], ["data-module", "govuk-character-count", "data-maxlength", "200", 1, "govuk-character-count"], [1, "govuk-form-group", 3, "ngClass"], ["aria-describedby", "confirm-flag-status-heading", 1, "govuk-fieldset"], [1, "govuk-fieldset__legend", "govuk-fieldset__legend--m"], ["id", "confirm-flag-status-heading", 1, "govuk-fieldset__heading"], ["data-module", "govuk-radios", "id", "conditional-radios-list", 1, "govuk-radios", "govuk-radios--conditional", "govuk-!-margin-bottom-4"], ["class", "govuk-radios__item", 4, "ngFor", "ngForOf"], ["id", "status-reason-hint", 1, "govuk-hint"], ["id", "status-reason-not-entered-error-message", "class", "govuk-error-message", 4, "ngIf"], ["id", "status-reason-char-limit-error", "class", "govuk-error-message", 4, "ngIf"], ["rows", "5", "aria-describedby", "status-reason-hint status-reason-char-limit-info", 1, "govuk-textarea", 3, "id", "name", "formControlName"], ["id", "status-reason-char-limit-info", "aria-live", "polite", 1, "govuk-hint", "govuk-character-count__message"], [1, "govuk-radios__item"], ["type", "radio", 1, "govuk-radios__input", 3, "id", "name", "value", "formControlName"], [1, "govuk-label", "govuk-radios__label", 3, "for"], ["id", "status-reason-not-entered-error-message", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], ["id", "status-reason-char-limit-error", 1, "govuk-error-message"]], template: function ConfirmFlagStatusComponent_Template(rf, ctx) { if (rf & 1) {
25373
25806
  i0.ɵɵelementContainerStart(0, 0);
25374
25807
  i0.ɵɵelementStart(1, "div", 1)(2, "div", 2)(3, "fieldset", 3)(4, "legend", 4)(5, "h1", 5);
25375
25808
  i0.ɵɵtext(6);
@@ -25389,21 +25822,16 @@ class ConfirmFlagStatusComponent {
25389
25822
  i0.ɵɵpipe(18, "rpxTranslate");
25390
25823
  i0.ɵɵelementEnd()()();
25391
25824
  i0.ɵɵelementContainerEnd();
25392
- i0.ɵɵelementStart(19, "div", 13)(20, "button", 14);
25393
- i0.ɵɵlistener("click", function ConfirmFlagStatusComponent_Template_button_click_20_listener() { return ctx.onNext(); });
25394
- i0.ɵɵtext(21);
25395
- i0.ɵɵpipe(22, "rpxTranslate");
25396
- i0.ɵɵelementEnd()();
25397
25825
  } if (rf & 2) {
25398
25826
  i0.ɵɵproperty("formGroup", ctx.formGroup);
25399
25827
  i0.ɵɵadvance(2);
25400
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(20, _c0$l, ctx.errorMessages.length > 0));
25828
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(17, _c0$l, ctx.errorMessages.length > 0));
25401
25829
  i0.ɵɵadvance(4);
25402
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(7, 12, ctx.confirmFlagStatusTitle), " ");
25830
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(7, 11, ctx.confirmFlagStatusTitle), " ");
25403
25831
  i0.ɵɵadvance(3);
25404
25832
  i0.ɵɵproperty("ngForOf", ctx.flagCreationStatuses);
25405
25833
  i0.ɵɵadvance(2);
25406
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(12, 14, ctx.statusReasonHint), " ");
25834
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(12, 13, ctx.statusReasonHint), " ");
25407
25835
  i0.ɵɵadvance(2);
25408
25836
  i0.ɵɵproperty("ngIf", ctx.statusReasonNotEnteredErrorMessage);
25409
25837
  i0.ɵɵadvance();
@@ -25411,14 +25839,12 @@ class ConfirmFlagStatusComponent {
25411
25839
  i0.ɵɵadvance();
25412
25840
  i0.ɵɵproperty("id", ctx.statusReasonControlName)("name", ctx.statusReasonControlName)("formControlName", ctx.statusReasonControlName);
25413
25841
  i0.ɵɵadvance(2);
25414
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(18, 16, ctx.statusReasonCharLimitInfo), " ");
25415
- i0.ɵɵadvance(4);
25416
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(22, 18, "Next"));
25842
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(18, 15, ctx.statusReasonCharLimitInfo), " ");
25417
25843
  } }, dependencies: [i5.NgClass, i5.NgForOf, i5.NgIf, i4.DefaultValueAccessor, i4.RadioControlValueAccessor, i4.NgControlStatus, i4.NgControlStatusGroup, i4.FormGroupDirective, i4.FormControlName, i1.RpxTranslatePipe], encapsulation: 2 });
25418
25844
  }
25419
25845
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ConfirmFlagStatusComponent, [{
25420
25846
  type: Component,
25421
- args: [{ selector: 'ccd-confirm-flag-status', 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 <fieldset class=\"govuk-fieldset\" aria-describedby=\"confirm-flag-status-heading\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--m\">\n <h1 id=\"confirm-flag-status-heading\" class=\"govuk-fieldset__heading\">\n {{confirmFlagStatusTitle | rpxTranslate}}\n </h1>\n </legend>\n <div class=\"govuk-radios govuk-radios--conditional govuk-!-margin-bottom-4\" data-module=\"govuk-radios\" id=\"conditional-radios-list\">\n <div class=\"govuk-radios__item\" *ngFor=\"let status of flagCreationStatuses; index as i\">\n <input class=\"govuk-radios__input\" id=\"flag-status-{{i}}\" [name]=\"selectedStatusControlName\"\n type=\"radio\" [value]=\"status\" [formControlName]=\"selectedStatusControlName\"/>\n <label class=\"govuk-label govuk-radios__label\" for=\"flag-status-{{i}}\">\n {{caseFlagStatusEnum[status] | rpxTranslate}}\n </label>\n </div>\n </div>\n </fieldset>\n <div id=\"status-reason-hint\" class=\"govuk-hint\">\n {{statusReasonHint | rpxTranslate}}\n </div>\n <div id=\"status-reason-not-entered-error-message\" class=\"govuk-error-message\"\n *ngIf=\"statusReasonNotEnteredErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{statusReasonNotEnteredErrorMessage | rpxTranslate}}\n </div>\n <div id=\"status-reason-char-limit-error\" class=\"govuk-error-message\"\n *ngIf=\"statusReasonCharLimitErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{statusReasonCharLimitErrorMessage | rpxTranslate}}\n </div>\n <textarea class=\"govuk-textarea\" [id]=\"statusReasonControlName\"\n [name]=\"statusReasonControlName\" [formControlName]=\"statusReasonControlName\" rows=\"5\"\n aria-describedby=\"status-reason-hint status-reason-char-limit-info\"></textarea>\n <div id=\"status-reason-char-limit-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n {{statusReasonCharLimitInfo | rpxTranslate}}\n </div>\n </div>\n </div>\n</ng-container>\n\n<div class=\"govuk-button-group\">\n <button class=\"button button-primary\" type=\"button\" (click)=\"onNext()\">{{'Next' | rpxTranslate}}</button>\n</div>\n" }]
25847
+ args: [{ selector: 'ccd-confirm-flag-status', 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 <fieldset class=\"govuk-fieldset\" aria-describedby=\"confirm-flag-status-heading\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--m\">\n <h1 id=\"confirm-flag-status-heading\" class=\"govuk-fieldset__heading\">\n {{confirmFlagStatusTitle | rpxTranslate}}\n </h1>\n </legend>\n <div class=\"govuk-radios govuk-radios--conditional govuk-!-margin-bottom-4\" data-module=\"govuk-radios\" id=\"conditional-radios-list\">\n <div class=\"govuk-radios__item\" *ngFor=\"let status of flagCreationStatuses; index as i\">\n <input class=\"govuk-radios__input\" id=\"flag-status-{{i}}\" [name]=\"selectedStatusControlName\"\n type=\"radio\" [value]=\"status\" [formControlName]=\"selectedStatusControlName\"/>\n <label class=\"govuk-label govuk-radios__label\" for=\"flag-status-{{i}}\">\n {{caseFlagStatusEnum[status] | rpxTranslate}}\n </label>\n </div>\n </div>\n </fieldset>\n <div id=\"status-reason-hint\" class=\"govuk-hint\">\n {{statusReasonHint | rpxTranslate}}\n </div>\n <div id=\"status-reason-not-entered-error-message\" class=\"govuk-error-message\"\n *ngIf=\"statusReasonNotEnteredErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{statusReasonNotEnteredErrorMessage | rpxTranslate}}\n </div>\n <div id=\"status-reason-char-limit-error\" class=\"govuk-error-message\"\n *ngIf=\"statusReasonCharLimitErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{statusReasonCharLimitErrorMessage | rpxTranslate}}\n </div>\n <textarea class=\"govuk-textarea\" [id]=\"statusReasonControlName\"\n [name]=\"statusReasonControlName\" [formControlName]=\"statusReasonControlName\" rows=\"5\"\n aria-describedby=\"status-reason-hint status-reason-char-limit-info\"></textarea>\n <div id=\"status-reason-char-limit-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n {{statusReasonCharLimitInfo | rpxTranslate}}\n </div>\n </div>\n </div>\n</ng-container>" }]
25422
25848
  }], null, { formGroup: [{
25423
25849
  type: Input
25424
25850
  }], defaultStatus: [{
@@ -25426,7 +25852,7 @@ class ConfirmFlagStatusComponent {
25426
25852
  }], caseFlagStateEmitter: [{
25427
25853
  type: Output
25428
25854
  }] }); })();
25429
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ConfirmFlagStatusComponent, { className: "ConfirmFlagStatusComponent", filePath: "lib/shared/components/palette/case-flag/components/confirm-flag-status/confirm-flag-status.component.ts", lineNumber: 17 }); })();
25855
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ConfirmFlagStatusComponent, { className: "ConfirmFlagStatusComponent", filePath: "lib/shared/components/palette/case-flag/components/confirm-flag-status/confirm-flag-status.component.ts", lineNumber: 18 }); })();
25430
25856
 
25431
25857
  class FlagFieldDisplayPipe extends AsyncPipe {
25432
25858
  translationService;
@@ -28795,6 +29221,7 @@ class CaseEditSubmitComponent {
28795
29221
  route;
28796
29222
  orderService;
28797
29223
  profileNotifier;
29224
+ multipageComponentStateService;
28798
29225
  formValidatorsService;
28799
29226
  eventTrigger;
28800
29227
  editForm;
@@ -28831,13 +29258,14 @@ class CaseEditSubmitComponent {
28831
29258
  // not been disabled.
28832
29259
  return this.caseEdit.isSubmitting || this.hasErrors;
28833
29260
  }
28834
- constructor(caseEdit, fieldsUtils, caseFieldService, route, orderService, profileNotifier, formValidatorsService) {
29261
+ constructor(caseEdit, fieldsUtils, caseFieldService, route, orderService, profileNotifier, multipageComponentStateService, formValidatorsService) {
28835
29262
  this.caseEdit = caseEdit;
28836
29263
  this.fieldsUtils = fieldsUtils;
28837
29264
  this.caseFieldService = caseFieldService;
28838
29265
  this.route = route;
28839
29266
  this.orderService = orderService;
28840
29267
  this.profileNotifier = profileNotifier;
29268
+ this.multipageComponentStateService = multipageComponentStateService;
28841
29269
  this.formValidatorsService = formValidatorsService;
28842
29270
  }
28843
29271
  ngOnInit() {
@@ -28859,6 +29287,7 @@ class CaseEditSubmitComponent {
28859
29287
  this.caseEdit.isLinkedCasesSubmission =
28860
29288
  this.eventTrigger.case_fields.some(caseField => FieldsUtils.isCaseFieldOfType(caseField, ['ComponentLauncher']));
28861
29289
  this.pageTitle = this.getPageTitle();
29290
+ console.log(this.multipageComponentStateService.getInstigator());
28862
29291
  this.summary = this.formValidatorsService.addMarkDownValidators(this.editForm, 'event.summary');
28863
29292
  this.description = this.formValidatorsService.addMarkDownValidators(this.editForm, 'event.description');
28864
29293
  }
@@ -29023,7 +29452,7 @@ class CaseEditSubmitComponent {
29023
29452
  }
29024
29453
  return 'Cancel';
29025
29454
  }
29026
- static ɵfac = function CaseEditSubmitComponent_Factory(t) { return new (t || CaseEditSubmitComponent)(i0.ɵɵdirectiveInject(CaseEditComponent), i0.ɵɵdirectiveInject(FieldsUtils), i0.ɵɵdirectiveInject(CaseFieldService), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(OrderService), i0.ɵɵdirectiveInject(ProfileNotifier), i0.ɵɵdirectiveInject(FormValidatorsService)); };
29455
+ static ɵfac = function CaseEditSubmitComponent_Factory(t) { return new (t || CaseEditSubmitComponent)(i0.ɵɵdirectiveInject(CaseEditComponent), i0.ɵɵdirectiveInject(FieldsUtils), i0.ɵɵdirectiveInject(CaseFieldService), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(OrderService), i0.ɵɵdirectiveInject(ProfileNotifier), i0.ɵɵdirectiveInject(MultipageComponentStateService), i0.ɵɵdirectiveInject(FormValidatorsService)); };
29027
29456
  static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEditSubmitComponent, selectors: [["ccd-case-edit-submit"]], decls: 23, vars: 21, consts: [["titleBlock", ""], ["idBlock", ""], [1, "govuk-heading-l"], [4, "ngIf", "ngIfThen", "ngIfElse"], [3, "error"], [3, "callbackErrorsContext", "callbackErrorsSubject"], [1, "check-your-answers", 3, "submit", "formGroup"], [4, "ngIf"], [3, "eventCompletionParams", "eventCanBeCompleted", 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"], ["href", "javascript:void(0)", 3, "click"], [3, "content"], ["class", "heading-h2", 4, "ngIf"], [1, "heading-h2"], ["class", "text-16", 4, "ngIf"], ["aria-describedby", "check your answers table", 1, "form-table"], [4, "ngFor", "ngForOf"], [1, "text-16"], ["ccdLabelSubstitutor", "", 3, "caseField", "hidden", "formGroup", "contextFields"], ["class", "valign-top case-field-label", 4, "ngIf"], [1, "form-cell", "case-field-content"], [3, "formGroup", "topLevelFormGroup", "caseField", "context", "caseFields"], [1, "valign-top", "case-field-label"], [1, "valign-top", "check-your-answers__change", "case-field-change"], ["href", "javascript:void(0)", 3, "click", 4, "ngIf"], ["aria-describedby", "summary fields table", 1, "summary-fields"], [3, "ngSwitch"], ["ccdLabelSubstitutor", "", 3, "caseField", "formGroup", "contextFields", 4, "ngSwitchCase"], ["class", "compound-field", "ccdLabelSubstitutor", "", 3, "caseField", "formGroup", "contextFields", 4, "ngSwitchCase"], ["ccdLabelSubstitutor", "", 3, "caseField", "formGroup", "contextFields"], ["id", "summary-field-label"], [1, "form-cell"], [3, "formGroup", "caseField"], ["ccdLabelSubstitutor", "", 1, "compound-field", 3, "caseField", "formGroup", "contextFields"], ["colspan", "2"], [3, "formGroup", "caseField", "caseFields"], ["id", "fieldset-event", "formGroupName", "event"], [2, "display", "none"], [1, "form-group", 3, "ngClass"], ["for", "field-trigger-summary", 1, "form-label"], [1, "form-hint"], ["class", "error-message", 4, "ngIf"], ["type", "text", "id", "field-trigger-summary", "formControlName", "summary", "maxlength", "1024", 1, "form-control", "bottom-30", "width-50", 3, "ngClass"], ["for", "field-trigger-description", 1, "form-label"], ["id", "field-trigger-description", "formControlName", "description", "maxlength", "65536", 1, "form-control", "bottom-30", "width-50", 3, "ngClass"], [1, "error-message"], [3, "eventCanBeCompleted", "eventCompletionParams"], ["type", "button", 1, "button", "button-secondary", 3, "click", "disabled"]], template: function CaseEditSubmitComponent_Template(rf, ctx) { if (rf & 1) {
29028
29457
  const _r1 = i0.ɵɵgetCurrentView();
29029
29458
  i0.ɵɵelementStart(0, "div")(1, "h1", 2);
@@ -29081,8 +29510,8 @@ class CaseEditSubmitComponent {
29081
29510
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditSubmitComponent, [{
29082
29511
  type: Component,
29083
29512
  args: [{ selector: 'ccd-case-edit-submit', template: "<div>\n <!-- Event trigger name -->\n <h1 class=\"govuk-heading-l\">{{eventTrigger.name | rpxTranslate}}</h1>\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: contextFields : editForm.controls['data']\"></ccd-markdown>\n </ng-template>\n <ng-template #idBlock>\n <h2 *ngIf=\"getCaseId()\" class=\"heading-h2\">#{{ getCaseId() | ccdCaseReference }}</h2>\n </ng-template>\n\n <ccd-case-edit-generic-errors [error]=\"caseEdit.error\"></ccd-case-edit-generic-errors>\n\n <ccd-callback-errors [callbackErrorsSubject]=\"caseEdit.callbackErrorsSubject\"\n (callbackErrorsContext)=\"callbackErrorsNotify($event)\"></ccd-callback-errors>\n\n <form class=\"check-your-answers\" [formGroup]=\"editForm\" (submit)=\"submit()\">\n <div *ngIf=\"!caseEdit.isEventCompletionChecksRequired\">\n <ng-container *ngIf=\"checkYourAnswerFieldsToDisplayExists()\">\n <h2 class=\"heading-h2\">{{pageTitle | rpxTranslate }}</h2>\n <span class=\"text-16\" *ngIf=\"!caseEdit.isCaseFlagSubmission\">{{'Check the information below carefully.' | rpxTranslate}}</span>\n\n <table class=\"form-table\" aria-describedby=\"check your answers table\">\n <tbody>\n <ng-container *ngFor=\"let page of wizard.pages\">\n <ng-container *ngIf=\"isShown(page)\">\n <ng-container *ngFor=\"let field of page\n | ccdPageFields: editForm\n | ccdReadFieldsFilter: false :undefined :true :allFieldsValues\n | ccdCYAPageLabelFilter\">\n <ng-container *ngIf=\"canShowFieldInCYA(field)\">\n <tr ccdLabelSubstitutor [caseField]=\"field\" [hidden]=\"field.hidden\"\n [formGroup]=\"editForm.controls['data']\" [contextFields]=\"contextFields\">\n <th *ngIf=\"!isLabel(field) && !caseEdit.isCaseFlagSubmission\" class=\"valign-top case-field-label\">\n <span class=\"text-16\">{{field.label | rpxTranslate}}</span>\n </th>\n <td class=\"form-cell case-field-content\" [attr.colspan]=\"isLabel(field) ? '2' : '1'\">\n <ccd-field-read\n [formGroup]=\"editForm.controls['data']\" [topLevelFormGroup]=\"editForm.controls['data']\"\n [caseField]=\"summaryCaseField(field)\" [context]=\"paletteContext\" [caseFields]=\"contextFields\"></ccd-field-read>\n </td>\n <ng-container *ngIf=\"!caseEdit.isCaseFlagSubmission\">\n <td class=\"valign-top check-your-answers__change case-field-change\">\n <a *ngIf=\"isChangeAllowed(field)\" (click)=\"navigateToPage(page.id)\"\n href=\"javascript:void(0)\">\n <span class=\"text-16\" attr.aria-label=\"{{'Change' | rpxTranslate}} {{ field.label | rpxTranslate }}\">\n {{'Change' | rpxTranslate}}\n </span>\n </a>\n </td>\n </ng-container>\n </tr>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </tbody>\n </table>\n </ng-container>\n <ng-container *ngIf=\"readOnlySummaryFieldsToDisplayExists()\">\n\n <table class=\"summary-fields\" aria-describedby=\"summary fields table\">\n <tbody>\n <ng-container *ngFor=\"let field of showSummaryFields\">\n <ng-container [ngSwitch]=\"!(field | ccdIsCompound)\">\n <tr *ngSwitchCase=\"true\" ccdLabelSubstitutor [caseField]=\"field\" [formGroup]=\"editForm.controls['data']\" [contextFields]=\"contextFields\">\n <th id=\"summary-field-label\">{{field.label}}</th>\n <td class=\"form-cell\">\n <ccd-field-read [formGroup]=\"editForm.controls['data']\" [caseField]=\"summaryCaseField(field)\"></ccd-field-read>\n </td>\n </tr>\n <tr *ngSwitchCase=\"false\" class=\"compound-field\" ccdLabelSubstitutor [caseField]=\"field\" [formGroup]=\"editForm.controls['data']\" [contextFields]=\"contextFields\">\n <td colspan=\"2\">\n <ccd-field-read [formGroup]=\"editForm.controls['data']\" [caseField]=\"summaryCaseField(field)\" [caseFields]=\"contextFields\"></ccd-field-read>\n </td>\n </tr>\n </ng-container>\n </ng-container>\n </tbody>\n </table>\n </ng-container>\n <ng-container *ngIf=\"showEventNotes()\">\n <fieldset id=\"fieldset-event\" formGroupName=\"event\">\n <legend style=\"display: none;\"></legend>\n <div class=\"form-group\" [ngClass]=\"{'form-group-error': !!summary && !summary.valid && (summary.dirty || summary.touched)}\">\n <label for=\"field-trigger-summary\" class=\"form-label\">\n Event summary (optional)\n <span class=\"form-hint\">A few words describing the purpose of the event.</span>\n </label>\n <span class=\"error-message\" *ngIf=\"summary?.errors && (summary.dirty || summary.touched)\">\n {{summary.errors | ccdFirstError: eventSummaryLabel | rpxTranslate}}\n </span>\n <input type=\"text\" id=\"field-trigger-summary\" class=\"form-control bottom-30 width-50\"\n [ngClass]=\"{'govuk-input--error': summary?.errors && (summary.dirty || summary.touched)}\" formControlName=\"summary\" maxlength=\"1024\">\n </div>\n <div class=\"form-group\" [ngClass]=\"{'form-group-error': !!description && !description.valid && (description.dirty || description.touched)}\">\n <label for=\"field-trigger-description\" class=\"form-label\">Event description (optional)</label>\n <span class=\"error-message\" *ngIf=\"description?.errors && (description.dirty || description.touched)\">\n {{description.errors | ccdFirstError: eventDescriptionLabel | rpxTranslate}}\n </span>\n <textarea id=\"field-trigger-description\" class=\"form-control bottom-30 width-50\" formControlName=\"description\"\n [ngClass]=\"{'govuk-input--error': description?.errors && (description.dirty || description.touched)}\" maxlength=\"65536\"></textarea>\n </div>\n </fieldset>\n </ng-container>\n </div>\n <ccd-case-event-completion *ngIf=\"caseEdit.isEventCompletionChecksRequired\"\n [eventCompletionParams]=\"caseEdit.eventCompletionParams\"\n (eventCanBeCompleted)=\"onEventCanBeCompleted($event)\">\n </ccd-case-event-completion>\n <div class=\"form-group form-group-related\">\n <button *ngIf=\"!caseEdit.isCaseFlagSubmission\" class=\"button button-secondary\" type=\"button\" [disabled]=\"!hasPrevious() || caseEdit.isSubmitting\" (click)=\"previous()\">\n {{'Previous' | rpxTranslate}}\n </button>\n <button type=\"submit\" [disabled]=\"isDisabled\" class=\"button\">\n {{triggerText | rpxTranslate}}\n </button>\n </div>\n <p class=\"cancel\">\n <a (click)=\"cancel()\" href=\"javascript:void(0)\" [class.disabled]=\"caseEdit.isSubmitting\">{{getCancelText() | rpxTranslate}}</a>\n </p>\n </form>\n</div>\n\n", styles: ["#fieldset-case-data{margin-bottom:30px}#fieldset-case-data th{width:1%;white-space:nowrap;vertical-align:top}.compound-field td{padding:0}#confirmation-header{width:630px;background-color:#17958b;border:solid 1px #979797;color:#fff;text-align:center}#confirmation-body{width:630px;background-color:#fff}.valign-top{vertical-align:top}.summary-fields{margin-bottom:30px}.summary-fields tbody tr th,.summary-fields tbody tr td{border-bottom:0px}a.disabled{pointer-events:none;cursor:default}.case-field-label{width:45%}.case-field-content{width:50%}.no-bottom-border{border-bottom:none}.case-field-change{width:5%}\n"] }]
29084
- }], () => [{ type: CaseEditComponent }, { type: FieldsUtils }, { type: CaseFieldService }, { type: i1$1.ActivatedRoute }, { type: OrderService }, { type: ProfileNotifier }, { type: FormValidatorsService }], null); })();
29085
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEditSubmitComponent, { className: "CaseEditSubmitComponent", filePath: "lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.ts", lineNumber: 27 }); })();
29513
+ }], () => [{ type: CaseEditComponent }, { type: FieldsUtils }, { type: CaseFieldService }, { type: i1$1.ActivatedRoute }, { type: OrderService }, { type: ProfileNotifier }, { type: MultipageComponentStateService }, { type: FormValidatorsService }], null); })();
29514
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEditSubmitComponent, { className: "CaseEditSubmitComponent", filePath: "lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.ts", lineNumber: 28 }); })();
29086
29515
 
29087
29516
  function CaseProgressComponent_div_0_Template(rf, ctx) { if (rf & 1) {
29088
29517
  const _r1 = i0.ɵɵgetCurrentView();
@@ -29330,7 +29759,8 @@ class CaseEditorModule {
29330
29759
  SessionStorageService,
29331
29760
  EventCompletionStateMachineService,
29332
29761
  CaseFlagStateService,
29333
- ValidPageListCaseFieldsService
29762
+ ValidPageListCaseFieldsService,
29763
+ MultipageComponentStateService
29334
29764
  ], imports: [CommonModule,
29335
29765
  RouterModule,
29336
29766
  FormsModule,
@@ -29412,7 +29842,8 @@ class CaseEditorModule {
29412
29842
  SessionStorageService,
29413
29843
  EventCompletionStateMachineService,
29414
29844
  CaseFlagStateService,
29415
- ValidPageListCaseFieldsService
29845
+ ValidPageListCaseFieldsService,
29846
+ MultipageComponentStateService
29416
29847
  ]
29417
29848
  }]
29418
29849
  }], null, null); })();
@@ -29444,7 +29875,7 @@ class CaseEditorModule {
29444
29875
  CallbackErrorsComponent] }); })();
29445
29876
  i0.ɵɵsetComponentScope(CaseEditConfirmComponent, function () { return [i5.NgIf, i4.ɵNgNoValidate, i4.NgControlStatusGroup, i4.FormGroupDirective, MarkdownComponent]; }, function () { return [CaseReferencePipe, CcdCaseTitlePipe, i1.RpxTranslatePipe]; });
29446
29877
  i0.ɵɵsetComponentScope(CaseEditPageComponent, function () { return [i5.NgForOf, i5.NgIf, i4.ɵNgNoValidate, i4.NgControlStatusGroup, i4.FormGroupDirective, CallbackErrorsComponent, MarkdownComponent, CaseEventCompletionComponent, CaseEditFormComponent,
29447
- CaseEditGenericErrorsComponent]; }, function () { return [i5.AsyncPipe, CaseReferencePipe, CcdCaseTitlePipe, i1.RpxTranslatePipe]; });
29878
+ CaseEditGenericErrorsComponent]; }, function () { return [CaseReferencePipe, CcdCaseTitlePipe, i1.RpxTranslatePipe]; });
29448
29879
  i0.ɵɵsetComponentScope(CaseEditFormComponent, function () { return [i5.NgForOf, i5.NgIf, i5.NgSwitch, i5.NgSwitchCase, i4.NgControlStatusGroup, i4.FormGroupDirective, LabelSubstitutorDirective, ConditionalShowFormDirective, FieldReadComponent, FieldWriteComponent]; }, function () { return [IsCompoundPipe, IsReadOnlyAndNotCollectionPipe]; });
29449
29880
  i0.ɵɵsetComponentScope(CaseEditSubmitComponent, function () { return [i5.NgClass, i5.NgForOf, i5.NgIf, i5.NgSwitch, i5.NgSwitchCase, i4.ɵNgNoValidate, i4.DefaultValueAccessor, i4.NgControlStatus, i4.NgControlStatusGroup, i4.MaxLengthValidator, i4.FormGroupDirective, i4.FormControlName, i4.FormGroupName, LabelSubstitutorDirective, CallbackErrorsComponent, MarkdownComponent, FieldReadComponent, CaseEventCompletionComponent, CaseEditGenericErrorsComponent]; }, function () { return [FirstErrorPipe, IsCompoundPipe, CaseReferencePipe, CcdCaseTitlePipe, CcdCYAPageLabelFilterPipe, ReadFieldsFilterPipe, CcdPageFieldsPipe, i1.RpxTranslatePipe]; });
29450
29881
  i0.ɵɵsetComponentScope(CaseCreateComponent, function () { return [i5.NgIf, CaseEditComponent]; }, []);
@@ -31582,6 +32013,7 @@ class CaseEventTriggerComponent {
31582
32013
  activitySubscription;
31583
32014
  caseSubscription;
31584
32015
  parentUrl;
32016
+ routerCurrentNavigation;
31585
32017
  constructor(ngZone, casesService, caseNotifier, router, alertService, route, caseReferencePipe, activityPollingService, sessionStorageService) {
31586
32018
  this.ngZone = ngZone;
31587
32019
  this.casesService = casesService;
@@ -31592,6 +32024,7 @@ class CaseEventTriggerComponent {
31592
32024
  this.caseReferencePipe = caseReferencePipe;
31593
32025
  this.activityPollingService = activityPollingService;
31594
32026
  this.sessionStorageService = sessionStorageService;
32027
+ this.routerCurrentNavigation = this.router.getCurrentNavigation();
31595
32028
  }
31596
32029
  ngOnInit() {
31597
32030
  if (this.route.snapshot.data.case) {
@@ -31670,8 +32103,16 @@ class CaseEventTriggerComponent {
31670
32103
  });
31671
32104
  }
31672
32105
  cancel() {
31673
- if (this.router.url && this.router.url.includes('linkCases')) {
31674
- this.router.navigate(['cases', 'case-details', this.caseDetails.case_id], { fragment: 'Linked cases' });
32106
+ const previousUrl = this.routerCurrentNavigation?.previousNavigation?.finalUrl?.toString();
32107
+ if (previousUrl) {
32108
+ if (previousUrl.indexOf('#') > -1) {
32109
+ const url = previousUrl.split('#')[0];
32110
+ const fragment = previousUrl.split('#')[1].replace('%20', ' ');
32111
+ return this.router.navigate([url], { fragment: fragment });
32112
+ }
32113
+ else {
32114
+ return this.router.navigate([previousUrl]);
32115
+ }
31675
32116
  }
31676
32117
  else {
31677
32118
  return this.router.navigate([this.parentUrl]);
@@ -32246,7 +32687,7 @@ function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_2_ng_
32246
32687
  i0.ɵɵadvance();
32247
32688
  i0.ɵɵproperty("id", "case-viewer-field-read--" + field_r7.id);
32248
32689
  i0.ɵɵadvance(2);
32249
- i0.ɵɵproperty("topLevelFormGroup", ctx_r1.formGroup == null ? null : ctx_r1.formGroup.controls["data"])("caseField", field_r7)("caseReference", ctx_r1.caseDetails.case_id)("markdownUseHrefAsRouterLink", ctx_r1.markdownUseHrefAsRouterLink);
32690
+ i0.ɵɵproperty("topLevelFormGroup", ctx_r1.formGroup.controls["data"])("caseField", field_r7)("caseReference", ctx_r1.caseDetails.case_id)("markdownUseHrefAsRouterLink", ctx_r1.markdownUseHrefAsRouterLink);
32250
32691
  } }
32251
32692
  function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_2_ng_container_3_tr_5_Template(rf, ctx) { if (rf & 1) {
32252
32693
  i0.ɵɵelementStart(0, "tr", 38)(1, "th", 33)(2, "span", 34);
@@ -32295,7 +32736,7 @@ function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_2_Tem
32295
32736
  i0.ɵɵclassMap(tab_r8.id);
32296
32737
  i0.ɵɵattribute("aria-label", i0.ɵɵpipeBind1(1, 4, "case viewer table"));
32297
32738
  i0.ɵɵadvance(3);
32298
- i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBindV(5, 8, i0.ɵɵpureFunction2(14, _c1$3, i0.ɵɵpipeBind1(4, 6, tab_r8), ctx_r1.formGroup == null ? null : ctx_r1.formGroup.controls["data"])));
32739
+ i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBindV(5, 8, i0.ɵɵpureFunction2(14, _c1$3, i0.ɵɵpipeBind1(4, 6, tab_r8), ctx_r1.formGroup.controls["data"])));
32299
32740
  } }
32300
32741
  function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_Template(rf, ctx) { if (rf & 1) {
32301
32742
  i0.ɵɵelementStart(0, "mat-tab", 26);
@@ -32781,7 +33222,7 @@ class CaseFullAccessViewComponent {
32781
33222
  }
32782
33223
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFullAccessViewComponent, [{
32783
33224
  type: Component,
32784
- args: [{ selector: 'ccd-case-full-access-view', template: "<!-- Generic error heading and error message to be displayed only if there are no specific callback errors or warnings, or no error details -->\n<div *ngIf=\"error && !(error.callbackErrors || error.callbackWarnings || error.details)\" class=\"error-summary\"\n role=\"group\" aria-labelledby=\"edit-case-event_error-summary-heading\" tabindex=\"-1\">\n <h1 class=\"heading-h1 error-summary-heading\" id=\"edit-case-event_error-summary-heading\">\n {{'Something went wrong' | rpxTranslate}}\n </h1>\n <div class=\"govuk-error-summary__body\" id=\"edit-case-event_error-summary-body\">\n <p>{{\"We're working to fix the problem. Try again shortly.\" | rpxTranslate}}</p>\n <p>\n <a href=\"get-help\" target=\"_blank\">\n {{\"Contact us\" | rpxTranslate}}</a> {{\"if you're still having problems.\" | rpxTranslate}}\n </p>\n </div>\n</div>\n<!-- Callback error heading and error message to be displayed if there are specific error details -->\n<div *ngIf=\"error && error.details\" class=\"error-summary\" role=\"group\"\n aria-labelledby=\"edit-case-event_error-summary-heading\" tabindex=\"-1\">\n <h2 class=\"heading-h2 error-summary-heading\" id=\"edit-case-event_error-summary-heading\">\n {{'The callback data failed validation' | rpxTranslate}}\n </h2>\n <p>{{error.message | rpxTranslate}}</p>\n <ul *ngIf=\"error.details?.field_errors\" class=\"error-summary-list\">\n <li *ngFor=\"let fieldError of error.details.field_errors\">\n {{fieldError.message | rpxTranslate}}\n </li>\n </ul>\n</div>\n<ccd-callback-errors\n [triggerTextContinue]=\"triggerTextStart\"\n [triggerTextIgnore]=\"triggerTextIgnoreWarnings\"\n [callbackErrorsSubject]=\"callbackErrorsSubject\"\n (callbackErrorsContext)=\"callbackErrorsNotify($event)\">\n</ccd-callback-errors>\n<ccd-activity [caseId]=\"caseDetails.case_id\" [displayMode]=\"BANNER\"></ccd-activity>\n<div class=\"grid-row\">\n <div class=\"column-one-half\">\n <ccd-case-header [caseDetails]=\"caseDetails\"></ccd-case-header>\n <div class=\"case-viewer-controls\" *ngIf=\"hasPrint && !isDraft() && isPrintEnabled()\">\n <a id=\"case-viewer-control-print\" routerLink=\"print\" class=\"button button-secondary\">{{'Print' | rpxTranslate}}</a>\n </div>\n </div>\n <div *ngIf=\"hasEventSelector\" class=\"column-one-half\">\n <ccd-event-trigger [isDisabled]=\"isTriggerButtonDisabled()\" [triggers]=\"caseDetails.triggers\"\n [triggerText]=\"triggerText\"\n [eventId]=\"eventId\"\n (onTriggerChange)=\"clearErrorsAndWarnings()\"\n (onTriggerSubmit)=\"applyTrigger($event)\"></ccd-event-trigger>\n </div>\n</div>\n<div class=\"grid-row\" *ngIf=\"activeCaseFlags && !caseFlagsExternalUser\">\n <div class=\"column-full\">\n <ccd-notification-banner [notificationBannerConfig]=\"notificationBannerConfig\" (linkClicked)=\"onLinkClicked($event)\">\n </ccd-notification-banner>\n </div>\n</div>\n<div class=\"grid-row\">\n <div class=\"column-full\">\n <ng-container *ngIf=\"hasTabsPresent()\">\n <mat-tab-group #tabGroup animationDuration=\"0ms\" (selectedIndexChange)=\"tabChanged($event)\" [disableRipple]=\"true\"\n [selectedIndex]=\"selectedTabIndex\">\n <mat-tab *ngFor=\"let tab of prependedTabs\" [id]=\"tab.id\" [label]=\"tab.label | rpxTranslate\">\n </mat-tab>\n <mat-tab *ngFor=\"let tab of sortedTabs; let curIdx=index\" [id]=\"tab.id\" [label]=\"tab.label | rpxTranslate\">\n <ng-template matTabContent>\n <table [class]=\"tab.id\" [attr.aria-label]=\"'case viewer table' | rpxTranslate\">\n <tbody>\n <ng-container *ngFor=\"let field of tab | ccdTabFields | ccdReadFieldsFilter:false :undefined :true : formGroup?.controls['data']\">\n <div ccdLabelSubstitutor [caseField]=\"field\" [contextFields]=\"caseFields\" [hidden]=\"field.hidden\">\n <ng-container [ngSwitch]=\"!(field | ccdIsCompound)\">\n <tr *ngSwitchCase=\"true\">\n <th id=\"case-viewer-field-label\" *ngIf=\"!isFieldToHaveNoLabel(field)\">\n <div class=\"case-viewer-label text-16\">\n {{field.label | rpxTranslate}}</div>\n </th>\n <td [id]=\"'case-viewer-field-read--' + field.id\" scope=\"col\">\n <span class=\"text-16\">\n <ccd-field-read [topLevelFormGroup]=\"formGroup?.controls['data']\"\n [caseField]=\"field\" [caseReference]=\"caseDetails.case_id\"\n [markdownUseHrefAsRouterLink]=\"markdownUseHrefAsRouterLink\">\n </ccd-field-read>\n </span>\n </td>\n </tr>\n <tr *ngSwitchCase=\"false\" class=\"compound-field\">\n <th [id]=\"'case-viewer-field-read--' + field.id\" scope=\"col\">\n <span class=\"text-16\">\n <ccd-field-read [topLevelFormGroup]=\"formGroup.controls['data']\"\n [caseField]=\"field\" [caseReference]=\"caseDetails.case_id\"\n [markdownUseHrefAsRouterLink]=\"markdownUseHrefAsRouterLink\">\n </ccd-field-read>\n </span>\n </th>\n </tr>\n </ng-container>\n </div>\n </ng-container>\n </tbody>\n </table>\n </ng-template>\n </mat-tab>\n <mat-tab *ngFor=\"let tab of appendedTabs\" [id]=\"tab.id\" [label]=\"tab.label | rpxTranslate\">\n </mat-tab>\n </mat-tab-group>\n <router-outlet *ngIf=\"(prependedTabs && prependedTabs.length) || (appendedTabs && appendedTabs.length)\"></router-outlet>\n </ng-container>\n </div>\n</div>\n", styles: ["th{width:1%;white-space:nowrap;vertical-align:top}.compound-field th{padding:0}.case-viewer-controls{margin-top:47px;margin-bottom:20px}ccd-case-header{float:left;margin-right:10px}ccd-event-trigger{float:right}.case-viewer-label{min-width:300px;white-space:normal}.markdown h3{margin-bottom:0}.hide-table-capion{position:absolute;visibility:hidden}\n"] }]
33225
+ args: [{ selector: 'ccd-case-full-access-view', template: "<!-- Generic error heading and error message to be displayed only if there are no specific callback errors or warnings, or no error details -->\n<div *ngIf=\"error && !(error.callbackErrors || error.callbackWarnings || error.details)\" class=\"error-summary\"\n role=\"group\" aria-labelledby=\"edit-case-event_error-summary-heading\" tabindex=\"-1\">\n <h1 class=\"heading-h1 error-summary-heading\" id=\"edit-case-event_error-summary-heading\">\n {{'Something went wrong' | rpxTranslate}}\n </h1>\n <div class=\"govuk-error-summary__body\" id=\"edit-case-event_error-summary-body\">\n <p>{{\"We're working to fix the problem. Try again shortly.\" | rpxTranslate}}</p>\n <p>\n <a href=\"get-help\" target=\"_blank\">\n {{\"Contact us\" | rpxTranslate}}</a> {{\"if you're still having problems.\" | rpxTranslate}}\n </p>\n </div>\n</div>\n<!-- Callback error heading and error message to be displayed if there are specific error details -->\n<div *ngIf=\"error && error.details\" class=\"error-summary\" role=\"group\"\n aria-labelledby=\"edit-case-event_error-summary-heading\" tabindex=\"-1\">\n <h2 class=\"heading-h2 error-summary-heading\" id=\"edit-case-event_error-summary-heading\">\n {{'The callback data failed validation' | rpxTranslate}}\n </h2>\n <p>{{error.message | rpxTranslate}}</p>\n <ul *ngIf=\"error.details?.field_errors\" class=\"error-summary-list\">\n <li *ngFor=\"let fieldError of error.details.field_errors\">\n {{fieldError.message | rpxTranslate}}\n </li>\n </ul>\n</div>\n<ccd-callback-errors\n [triggerTextContinue]=\"triggerTextStart\"\n [triggerTextIgnore]=\"triggerTextIgnoreWarnings\"\n [callbackErrorsSubject]=\"callbackErrorsSubject\"\n (callbackErrorsContext)=\"callbackErrorsNotify($event)\">\n</ccd-callback-errors>\n<ccd-activity [caseId]=\"caseDetails.case_id\" [displayMode]=\"BANNER\"></ccd-activity>\n<div class=\"grid-row\">\n <div class=\"column-one-half\">\n <ccd-case-header [caseDetails]=\"caseDetails\"></ccd-case-header>\n <div class=\"case-viewer-controls\" *ngIf=\"hasPrint && !isDraft() && isPrintEnabled()\">\n <a id=\"case-viewer-control-print\" routerLink=\"print\" class=\"button button-secondary\">{{'Print' | rpxTranslate}}</a>\n </div>\n </div>\n <div *ngIf=\"hasEventSelector\" class=\"column-one-half\">\n <ccd-event-trigger [isDisabled]=\"isTriggerButtonDisabled()\" [triggers]=\"caseDetails.triggers\"\n [triggerText]=\"triggerText\"\n [eventId]=\"eventId\"\n (onTriggerChange)=\"clearErrorsAndWarnings()\"\n (onTriggerSubmit)=\"applyTrigger($event)\"></ccd-event-trigger>\n </div>\n</div>\n<div class=\"grid-row\" *ngIf=\"activeCaseFlags && !caseFlagsExternalUser\">\n <div class=\"column-full\">\n <ccd-notification-banner [notificationBannerConfig]=\"notificationBannerConfig\" (linkClicked)=\"onLinkClicked($event)\">\n </ccd-notification-banner>\n </div>\n</div>\n<div class=\"grid-row\">\n <div class=\"column-full\">\n <ng-container *ngIf=\"hasTabsPresent()\">\n <mat-tab-group #tabGroup animationDuration=\"0ms\" (selectedIndexChange)=\"tabChanged($event)\" [disableRipple]=\"true\"\n [selectedIndex]=\"selectedTabIndex\">\n <mat-tab *ngFor=\"let tab of prependedTabs\" [id]=\"tab.id\" [label]=\"tab.label | rpxTranslate\">\n </mat-tab>\n <mat-tab *ngFor=\"let tab of sortedTabs; let curIdx=index\" [id]=\"tab.id\" [label]=\"tab.label | rpxTranslate\">\n <ng-template matTabContent>\n <table [class]=\"tab.id\" [attr.aria-label]=\"'case viewer table' | rpxTranslate\">\n <tbody>\n <ng-container *ngFor=\"let field of tab | ccdTabFields | ccdReadFieldsFilter:false :undefined :true : formGroup.controls['data']\">\n <div ccdLabelSubstitutor [caseField]=\"field\" [contextFields]=\"caseFields\" [hidden]=\"field.hidden\">\n <ng-container [ngSwitch]=\"!(field | ccdIsCompound)\">\n <tr *ngSwitchCase=\"true\">\n <th id=\"case-viewer-field-label\" *ngIf=\"!isFieldToHaveNoLabel(field)\">\n <div class=\"case-viewer-label text-16\">\n {{field.label | rpxTranslate}}</div>\n </th>\n <td [id]=\"'case-viewer-field-read--' + field.id\" scope=\"col\">\n <span class=\"text-16\">\n <ccd-field-read [topLevelFormGroup]=\"formGroup.controls['data']\"\n [caseField]=\"field\" [caseReference]=\"caseDetails.case_id\"\n [markdownUseHrefAsRouterLink]=\"markdownUseHrefAsRouterLink\">\n </ccd-field-read>\n </span>\n </td>\n </tr>\n <tr *ngSwitchCase=\"false\" class=\"compound-field\">\n <th [id]=\"'case-viewer-field-read--' + field.id\" scope=\"col\">\n <span class=\"text-16\">\n <ccd-field-read [topLevelFormGroup]=\"formGroup.controls['data']\"\n [caseField]=\"field\" [caseReference]=\"caseDetails.case_id\"\n [markdownUseHrefAsRouterLink]=\"markdownUseHrefAsRouterLink\">\n </ccd-field-read>\n </span>\n </th>\n </tr>\n </ng-container>\n </div>\n </ng-container>\n </tbody>\n </table>\n </ng-template>\n </mat-tab>\n <mat-tab *ngFor=\"let tab of appendedTabs\" [id]=\"tab.id\" [label]=\"tab.label | rpxTranslate\">\n </mat-tab>\n </mat-tab-group>\n <router-outlet *ngIf=\"(prependedTabs && prependedTabs.length) || (appendedTabs && appendedTabs.length)\"></router-outlet>\n </ng-container>\n </div>\n</div>\n", styles: ["th{width:1%;white-space:nowrap;vertical-align:top}.compound-field th{padding:0}.case-viewer-controls{margin-top:47px;margin-bottom:20px}ccd-case-header{float:left;margin-right:10px}ccd-event-trigger{float:right}.case-viewer-label{min-width:300px;white-space:normal}.markdown h3{margin-bottom:0}.hide-table-capion{position:absolute;visibility:hidden}\n"] }]
32785
33226
  }], () => [{ type: i0.NgZone }, { type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: NavigationNotifierService }, { type: OrderService }, { type: ActivityPollingService }, { type: i1$3.MatLegacyDialog }, { type: AlertService }, { type: DraftService }, { type: ErrorNotifierService }, { type: ConvertHrefToRouterService }, { type: i5.Location }, { type: i0.ChangeDetectorRef }, { type: SessionStorageService }, { type: i1.RpxTranslatePipe }], { hasPrint: [{
32786
33227
  type: Input
32787
33228
  }], hasEventSelector: [{
@@ -37199,5 +37640,5 @@ class TestRouteSnapshotBuilder {
37199
37640
  * Generated bundle index. Do not edit.
37200
37641
  */
37201
37642
 
37202
- export { AbstractAppConfig, AbstractFieldReadComponent, AbstractFieldWriteComponent, Activity, ActivityBannerComponent, ActivityComponent, ActivityIconComponent, ActivityInfo, ActivityModule, ActivityPollingService, ActivityService, AddCommentsComponent, AddCommentsErrorMessage, AddCommentsStep, AddressModel, AddressOption, AddressesService, Alert, AlertComponent, AlertIconClassPipe, AlertMessageType, AlertModule, AlertService, AuthService, Banner, BannersService, BeforeYouStartComponent, BodyComponent, BrowserService, CCDCaseLinkType, COMPONENT_PORTAL_INJECTION_TOKEN, CallbackErrorsComponent, CallbackErrorsContext, CaseAccessUtils, CaseBasicAccessViewComponent, CaseChallengedAccessRequestComponent, CaseChallengedAccessSuccessComponent, CaseCreateComponent, CaseDetails, CaseEditComponent, CaseEditConfirmComponent, CaseEditDataModule, CaseEditDataService, CaseEditFormComponent, CaseEditPageComponent, CaseEditSubmitComponent, CaseEditWizardGuard, CaseEditorConfig, CaseEditorModule, CaseEvent, CaseEventCompletionComponent, CaseEventCompletionTaskCancelledComponent, CaseEventCompletionTaskReassignedComponent, CaseEventData, CaseEventTrigger, CaseEventTriggerComponent, CaseField, CaseFieldService, CaseFileViewFieldComponent, CaseFileViewFolderComponent, CaseFileViewFolderDocumentActionsComponent, CaseFileViewFolderSelectorComponent, CaseFileViewFolderSortComponent, CaseFileViewOverlayMenuComponent, CaseFileViewService, CaseFlagCheckYourAnswersPageStep, CaseFlagDisplayContextParameter, CaseFlagErrorMessage, CaseFlagFieldState, CaseFlagFormFields, CaseFlagRefdataService, CaseFlagStatus, CaseFlagSummaryListComponent, CaseFlagSummaryListDisplayMode, CaseFlagTableComponent, CaseFlagWizardStepTitle, CaseFullAccessViewComponent, CaseHeaderComponent, CaseHeaderModule, CaseHistoryViewerFieldComponent, CaseLink, CaseLinkResponse, CaseListComponent, CaseListFiltersComponent, CaseListFiltersModule, CaseListModule, CaseNotifier, CasePaymentHistoryViewerFieldComponent, CasePrintDocument, CasePrinterComponent, CaseProgressComponent, CaseReferencePipe, CaseResolver, CaseSpecificAccessRequestComponent, CaseSpecificAccessSuccessComponent, CaseState, CaseTab, CaseTimelineComponent, CaseTimelineDisplayMode, CaseTimelineModule, CaseType, CaseTypeLite, CaseView, CaseViewComponent, CaseViewEvent, CaseViewTrigger, CaseViewerComponent, CaseViewerModule, CasesService, CaseworkerService, CcdCYAPageLabelFilterPipe, CcdCaseTitlePipe, CcdCollectionTableCaseFieldsFilterPipe, CcdPageFieldsPipe, CcdTabFieldsPipe, CheckYourAnswersComponent, ConditionalShowFormDirective, ConditionalShowModule, ConditionalShowRegistrarService, ConfirmFlagStatusComponent, ConfirmStatusErrorMessage, ConfirmStatusStep, Confirmation, ConvertHrefToRouterService, CreateCaseFiltersComponent, CreateCaseFiltersModule, CreateCaseFiltersSelection, DRAFT_PREFIX, DRAFT_QUERY_PARAM, DashPipe, DateInputComponent, DatePipe, DateTimeFormatUtils, DatetimePickerComponent, DefinitionsModule, DefinitionsService, DeleteOrCancelDialogComponent, DialogsModule, DisplayMode, Document, DocumentData, DocumentDialogComponent, DocumentLinks, DocumentManagementService, DocumentUrlPipe, Draft, DraftService, DynamicListPipe, DynamicRadioListPipe, ESQueryType, Embedded, EnumDisplayDescriptionPipe, ErrorMessageComponent, ErrorNotifierService, EventCaseField, EventCompletionReturnStates, EventCompletionStateMachineService, EventCompletionStates, EventLogComponent, EventLogDetailsComponent, EventLogTableComponent, EventMessageModule, EventStartComponent, EventStartModule, EventStartStateMachineService, EventStatusService, EventTriggerResolver, EventTriggerService, Fee, FeeValue, Field, FieldLabelPipe, FieldReadComponent, FieldReadLabelComponent, FieldType, FieldTypeSanitiser, FieldWriteComponent, FieldsFilterPipe, FieldsPurger, FieldsUtils, FirstErrorPipe, FixedListItem, FixedListPipe, FixedRadioListPipe, FlagFieldDisplayPipe, FocusElementDirective, FocusElementModule, FooterComponent, FormDocument, FormErrorService, FormValidatorsService, FormValueService, FormatTranslatorService, GreyBarService, HRef, HeaderBarComponent, HeadersModule, HttpError, HttpErrorService, HttpService, IsCompoundPipe, IsMandatoryPipe, IsReadOnlyAndNotCollectionPipe, IsReadOnlyPipe, JudicialworkerService, Jurisdiction, JurisdictionService, LabelFieldComponent, LabelSubstitutorDirective, LabelSubstitutorModule, LanguageInterpreterDisplayPipe, LinkCaseReason, LinkCasesComponent, LinkCasesFromReasonValuePipe, LinkCasesReasonValuePipe, LinkDetails, LinkFromReason, LinkReason, LinkedCasesErrorMessages, LinkedCasesEventTriggers, LinkedCasesFromTableComponent, LinkedCasesPages, LinkedCasesResponse, LinkedCasesToTableComponent, LoadingModule, LoadingService, LoadingSpinnerComponent, LoadingSpinnerModule, MEDIA_VIEWER_LOCALSTORAGE_KEY, MULTIPLE_TASKS_FOUND, ManageCaseFlagsComponent, ManageCaseFlagsLabelDisplayPipe, MarkdownComponent, MarkdownComponentModule, MoneyGbpInputComponent, MultipleTasksExistComponent, NavigationComponent, NavigationItemComponent, NavigationNotifierService, NavigationOrigin, NoLinkedCasesComponent, NoTasksAvailableComponent, NotificationBannerComponent, NotificationBannerHeaderClass, NotificationBannerType, OrderService, OrderSummary, OrganisationConverter, OrganisationService, PageValidationService, PaginationComponent, PaginationMetadata, PaginationModule, PaletteContext, PaletteModule, PaletteService, PaletteUtilsModule, Patterns, PaymentField, PhaseComponent, PipesModule, PlaceholderService, PrintUrlPipe, Profile, ProfileNotifier, ProfileService, QualifyingQuestionDetailComponent, QualifyingQuestionOptionsComponent, QualifyingQuestionsErrorMessage, QueryAttachmentsReadComponent, QueryCaseDetailsHeaderComponent, QueryCheckYourAnswersComponent, QueryCreateContext, QueryDetailsComponent, QueryEventCompletionComponent, QueryItemResponseStatus, QueryListComponent, QueryListData, QueryListItem, QueryWriteAddDocumentsComponent, QueryWriteDateInputComponent, QueryWriteRaiseQueryComponent, QueryWriteRespondToQueryComponent, RaiseQueryErrorMessage, ReadCaseFlagFieldComponent, ReadCaseLinkFieldComponent, ReadCollectionFieldComponent, ReadComplexFieldCollectionTableComponent, ReadComplexFieldComponent, ReadComplexFieldRawComponent, ReadComplexFieldTableComponent, ReadDateFieldComponent, ReadDocumentFieldComponent, ReadDynamicListFieldComponent, ReadDynamicMultiSelectListFieldComponent, ReadDynamicRadioListFieldComponent, ReadEmailFieldComponent, ReadFieldsFilterPipe, ReadFixedListFieldComponent, ReadFixedRadioListFieldComponent, ReadJudicialUserFieldComponent, ReadLinkedCasesFieldComponent, ReadMoneyGbpFieldComponent, ReadMultiSelectListFieldComponent, ReadNumberFieldComponent, ReadOrderSummaryFieldComponent, ReadOrderSummaryRowComponent, ReadOrganisationFieldComponent, ReadOrganisationFieldRawComponent, ReadOrganisationFieldTableComponent, ReadPhoneUKFieldComponent, ReadQueryManagementFieldComponent, ReadTextAreaFieldComponent, ReadTextFieldComponent, ReadYesNoFieldComponent, RefdataCaseFlagType, RemoveDialogComponent, RequestOptionsBuilder, RespondToQueryErrorMessages, RetryUtil, RouterHelperService, RouterLinkComponent, SaveOrDiscardDialogComponent, SearchFiltersComponent, SearchFiltersModule, SearchFiltersWrapperComponent, SearchInput, SearchLanguageInterpreterComponent, SearchLanguageInterpreterErrorMessage, SearchLanguageInterpreterStep, SearchResultComponent, SearchResultModule, SearchResultView, SearchResultViewColumn, SearchResultViewItem, SearchResultViewItemComparatorFactory, SearchService, SelectFlagErrorMessage, SelectFlagLocationComponent, SelectFlagLocationErrorMessage, SelectFlagTypeComponent, SelectFlagTypeErrorMessage, SessionStorageService, ShowCondition, SortOrder$1 as SortOrder, SortParameters, SortSearchResultPipe, TabComponent, TableColumnConfig, TableConfig, TabsComponent, TabsModule, TaskAssignedComponent, TaskCancelledComponent, TaskConflictComponent, TaskUnassignedComponent, Terms, TestRouteSnapshotBuilder, UnLinkCasesComponent, UnsupportedFieldComponent, UpdateFlagAddTranslationErrorMessage, UpdateFlagAddTranslationFormComponent, UpdateFlagAddTranslationStep, UpdateFlagComponent, UpdateFlagErrorMessage, UpdateFlagStep, UpdateFlagTitleDisplayPipe, WaysToPayFieldComponent, WindowService, Wizard, WizardFactoryService, WizardPage, WizardPageField, WorkAllocationService, WorkbasketFiltersComponent, WorkbasketFiltersModule, WorkbasketInput, WorkbasketInputFilterService, WorkbasketInputModel, WriteAddressFieldComponent, WriteCaseFlagFieldComponent, WriteCaseLinkFieldComponent, WriteCollectionFieldComponent, WriteComplexFieldComponent, WriteDateContainerFieldComponent, WriteDateFieldComponent, WriteDocumentFieldComponent, WriteDynamicListFieldComponent, WriteDynamicMultiSelectListFieldComponent, WriteDynamicRadioListFieldComponent, WriteEmailFieldComponent, WriteFixedListFieldComponent, WriteFixedRadioListFieldComponent, WriteJudicialUserFieldComponent, WriteLinkedCasesFieldComponent, WriteMoneyGbpFieldComponent, WriteMultiSelectListFieldComponent, WriteNumberFieldComponent, WriteOrderSummaryFieldComponent, WriteOrganisationComplexFieldComponent, WriteOrganisationFieldComponent, WritePhoneUKFieldComponent, WriteTextAreaFieldComponent, WriteTextFieldComponent, WriteYesNoFieldComponent, YesNoService, aCaseField, caseMessagesMockData, createACL, createCaseEventTrigger, createCaseField, createComplexFieldOverride, createFieldType, createFixedListFieldType, createHiddenComplexFieldOverride, createMultiSelectListFieldType, createWizardPage, createWizardPageField, editorRouting, initDialog, newCaseField, textFieldType, viewerRouting };
37643
+ export { AbstractAppConfig, AbstractFieldReadComponent, AbstractFieldWriteComponent, AbstractFieldWriteJourneyComponent, AbstractJourneyComponent, Activity, ActivityBannerComponent, ActivityComponent, ActivityIconComponent, ActivityInfo, ActivityModule, ActivityPollingService, ActivityService, AddCommentsComponent, AddCommentsErrorMessage, AddCommentsStep, AddressModel, AddressOption, AddressesService, Alert, AlertComponent, AlertIconClassPipe, AlertMessageType, AlertModule, AlertService, AuthService, Banner, BannersService, BeforeYouStartComponent, BodyComponent, BrowserService, CCDCaseLinkType, COMPONENT_PORTAL_INJECTION_TOKEN, CallbackErrorsComponent, CallbackErrorsContext, CaseAccessUtils, CaseBasicAccessViewComponent, CaseChallengedAccessRequestComponent, CaseChallengedAccessSuccessComponent, CaseCreateComponent, CaseDetails, CaseEditComponent, CaseEditConfirmComponent, CaseEditDataModule, CaseEditDataService, CaseEditFormComponent, CaseEditPageComponent, CaseEditSubmitComponent, CaseEditWizardGuard, CaseEditorConfig, CaseEditorModule, CaseEvent, CaseEventCompletionComponent, CaseEventCompletionTaskCancelledComponent, CaseEventCompletionTaskReassignedComponent, CaseEventData, CaseEventTrigger, CaseEventTriggerComponent, CaseField, CaseFieldService, CaseFileViewFieldComponent, CaseFileViewFolderComponent, CaseFileViewFolderDocumentActionsComponent, CaseFileViewFolderSelectorComponent, CaseFileViewFolderSortComponent, CaseFileViewOverlayMenuComponent, CaseFileViewService, CaseFlagCheckYourAnswersPageStep, CaseFlagDisplayContextParameter, CaseFlagErrorMessage, CaseFlagFieldState, CaseFlagFormFields, CaseFlagRefdataService, CaseFlagStatus, CaseFlagSummaryListComponent, CaseFlagSummaryListDisplayMode, CaseFlagTableComponent, CaseFlagWizardStepTitle, CaseFullAccessViewComponent, CaseHeaderComponent, CaseHeaderModule, CaseHistoryViewerFieldComponent, CaseLink, CaseLinkResponse, CaseListComponent, CaseListFiltersComponent, CaseListFiltersModule, CaseListModule, CaseNotifier, CasePaymentHistoryViewerFieldComponent, CasePrintDocument, CasePrinterComponent, CaseProgressComponent, CaseReferencePipe, CaseResolver, CaseSpecificAccessRequestComponent, CaseSpecificAccessSuccessComponent, CaseState, CaseTab, CaseTimelineComponent, CaseTimelineDisplayMode, CaseTimelineModule, CaseType, CaseTypeLite, CaseView, CaseViewComponent, CaseViewEvent, CaseViewTrigger, CaseViewerComponent, CaseViewerModule, CasesService, CaseworkerService, CcdCYAPageLabelFilterPipe, CcdCaseTitlePipe, CcdCollectionTableCaseFieldsFilterPipe, CcdPageFieldsPipe, CcdTabFieldsPipe, CheckYourAnswersComponent, ConditionalShowFormDirective, ConditionalShowModule, ConditionalShowRegistrarService, ConfirmFlagStatusComponent, ConfirmStatusErrorMessage, ConfirmStatusStep, Confirmation, ConvertHrefToRouterService, CreateCaseFiltersComponent, CreateCaseFiltersModule, CreateCaseFiltersSelection, DRAFT_PREFIX, DRAFT_QUERY_PARAM, DashPipe, DateInputComponent, DatePipe, DateTimeFormatUtils, DatetimePickerComponent, DefinitionsModule, DefinitionsService, DeleteOrCancelDialogComponent, DialogsModule, DisplayMode, Document, DocumentData, DocumentDialogComponent, DocumentLinks, DocumentManagementService, DocumentUrlPipe, Draft, DraftService, DynamicListPipe, DynamicRadioListPipe, ESQueryType, Embedded, EnumDisplayDescriptionPipe, ErrorMessageComponent, ErrorNotifierService, EventCaseField, EventCompletionReturnStates, EventCompletionStateMachineService, EventCompletionStates, EventLogComponent, EventLogDetailsComponent, EventLogTableComponent, EventMessageModule, EventStartComponent, EventStartModule, EventStartStateMachineService, EventStatusService, EventTriggerResolver, EventTriggerService, Fee, FeeValue, Field, FieldLabelPipe, FieldReadComponent, FieldReadLabelComponent, FieldType, FieldTypeSanitiser, FieldWriteComponent, FieldsFilterPipe, FieldsPurger, FieldsUtils, FirstErrorPipe, FixedListItem, FixedListPipe, FixedRadioListPipe, FlagFieldDisplayPipe, FocusElementDirective, FocusElementModule, FooterComponent, FormDocument, FormErrorService, FormValidatorsService, FormValueService, FormatTranslatorService, GreyBarService, HRef, HeaderBarComponent, HeadersModule, HttpError, HttpErrorService, HttpService, IsCompoundPipe, IsMandatoryPipe, IsReadOnlyAndNotCollectionPipe, IsReadOnlyPipe, JudicialworkerService, Jurisdiction, JurisdictionService, LabelFieldComponent, LabelSubstitutorDirective, LabelSubstitutorModule, LanguageInterpreterDisplayPipe, LinkCaseReason, LinkCasesComponent, LinkCasesFromReasonValuePipe, LinkCasesReasonValuePipe, LinkDetails, LinkFromReason, LinkReason, LinkedCasesErrorMessages, LinkedCasesEventTriggers, LinkedCasesFromTableComponent, LinkedCasesPages, LinkedCasesResponse, LinkedCasesToTableComponent, LoadingModule, LoadingService, LoadingSpinnerComponent, LoadingSpinnerModule, MEDIA_VIEWER_LOCALSTORAGE_KEY, MULTIPLE_TASKS_FOUND, ManageCaseFlagsComponent, ManageCaseFlagsLabelDisplayPipe, MarkdownComponent, MarkdownComponentModule, MoneyGbpInputComponent, MultipageComponentStateService, MultipleTasksExistComponent, NavigationComponent, NavigationItemComponent, NavigationNotifierService, NavigationOrigin, NoLinkedCasesComponent, NoTasksAvailableComponent, NotificationBannerComponent, NotificationBannerHeaderClass, NotificationBannerType, OrderService, OrderSummary, OrganisationConverter, OrganisationService, PageValidationService, PaginationComponent, PaginationMetadata, PaginationModule, PaletteContext, PaletteModule, PaletteService, PaletteUtilsModule, Patterns, PaymentField, PhaseComponent, PipesModule, PlaceholderService, PrintUrlPipe, Profile, ProfileNotifier, ProfileService, QualifyingQuestionDetailComponent, QualifyingQuestionOptionsComponent, QualifyingQuestionsErrorMessage, QueryAttachmentsReadComponent, QueryCaseDetailsHeaderComponent, QueryCheckYourAnswersComponent, QueryCreateContext, QueryDetailsComponent, QueryEventCompletionComponent, QueryItemResponseStatus, QueryListComponent, QueryListData, QueryListItem, QueryWriteAddDocumentsComponent, QueryWriteDateInputComponent, QueryWriteRaiseQueryComponent, QueryWriteRespondToQueryComponent, RaiseQueryErrorMessage, ReadCaseFlagFieldComponent, ReadCaseLinkFieldComponent, ReadCollectionFieldComponent, ReadComplexFieldCollectionTableComponent, ReadComplexFieldComponent, ReadComplexFieldRawComponent, ReadComplexFieldTableComponent, ReadDateFieldComponent, ReadDocumentFieldComponent, ReadDynamicListFieldComponent, ReadDynamicMultiSelectListFieldComponent, ReadDynamicRadioListFieldComponent, ReadEmailFieldComponent, ReadFieldsFilterPipe, ReadFixedListFieldComponent, ReadFixedRadioListFieldComponent, ReadJudicialUserFieldComponent, ReadLinkedCasesFieldComponent, ReadMoneyGbpFieldComponent, ReadMultiSelectListFieldComponent, ReadNumberFieldComponent, ReadOrderSummaryFieldComponent, ReadOrderSummaryRowComponent, ReadOrganisationFieldComponent, ReadOrganisationFieldRawComponent, ReadOrganisationFieldTableComponent, ReadPhoneUKFieldComponent, ReadQueryManagementFieldComponent, ReadTextAreaFieldComponent, ReadTextFieldComponent, ReadYesNoFieldComponent, RefdataCaseFlagType, RemoveDialogComponent, RequestOptionsBuilder, RespondToQueryErrorMessages, RetryUtil, RouterHelperService, RouterLinkComponent, SaveOrDiscardDialogComponent, SearchFiltersComponent, SearchFiltersModule, SearchFiltersWrapperComponent, SearchInput, SearchLanguageInterpreterComponent, SearchLanguageInterpreterErrorMessage, SearchLanguageInterpreterStep, SearchResultComponent, SearchResultModule, SearchResultView, SearchResultViewColumn, SearchResultViewItem, SearchResultViewItemComparatorFactory, SearchService, SelectFlagErrorMessage, SelectFlagLocationComponent, SelectFlagLocationErrorMessage, SelectFlagTypeComponent, SelectFlagTypeErrorMessage, SessionStorageService, ShowCondition, SortOrder$1 as SortOrder, SortParameters, SortSearchResultPipe, TabComponent, TableColumnConfig, TableConfig, TabsComponent, TabsModule, TaskAssignedComponent, TaskCancelledComponent, TaskConflictComponent, TaskUnassignedComponent, Terms, TestRouteSnapshotBuilder, UnLinkCasesComponent, UnsupportedFieldComponent, UpdateFlagAddTranslationErrorMessage, UpdateFlagAddTranslationFormComponent, UpdateFlagAddTranslationStep, UpdateFlagComponent, UpdateFlagErrorMessage, UpdateFlagStep, UpdateFlagTitleDisplayPipe, WaysToPayFieldComponent, WindowService, Wizard, WizardFactoryService, WizardPage, WizardPageField, WorkAllocationService, WorkbasketFiltersComponent, WorkbasketFiltersModule, WorkbasketInput, WorkbasketInputFilterService, WorkbasketInputModel, WriteAddressFieldComponent, WriteCaseFlagFieldComponent, WriteCaseLinkFieldComponent, WriteCollectionFieldComponent, WriteComplexFieldComponent, WriteDateContainerFieldComponent, WriteDateFieldComponent, WriteDocumentFieldComponent, WriteDynamicListFieldComponent, WriteDynamicMultiSelectListFieldComponent, WriteDynamicRadioListFieldComponent, WriteEmailFieldComponent, WriteFixedListFieldComponent, WriteFixedRadioListFieldComponent, WriteJudicialUserFieldComponent, WriteLinkedCasesFieldComponent, WriteMoneyGbpFieldComponent, WriteMultiSelectListFieldComponent, WriteNumberFieldComponent, WriteOrderSummaryFieldComponent, WriteOrganisationComplexFieldComponent, WriteOrganisationFieldComponent, WritePhoneUKFieldComponent, WriteTextAreaFieldComponent, WriteTextFieldComponent, WriteYesNoFieldComponent, YesNoService, aCaseField, caseMessagesMockData, createACL, createCaseEventTrigger, createCaseField, createComplexFieldOverride, createFieldType, createFixedListFieldType, createHiddenComplexFieldOverride, createMultiSelectListFieldType, createWizardPage, createWizardPageField, editorRouting, initDialog, newCaseField, textFieldType, viewerRouting };
37203
37644
  //# sourceMappingURL=hmcts-ccd-case-ui-toolkit.mjs.map