@hmcts/rpx-xui-common-lib 2.1.3-angular-upgrade-11 → 2.1.6-angular-upgrade-11

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 (48) hide show
  1. package/bundles/hmcts-rpx-xui-common-lib.umd.js +607 -392
  2. package/bundles/hmcts-rpx-xui-common-lib.umd.js.map +1 -1
  3. package/bundles/hmcts-rpx-xui-common-lib.umd.min.js +1 -1
  4. package/bundles/hmcts-rpx-xui-common-lib.umd.min.js.map +1 -1
  5. package/esm2015/hmcts-rpx-xui-common-lib.js +27 -26
  6. package/esm2015/lib/components/accessibility/accessibility.component.js +2 -2
  7. package/esm2015/lib/components/find-location/find-location.component.js +6 -2
  8. package/esm2015/lib/components/find-person/find-person.component.js +3 -3
  9. package/esm2015/lib/components/find-service/find-service.component.js +31 -0
  10. package/esm2015/lib/components/generic-filter/generic-filter.component.js +16 -10
  11. package/esm2015/lib/components/search-judicials/search-judicials.component.js +3 -3
  12. package/esm2015/lib/components/search-location/search-location.component.js +22 -3
  13. package/esm2015/lib/components/search-service/search-service.component.js +31 -0
  14. package/esm2015/lib/components/selected-case/selected-case.component.js +5 -7
  15. package/esm2015/lib/components/selected-case-confirm/selected-case-confirm.component.js +1 -1
  16. package/esm2015/lib/components/selected-case-list/selected-case-list.component.js +7 -3
  17. package/esm2015/lib/components/share-case/share-case.component.js +127 -13
  18. package/esm2015/lib/exui-common-lib.module.js +5 -17
  19. package/esm2015/lib/models/case-share.model.js +7 -2
  20. package/esm2015/lib/models/filter.model.js +1 -1
  21. package/esm2015/lib/models/index.js +2 -1
  22. package/esm2015/lib/models/location.model.js +7 -2
  23. package/esm2015/lib/models/person.model.js +3 -1
  24. package/esm2015/lib/services/case-sharing-state/case-sharing-state.service.js +28 -14
  25. package/esm2015/lib/services/find-person/find-person.service.js +3 -3
  26. package/esm2015/lib/services/locations/location.service.js +3 -3
  27. package/esm2015/lib/services/public-api.js +1 -5
  28. package/fesm2015/hmcts-rpx-xui-common-lib.js +525 -310
  29. package/fesm2015/hmcts-rpx-xui-common-lib.js.map +1 -1
  30. package/hmcts-rpx-xui-common-lib.d.ts +26 -25
  31. package/hmcts-rpx-xui-common-lib.metadata.json +1 -1
  32. package/lib/components/find-location/find-location.component.d.ts +3 -2
  33. package/lib/components/find-service/find-service.component.d.ts +14 -0
  34. package/lib/components/search-location/search-location.component.d.ts +5 -2
  35. package/lib/components/search-service/search-service.component.d.ts +13 -0
  36. package/lib/components/selected-case/selected-case.component.d.ts +1 -1
  37. package/lib/components/selected-case-list/selected-case-list.component.d.ts +1 -0
  38. package/lib/components/share-case/share-case.component.d.ts +37 -2
  39. package/lib/exui-common-lib.module.d.ts +0 -2
  40. package/lib/models/case-share.model.d.ts +5 -0
  41. package/lib/models/filter.model.d.ts +4 -1
  42. package/lib/models/index.d.ts +1 -0
  43. package/lib/models/location.model.d.ts +11 -0
  44. package/lib/models/person.model.d.ts +3 -0
  45. package/lib/services/case-sharing-state/case-sharing-state.service.d.ts +1 -1
  46. package/lib/services/locations/location.service.d.ts +2 -2
  47. package/lib/services/public-api.d.ts +0 -4
  48. package/package.json +4 -1
@@ -5,13 +5,13 @@ import { formatDate, DOCUMENT, CommonModule } from '@angular/common';
5
5
  import { Validators, FormArray, FormGroup, FormControl, FormBuilder, FormsModule, ReactiveFormsModule } from '@angular/forms';
6
6
  import { BehaviorSubject, Subject, of, zip, combineLatest } from 'rxjs';
7
7
  import { distinctUntilChanged, map, tap, filter, debounceTime, mergeMap, switchMap, catchError, delay } from 'rxjs/operators';
8
+ import * as i1$1 from '@angular/router';
9
+ import { Router, RouterModule, NavigationEnd } from '@angular/router';
8
10
  import * as i1 from '@angular/common/http';
9
11
  import { HttpClient } from '@angular/common/http';
10
12
  import { MatAutocompleteModule } from '@angular/material/autocomplete';
11
13
  import { MatInputModule } from '@angular/material/input';
12
14
  import { MatTabsModule } from '@angular/material/tabs';
13
- import * as i1$1 from '@angular/router';
14
- import { Router, NavigationEnd, RouterModule } from '@angular/router';
15
15
  import { NgxPaginationModule, PaginatePipe } from 'ngx-pagination';
16
16
  import * as LDClient from 'launchdarkly-js-client-sdk';
17
17
  import * as i2 from '@angular/platform-browser';
@@ -28,7 +28,7 @@ class AccessibilityComponent {
28
28
  AccessibilityComponent.decorators = [
29
29
  { type: Component, args: [{
30
30
  selector: 'xuilib-accessibility',
31
- template: "<h1 class=\"govuk-heading-xl\" id=\"Accessibility-statement-for-Expert-UI\">Accessibility statement for Expert UI</h1>\n\n<ul class=\"govuk-list\">\n <li><a href=\"accessibility#immigration\">Immigration and Asylum</a></li>\n <li><a href=\"accessibility#family\">Family Public Law </a></li>\n</ul>\n\n<p class=\"govuk-body\">This website is run by HM Courts & Tribunals Service. We want as many people as possible to be\n able to use this website. For example, you should be able to:</p>\n\n<ul class=\"govuk-list govuk-list--bullet\">\n <li>change colours, contrast levels and fonts</li>\n <li>zoom in up to 300% without the text spilling off the screen</li>\n <li>navigate most of the website using just a keyboard</li>\n <li>navigate most of the website using speech recognition software</li>\n <li>listen to most of the website using a screen reader (including the most recent versions of JAWS, NVDA and\n VoiceOver)\n </li>\n</ul>\n\n<p class=\"govuk-body\">We\u2019ve also made the website text as simple as possible to understand.</p>\n\n<p class=\"govuk-body\"><a rel=\"noopener noreferrer\" target=\"_blank\" href=\"https://mcmw.abilitynet.org.uk/\">AbilityNet</a>\n has advice on making your device easier to use if you have a disability.</p>\n\n<h2 class=\"govuk-heading-l\" id=\"How-accessible-this-website-is\">How accessible this website is</h2>\n\n<p class=\"govuk-body\">We know some parts of the website are not fully accessible:</p>\n\n<ul class=\"govuk-list govuk-list--bullet\">\n <li>some pages are difficult to navigate using just a keyboard</li>\n <li>some pages can\u2019t be listened to in full using a screen reader</li>\n <li>some pages have problems with colour contrasts between text and background</li>\n <li>some PDFs may not be fully accessible to a screen reader</li>\n</ul>\n\n<h2 class=\"govuk-heading-l\" id=\"What-to-do-if-you-cannot-access-parts-of-this-website\">Feedback and contact\n information</h2>\n\n<p class=\"govuk-body\">If you need information on this website in a different format like accessible PDF, large print,\n easy read, audio recording or braille, you can:</p>\n\n<ul class=\"govuk-list govuk-list--bullet\">\n <li>email: <a href=\"mailto:HMCTSforms@justice.gov.uk\"> HMCTSforms@justice.gov.uk</a></li>\n <li>call: +44 (0) 300 123 1711</li>\n <li>contact your service representative</li>\n</ul>\n\n<p class=\"govuk-body\">We\u2019ll consider your request and get back to you in 10 working days.</p>\n\n<h2 class=\"govuk-heading-l\" id=\"Reporting-accessibility-problems-with-this-website\">Reporting accessibility problems\n with this website</h2>\n\n<p class=\"govuk-body\">We\u2019re always looking to improve the accessibility of this website. If you find any problems not\n listed on this page or think we\u2019re not meeting accessibility requirements, contact:</p>\n\n<ul class=\"govuk-list govuk-list--bullet\">\n <li>email: <a href=\"mailto:customer.service@justice.gov.uk\"> customer.service@justice.gov.uk</a></li>\n <li>telephone: +44 (0) 300 123 1711</li>\n</ul>\n\n<h2 class=\"govuk-heading-l\" id=\"Enforcement-procedure \">Enforcement procedure</h2>\n\n<p class=\"govuk-body\">The Equality and Human Rights Commission (EHRC) is responsible for enforcing the Public Sector\n Bodies (Websites and Mobile Applications) (No. 2) Accessibility Regulations 2018 (the \u2018accessibility\n regulations\u2019). </p>\n\n<p class=\"govuk-body\">If you\u2019re not happy with how we respond to your complaint, <a rel=\"noopener noreferrer\"\n target=\"_blank\"\n href=\"https://www.equalityadvisoryservice.com/\">contact\n the Equality Advisory and Support Service (EASS).</a></p>\n\n<h1 class=\"govuk-heading-l\" id=\"Contacting-us-by-phone-or-visiting-us-in-person\">Contacting us by phone or visiting us\n in person</h1>\n\n<p class=\"govuk-body\">We provide a text relay service for people who are D/deaf, hearing impaired or have a speech\n impediment.</p>\n\n<p class=\"govuk-body\">Our offices and tribunal venues have audio induction loops, or if you contact us before your visit\n we can arrange a British Sign Language (BSL) interpreter. You can also request step-free access or a foreign language\n interpreter.</p>\n\n<p class=\"govuk-body\">If you have a question about accessibility in our Tribunal venues, you can contact the First-tier\n Tribunal enquiry line: +44 (0) 300 123 1711. You can <a target=\"_blank\"\n href=\"https://courttribunalfinder.service.gov.uk/search/\">find\n the contact details for court and tribunal venues</a>. </p>\n\n<p class=\"govuk-body\">You can also contact your service representative for more information.</p>\n\n<h1 class=\"govuk-heading-l\" id=\"Technical-information-about-this-website\u2019s-accessibility\">Technical information about\n this website\u2019s accessibility</h1>\n\n<p class=\"govuk-body\">HMCTS is committed to making its website accessible, in accordance with the Public Sector Bodies\n (Websites and Mobile Applications) (No.2) Accessibility Regulations 2018.</p>\n\n<p class=\"govuk-body\">This website is partially compliant with the <a rel=\"noopener noreferrer\" target=\"_blank\"\n href=\"https://www.w3.org/TR/WCAG21/\">Web Content\n Accessibility Guidelines version 2.1</a>, due to the non-compliances listed below.</p>\n\n<h1 class=\"govuk-heading-l\" id=\"Non-accessible-content\">Non-accessible content </h1>\n\n<p class=\"govuk-body\">The content listed below is non-compliant for the following reasons.</p>\n\n<h2 class=\"govuk-heading-l\" id=\"Non-compliance-with-the-accessibility-regulations\">Non-compliance with the accessibility\n regulations</h2>\n\n<p class=\"govuk-body\">Some pages cannot be navigated completely using just a keyboard, so some people won\u2019t be able to\n tab through the pages. This fails WCAG 2.1 success criterion 2.1 (keyboard accessible).</p>\n\n<p class=\"govuk-body\">Some pages can\u2019t be listened to in full using a screen reader, so some people won\u2019t be able to\n access the information. This fails WCAG 2.1 success criterion 1.2.5 (audio description \u2013 prerecorded).</p>\n\n<p class=\"govuk-body\">Some of the contrast ratios don\u2019t meet the current accessibility requirements. This fails WCAG 2.1\n success criterion 1.4.3 (contrast \u2013 minimum).</p>\n\n<h3 class=\"govuk-heading-m\" id=\"immigration\">Immigration and Asylum</h3>\n\n<p class=\"govuk-body\">Some of the images on the service include text and are not accessible for some low vision users.\n We have identified a solution for this issue that we will implement as soon as possible.</p>\n\n<h3 class=\"govuk-heading-m\" id=\"family\">Family Public Law </h3>\n\n<ol class=\"govuk-list govuk-list--alpha\">\n <li>The navigation system used in family public law cannot be rendered well by screen readers, so features can\u2019t be\n listened to in full\n </li>\n <li>Some essential functions within the family public law digital service cannot be accessed properly using screen\n readers\n </li>\n <li>Some complex forms within the service will not be rendered correctly or cannot be listened to by screen readers\n </li>\n</ol>\n\n<h2 class=\"govuk-heading-m\" id=\"Disproportionate burden \">Disproportionate burden </h2>\n\n<p class=\"govuk-body\">For Manage organisation, Register organisation, Approve organisations and Manage cases, we found\n the following issues that are currently being triaged to find out if there is a disproportionate burden:</p>\n\n<ol class=\"govuk-list govuk-list--alpha\">\n <li>Screen readers can\u2019t switch between headers, read content in tabs and buttons</li>\n <li>Screen readers can\u2019t tab between radio buttons, read links or content</li>\n <li>Colour contrast ratios uneven between page background and content</li>\n <li>Some labels, fields, error messages and other content can\u2019t be clearly identified by screen readers and voice\n activation software\n </li>\n <li>Some page headings and titles don\u2019t follow a logical structure for screen readers</li>\n <li>The navigation of some pages isn\u2019t clear</li>\n <li>Some headings, links and button labels aren\u2019t clearly descriptive</li>\n</ol>\n\n<h2 class=\"govuk-heading-m\" id=\"Content-that\u2019s-not-within-the-scope-of-the-accessibility-regulations\">Content that\u2019s not\n within the scope of the accessibility regulations </h2>\n\n<p class=\"govuk-body\">PDFs, documents and attachments to email notifications published before 23 September 2018 may not\n meet accessibility standards. For example, they may not be structured so they\u2019re accessible to a screen reader.</p>\n\n<p class=\"govuk-body\">Any new PDFs or Word documents we publish will meet accessibility standards.</p>\n\n<h1 class=\"govuk-heading-l\" id=\"what-to-improve-accessibility\">What we\u2019re doing to improve accessibility</h1>\n\n<p class=\"govuk-body\">We\u2019re committed to ensuring our services are accessible to all our users and that they comply with\n level AA of the Web Content Accessibility Guidelines \u2013 WCAG 2.1.</p>\n\n<p class=\"govuk-body\">We\u2019re actively working to improve the identified issues and make them AA-compliant by 23 September\n 2020. We\u2019re also continuing to improve all other AAA-level accessibility issues as we iterate the service.</p>\n\n<h1 class=\"govuk-heading-l\" id=\"preparation-of-this-accessibility-statement\">Preparation of this accessibility\n statement</h1>\n\n<p class=\"govuk-body\">This statement was prepared on 16 September 2019. It was last reviewed on 16 September 2020.</p>\n\n<p class=\"govuk-body\">This website was last tested on 19 May 2020. The test was carried out by the <a target=\"_blank\"\n href=\"https://digitalaccessibilitycentre.org/\">Digital\n Accessibility Centre (DAC)</a>.</p>\n",
31
+ template: "<h1 class=\"govuk-heading-xl\" id=\"Accessibility-statement-for-Expert-UI\">Accessibility statement for Expert UI</h1>\n\n<ul class=\"govuk-list\">\n <li><a href=\"accessibility#immigration\">Immigration and Asylum</a></li>\n <li><a href=\"accessibility#family\">Family Public Law </a></li>\n</ul>\n\n<p class=\"govuk-body\">This website is run by HM Courts & Tribunals Service. We want as many people as possible to be\n able to use this website. For example, you should be able to:</p>\n\n<ul class=\"govuk-list govuk-list--bullet\">\n <li>change colours, contrast levels and fonts</li>\n <li>zoom in up to 300% without the text spilling off the screen</li>\n <li>navigate most of the website using just a keyboard</li>\n <li>navigate most of the website using speech recognition software</li>\n <li>listen to most of the website using a screen reader (including the most recent versions of JAWS, NVDA and\n VoiceOver)\n </li>\n</ul>\n\n<p class=\"govuk-body\">We\u2019ve also made the website text as simple as possible to understand.</p>\n\n<p class=\"govuk-body\"><a rel=\"noopener noreferrer\" target=\"_blank\" href=\"https://mcmw.abilitynet.org.uk/\">AbilityNet</a>\n has advice on making your device easier to use if you have a disability.</p>\n\n<h2 class=\"govuk-heading-l\" id=\"How-accessible-this-website-is\">How accessible this website is</h2>\n\n<p class=\"govuk-body\">We know some parts of the website are not fully accessible:</p>\n\n<ul class=\"govuk-list govuk-list--bullet\">\n <li>some pages are difficult to navigate using just a keyboard</li>\n <li>some pages can\u2019t be listened to in full using a screen reader</li>\n <li>some pages have problems with colour contrasts between text and background</li>\n <li>some PDFs may not be fully accessible to a screen reader</li>\n</ul>\n\n<h2 class=\"govuk-heading-l\" id=\"What-to-do-if-you-cannot-access-parts-of-this-website\">Feedback and contact\n information</h2>\n\n<p class=\"govuk-body\">If you need information on this website in a different format like accessible PDF, large print,\n easy read, audio recording or braille, you can:</p>\n\n<ul class=\"govuk-list govuk-list--bullet\">\n <li>email: <a href=\"mailto:HMCTSforms@justice.gov.uk\"> HMCTSforms@justice.gov.uk</a></li>\n <li>call: +44 (0) 300 123 1711</li>\n <li>contact your service representative</li>\n</ul>\n\n<p class=\"govuk-body\">We\u2019ll consider your request and get back to you in 10 working days.</p>\n\n<h2 class=\"govuk-heading-l\" id=\"Reporting-accessibility-problems-with-this-website\">Reporting accessibility problems\n with this website</h2>\n\n<p class=\"govuk-body\">We\u2019re always looking to improve the accessibility of this website. If you find any problems not\n listed on this page or think we\u2019re not meeting accessibility requirements, contact:</p>\n\n<ul class=\"govuk-list govuk-list--bullet\">\n <li>email: <a href=\"mailto:customer.service@justice.gov.uk\"> customer.service@justice.gov.uk</a></li>\n <li>telephone: +44 (0) 300 123 1711</li>\n</ul>\n\n<h2 class=\"govuk-heading-l\" id=\"Enforcement-procedure \">Enforcement procedure</h2>\n\n<p class=\"govuk-body\">The Equality and Human Rights Commission (EHRC) is responsible for enforcing the Public Sector\n Bodies (Websites and Mobile Applications) (No. 2) Accessibility Regulations 2018 (the \u2018accessibility\n regulations\u2019). </p>\n\n<p class=\"govuk-body\">If you\u2019re not happy with how we respond to your complaint, <a rel=\"noopener noreferrer\"\n target=\"_blank\"\n href=\"https://www.equalityadvisoryservice.com/\">contact\n the Equality Advisory and Support Service (EASS).</a></p>\n\n<h1 class=\"govuk-heading-l\" id=\"Contacting-us-by-phone-or-visiting-us-in-person\">Contacting us by phone or visiting us\n in person</h1>\n\n<p class=\"govuk-body\">We provide a text relay service for people who are D/deaf, hearing impaired or have a speech\n impediment.</p>\n\n<p class=\"govuk-body\">Our offices and tribunal venues have audio induction loops, or if you contact us before your visit\n we can arrange a British Sign Language (BSL) interpreter. You can also request step-free access or a foreign language\n interpreter.</p>\n\n<p class=\"govuk-body\">If you have a question about accessibility in our Tribunal venues, you can contact the First-tier\n Tribunal enquiry line: +44 (0) 300 123 1711. You can <a target=\"_blank\"\n href=\"https://courttribunalfinder.service.gov.uk/search/\">find\n the contact details for court and tribunal venues</a>. </p>\n\n<p class=\"govuk-body\">You can also contact your service representative for more information.</p>\n\n<h1 class=\"govuk-heading-l\" id=\"Technical-information-about-this-website\u2019s-accessibility\">Technical information about\n this website\u2019s accessibility</h1>\n\n<p class=\"govuk-body\">HMCTS is committed to making its website accessible, in accordance with the Public Sector Bodies\n (Websites and Mobile Applications) (No.2) Accessibility Regulations 2018.</p>\n\n<p class=\"govuk-body\">This website is partially compliant with the <a rel=\"noopener noreferrer\" target=\"_blank\"\n href=\"https://www.w3.org/TR/WCAG21/\">Web Content\n Accessibility Guidelines version 2.1</a>, due to the non-compliances listed below.</p>\n\n<h1 class=\"govuk-heading-l\" id=\"Non-accessible-content\">Non-accessible content </h1>\n\n<p class=\"govuk-body\">The content listed below is non-compliant for the following reasons.</p>\n\n<h2 class=\"govuk-heading-l\" id=\"Non-compliance-with-the-accessibility-regulations\">Non-compliance with the accessibility\n regulations</h2>\n\n<p class=\"govuk-body\">Some pages cannot be navigated completely using just a keyboard, so some people won\u2019t be able to\n tab through the pages. This fails WCAG 2.1 success criterion 2.1 (keyboard accessible).</p>\n\n<p class=\"govuk-body\">Some pages can\u2019t be listened to in full using a screen reader, so some people won\u2019t be able to\n access the information. This fails WCAG 2.1 success criterion 1.2.5 (audio description \u2013 prerecorded).</p>\n\n<p class=\"govuk-body\">Some of the contrast ratios don\u2019t meet the current accessibility requirements. This fails WCAG 2.1\n success criterion 1.4.3 (contrast \u2013 minimum).</p>\n\n<h3 class=\"govuk-heading-m\" id=\"immigration\">Immigration and Asylum</h3>\n\n<p class=\"govuk-body\">Some of the images on the service include text and are not accessible for some low vision users.\n We have identified a solution for this issue that we will implement as soon as possible.</p>\n\n<h3 class=\"govuk-heading-m\" id=\"family\">Family Public Law </h3>\n\n<ol class=\"govuk-list govuk-list--alpha\">\n <li>The navigation system used in family public law cannot be rendered well by screen readers, so features can\u2019t be\n listened to in full\n </li>\n <li>Some essential functions within the family public law digital service cannot be accessed properly using screen\n readers\n </li>\n <li>Some complex forms within the service will not be rendered correctly or cannot be listened to by screen readers\n </li>\n</ol>\n\n<h2 class=\"govuk-heading-m\" id=\"Disproportionate burden \">Disproportionate burden </h2>\n\n<p class=\"govuk-body\">For Manage organisation, Register organisation, Approve organisations and Manage cases, we found\n the following issues that are currently being triaged to find out if there is a disproportionate burden:</p>\n\n<ol class=\"govuk-list govuk-list--alpha\">\n <li>Screen readers can\u2019t switch between headers, read content in tabs and buttons</li>\n <li>Screen readers can\u2019t tab between radio buttons, read links or content</li>\n <li>Colour contrast ratios uneven between page background and content</li>\n <li>Some labels, fields, error messages and other content can\u2019t be clearly identified by screen readers and voice\n activation software\n </li>\n <li>Some page headings and titles don\u2019t follow a logical structure for screen readers</li>\n <li>The navigation of some pages isn\u2019t clear</li>\n <li>Some headings, links and button labels aren\u2019t clearly descriptive</li>\n</ol>\n\n<h2 class=\"govuk-heading-m\" id=\"Content-that\u2019s-not-within-the-scope-of-the-accessibility-regulations\">Content that\u2019s not\n within the scope of the accessibility regulations </h2>\n\n<p class=\"govuk-body\">PDFs, documents and attachments to email notifications published before 23 September 2018 may not\n meet accessibility standards. For example, they may not be structured so they\u2019re accessible to a screen reader.</p>\n\n<p class=\"govuk-body\">Any new PDFs or Word documents we publish will meet accessibility standards.</p>\n\n<h1 class=\"govuk-heading-l\" id=\"what-to-improve-accessibility\">What we\u2019re doing to improve accessibility</h1>\n\n<p class=\"govuk-body\">We\u2019re committed to ensuring our services are accessible to all our users and that they comply with\n level AA of the Web Content Accessibility Guidelines \u2013 WCAG 2.1.</p>\n\n<p class=\"govuk-body\">We\u2019re actively working to improve the identified issues and make them AA-compliant by 23 September\n 2020. We\u2019re also continuing to improve all other AAA-level accessibility issues as we iterate the service.</p>\n\n<h1 class=\"govuk-heading-l\" id=\"preparation-of-this-accessibility-statement\">Preparation of this accessibility\n statement</h1>\n\n<p class=\"govuk-body\">This statement was prepared on 16 September 2019. It was last reviewed on 16 September 2020.</p>\n\n<p class=\"govuk-body\">This website was last tested on 19 May 2020. The test was carried out by the <a target=\"_blank\"\n href=\"https://digitalaccessibilitycentre.org/\">Digital\n Accessibility Centre (DAC)</a>.</p>\n\n<h3 class=\"govuk-heading-m\">Family Private Law:</h3>\n\n<p class=\"govuk-body\">This service has not yet been tested for accessibility issues. In the future, we will conduct an\n accessibility audit in order to find out if there are any accessibility issues. The accessibility statement will be\n updated with any relevant changes that we find.</p>\n\n<p class=\"govuk-body\">If there are any issues with accessing information or using this website please contact:</p>\n\n<ol class=\"govuk-list govuk-list--bullet\">\n <li>Nicola Whitcher - 02380 384324</li>\n <li>Hannah Townley - 02380 384313</li>\n</ol>",
32
32
  styles: [".govuk-list--alpha{padding-left:20px;list-style-type:lower-alpha}"]
33
33
  },] }
34
34
  ];
@@ -628,16 +628,22 @@ class GenericFilterComponent {
628
628
  else if (hasSelectAllOption && !allChecked && isChecked && isAllCheckedExcludingTheSelectAllOption) {
629
629
  formArray.controls[index].patchValue(true);
630
630
  }
631
- return;
632
631
  }
633
- formArray.controls.forEach((control) => {
634
- if (isChecked) {
635
- control.patchValue(true);
636
- }
637
- else {
638
- control.patchValue(false);
632
+ else {
633
+ formArray.controls.forEach((control) => {
634
+ if (isChecked) {
635
+ control.patchValue(true);
636
+ }
637
+ else {
638
+ control.patchValue(false);
639
+ }
640
+ });
641
+ }
642
+ if (field.changeResetFields && field.changeResetFields.length) {
643
+ for (const resetField of field.changeResetFields) {
644
+ this.resetField(resetField, form);
639
645
  }
640
- });
646
+ }
641
647
  }
642
648
  resetField(resetField, form) {
643
649
  const control = form.get(resetField);
@@ -790,7 +796,7 @@ class GenericFilterComponent {
790
796
  GenericFilterComponent.decorators = [
791
797
  { type: Component, args: [{
792
798
  selector: 'xuilib-generic-filter',
793
- template: "<form [formGroup]=\"form\" (ngSubmit)=\"applyFilter(form)\">\n <div class=\"contain-classes\" *ngFor=\"let field of config.fields\">\n <hr *ngIf=\"field.lineBreakBefore\" class=\"govuk-section-break govuk-section-break--visible elevated-break\">\n <div class=\"govuk-form-group xui-generic-filter\"\n [hidden]=\"hidden(field, form)\"\n [id]=\"field.name\"\n [ngClass]=\"{'form-group-error': submitted && (form.get(field.name).errors?.minLength || form.get(field.name).errors?.maxLength)}\">\n <h3 *ngIf=\"field.title\" class=\"govuk-heading-s\">{{field.title}}</h3>\n <p class=\"govuk-body\" *ngIf=\"field.subTitle\">{{field.subTitle}}</p>\n <span [id]=\"field.name + '-error'\" class=\"govuk-error-message\" *ngIf=\"field.displayMinSelectedError && submitted && form.get(field.name).errors?.minLength\">\n <span class=\"govuk-visually-hidden\">Error:</span> {{field.minSelectedError}}\n </span>\n <span [id]=\"field.name + '-error'\" class=\"govuk-error-message\" *ngIf=\"field.displayMaxSelectedError && submitted && form.get(field.name).errors?.maxLength\">\n <span class=\"govuk-visually-hidden\">Error:</span> {{field.maxSelectedError}}\n </span>\n <div class=\"govuk-body\" [ngSwitch]=\"field.type\">\n <ng-container *ngSwitchCase=\"'select'\">\n <select class=\"govuk-select\" (change)=\"fieldChanged(field, form)\" [attr.disabled]=\"disabled(field, form)\" [name]=\"'select_' + field.name\" [id]=\"'select_' + field.name\" [formControlName]=\"field.name\">\n <option disabled selected hidden value=\"\">{{field.disabledText}}</option>\n <option class=\"govuk-radios__item\" *ngFor=\"let item of field.options\" [value]=\"item.key\">{{item.label}}</option>\n </select>\n </ng-container>\n <ng-container *ngSwitchCase=\"'checkbox'\">\n <div class=\"govuk-checkboxes govuk-checkboxes--small\" [formGroupName]=\"field.name\" [attr.field]=\"field.name\" [id]=\"'checkbox_' + field.name\">\n <div *ngFor=\"let item of field.options; let i = index\" class=\"govuk-checkboxes__item\">\n <input type=\"checkbox\" class=\"govuk-checkboxes__input\"\n [attr.disabled]=\"disabled(field, form)\"\n [formControlName]=\"i\"\n (change)=\"toggleSelectAll($event, form, item, field)\"\n [value]=\"item.key\" [id]=\"'checkbox_' + item.key\"\n [name]=\"'checkbox_' + item.key\"\n />\n <label\n [for]=\"'checkbox_' + item.key\"\n class=\"govuk-label govuk-checkboxes__label\"\n [ngClass]=\"{'govuk-!-font-weight-bold': item.selectAll}\"\n >{{item.label}}</label>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'checkbox-large'\">\n <div class=\"govuk-checkboxes\" [formGroupName]=\"field.name\" [attr.field]=\"field.name\" [id]=\"'checkbox_' + field.name\">\n <div *ngFor=\"let item of field.options; let i = index\" class=\"govuk-checkboxes__item\">\n <input type=\"checkbox\" class=\"govuk-checkboxes__input\"\n [attr.disabled]=\"disabled(field, form)\"\n [formControlName]=\"i\"\n (change)=\"toggleSelectAll($event, form, item, field)\"\n [value]=\"item.key\" [id]=\"'checkbox_' + item.key\"\n [name]=\"'checkbox_' + item.key\"\n />\n <label\n [for]=\"'checkbox_' + item.key\"\n class=\"govuk-label govuk-checkboxes__label\"\n [ngClass]=\"{'govuk-!-font-weight-bold': item.selectAll}\"\n >{{item.label}}</label>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'radio'\">\n <div class=\"govuk-radios\">\n <div *ngFor=\"let item of field.options\" class=\"govuk-radios__item\">\n <input type=\"radio\"\n [formControlName]=\"field.name\"\n [id]=\"'radio_' + item.key\"\n [attr.disabled]=\"disabled(field, form)\"\n [checked]=\"item.key === form.get(field.name).value\"\n class=\"govuk-radios__input\"\n [value]=\"item.key\"\n (change)=\"fieldChanged(field, form)\"\n />\n <label [for]=\"'radio_' + item.key\" class=\"govuk-label govuk-radios__label\">{{item.label}}</label>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'find-person'\">\n <xuilib-find-person subTitle=\"\" (personSelected)=\"updatePersonControls($event, field)\"\n (personFieldChanged)=\"inputChanged(field)\"\n [submitted]=\"submitted\"\n [disabled]=\"disabled(field, form)\"\n [domain]=\"form.get(field.domainField)?.value\"\n [findPersonGroup]=\"form\"\n [selectedPerson]=\"form.get(field.name)?.value?.email\"\n [userIncluded]=\"false\"\n ></xuilib-find-person>\n </ng-container>\n <ng-container *ngSwitchCase=\"'find-location'\">\n <xuilib-find-location (locationFieldChanged)=\"inputChanged(field)\"\n [form]=\"form\"\n [fields]=\"config.fields\"\n [locationTitle]=\"field.locationTitle\"\n [enableAddLocationButton]=\"field.enableAddLocationButton\"\n [disabled]=\"disabled(field, form)\"\n [disableInputField]=\"field.disable\"\n [selectedLocations]=\"form.get(field.name)?.value\"\n [submitted]=\"submitted\"\n [services]=\"form.get(field.findLocationField)?.value\"\n [field]=\"field\"\n ></xuilib-find-location>\n </ng-container>\n </div>\n </div>\n </div>\n <hr class=\"govuk-section-break govuk-section-break--m govuk-section-break--visible\"/>\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-full\">\n <button\n class=\"govuk-button govuk-!-margin-right-1 govuk-!-margin-bottom-0\"\n type=\"submit\"\n id=\"applyFilter\"\n [disabled]=\"config.enableDisabledButton && form.invalid\"\n >{{config.applyButtonText || 'Apply'}}</button>\n <button *ngIf=\"config.showCancelFilterButton\"\n class=\"govuk-button govuk-button--secondary govuk-!-margin-bottom-0\"\n type=\"button\"\n id=\"cancelFilter\"\n (click)=\"cancelFilter()\">{{ config.cancelButtonText || 'Cancel'}}</button>\n </div>\n </div>\n</form>\n",
799
+ template: "<form [formGroup]=\"form\" (ngSubmit)=\"applyFilter(form)\">\n <div class=\"contain-classes\" *ngFor=\"let field of config.fields\">\n <hr *ngIf=\"field.lineBreakBefore\" class=\"govuk-section-break govuk-section-break--visible elevated-break\">\n <div class=\"govuk-form-group xui-generic-filter\"\n [hidden]=\"hidden(field, form)\"\n [id]=\"field.name\"\n [ngClass]=\"{'form-group-error': submitted && (form.get(field.name).errors?.minLength || form.get(field.name).errors?.maxLength)}\">\n <h3 *ngIf=\"field.title\" class=\"govuk-heading-s\">{{field.title}}</h3>\n <p class=\"govuk-body\" *ngIf=\"field.subTitle\">{{field.subTitle}}</p>\n <span [id]=\"field.name + '-error'\" class=\"govuk-error-message\" *ngIf=\"field.displayMinSelectedError && submitted && form.get(field.name).errors?.minLength\">\n <span class=\"govuk-visually-hidden\">Error:</span> {{field.minSelectedError}}\n </span>\n <span [id]=\"field.name + '-error'\" class=\"govuk-error-message\" *ngIf=\"field.displayMaxSelectedError && submitted && form.get(field.name).errors?.maxLength\">\n <span class=\"govuk-visually-hidden\">Error:</span> {{field.maxSelectedError}}\n </span>\n <div class=\"govuk-body\" [ngSwitch]=\"field.type\">\n <ng-container *ngSwitchCase=\"'select'\">\n <select class=\"govuk-select\" (change)=\"fieldChanged(field, form)\" [attr.disabled]=\"disabled(field, form)\" [name]=\"'select_' + field.name\" [id]=\"'select_' + field.name\" [formControlName]=\"field.name\">\n <option disabled selected hidden value=\"\">{{field.disabledText}}</option>\n <option class=\"govuk-radios__item\" *ngFor=\"let item of field.options\" [value]=\"item.key\">{{item.label}}</option>\n </select>\n </ng-container>\n <ng-container *ngSwitchCase=\"'checkbox'\">\n <div class=\"govuk-checkboxes govuk-checkboxes--small\" [formGroupName]=\"field.name\" [attr.field]=\"field.name\" [id]=\"'checkbox_' + field.name\">\n <div *ngFor=\"let item of field.options; let i = index\" class=\"govuk-checkboxes__item\">\n <input type=\"checkbox\" class=\"govuk-checkboxes__input\"\n [attr.disabled]=\"disabled(field, form)\"\n [formControlName]=\"i\"\n (change)=\"toggleSelectAll($event, form, item, field)\"\n [value]=\"item.key\" [id]=\"'checkbox_' + item.key\"\n [name]=\"'checkbox_' + item.key\"\n />\n <label\n [for]=\"'checkbox_' + item.key\"\n class=\"govuk-label govuk-checkboxes__label\"\n [ngClass]=\"{'govuk-!-font-weight-bold': item.selectAll}\"\n >{{item.label}}</label>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'checkbox-large'\">\n <div class=\"govuk-checkboxes\" [formGroupName]=\"field.name\" [attr.field]=\"field.name\" [id]=\"'checkbox_' + field.name\">\n <div *ngFor=\"let item of field.options; let i = index\" class=\"govuk-checkboxes__item\">\n <input type=\"checkbox\" class=\"govuk-checkboxes__input\"\n [attr.disabled]=\"disabled(field, form)\"\n [formControlName]=\"i\"\n (change)=\"toggleSelectAll($event, form, item, field)\"\n [value]=\"item.key\" [id]=\"'checkbox_' + item.key\"\n [name]=\"'checkbox_' + item.key\"\n />\n <label\n [for]=\"'checkbox_' + item.key\"\n class=\"govuk-label govuk-checkboxes__label\"\n [ngClass]=\"{'govuk-!-font-weight-bold': item.selectAll}\"\n >{{item.label}}</label>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'radio'\">\n <div class=\"govuk-radios\">\n <div *ngFor=\"let item of field.options\" class=\"govuk-radios__item\">\n <input type=\"radio\"\n [formControlName]=\"field.name\"\n [id]=\"'radio_' + item.key\"\n [attr.disabled]=\"disabled(field, form)\"\n [checked]=\"item.key === form.get(field.name).value\"\n class=\"govuk-radios__input\"\n [value]=\"item.key\"\n (change)=\"fieldChanged(field, form)\"\n />\n <label [for]=\"'radio_' + item.key\" class=\"govuk-label govuk-radios__label\">{{item.label}}</label>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'find-person'\">\n <xuilib-find-person subTitle=\"\" (personSelected)=\"updatePersonControls($event, field)\"\n (personFieldChanged)=\"inputChanged(field)\"\n [submitted]=\"submitted\"\n [disabled]=\"disabled(field, form)\"\n [domain]=\"form.get(field.domainField)?.value\"\n [findPersonGroup]=\"form\"\n [selectedPerson]=\"form.get(field.name)?.value?.email\"\n [userIncluded]=\"false\"\n ></xuilib-find-person>\n </ng-container>\n <ng-container *ngSwitchCase=\"'find-location'\">\n <xuilib-find-location (locationFieldChanged)=\"inputChanged(field)\"\n [form]=\"form\"\n [fields]=\"config.fields\"\n [locationTitle]=\"field.locationTitle\"\n [enableAddLocationButton]=\"field.enableAddButton\"\n [disabled]=\"disabled(field, form)\"\n [disableInputField]=\"field.disable\"\n [selectedLocations]=\"form.get(field.name)?.value\"\n [submitted]=\"submitted\"\n [services]=\"form.get(field.findLocationField)?.value\"\n [field]=\"field\"\n ></xuilib-find-location>\n </ng-container>\n <ng-container *ngSwitchCase=\"'find-service'\">\n <xuilib-find-service (serviceFieldChanged)=\"inputChanged(field)\"\n [form]=\"form\"\n [fields]=\"config.fields\"\n [title]=\"field.title\"\n [enableAddServiceButton]=\"field.enableAddButton\"\n [disabled]=\"disabled(field, form)\"\n [disableInputField]=\"field.disable\"\n [selectedServices]=\"form.get(field.name)?.value\" \n [field]=\"field\"\n ></xuilib-find-service>\n </ng-container>\n </div>\n </div>\n </div>\n <hr class=\"govuk-section-break govuk-section-break--m govuk-section-break--visible\"/>\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-full\">\n <button\n class=\"govuk-button govuk-!-margin-right-1 govuk-!-margin-bottom-0\"\n type=\"submit\"\n id=\"applyFilter\"\n [disabled]=\"config.enableDisabledButton && form.invalid\"\n >{{config.applyButtonText || 'Apply'}}</button>\n <button *ngIf=\"config.showCancelFilterButton\"\n class=\"govuk-button govuk-button--secondary govuk-!-margin-bottom-0\"\n type=\"button\"\n id=\"cancelFilter\"\n (click)=\"cancelFilter()\">{{ config.cancelButtonText || 'Cancel'}}</button>\n </div>\n </div>\n</form>\n",
794
800
  changeDetection: ChangeDetectionStrategy.OnPush,
795
801
  encapsulation: ViewEncapsulation.None,
796
802
  styles: [".contain-classes .elevated-break{position:relative;top:-10px}.contain-classes .xui-generic-filter .select-all{margin-bottom:10px}.contain-classes .xui-generic-filter .govuk-checkboxes{display:flex;flex-wrap:wrap}.contain-classes .xui-generic-filter .govuk-checkboxes>div{flex-grow:1;flex-shrink:0}"]
@@ -944,23 +950,35 @@ class CaseSharingStateService {
944
950
  this.subject.next(newSharedCases);
945
951
  return newSharedCases;
946
952
  }
947
- requestUnshare(caseId, user) {
953
+ requestUnshare(user, caseId) {
948
954
  const newSharedCases = [];
949
955
  for (const sharedCase of this.caseState) {
950
- if (sharedCase.caseId === caseId) {
956
+ // If no caseId, then request unshare from all shared cases
957
+ if (caseId === undefined || sharedCase.caseId === caseId) {
951
958
  if (!sharedCase.pendingUnshares) {
952
959
  sharedCase.pendingUnshares = [];
953
960
  }
954
961
  const newPendingUnshares = sharedCase.pendingUnshares.slice();
955
- if (newPendingUnshares) {
962
+ // If the user is pending shared access, just remove them from pendingShares
963
+ let newPendingShares;
964
+ let indexOfPreviouslyAddedUser = -1;
965
+ if (sharedCase.pendingShares) {
966
+ indexOfPreviouslyAddedUser = sharedCase.pendingShares.findIndex(u => u.idamId === user.idamId);
967
+ if (indexOfPreviouslyAddedUser > -1) {
968
+ newPendingShares = sharedCase.pendingShares.slice();
969
+ newPendingShares.splice(indexOfPreviouslyAddedUser, 1);
970
+ }
971
+ }
972
+ // If the user does not exist in pendingShares, and already has shared access (i.e. exists in sharedWith),
973
+ // request removal of shared access
974
+ if (indexOfPreviouslyAddedUser === -1 && sharedCase.sharedWith && sharedCase.sharedWith.findIndex(u => u.idamId === user.idamId) > -1) {
956
975
  if (!newPendingUnshares.some(u => u.email === user.email)) {
957
976
  newPendingUnshares.push(user);
958
977
  }
959
978
  }
960
- else {
961
- newPendingUnshares.push(user);
962
- }
963
- const newSharedCase = Object.assign(Object.assign({}, sharedCase), { pendingUnshares: newPendingUnshares });
979
+ const newSharedCase = Object.assign(Object.assign(Object.assign({}, sharedCase), { pendingUnshares: newPendingUnshares }), (newPendingShares && {
980
+ pendingShares: newPendingShares
981
+ }));
964
982
  newSharedCases.push(newSharedCase);
965
983
  }
966
984
  else {
@@ -968,7 +986,7 @@ class CaseSharingStateService {
968
986
  }
969
987
  }
970
988
  this.subject.next(newSharedCases);
971
- return;
989
+ return newSharedCases;
972
990
  }
973
991
  requestCancel(caseId, user) {
974
992
  const newSharedCases = [];
@@ -1005,11 +1023,13 @@ class CaseSharingStateService {
1005
1023
  return;
1006
1024
  }
1007
1025
  removeCase(caseId) {
1008
- for (let i = 0, l = this.caseState.length; i < l; i++) {
1009
- if (this.caseState[i].caseId === caseId) {
1010
- this.caseState.splice(i, 1);
1011
- this.subject.next(this.caseState);
1012
- return;
1026
+ if (this.caseState.length > 1) {
1027
+ for (let i = 0, l = this.caseState.length; i < l; i++) {
1028
+ if (this.caseState[i].caseId === caseId) {
1029
+ this.caseState.splice(i, 1);
1030
+ this.subject.next(this.caseState);
1031
+ return;
1032
+ }
1013
1033
  }
1014
1034
  }
1015
1035
  }
@@ -1055,7 +1075,7 @@ class SelectedCaseConfirmComponent {
1055
1075
  SelectedCaseConfirmComponent.decorators = [
1056
1076
  { type: Component, args: [{
1057
1077
  selector: 'xuilib-selected-case-confirm',
1058
- template: "<div id=\"user-access-block-{{ sharedCase.caseId }}\" *ngIf=\"showUserAccessBlock()\">\n <h2 class=\"govuk-heading-m case-share-confirm__title\">{{ sharedCase.caseTitle }}</h2>\n <div class=\"case-share-confirm__caption-area\">\n <div class=\"govuk-caption-m case-share-confirm__caption\">\n {{ sharedCase.caseId }}\n </div>\n <a [routerLink]=\"changeLink\" class=\"case-share-confirm__change-link govuk-link govuk-!-font-size-19\">Change</a>\n </div>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header govuk-table-column-header\" scope=\"col\">Name</th>\n <th class=\"govuk-table__header govuk-table-column-header\" scope=\"col\">Email address</th>\n <th class=\"govuk-table__header govuk-table-column-actions\" scope=\"col\">Actions</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\" *ngFor=\"let user of sharedCase.pendingShares; trackBy: trackByUserId\">\n <td class=\"govuk-table__cell\">{{ user.firstName + ' ' + user.lastName }}</td>\n <td class=\"govuk-table__cell\">{{ user.email }}</td>\n <td class=\"govuk-table__cell\">\n <span class=\"hmcts-badge\">To be added</span>\n </td>\n </tr>\n <tr class=\"govuk-table__row\" *ngFor=\"let user of sharedCase.pendingUnshares; trackBy: trackByUserId\">\n <td class=\"govuk-table__cell\">{{ user.firstName + ' ' + user.lastName }}</td>\n <td class=\"govuk-table__cell\">{{ user.email }}</td>\n <td class=\"govuk-table__cell\">\n <span class=\"hmcts-badge hmcts-badge--red\">to be removed</span>\n </td>\n </tr>\n </tbody>\n </table>\n</div>\n",
1078
+ template: "<div id=\"user-access-block-{{ sharedCase.caseId }}\" *ngIf=\"showUserAccessBlock()\">\n <h2 class=\"govuk-heading-m case-share-confirm__title\">{{ sharedCase.caseTitle }}</h2>\n <div class=\"case-share-confirm__caption-area\">\n <div class=\"govuk-caption-m case-share-confirm__caption\">\n {{ sharedCase.caseId }}\n </div>\n <a [routerLink]=\"changeLink\" class=\"case-share-confirm__change-link govuk-link govuk-!-font-size-19\">Change</a>\n </div>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header govuk-table-column-header\" scope=\"col\">Name</th>\n <th class=\"govuk-table__header govuk-table-column-header\" scope=\"col\">Email address</th>\n <th class=\"govuk-table__header govuk-table-column-actions\" scope=\"col\">Actions</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\" *ngFor=\"let user of sharedCase.pendingShares; trackBy: trackByUserId\">\n <td class=\"govuk-table__cell\">{{ user.firstName + ' ' + user.lastName }}</td>\n <td class=\"govuk-table__cell\">{{ user.email }}</td>\n <td class=\"govuk-table__cell\">\n <span class=\"hmcts-badge\">To be added</span>\n </td>\n </tr>\n <tr class=\"govuk-table__row\" *ngFor=\"let user of sharedCase.pendingUnshares; trackBy: trackByUserId\">\n <td class=\"govuk-table__cell\">{{ user.firstName + ' ' + user.lastName }}</td>\n <td class=\"govuk-table__cell\">{{ user.email }}</td>\n <td class=\"govuk-table__cell\">\n <span class=\"hmcts-badge hmcts-badge--red\">To be removed</span>\n </td>\n </tr>\n </tbody>\n </table>\n</div>\n",
1059
1079
  styles: [".case-share-confirm__title{margin-bottom:0}.case-share-confirm__caption-area{border-bottom:1px solid #b1b4b6;padding-bottom:10px;display:inline-block;width:100%;clear:both}.case-share-confirm__caption{float:left}.case-share-confirm__change-link{float:right}.govuk-table-column-header{width:45%}.govuk-table-column-actions{width:10%}"]
1060
1080
  },] }
1061
1081
  ];
@@ -1078,10 +1098,14 @@ class SelectedCaseListComponent {
1078
1098
  }
1079
1099
  ngOnInit() {
1080
1100
  this.shareCases$ = this.stateService.state;
1081
- this.shareCases$.subscribe(shareCases => this.shareCases = shareCases);
1101
+ this.shareCases$.subscribe((shareCases) => {
1102
+ this.shareCases = shareCases;
1103
+ this.caseCount = this.shareCases.length;
1104
+ });
1082
1105
  }
1083
1106
  onUnselect(sharedCase) {
1084
1107
  this.unselect.emit(sharedCase);
1108
+ this.caseCount = this.shareCases.length;
1085
1109
  }
1086
1110
  onSynchronizeStore(event) {
1087
1111
  this.synchronizeStore.emit(event);
@@ -1093,7 +1117,7 @@ class SelectedCaseListComponent {
1093
1117
  SelectedCaseListComponent.decorators = [
1094
1118
  { type: Component, args: [{
1095
1119
  selector: 'xuilib-selected-case-list',
1096
- template: "<ng-container *ngIf=\"!toConfirm\">\n <xuilib-selected-case\n *ngFor=\"let sharedCase of (shareCases$ | async); trackBy: trackByCaseId\"\n [sharedCase]=\"sharedCase\"\n [removeUserFromCaseToggleOn]=\"removeUserFromCaseToggleOn\"\n (unselect)=\"onUnselect($event)\"\n (synchronizeStore)=\"onSynchronizeStore($event)\"\n >\n </xuilib-selected-case>\n</ng-container>\n\n<ng-container *ngIf=\"toConfirm\">\n <xuilib-selected-case-confirm\n *ngFor=\"let sharedCase of (shareCases$ | async); trackBy: trackByCaseId\"\n [sharedCase]=\"sharedCase\"\n [changeLink]=\"changeLink\">\n </xuilib-selected-case-confirm>\n</ng-container>\n",
1120
+ template: "<ng-container *ngIf=\"!toConfirm\">\n <xuilib-selected-case\n *ngFor=\"let sharedCase of (shareCases$ | async); trackBy: trackByCaseId\"\n [sharedCase]=\"sharedCase\"\n [caseCount]=\"caseCount\"\n [removeUserFromCaseToggleOn]=\"removeUserFromCaseToggleOn\"\n (unselect)=\"onUnselect($event)\"\n (synchronizeStore)=\"onSynchronizeStore($event)\"\n >\n </xuilib-selected-case>\n</ng-container>\n\n<ng-container *ngIf=\"toConfirm\">\n <xuilib-selected-case-confirm\n *ngFor=\"let sharedCase of (shareCases$ | async); trackBy: trackByCaseId\"\n [sharedCase]=\"sharedCase\"\n [changeLink]=\"changeLink\">\n </xuilib-selected-case-confirm>\n</ng-container>\n",
1097
1121
  styles: [""]
1098
1122
  },] }
1099
1123
  ];
@@ -1127,9 +1151,6 @@ class SelectedCaseComponent {
1127
1151
  this.combinedSortedShares = this.combineAndSortShares(sharedWith, pendingShares);
1128
1152
  }
1129
1153
  }
1130
- onUnselect() {
1131
- this.unselect.emit(this.sharedCase);
1132
- }
1133
1154
  onDeselect(c) {
1134
1155
  this.unselect.emit(c);
1135
1156
  }
@@ -1187,7 +1208,7 @@ class SelectedCaseComponent {
1187
1208
  }));
1188
1209
  }
1189
1210
  onRemove(user, sharedCase) {
1190
- this.stateService.requestUnshare(sharedCase.caseId, user);
1211
+ this.stateService.requestUnshare(user, sharedCase.caseId);
1191
1212
  this.synchronizeStore.emit(this.shareCases);
1192
1213
  }
1193
1214
  onCancel(user, sharedCase) {
@@ -1250,8 +1271,8 @@ class SelectedCaseComponent {
1250
1271
  SelectedCaseComponent.decorators = [
1251
1272
  { type: Component, args: [{
1252
1273
  selector: 'xuilib-selected-case',
1253
- template: "<div id=\"{{buildElementId('govuk-accordion__section')}}\" class=\"govuk-accordion__section\">\n <div class=\"govuk-grid-row govuk-case-header\">\n <div class=\"govuk-grid-column-three-quarters\">\n <h3 id=\"{{buildElementId('case-title')}}\" class=\"govuk-case-title\">{{ sharedCase.caseTitle }}</h3>\n <h1 id=\"{{buildElementId('case-id')}}\" class=\"govuk-case-sub-title\">{{ sharedCase.caseId }}</h1>\n </div>\n <div class=\"govuk-grid-column-twenty-percent\">\n <button id=\"{{buildElementId('btn-deselect-case')}}\" class=\"govuk-button hmcts-button--secondary\" (click)=\"onDeselect(sharedCase)\" title=\"Deselect case\">Deselect case</button>\n </div>\n <div class=\"govuk-accordion__section-header govuk-grid-column-five-percent\">\n <div class=\"govuk-accordion__section-heading\">\n <button type=\"button\" id=\"{{buildElementId('accordion-with-summary-sections-heading')}}\"\n aria-controls=\"accordion-with-summary-sections-content-1\" class=\"govuk-accordion__section-button\"\n aria-describedby=\"accordion-with-summary-sections-summary-1\" aria-expanded=\"false\" title=\"Expand or Collapse\">\n <span class=\"govuk-accordion__icon\" aria-hidden=\"true\"></span></button>\n </div>\n </div>\n </div>\n <div id=\"{{buildElementId('accordion-with-summary-sections-content')}}\" class=\"govuk-accordion__section-content\"\n aria-labelledby=\"buildElementId('accordion-with-summary-sections-heading')\" >\n <div class=\"govuk-grid-row\" *ngIf=\"showNoUsersAccessInfo()\">\n <span id=\"{{buildElementId('access-info-no-user')}}\" class=\"govuk-div-align-left\">No users from your organisation currently have access to this case.</span>\n </div>\n <div class=\"govuk-grid-row\" *ngIf=\"showUserHasAccessInfo()\">\n <span id=\"{{buildElementId('access-info-has-users')}}\" class=\"govuk-div-align-left\">Users from your organisation with access to this case.</span>\n </div>\n <table class=\"govuk-table\" *ngIf=\"showUserAccessTable()\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th id=\"{{buildElementId('name-heading')}}\" class=\"govuk-table__header govuk-table-column-header\" scope=\"col\">Name</th>\n <th id=\"{{buildElementId('email-heading')}}\" class=\"govuk-table__header govuk-table-column-header\" scope=\"col\">Email address</th>\n <th id=\"{{buildElementId('action-heading')}}\" class=\"govuk-table__header govuk-table-column-actions\" scope=\"col\">Actions</th>\n <th id=\"{{buildElementId('label-heading')}}\" class=\"govuk-table__header govuk-table-column-label\" scope=\"col\">&nbsp;&nbsp;</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\" *ngFor=\"let user of combinedSortedShares; index as idx; trackBy: trackByUserId\">\n <td id=\"user-full-name-{{ userIdSetter(canCancel(sharedCase.caseId, user) | async, idx) }}\" class=\"govuk-table__cell\">{{ user.firstName + ' ' + user.lastName }}</td>\n <td id=\"user-email-{{ userIdSetter(canCancel(sharedCase.caseId, user) | async, idx) }}\" class=\"govuk-table__cell\">{{ user.email }}</td>\n <td class=\"govuk-table__cell\">\n <a *ngIf=\"canRemove(sharedCase.caseId, user) | async\" (click)=\"onRemove(user, sharedCase)\" href=\"javascript:void(0);\">Remove <span class=\"govuk-visually-hidden\">{{ user.firstName + ' ' + user.lastName }} from case</span></a>\n <a *ngIf=\"canCancel(sharedCase.caseId, user) | async\" (click)=\"onCancel(user, sharedCase)\" href=\"javascript:void(0);\">Cancel <span class=\"govuk-visually-hidden\">adding {{ user.firstName + ' ' + user.lastName }} to case</span></a>\n </td>\n <td class=\"govuk-table__cell\">\n <span *ngIf=\"isToBeRemoved(sharedCase.caseId, user) | async\" class=\"hmcts-badge hmcts-badge--red\">To be removed</span>\n <span *ngIf=\"isToBeAdded(sharedCase.caseId, user) | async\" class=\"hmcts-badge\">To be added</span>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n</div>\n",
1254
- styles: [".govuk-case-header{border-top:1px solid #bfc1c3}.govuk-case-title{font-size:24px;color:#005ea5;font-weight:700}.govuk-case-sub-title,.govuk-case-title{font-family:nta,Arial,sans-serif;padding-left:0}.govuk-case-sub-title{font-size:1rem!important;color:#6f777b;font-weight:400}.govuk-grid-row{margin-left:0;margin-right:0}.govuk-grid-column-three-quarters{padding-top:5px;padding-left:0}.govuk-grid-column-twenty-percent{box-sizing:border-box;padding-top:10px;width:20%;float:left}.govuk-grid-column-five-percent{box-sizing:border-box;padding-top:15px;width:5%;float:left}.govuk-table-column-header{width:40%}.govuk-table-column-actions,.govuk-table-column-label{width:10%}.govuk-div-align-left{font-family:nta,Arial,sans-serif;font-size:1.1875rem!important;line-height:1.31579!important;text-align:left;margin-bottom:20px;padding-left:0;color:#0b0c0c}.govuk-accordion__section-header{border-top:0}.govuk-accordion__section-content{padding-top:0}"]
1274
+ template: "<div id=\"{{buildElementId('govuk-accordion__section')}}\" class=\"govuk-accordion__section\">\n <div class=\"govuk-grid-row govuk-case-header\">\n <div class=\"govuk-grid-column-three-quarters\">\n <h3 id=\"{{buildElementId('case-title')}}\" class=\"govuk-case-title\">{{ sharedCase.caseTitle }}</h3>\n <h1 id=\"{{buildElementId('case-id')}}\" class=\"govuk-case-sub-title\">{{ sharedCase.caseId }}</h1>\n </div>\n <div class=\"govuk-grid-column-twenty-percent\">\n <button *ngIf=\"caseCount > 1\"\n id=\"{{buildElementId('btn-deselect-case')}}\" \n class=\"govuk-button hmcts-button--secondary\" \n (click)=\"onDeselect(sharedCase)\" \n title=\"Deselect case\">Deselect case\n </button>\n </div>\n <div class=\"govuk-accordion__section-header govuk-grid-column-five-percent\">\n <div class=\"govuk-accordion__section-heading\">\n <button type=\"button\" id=\"{{buildElementId('accordion-with-summary-sections-heading')}}\"\n aria-controls=\"accordion-with-summary-sections-content-1\" class=\"govuk-accordion__section-button\"\n aria-describedby=\"accordion-with-summary-sections-summary-1\" aria-expanded=\"false\" title=\"Expand or Collapse\">\n <span class=\"govuk-accordion__icon\" aria-hidden=\"true\"></span></button>\n </div>\n </div>\n </div>\n <div id=\"{{buildElementId('accordion-with-summary-sections-content')}}\" class=\"govuk-accordion__section-content\"\n aria-labelledby=\"buildElementId('accordion-with-summary-sections-heading')\" >\n <div class=\"govuk-grid-row\" *ngIf=\"showNoUsersAccessInfo()\">\n <span id=\"{{buildElementId('access-info-no-user')}}\" class=\"govuk-div-align-left\">No users from your organisation currently have access to this case.</span>\n </div>\n <div class=\"govuk-grid-row\" *ngIf=\"showUserHasAccessInfo()\">\n <span id=\"{{buildElementId('access-info-has-users')}}\" class=\"govuk-div-align-left\">Users from your organisation with access to this case.</span>\n </div>\n <table class=\"govuk-table\" *ngIf=\"showUserAccessTable()\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th id=\"{{buildElementId('name-heading')}}\" class=\"govuk-table__header govuk-table-column-header\" scope=\"col\">Name</th>\n <th id=\"{{buildElementId('email-heading')}}\" class=\"govuk-table__header govuk-table-column-header\" scope=\"col\">Email address</th>\n <th id=\"{{buildElementId('action-heading')}}\" class=\"govuk-table__header govuk-table-column-actions\" scope=\"col\">Actions</th>\n <th id=\"{{buildElementId('label-heading')}}\" class=\"govuk-table__header govuk-table-column-label\" scope=\"col\">Status</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\" *ngFor=\"let user of combinedSortedShares; index as idx; trackBy: trackByUserId\">\n <td id=\"user-full-name-{{ userIdSetter(canCancel(sharedCase.caseId, user) | async, idx) }}\" class=\"govuk-table__cell\">{{ user.firstName + ' ' + user.lastName }}</td>\n <td id=\"user-email-{{ userIdSetter(canCancel(sharedCase.caseId, user) | async, idx) }}\" class=\"govuk-table__cell\">{{ user.email }}</td>\n <td class=\"govuk-table__cell\">\n <a *ngIf=\"canRemove(sharedCase.caseId, user) | async\" (click)=\"onRemove(user, sharedCase)\" href=\"javascript:void(0);\">Remove <span class=\"govuk-visually-hidden\">{{ user.firstName + ' ' + user.lastName }} from case</span></a>\n <a *ngIf=\"canCancel(sharedCase.caseId, user) | async\" (click)=\"onCancel(user, sharedCase)\" href=\"javascript:void(0);\">Cancel <span class=\"govuk-visually-hidden\">adding {{ user.firstName + ' ' + user.lastName }} to case</span></a>\n </td>\n <td class=\"govuk-table__cell\">\n <span *ngIf=\"isToBeRemoved(sharedCase.caseId, user) | async\" class=\"hmcts-badge hmcts-badge--red\">To be removed</span>\n <span *ngIf=\"isToBeAdded(sharedCase.caseId, user) | async\" class=\"hmcts-badge\">To be added</span>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n</div>\n",
1275
+ styles: [".govuk-case-header{border-top:1px solid #bfc1c3}.govuk-case-title{font-size:24px;color:#005ea5;font-weight:700}.govuk-case-sub-title,.govuk-case-title{font-family:nta,Arial,sans-serif;padding-left:0}.govuk-case-sub-title{font-size:1rem!important;color:#6f777b;font-weight:400}.govuk-grid-row{margin-left:0;margin-right:0}.govuk-grid-column-three-quarters{padding-top:5px;padding-left:0}.govuk-grid-column-twenty-percent{box-sizing:border-box;padding-top:10px;width:20%;float:left}.govuk-grid-column-five-percent{box-sizing:border-box;padding-top:15px;width:5%;float:left}.govuk-table-column-header{width:38%}.govuk-table-column-actions,.govuk-table-column-label{width:12%}.govuk-div-align-left{font-family:nta,Arial,sans-serif;font-size:1.1875rem!important;line-height:1.31579!important;text-align:left;margin-bottom:20px;padding-left:0;color:#0b0c0c}.govuk-accordion__section-header{border-top:0}.govuk-accordion__section-content{padding-top:0}"]
1255
1276
  },] }
1256
1277
  ];
1257
1278
  SelectedCaseComponent.ctorParameters = () => [
@@ -1262,6 +1283,7 @@ SelectedCaseComponent.propDecorators = {
1262
1283
  selectedUser: [{ type: Input }],
1263
1284
  opened: [{ type: Input }],
1264
1285
  removeUserFromCaseToggleOn: [{ type: Input }],
1286
+ caseCount: [{ type: Input }],
1265
1287
  unselect: [{ type: Output }],
1266
1288
  synchronizeStore: [{ type: Output }]
1267
1289
  };
@@ -1389,6 +1411,13 @@ ShareCaseConfirmComponent.propDecorators = {
1389
1411
  completeLink: [{ type: Input }]
1390
1412
  };
1391
1413
 
1414
+ var SharedCaseErrorMessages;
1415
+ (function (SharedCaseErrorMessages) {
1416
+ SharedCaseErrorMessages["OneCaseMustBeSelected"] = "At least one case must be selected";
1417
+ SharedCaseErrorMessages["NoChangesRequested"] = "You have not requested any changes to case sharing";
1418
+ SharedCaseErrorMessages["OnePersonMustBeAssigned"] = "At least one person must be assigned to each case";
1419
+ })(SharedCaseErrorMessages || (SharedCaseErrorMessages = {}));
1420
+
1392
1421
  class UserSelectComponent {
1393
1422
  constructor() {
1394
1423
  this.selected = new EventEmitter();
@@ -1445,25 +1474,54 @@ UserSelectComponent.propDecorators = {
1445
1474
  };
1446
1475
 
1447
1476
  class ShareCaseComponent {
1448
- constructor(stateService) {
1477
+ constructor(stateService, router) {
1449
1478
  this.stateService = stateService;
1479
+ this.router = router;
1450
1480
  this.shareCases = []; // cases selected for sharing
1481
+ this.continueAllowed = false;
1482
+ this.selectedUserToRemove = null;
1451
1483
  this.removeUserFromCaseToggleOn = false;
1452
1484
  this.users = []; // users of this organisation the cases can be shared with
1453
1485
  this.confirmLink = '';
1486
+ this.cancelLink = '';
1487
+ this.showRemoveUsers = false;
1488
+ this.fnTitle = '';
1489
+ this.title = '';
1454
1490
  this.unselect = new EventEmitter();
1455
1491
  this.synchronizeStore = new EventEmitter();
1492
+ this.validationErrors = [];
1456
1493
  }
1457
1494
  ngOnInit() {
1458
- this.shareCases$.subscribe(shareCases => {
1495
+ this.shareCases$
1496
+ .pipe(tap(sharedCases => {
1497
+ // Update the list of users assigned to at least one case
1498
+ this.getAssignedUsers(sharedCases.filter(sharedCase => sharedCase.sharedWith && sharedCase.sharedWith.length > 0));
1499
+ }))
1500
+ .subscribe(shareCases => {
1459
1501
  this.shareCases = shareCases;
1460
1502
  this.stateService.setCases(shareCases);
1503
+ // Set the config to be used by the xuilib-gov-uk-error-message component, in particular the element ID to
1504
+ // which the error message is associated
1505
+ if (shareCases) {
1506
+ this.selectedCasesErrorMessageConfig = {
1507
+ id: shareCases.length > 0 ? 'cases' : 'noCaseDisplay'
1508
+ };
1509
+ }
1461
1510
  });
1462
1511
  this.shareCases$ = this.stateService.state;
1512
+ this.shareCaseErrorMessage = { isInvalid: false, messages: [] };
1463
1513
  }
1464
1514
  onUnselect(c) {
1465
- this.unselect.emit(c);
1466
- this.stateService.removeCase(c.caseId);
1515
+ this.validationErrors = [];
1516
+ if (this.stateService.getCases().length === 1) {
1517
+ this.validationErrors.push({ id: 'cases', message: SharedCaseErrorMessages.OneCaseMustBeSelected });
1518
+ this.shareCaseErrorMessage = { isInvalid: true, messages: [SharedCaseErrorMessages.OneCaseMustBeSelected] };
1519
+ window.scrollTo({ top: 0, left: 0, behavior: 'smooth' });
1520
+ }
1521
+ else {
1522
+ this.unselect.emit(c);
1523
+ this.stateService.removeCase(c.caseId);
1524
+ }
1467
1525
  }
1468
1526
  onSynchronizeStore(event) {
1469
1527
  this.synchronizeStore.emit(event);
@@ -1478,25 +1536,39 @@ class ShareCaseComponent {
1478
1536
  this.userSelect.clear();
1479
1537
  }
1480
1538
  this.synchronizeStore.emit(newSharedCases);
1539
+ // Update the list of assigned users (which includes pending users)
1540
+ this.getAssignedUsers(newSharedCases);
1541
+ }
1542
+ removeUser() {
1543
+ if (this.selectedUserToRemove) {
1544
+ const newSharedCases = this.stateService.requestUnshare(this.selectedUserToRemove);
1545
+ this.synchronizeStore.emit(newSharedCases);
1546
+ }
1481
1547
  }
1482
1548
  isDisabledAdd() {
1483
1549
  return this.selectedUser === null || this.shareCases.length === 0;
1484
1550
  }
1485
- isDisabledContinue() {
1486
- let isDisabled = true;
1551
+ /**
1552
+ * Function originally used to set disabled state of "Continue" button, now called by the button click handler to
1553
+ * control whether navigation to the confirmation page is allowed. It is prevented if no changes have been made
1554
+ */
1555
+ setContinueAllowed() {
1556
+ // Always start with continueAllowed = false. This covers the scenario where a user might add someone for sharing
1557
+ // a case (so, continueAllowed = true), then removes the same user before trying to continue. This would
1558
+ // erroneously leave continueAllowed as true
1559
+ this.continueAllowed = false;
1487
1560
  this.shareCases$.subscribe(shareCases => {
1488
1561
  for (const caseState of shareCases) {
1489
1562
  if (caseState.pendingShares && caseState.pendingShares.length > 0) {
1490
- isDisabled = false;
1563
+ this.continueAllowed = true;
1491
1564
  break;
1492
1565
  }
1493
1566
  if (caseState.pendingUnshares && caseState.pendingUnshares.length > 0) {
1494
- isDisabled = false;
1567
+ this.continueAllowed = true;
1495
1568
  break;
1496
1569
  }
1497
1570
  }
1498
1571
  });
1499
- return isDisabled;
1500
1572
  }
1501
1573
  onDeselect(sharedCase) {
1502
1574
  if (sharedCase !== null) {
@@ -1510,22 +1582,90 @@ class ShareCaseComponent {
1510
1582
  }
1511
1583
  this.stateService.setCases(this.shareCases);
1512
1584
  }
1585
+ onContinue() {
1586
+ this.setContinueAllowed();
1587
+ // If continuation is not allowed, set an error message
1588
+ if (!this.continueAllowed) {
1589
+ this.validationErrors = [];
1590
+ this.validationErrors.push({ id: 'cases', message: SharedCaseErrorMessages.NoChangesRequested });
1591
+ this.shareCaseErrorMessage = { isInvalid: true, messages: [SharedCaseErrorMessages.NoChangesRequested] };
1592
+ window.scrollTo({ top: 0, left: 0, behavior: 'smooth' });
1593
+ }
1594
+ // Navigate to confirmation page only if allowed to continue
1595
+ if (this.continueAllowed) {
1596
+ // Check that no case is left unassigned; a user can be removed only if there is another current user, or if at
1597
+ // least one user is to be added. Prevent navigation to confirmation page if there is at least one case left in
1598
+ // an unassigned state
1599
+ if (this.hasCasesLeftUnassigned(this.shareCases)) {
1600
+ this.validationErrors = [];
1601
+ this.validationErrors.push({ id: 'cases', message: SharedCaseErrorMessages.OnePersonMustBeAssigned });
1602
+ this.shareCaseErrorMessage = { isInvalid: true, messages: [SharedCaseErrorMessages.OnePersonMustBeAssigned] };
1603
+ window.scrollTo({ top: 0, left: 0, behavior: 'smooth' });
1604
+ }
1605
+ else {
1606
+ this.router.navigate([this.confirmLink]);
1607
+ }
1608
+ }
1609
+ }
1610
+ /**
1611
+ * Gets a unique list of all users that have been assigned, or are pending assigment to, at least one case
1612
+ * @param sharedCases The list of shared cases from which to get users these are shared with, or are to be shared with
1613
+ */
1614
+ getAssignedUsers(sharedCases) {
1615
+ const users = [];
1616
+ sharedCases.forEach(sharedCase => {
1617
+ if (sharedCase.sharedWith) {
1618
+ sharedCase.sharedWith.forEach(user => {
1619
+ if (!users.some(existingUser => user.idamId === existingUser.idamId)) {
1620
+ users.push(user);
1621
+ }
1622
+ });
1623
+ }
1624
+ if (sharedCase.pendingShares) {
1625
+ sharedCase.pendingShares.forEach(user => {
1626
+ if (!users.some(existingUser => user.idamId === existingUser.idamId)) {
1627
+ users.push(user);
1628
+ }
1629
+ });
1630
+ }
1631
+ });
1632
+ this.assignedUsers = users;
1633
+ }
1634
+ /**
1635
+ * Checks if any shared cases have been left unassigned. This occurs if a shared case has a number of pending
1636
+ * unshares equal to the number of current shares, and there are no pending shares.
1637
+ * @param sharedCases The array of shared cases to check
1638
+ * @returns `true` if at least one case has the condition described above; `false` otherwise
1639
+ */
1640
+ hasCasesLeftUnassigned(sharedCases) {
1641
+ return sharedCases.some(sharedCase => {
1642
+ return sharedCase.pendingUnshares && sharedCase.sharedWith &&
1643
+ sharedCase.pendingUnshares.length === sharedCase.sharedWith.length &&
1644
+ (!sharedCase.pendingShares || sharedCase.pendingShares.length === 0);
1645
+ });
1646
+ }
1513
1647
  }
1514
1648
  ShareCaseComponent.decorators = [
1515
1649
  { type: Component, args: [{
1516
1650
  selector: 'xuilib-share-case',
1517
- template: "<div id=\"add-user\">\n <label class=\"govuk-label govuk-!-font-weight-bold\" for=\"add-user-input\">Enter email address</label>\n <span id=\"add-user-hint\" class=\"govuk-hint\">\n Search by name or email address. You can only add people from your organisation individually - but you can add as many as you like.\n </span>\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-two-thirds\">\n <xuilib-user-select\n id=\"add-user-input\"\n aria-describedby=\"add-user-hint\"\n [users]=\"users\"\n (selected)=\"onSelectedUser($event)\">\n </xuilib-user-select>\n </div>\n <div class=\"govuk-grid-column-one-thirds\">\n <button id=\"btn-add-user\" (click)=\"addUser()\" class=\"govuk-button\" [disabled]=\"isDisabledAdd()\" title=\"Add user to the case\">Add</button>\n </div>\n </div>\n <details id=\"add-user-help\" class=\"govuk-details\" data-module=\"govuk-details\">\n <summary class=\"govuk-details__summary\">\n <span id=\"content-why-can-not-find-email\" class=\"govuk-details__summary-text\">\n Can\u2019t find an email address?\n </span>\n </summary>\n <div id=\"content-reason-can-not-find-email\" class=\"govuk-details__text\">\n If you can\u2019t find your colleague\u2019s email address, they will need to complete their registration. Contact your\n administrator for help.\n </div>\n </details>\n</div>\n\n<div id=\"cases\">\n <h3 id=\"title-selected-cases\" class=\"govuk-heading-m\">Selected cases</h3>\n <div *ngIf=\"shareCases && shareCases.length > 0\" class=\"govuk-accordion\" data-module=\"govuk-accordion\" id=\"accordion-with-summary-sections\">\n <xuilib-selected-case-list\n [shareCases$]=\"shareCases$\"\n [removeUserFromCaseToggleOn]=\"removeUserFromCaseToggleOn\"\n (unselect)=\"onUnselect($event)\"\n (synchronizeStore)=\"onSynchronizeStore($event)\"\n >\n </xuilib-selected-case-list>\n </div>\n\n <div id=\"noCaseDisplay\" *ngIf=\"shareCases && shareCases.length === 0\" class=\"govuk-hint\">\n No cases to display.\n </div>\n\n</div>\n\n<div id=\"share-case-nav\">\n <button class=\"govuk-button\" [disabled]=\"isDisabledContinue()\" title=\"Continue\" [routerLink]=\"confirmLink\">Continue</button>\n</div>\n",
1518
- styles: [""]
1651
+ template: "<xuilib-hmcts-error-summary\n [errorMessages]=\"validationErrors\"\n [header]=\"'There is a problem'\"\n></xuilib-hmcts-error-summary>\n<h1 *ngIf=\"title\" class=\"govuk-heading-xl govuk-!-margin-top-2\">\n <span *ngIf=\"fnTitle\" class=\"govuk-caption-xl\">{{fnTitle}}</span>\n {{title}}\n</h1>\n<div id=\"add-user\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label govuk-!-font-weight-bold\" for=\"add-user-input\">{{addUserLabel}}</label>\n <span id=\"add-user-hint\" class=\"govuk-hint\">\n Search by name or email address. You can share access with as many people as you need.\n </span>\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-two-thirds\">\n <xuilib-user-select\n id=\"add-user-input\"\n aria-describedby=\"add-user-hint\"\n [users]=\"users\"\n (selected)=\"onSelectedUser($event)\">\n </xuilib-user-select>\n </div>\n <div class=\"govuk-grid-column-one-thirds\">\n <button id=\"btn-add-user\" (click)=\"addUser()\" class=\"govuk-button govuk-button--secondary\" [disabled]=\"isDisabledAdd()\" title=\"Add user to selected cases\">Add</button>\n </div>\n </div>\n <details id=\"add-user-help\" class=\"govuk-details\" data-module=\"govuk-details\">\n <summary class=\"govuk-details__summary\">\n <span id=\"content-why-can-not-find-email\" class=\"govuk-details__summary-text\">\n Can't find an email address?\n </span>\n </summary>\n <div id=\"content-reason-can-not-find-email\" class=\"govuk-details__text\">\n If you can't find your colleague's email address, they will need to complete their registration. Contact your\n administrator for help.\n </div>\n </details>\n </div>\n <div class=\"govuk-form-group\" *ngIf=\"showRemoveUsers\">\n <label class=\"govuk-label govuk-!-font-weight-bold\" for=\"remove-user-input\">Remove a person from all cases</label>\n <span id=\"remove-user-hint\" class=\"govuk-hint\">\n Select a person to remove them from all selected cases.\n </span>\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-two-thirds\">\n <select [(ngModel)]=\"selectedUserToRemove\" class=\"govuk-select\" id=\"remove-user-input\" aria-describedby=\"remove-user-hint\">\n <option [ngValue]=\"null\" selected>Select a person</option>\n <option *ngFor=\"let user of assignedUsers\" [ngValue]=\"user\">{{user.firstName}} {{user.lastName}} - {{user.email}}</option>\n </select>\n </div>\n <div class=\"govuk-grid-column-one-thirds\">\n <button id=\"btn-remove-user\" (click)=\"removeUser()\" class=\"govuk-button govuk-button--secondary\" title=\"Remove user from selected cases\">Remove</button>\n </div>\n </div>\n </div>\n</div>\n\n<div id=\"cases\" [ngClass]=\"{'govuk-form-group--error': shareCaseErrorMessage.messages && shareCaseErrorMessage.messages.length > 0}\">\n <h3 id=\"title-selected-cases\" class=\"govuk-heading-m\">Selected cases</h3>\n <xuilib-gov-uk-error-message [config]=\"selectedCasesErrorMessageConfig\" [errorMessage]=\"shareCaseErrorMessage\"></xuilib-gov-uk-error-message>\n <div *ngIf=\"shareCases && shareCases.length > 0\" class=\"govuk-accordion\" data-module=\"govuk-accordion\" id=\"accordion-with-summary-sections\">\n <xuilib-selected-case-list\n [shareCases$]=\"shareCases$\"\n [removeUserFromCaseToggleOn]=\"removeUserFromCaseToggleOn\"\n (unselect)=\"onUnselect($event)\"\n (synchronizeStore)=\"onSynchronizeStore($event)\"\n >\n </xuilib-selected-case-list>\n </div>\n\n <div id=\"noCaseDisplay\" *ngIf=\"shareCases && shareCases.length === 0\" class=\"govuk-hint\"\n [ngClass]=\"{'govuk-form-group--error': shareCaseErrorMessage.messages && shareCaseErrorMessage.messages.length > 0}\">\n No cases to display.\n </div>\n\n</div>\n\n<div id=\"share-case-nav\" class=\"govuk-button-group\">\n <button id=\"btn-continue\" class=\"govuk-button\" data-module=\"govuk-button\" (click)=\"onContinue()\" title=\"Continue\">Continue</button>\n <button id=\"btn-cancel\" class=\"govuk-button govuk-button--secondary\" data-module=\"govuk-button\" title=\"Cancel\" [routerLink]=\"cancelLink\">Cancel</button>\n</div>\n",
1652
+ styles: ["select{width:100%}"]
1519
1653
  },] }
1520
1654
  ];
1521
1655
  ShareCaseComponent.ctorParameters = () => [
1522
- { type: CaseSharingStateService }
1656
+ { type: CaseSharingStateService },
1657
+ { type: Router }
1523
1658
  ];
1524
1659
  ShareCaseComponent.propDecorators = {
1525
1660
  removeUserFromCaseToggleOn: [{ type: Input }],
1526
1661
  shareCases$: [{ type: Input }],
1527
1662
  users: [{ type: Input }],
1528
1663
  confirmLink: [{ type: Input }],
1664
+ cancelLink: [{ type: Input }],
1665
+ addUserLabel: [{ type: Input }],
1666
+ showRemoveUsers: [{ type: Input }],
1667
+ fnTitle: [{ type: Input }],
1668
+ title: [{ type: Input }],
1529
1669
  unselect: [{ type: Output }],
1530
1670
  synchronizeStore: [{ type: Output }],
1531
1671
  userSelect: [{ type: ViewChild, args: [UserSelectComponent, { static: true },] }]
@@ -1794,6 +1934,47 @@ CookieBannerComponent.propDecorators = {
1794
1934
  acceptanceNotifier: [{ type: Output }]
1795
1935
  };
1796
1936
 
1937
+ var BadgeColour;
1938
+ (function (BadgeColour) {
1939
+ BadgeColour["BADGE_RED"] = "hmcts-badge--red";
1940
+ BadgeColour["BADGE_BLUE"] = "hmcts-badge--blue";
1941
+ BadgeColour["BADGE_GREEN"] = "hmcts-badge--green";
1942
+ })(BadgeColour || (BadgeColour = {}));
1943
+
1944
+ class AnonymousFeatureUser {
1945
+ }
1946
+ class LoggedInFeatureUser {
1947
+ }
1948
+
1949
+ var BookingCheckType;
1950
+ (function (BookingCheckType) {
1951
+ BookingCheckType["NO_CHECK"] = "NO_CHECK";
1952
+ BookingCheckType["BOOKINGS_AND_BASE"] = "BOOKINGS_AND_BASE";
1953
+ BookingCheckType["POSSIBLE_BOOKINGS"] = "POSSIBLE_BOOKINGS";
1954
+ })(BookingCheckType || (BookingCheckType = {}));
1955
+
1956
+ var PersonRole;
1957
+ (function (PersonRole) {
1958
+ PersonRole["JUDICIAL"] = "Judicial";
1959
+ PersonRole["CASEWORKER"] = "Legal Ops";
1960
+ PersonRole["ADMIN"] = "Admin";
1961
+ PersonRole["CTSC"] = "CTSC User";
1962
+ PersonRole["ALL"] = "All";
1963
+ })(PersonRole || (PersonRole = {}));
1964
+ // Note: RoleCategory could replace PersonRole possibly
1965
+ // However a lot of webapp logic is based on current PersonRole understanding
1966
+ var RoleCategory;
1967
+ (function (RoleCategory) {
1968
+ RoleCategory["JUDICIAL"] = "JUDICIAL";
1969
+ RoleCategory["CASEWORKER"] = "LEGAL_OPERATIONS";
1970
+ RoleCategory["ADMIN"] = "ADMIN";
1971
+ RoleCategory["CTSC"] = "CTSC";
1972
+ RoleCategory["ALL"] = "ALL";
1973
+ })(RoleCategory || (RoleCategory = {}));
1974
+
1975
+ class RadioFilterFieldConfig {
1976
+ }
1977
+
1797
1978
  class LocationService {
1798
1979
  constructor(http) {
1799
1980
  this.http = http;
@@ -1805,8 +1986,8 @@ class LocationService {
1805
1986
  * @param searchTerm: any search term for postcode | site name | venue name |court name | court address etc.
1806
1987
  * @return Observable<LocationByEPIMMSModel[]>: Array of locationModel in Observable
1807
1988
  */
1808
- getAllLocations(serviceIds, locationType, searchTerm) {
1809
- return this.http.get(`api/locations/getLocations?serviceIds=${serviceIds}&locationType=${locationType}&searchTerm=${searchTerm}`);
1989
+ getAllLocations(serviceIds, locationType, searchTerm, userLocations, bookingLocations) {
1990
+ return this.http.post(`api/locations/getLocations`, { serviceIds, locationType, searchTerm, userLocations, bookingLocations });
1810
1991
  }
1811
1992
  /**
1812
1993
  * @description searchLocations from service Ids/location type/search term
@@ -1829,9 +2010,49 @@ LocationService.ctorParameters = () => [
1829
2010
  { type: HttpClient }
1830
2011
  ];
1831
2012
 
2013
+ class SessionStorageService {
2014
+ /**
2015
+ * Get an item from the session storage.
2016
+ * If remove is true, the item will be removed once read
2017
+ * @param removeAfterRead removed the key once it has been read
2018
+ */
2019
+ getItem(key, removeAfterRead = false) {
2020
+ const item = sessionStorage.getItem(key);
2021
+ if (removeAfterRead) {
2022
+ this.removeItem(key);
2023
+ }
2024
+ return item;
2025
+ }
2026
+ /**
2027
+ * Set an item in the session storage.
2028
+ */
2029
+ setItem(key, value) {
2030
+ sessionStorage.setItem(key, value);
2031
+ }
2032
+ /**
2033
+ * Remove an item in the session storage.
2034
+ */
2035
+ removeItem(key) {
2036
+ sessionStorage.removeItem(key);
2037
+ }
2038
+ /**
2039
+ * Clear all the items held in session storage.
2040
+ */
2041
+ clear() {
2042
+ sessionStorage.clear();
2043
+ }
2044
+ }
2045
+ SessionStorageService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SessionStorageService_Factory() { return new SessionStorageService(); }, token: SessionStorageService, providedIn: "root" });
2046
+ SessionStorageService.decorators = [
2047
+ { type: Injectable, args: [{
2048
+ providedIn: 'root'
2049
+ },] }
2050
+ ];
2051
+
1832
2052
  class SearchLocationComponent {
1833
- constructor(locationService, fb, cd) {
2053
+ constructor(locationService, sessionStorageService, fb, cd) {
1834
2054
  this.locationService = locationService;
2055
+ this.sessionStorageService = sessionStorageService;
1835
2056
  this.fb = fb;
1836
2057
  this.cd = cd;
1837
2058
  this.disabled = null;
@@ -1897,7 +2118,21 @@ class SearchLocationComponent {
1897
2118
  this.searchLocationChanged.emit();
1898
2119
  }
1899
2120
  getLocations(term) {
1900
- return this.locationService.getAllLocations(this.serviceIds, this.locationType, term);
2121
+ let userLocations;
2122
+ let bookingLocations;
2123
+ // Booking type info - can create more
2124
+ // NO_CHECK - All work - Do not filter out locations - Default assumption
2125
+ // ONLY_BOOKINGS - My work - Try to only show base locations/booking locations
2126
+ // POSSIBLE_BOOKINGS - Create booking screen - Show only potential bookings
2127
+ if (this.bookingCheck === BookingCheckType.BOOKINGS_AND_BASE) {
2128
+ userLocations = JSON.parse(this.sessionStorageService.getItem('userLocations'));
2129
+ bookingLocations = JSON.parse(this.sessionStorageService.getItem('bookingLocations'));
2130
+ }
2131
+ else if (this.bookingCheck === BookingCheckType.POSSIBLE_BOOKINGS) {
2132
+ userLocations = JSON.parse(this.sessionStorageService.getItem('userLocations'));
2133
+ this.serviceIds = JSON.parse(this.sessionStorageService.getItem('bookableServices'));
2134
+ }
2135
+ return this.locationService.getAllLocations(this.serviceIds, this.locationType, term, userLocations, bookingLocations);
1901
2136
  }
1902
2137
  resetSearchTerm() {
1903
2138
  this.form.controls.searchTerm.patchValue('', { emitEvent: false, onlySelf: true });
@@ -1918,6 +2153,7 @@ SearchLocationComponent.decorators = [
1918
2153
  ];
1919
2154
  SearchLocationComponent.ctorParameters = () => [
1920
2155
  { type: LocationService },
2156
+ { type: SessionStorageService },
1921
2157
  { type: FormBuilder },
1922
2158
  { type: ChangeDetectorRef }
1923
2159
  ];
@@ -1932,6 +2168,7 @@ SearchLocationComponent.propDecorators = {
1932
2168
  form: [{ type: Input }],
1933
2169
  showAutocomplete: [{ type: Input }],
1934
2170
  locations: [{ type: Input }],
2171
+ bookingCheck: [{ type: Input }],
1935
2172
  locationSelected: [{ type: Output }],
1936
2173
  locationInputChanged: [{ type: Output }],
1937
2174
  searchLocationChanged: [{ type: Output }],
@@ -1978,6 +2215,10 @@ class FindLocationComponent {
1978
2215
  }
1979
2216
  }
1980
2217
  }
2218
+ ngOnInit() {
2219
+ // implemented to get rid of undefined values
2220
+ this.selectedLocations = this.selectedLocations.filter(location => location.epimms_id);
2221
+ }
1981
2222
  addLocation() {
1982
2223
  if (this.tempSelectedLocation) {
1983
2224
  this.selectedLocations = [...this.selectedLocations, this.tempSelectedLocation];
@@ -2036,7 +2277,7 @@ class FindLocationComponent {
2036
2277
  FindLocationComponent.decorators = [
2037
2278
  { type: Component, args: [{
2038
2279
  selector: 'xuilib-find-location',
2039
- template: "<div class=\"location-picker-custom\">\n <div class=\"search-location\">\n <div>\n <label id=\"input-selected-location-label\" *ngIf=\"locationTitle\">{{locationTitle}}</label>\n </div>\n <exui-search-location class=\"search-location\"\n [locations]=\"locations\"\n [selectedLocations]=\"selectedLocations\"\n [singleMode]=\"field.maxSelected === 1\"\n [delay]=\"300\"\n [disabled]=\"disabled\"\n [serviceIds]=\"serviceIds\"\n (locationInputChanged)=\"onInputChanged($event)\"\n (locationSelected)=\"onLocationSelected($event)\"\n (searchLocationChanged)=\"onSearchInputChanged()\"\n [locationType]=\"'case-management'\"></exui-search-location>\n <a href=\"javascript:void(0)\" (click)=\"addLocation()\" class=\"govuk-button\" data-module=\"govuk-button\" *ngIf=\"enableAddLocationButton\">\n Add location\n </a>\n </div>\n <ul class=\"hmcts-filter-tags selection-container\" *ngIf=\"field.maxSelected != 1\">\n <li class=\"location-selection\" *ngFor=\"let selection of selectedLocations\">\n <a class=\"hmcts-filter__tag\" (click)=\"removeLocation(selection)\" href=\"javascript:void(0)\">\n {{ selection.site_name }}\n </a>\n </li>\n </ul>\n</div>\n",
2280
+ template: "<div class=\"location-picker-custom\">\n <div class=\"search-location\">\n <div>\n <label id=\"input-selected-location-label\" *ngIf=\"locationTitle\">{{locationTitle}}</label>\n </div>\n <exui-search-location class=\"search-location\"\n [locations]=\"locations\"\n [selectedLocations]=\"selectedLocations\"\n [singleMode]=\"field.maxSelected === 1\"\n [bookingCheck]=\"field.bookingCheckType\"\n [delay]=\"300\"\n [disabled]=\"disabled\"\n [serviceIds]=\"serviceIds\"\n (locationInputChanged)=\"onInputChanged($event)\"\n (locationSelected)=\"onLocationSelected($event)\"\n (searchLocationChanged)=\"onSearchInputChanged()\"\n [locationType]=\"'case-management'\"></exui-search-location>\n <a href=\"javascript:void(0)\" (click)=\"addLocation()\" class=\"govuk-button\" data-module=\"govuk-button\" *ngIf=\"enableAddLocationButton\">\n Add location\n </a>\n </div>\n <ul class=\"hmcts-filter-tags selection-container\" *ngIf=\"field.maxSelected != 1\">\n <li class=\"location-selection\" *ngFor=\"let selection of selectedLocations\">\n <a class=\"hmcts-filter__tag\" (click)=\"removeLocation(selection)\" href=\"javascript:void(0)\">\n {{ selection.site_name }}\n </a>\n </li>\n </ul>\n</div>\n",
2040
2281
  styles: [""]
2041
2282
  },] }
2042
2283
  ];
@@ -2222,77 +2463,6 @@ const setCaseworkers = (serviceId, caseworkers, sessionStorageService) => {
2222
2463
  sessionStorageService.setItem(sessionKey, JSON.stringify(caseworkers));
2223
2464
  };
2224
2465
 
2225
- var BadgeColour;
2226
- (function (BadgeColour) {
2227
- BadgeColour["BADGE_RED"] = "hmcts-badge--red";
2228
- BadgeColour["BADGE_BLUE"] = "hmcts-badge--blue";
2229
- BadgeColour["BADGE_GREEN"] = "hmcts-badge--green";
2230
- })(BadgeColour || (BadgeColour = {}));
2231
-
2232
- class AnonymousFeatureUser {
2233
- }
2234
- class LoggedInFeatureUser {
2235
- }
2236
-
2237
- var PersonRole;
2238
- (function (PersonRole) {
2239
- PersonRole["JUDICIAL"] = "Judicial";
2240
- PersonRole["CASEWORKER"] = "Legal Ops";
2241
- PersonRole["ADMIN"] = "Admin";
2242
- PersonRole["ALL"] = "All";
2243
- })(PersonRole || (PersonRole = {}));
2244
- // Note: RoleCategory could replace PersonRole possibly
2245
- // However a lot of webapp logic is based on current PersonRole understanding
2246
- var RoleCategory;
2247
- (function (RoleCategory) {
2248
- RoleCategory["JUDICIAL"] = "JUDICIAL";
2249
- RoleCategory["CASEWORKER"] = "LEGAL_OPERATIONS";
2250
- RoleCategory["ADMIN"] = "ADMIN";
2251
- RoleCategory["ALL"] = "ALL";
2252
- })(RoleCategory || (RoleCategory = {}));
2253
-
2254
- class RadioFilterFieldConfig {
2255
- }
2256
-
2257
- class SessionStorageService {
2258
- /**
2259
- * Get an item from the session storage.
2260
- * If remove is true, the item will be removed once read
2261
- * @param removeAfterRead removed the key once it has been read
2262
- */
2263
- getItem(key, removeAfterRead = false) {
2264
- const item = sessionStorage.getItem(key);
2265
- if (removeAfterRead) {
2266
- this.removeItem(key);
2267
- }
2268
- return item;
2269
- }
2270
- /**
2271
- * Set an item in the session storage.
2272
- */
2273
- setItem(key, value) {
2274
- sessionStorage.setItem(key, value);
2275
- }
2276
- /**
2277
- * Remove an item in the session storage.
2278
- */
2279
- removeItem(key) {
2280
- sessionStorage.removeItem(key);
2281
- }
2282
- /**
2283
- * Clear all the items held in session storage.
2284
- */
2285
- clear() {
2286
- sessionStorage.clear();
2287
- }
2288
- }
2289
- SessionStorageService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SessionStorageService_Factory() { return new SessionStorageService(); }, token: SessionStorageService, providedIn: "root" });
2290
- SessionStorageService.decorators = [
2291
- { type: Injectable, args: [{
2292
- providedIn: 'root'
2293
- },] }
2294
- ];
2295
-
2296
2466
  class FindAPersonService {
2297
2467
  constructor(http, sessionStorageService) {
2298
2468
  this.http = http;
@@ -2305,7 +2475,7 @@ class FindAPersonService {
2305
2475
  this.userId = userInfo.id ? userInfo.id : userInfo.uid;
2306
2476
  }
2307
2477
  this.assignedUser = searchOptions.assignedUser ? searchOptions.assignedUser : null;
2308
- return this.http.post('/workallocation2/findPerson', { searchOptions })
2478
+ return this.http.post('/workallocation/findPerson', { searchOptions })
2309
2479
  .pipe(map(judiciary => judiciary.filter(judge => !([this.assignedUser, this.userId].includes(judge.id)))));
2310
2480
  }
2311
2481
  findCaseworkers(searchOptions) {
@@ -2335,7 +2505,7 @@ class FindAPersonService {
2335
2505
  return of(this.searchInCaseworkers(storedCaseworkers, searchOptions));
2336
2506
  }
2337
2507
  // all serviceIds passed in as node layer getting used anyway and caseworkers also stored there
2338
- return this.http.post('/workallocation2/retrieveCaseWorkersForServices', { fullServices }).pipe(tap(caseworkersByService => {
2508
+ return this.http.post('/workallocation/retrieveCaseWorkersForServices', { fullServices }).pipe(tap(caseworkersByService => {
2339
2509
  caseworkersByService.forEach(caseworkerListByService => {
2340
2510
  // for any new service, ensure that they are then stored in the session
2341
2511
  if (newServices.includes(caseworkerListByService.service)) {
@@ -2439,7 +2609,7 @@ class SearchJudicialsComponent {
2439
2609
  this.searchInProgress = false;
2440
2610
  return apiFilter;
2441
2611
  })).subscribe(judicial => {
2442
- if (term === judicial.knownAs) {
2612
+ if (term === judicial.fullName) {
2443
2613
  this.formGroup.controls.selectedFormControl.setValue(judicial);
2444
2614
  this.displayedJudicials = [];
2445
2615
  this.judicialChanged.emit(judicial);
@@ -2474,7 +2644,7 @@ class SearchJudicialsComponent {
2474
2644
  }
2475
2645
  }
2476
2646
  getDisplayName(selectedJudicial) {
2477
- return `${selectedJudicial.knownAs} (${selectedJudicial.emailId})`;
2647
+ return `${selectedJudicial.fullName} (${selectedJudicial.emailId})`;
2478
2648
  }
2479
2649
  searchJudicials(term, serviceId) {
2480
2650
  return this.judicialService.searchJudicial(term, serviceId);
@@ -2580,8 +2750,8 @@ class FindPersonComponent {
2580
2750
  if (!selectedPerson) {
2581
2751
  return '';
2582
2752
  }
2583
- if (selectedPerson.domain === PersonRole.JUDICIAL && selectedPerson.knownAs) {
2584
- return `${selectedPerson.knownAs} (${selectedPerson.email})`;
2753
+ if (selectedPerson.domain === PersonRole.JUDICIAL && selectedPerson.fullName) {
2754
+ return `${selectedPerson.fullName} (${selectedPerson.email})`;
2585
2755
  }
2586
2756
  return selectedPerson.email ? `${selectedPerson.name} (${selectedPerson.email})` : selectedPerson.name;
2587
2757
  }
@@ -2718,6 +2888,64 @@ LetDirective.propDecorators = {
2718
2888
  xuilibLet: [{ type: Input }]
2719
2889
  };
2720
2890
 
2891
+ class FindServiceComponent {
2892
+ constructor() {
2893
+ this.serviceTitle = 'Search for a service by name';
2894
+ this.enableAddServiceButton = true;
2895
+ this.disableInputField = false;
2896
+ }
2897
+ addService() {
2898
+ // Todo
2899
+ }
2900
+ }
2901
+ FindServiceComponent.decorators = [
2902
+ { type: Component, args: [{
2903
+ selector: 'xuilib-find-service',
2904
+ template: "<div class=\"service-picker-custom\">\n <div class=\"search-service\">\n <div>\n <label id=\"input-selected-service-label\" *ngIf=\"serviceTitle\">{{serviceTitle}}</label>\n </div>\n <exui-search-service class=\"search-service\"\n [services]=\"services\"\n [selectedServices]=\"selectedServices\"\n [delay]=\"300\"\n [disabled]=\"disabled\"></exui-search-service>\n <a href=\"javascript:void(0)\" (click)=\"addService()\" class=\"govuk-button govuk-button--secondary govuk-!-margin-bottom-0\"\n data-module=\"govuk-button\" *ngIf=\"enableAddServiceButton\" id=\"add-service\">\n Add\n </a>\n </div>\n <ul class=\"hmcts-filter-tags selection-container\" *ngIf=\"field.maxSelected != 1\">\n <li class=\"service-selection\" *ngFor=\"let selection of selectedServices\">\n <a class=\"hmcts-filter__tag\" href=\"javascript:void(0)\">\n {{ selection.name }}\n </a>\n </li>\n </ul>\n </div>\n",
2905
+ styles: ["#add-service{background-color:#ddd}"]
2906
+ },] }
2907
+ ];
2908
+ FindServiceComponent.propDecorators = {
2909
+ field: [{ type: Input }],
2910
+ fields: [{ type: Input }],
2911
+ serviceTitle: [{ type: Input }],
2912
+ form: [{ type: Input }],
2913
+ services: [{ type: Input }],
2914
+ selectedServices: [{ type: Input }],
2915
+ disabled: [{ type: Input }],
2916
+ enableAddServiceButton: [{ type: Input }],
2917
+ disableInputField: [{ type: Input }]
2918
+ };
2919
+
2920
+ class SearchServiceComponent {
2921
+ constructor() {
2922
+ this.showAutocomplete = false;
2923
+ this.minSearchCharacters = 3;
2924
+ this.term = '';
2925
+ }
2926
+ onInput() {
2927
+ // Todo
2928
+ }
2929
+ onSelectionChange() {
2930
+ // Todo
2931
+ }
2932
+ }
2933
+ SearchServiceComponent.decorators = [
2934
+ { type: Component, args: [{
2935
+ selector: 'exui-search-service',
2936
+ template: "<div class=\"auto-complete-container\">\n <input\n id=\"inputServiceSearch\"\n (input)=\"onInput()\"\n [formControl]=\"form?.controls.searchTerm\"\n [matAutocomplete]=\"autoSearchService\"\n class=\"govuk-input\"\n [attr.disabled]=\"disabled\">\n <mat-autocomplete class=\"mat-autocomplete-panel-extend\" autoActiveFirstOption #autoSearchService=\"matAutocomplete\">\n <mat-option *ngFor=\"let service of services\" (onSelectionChange)=\"onSelectionChange()\">\n {{ service.name }}\n </mat-option>\n <mat-option *ngIf=\"!services?.length && showAutocomplete && term && term.length >= this.minSearchCharacters\">No results found</mat-option>\n </mat-autocomplete>\n</div>\n",
2937
+ styles: [".autocomplete__input--show-all-values{padding:5px 34px 5px 5px;cursor:pointer}.autocomplete__dropdown-arrow-down{z-index:-1;display:inline-block;position:absolute;right:8px;width:24px;height:24px;top:10px}.autocomplete__menu{background-color:#fff;border:2px solid #0b0c0c;border-top:0;color:#0b0c0c;margin:0;max-height:342px;overflow-x:hidden;padding:0;width:100%;width:calc(100% - 4px)}.autocomplete__menu--visible{display:block}.autocomplete__menu--hidden{display:none}.autocomplete__menu--overlay{box-shadow:0 2px 6px rgba(0,0,0,.256863);left:0;position:absolute;top:100%;z-index:100}.autocomplete__menu--inline{position:relative}.autocomplete__option{border-left-width:0;border-bottom:1px solid #b1b4b6;border-right-width:0;border-top-width:1px;cursor:pointer;display:block;position:relative}.autocomplete__option>*{pointer-events:none}.autocomplete__option:first-of-type{border-top-width:0}.autocomplete__option:last-of-type{border-bottom-width:0}.autocomplete__option--odd{background-color:#fafafa}.autocomplete__option--focused,.autocomplete__option:hover{background-color:#1d70b8;border-color:#1d70b8;color:#fff;outline:0}.autocomplete__option--no-results{background-color:#fafafa;color:#646b6f;cursor:not-allowed}.autocomplete__hint,.autocomplete__input,.autocomplete__option{font-size:13px;line-height:1.25}.autocomplete__hint,.autocomplete__option{padding:5px}@media (min-width:641px){.autocomplete__hint,.autocomplete__input,.autocomplete__option{font-size:13px;line-height:1.31579}}.div-action{display:inline-block}.add-location{display:inline}.remove-location-button{margin:5px}.hide-autocomplete{display:none}.auto-complete-container{min-width:250px;display:inline-block;margin-right:4px}.autocomplete__input{line-height:24px;font-size:19px}"]
2938
+ },] }
2939
+ ];
2940
+ SearchServiceComponent.propDecorators = {
2941
+ services: [{ type: Input }],
2942
+ selectedServices: [{ type: Input }],
2943
+ disabled: [{ type: Input }],
2944
+ delay: [{ type: Input }],
2945
+ form: [{ type: Input }],
2946
+ showAutocomplete: [{ type: Input }]
2947
+ };
2948
+
2721
2949
  /*
2722
2950
  * Gov Uk Checkbox Dumb Component responsible for
2723
2951
  * displaying checkbox input and hint
@@ -3357,15 +3585,174 @@ RemoveHostDirective.ctorParameters = () => [
3357
3585
  { type: ElementRef }
3358
3586
  ];
3359
3587
 
3360
- class FeatureToggleGuard {
3361
- constructor(featureToggleService, router) {
3362
- this.featureToggleService = featureToggleService;
3363
- this.router = router;
3364
- }
3365
- /**
3366
- * Usage: Add the FeatureToggleGuard as the Guard for a route, and provide the following
3367
- * in the data array for the route:
3368
- * - needsFeaturesEnabled: An array of feature keys that need to be enabled for this route
3588
+ const COMMON_COMPONENTS = [
3589
+ ExuiPageWrapperComponent,
3590
+ TermsAndConditionsComponent,
3591
+ TcDisplayHtmlComponent,
3592
+ TcDisplayPlainComponent,
3593
+ TcConfirmComponent,
3594
+ ContactDetailsComponent,
3595
+ FeatureToggleDirective,
3596
+ LetDirective,
3597
+ HmctsSessionDialogComponent,
3598
+ UserListComponent,
3599
+ UserDetailsComponent,
3600
+ InviteUserPermissionComponent,
3601
+ InviteUserFormComponent,
3602
+ ShareCaseComponent,
3603
+ ShareCaseConfirmComponent,
3604
+ SelectedCaseListComponent,
3605
+ SelectedCaseComponent,
3606
+ SelectedCaseConfirmComponent,
3607
+ UserSelectComponent,
3608
+ TabComponent,
3609
+ AccessibilityComponent,
3610
+ DueDateComponent,
3611
+ CheckboxListComponent,
3612
+ ServiceMessageComponent,
3613
+ ServiceMessagesComponent,
3614
+ LoadingSpinnerComponent,
3615
+ GenericFilterComponent,
3616
+ CookieBannerComponent,
3617
+ FindPersonComponent,
3618
+ SearchJudicialsComponent,
3619
+ FindLocationComponent,
3620
+ SearchLocationComponent,
3621
+ FindServiceComponent,
3622
+ SearchServiceComponent,
3623
+ SearchVenueComponent,
3624
+ PaginationComponent
3625
+ ];
3626
+ const GOV_UI_COMPONENTS = [
3627
+ HmctsIdentityBarComponent,
3628
+ HmctsPaginationComponent,
3629
+ HmctsSubNavigationComponent,
3630
+ HmctsPrimaryNavigationComponent,
3631
+ HmctsErrorSummaryComponent,
3632
+ HmctsMainWrapperComponent,
3633
+ HmctsBannerComponent,
3634
+ GovukTableComponent,
3635
+ GovUkInputComponent,
3636
+ GovUkCheckboxComponent,
3637
+ GovUkFormGroupWrapperComponent,
3638
+ GovUkLabelComponent,
3639
+ GovUkErrorMessageComponent,
3640
+ GovUkFieldsetComponent,
3641
+ GovUkDateComponent,
3642
+ GovUkCheckboxesComponent,
3643
+ GovUkRadioComponent,
3644
+ GovUkRadiosComponent,
3645
+ GovUkSelectComponent,
3646
+ GovUkTextareaComponent,
3647
+ GovUkFileUploadComponent,
3648
+ RemoveHostDirective
3649
+ ];
3650
+ const ɵ0 = windowProvider;
3651
+ class ExuiCommonLibModule {
3652
+ }
3653
+ ExuiCommonLibModule.decorators = [
3654
+ { type: NgModule, args: [{
3655
+ declarations: [
3656
+ ...COMMON_COMPONENTS,
3657
+ ...GOV_UI_COMPONENTS
3658
+ ],
3659
+ imports: [
3660
+ CommonModule,
3661
+ FormsModule,
3662
+ ReactiveFormsModule,
3663
+ RouterModule.forChild([]),
3664
+ MatAutocompleteModule,
3665
+ MatTabsModule,
3666
+ MatInputModule,
3667
+ NgxPaginationModule
3668
+ ],
3669
+ providers: [
3670
+ { provide: windowToken, useFactory: ɵ0 }
3671
+ ],
3672
+ exports: [
3673
+ ...COMMON_COMPONENTS,
3674
+ ...GOV_UI_COMPONENTS,
3675
+ PaginatePipe
3676
+ ]
3677
+ },] }
3678
+ ];
3679
+
3680
+ class GovUiService {
3681
+ constructor() { }
3682
+ }
3683
+ GovUiService.ɵprov = i0.ɵɵdefineInjectable({ factory: function GovUiService_Factory() { return new GovUiService(); }, token: GovUiService, providedIn: "root" });
3684
+ GovUiService.decorators = [
3685
+ { type: Injectable, args: [{
3686
+ providedIn: 'root'
3687
+ },] }
3688
+ ];
3689
+ GovUiService.ctorParameters = () => [];
3690
+
3691
+ function checkboxesBeCheckedValidator(minRequired = 1) {
3692
+ return function validate(formGroup) {
3693
+ let checked = 0;
3694
+ Object.keys(formGroup.controls).forEach(key => {
3695
+ const control = formGroup.controls[key];
3696
+ if (control.value === true) {
3697
+ checked++;
3698
+ }
3699
+ });
3700
+ if (checked < minRequired) {
3701
+ return {
3702
+ requireOneCheckboxToBeChecked: true,
3703
+ };
3704
+ }
3705
+ return null;
3706
+ };
3707
+ }
3708
+
3709
+ function dateValidator() {
3710
+ return function validate(formGroup) {
3711
+ const d = new Date(parseInt(formGroup.controls.day.value, 10), parseInt(formGroup.controls.month.value, 10) - 1, parseInt(formGroup.controls.year.value, 10) - 1);
3712
+ function isValidDate(val) {
3713
+ return val instanceof Date && !isNaN(+d);
3714
+ }
3715
+ if (!isValidDate(d)) {
3716
+ return {
3717
+ dateIsInvalid: true,
3718
+ };
3719
+ }
3720
+ return null;
3721
+ };
3722
+ }
3723
+
3724
+ function radioGroupValidator() {
3725
+ return function validate(formGroup) {
3726
+ if (formGroup.controls) {
3727
+ for (const control in formGroup.controls) {
3728
+ if (!formGroup.controls[control].valid) {
3729
+ return {
3730
+ isRadioGroupInvalid: true,
3731
+ };
3732
+ }
3733
+ }
3734
+ }
3735
+ return null;
3736
+ };
3737
+ }
3738
+
3739
+ /*
3740
+ * Public API Surface of gov-ui
3741
+ */
3742
+
3743
+ /*
3744
+ * Public API Surface of gov-ui
3745
+ */
3746
+
3747
+ class FeatureToggleGuard {
3748
+ constructor(featureToggleService, router) {
3749
+ this.featureToggleService = featureToggleService;
3750
+ this.router = router;
3751
+ }
3752
+ /**
3753
+ * Usage: Add the FeatureToggleGuard as the Guard for a route, and provide the following
3754
+ * in the data array for the route:
3755
+ * - needsFeaturesEnabled: An array of feature keys that need to be enabled for this route
3369
3756
  * - featureDisabledRedirect: the URL to redirect to when the this route is not accessible due to disabled features
3370
3757
  * @param route Automatically provided by Angular
3371
3758
  */
@@ -3773,178 +4160,6 @@ LoadingService.decorators = [
3773
4160
  * Public API Surface of exui-common-lib
3774
4161
  */
3775
4162
 
3776
- const COMMON_COMPONENTS = [
3777
- ExuiPageWrapperComponent,
3778
- TermsAndConditionsComponent,
3779
- TcDisplayHtmlComponent,
3780
- TcDisplayPlainComponent,
3781
- TcConfirmComponent,
3782
- ContactDetailsComponent,
3783
- FeatureToggleDirective,
3784
- LetDirective,
3785
- HmctsSessionDialogComponent,
3786
- UserListComponent,
3787
- UserDetailsComponent,
3788
- InviteUserPermissionComponent,
3789
- InviteUserFormComponent,
3790
- ShareCaseComponent,
3791
- ShareCaseConfirmComponent,
3792
- SelectedCaseListComponent,
3793
- SelectedCaseComponent,
3794
- SelectedCaseConfirmComponent,
3795
- UserSelectComponent,
3796
- TabComponent,
3797
- AccessibilityComponent,
3798
- DueDateComponent,
3799
- CheckboxListComponent,
3800
- ServiceMessageComponent,
3801
- ServiceMessagesComponent,
3802
- LoadingSpinnerComponent,
3803
- GenericFilterComponent,
3804
- CookieBannerComponent,
3805
- FindPersonComponent,
3806
- SearchJudicialsComponent,
3807
- FindLocationComponent,
3808
- SearchLocationComponent,
3809
- SearchVenueComponent,
3810
- PaginationComponent
3811
- ];
3812
- const GOV_UI_COMPONENTS = [
3813
- HmctsIdentityBarComponent,
3814
- HmctsPaginationComponent,
3815
- HmctsSubNavigationComponent,
3816
- HmctsPrimaryNavigationComponent,
3817
- HmctsErrorSummaryComponent,
3818
- HmctsMainWrapperComponent,
3819
- HmctsBannerComponent,
3820
- GovukTableComponent,
3821
- GovUkInputComponent,
3822
- GovUkCheckboxComponent,
3823
- GovUkFormGroupWrapperComponent,
3824
- GovUkLabelComponent,
3825
- GovUkErrorMessageComponent,
3826
- GovUkFieldsetComponent,
3827
- GovUkDateComponent,
3828
- GovUkCheckboxesComponent,
3829
- GovUkRadioComponent,
3830
- GovUkRadiosComponent,
3831
- GovUkSelectComponent,
3832
- GovUkTextareaComponent,
3833
- GovUkFileUploadComponent,
3834
- RemoveHostDirective
3835
- ];
3836
- const COMMON_SERVICES = [
3837
- CaseSharingStateService,
3838
- CookieService,
3839
- LaunchDarklyService,
3840
- FilterService,
3841
- FindAPersonService,
3842
- GoogleAnalyticsService,
3843
- GoogleTagManagerService,
3844
- LoadingService,
3845
- LocationService,
3846
- ManageSessionServices,
3847
- SessionStorageService,
3848
- TimeoutNotificationsService
3849
- ];
3850
- const ɵ0 = windowProvider;
3851
- class ExuiCommonLibModule {
3852
- }
3853
- ExuiCommonLibModule.decorators = [
3854
- { type: NgModule, args: [{
3855
- declarations: [
3856
- ...COMMON_COMPONENTS,
3857
- ...GOV_UI_COMPONENTS
3858
- ],
3859
- imports: [
3860
- CommonModule,
3861
- FormsModule,
3862
- ReactiveFormsModule,
3863
- RouterModule.forChild([]),
3864
- MatAutocompleteModule,
3865
- MatTabsModule,
3866
- MatInputModule,
3867
- NgxPaginationModule
3868
- ],
3869
- providers: [
3870
- ...COMMON_SERVICES,
3871
- { provide: windowToken, useFactory: ɵ0 }
3872
- ],
3873
- exports: [
3874
- ...COMMON_COMPONENTS,
3875
- ...GOV_UI_COMPONENTS,
3876
- PaginatePipe
3877
- ]
3878
- },] }
3879
- ];
3880
-
3881
- class GovUiService {
3882
- constructor() { }
3883
- }
3884
- GovUiService.ɵprov = i0.ɵɵdefineInjectable({ factory: function GovUiService_Factory() { return new GovUiService(); }, token: GovUiService, providedIn: "root" });
3885
- GovUiService.decorators = [
3886
- { type: Injectable, args: [{
3887
- providedIn: 'root'
3888
- },] }
3889
- ];
3890
- GovUiService.ctorParameters = () => [];
3891
-
3892
- function checkboxesBeCheckedValidator(minRequired = 1) {
3893
- return function validate(formGroup) {
3894
- let checked = 0;
3895
- Object.keys(formGroup.controls).forEach(key => {
3896
- const control = formGroup.controls[key];
3897
- if (control.value === true) {
3898
- checked++;
3899
- }
3900
- });
3901
- if (checked < minRequired) {
3902
- return {
3903
- requireOneCheckboxToBeChecked: true,
3904
- };
3905
- }
3906
- return null;
3907
- };
3908
- }
3909
-
3910
- function dateValidator() {
3911
- return function validate(formGroup) {
3912
- const d = new Date(parseInt(formGroup.controls.day.value, 10), parseInt(formGroup.controls.month.value, 10) - 1, parseInt(formGroup.controls.year.value, 10) - 1);
3913
- function isValidDate(val) {
3914
- return val instanceof Date && !isNaN(+d);
3915
- }
3916
- if (!isValidDate(d)) {
3917
- return {
3918
- dateIsInvalid: true,
3919
- };
3920
- }
3921
- return null;
3922
- };
3923
- }
3924
-
3925
- function radioGroupValidator() {
3926
- return function validate(formGroup) {
3927
- if (formGroup.controls) {
3928
- for (const control in formGroup.controls) {
3929
- if (!formGroup.controls[control].valid) {
3930
- return {
3931
- isRadioGroupInvalid: true,
3932
- };
3933
- }
3934
- }
3935
- }
3936
- return null;
3937
- };
3938
- }
3939
-
3940
- /*
3941
- * Public API Surface of gov-ui
3942
- */
3943
-
3944
- /*
3945
- * Public API Surface of gov-ui
3946
- */
3947
-
3948
4163
  /*
3949
4164
  * Public API Surface of exui-common-lib
3950
4165
  */
@@ -3953,5 +4168,5 @@ function radioGroupValidator() {
3953
4168
  * Generated bundle index. Do not edit.
3954
4169
  */
3955
4170
 
3956
- export { AccessibilityComponent, AnonymousFeatureUser, BadgeColour, COMMON_COMPONENTS, COMMON_SERVICES, CaseSharingStateService, CheckboxListComponent, ContactDetailsComponent, CookieBannerComponent, CookieService, DateBadgeColour, DueDateComponent, ExuiCommonLibModule, ExuiPageWrapperComponent, FeatureToggleDirective, FeatureToggleGuard, FeatureToggleService, FilterService, FindAPersonService, FindLocationComponent, FindPersonComponent, GOV_UI_COMPONENTS, GenericFilterComponent, GoogleAnalyticsService, GoogleTagManagerService, GovUiService, GovUkCheckboxComponent, GovUkCheckboxesComponent, GovUkDateComponent, GovUkErrorMessageComponent, GovUkFieldsetComponent, GovUkFileUploadComponent, GovUkFormGroupWrapperComponent, GovUkInputComponent, GovUkLabelComponent, GovUkRadioComponent, GovUkRadiosComponent, GovUkSelectComponent, GovUkTextareaComponent, GovukTableColumnConfig, GovukTableComponent, HasLoadingState, HmctsBannerComponent, HmctsErrorSummaryComponent, HmctsIdentityBarComponent, HmctsMainWrapperComponent, HmctsPaginationComponent, HmctsPrimaryNavigationComponent, HmctsSessionDialogComponent, HmctsSubNavigationComponent, InviteUserFormComponent, InviteUserPermissionComponent, LaunchDarklyService, LetContext, LetDirective, LoadingService, LoadingSpinnerComponent, LocationService, LoggedInFeatureUser, ManageSessionServices, PaginationComponent, PersonRole, RadioFilterFieldConfig, RemoveHostDirective, RoleCategory, RoleGuard, RoleMatching, RoleService, SECONDS_IN_A_DAY, SearchJudicialsComponent, SearchLocationComponent, SearchVenueComponent, SelectedCaseComponent, SelectedCaseConfirmComponent, SelectedCaseListComponent, ServiceMessageComponent, ServiceMessagesComponent, SessionStorageService, ShareCaseComponent, ShareCaseConfirmComponent, TabComponent, TcConfirmComponent, TcDisplayHtmlComponent, TcDisplayPlainComponent, TermsAndConditionsComponent, TimeoutNotificationsService, UserDetailsComponent, UserListComponent, UserSelectComponent, checkboxesBeCheckedValidator, dateValidator, radioGroupValidator, windowProvider, windowToken, ɵ0, ExuiPageWrapperComponent as ɵa, TermsAndConditionsComponent as ɵb, ServiceMessageComponent as ɵba, ServiceMessagesComponent as ɵbb, LoadingSpinnerComponent as ɵbc, GenericFilterComponent as ɵbd, FilterService as ɵbe, CookieBannerComponent as ɵbf, CookieService as ɵbg, FindPersonComponent as ɵbh, FindAPersonService as ɵbi, SessionStorageService as ɵbj, SearchJudicialsComponent as ɵbk, FindLocationComponent as ɵbl, SearchLocationComponent as ɵbm, LocationService as ɵbn, SearchVenueComponent as ɵbo, PaginationComponent as ɵbp, HmctsIdentityBarComponent as ɵbq, HmctsPaginationComponent as ɵbr, HmctsSubNavigationComponent as ɵbs, HmctsPrimaryNavigationComponent as ɵbt, HmctsErrorSummaryComponent as ɵbu, HmctsMainWrapperComponent as ɵbv, HmctsBannerComponent as ɵbw, GovukTableComponent as ɵbx, GovUkInputComponent as ɵby, GovUkCheckboxComponent as ɵbz, TcDisplayHtmlComponent as ɵc, GovUkFormGroupWrapperComponent as ɵca, GovUkLabelComponent as ɵcb, GovUkErrorMessageComponent as ɵcc, GovUkFieldsetComponent as ɵcd, GovUkDateComponent as ɵce, GovUkCheckboxesComponent as ɵcf, GovUkRadioComponent as ɵcg, GovUkRadiosComponent as ɵch, GovUkSelectComponent as ɵci, GovUkTextareaComponent as ɵcj, GovUkFileUploadComponent as ɵck, RemoveHostDirective as ɵcl, CaseSharingStateService as ɵcm, CookieService as ɵcn, LaunchDarklyService as ɵco, FilterService as ɵcp, FindAPersonService as ɵcq, GoogleAnalyticsService as ɵcr, GoogleTagManagerService as ɵcs, LoadingService as ɵct, LocationService as ɵcu, ManageSessionServices as ɵcv, SessionStorageService as ɵcw, TimeoutNotificationsService as ɵcx, TcDisplayPlainComponent as ɵd, TcConfirmComponent as ɵe, ContactDetailsComponent as ɵf, FeatureToggleDirective as ɵg, FeatureToggleService as ɵh, LetContext as ɵi, LetDirective as ɵj, HmctsSessionDialogComponent as ɵk, UserListComponent as ɵl, UserDetailsComponent as ɵm, InviteUserPermissionComponent as ɵn, InviteUserFormComponent as ɵo, ShareCaseComponent as ɵp, UserSelectComponent as ɵq, CaseSharingStateService as ɵr, ShareCaseConfirmComponent as ɵs, SelectedCaseListComponent as ɵt, SelectedCaseComponent as ɵu, SelectedCaseConfirmComponent as ɵv, TabComponent as ɵw, AccessibilityComponent as ɵx, DueDateComponent as ɵy, CheckboxListComponent as ɵz };
4171
+ export { AccessibilityComponent, AnonymousFeatureUser, BadgeColour, BookingCheckType, COMMON_COMPONENTS, CheckboxListComponent, ContactDetailsComponent, CookieBannerComponent, CookieService, DateBadgeColour, DueDateComponent, ExuiCommonLibModule, ExuiPageWrapperComponent, FeatureToggleDirective, FeatureToggleGuard, FeatureToggleService, FilterService, FindLocationComponent, FindPersonComponent, GOV_UI_COMPONENTS, GenericFilterComponent, GoogleAnalyticsService, GoogleTagManagerService, GovUiService, GovUkCheckboxComponent, GovUkCheckboxesComponent, GovUkDateComponent, GovUkErrorMessageComponent, GovUkFieldsetComponent, GovUkFileUploadComponent, GovUkFormGroupWrapperComponent, GovUkInputComponent, GovUkLabelComponent, GovUkRadioComponent, GovUkRadiosComponent, GovUkSelectComponent, GovUkTextareaComponent, GovukTableColumnConfig, GovukTableComponent, HasLoadingState, HmctsBannerComponent, HmctsErrorSummaryComponent, HmctsIdentityBarComponent, HmctsMainWrapperComponent, HmctsPaginationComponent, HmctsPrimaryNavigationComponent, HmctsSessionDialogComponent, HmctsSubNavigationComponent, InviteUserFormComponent, InviteUserPermissionComponent, LaunchDarklyService, LetContext, LetDirective, LoadingService, LoadingSpinnerComponent, LoggedInFeatureUser, ManageSessionServices, PaginationComponent, PersonRole, RadioFilterFieldConfig, RemoveHostDirective, RoleCategory, RoleGuard, RoleMatching, RoleService, SECONDS_IN_A_DAY, SearchJudicialsComponent, SearchLocationComponent, SearchVenueComponent, SelectedCaseComponent, SelectedCaseConfirmComponent, SelectedCaseListComponent, ServiceMessageComponent, ServiceMessagesComponent, ShareCaseComponent, ShareCaseConfirmComponent, SharedCaseErrorMessages, TabComponent, TcConfirmComponent, TcDisplayHtmlComponent, TcDisplayPlainComponent, TermsAndConditionsComponent, TimeoutNotificationsService, UserDetailsComponent, UserListComponent, UserSelectComponent, checkboxesBeCheckedValidator, dateValidator, radioGroupValidator, windowProvider, windowToken, ɵ0, ExuiPageWrapperComponent as ɵa, TermsAndConditionsComponent as ɵb, ServiceMessageComponent as ɵba, ServiceMessagesComponent as ɵbb, LoadingSpinnerComponent as ɵbc, GenericFilterComponent as ɵbd, FilterService as ɵbe, CookieBannerComponent as ɵbf, CookieService as ɵbg, FindPersonComponent as ɵbh, FindAPersonService as ɵbi, SessionStorageService as ɵbj, SearchJudicialsComponent as ɵbk, FindLocationComponent as ɵbl, SearchLocationComponent as ɵbm, LocationService as ɵbn, FindServiceComponent as ɵbo, SearchServiceComponent as ɵbp, SearchVenueComponent as ɵbq, PaginationComponent as ɵbr, HmctsIdentityBarComponent as ɵbs, HmctsPaginationComponent as ɵbt, HmctsSubNavigationComponent as ɵbu, HmctsPrimaryNavigationComponent as ɵbv, HmctsErrorSummaryComponent as ɵbw, HmctsMainWrapperComponent as ɵbx, HmctsBannerComponent as ɵby, GovukTableComponent as ɵbz, TcDisplayHtmlComponent as ɵc, GovUkInputComponent as ɵca, GovUkCheckboxComponent as ɵcb, GovUkFormGroupWrapperComponent as ɵcc, GovUkLabelComponent as ɵcd, GovUkErrorMessageComponent as ɵce, GovUkFieldsetComponent as ɵcf, GovUkDateComponent as ɵcg, GovUkCheckboxesComponent as ɵch, GovUkRadioComponent as ɵci, GovUkRadiosComponent as ɵcj, GovUkSelectComponent as ɵck, GovUkTextareaComponent as ɵcl, GovUkFileUploadComponent as ɵcm, RemoveHostDirective as ɵcn, TcDisplayPlainComponent as ɵd, TcConfirmComponent as ɵe, ContactDetailsComponent as ɵf, FeatureToggleDirective as ɵg, FeatureToggleService as ɵh, LetContext as ɵi, LetDirective as ɵj, HmctsSessionDialogComponent as ɵk, UserListComponent as ɵl, UserDetailsComponent as ɵm, InviteUserPermissionComponent as ɵn, InviteUserFormComponent as ɵo, ShareCaseComponent as ɵp, UserSelectComponent as ɵq, CaseSharingStateService as ɵr, ShareCaseConfirmComponent as ɵs, SelectedCaseListComponent as ɵt, SelectedCaseComponent as ɵu, SelectedCaseConfirmComponent as ɵv, TabComponent as ɵw, AccessibilityComponent as ɵx, DueDateComponent as ɵy, CheckboxListComponent as ɵz };
3957
4172
  //# sourceMappingURL=hmcts-rpx-xui-common-lib.js.map