@hmcts/rpx-xui-common-lib 1.7.12 → 1.7.13-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 +254 -114
- 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 -26
- package/esm2015/lib/components/find-task-name/find-task-name.component.js +228 -0
- package/esm2015/lib/components/generic-filter/generic-filter.component.js +22 -2
- package/esm2015/lib/exui-common-lib.module.js +4 -4
- 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/pagination.model.js +1 -11
- package/esm2015/lib/models/task-name.model.js +16 -0
- package/esm2015/lib/services/task-name/task-name.service.js +65 -0
- package/esm5/hmcts-rpx-xui-common-lib.js +27 -26
- package/esm5/lib/components/find-task-name/find-task-name.component.js +243 -0
- package/esm5/lib/components/generic-filter/generic-filter.component.js +27 -2
- package/esm5/lib/exui-common-lib.module.js +4 -4
- 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/pagination.model.js +1 -11
- package/esm5/lib/models/task-name.model.js +16 -0
- package/esm5/lib/services/task-name/task-name.service.js +70 -0
- package/fesm2015/hmcts-rpx-xui-common-lib.js +192 -62
- package/fesm2015/hmcts-rpx-xui-common-lib.js.map +1 -1
- package/fesm5/hmcts-rpx-xui-common-lib.js +226 -86
- package/fesm5/hmcts-rpx-xui-common-lib.js.map +1 -1
- package/hmcts-rpx-xui-common-lib.d.ts +26 -25
- 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/pagination.model.d.ts +0 -4
- package/lib/models/task-name.model.d.ts +4 -0
- package/lib/services/task-name/task-name.service.d.ts +13 -0
- package/package.json +1 -1
- package/esm2015/lib/components/pagination-v1/pagination.component.js +0 -130
- package/esm5/lib/components/pagination-v1/pagination.component.js +0 -144
- package/lib/components/pagination-v1/pagination.component.d.ts +0 -19
|
@@ -10,7 +10,7 @@ import { Title } from '@angular/platform-browser';
|
|
|
10
10
|
import { DocumentInterruptSource, Idle } from '@ng-idle/core';
|
|
11
11
|
import { Keepalive } from '@ng-idle/keepalive';
|
|
12
12
|
import { RouterModule, Router, NavigationEnd } from '@angular/router';
|
|
13
|
-
import { Component, EventEmitter, Input, Output, ViewEncapsulation, Injectable, Directive, TemplateRef, ViewContainerRef, ElementRef, Inject,
|
|
13
|
+
import { Component, EventEmitter, Input, Output, ViewEncapsulation, Injectable, Directive, TemplateRef, ViewContainerRef, ElementRef, Inject, ChangeDetectorRef, ViewChild, InjectionToken, defineInjectable, inject, ChangeDetectionStrategy, NgModule } from '@angular/core';
|
|
14
14
|
import { BehaviorSubject, of, zip, Subject, combineLatest } from 'rxjs';
|
|
15
15
|
import { distinctUntilChanged, map, debounceTime, filter, mergeMap, tap, catchError, switchMap, delay } from 'rxjs/operators';
|
|
16
16
|
|
|
@@ -1138,6 +1138,31 @@ var GenericFilterComponent = /** @class */ (function () {
|
|
|
1138
1138
|
finally { if (e_2) throw e_2.error; }
|
|
1139
1139
|
}
|
|
1140
1140
|
};
|
|
1141
|
+
/**
|
|
1142
|
+
* @param {?} values
|
|
1143
|
+
* @param {?} field
|
|
1144
|
+
* @return {?}
|
|
1145
|
+
*/
|
|
1146
|
+
GenericFilterComponent.prototype.updateTaskNameControls = /**
|
|
1147
|
+
* @param {?} values
|
|
1148
|
+
* @param {?} field
|
|
1149
|
+
* @return {?}
|
|
1150
|
+
*/
|
|
1151
|
+
function (values, field) {
|
|
1152
|
+
// let keys;
|
|
1153
|
+
// if (!values) {
|
|
1154
|
+
// keys = Object.keys(this.form.get(field.name).value);
|
|
1155
|
+
// } else {
|
|
1156
|
+
// keys = Object.keys(values);
|
|
1157
|
+
// }
|
|
1158
|
+
// for (const key of keys) {
|
|
1159
|
+
// if (this.form.get(field.name) && this.form.get(field.name).get(key)) {
|
|
1160
|
+
// const value = values && values[key] ? values[key] : null;
|
|
1161
|
+
// this.form.get(field.name).get(key).patchValue(value);
|
|
1162
|
+
// }
|
|
1163
|
+
// }
|
|
1164
|
+
this.form.get(field.name).patchValue(values);
|
|
1165
|
+
};
|
|
1141
1166
|
/**
|
|
1142
1167
|
* @param {?} event
|
|
1143
1168
|
* @param {?} form
|
|
@@ -1581,7 +1606,7 @@ var GenericFilterComponent = /** @class */ (function () {
|
|
|
1581
1606
|
GenericFilterComponent.decorators = [
|
|
1582
1607
|
{ type: Component, args: [{
|
|
1583
1608
|
selector: 'xuilib-generic-filter',
|
|
1584
|
-
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",
|
|
1609
|
+
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.taskName\"\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",
|
|
1585
1610
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1586
1611
|
encapsulation: ViewEncapsulation.None,
|
|
1587
1612
|
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}"]
|
|
@@ -5113,107 +5138,221 @@ var FindPersonComponent = /** @class */ (function () {
|
|
|
5113
5138
|
|
|
5114
5139
|
/**
|
|
5115
5140
|
* @fileoverview added by tsickle
|
|
5116
|
-
* Generated from: lib/
|
|
5141
|
+
* Generated from: lib/services/task-name/task-name.service.ts
|
|
5117
5142
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
5118
5143
|
*/
|
|
5144
|
+
var TaskNameService = /** @class */ (function () {
|
|
5145
|
+
function TaskNameService(http, sessionStorageService) {
|
|
5146
|
+
this.http = http;
|
|
5147
|
+
this.sessionStorageService = sessionStorageService;
|
|
5148
|
+
}
|
|
5149
|
+
/**
|
|
5150
|
+
* @return Observable<any[]>: Array of taskName in Observable
|
|
5151
|
+
*/
|
|
5152
|
+
/**
|
|
5153
|
+
* @return {?} Observable<any[]>: Array of taskName in Observable
|
|
5154
|
+
*/
|
|
5155
|
+
TaskNameService.prototype.getTaskName = /**
|
|
5156
|
+
* @return {?} Observable<any[]>: Array of taskName in Observable
|
|
5157
|
+
*/
|
|
5158
|
+
function () {
|
|
5159
|
+
var _this = this;
|
|
5160
|
+
if (this.sessionStorageService.getItem(TaskNameService.taskNamesKey)) {
|
|
5161
|
+
/** @type {?} */
|
|
5162
|
+
var taskNames = JSON.parse(this.sessionStorageService.getItem(TaskNameService.taskNamesKey));
|
|
5163
|
+
return of((/** @type {?} */ (taskNames)));
|
|
5164
|
+
}
|
|
5165
|
+
return this.http.get("/workallocation2/taskNames").pipe(tap((/**
|
|
5166
|
+
* @param {?} taskNames
|
|
5167
|
+
* @return {?}
|
|
5168
|
+
*/
|
|
5169
|
+
function (taskNames) { return _this.sessionStorageService.setItem(TaskNameService.taskNamesKey, JSON.stringify(taskNames)); })));
|
|
5170
|
+
};
|
|
5171
|
+
TaskNameService.taskNamesKey = 'taskNames';
|
|
5172
|
+
TaskNameService.decorators = [
|
|
5173
|
+
{ type: Injectable, args: [{
|
|
5174
|
+
providedIn: 'root'
|
|
5175
|
+
},] }
|
|
5176
|
+
];
|
|
5177
|
+
/** @nocollapse */
|
|
5178
|
+
TaskNameService.ctorParameters = function () { return [
|
|
5179
|
+
{ type: HttpClient },
|
|
5180
|
+
{ type: SessionStorageService }
|
|
5181
|
+
]; };
|
|
5182
|
+
/** @nocollapse */ TaskNameService.ngInjectableDef = defineInjectable({ factory: function TaskNameService_Factory() { return new TaskNameService(inject(HttpClient), inject(SessionStorageService)); }, token: TaskNameService, providedIn: "root" });
|
|
5183
|
+
return TaskNameService;
|
|
5184
|
+
}());
|
|
5185
|
+
|
|
5119
5186
|
/**
|
|
5120
|
-
* @
|
|
5121
|
-
*
|
|
5187
|
+
* @fileoverview added by tsickle
|
|
5188
|
+
* Generated from: lib/components/find-task-name/find-task-name.component.ts
|
|
5189
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
5122
5190
|
*/
|
|
5123
|
-
function
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
this.
|
|
5129
|
-
this.
|
|
5130
|
-
this.
|
|
5131
|
-
this.
|
|
5132
|
-
this.
|
|
5133
|
-
this.
|
|
5134
|
-
this.
|
|
5135
|
-
this.
|
|
5136
|
-
|
|
5137
|
-
this.
|
|
5138
|
-
|
|
5139
|
-
this.
|
|
5140
|
-
|
|
5141
|
-
this.
|
|
5191
|
+
var FindTaskNameComponent = /** @class */ (function () {
|
|
5192
|
+
function FindTaskNameComponent(cd, taskService) {
|
|
5193
|
+
this.cd = cd;
|
|
5194
|
+
this.taskService = taskService;
|
|
5195
|
+
this.taskNameSelected = new EventEmitter();
|
|
5196
|
+
this.taskNameFieldChanged = new EventEmitter();
|
|
5197
|
+
this.boldTitle = 'Find the task name';
|
|
5198
|
+
this.subTitle = 'Type the name of the task name and select them.';
|
|
5199
|
+
this.domain = PersonRole.ALL;
|
|
5200
|
+
this.findTaskNameGroup = new FormGroup({});
|
|
5201
|
+
this.submitted = true;
|
|
5202
|
+
this.userIncluded = false;
|
|
5203
|
+
this.placeholderContent = '';
|
|
5204
|
+
this.isNoResultsShown = true;
|
|
5205
|
+
this.showUpdatedColor = false;
|
|
5206
|
+
this.selectedTaskNames = [];
|
|
5207
|
+
this.errorMessage = 'You must select a name';
|
|
5208
|
+
this.idValue = '';
|
|
5209
|
+
this.services = ['IA'];
|
|
5210
|
+
this.disabled = null;
|
|
5211
|
+
this.showAutocomplete = false;
|
|
5212
|
+
this.filteredOptions = [];
|
|
5213
|
+
this.minSearchCharacters = 1;
|
|
5214
|
+
this.searchTerm = '';
|
|
5142
5215
|
}
|
|
5143
|
-
|
|
5144
|
-
|
|
5216
|
+
/**
|
|
5217
|
+
* @return {?}
|
|
5218
|
+
*/
|
|
5219
|
+
FindTaskNameComponent.prototype.ngOnDestroy = /**
|
|
5220
|
+
* @return {?}
|
|
5221
|
+
*/
|
|
5222
|
+
function () {
|
|
5223
|
+
if (this.sub) {
|
|
5224
|
+
this.sub.unsubscribe();
|
|
5225
|
+
}
|
|
5226
|
+
};
|
|
5227
|
+
/**
|
|
5228
|
+
* @return {?}
|
|
5229
|
+
*/
|
|
5230
|
+
FindTaskNameComponent.prototype.ngOnChanges = /**
|
|
5231
|
+
* @return {?}
|
|
5232
|
+
*/
|
|
5233
|
+
function () {
|
|
5234
|
+
var _this = this;
|
|
5235
|
+
this.findTaskNameControl = new FormControl(this.selectedTaskName);
|
|
5236
|
+
this.findTaskNameGroup.addControl('findTaskNameControl', this.findTaskNameControl);
|
|
5237
|
+
this.sub = this.findTaskNameControl.valueChanges
|
|
5238
|
+
.pipe(tap((/**
|
|
5145
5239
|
* @return {?}
|
|
5146
5240
|
*/
|
|
5147
|
-
function () {
|
|
5148
|
-
return this._directionLinks;
|
|
5149
|
-
},
|
|
5150
|
-
set: /**
|
|
5151
|
-
* @param {?} value
|
|
5241
|
+
function () { return _this.showAutocomplete = false; })), tap((/**
|
|
5152
5242
|
* @return {?}
|
|
5153
5243
|
*/
|
|
5154
|
-
function (
|
|
5155
|
-
|
|
5156
|
-
},
|
|
5157
|
-
enumerable: true,
|
|
5158
|
-
configurable: true
|
|
5159
|
-
});
|
|
5160
|
-
Object.defineProperty(PaginationV1Component.prototype, "autoHide", {
|
|
5161
|
-
get: /**
|
|
5244
|
+
function () { return _this.filteredOptions = []; })), tap((/**
|
|
5245
|
+
* @param {?} term
|
|
5162
5246
|
* @return {?}
|
|
5163
5247
|
*/
|
|
5164
|
-
function () {
|
|
5165
|
-
|
|
5166
|
-
},
|
|
5167
|
-
set: /**
|
|
5168
|
-
* @param {?} value
|
|
5248
|
+
function (term) { return _this.searchTerm = term; })), debounceTime(300), tap((/**
|
|
5249
|
+
* @param {?} searchTerm
|
|
5169
5250
|
* @return {?}
|
|
5170
5251
|
*/
|
|
5171
|
-
function (
|
|
5172
|
-
|
|
5173
|
-
|
|
5174
|
-
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
|
|
5178
|
-
|
|
5252
|
+
function (searchTerm) {
|
|
5253
|
+
if (!searchTerm) {
|
|
5254
|
+
_this.taskNameSelected.emit('');
|
|
5255
|
+
}
|
|
5256
|
+
return searchTerm;
|
|
5257
|
+
})),
|
|
5258
|
+
// tap((searchTerm) => typeof searchTerm === 'string' ? this.taskNameSelected.emit('null') : void 0),
|
|
5259
|
+
filter((/**
|
|
5260
|
+
* @param {?} searchTerm
|
|
5179
5261
|
* @return {?}
|
|
5180
5262
|
*/
|
|
5181
|
-
function () {
|
|
5182
|
-
return this._responsive;
|
|
5183
|
-
},
|
|
5184
|
-
set: /**
|
|
5185
|
-
* @param {?} value
|
|
5263
|
+
function (searchTerm) { return searchTerm && searchTerm.length >= _this.minSearchCharacters; })), mergeMap((/**
|
|
5186
5264
|
* @return {?}
|
|
5187
5265
|
*/
|
|
5188
|
-
function (
|
|
5189
|
-
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
|
|
5266
|
+
function () { return _this.getTaskName(); }))).subscribe((/**
|
|
5267
|
+
* @param {?} taskNameModel
|
|
5268
|
+
* @return {?}
|
|
5269
|
+
*/
|
|
5270
|
+
function (taskNameModel) {
|
|
5271
|
+
_this.filteredOptions = taskNameModel.map((/**
|
|
5272
|
+
* @param {?} task
|
|
5273
|
+
* @return {?}
|
|
5274
|
+
*/
|
|
5275
|
+
function (task) { return task.taskName; }));
|
|
5276
|
+
if (_this.searchTerm) {
|
|
5277
|
+
_this.filteredOptions = _this.filteredOptions.filter((/**
|
|
5278
|
+
* @param {?} taskName
|
|
5279
|
+
* @return {?}
|
|
5280
|
+
*/
|
|
5281
|
+
function (taskName) { return taskName.toLocaleLowerCase().includes(_this.searchTerm.toLocaleLowerCase()); })).map((/**
|
|
5282
|
+
* @param {?} taskName
|
|
5283
|
+
* @return {?}
|
|
5284
|
+
*/
|
|
5285
|
+
function (taskName) { return taskName; }));
|
|
5286
|
+
}
|
|
5287
|
+
_this.cd.detectChanges();
|
|
5288
|
+
}));
|
|
5289
|
+
};
|
|
5290
|
+
/**
|
|
5291
|
+
* @return {?}
|
|
5292
|
+
*/
|
|
5293
|
+
FindTaskNameComponent.prototype.getTaskName = /**
|
|
5294
|
+
* @return {?}
|
|
5295
|
+
*/
|
|
5296
|
+
function () {
|
|
5297
|
+
return this.taskService.getTaskName();
|
|
5298
|
+
};
|
|
5299
|
+
/**
|
|
5300
|
+
* @param {?} selectedTaskName
|
|
5301
|
+
* @return {?}
|
|
5302
|
+
*/
|
|
5303
|
+
FindTaskNameComponent.prototype.onSelectionChange = /**
|
|
5304
|
+
* @param {?} selectedTaskName
|
|
5305
|
+
* @return {?}
|
|
5306
|
+
*/
|
|
5307
|
+
function (selectedTaskName) {
|
|
5308
|
+
if (selectedTaskName) {
|
|
5309
|
+
this.taskNameSelected.emit(selectedTaskName);
|
|
5310
|
+
this.findTaskNameControl.setValue(selectedTaskName);
|
|
5311
|
+
}
|
|
5312
|
+
};
|
|
5313
|
+
/**
|
|
5314
|
+
* @return {?}
|
|
5315
|
+
*/
|
|
5316
|
+
FindTaskNameComponent.prototype.onInput = /**
|
|
5317
|
+
* @return {?}
|
|
5318
|
+
*/
|
|
5319
|
+
function () {
|
|
5320
|
+
this.taskNameFieldChanged.emit();
|
|
5321
|
+
};
|
|
5322
|
+
FindTaskNameComponent.decorators = [
|
|
5195
5323
|
{ type: Component, args: [{
|
|
5196
|
-
selector: 'xuilib-
|
|
5197
|
-
template: "<
|
|
5198
|
-
styles: ["
|
|
5324
|
+
selector: 'xuilib-find-task-name',
|
|
5325
|
+
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 }}\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",
|
|
5326
|
+
styles: [""]
|
|
5199
5327
|
}] }
|
|
5200
5328
|
];
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
|
|
5204
|
-
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
|
|
5214
|
-
|
|
5329
|
+
/** @nocollapse */
|
|
5330
|
+
FindTaskNameComponent.ctorParameters = function () { return [
|
|
5331
|
+
{ type: ChangeDetectorRef },
|
|
5332
|
+
{ type: TaskNameService }
|
|
5333
|
+
]; };
|
|
5334
|
+
FindTaskNameComponent.propDecorators = {
|
|
5335
|
+
taskNameSelected: [{ type: Output }],
|
|
5336
|
+
taskNameFieldChanged: [{ type: Output }],
|
|
5337
|
+
title: [{ type: Input }],
|
|
5338
|
+
boldTitle: [{ type: Input }],
|
|
5339
|
+
subTitle: [{ type: Input }],
|
|
5340
|
+
domain: [{ type: Input }],
|
|
5341
|
+
findTaskNameGroup: [{ type: Input }],
|
|
5342
|
+
selectedTaskName: [{ type: Input }],
|
|
5343
|
+
submitted: [{ type: Input }],
|
|
5344
|
+
userIncluded: [{ type: Input }],
|
|
5345
|
+
assignedUser: [{ type: Input }],
|
|
5346
|
+
placeholderContent: [{ type: Input }],
|
|
5347
|
+
isNoResultsShown: [{ type: Input }],
|
|
5348
|
+
showUpdatedColor: [{ type: Input }],
|
|
5349
|
+
selectedTaskNames: [{ type: Input }],
|
|
5350
|
+
errorMessage: [{ type: Input }],
|
|
5351
|
+
idValue: [{ type: Input }],
|
|
5352
|
+
services: [{ type: Input }],
|
|
5353
|
+
disabled: [{ type: Input }]
|
|
5215
5354
|
};
|
|
5216
|
-
return
|
|
5355
|
+
return FindTaskNameComponent;
|
|
5217
5356
|
}());
|
|
5218
5357
|
|
|
5219
5358
|
/**
|
|
@@ -6680,7 +6819,8 @@ var HmctsSubNavigationComponent = /** @class */ (function () {
|
|
|
6680
6819
|
HmctsSubNavigationComponent.decorators = [
|
|
6681
6820
|
{ type: Component, args: [{
|
|
6682
6821
|
selector: 'xuilib-hmcts-sub-navigation',
|
|
6683
|
-
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"
|
|
6822
|
+
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",
|
|
6823
|
+
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}"]
|
|
6684
6824
|
}] }
|
|
6685
6825
|
];
|
|
6686
6826
|
HmctsSubNavigationComponent.propDecorators = {
|
|
@@ -6771,10 +6911,10 @@ var COMMON_COMPONENTS = [
|
|
|
6771
6911
|
FindPersonComponent,
|
|
6772
6912
|
SearchJudicialsComponent,
|
|
6773
6913
|
FindLocationComponent,
|
|
6914
|
+
FindTaskNameComponent,
|
|
6774
6915
|
SearchLocationComponent,
|
|
6775
6916
|
SearchVenueComponent,
|
|
6776
|
-
PaginationComponent
|
|
6777
|
-
PaginationV1Component
|
|
6917
|
+
PaginationComponent
|
|
6778
6918
|
];
|
|
6779
6919
|
/** @type {?} */
|
|
6780
6920
|
var GOV_UI_COMPONENTS = [
|
|
@@ -7844,6 +7984,6 @@ var LoadingService = /** @class */ (function () {
|
|
|
7844
7984
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
7845
7985
|
*/
|
|
7846
7986
|
|
|
7847
|
-
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,
|
|
7987
|
+
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 };
|
|
7848
7988
|
|
|
7849
7989
|
//# sourceMappingURL=hmcts-rpx-xui-common-lib.js.map
|