@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.
- package/bundles/hmcts-rpx-xui-common-lib.umd.js +353 -26
- package/bundles/hmcts-rpx-xui-common-lib.umd.js.map +1 -1
- package/bundles/hmcts-rpx-xui-common-lib.umd.min.js +1 -1
- package/bundles/hmcts-rpx-xui-common-lib.umd.min.js.map +1 -1
- package/esm2015/hmcts-rpx-xui-common-lib.js +27 -25
- package/esm2015/lib/components/find-task-name/find-task-name.component.js +249 -0
- package/esm2015/lib/components/generic-filter/generic-filter.component.js +22 -2
- package/esm2015/lib/exui-common-lib.module.js +3 -1
- package/esm2015/lib/gov-ui/components/hmcts-sub-navigation/hmcts-sub-navigation.component.js +5 -2
- package/esm2015/lib/models/filter.model.js +5 -1
- package/esm2015/lib/models/task-name.model.js +16 -0
- package/esm2015/lib/services/task-name/task-name.service.js +41 -0
- package/esm5/hmcts-rpx-xui-common-lib.js +27 -25
- package/esm5/lib/components/find-task-name/find-task-name.component.js +338 -0
- package/esm5/lib/components/generic-filter/generic-filter.component.js +27 -2
- package/esm5/lib/exui-common-lib.module.js +3 -1
- package/esm5/lib/gov-ui/components/hmcts-sub-navigation/hmcts-sub-navigation.component.js +5 -2
- package/esm5/lib/models/filter.model.js +5 -1
- package/esm5/lib/models/task-name.model.js +16 -0
- package/esm5/lib/services/task-name/task-name.service.js +46 -0
- package/fesm2015/hmcts-rpx-xui-common-lib.js +234 -3
- package/fesm2015/hmcts-rpx-xui-common-lib.js.map +1 -1
- package/fesm5/hmcts-rpx-xui-common-lib.js +331 -3
- package/fesm5/hmcts-rpx-xui-common-lib.js.map +1 -1
- package/hmcts-rpx-xui-common-lib.d.ts +26 -24
- package/hmcts-rpx-xui-common-lib.metadata.json +1 -1
- package/lib/components/find-task-name/find-task-name.component.d.ts +41 -0
- package/lib/components/generic-filter/generic-filter.component.d.ts +1 -0
- package/lib/exui-common-lib.module.d.ts +2 -1
- package/lib/gov-ui/components/hmcts-sub-navigation/hmcts-sub-navigation.component.d.ts +1 -0
- package/lib/models/filter.model.d.ts +3 -1
- package/lib/models/task-name.model.d.ts +4 -0
- package/lib/services/task-name/task-name.service.d.ts +10 -0
- 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
|
|
@@ -1645,7 +1670,7 @@
|
|
|
1645
1670
|
GenericFilterComponent.decorators = [
|
|
1646
1671
|
{ type: i0.Component, args: [{
|
|
1647
1672
|
selector: 'xuilib-generic-filter',
|
|
1648
|
-
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",
|
|
1649
1674
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1650
1675
|
encapsulation: i0.ViewEncapsulation.None,
|
|
1651
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}"]
|
|
@@ -5131,6 +5156,304 @@
|
|
|
5131
5156
|
return FindPersonComponent;
|
|
5132
5157
|
}());
|
|
5133
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
|
+
|
|
5134
5457
|
/**
|
|
5135
5458
|
* @fileoverview added by tsickle
|
|
5136
5459
|
* Generated from: lib/components/search-judicials/search-judicials.component.ts
|
|
@@ -6587,7 +6910,8 @@
|
|
|
6587
6910
|
HmctsSubNavigationComponent.decorators = [
|
|
6588
6911
|
{ type: i0.Component, args: [{
|
|
6589
6912
|
selector: 'xuilib-hmcts-sub-navigation',
|
|
6590
|
-
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}"]
|
|
6591
6915
|
}] }
|
|
6592
6916
|
];
|
|
6593
6917
|
HmctsSubNavigationComponent.propDecorators = {
|
|
@@ -6680,6 +7004,7 @@
|
|
|
6680
7004
|
FindPersonComponent,
|
|
6681
7005
|
SearchJudicialsComponent,
|
|
6682
7006
|
FindLocationComponent,
|
|
7007
|
+
FindTaskNameComponent,
|
|
6683
7008
|
SearchLocationComponent,
|
|
6684
7009
|
SearchVenueComponent,
|
|
6685
7010
|
PaginationComponent
|
|
@@ -7805,15 +8130,16 @@
|
|
|
7805
8130
|
exports.ɵa = ExuiPageWrapperComponent;
|
|
7806
8131
|
exports.ɵbl = FindLocationComponent;
|
|
7807
8132
|
exports.ɵbh = FindPersonComponent;
|
|
8133
|
+
exports.ɵbo = FindTaskNameComponent;
|
|
7808
8134
|
exports.ɵbd = GenericFilterComponent;
|
|
7809
8135
|
exports.ɵk = HmctsSessionDialogComponent;
|
|
7810
8136
|
exports.ɵo = InviteUserFormComponent;
|
|
7811
8137
|
exports.ɵn = InviteUserPermissionComponent;
|
|
7812
8138
|
exports.ɵbc = LoadingSpinnerComponent;
|
|
7813
|
-
exports.ɵ
|
|
8139
|
+
exports.ɵbr = PaginationComponent;
|
|
7814
8140
|
exports.ɵbk = SearchJudicialsComponent;
|
|
7815
8141
|
exports.ɵbm = SearchLocationComponent;
|
|
7816
|
-
exports.ɵ
|
|
8142
|
+
exports.ɵbq = SearchVenueComponent;
|
|
7817
8143
|
exports.ɵv = SelectedCaseConfirmComponent;
|
|
7818
8144
|
exports.ɵt = SelectedCaseListComponent;
|
|
7819
8145
|
exports.ɵu = SelectedCaseComponent;
|
|
@@ -7832,28 +8158,28 @@
|
|
|
7832
8158
|
exports.ɵg = FeatureToggleDirective;
|
|
7833
8159
|
exports.ɵi = LetContext;
|
|
7834
8160
|
exports.ɵj = LetDirective;
|
|
7835
|
-
exports.ɵ
|
|
7836
|
-
exports.ɵ
|
|
7837
|
-
exports.ɵ
|
|
7838
|
-
exports.ɵ
|
|
7839
|
-
exports.ɵ
|
|
7840
|
-
exports.ɵ
|
|
7841
|
-
exports.ɵ
|
|
7842
|
-
exports.ɵ
|
|
7843
|
-
exports.ɵ
|
|
7844
|
-
exports.ɵ
|
|
7845
|
-
exports.ɵ
|
|
7846
|
-
exports.ɵ
|
|
7847
|
-
exports.ɵ
|
|
7848
|
-
exports.ɵ
|
|
7849
|
-
exports.ɵ
|
|
7850
|
-
exports.ɵ
|
|
7851
|
-
exports.ɵ
|
|
7852
|
-
exports.ɵ
|
|
7853
|
-
exports.ɵ
|
|
7854
|
-
exports.ɵ
|
|
7855
|
-
exports.ɵ
|
|
7856
|
-
exports.ɵ
|
|
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;
|
|
7857
8183
|
exports.ɵr = CaseSharingStateService;
|
|
7858
8184
|
exports.ɵbg = CookieService;
|
|
7859
8185
|
exports.ɵh = FeatureToggleService;
|
|
@@ -7861,6 +8187,7 @@
|
|
|
7861
8187
|
exports.ɵbi = FindAPersonService;
|
|
7862
8188
|
exports.ɵbn = LocationService;
|
|
7863
8189
|
exports.ɵbj = SessionStorageService;
|
|
8190
|
+
exports.ɵbp = TaskNameService;
|
|
7864
8191
|
|
|
7865
8192
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7866
8193
|
|