@hmcts/rpx-xui-common-lib 3.2.2 → 3.2.3-exui-4123-rc-2
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/fesm2022/hmcts-rpx-xui-common-lib.mjs +606 -180
- package/fesm2022/hmcts-rpx-xui-common-lib.mjs.map +1 -1
- package/index.d.ts +160 -78
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ import { FormGroup, FormControl, Validators, FormArray, FormsModule, ReactiveFor
|
|
|
9
9
|
import { combineLatest, BehaviorSubject, Subject, of as of$1, forkJoin, zip, iif } from 'rxjs';
|
|
10
10
|
import * as i1$1 from '@angular/router';
|
|
11
11
|
import { NavigationEnd, RouterModule } from '@angular/router';
|
|
12
|
-
import { map, filter, distinctUntilChanged, delay, skipWhile, shareReplay, catchError, take,
|
|
12
|
+
import { map, filter, distinctUntilChanged, delay, skipWhile, tap, shareReplay, catchError, take, debounceTime, switchMap, mergeMap } from 'rxjs/operators';
|
|
13
13
|
import { initialize } from 'launchdarkly-js-client-sdk';
|
|
14
14
|
import * as i1$2 from '@angular/common/http';
|
|
15
15
|
import { HttpParams } from '@angular/common/http';
|
|
@@ -1940,7 +1940,7 @@ class TimeoutNotificationsService {
|
|
|
1940
1940
|
}));
|
|
1941
1941
|
this.subs.push(this.idle.onIdleStart.subscribe(() => console.log('You\'ve gone idle!')));
|
|
1942
1942
|
this.subs.push(this.idle.onIdleEnd.subscribe(() => console.log('You\'re no longer idle!')));
|
|
1943
|
-
this.keepalive.interval(
|
|
1943
|
+
this.keepalive.interval(config.keepAliveInSeconds || 900);
|
|
1944
1944
|
this.subs.push(this.keepalive.onPing.subscribe(() => {
|
|
1945
1945
|
this.eventEmitter.next({ eventType: KEEP_ALIVE_EVENT });
|
|
1946
1946
|
}));
|
|
@@ -2071,6 +2071,40 @@ class CookieService {
|
|
|
2071
2071
|
args: [DOCUMENT]
|
|
2072
2072
|
}] }], null); })();
|
|
2073
2073
|
|
|
2074
|
+
class LocationService {
|
|
2075
|
+
constructor(http) {
|
|
2076
|
+
this.http = http;
|
|
2077
|
+
}
|
|
2078
|
+
/**
|
|
2079
|
+
* @description getAllLocations from service Ids/location type/search term
|
|
2080
|
+
* @param serviceIds: SSCS | SSCS,IA split with ','
|
|
2081
|
+
* @param locationType: optional | hearing | case_management
|
|
2082
|
+
* @param searchTerm: any search term for postcode | site name | venue name |court name | court address etc.
|
|
2083
|
+
* @return Observable<LocationByEPIMMSModel[]>: Array of locationModel in Observable
|
|
2084
|
+
*/
|
|
2085
|
+
getAllLocations(locationUrl, serviceIds, locationType, searchTerm, userLocations) {
|
|
2086
|
+
return this.http.post(locationUrl, { serviceIds, locationType, searchTerm, userLocations });
|
|
2087
|
+
}
|
|
2088
|
+
/**
|
|
2089
|
+
* @description searchLocations from service Ids/location type/search term
|
|
2090
|
+
* @param serviceIds: BBA3 | BBA3,BFA1 split with ','
|
|
2091
|
+
* @param locationType: optional | hearing | case_management
|
|
2092
|
+
* @param searchTerm: any search term for postcode | site name | venue name |court name | court address etc.
|
|
2093
|
+
* @return Observable<LocationByEPIMMSModel[]>: Array of locationModel in Observable
|
|
2094
|
+
*/
|
|
2095
|
+
searchLocations(serviceIds, locationType, searchTerm) {
|
|
2096
|
+
return this.http.get(`api/prd/location/getLocations?serviceIds=${serviceIds}&locationType=${locationType}&searchTerm=${searchTerm}`);
|
|
2097
|
+
}
|
|
2098
|
+
static { this.ɵfac = function LocationService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LocationService)(i0.ɵɵinject(i1$2.HttpClient)); }; }
|
|
2099
|
+
static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: LocationService, factory: LocationService.ɵfac, providedIn: 'root' }); }
|
|
2100
|
+
}
|
|
2101
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LocationService, [{
|
|
2102
|
+
type: Injectable,
|
|
2103
|
+
args: [{
|
|
2104
|
+
providedIn: 'root'
|
|
2105
|
+
}]
|
|
2106
|
+
}], () => [{ type: i1$2.HttpClient }], null); })();
|
|
2107
|
+
|
|
2074
2108
|
class HasLoadingState {
|
|
2075
2109
|
get isLoading() {
|
|
2076
2110
|
return;
|
|
@@ -2200,6 +2234,83 @@ class FilterService {
|
|
|
2200
2234
|
}]
|
|
2201
2235
|
}], null, null); })();
|
|
2202
2236
|
|
|
2237
|
+
class SessionStorageService {
|
|
2238
|
+
/**
|
|
2239
|
+
* Get an item from the session storage.
|
|
2240
|
+
* If remove is true, the item will be removed once read
|
|
2241
|
+
* @param removeAfterRead removed the key once it has been read
|
|
2242
|
+
*/
|
|
2243
|
+
getItem(key, removeAfterRead = false) {
|
|
2244
|
+
const item = sessionStorage.getItem(key);
|
|
2245
|
+
if (removeAfterRead) {
|
|
2246
|
+
this.removeItem(key);
|
|
2247
|
+
}
|
|
2248
|
+
return item;
|
|
2249
|
+
}
|
|
2250
|
+
/**
|
|
2251
|
+
* Set an item in the session storage.
|
|
2252
|
+
*/
|
|
2253
|
+
setItem(key, value) {
|
|
2254
|
+
sessionStorage.setItem(key, value);
|
|
2255
|
+
}
|
|
2256
|
+
/**
|
|
2257
|
+
* Remove an item in the session storage.
|
|
2258
|
+
*/
|
|
2259
|
+
removeItem(key) {
|
|
2260
|
+
sessionStorage.removeItem(key);
|
|
2261
|
+
}
|
|
2262
|
+
/**
|
|
2263
|
+
* Clear all the items held in session storage.
|
|
2264
|
+
*/
|
|
2265
|
+
clear() {
|
|
2266
|
+
sessionStorage.clear();
|
|
2267
|
+
}
|
|
2268
|
+
static { this.ɵfac = function SessionStorageService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SessionStorageService)(); }; }
|
|
2269
|
+
static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: SessionStorageService, factory: SessionStorageService.ɵfac, providedIn: 'root' }); }
|
|
2270
|
+
}
|
|
2271
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SessionStorageService, [{
|
|
2272
|
+
type: Injectable,
|
|
2273
|
+
args: [{
|
|
2274
|
+
providedIn: 'root'
|
|
2275
|
+
}]
|
|
2276
|
+
}], null, null); })();
|
|
2277
|
+
|
|
2278
|
+
class TaskService {
|
|
2279
|
+
static { this.WORK_ALLOCATION_API = '/workallocation'; }
|
|
2280
|
+
static { this.taskNamesKey = 'taskNames'; }
|
|
2281
|
+
constructor(http, sessionStorageService) {
|
|
2282
|
+
this.http = http;
|
|
2283
|
+
this.sessionStorageService = sessionStorageService;
|
|
2284
|
+
}
|
|
2285
|
+
/**
|
|
2286
|
+
* @return Observable<any[]>: Array of taskName in Observable
|
|
2287
|
+
*/
|
|
2288
|
+
getTaskName(service) {
|
|
2289
|
+
const serviceTaskTypeKey = `${service}-${TaskService.taskNamesKey}`;
|
|
2290
|
+
if (this.sessionStorageService.getItem(serviceTaskTypeKey)) {
|
|
2291
|
+
const taskNames = JSON.parse(this.sessionStorageService.getItem(serviceTaskTypeKey));
|
|
2292
|
+
return of$1(taskNames);
|
|
2293
|
+
}
|
|
2294
|
+
return this.http.post(`${TaskService.WORK_ALLOCATION_API}/taskNames`, { service }).pipe(tap(taskNames => this.sessionStorageService.setItem(serviceTaskTypeKey, JSON.stringify(taskNames))));
|
|
2295
|
+
}
|
|
2296
|
+
/**
|
|
2297
|
+
* @return Observable<any[]>: Array of work-type in Observable
|
|
2298
|
+
*/
|
|
2299
|
+
// Note: Could pass service in here if needed
|
|
2300
|
+
searchWorkTypes(term) {
|
|
2301
|
+
// Note: Could get from session storage here if needed
|
|
2302
|
+
return this.http.post(`${TaskService.WORK_ALLOCATION_API}/task/search-types-of-work`, { searchTerm: term });
|
|
2303
|
+
}
|
|
2304
|
+
static { this.ɵfac = function TaskService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TaskService)(i0.ɵɵinject(i1$2.HttpClient), i0.ɵɵinject(SessionStorageService)); }; }
|
|
2305
|
+
static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: TaskService, factory: TaskService.ɵfac, providedIn: 'root' }); }
|
|
2306
|
+
}
|
|
2307
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TaskService, [{
|
|
2308
|
+
type: Injectable,
|
|
2309
|
+
args: [{
|
|
2310
|
+
providedIn: 'root'
|
|
2311
|
+
}]
|
|
2312
|
+
}], () => [{ type: i1$2.HttpClient }, { type: SessionStorageService }], null); })();
|
|
2313
|
+
|
|
2203
2314
|
class RefDataDataAccessService {
|
|
2204
2315
|
static { this.refDataUrl = '/api/ref-data'; }
|
|
2205
2316
|
constructor(http) {
|
|
@@ -2282,47 +2393,6 @@ function getValues(options, values) {
|
|
|
2282
2393
|
}, []);
|
|
2283
2394
|
}
|
|
2284
2395
|
|
|
2285
|
-
class SessionStorageService {
|
|
2286
|
-
/**
|
|
2287
|
-
* Get an item from the session storage.
|
|
2288
|
-
* If remove is true, the item will be removed once read
|
|
2289
|
-
* @param removeAfterRead removed the key once it has been read
|
|
2290
|
-
*/
|
|
2291
|
-
getItem(key, removeAfterRead = false) {
|
|
2292
|
-
const item = sessionStorage.getItem(key);
|
|
2293
|
-
if (removeAfterRead) {
|
|
2294
|
-
this.removeItem(key);
|
|
2295
|
-
}
|
|
2296
|
-
return item;
|
|
2297
|
-
}
|
|
2298
|
-
/**
|
|
2299
|
-
* Set an item in the session storage.
|
|
2300
|
-
*/
|
|
2301
|
-
setItem(key, value) {
|
|
2302
|
-
sessionStorage.setItem(key, value);
|
|
2303
|
-
}
|
|
2304
|
-
/**
|
|
2305
|
-
* Remove an item in the session storage.
|
|
2306
|
-
*/
|
|
2307
|
-
removeItem(key) {
|
|
2308
|
-
sessionStorage.removeItem(key);
|
|
2309
|
-
}
|
|
2310
|
-
/**
|
|
2311
|
-
* Clear all the items held in session storage.
|
|
2312
|
-
*/
|
|
2313
|
-
clear() {
|
|
2314
|
-
sessionStorage.clear();
|
|
2315
|
-
}
|
|
2316
|
-
static { this.ɵfac = function SessionStorageService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SessionStorageService)(); }; }
|
|
2317
|
-
static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: SessionStorageService, factory: SessionStorageService.ɵfac, providedIn: 'root' }); }
|
|
2318
|
-
}
|
|
2319
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SessionStorageService, [{
|
|
2320
|
-
type: Injectable,
|
|
2321
|
-
args: [{
|
|
2322
|
-
providedIn: 'root'
|
|
2323
|
-
}]
|
|
2324
|
-
}], null, null); })();
|
|
2325
|
-
|
|
2326
2396
|
class FindAPersonService {
|
|
2327
2397
|
static { this.caseworkersKey = 'caseworkers'; }
|
|
2328
2398
|
constructor(http, sessionStorageService) {
|
|
@@ -2632,40 +2702,6 @@ class FindPersonComponent {
|
|
|
2632
2702
|
}] }); })();
|
|
2633
2703
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(FindPersonComponent, { className: "FindPersonComponent", filePath: "lib/components/find-person/find-person.component.ts", lineNumber: 16 }); })();
|
|
2634
2704
|
|
|
2635
|
-
class LocationService {
|
|
2636
|
-
constructor(http) {
|
|
2637
|
-
this.http = http;
|
|
2638
|
-
}
|
|
2639
|
-
/**
|
|
2640
|
-
* @description getAllLocations from service Ids/location type/search term
|
|
2641
|
-
* @param serviceIds: SSCS | SSCS,IA split with ','
|
|
2642
|
-
* @param locationType: optional | hearing | case_management
|
|
2643
|
-
* @param searchTerm: any search term for postcode | site name | venue name |court name | court address etc.
|
|
2644
|
-
* @return Observable<LocationByEPIMMSModel[]>: Array of locationModel in Observable
|
|
2645
|
-
*/
|
|
2646
|
-
getAllLocations(locationUrl, serviceIds, locationType, searchTerm, userLocations) {
|
|
2647
|
-
return this.http.post(locationUrl, { serviceIds, locationType, searchTerm, userLocations });
|
|
2648
|
-
}
|
|
2649
|
-
/**
|
|
2650
|
-
* @description searchLocations from service Ids/location type/search term
|
|
2651
|
-
* @param serviceIds: BBA3 | BBA3,BFA1 split with ','
|
|
2652
|
-
* @param locationType: optional | hearing | case_management
|
|
2653
|
-
* @param searchTerm: any search term for postcode | site name | venue name |court name | court address etc.
|
|
2654
|
-
* @return Observable<LocationByEPIMMSModel[]>: Array of locationModel in Observable
|
|
2655
|
-
*/
|
|
2656
|
-
searchLocations(serviceIds, locationType, searchTerm) {
|
|
2657
|
-
return this.http.get(`api/prd/location/getLocations?serviceIds=${serviceIds}&locationType=${locationType}&searchTerm=${searchTerm}`);
|
|
2658
|
-
}
|
|
2659
|
-
static { this.ɵfac = function LocationService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LocationService)(i0.ɵɵinject(i1$2.HttpClient)); }; }
|
|
2660
|
-
static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: LocationService, factory: LocationService.ɵfac, providedIn: 'root' }); }
|
|
2661
|
-
}
|
|
2662
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LocationService, [{
|
|
2663
|
-
type: Injectable,
|
|
2664
|
-
args: [{
|
|
2665
|
-
providedIn: 'root'
|
|
2666
|
-
}]
|
|
2667
|
-
}], () => [{ type: i1$2.HttpClient }], null); })();
|
|
2668
|
-
|
|
2669
2705
|
function SearchLocationComponent_Conditional_5_Conditional_0_For_1_Template(rf, ctx) { if (rf & 1) {
|
|
2670
2706
|
const _r2 = i0.ɵɵgetCurrentView();
|
|
2671
2707
|
i0.ɵɵelementStart(0, "mat-option", 5);
|
|
@@ -2891,14 +2927,14 @@ function FindLocationComponent_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
|
2891
2927
|
function FindLocationComponent_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
2892
2928
|
const _r2 = i0.ɵɵgetCurrentView();
|
|
2893
2929
|
i0.ɵɵelementStart(0, "a", 6);
|
|
2894
|
-
i0.ɵɵlistener("click", function FindLocationComponent_Conditional_6_Template_a_click_0_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(
|
|
2930
|
+
i0.ɵɵlistener("click", function FindLocationComponent_Conditional_6_Template_a_click_0_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); ctx_r0.addLocation(); return i0.ɵɵresetView($event.preventDefault()); });
|
|
2895
2931
|
i0.ɵɵtext(1, " Add location ");
|
|
2896
2932
|
i0.ɵɵelementEnd();
|
|
2897
2933
|
} }
|
|
2898
2934
|
function FindLocationComponent_Conditional_7_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
2899
2935
|
const _r3 = i0.ɵɵgetCurrentView();
|
|
2900
2936
|
i0.ɵɵelementStart(0, "li", 7)(1, "a", 8);
|
|
2901
|
-
i0.ɵɵlistener("click", function FindLocationComponent_Conditional_7_For_2_Template_a_click_1_listener() { const selection_r4 = i0.ɵɵrestoreView(_r3).$implicit; const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(
|
|
2937
|
+
i0.ɵɵlistener("click", function FindLocationComponent_Conditional_7_For_2_Template_a_click_1_listener($event) { const selection_r4 = i0.ɵɵrestoreView(_r3).$implicit; const ctx_r0 = i0.ɵɵnextContext(2); ctx_r0.removeLocation(selection_r4); return i0.ɵɵresetView($event.preventDefault()); });
|
|
2902
2938
|
i0.ɵɵtext(2);
|
|
2903
2939
|
i0.ɵɵelementEnd()();
|
|
2904
2940
|
} if (rf & 2) {
|
|
@@ -3037,7 +3073,7 @@ class FindLocationComponent {
|
|
|
3037
3073
|
} if (rf & 2) {
|
|
3038
3074
|
let _t;
|
|
3039
3075
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.searchLocationComponent = _t.first);
|
|
3040
|
-
} }, inputs: { submitted: "submitted", enableAddLocationButton: "enableAddLocationButton", form: "form", field: "field", fields: "fields", locationTitle: "locationTitle", disableInputField: "disableInputField", formSubmissionEvent$: "formSubmissionEvent$", disabled: "disabled", services: "services" }, outputs: { locationFieldChanged: "locationFieldChanged" }, standalone: false, decls: 8, vars: 13, consts: [[1, "location-picker-custom"], [1, "search-location"], ["id", "input-selected-location-label"], [1, "search-location", 3, "locationTermSearchInputChanged", "locationSelected", "searchLocationChanged", "form", "field", "selectedLocations", "delay", "disabled", "singleMode", "bookingCheck", "serviceIds", "propertyNameFilter", "locationType"], ["href", "
|
|
3076
|
+
} }, inputs: { submitted: "submitted", enableAddLocationButton: "enableAddLocationButton", form: "form", field: "field", fields: "fields", locationTitle: "locationTitle", disableInputField: "disableInputField", formSubmissionEvent$: "formSubmissionEvent$", disabled: "disabled", services: "services" }, outputs: { locationFieldChanged: "locationFieldChanged" }, standalone: false, decls: 8, vars: 13, consts: [[1, "location-picker-custom"], [1, "search-location"], ["id", "input-selected-location-label"], [1, "search-location", 3, "locationTermSearchInputChanged", "locationSelected", "searchLocationChanged", "form", "field", "selectedLocations", "delay", "disabled", "singleMode", "bookingCheck", "serviceIds", "propertyNameFilter", "locationType"], ["href", "#", "data-module", "govuk-button", 1, "govuk-button", "add-location-button"], [1, "hmcts-filter-tags", "selection-container"], ["href", "#", "data-module", "govuk-button", 1, "govuk-button", "add-location-button", 3, "click"], [1, "location-selection"], ["href", "#", 1, "hmcts-filter__tag", 3, "click"]], template: function FindLocationComponent_Template(rf, ctx) { if (rf & 1) {
|
|
3041
3077
|
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "div");
|
|
3042
3078
|
i0.ɵɵconditionalCreate(3, FindLocationComponent_Conditional_3_Template, 2, 1, "label", 2);
|
|
3043
3079
|
i0.ɵɵelementEnd();
|
|
@@ -3062,7 +3098,7 @@ class FindLocationComponent {
|
|
|
3062
3098
|
}
|
|
3063
3099
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FindLocationComponent, [{
|
|
3064
3100
|
type: Component,
|
|
3065
|
-
args: [{ selector: 'xuilib-find-location', standalone: false, template: "<div class=\"location-picker-custom\">\n <div class=\"search-location\">\n <div>\n @if (locationTitle) {\n <label id=\"input-selected-location-label\">{{locationTitle}}</label>\n }\n </div>\n <exui-search-location class=\"search-location\"\n [form]=\"form\"\n [field]=\"field\"\n [selectedLocations]=\"selectedLocations\"\n [delay]=\"300\"\n [disabled]=\"disabled\"\n [singleMode]=\"field.maxSelected === 1\"\n [bookingCheck]=\"field.bookingCheckType\"\n [serviceIds]=\"serviceIds\"\n [propertyNameFilter]=\"propertyNameFilter\"\n (locationTermSearchInputChanged)=\"onInputChanged($event)\"\n (locationSelected)=\"onLocationSelected($event)\"\n (searchLocationChanged)=\"onSearchInputChanged()\"\n [locationType]=\"'case-management'\">\n </exui-search-location>\n </div>\n\n <div>\n @if (enableAddLocationButton) {\n <a href=\"
|
|
3101
|
+
args: [{ selector: 'xuilib-find-location', standalone: false, template: "<div class=\"location-picker-custom\">\n <div class=\"search-location\">\n <div>\n @if (locationTitle) {\n <label id=\"input-selected-location-label\">{{locationTitle}}</label>\n }\n </div>\n <exui-search-location class=\"search-location\"\n [form]=\"form\"\n [field]=\"field\"\n [selectedLocations]=\"selectedLocations\"\n [delay]=\"300\"\n [disabled]=\"disabled\"\n [singleMode]=\"field.maxSelected === 1\"\n [bookingCheck]=\"field.bookingCheckType\"\n [serviceIds]=\"serviceIds\"\n [propertyNameFilter]=\"propertyNameFilter\"\n (locationTermSearchInputChanged)=\"onInputChanged($event)\"\n (locationSelected)=\"onLocationSelected($event)\"\n (searchLocationChanged)=\"onSearchInputChanged()\"\n [locationType]=\"'case-management'\">\n </exui-search-location>\n </div>\n\n <div>\n @if (enableAddLocationButton) {\n <a href=\"#\" (click)=\"addLocation(); $event.preventDefault()\" class=\"govuk-button add-location-button\" data-module=\"govuk-button\">\n Add location\n </a>\n }\n </div>\n\n @if (field.maxSelected != 1) {\n <ul class=\"hmcts-filter-tags selection-container\">\n @for (selection of selectedLocations; track selection) {\n <li class=\"location-selection\" >\n <a class=\"hmcts-filter__tag\" href=\"#\" (click)=\"removeLocation(selection); $event.preventDefault()\">\n {{ selection[propertyNameFilter] }}\n </a>\n </li>\n }\n </ul>\n }\n</div>\n", styles: [".add-location-button{margin-top:10px;margin-bottom:0}.search-location__input-container{display:flex}.search-location .auto-complete-container{min-width:unset;width:calc(100% - 4px)}.search-location__input{flex:1 0 auto}.search-location .govuk-button--secondary{background-color:#ddd}\n"] }]
|
|
3066
3102
|
}], null, { locationFieldChanged: [{
|
|
3067
3103
|
type: Output
|
|
3068
3104
|
}], submitted: [{
|
|
@@ -3091,33 +3127,6 @@ class FindLocationComponent {
|
|
|
3091
3127
|
}] }); })();
|
|
3092
3128
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(FindLocationComponent, { className: "FindLocationComponent", filePath: "lib/components/find-location/find-location.component.ts", lineNumber: 14 }); })();
|
|
3093
3129
|
|
|
3094
|
-
class TaskNameService {
|
|
3095
|
-
static { this.taskNamesKey = 'taskNames'; }
|
|
3096
|
-
constructor(http, sessionStorageService) {
|
|
3097
|
-
this.http = http;
|
|
3098
|
-
this.sessionStorageService = sessionStorageService;
|
|
3099
|
-
}
|
|
3100
|
-
/**
|
|
3101
|
-
* @return Observable<any[]>: Array of taskName in Observable
|
|
3102
|
-
*/
|
|
3103
|
-
getTaskName(service) {
|
|
3104
|
-
const serviceTaskTypeKey = `${service}-${TaskNameService.taskNamesKey}`;
|
|
3105
|
-
if (this.sessionStorageService.getItem(serviceTaskTypeKey)) {
|
|
3106
|
-
const taskNames = JSON.parse(this.sessionStorageService.getItem(serviceTaskTypeKey));
|
|
3107
|
-
return of$1(taskNames);
|
|
3108
|
-
}
|
|
3109
|
-
return this.http.post(`/workallocation/taskNames`, { service }).pipe(tap(taskNames => this.sessionStorageService.setItem(serviceTaskTypeKey, JSON.stringify(taskNames))));
|
|
3110
|
-
}
|
|
3111
|
-
static { this.ɵfac = function TaskNameService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TaskNameService)(i0.ɵɵinject(i1$2.HttpClient), i0.ɵɵinject(SessionStorageService)); }; }
|
|
3112
|
-
static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: TaskNameService, factory: TaskNameService.ɵfac, providedIn: 'root' }); }
|
|
3113
|
-
}
|
|
3114
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TaskNameService, [{
|
|
3115
|
-
type: Injectable,
|
|
3116
|
-
args: [{
|
|
3117
|
-
providedIn: 'root'
|
|
3118
|
-
}]
|
|
3119
|
-
}], () => [{ type: i1$2.HttpClient }, { type: SessionStorageService }], null); })();
|
|
3120
|
-
|
|
3121
3130
|
const _c0$m = a0 => ({ "form-group-error": a0 });
|
|
3122
3131
|
const _c1$c = (a0, a1) => ({ "hide-autocomplete": a0, "select-option": a1 });
|
|
3123
3132
|
const _c2$4 = a0 => ({ "select-option": a0 });
|
|
@@ -3232,7 +3241,7 @@ class FindTaskNameComponent {
|
|
|
3232
3241
|
onInput() {
|
|
3233
3242
|
this.taskNameFieldChanged.emit();
|
|
3234
3243
|
}
|
|
3235
|
-
static { this.ɵfac = function FindTaskNameComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || FindTaskNameComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(
|
|
3244
|
+
static { this.ɵfac = function FindTaskNameComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || FindTaskNameComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(TaskService)); }; }
|
|
3236
3245
|
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FindTaskNameComponent, selectors: [["xuilib-find-task-name"]], inputs: { title: "title", boldTitle: "boldTitle", subTitle: "subTitle", domain: "domain", findTaskNameGroup: "findTaskNameGroup", selectedTaskName: "selectedTaskName", submitted: "submitted", assignedUser: "assignedUser", placeholderContent: "placeholderContent", isNoResultsShown: "isNoResultsShown", showUpdatedColor: "showUpdatedColor", selectedTaskNames: "selectedTaskNames", errorMessage: "errorMessage", idValue: "idValue", services: "services", disabled: "disabled" }, outputs: { taskNameSelected: "taskNameSelected", taskNameFieldChanged: "taskNameFieldChanged" }, standalone: false, decls: 11, vars: 13, consts: [["auto", "matAutocomplete"], [1, "govuk-heading-l"], [1, "govuk-form-group", 3, "formGroup", "ngClass"], ["aria-describedby", "sub-title-hint", 1, "govuk-fieldset"], ["id", "sub-title-hint", 1, "govuk-hint"], ["id", "validation-error", 1, "govuk-error-message"], ["type", "text", "aria-label", "select a task name", "formControlName", "findTaskNameControl", 1, "govuk-input", "govuk-!-width-one-third", 3, "input", "id", "matAutocomplete", "placeholder"], ["autoActiveFirstOption", "", 3, "optionSelected"], [3, "value", "ngClass"], [3, "ngClass"], [1, "govuk-caption-l"], [1, "govuk-visually-hidden"]], template: function FindTaskNameComponent_Template(rf, ctx) { if (rf & 1) {
|
|
3237
3246
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
3238
3247
|
i0.ɵɵconditionalCreate(0, FindTaskNameComponent_Conditional_0_Template, 4, 2, "h1", 1);
|
|
@@ -3269,7 +3278,7 @@ class FindTaskNameComponent {
|
|
|
3269
3278
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FindTaskNameComponent, [{
|
|
3270
3279
|
type: Component,
|
|
3271
3280
|
args: [{ selector: 'xuilib-find-task-name', standalone: false, template: "@if (title && title.length) {\n <h1 class=\"govuk-heading-l\">\n <span class=\"govuk-caption-l\">{{title}}</span>\n {{boldTitle}}\n </h1>\n}\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 @if (subTitle && subTitle.length) {\n <div id=\"sub-title-hint\" class=\"govuk-hint\">\n {{subTitle}}\n </div>\n }\n @if (findTaskNameGroup && findTaskNameGroup.errors) {\n <span id=\"validation-error\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span>{{findTaskNameGroup.errors.error ? findTaskNameGroup.errors.error : errorMessage}}\n </span>\n }\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 @for (option of filteredOptions; track option) {\n <mat-option\n [value]=\"option\"\n [ngClass]=\"{'hide-autocomplete': !showAutocomplete, 'select-option': showUpdatedColor}\">\n {{ getTaskTypeName(option) }}\n </mat-option>\n }\n @if (isNoResultsShown && !filteredOptions.length && showAutocomplete) {\n <mat-option [ngClass]=\"{'select-option': showUpdatedColor}\">No results found</mat-option>\n }\n </mat-autocomplete>\n </fieldset>\n</div>\n" }]
|
|
3272
|
-
}], () => [{ type: i0.ChangeDetectorRef }, { type:
|
|
3281
|
+
}], () => [{ type: i0.ChangeDetectorRef }, { type: TaskService }], { taskNameSelected: [{
|
|
3273
3282
|
type: Output
|
|
3274
3283
|
}], taskNameFieldChanged: [{
|
|
3275
3284
|
type: Output
|
|
@@ -3411,7 +3420,7 @@ function FindServiceComponent_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
|
3411
3420
|
function FindServiceComponent_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
3412
3421
|
const _r2 = i0.ɵɵgetCurrentView();
|
|
3413
3422
|
i0.ɵɵelementStart(0, "a", 8);
|
|
3414
|
-
i0.ɵɵlistener("click", function FindServiceComponent_Conditional_6_Template_a_click_0_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(
|
|
3423
|
+
i0.ɵɵlistener("click", function FindServiceComponent_Conditional_6_Template_a_click_0_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); ctx_r0.addOption(ctx_r0.tempSelectedService); return i0.ɵɵresetView($event.preventDefault()); });
|
|
3415
3424
|
i0.ɵɵtext(1);
|
|
3416
3425
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
3417
3426
|
i0.ɵɵelementStart(3, "span", 9);
|
|
@@ -3427,7 +3436,7 @@ function FindServiceComponent_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
|
3427
3436
|
function FindServiceComponent_Conditional_7_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
3428
3437
|
const _r3 = i0.ɵɵgetCurrentView();
|
|
3429
3438
|
i0.ɵɵelementStart(0, "li", 10)(1, "a", 11);
|
|
3430
|
-
i0.ɵɵlistener("click", function FindServiceComponent_Conditional_7_For_2_Template_a_click_1_listener() { const selection_r4 = i0.ɵɵrestoreView(_r3).$implicit; const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(
|
|
3439
|
+
i0.ɵɵlistener("click", function FindServiceComponent_Conditional_7_For_2_Template_a_click_1_listener($event) { const selection_r4 = i0.ɵɵrestoreView(_r3).$implicit; const ctx_r0 = i0.ɵɵnextContext(2); ctx_r0.removeOption(selection_r4); return i0.ɵɵresetView($event.preventDefault()); });
|
|
3431
3440
|
i0.ɵɵtext(2);
|
|
3432
3441
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
3433
3442
|
i0.ɵɵelementEnd()();
|
|
@@ -3540,7 +3549,7 @@ class FindServiceComponent {
|
|
|
3540
3549
|
} if (rf & 2) {
|
|
3541
3550
|
let _t;
|
|
3542
3551
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.searchServiceComponent = _t.first);
|
|
3543
|
-
} }, inputs: { field: "field", serviceTitle: "serviceTitle", form: "form", disabled: "disabled", formSubmissionEvent$: "formSubmissionEvent$" }, outputs: { serviceFieldChanged: "serviceFieldChanged" }, standalone: false, decls: 8, vars: 6, consts: [[1, "service-picker-custom"], [1, "search-service"], [1, "govuk-body"], ["id", "selectServiceSearch-label", "for", "serviceSearch__select"], [1, "search-service__input-container"], [1, "search-service__input", 3, "optionChanged", "options", "selectedOptions", "disabled"], ["href", "
|
|
3552
|
+
} }, inputs: { field: "field", serviceTitle: "serviceTitle", form: "form", disabled: "disabled", formSubmissionEvent$: "formSubmissionEvent$" }, outputs: { serviceFieldChanged: "serviceFieldChanged" }, standalone: false, decls: 8, vars: 6, consts: [[1, "service-picker-custom"], [1, "search-service"], [1, "govuk-body"], ["id", "selectServiceSearch-label", "for", "serviceSearch__select"], [1, "search-service__input-container"], [1, "search-service__input", 3, "optionChanged", "options", "selectedOptions", "disabled"], ["href", "#", "data-module", "govuk-button", "id", "add-service", 1, "govuk-button", "govuk-button--secondary", "govuk-!-margin-bottom-0"], [1, "hmcts-filter-tags", "selection-container"], ["href", "#", "data-module", "govuk-button", "id", "add-service", 1, "govuk-button", "govuk-button--secondary", "govuk-!-margin-bottom-0", 3, "click"], [1, "govuk-visually-hidden"], [1, "location-selection"], ["href", "#", 1, "hmcts-filter__tag", 3, "click"]], template: function FindServiceComponent_Template(rf, ctx) { if (rf & 1) {
|
|
3544
3553
|
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "div", 2);
|
|
3545
3554
|
i0.ɵɵconditionalCreate(3, FindServiceComponent_Conditional_3_Template, 3, 3, "label", 3);
|
|
3546
3555
|
i0.ɵɵelementEnd();
|
|
@@ -3564,7 +3573,7 @@ class FindServiceComponent {
|
|
|
3564
3573
|
}
|
|
3565
3574
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FindServiceComponent, [{
|
|
3566
3575
|
type: Component,
|
|
3567
|
-
args: [{ selector: 'xuilib-find-service', standalone: false, template: "<div class=\"service-picker-custom\">\n <div class=\"search-service\">\n <div class=\"govuk-body\">\n @if (serviceTitle) {\n <label id=\"selectServiceSearch-label\" for=\"serviceSearch__select\">\n {{ serviceTitle | rpxTranslate}}\n </label>\n }\n </div>\n <div class=\"search-service__input-container\">\n <exui-search-service class=\"search-service__input\"\n [options]=\"field.options\"\n [selectedOptions]=\"selectedServices\"\n [disabled]=\"disabled\"\n (optionChanged)=\"onOptionSelected($event)\">\n </exui-search-service>\n @if (field?.enableAddButton) {\n <a href=\"
|
|
3576
|
+
args: [{ selector: 'xuilib-find-service', standalone: false, template: "<div class=\"service-picker-custom\">\n <div class=\"search-service\">\n <div class=\"govuk-body\">\n @if (serviceTitle) {\n <label id=\"selectServiceSearch-label\" for=\"serviceSearch__select\">\n {{ serviceTitle | rpxTranslate}}\n </label>\n }\n </div>\n <div class=\"search-service__input-container\">\n <exui-search-service class=\"search-service__input\"\n [options]=\"field.options\"\n [selectedOptions]=\"selectedServices\"\n [disabled]=\"disabled\"\n (optionChanged)=\"onOptionSelected($event)\">\n </exui-search-service>\n @if (field?.enableAddButton) {\n <a href=\"#\" (click)=\"addOption(tempSelectedService); $event.preventDefault()\"\n class=\"govuk-button govuk-button--secondary govuk-!-margin-bottom-0\" data-module=\"govuk-button\"\n id=\"add-service\">\n {{ 'Add' | rpxTranslate}}\n <span class=\"govuk-visually-hidden\">{{'service' | rpxTranslate}}</span>\n </a>\n }\n </div>\n </div>\n @if (field.maxSelected != 1) {\n <ul class=\"hmcts-filter-tags selection-container\">\n @for (selection of selectedServices; track selection) {\n <li class=\"location-selection\">\n <a class=\"hmcts-filter__tag\" href=\"#\" (click)=\"removeOption(selection); $event.preventDefault()\">\n {{ selection.label | rpxTranslate }}\n </a>\n </li>\n }\n </ul>\n }\n</div>\n", styles: ["#add-service{background-color:#ddd}\n"] }]
|
|
3568
3577
|
}], null, { field: [{
|
|
3569
3578
|
type: Input
|
|
3570
3579
|
}], serviceTitle: [{
|
|
@@ -3583,6 +3592,400 @@ class FindServiceComponent {
|
|
|
3583
3592
|
}] }); })();
|
|
3584
3593
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(FindServiceComponent, { className: "FindServiceComponent", filePath: "lib/components/find-service/find-service.component.ts", lineNumber: 13 }); })();
|
|
3585
3594
|
|
|
3595
|
+
function SearchWorkTypeComponent_Conditional_5_Conditional_0_For_1_Template(rf, ctx) { if (rf & 1) {
|
|
3596
|
+
const _r2 = i0.ɵɵgetCurrentView();
|
|
3597
|
+
i0.ɵɵelementStart(0, "mat-option", 5);
|
|
3598
|
+
i0.ɵɵlistener("onSelectionChange", function SearchWorkTypeComponent_Conditional_5_Conditional_0_For_1_Template_mat_option_onSelectionChange_0_listener() { const workType_r3 = i0.ɵɵrestoreView(_r2).$implicit; const ctx_r3 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r3.onSelectedWorkType(workType_r3)); });
|
|
3599
|
+
i0.ɵɵtext(1);
|
|
3600
|
+
i0.ɵɵelementEnd();
|
|
3601
|
+
} if (rf & 2) {
|
|
3602
|
+
const workType_r3 = ctx.$implicit;
|
|
3603
|
+
i0.ɵɵadvance();
|
|
3604
|
+
i0.ɵɵtextInterpolate1(" ", workType_r3.label, " ");
|
|
3605
|
+
} }
|
|
3606
|
+
function SearchWorkTypeComponent_Conditional_5_Conditional_0_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
3607
|
+
i0.ɵɵelementStart(0, "mat-option");
|
|
3608
|
+
i0.ɵɵtext(1);
|
|
3609
|
+
i0.ɵɵpipe(2, "rpxTranslate");
|
|
3610
|
+
i0.ɵɵelementEnd();
|
|
3611
|
+
} if (rf & 2) {
|
|
3612
|
+
i0.ɵɵadvance();
|
|
3613
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "No results found"));
|
|
3614
|
+
} }
|
|
3615
|
+
function SearchWorkTypeComponent_Conditional_5_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
3616
|
+
i0.ɵɵrepeaterCreate(0, SearchWorkTypeComponent_Conditional_5_Conditional_0_For_1_Template, 2, 1, "mat-option", null, i0.ɵɵrepeaterTrackByIdentity);
|
|
3617
|
+
i0.ɵɵconditionalCreate(2, SearchWorkTypeComponent_Conditional_5_Conditional_0_Conditional_2_Template, 3, 3, "mat-option");
|
|
3618
|
+
} if (rf & 2) {
|
|
3619
|
+
const filteredList_r5 = i0.ɵɵnextContext();
|
|
3620
|
+
i0.ɵɵrepeater(filteredList_r5);
|
|
3621
|
+
i0.ɵɵadvance(2);
|
|
3622
|
+
i0.ɵɵconditional(filteredList_r5.length === 0 ? 2 : -1);
|
|
3623
|
+
} }
|
|
3624
|
+
function SearchWorkTypeComponent_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
3625
|
+
i0.ɵɵconditionalCreate(0, SearchWorkTypeComponent_Conditional_5_Conditional_0_Template, 3, 1);
|
|
3626
|
+
} if (rf & 2) {
|
|
3627
|
+
i0.ɵɵconditional(ctx !== null ? 0 : -1);
|
|
3628
|
+
} }
|
|
3629
|
+
class SearchWorkTypeComponent {
|
|
3630
|
+
get reset() {
|
|
3631
|
+
return this.pReset;
|
|
3632
|
+
}
|
|
3633
|
+
set reset(value) {
|
|
3634
|
+
this.pReset = value;
|
|
3635
|
+
this.resetSearchTerm();
|
|
3636
|
+
}
|
|
3637
|
+
constructor(taskService) {
|
|
3638
|
+
this.taskService = taskService;
|
|
3639
|
+
this.disabled = null;
|
|
3640
|
+
this.singleMode = false;
|
|
3641
|
+
this.workType = '';
|
|
3642
|
+
this.serviceIds = '';
|
|
3643
|
+
this.submitted = true;
|
|
3644
|
+
this.selectedWorkTypes = [];
|
|
3645
|
+
this.delay = 500;
|
|
3646
|
+
this.workTypeSelected = new EventEmitter();
|
|
3647
|
+
this.workTypeTermSearchInputChanged = new EventEmitter();
|
|
3648
|
+
this.searchWorkTypeChanged = new EventEmitter();
|
|
3649
|
+
this.searchTermFormControl = new FormControl('');
|
|
3650
|
+
this.minSearchCharacters = 3;
|
|
3651
|
+
this.term = '';
|
|
3652
|
+
this.pReset = true;
|
|
3653
|
+
this.debounceTimeInput = 300;
|
|
3654
|
+
this.previousValue = '';
|
|
3655
|
+
}
|
|
3656
|
+
ngOnInit() {
|
|
3657
|
+
const searchInputChanges$ = this.searchTermFormControl.valueChanges
|
|
3658
|
+
.pipe(tap((term) => this.workTypeTermSearchInputChanged.emit(term)));
|
|
3659
|
+
// if servicesField exists, then we should filter work types by the service codes - not currently relevant but kept for future proofing
|
|
3660
|
+
if (this.field && this.field.servicesField) {
|
|
3661
|
+
this.filteredList$ = searchInputChanges$.pipe(switchMap((term) => iif(
|
|
3662
|
+
// display results for any length (>=0) when using cached service codes
|
|
3663
|
+
() => (!!term && term.length >= 0), this.taskService.searchWorkTypes(term).pipe(
|
|
3664
|
+
// Filter out work types that are already selected
|
|
3665
|
+
map((workTypes) => this.filterUnselectedWorkTypes(workTypes, this.selectedWorkTypes, this.singleMode))), of$1(null))));
|
|
3666
|
+
}
|
|
3667
|
+
else {
|
|
3668
|
+
this.filteredList$ = searchInputChanges$.pipe(
|
|
3669
|
+
// Debounce needed to prevent multiple API calls being made
|
|
3670
|
+
debounceTime(this.debounceTimeInput), switchMap((term) => iif(() => (!!term && term.length >= this.minSearchCharacters), this.taskService.searchWorkTypes(term).pipe(
|
|
3671
|
+
// Filter out work types that are already selected
|
|
3672
|
+
map((workTypes) => this.filterUnselectedWorkTypes(workTypes, this.selectedWorkTypes, this.singleMode))), of$1(null))));
|
|
3673
|
+
}
|
|
3674
|
+
}
|
|
3675
|
+
onSelectedWorkType(workType) {
|
|
3676
|
+
this.searchTermFormControl.patchValue(workType.label);
|
|
3677
|
+
this.workTypeSelected.emit(workType);
|
|
3678
|
+
}
|
|
3679
|
+
onInput() {
|
|
3680
|
+
this.searchWorkTypeChanged.emit();
|
|
3681
|
+
}
|
|
3682
|
+
resetSearchTerm() {
|
|
3683
|
+
this.searchTermFormControl.setValue('');
|
|
3684
|
+
}
|
|
3685
|
+
filterUnselectedWorkTypes(workTypes, selectedWorkTypes, singleMode) {
|
|
3686
|
+
if (singleMode) {
|
|
3687
|
+
return workTypes;
|
|
3688
|
+
}
|
|
3689
|
+
return workTypes.filter(workType => !selectedWorkTypes.map(selectedWorkType => selectedWorkType.key).includes(workType.key));
|
|
3690
|
+
}
|
|
3691
|
+
removeInvalidString(formInputValue) {
|
|
3692
|
+
if (!this.isCharacterValid(formInputValue)) {
|
|
3693
|
+
formInputValue.preventDefault();
|
|
3694
|
+
}
|
|
3695
|
+
}
|
|
3696
|
+
isCharacterValid(event) {
|
|
3697
|
+
let pressed = undefined;
|
|
3698
|
+
if (event.key !== undefined) {
|
|
3699
|
+
pressed = event.key;
|
|
3700
|
+
if (pressed.length > 1) {
|
|
3701
|
+
switch (pressed) {
|
|
3702
|
+
case 'Tab':
|
|
3703
|
+
return true;
|
|
3704
|
+
case 'ArrowRight':
|
|
3705
|
+
return true;
|
|
3706
|
+
case 'ArrowLeft':
|
|
3707
|
+
return true;
|
|
3708
|
+
case 'Backspace':
|
|
3709
|
+
return true;
|
|
3710
|
+
case 'Enter':
|
|
3711
|
+
return true;
|
|
3712
|
+
default: return false;
|
|
3713
|
+
}
|
|
3714
|
+
}
|
|
3715
|
+
}
|
|
3716
|
+
else if (event.keyCode !== undefined) {
|
|
3717
|
+
pressed = String.fromCharCode(event.keyCode);
|
|
3718
|
+
}
|
|
3719
|
+
return pressed && (/[a-zA-Z \s'-]/).test(pressed);
|
|
3720
|
+
}
|
|
3721
|
+
static { this.ɵfac = function SearchWorkTypeComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SearchWorkTypeComponent)(i0.ɵɵdirectiveInject(TaskService)); }; }
|
|
3722
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SearchWorkTypeComponent, selectors: [["exui-search-work-type"]], inputs: { form: "form", field: "field", disabled: "disabled", singleMode: "singleMode", workType: "workType", serviceIds: "serviceIds", submitted: "submitted", selectedWorkTypes: "selectedWorkTypes", delay: "delay", reset: "reset" }, outputs: { workTypeSelected: "workTypeSelected", workTypeTermSearchInputChanged: "workTypeTermSearchInputChanged", searchWorkTypeChanged: "searchWorkTypeChanged" }, standalone: false, decls: 7, vars: 6, consts: [["char", ""], ["autoSearchWorkType", "matAutocomplete"], [1, "auto-complete-container"], ["id", "inputWorkTypeSearch", 1, "govuk-input", 3, "keydown", "input", "formControl", "matAutocomplete"], ["autoActiveFirstOption", "", 1, "mat-autocomplete-panel-extend"], [3, "onSelectionChange"]], template: function SearchWorkTypeComponent_Template(rf, ctx) { if (rf & 1) {
|
|
3723
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
3724
|
+
i0.ɵɵelementStart(0, "div", 2)(1, "input", 3, 0);
|
|
3725
|
+
i0.ɵɵlistener("keydown", function SearchWorkTypeComponent_Template_input_keydown_1_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.removeInvalidString($event)); })("input", function SearchWorkTypeComponent_Template_input_input_1_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onInput()); });
|
|
3726
|
+
i0.ɵɵelementEnd();
|
|
3727
|
+
i0.ɵɵelementStart(3, "mat-autocomplete", 4, 1);
|
|
3728
|
+
i0.ɵɵconditionalCreate(5, SearchWorkTypeComponent_Conditional_5_Template, 1, 1);
|
|
3729
|
+
i0.ɵɵpipe(6, "async");
|
|
3730
|
+
i0.ɵɵelementEnd()();
|
|
3731
|
+
} if (rf & 2) {
|
|
3732
|
+
let tmp_5_0;
|
|
3733
|
+
const autoSearchWorkType_r6 = i0.ɵɵreference(4);
|
|
3734
|
+
i0.ɵɵadvance();
|
|
3735
|
+
i0.ɵɵproperty("formControl", ctx.searchTermFormControl)("matAutocomplete", autoSearchWorkType_r6);
|
|
3736
|
+
i0.ɵɵattribute("disabled", ctx.disabled);
|
|
3737
|
+
i0.ɵɵadvance(4);
|
|
3738
|
+
i0.ɵɵconditional((tmp_5_0 = i0.ɵɵpipeBind1(6, 4, ctx.filteredList$)) ? 5 : -1, tmp_5_0);
|
|
3739
|
+
} }, dependencies: [i2$3.DefaultValueAccessor, i2$3.NgControlStatus, i2$3.FormControlDirective, i4.MatLegacyAutocomplete, i4.MatLegacyAutocompleteTrigger, i5.MatLegacyOption, i1.AsyncPipe, i2.RpxTranslatePipe], styles: [".autocomplete__input--show-all-values[_ngcontent-%COMP%]{padding:5px 34px 5px 5px;cursor:pointer}.autocomplete__dropdown-arrow-down[_ngcontent-%COMP%]{z-index:-1;display:inline-block;position:absolute;right:8px;width:24px;height:24px;top:10px}.autocomplete__menu[_ngcontent-%COMP%]{background-color:#fff;border:2px solid #0b0c0c;border-top:0;color:#0b0c0c;margin:0;max-height:342px;overflow-x:hidden;padding:0;width:calc(100% - 4px)}.autocomplete__menu--visible[_ngcontent-%COMP%]{display:block}.autocomplete__menu--hidden[_ngcontent-%COMP%]{display:none}.autocomplete__menu--overlay[_ngcontent-%COMP%]{box-shadow:#00000042 0 2px 6px;left:0;position:absolute;top:100%;z-index:100}.autocomplete__menu--inline[_ngcontent-%COMP%]{position:relative}.autocomplete__option[_ngcontent-%COMP%]{border-bottom:solid #b1b4b6;border-width:1px 0;cursor:pointer;display:block;position:relative}.autocomplete__option[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{pointer-events:none}.autocomplete__option[_ngcontent-%COMP%]:first-of-type{border-top-width:0}.autocomplete__option[_ngcontent-%COMP%]:last-of-type{border-bottom-width:0}.autocomplete__option--odd[_ngcontent-%COMP%]{background-color:#fafafa}.autocomplete__option--focused[_ngcontent-%COMP%], .autocomplete__option[_ngcontent-%COMP%]:hover{background-color:#1d70b8;border-color:#1d70b8;color:#fff;outline:0}.autocomplete__option--no-results[_ngcontent-%COMP%]{background-color:#fafafa;color:#646b6f;cursor:not-allowed}.autocomplete__hint[_ngcontent-%COMP%], .autocomplete__input[_ngcontent-%COMP%], .autocomplete__option[_ngcontent-%COMP%]{font-size:13px;line-height:1.25}.autocomplete__hint[_ngcontent-%COMP%], .autocomplete__option[_ngcontent-%COMP%]{padding:5px}@media (min-width: 641px){.autocomplete__hint[_ngcontent-%COMP%], .autocomplete__input[_ngcontent-%COMP%], .autocomplete__option[_ngcontent-%COMP%]{font-size:13px;line-height:1.31579}}.div-action[_ngcontent-%COMP%]{display:inline-block}.hide-autocomplete[_ngcontent-%COMP%]{display:none}.auto-complete-container[_ngcontent-%COMP%]{min-width:250px;display:inline-block;margin-right:4px}.autocomplete__input[_ngcontent-%COMP%]{line-height:24px;font-size:19px}"] }); }
|
|
3740
|
+
}
|
|
3741
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SearchWorkTypeComponent, [{
|
|
3742
|
+
type: Component,
|
|
3743
|
+
args: [{ selector: 'exui-search-work-type', standalone: false, template: "<div class=\"auto-complete-container\">\n <input\n id=\"inputWorkTypeSearch\"\n #char\n (keydown)=\"removeInvalidString($event)\"\n (input)=\"onInput()\"\n [formControl]=\"searchTermFormControl\"\n [matAutocomplete]=\"autoSearchWorkType\"\n class=\"govuk-input\"\n [attr.disabled]=\"disabled\">\n <mat-autocomplete class=\"mat-autocomplete-panel-extend\" autoActiveFirstOption #autoSearchWorkType=\"matAutocomplete\">\n @if (filteredList$ | async; as filteredList) {\n @if (filteredList !== null) {\n @for (workType of filteredList; track workType) {\n <mat-option (onSelectionChange)=\"onSelectedWorkType(workType)\">\n {{ workType.label }}\n </mat-option>\n }\n @if (filteredList.length === 0) {\n <mat-option>{{ 'No results found' | rpxTranslate }}</mat-option>\n }\n }\n }\n </mat-autocomplete>\n</div>\n", styles: [".autocomplete__input--show-all-values{padding:5px 34px 5px 5px;cursor:pointer}.autocomplete__dropdown-arrow-down{z-index:-1;display:inline-block;position:absolute;right:8px;width:24px;height:24px;top:10px}.autocomplete__menu{background-color:#fff;border:2px solid #0b0c0c;border-top:0;color:#0b0c0c;margin:0;max-height:342px;overflow-x:hidden;padding:0;width:calc(100% - 4px)}.autocomplete__menu--visible{display:block}.autocomplete__menu--hidden{display:none}.autocomplete__menu--overlay{box-shadow:#00000042 0 2px 6px;left:0;position:absolute;top:100%;z-index:100}.autocomplete__menu--inline{position:relative}.autocomplete__option{border-bottom:solid #b1b4b6;border-width:1px 0;cursor:pointer;display:block;position:relative}.autocomplete__option>*{pointer-events:none}.autocomplete__option:first-of-type{border-top-width:0}.autocomplete__option:last-of-type{border-bottom-width:0}.autocomplete__option--odd{background-color:#fafafa}.autocomplete__option--focused,.autocomplete__option:hover{background-color:#1d70b8;border-color:#1d70b8;color:#fff;outline:0}.autocomplete__option--no-results{background-color:#fafafa;color:#646b6f;cursor:not-allowed}.autocomplete__hint,.autocomplete__input,.autocomplete__option{font-size:13px;line-height:1.25}.autocomplete__hint,.autocomplete__option{padding:5px}@media (min-width: 641px){.autocomplete__hint,.autocomplete__input,.autocomplete__option{font-size:13px;line-height:1.31579}}.div-action{display:inline-block}.hide-autocomplete{display:none}.auto-complete-container{min-width:250px;display:inline-block;margin-right:4px}.autocomplete__input{line-height:24px;font-size:19px}\n"] }]
|
|
3744
|
+
}], () => [{ type: TaskService }], { form: [{
|
|
3745
|
+
type: Input
|
|
3746
|
+
}], field: [{
|
|
3747
|
+
type: Input
|
|
3748
|
+
}], disabled: [{
|
|
3749
|
+
type: Input
|
|
3750
|
+
}], singleMode: [{
|
|
3751
|
+
type: Input
|
|
3752
|
+
}], workType: [{
|
|
3753
|
+
type: Input
|
|
3754
|
+
}], serviceIds: [{
|
|
3755
|
+
type: Input
|
|
3756
|
+
}], submitted: [{
|
|
3757
|
+
type: Input
|
|
3758
|
+
}], selectedWorkTypes: [{
|
|
3759
|
+
type: Input
|
|
3760
|
+
}], delay: [{
|
|
3761
|
+
type: Input
|
|
3762
|
+
}], workTypeSelected: [{
|
|
3763
|
+
type: Output
|
|
3764
|
+
}], workTypeTermSearchInputChanged: [{
|
|
3765
|
+
type: Output
|
|
3766
|
+
}], searchWorkTypeChanged: [{
|
|
3767
|
+
type: Output
|
|
3768
|
+
}], reset: [{
|
|
3769
|
+
type: Input
|
|
3770
|
+
}] }); })();
|
|
3771
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SearchWorkTypeComponent, { className: "SearchWorkTypeComponent", filePath: "lib/components/search-work-type/search-work-type.component.ts", lineNumber: 14 }); })();
|
|
3772
|
+
|
|
3773
|
+
function FindWorkTypeComponent_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
3774
|
+
i0.ɵɵelementStart(0, "label", 3);
|
|
3775
|
+
i0.ɵɵtext(1);
|
|
3776
|
+
i0.ɵɵpipe(2, "rpxTranslate");
|
|
3777
|
+
i0.ɵɵelementEnd();
|
|
3778
|
+
} if (rf & 2) {
|
|
3779
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
3780
|
+
i0.ɵɵadvance();
|
|
3781
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.workTypeTitle));
|
|
3782
|
+
} }
|
|
3783
|
+
function FindWorkTypeComponent_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
3784
|
+
const _r2 = i0.ɵɵgetCurrentView();
|
|
3785
|
+
i0.ɵɵelementStart(0, "a", 8);
|
|
3786
|
+
i0.ɵɵlistener("click", function FindWorkTypeComponent_Conditional_6_Template_a_click_0_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); ctx_r0.addWorkType(); return i0.ɵɵresetView($event.preventDefault()); });
|
|
3787
|
+
i0.ɵɵtext(1);
|
|
3788
|
+
i0.ɵɵpipe(2, "rpxTranslate");
|
|
3789
|
+
i0.ɵɵelementStart(3, "span", 9);
|
|
3790
|
+
i0.ɵɵtext(4);
|
|
3791
|
+
i0.ɵɵpipe(5, "rpxTranslate");
|
|
3792
|
+
i0.ɵɵelementEnd()();
|
|
3793
|
+
} if (rf & 2) {
|
|
3794
|
+
i0.ɵɵadvance();
|
|
3795
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 2, "Add"), " ");
|
|
3796
|
+
i0.ɵɵadvance(3);
|
|
3797
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 4, "work type"));
|
|
3798
|
+
} }
|
|
3799
|
+
function FindWorkTypeComponent_Conditional_7_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
3800
|
+
const _r3 = i0.ɵɵgetCurrentView();
|
|
3801
|
+
i0.ɵɵelementStart(0, "li", 10)(1, "a", 11);
|
|
3802
|
+
i0.ɵɵlistener("click", function FindWorkTypeComponent_Conditional_7_For_2_Template_a_click_1_listener($event) { const selection_r4 = i0.ɵɵrestoreView(_r3).$implicit; const ctx_r0 = i0.ɵɵnextContext(2); ctx_r0.removeWorkType(selection_r4); return i0.ɵɵresetView($event.preventDefault()); });
|
|
3803
|
+
i0.ɵɵtext(2);
|
|
3804
|
+
i0.ɵɵelementEnd()();
|
|
3805
|
+
} if (rf & 2) {
|
|
3806
|
+
const selection_r4 = ctx.$implicit;
|
|
3807
|
+
i0.ɵɵadvance(2);
|
|
3808
|
+
i0.ɵɵtextInterpolate1(" ", selection_r4.label, " ");
|
|
3809
|
+
} }
|
|
3810
|
+
function FindWorkTypeComponent_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
3811
|
+
i0.ɵɵelementStart(0, "ul", 7);
|
|
3812
|
+
i0.ɵɵrepeaterCreate(1, FindWorkTypeComponent_Conditional_7_For_2_Template, 3, 1, "li", 10, i0.ɵɵrepeaterTrackByIdentity);
|
|
3813
|
+
i0.ɵɵelementEnd();
|
|
3814
|
+
} if (rf & 2) {
|
|
3815
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
3816
|
+
i0.ɵɵadvance();
|
|
3817
|
+
i0.ɵɵrepeater(ctx_r0.selectedWorkTypes);
|
|
3818
|
+
} }
|
|
3819
|
+
class FindWorkTypeComponent {
|
|
3820
|
+
constructor() {
|
|
3821
|
+
this.workTypeFieldChanged = new EventEmitter();
|
|
3822
|
+
this.submitted = true;
|
|
3823
|
+
this.enableAddWorkTypeButton = true;
|
|
3824
|
+
this.workTypeTitle = 'Search for a work type by name';
|
|
3825
|
+
this.disableInputField = false;
|
|
3826
|
+
this.tempSelectedWorkType = null;
|
|
3827
|
+
this.serviceIds = 'SSCS,IA';
|
|
3828
|
+
this.pServices = [];
|
|
3829
|
+
this.pDisabled = false;
|
|
3830
|
+
}
|
|
3831
|
+
get disabled() {
|
|
3832
|
+
return this.pDisabled;
|
|
3833
|
+
}
|
|
3834
|
+
set disabled(value) {
|
|
3835
|
+
if (value) {
|
|
3836
|
+
this.searchWorkTypeComponent.resetSearchTerm();
|
|
3837
|
+
this.removeSelectedValues();
|
|
3838
|
+
}
|
|
3839
|
+
this.pDisabled = this.disableInputField === true ? true : null;
|
|
3840
|
+
}
|
|
3841
|
+
get services() {
|
|
3842
|
+
return this.pServices;
|
|
3843
|
+
}
|
|
3844
|
+
// Currently not used - but kept for potential future proofing
|
|
3845
|
+
set services(value) {
|
|
3846
|
+
this.pServices = value;
|
|
3847
|
+
const field = this.fields.find(f => {
|
|
3848
|
+
if (this.field) {
|
|
3849
|
+
return f.name === this.field.findLocationField;
|
|
3850
|
+
}
|
|
3851
|
+
});
|
|
3852
|
+
if (field) {
|
|
3853
|
+
if (typeof value === 'string') {
|
|
3854
|
+
this.serviceIds = value;
|
|
3855
|
+
}
|
|
3856
|
+
else {
|
|
3857
|
+
this.serviceIds = getValues(field.options, value).filter(service => service !== 'services_all').join(',');
|
|
3858
|
+
}
|
|
3859
|
+
}
|
|
3860
|
+
}
|
|
3861
|
+
get selectedWorkTypes() {
|
|
3862
|
+
return this.form.get(this.field.name)?.value?.filter(workType => workType?.key);
|
|
3863
|
+
}
|
|
3864
|
+
ngOnInit() {
|
|
3865
|
+
if (this.formSubmissionEvent$) {
|
|
3866
|
+
this.formSubmissionEventSubscription = this.formSubmissionEvent$.subscribe(() => {
|
|
3867
|
+
// Shouldn't reset search term if single mode and already has selected
|
|
3868
|
+
const oneSelectedAndMaxSelectedOne = this.selectedWorkTypes?.length === 1 && this.field.maxSelected === 1;
|
|
3869
|
+
if (!oneSelectedAndMaxSelectedOne) {
|
|
3870
|
+
this.searchWorkTypeComponent.resetSearchTerm();
|
|
3871
|
+
}
|
|
3872
|
+
});
|
|
3873
|
+
}
|
|
3874
|
+
}
|
|
3875
|
+
addWorkType() {
|
|
3876
|
+
if (this.tempSelectedWorkType) {
|
|
3877
|
+
this.addSelectedWorkTypesToForm([this.tempSelectedWorkType]);
|
|
3878
|
+
this.tempSelectedWorkType = null;
|
|
3879
|
+
this.searchWorkTypeComponent.resetSearchTerm();
|
|
3880
|
+
}
|
|
3881
|
+
}
|
|
3882
|
+
removeWorkType(workType) {
|
|
3883
|
+
if (workType.key) {
|
|
3884
|
+
const formArray = this.form.get(this.field.name);
|
|
3885
|
+
const index = formArray.value.findIndex(selectedWorkType => selectedWorkType.key === workType.key);
|
|
3886
|
+
if (index > -1) {
|
|
3887
|
+
formArray.removeAt(index);
|
|
3888
|
+
}
|
|
3889
|
+
}
|
|
3890
|
+
}
|
|
3891
|
+
onInputChanged(term) {
|
|
3892
|
+
// if the filter is in single mode clear the selected locations
|
|
3893
|
+
if (typeof term === 'string' && this.field.maxSelected === 1) {
|
|
3894
|
+
this.removeSelectedValues();
|
|
3895
|
+
}
|
|
3896
|
+
}
|
|
3897
|
+
onSearchInputChanged() {
|
|
3898
|
+
this.workTypeFieldChanged.emit();
|
|
3899
|
+
}
|
|
3900
|
+
onWorkTypeSelected(workType) {
|
|
3901
|
+
if (this.field.maxSelected === 1) {
|
|
3902
|
+
this.removeSelectedValues();
|
|
3903
|
+
this.addSelectedWorkTypesToForm([workType]);
|
|
3904
|
+
}
|
|
3905
|
+
else {
|
|
3906
|
+
if (!this.selectedWorkTypes.find(x => x.key === workType.key)) {
|
|
3907
|
+
if (workType.key) {
|
|
3908
|
+
this.tempSelectedWorkType = workType;
|
|
3909
|
+
}
|
|
3910
|
+
}
|
|
3911
|
+
}
|
|
3912
|
+
}
|
|
3913
|
+
removeSelectedValues() {
|
|
3914
|
+
const formArray = this.form.get(this.field?.name);
|
|
3915
|
+
if (formArray) {
|
|
3916
|
+
for (let i = 0; i < formArray.length; i++) {
|
|
3917
|
+
formArray.removeAt(i);
|
|
3918
|
+
}
|
|
3919
|
+
}
|
|
3920
|
+
}
|
|
3921
|
+
addSelectedWorkTypesToForm(workTypes) {
|
|
3922
|
+
const formArray = this.form.get(this.field.name);
|
|
3923
|
+
for (const workType of workTypes) {
|
|
3924
|
+
formArray.push(new FormControl(workType));
|
|
3925
|
+
}
|
|
3926
|
+
}
|
|
3927
|
+
ngOnDestroy() {
|
|
3928
|
+
this.formSubmissionEventSubscription?.unsubscribe();
|
|
3929
|
+
}
|
|
3930
|
+
static { this.ɵfac = function FindWorkTypeComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || FindWorkTypeComponent)(); }; }
|
|
3931
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FindWorkTypeComponent, selectors: [["xuilib-find-work-type"]], viewQuery: function FindWorkTypeComponent_Query(rf, ctx) { if (rf & 1) {
|
|
3932
|
+
i0.ɵɵviewQuery(SearchWorkTypeComponent, 7);
|
|
3933
|
+
} if (rf & 2) {
|
|
3934
|
+
let _t;
|
|
3935
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.searchWorkTypeComponent = _t.first);
|
|
3936
|
+
} }, inputs: { submitted: "submitted", enableAddWorkTypeButton: "enableAddWorkTypeButton", form: "form", field: "field", fields: "fields", workTypeTitle: "workTypeTitle", disableInputField: "disableInputField", formSubmissionEvent$: "formSubmissionEvent$", disabled: "disabled", services: "services" }, outputs: { workTypeFieldChanged: "workTypeFieldChanged" }, standalone: false, decls: 8, vars: 10, consts: [[1, "work-type-picker-custom"], [1, "search-work-type"], [1, "govuk-body"], ["id", "input-selected-work-type-label"], [1, "search-work-type__input-container"], [1, "search-work-type__input", 3, "workTypeTermSearchInputChanged", "workTypeSelected", "searchWorkTypeChanged", "form", "field", "selectedWorkTypes", "delay", "disabled", "singleMode", "serviceIds"], ["href", "#", "data-module", "govuk-button", "id", "add-work-type", 1, "govuk-button", "govuk-button--secondary", "govuk-!-margin-bottom-0"], [1, "hmcts-filter-tags", "selection-container"], ["href", "#", "data-module", "govuk-button", "id", "add-work-type", 1, "govuk-button", "govuk-button--secondary", "govuk-!-margin-bottom-0", 3, "click"], [1, "govuk-visually-hidden"], [1, "work-type-selection"], ["href", "#", 1, "hmcts-filter__tag", 3, "click"]], template: function FindWorkTypeComponent_Template(rf, ctx) { if (rf & 1) {
|
|
3937
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "div", 2);
|
|
3938
|
+
i0.ɵɵconditionalCreate(3, FindWorkTypeComponent_Conditional_3_Template, 3, 3, "label", 3);
|
|
3939
|
+
i0.ɵɵelementEnd();
|
|
3940
|
+
i0.ɵɵelementStart(4, "div", 4)(5, "exui-search-work-type", 5);
|
|
3941
|
+
i0.ɵɵlistener("workTypeTermSearchInputChanged", function FindWorkTypeComponent_Template_exui_search_work_type_workTypeTermSearchInputChanged_5_listener($event) { return ctx.onInputChanged($event); })("workTypeSelected", function FindWorkTypeComponent_Template_exui_search_work_type_workTypeSelected_5_listener($event) { return ctx.onWorkTypeSelected($event); })("searchWorkTypeChanged", function FindWorkTypeComponent_Template_exui_search_work_type_searchWorkTypeChanged_5_listener() { return ctx.onSearchInputChanged(); });
|
|
3942
|
+
i0.ɵɵelementEnd();
|
|
3943
|
+
i0.ɵɵconditionalCreate(6, FindWorkTypeComponent_Conditional_6_Template, 6, 6, "a", 6);
|
|
3944
|
+
i0.ɵɵelementEnd()();
|
|
3945
|
+
i0.ɵɵconditionalCreate(7, FindWorkTypeComponent_Conditional_7_Template, 3, 0, "ul", 7);
|
|
3946
|
+
i0.ɵɵelementEnd();
|
|
3947
|
+
} if (rf & 2) {
|
|
3948
|
+
i0.ɵɵadvance(3);
|
|
3949
|
+
i0.ɵɵconditional(ctx.workTypeTitle ? 3 : -1);
|
|
3950
|
+
i0.ɵɵadvance(2);
|
|
3951
|
+
i0.ɵɵproperty("form", ctx.form)("field", ctx.field)("selectedWorkTypes", ctx.selectedWorkTypes)("delay", 300)("disabled", ctx.disabled)("singleMode", ctx.field.maxSelected === 1)("serviceIds", ctx.serviceIds);
|
|
3952
|
+
i0.ɵɵadvance();
|
|
3953
|
+
i0.ɵɵconditional(ctx.enableAddWorkTypeButton ? 6 : -1);
|
|
3954
|
+
i0.ɵɵadvance();
|
|
3955
|
+
i0.ɵɵconditional(ctx.field.maxSelected != 1 ? 7 : -1);
|
|
3956
|
+
} }, dependencies: [SearchWorkTypeComponent, i2.RpxTranslatePipe], styles: [".search-work-type__input-container[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1px}.search-work-type__input[_ngcontent-%COMP%]{flex:1 1 0}.govuk-button--secondary[_ngcontent-%COMP%]{max-width:57px}#add-work-type[_ngcontent-%COMP%]{background-color:#ddd}"] }); }
|
|
3957
|
+
}
|
|
3958
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FindWorkTypeComponent, [{
|
|
3959
|
+
type: Component,
|
|
3960
|
+
args: [{ selector: 'xuilib-find-work-type', standalone: false, template: "<div class=\"work-type-picker-custom\">\n <div class=\"search-work-type\">\n <div class=\"govuk-body\">\n @if (workTypeTitle) {\n <label id=\"input-selected-work-type-label\">{{ workTypeTitle | rpxTranslate }}</label>\n }\n </div>\n <div class=\"search-work-type__input-container\">\n <exui-search-work-type class=\"search-work-type__input\" [form]=\"form\" [field]=\"field\"\n [selectedWorkTypes]=\"selectedWorkTypes\" [delay]=\"300\" [disabled]=\"disabled\"\n [singleMode]=\"field.maxSelected === 1\" [serviceIds]=\"serviceIds\"\n (workTypeTermSearchInputChanged)=\"onInputChanged($event)\" (workTypeSelected)=\"onWorkTypeSelected($event)\"\n (searchWorkTypeChanged)=\"onSearchInputChanged()\">\n </exui-search-work-type>\n @if (enableAddWorkTypeButton) {\n <a href=\"#\" (click)=\"addWorkType(); $event.preventDefault()\"\n class=\"govuk-button govuk-button--secondary govuk-!-margin-bottom-0\" data-module=\"govuk-button\"\n id=\"add-work-type\">\n {{ 'Add' | rpxTranslate}}\n <span class=\"govuk-visually-hidden\">{{'work type' | rpxTranslate}}</span>\n </a>\n }\n </div>\n </div>\n\n @if (field.maxSelected != 1) {\n <ul class=\"hmcts-filter-tags selection-container\">\n @for (selection of selectedWorkTypes; track selection) {\n <li class=\"work-type-selection\">\n <a class=\"hmcts-filter__tag\" href=\"#\" (click)=\"removeWorkType(selection); $event.preventDefault()\">\n {{ selection.label }}\n </a>\n </li>\n }\n </ul>\n }\n</div>", styles: [".search-work-type__input-container{display:flex;align-items:center;gap:1px}.search-work-type__input{flex:1 1 0}.govuk-button--secondary{max-width:57px}#add-work-type{background-color:#ddd}\n"] }]
|
|
3961
|
+
}], null, { workTypeFieldChanged: [{
|
|
3962
|
+
type: Output
|
|
3963
|
+
}], submitted: [{
|
|
3964
|
+
type: Input
|
|
3965
|
+
}], enableAddWorkTypeButton: [{
|
|
3966
|
+
type: Input
|
|
3967
|
+
}], form: [{
|
|
3968
|
+
type: Input
|
|
3969
|
+
}], field: [{
|
|
3970
|
+
type: Input
|
|
3971
|
+
}], fields: [{
|
|
3972
|
+
type: Input
|
|
3973
|
+
}], workTypeTitle: [{
|
|
3974
|
+
type: Input
|
|
3975
|
+
}], disableInputField: [{
|
|
3976
|
+
type: Input
|
|
3977
|
+
}], formSubmissionEvent$: [{
|
|
3978
|
+
type: Input
|
|
3979
|
+
}], searchWorkTypeComponent: [{
|
|
3980
|
+
type: ViewChild,
|
|
3981
|
+
args: [SearchWorkTypeComponent, { static: true }]
|
|
3982
|
+
}], disabled: [{
|
|
3983
|
+
type: Input
|
|
3984
|
+
}], services: [{
|
|
3985
|
+
type: Input
|
|
3986
|
+
}] }); })();
|
|
3987
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(FindWorkTypeComponent, { className: "FindWorkTypeComponent", filePath: "lib/components/find-work-type/find-work-type.component.ts", lineNumber: 14 }); })();
|
|
3988
|
+
|
|
3586
3989
|
class CapitalizePipe {
|
|
3587
3990
|
transform(value) {
|
|
3588
3991
|
const lowerCaseString = value.toLowerCase();
|
|
@@ -3616,7 +4019,7 @@ function GenericFilterComponent_For_2_Case_2_Template(rf, ctx) { if (rf & 1) {
|
|
|
3616
4019
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 3, field_r1.name), " ");
|
|
3617
4020
|
} }
|
|
3618
4021
|
function GenericFilterComponent_For_2_Case_3_Conditional_1_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
3619
|
-
i0.ɵɵelementStart(0, "div",
|
|
4022
|
+
i0.ɵɵelementStart(0, "div", 25);
|
|
3620
4023
|
i0.ɵɵtext(1);
|
|
3621
4024
|
i0.ɵɵelementEnd();
|
|
3622
4025
|
} if (rf & 2) {
|
|
@@ -3625,11 +4028,11 @@ function GenericFilterComponent_For_2_Case_3_Conditional_1_Conditional_4_Templat
|
|
|
3625
4028
|
i0.ɵɵtextInterpolate1(" ", field_r1.titleHint, " ");
|
|
3626
4029
|
} }
|
|
3627
4030
|
function GenericFilterComponent_For_2_Case_3_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
3628
|
-
i0.ɵɵelementStart(0, "div", 10)(1, "h3",
|
|
4031
|
+
i0.ɵɵelementStart(0, "div", 10)(1, "h3", 24);
|
|
3629
4032
|
i0.ɵɵtext(2);
|
|
3630
4033
|
i0.ɵɵpipe(3, "capitalize");
|
|
3631
4034
|
i0.ɵɵelementEnd();
|
|
3632
|
-
i0.ɵɵconditionalCreate(4, GenericFilterComponent_For_2_Case_3_Conditional_1_Conditional_4_Template, 2, 1, "div",
|
|
4035
|
+
i0.ɵɵconditionalCreate(4, GenericFilterComponent_For_2_Case_3_Conditional_1_Conditional_4_Template, 2, 1, "div", 25);
|
|
3633
4036
|
i0.ɵɵelementEnd();
|
|
3634
4037
|
} if (rf & 2) {
|
|
3635
4038
|
const field_r1 = i0.ɵɵnextContext(2).$implicit;
|
|
@@ -3661,7 +4064,7 @@ function GenericFilterComponent_For_2_Case_3_Conditional_3_Template(rf, ctx) { i
|
|
|
3661
4064
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 2, field_r1.hintText), " ");
|
|
3662
4065
|
} }
|
|
3663
4066
|
function GenericFilterComponent_For_2_Case_3_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
3664
|
-
i0.ɵɵelementStart(0, "span", 13)(1, "span",
|
|
4067
|
+
i0.ɵɵelementStart(0, "span", 13)(1, "span", 26);
|
|
3665
4068
|
i0.ɵɵtext(2);
|
|
3666
4069
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
3667
4070
|
i0.ɵɵelementEnd();
|
|
@@ -3677,7 +4080,7 @@ function GenericFilterComponent_For_2_Case_3_Conditional_4_Template(rf, ctx) { i
|
|
|
3677
4080
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 5, field_r1.minSelectedError), " ");
|
|
3678
4081
|
} }
|
|
3679
4082
|
function GenericFilterComponent_For_2_Case_3_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
3680
|
-
i0.ɵɵelementStart(0, "span", 13)(1, "span",
|
|
4083
|
+
i0.ɵɵelementStart(0, "span", 13)(1, "span", 26);
|
|
3681
4084
|
i0.ɵɵtext(2);
|
|
3682
4085
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
3683
4086
|
i0.ɵɵelementEnd();
|
|
@@ -3693,7 +4096,7 @@ function GenericFilterComponent_For_2_Case_3_Conditional_5_Template(rf, ctx) { i
|
|
|
3693
4096
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 5, field_r1.maxSelectedError), " ");
|
|
3694
4097
|
} }
|
|
3695
4098
|
function GenericFilterComponent_For_2_Case_3_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
3696
|
-
i0.ɵɵelementStart(0, "span", 13)(1, "span",
|
|
4099
|
+
i0.ɵɵelementStart(0, "span", 13)(1, "span", 26);
|
|
3697
4100
|
i0.ɵɵtext(2);
|
|
3698
4101
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
3699
4102
|
i0.ɵɵelementEnd();
|
|
@@ -3709,7 +4112,7 @@ function GenericFilterComponent_For_2_Case_3_Conditional_6_Template(rf, ctx) { i
|
|
|
3709
4112
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 5, field_r1.emailError), " ");
|
|
3710
4113
|
} }
|
|
3711
4114
|
function GenericFilterComponent_For_2_Case_3_Case_8_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
3712
|
-
i0.ɵɵelementStart(0, "option",
|
|
4115
|
+
i0.ɵɵelementStart(0, "option", 29);
|
|
3713
4116
|
i0.ɵɵtext(1);
|
|
3714
4117
|
i0.ɵɵelementEnd();
|
|
3715
4118
|
} if (rf & 2) {
|
|
@@ -3720,7 +4123,7 @@ function GenericFilterComponent_For_2_Case_3_Case_8_Conditional_3_Template(rf, c
|
|
|
3720
4123
|
i0.ɵɵtextInterpolate(field_r1.defaultOption.label);
|
|
3721
4124
|
} }
|
|
3722
4125
|
function GenericFilterComponent_For_2_Case_3_Case_8_For_5_Template(rf, ctx) { if (rf & 1) {
|
|
3723
|
-
i0.ɵɵelementStart(0, "option",
|
|
4126
|
+
i0.ɵɵelementStart(0, "option", 30);
|
|
3724
4127
|
i0.ɵɵtext(1);
|
|
3725
4128
|
i0.ɵɵelementEnd();
|
|
3726
4129
|
} if (rf & 2) {
|
|
@@ -3731,13 +4134,13 @@ function GenericFilterComponent_For_2_Case_3_Case_8_For_5_Template(rf, ctx) { if
|
|
|
3731
4134
|
} }
|
|
3732
4135
|
function GenericFilterComponent_For_2_Case_3_Case_8_Template(rf, ctx) { if (rf & 1) {
|
|
3733
4136
|
const _r2 = i0.ɵɵgetCurrentView();
|
|
3734
|
-
i0.ɵɵelementStart(0, "select",
|
|
4137
|
+
i0.ɵɵelementStart(0, "select", 27);
|
|
3735
4138
|
i0.ɵɵlistener("change", function GenericFilterComponent_For_2_Case_3_Case_8_Template_select_change_0_listener() { i0.ɵɵrestoreView(_r2); const field_r1 = i0.ɵɵnextContext(2).$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.fieldChanged(field_r1, ctx_r2.form)); });
|
|
3736
|
-
i0.ɵɵelementStart(1, "option",
|
|
4139
|
+
i0.ɵɵelementStart(1, "option", 28);
|
|
3737
4140
|
i0.ɵɵtext(2);
|
|
3738
4141
|
i0.ɵɵelementEnd();
|
|
3739
|
-
i0.ɵɵconditionalCreate(3, GenericFilterComponent_For_2_Case_3_Case_8_Conditional_3_Template, 2, 3, "option",
|
|
3740
|
-
i0.ɵɵrepeaterCreate(4, GenericFilterComponent_For_2_Case_3_Case_8_For_5_Template, 2, 2, "option",
|
|
4142
|
+
i0.ɵɵconditionalCreate(3, GenericFilterComponent_For_2_Case_3_Case_8_Conditional_3_Template, 2, 3, "option", 29);
|
|
4143
|
+
i0.ɵɵrepeaterCreate(4, GenericFilterComponent_For_2_Case_3_Case_8_For_5_Template, 2, 2, "option", 30, i0.ɵɵrepeaterTrackByIdentity);
|
|
3741
4144
|
i0.ɵɵelementEnd();
|
|
3742
4145
|
} if (rf & 2) {
|
|
3743
4146
|
const field_r1 = i0.ɵɵnextContext(2).$implicit;
|
|
@@ -3752,7 +4155,7 @@ function GenericFilterComponent_For_2_Case_3_Case_8_Template(rf, ctx) { if (rf &
|
|
|
3752
4155
|
i0.ɵɵrepeater(field_r1.options);
|
|
3753
4156
|
} }
|
|
3754
4157
|
function GenericFilterComponent_For_2_Case_3_Case_9_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
3755
|
-
i0.ɵɵelementStart(0, "option",
|
|
4158
|
+
i0.ɵɵelementStart(0, "option", 31);
|
|
3756
4159
|
i0.ɵɵtext(1);
|
|
3757
4160
|
i0.ɵɵelementEnd();
|
|
3758
4161
|
} if (rf & 2) {
|
|
@@ -3762,7 +4165,7 @@ function GenericFilterComponent_For_2_Case_3_Case_9_Conditional_3_Template(rf, c
|
|
|
3762
4165
|
i0.ɵɵtextInterpolate(field_r1.defaultOption.label);
|
|
3763
4166
|
} }
|
|
3764
4167
|
function GenericFilterComponent_For_2_Case_3_Case_9_For_5_For_3_Template(rf, ctx) { if (rf & 1) {
|
|
3765
|
-
i0.ɵɵelementStart(0, "option",
|
|
4168
|
+
i0.ɵɵelementStart(0, "option", 29);
|
|
3766
4169
|
i0.ɵɵtext(1);
|
|
3767
4170
|
i0.ɵɵelementEnd();
|
|
3768
4171
|
} if (rf & 2) {
|
|
@@ -3772,9 +4175,9 @@ function GenericFilterComponent_For_2_Case_3_Case_9_For_5_For_3_Template(rf, ctx
|
|
|
3772
4175
|
i0.ɵɵtextInterpolate(item_r6.label);
|
|
3773
4176
|
} }
|
|
3774
4177
|
function GenericFilterComponent_For_2_Case_3_Case_9_For_5_Template(rf, ctx) { if (rf & 1) {
|
|
3775
|
-
i0.ɵɵelementStart(0, "optgroup",
|
|
4178
|
+
i0.ɵɵelementStart(0, "optgroup", 32);
|
|
3776
4179
|
i0.ɵɵpipe(1, "titlecase");
|
|
3777
|
-
i0.ɵɵrepeaterCreate(2, GenericFilterComponent_For_2_Case_3_Case_9_For_5_For_3_Template, 2, 2, "option",
|
|
4180
|
+
i0.ɵɵrepeaterCreate(2, GenericFilterComponent_For_2_Case_3_Case_9_For_5_For_3_Template, 2, 2, "option", 29, i0.ɵɵrepeaterTrackByIdentity);
|
|
3778
4181
|
i0.ɵɵelementEnd();
|
|
3779
4182
|
} if (rf & 2) {
|
|
3780
4183
|
const grp_r7 = ctx.$implicit;
|
|
@@ -3784,13 +4187,13 @@ function GenericFilterComponent_For_2_Case_3_Case_9_For_5_Template(rf, ctx) { if
|
|
|
3784
4187
|
} }
|
|
3785
4188
|
function GenericFilterComponent_For_2_Case_3_Case_9_Template(rf, ctx) { if (rf & 1) {
|
|
3786
4189
|
const _r5 = i0.ɵɵgetCurrentView();
|
|
3787
|
-
i0.ɵɵelementStart(0, "select",
|
|
4190
|
+
i0.ɵɵelementStart(0, "select", 27);
|
|
3788
4191
|
i0.ɵɵlistener("change", function GenericFilterComponent_For_2_Case_3_Case_9_Template_select_change_0_listener() { i0.ɵɵrestoreView(_r5); const field_r1 = i0.ɵɵnextContext(2).$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.fieldChanged(field_r1, ctx_r2.form)); });
|
|
3789
|
-
i0.ɵɵelementStart(1, "option",
|
|
4192
|
+
i0.ɵɵelementStart(1, "option", 28);
|
|
3790
4193
|
i0.ɵɵtext(2);
|
|
3791
4194
|
i0.ɵɵelementEnd();
|
|
3792
|
-
i0.ɵɵconditionalCreate(3, GenericFilterComponent_For_2_Case_3_Case_9_Conditional_3_Template, 2, 2, "option",
|
|
3793
|
-
i0.ɵɵrepeaterCreate(4, GenericFilterComponent_For_2_Case_3_Case_9_For_5_Template, 4, 4, "optgroup",
|
|
4195
|
+
i0.ɵɵconditionalCreate(3, GenericFilterComponent_For_2_Case_3_Case_9_Conditional_3_Template, 2, 2, "option", 31);
|
|
4196
|
+
i0.ɵɵrepeaterCreate(4, GenericFilterComponent_For_2_Case_3_Case_9_For_5_Template, 4, 4, "optgroup", 32, i0.ɵɵrepeaterTrackByIdentity);
|
|
3794
4197
|
i0.ɵɵelementEnd();
|
|
3795
4198
|
} if (rf & 2) {
|
|
3796
4199
|
const field_r1 = i0.ɵɵnextContext(2).$implicit;
|
|
@@ -3806,10 +4209,10 @@ function GenericFilterComponent_For_2_Case_3_Case_9_Template(rf, ctx) { if (rf &
|
|
|
3806
4209
|
} }
|
|
3807
4210
|
function GenericFilterComponent_For_2_Case_3_Case_10_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
3808
4211
|
const _r8 = i0.ɵɵgetCurrentView();
|
|
3809
|
-
i0.ɵɵelementStart(0, "div",
|
|
4212
|
+
i0.ɵɵelementStart(0, "div", 33)(1, "input", 34);
|
|
3810
4213
|
i0.ɵɵlistener("change", function GenericFilterComponent_For_2_Case_3_Case_10_For_2_Template_input_change_1_listener($event) { const item_r9 = i0.ɵɵrestoreView(_r8).$implicit; const field_r1 = i0.ɵɵnextContext(3).$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.toggleSelectAll($event, ctx_r2.form, item_r9, field_r1)); });
|
|
3811
4214
|
i0.ɵɵelementEnd();
|
|
3812
|
-
i0.ɵɵelementStart(2, "label",
|
|
4215
|
+
i0.ɵɵelementStart(2, "label", 35);
|
|
3813
4216
|
i0.ɵɵtext(3);
|
|
3814
4217
|
i0.ɵɵelementEnd()();
|
|
3815
4218
|
} if (rf & 2) {
|
|
@@ -3827,7 +4230,7 @@ function GenericFilterComponent_For_2_Case_3_Case_10_For_2_Template(rf, ctx) { i
|
|
|
3827
4230
|
} }
|
|
3828
4231
|
function GenericFilterComponent_For_2_Case_3_Case_10_Template(rf, ctx) { if (rf & 1) {
|
|
3829
4232
|
i0.ɵɵelementStart(0, "div", 15);
|
|
3830
|
-
i0.ɵɵrepeaterCreate(1, GenericFilterComponent_For_2_Case_3_Case_10_For_2_Template, 4, 10, "div",
|
|
4233
|
+
i0.ɵɵrepeaterCreate(1, GenericFilterComponent_For_2_Case_3_Case_10_For_2_Template, 4, 10, "div", 33, i0.ɵɵrepeaterTrackByIdentity);
|
|
3831
4234
|
i0.ɵɵelementEnd();
|
|
3832
4235
|
} if (rf & 2) {
|
|
3833
4236
|
const field_r1 = i0.ɵɵnextContext(2).$implicit;
|
|
@@ -3838,10 +4241,10 @@ function GenericFilterComponent_For_2_Case_3_Case_10_Template(rf, ctx) { if (rf
|
|
|
3838
4241
|
} }
|
|
3839
4242
|
function GenericFilterComponent_For_2_Case_3_Case_11_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
3840
4243
|
const _r11 = i0.ɵɵgetCurrentView();
|
|
3841
|
-
i0.ɵɵelementStart(0, "div",
|
|
4244
|
+
i0.ɵɵelementStart(0, "div", 33)(1, "input", 34);
|
|
3842
4245
|
i0.ɵɵlistener("change", function GenericFilterComponent_For_2_Case_3_Case_11_For_2_Template_input_change_1_listener($event) { const item_r12 = i0.ɵɵrestoreView(_r11).$implicit; const field_r1 = i0.ɵɵnextContext(3).$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.toggleSelectAll($event, ctx_r2.form, item_r12, field_r1)); });
|
|
3843
4246
|
i0.ɵɵelementEnd();
|
|
3844
|
-
i0.ɵɵelementStart(2, "label",
|
|
4247
|
+
i0.ɵɵelementStart(2, "label", 35);
|
|
3845
4248
|
i0.ɵɵtext(3);
|
|
3846
4249
|
i0.ɵɵpipe(4, "rpxTranslate");
|
|
3847
4250
|
i0.ɵɵelementEnd()();
|
|
@@ -3860,7 +4263,7 @@ function GenericFilterComponent_For_2_Case_3_Case_11_For_2_Template(rf, ctx) { i
|
|
|
3860
4263
|
} }
|
|
3861
4264
|
function GenericFilterComponent_For_2_Case_3_Case_11_Template(rf, ctx) { if (rf & 1) {
|
|
3862
4265
|
i0.ɵɵelementStart(0, "div", 15);
|
|
3863
|
-
i0.ɵɵrepeaterCreate(1, GenericFilterComponent_For_2_Case_3_Case_11_For_2_Template, 5, 12, "div",
|
|
4266
|
+
i0.ɵɵrepeaterCreate(1, GenericFilterComponent_For_2_Case_3_Case_11_For_2_Template, 5, 12, "div", 33, i0.ɵɵrepeaterTrackByIdentity);
|
|
3864
4267
|
i0.ɵɵelementEnd();
|
|
3865
4268
|
} if (rf & 2) {
|
|
3866
4269
|
const field_r1 = i0.ɵɵnextContext(2).$implicit;
|
|
@@ -3872,10 +4275,10 @@ function GenericFilterComponent_For_2_Case_3_Case_11_Template(rf, ctx) { if (rf
|
|
|
3872
4275
|
} }
|
|
3873
4276
|
function GenericFilterComponent_For_2_Case_3_Case_12_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
3874
4277
|
const _r14 = i0.ɵɵgetCurrentView();
|
|
3875
|
-
i0.ɵɵelementStart(0, "div",
|
|
4278
|
+
i0.ɵɵelementStart(0, "div", 33)(1, "input", 34);
|
|
3876
4279
|
i0.ɵɵlistener("change", function GenericFilterComponent_For_2_Case_3_Case_12_For_2_Template_input_change_1_listener($event) { const item_r15 = i0.ɵɵrestoreView(_r14).$implicit; const field_r1 = i0.ɵɵnextContext(3).$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.toggleSelectAll($event, ctx_r2.form, item_r15, field_r1)); });
|
|
3877
4280
|
i0.ɵɵelementEnd();
|
|
3878
|
-
i0.ɵɵelementStart(2, "label",
|
|
4281
|
+
i0.ɵɵelementStart(2, "label", 35);
|
|
3879
4282
|
i0.ɵɵtext(3);
|
|
3880
4283
|
i0.ɵɵpipe(4, "rpxTranslate");
|
|
3881
4284
|
i0.ɵɵelementEnd()();
|
|
@@ -3894,7 +4297,7 @@ function GenericFilterComponent_For_2_Case_3_Case_12_For_2_Template(rf, ctx) { i
|
|
|
3894
4297
|
} }
|
|
3895
4298
|
function GenericFilterComponent_For_2_Case_3_Case_12_Template(rf, ctx) { if (rf & 1) {
|
|
3896
4299
|
i0.ɵɵelementStart(0, "div", 16);
|
|
3897
|
-
i0.ɵɵrepeaterCreate(1, GenericFilterComponent_For_2_Case_3_Case_12_For_2_Template, 5, 12, "div",
|
|
4300
|
+
i0.ɵɵrepeaterCreate(1, GenericFilterComponent_For_2_Case_3_Case_12_For_2_Template, 5, 12, "div", 33, i0.ɵɵrepeaterTrackByIdentity);
|
|
3898
4301
|
i0.ɵɵelementEnd();
|
|
3899
4302
|
} if (rf & 2) {
|
|
3900
4303
|
const field_r1 = i0.ɵɵnextContext(2).$implicit;
|
|
@@ -3905,10 +4308,10 @@ function GenericFilterComponent_For_2_Case_3_Case_12_Template(rf, ctx) { if (rf
|
|
|
3905
4308
|
} }
|
|
3906
4309
|
function GenericFilterComponent_For_2_Case_3_Case_13_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
3907
4310
|
const _r17 = i0.ɵɵgetCurrentView();
|
|
3908
|
-
i0.ɵɵelementStart(0, "div",
|
|
4311
|
+
i0.ɵɵelementStart(0, "div", 36)(1, "input", 37);
|
|
3909
4312
|
i0.ɵɵlistener("change", function GenericFilterComponent_For_2_Case_3_Case_13_For_2_Template_input_change_1_listener() { i0.ɵɵrestoreView(_r17); const field_r1 = i0.ɵɵnextContext(3).$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.fieldChanged(field_r1, ctx_r2.form)); });
|
|
3910
4313
|
i0.ɵɵelementEnd();
|
|
3911
|
-
i0.ɵɵelementStart(2, "label",
|
|
4314
|
+
i0.ɵɵelementStart(2, "label", 38);
|
|
3912
4315
|
i0.ɵɵtext(3);
|
|
3913
4316
|
i0.ɵɵpipe(4, "rpxTranslate");
|
|
3914
4317
|
i0.ɵɵelementEnd()();
|
|
@@ -3926,7 +4329,7 @@ function GenericFilterComponent_For_2_Case_3_Case_13_For_2_Template(rf, ctx) { i
|
|
|
3926
4329
|
} }
|
|
3927
4330
|
function GenericFilterComponent_For_2_Case_3_Case_13_Template(rf, ctx) { if (rf & 1) {
|
|
3928
4331
|
i0.ɵɵelementStart(0, "div", 17);
|
|
3929
|
-
i0.ɵɵrepeaterCreate(1, GenericFilterComponent_For_2_Case_3_Case_13_For_2_Template, 5, 9, "div",
|
|
4332
|
+
i0.ɵɵrepeaterCreate(1, GenericFilterComponent_For_2_Case_3_Case_13_For_2_Template, 5, 9, "div", 36, i0.ɵɵrepeaterTrackByIdentity);
|
|
3930
4333
|
i0.ɵɵelementEnd();
|
|
3931
4334
|
} if (rf & 2) {
|
|
3932
4335
|
const field_r1 = i0.ɵɵnextContext(2).$implicit;
|
|
@@ -3935,7 +4338,7 @@ function GenericFilterComponent_For_2_Case_3_Case_13_Template(rf, ctx) { if (rf
|
|
|
3935
4338
|
} }
|
|
3936
4339
|
function GenericFilterComponent_For_2_Case_3_Case_14_Template(rf, ctx) { if (rf & 1) {
|
|
3937
4340
|
const _r19 = i0.ɵɵgetCurrentView();
|
|
3938
|
-
i0.ɵɵelementStart(0, "xuilib-find-person",
|
|
4341
|
+
i0.ɵɵelementStart(0, "xuilib-find-person", 39);
|
|
3939
4342
|
i0.ɵɵlistener("personSelected", function GenericFilterComponent_For_2_Case_3_Case_14_Template_xuilib_find_person_personSelected_0_listener($event) { i0.ɵɵrestoreView(_r19); const field_r1 = i0.ɵɵnextContext(2).$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.updatePersonControls($event, field_r1)); })("personFieldChanged", function GenericFilterComponent_For_2_Case_3_Case_14_Template_xuilib_find_person_personFieldChanged_0_listener() { i0.ɵɵrestoreView(_r19); const field_r1 = i0.ɵɵnextContext(2).$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.inputChanged(field_r1)); });
|
|
3940
4343
|
i0.ɵɵelementEnd();
|
|
3941
4344
|
} if (rf & 2) {
|
|
@@ -3948,7 +4351,7 @@ function GenericFilterComponent_For_2_Case_3_Case_14_Template(rf, ctx) { if (rf
|
|
|
3948
4351
|
} }
|
|
3949
4352
|
function GenericFilterComponent_For_2_Case_3_Case_15_Template(rf, ctx) { if (rf & 1) {
|
|
3950
4353
|
const _r20 = i0.ɵɵgetCurrentView();
|
|
3951
|
-
i0.ɵɵelementStart(0, "xuilib-find-location",
|
|
4354
|
+
i0.ɵɵelementStart(0, "xuilib-find-location", 40);
|
|
3952
4355
|
i0.ɵɵlistener("locationFieldChanged", function GenericFilterComponent_For_2_Case_3_Case_15_Template_xuilib_find_location_locationFieldChanged_0_listener() { i0.ɵɵrestoreView(_r20); const field_r1 = i0.ɵɵnextContext(2).$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.inputChanged(field_r1)); });
|
|
3953
4356
|
i0.ɵɵelementEnd();
|
|
3954
4357
|
} if (rf & 2) {
|
|
@@ -3959,7 +4362,7 @@ function GenericFilterComponent_For_2_Case_3_Case_15_Template(rf, ctx) { if (rf
|
|
|
3959
4362
|
} }
|
|
3960
4363
|
function GenericFilterComponent_For_2_Case_3_Case_16_Template(rf, ctx) { if (rf & 1) {
|
|
3961
4364
|
const _r21 = i0.ɵɵgetCurrentView();
|
|
3962
|
-
i0.ɵɵelementStart(0, "xuilib-find-task-name",
|
|
4365
|
+
i0.ɵɵelementStart(0, "xuilib-find-task-name", 41);
|
|
3963
4366
|
i0.ɵɵlistener("taskNameSelected", function GenericFilterComponent_For_2_Case_3_Case_16_Template_xuilib_find_task_name_taskNameSelected_0_listener($event) { i0.ɵɵrestoreView(_r21); const field_r1 = i0.ɵɵnextContext(2).$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.updateTaskNameControls($event, field_r1)); })("taskNameFieldChanged", function GenericFilterComponent_For_2_Case_3_Case_16_Template_xuilib_find_task_name_taskNameFieldChanged_0_listener() { i0.ɵɵrestoreView(_r21); const field_r1 = i0.ɵɵnextContext(2).$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.inputChanged(field_r1)); });
|
|
3964
4367
|
i0.ɵɵelementEnd();
|
|
3965
4368
|
} if (rf & 2) {
|
|
@@ -3971,7 +4374,7 @@ function GenericFilterComponent_For_2_Case_3_Case_16_Template(rf, ctx) { if (rf
|
|
|
3971
4374
|
i0.ɵɵproperty("submitted", ctx_r2.submitted)("disabled", ctx_r2.disabled(field_r1, ctx_r2.form))("domain", (tmp_14_0 = ctx_r2.form.get(field_r1.domainField)) == null ? null : tmp_14_0.value)("findTaskNameGroup", ctx_r2.form)("selectedTaskName", (tmp_16_0 = ctx_r2.form.get(field_r1.name)) == null ? null : tmp_16_0.value == null ? null : tmp_16_0.value.task_type_name)("placeholderContent", field_r1.placeholderContent ? field_r1.placeholderContent : "")("services", (tmp_18_0 = ctx_r2.form.get(field_r1.servicesField)) == null ? null : tmp_18_0.value);
|
|
3972
4375
|
} }
|
|
3973
4376
|
function GenericFilterComponent_For_2_Case_3_Case_17_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
3974
|
-
i0.ɵɵelementStart(0, "span",
|
|
4377
|
+
i0.ɵɵelementStart(0, "span", 42);
|
|
3975
4378
|
i0.ɵɵtext(1);
|
|
3976
4379
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
3977
4380
|
i0.ɵɵelementEnd();
|
|
@@ -3982,8 +4385,8 @@ function GenericFilterComponent_For_2_Case_3_Case_17_Conditional_0_Template(rf,
|
|
|
3982
4385
|
} }
|
|
3983
4386
|
function GenericFilterComponent_For_2_Case_3_Case_17_Template(rf, ctx) { if (rf & 1) {
|
|
3984
4387
|
const _r22 = i0.ɵɵgetCurrentView();
|
|
3985
|
-
i0.ɵɵconditionalCreate(0, GenericFilterComponent_For_2_Case_3_Case_17_Conditional_0_Template, 3, 3, "span",
|
|
3986
|
-
i0.ɵɵelementStart(1, "xuilib-find-service",
|
|
4388
|
+
i0.ɵɵconditionalCreate(0, GenericFilterComponent_For_2_Case_3_Case_17_Conditional_0_Template, 3, 3, "span", 42);
|
|
4389
|
+
i0.ɵɵelementStart(1, "xuilib-find-service", 43);
|
|
3987
4390
|
i0.ɵɵlistener("serviceFieldChanged", function GenericFilterComponent_For_2_Case_3_Case_17_Template_xuilib_find_service_serviceFieldChanged_1_listener() { i0.ɵɵrestoreView(_r22); const field_r1 = i0.ɵɵnextContext(2).$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.inputServiceChanged(field_r1)); });
|
|
3988
4391
|
i0.ɵɵelementEnd();
|
|
3989
4392
|
} if (rf & 2) {
|
|
@@ -3995,20 +4398,31 @@ function GenericFilterComponent_For_2_Case_3_Case_17_Template(rf, ctx) { if (rf
|
|
|
3995
4398
|
} }
|
|
3996
4399
|
function GenericFilterComponent_For_2_Case_3_Case_18_Template(rf, ctx) { if (rf & 1) {
|
|
3997
4400
|
const _r23 = i0.ɵɵgetCurrentView();
|
|
3998
|
-
i0.ɵɵelementStart(0, "
|
|
3999
|
-
i0.ɵɵlistener("
|
|
4401
|
+
i0.ɵɵelementStart(0, "xuilib-find-work-type", 44);
|
|
4402
|
+
i0.ɵɵlistener("workTypeFieldChanged", function GenericFilterComponent_For_2_Case_3_Case_18_Template_xuilib_find_work_type_workTypeFieldChanged_0_listener() { i0.ɵɵrestoreView(_r23); const field_r1 = i0.ɵɵnextContext(2).$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.inputChanged(field_r1)); });
|
|
4000
4403
|
i0.ɵɵelementEnd();
|
|
4001
4404
|
} if (rf & 2) {
|
|
4405
|
+
let tmp_20_0;
|
|
4002
4406
|
const field_r1 = i0.ɵɵnextContext(2).$implicit;
|
|
4003
4407
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
4004
|
-
i0.ɵɵproperty("
|
|
4005
|
-
i0.ɵɵattribute("disabled", ctx_r2.disabled(field_r1, ctx_r2.form))("maxlength", field_r1.maxlength ? field_r1.maxlength : null);
|
|
4408
|
+
i0.ɵɵproperty("form", ctx_r2.form)("fields", ctx_r2.config.fields)("workTypeTitle", field_r1.workTypeTitle)("enableAddWorkTypeButton", field_r1.enableAddButton)("disabled", ctx_r2.disabled(field_r1, ctx_r2.form))("disableInputField", field_r1.disable)("submitted", ctx_r2.submitted)("field", field_r1)("services", (tmp_20_0 = ctx_r2.form.get(field_r1.findWorkTypeField)) == null ? null : tmp_20_0.value)("formSubmissionEvent$", ctx_r2.formSubmissionEvent$);
|
|
4006
4409
|
} }
|
|
4007
4410
|
function GenericFilterComponent_For_2_Case_3_Case_19_Template(rf, ctx) { if (rf & 1) {
|
|
4008
4411
|
const _r24 = i0.ɵɵgetCurrentView();
|
|
4009
|
-
i0.ɵɵelementStart(0, "input",
|
|
4412
|
+
i0.ɵɵelementStart(0, "input", 45);
|
|
4010
4413
|
i0.ɵɵlistener("change", function GenericFilterComponent_For_2_Case_3_Case_19_Template_input_change_0_listener() { i0.ɵɵrestoreView(_r24); const field_r1 = i0.ɵɵnextContext(2).$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.fieldChanged(field_r1, ctx_r2.form)); });
|
|
4011
4414
|
i0.ɵɵelementEnd();
|
|
4415
|
+
} if (rf & 2) {
|
|
4416
|
+
const field_r1 = i0.ɵɵnextContext(2).$implicit;
|
|
4417
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
4418
|
+
i0.ɵɵproperty("formControlName", field_r1.name)("id", field_r1.name)("readonly", field_r1.readonly);
|
|
4419
|
+
i0.ɵɵattribute("disabled", ctx_r2.disabled(field_r1, ctx_r2.form))("maxlength", field_r1.maxlength ? field_r1.maxlength : null);
|
|
4420
|
+
} }
|
|
4421
|
+
function GenericFilterComponent_For_2_Case_3_Case_20_Template(rf, ctx) { if (rf & 1) {
|
|
4422
|
+
const _r25 = i0.ɵɵgetCurrentView();
|
|
4423
|
+
i0.ɵɵelementStart(0, "input", 46);
|
|
4424
|
+
i0.ɵɵlistener("change", function GenericFilterComponent_For_2_Case_3_Case_20_Template_input_change_0_listener() { i0.ɵɵrestoreView(_r25); const field_r1 = i0.ɵɵnextContext(2).$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.fieldChanged(field_r1, ctx_r2.form)); });
|
|
4425
|
+
i0.ɵɵelementEnd();
|
|
4012
4426
|
} if (rf & 2) {
|
|
4013
4427
|
const field_r1 = i0.ɵɵnextContext(2).$implicit;
|
|
4014
4428
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
@@ -4024,7 +4438,7 @@ function GenericFilterComponent_For_2_Case_3_Template(rf, ctx) { if (rf & 1) {
|
|
|
4024
4438
|
i0.ɵɵconditionalCreate(5, GenericFilterComponent_For_2_Case_3_Conditional_5_Template, 6, 7, "span", 13);
|
|
4025
4439
|
i0.ɵɵconditionalCreate(6, GenericFilterComponent_For_2_Case_3_Conditional_6_Template, 6, 7, "span", 13);
|
|
4026
4440
|
i0.ɵɵelementStart(7, "div", 11);
|
|
4027
|
-
i0.ɵɵconditionalCreate(8, GenericFilterComponent_For_2_Case_3_Case_8_Template, 6, 6, "select", 14)(9, GenericFilterComponent_For_2_Case_3_Case_9_Template, 6, 6, "select", 14)(10, GenericFilterComponent_For_2_Case_3_Case_10_Template, 3, 3, "div", 15)(11, GenericFilterComponent_For_2_Case_3_Case_11_Template, 3, 3, "div", 15)(12, GenericFilterComponent_For_2_Case_3_Case_12_Template, 3, 3, "div", 16)(13, GenericFilterComponent_For_2_Case_3_Case_13_Template, 3, 0, "div", 17)(14, GenericFilterComponent_For_2_Case_3_Case_14_Template, 1, 8, "xuilib-find-person", 18)(15, GenericFilterComponent_For_2_Case_3_Case_15_Template, 1, 10, "xuilib-find-location", 19)(16, GenericFilterComponent_For_2_Case_3_Case_16_Template, 1, 7, "xuilib-find-task-name", 20)(17, GenericFilterComponent_For_2_Case_3_Case_17_Template, 2, 5)(18, GenericFilterComponent_For_2_Case_3_Case_18_Template, 1,
|
|
4441
|
+
i0.ɵɵconditionalCreate(8, GenericFilterComponent_For_2_Case_3_Case_8_Template, 6, 6, "select", 14)(9, GenericFilterComponent_For_2_Case_3_Case_9_Template, 6, 6, "select", 14)(10, GenericFilterComponent_For_2_Case_3_Case_10_Template, 3, 3, "div", 15)(11, GenericFilterComponent_For_2_Case_3_Case_11_Template, 3, 3, "div", 15)(12, GenericFilterComponent_For_2_Case_3_Case_12_Template, 3, 3, "div", 16)(13, GenericFilterComponent_For_2_Case_3_Case_13_Template, 3, 0, "div", 17)(14, GenericFilterComponent_For_2_Case_3_Case_14_Template, 1, 8, "xuilib-find-person", 18)(15, GenericFilterComponent_For_2_Case_3_Case_15_Template, 1, 10, "xuilib-find-location", 19)(16, GenericFilterComponent_For_2_Case_3_Case_16_Template, 1, 7, "xuilib-find-task-name", 20)(17, GenericFilterComponent_For_2_Case_3_Case_17_Template, 2, 5)(18, GenericFilterComponent_For_2_Case_3_Case_18_Template, 1, 10, "xuilib-find-work-type", 21)(19, GenericFilterComponent_For_2_Case_3_Case_19_Template, 1, 5, "input", 22)(20, GenericFilterComponent_For_2_Case_3_Case_20_Template, 1, 4, "input", 23);
|
|
4028
4442
|
i0.ɵɵelementEnd()();
|
|
4029
4443
|
} if (rf & 2) {
|
|
4030
4444
|
let tmp_13_0;
|
|
@@ -4050,12 +4464,12 @@ function GenericFilterComponent_For_2_Case_3_Template(rf, ctx) { if (rf & 1) {
|
|
|
4050
4464
|
i0.ɵɵadvance();
|
|
4051
4465
|
i0.ɵɵclassProp("govuk-body--maxWidth480px", field_r1.maxWidth480px);
|
|
4052
4466
|
i0.ɵɵadvance();
|
|
4053
|
-
i0.ɵɵconditional((tmp_21_0 = field_r1.type) === "select" ? 8 : tmp_21_0 === "group-select" ? 9 : tmp_21_0 === "checkbox" ? 10 : tmp_21_0 === "nested-checkbox" ? 11 : tmp_21_0 === "checkbox-large" ? 12 : tmp_21_0 === "radio" ? 13 : tmp_21_0 === "find-person" ? 14 : tmp_21_0 === "find-location" ? 15 : tmp_21_0 === "find-task-name" ? 16 : tmp_21_0 === "find-service" ? 17 : tmp_21_0 === "text-input" ?
|
|
4467
|
+
i0.ɵɵconditional((tmp_21_0 = field_r1.type) === "select" ? 8 : tmp_21_0 === "group-select" ? 9 : tmp_21_0 === "checkbox" ? 10 : tmp_21_0 === "nested-checkbox" ? 11 : tmp_21_0 === "checkbox-large" ? 12 : tmp_21_0 === "radio" ? 13 : tmp_21_0 === "find-person" ? 14 : tmp_21_0 === "find-location" ? 15 : tmp_21_0 === "find-task-name" ? 16 : tmp_21_0 === "find-service" ? 17 : tmp_21_0 === "find-work-type" ? 18 : tmp_21_0 === "text-input" ? 19 : tmp_21_0 === "email-input" ? 20 : -1);
|
|
4054
4468
|
} }
|
|
4055
4469
|
function GenericFilterComponent_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
4056
4470
|
i0.ɵɵelementStart(0, "div", 1);
|
|
4057
4471
|
i0.ɵɵconditionalCreate(1, GenericFilterComponent_For_2_Conditional_1_Template, 1, 0, "hr", 7);
|
|
4058
|
-
i0.ɵɵconditionalCreate(2, GenericFilterComponent_For_2_Case_2_Template, 3, 5, "div", 8)(3, GenericFilterComponent_For_2_Case_3_Template,
|
|
4472
|
+
i0.ɵɵconditionalCreate(2, GenericFilterComponent_For_2_Case_2_Template, 3, 5, "div", 8)(3, GenericFilterComponent_For_2_Case_3_Template, 21, 14, "div", 9);
|
|
4059
4473
|
i0.ɵɵelementEnd();
|
|
4060
4474
|
} if (rf & 2) {
|
|
4061
4475
|
let tmp_11_0;
|
|
@@ -4066,9 +4480,9 @@ function GenericFilterComponent_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
|
4066
4480
|
i0.ɵɵconditional((tmp_11_0 = field_r1.type) === "group-title" ? 2 : 3);
|
|
4067
4481
|
} }
|
|
4068
4482
|
function GenericFilterComponent_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
4069
|
-
const
|
|
4070
|
-
i0.ɵɵelementStart(0, "button",
|
|
4071
|
-
i0.ɵɵlistener("click", function GenericFilterComponent_Conditional_9_Template_button_click_0_listener() { i0.ɵɵrestoreView(
|
|
4483
|
+
const _r26 = i0.ɵɵgetCurrentView();
|
|
4484
|
+
i0.ɵɵelementStart(0, "button", 47);
|
|
4485
|
+
i0.ɵɵlistener("click", function GenericFilterComponent_Conditional_9_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r26); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.cancelFilter()); });
|
|
4072
4486
|
i0.ɵɵtext(1);
|
|
4073
4487
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
4074
4488
|
i0.ɵɵelementEnd();
|
|
@@ -4450,7 +4864,7 @@ class GenericFilterComponent {
|
|
|
4450
4864
|
const formArray = this.buildCheckBoxFormArray(field, settings);
|
|
4451
4865
|
this.form.addControl(field.name, formArray);
|
|
4452
4866
|
}
|
|
4453
|
-
else if (field.type === 'find-location' || field.type === 'find-service') {
|
|
4867
|
+
else if (field.type === 'find-location' || field.type === 'find-service' || (field.type === 'find-work-type' && !reset)) {
|
|
4454
4868
|
const formArray = this.buildFormArray(field, settings);
|
|
4455
4869
|
this.form.addControl(field.name, formArray);
|
|
4456
4870
|
}
|
|
@@ -4495,6 +4909,12 @@ class GenericFilterComponent {
|
|
|
4495
4909
|
this.form.get('findTaskNameControl')?.patchValue('');
|
|
4496
4910
|
}
|
|
4497
4911
|
}
|
|
4912
|
+
else if (field.type === 'find-work-type') {
|
|
4913
|
+
// note: this currently just resets the form array to empty on reset
|
|
4914
|
+
// further work may be needed here if we want to repopulate with previous selections
|
|
4915
|
+
const formArray = this.buildFormArray(field, null);
|
|
4916
|
+
this.form.addControl(field.name, formArray);
|
|
4917
|
+
}
|
|
4498
4918
|
else if (field.type !== 'group-title') {
|
|
4499
4919
|
const control = new FormControl(defaultValue, validators);
|
|
4500
4920
|
this.form.addControl(field.name, control);
|
|
@@ -4541,7 +4961,7 @@ class GenericFilterComponent {
|
|
|
4541
4961
|
const values = formValues[name];
|
|
4542
4962
|
if (Array.isArray(values)) {
|
|
4543
4963
|
const field = config.fields.find((f) => f.name === name);
|
|
4544
|
-
if (field.type === 'find-location' || field.type === 'find-service') {
|
|
4964
|
+
if (field.type === 'find-location' || field.type === 'find-service' || field.type === 'find-work-type') {
|
|
4545
4965
|
return { value: values, name };
|
|
4546
4966
|
}
|
|
4547
4967
|
return { value: getValues(field.options, values), name };
|
|
@@ -4714,7 +5134,7 @@ class GenericFilterComponent {
|
|
|
4714
5134
|
return sortedResults;
|
|
4715
5135
|
}
|
|
4716
5136
|
static { this.ɵfac = function GenericFilterComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || GenericFilterComponent)(i0.ɵɵdirectiveInject(FilterService), i0.ɵɵdirectiveInject(i2$3.FormBuilder), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); }; }
|
|
4717
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: GenericFilterComponent, selectors: [["xuilib-generic-filter"]], inputs: { config: "config", settings: "settings" }, standalone: false, decls: 10, vars: 6, consts: [[3, "ngSubmit", "formGroup"], [1, "contain-classes"], [1, "govuk-section-break", "govuk-section-break--m", "govuk-section-break--visible"], [1, "govuk-grid-row"], [1, "govuk-grid-column-full"], ["type", "submit", "id", "applyFilter", 1, "govuk-button", "govuk-!-margin-right-1", "govuk-!-margin-bottom-0", 3, "disabled"], ["type", "button", "id", "cancelFilter", 1, "govuk-button", "govuk-button--secondary", "govuk-!-margin-bottom-0"], [1, "govuk-section-break", "govuk-section-break--visible", "elevated-break"], [3, "class"], [1, "govuk-form-group", "xui-generic-filter", 3, "hidden", "id", "ngClass"], [1, "xui-generic-filter__field-title"], [1, "govuk-body"], [1, "govuk-hint", 3, "id"], [1, "govuk-error-message", 3, "id"], [1, "govuk-select", 3, "name", "id", "formControlName"], [1, "govuk-checkboxes", "govuk-checkboxes--small", 3, "formGroupName", "id"], [1, "govuk-checkboxes", 3, "formGroupName", "id"], [1, "govuk-radios"], ["subTitle", "", 3, "submitted", "disabled", "domain", "findPersonGroup", "selectedPerson", "userIncluded", "placeholderContent", "services"], [3, "form", "fields", "locationTitle", "enableAddLocationButton", "disabled", "disableInputField", "submitted", "field", "services", "formSubmissionEvent$"], ["subTitle", "", 3, "submitted", "disabled", "domain", "findTaskNameGroup", "selectedTaskName", "placeholderContent", "services"], ["type", "text", 1, "govuk-input", 3, "formControlName", "id", "readonly"], ["type", "email", 1, "govuk-input", 3, "formControlName", "id", "readonly"], [2, "margin-bottom", "0!important"], [1, "govuk-!-margin-left-2"], [1, "govuk-visually-hidden"], [1, "govuk-select", 3, "change", "name", "id", "formControlName"], ["disabled", "", "selected", "", "hidden", "", "value", ""], [3, "value"], [1, "govuk-radios__item", 3, "value"], ["selected", "", 3, "value"], [3, "label"], [1, "govuk-checkboxes__item"], ["type", "checkbox", 1, "govuk-checkboxes__input", 3, "change", "formControlName", "value", "id", "name"], [1, "govuk-label", "govuk-checkboxes__label", 3, "for", "ngClass"], [1, "govuk-radios__item"], ["type", "radio", 1, "govuk-radios__input", 3, "change", "formControlName", "id", "checked", "value"], [1, "govuk-label", "govuk-radios__label", 3, "for"], ["subTitle", "", 3, "personSelected", "personFieldChanged", "submitted", "disabled", "domain", "findPersonGroup", "selectedPerson", "userIncluded", "placeholderContent", "services"], [3, "locationFieldChanged", "form", "fields", "locationTitle", "enableAddLocationButton", "disabled", "disableInputField", "submitted", "field", "services", "formSubmissionEvent$"], ["subTitle", "", 3, "taskNameSelected", "taskNameFieldChanged", "submitted", "disabled", "domain", "findTaskNameGroup", "selectedTaskName", "placeholderContent", "services"], [1, "govuk-error-message"], [3, "serviceFieldChanged", "field", "form", "formSubmissionEvent$", "disabled"], ["type", "text", 1, "govuk-input", 3, "change", "formControlName", "id", "readonly"], ["type", "email", 1, "govuk-input", 3, "change", "formControlName", "id", "readonly"], ["type", "button", "id", "cancelFilter", 1, "govuk-button", "govuk-button--secondary", "govuk-!-margin-bottom-0", 3, "click"]], template: function GenericFilterComponent_Template(rf, ctx) { if (rf & 1) {
|
|
5137
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: GenericFilterComponent, selectors: [["xuilib-generic-filter"]], inputs: { config: "config", settings: "settings" }, standalone: false, decls: 10, vars: 6, consts: [[3, "ngSubmit", "formGroup"], [1, "contain-classes"], [1, "govuk-section-break", "govuk-section-break--m", "govuk-section-break--visible"], [1, "govuk-grid-row"], [1, "govuk-grid-column-full"], ["type", "submit", "id", "applyFilter", 1, "govuk-button", "govuk-!-margin-right-1", "govuk-!-margin-bottom-0", 3, "disabled"], ["type", "button", "id", "cancelFilter", 1, "govuk-button", "govuk-button--secondary", "govuk-!-margin-bottom-0"], [1, "govuk-section-break", "govuk-section-break--visible", "elevated-break"], [3, "class"], [1, "govuk-form-group", "xui-generic-filter", 3, "hidden", "id", "ngClass"], [1, "xui-generic-filter__field-title"], [1, "govuk-body"], [1, "govuk-hint", 3, "id"], [1, "govuk-error-message", 3, "id"], [1, "govuk-select", 3, "name", "id", "formControlName"], [1, "govuk-checkboxes", "govuk-checkboxes--small", 3, "formGroupName", "id"], [1, "govuk-checkboxes", 3, "formGroupName", "id"], [1, "govuk-radios"], ["subTitle", "", 3, "submitted", "disabled", "domain", "findPersonGroup", "selectedPerson", "userIncluded", "placeholderContent", "services"], [3, "form", "fields", "locationTitle", "enableAddLocationButton", "disabled", "disableInputField", "submitted", "field", "services", "formSubmissionEvent$"], ["subTitle", "", 3, "submitted", "disabled", "domain", "findTaskNameGroup", "selectedTaskName", "placeholderContent", "services"], [3, "form", "fields", "workTypeTitle", "enableAddWorkTypeButton", "disabled", "disableInputField", "submitted", "field", "services", "formSubmissionEvent$"], ["type", "text", 1, "govuk-input", 3, "formControlName", "id", "readonly"], ["type", "email", 1, "govuk-input", 3, "formControlName", "id", "readonly"], [2, "margin-bottom", "0!important"], [1, "govuk-!-margin-left-2"], [1, "govuk-visually-hidden"], [1, "govuk-select", 3, "change", "name", "id", "formControlName"], ["disabled", "", "selected", "", "hidden", "", "value", ""], [3, "value"], [1, "govuk-radios__item", 3, "value"], ["selected", "", 3, "value"], [3, "label"], [1, "govuk-checkboxes__item"], ["type", "checkbox", 1, "govuk-checkboxes__input", 3, "change", "formControlName", "value", "id", "name"], [1, "govuk-label", "govuk-checkboxes__label", 3, "for", "ngClass"], [1, "govuk-radios__item"], ["type", "radio", 1, "govuk-radios__input", 3, "change", "formControlName", "id", "checked", "value"], [1, "govuk-label", "govuk-radios__label", 3, "for"], ["subTitle", "", 3, "personSelected", "personFieldChanged", "submitted", "disabled", "domain", "findPersonGroup", "selectedPerson", "userIncluded", "placeholderContent", "services"], [3, "locationFieldChanged", "form", "fields", "locationTitle", "enableAddLocationButton", "disabled", "disableInputField", "submitted", "field", "services", "formSubmissionEvent$"], ["subTitle", "", 3, "taskNameSelected", "taskNameFieldChanged", "submitted", "disabled", "domain", "findTaskNameGroup", "selectedTaskName", "placeholderContent", "services"], [1, "govuk-error-message"], [3, "serviceFieldChanged", "field", "form", "formSubmissionEvent$", "disabled"], [3, "workTypeFieldChanged", "form", "fields", "workTypeTitle", "enableAddWorkTypeButton", "disabled", "disableInputField", "submitted", "field", "services", "formSubmissionEvent$"], ["type", "text", 1, "govuk-input", 3, "change", "formControlName", "id", "readonly"], ["type", "email", 1, "govuk-input", 3, "change", "formControlName", "id", "readonly"], ["type", "button", "id", "cancelFilter", 1, "govuk-button", "govuk-button--secondary", "govuk-!-margin-bottom-0", 3, "click"]], template: function GenericFilterComponent_Template(rf, ctx) { if (rf & 1) {
|
|
4718
5138
|
i0.ɵɵelementStart(0, "form", 0);
|
|
4719
5139
|
i0.ɵɵlistener("ngSubmit", function GenericFilterComponent_Template_form_ngSubmit_0_listener() { return ctx.applyFilter(ctx.form); });
|
|
4720
5140
|
i0.ɵɵrepeaterCreate(1, GenericFilterComponent_For_2_Template, 4, 2, "div", 1, i0.ɵɵrepeaterTrackByIdentity);
|
|
@@ -4735,11 +5155,11 @@ class GenericFilterComponent {
|
|
|
4735
5155
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(8, 4, ctx.config.applyButtonText || "Apply"));
|
|
4736
5156
|
i0.ɵɵadvance(2);
|
|
4737
5157
|
i0.ɵɵconditional(ctx.config.showCancelFilterButton ? 9 : -1);
|
|
4738
|
-
} }, dependencies: [i1.NgClass, i2$3.ɵNgNoValidate, i2$3.NgSelectOption, i2$3.ɵNgSelectMultipleOption, i2$3.DefaultValueAccessor, i2$3.CheckboxControlValueAccessor, i2$3.SelectControlValueAccessor, i2$3.RadioControlValueAccessor, i2$3.NgControlStatus, i2$3.NgControlStatusGroup, i2$3.FormGroupDirective, i2$3.FormControlName, i2$3.FormGroupName, FindPersonComponent, FindLocationComponent, FindTaskNameComponent, FindServiceComponent, i1.TitleCasePipe, i2.RpxTranslatePipe, CapitalizePipe], styles: [".contain-classes .elevated-break{margin-bottom:20px}@media (min-width: 40.0625em){.contain-classes .elevated-break{margin-bottom:30px}}.contain-classes .govuk-body--maxWidth480px{max-width:480px}.contain-classes .xui-generic-filter .select-all{margin-bottom:10px}.contain-classes .xui-generic-filter .govuk-checkboxes{display:flex;flex-direction:column;flex-wrap:wrap}.contain-classes .xui-generic-filter .govuk-checkboxes>div{flex-grow:1;flex-shrink:0}.contain-classes .xui-generic-filter__field-title{display:flex;align-items:center;margin-bottom:10px}.contain-classes .govuk-select{width:100%}\n"], encapsulation: 2, changeDetection: 0 }); }
|
|
5158
|
+
} }, dependencies: [i1.NgClass, i2$3.ɵNgNoValidate, i2$3.NgSelectOption, i2$3.ɵNgSelectMultipleOption, i2$3.DefaultValueAccessor, i2$3.CheckboxControlValueAccessor, i2$3.SelectControlValueAccessor, i2$3.RadioControlValueAccessor, i2$3.NgControlStatus, i2$3.NgControlStatusGroup, i2$3.FormGroupDirective, i2$3.FormControlName, i2$3.FormGroupName, FindPersonComponent, FindLocationComponent, FindTaskNameComponent, FindServiceComponent, FindWorkTypeComponent, i1.TitleCasePipe, i2.RpxTranslatePipe, CapitalizePipe], styles: [".contain-classes .elevated-break{margin-bottom:20px}@media (min-width: 40.0625em){.contain-classes .elevated-break{margin-bottom:30px}}.contain-classes .govuk-body--maxWidth480px{max-width:480px}.contain-classes .xui-generic-filter .select-all{margin-bottom:10px}.contain-classes .xui-generic-filter .govuk-checkboxes{display:flex;flex-direction:column;flex-wrap:wrap}.contain-classes .xui-generic-filter .govuk-checkboxes>div{flex-grow:1;flex-shrink:0}.contain-classes .xui-generic-filter__field-title{display:flex;align-items:center;margin-bottom:10px}.contain-classes .govuk-select{width:100%}\n"], encapsulation: 2, changeDetection: 0 }); }
|
|
4739
5159
|
}
|
|
4740
5160
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(GenericFilterComponent, [{
|
|
4741
5161
|
type: Component,
|
|
4742
|
-
args: [{ selector: 'xuilib-generic-filter', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: false, template: "<form [formGroup]=\"form\" (ngSubmit)=\"applyFilter(form)\">\n @for (field of config.fields; track field) {\n <div class=\"contain-classes\">\n @if (field.lineBreakBefore) {\n <hr class=\"govuk-section-break govuk-section-break--visible elevated-break\">\n }\n @switch (field.type) {\n @case ('group-title') {\n <div [class]=\"field.titleClasses ? field.titleClasses: 'govuk-label govuk-label--m govuk-!-margin-bottom-4'\">\n {{ field.name | capitalize }}\n </div>\n }\n @default {\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?.required || form.get(field.name).errors?.minlength || form.get(field.name).errors?.maxLength)}\">\n @if (field.title) {\n <div class=\"xui-generic-filter__field-title\">\n <h3 [class]=\"field.titleClasses ? field.titleClasses : 'govuk-heading-s'\" style=\"margin-bottom: 0!important\">\n {{field.title | capitalize}}\n </h3>\n @if (field?.titleHint) {\n <div class=\"govuk-!-margin-left-2\">\n {{ field.titleHint }}\n </div>\n }\n </div>\n }\n @if (field.subTitle) {\n <p class=\"govuk-body\">{{field.subTitle}}</p>\n }\n @if (field.hintText) {\n <div\n [id]=\"field.hintText + '-hint'\" class=\"govuk-hint\">\n {{ field.hintText | rpxTranslate }}\n </div>\n }\n @if (field.displayMinSelectedError && submitted && (form.get(field.name).errors?.required || form.get(field.name).errors?.minlength)) {\n <span [id]=\"field.name + '-error'\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate}}</span> {{field.minSelectedError | rpxTranslate }}\n </span>\n }\n @if (field.displayMaxSelectedError && submitted && form.get(field.name).errors?.maxLength) {\n <span [id]=\"field.name + '-error'\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate}}</span> {{field.maxSelectedError | rpxTranslate }}\n </span>\n }\n @if (field.emailError && submitted && form.get(field.name).errors?.email) {\n <span [id]=\"field.name + '-error'\" class=\"govuk-error-message\"\n >\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate }}</span> {{field.emailError | rpxTranslate }}\n </span>\n }\n <div class=\"govuk-body\" [class.govuk-body--maxWidth480px]=\"field.maxWidth480px\">\n @switch (field.type) {\n @case ('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 @if (field.defaultOption) {\n <option [attr.selected]=\"true\" [value]=\"field.defaultOption.key\">{{field.defaultOption.label}}</option>\n }\n @for (item of field.options; track item) {\n <option class=\"govuk-radios__item\" [value]=\"item.key\">{{item.label}}</option>\n }\n </select>\n }\n @case ('group-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 @if (field.defaultOption) {\n <option selected [value]=\"field.defaultOption.key\">{{field.defaultOption.label}}</option>\n }\n @for (grp of filteredSkillsByServices; track grp) {\n <optgroup label=\"{{grp.group | titlecase}}\">\n @for (item of grp.options; track item) {\n <option [value]=\"item.key\">{{item.label}}</option>\n }\n </optgroup>\n }\n </select>\n }\n @case ('checkbox') {\n <div class=\"govuk-checkboxes govuk-checkboxes--small\" [formGroupName]=\"field.name\" [attr.field]=\"field.name\" [id]=\"'checkbox_' + field.name\">\n @for (item of field.options; track item; let i = $index) {\n <div 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_' + field.name + item.key\"\n [name]=\"'checkbox_' + field.name + item.key\"\n />\n <label\n [for]=\"'checkbox_' + field.name + item.key\"\n class=\"govuk-label govuk-checkboxes__label\"\n [ngClass]=\"{'govuk-!-font-weight-bold': item.selectAll}\"\n >{{item.label}}</label>\n </div>\n }\n </div>\n }\n @case ('nested-checkbox') {\n <div class=\"govuk-checkboxes govuk-checkboxes--small\" [formGroupName]=\"field.name\" [attr.field]=\"field.name\" [id]=\"'checkbox_' + field.name\">\n @for (item of filteredSkillsByServicesCheckbox; track item; let i = $index) {\n <div 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_' + field.name + item.key\"\n [name]=\"'checkbox_' + field.name + item.key\"\n />\n <label\n [for]=\"'checkbox_' + field.name + item.key\"\n class=\"govuk-label govuk-checkboxes__label\"\n [ngClass]=\"{'govuk-!-font-weight-bold': item.selectAll}\"\n >{{item.label | rpxTranslate}}</label>\n </div>\n }\n </div>\n }\n @case ('checkbox-large') {\n <div class=\"govuk-checkboxes\" [formGroupName]=\"field.name\" [attr.field]=\"field.name\" [id]=\"'checkbox_' + field.name\">\n @for (item of field.options; track item; let i = $index) {\n <div 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_' + field.name + item.key\"\n [name]=\"'checkbox_' + field.name + item.key\"\n />\n <label\n [for]=\"'checkbox_' + field.name + item.key\"\n class=\"govuk-label govuk-checkboxes__label\"\n [ngClass]=\"{'govuk-!-font-weight-bold': item.selectAll}\"\n >{{item.label | rpxTranslate}}</label>\n </div>\n }\n </div>\n }\n @case ('radio') {\n <div class=\"govuk-radios\">\n @for (item of field.options; track item) {\n <div 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 | rpxTranslate}}</label>\n </div>\n }\n </div>\n }\n @case ('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 [placeholderContent]=\"field.placeholderContent ? field.placeholderContent : ''\"\n [services]=\"form.get(field.servicesField)?.value\"\n ></xuilib-find-person>\n }\n @case ('find-location') {\n <xuilib-find-location (locationFieldChanged)=\"inputChanged(field)\"\n [form]=\"form\"\n [fields]=\"config.fields\"\n [locationTitle]=\"field.locationTitle\"\n [enableAddLocationButton]=\"field.enableAddButton\"\n [disabled]=\"disabled(field, form)\"\n [disableInputField]=\"field.disable\"\n [submitted]=\"submitted\"\n [field]=\"field\"\n [services]=\"form.get(field.findLocationField)?.value\"\n [formSubmissionEvent$]=\"formSubmissionEvent$\"\n ></xuilib-find-location>\n }\n @case ('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?.task_type_name\"\n [placeholderContent]=\"field.placeholderContent ? field.placeholderContent : ''\"\n [services]=\"form.get(field.servicesField)?.value\"\n ></xuilib-find-task-name>\n }\n @case ('find-service') {\n @if (isServiceSelected) {\n <span class=\"govuk-error-message\">{{serviceErrorMsg | rpxTranslate}}</span>\n }\n <xuilib-find-service (serviceFieldChanged)=\"inputServiceChanged(field)\"\n [field]=\"field\"\n [form]=\"form\"\n [formSubmissionEvent$]=\"formSubmissionEvent$\"\n [disabled]=\"disabled(field, form)\">\n </xuilib-find-service>\n }\n @case ('text-input') {\n <input class=\"govuk-input\" type=\"text\"\n [formControlName]=\"field.name\"\n [id]=\"field.name\"\n [attr.disabled]=\"disabled(field, form)\"\n (change)=\"fieldChanged(field, form)\"\n [attr.maxlength]=\"field.maxlength ? field.maxlength : null\"\n [readonly]=\"field.readonly\"\n />\n }\n @case ('email-input') {\n <input class=\"govuk-input\" type=\"email\"\n [formControlName]=\"field.name\"\n [id]=\"field.name\"\n [attr.disabled]=\"disabled(field, form)\"\n (change)=\"fieldChanged(field, form)\"\n [readonly]=\"field.readonly\"\n />\n }\n }\n </div>\n </div>\n }\n }\n </div>\n }\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') | rpxTranslate}}</button>\n @if (config.showCancelFilterButton) {\n <button\n class=\"govuk-button govuk-button--secondary govuk-!-margin-bottom-0\"\n type=\"button\"\n id=\"cancelFilter\"\n (click)=\"cancelFilter()\">{{ (config.cancelButtonText || 'Cancel') | rpxTranslate}}</button>\n }\n </div>\n </div>\n</form>\n", styles: [".contain-classes .elevated-break{margin-bottom:20px}@media (min-width: 40.0625em){.contain-classes .elevated-break{margin-bottom:30px}}.contain-classes .govuk-body--maxWidth480px{max-width:480px}.contain-classes .xui-generic-filter .select-all{margin-bottom:10px}.contain-classes .xui-generic-filter .govuk-checkboxes{display:flex;flex-direction:column;flex-wrap:wrap}.contain-classes .xui-generic-filter .govuk-checkboxes>div{flex-grow:1;flex-shrink:0}.contain-classes .xui-generic-filter__field-title{display:flex;align-items:center;margin-bottom:10px}.contain-classes .govuk-select{width:100%}\n"] }]
|
|
5162
|
+
args: [{ selector: 'xuilib-generic-filter', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: false, template: "<form [formGroup]=\"form\" (ngSubmit)=\"applyFilter(form)\">\n @for (field of config.fields; track field) {\n <div class=\"contain-classes\">\n @if (field.lineBreakBefore) {\n <hr class=\"govuk-section-break govuk-section-break--visible elevated-break\">\n }\n @switch (field.type) {\n @case ('group-title') {\n <div [class]=\"field.titleClasses ? field.titleClasses: 'govuk-label govuk-label--m govuk-!-margin-bottom-4'\">\n {{ field.name | capitalize }}\n </div>\n }\n @default {\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?.required || form.get(field.name).errors?.minlength || form.get(field.name).errors?.maxLength)}\">\n @if (field.title) {\n <div class=\"xui-generic-filter__field-title\">\n <h3 [class]=\"field.titleClasses ? field.titleClasses : 'govuk-heading-s'\" style=\"margin-bottom: 0!important\">\n {{field.title | capitalize}}\n </h3>\n @if (field?.titleHint) {\n <div class=\"govuk-!-margin-left-2\">\n {{ field.titleHint }}\n </div>\n }\n </div>\n }\n @if (field.subTitle) {\n <p class=\"govuk-body\">{{field.subTitle}}</p>\n }\n @if (field.hintText) {\n <div\n [id]=\"field.hintText + '-hint'\" class=\"govuk-hint\">\n {{ field.hintText | rpxTranslate }}\n </div>\n }\n @if (field.displayMinSelectedError && submitted && (form.get(field.name).errors?.required || form.get(field.name).errors?.minlength)) {\n <span [id]=\"field.name + '-error'\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate}}</span> {{field.minSelectedError | rpxTranslate }}\n </span>\n }\n @if (field.displayMaxSelectedError && submitted && form.get(field.name).errors?.maxLength) {\n <span [id]=\"field.name + '-error'\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate}}</span> {{field.maxSelectedError | rpxTranslate }}\n </span>\n }\n @if (field.emailError && submitted && form.get(field.name).errors?.email) {\n <span [id]=\"field.name + '-error'\" class=\"govuk-error-message\"\n >\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate }}</span> {{field.emailError | rpxTranslate }}\n </span>\n }\n <div class=\"govuk-body\" [class.govuk-body--maxWidth480px]=\"field.maxWidth480px\">\n @switch (field.type) {\n @case ('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 @if (field.defaultOption) {\n <option [attr.selected]=\"true\" [value]=\"field.defaultOption.key\">{{field.defaultOption.label}}</option>\n }\n @for (item of field.options; track item) {\n <option class=\"govuk-radios__item\" [value]=\"item.key\">{{item.label}}</option>\n }\n </select>\n }\n @case ('group-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 @if (field.defaultOption) {\n <option selected [value]=\"field.defaultOption.key\">{{field.defaultOption.label}}</option>\n }\n @for (grp of filteredSkillsByServices; track grp) {\n <optgroup label=\"{{grp.group | titlecase}}\">\n @for (item of grp.options; track item) {\n <option [value]=\"item.key\">{{item.label}}</option>\n }\n </optgroup>\n }\n </select>\n }\n @case ('checkbox') {\n <div class=\"govuk-checkboxes govuk-checkboxes--small\" [formGroupName]=\"field.name\" [attr.field]=\"field.name\" [id]=\"'checkbox_' + field.name\">\n @for (item of field.options; track item; let i = $index) {\n <div 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_' + field.name + item.key\"\n [name]=\"'checkbox_' + field.name + item.key\"\n />\n <label\n [for]=\"'checkbox_' + field.name + item.key\"\n class=\"govuk-label govuk-checkboxes__label\"\n [ngClass]=\"{'govuk-!-font-weight-bold': item.selectAll}\"\n >{{item.label}}</label>\n </div>\n }\n </div>\n }\n @case ('nested-checkbox') {\n <div class=\"govuk-checkboxes govuk-checkboxes--small\" [formGroupName]=\"field.name\" [attr.field]=\"field.name\" [id]=\"'checkbox_' + field.name\">\n @for (item of filteredSkillsByServicesCheckbox; track item; let i = $index) {\n <div 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_' + field.name + item.key\"\n [name]=\"'checkbox_' + field.name + item.key\"\n />\n <label\n [for]=\"'checkbox_' + field.name + item.key\"\n class=\"govuk-label govuk-checkboxes__label\"\n [ngClass]=\"{'govuk-!-font-weight-bold': item.selectAll}\"\n >{{item.label | rpxTranslate}}</label>\n </div>\n }\n </div>\n }\n @case ('checkbox-large') {\n <div class=\"govuk-checkboxes\" [formGroupName]=\"field.name\" [attr.field]=\"field.name\" [id]=\"'checkbox_' + field.name\">\n @for (item of field.options; track item; let i = $index) {\n <div 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_' + field.name + item.key\"\n [name]=\"'checkbox_' + field.name + item.key\"\n />\n <label\n [for]=\"'checkbox_' + field.name + item.key\"\n class=\"govuk-label govuk-checkboxes__label\"\n [ngClass]=\"{'govuk-!-font-weight-bold': item.selectAll}\"\n >{{item.label | rpxTranslate}}</label>\n </div>\n }\n </div>\n }\n @case ('radio') {\n <div class=\"govuk-radios\">\n @for (item of field.options; track item) {\n <div 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 | rpxTranslate}}</label>\n </div>\n }\n </div>\n }\n @case ('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 [placeholderContent]=\"field.placeholderContent ? field.placeholderContent : ''\"\n [services]=\"form.get(field.servicesField)?.value\"\n ></xuilib-find-person>\n }\n @case ('find-location') {\n <xuilib-find-location (locationFieldChanged)=\"inputChanged(field)\"\n [form]=\"form\"\n [fields]=\"config.fields\"\n [locationTitle]=\"field.locationTitle\"\n [enableAddLocationButton]=\"field.enableAddButton\"\n [disabled]=\"disabled(field, form)\"\n [disableInputField]=\"field.disable\"\n [submitted]=\"submitted\"\n [field]=\"field\"\n [services]=\"form.get(field.findLocationField)?.value\"\n [formSubmissionEvent$]=\"formSubmissionEvent$\"\n ></xuilib-find-location>\n }\n @case ('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?.task_type_name\"\n [placeholderContent]=\"field.placeholderContent ? field.placeholderContent : ''\"\n [services]=\"form.get(field.servicesField)?.value\"\n ></xuilib-find-task-name>\n }\n @case ('find-service') {\n @if (isServiceSelected) {\n <span class=\"govuk-error-message\">{{serviceErrorMsg | rpxTranslate}}</span>\n }\n <xuilib-find-service (serviceFieldChanged)=\"inputServiceChanged(field)\"\n [field]=\"field\"\n [form]=\"form\"\n [formSubmissionEvent$]=\"formSubmissionEvent$\"\n [disabled]=\"disabled(field, form)\">\n </xuilib-find-service>\n }\n @case ('find-work-type') {\n <xuilib-find-work-type (workTypeFieldChanged)=\"inputChanged(field)\"\n [form]=\"form\"\n [fields]=\"config.fields\"\n [workTypeTitle]=\"field.workTypeTitle\"\n [enableAddWorkTypeButton]=\"field.enableAddButton\"\n [disabled]=\"disabled(field, form)\"\n [disableInputField]=\"field.disable\"\n [submitted]=\"submitted\"\n [field]=\"field\"\n [services]=\"form.get(field.findWorkTypeField)?.value\"\n [formSubmissionEvent$]=\"formSubmissionEvent$\"\n ></xuilib-find-work-type>\n }\n @case ('text-input') {\n <input class=\"govuk-input\" type=\"text\"\n [formControlName]=\"field.name\"\n [id]=\"field.name\"\n [attr.disabled]=\"disabled(field, form)\"\n (change)=\"fieldChanged(field, form)\"\n [attr.maxlength]=\"field.maxlength ? field.maxlength : null\"\n [readonly]=\"field.readonly\"\n />\n }\n @case ('email-input') {\n <input class=\"govuk-input\" type=\"email\"\n [formControlName]=\"field.name\"\n [id]=\"field.name\"\n [attr.disabled]=\"disabled(field, form)\"\n (change)=\"fieldChanged(field, form)\"\n [readonly]=\"field.readonly\"\n />\n }\n }\n </div>\n </div>\n }\n }\n </div>\n }\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') | rpxTranslate}}</button>\n @if (config.showCancelFilterButton) {\n <button\n class=\"govuk-button govuk-button--secondary govuk-!-margin-bottom-0\"\n type=\"button\"\n id=\"cancelFilter\"\n (click)=\"cancelFilter()\">{{ (config.cancelButtonText || 'Cancel') | rpxTranslate}}</button>\n }\n </div>\n </div>\n</form>\n", styles: [".contain-classes .elevated-break{margin-bottom:20px}@media (min-width: 40.0625em){.contain-classes .elevated-break{margin-bottom:30px}}.contain-classes .govuk-body--maxWidth480px{max-width:480px}.contain-classes .xui-generic-filter .select-all{margin-bottom:10px}.contain-classes .xui-generic-filter .govuk-checkboxes{display:flex;flex-direction:column;flex-wrap:wrap}.contain-classes .xui-generic-filter .govuk-checkboxes>div{flex-grow:1;flex-shrink:0}.contain-classes .xui-generic-filter__field-title{display:flex;align-items:center;margin-bottom:10px}.contain-classes .govuk-select{width:100%}\n"] }]
|
|
4743
5163
|
}], () => [{ type: FilterService }, { type: i2$3.FormBuilder }, { type: i0.ChangeDetectorRef }], { config: [{
|
|
4744
5164
|
type: Input
|
|
4745
5165
|
}], settings: [{
|
|
@@ -5657,7 +6077,7 @@ function SelectedCaseComponent_Conditional_18_Template(rf, ctx) { if (rf & 1) {
|
|
|
5657
6077
|
function SelectedCaseComponent_Conditional_19_For_17_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
5658
6078
|
const _r3 = i0.ɵɵgetCurrentView();
|
|
5659
6079
|
i0.ɵɵelementStart(0, "a", 27);
|
|
5660
|
-
i0.ɵɵlistener("click", function SelectedCaseComponent_Conditional_19_For_17_Conditional_8_Template_a_click_0_listener() { i0.ɵɵrestoreView(_r3); const user_r4 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(2);
|
|
6080
|
+
i0.ɵɵlistener("click", function SelectedCaseComponent_Conditional_19_For_17_Conditional_8_Template_a_click_0_listener($event) { i0.ɵɵrestoreView(_r3); const user_r4 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(2); ctx_r1.onRemove(user_r4, ctx_r1.sharedCase); return i0.ɵɵresetView($event.preventDefault()); });
|
|
5661
6081
|
i0.ɵɵtext(1);
|
|
5662
6082
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
5663
6083
|
i0.ɵɵelementStart(3, "span", 28);
|
|
@@ -5674,7 +6094,7 @@ function SelectedCaseComponent_Conditional_19_For_17_Conditional_8_Template(rf,
|
|
|
5674
6094
|
function SelectedCaseComponent_Conditional_19_For_17_Conditional_10_Template(rf, ctx) { if (rf & 1) {
|
|
5675
6095
|
const _r5 = i0.ɵɵgetCurrentView();
|
|
5676
6096
|
i0.ɵɵelementStart(0, "a", 27);
|
|
5677
|
-
i0.ɵɵlistener("click", function SelectedCaseComponent_Conditional_19_For_17_Conditional_10_Template_a_click_0_listener() { i0.ɵɵrestoreView(_r5); const user_r4 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(2);
|
|
6097
|
+
i0.ɵɵlistener("click", function SelectedCaseComponent_Conditional_19_For_17_Conditional_10_Template_a_click_0_listener($event) { i0.ɵɵrestoreView(_r5); const user_r4 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(2); ctx_r1.onCancel(user_r4, ctx_r1.sharedCase); return i0.ɵɵresetView($event.preventDefault()); });
|
|
5678
6098
|
i0.ɵɵtext(1);
|
|
5679
6099
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
5680
6100
|
i0.ɵɵelementStart(3, "span", 28);
|
|
@@ -5925,7 +6345,7 @@ class SelectedCaseComponent {
|
|
|
5925
6345
|
return `${elementName}-${this.sharedCase.caseId}`;
|
|
5926
6346
|
}
|
|
5927
6347
|
static { this.ɵfac = function SelectedCaseComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SelectedCaseComponent)(i0.ɵɵdirectiveInject(CaseSharingStateService)); }; }
|
|
5928
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SelectedCaseComponent, selectors: [["xuilib-selected-case"]], inputs: { sharedCase: "sharedCase", selectedUser: "selectedUser", opened: "opened", removeUserFromCaseToggleOn: "removeUserFromCaseToggleOn", caseCount: "caseCount" }, outputs: { unselect: "unselect", synchronizeStore: "synchronizeStore" }, standalone: false, features: [i0.ɵɵNgOnChangesFeature], decls: 20, vars: 25, consts: [[1, "govuk-accordion__section", 3, "id"], [1, "govuk-grid-row", "govuk-case-header"], [1, "govuk-grid-column-three-quarters"], [1, "govuk-case-title", 3, "id"], [1, "govuk-case-sub-title", 3, "id"], [1, "govuk-grid-column-ten-percent"], ["title", "Deselect case", 1, "govuk-button", "hmcts-button--secondary", 3, "id"], [1, "govuk-accordion__section-header", "govuk-grid-column-ten-percent"], [1, "govuk-accordion__section-heading"], ["type", "button", "aria-expanded", "false", 1, "govuk-accordion__section-button", 3, "id", "title"], ["aria-hidden", "true", 1, "govuk-accordion__icon"], [1, "govuk-accordion__section-content", 3, "id"], [1, "govuk-grid-row"], [1, "govuk-table"], ["title", "Deselect case", 1, "govuk-button", "hmcts-button--secondary", 3, "click", "id"], [1, "govuk-div-align-left", 3, "id"], [1, "govuk-table__head"], [1, "govuk-table__row"], ["scope", "col", 1, "govuk-table__header", "govuk-table-column-header", 3, "id"], ["scope", "col", 1, "govuk-table__header", "govuk-table-column-actions", 3, "id"], ["scope", "col", 1, "govuk-table__header", "govuk-table-column-label", 3, "id"], [1, "govuk-table__body"], [1, "govuk-table__cell", 3, "id"], [1, "govuk-table__cell"], ["href", "
|
|
6348
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SelectedCaseComponent, selectors: [["xuilib-selected-case"]], inputs: { sharedCase: "sharedCase", selectedUser: "selectedUser", opened: "opened", removeUserFromCaseToggleOn: "removeUserFromCaseToggleOn", caseCount: "caseCount" }, outputs: { unselect: "unselect", synchronizeStore: "synchronizeStore" }, standalone: false, features: [i0.ɵɵNgOnChangesFeature], decls: 20, vars: 25, consts: [[1, "govuk-accordion__section", 3, "id"], [1, "govuk-grid-row", "govuk-case-header"], [1, "govuk-grid-column-three-quarters"], [1, "govuk-case-title", 3, "id"], [1, "govuk-case-sub-title", 3, "id"], [1, "govuk-grid-column-ten-percent"], ["title", "Deselect case", 1, "govuk-button", "hmcts-button--secondary", 3, "id"], [1, "govuk-accordion__section-header", "govuk-grid-column-ten-percent"], [1, "govuk-accordion__section-heading"], ["type", "button", "aria-expanded", "false", 1, "govuk-accordion__section-button", 3, "id", "title"], ["aria-hidden", "true", 1, "govuk-accordion__icon"], [1, "govuk-accordion__section-content", 3, "id"], [1, "govuk-grid-row"], [1, "govuk-table"], ["title", "Deselect case", 1, "govuk-button", "hmcts-button--secondary", 3, "click", "id"], [1, "govuk-div-align-left", 3, "id"], [1, "govuk-table__head"], [1, "govuk-table__row"], ["scope", "col", 1, "govuk-table__header", "govuk-table-column-header", 3, "id"], ["scope", "col", 1, "govuk-table__header", "govuk-table-column-actions", 3, "id"], ["scope", "col", 1, "govuk-table__header", "govuk-table-column-label", 3, "id"], [1, "govuk-table__body"], [1, "govuk-table__cell", 3, "id"], [1, "govuk-table__cell"], ["href", "#"], [1, "hmcts-badge", "hmcts-badge--red"], [1, "hmcts-badge"], ["href", "#", 3, "click"], [1, "govuk-visually-hidden"]], template: function SelectedCaseComponent_Template(rf, ctx) { if (rf & 1) {
|
|
5929
6349
|
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "div", 2)(3, "h3", 3);
|
|
5930
6350
|
i0.ɵɵtext(4);
|
|
5931
6351
|
i0.ɵɵpipe(5, "rpxTranslate");
|
|
@@ -5974,7 +6394,7 @@ class SelectedCaseComponent {
|
|
|
5974
6394
|
}
|
|
5975
6395
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SelectedCaseComponent, [{
|
|
5976
6396
|
type: Component,
|
|
5977
|
-
args: [{ selector: 'xuilib-selected-case', standalone: false, template: "<div id=\"{{buildElementId('govuk-accordion__section')}}\" class=\"govuk-accordion__section\">\n <div class=\"govuk-grid-row govuk-case-header\">\n <div class=\"govuk-grid-column-three-quarters\">\n <h3 id=\"{{buildElementId('case-title')}}\" class=\"govuk-case-title\">{{ sharedCase.caseTitle | rpxTranslate }}</h3>\n <h3 id=\"{{buildElementId('case-id')}}\" class=\"govuk-case-sub-title\">{{ sharedCase.caseId | rpxTranslate }}</h3>\n </div>\n <div class=\"govuk-grid-column-ten-percent\">\n @if (caseCount > 1) {\n <button\n id=\"{{buildElementId('btn-deselect-case')}}\"\n class=\"govuk-button hmcts-button--secondary\"\n (click)=\"onDeselect(sharedCase)\" title=\"Deselect case\">\n {{'Deselect case' | rpxTranslate}}\n </button>\n }\n </div>\n <div class=\"govuk-accordion__section-header govuk-grid-column-ten-percent\">\n <div class=\"govuk-accordion__section-heading\">\n <button type=\"button\" id=\"{{buildElementId('accordion-with-summary-sections-heading')}}\"\n [attr.aria-controls]=\"'accordion-with-summary-sections-content' + buildElementId('accordion-with-summary-sections-heading')\" class=\"govuk-accordion__section-button\"\n aria-expanded=\"false\" [title]=\"'Expand or Collapse' | rpxTranslate\">\n <span class=\"govuk-accordion__icon\" aria-hidden=\"true\"></span></button>\n </div>\n </div>\n </div>\n <div id=\"{{buildElementId('accordion-with-summary-sections-content')}}\" class=\"govuk-accordion__section-content\"\n [attr.aria-labelledby]=\"buildElementId('accordion-with-summary-sections-heading')\" >\n @if (showNoUsersAccessInfo()) {\n <div class=\"govuk-grid-row\">\n <span id=\"{{buildElementId('access-info-no-user')}}\" class=\"govuk-div-align-left\">\n {{'No users from your organisation currently have access to this case.' | rpxTranslate}}\n </span>\n </div>\n }\n @if (showUserHasAccessInfo()) {\n <div class=\"govuk-grid-row\">\n <span id=\"{{buildElementId('access-info-has-users')}}\" class=\"govuk-div-align-left\">\n {{'Users from your organisation with access to this case.' | rpxTranslate}}\n </span>\n </div>\n }\n @if (showUserAccessTable()) {\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th id=\"{{buildElementId('name-heading')}}\" class=\"govuk-table__header govuk-table-column-header\" scope=\"col\">{{'Name' | rpxTranslate}}</th>\n <th id=\"{{buildElementId('email-heading')}}\" class=\"govuk-table__header govuk-table-column-header\" scope=\"col\">{{'Email address' | rpxTranslate}}</th>\n <th id=\"{{buildElementId('action-heading')}}\" class=\"govuk-table__header govuk-table-column-actions\" scope=\"col\">{{'Actions' | rpxTranslate}}</th>\n <th id=\"{{buildElementId('label-heading')}}\" class=\"govuk-table__header govuk-table-column-label\" scope=\"col\">{{ 'Status' | rpxTranslate }}</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n @for (user of combinedSortedShares; track trackByUserId(user); let idx = $index) {\n <tr class=\"govuk-table__row\">\n <td id=\"user-full-name-{{ userIdSetter(canCancel(sharedCase.caseId, user) | async, idx) }}\" class=\"govuk-table__cell\">{{ user.firstName + ' ' + user.lastName }}</td>\n <td id=\"user-email-{{ userIdSetter(canCancel(sharedCase.caseId, user) | async, idx) }}\" class=\"govuk-table__cell\">{{ user.email }}</td>\n <td class=\"govuk-table__cell\">\n @if (canRemove(sharedCase.caseId, user) | async) {\n <a (click)=\"onRemove(user, sharedCase)\" href=\"
|
|
6397
|
+
args: [{ selector: 'xuilib-selected-case', standalone: false, template: "<div id=\"{{buildElementId('govuk-accordion__section')}}\" class=\"govuk-accordion__section\">\n <div class=\"govuk-grid-row govuk-case-header\">\n <div class=\"govuk-grid-column-three-quarters\">\n <h3 id=\"{{buildElementId('case-title')}}\" class=\"govuk-case-title\">{{ sharedCase.caseTitle | rpxTranslate }}</h3>\n <h3 id=\"{{buildElementId('case-id')}}\" class=\"govuk-case-sub-title\">{{ sharedCase.caseId | rpxTranslate }}</h3>\n </div>\n <div class=\"govuk-grid-column-ten-percent\">\n @if (caseCount > 1) {\n <button\n id=\"{{buildElementId('btn-deselect-case')}}\"\n class=\"govuk-button hmcts-button--secondary\"\n (click)=\"onDeselect(sharedCase)\" title=\"Deselect case\">\n {{'Deselect case' | rpxTranslate}}\n </button>\n }\n </div>\n <div class=\"govuk-accordion__section-header govuk-grid-column-ten-percent\">\n <div class=\"govuk-accordion__section-heading\">\n <button type=\"button\" id=\"{{buildElementId('accordion-with-summary-sections-heading')}}\"\n [attr.aria-controls]=\"'accordion-with-summary-sections-content' + buildElementId('accordion-with-summary-sections-heading')\" class=\"govuk-accordion__section-button\"\n aria-expanded=\"false\" [title]=\"'Expand or Collapse' | rpxTranslate\">\n <span class=\"govuk-accordion__icon\" aria-hidden=\"true\"></span></button>\n </div>\n </div>\n </div>\n <div id=\"{{buildElementId('accordion-with-summary-sections-content')}}\" class=\"govuk-accordion__section-content\"\n [attr.aria-labelledby]=\"buildElementId('accordion-with-summary-sections-heading')\" >\n @if (showNoUsersAccessInfo()) {\n <div class=\"govuk-grid-row\">\n <span id=\"{{buildElementId('access-info-no-user')}}\" class=\"govuk-div-align-left\">\n {{'No users from your organisation currently have access to this case.' | rpxTranslate}}\n </span>\n </div>\n }\n @if (showUserHasAccessInfo()) {\n <div class=\"govuk-grid-row\">\n <span id=\"{{buildElementId('access-info-has-users')}}\" class=\"govuk-div-align-left\">\n {{'Users from your organisation with access to this case.' | rpxTranslate}}\n </span>\n </div>\n }\n @if (showUserAccessTable()) {\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th id=\"{{buildElementId('name-heading')}}\" class=\"govuk-table__header govuk-table-column-header\" scope=\"col\">{{'Name' | rpxTranslate}}</th>\n <th id=\"{{buildElementId('email-heading')}}\" class=\"govuk-table__header govuk-table-column-header\" scope=\"col\">{{'Email address' | rpxTranslate}}</th>\n <th id=\"{{buildElementId('action-heading')}}\" class=\"govuk-table__header govuk-table-column-actions\" scope=\"col\">{{'Actions' | rpxTranslate}}</th>\n <th id=\"{{buildElementId('label-heading')}}\" class=\"govuk-table__header govuk-table-column-label\" scope=\"col\">{{ 'Status' | rpxTranslate }}</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n @for (user of combinedSortedShares; track trackByUserId(user); let idx = $index) {\n <tr class=\"govuk-table__row\">\n <td id=\"user-full-name-{{ userIdSetter(canCancel(sharedCase.caseId, user) | async, idx) }}\" class=\"govuk-table__cell\">{{ user.firstName + ' ' + user.lastName }}</td>\n <td id=\"user-email-{{ userIdSetter(canCancel(sharedCase.caseId, user) | async, idx) }}\" class=\"govuk-table__cell\">{{ user.email }}</td>\n <td class=\"govuk-table__cell\">\n @if (canRemove(sharedCase.caseId, user) | async) {\n <a (click)=\"onRemove(user, sharedCase); $event.preventDefault()\" href=\"#\">{{'Remove' | rpxTranslate}} <span class=\"govuk-visually-hidden\">{{ user.firstName + ' ' + user.lastName }} {{'from case' | rpxTranslate}}</span></a>\n }\n @if (canCancel(sharedCase.caseId, user) | async) {\n <a (click)=\"onCancel(user, sharedCase); $event.preventDefault()\" href=\"#\">{{'Cancel' | rpxTranslate}} <span class=\"govuk-visually-hidden\">{{'adding' | rpxTranslate}} {{ user.firstName + ' ' + user.lastName }} {{'to case' | rpxTranslate}}</span></a>\n }\n </td>\n <td class=\"govuk-table__cell\">\n @if (isToBeRemoved(sharedCase.caseId, user) | async) {\n <span class=\"hmcts-badge hmcts-badge--red\">{{'To be removed' | rpxTranslate}}</span>\n }\n @if (isToBeAdded(sharedCase.caseId, user) | async) {\n <span class=\"hmcts-badge\">{{'To be added' | rpxTranslate}}</span>\n }\n </td>\n </tr>\n }\n </tbody>\n </table>\n }\n </div>\n </div>\n", styles: [".govuk-case-header{border-top:1px solid #bfc1c3}.govuk-case-title{font-family:nta,Arial,sans-serif;font-size:24px;color:#005ea5;font-weight:700;padding-left:0}.govuk-case-sub-title{font-family:nta,Arial,sans-serif;font-size:1rem!important;color:#6f777b;font-weight:400;padding-left:0}.govuk-grid-row{margin-left:0;margin-right:0}.govuk-grid-column-three-quarters{padding-top:5px;padding-left:0}.govuk-grid-column-twenty-percent{box-sizing:border-box;padding-top:10px;width:20%;float:left}.govuk-grid-column-ten-percent{box-sizing:border-box;padding-top:10px;width:10%;float:left}.govuk-grid-column-five-percent{box-sizing:border-box;padding-top:15px;width:5%;float:left}.govuk-table-column-header{width:38%}.govuk-table-column-actions,.govuk-table-column-label{width:12%}.govuk-div-align-left{font-family:nta,Arial,sans-serif;font-size:1.1875rem!important;line-height:1.31579!important;text-align:left;margin-bottom:20px;padding-left:0;color:#0b0c0c}.govuk-accordion__section-header{border-top:0}.govuk-accordion__section-content{padding-top:0}.govuk-accordion__section-heading,.govuk-accordion__section-button{border-top:0}\n"] }]
|
|
5978
6398
|
}], () => [{ type: CaseSharingStateService }], { sharedCase: [{
|
|
5979
6399
|
type: Input
|
|
5980
6400
|
}], selectedUser: [{
|
|
@@ -7884,7 +8304,7 @@ class CookieBannerComponent {
|
|
|
7884
8304
|
function PaginationComponent_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
7885
8305
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
7886
8306
|
i0.ɵɵelementStart(0, "a", 7);
|
|
7887
|
-
i0.ɵɵlistener("click", function PaginationComponent_Conditional_6_Template_a_click_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(
|
|
8307
|
+
i0.ɵɵlistener("click", function PaginationComponent_Conditional_6_Template_a_click_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); ctx_r1.onPrevious(); return i0.ɵɵresetView($event == null ? null : $event.preventDefault()); });
|
|
7888
8308
|
i0.ɵɵtext(1);
|
|
7889
8309
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
7890
8310
|
i0.ɵɵelementEnd();
|
|
@@ -7904,7 +8324,7 @@ function PaginationComponent_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
|
7904
8324
|
function PaginationComponent_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
7905
8325
|
const _r3 = i0.ɵɵgetCurrentView();
|
|
7906
8326
|
i0.ɵɵelementStart(0, "a", 7);
|
|
7907
|
-
i0.ɵɵlistener("click", function PaginationComponent_Conditional_9_Template_a_click_0_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(
|
|
8327
|
+
i0.ɵɵlistener("click", function PaginationComponent_Conditional_9_Template_a_click_0_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); ctx_r1.onNext(); return i0.ɵɵresetView($event == null ? null : $event.preventDefault()); });
|
|
7908
8328
|
i0.ɵɵtext(1);
|
|
7909
8329
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
7910
8330
|
i0.ɵɵelementEnd();
|
|
@@ -7933,7 +8353,7 @@ class PaginationComponent {
|
|
|
7933
8353
|
this.nextPage.emit(null);
|
|
7934
8354
|
}
|
|
7935
8355
|
static { this.ɵfac = function PaginationComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PaginationComponent)(); }; }
|
|
7936
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PaginationComponent, selectors: [["xuilib-pagination"]], inputs: { moreItems: "moreItems", firstRecord: "firstRecord" }, outputs: { previousPage: "previousPage", nextPage: "nextPage" }, standalone: false, decls: 11, vars: 5, consts: [["id", "pagination-label", 1, "hmcts-pagination"], ["aria-labelledby", "pagination-label", 1, "govuk-visually-hidden"], [1, "hmcts-pagination__list"], [1, "hmcts-pagination__item", "hmcts-pagination__item--prev"], ["href", "
|
|
8356
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PaginationComponent, selectors: [["xuilib-pagination"]], inputs: { moreItems: "moreItems", firstRecord: "firstRecord" }, outputs: { previousPage: "previousPage", nextPage: "nextPage" }, standalone: false, decls: 11, vars: 5, consts: [["id", "pagination-label", 1, "hmcts-pagination"], ["aria-labelledby", "pagination-label", 1, "govuk-visually-hidden"], [1, "hmcts-pagination__list"], [1, "hmcts-pagination__item", "hmcts-pagination__item--prev"], ["href", "#", 1, "hmcts-pagination__link"], [1, "hmcts-pagination__link"], [1, "hmcts-pagination__item", "hmcts-pagination__item--next"], ["href", "#", 1, "hmcts-pagination__link", 3, "click"]], template: function PaginationComponent_Template(rf, ctx) { if (rf & 1) {
|
|
7937
8357
|
i0.ɵɵelementStart(0, "nav", 0)(1, "p", 1);
|
|
7938
8358
|
i0.ɵɵtext(2);
|
|
7939
8359
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
@@ -7955,7 +8375,7 @@ class PaginationComponent {
|
|
|
7955
8375
|
}
|
|
7956
8376
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaginationComponent, [{
|
|
7957
8377
|
type: Component,
|
|
7958
|
-
args: [{ selector: 'xuilib-pagination', standalone: false, template: "<nav class=\"hmcts-pagination\" id=\"pagination-label\">\n\n <p class=\"govuk-visually-hidden\" aria-labelledby=\"pagination-label\">{{'Pagination navigation' | rpxTranslate}}</p>\n\n <ul class=\"hmcts-pagination__list\">\n <li class=\"hmcts-pagination__item hmcts-pagination__item--prev\">\n @if (firstRecord > 1) {\n <a class=\"hmcts-pagination__link\" (click)=\"onPrevious()\" href=\"
|
|
8378
|
+
args: [{ selector: 'xuilib-pagination', standalone: false, template: "<nav class=\"hmcts-pagination\" id=\"pagination-label\">\n\n <p class=\"govuk-visually-hidden\" aria-labelledby=\"pagination-label\">{{'Pagination navigation' | rpxTranslate}}</p>\n\n <ul class=\"hmcts-pagination__list\">\n <li class=\"hmcts-pagination__item hmcts-pagination__item--prev\">\n @if (firstRecord > 1) {\n <a class=\"hmcts-pagination__link\" (click)=\"onPrevious(); $event?.preventDefault()\" href=\"#\">\n {{'Previous page' | rpxTranslate}}\n </a>\n } @else {\n <span class=\"hmcts-pagination__link\">{{'Previous page' | rpxTranslate}}</span>\n }\n </li>\n\n <li class=\"hmcts-pagination__item hmcts-pagination__item--next\">\n @if (moreItems) {\n <a class=\"hmcts-pagination__link\" (click)=\"onNext(); $event?.preventDefault()\" href=\"#\">{{'Next page' | rpxTranslate}}</a>\n } @else {\n <span class=\"hmcts-pagination__link\">{{'Next page' | rpxTranslate}}</span>\n }\n </li>\n </ul>\n</nav>\n", styles: ["span.hmcts-pagination__link:hover{color:revert}\n"] }]
|
|
7959
8379
|
}], () => [], { moreItems: [{
|
|
7960
8380
|
type: Input
|
|
7961
8381
|
}], firstRecord: [{
|
|
@@ -8621,7 +9041,7 @@ function WriteAddressFieldComponent_Conditional_2_Conditional_13_Template(rf, ct
|
|
|
8621
9041
|
function WriteAddressFieldComponent_Conditional_2_Conditional_14_Template(rf, ctx) { if (rf & 1) {
|
|
8622
9042
|
const _r5 = i0.ɵɵgetCurrentView();
|
|
8623
9043
|
i0.ɵɵelementStart(0, "a", 19);
|
|
8624
|
-
i0.ɵɵlistener("click", function WriteAddressFieldComponent_Conditional_2_Conditional_14_Template_a_click_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(
|
|
9044
|
+
i0.ɵɵlistener("click", function WriteAddressFieldComponent_Conditional_2_Conditional_14_Template_a_click_0_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r0 = i0.ɵɵnextContext(2); ctx_r0.blankAddress(); return i0.ɵɵresetView($event.preventDefault()); });
|
|
8625
9045
|
i0.ɵɵtext(1, "I can't enter a UK postcode");
|
|
8626
9046
|
i0.ɵɵelementEnd();
|
|
8627
9047
|
} }
|
|
@@ -8843,7 +9263,7 @@ class WriteAddressFieldComponent {
|
|
|
8843
9263
|
this.addressFormGroup.get('postcode').patchValue(postcodeNeeded ? this.formGroup.get('address').get('postCode').value : '');
|
|
8844
9264
|
}
|
|
8845
9265
|
static { this.ɵfac = function WriteAddressFieldComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || WriteAddressFieldComponent)(i0.ɵɵdirectiveInject(AddressService)); }; }
|
|
8846
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteAddressFieldComponent, selectors: [["xuilib-write-address-field"]], inputs: { formGroup: "formGroup", internationalMode: "internationalMode", isInternational: "isInternational", submissionAttempted: "submissionAttempted", startedInternational: "startedInternational", addressChosen: "addressChosen" }, outputs: { postcodeOptionSelected: "postcodeOptionSelected", internationalModeStart: "internationalModeStart", ukAddressOptionSelected: "ukAddressOptionSelected", canSelectAddress: "canSelectAddress", resetSubmission: "resetSubmission" }, standalone: false, features: [i0.ɵɵNgOnChangesFeature], decls: 5, vars: 8, consts: [[1, "govuk-form-group", 3, "formGroup", "ngClass"], [1, "govuk-error-message"], ["id", "govuk-radios", "data-module", "govuk-radios", 1, "govuk-radios"], [3, "formGroup", "isInternational", "submissionAttempted"], [1, "govuk-visually-hidden"], [1, "govuk-label"], ["id", "addressLookup", 1, "govuk-body", "postcode-lookup", 3, "ngClass"], ["for", "postcodeInput"], [1, "govuk-hint"], [1, "govuk-body"], ["type", "text", "id", "postcodeInput", "name", "postcode", "formControlName", "postcode", 1, "govuk-input", "govuk-!-width-one-third", "postcodeinput", "inline-block", 3, "ngClass"], ["type", "button", 1, "govuk-button", "find-address", 3, "click"], ["id", "selectAddress", 1, "govuk-body"], ["href", "
|
|
9266
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteAddressFieldComponent, selectors: [["xuilib-write-address-field"]], inputs: { formGroup: "formGroup", internationalMode: "internationalMode", isInternational: "isInternational", submissionAttempted: "submissionAttempted", startedInternational: "startedInternational", addressChosen: "addressChosen" }, outputs: { postcodeOptionSelected: "postcodeOptionSelected", internationalModeStart: "internationalModeStart", ukAddressOptionSelected: "ukAddressOptionSelected", canSelectAddress: "canSelectAddress", resetSubmission: "resetSubmission" }, standalone: false, features: [i0.ɵɵNgOnChangesFeature], decls: 5, vars: 8, consts: [[1, "govuk-form-group", 3, "formGroup", "ngClass"], [1, "govuk-error-message"], ["id", "govuk-radios", "data-module", "govuk-radios", 1, "govuk-radios"], [3, "formGroup", "isInternational", "submissionAttempted"], [1, "govuk-visually-hidden"], [1, "govuk-label"], ["id", "addressLookup", 1, "govuk-body", "postcode-lookup", 3, "ngClass"], ["for", "postcodeInput"], [1, "govuk-hint"], [1, "govuk-body"], ["type", "text", "id", "postcodeInput", "name", "postcode", "formControlName", "postcode", 1, "govuk-input", "govuk-!-width-one-third", "postcodeinput", "inline-block", 3, "ngClass"], ["type", "button", 1, "govuk-button", "find-address", 3, "click"], ["id", "selectAddress", 1, "govuk-body"], ["href", "#", 1, "manual-link", "govuk-link"], [1, "govuk-body", 3, "ngClass"], ["for", "addressList", 1, "govuk-label"], [1, "form-label"], ["id", "addressList", "name", "address", "formControlName", "addressList", "focusElement", "", 1, "form-control", "govuk-select", "ccd-dropdown", "addressList", 3, "change"], [3, "ngValue"], ["href", "#", 1, "manual-link", "govuk-link", 3, "click"], [1, "govuk-radios__item"], ["id", "yes", "value", "yes", "name", "ukAddress", "type", "radio", "data-aria-controls", "address-fields", "formControlName", "ukAddress", 1, "govuk-radios__input", 3, "click"], ["for", "yes", 1, "govuk-label", "govuk-radios__label"], ["id", "no", "value", "no", "name", "ukAddress", "type", "radio", "data-aria-controls", "address-fields", "formControlName", "ukAddress", 1, "govuk-radios__input", 3, "click"], ["for", "no", 1, "govuk-label", "govuk-radios__label"], ["id", "address-fields", 1, "govuk-radios__conditional"]], template: function WriteAddressFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
8847
9267
|
i0.ɵɵelementStart(0, "div", 0);
|
|
8848
9268
|
i0.ɵɵconditionalCreate(1, WriteAddressFieldComponent_Conditional_1_Template, 4, 1, "p", 1);
|
|
8849
9269
|
i0.ɵɵconditionalCreate(2, WriteAddressFieldComponent_Conditional_2_Template, 15, 9, "div");
|
|
@@ -8864,7 +9284,7 @@ class WriteAddressFieldComponent {
|
|
|
8864
9284
|
}
|
|
8865
9285
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteAddressFieldComponent, [{
|
|
8866
9286
|
type: Component,
|
|
8867
|
-
args: [{ selector: 'xuilib-write-address-field', standalone: false, template: "<div class=\"govuk-form-group\" [formGroup]=\"addressFormGroup\"\n [ngClass]=\"{'govuk-form-group--error': optionErrorsPresent}\">\n @if (optionErrorsPresent) {\n <p class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span>{{optionErrorMessage}}\n </p>\n }\n @if (postcodeLookupVisible()) {\n <div>\n <span class=\"govuk-label\"><strong>Provide address details</strong></span>\n <div class=\"govuk-body postcode-lookup\" id=\"addressLookup\"\n [ngClass]=\"{'govuk-form-group--error': missingPostcode || postcodeErrorPresent(true)}\">\n <label for=\"postcodeInput\">\n <span class=\"govuk-hint\">Enter a UK postcode</span>\n </label>\n @if (missingPostcode || postcodeErrorPresent(true)) {\n <p class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span>{{postcodeErrorMessage}}\n </p>\n }\n <div class=\"govuk-body\">\n <input type=\"text\" [ngClass]=\"{'govuk-input--error': missingPostcode}\" id=\"postcodeInput\" name=\"postcode\"\n class=\"govuk-input govuk-!-width-one-third postcodeinput inline-block\" formControlName=\"postcode\">\n <button type=\"button\" class=\"govuk-button find-address\" (click)=\"findAddress()\">Find address</button>\n </div>\n </div>\n @if (addressOptions) {\n <div class=\"govuk-body\" id=\"selectAddress\">\n <div class=\"govuk-body\" [ngClass]=\"{'govuk-form-group--error': postcodeErrorPresent(false)}\">\n <label class=\"govuk-label\" for=\"addressList\">\n <span class=\"form-label\">Select an address</span>\n </label>\n @if (postcodeErrorPresent(false)) {\n <p class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span>{{selectErrorMessage}}\n </p>\n }\n <select class=\"form-control govuk-select ccd-dropdown addressList\" id=\"addressList\" name=\"address\"\n formControlName=\"addressList\" (change)=\"addressSelected()\" focusElement>\n @for (addressOption of addressOptions; track addressOption) {\n <option [ngValue]=\"addressOption.value\">\n {{addressOption.description}}\n </option>\n }\n </select>\n </div>\n </div>\n }\n @if (!shouldShowDetailFields() || (!startedInternational && !addressChosen)) {\n <a class=\"manual-link govuk-link\"\n (click)=\"blankAddress()\" href=\"
|
|
9287
|
+
args: [{ selector: 'xuilib-write-address-field', standalone: false, template: "<div class=\"govuk-form-group\" [formGroup]=\"addressFormGroup\"\n [ngClass]=\"{'govuk-form-group--error': optionErrorsPresent}\">\n @if (optionErrorsPresent) {\n <p class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span>{{optionErrorMessage}}\n </p>\n }\n @if (postcodeLookupVisible()) {\n <div>\n <span class=\"govuk-label\"><strong>Provide address details</strong></span>\n <div class=\"govuk-body postcode-lookup\" id=\"addressLookup\"\n [ngClass]=\"{'govuk-form-group--error': missingPostcode || postcodeErrorPresent(true)}\">\n <label for=\"postcodeInput\">\n <span class=\"govuk-hint\">Enter a UK postcode</span>\n </label>\n @if (missingPostcode || postcodeErrorPresent(true)) {\n <p class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span>{{postcodeErrorMessage}}\n </p>\n }\n <div class=\"govuk-body\">\n <input type=\"text\" [ngClass]=\"{'govuk-input--error': missingPostcode}\" id=\"postcodeInput\" name=\"postcode\"\n class=\"govuk-input govuk-!-width-one-third postcodeinput inline-block\" formControlName=\"postcode\">\n <button type=\"button\" class=\"govuk-button find-address\" (click)=\"findAddress()\">Find address</button>\n </div>\n </div>\n @if (addressOptions) {\n <div class=\"govuk-body\" id=\"selectAddress\">\n <div class=\"govuk-body\" [ngClass]=\"{'govuk-form-group--error': postcodeErrorPresent(false)}\">\n <label class=\"govuk-label\" for=\"addressList\">\n <span class=\"form-label\">Select an address</span>\n </label>\n @if (postcodeErrorPresent(false)) {\n <p class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span>{{selectErrorMessage}}\n </p>\n }\n <select class=\"form-control govuk-select ccd-dropdown addressList\" id=\"addressList\" name=\"address\"\n formControlName=\"addressList\" (change)=\"addressSelected()\" focusElement>\n @for (addressOption of addressOptions; track addressOption) {\n <option [ngValue]=\"addressOption.value\">\n {{addressOption.description}}\n </option>\n }\n </select>\n </div>\n </div>\n }\n @if (!shouldShowDetailFields() || (!startedInternational && !addressChosen)) {\n <a class=\"manual-link govuk-link\"\n (click)=\"blankAddress(); $event.preventDefault()\" href=\"#\">I can't enter a UK postcode</a>\n }\n </div>\n }\n\n @if (shouldShowDetailFields() && internationalMode && startedInternational && !addressChosen) {\n <div id=\"govuk-radios\" class=\"govuk-radios\" data-module=\"govuk-radios\"\n >\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"yes\" value=\"yes\" name=\"ukAddress\" type=\"radio\"\n data-aria-controls=\"address-fields\" (click)=\"setInternationalAddress(false)\" formControlName=\"ukAddress\">\n <label class=\"govuk-label govuk-radios__label\" for=\"yes\">\n Yes\n </label>\n </div>\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"no\" value=\"no\" name=\"ukAddress\" type=\"radio\"\n data-aria-controls=\"address-fields\" (click)=\"setInternationalAddress(true)\" formControlName=\"ukAddress\">\n <label class=\"govuk-label govuk-radios__label\" for=\"no\">\n No\n </label>\n </div>\n <div class=\"govuk-radios__conditional\" id=\"address-fields\">\n @if (isInternational !== undefined) {\n <xuilib-write-address-inputs [formGroup]=\"formGroup\"\n [isInternational]=\"isInternational\" [submissionAttempted]=\"submissionAttempted\">\n </xuilib-write-address-inputs>\n }\n </div>\n </div>\n }\n\n @if (shouldShowDetailFields() && (addressChosen || !internationalMode)) {\n <xuilib-write-address-inputs\n [formGroup]=\"formGroup\" [isInternational]=\"false\" [submissionAttempted]=\"submissionAttempted\">\n </xuilib-write-address-inputs>\n }\n\n</div>", styles: [".manual-link{cursor:pointer;display:block;text-decoration:underline;font-size:1.1875rem}.postcode-lookup{margin-bottom:-20px}.find-address{left:1%}:host{display:block}\n"] }]
|
|
8868
9288
|
}], () => [{ type: AddressService }], { formGroup: [{
|
|
8869
9289
|
type: Input
|
|
8870
9290
|
}], internationalMode: [{
|
|
@@ -10024,6 +10444,8 @@ const COMMON_COMPONENTS = [
|
|
|
10024
10444
|
SearchLocationComponent,
|
|
10025
10445
|
FindServiceComponent,
|
|
10026
10446
|
SearchServiceComponent,
|
|
10447
|
+
FindWorkTypeComponent,
|
|
10448
|
+
SearchWorkTypeComponent,
|
|
10027
10449
|
SearchVenueComponent,
|
|
10028
10450
|
PaginationComponent,
|
|
10029
10451
|
WriteAddressFieldComponent,
|
|
@@ -10136,6 +10558,8 @@ class ExuiCommonLibModule {
|
|
|
10136
10558
|
SearchLocationComponent,
|
|
10137
10559
|
FindServiceComponent,
|
|
10138
10560
|
SearchServiceComponent,
|
|
10561
|
+
FindWorkTypeComponent,
|
|
10562
|
+
SearchWorkTypeComponent,
|
|
10139
10563
|
SearchVenueComponent,
|
|
10140
10564
|
PaginationComponent,
|
|
10141
10565
|
WriteAddressFieldComponent,
|
|
@@ -10200,6 +10624,8 @@ class ExuiCommonLibModule {
|
|
|
10200
10624
|
SearchLocationComponent,
|
|
10201
10625
|
FindServiceComponent,
|
|
10202
10626
|
SearchServiceComponent,
|
|
10627
|
+
FindWorkTypeComponent,
|
|
10628
|
+
SearchWorkTypeComponent,
|
|
10203
10629
|
SearchVenueComponent,
|
|
10204
10630
|
PaginationComponent,
|
|
10205
10631
|
WriteAddressFieldComponent,
|
|
@@ -10306,5 +10732,5 @@ function radioGroupValidator() {
|
|
|
10306
10732
|
* Generated bundle index. Do not edit.
|
|
10307
10733
|
*/
|
|
10308
10734
|
|
|
10309
|
-
export { AccessibilityComponent, AddressMessageEnum, AddressModel, AddressOption, AddressService, AnonymousFeatureUser, BadgeColour, BookingCheckType, COMMON_COMPONENTS, CapitalizePipe, CheckboxListComponent, ContactDetailsComponent, CookieBannerComponent, CookieService, DateBadgeColour, DueDateComponent, ExuiCommonLibModule, ExuiPageWrapperComponent, FeatureToggleDirective, FeatureToggleGuard, FeatureToggleService, FilterService, FindLocationComponent, FindPersonComponent, FindServiceComponent, FindTaskNameComponent, GOV_UI_COMPONENTS, GenericFilterComponent, GoogleAnalyticsService, GoogleTagManagerService, GovUiService, GovUkCheckboxComponent, GovUkCheckboxesComponent, GovUkDateComponent, GovUkErrorMessageComponent, GovUkFieldsetComponent, GovUkFileUploadComponent, GovUkFormGroupWrapperComponent, GovUkInputComponent, GovUkLabelComponent, GovUkRadioComponent, GovUkRadiosComponent, GovUkSelectComponent, GovUkTextareaComponent, GovukTableColumnConfig, GovukTableComponent, HasLoadingState, HmctsBannerComponent, HmctsErrorSummaryComponent, HmctsIdentityBarComponent, HmctsMainWrapperComponent, HmctsPaginationComponent, HmctsPrimaryNavigationComponent, HmctsSessionDialogComponent, HmctsSubNavigationComponent, InviteUserFormComponent, InviteUserPermissionComponent, LaunchDarklyService, LetContext, LetDirective, LoadingService, LoadingSpinnerComponent, LoggedInFeatureUser, ManageSessionServices, PaginationComponent, PersonRole, RadioFilterFieldConfig, RefDataService, RemoveHostDirective, RoleCategory, RoleGuard, RoleMatching, RoleService, SECONDS_IN_A_DAY, SearchJudicialsComponent, SearchLocationComponent, SearchServiceComponent, SearchVenueComponent, SelectedCaseComponent, SelectedCaseConfirmComponent, SelectedCaseListComponent, ServiceMessageComponent, ServiceMessagesComponent, ShareCaseComponent, ShareCaseConfirmComponent, SharedCaseErrorMessages, TabComponent, TcConfirmComponent, TcDisplayHtmlComponent, TcDisplayPlainComponent, TermsAndConditionsComponent, TimeoutNotificationsService, UserDetailsComponent, UserListComponent, UserSelectComponent, WriteAddressFieldComponent, WriteAddressInputsComponent, checkboxesBeCheckedValidator, dateValidator, radioGroupValidator, windowProvider, windowToken };
|
|
10735
|
+
export { AccessibilityComponent, AddressMessageEnum, AddressModel, AddressOption, AddressService, AnonymousFeatureUser, BadgeColour, BookingCheckType, COMMON_COMPONENTS, CapitalizePipe, CheckboxListComponent, ContactDetailsComponent, CookieBannerComponent, CookieService, DateBadgeColour, DueDateComponent, ExuiCommonLibModule, ExuiPageWrapperComponent, FeatureToggleDirective, FeatureToggleGuard, FeatureToggleService, FilterService, FindLocationComponent, FindPersonComponent, FindServiceComponent, FindTaskNameComponent, FindWorkTypeComponent, GOV_UI_COMPONENTS, GenericFilterComponent, GoogleAnalyticsService, GoogleTagManagerService, GovUiService, GovUkCheckboxComponent, GovUkCheckboxesComponent, GovUkDateComponent, GovUkErrorMessageComponent, GovUkFieldsetComponent, GovUkFileUploadComponent, GovUkFormGroupWrapperComponent, GovUkInputComponent, GovUkLabelComponent, GovUkRadioComponent, GovUkRadiosComponent, GovUkSelectComponent, GovUkTextareaComponent, GovukTableColumnConfig, GovukTableComponent, HasLoadingState, HmctsBannerComponent, HmctsErrorSummaryComponent, HmctsIdentityBarComponent, HmctsMainWrapperComponent, HmctsPaginationComponent, HmctsPrimaryNavigationComponent, HmctsSessionDialogComponent, HmctsSubNavigationComponent, InviteUserFormComponent, InviteUserPermissionComponent, LaunchDarklyService, LetContext, LetDirective, LoadingService, LoadingSpinnerComponent, LocationService, LoggedInFeatureUser, ManageSessionServices, PaginationComponent, PersonRole, RadioFilterFieldConfig, RefDataService, RemoveHostDirective, RoleCategory, RoleGuard, RoleMatching, RoleService, SECONDS_IN_A_DAY, SearchJudicialsComponent, SearchLocationComponent, SearchServiceComponent, SearchVenueComponent, SearchWorkTypeComponent, SelectedCaseComponent, SelectedCaseConfirmComponent, SelectedCaseListComponent, ServiceMessageComponent, ServiceMessagesComponent, ShareCaseComponent, ShareCaseConfirmComponent, SharedCaseErrorMessages, TabComponent, TaskService, TcConfirmComponent, TcDisplayHtmlComponent, TcDisplayPlainComponent, TermsAndConditionsComponent, TimeoutNotificationsService, UserDetailsComponent, UserListComponent, UserSelectComponent, WriteAddressFieldComponent, WriteAddressInputsComponent, checkboxesBeCheckedValidator, dateValidator, radioGroupValidator, windowProvider, windowToken };
|
|
10310
10736
|
//# sourceMappingURL=hmcts-rpx-xui-common-lib.mjs.map
|