@hmcts/rpx-xui-common-lib 2.0.43 → 2.0.44-2541-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.
@@ -2013,7 +2013,7 @@ class CookieService {
2013
2013
  }
2014
2014
  setCookie(key, value, expiryDate) {
2015
2015
  const expiry = expiryDate ? ` expires=${expiryDate}` : '';
2016
- const cookie = `${key}=${value};${expiry}`;
2016
+ const cookie = `${key}=${value};${expiry};SameSite=Strict`;
2017
2017
  this.document.cookie = cookie;
2018
2018
  }
2019
2019
  getCookie(key) {
@@ -7204,7 +7204,7 @@ function UserDetailsComponent_div_0_Template(rf, ctx) { if (rf & 1) {
7204
7204
  i0.ɵɵadvance(6);
7205
7205
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(7, 1, ctx_r0.warningTitle), "\n");
7206
7206
  } }
7207
- function UserDetailsComponent_table_1_tr_17_div_5_Template(rf, ctx) { if (rf & 1) {
7207
+ function UserDetailsComponent_dl_1_div_17_div_5_Template(rf, ctx) { if (rf & 1) {
7208
7208
  i0.ɵɵelementStart(0, "div");
7209
7209
  i0.ɵɵtext(1);
7210
7210
  i0.ɵɵpipe(2, "rpxTranslate");
@@ -7213,7 +7213,7 @@ function UserDetailsComponent_table_1_tr_17_div_5_Template(rf, ctx) { if (rf & 1
7213
7213
  i0.ɵɵadvance();
7214
7214
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "Manage organisations"));
7215
7215
  } }
7216
- function UserDetailsComponent_table_1_tr_17_div_6_Template(rf, ctx) { if (rf & 1) {
7216
+ function UserDetailsComponent_dl_1_div_17_div_6_Template(rf, ctx) { if (rf & 1) {
7217
7217
  i0.ɵɵelementStart(0, "div");
7218
7218
  i0.ɵɵtext(1);
7219
7219
  i0.ɵɵpipe(2, "rpxTranslate");
@@ -7222,7 +7222,7 @@ function UserDetailsComponent_table_1_tr_17_div_6_Template(rf, ctx) { if (rf & 1
7222
7222
  i0.ɵɵadvance();
7223
7223
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "Manage users"));
7224
7224
  } }
7225
- function UserDetailsComponent_table_1_tr_17_div_7_Template(rf, ctx) { if (rf & 1) {
7225
+ function UserDetailsComponent_dl_1_div_17_div_7_Template(rf, ctx) { if (rf & 1) {
7226
7226
  i0.ɵɵelementStart(0, "div");
7227
7227
  i0.ɵɵtext(1);
7228
7228
  i0.ɵɵpipe(2, "rpxTranslate");
@@ -7231,7 +7231,7 @@ function UserDetailsComponent_table_1_tr_17_div_7_Template(rf, ctx) { if (rf & 1
7231
7231
  i0.ɵɵadvance();
7232
7232
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "Manage cases"));
7233
7233
  } }
7234
- function UserDetailsComponent_table_1_tr_17_div_8_Template(rf, ctx) { if (rf & 1) {
7234
+ function UserDetailsComponent_dl_1_div_17_div_8_Template(rf, ctx) { if (rf & 1) {
7235
7235
  i0.ɵɵelementStart(0, "div");
7236
7236
  i0.ɵɵtext(1);
7237
7237
  i0.ɵɵpipe(2, "rpxTranslate");
@@ -7240,7 +7240,7 @@ function UserDetailsComponent_table_1_tr_17_div_8_Template(rf, ctx) { if (rf & 1
7240
7240
  i0.ɵɵadvance();
7241
7241
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "Case access administrator"));
7242
7242
  } }
7243
- function UserDetailsComponent_table_1_tr_17_div_9_Template(rf, ctx) { if (rf & 1) {
7243
+ function UserDetailsComponent_dl_1_div_17_div_9_Template(rf, ctx) { if (rf & 1) {
7244
7244
  i0.ɵɵelementStart(0, "div");
7245
7245
  i0.ɵɵtext(1);
7246
7246
  i0.ɵɵpipe(2, "rpxTranslate");
@@ -7249,7 +7249,7 @@ function UserDetailsComponent_table_1_tr_17_div_9_Template(rf, ctx) { if (rf & 1
7249
7249
  i0.ɵɵadvance();
7250
7250
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "Manage fee accounts"));
7251
7251
  } }
7252
- function UserDetailsComponent_table_1_tr_17_div_10_Template(rf, ctx) { if (rf & 1) {
7252
+ function UserDetailsComponent_dl_1_div_17_div_10_Template(rf, ctx) { if (rf & 1) {
7253
7253
  i0.ɵɵelementStart(0, "div");
7254
7254
  i0.ɵɵtext(1);
7255
7255
  i0.ɵɵpipe(2, "rpxTranslate");
@@ -7259,7 +7259,7 @@ function UserDetailsComponent_table_1_tr_17_div_10_Template(rf, ctx) { if (rf &
7259
7259
  i0.ɵɵadvance();
7260
7260
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, accesstype_r2));
7261
7261
  } }
7262
- function UserDetailsComponent_table_1_tr_17_a_12_Template(rf, ctx) { if (rf & 1) {
7262
+ function UserDetailsComponent_dl_1_div_17_a_12_Template(rf, ctx) { if (rf & 1) {
7263
7263
  i0.ɵɵelementStart(0, "a", 17);
7264
7264
  i0.ɵɵtext(1);
7265
7265
  i0.ɵɵpipe(2, "rpxTranslate");
@@ -7275,16 +7275,16 @@ function UserDetailsComponent_table_1_tr_17_a_12_Template(rf, ctx) { if (rf & 1)
7275
7275
  i0.ɵɵadvance(3);
7276
7276
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 5, "roles"));
7277
7277
  } }
7278
- function UserDetailsComponent_table_1_tr_17_Template(rf, ctx) { if (rf & 1) {
7279
- i0.ɵɵelementStart(0, "tr", 11)(1, "th", 12);
7278
+ function UserDetailsComponent_dl_1_div_17_Template(rf, ctx) { if (rf & 1) {
7279
+ i0.ɵɵelementStart(0, "div", 11)(1, "dt", 12);
7280
7280
  i0.ɵɵtext(2);
7281
7281
  i0.ɵɵpipe(3, "rpxTranslate");
7282
7282
  i0.ɵɵelementEnd();
7283
- i0.ɵɵelementStart(4, "td", 13);
7284
- i0.ɵɵtemplate(5, UserDetailsComponent_table_1_tr_17_div_5_Template, 3, 3, "div", 3)(6, UserDetailsComponent_table_1_tr_17_div_6_Template, 3, 3, "div", 3)(7, UserDetailsComponent_table_1_tr_17_div_7_Template, 3, 3, "div", 3)(8, UserDetailsComponent_table_1_tr_17_div_8_Template, 3, 3, "div", 3)(9, UserDetailsComponent_table_1_tr_17_div_9_Template, 3, 3, "div", 3)(10, UserDetailsComponent_table_1_tr_17_div_10_Template, 3, 3, "div", 15);
7283
+ i0.ɵɵelementStart(4, "dd", 13);
7284
+ i0.ɵɵtemplate(5, UserDetailsComponent_dl_1_div_17_div_5_Template, 3, 3, "div", 3)(6, UserDetailsComponent_dl_1_div_17_div_6_Template, 3, 3, "div", 3)(7, UserDetailsComponent_dl_1_div_17_div_7_Template, 3, 3, "div", 3)(8, UserDetailsComponent_dl_1_div_17_div_8_Template, 3, 3, "div", 3)(9, UserDetailsComponent_dl_1_div_17_div_9_Template, 3, 3, "div", 3)(10, UserDetailsComponent_dl_1_div_17_div_10_Template, 3, 3, "div", 15);
7285
7285
  i0.ɵɵelementEnd();
7286
- i0.ɵɵelementStart(11, "td", 13);
7287
- i0.ɵɵtemplate(12, UserDetailsComponent_table_1_tr_17_a_12_Template, 6, 7, "a", 16);
7286
+ i0.ɵɵelementStart(11, "dd", 13);
7287
+ i0.ɵɵtemplate(12, UserDetailsComponent_dl_1_div_17_a_12_Template, 6, 7, "a", 16);
7288
7288
  i0.ɵɵelementEnd()();
7289
7289
  } if (rf & 2) {
7290
7290
  const ctx_r0 = i0.ɵɵnextContext(2);
@@ -7305,27 +7305,27 @@ function UserDetailsComponent_table_1_tr_17_Template(rf, ctx) { if (rf & 1) {
7305
7305
  i0.ɵɵadvance(2);
7306
7306
  i0.ɵɵproperty("ngIf", ctx_r0.editPermissionRouterLink && ctx_r0.showEditLink);
7307
7307
  } }
7308
- function UserDetailsComponent_table_1_Template(rf, ctx) { if (rf & 1) {
7309
- i0.ɵɵelementStart(0, "table", 9)(1, "tbody", 10)(2, "tr", 11)(3, "th", 12);
7308
+ function UserDetailsComponent_dl_1_Template(rf, ctx) { if (rf & 1) {
7309
+ i0.ɵɵelementStart(0, "dl", 9)(1, "div", 10)(2, "div", 11)(3, "dt", 12);
7310
7310
  i0.ɵɵtext(4);
7311
7311
  i0.ɵɵpipe(5, "rpxTranslate");
7312
7312
  i0.ɵɵelementEnd();
7313
- i0.ɵɵelementStart(6, "td", 13);
7313
+ i0.ɵɵelementStart(6, "dd", 13);
7314
7314
  i0.ɵɵtext(7);
7315
7315
  i0.ɵɵpipe(8, "rpxTranslate");
7316
7316
  i0.ɵɵelementEnd();
7317
- i0.ɵɵelement(9, "td", 13);
7317
+ i0.ɵɵelement(9, "dd", 13);
7318
7318
  i0.ɵɵelementEnd();
7319
- i0.ɵɵelementStart(10, "tr", 11)(11, "th", 12);
7319
+ i0.ɵɵelementStart(10, "div", 11)(11, "dt", 12);
7320
7320
  i0.ɵɵtext(12);
7321
7321
  i0.ɵɵpipe(13, "rpxTranslate");
7322
7322
  i0.ɵɵelementEnd();
7323
- i0.ɵɵelementStart(14, "td", 13);
7323
+ i0.ɵɵelementStart(14, "dd", 13);
7324
7324
  i0.ɵɵtext(15);
7325
7325
  i0.ɵɵelementEnd();
7326
- i0.ɵɵelement(16, "td", 13);
7326
+ i0.ɵɵelement(16, "dd", 13);
7327
7327
  i0.ɵɵelementEnd();
7328
- i0.ɵɵtemplate(17, UserDetailsComponent_table_1_tr_17_Template, 13, 10, "tr", 14);
7328
+ i0.ɵɵtemplate(17, UserDetailsComponent_dl_1_div_17_Template, 13, 10, "div", 14);
7329
7329
  i0.ɵɵelementEnd()();
7330
7330
  } if (rf & 2) {
7331
7331
  const ctx_r0 = i0.ɵɵnextContext();
@@ -7420,7 +7420,7 @@ class UserDetailsComponent {
7420
7420
  }
7421
7421
  static { this.ɵfac = function UserDetailsComponent_Factory(t) { return new (t || UserDetailsComponent)(); }; }
7422
7422
  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" }, decls: 5, vars: 5, consts: [["class", "govuk-warning-text", 4, "ngIf"], ["class", "govuk-table", "role", "presentation", 4, "ngIf"], ["class", "govuk-button govuk-button--warning", "tabindex", "0", 3, "click", "keyup.enter", 4, "ngIf"], [4, "ngIf"], ["class", "govuk-body", 4, "ngIf"], [1, "govuk-warning-text"], [1, "govuk-warning-text__icon"], [1, "govuk-visually-hidden"], [1, "govuk-warning-text__text"], ["role", "presentation", 1, "govuk-table"], [1, "govuk-table__body"], [1, "govuk-table__row"], ["scope", "row", 1, "govuk-table__header"], [1, "govuk-table__cell"], ["class", "govuk-table__row", 4, "ngIf"], [4, "ngFor", "ngForOf"], ["role", "link", 3, "routerLink", 4, "ngIf"], ["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"], [1, "govuk-body"], ["target", "_blank", 3, "routerLink"]], template: function UserDetailsComponent_Template(rf, ctx) { if (rf & 1) {
7423
- i0.ɵɵtemplate(0, UserDetailsComponent_div_0_Template, 8, 3, "div", 0)(1, UserDetailsComponent_table_1_Template, 18, 11, "table", 1)(2, UserDetailsComponent_button_2_Template, 3, 3, "button", 2)(3, UserDetailsComponent_div_3_Template, 14, 12, "div", 3)(4, UserDetailsComponent_p_4_Template, 6, 7, "p", 4);
7423
+ i0.ɵɵtemplate(0, UserDetailsComponent_div_0_Template, 8, 3, "div", 0)(1, UserDetailsComponent_dl_1_Template, 18, 11, "dl", 1)(2, UserDetailsComponent_button_2_Template, 3, 3, "button", 2)(3, UserDetailsComponent_div_3_Template, 14, 12, "div", 3)(4, UserDetailsComponent_p_4_Template, 6, 7, "p", 4);
7424
7424
  } if (rf & 2) {
7425
7425
  i0.ɵɵproperty("ngIf", ctx.warningTitle && ctx.warningTitle !== "");
7426
7426
  i0.ɵɵadvance();
@@ -7435,7 +7435,7 @@ class UserDetailsComponent {
7435
7435
  }
7436
7436
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UserDetailsComponent, [{
7437
7437
  type: Component,
7438
- args: [{ selector: 'xuilib-user-details', template: "<div class=\"govuk-warning-text\" *ngIf=\"warningTitle && warningTitle !== ''\">\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<table class=\"govuk-table\" *ngIf=\"user\" role=\"presentation\">\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header\" scope=\"row\">{{'Name' | rpxTranslate}}</th>\n <td class=\"govuk-table__cell\">{{user.fullName | rpxTranslate}}</td>\n <td class=\"govuk-table__cell\"></td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header\" scope=\"row\">{{'Email address' | rpxTranslate}}</th>\n <td class=\"govuk-table__cell\">{{user.email}}</td>\n <td class=\"govuk-table__cell\"></td>\n </tr>\n <tr class=\"govuk-table__row\" *ngIf=\"!user.resendInvite\">\n <th class=\"govuk-table__header\" scope=\"row\">{{'Permissions' | rpxTranslate}}</th>\n <td class=\"govuk-table__cell\">\n <div *ngIf=\"user.manageOrganisations === 'Yes'\">{{'Manage organisations' | rpxTranslate}}</div>\n <div *ngIf=\"user.manageUsers === 'Yes'\">{{'Manage users' | rpxTranslate}}</div>\n <div *ngIf=\"user.manageCases === 'Yes'\">{{'Manage cases' | rpxTranslate}}</div>\n <div *ngIf=\"userHasRole('pui-caa')\">{{'Case access administrator' | rpxTranslate}}</div>\n <div *ngIf=\"userHasRole('pui-finance-manager')\">{{'Manage fee accounts' | rpxTranslate}}</div>\n <div *ngFor=\"let accesstype of enabledAccessTypes\">{{ accesstype | rpxTranslate}}</div> \n </td>\n <td class=\"govuk-table__cell\"><a *ngIf=\"editPermissionRouterLink && showEditLink\" role=\"link\" [routerLink]=\"editPermissionRouterLink\">{{'Change' | rpxTranslate}} <span class=\"govuk-visually-hidden\">{{'roles' | rpxTranslate}}</span></a></td>\n </tr>\n </tbody>\n</table>\n<button *ngIf=\"showSuspendUserButton\" class=\"govuk-button govuk-button--warning\" tabindex=\"0\" (click)=\"suspendUser(user)\" (keyup.enter)=\"suspendUser(user)\">\n {{'Suspend account' | rpxTranslate}}\n</button>\n<div *ngIf=\"user && user.resendInvite\">\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<p class=\"govuk-body\" *ngIf=\"showHelpLink && suspendHelpLink\"><a [routerLink]=\"suspendHelpLink\" target=\"_blank\">{{'Get help' | rpxTranslate}}</a> {{'to reactivate this account.' | rpxTranslate}}</p>\n", styles: [":host{display:block}\n"] }]
7438
+ args: [{ selector: 'xuilib-user-details', template: "<div class=\"govuk-warning-text\" *ngIf=\"warningTitle && warningTitle !== ''\">\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<dl class=\"govuk-table\" *ngIf=\"user\" 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 <div class=\"govuk-table__row\" *ngIf=\"!user.resendInvite\">\n <dt class=\"govuk-table__header\" scope=\"row\">{{'Permissions' | rpxTranslate}}</dt>\n <dd class=\"govuk-table__cell\">\n <div *ngIf=\"user.manageOrganisations === 'Yes'\">{{'Manage organisations' | rpxTranslate}}</div>\n <div *ngIf=\"user.manageUsers === 'Yes'\">{{'Manage users' | rpxTranslate}}</div>\n <div *ngIf=\"user.manageCases === 'Yes'\">{{'Manage cases' | rpxTranslate}}</div>\n <div *ngIf=\"userHasRole('pui-caa')\">{{'Case access administrator' | rpxTranslate}}</div>\n <div *ngIf=\"userHasRole('pui-finance-manager')\">{{'Manage fee accounts' | rpxTranslate}}</div>\n <div *ngFor=\"let accesstype of enabledAccessTypes\">{{ accesstype | rpxTranslate}}</div> \n </dd>\n <dd class=\"govuk-table__cell\"><a *ngIf=\"editPermissionRouterLink && showEditLink\" role=\"link\" [routerLink]=\"editPermissionRouterLink\">{{'Change' | rpxTranslate}} <span class=\"govuk-visually-hidden\">{{'roles' | rpxTranslate}}</span></a></dd>\n </div>\n </div>\n</dl>\n<button *ngIf=\"showSuspendUserButton\" class=\"govuk-button govuk-button--warning\" tabindex=\"0\" (click)=\"suspendUser(user)\" (keyup.enter)=\"suspendUser(user)\">\n {{'Suspend account' | rpxTranslate}}\n</button>\n<div *ngIf=\"user && user.resendInvite\">\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<p class=\"govuk-body\" *ngIf=\"showHelpLink && suspendHelpLink\"><a [routerLink]=\"suspendHelpLink\" target=\"_blank\">{{'Get help' | rpxTranslate}}</a> {{'to reactivate this account.' | rpxTranslate}}</p>\n", styles: [":host{display:block}\n"] }]
7439
7439
  }], null, { user: [{
7440
7440
  type: Input
7441
7441
  }], enabledAccessTypes: [{
@@ -7992,7 +7992,7 @@ function SearchVenueComponent_div_1_mat_option_5_Template(rf, ctx) { if (rf & 1)
7992
7992
  } if (rf & 2) {
7993
7993
  const location_r4 = ctx.$implicit;
7994
7994
  const ctx_r1 = i0.ɵɵnextContext(2);
7995
- i0.ɵɵproperty("value", ctx_r1.getDisplayName(location_r4))("ngClass", i0.ɵɵpureFunction1(3, _c1$5, !ctx_r1.showAutocomplete));
7995
+ i0.ɵɵproperty("value", ctx_r1.getDisplayName(location_r4))("ngClass", i0.ɵɵpureFunction1(3, _c1$5, ctx_r1.showAutocomplete ? false : true));
7996
7996
  i0.ɵɵadvance();
7997
7997
  i0.ɵɵtextInterpolate1(" ", ctx_r1.getDisplayName(location_r4), " ");
7998
7998
  } }
@@ -8007,7 +8007,7 @@ function SearchVenueComponent_div_1_mat_option_6_Template(rf, ctx) { if (rf & 1)
8007
8007
  function SearchVenueComponent_div_1_Template(rf, ctx) { if (rf & 1) {
8008
8008
  const _r1 = i0.ɵɵgetCurrentView();
8009
8009
  i0.ɵɵelementStart(0, "div", 4)(1, "input", 5, 0);
8010
- i0.ɵɵlistener("keydown", function SearchVenueComponent_div_1_Template_input_keydown_1_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onKeyDown()); })("keyup", function SearchVenueComponent_div_1_Template_input_keyup_1_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onKeyUp($event)); })("focus", function SearchVenueComponent_div_1_Template_input_focus_1_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onFocus()); });
8010
+ i0.ɵɵlistener("keydown", function SearchVenueComponent_div_1_Template_input_keydown_1_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onKeyDown()); })("keyup", function SearchVenueComponent_div_1_Template_input_keyup_1_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onKeyUp($event)); });
8011
8011
  i0.ɵɵelementEnd();
8012
8012
  i0.ɵɵelementStart(3, "mat-autocomplete", 6, 1);
8013
8013
  i0.ɵɵtemplate(5, SearchVenueComponent_div_1_mat_option_5_Template, 2, 5, "mat-option", 7)(6, SearchVenueComponent_div_1_mat_option_6_Template, 2, 1, "mat-option", 8);
@@ -8058,11 +8058,9 @@ class SearchVenueComponent {
8058
8058
  this.locationChanged.emit();
8059
8059
  }
8060
8060
  onKeyUp(event) {
8061
- this.showAutocomplete = false;
8062
- this.keyUpSubject$.next(event.target.value);
8063
- }
8064
- onFocus() {
8065
- this.showAutocomplete = false;
8061
+ if (event.code === `Key${event.key.toUpperCase()}`) {
8062
+ this.keyUpSubject$.next(event.target.value);
8063
+ }
8066
8064
  }
8067
8065
  get displayedLocationsDuplicationFiltered() {
8068
8066
  return this.displayedLocations.filter(location => !this.selectedLocations.map(selectedLocation => selectedLocation.epimms_id).includes(location.epimms_id) && location.court_name);
@@ -8078,7 +8076,6 @@ class SearchVenueComponent {
8078
8076
  this.findLocationFormGroup.controls.locationSelectedFormControl.setValue(location);
8079
8077
  this.displayedLocations = [];
8080
8078
  this.locationChanged.emit(location);
8081
- this.showAutocomplete = false;
8082
8079
  }
8083
8080
  this.searchInProgress = false;
8084
8081
  });
@@ -8091,11 +8088,12 @@ class SearchVenueComponent {
8091
8088
  this.findLocationFormGroup.controls.locationSelectedFormControl.setValue(selection);
8092
8089
  }
8093
8090
  this.locationChanged.emit(selection);
8091
+ this.showAutocomplete = false;
8094
8092
  }
8095
8093
  search(currentValue) {
8096
8094
  this.searchInProgress = true;
8097
- this.showAutocomplete = !!currentValue && (currentValue.length >= this.minSearchCharacters);
8098
- if (!!currentValue) {
8095
+ if (currentValue) {
8096
+ this.showAutocomplete = (currentValue.length >= this.minSearchCharacters) ? true : false;
8099
8097
  this.findLocationFormGroup.controls.locationSelectedFormControl.markAsDirty();
8100
8098
  }
8101
8099
  else {
@@ -8124,7 +8122,7 @@ class SearchVenueComponent {
8124
8122
  } if (rf & 2) {
8125
8123
  let _t;
8126
8124
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.autoCompleteInputBox = _t.first);
8127
- } }, inputs: { control: "control", disabled: "disabled", locationType: "locationType", selectedLocations: "selectedLocations", serviceIds: "serviceIds", submitted: "submitted", showAutocomplete: "showAutocomplete", displayedLocations: "displayedLocations" }, outputs: { locationChanged: "locationChanged" }, decls: 2, vars: 1, consts: [["inputSelectedLocation", ""], ["autoSearchLocation", "matAutocomplete"], [1, "auto-complete-container"], ["class", "autocomplete__wrapper", 4, "ngIf"], [1, "autocomplete__wrapper"], [1, "autocomplete__input", "autocomplete__input--default", "search-box", 3, "keydown", "keyup", "focus", "formControl", "matAutocomplete", "value"], ["autoActiveFirstOption", "", 1, "mat-autocomplete-panel-extend"], [3, "value", "ngClass", "onSelectionChange", 4, "ngFor", "ngForOf"], [4, "ngIf"], [3, "onSelectionChange", "value", "ngClass"]], template: function SearchVenueComponent_Template(rf, ctx) { if (rf & 1) {
8125
+ } }, inputs: { control: "control", disabled: "disabled", locationType: "locationType", selectedLocations: "selectedLocations", serviceIds: "serviceIds", submitted: "submitted", showAutocomplete: "showAutocomplete", displayedLocations: "displayedLocations" }, outputs: { locationChanged: "locationChanged" }, decls: 2, vars: 1, consts: [["inputSelectedLocation", ""], ["autoSearchLocation", "matAutocomplete"], [1, "auto-complete-container"], ["class", "autocomplete__wrapper", 4, "ngIf"], [1, "autocomplete__wrapper"], ["id", "searchVenueLocation", 1, "autocomplete__input", "autocomplete__input--default", "search-box", 3, "keydown", "keyup", "formControl", "matAutocomplete", "value"], ["autoActiveFirstOption", "", 1, "mat-autocomplete-panel-extend"], [3, "value", "ngClass", "onSelectionChange", 4, "ngFor", "ngForOf"], [4, "ngIf"], [3, "onSelectionChange", "value", "ngClass"]], template: function SearchVenueComponent_Template(rf, ctx) { if (rf & 1) {
8128
8126
  i0.ɵɵelementStart(0, "div", 2);
8129
8127
  i0.ɵɵtemplate(1, SearchVenueComponent_div_1_Template, 7, 6, "div", 3);
8130
8128
  i0.ɵɵelementEnd();
@@ -8135,7 +8133,7 @@ class SearchVenueComponent {
8135
8133
  }
8136
8134
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SearchVenueComponent, [{
8137
8135
  type: Component,
8138
- args: [{ selector: 'xuilib-search-venue', template: "<div class=\"auto-complete-container\">\n <div *ngIf=\"readyAfterContent\" class=\"autocomplete__wrapper\">\n <input\n [formControl]=\"findLocationFormGroup.controls.findLocationFormControl\"\n [matAutocomplete]=\"autoSearchLocation\"\n (keydown)=\"onKeyDown()\"\n (keyup)=\"onKeyUp($event)\"\n (focus)=\"onFocus()\"\n class=\"autocomplete__input autocomplete__input--default search-box\"\n [attr.disabled]=\"!disabled ? null: disabled\"\n [value]=\"getControlCourtNameValue()\"\n #inputSelectedLocation>\n <mat-autocomplete class=\"mat-autocomplete-panel-extend\" autoActiveFirstOption #autoSearchLocation=\"matAutocomplete\">\n <mat-option *ngFor=\"let location of displayedLocationsDuplicationFiltered\"\n [value]=\"getDisplayName(location)\"\n (onSelectionChange)=\"onSelectionChange(location)\"\n [ngClass]=\"{'hide-autocomplete': !showAutocomplete}\">\n {{ getDisplayName(location) }}\n </mat-option>\n <mat-option *ngIf=\"!displayedLocationsDuplicationFiltered?.length && showAutocomplete && !searchInProgress\">{{ 'No results found' }}</mat-option>\n </mat-autocomplete>\n </div>\n</div>\n", styles: [".autocomplete__input{-webkit-appearance:none;border:2px solid #0b0c0c;border-radius:0;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;margin-bottom:0;width:100%;line-height:24px;font-size:19px;background-color:transparent;position:relative}.autocomplete__hint{color:#b1b4b6;position:absolute}.autocomplete__input--default{padding:5px}.autocomplete__input--focused{outline:3px solid #fd0;outline-offset:0;box-shadow:inset 0 0 0 2px}.autocomplete__input--show-all-values{padding:5px 34px 5px 5px;cursor:pointer}.autocomplete__dropdown-arrow-down{z-index:-1;display:inline-block;position:absolute;right:8px;width:24px;height:24px;top:10px}.autocomplete__menu{background-color:#fff;border:2px solid #0b0c0c;border-top:0;color:#0b0c0c;margin:0;max-height:342px;overflow-x:hidden;padding:0;width:100%;width:calc(100% - 4px)}.autocomplete__menu--visible{display:block}.autocomplete__menu--hidden{display:none}.autocomplete__menu--overlay{box-shadow:#00000042 0 2px 6px;left:0;position:absolute;top:100%;z-index:100}.autocomplete__menu--inline{position:relative}.autocomplete__option{border-bottom:solid #b1b4b6;border-width:1px 0;cursor:pointer;display:block;position:relative}.autocomplete__option>*{pointer-events:none}.autocomplete__option:first-of-type{border-top-width:0}.autocomplete__option:last-of-type{border-bottom-width:0}.autocomplete__option--odd{background-color:#fafafa}.autocomplete__option--focused,.autocomplete__option:hover{background-color:#1d70b8;border-color:#1d70b8;color:#fff;outline:0}.autocomplete__option--no-results{background-color:#fafafa;color:#646b6f;cursor:not-allowed}.autocomplete__hint,.autocomplete__input,.autocomplete__option{font-size:13px;line-height:1.25}.autocomplete__hint,.autocomplete__option{padding:5px}@media (min-width: 641px){.autocomplete__hint,.autocomplete__input,.autocomplete__option{font-size:13px;line-height:1.31579}}.div-action{display:inline-block}.add-location{display:inline}.remove-location-button{margin:5px}.hide-autocomplete{display:none}.auto-complete-container{min-width:550px;display:inline-block;margin-right:4px}\n"] }]
8136
+ args: [{ selector: 'xuilib-search-venue', template: "<div class=\"auto-complete-container\">\n <div *ngIf=\"readyAfterContent\" class=\"autocomplete__wrapper\">\n <input\n [formControl]=\"findLocationFormGroup.controls.findLocationFormControl\"\n [matAutocomplete]=\"autoSearchLocation\"\n id=\"searchVenueLocation\"\n (keydown)=\"onKeyDown()\"\n (keyup)=\"onKeyUp($event)\"\n class=\"autocomplete__input autocomplete__input--default search-box\"\n [attr.disabled]=\"!disabled ? null: disabled\"\n [value]=\"getControlCourtNameValue()\"\n #inputSelectedLocation>\n <mat-autocomplete class=\"mat-autocomplete-panel-extend\" autoActiveFirstOption #autoSearchLocation=\"matAutocomplete\">\n <mat-option *ngFor=\"let location of displayedLocationsDuplicationFiltered\"\n [value]=\"getDisplayName(location)\"\n (onSelectionChange)=\"onSelectionChange(location)\"\n [ngClass]=\"{'hide-autocomplete': showAutocomplete ? false : true}\">\n {{ getDisplayName(location) }}\n </mat-option>\n <mat-option *ngIf=\"!displayedLocationsDuplicationFiltered?.length && showAutocomplete && !searchInProgress\">{{ 'No results found' }}</mat-option>\n </mat-autocomplete>\n </div>\n</div>\n", styles: [".autocomplete__input{-webkit-appearance:none;border:2px solid #0b0c0c;border-radius:0;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;margin-bottom:0;width:100%;line-height:24px;font-size:19px;background-color:transparent;position:relative}.autocomplete__hint{color:#b1b4b6;position:absolute}.autocomplete__input--default{padding:5px}.autocomplete__input--focused{outline:3px solid #fd0;outline-offset:0;box-shadow:inset 0 0 0 2px}.autocomplete__input--show-all-values{padding:5px 34px 5px 5px;cursor:pointer}.autocomplete__dropdown-arrow-down{z-index:-1;display:inline-block;position:absolute;right:8px;width:24px;height:24px;top:10px}.autocomplete__menu{background-color:#fff;border:2px solid #0b0c0c;border-top:0;color:#0b0c0c;margin:0;max-height:342px;overflow-x:hidden;padding:0;width:100%;width:calc(100% - 4px)}.autocomplete__menu--visible{display:block}.autocomplete__menu--hidden{display:none}.autocomplete__menu--overlay{box-shadow:#00000042 0 2px 6px;left:0;position:absolute;top:100%;z-index:100}.autocomplete__menu--inline{position:relative}.autocomplete__option{border-bottom:solid #b1b4b6;border-width:1px 0;cursor:pointer;display:block;position:relative}.autocomplete__option>*{pointer-events:none}.autocomplete__option:first-of-type{border-top-width:0}.autocomplete__option:last-of-type{border-bottom-width:0}.autocomplete__option--odd{background-color:#fafafa}.autocomplete__option--focused,.autocomplete__option:hover{background-color:#1d70b8;border-color:#1d70b8;color:#fff;outline:0}.autocomplete__option--no-results{background-color:#fafafa;color:#646b6f;cursor:not-allowed}.autocomplete__hint,.autocomplete__input,.autocomplete__option{font-size:13px;line-height:1.25}.autocomplete__hint,.autocomplete__option{padding:5px}@media (min-width: 641px){.autocomplete__hint,.autocomplete__input,.autocomplete__option{font-size:13px;line-height:1.31579}}.div-action{display:inline-block}.add-location{display:inline}.remove-location-button{margin:5px}.hide-autocomplete{display:none}.auto-complete-container{min-width:550px;display:inline-block;margin-right:4px}\n"] }]
8139
8137
  }], () => [{ type: LocationService }, { type: i2$4.FormBuilder }], { control: [{
8140
8138
  type: Input
8141
8139
  }], disabled: [{