@hmcts/rpx-xui-common-lib 3.2.8 → 3.2.9-ga-rc1

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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, EventEmitter, ViewEncapsulation, Input, Output, Injectable, InjectionToken, DOCUMENT, Inject, ViewChild, Pipe, ChangeDetectionStrategy, Directive, ElementRef, NgModule } from '@angular/core';
2
+ import { Component, EventEmitter, ViewEncapsulation, Input, Output, Injectable, InjectionToken, DOCUMENT, Inject, ViewChild, Pipe, ChangeDetectionStrategy, Directive, SecurityContext, ElementRef, NgModule } from '@angular/core';
3
3
  import * as i2 from 'rpx-xui-translation';
4
4
  import { RpxTranslationModule } from 'rpx-xui-translation';
5
5
  import * as i1 from '@angular/common';
@@ -6502,16 +6502,21 @@ function ServiceMessageComponent_Conditional_8_Template(rf, ctx) { if (rf & 1) {
6502
6502
  i0.ɵɵelement(0, "h2", 5);
6503
6503
  } if (rf & 2) {
6504
6504
  const ctx_r0 = i0.ɵɵnextContext();
6505
- i0.ɵɵproperty("innerHTML", ctx_r0.message_cy, i0.ɵɵsanitizeHtml);
6505
+ i0.ɵɵproperty("innerHTML", ctx_r0.sanitizeHtml(ctx_r0.message_cy), i0.ɵɵsanitizeHtml);
6506
6506
  } }
6507
6507
  class ServiceMessageComponent {
6508
- constructor() {
6508
+ constructor(sanitizer) {
6509
+ this.sanitizer = sanitizer;
6509
6510
  this.hideMessage = new EventEmitter();
6510
6511
  }
6511
6512
  onHideMessageEvent(key) {
6512
6513
  this.hideMessage.emit(key);
6513
6514
  }
6514
- static { this.ɵfac = function ServiceMessageComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ServiceMessageComponent)(); }; }
6515
+ // ensure no dangerous HTML is rendered in the service message banner
6516
+ sanitizeHtml(content) {
6517
+ return this.sanitizer.sanitize(SecurityContext.HTML, content ?? '') ?? '';
6518
+ }
6519
+ static { this.ɵfac = function ServiceMessageComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ServiceMessageComponent)(i0.ɵɵdirectiveInject(i2$1.DomSanitizer)); }; }
6515
6520
  static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ServiceMessageComponent, selectors: [["xuilib-service-message"]], inputs: { message_en: "message_en", message_cy: "message_cy", key: "key" }, outputs: { hideMessage: "hideMessage" }, standalone: false, decls: 12, vars: 8, consts: [[1, "hmcts-banner", "hmcts-banner--warning"], ["fill", "currentColor", "role", "img", "aria-label", "hmcts-warning-icon", "focusable", "false", "xmlns", "http://www.w3.org/2000/svg", "viewBox", "0 0 25 25", "height", "25", "width", "25", 1, "hmcts-banner__icon"], ["d", "M13.6,15.4h-2.3v-4.5h2.3V15.4z M13.6,19.8h-2.3v-2.2h2.3V19.8z M0,23.2h25L12.5,2L0,23.2z"], [1, "hmcts-banner__message"], [1, "hmcts-banner__assistive"], [1, "govuk-heading-s", 3, "innerHTML"], ["tabindex", "0", 1, "govuk-link--no-visited-state", 3, "click", "keyup.enter", "routerLink"]], template: function ServiceMessageComponent_Template(rf, ctx) { if (rf & 1) {
6516
6521
  i0.ɵɵelementStart(0, "div", 0);
6517
6522
  i0.ɵɵnamespaceSVG();
@@ -6534,7 +6539,7 @@ class ServiceMessageComponent {
6534
6539
  i0.ɵɵadvance(5);
6535
6540
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 4, "Warning"));
6536
6541
  i0.ɵɵadvance(2);
6537
- i0.ɵɵproperty("innerHTML", ctx.message_en, i0.ɵɵsanitizeHtml);
6542
+ i0.ɵɵproperty("innerHTML", ctx.sanitizeHtml(ctx.message_en), i0.ɵɵsanitizeHtml);
6538
6543
  i0.ɵɵadvance();
6539
6544
  i0.ɵɵconditional(ctx.message_cy ? 8 : -1);
6540
6545
  i0.ɵɵadvance(2);
@@ -6543,8 +6548,8 @@ class ServiceMessageComponent {
6543
6548
  }
6544
6549
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ServiceMessageComponent, [{
6545
6550
  type: Component,
6546
- args: [{ selector: 'xuilib-service-message', standalone: false, template: "<div class=\"hmcts-banner hmcts-banner--warning\">\n\n <svg class=\"hmcts-banner__icon\" fill=\"currentColor\" role=\"img\" aria-label=\"hmcts-warning-icon\" focusable=\"false\"\n xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 25 25\" height=\"25\" width=\"25\">\n <path d=\"M13.6,15.4h-2.3v-4.5h2.3V15.4z M13.6,19.8h-2.3v-2.2h2.3V19.8z M0,23.2h25L12.5,2L0,23.2z\" />\n </svg>\n\n <div class=\"hmcts-banner__message\">\n <span class=\"hmcts-banner__assistive\">{{'Warning' | rpxTranslate}}</span>\n <h2 class=\"govuk-heading-s\" [innerHTML]=\"message_en\"></h2>\n @if (message_cy) {\n <h2 class=\"govuk-heading-s\" [innerHTML]=\"message_cy\"></h2>\n }\n <a [routerLink]=\"\" tabindex=\"0\" class=\"govuk-link--no-visited-state\" (click)=\"onHideMessageEvent(key)\" (keyup.enter)=\"onHideMessageEvent(key)\">{{'Hide message' | rpxTranslate}}</a>\n </div>\n\n</div>", styles: [".govuk-link--no-visited-state{cursor:pointer}\n"] }]
6547
- }], () => [], { message_en: [{
6551
+ args: [{ selector: 'xuilib-service-message', standalone: false, template: "<div class=\"hmcts-banner hmcts-banner--warning\">\n\n <svg class=\"hmcts-banner__icon\" fill=\"currentColor\" role=\"img\" aria-label=\"hmcts-warning-icon\" focusable=\"false\"\n xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 25 25\" height=\"25\" width=\"25\">\n <path d=\"M13.6,15.4h-2.3v-4.5h2.3V15.4z M13.6,19.8h-2.3v-2.2h2.3V19.8z M0,23.2h25L12.5,2L0,23.2z\" />\n </svg>\n\n <div class=\"hmcts-banner__message\">\n <span class=\"hmcts-banner__assistive\">{{'Warning' | rpxTranslate}}</span>\n <h2 class=\"govuk-heading-s\" [innerHTML]=\"sanitizeHtml(message_en)\"></h2>\n @if (message_cy) {\n <h2 class=\"govuk-heading-s\" [innerHTML]=\"sanitizeHtml(message_cy)\"></h2>\n }\n <a [routerLink]=\"\" tabindex=\"0\" class=\"govuk-link--no-visited-state\" (click)=\"onHideMessageEvent(key)\" (keyup.enter)=\"onHideMessageEvent(key)\">{{'Hide message' | rpxTranslate}}</a>\n </div>\n\n</div>", styles: [".govuk-link--no-visited-state{cursor:pointer}\n"] }]
6552
+ }], () => [{ type: i2$1.DomSanitizer }], { message_en: [{
6548
6553
  type: Input
6549
6554
  }], message_cy: [{
6550
6555
  type: Input
@@ -6553,7 +6558,7 @@ class ServiceMessageComponent {
6553
6558
  }], hideMessage: [{
6554
6559
  type: Output
6555
6560
  }] }); })();
6556
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ServiceMessageComponent, { className: "ServiceMessageComponent", filePath: "lib/components/service-message/service-message.component.ts", lineNumber: 10 }); })();
6561
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ServiceMessageComponent, { className: "ServiceMessageComponent", filePath: "lib/components/service-message/service-message.component.ts", lineNumber: 11 }); })();
6557
6562
 
6558
6563
  function ServiceMessagesComponent_Conditional_0_For_2_Template(rf, ctx) { if (rf & 1) {
6559
6564
  i0.ɵɵelementStart(0, "div", 1);
@@ -7560,7 +7565,7 @@ function TermsAndConditionsComponent_Case_0_Template(rf, ctx) { if (rf & 1) {
7560
7565
  } if (rf & 2) {
7561
7566
  const ctx_r0 = i0.ɵɵnextContext();
7562
7567
  i0.ɵɵadvance();
7563
- i0.ɵɵproperty("innerHTML", i0.ɵɵpipeBind1(2, 1, ctx_r0.document.content), i0.ɵɵsanitizeHtml);
7568
+ i0.ɵɵproperty("innerHTML", ctx_r0.sanitizeHtml(i0.ɵɵpipeBind1(2, 1, ctx_r0.document.content)), i0.ɵɵsanitizeHtml);
7564
7569
  } }
7565
7570
  function TermsAndConditionsComponent_Case_1_Template(rf, ctx) { if (rf & 1) {
7566
7571
  i0.ɵɵelementStart(0, "xuilib-tc-display-plain");
@@ -7582,8 +7587,14 @@ function TermsAndConditionsComponent_Case_2_Template(rf, ctx) { if (rf & 1) {
7582
7587
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "An error occured. Please try again."), " ");
7583
7588
  } }
7584
7589
  class TermsAndConditionsComponent {
7585
- constructor() { }
7586
- static { this.ɵfac = function TermsAndConditionsComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TermsAndConditionsComponent)(); }; }
7590
+ constructor(sanitizer) {
7591
+ this.sanitizer = sanitizer;
7592
+ }
7593
+ // ensure no dangerous HTML is rendered in the terms and conditions document
7594
+ sanitizeHtml(content) {
7595
+ return this.sanitizer.sanitize(SecurityContext.HTML, content ?? '') ?? '';
7596
+ }
7597
+ static { this.ɵfac = function TermsAndConditionsComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TermsAndConditionsComponent)(i0.ɵɵdirectiveInject(i2$1.DomSanitizer)); }; }
7587
7598
  static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TermsAndConditionsComponent, selectors: [["xuilib-terms-and-conditions"]], inputs: { document: "document" }, standalone: false, decls: 3, vars: 1, consts: [[3, "innerHTML"]], template: function TermsAndConditionsComponent_Template(rf, ctx) { if (rf & 1) {
7588
7599
  i0.ɵɵconditionalCreate(0, TermsAndConditionsComponent_Case_0_Template, 3, 3, "xuilib-tc-display-html")(1, TermsAndConditionsComponent_Case_1_Template, 3, 3, "xuilib-tc-display-plain")(2, TermsAndConditionsComponent_Case_2_Template, 3, 3, "div");
7589
7600
  } if (rf & 2) {
@@ -7593,11 +7604,11 @@ class TermsAndConditionsComponent {
7593
7604
  }
7594
7605
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TermsAndConditionsComponent, [{
7595
7606
  type: Component,
7596
- args: [{ selector: 'xuilib-terms-and-conditions', standalone: false, template: "\n@switch (document.mimeType) {\n @case ('text/html') {\n <xuilib-tc-display-html>\n <div [innerHTML]=\"document.content | rpxTranslate\"></div>\n </xuilib-tc-display-html>\n }\n @case ('text/plain') {\n <xuilib-tc-display-plain>\n {{ document.content | rpxTranslate}}\n </xuilib-tc-display-plain>\n }\n @default {\n <div>\n {{'An error occured. Please try again.' | rpxTranslate}}\n </div>\n }\n}\n", styles: [":host{display:block;width:100%}\n"] }]
7597
- }], () => [], { document: [{
7607
+ args: [{ selector: 'xuilib-terms-and-conditions', standalone: false, template: "\n@switch (document.mimeType) {\n @case ('text/html') {\n <xuilib-tc-display-html>\n <div [innerHTML]=\"sanitizeHtml(document.content | rpxTranslate)\"></div>\n </xuilib-tc-display-html>\n }\n @case ('text/plain') {\n <xuilib-tc-display-plain>\n {{ document.content | rpxTranslate}}\n </xuilib-tc-display-plain>\n }\n @default {\n <div>\n {{'An error occured. Please try again.' | rpxTranslate}}\n </div>\n }\n}\n", styles: [":host{display:block;width:100%}\n"] }]
7608
+ }], () => [{ type: i2$1.DomSanitizer }], { document: [{
7598
7609
  type: Input
7599
7610
  }] }); })();
7600
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TermsAndConditionsComponent, { className: "TermsAndConditionsComponent", filePath: "lib/components/terms-and-conditions/terms-and-conditions.component.ts", lineNumber: 10 }); })();
7611
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TermsAndConditionsComponent, { className: "TermsAndConditionsComponent", filePath: "lib/components/terms-and-conditions/terms-and-conditions.component.ts", lineNumber: 11 }); })();
7601
7612
 
7602
7613
  function UserDetailsComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
7603
7614
  i0.ɵɵelementStart(0, "div", 0)(1, "span", 4);
@@ -7615,7 +7626,7 @@ function UserDetailsComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
7615
7626
  i0.ɵɵadvance(6);
7616
7627
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(7, 1, ctx_r0.warningTitle), " ");
7617
7628
  } }
7618
- function UserDetailsComponent_Conditional_1_Conditional_17_Conditional_5_Template(rf, ctx) { if (rf & 1) {
7629
+ function UserDetailsComponent_Conditional_1_Conditional_15_Conditional_5_Template(rf, ctx) { if (rf & 1) {
7619
7630
  i0.ɵɵelementStart(0, "div");
7620
7631
  i0.ɵɵtext(1);
7621
7632
  i0.ɵɵpipe(2, "rpxTranslate");
@@ -7624,7 +7635,7 @@ function UserDetailsComponent_Conditional_1_Conditional_17_Conditional_5_Templat
7624
7635
  i0.ɵɵadvance();
7625
7636
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "Manage organisations"));
7626
7637
  } }
7627
- function UserDetailsComponent_Conditional_1_Conditional_17_Conditional_6_Template(rf, ctx) { if (rf & 1) {
7638
+ function UserDetailsComponent_Conditional_1_Conditional_15_Conditional_6_Template(rf, ctx) { if (rf & 1) {
7628
7639
  i0.ɵɵelementStart(0, "div");
7629
7640
  i0.ɵɵtext(1);
7630
7641
  i0.ɵɵpipe(2, "rpxTranslate");
@@ -7633,7 +7644,7 @@ function UserDetailsComponent_Conditional_1_Conditional_17_Conditional_6_Templat
7633
7644
  i0.ɵɵadvance();
7634
7645
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "Manage users"));
7635
7646
  } }
7636
- function UserDetailsComponent_Conditional_1_Conditional_17_Conditional_7_Template(rf, ctx) { if (rf & 1) {
7647
+ function UserDetailsComponent_Conditional_1_Conditional_15_Conditional_7_Template(rf, ctx) { if (rf & 1) {
7637
7648
  i0.ɵɵelementStart(0, "div");
7638
7649
  i0.ɵɵtext(1);
7639
7650
  i0.ɵɵpipe(2, "rpxTranslate");
@@ -7642,7 +7653,7 @@ function UserDetailsComponent_Conditional_1_Conditional_17_Conditional_7_Templat
7642
7653
  i0.ɵɵadvance();
7643
7654
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "Manage cases"));
7644
7655
  } }
7645
- function UserDetailsComponent_Conditional_1_Conditional_17_Conditional_8_Template(rf, ctx) { if (rf & 1) {
7656
+ function UserDetailsComponent_Conditional_1_Conditional_15_Conditional_8_Template(rf, ctx) { if (rf & 1) {
7646
7657
  i0.ɵɵelementStart(0, "div");
7647
7658
  i0.ɵɵtext(1);
7648
7659
  i0.ɵɵpipe(2, "rpxTranslate");
@@ -7651,7 +7662,7 @@ function UserDetailsComponent_Conditional_1_Conditional_17_Conditional_8_Templat
7651
7662
  i0.ɵɵadvance();
7652
7663
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "Case access administrator"));
7653
7664
  } }
7654
- function UserDetailsComponent_Conditional_1_Conditional_17_Conditional_9_Template(rf, ctx) { if (rf & 1) {
7665
+ function UserDetailsComponent_Conditional_1_Conditional_15_Conditional_9_Template(rf, ctx) { if (rf & 1) {
7655
7666
  i0.ɵɵelementStart(0, "div");
7656
7667
  i0.ɵɵtext(1);
7657
7668
  i0.ɵɵpipe(2, "rpxTranslate");
@@ -7660,7 +7671,7 @@ function UserDetailsComponent_Conditional_1_Conditional_17_Conditional_9_Templat
7660
7671
  i0.ɵɵadvance();
7661
7672
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "Manage fee accounts"));
7662
7673
  } }
7663
- function UserDetailsComponent_Conditional_1_Conditional_17_For_11_Template(rf, ctx) { if (rf & 1) {
7674
+ function UserDetailsComponent_Conditional_1_Conditional_15_For_11_Template(rf, ctx) { if (rf & 1) {
7664
7675
  i0.ɵɵelementStart(0, "div");
7665
7676
  i0.ɵɵtext(1);
7666
7677
  i0.ɵɵpipe(2, "rpxTranslate");
@@ -7670,38 +7681,38 @@ function UserDetailsComponent_Conditional_1_Conditional_17_For_11_Template(rf, c
7670
7681
  i0.ɵɵadvance();
7671
7682
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, accesstype_r2));
7672
7683
  } }
7673
- function UserDetailsComponent_Conditional_1_Conditional_17_Conditional_13_Template(rf, ctx) { if (rf & 1) {
7674
- i0.ɵɵelementStart(0, "a", 11);
7675
- i0.ɵɵtext(1);
7676
- i0.ɵɵpipe(2, "rpxTranslate");
7677
- i0.ɵɵelementStart(3, "span", 5);
7678
- i0.ɵɵtext(4);
7679
- i0.ɵɵpipe(5, "rpxTranslate");
7680
- i0.ɵɵelementEnd()();
7684
+ function UserDetailsComponent_Conditional_1_Conditional_15_Conditional_12_Template(rf, ctx) { if (rf & 1) {
7685
+ i0.ɵɵelementStart(0, "dd", 11)(1, "a", 12);
7686
+ i0.ɵɵtext(2);
7687
+ i0.ɵɵpipe(3, "rpxTranslate");
7688
+ i0.ɵɵelementStart(4, "span", 5);
7689
+ i0.ɵɵtext(5);
7690
+ i0.ɵɵpipe(6, "rpxTranslate");
7691
+ i0.ɵɵelementEnd()()();
7681
7692
  } if (rf & 2) {
7682
7693
  const ctx_r0 = i0.ɵɵnextContext(3);
7694
+ i0.ɵɵadvance();
7683
7695
  i0.ɵɵproperty("routerLink", ctx_r0.editPermissionRouterLink);
7684
7696
  i0.ɵɵadvance();
7685
- i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(2, 3, "Change"), " ");
7697
+ i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(3, 3, "Change"), " ");
7686
7698
  i0.ɵɵadvance(3);
7687
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 5, "roles"));
7699
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 5, "roles"));
7688
7700
  } }
7689
- function UserDetailsComponent_Conditional_1_Conditional_17_Template(rf, ctx) { if (rf & 1) {
7701
+ function UserDetailsComponent_Conditional_1_Conditional_15_Template(rf, ctx) { if (rf & 1) {
7690
7702
  i0.ɵɵelementStart(0, "div", 8)(1, "dt", 9);
7691
7703
  i0.ɵɵtext(2);
7692
7704
  i0.ɵɵpipe(3, "rpxTranslate");
7693
7705
  i0.ɵɵelementEnd();
7694
- i0.ɵɵelementStart(4, "dd", 10);
7695
- i0.ɵɵconditionalCreate(5, UserDetailsComponent_Conditional_1_Conditional_17_Conditional_5_Template, 3, 3, "div");
7696
- i0.ɵɵconditionalCreate(6, UserDetailsComponent_Conditional_1_Conditional_17_Conditional_6_Template, 3, 3, "div");
7697
- i0.ɵɵconditionalCreate(7, UserDetailsComponent_Conditional_1_Conditional_17_Conditional_7_Template, 3, 3, "div");
7698
- i0.ɵɵconditionalCreate(8, UserDetailsComponent_Conditional_1_Conditional_17_Conditional_8_Template, 3, 3, "div");
7699
- i0.ɵɵconditionalCreate(9, UserDetailsComponent_Conditional_1_Conditional_17_Conditional_9_Template, 3, 3, "div");
7700
- i0.ɵɵrepeaterCreate(10, UserDetailsComponent_Conditional_1_Conditional_17_For_11_Template, 3, 3, "div", null, i0.ɵɵrepeaterTrackByIdentity);
7706
+ i0.ɵɵelementStart(4, "dd", 11);
7707
+ i0.ɵɵconditionalCreate(5, UserDetailsComponent_Conditional_1_Conditional_15_Conditional_5_Template, 3, 3, "div");
7708
+ i0.ɵɵconditionalCreate(6, UserDetailsComponent_Conditional_1_Conditional_15_Conditional_6_Template, 3, 3, "div");
7709
+ i0.ɵɵconditionalCreate(7, UserDetailsComponent_Conditional_1_Conditional_15_Conditional_7_Template, 3, 3, "div");
7710
+ i0.ɵɵconditionalCreate(8, UserDetailsComponent_Conditional_1_Conditional_15_Conditional_8_Template, 3, 3, "div");
7711
+ i0.ɵɵconditionalCreate(9, UserDetailsComponent_Conditional_1_Conditional_15_Conditional_9_Template, 3, 3, "div");
7712
+ i0.ɵɵrepeaterCreate(10, UserDetailsComponent_Conditional_1_Conditional_15_For_11_Template, 3, 3, "div", null, i0.ɵɵrepeaterTrackByIdentity);
7713
+ i0.ɵɵelementEnd();
7714
+ i0.ɵɵconditionalCreate(12, UserDetailsComponent_Conditional_1_Conditional_15_Conditional_12_Template, 7, 7, "dd", 11);
7701
7715
  i0.ɵɵelementEnd();
7702
- i0.ɵɵelementStart(12, "dd", 10);
7703
- i0.ɵɵconditionalCreate(13, UserDetailsComponent_Conditional_1_Conditional_17_Conditional_13_Template, 6, 7, "a", 11);
7704
- i0.ɵɵelementEnd()();
7705
7716
  } if (rf & 2) {
7706
7717
  const ctx_r0 = i0.ɵɵnextContext(2);
7707
7718
  i0.ɵɵadvance(2);
@@ -7718,8 +7729,8 @@ function UserDetailsComponent_Conditional_1_Conditional_17_Template(rf, ctx) { i
7718
7729
  i0.ɵɵconditional(ctx_r0.userHasRole("pui-finance-manager") ? 9 : -1);
7719
7730
  i0.ɵɵadvance();
7720
7731
  i0.ɵɵrepeater(ctx_r0.enabledAccessTypes);
7721
- i0.ɵɵadvance(3);
7722
- i0.ɵɵconditional(ctx_r0.editPermissionRouterLink && ctx_r0.showEditLink ? 13 : -1);
7732
+ i0.ɵɵadvance(2);
7733
+ i0.ɵɵconditional(ctx_r0.editPermissionRouterLink && ctx_r0.showEditLink ? 12 : -1);
7723
7734
  } }
7724
7735
  function UserDetailsComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
7725
7736
  i0.ɵɵelementStart(0, "dl", 1)(1, "div", 7)(2, "div", 8)(3, "dt", 9);
@@ -7729,19 +7740,15 @@ function UserDetailsComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
7729
7740
  i0.ɵɵelementStart(6, "dd", 10);
7730
7741
  i0.ɵɵtext(7);
7731
7742
  i0.ɵɵpipe(8, "rpxTranslate");
7743
+ i0.ɵɵelementEnd()();
7744
+ i0.ɵɵelementStart(9, "div", 8)(10, "dt", 9);
7745
+ i0.ɵɵtext(11);
7746
+ i0.ɵɵpipe(12, "rpxTranslate");
7732
7747
  i0.ɵɵelementEnd();
7733
- i0.ɵɵelement(9, "dd", 10);
7734
- i0.ɵɵelementEnd();
7735
- i0.ɵɵelementStart(10, "div", 8)(11, "dt", 9);
7736
- i0.ɵɵtext(12);
7737
- i0.ɵɵpipe(13, "rpxTranslate");
7738
- i0.ɵɵelementEnd();
7739
- i0.ɵɵelementStart(14, "dd", 10);
7740
- i0.ɵɵtext(15);
7741
- i0.ɵɵelementEnd();
7742
- i0.ɵɵelement(16, "dd", 10);
7743
- i0.ɵɵelementEnd();
7744
- i0.ɵɵconditionalCreate(17, UserDetailsComponent_Conditional_1_Conditional_17_Template, 14, 9, "div", 8);
7748
+ i0.ɵɵelementStart(13, "dd", 10);
7749
+ i0.ɵɵtext(14);
7750
+ i0.ɵɵelementEnd()();
7751
+ i0.ɵɵconditionalCreate(15, UserDetailsComponent_Conditional_1_Conditional_15_Template, 13, 9, "div", 8);
7745
7752
  i0.ɵɵelementEnd()();
7746
7753
  } if (rf & 2) {
7747
7754
  const ctx_r0 = i0.ɵɵnextContext();
@@ -7749,16 +7756,16 @@ function UserDetailsComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
7749
7756
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 5, "Name"));
7750
7757
  i0.ɵɵadvance(3);
7751
7758
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(8, 7, ctx_r0.user.fullName));
7752
- i0.ɵɵadvance(5);
7753
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(13, 9, "Email address"));
7759
+ i0.ɵɵadvance(4);
7760
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(12, 9, "Email address"));
7754
7761
  i0.ɵɵadvance(3);
7755
7762
  i0.ɵɵtextInterpolate(ctx_r0.user.email);
7756
- i0.ɵɵadvance(2);
7757
- i0.ɵɵconditional(!ctx_r0.user.resendInvite ? 17 : -1);
7763
+ i0.ɵɵadvance();
7764
+ i0.ɵɵconditional(!ctx_r0.user.resendInvite ? 15 : -1);
7758
7765
  } }
7759
7766
  function UserDetailsComponent_Conditional_2_Template(rf, ctx) { if (rf & 1) {
7760
7767
  const _r3 = i0.ɵɵgetCurrentView();
7761
- i0.ɵɵelementStart(0, "button", 12);
7768
+ i0.ɵɵelementStart(0, "button", 13);
7762
7769
  i0.ɵɵlistener("click", function UserDetailsComponent_Conditional_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.suspendUser(ctx_r0.user)); })("keyup.enter", function UserDetailsComponent_Conditional_2_Template_button_keyup_enter_0_listener() { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.suspendUser(ctx_r0.user)); });
7763
7770
  i0.ɵɵtext(1);
7764
7771
  i0.ɵɵpipe(2, "rpxTranslate");
@@ -7769,7 +7776,7 @@ function UserDetailsComponent_Conditional_2_Template(rf, ctx) { if (rf & 1) {
7769
7776
  } }
7770
7777
  function UserDetailsComponent_Conditional_3_Template(rf, ctx) { if (rf & 1) {
7771
7778
  const _r4 = i0.ɵɵgetCurrentView();
7772
- i0.ɵɵelementStart(0, "div")(1, "div", 13)(2, "p");
7779
+ i0.ɵɵelementStart(0, "div")(1, "div", 14)(2, "p");
7773
7780
  i0.ɵɵtext(3);
7774
7781
  i0.ɵɵpipe(4, "rpxTranslate");
7775
7782
  i0.ɵɵelementEnd();
@@ -7781,7 +7788,7 @@ function UserDetailsComponent_Conditional_3_Template(rf, ctx) { if (rf & 1) {
7781
7788
  i0.ɵɵtext(9);
7782
7789
  i0.ɵɵpipe(10, "rpxTranslate");
7783
7790
  i0.ɵɵelementEnd()();
7784
- i0.ɵɵelementStart(11, "button", 14);
7791
+ i0.ɵɵelementStart(11, "button", 15);
7785
7792
  i0.ɵɵlistener("click", function UserDetailsComponent_Conditional_3_Template_button_click_11_listener() { i0.ɵɵrestoreView(_r4); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.reinviteClick(ctx_r0.user)); })("keyup.enter", function UserDetailsComponent_Conditional_3_Template_button_keyup_enter_11_listener() { i0.ɵɵrestoreView(_r4); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.reinviteClick(ctx_r0.user)); });
7786
7793
  i0.ɵɵtext(12);
7787
7794
  i0.ɵɵpipe(13, "rpxTranslate");
@@ -7797,7 +7804,7 @@ function UserDetailsComponent_Conditional_3_Template(rf, ctx) { if (rf & 1) {
7797
7804
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(13, 10, "Resend invitation"), " ");
7798
7805
  } }
7799
7806
  function UserDetailsComponent_Conditional_4_Template(rf, ctx) { if (rf & 1) {
7800
- i0.ɵɵelementStart(0, "p", 3)(1, "a", 15);
7807
+ i0.ɵɵelementStart(0, "p", 3)(1, "a", 16);
7801
7808
  i0.ɵɵtext(2);
7802
7809
  i0.ɵɵpipe(3, "rpxTranslate");
7803
7810
  i0.ɵɵelementEnd();
@@ -7835,9 +7842,9 @@ class UserDetailsComponent {
7835
7842
  return false;
7836
7843
  }
7837
7844
  static { this.ɵfac = function UserDetailsComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || UserDetailsComponent)(); }; }
7838
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UserDetailsComponent, selectors: [["xuilib-user-details"]], inputs: { user: "user", enabledAccessTypes: "enabledAccessTypes", editPermissionRouterLink: "editPermissionRouterLink", warningTitle: "warningTitle", showEditLink: "showEditLink", showHelpLink: "showHelpLink", suspendHelpLink: "suspendHelpLink", showSuspendUserButton: "showSuspendUserButton" }, outputs: { suspendUserEvent: "suspendUserEvent", reinvite: "reinvite" }, standalone: false, decls: 5, vars: 5, consts: [[1, "govuk-warning-text"], ["role", "presentation", 1, "govuk-table"], ["tabindex", "0", 1, "govuk-button", "govuk-button--warning"], [1, "govuk-body"], [1, "govuk-warning-text__icon"], [1, "govuk-visually-hidden"], [1, "govuk-warning-text__text"], [1, "govuk-table__body"], [1, "govuk-table__row"], ["scope", "row", 1, "govuk-table__header"], [1, "govuk-table__cell"], ["role", "link", 3, "routerLink"], ["tabindex", "0", 1, "govuk-button", "govuk-button--warning", 3, "click", "keyup.enter"], [1, "govuk-inset-text"], ["tabindex", "0", "id", "resend-invite-button", 1, "govuk-button", 3, "click", "keyup.enter"], ["target", "_blank", 3, "routerLink"]], template: function UserDetailsComponent_Template(rf, ctx) { if (rf & 1) {
7845
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UserDetailsComponent, selectors: [["xuilib-user-details"]], inputs: { user: "user", enabledAccessTypes: "enabledAccessTypes", editPermissionRouterLink: "editPermissionRouterLink", warningTitle: "warningTitle", showEditLink: "showEditLink", showHelpLink: "showHelpLink", suspendHelpLink: "suspendHelpLink", showSuspendUserButton: "showSuspendUserButton" }, outputs: { suspendUserEvent: "suspendUserEvent", reinvite: "reinvite" }, standalone: false, decls: 5, vars: 5, consts: [[1, "govuk-warning-text"], ["role", "presentation", 1, "govuk-table"], ["tabindex", "0", 1, "govuk-button", "govuk-button--warning"], [1, "govuk-body"], [1, "govuk-warning-text__icon"], [1, "govuk-visually-hidden"], [1, "govuk-warning-text__text"], [1, "govuk-table__body"], [1, "govuk-table__row"], ["scope", "row", 1, "govuk-table__header"], [1, "govuk-table__cell", "no-border-bottom"], [1, "govuk-table__cell"], ["role", "link", 3, "routerLink"], ["tabindex", "0", 1, "govuk-button", "govuk-button--warning", 3, "click", "keyup.enter"], [1, "govuk-inset-text"], ["tabindex", "0", "id", "resend-invite-button", 1, "govuk-button", 3, "click", "keyup.enter"], ["target", "_blank", 3, "routerLink"]], template: function UserDetailsComponent_Template(rf, ctx) { if (rf & 1) {
7839
7846
  i0.ɵɵconditionalCreate(0, UserDetailsComponent_Conditional_0_Template, 8, 3, "div", 0);
7840
- i0.ɵɵconditionalCreate(1, UserDetailsComponent_Conditional_1_Template, 18, 11, "dl", 1);
7847
+ i0.ɵɵconditionalCreate(1, UserDetailsComponent_Conditional_1_Template, 16, 11, "dl", 1);
7841
7848
  i0.ɵɵconditionalCreate(2, UserDetailsComponent_Conditional_2_Template, 3, 3, "button", 2);
7842
7849
  i0.ɵɵconditionalCreate(3, UserDetailsComponent_Conditional_3_Template, 14, 12, "div");
7843
7850
  i0.ɵɵconditionalCreate(4, UserDetailsComponent_Conditional_4_Template, 6, 7, "p", 3);
@@ -7851,11 +7858,11 @@ class UserDetailsComponent {
7851
7858
  i0.ɵɵconditional(ctx.user && ctx.user.resendInvite ? 3 : -1);
7852
7859
  i0.ɵɵadvance();
7853
7860
  i0.ɵɵconditional(ctx.showHelpLink && ctx.suspendHelpLink ? 4 : -1);
7854
- } }, dependencies: [i1$1.RouterLink, i2.RpxTranslatePipe], styles: ["[_nghost-%COMP%]{display:block}"] }); }
7861
+ } }, dependencies: [i1$1.RouterLink, i2.RpxTranslatePipe], styles: ["[_nghost-%COMP%]{display:block}.no-border-bottom[_ngcontent-%COMP%]{border-bottom:none}"] }); }
7855
7862
  }
7856
7863
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UserDetailsComponent, [{
7857
7864
  type: Component,
7858
- args: [{ selector: 'xuilib-user-details', standalone: false, template: "@if (warningTitle && warningTitle !== '') {\n <div class=\"govuk-warning-text\">\n <span class=\"govuk-warning-text__icon\">!</span>\n <span class=\"govuk-visually-hidden\">Warning</span>\n <strong class=\"govuk-warning-text__text\">\n {{ warningTitle | rpxTranslate}}\n </strong>\n </div>\n}\n@if (user) {\n <dl class=\"govuk-table\" role=\"presentation\">\n <div class=\"govuk-table__body\">\n <div class=\"govuk-table__row\">\n <dt class=\"govuk-table__header\" scope=\"row\">{{'Name' | rpxTranslate}}</dt>\n <dd class=\"govuk-table__cell\">{{user.fullName | rpxTranslate}}</dd>\n <dd class=\"govuk-table__cell\"></dd>\n </div>\n <div class=\"govuk-table__row\">\n <dt class=\"govuk-table__header\" scope=\"row\">{{'Email address' | rpxTranslate}}</dt>\n <dd class=\"govuk-table__cell\">{{user.email}}</dd>\n <dd class=\"govuk-table__cell\"></dd>\n </div>\n @if (!user.resendInvite) {\n <div class=\"govuk-table__row\">\n <dt class=\"govuk-table__header\" scope=\"row\">{{'Permissions' | rpxTranslate}}</dt>\n <dd class=\"govuk-table__cell\">\n @if (user.manageOrganisations === 'Yes') {\n <div>{{'Manage organisations' | rpxTranslate}}</div>\n }\n @if (user.manageUsers === 'Yes') {\n <div>{{'Manage users' | rpxTranslate}}</div>\n }\n @if (user.manageCases === 'Yes') {\n <div>{{'Manage cases' | rpxTranslate}}</div>\n }\n @if (userHasRole('pui-caa')) {\n <div>{{'Case access administrator' | rpxTranslate}}</div>\n }\n @if (userHasRole('pui-finance-manager')) {\n <div>{{'Manage fee accounts' | rpxTranslate}}</div>\n }\n @for (accesstype of enabledAccessTypes; track accesstype) {\n <div>{{ accesstype | rpxTranslate}}</div>\n }\n </dd>\n <dd class=\"govuk-table__cell\">@if (editPermissionRouterLink && showEditLink) {\n <a role=\"link\" [routerLink]=\"editPermissionRouterLink\">{{'Change' | rpxTranslate}} <span class=\"govuk-visually-hidden\">{{'roles' | rpxTranslate}}</span></a>\n }</dd>\n </div>\n }\n </div>\n </dl>\n}\n@if (showSuspendUserButton) {\n <button class=\"govuk-button govuk-button--warning\" tabindex=\"0\" (click)=\"suspendUser(user)\" (keyup.enter)=\"suspendUser(user)\">\n {{'Suspend account' | rpxTranslate}}\n </button>\n}\n@if (user && user.resendInvite) {\n <div>\n <div class=\"govuk-inset-text\">\n <p>{{'This user has already been invited but has not activated their account.' | rpxTranslate}}</p>\n <p>{{'If you resend an invitation, they\\'ll receive an email from HM Courts and Tribunals to finish setting up their account.' | rpxTranslate}}</p>\n <p>{{'You can\\'t invite the same user more than once an hour.' | rpxTranslate}}</p>\n </div>\n <button class=\"govuk-button\" tabindex=\"0\" (click)=\"reinviteClick(user)\" (keyup.enter)=\"reinviteClick(user)\" id=\"resend-invite-button\">\n {{'Resend invitation' | rpxTranslate}}\n </button>\n </div>\n}\n@if (showHelpLink && suspendHelpLink) {\n <p class=\"govuk-body\"><a [routerLink]=\"suspendHelpLink\" target=\"_blank\">{{'Get help' | rpxTranslate}}</a> {{'to reactivate this account.' | rpxTranslate}}</p>\n}\n", styles: [":host{display:block}\n"] }]
7865
+ args: [{ selector: 'xuilib-user-details', standalone: false, template: "@if (warningTitle && warningTitle !== '') {\n <div class=\"govuk-warning-text\">\n <span class=\"govuk-warning-text__icon\">!</span>\n <span class=\"govuk-visually-hidden\">Warning</span>\n <strong class=\"govuk-warning-text__text\">\n {{ warningTitle | rpxTranslate}}\n </strong>\n </div>\n}\n@if (user) {\n <dl class=\"govuk-table\" role=\"presentation\">\n <div class=\"govuk-table__body\">\n <div class=\"govuk-table__row\">\n <dt class=\"govuk-table__header\" scope=\"row\">{{'Name' | rpxTranslate}}</dt>\n <dd class=\"govuk-table__cell no-border-bottom\">{{user.fullName | rpxTranslate}}</dd>\n </div>\n <div class=\"govuk-table__row\">\n <dt class=\"govuk-table__header\" scope=\"row\">{{'Email address' | rpxTranslate}}</dt>\n <dd class=\"govuk-table__cell no-border-bottom\">{{user.email}}</dd>\n </div>\n @if (!user.resendInvite) {\n <div class=\"govuk-table__row\">\n <dt class=\"govuk-table__header\" scope=\"row\">{{'Permissions' | rpxTranslate}}</dt>\n <dd class=\"govuk-table__cell\">\n @if (user.manageOrganisations === 'Yes') {\n <div>{{'Manage organisations' | rpxTranslate}}</div>\n }\n @if (user.manageUsers === 'Yes') {\n <div>{{'Manage users' | rpxTranslate}}</div>\n }\n @if (user.manageCases === 'Yes') {\n <div>{{'Manage cases' | rpxTranslate}}</div>\n }\n @if (userHasRole('pui-caa')) {\n <div>{{'Case access administrator' | rpxTranslate}}</div>\n }\n @if (userHasRole('pui-finance-manager')) {\n <div>{{'Manage fee accounts' | rpxTranslate}}</div>\n }\n @for (accesstype of enabledAccessTypes; track accesstype) {\n <div>{{ accesstype | rpxTranslate}}</div>\n }\n </dd>\n @if (editPermissionRouterLink && showEditLink) {\n <dd class=\"govuk-table__cell\">\n <a role=\"link\" [routerLink]=\"editPermissionRouterLink\">{{'Change' | rpxTranslate}} <span class=\"govuk-visually-hidden\">{{'roles' | rpxTranslate}}</span></a>\n </dd>\n }\n </div>\n }\n </div>\n </dl>\n}\n@if (showSuspendUserButton) {\n <button class=\"govuk-button govuk-button--warning\" tabindex=\"0\" (click)=\"suspendUser(user)\" (keyup.enter)=\"suspendUser(user)\">\n {{'Suspend account' | rpxTranslate}}\n </button>\n}\n@if (user && user.resendInvite) {\n <div>\n <div class=\"govuk-inset-text\">\n <p>{{'This user has already been invited but has not activated their account.' | rpxTranslate}}</p>\n <p>{{'If you resend an invitation, they\\'ll receive an email from HM Courts and Tribunals to finish setting up their account.' | rpxTranslate}}</p>\n <p>{{'You can\\'t invite the same user more than once an hour.' | rpxTranslate}}</p>\n </div>\n <button class=\"govuk-button\" tabindex=\"0\" (click)=\"reinviteClick(user)\" (keyup.enter)=\"reinviteClick(user)\" id=\"resend-invite-button\">\n {{'Resend invitation' | rpxTranslate}}\n </button>\n </div>\n}\n@if (showHelpLink && suspendHelpLink) {\n <p class=\"govuk-body\"><a [routerLink]=\"suspendHelpLink\" target=\"_blank\">{{'Get help' | rpxTranslate}}</a> {{'to reactivate this account.' | rpxTranslate}}</p>\n}\n", styles: [":host{display:block}.no-border-bottom{border-bottom:none}\n"] }]
7859
7866
  }], null, { user: [{
7860
7867
  type: Input
7861
7868
  }], enabledAccessTypes: [{