@hmcts/rpx-xui-common-lib 1.7.6 → 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 (34) hide show
  1. package/bundles/hmcts-rpx-xui-common-lib.umd.js +353 -26
  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-task-name/find-task-name.component.js +249 -0
  7. package/esm2015/lib/components/generic-filter/generic-filter.component.js +22 -2
  8. package/esm2015/lib/exui-common-lib.module.js +3 -1
  9. package/esm2015/lib/gov-ui/components/hmcts-sub-navigation/hmcts-sub-navigation.component.js +5 -2
  10. package/esm2015/lib/models/filter.model.js +5 -1
  11. package/esm2015/lib/models/task-name.model.js +16 -0
  12. package/esm2015/lib/services/task-name/task-name.service.js +41 -0
  13. package/esm5/hmcts-rpx-xui-common-lib.js +27 -25
  14. package/esm5/lib/components/find-task-name/find-task-name.component.js +338 -0
  15. package/esm5/lib/components/generic-filter/generic-filter.component.js +27 -2
  16. package/esm5/lib/exui-common-lib.module.js +3 -1
  17. package/esm5/lib/gov-ui/components/hmcts-sub-navigation/hmcts-sub-navigation.component.js +5 -2
  18. package/esm5/lib/models/filter.model.js +5 -1
  19. package/esm5/lib/models/task-name.model.js +16 -0
  20. package/esm5/lib/services/task-name/task-name.service.js +46 -0
  21. package/fesm2015/hmcts-rpx-xui-common-lib.js +234 -3
  22. package/fesm2015/hmcts-rpx-xui-common-lib.js.map +1 -1
  23. package/fesm5/hmcts-rpx-xui-common-lib.js +331 -3
  24. package/fesm5/hmcts-rpx-xui-common-lib.js.map +1 -1
  25. package/hmcts-rpx-xui-common-lib.d.ts +26 -24
  26. package/hmcts-rpx-xui-common-lib.metadata.json +1 -1
  27. package/lib/components/find-task-name/find-task-name.component.d.ts +41 -0
  28. package/lib/components/generic-filter/generic-filter.component.d.ts +1 -0
  29. package/lib/exui-common-lib.module.d.ts +2 -1
  30. package/lib/gov-ui/components/hmcts-sub-navigation/hmcts-sub-navigation.component.d.ts +1 -0
  31. package/lib/models/filter.model.d.ts +3 -1
  32. package/lib/models/task-name.model.d.ts +4 -0
  33. package/lib/services/task-name/task-name.service.d.ts +10 -0
  34. package/package.json +1 -1
@@ -869,6 +869,26 @@ class GenericFilterComponent {
869
869
  }
870
870
  }
871
871
  }
872
+ /**
873
+ * @param {?} values
874
+ * @param {?} field
875
+ * @return {?}
876
+ */
877
+ updateTaskNameControls(values, field) {
878
+ // let keys;
879
+ // if (!values) {
880
+ // keys = Object.keys(this.form.get(field.name).value);
881
+ // } else {
882
+ // keys = Object.keys(values);
883
+ // }
884
+ // for (const key of keys) {
885
+ // if (this.form.get(field.name) && this.form.get(field.name).get(key)) {
886
+ // const value = values && values[key] ? values[key] : null;
887
+ // this.form.get(field.name).get(key).patchValue(value);
888
+ // }
889
+ // }
890
+ this.form.get(field.name).patchValue(values);
891
+ }
872
892
  /**
873
893
  * @param {?} event
874
894
  * @param {?} form
@@ -1199,7 +1219,7 @@ class GenericFilterComponent {
1199
1219
  GenericFilterComponent.decorators = [
1200
1220
  { type: Component, args: [{
1201
1221
  selector: 'xuilib-generic-filter',
1202
- 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",
1222
+ 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",
1203
1223
  changeDetection: ChangeDetectionStrategy.OnPush,
1204
1224
  encapsulation: ViewEncapsulation.None,
1205
1225
  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}"]
@@ -4058,6 +4078,215 @@ FindPersonComponent.propDecorators = {
4058
4078
  disabled: [{ type: Input }]
4059
4079
  };
4060
4080
 
4081
+ /**
4082
+ * @fileoverview added by tsickle
4083
+ * Generated from: lib/services/task-name/task-name.service.ts
4084
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4085
+ */
4086
+ class TaskNameService {
4087
+ /**
4088
+ * @param {?} http
4089
+ */
4090
+ constructor(http) {
4091
+ this.http = http;
4092
+ }
4093
+ /**
4094
+ * @return {?} Observable<any[]>: Array of taskName in Observable
4095
+ */
4096
+ getTaskName() {
4097
+ return this.http.get(`/workallocation2/taskNames`);
4098
+ }
4099
+ }
4100
+ TaskNameService.decorators = [
4101
+ { type: Injectable, args: [{
4102
+ providedIn: 'root'
4103
+ },] }
4104
+ ];
4105
+ /** @nocollapse */
4106
+ TaskNameService.ctorParameters = () => [
4107
+ { type: HttpClient }
4108
+ ];
4109
+ /** @nocollapse */ TaskNameService.ngInjectableDef = defineInjectable({ factory: function TaskNameService_Factory() { return new TaskNameService(inject(HttpClient)); }, token: TaskNameService, providedIn: "root" });
4110
+
4111
+ /**
4112
+ * @fileoverview added by tsickle
4113
+ * Generated from: lib/components/find-task-name/find-task-name.component.ts
4114
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4115
+ */
4116
+ class FindTaskNameComponent {
4117
+ /**
4118
+ * @param {?} cd
4119
+ * @param {?} taskService
4120
+ */
4121
+ constructor(cd, taskService) {
4122
+ this.cd = cd;
4123
+ this.taskService = taskService;
4124
+ this.taskNameSelected = new EventEmitter();
4125
+ this.taskNameFieldChanged = new EventEmitter();
4126
+ this.boldTitle = 'Find the task name';
4127
+ this.subTitle = 'Type the name of the task name and select them.';
4128
+ this.domain = PersonRole.ALL;
4129
+ this.findTaskNameGroup = new FormGroup({});
4130
+ this.submitted = true;
4131
+ this.userIncluded = false;
4132
+ this.placeholderContent = '';
4133
+ this.isNoResultsShown = true;
4134
+ this.showUpdatedColor = false;
4135
+ this.selectedTaskNames = [];
4136
+ this.errorMessage = 'You must select a name';
4137
+ this.idValue = '';
4138
+ this.services = ['IA'];
4139
+ this.disabled = null;
4140
+ this.showAutocomplete = false;
4141
+ this.filteredOptions = [];
4142
+ this.minSearchCharacters = 1;
4143
+ this.searchTerm = '';
4144
+ }
4145
+ /**
4146
+ * @return {?}
4147
+ */
4148
+ ngOnDestroy() {
4149
+ if (this.sub) {
4150
+ this.sub.unsubscribe();
4151
+ }
4152
+ }
4153
+ /**
4154
+ * @return {?}
4155
+ */
4156
+ ngOnInit() {
4157
+ this.findTaskNameControl = new FormControl(this.selectedTaskName);
4158
+ this.findTaskNameGroup.addControl('findTaskNameControl', this.findTaskNameControl);
4159
+ this.sub = this.findTaskNameControl.valueChanges
4160
+ .pipe(tap((/**
4161
+ * @return {?}
4162
+ */
4163
+ () => this.showAutocomplete = false)), tap((/**
4164
+ * @return {?}
4165
+ */
4166
+ () => this.filteredOptions = [])), tap((/**
4167
+ * @param {?} term
4168
+ * @return {?}
4169
+ */
4170
+ (term) => this.searchTerm = term)), debounceTime(300),
4171
+ // tap((searchTerm) => typeof searchTerm === 'string' ? this.taskNameSelected.emit(null) : void 0),
4172
+ filter((/**
4173
+ * @param {?} searchTerm
4174
+ * @return {?}
4175
+ */
4176
+ (searchTerm) => searchTerm && searchTerm.length >= this.minSearchCharacters)), mergeMap((/**
4177
+ * @return {?}
4178
+ */
4179
+ () => this.getTaskName()))).subscribe((/**
4180
+ * @param {?} task
4181
+ * @return {?}
4182
+ */
4183
+ (task) => {
4184
+ this.filteredOptions = task;
4185
+ if (this.searchTerm) {
4186
+ this.filteredOptions = this.filteredOptions.filter((/**
4187
+ * @param {?} t
4188
+ * @return {?}
4189
+ */
4190
+ (t) => t.taskName.toLocaleLowerCase().includes(this.searchTerm.toLocaleLowerCase())));
4191
+ }
4192
+ this.cd.detectChanges();
4193
+ }));
4194
+ }
4195
+ /**
4196
+ * @return {?}
4197
+ */
4198
+ getTaskName() {
4199
+ return this.taskService.getTaskName();
4200
+ }
4201
+ // public filter(searchTerm: string): Observable<Person[]> {
4202
+ // console.log("**filter**");
4203
+ // const findJudicialPeople = this.taskService.getTaskName();
4204
+ // // const findJudicialPeople = this.findPersonService.find({searchTerm, userRole: this.domain, services: this.services, userIncluded: this.userIncluded, assignedUser: this.assignedUser});
4205
+ // const findCaseworkersOrAdmins = this.findPersonService.findCaseworkers({searchTerm, userRole: this.domain, services: this.services, userIncluded: this.userIncluded, assignedUser: this.assignedUser});
4206
+ // if (searchTerm && searchTerm.length > this.minSearchCharacters) {
4207
+ // switch (this.domain) {
4208
+ // case PersonRole.JUDICIAL: {
4209
+ // return findJudicialPeople.pipe(map(persons => {
4210
+ // const ids: string[] = this.selectedTaskNames.map(({id}) => id);
4211
+ // return persons.filter(({ id }) => !ids.includes(id));
4212
+ // }));
4213
+ // }
4214
+ // case PersonRole.ALL: {
4215
+ // return zip(findJudicialPeople, findCaseworkersOrAdmins).pipe(map(separatePeople => separatePeople[0].concat(separatePeople[1])));
4216
+ // }
4217
+ // case PersonRole.CASEWORKER:
4218
+ // case PersonRole.ADMIN: {
4219
+ // return findCaseworkersOrAdmins;
4220
+ // }
4221
+ // default: {
4222
+ // return of([]);
4223
+ // }
4224
+ // }
4225
+ // }
4226
+ // return of([]);
4227
+ // }
4228
+ /**
4229
+ * @param {?} selectedTaskName
4230
+ * @return {?}
4231
+ */
4232
+ onSelectionChange(selectedTaskName) {
4233
+ if (selectedTaskName && selectedTaskName.taskName) {
4234
+ /** @type {?} */
4235
+ const taskName = selectedTaskName.taskName;
4236
+ this.taskNameSelected.emit(taskName);
4237
+ this.findTaskNameControl.setValue(taskName);
4238
+ }
4239
+ }
4240
+ // public getDisplayName(selectedPerson: Person): string {
4241
+ // if (!selectedPerson) {
4242
+ // return '';
4243
+ // }
4244
+ // if (selectedPerson.domain === PersonRole.JUDICIAL && selectedPerson.knownAs) {
4245
+ // return `${selectedPerson.knownAs} (${selectedPerson.email})`;
4246
+ // }
4247
+ // return selectedPerson.email ? `${selectedPerson.name} (${selectedPerson.email})` : selectedPerson.name;
4248
+ // }
4249
+ /**
4250
+ * @return {?}
4251
+ */
4252
+ onInput() {
4253
+ this.taskNameFieldChanged.emit();
4254
+ }
4255
+ }
4256
+ FindTaskNameComponent.decorators = [
4257
+ { type: Component, args: [{
4258
+ selector: 'xuilib-find-task-name',
4259
+ 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",
4260
+ styles: [""]
4261
+ }] }
4262
+ ];
4263
+ /** @nocollapse */
4264
+ FindTaskNameComponent.ctorParameters = () => [
4265
+ { type: ChangeDetectorRef },
4266
+ { type: TaskNameService }
4267
+ ];
4268
+ FindTaskNameComponent.propDecorators = {
4269
+ taskNameSelected: [{ type: Output }],
4270
+ taskNameFieldChanged: [{ type: Output }],
4271
+ title: [{ type: Input }],
4272
+ boldTitle: [{ type: Input }],
4273
+ subTitle: [{ type: Input }],
4274
+ domain: [{ type: Input }],
4275
+ findTaskNameGroup: [{ type: Input }],
4276
+ selectedTaskName: [{ type: Input }],
4277
+ submitted: [{ type: Input }],
4278
+ userIncluded: [{ type: Input }],
4279
+ assignedUser: [{ type: Input }],
4280
+ placeholderContent: [{ type: Input }],
4281
+ isNoResultsShown: [{ type: Input }],
4282
+ showUpdatedColor: [{ type: Input }],
4283
+ selectedTaskNames: [{ type: Input }],
4284
+ errorMessage: [{ type: Input }],
4285
+ idValue: [{ type: Input }],
4286
+ services: [{ type: Input }],
4287
+ disabled: [{ type: Input }]
4288
+ };
4289
+
4061
4290
  /**
4062
4291
  * @fileoverview added by tsickle
4063
4292
  * Generated from: lib/components/search-judicials/search-judicials.component.ts
@@ -5285,7 +5514,8 @@ class HmctsSubNavigationComponent {
5285
5514
  HmctsSubNavigationComponent.decorators = [
5286
5515
  { type: Component, args: [{
5287
5516
  selector: 'xuilib-hmcts-sub-navigation',
5288
- 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"
5517
+ 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",
5518
+ 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}"]
5289
5519
  }] }
5290
5520
  ];
5291
5521
  HmctsSubNavigationComponent.propDecorators = {
@@ -5373,6 +5603,7 @@ const COMMON_COMPONENTS = [
5373
5603
  FindPersonComponent,
5374
5604
  SearchJudicialsComponent,
5375
5605
  FindLocationComponent,
5606
+ FindTaskNameComponent,
5376
5607
  SearchLocationComponent,
5377
5608
  SearchVenueComponent,
5378
5609
  PaginationComponent
@@ -6304,6 +6535,6 @@ LoadingService.decorators = [
6304
6535
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
6305
6536
  */
6306
6537
 
6307
- export { AccessibilityComponent, CheckboxListComponent, ContactDetailsComponent, DueDateComponent, GenericFilterComponent, HmctsSessionDialogComponent, InviteUserFormComponent, InviteUserPermissionComponent, LoadingSpinnerComponent, SelectedCaseConfirmComponent, SelectedCaseListComponent, SelectedCaseComponent, ServiceMessageComponent, ServiceMessagesComponent, ShareCaseConfirmComponent, ShareCaseComponent, TabComponent, TcConfirmComponent, TcDisplayHtmlComponent, TcDisplayPlainComponent, TermsAndConditionsComponent, UserDetailsComponent, UserListComponent, CookieBannerComponent, FindLocationComponent, SearchLocationComponent, PaginationComponent, FeatureToggleDirective, LetContext, LetDirective, COMMON_COMPONENTS, GOV_UI_COMPONENTS, ExuiCommonLibModule, GovUiService, checkboxesBeCheckedValidator, dateValidator, radioGroupValidator, HmctsSubNavigationComponent, BadgeColour, DateBadgeColour, SECONDS_IN_A_DAY, AnonymousFeatureUser, LoggedInFeatureUser, PersonRole, RoleCategory, RadioFilterFieldConfig, FeatureToggleGuard, FeatureToggleService, LaunchDarklyService, GoogleAnalyticsService, GoogleTagManagerService, ManageSessionServices, TimeoutNotificationsService, RoleMatching, RoleGuard, RoleService, CookieService, HasLoadingState, LoadingService, FilterService, windowProvider, windowToken, AccessibilityComponent as ɵx, CheckboxListComponent as ɵz, ContactDetailsComponent as ɵf, CookieBannerComponent as ɵbf, DueDateComponent as ɵy, ExuiPageWrapperComponent as ɵa, FindLocationComponent as ɵbl, FindPersonComponent as ɵbh, GenericFilterComponent as ɵbd, HmctsSessionDialogComponent as ɵk, InviteUserFormComponent as ɵo, InviteUserPermissionComponent as ɵn, LoadingSpinnerComponent as ɵbc, PaginationComponent as ɵbp, SearchJudicialsComponent as ɵbk, SearchLocationComponent as ɵbm, SearchVenueComponent as ɵbo, SelectedCaseConfirmComponent as ɵv, SelectedCaseListComponent as ɵt, SelectedCaseComponent as ɵu, ServiceMessageComponent as ɵba, ServiceMessagesComponent as ɵbb, ShareCaseConfirmComponent as ɵs, ShareCaseComponent as ɵp, TabComponent as ɵw, TcConfirmComponent as ɵe, TcDisplayHtmlComponent as ɵc, TcDisplayPlainComponent as ɵd, TermsAndConditionsComponent as ɵb, UserDetailsComponent as ɵm, UserListComponent as ɵl, UserSelectComponent as ɵq, FeatureToggleDirective as ɵg, LetContext as ɵi, LetDirective as ɵj, GovUkCheckboxComponent as ɵbz, GovUkCheckboxesComponent as ɵcf, GovUkDateComponent as ɵce, GovUkErrorMessageComponent as ɵcc, GovUkFieldsetComponent as ɵcd, GovUkFileUploadComponent as ɵck, GovUkFormGroupWrapperComponent as ɵca, GovUkInputComponent as ɵby, GovUkLabelComponent as ɵcb, GovUkRadioComponent as ɵcg, GovUkRadiosComponent as ɵch, GovUkSelectComponent as ɵci, GovukTableComponent as ɵbx, GovUkTextareaComponent as ɵcj, HmctsBannerComponent as ɵbw, HmctsErrorSummaryComponent as ɵbu, HmctsIdentityBarComponent as ɵbq, HmctsMainWrapperComponent as ɵbv, HmctsPaginationComponent as ɵbr, HmctsPrimaryNavigationComponent as ɵbt, HmctsSubNavigationComponent as ɵbs, RemoveHostDirective as ɵcl, CaseSharingStateService as ɵr, CookieService as ɵbg, FeatureToggleService as ɵh, FilterService as ɵbe, FindAPersonService as ɵbi, LocationService as ɵbn, SessionStorageService as ɵbj };
6538
+ export { AccessibilityComponent, CheckboxListComponent, ContactDetailsComponent, DueDateComponent, GenericFilterComponent, HmctsSessionDialogComponent, InviteUserFormComponent, InviteUserPermissionComponent, LoadingSpinnerComponent, SelectedCaseConfirmComponent, SelectedCaseListComponent, SelectedCaseComponent, ServiceMessageComponent, ServiceMessagesComponent, ShareCaseConfirmComponent, ShareCaseComponent, TabComponent, TcConfirmComponent, TcDisplayHtmlComponent, TcDisplayPlainComponent, TermsAndConditionsComponent, UserDetailsComponent, UserListComponent, CookieBannerComponent, FindLocationComponent, SearchLocationComponent, PaginationComponent, FeatureToggleDirective, LetContext, LetDirective, COMMON_COMPONENTS, GOV_UI_COMPONENTS, ExuiCommonLibModule, GovUiService, checkboxesBeCheckedValidator, dateValidator, radioGroupValidator, HmctsSubNavigationComponent, BadgeColour, DateBadgeColour, SECONDS_IN_A_DAY, AnonymousFeatureUser, LoggedInFeatureUser, PersonRole, RoleCategory, RadioFilterFieldConfig, FeatureToggleGuard, FeatureToggleService, LaunchDarklyService, GoogleAnalyticsService, GoogleTagManagerService, ManageSessionServices, TimeoutNotificationsService, RoleMatching, RoleGuard, RoleService, CookieService, HasLoadingState, LoadingService, FilterService, windowProvider, windowToken, AccessibilityComponent as ɵx, CheckboxListComponent as ɵz, ContactDetailsComponent as ɵf, CookieBannerComponent as ɵbf, DueDateComponent as ɵy, ExuiPageWrapperComponent as ɵa, FindLocationComponent as ɵbl, FindPersonComponent as ɵbh, FindTaskNameComponent as ɵbo, GenericFilterComponent as ɵbd, HmctsSessionDialogComponent as ɵk, InviteUserFormComponent as ɵo, InviteUserPermissionComponent as ɵn, LoadingSpinnerComponent as ɵbc, PaginationComponent as ɵbr, SearchJudicialsComponent as ɵbk, SearchLocationComponent as ɵbm, SearchVenueComponent as ɵbq, SelectedCaseConfirmComponent as ɵv, SelectedCaseListComponent as ɵt, SelectedCaseComponent as ɵu, ServiceMessageComponent as ɵba, ServiceMessagesComponent as ɵbb, ShareCaseConfirmComponent as ɵs, ShareCaseComponent as ɵp, TabComponent as ɵw, TcConfirmComponent as ɵe, TcDisplayHtmlComponent as ɵc, TcDisplayPlainComponent as ɵd, TermsAndConditionsComponent as ɵb, UserDetailsComponent as ɵm, UserListComponent as ɵl, UserSelectComponent as ɵq, FeatureToggleDirective as ɵg, LetContext as ɵi, LetDirective as ɵj, GovUkCheckboxComponent as ɵcb, GovUkCheckboxesComponent as ɵch, GovUkDateComponent as ɵcg, GovUkErrorMessageComponent as ɵce, GovUkFieldsetComponent as ɵcf, GovUkFileUploadComponent as ɵcm, GovUkFormGroupWrapperComponent as ɵcc, GovUkInputComponent as ɵca, GovUkLabelComponent as ɵcd, GovUkRadioComponent as ɵci, GovUkRadiosComponent as ɵcj, GovUkSelectComponent as ɵck, GovukTableComponent as ɵbz, GovUkTextareaComponent as ɵcl, HmctsBannerComponent as ɵby, HmctsErrorSummaryComponent as ɵbw, HmctsIdentityBarComponent as ɵbs, HmctsMainWrapperComponent as ɵbx, HmctsPaginationComponent as ɵbt, HmctsPrimaryNavigationComponent as ɵbv, HmctsSubNavigationComponent as ɵbu, RemoveHostDirective as ɵcn, CaseSharingStateService as ɵr, CookieService as ɵbg, FeatureToggleService as ɵh, FilterService as ɵbe, FindAPersonService as ɵbi, LocationService as ɵbn, SessionStorageService as ɵbj, TaskNameService as ɵbp };
6308
6539
 
6309
6540
  //# sourceMappingURL=hmcts-rpx-xui-common-lib.js.map