@hmcts/rpx-xui-common-lib 1.8.7-fix-wrong-services → 1.8.8-angular-upgrade-r4

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 (118) hide show
  1. package/bundles/hmcts-rpx-xui-common-lib.umd.js +919 -201
  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 +32 -29
  6. package/esm2015/lib/components/find-location/find-location.component.js +8 -4
  7. package/esm2015/lib/components/find-service/find-service.component.js +2 -2
  8. package/esm2015/lib/components/find-task-name/find-task-name.component.js +228 -0
  9. package/esm2015/lib/components/generic-filter/generic-filter-utils.js +2 -2
  10. package/esm2015/lib/components/generic-filter/generic-filter.component.js +361 -15
  11. package/esm2015/lib/components/search-location/search-location.component.js +3 -3
  12. package/esm2015/lib/components/search-service/search-service.component.js +18 -6
  13. package/esm2015/lib/exui-common-lib.module.js +12 -3
  14. package/esm2015/lib/gov-ui/components/gov-uk-checkboxes/gov-uk-checkboxes.component.js +80 -6
  15. package/esm2015/lib/gov-ui/components/gov-uk-input/gov-uk-input.component.js +3 -3
  16. package/esm2015/lib/gov-ui/components/gov-uk-label/gov-uk-label.component.js +3 -2
  17. package/esm2015/lib/gov-ui/components/gov-uk-radios/gov-uk-radios.component.js +1 -1
  18. package/esm2015/lib/gov-ui/components/gov-uk-select/gov-uk-select.component.js +2 -2
  19. package/esm2015/lib/gov-ui/components/hmcts-banner/hmcts-banner-info.interface.js +22 -0
  20. package/esm2015/lib/gov-ui/components/hmcts-banner/hmcts-banner.component.js +19 -14
  21. package/esm2015/lib/gov-ui/components/hmcts-main-wrapper/hmcts-main-wrapper.component.js +2 -2
  22. package/esm2015/lib/gov-ui/components/index.js +2 -2
  23. package/esm2015/lib/gov-ui/components/public_api.js +2 -1
  24. package/esm2015/lib/gov-ui/index.js +2 -2
  25. package/esm2015/lib/gov-ui/models/checkboxes-model.js +6 -8
  26. package/esm2015/lib/gov-ui/models/gov-ui-config-model.js +5 -1
  27. package/esm2015/lib/gov-ui/models/public_api.js +1 -2
  28. package/esm2015/lib/gov-ui/models/radio-buttons.model.js +22 -0
  29. package/esm2015/lib/gov-ui/public_api.js +2 -2
  30. package/esm2015/lib/models/filter.model.js +63 -3
  31. package/esm2015/lib/models/index.js +3 -2
  32. package/esm2015/lib/models/person.model.js +2 -2
  33. package/esm2015/lib/models/task-name.model.js +16 -0
  34. package/esm2015/lib/pipes/capitalize.pipe.js +21 -0
  35. package/esm2015/lib/services/filter/filter.service.js +17 -3
  36. package/esm2015/lib/services/find-person/find-person.service.js +3 -3
  37. package/esm2015/lib/services/role-guard/role.guard.js +22 -15
  38. package/esm2015/lib/services/role-guard/role.service.js +13 -13
  39. package/esm2015/lib/services/storage/session-storage/session-storage.service.js +55 -0
  40. package/esm2015/lib/services/task-name/task-name.service.js +65 -0
  41. package/esm2015/public-api.js +3 -3
  42. package/esm5/hmcts-rpx-xui-common-lib.js +32 -29
  43. package/esm5/lib/components/find-location/find-location.component.js +8 -4
  44. package/esm5/lib/components/find-service/find-service.component.js +2 -2
  45. package/esm5/lib/components/find-task-name/find-task-name.component.js +243 -0
  46. package/esm5/lib/components/generic-filter/generic-filter-utils.js +2 -2
  47. package/esm5/lib/components/generic-filter/generic-filter.component.js +397 -14
  48. package/esm5/lib/components/search-location/search-location.component.js +3 -3
  49. package/esm5/lib/components/search-service/search-service.component.js +20 -7
  50. package/esm5/lib/exui-common-lib.module.js +10 -3
  51. package/esm5/lib/gov-ui/components/gov-uk-checkboxes/gov-uk-checkboxes.component.js +100 -6
  52. package/esm5/lib/gov-ui/components/gov-uk-input/gov-uk-input.component.js +3 -3
  53. package/esm5/lib/gov-ui/components/gov-uk-label/gov-uk-label.component.js +3 -2
  54. package/esm5/lib/gov-ui/components/gov-uk-radios/gov-uk-radios.component.js +1 -1
  55. package/esm5/lib/gov-ui/components/gov-uk-select/gov-uk-select.component.js +2 -2
  56. package/esm5/lib/gov-ui/components/hmcts-banner/hmcts-banner-info.interface.js +22 -0
  57. package/esm5/lib/gov-ui/components/hmcts-banner/hmcts-banner.component.js +17 -13
  58. package/esm5/lib/gov-ui/components/hmcts-main-wrapper/hmcts-main-wrapper.component.js +2 -2
  59. package/esm5/lib/gov-ui/components/index.js +2 -2
  60. package/esm5/lib/gov-ui/components/public_api.js +2 -1
  61. package/esm5/lib/gov-ui/index.js +2 -2
  62. package/esm5/lib/gov-ui/models/checkboxes-model.js +6 -8
  63. package/esm5/lib/gov-ui/models/gov-ui-config-model.js +5 -1
  64. package/esm5/lib/gov-ui/models/public_api.js +1 -2
  65. package/esm5/lib/gov-ui/models/radio-buttons.model.js +22 -0
  66. package/esm5/lib/gov-ui/public_api.js +2 -2
  67. package/esm5/lib/models/filter.model.js +63 -3
  68. package/esm5/lib/models/index.js +3 -2
  69. package/esm5/lib/models/person.model.js +2 -2
  70. package/esm5/lib/models/task-name.model.js +16 -0
  71. package/esm5/lib/pipes/capitalize.pipe.js +29 -0
  72. package/esm5/lib/services/filter/filter.service.js +21 -3
  73. package/esm5/lib/services/find-person/find-person.service.js +3 -3
  74. package/esm5/lib/services/role-guard/role.guard.js +22 -15
  75. package/esm5/lib/services/role-guard/role.service.js +13 -13
  76. package/esm5/lib/services/{session-storage → storage/session-storage}/session-storage.service.js +2 -2
  77. package/esm5/lib/services/task-name/task-name.service.js +70 -0
  78. package/esm5/public-api.js +3 -3
  79. package/fesm2015/hmcts-rpx-xui-common-lib.js +782 -115
  80. package/fesm2015/hmcts-rpx-xui-common-lib.js.map +1 -1
  81. package/fesm5/hmcts-rpx-xui-common-lib.js +908 -158
  82. package/fesm5/hmcts-rpx-xui-common-lib.js.map +1 -1
  83. package/hmcts-rpx-xui-common-lib.d.ts +30 -27
  84. package/hmcts-rpx-xui-common-lib.metadata.json +1 -1
  85. package/lib/components/find-task-name/find-task-name.component.d.ts +41 -0
  86. package/lib/components/generic-filter/generic-filter-utils.d.ts +2 -5
  87. package/lib/components/generic-filter/generic-filter.component.d.ts +12 -2
  88. package/lib/components/search-location/search-location.component.d.ts +1 -1
  89. package/lib/components/search-service/search-service.component.d.ts +5 -2
  90. package/lib/exui-common-lib.module.d.ts +4 -3
  91. package/lib/gov-ui/components/gov-uk-checkboxes/gov-uk-checkboxes.component.d.ts +14 -5
  92. package/lib/gov-ui/components/gov-uk-input/gov-uk-input.component.d.ts +1 -2
  93. package/lib/gov-ui/components/gov-uk-label/gov-uk-label.component.d.ts +1 -0
  94. package/lib/gov-ui/components/gov-uk-radios/gov-uk-radios.component.d.ts +2 -2
  95. package/lib/gov-ui/components/hmcts-banner/hmcts-banner-info.interface.d.ts +7 -0
  96. package/lib/gov-ui/components/hmcts-banner/hmcts-banner.component.d.ts +4 -2
  97. package/lib/gov-ui/components/hmcts-main-wrapper/hmcts-main-wrapper.component.d.ts +3 -3
  98. package/lib/gov-ui/components/public_api.d.ts +1 -0
  99. package/lib/gov-ui/models/checkboxes-model.d.ts +4 -7
  100. package/lib/gov-ui/models/gov-ui-config-model.d.ts +2 -0
  101. package/lib/gov-ui/models/public_api.d.ts +0 -1
  102. package/lib/gov-ui/models/radio-buttons.model.d.ts +9 -0
  103. package/lib/models/filter.model.d.ts +29 -7
  104. package/lib/models/index.d.ts +1 -0
  105. package/lib/models/person.model.d.ts +1 -1
  106. package/lib/models/task-name.model.d.ts +4 -0
  107. package/lib/pipes/capitalize.pipe.d.ts +4 -0
  108. package/lib/services/filter/filter.service.d.ts +1 -0
  109. package/lib/services/find-person/find-person.service.d.ts +1 -1
  110. package/lib/services/role-guard/role.guard.d.ts +2 -1
  111. package/lib/services/role-guard/role.service.d.ts +3 -1
  112. package/lib/services/{session-storage → storage/session-storage}/session-storage.service.d.ts +0 -0
  113. package/lib/services/task-name/task-name.service.d.ts +14 -0
  114. package/package.json +1 -1
  115. package/esm2015/lib/gov-ui/models/banner-data-model.js +0 -16
  116. package/esm2015/lib/services/session-storage/session-storage.service.js +0 -55
  117. package/esm5/lib/gov-ui/models/banner-data-model.js +0 -16
  118. package/lib/gov-ui/models/banner-data-model.d.ts +0 -4
@@ -0,0 +1,41 @@
1
+ import { ChangeDetectorRef, EventEmitter, OnChanges, OnDestroy } from '@angular/core';
2
+ import { FormControl, FormGroup } from '@angular/forms';
3
+ import { Observable } from 'rxjs';
4
+ import { PersonRole } from '../../models';
5
+ import { TaskNameModel } from '../../models/task-name.model';
6
+ import { TaskNameService } from '../../services/task-name/task-name.service';
7
+ export declare class FindTaskNameComponent implements OnChanges, OnDestroy {
8
+ private readonly cd;
9
+ private readonly taskService;
10
+ taskNameSelected: EventEmitter<string>;
11
+ taskNameFieldChanged: EventEmitter<void>;
12
+ title: string;
13
+ boldTitle: string;
14
+ subTitle: string;
15
+ domain: PersonRole;
16
+ findTaskNameGroup: FormGroup;
17
+ selectedTaskName: string;
18
+ submitted: boolean;
19
+ userIncluded?: boolean;
20
+ assignedUser?: string;
21
+ placeholderContent: string;
22
+ isNoResultsShown: boolean;
23
+ showUpdatedColor: boolean;
24
+ selectedTaskNames: TaskNameModel[];
25
+ errorMessage: string;
26
+ idValue: string;
27
+ services: string[];
28
+ disabled: boolean;
29
+ showAutocomplete: boolean;
30
+ findTaskNameControl: FormControl;
31
+ filteredOptions: string[];
32
+ readonly minSearchCharacters = 1;
33
+ private sub;
34
+ searchTerm: string;
35
+ constructor(cd: ChangeDetectorRef, taskService: TaskNameService);
36
+ ngOnDestroy(): void;
37
+ ngOnChanges(): void;
38
+ getTaskName(): Observable<TaskNameModel[]>;
39
+ onSelectionChange(selectedTaskName: string): void;
40
+ onInput(): void;
41
+ }
@@ -1,8 +1,5 @@
1
1
  import { ValidatorFn } from '@angular/forms';
2
+ import { FilterConfigOption } from '../../models';
2
3
  export declare function minSelectedValidator<T>(min: number): ValidatorFn;
3
4
  export declare function maxSelectedValidator<T>(max: number): ValidatorFn;
4
- export declare function getValues(options: {
5
- key: string;
6
- label: string;
7
- selectAll?: true;
8
- }[], values: any[]): any[];
5
+ export declare function getValues(options: FilterConfigOption[], values: any[]): any[];
@@ -1,7 +1,7 @@
1
1
  import { OnDestroy, OnInit } from '@angular/core';
2
2
  import { FormBuilder, FormGroup } from '@angular/forms';
3
3
  import { Subscription } from 'rxjs';
4
- import { FilterConfig, FilterFieldConfig, FilterSetting } from '../../models';
4
+ import { FilterConfig, FilterConfigOption, FilterFieldConfig, FilterSetting, GroupOptions } from '../../models';
5
5
  import { FilterService } from './../../services/filter/filter.service';
6
6
  export declare class GenericFilterComponent implements OnInit, OnDestroy {
7
7
  private readonly filterService;
@@ -9,6 +9,9 @@ export declare class GenericFilterComponent implements OnInit, OnDestroy {
9
9
  form: FormGroup;
10
10
  submitted: boolean;
11
11
  formSub: Subscription;
12
+ filteredSkillsByServices: GroupOptions[];
13
+ filteredSkillsByServicesCheckbox: FilterConfigOption[];
14
+ previousSelectedNestedCheckbox: string[];
12
15
  constructor(filterService: FilterService, fb: FormBuilder);
13
16
  private _config;
14
17
  config: FilterConfig;
@@ -24,17 +27,24 @@ export declare class GenericFilterComponent implements OnInit, OnDestroy {
24
27
  inputChanged(field: FilterFieldConfig): void;
25
28
  cancelFilter(): void;
26
29
  updatePersonControls(values: any, field: FilterFieldConfig): void;
30
+ checkBoxChecked(field: any, i: number): any;
31
+ updateTaskNameControls(values: string, field: FilterFieldConfig): void;
27
32
  toggleSelectAll(event: any, form: FormGroup, item: {
28
33
  key: string;
29
34
  label: string;
30
35
  selectAll?: true;
31
36
  }, field: FilterFieldConfig): void;
37
+ private startFilterSkillsByServices;
32
38
  private resetField;
33
39
  private mergeDefaultFields;
34
40
  private getSettings;
35
41
  private buildForm;
36
42
  private buildCheckBoxFormArray;
37
- private buildFindLocationFormArray;
43
+ private buildFormArray;
38
44
  private getSelectedValues;
39
45
  private emitFormErrors;
46
+ initValuesFromCacheForSkillsByServices(): void;
47
+ filterSkillsByServices(services: string[], config: FilterConfig): FilterConfigOption[] | GroupOptions[];
48
+ private getSelectedValuesForFields;
49
+ private sortGroupOptions;
40
50
  }
@@ -3,7 +3,7 @@ import { AbstractControl, FormBuilder, FormGroup } from '@angular/forms';
3
3
  import { Observable } from 'rxjs';
4
4
  import { BookingCheckType, LocationByEPIMMSModel } from '../../models';
5
5
  import { LocationService } from '../../services/locations/location.service';
6
- import { SessionStorageService } from '../../services/session-storage/session-storage.service';
6
+ import { SessionStorageService } from '../../services/storage/session-storage/session-storage.service';
7
7
  export declare class SearchLocationComponent implements OnInit {
8
8
  private readonly locationService;
9
9
  private readonly sessionStorageService;
@@ -1,13 +1,16 @@
1
+ import { EventEmitter } from '@angular/core';
1
2
  import { FormGroup } from '@angular/forms';
3
+ import { FilterConfigOption } from '../../models';
2
4
  export declare class SearchServiceComponent {
3
- services: any;
5
+ services: FilterConfigOption[];
4
6
  selectedServices: any;
5
7
  disabled: any;
6
8
  delay: any;
7
9
  form: FormGroup;
8
10
  showAutocomplete: boolean;
11
+ serviceChanged: EventEmitter<FilterConfigOption>;
9
12
  readonly minSearchCharacters = 3;
10
13
  term: string;
11
14
  onInput(): void;
12
- onSelectionChange(): void;
15
+ onSelectionChanged(key: string): void;
13
16
  }
@@ -1,6 +1,7 @@
1
1
  import { AccessibilityComponent } from './components/accessibility/accessibility.component';
2
2
  import { CookieBannerComponent } from './components/cookie-banner/cookie-banner.component';
3
3
  import { FindPersonComponent } from './components/find-person/find-person.component';
4
+ import { FindTaskNameComponent } from './components/find-task-name/find-task-name.component';
4
5
  import { GenericFilterComponent } from './components/generic-filter/generic-filter.component';
5
6
  import { SearchJudicialsComponent } from './components/search-judicials/search-judicials.component';
6
7
  import { SearchLocationComponent } from './components/search-location/search-location.component';
@@ -13,11 +14,11 @@ import { ShareCaseConfirmComponent } from './components/share-case-confirm/share
13
14
  import { ShareCaseComponent } from './components/share-case/share-case.component';
14
15
  import { FeatureToggleDirective } from './directives/feature-toggle/feature-toggle.directive';
15
16
  import { LetDirective } from './directives/let/let.directive';
16
- import { GovUkCheckboxesComponent } from './gov-ui/components/gov-uk-checkboxes/gov-uk-checkboxes.component';
17
17
  import { GovUkErrorMessageComponent } from './gov-ui/components/gov-uk-error-message/gov-uk-error-message.component';
18
18
  import { GovUkFormGroupWrapperComponent } from './gov-ui/components/gov-uk-form-group-wrapper/gov-uk-form-group-wrapper.component';
19
19
  import { GovUkLabelComponent } from './gov-ui/components/gov-uk-label/gov-uk-label.component';
20
20
  import { GovUkRadioComponent } from './gov-ui/components/gov-uk-radio/gov-uk-radio.component';
21
+ import { GovUkRadiosComponent } from './gov-ui/components/gov-uk-radios/gov-uk-radios.component';
21
22
  import { GovukTableComponent } from './gov-ui/components/gov-uk-table/gov-uk-table.component';
22
23
  import { HmctsBannerComponent } from './gov-ui/components/hmcts-banner/hmcts-banner.component';
23
24
  import { HmctsErrorSummaryComponent } from './gov-ui/components/hmcts-error-summary/hmcts-error-summary.component';
@@ -27,7 +28,7 @@ import { HmctsPaginationComponent } from './gov-ui/components/hmcts-pagination/h
27
28
  import { HmctsPrimaryNavigationComponent } from './gov-ui/components/hmcts-primary-navigation/hmcts-primary-navigation.component';
28
29
  import { HmctsSubNavigationComponent } from './gov-ui/components/hmcts-sub-navigation/hmcts-sub-navigation.component';
29
30
  import { RemoveHostDirective } from './gov-ui/directives/remove-host.directive';
30
- 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)[];
31
- export declare const GOV_UI_COMPONENTS: (typeof HmctsIdentityBarComponent | typeof HmctsPaginationComponent | typeof HmctsSubNavigationComponent | typeof HmctsPrimaryNavigationComponent | typeof HmctsErrorSummaryComponent | typeof HmctsMainWrapperComponent | typeof HmctsBannerComponent | typeof GovukTableComponent | typeof GovUkFormGroupWrapperComponent | typeof GovUkLabelComponent | typeof GovUkErrorMessageComponent | typeof GovUkCheckboxesComponent | typeof GovUkRadioComponent | typeof RemoveHostDirective)[];
31
+ 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 FindTaskNameComponent | typeof SearchVenueComponent)[];
32
+ export declare const GOV_UI_COMPONENTS: (typeof HmctsIdentityBarComponent | typeof HmctsPaginationComponent | typeof HmctsSubNavigationComponent | typeof HmctsPrimaryNavigationComponent | typeof HmctsErrorSummaryComponent | typeof HmctsMainWrapperComponent | typeof HmctsBannerComponent | typeof GovukTableComponent | typeof GovUkFormGroupWrapperComponent | typeof GovUkLabelComponent | typeof GovUkErrorMessageComponent | typeof GovUkRadioComponent | typeof GovUkRadiosComponent | typeof RemoveHostDirective)[];
32
33
  export declare class ExuiCommonLibModule {
33
34
  }
@@ -1,6 +1,15 @@
1
- import { ErrorMessagesModel } from '../../models';
2
- import { CheckboxesModel } from '../../models/checkboxes-model';
3
- export declare class GovUkCheckboxesComponent {
4
- options: CheckboxesModel;
5
- errors: ErrorMessagesModel;
1
+ import { OnInit } from '@angular/core';
2
+ import { FormGroup } from '@angular/forms';
3
+ import { CheckboxesModel, ErrorMessagesModel, GovUiConfigModel } from '../../models';
4
+ export declare class GovUkCheckboxesComponent implements OnInit {
5
+ group: FormGroup;
6
+ config: GovUiConfigModel;
7
+ items: CheckboxesModel[];
8
+ errorMessage: ErrorMessagesModel;
9
+ columns: CheckboxesModel[][];
10
+ ngOnInit(): void;
11
+ setDescribedBy(): string;
12
+ onChecked(checked: boolean, value: string): void;
13
+ isChecked(value: string): any;
14
+ private setColumns;
6
15
  }
@@ -1,7 +1,6 @@
1
1
  import { OnInit } from '@angular/core';
2
2
  import { FormGroup } from '@angular/forms';
3
- import { ErrorMessagesModel } from '../../models';
4
- import { GovUiConfigModel } from '../../models/gov-ui-config-model';
3
+ import { ErrorMessagesModel, GovUiConfigModel } from '../../models';
5
4
  export declare class GovUkInputComponent implements OnInit {
6
5
  constructor();
7
6
  errorMessage: ErrorMessagesModel;
@@ -6,5 +6,6 @@ export declare class GovUkLabelComponent {
6
6
  id: string;
7
7
  isPageHeading: boolean;
8
8
  classes: string;
9
+ optional?: string;
9
10
  };
10
11
  }
@@ -1,6 +1,6 @@
1
1
  import { ErrorMessagesModel } from '../../models';
2
- import { CheckboxesModel } from '../../models/checkboxes-model';
2
+ import { RadioButtonsModel } from '../../models/radio-buttons.model';
3
3
  export declare class GovUkRadiosComponent {
4
- options: CheckboxesModel;
4
+ options: RadioButtonsModel;
5
5
  errors: ErrorMessagesModel;
6
6
  }
@@ -0,0 +1,7 @@
1
+ export interface HmctsBannerInfo {
2
+ message: string;
3
+ type: 'warning' | 'success' | 'information';
4
+ title?: string;
5
+ showMessageIcon?: boolean;
6
+ messageBoldText?: boolean;
7
+ }
@@ -1,5 +1,7 @@
1
1
  export declare class HmctsBannerComponent {
2
- constructor();
3
- type: string;
4
2
  message: string;
3
+ type: 'warning' | 'success' | 'information';
4
+ title?: string;
5
+ showMessageIcon?: boolean;
6
+ messageBoldText?: boolean;
5
7
  }
@@ -1,7 +1,7 @@
1
1
  import { EventEmitter, OnInit } from '@angular/core';
2
- import { BannerDataModel } from '../../models/banner-data-model';
2
+ import { HmctsBannerInfo } from '../hmcts-banner/hmcts-banner-info.interface';
3
3
  export declare class HmctsMainWrapperComponent implements OnInit {
4
- bannerData: BannerDataModel;
4
+ bannerData: HmctsBannerInfo;
5
5
  backLink: string;
6
6
  title: string;
7
7
  summaryErrors: {
@@ -12,7 +12,7 @@ export declare class HmctsMainWrapperComponent implements OnInit {
12
12
  message: any;
13
13
  }[];
14
14
  };
15
- banner: BannerDataModel;
15
+ banner: HmctsBannerInfo;
16
16
  actionButtons: {
17
17
  name: string;
18
18
  class: string;
@@ -1 +1,2 @@
1
1
  export * from './hmcts-sub-navigation/hmcts-sub-navigation.component';
2
+ export * from './hmcts-banner/hmcts-banner.component';
@@ -1,9 +1,6 @@
1
- import { FormGroup } from '@angular/forms';
2
- import { GovUiConfigModel } from './gov-ui-config-model';
3
1
  export interface CheckboxesModel {
4
- key: string;
5
- group: FormGroup;
6
- config: GovUiConfigModel;
7
- errors: any;
8
- items: GovUiConfigModel[];
2
+ id: string;
3
+ value: string;
4
+ label: string;
5
+ hint?: string;
9
6
  }
@@ -11,4 +11,6 @@ export interface GovUiConfigModel {
11
11
  type?: string;
12
12
  isPageHeading?: boolean;
13
13
  rows?: number;
14
+ fullWidth?: boolean;
15
+ optional?: boolean;
14
16
  }
@@ -1,4 +1,3 @@
1
1
  export * from './checkboxes-model';
2
2
  export * from './error-messages-model';
3
- export * from './banner-data-model';
4
3
  export * from './gov-ui-config-model';
@@ -0,0 +1,9 @@
1
+ import { FormGroup } from '@angular/forms';
2
+ import { GovUiConfigModel } from './gov-ui-config-model';
3
+ export interface RadioButtonsModel {
4
+ key: string;
5
+ group: FormGroup;
6
+ config: GovUiConfigModel;
7
+ errors: any;
8
+ items: GovUiConfigModel[];
9
+ }
@@ -1,49 +1,71 @@
1
1
  import { BookingCheckType } from './location.model';
2
2
  import { PersonRole } from './person.model';
3
- export declare type FilterFieldType = 'checkbox' | 'radio' | 'select' | 'find-person' | 'find-location' | 'checkbox-large' | 'find-service';
3
+ export declare type FilterFieldType = 'group-title' | 'checkbox' | 'radio' | 'select' | 'find-person' | 'find-location' | 'checkbox-large' | 'find-service' | 'text-input' | 'email-input' | 'group-select' | 'nested-checkbox' | 'find-task-name';
4
4
  export declare type FilterPersistence = 'local' | 'session' | 'memory';
5
+ export interface FilterConfigOption {
6
+ key: string;
7
+ label: string;
8
+ selectAll?: boolean;
9
+ }
5
10
  export interface FilterConfig {
6
11
  id: string;
7
12
  fields: FilterFieldConfig[];
8
13
  persistence: FilterPersistence;
9
14
  applyButtonText: string;
15
+ enableDisabledButton?: boolean;
10
16
  cancelButtonText: string;
11
17
  cancelSetting?: FilterSetting;
12
- enableDisabledButton?: boolean;
13
18
  showCancelFilterButton?: boolean;
19
+ cancelButtonCallback?(): void;
20
+ }
21
+ export interface FilterFieldOption {
22
+ key: string;
23
+ label: string;
24
+ selectAll?: true;
14
25
  }
15
26
  export interface FilterFieldConfig {
16
27
  name: string;
17
- options: {
18
- key: string;
19
- label: string;
20
- selectAll?: true;
21
- }[];
28
+ options: FilterConfigOption[];
22
29
  minSelected: number;
23
30
  maxSelected: number;
24
31
  minSelectedError?: string;
25
32
  maxSelectedError?: string;
26
33
  displayMaxSelectedError?: boolean;
27
34
  displayMinSelectedError?: boolean;
35
+ emailError?: string;
28
36
  lineBreakBefore?: boolean;
29
37
  showCondition?: string;
30
38
  enableCondition?: string;
31
39
  enableAddButton?: boolean;
32
40
  enableAddLocationButton?: boolean;
41
+ enableAddTaskNameButton?: boolean;
33
42
  changeResetFields?: string[];
34
43
  findPersonField?: string;
35
44
  findLocationField?: string;
45
+ findTaskNameField?: string;
36
46
  domainField?: string;
37
47
  disable?: boolean;
38
48
  disabledText?: string;
39
49
  type: FilterFieldType;
40
50
  domain?: PersonRole;
41
51
  title?: string;
52
+ titleClasses?: string;
53
+ titleHint?: string;
42
54
  subTitle?: string;
43
55
  locationTitle?: string;
44
56
  radioSelectionChange?: string;
45
57
  bookingCheckType?: BookingCheckType;
46
58
  placeholderContent?: string;
59
+ maxWidth480px?: boolean;
60
+ maxRows?: number;
61
+ groupOptions?: GroupOptions[];
62
+ maxlength?: number;
63
+ defaultOption?: FilterConfigOption;
64
+ }
65
+ export interface GroupOptions {
66
+ group: string;
67
+ options: FilterFieldOption[];
68
+ placeholderContent?: string;
47
69
  }
48
70
  export interface FilterSetting {
49
71
  id: string;
@@ -2,6 +2,7 @@ export * from './case-share.model';
2
2
  export * from './contact-details.model';
3
3
  export * from './due-date.model';
4
4
  export * from './feature-user';
5
+ export * from './filter.model';
5
6
  export * from './idle-config.model';
6
7
  export * from './location.model';
7
8
  export * from './pagination.model';
@@ -34,7 +34,7 @@ export declare enum PersonRole {
34
34
  JUDICIAL = "Judicial",
35
35
  CASEWORKER = "Legal Ops",
36
36
  ADMIN = "Admin",
37
- CTSC = "CTSC",
37
+ CTSC = "CTSC User",
38
38
  ALL = "All"
39
39
  }
40
40
  export declare enum RoleCategory {
@@ -0,0 +1,4 @@
1
+ export interface TaskNameModel {
2
+ taskId: number;
3
+ taskName: string;
4
+ }
@@ -0,0 +1,4 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ export declare class CapitalizePipe implements PipeTransform {
3
+ transform(value: string): string;
4
+ }
@@ -9,6 +9,7 @@ export declare class FilterService {
9
9
  get(id: string): FilterSetting | null;
10
10
  isSameUser(id: string): boolean;
11
11
  getStream(id: string): Observable<FilterSetting>;
12
+ clearSessionAndLocalPersistance(id: string): void;
12
13
  private persistLocal;
13
14
  private persistSession;
14
15
  private persistMemory;
@@ -1,7 +1,7 @@
1
1
  import { HttpClient } from '@angular/common/http';
2
2
  import { Observable } from 'rxjs';
3
3
  import { Caseworker, JudicialUserModel, Person, SearchOptions } from '../../models';
4
- import { SessionStorageService } from '../session-storage/session-storage.service';
4
+ import { SessionStorageService } from '../storage/session-storage/session-storage.service';
5
5
  export declare class FindAPersonService {
6
6
  private readonly http;
7
7
  private readonly sessionStorageService;
@@ -1,4 +1,5 @@
1
1
  import { ActivatedRouteSnapshot, CanActivate, Router, UrlTree } from '@angular/router';
2
+ import { Observable } from 'rxjs';
2
3
  import { RoleService } from './role.service';
3
4
  export declare enum RoleMatching {
4
5
  ALL = 0,
@@ -8,5 +9,5 @@ export declare class RoleGuard implements CanActivate {
8
9
  private readonly roleService;
9
10
  private readonly router;
10
11
  constructor(roleService: RoleService, router: Router);
11
- canActivate(route: ActivatedRouteSnapshot): boolean | UrlTree;
12
+ canActivate(route: ActivatedRouteSnapshot): Observable<boolean | UrlTree>;
12
13
  }
@@ -1,6 +1,8 @@
1
+ import { BehaviorSubject } from 'rxjs';
1
2
  export declare type Role = string;
2
3
  export declare type Roles = Role[];
3
4
  export declare class RoleService {
4
- private pRoles;
5
+ readonly pRoles: BehaviorSubject<string[]>;
6
+ roles$: import("rxjs").Observable<string[]>;
5
7
  roles: Roles;
6
8
  }
@@ -0,0 +1,14 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { Observable } from 'rxjs';
3
+ import { TaskNameModel } from '../../models/task-name.model';
4
+ import { SessionStorageService } from '../storage/session-storage/session-storage.service';
5
+ export declare class TaskNameService {
6
+ private readonly http;
7
+ private readonly sessionStorageService;
8
+ static taskNamesKey: string;
9
+ constructor(http: HttpClient, sessionStorageService: SessionStorageService);
10
+ /**
11
+ * @return Observable<any[]>: Array of taskName in Observable
12
+ */
13
+ getTaskName(): Observable<TaskNameModel[]>;
14
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hmcts/rpx-xui-common-lib",
3
- "version": "1.8.7-fix-wrong-services",
3
+ "version": "1.8.8-angular-upgrade-r4",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^7.2.0",
6
6
  "@angular/core": "^7.2.0",
@@ -1,16 +0,0 @@
1
- /**
2
- * @fileoverview added by tsickle
3
- * Generated from: lib/gov-ui/models/banner-data-model.ts
4
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5
- */
6
- /**
7
- * @record
8
- */
9
- export function BannerDataModel() { }
10
- if (false) {
11
- /** @type {?} */
12
- BannerDataModel.prototype.type;
13
- /** @type {?} */
14
- BannerDataModel.prototype.message;
15
- }
16
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFubmVyLWRhdGEtbW9kZWwuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AaG1jdHMvcnB4LXh1aS1jb21tb24tbGliLyIsInNvdXJjZXMiOlsibGliL2dvdi11aS9tb2RlbHMvYmFubmVyLWRhdGEtbW9kZWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7QUFBQSxxQ0FHQzs7O0lBRkMsK0JBQWE7O0lBQ2Isa0NBQWdCIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGludGVyZmFjZSBCYW5uZXJEYXRhTW9kZWwge1xuICB0eXBlOiBzdHJpbmc7XG4gIG1lc3NhZ2U6IHN0cmluZztcbn1cbiJdfQ==
@@ -1,55 +0,0 @@
1
- /**
2
- * @fileoverview added by tsickle
3
- * Generated from: lib/services/session-storage/session-storage.service.ts
4
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5
- */
6
- import { Injectable } from '@angular/core';
7
- import * as i0 from "@angular/core";
8
- export class SessionStorageService {
9
- /**
10
- * Get an item from the session storage.
11
- * If remove is true, the item will be removed once read
12
- * @param {?} key
13
- * @param {?=} removeAfterRead removed the key once it has been read
14
- * @return {?}
15
- */
16
- getItem(key, removeAfterRead = false) {
17
- /** @type {?} */
18
- const item = sessionStorage.getItem(key);
19
- if (removeAfterRead) {
20
- this.removeItem(key);
21
- }
22
- return item;
23
- }
24
- /**
25
- * Set an item in the session storage.
26
- * @param {?} key
27
- * @param {?} value
28
- * @return {?}
29
- */
30
- setItem(key, value) {
31
- sessionStorage.setItem(key, value);
32
- }
33
- /**
34
- * Remove an item in the session storage.
35
- * @param {?} key
36
- * @return {?}
37
- */
38
- removeItem(key) {
39
- sessionStorage.removeItem(key);
40
- }
41
- /**
42
- * Clear all the items held in session storage.
43
- * @return {?}
44
- */
45
- clear() {
46
- sessionStorage.clear();
47
- }
48
- }
49
- SessionStorageService.decorators = [
50
- { type: Injectable, args: [{
51
- providedIn: 'root'
52
- },] }
53
- ];
54
- /** @nocollapse */ SessionStorageService.ngInjectableDef = i0.defineInjectable({ factory: function SessionStorageService_Factory() { return new SessionStorageService(); }, token: SessionStorageService, providedIn: "root" });
55
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2Vzc2lvbi1zdG9yYWdlLnNlcnZpY2UuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AaG1jdHMvcnB4LXh1aS1jb21tb24tbGliLyIsInNvdXJjZXMiOlsibGliL3NlcnZpY2VzL3Nlc3Npb24tc3RvcmFnZS9zZXNzaW9uLXN0b3JhZ2Uuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7O0FBSzNDLE1BQU0sT0FBTyxxQkFBcUI7Ozs7Ozs7O0lBT3pCLE9BQU8sQ0FBQyxHQUFXLEVBQUUsa0JBQTJCLEtBQUs7O2NBQ3BELElBQUksR0FBRyxjQUFjLENBQUMsT0FBTyxDQUFDLEdBQUcsQ0FBQztRQUV4QyxJQUFJLGVBQWUsRUFBRTtZQUFFLElBQUksQ0FBQyxVQUFVLENBQUMsR0FBRyxDQUFDLENBQUM7U0FBRTtRQUU5QyxPQUFPLElBQUksQ0FBQztJQUNkLENBQUM7Ozs7Ozs7SUFLTSxPQUFPLENBQUMsR0FBVyxFQUFFLEtBQWE7UUFDdkMsY0FBYyxDQUFDLE9BQU8sQ0FBQyxHQUFHLEVBQUUsS0FBSyxDQUFDLENBQUM7SUFDckMsQ0FBQzs7Ozs7O0lBS00sVUFBVSxDQUFDLEdBQVc7UUFDM0IsY0FBYyxDQUFDLFVBQVUsQ0FBQyxHQUFHLENBQUMsQ0FBQztJQUNqQyxDQUFDOzs7OztJQUtNLEtBQUs7UUFDVixjQUFjLENBQUMsS0FBSyxFQUFFLENBQUM7SUFDekIsQ0FBQzs7O1lBckNGLFVBQVUsU0FBQztnQkFDVixVQUFVLEVBQUUsTUFBTTthQUNuQiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEluamVjdGFibGUgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcblxuQEluamVjdGFibGUoe1xuICBwcm92aWRlZEluOiAncm9vdCdcbn0pXG5leHBvcnQgY2xhc3MgU2Vzc2lvblN0b3JhZ2VTZXJ2aWNlIHtcblxuICAvKipcbiAgICogR2V0IGFuIGl0ZW0gZnJvbSB0aGUgc2Vzc2lvbiBzdG9yYWdlLlxuICAgKiBJZiByZW1vdmUgaXMgdHJ1ZSwgdGhlIGl0ZW0gd2lsbCBiZSByZW1vdmVkIG9uY2UgcmVhZFxuICAgKiBAcGFyYW0gcmVtb3ZlQWZ0ZXJSZWFkIHJlbW92ZWQgdGhlIGtleSBvbmNlIGl0IGhhcyBiZWVuIHJlYWRcbiAgICovXG4gIHB1YmxpYyBnZXRJdGVtKGtleTogc3RyaW5nLCByZW1vdmVBZnRlclJlYWQ6IGJvb2xlYW4gPSBmYWxzZSk6IHN0cmluZyB7XG4gICAgY29uc3QgaXRlbSA9IHNlc3Npb25TdG9yYWdlLmdldEl0ZW0oa2V5KTtcblxuICAgIGlmIChyZW1vdmVBZnRlclJlYWQpIHsgdGhpcy5yZW1vdmVJdGVtKGtleSk7IH1cblxuICAgIHJldHVybiBpdGVtO1xuICB9XG5cbiAgLyoqXG4gICAqIFNldCBhbiBpdGVtIGluIHRoZSBzZXNzaW9uIHN0b3JhZ2UuXG4gICAqL1xuICBwdWJsaWMgc2V0SXRlbShrZXk6IHN0cmluZywgdmFsdWU6IHN0cmluZyk6IHZvaWQge1xuICAgIHNlc3Npb25TdG9yYWdlLnNldEl0ZW0oa2V5LCB2YWx1ZSk7XG4gIH1cblxuICAvKipcbiAgICogUmVtb3ZlIGFuIGl0ZW0gaW4gdGhlIHNlc3Npb24gc3RvcmFnZS5cbiAgICovXG4gIHB1YmxpYyByZW1vdmVJdGVtKGtleTogc3RyaW5nKTogdm9pZCB7XG4gICAgc2Vzc2lvblN0b3JhZ2UucmVtb3ZlSXRlbShrZXkpO1xuICB9XG5cbiAgLyoqXG4gICAqIENsZWFyIGFsbCB0aGUgaXRlbXMgaGVsZCBpbiBzZXNzaW9uIHN0b3JhZ2UuXG4gICAqL1xuICBwdWJsaWMgY2xlYXIoKTogdm9pZCB7XG4gICAgc2Vzc2lvblN0b3JhZ2UuY2xlYXIoKTtcbiAgfVxufVxuIl19
@@ -1,16 +0,0 @@
1
- /**
2
- * @fileoverview added by tsickle
3
- * Generated from: lib/gov-ui/models/banner-data-model.ts
4
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5
- */
6
- /**
7
- * @record
8
- */
9
- export function BannerDataModel() { }
10
- if (false) {
11
- /** @type {?} */
12
- BannerDataModel.prototype.type;
13
- /** @type {?} */
14
- BannerDataModel.prototype.message;
15
- }
16
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFubmVyLWRhdGEtbW9kZWwuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AaG1jdHMvcnB4LXh1aS1jb21tb24tbGliLyIsInNvdXJjZXMiOlsibGliL2dvdi11aS9tb2RlbHMvYmFubmVyLWRhdGEtbW9kZWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7QUFBQSxxQ0FHQzs7O0lBRkMsK0JBQWE7O0lBQ2Isa0NBQWdCIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGludGVyZmFjZSBCYW5uZXJEYXRhTW9kZWwge1xuICB0eXBlOiBzdHJpbmc7XG4gIG1lc3NhZ2U6IHN0cmluZztcbn1cbiJdfQ==
@@ -1,4 +0,0 @@
1
- export interface BannerDataModel {
2
- type: string;
3
- message: string;
4
- }