@hmcts/rpx-xui-common-lib 1.7.4 → 1.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/bundles/hmcts-rpx-xui-common-lib.umd.js +159 -37
  2. package/bundles/hmcts-rpx-xui-common-lib.umd.js.map +1 -1
  3. package/bundles/hmcts-rpx-xui-common-lib.umd.min.js +1 -1
  4. package/bundles/hmcts-rpx-xui-common-lib.umd.min.js.map +1 -1
  5. package/esm2015/hmcts-rpx-xui-common-lib.js +22 -21
  6. package/esm2015/lib/components/find-location/find-location.component.js +18 -4
  7. package/esm2015/lib/components/find-person/find-person.component.js +14 -4
  8. package/esm2015/lib/components/generic-filter/generic-filter.component.js +21 -4
  9. package/esm2015/lib/components/search-location/search-location.component.js +12 -2
  10. package/esm2015/lib/components/user-list/user-list.component.js +29 -3
  11. package/esm2015/lib/exui-common-lib.module.js +8 -3
  12. package/esm2015/lib/gov-ui/components/hmcts-pagination/hmcts-pagination.component.js +49 -0
  13. package/esm2015/lib/gov-ui/components/hmcts-sub-navigation/hmcts-sub-navigation.component.js +1 -3
  14. package/esm2015/lib/models/filter.model.js +5 -1
  15. package/esm2015/lib/models/index.js +2 -1
  16. package/esm2015/lib/models/pagination.model.js +18 -0
  17. package/esm5/hmcts-rpx-xui-common-lib.js +22 -21
  18. package/esm5/lib/components/find-location/find-location.component.js +21 -4
  19. package/esm5/lib/components/find-person/find-person.component.js +17 -4
  20. package/esm5/lib/components/generic-filter/generic-filter.component.js +28 -4
  21. package/esm5/lib/components/search-location/search-location.component.js +15 -2
  22. package/esm5/lib/components/user-list/user-list.component.js +36 -3
  23. package/esm5/lib/exui-common-lib.module.js +9 -3
  24. package/esm5/lib/gov-ui/components/hmcts-pagination/hmcts-pagination.component.js +51 -0
  25. package/esm5/lib/gov-ui/components/hmcts-sub-navigation/hmcts-sub-navigation.component.js +1 -3
  26. package/esm5/lib/models/filter.model.js +5 -1
  27. package/esm5/lib/models/index.js +2 -1
  28. package/esm5/lib/models/pagination.model.js +18 -0
  29. package/fesm2015/hmcts-rpx-xui-common-lib.js +117 -14
  30. package/fesm2015/hmcts-rpx-xui-common-lib.js.map +1 -1
  31. package/fesm5/hmcts-rpx-xui-common-lib.js +143 -15
  32. package/fesm5/hmcts-rpx-xui-common-lib.js.map +1 -1
  33. package/hmcts-rpx-xui-common-lib.d.ts +21 -20
  34. package/hmcts-rpx-xui-common-lib.metadata.json +1 -1
  35. package/lib/components/find-location/find-location.component.d.ts +4 -0
  36. package/lib/components/find-person/find-person.component.d.ts +2 -0
  37. package/lib/components/generic-filter/generic-filter.component.d.ts +1 -0
  38. package/lib/components/search-location/search-location.component.d.ts +2 -0
  39. package/lib/components/user-list/user-list.component.d.ts +9 -2
  40. package/lib/exui-common-lib.module.d.ts +2 -2
  41. package/lib/gov-ui/components/hmcts-pagination/hmcts-pagination.component.d.ts +10 -0
  42. package/lib/gov-ui/components/hmcts-sub-navigation/hmcts-sub-navigation.component.d.ts +0 -1
  43. package/lib/models/filter.model.d.ts +2 -0
  44. package/lib/models/index.d.ts +1 -0
  45. package/lib/models/pagination.model.d.ts +5 -0
  46. package/package.json +3 -2
@@ -1,8 +1,10 @@
1
+ import { EventEmitter } from '@angular/core';
1
2
  import { FormGroup } from '@angular/forms';
2
3
  import { FilterFieldConfig } from '../../models';
3
4
  import { LocationByEPIMMSModel } from '../../models/location.model';
4
5
  import { SearchLocationComponent } from '../search-location/search-location.component';
5
6
  export declare class FindLocationComponent {
7
+ locationFieldChanged: EventEmitter<void>;
6
8
  selectedLocations: LocationByEPIMMSModel[];
7
9
  submitted: boolean;
8
10
  enableAddLocationButton: boolean;
@@ -10,6 +12,7 @@ export declare class FindLocationComponent {
10
12
  field: FilterFieldConfig;
11
13
  fields: FilterFieldConfig[];
12
14
  locationTitle: string;
15
+ disableInputField: boolean;
13
16
  locations: LocationByEPIMMSModel[];
14
17
  tempSelectedLocation: LocationByEPIMMSModel;
15
18
  serviceIds: string;
@@ -21,6 +24,7 @@ export declare class FindLocationComponent {
21
24
  addLocation(): void;
22
25
  removeLocation(location: LocationByEPIMMSModel): void;
23
26
  onInputChanged(term: string): void;
27
+ onSearchInputChanged(): void;
24
28
  onLocationSelected(location: LocationByEPIMMSModel): void;
25
29
  private removeSelectedValues;
26
30
  private addSelectedLocationsToForm;
@@ -7,6 +7,7 @@ export declare class FindPersonComponent implements OnInit, OnDestroy {
7
7
  private readonly findPersonService;
8
8
  private readonly cd;
9
9
  personSelected: EventEmitter<Person>;
10
+ personFieldChanged: EventEmitter<void>;
10
11
  title: string;
11
12
  boldTitle: string;
12
13
  subTitle: string;
@@ -35,4 +36,5 @@ export declare class FindPersonComponent implements OnInit, OnDestroy {
35
36
  filter(searchTerm: string): Observable<Person[]>;
36
37
  onSelectionChange(selectedPerson: Person): void;
37
38
  getDisplayName(selectedPerson: Person): string;
39
+ onInput(): void;
38
40
  }
@@ -21,6 +21,7 @@ export declare class GenericFilterComponent implements OnInit, OnDestroy {
21
21
  disabled(field: FilterFieldConfig, form: FormGroup): boolean;
22
22
  applyFilter(form: FormGroup): void;
23
23
  fieldChanged(field: FilterFieldConfig, form: FormGroup): void;
24
+ inputChanged(field: FilterFieldConfig): void;
24
25
  cancelFilter(): void;
25
26
  updatePersonControls(values: any, field: FilterFieldConfig): void;
26
27
  toggleSelectAll(event: any, form: FormGroup, item: {
@@ -19,6 +19,7 @@ export declare class SearchLocationComponent implements OnInit {
19
19
  locations: LocationByEPIMMSModel[];
20
20
  locationSelected: EventEmitter<LocationByEPIMMSModel>;
21
21
  locationInputChanged: EventEmitter<string>;
22
+ searchLocationChanged: EventEmitter<void>;
22
23
  readonly minSearchCharacters = 3;
23
24
  term: string;
24
25
  private pSelectedLocations;
@@ -30,6 +31,7 @@ export declare class SearchLocationComponent implements OnInit {
30
31
  filter(term: string): void;
31
32
  onSelectionChange(location: LocationByEPIMMSModel): void;
32
33
  search(): void;
34
+ onInput(): void;
33
35
  getLocations(term: string): Observable<LocationByEPIMMSModel[]>;
34
36
  resetSearchTerm(): void;
35
37
  private removeSelectedLocations;
@@ -1,7 +1,14 @@
1
- import { EventEmitter } from '@angular/core';
1
+ import { EventEmitter, OnInit } from '@angular/core';
2
+ import { Pagination } from '../../models';
2
3
  import { User } from '../../models/user.model';
3
- export declare class UserListComponent {
4
+ export declare class UserListComponent implements OnInit {
4
5
  users: User[];
6
+ currentPageNumber?: number;
7
+ pageTotalSize?: any;
5
8
  userClick: EventEmitter<User>;
9
+ pageChange: EventEmitter<{}>;
10
+ pagination: Pagination;
11
+ ngOnInit(): void;
6
12
  onUserClick(user: User): void;
13
+ emitPageClickEvent(pageNumber: any): void;
7
14
  }
@@ -23,10 +23,10 @@ import { HmctsBannerComponent } from './gov-ui/components/hmcts-banner/hmcts-ban
23
23
  import { HmctsErrorSummaryComponent } from './gov-ui/components/hmcts-error-summary/hmcts-error-summary.component';
24
24
  import { HmctsIdentityBarComponent } from './gov-ui/components/hmcts-identity-bar/hmcts-identity-bar.component';
25
25
  import { HmctsMainWrapperComponent } from './gov-ui/components/hmcts-main-wrapper/hmcts-main-wrapper.component';
26
- import { HmctsPrimaryNavigationComponent } from './gov-ui/components/hmcts-primary-navigation/hmcts-primary-navigation.component';
26
+ import { HmctsPaginationComponent } from './gov-ui/components/hmcts-pagination/hmcts-pagination.component';
27
27
  import { HmctsSubNavigationComponent } from './gov-ui/components/hmcts-sub-navigation/hmcts-sub-navigation.component';
28
28
  import { RemoveHostDirective } from './gov-ui/directives/remove-host.directive';
29
29
  export declare const COMMON_COMPONENTS: (typeof AccessibilityComponent | typeof GenericFilterComponent | typeof SelectedCaseConfirmComponent | typeof SelectedCaseListComponent | typeof SelectedCaseComponent | typeof ServiceMessagesComponent | typeof ShareCaseConfirmComponent | typeof ShareCaseComponent | typeof CookieBannerComponent | typeof SearchLocationComponent | typeof FeatureToggleDirective | typeof LetDirective | typeof FindPersonComponent | typeof SearchJudicialsComponent | typeof SearchVenueComponent)[];
30
- export declare const GOV_UI_COMPONENTS: (typeof HmctsIdentityBarComponent | typeof HmctsSubNavigationComponent | typeof HmctsPrimaryNavigationComponent | typeof HmctsErrorSummaryComponent | typeof HmctsMainWrapperComponent | typeof HmctsBannerComponent | typeof GovukTableComponent | typeof GovUkFormGroupWrapperComponent | typeof GovUkLabelComponent | typeof GovUkErrorMessageComponent | typeof GovUkCheckboxesComponent | typeof GovUkRadioComponent | typeof RemoveHostDirective)[];
30
+ export declare const GOV_UI_COMPONENTS: (typeof HmctsIdentityBarComponent | typeof HmctsPaginationComponent | typeof HmctsSubNavigationComponent | typeof HmctsErrorSummaryComponent | typeof HmctsMainWrapperComponent | typeof HmctsBannerComponent | typeof GovukTableComponent | typeof GovUkFormGroupWrapperComponent | typeof GovUkLabelComponent | typeof GovUkErrorMessageComponent | typeof GovUkCheckboxesComponent | typeof GovUkRadioComponent | typeof RemoveHostDirective)[];
31
31
  export declare class ExuiCommonLibModule {
32
32
  }
@@ -0,0 +1,10 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ export declare class HmctsPaginationComponent {
3
+ id: string;
4
+ maxSize: number;
5
+ pageSize: number;
6
+ showPageNumbers: boolean;
7
+ showResultCount: boolean;
8
+ pageChange: EventEmitter<number>;
9
+ pageBoundsCorrection: EventEmitter<number>;
10
+ }
@@ -6,5 +6,4 @@ export interface SubNavigation {
6
6
  text: string;
7
7
  href: string;
8
8
  active: boolean;
9
- total?: number;
10
9
  }
@@ -32,12 +32,14 @@ export interface FilterFieldConfig {
32
32
  findPersonField?: string;
33
33
  findLocationField?: string;
34
34
  domainField?: string;
35
+ disable?: boolean;
35
36
  disabledText?: string;
36
37
  type: FilterFieldType;
37
38
  domain?: PersonRole;
38
39
  title?: string;
39
40
  subTitle?: string;
40
41
  locationTitle?: string;
42
+ radioSelectionChange?: string;
41
43
  }
42
44
  export interface FilterSetting {
43
45
  id: string;
@@ -3,6 +3,7 @@ export * from './contact-details.model';
3
3
  export * from './due-date.model';
4
4
  export * from './feature-user';
5
5
  export * from './idle-config.model';
6
+ export * from './pagination.model';
6
7
  export * from './person.model';
7
8
  export * from './public_api';
8
9
  export * from './search-options.model';
@@ -0,0 +1,5 @@
1
+ export interface Pagination {
2
+ itemsPerPage: number;
3
+ currentPage: number;
4
+ totalItems: number;
5
+ }
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@hmcts/rpx-xui-common-lib",
3
- "version": "1.7.4",
3
+ "version": "1.7.5",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^7.2.0",
6
6
  "@angular/core": "^7.2.0",
7
7
  "@angular/material": "^7.2.0",
8
8
  "@angular/cdk": "^7.2.0",
9
- "launchdarkly-js-client-sdk": "^2.15.2"
9
+ "launchdarkly-js-client-sdk": "^2.15.2",
10
+ "ngx-pagination": "^3.2.1"
10
11
  },
11
12
  "publishConfig": {
12
13
  "access": "public"