@hmcts/rpx-xui-common-lib 1.7.9-filter-non-base-location → 1.7.9-task-name-filter

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 (43) hide show
  1. package/bundles/hmcts-rpx-xui-common-lib.umd.js +487 -202
  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 -25
  6. package/esm2015/lib/components/find-location/find-location.component.js +1 -12
  7. package/esm2015/lib/components/find-task-name/find-task-name.component.js +249 -0
  8. package/esm2015/lib/components/generic-filter/generic-filter.component.js +34 -20
  9. package/esm2015/lib/components/search-location/search-location.component.js +3 -14
  10. package/esm2015/lib/exui-common-lib.module.js +3 -1
  11. package/esm2015/lib/gov-ui/components/hmcts-sub-navigation/hmcts-sub-navigation.component.js +5 -2
  12. package/esm2015/lib/models/filter.model.js +5 -1
  13. package/esm2015/lib/models/task-name.model.js +16 -0
  14. package/esm2015/lib/services/locations/location.service.js +3 -4
  15. package/esm2015/lib/services/task-name/task-name.service.js +41 -0
  16. package/esm5/hmcts-rpx-xui-common-lib.js +27 -25
  17. package/esm5/lib/components/find-location/find-location.component.js +1 -15
  18. package/esm5/lib/components/find-task-name/find-task-name.component.js +338 -0
  19. package/esm5/lib/components/generic-filter/generic-filter.component.js +53 -45
  20. package/esm5/lib/components/search-location/search-location.component.js +3 -13
  21. package/esm5/lib/exui-common-lib.module.js +3 -1
  22. package/esm5/lib/gov-ui/components/hmcts-sub-navigation/hmcts-sub-navigation.component.js +5 -2
  23. package/esm5/lib/models/filter.model.js +5 -1
  24. package/esm5/lib/models/task-name.model.js +16 -0
  25. package/esm5/lib/services/locations/location.service.js +3 -5
  26. package/esm5/lib/services/task-name/task-name.service.js +46 -0
  27. package/fesm2015/hmcts-rpx-xui-common-lib.js +303 -95
  28. package/fesm2015/hmcts-rpx-xui-common-lib.js.map +1 -1
  29. package/fesm5/hmcts-rpx-xui-common-lib.js +454 -163
  30. package/fesm5/hmcts-rpx-xui-common-lib.js.map +1 -1
  31. package/hmcts-rpx-xui-common-lib.d.ts +26 -24
  32. package/hmcts-rpx-xui-common-lib.metadata.json +1 -1
  33. package/lib/components/find-location/find-location.component.d.ts +2 -3
  34. package/lib/components/find-task-name/find-task-name.component.d.ts +41 -0
  35. package/lib/components/generic-filter/generic-filter.component.d.ts +1 -0
  36. package/lib/components/search-location/search-location.component.d.ts +1 -3
  37. package/lib/exui-common-lib.module.d.ts +2 -1
  38. package/lib/gov-ui/components/hmcts-sub-navigation/hmcts-sub-navigation.component.d.ts +1 -0
  39. package/lib/models/filter.model.d.ts +3 -1
  40. package/lib/models/task-name.model.d.ts +4 -0
  41. package/lib/services/locations/location.service.d.ts +1 -1
  42. package/lib/services/task-name/task-name.service.d.ts +10 -0
  43. package/package.json +1 -1
@@ -1186,6 +1186,31 @@
1186
1186
  }
1187
1187
  }
1188
1188
  };
1189
+ /**
1190
+ * @param {?} values
1191
+ * @param {?} field
1192
+ * @return {?}
1193
+ */
1194
+ GenericFilterComponent.prototype.updateTaskNameControls = /**
1195
+ * @param {?} values
1196
+ * @param {?} field
1197
+ * @return {?}
1198
+ */
1199
+ function (values, field) {
1200
+ // let keys;
1201
+ // if (!values) {
1202
+ // keys = Object.keys(this.form.get(field.name).value);
1203
+ // } else {
1204
+ // keys = Object.keys(values);
1205
+ // }
1206
+ // for (const key of keys) {
1207
+ // if (this.form.get(field.name) && this.form.get(field.name).get(key)) {
1208
+ // const value = values && values[key] ? values[key] : null;
1209
+ // this.form.get(field.name).get(key).patchValue(value);
1210
+ // }
1211
+ // }
1212
+ this.form.get(field.name).patchValue(values);
1213
+ };
1189
1214
  /**
1190
1215
  * @param {?} event
1191
1216
  * @param {?} form
@@ -1201,7 +1226,6 @@
1201
1226
  * @return {?}
1202
1227
  */
1203
1228
  function (event, form, item, field) {
1204
- var e_3, _a;
1205
1229
  /** @type {?} */
1206
1230
  var isChecked = event.target.checked;
1207
1231
  /** @type {?} */
@@ -1252,41 +1276,19 @@
1252
1276
  else if (hasSelectAllOption && !allChecked && isChecked && isAllCheckedExcludingTheSelectAllOption) {
1253
1277
  formArray.controls[index_1].patchValue(true);
1254
1278
  }
1279
+ return;
1255
1280
  }
1256
- else {
1257
- formArray.controls.forEach(( /**
1258
- * @param {?} control
1259
- * @return {?}
1260
- */function (control) {
1261
- if (isChecked) {
1262
- control.patchValue(true);
1263
- }
1264
- else {
1265
- control.patchValue(false);
1266
- }
1267
- }));
1268
- }
1269
- if (field.changeResetFields && field.changeResetFields.length) {
1270
- try {
1271
- for (var _b = __values(field.changeResetFields), _c = _b.next(); !_c.done; _c = _b.next()) {
1272
- var resetField = _c.value;
1273
- this.resetField(resetField, form);
1274
- }
1275
- }
1276
- catch (e_3_1) {
1277
- e_3 = { error: e_3_1 };
1281
+ formArray.controls.forEach(( /**
1282
+ * @param {?} control
1283
+ * @return {?}
1284
+ */function (control) {
1285
+ if (isChecked) {
1286
+ control.patchValue(true);
1278
1287
  }
1279
- finally {
1280
- try {
1281
- if (_c && !_c.done && (_a = _b.return))
1282
- _a.call(_b);
1283
- }
1284
- finally {
1285
- if (e_3)
1286
- throw e_3.error;
1287
- }
1288
+ else {
1289
+ control.patchValue(false);
1288
1290
  }
1289
- }
1291
+ }));
1290
1292
  };
1291
1293
  /**
1292
1294
  * @private
@@ -1301,7 +1303,7 @@
1301
1303
  * @return {?}
1302
1304
  */
1303
1305
  function (resetField, form) {
1304
- var e_4, _a;
1306
+ var e_3, _a;
1305
1307
  /** @type {?} */
1306
1308
  var control = form.get(resetField);
1307
1309
  /** @type {?} */
@@ -1323,8 +1325,8 @@
1323
1325
  this.resetField(key, control);
1324
1326
  }
1325
1327
  }
1326
- catch (e_4_1) {
1327
- e_4 = { error: e_4_1 };
1328
+ catch (e_3_1) {
1329
+ e_3 = { error: e_3_1 };
1328
1330
  }
1329
1331
  finally {
1330
1332
  try {
@@ -1332,8 +1334,8 @@
1332
1334
  _a.call(keys_2);
1333
1335
  }
1334
1336
  finally {
1335
- if (e_4)
1336
- throw e_4.error;
1337
+ if (e_3)
1338
+ throw e_3.error;
1337
1339
  }
1338
1340
  }
1339
1341
  }
@@ -1390,7 +1392,7 @@
1390
1392
  * @return {?}
1391
1393
  */
1392
1394
  function (config, settings, reset) {
1393
- var e_5, _a;
1395
+ var e_4, _a;
1394
1396
  /** @type {?} */
1395
1397
  var findPersonControl = this.form ? this.form.get('findPersonControl') : null;
1396
1398
  this.form = this.fb.group({});
@@ -1463,8 +1465,8 @@
1463
1465
  _loop_1(field);
1464
1466
  }
1465
1467
  }
1466
- catch (e_5_1) {
1467
- e_5 = { error: e_5_1 };
1468
+ catch (e_4_1) {
1469
+ e_4 = { error: e_4_1 };
1468
1470
  }
1469
1471
  finally {
1470
1472
  try {
@@ -1472,8 +1474,8 @@
1472
1474
  _a.call(_b);
1473
1475
  }
1474
1476
  finally {
1475
- if (e_5)
1476
- throw e_5.error;
1477
+ if (e_4)
1478
+ throw e_4.error;
1477
1479
  }
1478
1480
  }
1479
1481
  };
@@ -1490,7 +1492,7 @@
1490
1492
  * @return {?}
1491
1493
  */
1492
1494
  function (field, settings) {
1493
- var e_6, _a;
1495
+ var e_5, _a;
1494
1496
  /** @type {?} */
1495
1497
  var validators = GenericFilterComponent.addFormValidators(field);
1496
1498
  /** @type {?} */
@@ -1520,8 +1522,8 @@
1520
1522
  _loop_2(option);
1521
1523
  }
1522
1524
  }
1523
- catch (e_6_1) {
1524
- e_6 = { error: e_6_1 };
1525
+ catch (e_5_1) {
1526
+ e_5 = { error: e_5_1 };
1525
1527
  }
1526
1528
  finally {
1527
1529
  try {
@@ -1529,8 +1531,8 @@
1529
1531
  _a.call(_b);
1530
1532
  }
1531
1533
  finally {
1532
- if (e_6)
1533
- throw e_6.error;
1534
+ if (e_5)
1535
+ throw e_5.error;
1534
1536
  }
1535
1537
  }
1536
1538
  return formArray;
@@ -1548,7 +1550,7 @@
1548
1550
  * @return {?}
1549
1551
  */
1550
1552
  function (field, settings) {
1551
- var e_7, _a;
1553
+ var e_6, _a;
1552
1554
  /** @type {?} */
1553
1555
  var validators = GenericFilterComponent.addFormValidators(field);
1554
1556
  /** @type {?} */
@@ -1567,8 +1569,8 @@
1567
1569
  formArray.push(new forms.FormControl(defaultValue));
1568
1570
  }
1569
1571
  }
1570
- catch (e_7_1) {
1571
- e_7 = { error: e_7_1 };
1572
+ catch (e_6_1) {
1573
+ e_6 = { error: e_6_1 };
1572
1574
  }
1573
1575
  finally {
1574
1576
  try {
@@ -1576,8 +1578,8 @@
1576
1578
  _a.call(_b);
1577
1579
  }
1578
1580
  finally {
1579
- if (e_7)
1580
- throw e_7.error;
1581
+ if (e_6)
1582
+ throw e_6.error;
1581
1583
  }
1582
1584
  }
1583
1585
  }
@@ -1632,7 +1634,7 @@
1632
1634
  * @return {?}
1633
1635
  */
1634
1636
  function (form) {
1635
- var e_8, _a;
1637
+ var e_7, _a;
1636
1638
  /** @type {?} */
1637
1639
  var errors = [];
1638
1640
  try {
@@ -1648,8 +1650,8 @@
1648
1650
  }
1649
1651
  }
1650
1652
  }
1651
- catch (e_8_1) {
1652
- e_8 = { error: e_8_1 };
1653
+ catch (e_7_1) {
1654
+ e_7 = { error: e_7_1 };
1653
1655
  }
1654
1656
  finally {
1655
1657
  try {
@@ -1657,8 +1659,8 @@
1657
1659
  _a.call(_b);
1658
1660
  }
1659
1661
  finally {
1660
- if (e_8)
1661
- throw e_8.error;
1662
+ if (e_7)
1663
+ throw e_7.error;
1662
1664
  }
1663
1665
  }
1664
1666
  if (errors.length) {
@@ -1668,7 +1670,7 @@
1668
1670
  GenericFilterComponent.decorators = [
1669
1671
  { type: i0.Component, args: [{
1670
1672
  selector: 'xuilib-generic-filter',
1671
- 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",
1673
+ 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 <ng-container *ngSwitchCase=\"'find-task-name'\">\n <xuilib-find-task-name subTitle=\"\" (taskNameSelected)=\"updateTaskNameControls($event, field)\"\n (taskNameFieldChanged)=\"inputChanged(field)\"\n [submitted]=\"submitted\"\n [disabled]=\"disabled(field, form)\"\n [domain]=\"form.get(field.domainField)?.value\"\n [findTaskNameGroup]=\"form\"\n [selectedTaskName]=\"form.get(field.name)?.value?.email\"\n [userIncluded]=\"false\"\n ></xuilib-find-task-name>\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",
1672
1674
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
1673
1675
  encapsulation: i0.ViewEncapsulation.None,
1674
1676
  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}"]
@@ -3804,7 +3806,6 @@
3804
3806
  * @param {?} serviceIds
3805
3807
  * @param {?} locationType
3806
3808
  * @param {?} searchTerm
3807
- * @param {?} userLocations
3808
3809
  * @return {?} Observable<LocationByEPIMMSModel[]>: Array of locationModel in Observable
3809
3810
  */
3810
3811
  LocationService.prototype.getAllLocations = /**
@@ -3812,11 +3813,10 @@
3812
3813
  * @param {?} serviceIds
3813
3814
  * @param {?} locationType
3814
3815
  * @param {?} searchTerm
3815
- * @param {?} userLocations
3816
3816
  * @return {?} Observable<LocationByEPIMMSModel[]>: Array of locationModel in Observable
3817
3817
  */
3818
- function (serviceIds, locationType, searchTerm, userLocations) {
3819
- return this.http.post("api/locations/getLocations", { serviceIds: serviceIds, locationType: locationType, searchTerm: searchTerm, userLocations: userLocations });
3818
+ function (serviceIds, locationType, searchTerm) {
3819
+ return this.http.get("api/locations/getLocations?serviceIds=" + serviceIds + "&locationType=" + locationType + "&searchTerm=" + searchTerm);
3820
3820
  };
3821
3821
  /**
3822
3822
  * @description searchLocations from service Ids/location type/search term
@@ -3857,110 +3857,14 @@
3857
3857
  return LocationService;
3858
3858
  }());
3859
3859
 
3860
- /**
3861
- * @fileoverview added by tsickle
3862
- * Generated from: lib/services/session-storage/session-storage.service.ts
3863
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3864
- */
3865
- var SessionStorageService = /** @class */ (function () {
3866
- function SessionStorageService() {
3867
- }
3868
- /**
3869
- * Get an item from the session storage.
3870
- * If remove is true, the item will be removed once read
3871
- * @param removeAfterRead removed the key once it has been read
3872
- */
3873
- /**
3874
- * Get an item from the session storage.
3875
- * If remove is true, the item will be removed once read
3876
- * @param {?} key
3877
- * @param {?=} removeAfterRead removed the key once it has been read
3878
- * @return {?}
3879
- */
3880
- SessionStorageService.prototype.getItem = /**
3881
- * Get an item from the session storage.
3882
- * If remove is true, the item will be removed once read
3883
- * @param {?} key
3884
- * @param {?=} removeAfterRead removed the key once it has been read
3885
- * @return {?}
3886
- */
3887
- function (key, removeAfterRead) {
3888
- if (removeAfterRead === void 0) {
3889
- removeAfterRead = false;
3890
- }
3891
- /** @type {?} */
3892
- var item = sessionStorage.getItem(key);
3893
- if (removeAfterRead) {
3894
- this.removeItem(key);
3895
- }
3896
- return item;
3897
- };
3898
- /**
3899
- * Set an item in the session storage.
3900
- */
3901
- /**
3902
- * Set an item in the session storage.
3903
- * @param {?} key
3904
- * @param {?} value
3905
- * @return {?}
3906
- */
3907
- SessionStorageService.prototype.setItem = /**
3908
- * Set an item in the session storage.
3909
- * @param {?} key
3910
- * @param {?} value
3911
- * @return {?}
3912
- */
3913
- function (key, value) {
3914
- sessionStorage.setItem(key, value);
3915
- };
3916
- /**
3917
- * Remove an item in the session storage.
3918
- */
3919
- /**
3920
- * Remove an item in the session storage.
3921
- * @param {?} key
3922
- * @return {?}
3923
- */
3924
- SessionStorageService.prototype.removeItem = /**
3925
- * Remove an item in the session storage.
3926
- * @param {?} key
3927
- * @return {?}
3928
- */
3929
- function (key) {
3930
- sessionStorage.removeItem(key);
3931
- };
3932
- /**
3933
- * Clear all the items held in session storage.
3934
- */
3935
- /**
3936
- * Clear all the items held in session storage.
3937
- * @return {?}
3938
- */
3939
- SessionStorageService.prototype.clear = /**
3940
- * Clear all the items held in session storage.
3941
- * @return {?}
3942
- */
3943
- function () {
3944
- sessionStorage.clear();
3945
- };
3946
- SessionStorageService.decorators = [
3947
- { type: i0.Injectable, args: [{
3948
- providedIn: 'root'
3949
- },] }
3950
- ];
3951
- /** @nocollapse */ SessionStorageService.ngInjectableDef = i0.defineInjectable({ factory: function SessionStorageService_Factory() { return new SessionStorageService(); }, token: SessionStorageService, providedIn: "root" });
3952
- return SessionStorageService;
3953
- }());
3954
-
3955
3860
  /**
3956
3861
  * @fileoverview added by tsickle
3957
3862
  * Generated from: lib/components/search-location/search-location.component.ts
3958
3863
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3959
3864
  */
3960
3865
  var SearchLocationComponent = /** @class */ (function () {
3961
- function SearchLocationComponent(locationService, sessionStorageService, fb, cd) {
3866
+ function SearchLocationComponent(locationService, fb, cd) {
3962
3867
  this.locationService = locationService;
3963
- this.sessionStorageService = sessionStorageService;
3964
3868
  this.fb = fb;
3965
3869
  this.cd = cd;
3966
3870
  this.disabled = null;
@@ -4112,9 +4016,7 @@
4112
4016
  * @return {?}
4113
4017
  */
4114
4018
  function (term) {
4115
- /** @type {?} */
4116
- var userLocations = JSON.parse(this.sessionStorageService.getItem('userLocations'));
4117
- return this.locationService.getAllLocations(this.serviceIds, this.locationType, term, userLocations);
4019
+ return this.locationService.getAllLocations(this.serviceIds, this.locationType, term);
4118
4020
  };
4119
4021
  /**
4120
4022
  * @return {?}
@@ -4161,7 +4063,6 @@
4161
4063
  SearchLocationComponent.ctorParameters = function () {
4162
4064
  return [
4163
4065
  { type: LocationService },
4164
- { type: SessionStorageService },
4165
4066
  { type: forms.FormBuilder },
4166
4067
  { type: i0.ChangeDetectorRef }
4167
4068
  ];
@@ -4256,19 +4157,6 @@
4256
4157
  enumerable: true,
4257
4158
  configurable: true
4258
4159
  });
4259
- /**
4260
- * @return {?}
4261
- */
4262
- FindLocationComponent.prototype.ngOnInit = /**
4263
- * @return {?}
4264
- */
4265
- function () {
4266
- // implemented to get rid of undefined values
4267
- this.selectedLocations = this.selectedLocations.filter(( /**
4268
- * @param {?} location
4269
- * @return {?}
4270
- */function (location) { return location.epimms_id; }));
4271
- };
4272
4160
  /**
4273
4161
  * @return {?}
4274
4162
  */
@@ -4762,6 +4650,101 @@
4762
4650
  sessionStorageService.setItem(sessionKey, JSON.stringify(caseworkers));
4763
4651
  });
4764
4652
 
4653
+ /**
4654
+ * @fileoverview added by tsickle
4655
+ * Generated from: lib/services/session-storage/session-storage.service.ts
4656
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4657
+ */
4658
+ var SessionStorageService = /** @class */ (function () {
4659
+ function SessionStorageService() {
4660
+ }
4661
+ /**
4662
+ * Get an item from the session storage.
4663
+ * If remove is true, the item will be removed once read
4664
+ * @param removeAfterRead removed the key once it has been read
4665
+ */
4666
+ /**
4667
+ * Get an item from the session storage.
4668
+ * If remove is true, the item will be removed once read
4669
+ * @param {?} key
4670
+ * @param {?=} removeAfterRead removed the key once it has been read
4671
+ * @return {?}
4672
+ */
4673
+ SessionStorageService.prototype.getItem = /**
4674
+ * Get an item from the session storage.
4675
+ * If remove is true, the item will be removed once read
4676
+ * @param {?} key
4677
+ * @param {?=} removeAfterRead removed the key once it has been read
4678
+ * @return {?}
4679
+ */
4680
+ function (key, removeAfterRead) {
4681
+ if (removeAfterRead === void 0) {
4682
+ removeAfterRead = false;
4683
+ }
4684
+ /** @type {?} */
4685
+ var item = sessionStorage.getItem(key);
4686
+ if (removeAfterRead) {
4687
+ this.removeItem(key);
4688
+ }
4689
+ return item;
4690
+ };
4691
+ /**
4692
+ * Set an item in the session storage.
4693
+ */
4694
+ /**
4695
+ * Set an item in the session storage.
4696
+ * @param {?} key
4697
+ * @param {?} value
4698
+ * @return {?}
4699
+ */
4700
+ SessionStorageService.prototype.setItem = /**
4701
+ * Set an item in the session storage.
4702
+ * @param {?} key
4703
+ * @param {?} value
4704
+ * @return {?}
4705
+ */
4706
+ function (key, value) {
4707
+ sessionStorage.setItem(key, value);
4708
+ };
4709
+ /**
4710
+ * Remove an item in the session storage.
4711
+ */
4712
+ /**
4713
+ * Remove an item in the session storage.
4714
+ * @param {?} key
4715
+ * @return {?}
4716
+ */
4717
+ SessionStorageService.prototype.removeItem = /**
4718
+ * Remove an item in the session storage.
4719
+ * @param {?} key
4720
+ * @return {?}
4721
+ */
4722
+ function (key) {
4723
+ sessionStorage.removeItem(key);
4724
+ };
4725
+ /**
4726
+ * Clear all the items held in session storage.
4727
+ */
4728
+ /**
4729
+ * Clear all the items held in session storage.
4730
+ * @return {?}
4731
+ */
4732
+ SessionStorageService.prototype.clear = /**
4733
+ * Clear all the items held in session storage.
4734
+ * @return {?}
4735
+ */
4736
+ function () {
4737
+ sessionStorage.clear();
4738
+ };
4739
+ SessionStorageService.decorators = [
4740
+ { type: i0.Injectable, args: [{
4741
+ providedIn: 'root'
4742
+ },] }
4743
+ ];
4744
+ /** @nocollapse */ SessionStorageService.ngInjectableDef = i0.defineInjectable({ factory: function SessionStorageService_Factory() { return new SessionStorageService(); }, token: SessionStorageService, providedIn: "root" });
4745
+ return SessionStorageService;
4746
+ }());
4747
+
4765
4748
  /**
4766
4749
  * @fileoverview added by tsickle
4767
4750
  * Generated from: lib/services/find-person/find-person.service.ts
@@ -5173,6 +5156,304 @@
5173
5156
  return FindPersonComponent;
5174
5157
  }());
5175
5158
 
5159
+ /**
5160
+ * @fileoverview added by tsickle
5161
+ * Generated from: lib/services/task-name/task-name.service.ts
5162
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5163
+ */
5164
+ var TaskNameService = /** @class */ (function () {
5165
+ function TaskNameService(http) {
5166
+ this.http = http;
5167
+ }
5168
+ /**
5169
+ * @return Observable<any[]>: Array of taskName in Observable
5170
+ */
5171
+ /**
5172
+ * @return {?} Observable<any[]>: Array of taskName in Observable
5173
+ */
5174
+ TaskNameService.prototype.getTaskName = /**
5175
+ * @return {?} Observable<any[]>: Array of taskName in Observable
5176
+ */
5177
+ function () {
5178
+ return this.http.get("/workallocation2/taskNames");
5179
+ };
5180
+ TaskNameService.decorators = [
5181
+ { type: i0.Injectable, args: [{
5182
+ providedIn: 'root'
5183
+ },] }
5184
+ ];
5185
+ /** @nocollapse */
5186
+ TaskNameService.ctorParameters = function () {
5187
+ return [
5188
+ { type: i1.HttpClient }
5189
+ ];
5190
+ };
5191
+ /** @nocollapse */ TaskNameService.ngInjectableDef = i0.defineInjectable({ factory: function TaskNameService_Factory() { return new TaskNameService(i0.inject(i1.HttpClient)); }, token: TaskNameService, providedIn: "root" });
5192
+ return TaskNameService;
5193
+ }());
5194
+
5195
+ /**
5196
+ * @fileoverview added by tsickle
5197
+ * Generated from: lib/components/find-task-name/find-task-name.component.ts
5198
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5199
+ */
5200
+ var FindTaskNameComponent = /** @class */ (function () {
5201
+ function FindTaskNameComponent(cd, taskService) {
5202
+ this.cd = cd;
5203
+ this.taskService = taskService;
5204
+ this.taskNameSelected = new i0.EventEmitter();
5205
+ this.taskNameFieldChanged = new i0.EventEmitter();
5206
+ this.boldTitle = 'Find the task name';
5207
+ this.subTitle = 'Type the name of the task name and select them.';
5208
+ this.domain = PersonRole.ALL;
5209
+ this.findTaskNameGroup = new forms.FormGroup({});
5210
+ this.submitted = true;
5211
+ this.userIncluded = false;
5212
+ this.placeholderContent = '';
5213
+ this.isNoResultsShown = true;
5214
+ this.showUpdatedColor = false;
5215
+ this.selectedTaskNames = [];
5216
+ this.errorMessage = 'You must select a name';
5217
+ this.idValue = '';
5218
+ this.services = ['IA'];
5219
+ this.disabled = null;
5220
+ this.showAutocomplete = false;
5221
+ this.filteredOptions = [];
5222
+ this.minSearchCharacters = 1;
5223
+ this.searchTerm = '';
5224
+ }
5225
+ /**
5226
+ * @return {?}
5227
+ */
5228
+ FindTaskNameComponent.prototype.ngOnDestroy = /**
5229
+ * @return {?}
5230
+ */
5231
+ function () {
5232
+ if (this.sub) {
5233
+ this.sub.unsubscribe();
5234
+ }
5235
+ };
5236
+ /**
5237
+ * @return {?}
5238
+ */
5239
+ FindTaskNameComponent.prototype.ngOnInit = /**
5240
+ * @return {?}
5241
+ */
5242
+ function () {
5243
+ var _this = this;
5244
+ this.findTaskNameControl = new forms.FormControl(this.selectedTaskName);
5245
+ this.findTaskNameGroup.addControl('findTaskNameControl', this.findTaskNameControl);
5246
+ this.sub = this.findTaskNameControl.valueChanges
5247
+ .pipe(operators.tap(( /**
5248
+ * @return {?}
5249
+ */function () { return _this.showAutocomplete = false; })), operators.tap(( /**
5250
+ * @return {?}
5251
+ */function () { return _this.filteredOptions = []; })), operators.tap(( /**
5252
+ * @param {?} term
5253
+ * @return {?}
5254
+ */function (term) { return _this.searchTerm = term; })), operators.debounceTime(300),
5255
+ // tap((searchTerm) => typeof searchTerm === 'string' ? this.taskNameSelected.emit(null) : void 0),
5256
+ operators.filter(( /**
5257
+ * @param {?} searchTerm
5258
+ * @return {?}
5259
+ */function (searchTerm) { return searchTerm && searchTerm.length >= _this.minSearchCharacters; })), operators.mergeMap(( /**
5260
+ * @return {?}
5261
+ */function () { return _this.getTaskName(); }))).subscribe(( /**
5262
+ * @param {?} task
5263
+ * @return {?}
5264
+ */function (task) {
5265
+ _this.filteredOptions = task;
5266
+ if (_this.searchTerm) {
5267
+ _this.filteredOptions = _this.filteredOptions.filter(( /**
5268
+ * @param {?} t
5269
+ * @return {?}
5270
+ */function (t) { return t.taskName.toLocaleLowerCase().includes(_this.searchTerm.toLocaleLowerCase()); }));
5271
+ }
5272
+ _this.cd.detectChanges();
5273
+ }));
5274
+ };
5275
+ /**
5276
+ * @return {?}
5277
+ */
5278
+ FindTaskNameComponent.prototype.getTaskName = /**
5279
+ * @return {?}
5280
+ */
5281
+ function () {
5282
+ return this.taskService.getTaskName();
5283
+ };
5284
+ // public filter(searchTerm: string): Observable<Person[]> {
5285
+ // console.log("**filter**");
5286
+ // const findJudicialPeople = this.taskService.getTaskName();
5287
+ // // const findJudicialPeople = this.findPersonService.find({searchTerm, userRole: this.domain, services: this.services, userIncluded: this.userIncluded, assignedUser: this.assignedUser});
5288
+ // const findCaseworkersOrAdmins = this.findPersonService.findCaseworkers({searchTerm, userRole: this.domain, services: this.services, userIncluded: this.userIncluded, assignedUser: this.assignedUser});
5289
+ // if (searchTerm && searchTerm.length > this.minSearchCharacters) {
5290
+ // switch (this.domain) {
5291
+ // case PersonRole.JUDICIAL: {
5292
+ // return findJudicialPeople.pipe(map(persons => {
5293
+ // const ids: string[] = this.selectedTaskNames.map(({id}) => id);
5294
+ // return persons.filter(({ id }) => !ids.includes(id));
5295
+ // }));
5296
+ // }
5297
+ // case PersonRole.ALL: {
5298
+ // return zip(findJudicialPeople, findCaseworkersOrAdmins).pipe(map(separatePeople => separatePeople[0].concat(separatePeople[1])));
5299
+ // }
5300
+ // case PersonRole.CASEWORKER:
5301
+ // case PersonRole.ADMIN: {
5302
+ // return findCaseworkersOrAdmins;
5303
+ // }
5304
+ // default: {
5305
+ // return of([]);
5306
+ // }
5307
+ // }
5308
+ // }
5309
+ // return of([]);
5310
+ // }
5311
+ // public filter(searchTerm: string): Observable<Person[]> {
5312
+ // console.log("**filter**");
5313
+ // const findJudicialPeople = this.taskService.getTaskName();
5314
+ // // const findJudicialPeople = this.findPersonService.find({searchTerm, userRole: this.domain, services: this.services, userIncluded: this.userIncluded, assignedUser: this.assignedUser});
5315
+ // const findCaseworkersOrAdmins = this.findPersonService.findCaseworkers({searchTerm, userRole: this.domain, services: this.services, userIncluded: this.userIncluded, assignedUser: this.assignedUser});
5316
+ // if (searchTerm && searchTerm.length > this.minSearchCharacters) {
5317
+ // switch (this.domain) {
5318
+ // case PersonRole.JUDICIAL: {
5319
+ // return findJudicialPeople.pipe(map(persons => {
5320
+ // const ids: string[] = this.selectedTaskNames.map(({id}) => id);
5321
+ // return persons.filter(({ id }) => !ids.includes(id));
5322
+ // }));
5323
+ // }
5324
+ // case PersonRole.ALL: {
5325
+ // return zip(findJudicialPeople, findCaseworkersOrAdmins).pipe(map(separatePeople => separatePeople[0].concat(separatePeople[1])));
5326
+ // }
5327
+ // case PersonRole.CASEWORKER:
5328
+ // case PersonRole.ADMIN: {
5329
+ // return findCaseworkersOrAdmins;
5330
+ // }
5331
+ // default: {
5332
+ // return of([]);
5333
+ // }
5334
+ // }
5335
+ // }
5336
+ // return of([]);
5337
+ // }
5338
+ /**
5339
+ * @param {?} selectedTaskName
5340
+ * @return {?}
5341
+ */
5342
+ FindTaskNameComponent.prototype.onSelectionChange =
5343
+ // public filter(searchTerm: string): Observable<Person[]> {
5344
+ // console.log("**filter**");
5345
+ // const findJudicialPeople = this.taskService.getTaskName();
5346
+ // // const findJudicialPeople = this.findPersonService.find({searchTerm, userRole: this.domain, services: this.services, userIncluded: this.userIncluded, assignedUser: this.assignedUser});
5347
+ // const findCaseworkersOrAdmins = this.findPersonService.findCaseworkers({searchTerm, userRole: this.domain, services: this.services, userIncluded: this.userIncluded, assignedUser: this.assignedUser});
5348
+ // if (searchTerm && searchTerm.length > this.minSearchCharacters) {
5349
+ // switch (this.domain) {
5350
+ // case PersonRole.JUDICIAL: {
5351
+ // return findJudicialPeople.pipe(map(persons => {
5352
+ // const ids: string[] = this.selectedTaskNames.map(({id}) => id);
5353
+ // return persons.filter(({ id }) => !ids.includes(id));
5354
+ // }));
5355
+ // }
5356
+ // case PersonRole.ALL: {
5357
+ // return zip(findJudicialPeople, findCaseworkersOrAdmins).pipe(map(separatePeople => separatePeople[0].concat(separatePeople[1])));
5358
+ // }
5359
+ // case PersonRole.CASEWORKER:
5360
+ // case PersonRole.ADMIN: {
5361
+ // return findCaseworkersOrAdmins;
5362
+ // }
5363
+ // default: {
5364
+ // return of([]);
5365
+ // }
5366
+ // }
5367
+ // }
5368
+ // return of([]);
5369
+ // }
5370
+ /**
5371
+ * @param {?} selectedTaskName
5372
+ * @return {?}
5373
+ */
5374
+ function (selectedTaskName) {
5375
+ if (selectedTaskName && selectedTaskName.taskName) {
5376
+ /** @type {?} */
5377
+ var taskName = selectedTaskName.taskName;
5378
+ this.taskNameSelected.emit(taskName);
5379
+ this.findTaskNameControl.setValue(taskName);
5380
+ }
5381
+ };
5382
+ // public getDisplayName(selectedPerson: Person): string {
5383
+ // if (!selectedPerson) {
5384
+ // return '';
5385
+ // }
5386
+ // if (selectedPerson.domain === PersonRole.JUDICIAL && selectedPerson.knownAs) {
5387
+ // return `${selectedPerson.knownAs} (${selectedPerson.email})`;
5388
+ // }
5389
+ // return selectedPerson.email ? `${selectedPerson.name} (${selectedPerson.email})` : selectedPerson.name;
5390
+ // }
5391
+ // public getDisplayName(selectedPerson: Person): string {
5392
+ // if (!selectedPerson) {
5393
+ // return '';
5394
+ // }
5395
+ // if (selectedPerson.domain === PersonRole.JUDICIAL && selectedPerson.knownAs) {
5396
+ // return `${selectedPerson.knownAs} (${selectedPerson.email})`;
5397
+ // }
5398
+ // return selectedPerson.email ? `${selectedPerson.name} (${selectedPerson.email})` : selectedPerson.name;
5399
+ // }
5400
+ /**
5401
+ * @return {?}
5402
+ */
5403
+ FindTaskNameComponent.prototype.onInput =
5404
+ // public getDisplayName(selectedPerson: Person): string {
5405
+ // if (!selectedPerson) {
5406
+ // return '';
5407
+ // }
5408
+ // if (selectedPerson.domain === PersonRole.JUDICIAL && selectedPerson.knownAs) {
5409
+ // return `${selectedPerson.knownAs} (${selectedPerson.email})`;
5410
+ // }
5411
+ // return selectedPerson.email ? `${selectedPerson.name} (${selectedPerson.email})` : selectedPerson.name;
5412
+ // }
5413
+ /**
5414
+ * @return {?}
5415
+ */
5416
+ function () {
5417
+ this.taskNameFieldChanged.emit();
5418
+ };
5419
+ FindTaskNameComponent.decorators = [
5420
+ { type: i0.Component, args: [{
5421
+ selector: 'xuilib-find-task-name',
5422
+ template: "<h1 class=\"govuk-heading-l\" *ngIf=\"title && title.length\">\n <span class=\"govuk-caption-l\">{{title}}</span>\n {{boldTitle}}\n</h1>\n<div class=\"govuk-form-group\" [formGroup]=\"findTaskNameGroup\"\n [ngClass]=\"{'form-group-error': findTaskNameGroup.get('findTaskNameControl').invalid && submitted}\">\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"sub-title-hint\">\n <div id=\"sub-title-hint\" class=\"govuk-hint\" *ngIf=\"subTitle && subTitle.length\">\n {{subTitle}}\n </div>\n <span id=\"validation-error\" class=\"govuk-error-message\" *ngIf=\"findTaskNameGroup && findTaskNameGroup.errors\">\n <span class=\"govuk-visually-hidden\">Error:</span>{{findTaskNameGroup.errors.error ? findTaskNameGroup.errors.error : errorMessage}}\n </span>\n <input id=\"inputSelectTaskName{{idValue}}\" type=\"text\" aria-label=\"select a task name\"\n formControlName=\"findTaskNameControl\"\n [matAutocomplete]=\"auto\"\n class=\"govuk-input govuk-!-width-one-third\"\n [placeholder]=\"placeholderContent\"\n [attr.disabled]=\"disabled\"\n (input)=\"onInput()\">\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\" (optionSelected)=\"onSelectionChange($event.option.value)\">\n <mat-option *ngFor=\"let option of filteredOptions\"\n [value]=\"option\"\n [ngClass]=\"{'hide-autocomplete': !showAutocomplete, 'select-option': showUpdatedColor}\">\n {{ option.taskName }}\n </mat-option>\n <mat-option [ngClass]=\"{'select-option': showUpdatedColor}\" *ngIf=\"isNoResultsShown && !filteredOptions.length && showAutocomplete\">No results found</mat-option>\n </mat-autocomplete>\n </fieldset>\n</div>\n",
5423
+ styles: [""]
5424
+ }] }
5425
+ ];
5426
+ /** @nocollapse */
5427
+ FindTaskNameComponent.ctorParameters = function () {
5428
+ return [
5429
+ { type: i0.ChangeDetectorRef },
5430
+ { type: TaskNameService }
5431
+ ];
5432
+ };
5433
+ FindTaskNameComponent.propDecorators = {
5434
+ taskNameSelected: [{ type: i0.Output }],
5435
+ taskNameFieldChanged: [{ type: i0.Output }],
5436
+ title: [{ type: i0.Input }],
5437
+ boldTitle: [{ type: i0.Input }],
5438
+ subTitle: [{ type: i0.Input }],
5439
+ domain: [{ type: i0.Input }],
5440
+ findTaskNameGroup: [{ type: i0.Input }],
5441
+ selectedTaskName: [{ type: i0.Input }],
5442
+ submitted: [{ type: i0.Input }],
5443
+ userIncluded: [{ type: i0.Input }],
5444
+ assignedUser: [{ type: i0.Input }],
5445
+ placeholderContent: [{ type: i0.Input }],
5446
+ isNoResultsShown: [{ type: i0.Input }],
5447
+ showUpdatedColor: [{ type: i0.Input }],
5448
+ selectedTaskNames: [{ type: i0.Input }],
5449
+ errorMessage: [{ type: i0.Input }],
5450
+ idValue: [{ type: i0.Input }],
5451
+ services: [{ type: i0.Input }],
5452
+ disabled: [{ type: i0.Input }]
5453
+ };
5454
+ return FindTaskNameComponent;
5455
+ }());
5456
+
5176
5457
  /**
5177
5458
  * @fileoverview added by tsickle
5178
5459
  * Generated from: lib/components/search-judicials/search-judicials.component.ts
@@ -6629,7 +6910,8 @@
6629
6910
  HmctsSubNavigationComponent.decorators = [
6630
6911
  { type: i0.Component, args: [{
6631
6912
  selector: 'xuilib-hmcts-sub-navigation',
6632
- template: "<nav class=\"hmcts-sub-navigation\" attr.aria-label=\"{{label}}\" role=\"navigation\" *ngIf=\"items\">\n <ul class=\"hmcts-sub-navigation__list\">\n <li class=\"hmcts-sub-navigation__item\" *ngFor=\"let item of items\">\n <a data-selector=\"sub-nav-link\" class=\"hmcts-sub-navigation__link\" [routerLink]=\"item.href\"\n [attr.aria-current]=\"item.active ? 'page' : null\">\n {{item.text}}\n </a>\n </li>\n </ul>\n</nav>\n"
6913
+ template: "<nav class=\"hmcts-sub-navigation\" attr.aria-label=\"{{label}}\" role=\"navigation\" *ngIf=\"items\">\n <ul class=\"hmcts-sub-navigation__list\">\n <li class=\"hmcts-sub-navigation__item\" *ngFor=\"let item of items\">\n <a data-selector=\"sub-nav-link\" class=\"hmcts-sub-navigation__link\" [routerLink]=\"item.href\"\n [attr.aria-current]=\"item.active ? 'page' : null\">\n {{item.text}}\n\n <span *ngIf=\"item.roundel && item.roundel > 0 \" class=\"xui-alert-link__number\"> {{item.roundel}} </span>\n </a>\n </li>\n </ul>\n</nav>\n",
6914
+ styles: [".xui-alert-link__number{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:.875rem;line-height:1.78571;border-radius:50%;background-color:#1d70b8;color:#fff;font-weight:700;width:25px;height:25px;margin-left:5px;text-align:center;display:inline-block;text-decoration:none}"]
6633
6915
  }] }
6634
6916
  ];
6635
6917
  HmctsSubNavigationComponent.propDecorators = {
@@ -6722,6 +7004,7 @@
6722
7004
  FindPersonComponent,
6723
7005
  SearchJudicialsComponent,
6724
7006
  FindLocationComponent,
7007
+ FindTaskNameComponent,
6725
7008
  SearchLocationComponent,
6726
7009
  SearchVenueComponent,
6727
7010
  PaginationComponent
@@ -7847,15 +8130,16 @@
7847
8130
  exports.ɵa = ExuiPageWrapperComponent;
7848
8131
  exports.ɵbl = FindLocationComponent;
7849
8132
  exports.ɵbh = FindPersonComponent;
8133
+ exports.ɵbo = FindTaskNameComponent;
7850
8134
  exports.ɵbd = GenericFilterComponent;
7851
8135
  exports.ɵk = HmctsSessionDialogComponent;
7852
8136
  exports.ɵo = InviteUserFormComponent;
7853
8137
  exports.ɵn = InviteUserPermissionComponent;
7854
8138
  exports.ɵbc = LoadingSpinnerComponent;
7855
- exports.ɵbp = PaginationComponent;
8139
+ exports.ɵbr = PaginationComponent;
7856
8140
  exports.ɵbk = SearchJudicialsComponent;
7857
8141
  exports.ɵbm = SearchLocationComponent;
7858
- exports.ɵbo = SearchVenueComponent;
8142
+ exports.ɵbq = SearchVenueComponent;
7859
8143
  exports.ɵv = SelectedCaseConfirmComponent;
7860
8144
  exports.ɵt = SelectedCaseListComponent;
7861
8145
  exports.ɵu = SelectedCaseComponent;
@@ -7874,28 +8158,28 @@
7874
8158
  exports.ɵg = FeatureToggleDirective;
7875
8159
  exports.ɵi = LetContext;
7876
8160
  exports.ɵj = LetDirective;
7877
- exports.ɵbz = GovUkCheckboxComponent;
7878
- exports.ɵcf = GovUkCheckboxesComponent;
7879
- exports.ɵce = GovUkDateComponent;
7880
- exports.ɵcc = GovUkErrorMessageComponent;
7881
- exports.ɵcd = GovUkFieldsetComponent;
7882
- exports.ɵck = GovUkFileUploadComponent;
7883
- exports.ɵca = GovUkFormGroupWrapperComponent;
7884
- exports.ɵby = GovUkInputComponent;
7885
- exports.ɵcb = GovUkLabelComponent;
7886
- exports.ɵcg = GovUkRadioComponent;
7887
- exports.ɵch = GovUkRadiosComponent;
7888
- exports.ɵci = GovUkSelectComponent;
7889
- exports.ɵbx = GovukTableComponent;
7890
- exports.ɵcj = GovUkTextareaComponent;
7891
- exports.ɵbw = HmctsBannerComponent;
7892
- exports.ɵbu = HmctsErrorSummaryComponent;
7893
- exports.ɵbq = HmctsIdentityBarComponent;
7894
- exports.ɵbv = HmctsMainWrapperComponent;
7895
- exports.ɵbr = HmctsPaginationComponent;
7896
- exports.ɵbt = HmctsPrimaryNavigationComponent;
7897
- exports.ɵbs = HmctsSubNavigationComponent;
7898
- exports.ɵcl = RemoveHostDirective;
8161
+ exports.ɵcb = GovUkCheckboxComponent;
8162
+ exports.ɵch = GovUkCheckboxesComponent;
8163
+ exports.ɵcg = GovUkDateComponent;
8164
+ exports.ɵce = GovUkErrorMessageComponent;
8165
+ exports.ɵcf = GovUkFieldsetComponent;
8166
+ exports.ɵcm = GovUkFileUploadComponent;
8167
+ exports.ɵcc = GovUkFormGroupWrapperComponent;
8168
+ exports.ɵca = GovUkInputComponent;
8169
+ exports.ɵcd = GovUkLabelComponent;
8170
+ exports.ɵci = GovUkRadioComponent;
8171
+ exports.ɵcj = GovUkRadiosComponent;
8172
+ exports.ɵck = GovUkSelectComponent;
8173
+ exports.ɵbz = GovukTableComponent;
8174
+ exports.ɵcl = GovUkTextareaComponent;
8175
+ exports.ɵby = HmctsBannerComponent;
8176
+ exports.ɵbw = HmctsErrorSummaryComponent;
8177
+ exports.ɵbs = HmctsIdentityBarComponent;
8178
+ exports.ɵbx = HmctsMainWrapperComponent;
8179
+ exports.ɵbt = HmctsPaginationComponent;
8180
+ exports.ɵbv = HmctsPrimaryNavigationComponent;
8181
+ exports.ɵbu = HmctsSubNavigationComponent;
8182
+ exports.ɵcn = RemoveHostDirective;
7899
8183
  exports.ɵr = CaseSharingStateService;
7900
8184
  exports.ɵbg = CookieService;
7901
8185
  exports.ɵh = FeatureToggleService;
@@ -7903,6 +8187,7 @@
7903
8187
  exports.ɵbi = FindAPersonService;
7904
8188
  exports.ɵbn = LocationService;
7905
8189
  exports.ɵbj = SessionStorageService;
8190
+ exports.ɵbp = TaskNameService;
7906
8191
 
7907
8192
  Object.defineProperty(exports, '__esModule', { value: true });
7908
8193