@hmcts/rpx-xui-common-lib 1.4.20-reset-button → 1.4.21-case-share-fix-r2

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 (67) hide show
  1. package/bundles/hmcts-rpx-xui-common-lib.umd.js +273 -1198
  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 +23 -27
  6. package/esm2015/lib/components/find-person/find-person.component.js +12 -55
  7. package/esm2015/lib/components/generic-filter/generic-filter.component.js +101 -423
  8. package/esm2015/lib/components/index.js +2 -2
  9. package/esm2015/lib/components/loading-spinner/loading-spinner.component.js +35 -6
  10. package/esm2015/lib/components/public_api.js +1 -3
  11. package/esm2015/lib/components/share-case/share-case.component.js +13 -1
  12. package/esm2015/lib/exui-common-lib.module.js +2 -6
  13. package/esm2015/lib/gov-ui/components/gov-uk-date/gov-uk-date.component.js +2 -3
  14. package/esm2015/lib/gov-ui/components/gov-uk-input/gov-uk-input.component.js +2 -2
  15. package/esm2015/lib/models/filter.model.js +1 -17
  16. package/esm2015/lib/models/index.js +2 -2
  17. package/esm2015/lib/models/person.model.js +1 -29
  18. package/esm2015/lib/services/find-person/find-person.service.js +4 -75
  19. package/esm2015/public-api.js +3 -3
  20. package/esm5/hmcts-rpx-xui-common-lib.js +23 -27
  21. package/esm5/lib/components/find-person/find-person.component.js +12 -59
  22. package/esm5/lib/components/generic-filter/generic-filter.component.js +112 -525
  23. package/esm5/lib/components/index.js +2 -2
  24. package/esm5/lib/components/loading-spinner/loading-spinner.component.js +38 -6
  25. package/esm5/lib/components/public_api.js +1 -3
  26. package/esm5/lib/components/share-case/share-case.component.js +13 -1
  27. package/esm5/lib/exui-common-lib.module.js +2 -6
  28. package/esm5/lib/gov-ui/components/gov-uk-date/gov-uk-date.component.js +2 -3
  29. package/esm5/lib/gov-ui/components/gov-uk-input/gov-uk-input.component.js +2 -2
  30. package/esm5/lib/models/filter.model.js +1 -17
  31. package/esm5/lib/models/index.js +2 -2
  32. package/esm5/lib/models/person.model.js +1 -29
  33. package/esm5/lib/services/find-person/find-person.service.js +4 -84
  34. package/esm5/public-api.js +3 -3
  35. package/fesm2015/hmcts-rpx-xui-common-lib.js +234 -955
  36. package/fesm2015/hmcts-rpx-xui-common-lib.js.map +1 -1
  37. package/fesm5/hmcts-rpx-xui-common-lib.js +363 -1278
  38. package/fesm5/hmcts-rpx-xui-common-lib.js.map +1 -1
  39. package/hmcts-rpx-xui-common-lib.d.ts +21 -25
  40. package/hmcts-rpx-xui-common-lib.metadata.json +1 -1
  41. package/lib/components/find-person/find-person.component.d.ts +4 -7
  42. package/lib/components/generic-filter/generic-filter.component.d.ts +9 -28
  43. package/lib/components/loading-spinner/loading-spinner.component.d.ts +7 -1
  44. package/lib/components/public_api.d.ts +0 -2
  45. package/lib/exui-common-lib.module.d.ts +2 -2
  46. package/lib/models/filter.model.d.ts +1 -10
  47. package/lib/models/person.model.d.ts +0 -15
  48. package/lib/services/find-person/find-person.service.d.ts +2 -7
  49. package/package.json +1 -1
  50. package/esm2015/lib/components/generic-filter/generic-filter-utils.js +0 -46
  51. package/esm2015/lib/components/pagination/pagination.component.js +0 -50
  52. package/esm2015/lib/components/search-location/search-location.component.js +0 -198
  53. package/esm2015/lib/models/location.model.js +0 -108
  54. package/esm2015/lib/services/locations/location.service.js +0 -45
  55. package/esm2015/lib/services/session-storage/session-storage.service.js +0 -55
  56. package/esm5/lib/components/generic-filter/generic-filter-utils.js +0 -46
  57. package/esm5/lib/components/pagination/pagination.component.js +0 -58
  58. package/esm5/lib/components/search-location/search-location.component.js +0 -233
  59. package/esm5/lib/models/location.model.js +0 -108
  60. package/esm5/lib/services/locations/location.service.js +0 -58
  61. package/esm5/lib/services/session-storage/session-storage.service.js +0 -96
  62. package/lib/components/generic-filter/generic-filter-utils.d.ts +0 -3
  63. package/lib/components/pagination/pagination.component.d.ts +0 -10
  64. package/lib/components/search-location/search-location.component.d.ts +0 -30
  65. package/lib/models/location.model.d.ts +0 -49
  66. package/lib/services/locations/location.service.d.ts +0 -15
  67. package/lib/services/session-storage/session-storage.service.d.ts +0 -20
@@ -795,58 +795,16 @@
795
795
  return FilterService;
796
796
  }());
797
797
 
798
- /**
799
- * @fileoverview added by tsickle
800
- * Generated from: lib/components/generic-filter/generic-filter-utils.ts
801
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
802
- */
803
- /**
804
- * @template T
805
- * @param {?} min
806
- * @return {?}
807
- */
808
- function minSelectedValidator(min) {
809
- return ( /**
810
- * @param {?} control
811
- * @return {?}
812
- */function (control) {
813
- /** @type {?} */
814
- var values = ( /** @type {?} */(control.value));
815
- return values.length && values.filter(( /**
816
- * @param {?} value
817
- * @return {?}
818
- */function (value) { return value; })).length >= min ? null : { minLength: true };
819
- });
820
- }
821
- /**
822
- * @template T
823
- * @param {?} max
824
- * @return {?}
825
- */
826
- function maxSelectedValidator(max) {
827
- return ( /**
828
- * @param {?} control
829
- * @return {?}
830
- */function (control) {
831
- /** @type {?} */
832
- var values = ( /** @type {?} */(control.value));
833
- return values.length && values.filter(( /**
834
- * @param {?} value
835
- * @return {?}
836
- */function (value) { return value; })).length <= max ? null : { maxLength: true };
837
- });
838
- }
839
-
840
798
  /**
841
799
  * @fileoverview added by tsickle
842
800
  * Generated from: lib/components/generic-filter/generic-filter.component.ts
843
801
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
844
802
  */
845
803
  var GenericFilterComponent = /** @class */ (function () {
846
- function GenericFilterComponent(filterService, fb) {
804
+ function GenericFilterComponent(filterService) {
847
805
  this.filterService = filterService;
848
- this.fb = fb;
849
- this.submitted = false;
806
+ this.selected = [];
807
+ this.hasErrors = false;
850
808
  }
851
809
  Object.defineProperty(GenericFilterComponent.prototype, "config", {
852
810
  get: /**
@@ -891,196 +849,13 @@
891
849
  /**
892
850
  * @return {?}
893
851
  */
894
- GenericFilterComponent.prototype.ngOnInit = /**
895
- * @return {?}
896
- */
897
- function () {
898
- var _this = this;
899
- if (!this.settings) {
900
- this.getSettings();
901
- }
902
- this.mergeDefaultFields(this.settings);
903
- this.buildForm(this.config, this.settings);
904
- this.formSub = this.form.valueChanges.subscribe(( /**
905
- * @return {?}
906
- */function () { return _this.submitted = false; }));
907
- };
908
- /**
909
- * @return {?}
910
- */
911
- GenericFilterComponent.prototype.ngOnDestroy = /**
912
- * @return {?}
913
- */
914
- function () {
915
- if (this.formSub) {
916
- this.formSub.unsubscribe();
917
- }
918
- };
919
- /**
920
- * @param {?} field
921
- * @param {?} form
922
- * @return {?}
923
- */
924
- GenericFilterComponent.prototype.hidden = /**
925
- * @param {?} field
926
- * @param {?} form
927
- * @return {?}
928
- */
929
- function (field, form) {
930
- if (!field.showCondition) {
931
- return false;
932
- }
933
- if (typeof field.showCondition === 'string') {
934
- /** @type {?} */
935
- var control = ( /** @type {?} */(form.get(field.name)));
936
- var _a = __read(field.showCondition.split('='), 2), name_1 = _a[0], value = _a[1];
937
- if (form.value && form.value[name_1] === value) {
938
- if (field.type === 'find-person') {
939
- control.get('email').setValidators(forms.Validators.required);
940
- control.get('email').updateValueAndValidity();
941
- }
942
- else {
943
- control.setValidators(forms.Validators.required);
944
- control.updateValueAndValidity();
945
- }
946
- return false;
947
- }
948
- else {
949
- if (field.type === 'find-person') {
950
- control.get('email').clearValidators();
951
- control.get('email').updateValueAndValidity();
952
- }
953
- else {
954
- control.clearValidators();
955
- control.updateValueAndValidity();
956
- }
957
- }
958
- }
959
- return true;
960
- };
961
- /**
962
- * @param {?} field
963
- * @param {?} form
964
- * @return {?}
965
- */
966
- GenericFilterComponent.prototype.disabled = /**
967
- * @param {?} field
968
- * @param {?} form
969
- * @return {?}
970
- */
971
- function (field, form) {
972
- if (!field.enableCondition) {
973
- return null;
974
- }
975
- if (typeof field.enableCondition === 'string') {
976
- /** @type {?} */
977
- var control = ( /** @type {?} */(form.get(field.name)));
978
- var _a = __read(field.enableCondition.split('='), 2), name_2 = _a[0], value = _a[1];
979
- if (form.value && form.value[name_2] === value) {
980
- if (field.type === 'find-person') {
981
- control.get('email').setValidators(forms.Validators.required);
982
- control.get('email').updateValueAndValidity();
983
- }
984
- else {
985
- control.setValidators(forms.Validators.required);
986
- control.updateValueAndValidity();
987
- }
988
- return null;
989
- }
990
- else {
991
- if (field.type === 'find-person') {
992
- control.get('email').clearValidators();
993
- control.get('email').updateValueAndValidity();
994
- }
995
- else {
996
- control.clearValidators();
997
- control.updateValueAndValidity();
998
- }
999
- }
1000
- }
1001
- return true;
1002
- };
1003
- /**
1004
- * @param {?} form
1005
- * @return {?}
1006
- */
1007
852
  GenericFilterComponent.prototype.applyFilter = /**
1008
- * @param {?} form
1009
853
  * @return {?}
1010
854
  */
1011
- function (form) {
1012
- this.submitted = true;
1013
- form.markAsTouched();
1014
- if (form.valid) {
1015
- this._settings = {
1016
- id: this.config.id,
1017
- fields: this.getSelectedValues(form.value, this.config)
1018
- };
855
+ function () {
856
+ if (!this.checkFieldsConstraints(this.selected)) {
1019
857
  this.filterService.givenErrors.next(null);
1020
- /** @type {?} */
1021
- var settings = __assign({}, this.settings, { reset: false });
1022
- this.filterService.persist(settings, this.config.persistence);
1023
- }
1024
- else {
1025
- this.emitFormErrors(form);
1026
- }
1027
- };
1028
- // when domain changes ensure that person field is reset
1029
- // when domain changes ensure that person field is reset
1030
- /**
1031
- * @param {?} field
1032
- * @param {?} form
1033
- * @return {?}
1034
- */
1035
- GenericFilterComponent.prototype.selectChanged =
1036
- // when domain changes ensure that person field is reset
1037
- /**
1038
- * @param {?} field
1039
- * @param {?} form
1040
- * @return {?}
1041
- */
1042
- function (field, form) {
1043
- if (field.findPersonField) {
1044
- /** @type {?} */
1045
- var currentField = this.config.fields.find(( /**
1046
- * @param {?} f
1047
- * @return {?}
1048
- */function (f) { return f.name === field.findPersonField; }));
1049
- if (currentField) {
1050
- currentField.domain = form.get(field.name).value;
1051
- }
1052
- this.removePersonField(field);
1053
- }
1054
- };
1055
- /**
1056
- * @param {?} field
1057
- * @return {?}
1058
- */
1059
- GenericFilterComponent.prototype.radiosChanged = /**
1060
- * @param {?} field
1061
- * @return {?}
1062
- */
1063
- function (field) {
1064
- if (field.findPersonField) {
1065
- this.form.get('findPersonControl').setValue(null);
1066
- this.removePersonField(field);
1067
- }
1068
- };
1069
- /**
1070
- * @param {?} field
1071
- * @return {?}
1072
- */
1073
- GenericFilterComponent.prototype.removePersonField = /**
1074
- * @param {?} field
1075
- * @return {?}
1076
- */
1077
- function (field) {
1078
- if (this.form.get(field.findPersonField)) {
1079
- this.form.get(field.findPersonField).get('domain').setValue(null);
1080
- this.form.get(field.findPersonField).get('email').setValue(null);
1081
- this.form.get(field.findPersonField).get('id').setValue(null);
1082
- this.form.get(field.findPersonField).get('name').setValue(null);
1083
- this.form.get(field.findPersonField).get('knownAs').setValue(null);
858
+ this.filterService.persist(this.settings, this.config.persistence);
1084
859
  }
1085
860
  };
1086
861
  /**
@@ -1090,129 +865,81 @@
1090
865
  * @return {?}
1091
866
  */
1092
867
  function () {
1093
- this.buildForm(this.config, this.settings, true);
1094
- if (this.config && this.config.cancelSetting) {
1095
- this._settings.fields = JSON.parse(JSON.stringify(this.config.cancelSetting.fields));
1096
- }
1097
868
  /** @type {?} */
1098
- var settings = __assign({}, this.settings, { reset: true });
1099
- this.filterService.persist(settings, this.config.persistence);
1100
- this.filterService.givenErrors.next(null);
869
+ var cancelFields = JSON.parse(JSON.stringify(this.config.cancelSetting.fields));
870
+ this._settings.fields = cancelFields;
871
+ this.selected = cancelFields;
872
+ this.applyFilter();
1101
873
  };
1102
874
  /**
1103
- * @param {?} values
1104
- * @param {?} field
875
+ * @param {?} id
876
+ * @param {?} key
1105
877
  * @return {?}
1106
878
  */
1107
- GenericFilterComponent.prototype.updatePersonControls = /**
1108
- * @param {?} values
1109
- * @param {?} field
879
+ GenericFilterComponent.prototype.isSelected = /**
880
+ * @param {?} id
881
+ * @param {?} key
1110
882
  * @return {?}
1111
883
  */
1112
- function (values, field) {
1113
- var e_1, _a;
1114
- /** @type {?} */
1115
- var keys = Object.keys(values);
1116
- try {
1117
- for (var keys_1 = __values(keys), keys_1_1 = keys_1.next(); !keys_1_1.done; keys_1_1 = keys_1.next()) {
1118
- var key = keys_1_1.value;
1119
- if (this.form.get(field.name) && this.form.get(field.name).get(key)) {
1120
- this.form.get(field.name).get(key).patchValue(values[key]);
1121
- }
1122
- }
1123
- }
1124
- catch (e_1_1) {
1125
- e_1 = { error: e_1_1 };
1126
- }
1127
- finally {
1128
- try {
1129
- if (keys_1_1 && !keys_1_1.done && (_a = keys_1.return))
1130
- _a.call(keys_1);
1131
- }
1132
- finally {
1133
- if (e_1)
1134
- throw e_1.error;
1135
- }
884
+ function (id, key) {
885
+ if (this.settings) {
886
+ return this.settings.fields.some(( /**
887
+ * @param {?} x
888
+ * @return {?}
889
+ */function (x) { return x.name === id; })) && this.settings.fields.some(( /**
890
+ * @param {?} x
891
+ * @return {?}
892
+ */function (x) {
893
+ return x.value.some(( /**
894
+ * @param {?} v
895
+ * @return {?}
896
+ */function (v) { return v === key; }));
897
+ }));
1136
898
  }
899
+ return false;
1137
900
  };
1138
901
  /**
1139
902
  * @param {?} event
1140
- * @param {?} form
1141
- * @param {?} item
1142
- * @param {?} field
1143
903
  * @return {?}
1144
904
  */
1145
- GenericFilterComponent.prototype.toggleSelectAll = /**
905
+ GenericFilterComponent.prototype.onSelectionChange = /**
1146
906
  * @param {?} event
1147
- * @param {?} form
1148
- * @param {?} item
1149
- * @param {?} field
1150
907
  * @return {?}
1151
908
  */
1152
- function (event, form, item, field) {
909
+ function (event) {
1153
910
  /** @type {?} */
1154
- var isChecked = event.target.checked;
911
+ var input = ( /** @type {?} */(event.target));
1155
912
  /** @type {?} */
1156
- var formArray = ( /** @type {?} */(form.get(field.name)));
1157
- if (!item.selectAll) {
1158
- /** @type {?} */
1159
- var allChecked = formArray.controls.every(( /**
1160
- * @param {?} control
1161
- * @return {?}
1162
- */function (control) { return control.value; }));
1163
- /** @type {?} */
1164
- var index_1 = null;
1165
- /** @type {?} */
1166
- var hasSelectAllOption = field.options.find(( /**
1167
- * @param {?} option
1168
- * @param {?} i
1169
- * @return {?}
1170
- */function (option, i) {
1171
- if (option.hasOwnProperty('selectAll')) {
1172
- index_1 = i;
1173
- return true;
1174
- }
1175
- return false;
1176
- }));
1177
- // tslint:disable-next-line:variable-name
1178
- /** @type {?} */
1179
- var isAllCheckedExcludingTheSelectAllOption = formArray.controls.filter(( /**
1180
- * @param {?} _control
1181
- * @param {?} i
1182
- * @return {?}
1183
- */function (_control, i) { return i !== index_1; }))
1184
- .every(( /**
1185
- * @param {?} control
913
+ var fieldName = input.getAttribute('field');
914
+ /** @type {?} */
915
+ var match = this.selected.find(( /**
916
+ * @param {?} x
1186
917
  * @return {?}
1187
- */function (control) { return control.value; }));
1188
- if (!allChecked && hasSelectAllOption && !isChecked) {
1189
- formArray.controls.forEach(( /**
1190
- * @param {?} control
1191
- * @param {?} i
1192
- * @return {?}
1193
- */function (control, i) {
1194
- if (index_1 === i) {
1195
- control.patchValue(false);
1196
- return;
918
+ */function (x) { return x.name === fieldName; }));
919
+ if (match) {
920
+ if (input.type === 'checkbox') {
921
+ if (input.checked) {
922
+ match.value.push(input.value);
923
+ }
924
+ else {
925
+ /** @type {?} */
926
+ var index = match.value.indexOf(input.value);
927
+ if (index !== -1) {
928
+ match.value.splice(index, 1);
1197
929
  }
1198
- }));
1199
- }
1200
- else if (hasSelectAllOption && !allChecked && isChecked && isAllCheckedExcludingTheSelectAllOption) {
1201
- formArray.controls[index_1].patchValue(true);
1202
- }
1203
- return;
1204
- }
1205
- formArray.controls.forEach(( /**
1206
- * @param {?} control
1207
- * @return {?}
1208
- */function (control) {
1209
- if (isChecked) {
1210
- control.patchValue(true);
930
+ }
1211
931
  }
1212
932
  else {
1213
- control.patchValue(false);
933
+ match.value = [input.value];
1214
934
  }
1215
- }));
935
+ }
936
+ else {
937
+ this.selected.push({ name: fieldName, value: [input.value] });
938
+ }
939
+ this._settings = {
940
+ id: this.config.id,
941
+ fields: this.selected
942
+ };
1216
943
  };
1217
944
  /**
1218
945
  * @private
@@ -1225,15 +952,10 @@
1225
952
  * @return {?}
1226
953
  */
1227
954
  function (filter) {
1228
- if (filter) {
1229
- filter.fields = this.filterService.get(this.config.id) ? this.filterService.get(this.config.id).fields : filter.fields;
1230
- }
1231
- else if (this.config && this.config.cancelSetting) {
1232
- this._settings = {
1233
- id: this.config.id,
1234
- fields: JSON.parse(JSON.stringify(this.config.cancelSetting.fields))
1235
- };
1236
- }
955
+ /** @type {?} */
956
+ var fields = this.filterService.get(this.config.id) ? this.filterService.get(this.config.id).fields : filter.fields;
957
+ this.selected = fields;
958
+ filter.fields = fields;
1237
959
  };
1238
960
  /**
1239
961
  * @private
@@ -1248,236 +970,59 @@
1248
970
  };
1249
971
  /**
1250
972
  * @private
1251
- * @param {?} config
1252
- * @param {?} settings
1253
- * @param {?=} reset
973
+ * @param {?} selected
1254
974
  * @return {?}
1255
975
  */
1256
- GenericFilterComponent.prototype.buildForm = /**
976
+ GenericFilterComponent.prototype.checkFieldsConstraints = /**
1257
977
  * @private
1258
- * @param {?} config
1259
- * @param {?} settings
1260
- * @param {?=} reset
978
+ * @param {?} selected
1261
979
  * @return {?}
1262
980
  */
1263
- function (config, settings, reset) {
1264
- var e_2, _a;
981
+ function (selected) {
982
+ var e_1, _a;
1265
983
  /** @type {?} */
1266
- var findPersonControl = this.form ? this.form.get('findPersonControl') : null;
1267
- this.form = this.fb.group({});
1268
- if (findPersonControl) {
1269
- // in order to maintain find person component, control needs to be kept
1270
- this.form.addControl('findPersonControl', findPersonControl);
1271
- }
1272
- var _loop_1 = function (field) {
1273
- if (field.type === 'checkbox') {
984
+ var hasErrors = false;
985
+ var _loop_1 = function (fieldConstraint) {
986
+ if (fieldConstraint.minSelected > 0 || fieldConstraint.maxSelected > 0) {
1274
987
  /** @type {?} */
1275
- var formArray = this_1.buildCheckBoxFormArray(field, settings);
1276
- this_1.form.addControl(field.name, formArray);
1277
- }
1278
- else {
1279
- /** @type {?} */
1280
- var validators = [];
1281
- if (field.minSelected && field.minSelected > 0) {
1282
- validators.push(forms.Validators.required);
1283
- }
1284
- /** @type {?} */
1285
- var defaultValue = null;
1286
- if (reset && config.cancelSetting) {
1287
- /** @type {?} */
1288
- var cancelField = config.cancelSetting.fields.find(( /**
1289
- * @param {?} f
1290
- * @return {?}
1291
- */function (f) { return f.name === field.name; }));
1292
- defaultValue = cancelField && cancelField.value ? cancelField.value[0] : '';
1293
- }
1294
- else if (settings && settings.fields) {
1295
- /** @type {?} */
1296
- var lastSavedValue = settings.fields.find(( /**
1297
- * @param {?} f
1298
- * @return {?}
1299
- */function (f) { return f.name === field.name; }));
1300
- defaultValue = lastSavedValue && lastSavedValue ? lastSavedValue.value[0] : '';
1301
- }
1302
- // if field is find-person build a form group;
1303
- if (field.type === 'find-person') {
1304
- /** @type {?} */
1305
- var formGroup = new forms.FormGroup({
1306
- domain: new forms.FormControl(''),
1307
- email: new forms.FormControl(defaultValue && defaultValue.hasOwnProperty('email') ? defaultValue.email : '', validators),
1308
- id: new forms.FormControl(''),
1309
- name: new forms.FormControl(''),
1310
- knownAs: new forms.FormControl(''),
1311
- });
1312
- this_1.form.addControl(field.name, formGroup);
988
+ var field = selected.find(( /**
989
+ * @param {?} f
990
+ * @return {?}
991
+ */function (f) { return f.name === fieldConstraint.name; }));
992
+ if (!field) {
993
+ // display error for minimum selected
994
+ fieldConstraint.displayMinSelectedError = true;
995
+ hasErrors = true;
996
+ this_1.filterService.givenErrors.next(fieldConstraint.minSelectedError);
997
+ return "continue";
1313
998
  }
1314
- else {
1315
- /** @type {?} */
1316
- var control = new forms.FormControl(defaultValue, validators);
1317
- this_1.form.addControl(field.name, control);
999
+ if (field.value.length > fieldConstraint.maxSelected) {
1000
+ // display error for maximum selected
1001
+ fieldConstraint.displayMaxSelectedError = true;
1002
+ hasErrors = true;
1003
+ this_1.filterService.givenErrors.next(fieldConstraint.maxSelectedError);
1004
+ return "continue";
1318
1005
  }
1319
- // if field updates find person component set the initial domain
1320
- if (field.findPersonField) {
1321
- this_1.selectChanged(field, this_1.form);
1006
+ if (field.value.length < fieldConstraint.minSelected) {
1007
+ // display error for minimum selected
1008
+ fieldConstraint.displayMinSelectedError = true;
1009
+ hasErrors = true;
1010
+ this_1.filterService.givenErrors.next(fieldConstraint.minSelectedError);
1011
+ return "continue";
1322
1012
  }
1013
+ fieldConstraint.displayMinSelectedError = false;
1014
+ fieldConstraint.displayMaxSelectedError = false;
1323
1015
  }
1324
1016
  };
1325
1017
  var this_1 = this;
1326
- try {
1327
- for (var _b = __values(config.fields), _c = _b.next(); !_c.done; _c = _b.next()) {
1328
- var field = _c.value;
1329
- _loop_1(field);
1330
- }
1331
- }
1332
- catch (e_2_1) {
1333
- e_2 = { error: e_2_1 };
1334
- }
1335
- finally {
1336
- try {
1337
- if (_c && !_c.done && (_a = _b.return))
1338
- _a.call(_b);
1339
- }
1340
- finally {
1341
- if (e_2)
1342
- throw e_2.error;
1343
- }
1344
- }
1345
- };
1346
- /**
1347
- * @private
1348
- * @param {?} field
1349
- * @param {?} settings
1350
- * @return {?}
1351
- */
1352
- GenericFilterComponent.prototype.buildCheckBoxFormArray = /**
1353
- * @private
1354
- * @param {?} field
1355
- * @param {?} settings
1356
- * @return {?}
1357
- */
1358
- function (field, settings) {
1359
- var e_3, _a;
1360
- /** @type {?} */
1361
- var validators = [];
1362
- if (field && field.minSelected) {
1363
- validators.push(minSelectedValidator(field.minSelected));
1364
- }
1365
- if (field && field.maxSelected) {
1366
- validators.push(maxSelectedValidator(field.maxSelected));
1367
- }
1368
- /** @type {?} */
1369
- var formArray = this.fb.array([], validators);
1370
- /** @type {?} */
1371
- var defaultValues;
1372
- if (settings && settings.fields) {
1373
- defaultValues = settings.fields.find(( /**
1374
- * @param {?} f
1375
- * @return {?}
1376
- */function (f) { return f.name === field.name; }));
1377
- }
1378
- var _loop_2 = function (option) {
1379
- /** @type {?} */
1380
- var checked = false;
1381
- if (defaultValues && Array.isArray(defaultValues.value)) {
1382
- checked = !!defaultValues.value.find(( /**
1383
- * @param {?} value
1384
- * @return {?}
1385
- */function (value) { return value === option.key; }));
1386
- }
1387
- formArray.push(new forms.FormControl(checked));
1388
- };
1389
- try {
1390
- for (var _b = __values(field.options), _c = _b.next(); !_c.done; _c = _b.next()) {
1391
- var option = _c.value;
1392
- _loop_2(option);
1393
- }
1394
- }
1395
- catch (e_3_1) {
1396
- e_3 = { error: e_3_1 };
1397
- }
1398
- finally {
1399
- try {
1400
- if (_c && !_c.done && (_a = _b.return))
1401
- _a.call(_b);
1402
- }
1403
- finally {
1404
- if (e_3)
1405
- throw e_3.error;
1406
- }
1407
- }
1408
- return formArray;
1409
- };
1410
- /**
1411
- * @private
1412
- * @param {?} formValues
1413
- * @param {?} config
1414
- * @return {?}
1415
- */
1416
- GenericFilterComponent.prototype.getSelectedValues = /**
1417
- * @private
1418
- * @param {?} formValues
1419
- * @param {?} config
1420
- * @return {?}
1421
- */
1422
- function (formValues, config) {
1423
- return Object.keys(formValues).map(( /**
1424
- * @param {?} name
1425
- * @return {?}
1426
- */function (name) {
1427
- /** @type {?} */
1428
- var values = formValues[name];
1429
- if (Array.isArray(values)) {
1430
- /** @type {?} */
1431
- var field = config.fields.find(( /**
1432
- * @param {?} f
1433
- * @return {?}
1434
- */function (f) { return f.name === name; }));
1435
- /** @type {?} */
1436
- var realValues = field.options.reduce(( /**
1437
- * @param {?} acc
1438
- * @param {?} option
1439
- * @param {?} index
1440
- * @return {?}
1441
- */function (acc, option, index) {
1442
- if (values[index]) {
1443
- return __spread(acc, [option.key]);
1444
- }
1445
- return acc;
1446
- }), []);
1447
- return { value: realValues, name: name };
1448
- }
1449
- else {
1450
- return { value: [values], name: name };
1451
- }
1452
- }));
1453
- };
1454
- /**
1455
- * @private
1456
- * @param {?} form
1457
- * @return {?}
1458
- */
1459
- GenericFilterComponent.prototype.emitFormErrors = /**
1460
- * @private
1461
- * @param {?} form
1462
- * @return {?}
1463
- */
1464
- function (form) {
1465
- var e_4, _a;
1466
1018
  try {
1467
1019
  for (var _b = __values(this.config.fields), _c = _b.next(); !_c.done; _c = _b.next()) {
1468
- var field = _c.value;
1469
- /** @type {?} */
1470
- var formGroup = form.get(field.name);
1471
- if (formGroup && formGroup.errors && formGroup.errors.minLength) {
1472
- this.filterService.givenErrors.next(field.minSelectedError);
1473
- }
1474
- if (formGroup && formGroup.errors && formGroup.errors.maxLength) {
1475
- this.filterService.givenErrors.next(field.maxSelectedError);
1476
- }
1020
+ var fieldConstraint = _c.value;
1021
+ _loop_1(fieldConstraint);
1477
1022
  }
1478
1023
  }
1479
- catch (e_4_1) {
1480
- e_4 = { error: e_4_1 };
1024
+ catch (e_1_1) {
1025
+ e_1 = { error: e_1_1 };
1481
1026
  }
1482
1027
  finally {
1483
1028
  try {
@@ -1485,25 +1030,25 @@
1485
1030
  _a.call(_b);
1486
1031
  }
1487
1032
  finally {
1488
- if (e_4)
1489
- throw e_4.error;
1033
+ if (e_1)
1034
+ throw e_1.error;
1490
1035
  }
1491
1036
  }
1037
+ return hasErrors;
1492
1038
  };
1493
1039
  GenericFilterComponent.decorators = [
1494
1040
  { type: i0.Component, args: [{
1495
1041
  selector: 'xuilib-generic-filter',
1496
- template: "<form [formGroup]=\"form\" (ngSubmit)=\"applyFilter(form)\">\n <div class=\"contain-classes\" *ngFor=\"let field of config.fields\">\n <hr *ngIf=\"field.lineBreakBefore\" class=\"govuk-section-break govuk-section-break--visible elevated-break\">\n <div class=\"govuk-form-group xui-generic-filter\"\n [hidden]=\"hidden(field, form)\"\n [ngClass]=\"{'form-group-error': submitted && (form.get(field.name).errors?.minLength || form.get(field.name).errors?.maxLength)}\">\n <h3 *ngIf=\"field.title\" class=\"govuk-heading-s\">{{field.title}}</h3>\n <p class=\"govuk-body\" *ngIf=\"field.subTitle\">{{field.subTitle}}</p>\n <span [id]=\"field.name + '-error'\" class=\"govuk-error-message\" *ngIf=\"field.displayMinSelectedError && submitted && form.get(field.name).errors?.minLength\">\n <span class=\"govuk-visually-hidden\">Error:</span> {{field.minSelectedError}}\n </span>\n <span [id]=\"field.name + '-error'\" class=\"govuk-error-message\" *ngIf=\"field.displayMaxSelectedError && submitted && form.get(field.name).errors?.maxLength\">\n <span class=\"govuk-visually-hidden\">Error:</span> {{field.maxSelectedError}}\n </span>\n <div class=\"govuk-body\" [ngSwitch]=\"field.type\">\n <ng-container *ngSwitchCase=\"'select'\">\n <select class=\"govuk-select\" (change)=\"selectChanged(field, form)\" [attr.disabled]=\"disabled(field, form)\" [name]=\"'select_' + field.name\" [id]=\"'select_' + field.name\" [formControlName]=\"field.name\">\n <option disabled selected hidden value=\"\">{{field.disabledText}}</option>\n <option class=\"govuk-radios__item\" *ngFor=\"let item of field.options\" [value]=\"item.key\">{{item.label}}</option>\n </select>\n </ng-container>\n <ng-container *ngSwitchCase=\"'checkbox'\">\n <div class=\"govuk-checkboxes govuk-checkboxes--small\" [formGroupName]=\"field.name\" [attr.field]=\"field.name\" [id]=\"'checkbox_' + field.name\">\n <div *ngFor=\"let item of field.options; let i = index\" class=\"govuk-checkboxes__item\">\n <input type=\"checkbox\" class=\"govuk-checkboxes__input\"\n [attr.disabled]=\"disabled(field, form)\"\n [formControlName]=\"i\"\n (change)=\"toggleSelectAll($event, form, item, field)\"\n [value]=\"item.key\" [id]=\"'checkbox_' + item.key\"\n [name]=\"'checkbox_' + item.key\"\n />\n <label\n [for]=\"'checkbox_' + item.key\"\n class=\"govuk-label govuk-checkboxes__label\"\n [ngClass]=\"{'govuk-!-font-weight-bold': item.selectAll}\"\n >{{item.label}}</label>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'radio'\">\n <div class=\"govuk-radios\">\n <div *ngFor=\"let item of field.options\" class=\"govuk-radios__item\">\n <input type=\"radio\"\n [formControlName]=\"field.name\"\n [id]=\"'radio_' + item.key\"\n [attr.disabled]=\"disabled(field, form)\"\n [checked]=\"item.key === form.get(field.name).value\"\n class=\"govuk-radios__input\"\n [value]=\"item.key\"\n (change)=\"radiosChanged(field)\"\n />\n <label [for]=\"'radio_' + item.key\" class=\"govuk-label govuk-radios__label\">{{item.label}}</label>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'find-person'\">\n <xuilib-find-person subTitle=\"\" (personSelected)=\"updatePersonControls($event, field)\"\n [submitted]=\"submitted\"\n [disabled]=\"disabled(field, form)\"\n [domain]=\"field.domain\"\n [findPersonGroup]=\"form\"\n [selectedPerson]=\"form.get(field.name)?.value?.email\"\n ></xuilib-find-person>\n </ng-container>\n </div>\n </div>\n </div>\n <hr class=\"govuk-section-break govuk-section-break--m govuk-section-break--visible\"/>\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-full\">\n <button\n class=\"govuk-button govuk-!-margin-right-1 govuk-!-margin-bottom-0\"\n type=\"submit\"\n id=\"applyFilter\"\n [disabled]=\"config.enableDisabledButton && form.invalid\"\n >{{config.applyButtonText || 'Apply'}}</button>\n <button\n class=\"govuk-button govuk-button--secondary govuk-!-margin-bottom-0\"\n type=\"button\"\n id=\"cancelFilter\"\n (click)=\"cancelFilter()\">{{ config.cancelButtonText || 'Cancel'}}</button>\n </div>\n </div>\n</form>\n",
1042
+ template: "<div class=\"govuk-form-group\">\n <div class=\"xui-generic-filter\" *ngFor=\"let field of config.fields\">\n <div class=\"govuk-form-group\" [ngClass]=\"{'form-group-error': field.displayMinSelectedError || field.displayMaxSelectedError}\">\n <h3 *ngIf=\"field.title\" class=\"govuk-heading-s\">{{field.title}}</h3>\n <p class=\"govuk-body\" *ngIf=\"field.subTitle\">{{field.subTitle}}</p>\n <div class=\"govuk-body\" [ngSwitch]=\"field.type\">\n <ng-container *ngSwitchCase=\"'checkbox'\">\n <div class=\"govuk-checkboxes govuk-checkboxes--small\">\n <div *ngFor=\"let item of field.options\" class=\"govuk-checkboxes__item\">\n <input type=\"checkbox\" [name]=\"'checkbox_' + item.key\" [id]=\"'checkbox_' + item.key\" [value]=\"item.key\" [checked]=\"isSelected(field.name, item.key)\" (change)=\"onSelectionChange($event)\" class=\"govuk-checkboxes__input\" [attr.field]=\"field.name\"/>\n <label [for]=\"'checkbox_' + item.key\" class=\"govuk-label govuk-checkboxes__label\" [attr.field]=\"field.name\">{{item.label}}</label>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'radio'\">\n <div class=\"govuk-radios\">\n <div *ngFor=\"let item of field.options\" class=\"govuk-radios__item\">\n <input type=\"radio\" [name]=\"'radio_' + field.name\" [id]=\"'radio_' + item.key\" [value]=\"item.key\" [checked]=\"isSelected(field.name,item.key)\" (change)=\"onSelectionChange($event)\" class=\"govuk-radios__input\"/>\n <label [for]=\"'radio_' + item.key\" class=\"govuk-label govuk-radios__label\">{{item.label}}</label>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'select'\">\n <select class=\"govuk-select\" [name]=\"'select_' + field.name\" [id]=\"'select_' + field.name\" (change)=\"onSelectionChange($event)\">\n <ng-container *ngFor=\"let item of field.options\">\n <option class=\"govuk-radios__item\" [value]=\"item.key\" [selected]=\"isSelected(field.name,item.key)\">{{item.label}}</option>\n </ng-container>\n </select>\n </ng-container>\n </div>\n </div>\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-full\">\n <hr class=\"govuk-section-break govuk-section-break--m govuk-section-break--visible\"/>\n <button class=\"govuk-button govuk-!-margin-right-1 govuk-!-margin-bottom-0\" type=\"submit\" id=\"applyFilter\" (click)=\"applyFilter()\">{{config.applyButtonText || 'Apply'}}</button>\n <button class=\"govuk-button govuk-button--secondary govuk-!-margin-bottom-0\" id=\"cancelFilter\" (click)=\"cancelFilter()\">{{ config.cancelButtonText || 'Cancel'}}</button>\n </div>\n </div>\n </div>\n</div>\n",
1497
1043
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
1498
1044
  encapsulation: i0.ViewEncapsulation.None,
1499
- styles: [".contain-classes .elevated-break{position:relative;top:-10px}.contain-classes .xui-generic-filter .select-all{margin-bottom:10px}.contain-classes .xui-generic-filter .govuk-checkboxes{display:flex;flex-wrap:wrap}.contain-classes .xui-generic-filter .govuk-checkboxes>div{flex-grow:1;flex-shrink:0}"]
1045
+ styles: [".xui-generic-filter .select-all{margin-bottom:10px}.xui-generic-filter .govuk-checkboxes{display:flex;flex-wrap:wrap}.xui-generic-filter .govuk-checkboxes>div{flex-grow:1;flex-shrink:0;flex-basis:calc(50% - 34px);width:29%}"]
1500
1046
  }] }
1501
1047
  ];
1502
1048
  /** @nocollapse */
1503
1049
  GenericFilterComponent.ctorParameters = function () {
1504
1050
  return [
1505
- { type: FilterService },
1506
- { type: forms.FormBuilder }
1051
+ { type: FilterService }
1507
1052
  ];
1508
1053
  };
1509
1054
  GenericFilterComponent.propDecorators = {
@@ -1629,18 +1174,45 @@
1629
1174
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1630
1175
  */
1631
1176
  var LoadingSpinnerComponent = /** @class */ (function () {
1632
- function LoadingSpinnerComponent() {
1633
- this.loadingText = 'Loading';
1177
+ function LoadingSpinnerComponent(renderer) {
1178
+ this.renderer = renderer;
1179
+ this.zIndex = 1000;
1180
+ this.loadingText = 'Page can take up to 30 seconds to load';
1634
1181
  }
1182
+ /**
1183
+ * @return {?}
1184
+ */
1185
+ LoadingSpinnerComponent.prototype.ngOnInit = /**
1186
+ * @return {?}
1187
+ */
1188
+ function () {
1189
+ this.renderer.addClass(document.body, 'loading-spinner-in-action');
1190
+ };
1191
+ /**
1192
+ * @return {?}
1193
+ */
1194
+ LoadingSpinnerComponent.prototype.ngOnDestroy = /**
1195
+ * @return {?}
1196
+ */
1197
+ function () {
1198
+ this.renderer.removeClass(document.body, 'loading-spinner-in-action');
1199
+ };
1635
1200
  LoadingSpinnerComponent.decorators = [
1636
1201
  { type: i0.Component, args: [{
1637
1202
  selector: 'xuilib-loading-spinner',
1638
- template: "<div class=\"spinner-container\">\n <div class=\"spinner-inner-container\">\n <p>{{loadingText}}</p>\n <div class=\"spinner\" style=\"margin: auto;\"></div>\n </div>\n</div>\n",
1203
+ template: "<div class=\"loading-spinner__overlay\" [ngStyle]=\"{'z-index': zIndex}\">\n <div class=\"loading-spinner__box\" [ngStyle]=\"{'z-index': zIndex + 1}\">\n <div class=\"loading-spinner__fan\">\n <ng-container *ngFor=\"let i of [].constructor(12)\">\n <div></div>\n </ng-container>\n </div>\n <p>{{loadingText}}</p>\n </div>\n</div>",
1639
1204
  encapsulation: i0.ViewEncapsulation.None,
1640
- styles: [".spinner-container{position:fixed;top:0;left:0;height:100%;width:100%;display:flex;justify-content:center;align-items:center;background:rgba(255,255,255,.5);z-index:99}.spinner-container .spinner-inner-container p{text-align:center}.spinner-container .spinner-inner-container .spinner{border:10px solid #ddd;border-top:10px solid #000;border-radius:50%;width:40px;height:40px;-webkit-animation:1s linear infinite spin;animation:1s linear infinite spin}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}"]
1205
+ styles: [".loading-spinner-in-action{overflow:hidden}.loading-spinner-in-action .loading-spinner__overlay{position:fixed;top:0;left:0;bottom:0;right:0;background-color:rgba(255,255,255,.7)}.loading-spinner-in-action .loading-spinner__box{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);text-align:center}.loading-spinner-in-action .loading-spinner__fan{display:inline-block;position:relative;width:64px;height:64px}.loading-spinner-in-action .loading-spinner__fan div{transform-origin:32px 32px;-webkit-animation:1.2s linear infinite lds-spinner;animation:1.2s linear infinite lds-spinner}.loading-spinner-in-action .loading-spinner__fan div:after{content:\" \";display:block;position:absolute;top:3px;left:29px;width:5px;height:14px;border-radius:20%;background:#0b0c0c}.loading-spinner-in-action .loading-spinner__fan div:nth-child(1){transform:rotate(0);-webkit-animation-delay:-1.1s;animation-delay:-1.1s}.loading-spinner-in-action .loading-spinner__fan div:nth-child(2){transform:rotate(30deg);-webkit-animation-delay:-1s;animation-delay:-1s}.loading-spinner-in-action .loading-spinner__fan div:nth-child(3){transform:rotate(60deg);-webkit-animation-delay:-.9s;animation-delay:-.9s}.loading-spinner-in-action .loading-spinner__fan div:nth-child(4){transform:rotate(90deg);-webkit-animation-delay:-.8s;animation-delay:-.8s}.loading-spinner-in-action .loading-spinner__fan div:nth-child(5){transform:rotate(120deg);-webkit-animation-delay:-.7s;animation-delay:-.7s}.loading-spinner-in-action .loading-spinner__fan div:nth-child(6){transform:rotate(150deg);-webkit-animation-delay:-.6s;animation-delay:-.6s}.loading-spinner-in-action .loading-spinner__fan div:nth-child(7){transform:rotate(180deg);-webkit-animation-delay:-.5s;animation-delay:-.5s}.loading-spinner-in-action .loading-spinner__fan div:nth-child(8){transform:rotate(210deg);-webkit-animation-delay:-.4s;animation-delay:-.4s}.loading-spinner-in-action .loading-spinner__fan div:nth-child(9){transform:rotate(240deg);-webkit-animation-delay:-.3s;animation-delay:-.3s}.loading-spinner-in-action .loading-spinner__fan div:nth-child(10){transform:rotate(270deg);-webkit-animation-delay:-.2s;animation-delay:-.2s}.loading-spinner-in-action .loading-spinner__fan div:nth-child(11){transform:rotate(300deg);-webkit-animation-delay:-.1s;animation-delay:-.1s}.loading-spinner-in-action .loading-spinner__fan div:nth-child(12){transform:rotate(330deg);-webkit-animation-delay:0s;animation-delay:0s}@-webkit-keyframes lds-spinner{0%{opacity:1}100%{opacity:0}}@keyframes lds-spinner{0%{opacity:1}100%{opacity:0}}"]
1641
1206
  }] }
1642
1207
  ];
1208
+ /** @nocollapse */
1209
+ LoadingSpinnerComponent.ctorParameters = function () {
1210
+ return [
1211
+ { type: i0.Renderer2 }
1212
+ ];
1213
+ };
1643
1214
  LoadingSpinnerComponent.propDecorators = {
1215
+ zIndex: [{ type: i0.Input }],
1644
1216
  loadingText: [{ type: i0.Input }]
1645
1217
  };
1646
1218
  return LoadingSpinnerComponent;
@@ -2948,6 +2520,18 @@
2948
2520
  * @return {?}
2949
2521
  */
2950
2522
  function (user) {
2523
+ if (user.email) {
2524
+ user.email = user.email.trim();
2525
+ }
2526
+ if (user.firstName) {
2527
+ user.firstName = user.firstName.trim();
2528
+ }
2529
+ if (user.lastName) {
2530
+ user.lastName = user.lastName.trim();
2531
+ }
2532
+ if (user.idamId) {
2533
+ user.idamId = user.idamId.trim();
2534
+ }
2951
2535
  this.selectedUser = user;
2952
2536
  };
2953
2537
  /**
@@ -3486,391 +3070,101 @@
3486
3070
  /**
3487
3071
  * @return {?}
3488
3072
  */
3489
- CookieBannerComponent.prototype.rejectCookie = /**
3490
- * @return {?}
3491
- */
3492
- function () {
3493
- this.cookieService.setCookie(this.identifier, 'false', this.getExpiryDate());
3494
- this.setState(true);
3495
- };
3496
- /**
3497
- * @param {?=} reload
3498
- * @return {?}
3499
- */
3500
- CookieBannerComponent.prototype.setState = /**
3501
- * @param {?=} reload
3502
- * @return {?}
3503
- */
3504
- function (reload) {
3505
- if (reload === void 0) {
3506
- reload = false;
3507
- }
3508
- this.isCookieBannerVisible = !this.cookieService.checkCookie(this.identifier);
3509
- if (this.areCookiesAccepted()) {
3510
- this.notifyAcceptance();
3511
- }
3512
- else {
3513
- this.notifyRejection();
3514
- }
3515
- if (reload) { // reload if any of the buttons are pressed
3516
- this.window.location.reload();
3517
- }
3518
- };
3519
- /**
3520
- * @return {?}
3521
- */
3522
- CookieBannerComponent.prototype.areCookiesAccepted = /**
3523
- * @return {?}
3524
- */
3525
- function () {
3526
- return this.cookieService.checkCookie(this.identifier) && this.cookieService.getCookie(this.identifier) === 'true';
3527
- };
3528
- /**
3529
- * @return {?}
3530
- */
3531
- CookieBannerComponent.prototype.notifyRejection = /**
3532
- * @return {?}
3533
- */
3534
- function () {
3535
- this.rejectionNotifier.emit();
3536
- };
3537
- /**
3538
- * @return {?}
3539
- */
3540
- CookieBannerComponent.prototype.notifyAcceptance = /**
3541
- * @return {?}
3542
- */
3543
- function () {
3544
- this.acceptanceNotifier.emit();
3545
- };
3546
- /**
3547
- * @private
3548
- * @return {?}
3549
- */
3550
- CookieBannerComponent.prototype.getExpiryDate = /**
3551
- * @private
3552
- * @return {?}
3553
- */
3554
- function () {
3555
- /** @type {?} */
3556
- var now = new Date();
3557
- /** @type {?} */
3558
- var time = now.getTime();
3559
- /** @type {?} */
3560
- var expireTime = time + 31536000000;
3561
- now.setTime(expireTime);
3562
- return now.toUTCString();
3563
- };
3564
- CookieBannerComponent.decorators = [
3565
- { type: i0.Component, args: [{
3566
- selector: 'xuilib-cookie-banner',
3567
- template: "<div class=\"govuk-cookie-banner \" role=\"region\" attr.aria-label=\"'Cookies on {{appName}}'\" *ngIf=\"isCookieBannerVisible\">\n <div class=\"govuk-cookie-banner__message govuk-width-container\">\n\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-two-thirds\">\n <h2 class=\"govuk-cookie-banner__heading govuk-heading-m\">Cookies on {{appName}}</h2>\n\n <div class=\"govuk-cookie-banner__content\">\n <p>We use some essential cookies to make this service work.</p>\n <p>We\u2019d also like to use analytics cookies so we can understand how you use the service and make improvements.</p>\n </div>\n </div>\n </div>\n\n <div class=\"govuk-button-group\">\n <button value=\"accept\" type=\"button\" name=\"cookies\" class=\"govuk-button\" data-module=\"govuk-button\" (click)=\"acceptCookie()\">\n Accept analytics cookies\n </button>\n <button value=\"reject\" type=\"button\" name=\"cookies\" class=\"govuk-button\" data-module=\"govuk-button\" (click)=\"rejectCookie()\">\n Reject analytics cookies\n </button>\n <a class=\"govuk-link\" routerLink=\"/cookies\">View cookies</a>\n </div>\n </div>\n</div>"
3568
- }] }
3569
- ];
3570
- /** @nocollapse */
3571
- CookieBannerComponent.ctorParameters = function () {
3572
- return [
3573
- { type: CookieService },
3574
- { type: undefined, decorators: [{ type: i0.Inject, args: [windowToken,] }] }
3575
- ];
3576
- };
3577
- CookieBannerComponent.propDecorators = {
3578
- identifier: [{ type: i0.Input }],
3579
- appName: [{ type: i0.Input }],
3580
- rejectionNotifier: [{ type: i0.Output }],
3581
- acceptanceNotifier: [{ type: i0.Output }]
3582
- };
3583
- return CookieBannerComponent;
3584
- }());
3585
-
3586
- /**
3587
- * @fileoverview added by tsickle
3588
- * Generated from: lib/services/locations/location.service.ts
3589
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3590
- */
3591
- var LocationService = /** @class */ (function () {
3592
- function LocationService(http) {
3593
- this.http = http;
3594
- }
3595
- /**
3596
- * @description getAllLocations from service Ids/location type/search term
3597
- * @param serviceIds: SSCS | SSCS,IA split with ','
3598
- * @param locationType: optional | hearing | case_management
3599
- * @param searchTerm: any search term for postcode | site name | venue name |court name | court address etc.
3600
- * @return Observable<LocationByEPIMSModel[]>: Array of locationModel in Observable
3601
- */
3602
- /**
3603
- * \@description getAllLocations from service Ids/location type/search term
3604
- * @param {?} serviceIds
3605
- * @param {?} locationType
3606
- * @param {?} searchTerm
3607
- * @return {?} Observable<LocationByEPIMSModel[]>: Array of locationModel in Observable
3608
- */
3609
- LocationService.prototype.getAllLocations = /**
3610
- * \@description getAllLocations from service Ids/location type/search term
3611
- * @param {?} serviceIds
3612
- * @param {?} locationType
3613
- * @param {?} searchTerm
3614
- * @return {?} Observable<LocationByEPIMSModel[]>: Array of locationModel in Observable
3615
- */
3616
- function (serviceIds, locationType, searchTerm) {
3617
- return this.http.get("api/locations/getLocations?serviceIds=" + serviceIds + "&locationType=" + locationType + "&searchTerm=" + searchTerm);
3618
- };
3619
- LocationService.decorators = [
3620
- { type: i0.Injectable, args: [{
3621
- providedIn: 'root'
3622
- },] }
3623
- ];
3624
- /** @nocollapse */
3625
- LocationService.ctorParameters = function () {
3626
- return [
3627
- { type: i1.HttpClient }
3628
- ];
3629
- };
3630
- /** @nocollapse */ LocationService.ngInjectableDef = i0.defineInjectable({ factory: function LocationService_Factory() { return new LocationService(i0.inject(i1.HttpClient)); }, token: LocationService, providedIn: "root" });
3631
- return LocationService;
3632
- }());
3633
-
3634
- /**
3635
- * @fileoverview added by tsickle
3636
- * Generated from: lib/components/search-location/search-location.component.ts
3637
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3638
- */
3639
- var SearchLocationComponent = /** @class */ (function () {
3640
- function SearchLocationComponent(locationService, fb) {
3641
- this.locationService = locationService;
3642
- this.disabled = null;
3643
- this.locationType = '';
3644
- this.serviceIds = '';
3645
- this.submitted = true;
3646
- this.showAutocomplete = false;
3647
- this.minSearchCharacters = 3;
3648
- this.keyUpSubject$ = new rxjs.Subject();
3649
- this.findLocationFormGroup = fb.group({
3650
- findLocationFormControl: [null],
3651
- locationSelectedFormControl: [null]
3652
- });
3653
- this.selectedLocations$ = rxjs.of([]);
3654
- }
3655
- /**
3656
- * @return {?}
3657
- */
3658
- SearchLocationComponent.prototype.ngOnInit = /**
3659
- * @return {?}
3660
- */
3661
- function () {
3662
- var _this = this;
3663
- this.locations$ = rxjs.of([]);
3664
- if (this.control) {
3665
- if (this.findLocationFormGroup && this.findLocationFormGroup.controls) {
3666
- this.findLocationFormGroup.controls.locationSelectedFormControl = this.control;
3667
- }
3668
- }
3669
- this.keyUpSubject$.pipe(operators.debounceTime(500)).subscribe(( /**
3670
- * @param {?} searchValue
3671
- * @return {?}
3672
- */function (searchValue) { return _this.search(( /** @type {?} */(searchValue))); }));
3673
- };
3674
- /**
3675
- * @param {?} event
3676
- * @return {?}
3677
- */
3678
- SearchLocationComponent.prototype.onKeyUp = /**
3679
- * @param {?} event
3680
- * @return {?}
3681
- */
3682
- function (event) {
3683
- this.keyUpSubject$.next(event.target.value);
3684
- };
3685
- Object.defineProperty(SearchLocationComponent.prototype, "locationSource$", {
3686
- get: /**
3687
- * @return {?}
3688
- */ function () {
3689
- var _this = this;
3690
- return this.locations$ ? this.locations$.pipe(operators.mergeMap(( /**
3691
- * @param {?} locations
3692
- * @return {?}
3693
- */function (locations) {
3694
- return _this.selectedLocations$.pipe(operators.map(( /**
3695
- * @param {?} selectedLocations
3696
- * @return {?}
3697
- */function (selectedLocations) {
3698
- return locations.filter(( /**
3699
- * @param {?} location
3700
- * @return {?}
3701
- */function (location) {
3702
- return !selectedLocations.map(( /**
3703
- * @param {?} selectedLocation
3704
- * @return {?}
3705
- */function (selectedLocation) { return selectedLocation.epims_id; })).includes(location.epims_id);
3706
- }));
3707
- })));
3708
- }))) : rxjs.of([]);
3709
- },
3710
- enumerable: true,
3711
- configurable: true
3712
- });
3713
- /**
3714
- * @param {?} term
3715
- * @return {?}
3716
- */
3717
- SearchLocationComponent.prototype.filter = /**
3718
- * @param {?} term
3719
- * @return {?}
3720
- */
3721
- function (term) {
3722
- var _this = this;
3723
- this.getLocations(term).pipe(operators.mergeMap(( /**
3724
- * @param {?} apiData
3725
- * @return {?}
3726
- */function (apiData) {
3727
- return _this.selectedLocations$.pipe(operators.map(( /**
3728
- * @param {?} selectedLocations
3729
- * @return {?}
3730
- */function (selectedLocations) {
3731
- return apiData.filter(( /**
3732
- * @param {?} apiLocation
3733
- * @return {?}
3734
- */function (apiLocation) {
3735
- return !selectedLocations.map(( /**
3736
- * @param {?} selectedLocation
3737
- * @return {?}
3738
- */function (selectedLocation) { return selectedLocation.epims_id; })).includes(apiLocation.epims_id);
3739
- }));
3740
- })));
3741
- }))).subscribe(( /**
3742
- * @param {?} locations
3743
- * @return {?}
3744
- */function (locations) {
3745
- _this.locations$ = rxjs.of(locations);
3746
- }));
3747
- };
3748
- /**
3749
- * @param {?=} selection
3750
- * @return {?}
3751
- */
3752
- SearchLocationComponent.prototype.onSelectionChange = /**
3753
- * @param {?=} selection
3754
- * @return {?}
3755
- */
3756
- function (selection) {
3757
- this.findLocationFormGroup.controls.locationSelectedFormControl.setValue(selection);
3758
- };
3759
- /**
3760
- * @param {?} currentValue
3761
- * @return {?}
3762
- */
3763
- SearchLocationComponent.prototype.search = /**
3764
- * @param {?} currentValue
3073
+ CookieBannerComponent.prototype.rejectCookie = /**
3765
3074
  * @return {?}
3766
3075
  */
3767
- function (currentValue) {
3768
- this.showAutocomplete = !!currentValue && (currentValue.length >= this.minSearchCharacters);
3769
- if (this.showAutocomplete) {
3770
- this.filter(currentValue);
3771
- }
3076
+ function () {
3077
+ this.cookieService.setCookie(this.identifier, 'false', this.getExpiryDate());
3078
+ this.setState(true);
3772
3079
  };
3773
3080
  /**
3774
- * @param {?} selectedLocation
3081
+ * @param {?=} reload
3775
3082
  * @return {?}
3776
3083
  */
3777
- SearchLocationComponent.prototype.getDisplayName = /**
3778
- * @param {?} selectedLocation
3084
+ CookieBannerComponent.prototype.setState = /**
3085
+ * @param {?=} reload
3779
3086
  * @return {?}
3780
3087
  */
3781
- function (selectedLocation) {
3782
- return selectedLocation.court_name;
3088
+ function (reload) {
3089
+ if (reload === void 0) {
3090
+ reload = false;
3091
+ }
3092
+ this.isCookieBannerVisible = !this.cookieService.checkCookie(this.identifier);
3093
+ if (this.areCookiesAccepted()) {
3094
+ this.notifyAcceptance();
3095
+ }
3096
+ else {
3097
+ this.notifyRejection();
3098
+ }
3099
+ if (reload) { // reload if any of the buttons are pressed
3100
+ this.window.location.reload();
3101
+ }
3783
3102
  };
3784
3103
  /**
3785
- * @param {?} term
3786
3104
  * @return {?}
3787
3105
  */
3788
- SearchLocationComponent.prototype.getLocations = /**
3789
- * @param {?} term
3106
+ CookieBannerComponent.prototype.areCookiesAccepted = /**
3790
3107
  * @return {?}
3791
3108
  */
3792
- function (term) {
3793
- return this.locationService.getAllLocations(this.serviceIds, this.locationType, term);
3109
+ function () {
3110
+ return this.cookieService.checkCookie(this.identifier) && this.cookieService.getCookie(this.identifier) === 'true';
3794
3111
  };
3795
3112
  /**
3796
3113
  * @return {?}
3797
3114
  */
3798
- SearchLocationComponent.prototype.getControlCourtNameValue = /**
3115
+ CookieBannerComponent.prototype.notifyRejection = /**
3799
3116
  * @return {?}
3800
3117
  */
3801
3118
  function () {
3802
- return this.findLocationFormGroup && this.findLocationFormGroup.controls && this.findLocationFormGroup.controls.locationSelectedFormControl.value ?
3803
- (( /** @type {?} */(this.findLocationFormGroup.controls.locationSelectedFormControl.value))).court_name : '';
3119
+ this.rejectionNotifier.emit();
3804
3120
  };
3805
- SearchLocationComponent.decorators = [
3806
- { type: i0.Component, args: [{
3807
- selector: 'exui-search-location',
3808
- template: "<div class=\"auto-complete-container\">\n <div class=\"autocomplete__wrapper\"> \n <input \n [formControl]=\"findLocationFormGroup.controls.findLocationFormControl\"\n [matAutocomplete]=\"auto\"\n (keyup)=\"onKeyUp($event)\"\n aria-expanded=\"false\" \n aria-owns=\"input-selected-location__listbox\" \n aria-autocomplete=\"both\" \n autocomplete=\"off\" \n class=\"autocomplete__input autocomplete__input--default search-box\"\n [attr.disabled]=\"!disabled ? null: disabled\"\n [value]=\"getControlCourtNameValue()\"\n id=\"input-selected-location\">\n <mat-autocomplete class=\"mat-autocomplete-panel-extend\" autoActiveFirstOption #auto=\"matAutocomplete\">\n <mat-option *ngFor=\"let location of locationSource$ | async\"\n [value]=\"getDisplayName(location)\"\n (onSelectionChange)=\"onSelectionChange(location)\"\n [ngClass]=\"{'hide-autocomplete': !showAutocomplete}\">\n {{ getDisplayName(location) }}\n </mat-option>\n </mat-autocomplete>\n </div>\n</div>\n",
3809
- styles: [".autocomplete__input{-webkit-appearance:none;border:2px solid #0b0c0c;border-radius:0;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;margin-bottom:0;width:100%;background-color:transparent;position:relative}.autocomplete__hint{color:#b1b4b6;position:absolute}.autocomplete__input--default{padding:5px}.autocomplete__input--focused{outline:#fd0 solid 3px;outline-offset:0;box-shadow:inset 0 0 0 2px}.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:100%;width:calc(100% - 4px)}.autocomplete__menu--visible{display:block}.autocomplete__menu--hidden{display:none}.autocomplete__menu--overlay{box-shadow:rgba(0,0,0,.256863) 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:16px;line-height:1.25}.autocomplete__hint,.autocomplete__option{padding:5px}@media (min-width:641px){.autocomplete__hint,.autocomplete__input,.autocomplete__option{font-size:19px;line-height:1.31579}}.div-action{display:inline-block}.add-location{display:inline}.remove-location-button{margin:5px}.hide-autocomplete{display:none}.auto-complete-container{width:50%;display:inline-block;margin-right:4px}"]
3810
- }] }
3811
- ];
3812
- /** @nocollapse */
3813
- SearchLocationComponent.ctorParameters = function () {
3814
- return [
3815
- { type: LocationService },
3816
- { type: forms.FormBuilder }
3817
- ];
3818
- };
3819
- SearchLocationComponent.propDecorators = {
3820
- control: [{ type: i0.Input }],
3821
- disabled: [{ type: i0.Input }],
3822
- locationType: [{ type: i0.Input }],
3823
- selectedLocations$: [{ type: i0.Input }],
3824
- serviceIds: [{ type: i0.Input }],
3825
- submitted: [{ type: i0.Input }]
3826
- };
3827
- return SearchLocationComponent;
3828
- }());
3829
-
3830
- /**
3831
- * @fileoverview added by tsickle
3832
- * Generated from: lib/components/pagination/pagination.component.ts
3833
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3834
- */
3835
- var PaginationComponent = /** @class */ (function () {
3836
- function PaginationComponent() {
3837
- this.previousPage = new i0.EventEmitter();
3838
- this.nextPage = new i0.EventEmitter();
3839
- }
3840
3121
  /**
3841
3122
  * @return {?}
3842
3123
  */
3843
- PaginationComponent.prototype.onPrevious = /**
3124
+ CookieBannerComponent.prototype.notifyAcceptance = /**
3844
3125
  * @return {?}
3845
3126
  */
3846
3127
  function () {
3847
- this.previousPage.emit(null);
3128
+ this.acceptanceNotifier.emit();
3848
3129
  };
3849
3130
  /**
3131
+ * @private
3850
3132
  * @return {?}
3851
3133
  */
3852
- PaginationComponent.prototype.onNext = /**
3134
+ CookieBannerComponent.prototype.getExpiryDate = /**
3135
+ * @private
3853
3136
  * @return {?}
3854
3137
  */
3855
3138
  function () {
3856
- this.nextPage.emit(null);
3139
+ /** @type {?} */
3140
+ var now = new Date();
3141
+ /** @type {?} */
3142
+ var time = now.getTime();
3143
+ /** @type {?} */
3144
+ var expireTime = time + 31536000000;
3145
+ now.setTime(expireTime);
3146
+ return now.toUTCString();
3857
3147
  };
3858
- PaginationComponent.decorators = [
3148
+ CookieBannerComponent.decorators = [
3859
3149
  { type: i0.Component, args: [{
3860
- selector: 'xuilib-pagination',
3861
- template: "<nav class=\"hmcts-pagination\" id=\"pagination-label\">\n\n <p class=\"govuk-visually-hidden\" aria-labelledby=\"pagination-label\">Pagination navigation</p>\n\n <ul class=\"hmcts-pagination__list\">\n <li class=\"hmcts-pagination__item hmcts-pagination__item--prev\">\n <a *ngIf=\"firstRecord > 1; else noPrevious\" class=\"hmcts-pagination__link\" (click)=\"onPrevious()\" href=\"javascript:void(0)\">\n Previous page\n </a>\n <ng-template #noPrevious>\n <span class=\"hmcts-pagination__link\">Previous page</span>\n </ng-template>\n </li>\n\n <li class=\"hmcts-pagination__item hmcts-pagination__item--next\">\n <a *ngIf=\"moreItems; else noNext\" class=\"hmcts-pagination__link\" (click)=\"onNext()\" href=\"javascript:void(0)\">Next page</a>\n <ng-template #noNext>\n <span class=\"hmcts-pagination__link\">Next page</span>\n </ng-template>\n </li>\n </ul>\n</nav>\n",
3862
- styles: ["span.hmcts-pagination__link:hover{color:revert}"]
3150
+ selector: 'xuilib-cookie-banner',
3151
+ template: "<div class=\"govuk-cookie-banner \" role=\"region\" attr.aria-label=\"'Cookies on {{appName}}'\" *ngIf=\"isCookieBannerVisible\">\n <div class=\"govuk-cookie-banner__message govuk-width-container\">\n\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-two-thirds\">\n <h2 class=\"govuk-cookie-banner__heading govuk-heading-m\">Cookies on {{appName}}</h2>\n\n <div class=\"govuk-cookie-banner__content\">\n <p>We use some essential cookies to make this service work.</p>\n <p>We\u2019d also like to use analytics cookies so we can understand how you use the service and make improvements.</p>\n </div>\n </div>\n </div>\n\n <div class=\"govuk-button-group\">\n <button value=\"accept\" type=\"button\" name=\"cookies\" class=\"govuk-button\" data-module=\"govuk-button\" (click)=\"acceptCookie()\">\n Accept analytics cookies\n </button>\n <button value=\"reject\" type=\"button\" name=\"cookies\" class=\"govuk-button\" data-module=\"govuk-button\" (click)=\"rejectCookie()\">\n Reject analytics cookies\n </button>\n <a class=\"govuk-link\" routerLink=\"/cookies\">View cookies</a>\n </div>\n </div>\n</div>"
3863
3152
  }] }
3864
3153
  ];
3865
3154
  /** @nocollapse */
3866
- PaginationComponent.ctorParameters = function () { return []; };
3867
- PaginationComponent.propDecorators = {
3868
- moreItems: [{ type: i0.Input }],
3869
- firstRecord: [{ type: i0.Input }],
3870
- previousPage: [{ type: i0.Output }],
3871
- nextPage: [{ type: i0.Output }]
3155
+ CookieBannerComponent.ctorParameters = function () {
3156
+ return [
3157
+ { type: CookieService },
3158
+ { type: undefined, decorators: [{ type: i0.Inject, args: [windowToken,] }] }
3159
+ ];
3872
3160
  };
3873
- return PaginationComponent;
3161
+ CookieBannerComponent.propDecorators = {
3162
+ identifier: [{ type: i0.Input }],
3163
+ appName: [{ type: i0.Input }],
3164
+ rejectionNotifier: [{ type: i0.Output }],
3165
+ acceptanceNotifier: [{ type: i0.Output }]
3166
+ };
3167
+ return CookieBannerComponent;
3874
3168
  }());
3875
3169
 
3876
3170
  /**
@@ -4060,34 +3354,6 @@
4060
3354
  return ExuiPageWrapperComponent;
4061
3355
  }());
4062
3356
 
4063
- /**
4064
- * @fileoverview added by tsickle
4065
- * Generated from: lib/models/contact-details.model.ts
4066
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4067
- */
4068
- /** @enum {string} */
4069
- var BadgeColour = {
4070
- BADGE_RED: "hmcts-badge--red",
4071
- BADGE_BLUE: "hmcts-badge--blue",
4072
- BADGE_GREEN: "hmcts-badge--green",
4073
- };
4074
-
4075
- /**
4076
- * @fileoverview added by tsickle
4077
- * Generated from: lib/models/feature-user.ts
4078
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4079
- */
4080
- var AnonymousFeatureUser = /** @class */ (function () {
4081
- function AnonymousFeatureUser() {
4082
- }
4083
- return AnonymousFeatureUser;
4084
- }());
4085
- var LoggedInFeatureUser = /** @class */ (function () {
4086
- function LoggedInFeatureUser() {
4087
- }
4088
- return LoggedInFeatureUser;
4089
- }());
4090
-
4091
3357
  /**
4092
3358
  * @fileoverview added by tsickle
4093
3359
  * Generated from: lib/models/person.model.ts
@@ -4100,119 +3366,6 @@
4100
3366
  ADMIN: "Admin",
4101
3367
  ALL: "All",
4102
3368
  };
4103
- /** @enum {string} */
4104
- var RoleCategory = {
4105
- JUDICIAL: "JUDICIAL",
4106
- CASEWORKER: "LEGAL_OPERATIONS",
4107
- ADMIN: "ADMIN",
4108
- ALL: "ALL",
4109
- };
4110
-
4111
- /**
4112
- * @fileoverview added by tsickle
4113
- * Generated from: lib/models/filter.model.ts
4114
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4115
- */
4116
- var RadioFilterFieldConfig = /** @class */ (function () {
4117
- function RadioFilterFieldConfig() {
4118
- }
4119
- return RadioFilterFieldConfig;
4120
- }());
4121
-
4122
- /**
4123
- * @fileoverview added by tsickle
4124
- * Generated from: lib/services/session-storage/session-storage.service.ts
4125
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4126
- */
4127
- var SessionStorageService = /** @class */ (function () {
4128
- function SessionStorageService() {
4129
- }
4130
- /**
4131
- * Get an item from the session storage.
4132
- * If remove is true, the item will be removed once read
4133
- * @param removeAfterRead removed the key once it has been read
4134
- */
4135
- /**
4136
- * Get an item from the session storage.
4137
- * If remove is true, the item will be removed once read
4138
- * @param {?} key
4139
- * @param {?=} removeAfterRead removed the key once it has been read
4140
- * @return {?}
4141
- */
4142
- SessionStorageService.prototype.getItem = /**
4143
- * Get an item from the session storage.
4144
- * If remove is true, the item will be removed once read
4145
- * @param {?} key
4146
- * @param {?=} removeAfterRead removed the key once it has been read
4147
- * @return {?}
4148
- */
4149
- function (key, removeAfterRead) {
4150
- if (removeAfterRead === void 0) {
4151
- removeAfterRead = false;
4152
- }
4153
- /** @type {?} */
4154
- var item = sessionStorage.getItem(key);
4155
- if (removeAfterRead) {
4156
- this.removeItem(key);
4157
- }
4158
- return item;
4159
- };
4160
- /**
4161
- * Set an item in the session storage.
4162
- */
4163
- /**
4164
- * Set an item in the session storage.
4165
- * @param {?} key
4166
- * @param {?} value
4167
- * @return {?}
4168
- */
4169
- SessionStorageService.prototype.setItem = /**
4170
- * Set an item in the session storage.
4171
- * @param {?} key
4172
- * @param {?} value
4173
- * @return {?}
4174
- */
4175
- function (key, value) {
4176
- sessionStorage.setItem(key, value);
4177
- };
4178
- /**
4179
- * Remove an item in the session storage.
4180
- */
4181
- /**
4182
- * Remove an item in the session storage.
4183
- * @param {?} key
4184
- * @return {?}
4185
- */
4186
- SessionStorageService.prototype.removeItem = /**
4187
- * Remove an item in the session storage.
4188
- * @param {?} key
4189
- * @return {?}
4190
- */
4191
- function (key) {
4192
- sessionStorage.removeItem(key);
4193
- };
4194
- /**
4195
- * Clear all the items held in session storage.
4196
- */
4197
- /**
4198
- * Clear all the items held in session storage.
4199
- * @return {?}
4200
- */
4201
- SessionStorageService.prototype.clear = /**
4202
- * Clear all the items held in session storage.
4203
- * @return {?}
4204
- */
4205
- function () {
4206
- sessionStorage.clear();
4207
- };
4208
- SessionStorageService.decorators = [
4209
- { type: i0.Injectable, args: [{
4210
- providedIn: 'root'
4211
- },] }
4212
- ];
4213
- /** @nocollapse */ SessionStorageService.ngInjectableDef = i0.defineInjectable({ factory: function SessionStorageService_Factory() { return new SessionStorageService(); }, token: SessionStorageService, providedIn: "root" });
4214
- return SessionStorageService;
4215
- }());
4216
3369
 
4217
3370
  /**
4218
3371
  * @fileoverview added by tsickle
@@ -4220,9 +3373,8 @@
4220
3373
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4221
3374
  */
4222
3375
  var FindAPersonService = /** @class */ (function () {
4223
- function FindAPersonService(http, sessionStorageService) {
3376
+ function FindAPersonService(http) {
4224
3377
  this.http = http;
4225
- this.sessionStorageService = sessionStorageService;
4226
3378
  }
4227
3379
  /**
4228
3380
  * @param {?} searchOptions
@@ -4235,69 +3387,6 @@
4235
3387
  function (searchOptions) {
4236
3388
  return this.http.post('/workallocation2/findPerson', { searchOptions: searchOptions });
4237
3389
  };
4238
- /**
4239
- * @param {?} searchOptions
4240
- * @return {?}
4241
- */
4242
- FindAPersonService.prototype.findCaseworkers = /**
4243
- * @param {?} searchOptions
4244
- * @return {?}
4245
- */
4246
- function (searchOptions) {
4247
- var _this = this;
4248
- if (!this.sessionStorageService.getItem(FindAPersonService.caseworkersKey)) {
4249
- this.http.get('/workallocation2/caseworker').pipe(operators.tap(( /**
4250
- * @param {?} caseworkerList
4251
- * @return {?}
4252
- */function (caseworkerList) { return _this.sessionStorageService.setItem(FindAPersonService.caseworkersKey, JSON.stringify(caseworkerList)); })));
4253
- }
4254
- /** @type {?} */
4255
- var caseworkers = JSON.parse(this.sessionStorageService.getItem(FindAPersonService.caseworkersKey));
4256
- /** @type {?} */
4257
- var roleCategory = RoleCategory.ALL;
4258
- if (!(searchOptions.jurisdiction === PersonRole.ALL)) {
4259
- roleCategory = searchOptions.jurisdiction === PersonRole.CASEWORKER ? RoleCategory.CASEWORKER : RoleCategory.ADMIN;
4260
- }
4261
- /** @type {?} */
4262
- var people = caseworkers ? this.mapCaseworkers(caseworkers, roleCategory) : [];
4263
- /** @type {?} */
4264
- var searchTerm = searchOptions && searchOptions.searchTerm ? searchOptions.searchTerm.toLowerCase() : '';
4265
- return rxjs.of(people.filter(( /**
4266
- * @param {?} person
4267
- * @return {?}
4268
- */function (person) { return person && person.name && person.name.toLowerCase().includes(searchTerm); })));
4269
- };
4270
- /**
4271
- * @param {?} caseworkers
4272
- * @param {?} roleCategory
4273
- * @return {?}
4274
- */
4275
- FindAPersonService.prototype.mapCaseworkers = /**
4276
- * @param {?} caseworkers
4277
- * @param {?} roleCategory
4278
- * @return {?}
4279
- */
4280
- function (caseworkers, roleCategory) {
4281
- /** @type {?} */
4282
- var people = [];
4283
- caseworkers.forEach(( /**
4284
- * @param {?} caseworker
4285
- * @return {?}
4286
- */function (caseworker) {
4287
- /** @type {?} */
4288
- var thisPerson = {
4289
- email: caseworker.email,
4290
- name: caseworker.firstName + " " + caseworker.lastName,
4291
- id: caseworker.idamId,
4292
- domain: caseworker.roleCategory === RoleCategory.CASEWORKER ? PersonRole.CASEWORKER : PersonRole.ADMIN,
4293
- };
4294
- if (caseworker.roleCategory === roleCategory || roleCategory === RoleCategory.ALL) {
4295
- people.push(thisPerson);
4296
- }
4297
- }));
4298
- return people;
4299
- };
4300
- FindAPersonService.caseworkersKey = 'caseworkers';
4301
3390
  FindAPersonService.decorators = [
4302
3391
  { type: i0.Injectable, args: [{
4303
3392
  providedIn: 'root'
@@ -4306,11 +3395,10 @@
4306
3395
  /** @nocollapse */
4307
3396
  FindAPersonService.ctorParameters = function () {
4308
3397
  return [
4309
- { type: i1.HttpClient },
4310
- { type: SessionStorageService }
3398
+ { type: i1.HttpClient }
4311
3399
  ];
4312
3400
  };
4313
- /** @nocollapse */ FindAPersonService.ngInjectableDef = i0.defineInjectable({ factory: function FindAPersonService_Factory() { return new FindAPersonService(i0.inject(i1.HttpClient), i0.inject(SessionStorageService)); }, token: FindAPersonService, providedIn: "root" });
3401
+ /** @nocollapse */ FindAPersonService.ngInjectableDef = i0.defineInjectable({ factory: function FindAPersonService_Factory() { return new FindAPersonService(i0.inject(i1.HttpClient)); }, token: FindAPersonService, providedIn: "root" });
4314
3402
  return FindAPersonService;
4315
3403
  }());
4316
3404
 
@@ -4323,12 +3411,10 @@
4323
3411
  function FindPersonComponent(findPersonService) {
4324
3412
  this.findPersonService = findPersonService;
4325
3413
  this.personSelected = new i0.EventEmitter();
4326
- this.boldTitle = 'Find the person';
4327
- this.subTitle = 'Type the name of the person and select them.';
3414
+ this.boldTitle = 'Find a person';
4328
3415
  this.domain = PersonRole.ALL;
4329
- this.submitted = true;
4330
- this.disabled = null;
4331
3416
  this.showAutocomplete = false;
3417
+ this.showSmallTitle = false;
4332
3418
  this.findPersonControl = new forms.FormControl();
4333
3419
  this.minSearchCharacters = 2;
4334
3420
  }
@@ -4340,6 +3426,7 @@
4340
3426
  */
4341
3427
  function () {
4342
3428
  var _this = this;
3429
+ this.showSmallTitle = (this.boldTitle !== 'Find a person');
4343
3430
  if (!this.findPersonGroup) {
4344
3431
  this.findPersonGroup = new forms.FormGroup({});
4345
3432
  }
@@ -4354,20 +3441,6 @@
4354
3441
  })));
4355
3442
  this.findPersonControl.setValue(this.selectedPerson);
4356
3443
  };
4357
- /**
4358
- * @param {?} changes
4359
- * @return {?}
4360
- */
4361
- FindPersonComponent.prototype.ngOnChanges = /**
4362
- * @param {?} changes
4363
- * @return {?}
4364
- */
4365
- function (changes) {
4366
- if (changes['domain'] && !changes['domain'].firstChange) {
4367
- this.findPersonControl.setValue(null);
4368
- this.selectedPerson = null;
4369
- }
4370
- };
4371
3444
  /**
4372
3445
  * @param {?} searchTerm
4373
3446
  * @return {?}
@@ -4377,29 +3450,8 @@
4377
3450
  * @return {?}
4378
3451
  */
4379
3452
  function (searchTerm) {
4380
- /** @type {?} */
4381
- var findJudicialPeople = this.findPersonService.find({ searchTerm: searchTerm, jurisdiction: this.domain });
4382
- /** @type {?} */
4383
- var findCaseworkersOrAdmins = this.findPersonService.findCaseworkers({ searchTerm: searchTerm, jurisdiction: this.domain });
4384
3453
  if (searchTerm && searchTerm.length > this.minSearchCharacters) {
4385
- switch (this.domain) {
4386
- case PersonRole.JUDICIAL: {
4387
- return findJudicialPeople;
4388
- }
4389
- case PersonRole.ALL: {
4390
- return rxjs.zip(findJudicialPeople, findCaseworkersOrAdmins).pipe(operators.map(( /**
4391
- * @param {?} separatePeople
4392
- * @return {?}
4393
- */function (separatePeople) { return separatePeople[0].concat(separatePeople[1]); })));
4394
- }
4395
- case PersonRole.CASEWORKER:
4396
- case PersonRole.ADMIN: {
4397
- return findCaseworkersOrAdmins;
4398
- }
4399
- default: {
4400
- return rxjs.of();
4401
- }
4402
- }
3454
+ return this.findPersonService.find({ searchTerm: searchTerm, jurisdiction: this.domain });
4403
3455
  }
4404
3456
  return rxjs.of();
4405
3457
  };
@@ -4434,15 +3486,12 @@
4434
3486
  * @return {?}
4435
3487
  */
4436
3488
  function (selectedPerson) {
4437
- if (selectedPerson.domain === PersonRole.JUDICIAL && selectedPerson.knownAs) {
4438
- return selectedPerson.knownAs + "(" + selectedPerson.email + ")";
4439
- }
4440
3489
  return selectedPerson.email ? selectedPerson.name + "(" + selectedPerson.email + ")" : selectedPerson.name;
4441
3490
  };
4442
3491
  FindPersonComponent.decorators = [
4443
3492
  { type: i0.Component, args: [{
4444
3493
  selector: 'xuilib-find-person',
4445
- template: "<h1 class=\"govuk-heading-l\" *ngIf=\"title && title.length\">\n <span class=\"govuk-caption-l\">{{title}}</span>\n {{boldTitle}}\n</h1>\n<div class=\"govuk-form-group\" [formGroup]=\"findPersonGroup\"\n [ngClass]=\"{'form-group-error': !findPersonGroup.valid && submitted}\">\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"sub-title-hint\">\n <div id=\"sub-title-hint\" class=\"govuk-hint\" *ngIf=\"subTitle && subTitle.length\">\n {{subTitle}}\n </div>\n <span id=\"validation-error\" class=\"govuk-error-message\" *ngIf=\"findPersonGroup && findPersonGroup.errors\">\n <span class=\"govuk-visually-hidden\">Error:</span>You must select a name\n </span>\n <input id=\"inputSelectPerson\" type=\"text\" aria-label=\"select a person\" matInput\n formControlName=\"findPersonControl\"\n [matAutocomplete]=\"auto\"\n class=\"govuk-input govuk-!-width-one-third\"\n (ngModelChange)=\"updatedVal($event)\"\n [attr.disabled]=\"disabled\"\n [value]=\"selectedPerson\">\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\">\n <mat-option *ngFor=\"let option of filteredOptions | async\"\n [value]=\"getDisplayName(option)\"\n (onSelectionChange)=\"onSelectionChange(option)\"\n [ngClass]=\"{'hide-autocomplete': !showAutocomplete}\">\n {{getDisplayName(option)}}\n </mat-option>\n </mat-autocomplete>\n </fieldset>\n</div>\n",
3494
+ template: "<h1 class=\"govuk-heading-l\">\n <span class=\"govuk-caption-l\">{{title}}</span>\n {{boldTitle}}\n</h1>\n<div class=\"govuk-form-group\" [formGroup]=\"findPersonGroup\"\n [ngClass]=\"{'form-group-error': !findPersonGroup.valid}\">\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"\">\n <div id=\"waste-hint\" class=\"govuk-hint\">\n <h1 *ngIf=\"showSmallTitle\" class=\"govuk-heading-m\">Find the person</h1>\n Type the name of the person and select them.\n </div>\n <span id=\"validation-error\" class=\"govuk-error-message\" *ngIf=\"findPersonGroup.errors\">\n <span class=\"govuk-visually-hidden\">Error:</span>You must select a name\n </span>\n <input id=\"inputSelectPerson\" type=\"text\" aria-label=\"select a person\" matInput\n formControlName=\"findPersonControl\"\n [matAutocomplete]=\"auto\"\n class=\"govuk-input govuk-!-width-one-third\"\n (ngModelChange)=\"updatedVal($event)\"\n [value]=\"selectedPerson\">\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\">\n <mat-option *ngFor=\"let option of filteredOptions | async\"\n [value]=\"getDisplayName(option)\"\n (onSelectionChange)=\"onSelectionChange(option)\"\n [ngClass]=\"{'hide-autocomplete': !showAutocomplete}\">\n {{getDisplayName(option)}}\n </mat-option>\n </mat-autocomplete>\n </fieldset>\n</div>\n",
4446
3495
  styles: [".mat-option:hover{background:#2596be}.hide-autocomplete{display:none}"]
4447
3496
  }] }
4448
3497
  ];
@@ -4456,12 +3505,9 @@
4456
3505
  personSelected: [{ type: i0.Output }],
4457
3506
  title: [{ type: i0.Input }],
4458
3507
  boldTitle: [{ type: i0.Input }],
4459
- subTitle: [{ type: i0.Input }],
4460
3508
  domain: [{ type: i0.Input }],
4461
3509
  findPersonGroup: [{ type: i0.Input }],
4462
- selectedPerson: [{ type: i0.Input }],
4463
- submitted: [{ type: i0.Input }],
4464
- disabled: [{ type: i0.Input }]
3510
+ selectedPerson: [{ type: i0.Input }]
4465
3511
  };
4466
3512
  return FindPersonComponent;
4467
3513
  }());
@@ -4562,8 +3608,7 @@
4562
3608
  GovUkDateComponent.decorators = [
4563
3609
  { type: i0.Component, args: [{
4564
3610
  selector: 'xuilib-gov-uk-date',
4565
- template: "<div class=\"govuk-form-group\" [ngClass]=\"{'govuk-form-group--error': errorMessage?.isInvalid}\" [formGroup]=\"formGroup\">\n <div class=\"date-input-container\">\n <xuilib-gov-uk-fieldset\n [config]=\"{\n legend: config.label || 'Date component',\n classes: config.classes || 'govuk-label--m',\n id: config.id,\n hint: config.hint != null ? config.hint : 'For example, 12 11 2007',\n isPageHeading: config.isPageHeading || false}\"\n [errorMessage]=\"errorMessage\">\n <xuilib-gov-uk-error-message\n [config]=\"{id: 'passport'}\"\n *ngIf=\"errorMessage\"\n [errorMessage]=\"errorMessage\">\n </xuilib-gov-uk-error-message>\n\n <div class=\"govuk-date-input\" [id]=\"config.id+'-date'\">\n <div class=\"govuk-date-input__item\">\n <div class=\"govuk-form-group\">\n <xuilib-gov-label\n [config]=\"{label: 'Day', name: config.id+'-day', id: config.id+'-day', classes: 'govuk-date-input__label'}\">\n </xuilib-gov-label>\n <input class=\"govuk-input govuk-date-input__input govuk-input--width-2\"\n [ngClass]=\"{'govuk-input--error': errorMessage?.isInvalid}\"\n [id]=\"config.id\"\n [name]=\"config.id+'-day'\" type=\"number\" value=\"\" pattern=\"[0-9]*\"\n [formControlName]=\"config.id+'_day'\">\n </div>\n </div>\n <div class=\"govuk-date-input__item\">\n <div class=\"govuk-form-group\">\n <xuilib-gov-label\n [config]=\"{label: 'Month', name: config.id+'-month', id: config.id+'-month', classes: 'govuk-date-input__label'}\">\n </xuilib-gov-label>\n <input class=\"govuk-input govuk-date-input__input govuk-input--width-2\"\n [ngClass]=\"{'govuk-input--error': errorMessage?.isInvalid}\"\n [id]=\"config.id+'-month'\"\n [name]=\"config.id+'-month'\" type=\"number\" value=\"\" pattern=\"[0-9]*\"\n [formControlName]=\"config.id+'_month'\">\n </div>\n </div>\n <div class=\"govuk-date-input__item\">\n <div class=\"govuk-form-group\">\n <xuilib-gov-label\n [config]=\"{label: 'Year', name: config.id+'-year', id: config.id+'-year', classes: 'govuk-date-input__label'}\">\n </xuilib-gov-label>\n <input class=\"govuk-input govuk-date-input__input govuk-input--width-4\"\n [ngClass]=\"{'govuk-input--error': errorMessage?.isInvalid}\"\n [id]=\"config.id+'-year'\"\n [name]=\"config.id+'-year'\" type=\"number\" value=\"\" pattern=\"[0-9]*\"\n [formControlName]=\"config.id+'_year'\">\n </div>\n </div>\n </div>\n </xuilib-gov-uk-fieldset>\n </div>\n</div>\n",
4566
- styles: [".govuk-form-group .date-input-container{margin-bottom:30px}.govuk-form-group .date-input-container .govuk-date-input .govuk-date-input__item .govuk-form-group{margin-bottom:0}"]
3611
+ template: "<div class=\"govuk-form-group\" [ngClass]=\"{'govuk-form-group--error': errorMessage?.isInvalid}\" [formGroup]=\"formGroup\">\n <xuilib-gov-uk-fieldset\n [config]=\"{legend: 'Date component', classes: 'govuk-label--m', id: config.id, hint: ' For example, 12 11 2007', isPageHeading: config.isPageHeading}\"\n [errorMessage]=\"errorMessage\">\n <xuilib-gov-uk-error-message\n [config]=\"{id: 'passport'}\"\n *ngIf=\"errorMessage\"\n [errorMessage]=\"errorMessage\">\n </xuilib-gov-uk-error-message>\n\n <div class=\"govuk-date-input\" [id]=\"config.id+'-date'\">\n <div class=\"govuk-date-input__item\">\n <div class=\"govuk-form-group\">\n <xuilib-gov-label\n [config]=\"{label: 'Day', name: config.id, id: config.id+'-day', classes: 'govuk-date-input__label'}\">\n </xuilib-gov-label>\n <input class=\"govuk-input govuk-date-input__input govuk-input--width-2\"\n [ngClass]=\"{'govuk-input--error': errorMessage?.isInvalid}\"\n [id]=\"config.id\"\n [name]=\"config.id+'-day'\" type=\"number\" value=\"\" pattern=\"[0-9]*\"\n [formControlName]=\"'day'\">\n </div>\n </div>\n <div class=\"govuk-date-input__item\">\n <div class=\"govuk-form-group\">\n <xuilib-gov-label\n [config]=\"{label: 'Month', name: config.id+'-month', id: config.id+'-month', classes: 'govuk-date-input__label'}\">\n </xuilib-gov-label>\n <input class=\"govuk-input govuk-date-input__input govuk-input--width-2\"\n [ngClass]=\"{'govuk-input--error': errorMessage?.isInvalid}\"\n [id]=\"config.id+'-month'\"\n [name]=\"config.id+'-month'\" type=\"number\" value=\"\" pattern=\"[0-9]*\"\n [formControlName]=\"'month'\">\n </div>\n </div>\n <div class=\"govuk-date-input__item\">\n <div class=\"govuk-form-group\">\n <xuilib-gov-label\n [config]=\"{label: 'Year', name: config.id+'-year', id: config.id+'-year', classes: 'govuk-date-input__label'}\">\n </xuilib-gov-label>\n <input class=\"govuk-input govuk-date-input__input govuk-input--width-4\"\n [ngClass]=\"{'govuk-input--error': errorMessage?.isInvalid}\"\n [id]=\"config.id+'-year'\"\n [name]=\"config.id+'-year'\" type=\"number\" value=\"\" pattern=\"[0-9]*\"\n [formControlName]=\"'year'\">\n </div>\n </div>\n </div>\n </xuilib-gov-uk-fieldset>\n</div>"
4567
3612
  }] }
4568
3613
  ];
4569
3614
  /** @nocollapse */
@@ -4817,7 +3862,7 @@
4817
3862
  GovUkInputComponent.decorators = [
4818
3863
  { type: i0.Component, args: [{
4819
3864
  selector: 'xuilib-gov-uk-input',
4820
- template: "<div class=\"govuk-form-group gov-uk-input\" [formGroup]=\"group\"\n[ngClass]=\"{'govuk-form-group--error': errorMessage?.isInvalid}\">\n\n<xuilib-gov-label [config]=\"config\"></xuilib-gov-label>\n\n<span *ngIf=\"config.hint\" [id]=\"config.id +'-hint'\" class=\"govuk-hint\">\n {{config.hint}}\n</span>\n\n<xuilib-gov-uk-error-message [config]=\"config\" [errorMessage]=\"errorMessage\"></xuilib-gov-uk-error-message>\n\n<input class=\"govuk-input\"\n [ngClass]=\"{'govuk-input--error': errorMessage?.isInvalid}\"\n [id]=\"config.id\"\n [name]=\"config.name\"\n [type]=\"config.type\"\n [attr.aria-invalid]=\"errorMessage?.isInvalid\"\n [formControlName]=\"config.name\"\n [attr.aria-describedby]='setDescribedBy()'>\n</div>\n",
3865
+ template: "<div class=\"govuk-form-group gov-uk-input\" [formGroup]=\"group\"\n[ngClass]=\"{'govuk-form-group--error': errorMessage?.isInvalid}\">\n\n<xuilib-gov-label [config]=\"config\"></xuilib-gov-label>\n\n<span *ngIf=\"config.hint\" [id]=\"config.id +'-hint'\" class=\"govuk-hint\">\n {{config.hint}}\n</span>\n\n<xuilib-gov-uk-error-message [config]=\"config\" [errorMessage]=\"errorMessage\"></xuilib-gov-uk-error-message>\n\n<input class=\"govuk-input\" [id]=\"config.id\" [name]=\"config.name\" [type]=\"config.type\"\n [attr.aria-invalid]=\"errorMessage?.isInvalid\"\n [formControlName]=\"config.name\" [attr.aria-describedby]='setDescribedBy()'>\n</div>",
4821
3866
  styles: [".gov-uk-input input:disabled{background:#b1b4b6}"]
4822
3867
  }] }
4823
3868
  ];
@@ -5423,9 +4468,7 @@
5423
4468
  LoadingSpinnerComponent,
5424
4469
  GenericFilterComponent,
5425
4470
  CookieBannerComponent,
5426
- FindPersonComponent,
5427
- SearchLocationComponent,
5428
- PaginationComponent
4471
+ FindPersonComponent
5429
4472
  ];
5430
4473
  /** @type {?} */
5431
4474
  var GOV_UI_COMPONENTS = [
@@ -5625,6 +4668,45 @@
5625
4668
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5626
4669
  */
5627
4670
 
4671
+ /**
4672
+ * @fileoverview added by tsickle
4673
+ * Generated from: lib/models/contact-details.model.ts
4674
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4675
+ */
4676
+ /** @enum {string} */
4677
+ var BadgeColour = {
4678
+ BADGE_RED: "hmcts-badge--red",
4679
+ BADGE_BLUE: "hmcts-badge--blue",
4680
+ BADGE_GREEN: "hmcts-badge--green",
4681
+ };
4682
+
4683
+ /**
4684
+ * @fileoverview added by tsickle
4685
+ * Generated from: lib/models/feature-user.ts
4686
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4687
+ */
4688
+ var AnonymousFeatureUser = /** @class */ (function () {
4689
+ function AnonymousFeatureUser() {
4690
+ }
4691
+ return AnonymousFeatureUser;
4692
+ }());
4693
+ var LoggedInFeatureUser = /** @class */ (function () {
4694
+ function LoggedInFeatureUser() {
4695
+ }
4696
+ return LoggedInFeatureUser;
4697
+ }());
4698
+
4699
+ /**
4700
+ * @fileoverview added by tsickle
4701
+ * Generated from: lib/models/filter.model.ts
4702
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4703
+ */
4704
+ var RadioFilterFieldConfig = /** @class */ (function () {
4705
+ function RadioFilterFieldConfig() {
4706
+ }
4707
+ return RadioFilterFieldConfig;
4708
+ }());
4709
+
5628
4710
  /**
5629
4711
  * @fileoverview added by tsickle
5630
4712
  * Generated from: lib/services/feature-toggle/feature-toggle.guard.ts
@@ -6497,8 +5579,6 @@
6497
5579
  exports.UserDetailsComponent = UserDetailsComponent;
6498
5580
  exports.UserListComponent = UserListComponent;
6499
5581
  exports.CookieBannerComponent = CookieBannerComponent;
6500
- exports.SearchLocationComponent = SearchLocationComponent;
6501
- exports.PaginationComponent = PaginationComponent;
6502
5582
  exports.FeatureToggleDirective = FeatureToggleDirective;
6503
5583
  exports.LetContext = LetContext;
6504
5584
  exports.LetDirective = LetDirective;
@@ -6516,7 +5596,6 @@
6516
5596
  exports.AnonymousFeatureUser = AnonymousFeatureUser;
6517
5597
  exports.LoggedInFeatureUser = LoggedInFeatureUser;
6518
5598
  exports.PersonRole = PersonRole;
6519
- exports.RoleCategory = RoleCategory;
6520
5599
  exports.RadioFilterFieldConfig = RadioFilterFieldConfig;
6521
5600
  exports.FeatureToggleGuard = FeatureToggleGuard;
6522
5601
  exports.FeatureToggleService = FeatureToggleService;
@@ -6546,8 +5625,6 @@
6546
5625
  exports.ɵo = InviteUserFormComponent;
6547
5626
  exports.ɵn = InviteUserPermissionComponent;
6548
5627
  exports.ɵbc = LoadingSpinnerComponent;
6549
- exports.ɵbm = PaginationComponent;
6550
- exports.ɵbk = SearchLocationComponent;
6551
5628
  exports.ɵv = SelectedCaseConfirmComponent;
6552
5629
  exports.ɵt = SelectedCaseListComponent;
6553
5630
  exports.ɵu = SelectedCaseComponent;
@@ -6566,34 +5643,32 @@
6566
5643
  exports.ɵg = FeatureToggleDirective;
6567
5644
  exports.ɵi = LetContext;
6568
5645
  exports.ɵj = LetDirective;
6569
- exports.ɵbv = GovUkCheckboxComponent;
6570
- exports.ɵcb = GovUkCheckboxesComponent;
6571
- exports.ɵca = GovUkDateComponent;
6572
- exports.ɵby = GovUkErrorMessageComponent;
6573
- exports.ɵbz = GovUkFieldsetComponent;
6574
- exports.ɵcg = GovUkFileUploadComponent;
6575
- exports.ɵbw = GovUkFormGroupWrapperComponent;
6576
- exports.ɵbu = GovUkInputComponent;
6577
- exports.ɵbx = GovUkLabelComponent;
6578
- exports.ɵcc = GovUkRadioComponent;
6579
- exports.ɵcd = GovUkRadiosComponent;
6580
- exports.ɵce = GovUkSelectComponent;
6581
- exports.ɵbt = GovukTableComponent;
6582
- exports.ɵcf = GovUkTextareaComponent;
6583
- exports.ɵbs = HmctsBannerComponent;
6584
- exports.ɵbq = HmctsErrorSummaryComponent;
6585
- exports.ɵbn = HmctsIdentityBarComponent;
6586
- exports.ɵbr = HmctsMainWrapperComponent;
6587
- exports.ɵbp = HmctsPrimaryNavigationComponent;
6588
- exports.ɵbo = HmctsSubNavigationComponent;
6589
- exports.ɵch = RemoveHostDirective;
5646
+ exports.ɵbr = GovUkCheckboxComponent;
5647
+ exports.ɵbx = GovUkCheckboxesComponent;
5648
+ exports.ɵbw = GovUkDateComponent;
5649
+ exports.ɵbu = GovUkErrorMessageComponent;
5650
+ exports.ɵbv = GovUkFieldsetComponent;
5651
+ exports.ɵcc = GovUkFileUploadComponent;
5652
+ exports.ɵbs = GovUkFormGroupWrapperComponent;
5653
+ exports.ɵbq = GovUkInputComponent;
5654
+ exports.ɵbt = GovUkLabelComponent;
5655
+ exports.ɵby = GovUkRadioComponent;
5656
+ exports.ɵbz = GovUkRadiosComponent;
5657
+ exports.ɵca = GovUkSelectComponent;
5658
+ exports.ɵbp = GovukTableComponent;
5659
+ exports.ɵcb = GovUkTextareaComponent;
5660
+ exports.ɵbo = HmctsBannerComponent;
5661
+ exports.ɵbm = HmctsErrorSummaryComponent;
5662
+ exports.ɵbj = HmctsIdentityBarComponent;
5663
+ exports.ɵbn = HmctsMainWrapperComponent;
5664
+ exports.ɵbl = HmctsPrimaryNavigationComponent;
5665
+ exports.ɵbk = HmctsSubNavigationComponent;
5666
+ exports.ɵcd = RemoveHostDirective;
6590
5667
  exports.ɵr = CaseSharingStateService;
6591
5668
  exports.ɵbg = CookieService;
6592
5669
  exports.ɵh = FeatureToggleService;
6593
5670
  exports.ɵbe = FilterService;
6594
5671
  exports.ɵbi = FindAPersonService;
6595
- exports.ɵbl = LocationService;
6596
- exports.ɵbj = SessionStorageService;
6597
5672
 
6598
5673
  Object.defineProperty(exports, '__esModule', { value: true });
6599
5674