@hmcts/rpx-xui-common-lib 1.6.1-adding-location-filter-bugfix → 1.6.1-all-work-filter
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/hmcts-rpx-xui-common-lib.umd.js +607 -426
- package/bundles/hmcts-rpx-xui-common-lib.umd.js.map +1 -1
- package/bundles/hmcts-rpx-xui-common-lib.umd.min.js +1 -1
- package/bundles/hmcts-rpx-xui-common-lib.umd.min.js.map +1 -1
- package/esm2015/lib/components/find-location/find-location.component.js +98 -44
- package/esm2015/lib/components/find-person/find-person.component.js +59 -24
- package/esm2015/lib/components/generic-filter/generic-filter-utils.js +2 -2
- package/esm2015/lib/components/generic-filter/generic-filter.component.js +49 -42
- package/esm2015/lib/components/search-location/search-location.component.js +53 -67
- package/esm2015/lib/exui-common-lib.module.js +4 -3
- package/esm2015/lib/gov-ui/models/isession-storage.interface.js +24 -0
- package/esm2015/lib/gov-ui/util/session-storage/session-storage-utils.js +58 -0
- package/esm2015/lib/models/filter.model.js +9 -1
- package/esm2015/lib/models/person.model.js +11 -1
- package/esm2015/lib/models/search-options.model.js +4 -2
- package/esm2015/lib/services/find-person/find-person.service.js +77 -24
- package/esm5/lib/components/find-location/find-location.component.js +122 -64
- package/esm5/lib/components/find-person/find-person.component.js +59 -25
- package/esm5/lib/components/generic-filter/generic-filter-utils.js +2 -2
- package/esm5/lib/components/generic-filter/generic-filter.component.js +98 -71
- package/esm5/lib/components/search-location/search-location.component.js +59 -75
- package/esm5/lib/exui-common-lib.module.js +4 -3
- package/esm5/lib/gov-ui/models/isession-storage.interface.js +24 -0
- package/esm5/lib/gov-ui/util/session-storage/session-storage-utils.js +58 -0
- package/esm5/lib/models/filter.model.js +9 -1
- package/esm5/lib/models/person.model.js +11 -1
- package/esm5/lib/models/search-options.model.js +4 -2
- package/esm5/lib/services/find-person/find-person.service.js +83 -24
- package/fesm2015/hmcts-rpx-xui-common-lib.js +425 -268
- package/fesm2015/hmcts-rpx-xui-common-lib.js.map +1 -1
- package/fesm5/hmcts-rpx-xui-common-lib.js +532 -348
- package/fesm5/hmcts-rpx-xui-common-lib.js.map +1 -1
- package/hmcts-rpx-xui-common-lib.metadata.json +1 -1
- package/lib/components/find-location/find-location.component.d.ts +11 -6
- package/lib/components/find-person/find-person.component.d.ts +10 -8
- package/lib/components/generic-filter/generic-filter-utils.d.ts +2 -2
- package/lib/components/generic-filter/generic-filter.component.d.ts +2 -3
- package/lib/components/search-location/search-location.component.d.ts +9 -9
- package/lib/gov-ui/models/isession-storage.interface.d.ts +4 -0
- package/lib/gov-ui/util/session-storage/session-storage-utils.d.ts +6 -0
- package/lib/models/filter.model.d.ts +4 -0
- package/lib/models/person.model.d.ts +4 -0
- package/lib/models/search-options.model.d.ts +2 -1
- package/lib/services/find-person/find-person.service.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,21 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { FormArray, FormGroup } from '@angular/forms';
|
|
1
|
+
import { FormGroup } from '@angular/forms';
|
|
3
2
|
import { FilterFieldConfig } from '../../models';
|
|
4
3
|
import { LocationByEPIMSModel } from '../../models/location.model';
|
|
5
|
-
|
|
4
|
+
import { SearchLocationComponent } from '../search-location/search-location.component';
|
|
5
|
+
export declare class FindLocationComponent {
|
|
6
6
|
selectedLocations: LocationByEPIMSModel[];
|
|
7
7
|
submitted: boolean;
|
|
8
|
+
enableAddLocationButton: boolean;
|
|
8
9
|
form: FormGroup;
|
|
9
10
|
field: FilterFieldConfig;
|
|
10
11
|
fields: FilterFieldConfig[];
|
|
12
|
+
title: string;
|
|
11
13
|
locations: LocationByEPIMSModel[];
|
|
12
|
-
|
|
14
|
+
tempSelectedLocation: LocationByEPIMSModel;
|
|
13
15
|
serviceIds: string;
|
|
16
|
+
searchLocationComponent: SearchLocationComponent;
|
|
14
17
|
private pServices;
|
|
18
|
+
private pDisabled;
|
|
19
|
+
disabled: boolean;
|
|
15
20
|
services: string[];
|
|
16
|
-
private static initForm;
|
|
17
|
-
ngOnInit(): void;
|
|
18
21
|
addLocation(): void;
|
|
19
22
|
removeLocation(location: LocationByEPIMSModel): void;
|
|
20
23
|
onLocationSelected(location: LocationByEPIMSModel): void;
|
|
24
|
+
private removeSelectedValues;
|
|
25
|
+
private addSelectedLocationsToForm;
|
|
21
26
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
1
|
+
import { ChangeDetectorRef, EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { FormControl, FormGroup } from '@angular/forms';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import { Person, PersonRole } from '../../models';
|
|
5
5
|
import { FindAPersonService } from '../../services/find-person/find-person.service';
|
|
6
6
|
export declare class FindPersonComponent implements OnInit, OnChanges {
|
|
7
7
|
private readonly findPersonService;
|
|
8
|
+
private readonly cd;
|
|
8
9
|
personSelected: EventEmitter<Person>;
|
|
9
10
|
title: string;
|
|
10
11
|
boldTitle: string;
|
|
@@ -12,8 +13,8 @@ export declare class FindPersonComponent implements OnInit, OnChanges {
|
|
|
12
13
|
domain: PersonRole;
|
|
13
14
|
findPersonGroup: FormGroup;
|
|
14
15
|
selectedPerson: string;
|
|
15
|
-
submitted
|
|
16
|
-
disabled
|
|
16
|
+
submitted: boolean;
|
|
17
|
+
disabled: boolean;
|
|
17
18
|
userIncluded?: boolean;
|
|
18
19
|
placeholderContent: string;
|
|
19
20
|
isNoResultsShown: boolean;
|
|
@@ -21,18 +22,19 @@ export declare class FindPersonComponent implements OnInit, OnChanges {
|
|
|
21
22
|
selectedPersons: Person[];
|
|
22
23
|
errorMessage: string;
|
|
23
24
|
idValue: string;
|
|
25
|
+
services: string[];
|
|
24
26
|
isPersonSelectionCompleted: boolean;
|
|
25
27
|
showAutocomplete: boolean;
|
|
26
28
|
currentInputValue: string;
|
|
27
|
-
|
|
28
|
-
constructor(findPersonService: FindAPersonService);
|
|
29
|
+
chosenPerson: Person;
|
|
29
30
|
findPersonControl: FormControl;
|
|
30
|
-
filteredOptions:
|
|
31
|
-
|
|
31
|
+
filteredOptions: Person[];
|
|
32
|
+
readonly minSearchCharacters = 2;
|
|
33
|
+
constructor(findPersonService: FindAPersonService, cd: ChangeDetectorRef);
|
|
32
34
|
ngOnInit(): void;
|
|
33
35
|
ngOnChanges(changes: SimpleChanges): void;
|
|
34
36
|
filter(searchTerm: string): Observable<Person[]>;
|
|
35
|
-
onSelectionChange(selectedPerson
|
|
37
|
+
onSelectionChange(selectedPerson: Person): void;
|
|
36
38
|
updatedVal(currentValue: string): void;
|
|
37
39
|
getDisplayName(selectedPerson: Person): string;
|
|
38
40
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ValidatorFn } from '@angular/forms';
|
|
2
2
|
export declare function minSelectedValidator<T>(min: number): ValidatorFn;
|
|
3
3
|
export declare function maxSelectedValidator<T>(max: number): ValidatorFn;
|
|
4
|
-
export declare function
|
|
4
|
+
export declare function getValues(options: {
|
|
5
5
|
key: string;
|
|
6
6
|
label: string;
|
|
7
7
|
selectAll?: true;
|
|
8
|
-
}[], values: any): any[];
|
|
8
|
+
}[], values: any[]): any[];
|
|
@@ -20,9 +20,7 @@ export declare class GenericFilterComponent implements OnInit, OnDestroy {
|
|
|
20
20
|
hidden(field: FilterFieldConfig, form: FormGroup): boolean;
|
|
21
21
|
disabled(field: FilterFieldConfig, form: FormGroup): boolean;
|
|
22
22
|
applyFilter(form: FormGroup): void;
|
|
23
|
-
|
|
24
|
-
radiosChanged(field: FilterFieldConfig): void;
|
|
25
|
-
removePersonField(field: FilterFieldConfig): void;
|
|
23
|
+
fieldChanged(field: FilterFieldConfig, form: FormGroup): void;
|
|
26
24
|
cancelFilter(): void;
|
|
27
25
|
updatePersonControls(values: any, field: FilterFieldConfig): void;
|
|
28
26
|
toggleSelectAll(event: any, form: FormGroup, item: {
|
|
@@ -30,6 +28,7 @@ export declare class GenericFilterComponent implements OnInit, OnDestroy {
|
|
|
30
28
|
label: string;
|
|
31
29
|
selectAll?: true;
|
|
32
30
|
}, field: FilterFieldConfig): void;
|
|
31
|
+
private resetField;
|
|
33
32
|
private mergeDefaultFields;
|
|
34
33
|
private getSettings;
|
|
35
34
|
private buildForm;
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ChangeDetectorRef, EventEmitter, OnInit } from '@angular/core';
|
|
2
2
|
import { AbstractControl, FormBuilder, FormGroup } from '@angular/forms';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import { LocationByEPIMSModel } from '../../models/location.model';
|
|
5
5
|
import { LocationService } from '../../services/locations/location.service';
|
|
6
|
-
export declare class SearchLocationComponent implements OnInit
|
|
6
|
+
export declare class SearchLocationComponent implements OnInit {
|
|
7
7
|
private readonly locationService;
|
|
8
8
|
private readonly fb;
|
|
9
9
|
private readonly cd;
|
|
10
10
|
control: AbstractControl;
|
|
11
11
|
disabled: boolean;
|
|
12
|
+
singleMode: boolean;
|
|
12
13
|
locationType: string;
|
|
13
14
|
serviceIds: string;
|
|
14
15
|
submitted?: boolean;
|
|
15
16
|
delay?: number;
|
|
16
|
-
|
|
17
|
+
form: FormGroup;
|
|
17
18
|
showAutocomplete: boolean;
|
|
18
19
|
locations: LocationByEPIMSModel[];
|
|
19
20
|
locationSelected: EventEmitter<LocationByEPIMSModel>;
|
|
20
|
-
term: string;
|
|
21
|
-
readyAfterContent: boolean;
|
|
22
21
|
readonly minSearchCharacters = 3;
|
|
22
|
+
term: string;
|
|
23
23
|
private pSelectedLocations;
|
|
24
|
+
private pReset;
|
|
24
25
|
constructor(locationService: LocationService, fb: FormBuilder, cd: ChangeDetectorRef);
|
|
26
|
+
reset: boolean;
|
|
25
27
|
selectedLocations: any[];
|
|
26
|
-
ngAfterContentInit(): void;
|
|
27
28
|
ngOnInit(): void;
|
|
28
|
-
onKeyDown(): void;
|
|
29
29
|
filter(term: string): void;
|
|
30
|
-
onSelectionChange(
|
|
30
|
+
onSelectionChange(location: LocationByEPIMSModel): void;
|
|
31
31
|
search(): void;
|
|
32
32
|
getLocations(term: string): Observable<LocationByEPIMSModel[]>;
|
|
33
|
-
|
|
33
|
+
resetSearchTerm(): void;
|
|
34
34
|
private removeSelectedLocations;
|
|
35
35
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Caseworker, CaseworkersByService } from '../../../models';
|
|
2
|
+
import { ISessionStorageService } from '../../models/isession-storage.interface';
|
|
3
|
+
export declare const getAllCaseworkersFromServices: (caseworkersByService: CaseworkersByService[]) => Caseworker[];
|
|
4
|
+
export declare const getSessionStorageKeyForServiceId: (serviceId: string) => string;
|
|
5
|
+
export declare const getCaseworkers: (serviceId: string, sessionStorageService: ISessionStorageService) => Caseworker[];
|
|
6
|
+
export declare const setCaseworkers: (serviceId: string, caseworkers: Caseworker[], sessionStorageService: ISessionStorageService) => void;
|
|
@@ -26,7 +26,11 @@ export interface FilterFieldConfig {
|
|
|
26
26
|
lineBreakBefore?: boolean;
|
|
27
27
|
showCondition?: string;
|
|
28
28
|
enableCondition?: string;
|
|
29
|
+
enableAddLocationButton?: boolean;
|
|
30
|
+
changeResetFields?: string[];
|
|
29
31
|
findPersonField?: string;
|
|
32
|
+
findLocationField?: string;
|
|
33
|
+
domainField?: string;
|
|
30
34
|
disabledText?: string;
|
|
31
35
|
type: FilterFieldType;
|
|
32
36
|
domain?: PersonRole;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { Caseworker, Person } from '../../models
|
|
4
|
-
import { SearchOptions } from '../../models/search-options.model';
|
|
3
|
+
import { Caseworker, Person, SearchOptions } from '../../models';
|
|
5
4
|
import { SessionStorageService } from '../session-storage/session-storage.service';
|
|
6
5
|
export declare class FindAPersonService {
|
|
7
6
|
private readonly http;
|
|
@@ -12,4 +11,5 @@ export declare class FindAPersonService {
|
|
|
12
11
|
find(searchOptions: SearchOptions): Observable<Person[]>;
|
|
13
12
|
findCaseworkers(searchOptions: SearchOptions): Observable<Person[]>;
|
|
14
13
|
mapCaseworkers(caseworkers: Caseworker[], roleCategory: string): Person[];
|
|
14
|
+
searchInCaseworkers(caseworkers: Caseworker[], searchOptions: SearchOptions): Person[];
|
|
15
15
|
}
|