@hmcts/ccd-case-ui-toolkit 7.2.27 → 7.2.28

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 (24) hide show
  1. package/esm2022/lib/shared/components/palette/palette.module.mjs +7 -2
  2. package/esm2022/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.mjs +51 -193
  3. package/esm2022/lib/shared/components/palette/query-management/components/query-write/query-write-raise-query/query-write-raise-query.component.mjs +59 -6
  4. package/esm2022/lib/shared/components/palette/query-management/components/query-write/query-write-respond-to-query/query-write-respond-to-query.component.mjs +39 -6
  5. package/esm2022/lib/shared/components/palette/query-management/constants/query-management.constants.mjs +7 -0
  6. package/esm2022/lib/shared/components/palette/query-management/read-query-management-field.component.mjs +18 -9
  7. package/esm2022/lib/shared/components/palette/query-management/services/index.mjs +2 -1
  8. package/esm2022/lib/shared/components/palette/query-management/services/query-management.service.mjs +179 -0
  9. package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs +585 -462
  10. package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
  11. package/lib/shared/components/palette/palette.module.d.ts.map +1 -1
  12. package/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.d.ts +15 -13
  13. package/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.d.ts.map +1 -1
  14. package/lib/shared/components/palette/query-management/components/query-write/query-write-raise-query/query-write-raise-query.component.d.ts +24 -3
  15. package/lib/shared/components/palette/query-management/components/query-write/query-write-raise-query/query-write-raise-query.component.d.ts.map +1 -1
  16. package/lib/shared/components/palette/query-management/components/query-write/query-write-respond-to-query/query-write-respond-to-query.component.d.ts +12 -3
  17. package/lib/shared/components/palette/query-management/components/query-write/query-write-respond-to-query/query-write-respond-to-query.component.d.ts.map +1 -1
  18. package/lib/shared/components/palette/query-management/constants/query-management.constants.d.ts +7 -0
  19. package/lib/shared/components/palette/query-management/constants/query-management.constants.d.ts.map +1 -0
  20. package/lib/shared/components/palette/query-management/services/index.d.ts +1 -0
  21. package/lib/shared/components/palette/query-management/services/index.d.ts.map +1 -1
  22. package/lib/shared/components/palette/query-management/services/query-management.service.d.ts +21 -0
  23. package/lib/shared/components/palette/query-management/services/query-management.service.d.ts.map +1 -0
  24. package/package.json +1 -1
@@ -20645,252 +20645,6 @@ class QualifyingQuestionService {
20645
20645
  type: Injectable
20646
20646
  }], null, null); })();
20647
20647
 
20648
- function QualifyingQuestionOptionsComponent_ng_container_0_ng_container_10_Template(rf, ctx) { if (rf & 1) {
20649
- i0.ɵɵelementContainerStart(0);
20650
- i0.ɵɵelementStart(1, "p", 8)(2, "span", 9);
20651
- i0.ɵɵtext(3);
20652
- i0.ɵɵpipe(4, "rpxTranslate");
20653
- i0.ɵɵelementEnd();
20654
- i0.ɵɵtext(5);
20655
- i0.ɵɵpipe(6, "rpxTranslate");
20656
- i0.ɵɵelementEnd();
20657
- i0.ɵɵelementContainerEnd();
20658
- } if (rf & 2) {
20659
- const ctx_r0 = i0.ɵɵnextContext(2);
20660
- i0.ɵɵadvance(3);
20661
- i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(4, 2, "Error:"), " ");
20662
- i0.ɵɵadvance(2);
20663
- i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(6, 4, ctx_r0.qualifyingQuestionsErrorMessage.SELECT_AN_OPTION), " ");
20664
- } }
20665
- function QualifyingQuestionOptionsComponent_ng_container_0_ng_container_12_ng_container_1_Template(rf, ctx) { if (rf & 1) {
20666
- i0.ɵɵelementContainerStart(0);
20667
- i0.ɵɵelementStart(1, "div", 13);
20668
- i0.ɵɵtext(2);
20669
- i0.ɵɵpipe(3, "rpxTranslate");
20670
- i0.ɵɵelementEnd();
20671
- i0.ɵɵelementContainerEnd();
20672
- } if (rf & 2) {
20673
- i0.ɵɵadvance(2);
20674
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 1, "If your issue is not covered by the options above, raise a query:"));
20675
- } }
20676
- function QualifyingQuestionOptionsComponent_ng_container_0_ng_container_12_Template(rf, ctx) { if (rf & 1) {
20677
- const _r2 = i0.ɵɵgetCurrentView();
20678
- i0.ɵɵelementContainerStart(0);
20679
- i0.ɵɵtemplate(1, QualifyingQuestionOptionsComponent_ng_container_0_ng_container_12_ng_container_1_Template, 4, 3, "ng-container", 0);
20680
- i0.ɵɵelementStart(2, "div", 10)(3, "input", 11);
20681
- i0.ɵɵlistener("change", function QualifyingQuestionOptionsComponent_ng_container_0_ng_container_12_Template_input_change_3_listener() { const qualifyingQuestion_r3 = i0.ɵɵrestoreView(_r2).$implicit; const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.onSelectionChange(qualifyingQuestion_r3)); });
20682
- i0.ɵɵelementEnd();
20683
- i0.ɵɵelementStart(4, "label", 12);
20684
- i0.ɵɵtext(5);
20685
- i0.ɵɵpipe(6, "rpxTranslate");
20686
- i0.ɵɵelementEnd()();
20687
- i0.ɵɵelementContainerEnd();
20688
- } if (rf & 2) {
20689
- const qualifyingQuestion_r3 = ctx.$implicit;
20690
- const isLast_r4 = ctx.last;
20691
- const ctx_r0 = i0.ɵɵnextContext(2);
20692
- i0.ɵɵadvance();
20693
- i0.ɵɵproperty("ngIf", isLast_r4);
20694
- i0.ɵɵadvance(2);
20695
- i0.ɵɵpropertyInterpolate("id", qualifyingQuestion_r3.name);
20696
- i0.ɵɵproperty("formControl", ctx_r0.qualifyingQuestionsControl)("value", qualifyingQuestion_r3);
20697
- i0.ɵɵadvance();
20698
- i0.ɵɵproperty("for", qualifyingQuestion_r3.name);
20699
- i0.ɵɵadvance();
20700
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 6, qualifyingQuestion_r3.name));
20701
- } }
20702
- function QualifyingQuestionOptionsComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
20703
- i0.ɵɵelementContainerStart(0);
20704
- i0.ɵɵelementStart(1, "div", 1)(2, "fieldset", 2)(3, "legend", 3)(4, "h1", 4);
20705
- i0.ɵɵtext(5);
20706
- i0.ɵɵpipe(6, "rpxTranslate");
20707
- i0.ɵɵelementEnd()();
20708
- i0.ɵɵelementStart(7, "h2", 5);
20709
- i0.ɵɵtext(8);
20710
- i0.ɵɵpipe(9, "rpxTranslate");
20711
- i0.ɵɵelementEnd();
20712
- i0.ɵɵtemplate(10, QualifyingQuestionOptionsComponent_ng_container_0_ng_container_10_Template, 7, 6, "ng-container", 0);
20713
- i0.ɵɵelementStart(11, "div", 6);
20714
- i0.ɵɵtemplate(12, QualifyingQuestionOptionsComponent_ng_container_0_ng_container_12_Template, 7, 8, "ng-container", 7);
20715
- i0.ɵɵpipe(13, "async");
20716
- i0.ɵɵelementEnd()()();
20717
- i0.ɵɵelementContainerEnd();
20718
- } if (rf & 2) {
20719
- const ctx_r0 = i0.ɵɵnextContext();
20720
- i0.ɵɵadvance();
20721
- i0.ɵɵclassProp("govuk-form-group--error", ctx_r0.displayError);
20722
- i0.ɵɵadvance(4);
20723
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 6, "Raise a new query"), " ");
20724
- i0.ɵɵadvance(3);
20725
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(9, 8, "What do you need help to do?"), " ");
20726
- i0.ɵɵadvance(2);
20727
- i0.ɵɵproperty("ngIf", ctx_r0.displayError);
20728
- i0.ɵɵadvance(2);
20729
- i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBind1(13, 10, ctx_r0.qualifyingQuestions$));
20730
- } }
20731
- class QualifyingQuestionOptionsComponent {
20732
- route;
20733
- router;
20734
- qualifyingQuestionService;
20735
- qualifyingQuestionsControl;
20736
- qualifyingQuestions$;
20737
- questionSelected = new EventEmitter();
20738
- qualifyingQuestionsErrorMessage = QualifyingQuestionsErrorMessage;
20739
- caseId;
20740
- constructor(route, router, qualifyingQuestionService) {
20741
- this.route = route;
20742
- this.router = router;
20743
- this.qualifyingQuestionService = qualifyingQuestionService;
20744
- }
20745
- ngOnInit() {
20746
- this.caseId = this.route.snapshot.params.cid;
20747
- // Check if there's already a selected qualifying question from the service
20748
- const savedSelection = this.qualifyingQuestionService.getQualifyingQuestionSelection();
20749
- if (savedSelection) {
20750
- this.qualifyingQuestionsControl.setValue(savedSelection);
20751
- }
20752
- }
20753
- click() {
20754
- this.router.navigate(['cases', 'case-details', this.caseId], { fragment: 'Queries' });
20755
- }
20756
- get displayError() {
20757
- return this.qualifyingQuestionsControl.touched && this.qualifyingQuestionsControl.hasError('required');
20758
- }
20759
- onSelectionChange(qualifyingQuestion) {
20760
- this.questionSelected.emit(qualifyingQuestion);
20761
- }
20762
- static ɵfac = function QualifyingQuestionOptionsComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QualifyingQuestionOptionsComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(QualifyingQuestionService)); };
20763
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QualifyingQuestionOptionsComponent, selectors: [["ccd-qualifying-question-options"]], inputs: { qualifyingQuestionsControl: "qualifyingQuestionsControl", qualifyingQuestions$: "qualifyingQuestions$" }, outputs: { questionSelected: "questionSelected" }, decls: 1, vars: 1, consts: [[4, "ngIf"], [1, "govuk-form-group"], [1, "govuk-fieldset"], [1, "govuk-fieldset__legend", "govuk-fieldset__legend--l"], [1, "govuk-fieldset__heading"], [1, "govuk-heading-m", "govuk-!-margin-top-10"], ["data-module", "govuk-radios", 1, "govuk-radios"], [4, "ngFor", "ngForOf"], [1, "govuk-error-message"], [1, "govuk-visually-hidden"], [1, "govuk-radios__item"], ["name", "qualifyingQuestionOption", "type", "radio", 1, "govuk-radios__input", 3, "change", "id", "formControl", "value"], [1, "govuk-label", "govuk-radios__label", 3, "for"], [1, "qm-qualifying-question__divider"]], template: function QualifyingQuestionOptionsComponent_Template(rf, ctx) { if (rf & 1) {
20764
- i0.ɵɵtemplate(0, QualifyingQuestionOptionsComponent_ng_container_0_Template, 14, 12, "ng-container", 0);
20765
- } if (rf & 2) {
20766
- i0.ɵɵproperty("ngIf", ctx.qualifyingQuestionsControl);
20767
- } }, dependencies: [i5.NgForOf, i5.NgIf, i4.DefaultValueAccessor, i4.RadioControlValueAccessor, i4.NgControlStatus, i4.FormControlDirective, i5.AsyncPipe, i1.RpxTranslatePipe], encapsulation: 2 });
20768
- }
20769
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QualifyingQuestionOptionsComponent, [{
20770
- type: Component,
20771
- args: [{ selector: 'ccd-qualifying-question-options', template: "<ng-container *ngIf=\"qualifyingQuestionsControl\">\n <div class=\"govuk-form-group\" [class.govuk-form-group--error]=\"displayError\">\n <fieldset class=\"govuk-fieldset\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--l\">\n <h1 class=\"govuk-fieldset__heading\">\n {{ 'Raise a new query' | rpxTranslate }}\n </h1>\n </legend>\n <h2 class=\"govuk-heading-m govuk-!-margin-top-10\">\n {{ 'What do you need help to do?' | rpxTranslate }}\n </h2>\n\n <ng-container *ngIf=\"displayError\">\n <p class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate }} </span>{{\n qualifyingQuestionsErrorMessage.SELECT_AN_OPTION | rpxTranslate }}\n </p>\n </ng-container>\n\n <div class=\"govuk-radios\" data-module=\"govuk-radios\">\n <ng-container *ngFor=\"let qualifyingQuestion of qualifyingQuestions$ | async; let isLast = last\">\n <ng-container *ngIf=\"isLast\">\n <div class=\"qm-qualifying-question__divider\">{{ 'If your issue is not covered by the options above, raise a query:' | rpxTranslate }}</div>\n </ng-container>\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" \n id=\"{{qualifyingQuestion.name}}\" \n name=\"qualifyingQuestionOption\"\n type=\"radio\" [formControl]=\"qualifyingQuestionsControl\" \n [value]=\"qualifyingQuestion\"\n (change)=\"onSelectionChange(qualifyingQuestion)\">\n <label class=\"govuk-label govuk-radios__label\" [for]=\"qualifyingQuestion.name\">{{ qualifyingQuestion.name |\n rpxTranslate }}</label>\n </div>\n </ng-container>\n </div>\n </fieldset>\n </div>\n</ng-container>\n" }]
20772
- }], () => [{ type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: QualifyingQuestionService }], { qualifyingQuestionsControl: [{
20773
- type: Input
20774
- }], qualifyingQuestions$: [{
20775
- type: Input
20776
- }], questionSelected: [{
20777
- type: Output
20778
- }] }); })();
20779
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QualifyingQuestionOptionsComponent, { className: "QualifyingQuestionOptionsComponent", filePath: "lib/shared/components/palette/query-management/components/qualifying-questions/qualifying-question-options/qualifying-question-options.component.ts", lineNumber: 13 }); })();
20780
-
20781
- function QueryAttachmentsReadComponent_ng_container_0_ccd_read_collection_field_1_Template(rf, ctx) { if (rf & 1) {
20782
- i0.ɵɵelement(0, "ccd-read-collection-field", 2);
20783
- } if (rf & 2) {
20784
- const ctx_r0 = i0.ɵɵnextContext(2);
20785
- i0.ɵɵproperty("caseField", ctx_r0.caseFieldWithAttachments);
20786
- } }
20787
- function QueryAttachmentsReadComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
20788
- i0.ɵɵelementContainerStart(0);
20789
- i0.ɵɵtemplate(1, QueryAttachmentsReadComponent_ng_container_0_ccd_read_collection_field_1_Template, 1, 1, "ccd-read-collection-field", 1);
20790
- i0.ɵɵelementContainerEnd();
20791
- } if (rf & 2) {
20792
- const ctx_r0 = i0.ɵɵnextContext();
20793
- i0.ɵɵadvance();
20794
- i0.ɵɵproperty("ngIf", (ctx_r0.attachments == null ? null : ctx_r0.attachments.length) > 0);
20795
- } }
20796
- class QueryAttachmentsReadComponent {
20797
- attachments;
20798
- caseFieldWithAttachments;
20799
- ngOnChanges() {
20800
- this.caseFieldWithAttachments = Object.assign(new CaseField(), {
20801
- id: '',
20802
- label: '',
20803
- hint_text: '',
20804
- field_type: Object.assign(new FieldType(), {
20805
- id: 'QueryDocuments',
20806
- type: 'QueryDocuments',
20807
- min: null,
20808
- max: null,
20809
- regular_expression: null,
20810
- fixed_list_items: [],
20811
- complex_fields: [],
20812
- collection_field_type: Object.assign(new FieldType(), {
20813
- id: 'Document',
20814
- type: 'Document',
20815
- min: null,
20816
- max: null,
20817
- regular_expression: null,
20818
- fixed_list_items: [],
20819
- complex_fields: [],
20820
- collection_field_type: null
20821
- })
20822
- }),
20823
- display_context_parameter: '#COLLECTION(allowInsert,allowUpdate)',
20824
- value: []
20825
- });
20826
- this.caseFieldWithAttachments.value = this.attachments;
20827
- }
20828
- static ɵfac = function QueryAttachmentsReadComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryAttachmentsReadComponent)(); };
20829
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryAttachmentsReadComponent, selectors: [["ccd-query-attachments-read"]], inputs: { attachments: "attachments" }, features: [i0.ɵɵNgOnChangesFeature], decls: 1, vars: 1, consts: [[4, "ngIf"], [3, "caseField", 4, "ngIf"], [3, "caseField"]], template: function QueryAttachmentsReadComponent_Template(rf, ctx) { if (rf & 1) {
20830
- i0.ɵɵtemplate(0, QueryAttachmentsReadComponent_ng_container_0_Template, 2, 1, "ng-container", 0);
20831
- } if (rf & 2) {
20832
- i0.ɵɵproperty("ngIf", (ctx.attachments == null ? null : ctx.attachments.length) > 0);
20833
- } }, styles: ["ccd-query-attachments-read .collection-field-table tr>td{border-bottom:none;padding-bottom:0}\n"], encapsulation: 2 });
20834
- }
20835
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryAttachmentsReadComponent, [{
20836
- type: Component,
20837
- args: [{ selector: 'ccd-query-attachments-read', encapsulation: ViewEncapsulation.None, template: "<ng-container *ngIf=\"attachments?.length > 0\">\n <ccd-read-collection-field\n *ngIf=\"attachments?.length > 0\"\n [caseField]=\"caseFieldWithAttachments\"\n >\n </ccd-read-collection-field>\n</ng-container>\n", styles: ["ccd-query-attachments-read .collection-field-table tr>td{border-bottom:none;padding-bottom:0}\n"] }]
20838
- }], null, { attachments: [{
20839
- type: Input
20840
- }] }); })();
20841
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryAttachmentsReadComponent, { className: "QueryAttachmentsReadComponent", filePath: "lib/shared/components/palette/query-management/components/query-attachments-read/query-attachments-read.component.ts", lineNumber: 10 }); })();
20842
-
20843
- function QueryCaseDetailsHeaderComponent_h1_0_Template(rf, ctx) { if (rf & 1) {
20844
- i0.ɵɵelementStart(0, "h1", 2);
20845
- i0.ɵɵtext(1);
20846
- i0.ɵɵpipe(2, "ccdCaseReference");
20847
- i0.ɵɵelementEnd();
20848
- } if (rf & 2) {
20849
- const ctx_r0 = i0.ɵɵnextContext();
20850
- i0.ɵɵadvance();
20851
- i0.ɵɵtextInterpolate1("#", i0.ɵɵpipeBind1(2, 1, ctx_r0.caseDetails.case_id), "");
20852
- } }
20853
- function QueryCaseDetailsHeaderComponent_div_1_Template(rf, ctx) { if (rf & 1) {
20854
- i0.ɵɵelementStart(0, "div", 3);
20855
- i0.ɵɵelement(1, "ccd-label-field", 4);
20856
- i0.ɵɵelementEnd();
20857
- } if (rf & 2) {
20858
- const ctx_r0 = i0.ɵɵnextContext();
20859
- i0.ɵɵadvance();
20860
- i0.ɵɵproperty("caseField", ctx_r0.caseTitle)("caseFields", ctx_r0.caseFields);
20861
- } }
20862
- class QueryCaseDetailsHeaderComponent {
20863
- caseDetails;
20864
- caseTitle;
20865
- caseFields;
20866
- ngOnInit() {
20867
- this.caseTitle = new CaseField();
20868
- this.caseTitle.label = this.caseDetails?.state?.title_display;
20869
- this.caseFields = this.getCaseFieldsInfo();
20870
- }
20871
- getCaseFieldsInfo() {
20872
- const caseDataFields = this.caseDetails?.tabs?.reduce((acc, tab) => {
20873
- return acc.concat(tab.fields);
20874
- }, []);
20875
- return caseDataFields.concat(this.caseDetails.metadataFields);
20876
- }
20877
- static ɵfac = function QueryCaseDetailsHeaderComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryCaseDetailsHeaderComponent)(); };
20878
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryCaseDetailsHeaderComponent, selectors: [["ccd-query-case-details-header"]], inputs: { caseDetails: "caseDetails" }, decls: 2, vars: 2, consts: [["class", "heading-h1", 4, "ngIf"], ["class", "case-title", 4, "ngIf"], [1, "heading-h1"], [1, "case-title"], [3, "caseField", "caseFields"]], template: function QueryCaseDetailsHeaderComponent_Template(rf, ctx) { if (rf & 1) {
20879
- i0.ɵɵtemplate(0, QueryCaseDetailsHeaderComponent_h1_0_Template, 3, 3, "h1", 0)(1, QueryCaseDetailsHeaderComponent_div_1_Template, 2, 2, "div", 1);
20880
- } if (rf & 2) {
20881
- i0.ɵɵproperty("ngIf", !ctx.caseTitle.label);
20882
- i0.ɵɵadvance();
20883
- i0.ɵɵproperty("ngIf", ctx.caseTitle.label);
20884
- } }, dependencies: [i5.NgIf, LabelFieldComponent, CaseReferencePipe], encapsulation: 2 });
20885
- }
20886
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryCaseDetailsHeaderComponent, [{
20887
- type: Component,
20888
- args: [{ selector: 'ccd-query-case-details-header', template: "<h1 *ngIf=\"!caseTitle.label\" class=\"heading-h1\">#{{ caseDetails.case_id | ccdCaseReference}}</h1>\n<div *ngIf=\"caseTitle.label\" class=\"case-title\">\n <ccd-label-field [caseField]=\"caseTitle\" [caseFields]=\"caseFields\"></ccd-label-field>\n</div>\n" }]
20889
- }], null, { caseDetails: [{
20890
- type: Input
20891
- }] }); })();
20892
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryCaseDetailsHeaderComponent, { className: "QueryCaseDetailsHeaderComponent", filePath: "lib/shared/components/palette/query-management/components/query-case-details-header/query-case-details-header.component.ts", lineNumber: 10 }); })();
20893
-
20894
20648
  var QueryCreateContext;
20895
20649
  (function (QueryCreateContext) {
20896
20650
  QueryCreateContext["NEW_QUERY_QUALIFYING_QUESTION_OPTIONS"] = "NewQueryQualifyingQuestionOptions";
@@ -21089,19 +20843,441 @@ class QueryManagementUtils {
21089
20843
  static isObject(elem) {
21090
20844
  return typeof elem === 'object' && elem !== null;
21091
20845
  }
21092
- static isNonEmptyObject(elem) {
21093
- return this.isObject(elem) && Object.keys(elem).length !== 0;
20846
+ static isNonEmptyObject(elem) {
20847
+ return this.isObject(elem) && Object.keys(elem).length !== 0;
20848
+ }
20849
+ static formattedDate(date) {
20850
+ const formattedDate = moment(date).format('YYYY-MM-DD');
20851
+ return formattedDate;
20852
+ }
20853
+ static ɵfac = function QueryManagementUtils_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryManagementUtils)(); };
20854
+ static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: QueryManagementUtils, factory: QueryManagementUtils.ɵfac });
20855
+ }
20856
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryManagementUtils, [{
20857
+ type: Injectable
20858
+ }], null, null); })();
20859
+
20860
+ const CASE_QUERIES_COLLECTION_ID = 'CaseQueriesCollection';
20861
+ const FIELD_TYPE_COMPLEX = 'Complex';
20862
+ const DISPLAY_CONTEXT_READONLY = 'READONLY';
20863
+ const QM_SELECT_FIRST_COLLECTION = 'selectFirstCollection';
20864
+ const QM_COLLECTION_PROMPT = 'promptQmCollection';
20865
+ const CIVIL_JURISDICTION = 'CIVIL';
20866
+
20867
+ class QueryManagementService {
20868
+ router;
20869
+ sessionStorageService;
20870
+ caseQueriesCollections;
20871
+ fieldId;
20872
+ constructor(router, sessionStorageService) {
20873
+ this.router = router;
20874
+ this.sessionStorageService = sessionStorageService;
20875
+ }
20876
+ generateCaseQueriesCollectionData(formGroup, queryCreateContext, queryItem, messageId // Get the message ID from route params (if present)
20877
+ ) {
20878
+ let currentUserDetails;
20879
+ try {
20880
+ currentUserDetails = JSON.parse(this.sessionStorageService.getItem(USER_DETAILS));
20881
+ }
20882
+ catch (e) {
20883
+ console.error('Could not parse USER_DETAILS from session storage:', e);
20884
+ currentUserDetails = {};
20885
+ }
20886
+ const caseMessage = queryCreateContext === QueryCreateContext.NEW_QUERY
20887
+ ? QueryManagementUtils.getNewQueryData(formGroup, currentUserDetails)
20888
+ : QueryManagementUtils.getRespondOrFollowupQueryData(formGroup, queryItem, currentUserDetails);
20889
+ const isNewQuery = queryCreateContext === QueryCreateContext.NEW_QUERY; // Check if this is a new query
20890
+ // Check if the field ID has been set dynamically
20891
+ if (!this.fieldId) {
20892
+ console.error('Error: Field ID for CaseQueriesCollection not found. Cannot proceed with data generation.');
20893
+ this.router.navigate(['/', 'service-down']);
20894
+ throw new Error('Field ID for CaseQueriesCollection not found. Aborting query data generation.');
20895
+ }
20896
+ // Initialize new query data structure
20897
+ const newQueryData = {};
20898
+ if (this.caseQueriesCollections?.length) {
20899
+ let matchedCollection;
20900
+ // If it's not a new query, try to find the existing collection with the message ID
20901
+ if (!isNewQuery && messageId) {
20902
+ matchedCollection = this.caseQueriesCollections.find((collection) => collection.caseMessages.some((message) => message.value.id === messageId));
20903
+ }
20904
+ if (matchedCollection) {
20905
+ // Append the new case message to the matched collection's caseMessages
20906
+ matchedCollection.caseMessages.push({
20907
+ id: null,
20908
+ value: caseMessage
20909
+ });
20910
+ // Add the matched collection to newQueryData
20911
+ newQueryData[this.fieldId] = {
20912
+ ...matchedCollection, // Keep existing data intact
20913
+ caseMessages: [...matchedCollection.caseMessages] // Append the updated messages array
20914
+ };
20915
+ }
20916
+ else {
20917
+ // Use partyName from the first collection (assumption: all share the same party)
20918
+ const originalPartyName = this.caseQueriesCollections?.[0]?.partyName ?? currentUserDetails?.name;
20919
+ // If no collection matches, or it's a new query
20920
+ newQueryData[this.fieldId] = {
20921
+ partyName: originalPartyName,
20922
+ roleOnCase: '', // Not returned by CCD
20923
+ caseMessages: [
20924
+ {
20925
+ id: null,
20926
+ value: caseMessage
20927
+ }
20928
+ ]
20929
+ };
20930
+ // If caseQueriesCollections is not empty, append its data
20931
+ newQueryData[this.fieldId].caseMessages.push(...this.caseQueriesCollections.flatMap((collection) => collection.caseMessages));
20932
+ }
20933
+ }
20934
+ else {
20935
+ // If there are no existing collections, create a new one (e.g., for new queries)
20936
+ newQueryData[this.fieldId] = {
20937
+ partyName: currentUserDetails?.name || `${currentUserDetails?.forename} ${currentUserDetails?.surname}`, // Not returned by CCD
20938
+ roleOnCase: '', // Not returned by CCD
20939
+ caseMessages: [
20940
+ {
20941
+ id: null,
20942
+ value: caseMessage
20943
+ }
20944
+ ]
20945
+ };
20946
+ }
20947
+ return newQueryData;
20948
+ }
20949
+ setCaseQueriesCollectionData(eventData, queryCreateContext, caseDetails, messageId) {
20950
+ const resolvedFieldId = this.resolveFieldId(eventData, queryCreateContext, caseDetails, messageId);
20951
+ if (!resolvedFieldId) {
20952
+ console.error('Failed to resolve fieldId for CaseQueriesCollection. Cannot proceed.');
20953
+ return;
20954
+ }
20955
+ this.fieldId = resolvedFieldId;
20956
+ this.caseQueriesCollections = eventData.case_fields.reduce((acc, field) => {
20957
+ if (field.id === this.fieldId) {
20958
+ const extracted = QueryManagementUtils.extractCaseQueriesFromCaseField(field);
20959
+ if (extracted && typeof extracted === 'object') {
20960
+ acc.push(extracted);
20961
+ }
20962
+ }
20963
+ return acc;
20964
+ }, []);
20965
+ }
20966
+ resolveFieldId(eventData, queryCreateContext, caseDetails, messageId) {
20967
+ // Step 1: Filter candidate fields (must be editable CaseQueriesCollection fields)
20968
+ const candidateFields = eventData?.case_fields?.filter((field) => field.field_type.id === CASE_QUERIES_COLLECTION_ID &&
20969
+ field.field_type.type === FIELD_TYPE_COMPLEX &&
20970
+ field.display_context !== DISPLAY_CONTEXT_READONLY);
20971
+ if (!candidateFields?.length) {
20972
+ console.warn('No editable CaseQueriesCollection fields found.');
20973
+ return null;
20974
+ }
20975
+ const numberOfCollections = candidateFields.length;
20976
+ const jurisdictionId = caseDetails?.case_type?.jurisdiction?.id ?? '';
20977
+ // Step 2: If messageId is present, try to locate the field containing that message
20978
+ if (messageId) {
20979
+ const fieldByMessage = candidateFields.find((field) => field?.value?.caseMessages?.some((msg) => msg?.value?.id === messageId));
20980
+ if (fieldByMessage) {
20981
+ return fieldByMessage.id; // Found the matching field by message ID
20982
+ }
20983
+ }
20984
+ // Step 3: Handle new queries
20985
+ if (queryCreateContext === QueryCreateContext.NEW_QUERY) {
20986
+ // If there's only one collection, use it
20987
+ if (numberOfCollections === 1) {
20988
+ return candidateFields[0].id;
20989
+ }
20990
+ // For multiple collections, use jurisdiction-based resolution strategy
20991
+ if (this.getCollectionSelectionMethod(jurisdictionId) === QM_SELECT_FIRST_COLLECTION) {
20992
+ // Choose the one with the lowest order from the first wizard page
20993
+ const firstOrdered = this.getCaseQueriesCollectionFieldOrderFromWizardPages(eventData);
20994
+ if (firstOrdered) {
20995
+ return firstOrdered.id;
20996
+ }
20997
+ }
20998
+ else {
20999
+ console.error(`Error: Multiple CaseQueriesCollections are not supported yet for the ${jurisdictionId} jurisdiction`);
21000
+ return null;
21001
+ }
21002
+ }
21003
+ // Step 4: Fallback — if none of the above succeeded
21004
+ console.warn('Could not determine fieldId for context:', queryCreateContext);
21005
+ return null;
21006
+ }
21007
+ getCaseQueriesCollectionFieldOrderFromWizardPages(eventData) {
21008
+ const candidateFields = eventData?.case_fields?.filter((field) => field.field_type.id === CASE_QUERIES_COLLECTION_ID &&
21009
+ field.field_type.type === FIELD_TYPE_COMPLEX &&
21010
+ field.display_context !== DISPLAY_CONTEXT_READONLY);
21011
+ if (!candidateFields?.length) {
21012
+ return undefined;
21013
+ }
21014
+ const firstPageFields = eventData?.wizard_pages?.[0]?.wizard_page_fields;
21015
+ if (!firstPageFields) {
21016
+ return undefined;
21017
+ }
21018
+ return candidateFields
21019
+ .map((field) => {
21020
+ const wizardField = firstPageFields.find((f) => f.case_field_id === field.id);
21021
+ return { field, order: wizardField?.order ?? Number.MAX_SAFE_INTEGER };
21022
+ })
21023
+ .sort((a, b) => a.order - b.order)[0]?.field;
21024
+ }
21025
+ getCollectionSelectionMethod(jurisdiction) {
21026
+ return jurisdiction.toUpperCase() === CIVIL_JURISDICTION ? QM_SELECT_FIRST_COLLECTION : QM_COLLECTION_PROMPT;
21027
+ }
21028
+ static ɵfac = function QueryManagementService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryManagementService)(i0.ɵɵinject(i1$1.Router), i0.ɵɵinject(SessionStorageService)); };
21029
+ static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: QueryManagementService, factory: QueryManagementService.ɵfac, providedIn: 'root' });
21030
+ }
21031
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryManagementService, [{
21032
+ type: Injectable,
21033
+ args: [{ providedIn: 'root' }]
21034
+ }], () => [{ type: i1$1.Router }, { type: SessionStorageService }], null); })();
21035
+
21036
+ function QualifyingQuestionOptionsComponent_ng_container_0_ng_container_10_Template(rf, ctx) { if (rf & 1) {
21037
+ i0.ɵɵelementContainerStart(0);
21038
+ i0.ɵɵelementStart(1, "p", 8)(2, "span", 9);
21039
+ i0.ɵɵtext(3);
21040
+ i0.ɵɵpipe(4, "rpxTranslate");
21041
+ i0.ɵɵelementEnd();
21042
+ i0.ɵɵtext(5);
21043
+ i0.ɵɵpipe(6, "rpxTranslate");
21044
+ i0.ɵɵelementEnd();
21045
+ i0.ɵɵelementContainerEnd();
21046
+ } if (rf & 2) {
21047
+ const ctx_r0 = i0.ɵɵnextContext(2);
21048
+ i0.ɵɵadvance(3);
21049
+ i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(4, 2, "Error:"), " ");
21050
+ i0.ɵɵadvance(2);
21051
+ i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(6, 4, ctx_r0.qualifyingQuestionsErrorMessage.SELECT_AN_OPTION), " ");
21052
+ } }
21053
+ function QualifyingQuestionOptionsComponent_ng_container_0_ng_container_12_ng_container_1_Template(rf, ctx) { if (rf & 1) {
21054
+ i0.ɵɵelementContainerStart(0);
21055
+ i0.ɵɵelementStart(1, "div", 13);
21056
+ i0.ɵɵtext(2);
21057
+ i0.ɵɵpipe(3, "rpxTranslate");
21058
+ i0.ɵɵelementEnd();
21059
+ i0.ɵɵelementContainerEnd();
21060
+ } if (rf & 2) {
21061
+ i0.ɵɵadvance(2);
21062
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 1, "If your issue is not covered by the options above, raise a query:"));
21063
+ } }
21064
+ function QualifyingQuestionOptionsComponent_ng_container_0_ng_container_12_Template(rf, ctx) { if (rf & 1) {
21065
+ const _r2 = i0.ɵɵgetCurrentView();
21066
+ i0.ɵɵelementContainerStart(0);
21067
+ i0.ɵɵtemplate(1, QualifyingQuestionOptionsComponent_ng_container_0_ng_container_12_ng_container_1_Template, 4, 3, "ng-container", 0);
21068
+ i0.ɵɵelementStart(2, "div", 10)(3, "input", 11);
21069
+ i0.ɵɵlistener("change", function QualifyingQuestionOptionsComponent_ng_container_0_ng_container_12_Template_input_change_3_listener() { const qualifyingQuestion_r3 = i0.ɵɵrestoreView(_r2).$implicit; const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.onSelectionChange(qualifyingQuestion_r3)); });
21070
+ i0.ɵɵelementEnd();
21071
+ i0.ɵɵelementStart(4, "label", 12);
21072
+ i0.ɵɵtext(5);
21073
+ i0.ɵɵpipe(6, "rpxTranslate");
21074
+ i0.ɵɵelementEnd()();
21075
+ i0.ɵɵelementContainerEnd();
21076
+ } if (rf & 2) {
21077
+ const qualifyingQuestion_r3 = ctx.$implicit;
21078
+ const isLast_r4 = ctx.last;
21079
+ const ctx_r0 = i0.ɵɵnextContext(2);
21080
+ i0.ɵɵadvance();
21081
+ i0.ɵɵproperty("ngIf", isLast_r4);
21082
+ i0.ɵɵadvance(2);
21083
+ i0.ɵɵpropertyInterpolate("id", qualifyingQuestion_r3.name);
21084
+ i0.ɵɵproperty("formControl", ctx_r0.qualifyingQuestionsControl)("value", qualifyingQuestion_r3);
21085
+ i0.ɵɵadvance();
21086
+ i0.ɵɵproperty("for", qualifyingQuestion_r3.name);
21087
+ i0.ɵɵadvance();
21088
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 6, qualifyingQuestion_r3.name));
21089
+ } }
21090
+ function QualifyingQuestionOptionsComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
21091
+ i0.ɵɵelementContainerStart(0);
21092
+ i0.ɵɵelementStart(1, "div", 1)(2, "fieldset", 2)(3, "legend", 3)(4, "h1", 4);
21093
+ i0.ɵɵtext(5);
21094
+ i0.ɵɵpipe(6, "rpxTranslate");
21095
+ i0.ɵɵelementEnd()();
21096
+ i0.ɵɵelementStart(7, "h2", 5);
21097
+ i0.ɵɵtext(8);
21098
+ i0.ɵɵpipe(9, "rpxTranslate");
21099
+ i0.ɵɵelementEnd();
21100
+ i0.ɵɵtemplate(10, QualifyingQuestionOptionsComponent_ng_container_0_ng_container_10_Template, 7, 6, "ng-container", 0);
21101
+ i0.ɵɵelementStart(11, "div", 6);
21102
+ i0.ɵɵtemplate(12, QualifyingQuestionOptionsComponent_ng_container_0_ng_container_12_Template, 7, 8, "ng-container", 7);
21103
+ i0.ɵɵpipe(13, "async");
21104
+ i0.ɵɵelementEnd()()();
21105
+ i0.ɵɵelementContainerEnd();
21106
+ } if (rf & 2) {
21107
+ const ctx_r0 = i0.ɵɵnextContext();
21108
+ i0.ɵɵadvance();
21109
+ i0.ɵɵclassProp("govuk-form-group--error", ctx_r0.displayError);
21110
+ i0.ɵɵadvance(4);
21111
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 6, "Raise a new query"), " ");
21112
+ i0.ɵɵadvance(3);
21113
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(9, 8, "What do you need help to do?"), " ");
21114
+ i0.ɵɵadvance(2);
21115
+ i0.ɵɵproperty("ngIf", ctx_r0.displayError);
21116
+ i0.ɵɵadvance(2);
21117
+ i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBind1(13, 10, ctx_r0.qualifyingQuestions$));
21118
+ } }
21119
+ class QualifyingQuestionOptionsComponent {
21120
+ route;
21121
+ router;
21122
+ qualifyingQuestionService;
21123
+ qualifyingQuestionsControl;
21124
+ qualifyingQuestions$;
21125
+ questionSelected = new EventEmitter();
21126
+ qualifyingQuestionsErrorMessage = QualifyingQuestionsErrorMessage;
21127
+ caseId;
21128
+ constructor(route, router, qualifyingQuestionService) {
21129
+ this.route = route;
21130
+ this.router = router;
21131
+ this.qualifyingQuestionService = qualifyingQuestionService;
21132
+ }
21133
+ ngOnInit() {
21134
+ this.caseId = this.route.snapshot.params.cid;
21135
+ // Check if there's already a selected qualifying question from the service
21136
+ const savedSelection = this.qualifyingQuestionService.getQualifyingQuestionSelection();
21137
+ if (savedSelection) {
21138
+ this.qualifyingQuestionsControl.setValue(savedSelection);
21139
+ }
21140
+ }
21141
+ click() {
21142
+ this.router.navigate(['cases', 'case-details', this.caseId], { fragment: 'Queries' });
21143
+ }
21144
+ get displayError() {
21145
+ return this.qualifyingQuestionsControl.touched && this.qualifyingQuestionsControl.hasError('required');
21146
+ }
21147
+ onSelectionChange(qualifyingQuestion) {
21148
+ this.questionSelected.emit(qualifyingQuestion);
21149
+ }
21150
+ static ɵfac = function QualifyingQuestionOptionsComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QualifyingQuestionOptionsComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(QualifyingQuestionService)); };
21151
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QualifyingQuestionOptionsComponent, selectors: [["ccd-qualifying-question-options"]], inputs: { qualifyingQuestionsControl: "qualifyingQuestionsControl", qualifyingQuestions$: "qualifyingQuestions$" }, outputs: { questionSelected: "questionSelected" }, decls: 1, vars: 1, consts: [[4, "ngIf"], [1, "govuk-form-group"], [1, "govuk-fieldset"], [1, "govuk-fieldset__legend", "govuk-fieldset__legend--l"], [1, "govuk-fieldset__heading"], [1, "govuk-heading-m", "govuk-!-margin-top-10"], ["data-module", "govuk-radios", 1, "govuk-radios"], [4, "ngFor", "ngForOf"], [1, "govuk-error-message"], [1, "govuk-visually-hidden"], [1, "govuk-radios__item"], ["name", "qualifyingQuestionOption", "type", "radio", 1, "govuk-radios__input", 3, "change", "id", "formControl", "value"], [1, "govuk-label", "govuk-radios__label", 3, "for"], [1, "qm-qualifying-question__divider"]], template: function QualifyingQuestionOptionsComponent_Template(rf, ctx) { if (rf & 1) {
21152
+ i0.ɵɵtemplate(0, QualifyingQuestionOptionsComponent_ng_container_0_Template, 14, 12, "ng-container", 0);
21153
+ } if (rf & 2) {
21154
+ i0.ɵɵproperty("ngIf", ctx.qualifyingQuestionsControl);
21155
+ } }, dependencies: [i5.NgForOf, i5.NgIf, i4.DefaultValueAccessor, i4.RadioControlValueAccessor, i4.NgControlStatus, i4.FormControlDirective, i5.AsyncPipe, i1.RpxTranslatePipe], encapsulation: 2 });
21156
+ }
21157
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QualifyingQuestionOptionsComponent, [{
21158
+ type: Component,
21159
+ args: [{ selector: 'ccd-qualifying-question-options', template: "<ng-container *ngIf=\"qualifyingQuestionsControl\">\n <div class=\"govuk-form-group\" [class.govuk-form-group--error]=\"displayError\">\n <fieldset class=\"govuk-fieldset\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--l\">\n <h1 class=\"govuk-fieldset__heading\">\n {{ 'Raise a new query' | rpxTranslate }}\n </h1>\n </legend>\n <h2 class=\"govuk-heading-m govuk-!-margin-top-10\">\n {{ 'What do you need help to do?' | rpxTranslate }}\n </h2>\n\n <ng-container *ngIf=\"displayError\">\n <p class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate }} </span>{{\n qualifyingQuestionsErrorMessage.SELECT_AN_OPTION | rpxTranslate }}\n </p>\n </ng-container>\n\n <div class=\"govuk-radios\" data-module=\"govuk-radios\">\n <ng-container *ngFor=\"let qualifyingQuestion of qualifyingQuestions$ | async; let isLast = last\">\n <ng-container *ngIf=\"isLast\">\n <div class=\"qm-qualifying-question__divider\">{{ 'If your issue is not covered by the options above, raise a query:' | rpxTranslate }}</div>\n </ng-container>\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" \n id=\"{{qualifyingQuestion.name}}\" \n name=\"qualifyingQuestionOption\"\n type=\"radio\" [formControl]=\"qualifyingQuestionsControl\" \n [value]=\"qualifyingQuestion\"\n (change)=\"onSelectionChange(qualifyingQuestion)\">\n <label class=\"govuk-label govuk-radios__label\" [for]=\"qualifyingQuestion.name\">{{ qualifyingQuestion.name |\n rpxTranslate }}</label>\n </div>\n </ng-container>\n </div>\n </fieldset>\n </div>\n</ng-container>\n" }]
21160
+ }], () => [{ type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: QualifyingQuestionService }], { qualifyingQuestionsControl: [{
21161
+ type: Input
21162
+ }], qualifyingQuestions$: [{
21163
+ type: Input
21164
+ }], questionSelected: [{
21165
+ type: Output
21166
+ }] }); })();
21167
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QualifyingQuestionOptionsComponent, { className: "QualifyingQuestionOptionsComponent", filePath: "lib/shared/components/palette/query-management/components/qualifying-questions/qualifying-question-options/qualifying-question-options.component.ts", lineNumber: 13 }); })();
21168
+
21169
+ function QueryAttachmentsReadComponent_ng_container_0_ccd_read_collection_field_1_Template(rf, ctx) { if (rf & 1) {
21170
+ i0.ɵɵelement(0, "ccd-read-collection-field", 2);
21171
+ } if (rf & 2) {
21172
+ const ctx_r0 = i0.ɵɵnextContext(2);
21173
+ i0.ɵɵproperty("caseField", ctx_r0.caseFieldWithAttachments);
21174
+ } }
21175
+ function QueryAttachmentsReadComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
21176
+ i0.ɵɵelementContainerStart(0);
21177
+ i0.ɵɵtemplate(1, QueryAttachmentsReadComponent_ng_container_0_ccd_read_collection_field_1_Template, 1, 1, "ccd-read-collection-field", 1);
21178
+ i0.ɵɵelementContainerEnd();
21179
+ } if (rf & 2) {
21180
+ const ctx_r0 = i0.ɵɵnextContext();
21181
+ i0.ɵɵadvance();
21182
+ i0.ɵɵproperty("ngIf", (ctx_r0.attachments == null ? null : ctx_r0.attachments.length) > 0);
21183
+ } }
21184
+ class QueryAttachmentsReadComponent {
21185
+ attachments;
21186
+ caseFieldWithAttachments;
21187
+ ngOnChanges() {
21188
+ this.caseFieldWithAttachments = Object.assign(new CaseField(), {
21189
+ id: '',
21190
+ label: '',
21191
+ hint_text: '',
21192
+ field_type: Object.assign(new FieldType(), {
21193
+ id: 'QueryDocuments',
21194
+ type: 'QueryDocuments',
21195
+ min: null,
21196
+ max: null,
21197
+ regular_expression: null,
21198
+ fixed_list_items: [],
21199
+ complex_fields: [],
21200
+ collection_field_type: Object.assign(new FieldType(), {
21201
+ id: 'Document',
21202
+ type: 'Document',
21203
+ min: null,
21204
+ max: null,
21205
+ regular_expression: null,
21206
+ fixed_list_items: [],
21207
+ complex_fields: [],
21208
+ collection_field_type: null
21209
+ })
21210
+ }),
21211
+ display_context_parameter: '#COLLECTION(allowInsert,allowUpdate)',
21212
+ value: []
21213
+ });
21214
+ this.caseFieldWithAttachments.value = this.attachments;
21215
+ }
21216
+ static ɵfac = function QueryAttachmentsReadComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryAttachmentsReadComponent)(); };
21217
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryAttachmentsReadComponent, selectors: [["ccd-query-attachments-read"]], inputs: { attachments: "attachments" }, features: [i0.ɵɵNgOnChangesFeature], decls: 1, vars: 1, consts: [[4, "ngIf"], [3, "caseField", 4, "ngIf"], [3, "caseField"]], template: function QueryAttachmentsReadComponent_Template(rf, ctx) { if (rf & 1) {
21218
+ i0.ɵɵtemplate(0, QueryAttachmentsReadComponent_ng_container_0_Template, 2, 1, "ng-container", 0);
21219
+ } if (rf & 2) {
21220
+ i0.ɵɵproperty("ngIf", (ctx.attachments == null ? null : ctx.attachments.length) > 0);
21221
+ } }, styles: ["ccd-query-attachments-read .collection-field-table tr>td{border-bottom:none;padding-bottom:0}\n"], encapsulation: 2 });
21222
+ }
21223
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryAttachmentsReadComponent, [{
21224
+ type: Component,
21225
+ args: [{ selector: 'ccd-query-attachments-read', encapsulation: ViewEncapsulation.None, template: "<ng-container *ngIf=\"attachments?.length > 0\">\n <ccd-read-collection-field\n *ngIf=\"attachments?.length > 0\"\n [caseField]=\"caseFieldWithAttachments\"\n >\n </ccd-read-collection-field>\n</ng-container>\n", styles: ["ccd-query-attachments-read .collection-field-table tr>td{border-bottom:none;padding-bottom:0}\n"] }]
21226
+ }], null, { attachments: [{
21227
+ type: Input
21228
+ }] }); })();
21229
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryAttachmentsReadComponent, { className: "QueryAttachmentsReadComponent", filePath: "lib/shared/components/palette/query-management/components/query-attachments-read/query-attachments-read.component.ts", lineNumber: 10 }); })();
21230
+
21231
+ function QueryCaseDetailsHeaderComponent_h1_0_Template(rf, ctx) { if (rf & 1) {
21232
+ i0.ɵɵelementStart(0, "h1", 2);
21233
+ i0.ɵɵtext(1);
21234
+ i0.ɵɵpipe(2, "ccdCaseReference");
21235
+ i0.ɵɵelementEnd();
21236
+ } if (rf & 2) {
21237
+ const ctx_r0 = i0.ɵɵnextContext();
21238
+ i0.ɵɵadvance();
21239
+ i0.ɵɵtextInterpolate1("#", i0.ɵɵpipeBind1(2, 1, ctx_r0.caseDetails.case_id), "");
21240
+ } }
21241
+ function QueryCaseDetailsHeaderComponent_div_1_Template(rf, ctx) { if (rf & 1) {
21242
+ i0.ɵɵelementStart(0, "div", 3);
21243
+ i0.ɵɵelement(1, "ccd-label-field", 4);
21244
+ i0.ɵɵelementEnd();
21245
+ } if (rf & 2) {
21246
+ const ctx_r0 = i0.ɵɵnextContext();
21247
+ i0.ɵɵadvance();
21248
+ i0.ɵɵproperty("caseField", ctx_r0.caseTitle)("caseFields", ctx_r0.caseFields);
21249
+ } }
21250
+ class QueryCaseDetailsHeaderComponent {
21251
+ caseDetails;
21252
+ caseTitle;
21253
+ caseFields;
21254
+ ngOnInit() {
21255
+ this.caseTitle = new CaseField();
21256
+ this.caseTitle.label = this.caseDetails?.state?.title_display;
21257
+ this.caseFields = this.getCaseFieldsInfo();
21094
21258
  }
21095
- static formattedDate(date) {
21096
- const formattedDate = moment(date).format('YYYY-MM-DD');
21097
- return formattedDate;
21259
+ getCaseFieldsInfo() {
21260
+ const caseDataFields = this.caseDetails?.tabs?.reduce((acc, tab) => {
21261
+ return acc.concat(tab.fields);
21262
+ }, []);
21263
+ return caseDataFields.concat(this.caseDetails.metadataFields);
21098
21264
  }
21099
- static ɵfac = function QueryManagementUtils_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryManagementUtils)(); };
21100
- static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: QueryManagementUtils, factory: QueryManagementUtils.ɵfac });
21265
+ static ɵfac = function QueryCaseDetailsHeaderComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryCaseDetailsHeaderComponent)(); };
21266
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryCaseDetailsHeaderComponent, selectors: [["ccd-query-case-details-header"]], inputs: { caseDetails: "caseDetails" }, decls: 2, vars: 2, consts: [["class", "heading-h1", 4, "ngIf"], ["class", "case-title", 4, "ngIf"], [1, "heading-h1"], [1, "case-title"], [3, "caseField", "caseFields"]], template: function QueryCaseDetailsHeaderComponent_Template(rf, ctx) { if (rf & 1) {
21267
+ i0.ɵɵtemplate(0, QueryCaseDetailsHeaderComponent_h1_0_Template, 3, 3, "h1", 0)(1, QueryCaseDetailsHeaderComponent_div_1_Template, 2, 2, "div", 1);
21268
+ } if (rf & 2) {
21269
+ i0.ɵɵproperty("ngIf", !ctx.caseTitle.label);
21270
+ i0.ɵɵadvance();
21271
+ i0.ɵɵproperty("ngIf", ctx.caseTitle.label);
21272
+ } }, dependencies: [i5.NgIf, LabelFieldComponent, CaseReferencePipe], encapsulation: 2 });
21101
21273
  }
21102
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryManagementUtils, [{
21103
- type: Injectable
21104
- }], null, null); })();
21274
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryCaseDetailsHeaderComponent, [{
21275
+ type: Component,
21276
+ args: [{ selector: 'ccd-query-case-details-header', template: "<h1 *ngIf=\"!caseTitle.label\" class=\"heading-h1\">#{{ caseDetails.case_id | ccdCaseReference}}</h1>\n<div *ngIf=\"caseTitle.label\" class=\"case-title\">\n <ccd-label-field [caseField]=\"caseTitle\" [caseFields]=\"caseFields\"></ccd-label-field>\n</div>\n" }]
21277
+ }], null, { caseDetails: [{
21278
+ type: Input
21279
+ }] }); })();
21280
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryCaseDetailsHeaderComponent, { className: "QueryCaseDetailsHeaderComponent", filePath: "lib/shared/components/palette/query-management/components/query-case-details-header/query-case-details-header.component.ts", lineNumber: 10 }); })();
21105
21281
 
21106
21282
  function QueryCheckYourAnswersComponent_div_0_div_2_li_6_Template(rf, ctx) { if (rf & 1) {
21107
21283
  i0.ɵɵelementStart(0, "li")(1, "a", 28);
@@ -21428,20 +21604,27 @@ class QueryCheckYourAnswersComponent {
21428
21604
  casesService;
21429
21605
  caseNotifier;
21430
21606
  workAllocationService;
21431
- sessionStorageService;
21432
21607
  qualifyingQuestionService;
21608
+ queryManagementService;
21609
+ errorNotifierService;
21610
+ alertService;
21433
21611
  RAISE_A_QUERY_EVENT_TRIGGER_ID = 'queryManagementRaiseQuery';
21434
21612
  RESPOND_TO_QUERY_EVENT_TRIGGER_ID = 'queryManagementRespondQuery';
21435
21613
  CASE_QUERIES_COLLECTION_ID = 'CaseQueriesCollection';
21614
+ static TRIGGER_TEXT_CONTINUE = 'Ignore Warning and Continue';
21615
+ static TRIGGER_TEXT_START = 'Continue';
21436
21616
  FIELD_TYPE_COMPLEX = 'Complex';
21437
21617
  DISPLAY_CONTEXT_READONLY = 'READONLY';
21438
21618
  QM_SELECT_FIRST_COLLECTION = 'selectFirstCollection';
21439
21619
  QM_COLLECTION_PROMPT = 'promptQmCollection';
21440
21620
  CIVIL_JURISDICTION = 'CIVIL';
21621
+ triggerTextStart = QueryCheckYourAnswersComponent.TRIGGER_TEXT_START;
21622
+ triggerTextIgnoreWarnings = QueryCheckYourAnswersComponent.TRIGGER_TEXT_CONTINUE;
21441
21623
  formGroup;
21442
21624
  queryItem;
21443
21625
  queryCreateContext;
21444
21626
  eventData = null;
21627
+ qmCaseQueriesCollectionData;
21445
21628
  backClicked = new EventEmitter();
21446
21629
  querySubmitted = new EventEmitter();
21447
21630
  callbackConfirmationMessage = new EventEmitter();
@@ -21460,20 +21643,24 @@ class QueryCheckYourAnswersComponent {
21460
21643
  filteredTasks = [];
21461
21644
  readyToSubmit;
21462
21645
  isSubmitting = false;
21646
+ messageId;
21463
21647
  callbackErrorsSubject = new Subject();
21464
21648
  error;
21465
- constructor(route, router, casesService, caseNotifier, workAllocationService, sessionStorageService, qualifyingQuestionService) {
21649
+ constructor(route, router, casesService, caseNotifier, workAllocationService, qualifyingQuestionService, queryManagementService, errorNotifierService, alertService) {
21466
21650
  this.route = route;
21467
21651
  this.router = router;
21468
21652
  this.casesService = casesService;
21469
21653
  this.caseNotifier = caseNotifier;
21470
21654
  this.workAllocationService = workAllocationService;
21471
- this.sessionStorageService = sessionStorageService;
21472
21655
  this.qualifyingQuestionService = qualifyingQuestionService;
21656
+ this.queryManagementService = queryManagementService;
21657
+ this.errorNotifierService = errorNotifierService;
21658
+ this.alertService = alertService;
21473
21659
  }
21474
21660
  ngOnInit() {
21475
21661
  this.queryId = this.route.snapshot.params.qid;
21476
21662
  this.tid = this.route.snapshot.queryParams?.tid;
21663
+ this.messageId = this.route.snapshot.params.dataid;
21477
21664
  this.caseNotifier.caseView.pipe(take(1)).subscribe((caseDetails) => {
21478
21665
  this.caseDetails = caseDetails;
21479
21666
  // Find the appropriate event trigger based on the queryCreateContext
@@ -21502,8 +21689,23 @@ class QueryCheckYourAnswersComponent {
21502
21689
  }
21503
21690
  },
21504
21691
  error: (error) => {
21505
- console.error('Error in searchTasksSubscription:', error);
21506
21692
  this.readyToSubmit = false;
21693
+ if (error.status !== 401 && error.status !== 403) {
21694
+ this.errorNotifierService.announceError(error);
21695
+ this.alertService.error({ phrase: error.message });
21696
+ console.error('Error occurred while fetching event data:', error);
21697
+ this.callbackErrorsSubject.next(error);
21698
+ }
21699
+ else {
21700
+ this.errorMessages = [
21701
+ {
21702
+ title: 'Error',
21703
+ description: 'Something unexpected happened. Please try again later.',
21704
+ fieldId: 'field-id'
21705
+ }
21706
+ ];
21707
+ }
21708
+ window.scrollTo({ left: 0, top: 0, behavior: 'smooth' });
21507
21709
  }
21508
21710
  });
21509
21711
  }
@@ -21514,6 +21716,7 @@ class QueryCheckYourAnswersComponent {
21514
21716
  ngOnDestroy() {
21515
21717
  this.createEventSubscription?.unsubscribe();
21516
21718
  this.searchTasksSubscription?.unsubscribe();
21719
+ this.callbackErrorsSubject?.unsubscribe();
21517
21720
  }
21518
21721
  goBack() {
21519
21722
  this.backClicked.emit(true);
@@ -21522,20 +21725,7 @@ class QueryCheckYourAnswersComponent {
21522
21725
  if (this.isSubmitting) {
21523
21726
  return;
21524
21727
  }
21525
- // Check if fieldId is null or undefined
21526
- if (!this.fieldId) {
21527
- console.error('Error: Field ID is missing. Cannot proceed with submission.');
21528
- this.errorMessages = [
21529
- {
21530
- title: 'Error',
21531
- description: 'This case is not configured for query management.',
21532
- fieldId: 'field-id'
21533
- }
21534
- ];
21535
- window.scrollTo({ left: 0, top: 0, behavior: 'smooth' });
21536
- return;
21537
- }
21538
- const data = this.generateCaseQueriesCollectionData();
21728
+ const data = this.qmCaseQueriesCollectionData;
21539
21729
  const createEvent$ = this.createEvent(data);
21540
21730
  this.isSubmitting = true;
21541
21731
  if (this.queryCreateContext === QueryCreateContext.RESPOND) {
@@ -21596,172 +21786,7 @@ class QueryCheckYourAnswersComponent {
21596
21786
  handleError(error) {
21597
21787
  console.error('Error in API calls:', error);
21598
21788
  this.isSubmitting = false;
21599
- if (this.isServiceErrorFound(error)) {
21600
- this.error = null;
21601
- this.callbackErrorsSubject.next(error);
21602
- }
21603
- else {
21604
- if (error && error.status !== 401 && error.status !== 403) {
21605
- this.error = error;
21606
- }
21607
- else {
21608
- this.router.navigate(['/', 'service-down']);
21609
- }
21610
- }
21611
- window.scrollTo({ left: 0, top: 0, behavior: 'smooth' });
21612
- }
21613
- generateCaseQueriesCollectionData() {
21614
- const currentUserDetails = JSON.parse(this.sessionStorageService.getItem(USER_DETAILS));
21615
- const caseMessage = this.queryCreateContext === QueryCreateContext.NEW_QUERY
21616
- ? QueryManagementUtils.getNewQueryData(this.formGroup, currentUserDetails)
21617
- : QueryManagementUtils.getRespondOrFollowupQueryData(this.formGroup, this.queryItem, currentUserDetails);
21618
- const messageId = this.route.snapshot.params.dataid; // Get the message ID from route params (if present)
21619
- const isNewQuery = this.queryCreateContext === QueryCreateContext.NEW_QUERY; // Check if this is a new query
21620
- // Check if the field ID has been set dynamically
21621
- if (!this.fieldId) {
21622
- console.error('Error: Field ID for CaseQueriesCollection not found. Cannot proceed with data generation.');
21623
- this.router.navigate(['/', 'service-down']);
21624
- }
21625
- // Initialize new query data structure
21626
- const newQueryData = {};
21627
- if (this.caseQueriesCollections?.length) {
21628
- let matchedCollection;
21629
- // If it's not a new query, try to find the existing collection with the message ID
21630
- if (!isNewQuery && messageId) {
21631
- matchedCollection = this.caseQueriesCollections.find((collection) => collection.caseMessages.some((message) => message.value.id === messageId));
21632
- }
21633
- if (matchedCollection) {
21634
- // Append the new case message to the matched collection's caseMessages
21635
- matchedCollection.caseMessages.push({
21636
- id: null,
21637
- value: caseMessage
21638
- });
21639
- // Add the matched collection to newQueryData
21640
- newQueryData[this.fieldId] = {
21641
- ...matchedCollection, // Keep existing data intact
21642
- caseMessages: [...matchedCollection.caseMessages] // Append the updated messages array
21643
- };
21644
- }
21645
- else {
21646
- // Use partyName from the first collection (assumption: all share the same party)
21647
- const originalPartyName = this.caseQueriesCollections[0].partyName;
21648
- // If no collection matches, or it's a new query
21649
- newQueryData[this.fieldId] = {
21650
- partyName: originalPartyName,
21651
- roleOnCase: '', // Not returned by CCD
21652
- caseMessages: [
21653
- {
21654
- id: null,
21655
- value: caseMessage
21656
- }
21657
- ]
21658
- };
21659
- // If caseQueriesCollections is not empty, append its data
21660
- newQueryData[this.fieldId].caseMessages.push(...this.caseQueriesCollections.flatMap((collection) => collection.caseMessages));
21661
- }
21662
- }
21663
- else {
21664
- // If there are no existing collections, create a new one (e.g., for new queries)
21665
- newQueryData[this.fieldId] = {
21666
- partyName: currentUserDetails?.name || `${currentUserDetails?.forename} ${currentUserDetails?.surname}`, // Not returned by CCD
21667
- roleOnCase: '', // Not returned by CCD
21668
- caseMessages: [
21669
- {
21670
- id: null,
21671
- value: caseMessage
21672
- }
21673
- ]
21674
- };
21675
- }
21676
- return newQueryData;
21677
- }
21678
- setCaseQueriesCollectionData() {
21679
- if (this.eventData?.case_fields?.length) {
21680
- // Workaround for multiple qmCaseQueriesCollections that are not to be appearing in the eventData
21681
- // Counts number qmCaseQueriesCollections
21682
- const numberOfCaseQueriesCollections = this.eventData?.case_fields?.filter((caseField) => caseField.field_type.id === this.CASE_QUERIES_COLLECTION_ID &&
21683
- caseField.field_type.type === this.FIELD_TYPE_COMPLEX && caseField.display_context !== this.DISPLAY_CONTEXT_READONLY)?.length || 0;
21684
- this.caseQueriesCollections = this.eventData.case_fields.reduce((acc, caseField) => {
21685
- // Extract the ID based on conditions, updating this.fieldId dynamically
21686
- this.extractCaseQueryId(caseField, numberOfCaseQueriesCollections);
21687
- const extractedCaseQueriesFromCaseField = QueryManagementUtils.extractCaseQueriesFromCaseField(caseField);
21688
- if (extractedCaseQueriesFromCaseField && typeof extractedCaseQueriesFromCaseField === 'object') {
21689
- acc.push(extractedCaseQueriesFromCaseField);
21690
- }
21691
- return acc;
21692
- }, []);
21693
- }
21694
- }
21695
- extractCaseQueryId(data, count) {
21696
- const { id, value } = data;
21697
- const messageId = this.route.snapshot.params.dataid;
21698
- // Check if the field_type matches CaseQueriesCollection and type is Complex
21699
- if (data.field_type.id === this.CASE_QUERIES_COLLECTION_ID && data.field_type.type === this.FIELD_TYPE_COMPLEX) {
21700
- if (this.isNewQueryContext(data)) {
21701
- // If there is more than one qmCaseQueriesCollection, pick the one with the lowest order
21702
- if (count > 1) {
21703
- if (!this.handleMultipleCollections()) {
21704
- return;
21705
- }
21706
- }
21707
- else {
21708
- // Set the field ID dynamically based on the extracted data
21709
- this.fieldId = id; // Store the ID for use in generating newQueryData
21710
- }
21711
- }
21712
- // If messageId is present, find the corresponding case message
21713
- this.setMessageFieldId(messageId, value, id);
21714
- }
21715
- }
21716
- setMessageFieldId(messageId, value, id) {
21717
- if (messageId && value?.caseMessages) {
21718
- // If a matching message is found, set the fieldId to the corresponding id
21719
- const matchedMessage = value?.caseMessages?.find((message) => message.value.id === messageId);
21720
- if (matchedMessage) {
21721
- this.fieldId = id;
21722
- }
21723
- }
21724
- }
21725
- isNewQueryContext(data) {
21726
- return this.queryCreateContext === QueryCreateContext.NEW_QUERY && data.display_context !== this.DISPLAY_CONTEXT_READONLY;
21727
- }
21728
- handleMultipleCollections() {
21729
- const jurisdictionId = this.caseDetails?.case_type?.jurisdiction?.id;
21730
- if (!jurisdictionId) {
21731
- console.error('Jurisdiction ID is missing.');
21732
- return false;
21733
- }
21734
- if (this.getCollectionSelectionMethod(jurisdictionId) === this.QM_SELECT_FIRST_COLLECTION) {
21735
- // Pick the collection with the lowest order
21736
- this.fieldId = this.getCaseQueriesCollectionFieldOrderFromWizardPages()?.id;
21737
- }
21738
- else {
21739
- // Display Error, for now, until EXUI-2644 is implemented
21740
- console.error(`Error: Multiple CaseQueriesCollections are not supported yet for the ${jurisdictionId} jurisdiction`);
21741
- return false;
21742
- }
21743
- return true;
21744
- }
21745
- getCaseQueriesCollectionFieldOrderFromWizardPages() {
21746
- const candidateFields = this.eventData?.case_fields?.filter((field) => field.field_type.id === this.CASE_QUERIES_COLLECTION_ID &&
21747
- field.field_type.type === this.FIELD_TYPE_COMPLEX &&
21748
- field.display_context !== this.DISPLAY_CONTEXT_READONLY);
21749
- if (!candidateFields?.length) {
21750
- return undefined;
21751
- }
21752
- const firstPageFields = this.eventData?.wizard_pages?.[0]?.wizard_page_fields;
21753
- if (!firstPageFields) {
21754
- return undefined;
21755
- }
21756
- return candidateFields
21757
- .map((field) => {
21758
- const wizardField = firstPageFields.find((f) => f.case_field_id === field.id);
21759
- return { field, order: wizardField?.order ?? Number.MAX_SAFE_INTEGER };
21760
- })
21761
- .sort((a, b) => a.order - b.order)[0]?.field;
21762
- }
21763
- getCollectionSelectionMethod(jurisdiction) {
21764
- return jurisdiction.toUpperCase() === this.CIVIL_JURISDICTION ? this.QM_SELECT_FIRST_COLLECTION : this.QM_COLLECTION_PROMPT;
21789
+ this.router.navigate(['/', 'service-down']);
21765
21790
  }
21766
21791
  getDocumentAttachments() {
21767
21792
  const attachmentsValue = this.formGroup.get('attachments').value;
@@ -21773,8 +21798,14 @@ class QueryCheckYourAnswersComponent {
21773
21798
  isServiceErrorFound(error) {
21774
21799
  return !!(error?.callbackErrors?.length);
21775
21800
  }
21776
- static ɵfac = function QueryCheckYourAnswersComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryCheckYourAnswersComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(WorkAllocationService), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(QualifyingQuestionService)); };
21777
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryCheckYourAnswersComponent, selectors: [["ccd-query-check-your-answers"]], inputs: { formGroup: "formGroup", queryItem: "queryItem", queryCreateContext: "queryCreateContext", eventData: "eventData" }, outputs: { backClicked: "backClicked", querySubmitted: "querySubmitted", callbackConfirmationMessage: "callbackConfirmationMessage" }, decls: 1, vars: 1, consts: [["defaultCheckYourAnswersTitle", ""], ["isHearingRelatedFalse", ""], ["class", "govuk-grid-row", 4, "ngIf"], [1, "govuk-grid-row"], [1, "govuk-grid-column-two-thirds-from-desktop"], ["class", "govuk-error-summary", "aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 4, "ngIf"], ["class", "error-summary", "role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 4, "ngIf"], [3, "callbackErrorsSubject"], [4, "ngIf"], [1, "govuk-heading-l"], [4, "ngIf", "ngIfElse"], [1, "govuk-!-margin-bottom-4"], [3, "caseDetails"], ["class", "govuk-summary-list govuk-!-margin-bottom-0", 4, "ngIf"], [1, "govuk-summary-list", "govuk-!-margin-bottom-0"], [1, "govuk-summary-list__row"], [1, "govuk-summary-list__key"], [1, "govuk-summary-list__value"], [1, "govuk-summary-list__actions"], ["href", "javascript:void(0)", 1, "govuk-link", 3, "click"], ["data-module", "govuk-button", 1, "govuk-button", "govuk-button--secondary", "govuk-!-margin-right-3", 3, "click"], ["data-module", "govuk-button", "type", "submit", 1, "govuk-button", 3, "click"], [3, "eventCompletionParams"], ["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"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], [4, "ngFor", "ngForOf"], ["href", "javascript:void(0)", 1, "validation-error", 3, "id"], ["role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 1, "error-summary"], ["id", "event_error-summary-heading", 1, "heading-h3", "error-summary-heading"], ["class", "error-summary-list", 4, "ngIf"], [1, "error-summary-list"], ["class", "ccd-error-summary-li", 4, "ngFor", "ngForOf"], [1, "ccd-error-summary-li"], [1, "govuk-caption-l"], ["href", "javascript:void(0)", "class", "govuk-link", 3, "click", 4, "ngIf"], ["class", "govuk-summary-list__row", 4, "ngIf"], [1, "govuk-summary-list__value", "govuk-summary-list__value--documentAttached"], [3, "attachments", 4, "ngIf"], [3, "attachments"]], template: function QueryCheckYourAnswersComponent_Template(rf, ctx) { if (rf & 1) {
21801
+ setCaseQueriesCollectionData() {
21802
+ if (!this.eventData) {
21803
+ console.warn('Event data not available; skipping collection setup.');
21804
+ }
21805
+ this.queryManagementService.setCaseQueriesCollectionData(this.eventData, this.queryCreateContext, this.caseDetails, this.messageId);
21806
+ }
21807
+ static ɵfac = function QueryCheckYourAnswersComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryCheckYourAnswersComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(WorkAllocationService), i0.ɵɵdirectiveInject(QualifyingQuestionService), i0.ɵɵdirectiveInject(QueryManagementService), i0.ɵɵdirectiveInject(ErrorNotifierService), i0.ɵɵdirectiveInject(AlertService)); };
21808
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryCheckYourAnswersComponent, selectors: [["ccd-query-check-your-answers"]], inputs: { formGroup: "formGroup", queryItem: "queryItem", queryCreateContext: "queryCreateContext", eventData: "eventData", qmCaseQueriesCollectionData: "qmCaseQueriesCollectionData" }, outputs: { backClicked: "backClicked", querySubmitted: "querySubmitted", callbackConfirmationMessage: "callbackConfirmationMessage" }, decls: 1, vars: 1, consts: [["defaultCheckYourAnswersTitle", ""], ["isHearingRelatedFalse", ""], ["class", "govuk-grid-row", 4, "ngIf"], [1, "govuk-grid-row"], [1, "govuk-grid-column-two-thirds-from-desktop"], ["class", "govuk-error-summary", "aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 4, "ngIf"], ["class", "error-summary", "role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 4, "ngIf"], [3, "callbackErrorsSubject"], [4, "ngIf"], [1, "govuk-heading-l"], [4, "ngIf", "ngIfElse"], [1, "govuk-!-margin-bottom-4"], [3, "caseDetails"], ["class", "govuk-summary-list govuk-!-margin-bottom-0", 4, "ngIf"], [1, "govuk-summary-list", "govuk-!-margin-bottom-0"], [1, "govuk-summary-list__row"], [1, "govuk-summary-list__key"], [1, "govuk-summary-list__value"], [1, "govuk-summary-list__actions"], ["href", "javascript:void(0)", 1, "govuk-link", 3, "click"], ["data-module", "govuk-button", 1, "govuk-button", "govuk-button--secondary", "govuk-!-margin-right-3", 3, "click"], ["data-module", "govuk-button", "type", "submit", 1, "govuk-button", 3, "click"], [3, "eventCompletionParams"], ["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"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], [4, "ngFor", "ngForOf"], ["href", "javascript:void(0)", 1, "validation-error", 3, "id"], ["role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 1, "error-summary"], ["id", "event_error-summary-heading", 1, "heading-h3", "error-summary-heading"], ["class", "error-summary-list", 4, "ngIf"], [1, "error-summary-list"], ["class", "ccd-error-summary-li", 4, "ngFor", "ngForOf"], [1, "ccd-error-summary-li"], [1, "govuk-caption-l"], ["href", "javascript:void(0)", "class", "govuk-link", 3, "click", 4, "ngIf"], ["class", "govuk-summary-list__row", 4, "ngIf"], [1, "govuk-summary-list__value", "govuk-summary-list__value--documentAttached"], [3, "attachments", 4, "ngIf"], [3, "attachments"]], template: function QueryCheckYourAnswersComponent_Template(rf, ctx) { if (rf & 1) {
21778
21809
  i0.ɵɵtemplate(0, QueryCheckYourAnswersComponent_div_0_Template, 36, 25, "div", 2);
21779
21810
  } if (rf & 2) {
21780
21811
  i0.ɵɵproperty("ngIf", ctx.readyToSubmit);
@@ -21783,7 +21814,7 @@ class QueryCheckYourAnswersComponent {
21783
21814
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryCheckYourAnswersComponent, [{
21784
21815
  type: Component,
21785
21816
  args: [{ selector: 'ccd-query-check-your-answers', template: "<div class=\"govuk-grid-row\" *ngIf=\"readyToSubmit\">\n <div class=\"govuk-grid-column-two-thirds-from-desktop\">\n <!-- Error message summary -->\n <div *ngIf=\"errorMessages.length > 0\" class=\"govuk-error-summary\"\n aria-labelledby=\"error-summary-title\" role=\"alert\" tabindex=\"-1\"\n 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 class=\"govuk-error-summary__body\">\n <ul class=\"govuk-list govuk-error-summary__list\">\n <li *ngFor=\"let errorMessage of errorMessages\">\n <a [id]=\"'error-' + errorMessage.fieldId\" href=\"javascript:void(0)\"\n class=\"validation-error\">{{ errorMessage.description | rpxTranslate }}</a>\n </li>\n </ul>\n </div>\n </div>\n\n <div *ngIf=\"error && (error.details || error.message)\" class=\"error-summary\" role=\"group\" aria-labelledby=\"edit-case-event_error-summary-heading\" tabindex=\"-1\">\n <h3 class=\"heading-h3 error-summary-heading\" id=\"event_error-summary-heading\">\n The event could not be created\n </h3>\n <p>{{error.message}}</p>\n <ul *ngIf=\"error.details?.field_errors\" class=\"error-summary-list\">\n <li *ngFor=\"let fieldError of error.details.field_errors\" class=\"ccd-error-summary-li\">{{fieldError.message}}</li>\n </ul>\n </div>\n\n <ccd-callback-errors [callbackErrorsSubject]=\"callbackErrorsSubject\"></ccd-callback-errors>\n\n <ng-container *ngIf=\"queryCreateContext === queryCreateContextEnum.NEW_QUERY\">\n <div class=\"govuk-caption-l\">{{ 'Raise a query' | rpxTranslate }}</div>\n </ng-container>\n\n <h1 class=\"govuk-heading-l\">\n <ng-container *ngIf=\"queryCreateContext === queryCreateContextEnum.RESPOND; else defaultCheckYourAnswersTitle\">\n {{ 'Review query response details' | rpxTranslate }}\n </ng-container>\n\n <ng-template #defaultCheckYourAnswersTitle>\n {{ 'Review query details' | rpxTranslate }}\n </ng-template>\n </h1>\n <div class=\"govuk-!-margin-bottom-4\">\n <ccd-query-case-details-header [caseDetails]=\"caseDetails\"></ccd-query-case-details-header>\n </div>\n\n <dl *ngIf=\"queryCreateContext !== queryCreateContextEnum.FOLLOWUP\" class=\"govuk-summary-list govuk-!-margin-bottom-0\">\n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n {{ queryCreateContext === queryCreateContextEnum.RESPOND ? 'Submitted query' : 'Query subject' | rpxTranslate }}\n </dt>\n <dd class=\"govuk-summary-list__value\">\n {{ queryCreateContext === queryCreateContextEnum.RESPOND ? queryItem.subject : formGroup.get('subject')?.value }}\n </dd>\n <dd class=\"govuk-summary-list__actions\">\n <a *ngIf=\"queryCreateContext === queryCreateContextEnum.NEW_QUERY\" \n href=\"javascript:void(0)\" class=\"govuk-link\" (click)=\"goBack()\">\n {{ 'Change' | rpxTranslate }}\n </a>\n </dd>\n </div>\n </dl>\n\n <dl class=\"govuk-summary-list govuk-!-margin-bottom-0\">\n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n {{ queryCreateContext === queryCreateContextEnum.RESPOND ? 'Response detail' : 'Query detail' | rpxTranslate }}\n </dt>\n <dd class=\"govuk-summary-list__value\">\n {{ formGroup.get('body')?.value }}\n </dd>\n <dd class=\"govuk-summary-list__actions\">\n <a href=\"javascript:void(0)\" class=\"govuk-link\" (click)=\"goBack()\">\n {{ 'Change' | rpxTranslate }}\n </a>\n </dd>\n </div>\n </dl>\n\n <dl *ngIf=\"queryCreateContext === queryCreateContextEnum.NEW_QUERY\" class=\"govuk-summary-list govuk-!-margin-bottom-0\">\n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n {{ 'Is the query hearing related?' | rpxTranslate }}\n </dt>\n <dd class=\"govuk-summary-list__value\">\n <ng-container *ngIf=\"formGroup.get('isHearingRelated')?.value === true; else isHearingRelatedFalse\">\n {{ 'Is the query hearing related?' | rpxTranslate: null : 'Yes' }}\n </ng-container>\n <ng-template #isHearingRelatedFalse>\n {{ 'Is the query hearing related?' | rpxTranslate: null : 'No' }}\n </ng-template>\n </dd>\n <dd class=\"govuk-summary-list__actions\">\n <a href=\"javascript:void(0)\" class=\"govuk-link\" (click)=\"goBack()\">\n {{ 'Change' | rpxTranslate }}\n </a>\n </dd>\n </div>\n\n <div *ngIf=\"formGroup.get('isHearingRelated')?.value\" class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n {{ queryCreateContext === queryCreateContextEnum.NEW_QUERY\n ? 'What is the date of the hearing?'\n : 'What is the date of the hearing your query is related to?' | rpxTranslate }}\n </dt>\n <dd class=\"govuk-summary-list__value\">\n {{ formGroup.get('hearingDate')?.value | date: 'dd MMM yyyy' }}\n </dd>\n <dd class=\"govuk-summary-list__actions\">\n <a href=\"javascript:void(0)\" class=\"govuk-link\" (click)=\"goBack()\">\n {{ 'Change' | rpxTranslate }}\n </a>\n </dd>\n </div>\n </dl>\n <dl class=\"govuk-summary-list govuk-!-margin-bottom-0\" *ngIf=\"this.formGroup.get('attachments').value.length > 0\">\n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n {{ queryCreateContext === queryCreateContextEnum.NEW_QUERY ? 'Upload a file to the query' : 'Document attached' | rpxTranslate }}\n </dt>\n <dd class=\"govuk-summary-list__value govuk-summary-list__value--documentAttached\">\n <ccd-query-attachments-read\n *ngIf=\"this.formGroup.get('attachments').value\"\n [attachments]=\"attachments\"\n >\n </ccd-query-attachments-read>\n </dd>\n <dd class=\"govuk-summary-list__actions\">\n <a href=\"javascript:void(0)\" class=\"govuk-link\" (click)=\"goBack()\">\n {{ 'Change' | rpxTranslate }}\n </a>\n </dd>\n </div>\n </dl>\n\n <dl *ngIf=\"queryCreateContext === queryCreateContextEnum.RESPOND\" class=\"govuk-summary-list govuk-!-margin-bottom-0\">\n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n {{ 'Closing the query' | rpxTranslate }}\n </dt>\n <dd class=\"govuk-summary-list__value\">\n {{ formGroup.get('closeQuery')?.value ? 'I want to close this query' : 'No answer' | rpxTranslate }}\n </dd>\n <dd class=\"govuk-summary-list__actions\">\n <a href=\"javascript:void(0)\" class=\"govuk-link\" (click)=\"goBack()\">\n {{ 'Change' | rpxTranslate }}\n </a>\n </dd>\n </div>\n </dl>\n\n <br>\n\n <div>\n <button class=\"govuk-button govuk-button--secondary govuk-!-margin-right-3\" data-module=\"govuk-button\"\n (click)=\"goBack()\">\n {{ 'Previous' | rpxTranslate }}\n </button>\n <button class=\"govuk-button\" data-module=\"govuk-button\" type=\"submit\" (click)=\"submit()\">\n {{ 'Submit' | rpxTranslate }}\n </button>\n </div>\n </div>\n\n <ccd-query-event-completion [eventCompletionParams]=\"eventCompletionParams\"> \n </ccd-query-event-completion>\n</div>\n", styles: [".govuk-summary-list__value--documentAttached{vertical-align:middle}\n"] }]
21786
- }], () => [{ type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: CasesService }, { type: CaseNotifier }, { type: WorkAllocationService }, { type: SessionStorageService }, { type: QualifyingQuestionService }], { formGroup: [{
21817
+ }], () => [{ type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: CasesService }, { type: CaseNotifier }, { type: WorkAllocationService }, { type: QualifyingQuestionService }, { type: QueryManagementService }, { type: ErrorNotifierService }, { type: AlertService }], { formGroup: [{
21787
21818
  type: Input
21788
21819
  }], queryItem: [{
21789
21820
  type: Input
@@ -21791,6 +21822,8 @@ class QueryCheckYourAnswersComponent {
21791
21822
  type: Input
21792
21823
  }], eventData: [{
21793
21824
  type: Input
21825
+ }], qmCaseQueriesCollectionData: [{
21826
+ type: Input
21794
21827
  }], backClicked: [{
21795
21828
  type: Output
21796
21829
  }], querySubmitted: [{
@@ -21798,7 +21831,7 @@ class QueryCheckYourAnswersComponent {
21798
21831
  }], callbackConfirmationMessage: [{
21799
21832
  type: Output
21800
21833
  }] }); })();
21801
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryCheckYourAnswersComponent, { className: "QueryCheckYourAnswersComponent", filePath: "lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.ts", lineNumber: 28 }); })();
21834
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryCheckYourAnswersComponent, { className: "QueryCheckYourAnswersComponent", filePath: "lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.ts", lineNumber: 31 }); })();
21802
21835
 
21803
21836
  function QueryDetailsComponent_ng_container_0_p_1_Template(rf, ctx) { if (rf & 1) {
21804
21837
  const _r1 = i0.ɵɵgetCurrentView();
@@ -22750,12 +22783,36 @@ function QueryWriteRaiseQueryComponent_div_11_Template(rf, ctx) { if (rf & 1) {
22750
22783
  i0.ɵɵproperty("ngIf", ctx_r0.formGroup.get("isHearingRelated").value);
22751
22784
  } }
22752
22785
  class QueryWriteRaiseQueryComponent {
22786
+ queryManagementService;
22787
+ route;
22753
22788
  formGroup;
22754
22789
  submitted;
22755
22790
  caseDetails;
22756
22791
  showForm;
22757
22792
  serviceMessage;
22793
+ queryCreateContext;
22794
+ eventData = null;
22795
+ queryItem;
22796
+ validate;
22797
+ triggerSubmission;
22798
+ queryDataCreated = new EventEmitter();
22758
22799
  raiseQueryErrorMessage = RaiseQueryErrorMessage;
22800
+ eventCompletionParams;
22801
+ messageId;
22802
+ constructor(queryManagementService, route) {
22803
+ this.queryManagementService = queryManagementService;
22804
+ this.route = route;
22805
+ }
22806
+ ngOnChanges() {
22807
+ this.messageId = this.route.snapshot.params.dataid;
22808
+ const isCollectionDataSet = this.setCaseQueriesCollectionData();
22809
+ if (isCollectionDataSet) {
22810
+ if (this.triggerSubmission) {
22811
+ const data = this.generateCaseQueriesCollectionData();
22812
+ this.queryDataCreated.emit(data);
22813
+ }
22814
+ }
22815
+ }
22759
22816
  onSubjectInput() {
22760
22817
  const control = this.formGroup.get('subject');
22761
22818
  const value = control?.value;
@@ -22773,8 +22830,19 @@ class QueryWriteRaiseQueryComponent {
22773
22830
  }
22774
22831
  return '';
22775
22832
  }
22776
- static ɵfac = function QueryWriteRaiseQueryComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryWriteRaiseQueryComponent)(); };
22777
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryWriteRaiseQueryComponent, selectors: [["ccd-query-write-raise-query"]], inputs: { formGroup: "formGroup", submitted: "submitted", caseDetails: "caseDetails", showForm: "showForm", serviceMessage: "serviceMessage" }, decls: 12, vars: 8, consts: [[1, "govuk-!-margin-bottom-6"], [1, "govuk-caption-l"], [1, "govuk-heading-l", "govuk-!-margin-bottom-4"], [3, "caseDetails", 4, "ngIf"], ["class", "govuk-!-margin-bottom-4", 4, "ngIf"], [3, "caseDetails"], [1, "govuk-!-margin-bottom-4"], [3, "formGroup"], [1, "govuk-warning-text"], ["aria-hidden", "true", 1, "govuk-warning-text__icon"], [1, "govuk-warning-text__text"], [1, "govuk-visually-hidden"], [3, "content"], [1, "govuk-form-group", 3, "ngClass"], [1, "govuk-label-wrapper"], ["for", "subject", 1, "govuk-label", "govuk-label--m", "govuk-!-font-weight-bold"], ["id", "subject-hint", 1, "govuk-hint"], ["id", "subject-error", "class", "govuk-error-message", 4, "ngIf"], ["type", "text", "id", "subject", "formControlName", "subject", "maxlength", "200", "aria-describedby", "subject-error", 1, "govuk-input", 3, "input"], ["for", "body", 1, "govuk-label", "govuk-label--m", "govuk-!-font-weight-bold"], ["id", "body-hint", 1, "govuk-hint"], ["id", "body-error", "class", "govuk-error-message", 4, "ngIf"], ["id", "body", "name", "body", "rows", "5", "aria-describedby", "body-hint body-error", 1, "govuk-textarea", 3, "formControlName"], [1, "govuk-fieldset"], [1, "govuk-label", "govuk-label--m", "govuk-!-font-weight-bold"], ["id", "isHearingRelated-error", "class", "govuk-error-message", 4, "ngIf"], ["data-module", "govuk-radios", 1, "govuk-radios", "govuk-radios--inline"], [1, "govuk-radios__item"], ["id", "isHearingRelated-yes", "name", "isHearingRelated", "type", "radio", "formControlName", "isHearingRelated", 1, "govuk-radios__input", 3, "checked", "value"], ["for", "isHearingRelated-yes", 1, "govuk-label", "govuk-radios__label"], ["id", "isHearingRelated-no", "name", "isHearingRelated", "type", "radio", "formControlName", "isHearingRelated", 1, "govuk-radios__input", 3, "checked", "value"], ["for", "isHearingRelated-no", 1, "govuk-label", "govuk-radios__label"], [4, "ngIf"], ["id", "subject-error", 1, "govuk-error-message"], ["id", "body-error", 1, "govuk-error-message"], ["id", "isHearingRelated-error", 1, "govuk-error-message"], [1, "govuk-radios__conditional", "govuk-!-margin-top-1", 3, "ngClass"], ["role", "group", 1, "govuk-fieldset"], [1, "govuk-label", "govuk-label--s"], ["id", "hearingDate-error", "class", "govuk-error-message", 4, "ngIf"], ["formControlName", "hearingDate"], ["id", "hearingDate-error", 1, "govuk-error-message"]], template: function QueryWriteRaiseQueryComponent_Template(rf, ctx) { if (rf & 1) {
22833
+ setCaseQueriesCollectionData() {
22834
+ if (!this.eventData) {
22835
+ console.warn('Event data not available; skipping collection setup.');
22836
+ return false;
22837
+ }
22838
+ this.queryManagementService.setCaseQueriesCollectionData(this.eventData, this.queryCreateContext, this.caseDetails, this.messageId);
22839
+ return true;
22840
+ }
22841
+ generateCaseQueriesCollectionData() {
22842
+ return this.queryManagementService.generateCaseQueriesCollectionData(this.formGroup, this.queryCreateContext, this.queryItem, this.messageId);
22843
+ }
22844
+ static ɵfac = function QueryWriteRaiseQueryComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryWriteRaiseQueryComponent)(i0.ɵɵdirectiveInject(QueryManagementService), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute)); };
22845
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryWriteRaiseQueryComponent, selectors: [["ccd-query-write-raise-query"]], inputs: { formGroup: "formGroup", submitted: "submitted", caseDetails: "caseDetails", showForm: "showForm", serviceMessage: "serviceMessage", queryCreateContext: "queryCreateContext", eventData: "eventData", queryItem: "queryItem", validate: "validate", triggerSubmission: "triggerSubmission" }, outputs: { queryDataCreated: "queryDataCreated" }, features: [i0.ɵɵNgOnChangesFeature], decls: 12, vars: 8, consts: [[1, "govuk-!-margin-bottom-6"], [1, "govuk-caption-l"], [1, "govuk-heading-l", "govuk-!-margin-bottom-4"], [3, "caseDetails", 4, "ngIf"], ["class", "govuk-!-margin-bottom-4", 4, "ngIf"], [3, "caseDetails"], [1, "govuk-!-margin-bottom-4"], [3, "formGroup"], [1, "govuk-warning-text"], ["aria-hidden", "true", 1, "govuk-warning-text__icon"], [1, "govuk-warning-text__text"], [1, "govuk-visually-hidden"], [3, "content"], [1, "govuk-form-group", 3, "ngClass"], [1, "govuk-label-wrapper"], ["for", "subject", 1, "govuk-label", "govuk-label--m", "govuk-!-font-weight-bold"], ["id", "subject-hint", 1, "govuk-hint"], ["id", "subject-error", "class", "govuk-error-message", 4, "ngIf"], ["type", "text", "id", "subject", "formControlName", "subject", "maxlength", "200", "aria-describedby", "subject-error", 1, "govuk-input", 3, "input"], ["for", "body", 1, "govuk-label", "govuk-label--m", "govuk-!-font-weight-bold"], ["id", "body-hint", 1, "govuk-hint"], ["id", "body-error", "class", "govuk-error-message", 4, "ngIf"], ["id", "body", "name", "body", "rows", "5", "aria-describedby", "body-hint body-error", 1, "govuk-textarea", 3, "formControlName"], [1, "govuk-fieldset"], [1, "govuk-label", "govuk-label--m", "govuk-!-font-weight-bold"], ["id", "isHearingRelated-error", "class", "govuk-error-message", 4, "ngIf"], ["data-module", "govuk-radios", 1, "govuk-radios", "govuk-radios--inline"], [1, "govuk-radios__item"], ["id", "isHearingRelated-yes", "name", "isHearingRelated", "type", "radio", "formControlName", "isHearingRelated", 1, "govuk-radios__input", 3, "checked", "value"], ["for", "isHearingRelated-yes", 1, "govuk-label", "govuk-radios__label"], ["id", "isHearingRelated-no", "name", "isHearingRelated", "type", "radio", "formControlName", "isHearingRelated", 1, "govuk-radios__input", 3, "checked", "value"], ["for", "isHearingRelated-no", 1, "govuk-label", "govuk-radios__label"], [4, "ngIf"], ["id", "subject-error", 1, "govuk-error-message"], ["id", "body-error", 1, "govuk-error-message"], ["id", "isHearingRelated-error", 1, "govuk-error-message"], [1, "govuk-radios__conditional", "govuk-!-margin-top-1", 3, "ngClass"], ["role", "group", 1, "govuk-fieldset"], [1, "govuk-label", "govuk-label--s"], ["id", "hearingDate-error", "class", "govuk-error-message", 4, "ngIf"], ["formControlName", "hearingDate"], ["id", "hearingDate-error", 1, "govuk-error-message"]], template: function QueryWriteRaiseQueryComponent_Template(rf, ctx) { if (rf & 1) {
22778
22846
  i0.ɵɵelementStart(0, "div")(1, "div", 0)(2, "div", 1);
22779
22847
  i0.ɵɵtext(3);
22780
22848
  i0.ɵɵpipe(4, "rpxTranslate");
@@ -22803,7 +22871,7 @@ class QueryWriteRaiseQueryComponent {
22803
22871
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryWriteRaiseQueryComponent, [{
22804
22872
  type: Component,
22805
22873
  args: [{ selector: 'ccd-query-write-raise-query', template: "<div>\n <div class=\"govuk-!-margin-bottom-6\">\n <div class=\"govuk-caption-l\">{{ 'Raise a query' | rpxTranslate }}</div>\n <h1 class=\"govuk-heading-l govuk-!-margin-bottom-4\">{{ 'Enter query details' | rpxTranslate }}</h1>\n </div>\n\n <div>\n <ccd-query-case-details-header [caseDetails]=\"caseDetails\" *ngIf=\"caseDetails\"></ccd-query-case-details-header>\n </div>\n\n <hr>\n\n <div class=\"govuk-!-margin-bottom-4\" *ngIf=\"showForm\">\n <div [formGroup]=\"formGroup\">\n <div>\n <div class=\"govuk-warning-text\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-visually-hidden\">Warning</span>\n <ccd-markdown\n [content]=\"serviceMessage | rpxTranslate\">\n </ccd-markdown>\n </strong>\n </div>\n <div class=\"govuk-form-group\" [ngClass]=\"{'govuk-form-group--error': submitted && formGroup.get('subject').hasError('required')}\">\n <div class=\"govuk-label-wrapper\">\n <label class=\"govuk-label govuk-label--m govuk-!-font-weight-bold\" for=\"subject\">\n {{ 'Query subject' | rpxTranslate }}\n </label>\n </div>\n <div id=\"subject-hint\" class=\"govuk-hint\">\n {{ 'The subject should be a summary of your query' | rpxTranslate }}\n </div>\n <p id=\"subject-error\" class=\"govuk-error-message\"\n *ngIf=\"submitted && (formGroup.get('subject').hasError('required') || formGroup.get('subject').hasError('maxlength'))\">\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate }}</span>\n {{ getSubjectErrorMessage() | rpxTranslate }}\n </p>\n\n <input type=\"text\"\n id=\"subject\"\n class=\"govuk-input\"\n formControlName=\"subject\"\n maxlength=\"200\"\n (input)=\"onSubjectInput()\"\n aria-describedby=\"subject-error\" />\n </div>\n\n <div class=\"govuk-form-group\"\n [ngClass]=\"{'govuk-form-group--error': submitted && formGroup.get('body').hasError('required')}\">\n <div class=\"govuk-label-wrapper\">\n <label class=\"govuk-label govuk-label--m govuk-!-font-weight-bold\" for=\"body\">\n {{ 'Query detail' | rpxTranslate }}\n </label>\n </div>\n <div id=\"body-hint\" class=\"govuk-hint\">\n {{ 'Include as many details as possible so case workers can respond to your query' | rpxTranslate }}\n </div>\n <p id=\"body-error\" class=\"govuk-error-message\"\n *ngIf=\"submitted && formGroup.get('body').hasError('required')\">\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate }} </span>{{ raiseQueryErrorMessage.QUERY_BODY | rpxTranslate }}\n </p>\n <textarea [formControlName]=\"'body'\"\n id=\"body\" name=\"body\" rows=\"5\"\n aria-describedby=\"body-hint body-error\"\n class=\"govuk-textarea\"\n [class.govuk-textarea--error]=\"submitted && formGroup.get('body').hasError('required')\"\n >\n </textarea>\n </div>\n\n <div class=\"govuk-form-group\"\n [ngClass]=\"{'govuk-form-group--error': submitted && formGroup.get('isHearingRelated').hasError('required')}\">\n <fieldset class=\"govuk-fieldset\">\n <legend>\n <label class=\"govuk-label govuk-label--m govuk-!-font-weight-bold\">\n {{ 'Is the query hearing related?' | rpxTranslate }}\n </label>\n </legend>\n <p id=\"isHearingRelated-error\" class=\"govuk-error-message\"\n *ngIf=\"submitted && formGroup.get('isHearingRelated').hasError('required')\">\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate }} </span>{{ raiseQueryErrorMessage.QUERY_HEARING_RELATED | rpxTranslate }}\n </p>\n <div class=\"govuk-radios govuk-radios--inline\" data-module=\"govuk-radios\">\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"isHearingRelated-yes\" name=\"isHearingRelated\"\n type=\"radio\"\n formControlName=\"isHearingRelated\"\n [checked]=\"formGroup.get('isHearingRelated').value === true\" [value]=\"true\"\n >\n <label class=\"govuk-label govuk-radios__label\" for=\"isHearingRelated-yes\">\n {{ 'Is the query hearing related?' | rpxTranslate: null : 'Yes' }}\n </label>\n </div>\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"isHearingRelated-no\" name=\"isHearingRelated\"\n type=\"radio\"\n formControlName=\"isHearingRelated\"\n [checked]=\"formGroup.get('isHearingRelated').value === false\" [value]=\"false\"\n >\n <label class=\"govuk-label govuk-radios__label\" for=\"isHearingRelated-no\">\n {{ 'Is the query hearing related?' | rpxTranslate: null : 'No' }}\n </label>\n </div>\n </div>\n </fieldset>\n\n <ng-container *ngIf=\"formGroup.get('isHearingRelated').value\">\n <div class=\"govuk-radios__conditional govuk-!-margin-top-1\"\n [ngClass]=\"{'govuk-form-group--error': submitted &&\n formGroup.get('isHearingRelated').value === true &&\n formGroup.get('hearingDate').value === null}\">\n <fieldset class=\"govuk-fieldset\" role=\"group\">\n <legend>\n <label class=\"govuk-label govuk-label--s\">\n {{ 'What is the date of the hearing?' | rpxTranslate }}\n </label>\n </legend>\n <p id=\"hearingDate-error\" class=\"govuk-error-message\"\n *ngIf=\"submitted && formGroup.get('isHearingRelated').value === true && formGroup.get('hearingDate').value === null\">\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate }} </span>{{ raiseQueryErrorMessage.QUERY_HEARING_DATE | rpxTranslate }}\n </p>\n <ccd-query-write-date-input formControlName=\"hearingDate\"></ccd-query-write-date-input>\n </fieldset>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n</div>\n" }]
22806
- }], null, { formGroup: [{
22874
+ }], () => [{ type: QueryManagementService }, { type: i1$1.ActivatedRoute }], { formGroup: [{
22807
22875
  type: Input
22808
22876
  }], submitted: [{
22809
22877
  type: Input
@@ -22813,8 +22881,20 @@ class QueryWriteRaiseQueryComponent {
22813
22881
  type: Input
22814
22882
  }], serviceMessage: [{
22815
22883
  type: Input
22884
+ }], queryCreateContext: [{
22885
+ type: Input
22886
+ }], eventData: [{
22887
+ type: Input
22888
+ }], queryItem: [{
22889
+ type: Input
22890
+ }], validate: [{
22891
+ type: Input
22892
+ }], triggerSubmission: [{
22893
+ type: Input
22894
+ }], queryDataCreated: [{
22895
+ type: Output
22816
22896
  }] }); })();
22817
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryWriteRaiseQueryComponent, { className: "QueryWriteRaiseQueryComponent", filePath: "lib/shared/components/palette/query-management/components/query-write/query-write-raise-query/query-write-raise-query.component.ts", lineNumber: 8 }); })();
22897
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryWriteRaiseQueryComponent, { className: "QueryWriteRaiseQueryComponent", filePath: "lib/shared/components/palette/query-management/components/query-write/query-write-raise-query/query-write-raise-query.component.ts", lineNumber: 19 }); })();
22818
22898
 
22819
22899
  function QueryWriteRespondToQueryComponent_ccd_query_case_details_header_9_Template(rf, ctx) { if (rf & 1) {
22820
22900
  i0.ɵɵelement(0, "ccd-query-case-details-header", 8);
@@ -22896,12 +22976,16 @@ function QueryWriteRespondToQueryComponent_ng_container_13_Template(rf, ctx) { i
22896
22976
  class QueryWriteRespondToQueryComponent {
22897
22977
  caseNotifier;
22898
22978
  route;
22979
+ queryManagementService;
22899
22980
  queryItem;
22900
22981
  formGroup;
22901
22982
  queryCreateContext;
22902
22983
  submitted = false;
22903
22984
  caseQueriesCollections;
22904
22985
  showForm;
22986
+ triggerSubmission;
22987
+ eventData = null;
22988
+ queryDataCreated = new EventEmitter();
22905
22989
  hasRespondedToQueryTask = new EventEmitter();
22906
22990
  queryCreateContextEnum = QueryCreateContext;
22907
22991
  raiseQueryErrorMessages = RaiseQueryErrorMessage;
@@ -22911,11 +22995,13 @@ class QueryWriteRespondToQueryComponent {
22911
22995
  queryResponseStatus;
22912
22996
  queryListData;
22913
22997
  hasRespondedToQuery = false;
22998
+ messageId;
22914
22999
  static QUERY_ITEM_RESPOND = '3';
22915
23000
  static QUERY_ITEM_FOLLOWUP = '4';
22916
- constructor(caseNotifier, route) {
23001
+ constructor(caseNotifier, route, queryManagementService) {
22917
23002
  this.caseNotifier = caseNotifier;
22918
23003
  this.route = route;
23004
+ this.queryManagementService = queryManagementService;
22919
23005
  }
22920
23006
  ngOnInit() {
22921
23007
  this.queryItemId = this.route.snapshot.params.qid;
@@ -22957,13 +23043,31 @@ class QueryWriteRespondToQueryComponent {
22957
23043
  : matchingMessage?.id;
22958
23044
  this.queryListData = queryWithChildren?.queries.find((query) => query?.id === targetId);
22959
23045
  this.queryResponseStatus = this.queryListData?.responseStatus;
23046
+ const isCollectionDataSet = this.setCaseQueriesCollectionData();
23047
+ if (isCollectionDataSet) {
23048
+ if (this.triggerSubmission) {
23049
+ const data = this.generateCaseQueriesCollectionData();
23050
+ this.queryDataCreated.emit(data);
23051
+ }
23052
+ }
22960
23053
  }
22961
23054
  hasResponded(value) {
22962
23055
  this.hasRespondedToQuery = value;
22963
23056
  this.hasRespondedToQueryTask.emit(value);
22964
23057
  }
22965
- static ɵfac = function QueryWriteRespondToQueryComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryWriteRespondToQueryComponent)(i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute)); };
22966
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryWriteRespondToQueryComponent, selectors: [["ccd-query-write-respond-to-query"]], inputs: { queryItem: "queryItem", formGroup: "formGroup", queryCreateContext: "queryCreateContext", submitted: "submitted", caseQueriesCollections: "caseQueriesCollections", showForm: "showForm" }, outputs: { hasRespondedToQueryTask: "hasRespondedToQueryTask" }, features: [i0.ɵɵNgOnChangesFeature], decls: 14, vars: 11, consts: [[1, "govuk-!-margin-bottom-6"], [1, "govuk-caption-l"], [1, "govuk-heading-l", "govuk-!-margin-bottom-0"], [1, "govuk-!-margin-bottom-4"], [3, "caseDetails", 4, "ngIf"], [3, "hasResponded", "query", "queryResponseStatus"], ["class", "query-respond", 4, "ngIf"], [4, "ngIf"], [3, "caseDetails"], [1, "query-respond"], [1, "govuk-heading-m"], [3, "formGroup"], [1, "govuk-form-group", "body-textarea"], [1, "govuk-label-wrapper"], ["for", "body", 1, "govuk-label", "govuk-label--m", "govuk-!-font-weight-bold"], ["id", "body-error", "class", "govuk-error-message", 4, "ngIf"], ["id", "body", "name", "body", "rows", "5", "aria-describedby", "body-hint body-error", 1, "govuk-textarea", 3, "formControlName"], ["id", "body-error", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], [3, "formGroup", 4, "ngIf"]], template: function QueryWriteRespondToQueryComponent_Template(rf, ctx) { if (rf & 1) {
23058
+ setCaseQueriesCollectionData() {
23059
+ if (!this.eventData) {
23060
+ console.warn('Event data not available; skipping collection setup.');
23061
+ return false;
23062
+ }
23063
+ this.queryManagementService.setCaseQueriesCollectionData(this.eventData, this.queryCreateContext, this.caseDetails, this.messageId);
23064
+ return true;
23065
+ }
23066
+ generateCaseQueriesCollectionData() {
23067
+ return this.queryManagementService.generateCaseQueriesCollectionData(this.formGroup, this.queryCreateContext, this.queryItem, this.messageId);
23068
+ }
23069
+ static ɵfac = function QueryWriteRespondToQueryComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryWriteRespondToQueryComponent)(i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(QueryManagementService)); };
23070
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryWriteRespondToQueryComponent, selectors: [["ccd-query-write-respond-to-query"]], inputs: { queryItem: "queryItem", formGroup: "formGroup", queryCreateContext: "queryCreateContext", submitted: "submitted", caseQueriesCollections: "caseQueriesCollections", showForm: "showForm", triggerSubmission: "triggerSubmission", eventData: "eventData" }, outputs: { queryDataCreated: "queryDataCreated", hasRespondedToQueryTask: "hasRespondedToQueryTask" }, features: [i0.ɵɵNgOnChangesFeature], decls: 14, vars: 11, consts: [[1, "govuk-!-margin-bottom-6"], [1, "govuk-caption-l"], [1, "govuk-heading-l", "govuk-!-margin-bottom-0"], [1, "govuk-!-margin-bottom-4"], [3, "caseDetails", 4, "ngIf"], [3, "hasResponded", "query", "queryResponseStatus"], ["class", "query-respond", 4, "ngIf"], [4, "ngIf"], [3, "caseDetails"], [1, "query-respond"], [1, "govuk-heading-m"], [3, "formGroup"], [1, "govuk-form-group", "body-textarea"], [1, "govuk-label-wrapper"], ["for", "body", 1, "govuk-label", "govuk-label--m", "govuk-!-font-weight-bold"], ["id", "body-error", "class", "govuk-error-message", 4, "ngIf"], ["id", "body", "name", "body", "rows", "5", "aria-describedby", "body-hint body-error", 1, "govuk-textarea", 3, "formControlName"], ["id", "body-error", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], [3, "formGroup", 4, "ngIf"]], template: function QueryWriteRespondToQueryComponent_Template(rf, ctx) { if (rf & 1) {
22967
23071
  i0.ɵɵelementStart(0, "div", 0)(1, "div", 0)(2, "div", 1);
22968
23072
  i0.ɵɵtext(3);
22969
23073
  i0.ɵɵpipe(4, "rpxTranslate");
@@ -22997,7 +23101,7 @@ class QueryWriteRespondToQueryComponent {
22997
23101
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryWriteRespondToQueryComponent, [{
22998
23102
  type: Component,
22999
23103
  args: [{ selector: 'ccd-query-write-respond-to-query', template: "<div class=\"govuk-!-margin-bottom-6\">\n <div class=\"govuk-!-margin-bottom-6\">\n <div class=\"govuk-caption-l\">{{ 'Respond to a query' | rpxTranslate }}</div>\n <h1 class=\"govuk-heading-l govuk-!-margin-bottom-0\">{{ 'Query details' | rpxTranslate }}</h1>\n </div>\n\n <div class=\"govuk-!-margin-bottom-4\">\n <ccd-query-case-details-header [caseDetails]=\"caseDetails\" *ngIf=\"caseDetails\"></ccd-query-case-details-header>\n </div>\n\n <div>\n <ccd-query-details [query]=\"queryListData\"\n [queryResponseStatus]=\"queryResponseStatus\"\n (hasResponded)=\"hasResponded($event)\"></ccd-query-details>\n </div>\n</div>\n<div class=\"query-respond\" *ngIf=\"showForm\">\n <div *ngIf=\"!hasRespondedToQuery\">\n <h1 class=\"govuk-heading-m\">\n {{ queryCreateContext === queryCreateContextEnum.RESPOND ? 'Respond to a query' : 'Ask a follow-up question' | rpxTranslate }}\n </h1>\n\n <div [formGroup]=\"formGroup\">\n <div class=\"govuk-form-group body-textarea\"\n [class.govuk-form-group--error]=\"submitted && formGroup.get('body')?.hasError('required')\">\n <div class=\"govuk-label-wrapper\">\n <label class=\"govuk-label govuk-label--m govuk-!-font-weight-bold\" for=\"body\">\n {{ queryCreateContext === queryCreateContextEnum.RESPOND ? 'Response detail' : 'Query Body' | rpxTranslate }}\n </label>\n </div>\n <p id=\"body-error\" class=\"govuk-error-message\"\n *ngIf=\"submitted && formGroup.get('body')?.hasError('required')\">\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate }} </span>{{ queryCreateContext === queryCreateContextEnum.RESPOND ? raiseQueryErrorMessages.RESPOND_QUERY_BODY : raiseQueryErrorMessages.QUERY_BODY | rpxTranslate }}\n </p>\n <textarea [formControlName]=\"'body'\" class=\"govuk-textarea\"\n [class.govuk-textarea--error]=\"submitted && formGroup.get('body')?.hasError('required')\" id=\"body\"\n name=\"body\" rows=\"5\" aria-describedby=\"body-hint body-error\">\n </textarea>\n </div>\n </div>\n </div>\n</div>\n\n<ng-container *ngIf=\"queryCreateContext === queryCreateContextEnum.RESPOND\">\n <ccd-close-query *ngIf=\"!hasRespondedToQuery\"\n [formGroup]=\"formGroup\">\n </ccd-close-query>\n</ng-container>", styles: [".query-respond{width:100%;max-width:720px}\n"] }]
23000
- }], () => [{ type: CaseNotifier }, { type: i1$1.ActivatedRoute }], { queryItem: [{
23104
+ }], () => [{ type: CaseNotifier }, { type: i1$1.ActivatedRoute }, { type: QueryManagementService }], { queryItem: [{
23001
23105
  type: Input
23002
23106
  }], formGroup: [{
23003
23107
  type: Input
@@ -23009,10 +23113,16 @@ class QueryWriteRespondToQueryComponent {
23009
23113
  type: Input
23010
23114
  }], showForm: [{
23011
23115
  type: Input
23116
+ }], triggerSubmission: [{
23117
+ type: Input
23118
+ }], eventData: [{
23119
+ type: Input
23120
+ }], queryDataCreated: [{
23121
+ type: Output
23012
23122
  }], hasRespondedToQueryTask: [{
23013
23123
  type: Output
23014
23124
  }] }); })();
23015
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryWriteRespondToQueryComponent, { className: "QueryWriteRespondToQueryComponent", filePath: "lib/shared/components/palette/query-management/components/query-write/query-write-respond-to-query/query-write-respond-to-query.component.ts", lineNumber: 14 }); })();
23125
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryWriteRespondToQueryComponent, { className: "QueryWriteRespondToQueryComponent", filePath: "lib/shared/components/palette/query-management/components/query-write/query-write-respond-to-query/query-write-respond-to-query.component.ts", lineNumber: 18 }); })();
23016
23126
 
23017
23127
  function QueryConfirmationComponent_main_0_ng_container_3_Template(rf, ctx) { if (rf & 1) {
23018
23128
  i0.ɵɵelementContainerStart(0);
@@ -23229,23 +23339,32 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_conta
23229
23339
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "Ask a follow-up question"), " ");
23230
23340
  } }
23231
23341
  function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_Template(rf, ctx) { if (rf & 1) {
23232
- i0.ɵɵelementStart(0, "div")(1, "p", 10);
23342
+ i0.ɵɵelementStart(0, "div")(1, "button", 9);
23233
23343
  i0.ɵɵtext(2);
23234
23344
  i0.ɵɵpipe(3, "rpxTranslate");
23235
23345
  i0.ɵɵelementEnd();
23236
- i0.ɵɵelementStart(4, "p");
23346
+ i0.ɵɵelementStart(4, "p", 10);
23237
23347
  i0.ɵɵtext(5);
23238
23348
  i0.ɵɵpipe(6, "rpxTranslate");
23349
+ i0.ɵɵelementEnd();
23350
+ i0.ɵɵelementStart(7, "p");
23351
+ i0.ɵɵtext(8);
23352
+ i0.ɵɵpipe(9, "rpxTranslate");
23239
23353
  i0.ɵɵelementEnd()();
23240
23354
  } if (rf & 2) {
23241
- i0.ɵɵadvance(2);
23242
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 2, "Your query is under review"));
23355
+ const ctx_r1 = i0.ɵɵnextContext(3);
23356
+ i0.ɵɵadvance();
23357
+ i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction2(10, _c0$B, ctx_r1.caseId, ctx_r1.query.id));
23358
+ i0.ɵɵadvance();
23359
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 4, "Ask a follow-up question"), " ");
23360
+ i0.ɵɵadvance(3);
23361
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 6, "Your query is under review"));
23243
23362
  i0.ɵɵadvance(3);
23244
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 4, "Our team will read your query and respond. Do not submit the same query more than once."));
23363
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(9, 8, "Our team will read your query and respond. Do not submit the same query more than once."));
23245
23364
  } }
23246
23365
  function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
23247
23366
  i0.ɵɵelementContainerStart(0);
23248
- i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_container_1_Template, 4, 7, "ng-container", 2)(2, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_Template, 7, 6, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor);
23367
+ i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_container_1_Template, 4, 7, "ng-container", 2)(2, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_Template, 10, 13, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor);
23249
23368
  i0.ɵɵelementContainerEnd();
23250
23369
  } if (rf & 2) {
23251
23370
  const queryIsInReview_r5 = i0.ɵɵreference(3);
@@ -23280,7 +23399,7 @@ function ReadQueryManagementFieldComponent_ng_template_1_Template(rf, ctx) { if
23280
23399
  const ctx_r1 = i0.ɵɵnextContext();
23281
23400
  i0.ɵɵproperty("query", ctx_r1.query)("caseId", ctx_r1.caseId);
23282
23401
  i0.ɵɵadvance();
23283
- i0.ɵɵproperty("ngIf", !ctx_r1.isInternalUser() && !ctx_r1.isQueryClosed);
23402
+ i0.ɵɵproperty("ngIf", !ctx_r1.isInternalUser() && !ctx_r1.isQueryClosed && (ctx_r1.query == null ? null : ctx_r1.query.children == null ? null : ctx_r1.query.children.length) > 0);
23284
23403
  i0.ɵɵadvance();
23285
23404
  i0.ɵɵproperty("ngIf", !ctx_r1.isInternalUser() && ctx_r1.isQueryClosed);
23286
23405
  } }
@@ -23348,7 +23467,7 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
23348
23467
  }
23349
23468
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadQueryManagementFieldComponent, [{
23350
23469
  type: Component,
23351
- args: [{ selector: 'ccd-read-query-management-field', template: "<ng-container *ngIf=\"showQueryList; else singleQueryDetails\">\n <ng-container *ngFor=\"let caseQueriesCollection of caseQueriesCollections\">\n <div *ngIf=\"showQueryList\" class=\"govuk-!-margin-top-8 govuk-!-margin-bottom-8\">\n <ccd-query-list (selectedQuery)=\"setQuery($event)\" [caseQueriesCollection]=\"caseQueriesCollection\"></ccd-query-list>\n </div>\n </ng-container>\n</ng-container>\n\n<ng-template #singleQueryDetails>\n <ccd-query-details\n [query]=\"query\"\n (backClicked)=\"showQueryList = true\"\n [caseId]=\"caseId\"\n ></ccd-query-details>\n\n <ng-container *ngIf=\"!isInternalUser() && !isQueryClosed\">\n <ng-container *ngIf=\"query?.children?.length > 0 && query?.children?.length % 2 === 1; else queryIsInReview\">\n <button id=\"ask-follow-up-question\" class=\"govuk-button\" data-module=\"govuk-button\"\n [routerLink]=\"['/query-management', 'query', caseId, '4', query.id]\">\n {{ 'Ask a follow-up question' | rpxTranslate }}\n </button>\n </ng-container>\n\n <ng-template #queryIsInReview>\n <div>\n <p class=\"govuk-!-font-weight-bold\">{{ 'Your query is under review' | rpxTranslate }}</p>\n <p>{{ 'Our team will read your query and respond. Do not submit the same query more than once.' | rpxTranslate }}</p>\n </div>\n </ng-template>\n </ng-container>\n <ng-container *ngIf=\"!isInternalUser() && isQueryClosed\">\n <div class=\"govuk-warning-text\">\n <span aria-hidden=\"true\" class=\"govuk-warning-text__icon\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-visually-hidden\">Warning</span>\n <p class=\"qm-service-message govuk-!-font-weight-bold\">{{ 'This query has been closed by court staff.' | rpxTranslate }}</p>\n </strong>\n </div>\n </ng-container>\n</ng-template>\n" }]
23470
+ args: [{ selector: 'ccd-read-query-management-field', template: "<ng-container *ngIf=\"showQueryList; else singleQueryDetails\">\n <ng-container *ngFor=\"let caseQueriesCollection of caseQueriesCollections\">\n <div *ngIf=\"showQueryList\" class=\"govuk-!-margin-top-8 govuk-!-margin-bottom-8\">\n <ccd-query-list (selectedQuery)=\"setQuery($event)\" [caseQueriesCollection]=\"caseQueriesCollection\"></ccd-query-list>\n </div>\n </ng-container>\n</ng-container>\n\n<ng-template #singleQueryDetails>\n <ccd-query-details\n [query]=\"query\"\n (backClicked)=\"showQueryList = true\"\n [caseId]=\"caseId\"\n ></ccd-query-details>\n\n <ng-container *ngIf=\"!isInternalUser() && !isQueryClosed && query?.children?.length > 0\">\n <ng-container *ngIf=\"query?.children?.length > 0 && query?.children?.length % 2 === 1; else queryIsInReview\">\n <button id=\"ask-follow-up-question\" class=\"govuk-button\" data-module=\"govuk-button\"\n [routerLink]=\"['/query-management', 'query', caseId, '4', query.id]\">\n {{ 'Ask a follow-up question' | rpxTranslate }}\n </button>\n </ng-container>\n\n <ng-template #queryIsInReview>\n <div>\n <button id=\"ask-follow-up-question\" class=\"govuk-button\" data-module=\"govuk-button\"\n [routerLink]=\"['/query-management', 'query', caseId, '4', query.id]\">\n {{ 'Ask a follow-up question' | rpxTranslate }}\n </button>\n <p class=\"govuk-!-font-weight-bold\">{{ 'Your query is under review' | rpxTranslate }}</p>\n <p>{{ 'Our team will read your query and respond. Do not submit the same query more than once.' | rpxTranslate }}</p>\n </div>\n </ng-template>\n </ng-container>\n <ng-container *ngIf=\"!isInternalUser() && isQueryClosed\">\n <div class=\"govuk-warning-text\">\n <span aria-hidden=\"true\" class=\"govuk-warning-text__icon\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-visually-hidden\">Warning</span>\n <p class=\"qm-service-message govuk-!-font-weight-bold\">{{ 'This query has been closed by court staff.' | rpxTranslate }}</p>\n </strong>\n </div>\n </ng-container>\n</ng-template>\n" }]
23352
23471
  }], () => [{ type: i1$1.ActivatedRoute }, { type: SessionStorageService }, { type: CaseNotifier }], null); })();
23353
23472
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadQueryManagementFieldComponent, { className: "ReadQueryManagementFieldComponent", filePath: "lib/shared/components/palette/query-management/read-query-management-field.component.ts", lineNumber: 15 }); })();
23354
23473
 
@@ -30607,6 +30726,8 @@ class PaletteModule {
30607
30726
  CommonDataService,
30608
30727
  LinkedCasesService,
30609
30728
  QualifyingQuestionService,
30729
+ QueryManagementUtils,
30730
+ QueryManagementService,
30610
30731
  { provide: MAT_LEGACY_DATE_LOCALE, useValue: 'en-GB' }
30611
30732
  ], imports: [CommonModule,
30612
30733
  RouterModule,
@@ -30724,6 +30845,8 @@ class PaletteModule {
30724
30845
  CommonDataService,
30725
30846
  LinkedCasesService,
30726
30847
  QualifyingQuestionService,
30848
+ QueryManagementUtils,
30849
+ QueryManagementService,
30727
30850
  { provide: MAT_LEGACY_DATE_LOCALE, useValue: 'en-GB' }
30728
30851
  ],
30729
30852
  schemas: [CUSTOM_ELEMENTS_SCHEMA]
@@ -40130,5 +40253,5 @@ class TestRouteSnapshotBuilder {
40130
40253
  * Generated bundle index. Do not edit.
40131
40254
  */
40132
40255
 
40133
- 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, CaseFileViewFolderToggleComponent, 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, CloseQueryComponent, 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, QualifyingQuestionService, QualifyingQuestionsErrorMessage, QueryAttachmentsReadComponent, QueryCaseDetailsHeaderComponent, QueryCheckYourAnswersComponent, QueryConfirmationComponent, QueryCreateContext, QueryDetailsComponent, QueryEventCompletionComponent, QueryItemResponseStatus, QueryListComponent, QueryListData, QueryListItem, QueryWriteAddDocumentsComponent, QueryWriteDateInputComponent, QueryWriteRaiseQueryComponent, QueryWriteRespondToQueryComponent, RaiseQueryErrorMessage, ReadCaseFlagFieldComponent, ReadCaseLinkFieldComponent, ReadCollectionFieldComponent, ReadComplexFieldCollectionTableComponent, ReadComplexFieldComponent, ReadComplexFieldRawComponent, ReadComplexFieldTableComponent, ReadCookieService, 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 };
40256
+ 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, CaseFileViewFolderToggleComponent, 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, CloseQueryComponent, 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, QualifyingQuestionService, QualifyingQuestionsErrorMessage, QueryAttachmentsReadComponent, QueryCaseDetailsHeaderComponent, QueryCheckYourAnswersComponent, QueryConfirmationComponent, QueryCreateContext, QueryDetailsComponent, QueryEventCompletionComponent, QueryItemResponseStatus, QueryListComponent, QueryListData, QueryListItem, QueryManagementService, QueryWriteAddDocumentsComponent, QueryWriteDateInputComponent, QueryWriteRaiseQueryComponent, QueryWriteRespondToQueryComponent, RaiseQueryErrorMessage, ReadCaseFlagFieldComponent, ReadCaseLinkFieldComponent, ReadCollectionFieldComponent, ReadComplexFieldCollectionTableComponent, ReadComplexFieldComponent, ReadComplexFieldRawComponent, ReadComplexFieldTableComponent, ReadCookieService, 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 };
40134
40257
  //# sourceMappingURL=hmcts-ccd-case-ui-toolkit.mjs.map