@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.
- package/bundles/hmcts-rpx-xui-common-lib.umd.js +919 -201
- package/bundles/hmcts-rpx-xui-common-lib.umd.js.map +1 -1
- package/bundles/hmcts-rpx-xui-common-lib.umd.min.js +1 -1
- package/bundles/hmcts-rpx-xui-common-lib.umd.min.js.map +1 -1
- package/esm2015/hmcts-rpx-xui-common-lib.js +32 -29
- package/esm2015/lib/components/find-location/find-location.component.js +8 -4
- package/esm2015/lib/components/find-service/find-service.component.js +2 -2
- package/esm2015/lib/components/find-task-name/find-task-name.component.js +228 -0
- package/esm2015/lib/components/generic-filter/generic-filter-utils.js +2 -2
- package/esm2015/lib/components/generic-filter/generic-filter.component.js +361 -15
- package/esm2015/lib/components/search-location/search-location.component.js +3 -3
- package/esm2015/lib/components/search-service/search-service.component.js +18 -6
- package/esm2015/lib/exui-common-lib.module.js +12 -3
- package/esm2015/lib/gov-ui/components/gov-uk-checkboxes/gov-uk-checkboxes.component.js +80 -6
- package/esm2015/lib/gov-ui/components/gov-uk-input/gov-uk-input.component.js +3 -3
- package/esm2015/lib/gov-ui/components/gov-uk-label/gov-uk-label.component.js +3 -2
- package/esm2015/lib/gov-ui/components/gov-uk-radios/gov-uk-radios.component.js +1 -1
- package/esm2015/lib/gov-ui/components/gov-uk-select/gov-uk-select.component.js +2 -2
- package/esm2015/lib/gov-ui/components/hmcts-banner/hmcts-banner-info.interface.js +22 -0
- package/esm2015/lib/gov-ui/components/hmcts-banner/hmcts-banner.component.js +19 -14
- package/esm2015/lib/gov-ui/components/hmcts-main-wrapper/hmcts-main-wrapper.component.js +2 -2
- package/esm2015/lib/gov-ui/components/index.js +2 -2
- package/esm2015/lib/gov-ui/components/public_api.js +2 -1
- package/esm2015/lib/gov-ui/index.js +2 -2
- package/esm2015/lib/gov-ui/models/checkboxes-model.js +6 -8
- package/esm2015/lib/gov-ui/models/gov-ui-config-model.js +5 -1
- package/esm2015/lib/gov-ui/models/public_api.js +1 -2
- package/esm2015/lib/gov-ui/models/radio-buttons.model.js +22 -0
- package/esm2015/lib/gov-ui/public_api.js +2 -2
- package/esm2015/lib/models/filter.model.js +63 -3
- package/esm2015/lib/models/index.js +3 -2
- package/esm2015/lib/models/person.model.js +2 -2
- package/esm2015/lib/models/task-name.model.js +16 -0
- package/esm2015/lib/pipes/capitalize.pipe.js +21 -0
- package/esm2015/lib/services/filter/filter.service.js +17 -3
- package/esm2015/lib/services/find-person/find-person.service.js +3 -3
- package/esm2015/lib/services/role-guard/role.guard.js +22 -15
- package/esm2015/lib/services/role-guard/role.service.js +13 -13
- package/esm2015/lib/services/storage/session-storage/session-storage.service.js +55 -0
- package/esm2015/lib/services/task-name/task-name.service.js +65 -0
- package/esm2015/public-api.js +3 -3
- package/esm5/hmcts-rpx-xui-common-lib.js +32 -29
- package/esm5/lib/components/find-location/find-location.component.js +8 -4
- package/esm5/lib/components/find-service/find-service.component.js +2 -2
- package/esm5/lib/components/find-task-name/find-task-name.component.js +243 -0
- package/esm5/lib/components/generic-filter/generic-filter-utils.js +2 -2
- package/esm5/lib/components/generic-filter/generic-filter.component.js +397 -14
- package/esm5/lib/components/search-location/search-location.component.js +3 -3
- package/esm5/lib/components/search-service/search-service.component.js +20 -7
- package/esm5/lib/exui-common-lib.module.js +10 -3
- package/esm5/lib/gov-ui/components/gov-uk-checkboxes/gov-uk-checkboxes.component.js +100 -6
- package/esm5/lib/gov-ui/components/gov-uk-input/gov-uk-input.component.js +3 -3
- package/esm5/lib/gov-ui/components/gov-uk-label/gov-uk-label.component.js +3 -2
- package/esm5/lib/gov-ui/components/gov-uk-radios/gov-uk-radios.component.js +1 -1
- package/esm5/lib/gov-ui/components/gov-uk-select/gov-uk-select.component.js +2 -2
- package/esm5/lib/gov-ui/components/hmcts-banner/hmcts-banner-info.interface.js +22 -0
- package/esm5/lib/gov-ui/components/hmcts-banner/hmcts-banner.component.js +17 -13
- package/esm5/lib/gov-ui/components/hmcts-main-wrapper/hmcts-main-wrapper.component.js +2 -2
- package/esm5/lib/gov-ui/components/index.js +2 -2
- package/esm5/lib/gov-ui/components/public_api.js +2 -1
- package/esm5/lib/gov-ui/index.js +2 -2
- package/esm5/lib/gov-ui/models/checkboxes-model.js +6 -8
- package/esm5/lib/gov-ui/models/gov-ui-config-model.js +5 -1
- package/esm5/lib/gov-ui/models/public_api.js +1 -2
- package/esm5/lib/gov-ui/models/radio-buttons.model.js +22 -0
- package/esm5/lib/gov-ui/public_api.js +2 -2
- package/esm5/lib/models/filter.model.js +63 -3
- package/esm5/lib/models/index.js +3 -2
- package/esm5/lib/models/person.model.js +2 -2
- package/esm5/lib/models/task-name.model.js +16 -0
- package/esm5/lib/pipes/capitalize.pipe.js +29 -0
- package/esm5/lib/services/filter/filter.service.js +21 -3
- package/esm5/lib/services/find-person/find-person.service.js +3 -3
- package/esm5/lib/services/role-guard/role.guard.js +22 -15
- package/esm5/lib/services/role-guard/role.service.js +13 -13
- package/esm5/lib/services/{session-storage → storage/session-storage}/session-storage.service.js +2 -2
- package/esm5/lib/services/task-name/task-name.service.js +70 -0
- package/esm5/public-api.js +3 -3
- package/fesm2015/hmcts-rpx-xui-common-lib.js +782 -115
- package/fesm2015/hmcts-rpx-xui-common-lib.js.map +1 -1
- package/fesm5/hmcts-rpx-xui-common-lib.js +908 -158
- package/fesm5/hmcts-rpx-xui-common-lib.js.map +1 -1
- package/hmcts-rpx-xui-common-lib.d.ts +30 -27
- package/hmcts-rpx-xui-common-lib.metadata.json +1 -1
- package/lib/components/find-task-name/find-task-name.component.d.ts +41 -0
- package/lib/components/generic-filter/generic-filter-utils.d.ts +2 -5
- package/lib/components/generic-filter/generic-filter.component.d.ts +12 -2
- package/lib/components/search-location/search-location.component.d.ts +1 -1
- package/lib/components/search-service/search-service.component.d.ts +5 -2
- package/lib/exui-common-lib.module.d.ts +4 -3
- package/lib/gov-ui/components/gov-uk-checkboxes/gov-uk-checkboxes.component.d.ts +14 -5
- package/lib/gov-ui/components/gov-uk-input/gov-uk-input.component.d.ts +1 -2
- package/lib/gov-ui/components/gov-uk-label/gov-uk-label.component.d.ts +1 -0
- package/lib/gov-ui/components/gov-uk-radios/gov-uk-radios.component.d.ts +2 -2
- package/lib/gov-ui/components/hmcts-banner/hmcts-banner-info.interface.d.ts +7 -0
- package/lib/gov-ui/components/hmcts-banner/hmcts-banner.component.d.ts +4 -2
- package/lib/gov-ui/components/hmcts-main-wrapper/hmcts-main-wrapper.component.d.ts +3 -3
- package/lib/gov-ui/components/public_api.d.ts +1 -0
- package/lib/gov-ui/models/checkboxes-model.d.ts +4 -7
- package/lib/gov-ui/models/gov-ui-config-model.d.ts +2 -0
- package/lib/gov-ui/models/public_api.d.ts +0 -1
- package/lib/gov-ui/models/radio-buttons.model.d.ts +9 -0
- package/lib/models/filter.model.d.ts +29 -7
- package/lib/models/index.d.ts +1 -0
- package/lib/models/person.model.d.ts +1 -1
- package/lib/models/task-name.model.d.ts +4 -0
- package/lib/pipes/capitalize.pipe.d.ts +4 -0
- package/lib/services/filter/filter.service.d.ts +1 -0
- package/lib/services/find-person/find-person.service.d.ts +1 -1
- package/lib/services/role-guard/role.guard.d.ts +2 -1
- package/lib/services/role-guard/role.service.d.ts +3 -1
- package/lib/services/{session-storage → storage/session-storage}/session-storage.service.d.ts +0 -0
- package/lib/services/task-name/task-name.service.d.ts +14 -0
- package/package.json +1 -1
- package/esm2015/lib/gov-ui/models/banner-data-model.js +0 -16
- package/esm2015/lib/services/session-storage/session-storage.service.js +0 -55
- package/esm5/lib/gov-ui/models/banner-data-model.js +0 -16
- package/lib/gov-ui/models/banner-data-model.d.ts +0 -4
|
@@ -11,9 +11,9 @@ import { Title } from '@angular/platform-browser';
|
|
|
11
11
|
import { DocumentInterruptSource, Idle } from '@ng-idle/core';
|
|
12
12
|
import { Keepalive } from '@ng-idle/keepalive';
|
|
13
13
|
import { Router, RouterModule, NavigationEnd } from '@angular/router';
|
|
14
|
-
import { Component, EventEmitter, Input, Output, ViewEncapsulation, Injectable, Directive, TemplateRef, ViewContainerRef, ElementRef, Inject,
|
|
14
|
+
import { Component, EventEmitter, Input, Output, ViewEncapsulation, Injectable, Pipe, Directive, TemplateRef, ViewContainerRef, ElementRef, Inject, ChangeDetectorRef, ViewChild, InjectionToken, defineInjectable, inject, NgModule, ChangeDetectionStrategy } from '@angular/core';
|
|
15
15
|
import { BehaviorSubject, of, zip, Subject, combineLatest } from 'rxjs';
|
|
16
|
-
import { distinctUntilChanged, map, tap, debounceTime, filter, mergeMap, catchError, switchMap, delay } from 'rxjs/operators';
|
|
16
|
+
import { distinctUntilChanged, map, tap, debounceTime, filter, mergeMap, catchError, switchMap, delay, skipWhile } from 'rxjs/operators';
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* @fileoverview added by tsickle
|
|
@@ -663,7 +663,7 @@ var FilterService = /** @class */ (function () {
|
|
|
663
663
|
return this.filterSettings[id];
|
|
664
664
|
}
|
|
665
665
|
if (sessionStorage.getItem(id)) {
|
|
666
|
-
return JSON.parse(
|
|
666
|
+
return JSON.parse(sessionStorage.getItem(id));
|
|
667
667
|
}
|
|
668
668
|
if (localStorage.getItem(id)) {
|
|
669
669
|
if (this.isSameUser(id)) {
|
|
@@ -702,6 +702,24 @@ var FilterService = /** @class */ (function () {
|
|
|
702
702
|
}
|
|
703
703
|
return this.streams[id].asObservable();
|
|
704
704
|
};
|
|
705
|
+
/**
|
|
706
|
+
* @param {?} id
|
|
707
|
+
* @return {?}
|
|
708
|
+
*/
|
|
709
|
+
FilterService.prototype.clearSessionAndLocalPersistance = /**
|
|
710
|
+
* @param {?} id
|
|
711
|
+
* @return {?}
|
|
712
|
+
*/
|
|
713
|
+
function (id) {
|
|
714
|
+
sessionStorage.removeItem(id);
|
|
715
|
+
localStorage.removeItem(id);
|
|
716
|
+
if (this.filterSettings[id] !== undefined) {
|
|
717
|
+
this.filterSettings[id] = null;
|
|
718
|
+
}
|
|
719
|
+
if (this.streams[id] !== undefined) {
|
|
720
|
+
this.streams[id].next(null);
|
|
721
|
+
}
|
|
722
|
+
};
|
|
705
723
|
/**
|
|
706
724
|
* @private
|
|
707
725
|
* @param {?} setting
|
|
@@ -727,7 +745,7 @@ var FilterService = /** @class */ (function () {
|
|
|
727
745
|
* @return {?}
|
|
728
746
|
*/
|
|
729
747
|
function (setting) {
|
|
730
|
-
|
|
748
|
+
sessionStorage.setItem(setting.id, JSON.stringify(setting));
|
|
731
749
|
};
|
|
732
750
|
/**
|
|
733
751
|
* @private
|
|
@@ -806,7 +824,7 @@ function minSelectedValidator(min) {
|
|
|
806
824
|
* @param {?} value
|
|
807
825
|
* @return {?}
|
|
808
826
|
*/
|
|
809
|
-
function (value) { return value; })).length >= min ? null : {
|
|
827
|
+
function (value) { return value; })).length >= min ? null : { minlength: true };
|
|
810
828
|
});
|
|
811
829
|
}
|
|
812
830
|
/**
|
|
@@ -859,6 +877,7 @@ var GenericFilterComponent = /** @class */ (function () {
|
|
|
859
877
|
this.filterService = filterService;
|
|
860
878
|
this.fb = fb;
|
|
861
879
|
this.submitted = false;
|
|
880
|
+
this.previousSelectedNestedCheckbox = [];
|
|
862
881
|
}
|
|
863
882
|
Object.defineProperty(GenericFilterComponent.prototype, "config", {
|
|
864
883
|
get: /**
|
|
@@ -918,10 +937,10 @@ var GenericFilterComponent = /** @class */ (function () {
|
|
|
918
937
|
function (field) {
|
|
919
938
|
/** @type {?} */
|
|
920
939
|
var validators = [];
|
|
921
|
-
if (field && field.minSelected) {
|
|
940
|
+
if (field && field.minSelected > 0) {
|
|
922
941
|
validators.push(minSelectedValidator(field.minSelected));
|
|
923
942
|
}
|
|
924
|
-
if (field && field.maxSelected) {
|
|
943
|
+
if (field && field.maxSelected > 0) {
|
|
925
944
|
validators.push(maxSelectedValidator(field.maxSelected));
|
|
926
945
|
}
|
|
927
946
|
return validators;
|
|
@@ -943,6 +962,17 @@ var GenericFilterComponent = /** @class */ (function () {
|
|
|
943
962
|
* @return {?}
|
|
944
963
|
*/
|
|
945
964
|
function () { return _this.submitted = false; }));
|
|
965
|
+
this.filterSkillsByServices(null, this.config);
|
|
966
|
+
/** @type {?} */
|
|
967
|
+
var services = this.config.fields.find((/**
|
|
968
|
+
* @param {?} field
|
|
969
|
+
* @return {?}
|
|
970
|
+
*/
|
|
971
|
+
function (field) { return field.name === 'user-services'; }));
|
|
972
|
+
if (services) {
|
|
973
|
+
this.startFilterSkillsByServices(this.form, services);
|
|
974
|
+
this.initValuesFromCacheForSkillsByServices();
|
|
975
|
+
}
|
|
946
976
|
};
|
|
947
977
|
/**
|
|
948
978
|
* @return {?}
|
|
@@ -1117,6 +1147,11 @@ var GenericFilterComponent = /** @class */ (function () {
|
|
|
1117
1147
|
* @return {?}
|
|
1118
1148
|
*/
|
|
1119
1149
|
function (field) {
|
|
1150
|
+
if (field.name === 'user-services') {
|
|
1151
|
+
/** @type {?} */
|
|
1152
|
+
var selectedServices = this.getSelectedValuesForFields(this.form.controls, field);
|
|
1153
|
+
this.filterSkillsByServices(selectedServices, this.config);
|
|
1154
|
+
}
|
|
1120
1155
|
if (field.radioSelectionChange && typeof field.radioSelectionChange === 'string') {
|
|
1121
1156
|
var _a = __read(field.enableCondition.split('='), 2), name_3 = _a[0], value = _a[1];
|
|
1122
1157
|
this.form.get(name_3).patchValue(value);
|
|
@@ -1138,6 +1173,9 @@ var GenericFilterComponent = /** @class */ (function () {
|
|
|
1138
1173
|
this.filterService.persist(settings, this.config.persistence);
|
|
1139
1174
|
this.filterService.givenErrors.next(null);
|
|
1140
1175
|
this.submitted = false;
|
|
1176
|
+
if (this.config.cancelButtonCallback) {
|
|
1177
|
+
this.config.cancelButtonCallback();
|
|
1178
|
+
}
|
|
1141
1179
|
};
|
|
1142
1180
|
/**
|
|
1143
1181
|
* @param {?} values
|
|
@@ -1177,6 +1215,32 @@ var GenericFilterComponent = /** @class */ (function () {
|
|
|
1177
1215
|
finally { if (e_2) throw e_2.error; }
|
|
1178
1216
|
}
|
|
1179
1217
|
};
|
|
1218
|
+
/**
|
|
1219
|
+
* @param {?} field
|
|
1220
|
+
* @param {?} i
|
|
1221
|
+
* @return {?}
|
|
1222
|
+
*/
|
|
1223
|
+
GenericFilterComponent.prototype.checkBoxChecked = /**
|
|
1224
|
+
* @param {?} field
|
|
1225
|
+
* @param {?} i
|
|
1226
|
+
* @return {?}
|
|
1227
|
+
*/
|
|
1228
|
+
function (field, i) {
|
|
1229
|
+
return ((/** @type {?} */ (this.form.get(field.name))))['controls'][i]['value'];
|
|
1230
|
+
};
|
|
1231
|
+
/**
|
|
1232
|
+
* @param {?} values
|
|
1233
|
+
* @param {?} field
|
|
1234
|
+
* @return {?}
|
|
1235
|
+
*/
|
|
1236
|
+
GenericFilterComponent.prototype.updateTaskNameControls = /**
|
|
1237
|
+
* @param {?} values
|
|
1238
|
+
* @param {?} field
|
|
1239
|
+
* @return {?}
|
|
1240
|
+
*/
|
|
1241
|
+
function (values, field) {
|
|
1242
|
+
this.form.get(field.name).patchValue(values);
|
|
1243
|
+
};
|
|
1180
1244
|
/**
|
|
1181
1245
|
* @param {?} event
|
|
1182
1246
|
* @param {?} form
|
|
@@ -1278,6 +1342,58 @@ var GenericFilterComponent = /** @class */ (function () {
|
|
|
1278
1342
|
finally { if (e_3) throw e_3.error; }
|
|
1279
1343
|
}
|
|
1280
1344
|
}
|
|
1345
|
+
if (field.name === 'user-services') {
|
|
1346
|
+
this.startFilterSkillsByServices(form, field);
|
|
1347
|
+
}
|
|
1348
|
+
else if (field.name === 'user-skills') {
|
|
1349
|
+
if (isChecked) {
|
|
1350
|
+
/** @type {?} */
|
|
1351
|
+
var selectedIndex = field.options.findIndex((/**
|
|
1352
|
+
* @param {?} option
|
|
1353
|
+
* @return {?}
|
|
1354
|
+
*/
|
|
1355
|
+
function (option) { return Number(option.key) === Number(event.target.value); }));
|
|
1356
|
+
/** @type {?} */
|
|
1357
|
+
var selectedCheckbox = this.form.get('user-skills').value;
|
|
1358
|
+
selectedCheckbox[selectedIndex] = true;
|
|
1359
|
+
this.form.get('user-skills').setValue(selectedCheckbox);
|
|
1360
|
+
this.previousSelectedNestedCheckbox.push(event.target.value);
|
|
1361
|
+
}
|
|
1362
|
+
else {
|
|
1363
|
+
/** @type {?} */
|
|
1364
|
+
var index = this.previousSelectedNestedCheckbox.indexOf(event.target.value);
|
|
1365
|
+
if (index !== -1) {
|
|
1366
|
+
this.previousSelectedNestedCheckbox.splice(index, 1);
|
|
1367
|
+
}
|
|
1368
|
+
}
|
|
1369
|
+
}
|
|
1370
|
+
};
|
|
1371
|
+
/**
|
|
1372
|
+
* @private
|
|
1373
|
+
* @param {?} form
|
|
1374
|
+
* @param {?} field
|
|
1375
|
+
* @return {?}
|
|
1376
|
+
*/
|
|
1377
|
+
GenericFilterComponent.prototype.startFilterSkillsByServices = /**
|
|
1378
|
+
* @private
|
|
1379
|
+
* @param {?} form
|
|
1380
|
+
* @param {?} field
|
|
1381
|
+
* @return {?}
|
|
1382
|
+
*/
|
|
1383
|
+
function (form, field) {
|
|
1384
|
+
/** @type {?} */
|
|
1385
|
+
var servicesArray = [];
|
|
1386
|
+
form.value[field.name].map((/**
|
|
1387
|
+
* @param {?} service
|
|
1388
|
+
* @param {?} index
|
|
1389
|
+
* @return {?}
|
|
1390
|
+
*/
|
|
1391
|
+
function (service, index) {
|
|
1392
|
+
if (service) {
|
|
1393
|
+
servicesArray.push(field.options[index].key);
|
|
1394
|
+
}
|
|
1395
|
+
}));
|
|
1396
|
+
this.filterSkillsByServices(servicesArray, this.config);
|
|
1281
1397
|
};
|
|
1282
1398
|
/**
|
|
1283
1399
|
* @private
|
|
@@ -1385,14 +1501,14 @@ var GenericFilterComponent = /** @class */ (function () {
|
|
|
1385
1501
|
this.form.addControl('findPersonControl', findPersonControl);
|
|
1386
1502
|
}
|
|
1387
1503
|
var _loop_1 = function (field) {
|
|
1388
|
-
if (field.type === 'checkbox' || field.type === 'checkbox-large') {
|
|
1504
|
+
if (field.type === 'checkbox' || field.type === 'checkbox-large' || field.type === 'nested-checkbox') {
|
|
1389
1505
|
/** @type {?} */
|
|
1390
1506
|
var formArray = this_1.buildCheckBoxFormArray(field, settings);
|
|
1391
1507
|
this_1.form.addControl(field.name, formArray);
|
|
1392
1508
|
}
|
|
1393
|
-
else if (field.type === 'find-location') {
|
|
1509
|
+
else if (field.type === 'find-location' || field.type === 'find-service') {
|
|
1394
1510
|
/** @type {?} */
|
|
1395
|
-
var formArray = this_1.
|
|
1511
|
+
var formArray = this_1.buildFormArray(field, settings);
|
|
1396
1512
|
this_1.form.addControl(field.name, formArray);
|
|
1397
1513
|
}
|
|
1398
1514
|
else {
|
|
@@ -1400,6 +1516,12 @@ var GenericFilterComponent = /** @class */ (function () {
|
|
|
1400
1516
|
var validators = [];
|
|
1401
1517
|
if (field.minSelected && field.minSelected > 0) {
|
|
1402
1518
|
validators.push(Validators.required);
|
|
1519
|
+
if (field.type === 'text-input') {
|
|
1520
|
+
validators.push(Validators.minLength(field.minSelected));
|
|
1521
|
+
}
|
|
1522
|
+
if (field.type === 'email-input') {
|
|
1523
|
+
validators.push(Validators.email);
|
|
1524
|
+
}
|
|
1403
1525
|
}
|
|
1404
1526
|
/** @type {?} */
|
|
1405
1527
|
var defaultValue = null;
|
|
@@ -1433,7 +1555,7 @@ var GenericFilterComponent = /** @class */ (function () {
|
|
|
1433
1555
|
});
|
|
1434
1556
|
this_1.form.addControl(field.name, formGroup);
|
|
1435
1557
|
}
|
|
1436
|
-
else {
|
|
1558
|
+
else if (field.type !== 'group-title') {
|
|
1437
1559
|
/** @type {?} */
|
|
1438
1560
|
var control = new FormControl(defaultValue, validators);
|
|
1439
1561
|
this_1.form.addControl(field.name, control);
|
|
@@ -1519,7 +1641,7 @@ var GenericFilterComponent = /** @class */ (function () {
|
|
|
1519
1641
|
* @param {?} settings
|
|
1520
1642
|
* @return {?}
|
|
1521
1643
|
*/
|
|
1522
|
-
GenericFilterComponent.prototype.
|
|
1644
|
+
GenericFilterComponent.prototype.buildFormArray = /**
|
|
1523
1645
|
* @private
|
|
1524
1646
|
* @param {?} field
|
|
1525
1647
|
* @param {?} settings
|
|
@@ -1584,7 +1706,7 @@ var GenericFilterComponent = /** @class */ (function () {
|
|
|
1584
1706
|
* @return {?}
|
|
1585
1707
|
*/
|
|
1586
1708
|
function (f) { return f.name === name; }));
|
|
1587
|
-
if (field.type === 'find-location') {
|
|
1709
|
+
if (field.type === 'find-location' || field.type === 'find-service') {
|
|
1588
1710
|
return { value: values, name: name };
|
|
1589
1711
|
}
|
|
1590
1712
|
else {
|
|
@@ -1615,11 +1737,11 @@ var GenericFilterComponent = /** @class */ (function () {
|
|
|
1615
1737
|
var field = _c.value;
|
|
1616
1738
|
/** @type {?} */
|
|
1617
1739
|
var formGroup = form.get(field.name);
|
|
1618
|
-
if (formGroup && formGroup.errors && formGroup.errors.
|
|
1740
|
+
if (formGroup && formGroup.errors && (formGroup.errors.minlength || formGroup.errors.required)) {
|
|
1619
1741
|
errors.push({ name: field.name, error: field.minSelectedError });
|
|
1620
1742
|
}
|
|
1621
|
-
if (formGroup && formGroup.errors && formGroup.errors.
|
|
1622
|
-
errors.push({ name: field.name, error: field.
|
|
1743
|
+
if (formGroup && formGroup.errors && formGroup.errors.maxlength) {
|
|
1744
|
+
errors.push({ name: field.name, error: field.maxSelectedError });
|
|
1623
1745
|
}
|
|
1624
1746
|
}
|
|
1625
1747
|
}
|
|
@@ -1630,17 +1752,290 @@ var GenericFilterComponent = /** @class */ (function () {
|
|
|
1630
1752
|
}
|
|
1631
1753
|
finally { if (e_8) throw e_8.error; }
|
|
1632
1754
|
}
|
|
1755
|
+
// remove duplicates
|
|
1756
|
+
errors = errors.filter((/**
|
|
1757
|
+
* @param {?} filterError
|
|
1758
|
+
* @param {?} i
|
|
1759
|
+
* @param {?} arr
|
|
1760
|
+
* @return {?}
|
|
1761
|
+
*/
|
|
1762
|
+
function (filterError, i, arr) {
|
|
1763
|
+
return errors.indexOf(arr.find((/**
|
|
1764
|
+
* @param {?} item
|
|
1765
|
+
* @return {?}
|
|
1766
|
+
*/
|
|
1767
|
+
function (item) { return item.name === filterError.name; }))) === i;
|
|
1768
|
+
}));
|
|
1633
1769
|
if (errors.length) {
|
|
1634
1770
|
this.filterService.givenErrors.next(errors);
|
|
1635
1771
|
}
|
|
1636
1772
|
};
|
|
1773
|
+
/**
|
|
1774
|
+
* @return {?}
|
|
1775
|
+
*/
|
|
1776
|
+
GenericFilterComponent.prototype.initValuesFromCacheForSkillsByServices = /**
|
|
1777
|
+
* @return {?}
|
|
1778
|
+
*/
|
|
1779
|
+
function () {
|
|
1780
|
+
var _this = this;
|
|
1781
|
+
/** @type {?} */
|
|
1782
|
+
var cachedValues = this.filteredSkillsByServicesCheckbox.map((/**
|
|
1783
|
+
* @param {?} skill
|
|
1784
|
+
* @return {?}
|
|
1785
|
+
*/
|
|
1786
|
+
function (skill) {
|
|
1787
|
+
/** @type {?} */
|
|
1788
|
+
var selected = false;
|
|
1789
|
+
if (_this.settings && _this.settings.fields) {
|
|
1790
|
+
/** @type {?} */
|
|
1791
|
+
var isSelectedUserSkill = void 0;
|
|
1792
|
+
/** @type {?} */
|
|
1793
|
+
var selectedUserSkills = _this.settings.fields.find((/**
|
|
1794
|
+
* @param {?} setting
|
|
1795
|
+
* @return {?}
|
|
1796
|
+
*/
|
|
1797
|
+
function (setting) { return setting.name === 'user-skills'; }));
|
|
1798
|
+
if (selectedUserSkills && selectedUserSkills.value && selectedUserSkills.value.length > 0) {
|
|
1799
|
+
isSelectedUserSkill = selectedUserSkills.value.findIndex((/**
|
|
1800
|
+
* @param {?} val
|
|
1801
|
+
* @return {?}
|
|
1802
|
+
*/
|
|
1803
|
+
function (val) {
|
|
1804
|
+
return String(val) === String(skill.key);
|
|
1805
|
+
}));
|
|
1806
|
+
selected = isSelectedUserSkill !== -1;
|
|
1807
|
+
}
|
|
1808
|
+
}
|
|
1809
|
+
return selected;
|
|
1810
|
+
}));
|
|
1811
|
+
this.form.get('user-skills').setValue(cachedValues);
|
|
1812
|
+
};
|
|
1813
|
+
/**
|
|
1814
|
+
* @param {?} services
|
|
1815
|
+
* @param {?} config
|
|
1816
|
+
* @return {?}
|
|
1817
|
+
*/
|
|
1818
|
+
GenericFilterComponent.prototype.filterSkillsByServices = /**
|
|
1819
|
+
* @param {?} services
|
|
1820
|
+
* @param {?} config
|
|
1821
|
+
* @return {?}
|
|
1822
|
+
*/
|
|
1823
|
+
function (services, config) {
|
|
1824
|
+
var _this = this;
|
|
1825
|
+
this.filteredSkillsByServices = [];
|
|
1826
|
+
this.filteredSkillsByServicesCheckbox = [];
|
|
1827
|
+
/** @type {?} */
|
|
1828
|
+
var userSkillsSelectField = config.fields.find((/**
|
|
1829
|
+
* @param {?} f
|
|
1830
|
+
* @return {?}
|
|
1831
|
+
*/
|
|
1832
|
+
function (f) { return f.name === 'user-skills' && f.type === 'group-select'; }));
|
|
1833
|
+
/** @type {?} */
|
|
1834
|
+
var userSkillsCheckboxField = config.fields.find((/**
|
|
1835
|
+
* @param {?} f
|
|
1836
|
+
* @return {?}
|
|
1837
|
+
*/
|
|
1838
|
+
function (f) { return f.name === 'user-skills' && f.type === 'nested-checkbox'; }));
|
|
1839
|
+
if (userSkillsSelectField) {
|
|
1840
|
+
/** @type {?} */
|
|
1841
|
+
var userSkills_1 = userSkillsSelectField.groupOptions;
|
|
1842
|
+
if (!services || services.length === 0) {
|
|
1843
|
+
this.filteredSkillsByServices = userSkills_1;
|
|
1844
|
+
}
|
|
1845
|
+
else {
|
|
1846
|
+
services.forEach((/**
|
|
1847
|
+
* @param {?} s
|
|
1848
|
+
* @return {?}
|
|
1849
|
+
*/
|
|
1850
|
+
function (s) {
|
|
1851
|
+
/** @type {?} */
|
|
1852
|
+
var groupOption = userSkills_1.find((/**
|
|
1853
|
+
* @param {?} u
|
|
1854
|
+
* @return {?}
|
|
1855
|
+
*/
|
|
1856
|
+
function (u) { return u.group.toLowerCase() === s.toLowerCase(); }));
|
|
1857
|
+
if (groupOption) {
|
|
1858
|
+
_this.filteredSkillsByServices.push(groupOption);
|
|
1859
|
+
}
|
|
1860
|
+
}));
|
|
1861
|
+
}
|
|
1862
|
+
}
|
|
1863
|
+
else if (userSkillsCheckboxField) {
|
|
1864
|
+
/** @type {?} */
|
|
1865
|
+
var userSkills_2 = userSkillsCheckboxField.groupOptions;
|
|
1866
|
+
if (!services || services.length === 0) {
|
|
1867
|
+
this.filteredSkillsByServices = userSkills_2;
|
|
1868
|
+
}
|
|
1869
|
+
else {
|
|
1870
|
+
services.forEach((/**
|
|
1871
|
+
* @param {?} s
|
|
1872
|
+
* @return {?}
|
|
1873
|
+
*/
|
|
1874
|
+
function (s) {
|
|
1875
|
+
/** @type {?} */
|
|
1876
|
+
var groupOption = userSkills_2.find((/**
|
|
1877
|
+
* @param {?} u
|
|
1878
|
+
* @return {?}
|
|
1879
|
+
*/
|
|
1880
|
+
function (u) { return u.group.toLowerCase() === s.toLowerCase(); }));
|
|
1881
|
+
if (groupOption) {
|
|
1882
|
+
_this.filteredSkillsByServices.push(groupOption);
|
|
1883
|
+
}
|
|
1884
|
+
}));
|
|
1885
|
+
this.filteredSkillsByServicesCheckbox = this.filteredSkillsByServices.map((/**
|
|
1886
|
+
* @param {?} skill
|
|
1887
|
+
* @return {?}
|
|
1888
|
+
*/
|
|
1889
|
+
function (skill) {
|
|
1890
|
+
return skill.options;
|
|
1891
|
+
})).reduce((/**
|
|
1892
|
+
* @param {?} a
|
|
1893
|
+
* @param {?} b
|
|
1894
|
+
* @return {?}
|
|
1895
|
+
*/
|
|
1896
|
+
function (a, b) {
|
|
1897
|
+
return a.concat(b);
|
|
1898
|
+
}), []);
|
|
1899
|
+
userSkillsCheckboxField.options = [];
|
|
1900
|
+
userSkillsCheckboxField.options = this.filteredSkillsByServicesCheckbox;
|
|
1901
|
+
this.form.setControl('user-skills', new FormArray([]));
|
|
1902
|
+
this.filteredSkillsByServicesCheckbox.forEach((/**
|
|
1903
|
+
* @return {?}
|
|
1904
|
+
*/
|
|
1905
|
+
function () {
|
|
1906
|
+
((/** @type {?} */ (_this.form.get('user-skills')))).push(new FormControl(false));
|
|
1907
|
+
}));
|
|
1908
|
+
/** @type {?} */
|
|
1909
|
+
var prevValues = this.filteredSkillsByServicesCheckbox.map((/**
|
|
1910
|
+
* @param {?} skill
|
|
1911
|
+
* @return {?}
|
|
1912
|
+
*/
|
|
1913
|
+
function (skill) {
|
|
1914
|
+
/** @type {?} */
|
|
1915
|
+
var selected = false;
|
|
1916
|
+
if (_this.settings && _this.settings.fields) {
|
|
1917
|
+
if (_this.previousSelectedNestedCheckbox.length > 0) {
|
|
1918
|
+
selected = _this.previousSelectedNestedCheckbox.includes(skill.key);
|
|
1919
|
+
}
|
|
1920
|
+
/** @type {?} */
|
|
1921
|
+
var isSelectedUserSkill = void 0;
|
|
1922
|
+
/** @type {?} */
|
|
1923
|
+
var selectedUserSkills = _this.settings.fields.find((/**
|
|
1924
|
+
* @param {?} setting
|
|
1925
|
+
* @return {?}
|
|
1926
|
+
*/
|
|
1927
|
+
function (setting) { return setting.name === 'user-skills'; }));
|
|
1928
|
+
if (selectedUserSkills && selectedUserSkills.value && selectedUserSkills.value.length > 0) {
|
|
1929
|
+
isSelectedUserSkill = selectedUserSkills.value.findIndex((/**
|
|
1930
|
+
* @param {?} val
|
|
1931
|
+
* @return {?}
|
|
1932
|
+
*/
|
|
1933
|
+
function (val) { return Number(val) === Number(skill.key); }));
|
|
1934
|
+
selected = isSelectedUserSkill !== -1;
|
|
1935
|
+
}
|
|
1936
|
+
if (_this.previousSelectedNestedCheckbox.length > 0) {
|
|
1937
|
+
// Pick up from previous selected
|
|
1938
|
+
selected = _this.previousSelectedNestedCheckbox.includes(String(skill.key));
|
|
1939
|
+
}
|
|
1940
|
+
}
|
|
1941
|
+
return selected;
|
|
1942
|
+
}));
|
|
1943
|
+
this.form.get('user-skills').setValue(prevValues);
|
|
1944
|
+
return this.filteredSkillsByServicesCheckbox;
|
|
1945
|
+
}
|
|
1946
|
+
}
|
|
1947
|
+
this.filteredSkillsByServices = this.sortGroupOptions(this.filteredSkillsByServices);
|
|
1948
|
+
return this.filteredSkillsByServices;
|
|
1949
|
+
};
|
|
1950
|
+
/**
|
|
1951
|
+
* @private
|
|
1952
|
+
* @param {?} formValues
|
|
1953
|
+
* @param {?} field
|
|
1954
|
+
* @return {?}
|
|
1955
|
+
*/
|
|
1956
|
+
GenericFilterComponent.prototype.getSelectedValuesForFields = /**
|
|
1957
|
+
* @private
|
|
1958
|
+
* @param {?} formValues
|
|
1959
|
+
* @param {?} field
|
|
1960
|
+
* @return {?}
|
|
1961
|
+
*/
|
|
1962
|
+
function (formValues, field) {
|
|
1963
|
+
/** @type {?} */
|
|
1964
|
+
var selectedValues = [];
|
|
1965
|
+
Object.keys(formValues).map((/**
|
|
1966
|
+
* @param {?} name
|
|
1967
|
+
* @return {?}
|
|
1968
|
+
*/
|
|
1969
|
+
function (name) {
|
|
1970
|
+
/** @type {?} */
|
|
1971
|
+
var values = formValues[name].value;
|
|
1972
|
+
if (name === field.name) {
|
|
1973
|
+
values.forEach((/**
|
|
1974
|
+
* @param {?} v
|
|
1975
|
+
* @return {?}
|
|
1976
|
+
*/
|
|
1977
|
+
function (v) {
|
|
1978
|
+
selectedValues.push(v.key);
|
|
1979
|
+
}));
|
|
1980
|
+
}
|
|
1981
|
+
}));
|
|
1982
|
+
return selectedValues;
|
|
1983
|
+
};
|
|
1984
|
+
/**
|
|
1985
|
+
* @private
|
|
1986
|
+
* @param {?} groupOptions
|
|
1987
|
+
* @return {?}
|
|
1988
|
+
*/
|
|
1989
|
+
GenericFilterComponent.prototype.sortGroupOptions = /**
|
|
1990
|
+
* @private
|
|
1991
|
+
* @param {?} groupOptions
|
|
1992
|
+
* @return {?}
|
|
1993
|
+
*/
|
|
1994
|
+
function (groupOptions) {
|
|
1995
|
+
/** @type {?} */
|
|
1996
|
+
var sortedResults = [];
|
|
1997
|
+
/** @type {?} */
|
|
1998
|
+
var groups = groupOptions.map((/**
|
|
1999
|
+
* @param {?} go
|
|
2000
|
+
* @return {?}
|
|
2001
|
+
*/
|
|
2002
|
+
function (go) { return go.group; }));
|
|
2003
|
+
groups.sort().forEach((/**
|
|
2004
|
+
* @param {?} g
|
|
2005
|
+
* @return {?}
|
|
2006
|
+
*/
|
|
2007
|
+
function (g) {
|
|
2008
|
+
/** @type {?} */
|
|
2009
|
+
var options = groupOptions.find((/**
|
|
2010
|
+
* @param {?} go
|
|
2011
|
+
* @return {?}
|
|
2012
|
+
*/
|
|
2013
|
+
function (go) { return go.group === g; })).options;
|
|
2014
|
+
/** @type {?} */
|
|
2015
|
+
var sortedOptions = options.sort((/**
|
|
2016
|
+
* @param {?} a
|
|
2017
|
+
* @param {?} b
|
|
2018
|
+
* @return {?}
|
|
2019
|
+
*/
|
|
2020
|
+
function (a, b) {
|
|
2021
|
+
return a.label.toLowerCase() > b.label.toLowerCase() ? 1 : (b.label.toLowerCase() > a.label.toLowerCase() ? -1 : 0);
|
|
2022
|
+
}));
|
|
2023
|
+
/** @type {?} */
|
|
2024
|
+
var result = {
|
|
2025
|
+
group: g,
|
|
2026
|
+
options: sortedOptions
|
|
2027
|
+
};
|
|
2028
|
+
sortedResults.push(result);
|
|
2029
|
+
}));
|
|
2030
|
+
return sortedResults;
|
|
2031
|
+
};
|
|
1637
2032
|
GenericFilterComponent.decorators = [
|
|
1638
2033
|
{ type: Component, args: [{
|
|
1639
2034
|
selector: 'xuilib-generic-filter',
|
|
1640
|
-
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 [id]=\"field.name\"\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)=\"fieldChanged(field, form)\" [attr.disabled]=\"disabled(field, form)\" [name]=\"'select_' + field.name\" [id]=\"'select_' + field.name\" [formControlName]=\"field.name\">\n <option disabled selected hidden value=\"\">{{field.disabledText}}</option>\n <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=\"'checkbox-large'\">\n <div class=\"govuk-checkboxes\" [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)=\"fieldChanged(field, form)\"\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 (personFieldChanged)=\"inputChanged(field)\"\n [submitted]=\"submitted\"\n [disabled]=\"disabled(field, form)\"\n [domain]=\"form.get(field.domainField)?.value\"\n [findPersonGroup]=\"form\"\n [selectedPerson]=\"form.get(field.name)?.value?.email\"\n [userIncluded]=\"false\"\n [placeholderContent]=\"field.placeholderContent ? field.placeholderContent : ''\"\n ></xuilib-find-person>\n </ng-container>\n <ng-container *ngSwitchCase=\"'find-location'\">\n <xuilib-find-location (locationFieldChanged)=\"inputChanged(field)\"\n [form]=\"form\"\n [fields]=\"config.fields\"\n [locationTitle]=\"field.locationTitle\"\n [enableAddLocationButton]=\"field.enableAddButton\"\n [disabled]=\"disabled(field, form)\"\n [disableInputField]=\"field.disable\"\n [selectedLocations]=\"form.get(field.name)?.value\"\n [submitted]=\"submitted\"\n [field]=\"field\"\n [services]=\"form.get(field.findLocationField)?.value\"\n ></xuilib-find-location>\n </ng-container>\n <ng-container *ngSwitchCase=\"'find-service'\">\n <xuilib-find-service (serviceFieldChanged)=\"inputChanged(field)\"\n [form]=\"form\"\n [fields]=\"config.fields\"\n [title]=\"field.title\"\n [enableAddServiceButton]=\"field.enableAddButton\"\n [disabled]=\"disabled(field, form)\"\n [disableInputField]=\"field.disable\"\n [field]=\"field\"\n [selectedServices]=\"form.get(field.name)?.value\" \n ></xuilib-find-service>\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 *ngIf=\"config.showCancelFilterButton\"\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",
|
|
2035
|
+
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 <ng-container [ngSwitch]=\"field.type\">\n <ng-container *ngSwitchCase=\"'group-title'\">\n <div [class]=\"field.titleClasses ? field.titleClasses: 'govuk-label govuk-label--m govuk-!-margin-bottom-4'\">\n {{ field.name | capitalize }}\n </div>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <div class=\"govuk-form-group xui-generic-filter\"\n [hidden]=\"hidden(field, form)\"\n [id]=\"field.name\"\n [ngClass]=\"{'form-group-error': submitted && (form.get(field.name).errors?.minLength || form.get(field.name).errors?.maxLength)}\">\n <div *ngIf=\"field.title\" class=\"xui-generic-filter__field-title\">\n <h3 [class]=\"field.titleClasses ? field.titleClasses : 'govuk-heading-s'\" style=\"margin-bottom: 0!important\">\n {{field.title | capitalize}}\n </h3>\n <div *ngIf=\"field?.titleHint\" class=\"govuk-!-margin-left-2\">\n {{ field.titleHint }}\n </div>\n </div>\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 <span [id]=\"field.name + '-error'\" class=\"govuk-error-message\"\n *ngIf=\"field.emailError && submitted && form.get(field.name).errors?.email\">\n <span class=\"govuk-visually-hidden\">Error:</span> {{field.emailError}}\n </span>\n <div class=\"govuk-body\" [class.govuk-body--maxWidth480px]=\"field.maxWidth480px\" [ngSwitch]=\"field.type\">\n <ng-container *ngSwitchCase=\"'select'\">\n <select class=\"govuk-select\" (change)=\"fieldChanged(field, form)\" [attr.disabled]=\"disabled(field, form)\" [name]=\"'select_' + field.name\" [id]=\"'select_' + field.name\" [formControlName]=\"field.name\">\n <option disabled selected hidden value=\"\">{{field.disabledText}}</option>\n <option *ngIf=\"field.defaultOption\" [attr.selected]=\"true\" [value]=\"field.defaultOption.key\">{{field.defaultOption.label}}</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=\"'group-select'\">\n <select class=\"govuk-select\" (change)=\"fieldChanged(field, form)\" [attr.disabled]=\"disabled(field, form)\" [name]=\"'select_' + field.name\" [id]=\"'select_' + field.name\" [formControlName]=\"field.name\">\n <option disabled selected hidden value=\"\">{{field.disabledText}}</option>\n <option *ngIf=\"field.defaultOption\" selected [value]=\"field.defaultOption.key\">{{field.defaultOption.label}}</option>\n <optgroup *ngFor = 'let grp of filteredSkillsByServices' label=\"{{grp.group | titlecase}}\">\n <option *ngFor = 'let item of grp.options' [value]=\"item.key\">{{item.label}}</option>\n </optgroup>\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=\"'nested-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 filteredSkillsByServicesCheckbox; 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=\"'checkbox-large'\">\n <div class=\"govuk-checkboxes\" [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)=\"fieldChanged(field, form)\"\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 (personFieldChanged)=\"inputChanged(field)\"\n [submitted]=\"submitted\"\n [disabled]=\"disabled(field, form)\"\n [domain]=\"form.get(field.domainField)?.value\"\n [findPersonGroup]=\"form\"\n [selectedPerson]=\"form.get(field.name)?.value?.email\"\n [userIncluded]=\"false\"\n [placeholderContent]=\"field.placeholderContent ? field.placeholderContent : ''\"\n ></xuilib-find-person>\n </ng-container>\n <ng-container *ngSwitchCase=\"'find-location'\">\n <xuilib-find-location (locationFieldChanged)=\"inputChanged(field)\"\n [form]=\"form\"\n [fields]=\"config.fields\"\n [locationTitle]=\"field.locationTitle\"\n [enableAddLocationButton]=\"field.enableAddButton\"\n [disabled]=\"disabled(field, form)\"\n [disableInputField]=\"field.disable\"\n [selectedLocations]=\"form.get(field.name)?.value\"\n [submitted]=\"submitted\"\n [services]=\"form.get(field.findLocationField)?.value\"\n [field]=\"field\"\n ></xuilib-find-location>\n </ng-container>\n <ng-container *ngSwitchCase=\"'find-task-name'\">\n <xuilib-find-task-name subTitle=\"\" (taskNameSelected)=\"updateTaskNameControls($event, field)\"\n (taskNameFieldChanged)=\"inputChanged(field)\"\n [submitted]=\"submitted\"\n [disabled]=\"disabled(field, form)\"\n [domain]=\"form.get(field.domainField)?.value\"\n [findTaskNameGroup]=\"form\"\n [selectedTaskName]=\"form.get(field.name).value.taskName\"\n [userIncluded]=\"false\"\n ></xuilib-find-task-name>\n </ng-container>\n <ng-container *ngSwitchCase=\"'find-service'\">\n <xuilib-find-service (serviceFieldChanged)=\"inputChanged(field)\"\n [form]=\"form\"\n [fields]=\"config.fields\"\n [title]=\"field.title\"\n [enableAddServiceButton]=\"field.enableAddButton\"\n [disabled]=\"disabled(field, form)\"\n [disableInputField]=\"field.disable\"\n [selectedServices]=\"form.get(field.name)?.value\"\n [services]=\"field.options\"\n [field]=\"field\"\n ></xuilib-find-service>\n </ng-container>\n <ng-container *ngSwitchCase=\"'text-input'\">\n <input class=\"govuk-input\" type=\"text\"\n [formControlName]=\"field.name\"\n [id]=\"field.name\"\n [attr.disabled]=\"disabled(field, form)\"\n (change)=\"fieldChanged(field, form)\"\n [attr.maxlength]=\"field.maxlength ? field.maxlength : null\"\n />\n </ng-container>\n <ng-container *ngSwitchCase=\"'email-input'\">\n <input class=\"govuk-input\" type=\"email\"\n [formControlName]=\"field.name\"\n [id]=\"field.name\"\n [attr.disabled]=\"disabled(field, form)\"\n (change)=\"fieldChanged(field, form)\"\n />\n </ng-container>\n </div>\n </div>\n </ng-container>\n</ng-container>\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 *ngIf=\"config.showCancelFilterButton\"\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",
|
|
1641
2036
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1642
2037
|
encapsulation: ViewEncapsulation.None,
|
|
1643
|
-
styles: [".contain-classes .elevated-break{
|
|
2038
|
+
styles: [".contain-classes .elevated-break{margin-bottom:20px}@media (min-width:40.0625em){.contain-classes .elevated-break{margin-bottom:30px}}.contain-classes .govuk-body--maxWidth480px{max-width:480px}.contain-classes .xui-generic-filter .select-all{margin-bottom:10px}.contain-classes .xui-generic-filter .govuk-checkboxes{display:flex;flex-direction:column;flex-wrap:wrap}.contain-classes .xui-generic-filter .govuk-checkboxes>div{flex-grow:1;flex-shrink:0}.contain-classes .xui-generic-filter__field-title{display:flex;align-items:center;margin-bottom:10px}.contain-classes .govuk-select{width:100%}"]
|
|
1644
2039
|
}] }
|
|
1645
2040
|
];
|
|
1646
2041
|
/** @nocollapse */
|
|
@@ -3951,6 +4346,17 @@ var LoggedInFeatureUser = /** @class */ (function () {
|
|
|
3951
4346
|
return LoggedInFeatureUser;
|
|
3952
4347
|
}());
|
|
3953
4348
|
|
|
4349
|
+
/**
|
|
4350
|
+
* @fileoverview added by tsickle
|
|
4351
|
+
* Generated from: lib/models/filter.model.ts
|
|
4352
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4353
|
+
*/
|
|
4354
|
+
var RadioFilterFieldConfig = /** @class */ (function () {
|
|
4355
|
+
function RadioFilterFieldConfig() {
|
|
4356
|
+
}
|
|
4357
|
+
return RadioFilterFieldConfig;
|
|
4358
|
+
}());
|
|
4359
|
+
|
|
3954
4360
|
/**
|
|
3955
4361
|
* @fileoverview added by tsickle
|
|
3956
4362
|
* Generated from: lib/models/idle-config.model.ts
|
|
@@ -3985,7 +4391,7 @@ var PersonRole = {
|
|
|
3985
4391
|
JUDICIAL: "Judicial",
|
|
3986
4392
|
CASEWORKER: "Legal Ops",
|
|
3987
4393
|
ADMIN: "Admin",
|
|
3988
|
-
CTSC: "CTSC",
|
|
4394
|
+
CTSC: "CTSC User",
|
|
3989
4395
|
ALL: "All",
|
|
3990
4396
|
};
|
|
3991
4397
|
/** @enum {string} */
|
|
@@ -4009,17 +4415,6 @@ var RoleCategory = {
|
|
|
4009
4415
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4010
4416
|
*/
|
|
4011
4417
|
|
|
4012
|
-
/**
|
|
4013
|
-
* @fileoverview added by tsickle
|
|
4014
|
-
* Generated from: lib/models/filter.model.ts
|
|
4015
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4016
|
-
*/
|
|
4017
|
-
var RadioFilterFieldConfig = /** @class */ (function () {
|
|
4018
|
-
function RadioFilterFieldConfig() {
|
|
4019
|
-
}
|
|
4020
|
-
return RadioFilterFieldConfig;
|
|
4021
|
-
}());
|
|
4022
|
-
|
|
4023
4418
|
/**
|
|
4024
4419
|
* @fileoverview added by tsickle
|
|
4025
4420
|
* Generated from: lib/models/public_api.ts
|
|
@@ -4126,7 +4521,7 @@ var LocationService = /** @class */ (function () {
|
|
|
4126
4521
|
|
|
4127
4522
|
/**
|
|
4128
4523
|
* @fileoverview added by tsickle
|
|
4129
|
-
* Generated from: lib/services/session-storage/session-storage.service.ts
|
|
4524
|
+
* Generated from: lib/services/storage/session-storage/session-storage.service.ts
|
|
4130
4525
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4131
4526
|
*/
|
|
4132
4527
|
var SessionStorageService = /** @class */ (function () {
|
|
@@ -4444,7 +4839,7 @@ var SearchLocationComponent = /** @class */ (function () {
|
|
|
4444
4839
|
{ type: Component, args: [{
|
|
4445
4840
|
selector: 'exui-search-location',
|
|
4446
4841
|
template: "<div class=\"auto-complete-container\">\n <input\n id=\"inputLocationSearch\"\n (input)=\"onInput()\"\n [formControl]=\"form.controls.searchTerm\"\n [matAutocomplete]=\"autoSearchLocation\"\n class=\"govuk-input\"\n [attr.disabled]=\"disabled\">\n <mat-autocomplete class=\"mat-autocomplete-panel-extend\" autoActiveFirstOption #autoSearchLocation=\"matAutocomplete\">\n <mat-option *ngFor=\"let location of locations\"\n (onSelectionChange)=\"onSelectionChange(location)\">\n {{ location.site_name }}\n </mat-option>\n <mat-option *ngIf=\"!locations.length && showAutocomplete && term && term.length >= this.minSearchCharacters\">No results found</mat-option>\n </mat-autocomplete>\n</div>\n",
|
|
4447
|
-
styles: [".autocomplete__input--show-all-values{padding:5px 34px 5px 5px;cursor:pointer}.autocomplete__dropdown-arrow-down{z-index:-1;display:inline-block;position:absolute;right:8px;width:24px;height:24px;top:10px}.autocomplete__menu{background-color:#fff;border:2px solid #0b0c0c;border-top:0;color:#0b0c0c;margin:0;max-height:342px;overflow-x:hidden;padding:0;width:
|
|
4842
|
+
styles: [".autocomplete__input--show-all-values{padding:5px 34px 5px 5px;cursor:pointer}.autocomplete__dropdown-arrow-down{z-index:-1;display:inline-block;position:absolute;right:8px;width:24px;height:24px;top:10px}.autocomplete__menu{background-color:#fff;border:2px solid #0b0c0c;border-top:0;color:#0b0c0c;margin:0;max-height:342px;overflow-x:hidden;padding:0;width:calc(100% - 4px)}.autocomplete__menu--visible{display:block}.autocomplete__menu--hidden{display:none}.autocomplete__menu--overlay{box-shadow: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:13px;line-height:1.25}.autocomplete__hint,.autocomplete__option{padding:5px}@media (min-width:641px){.autocomplete__hint,.autocomplete__input,.autocomplete__option{font-size:13px;line-height:1.31579}}.div-action{display:inline-block}.add-location{display:inline}.remove-location-button{margin:5px}.hide-autocomplete{display:none}.auto-complete-container{display:inline-block;margin-right:4px;width:calc(100% - 4px)}.autocomplete__input{line-height:24px;font-size:19px}"]
|
|
4448
4843
|
}] }
|
|
4449
4844
|
];
|
|
4450
4845
|
/** @nocollapse */
|
|
@@ -4534,7 +4929,11 @@ var FindLocationComponent = /** @class */ (function () {
|
|
|
4534
4929
|
* @param {?} f
|
|
4535
4930
|
* @return {?}
|
|
4536
4931
|
*/
|
|
4537
|
-
function (f) {
|
|
4932
|
+
function (f) {
|
|
4933
|
+
if (_this.field) {
|
|
4934
|
+
return f.name === _this.field.findLocationField;
|
|
4935
|
+
}
|
|
4936
|
+
}));
|
|
4538
4937
|
if (field) {
|
|
4539
4938
|
if (typeof value === 'string') {
|
|
4540
4939
|
this.serviceIds = value;
|
|
@@ -4703,8 +5102,8 @@ var FindLocationComponent = /** @class */ (function () {
|
|
|
4703
5102
|
FindLocationComponent.decorators = [
|
|
4704
5103
|
{ type: Component, args: [{
|
|
4705
5104
|
selector: 'xuilib-find-location',
|
|
4706
|
-
template: "<div class=\"location-picker-custom\">\n <div class=\"search-location\">\n <div>\n <label id=\"input-selected-location-label\" *ngIf=\"locationTitle\">{{locationTitle}}</label>\n </div>\n <exui-search-location class=\"search-
|
|
4707
|
-
styles: [""]
|
|
5105
|
+
template: "<div class=\"location-picker-custom\">\n <div class=\"search-location\">\n <div>\n <label id=\"input-selected-location-label\" *ngIf=\"locationTitle\">{{locationTitle}}</label>\n </div>\n\n <div class=\"search-location__input-container\">\n <exui-search-location class=\"search-location__input\"\n [locations]=\"locations\"\n [selectedLocations]=\"selectedLocations\"\n [singleMode]=\"field.maxSelected === 1\"\n [bookingCheck]=\"field.bookingCheckType\"\n [delay]=\"300\"\n [disabled]=\"disabled\"\n [serviceIds]=\"serviceIds\"\n (locationInputChanged)=\"onInputChanged($event)\"\n (locationSelected)=\"onLocationSelected($event)\"\n (searchLocationChanged)=\"onSearchInputChanged()\"\n [locationType]=\"'case-management'\"></exui-search-location>\n <a href=\"javascript:void(0)\" (click)=\"addLocation()\"\n class=\"govuk-button govuk-button--secondary govuk-!-margin-bottom-0\" data-module=\"govuk-button\"\n *ngIf=\"enableAddLocationButton\">\n Add\n </a>\n </div>\n </div>\n <ul class=\"hmcts-filter-tags selection-container\" *ngIf=\"field.maxSelected != 1\">\n <li class=\"location-selection\" *ngFor=\"let selection of selectedLocations\">\n <a class=\"hmcts-filter__tag\" (click)=\"removeLocation(selection)\" href=\"javascript:void(0)\">\n {{ selection.site_name }}\n </a>\n </li>\n </ul>\n</div>\n",
|
|
5106
|
+
styles: [".search-location__input-container{display:flex}.search-location .auto-complete-container{min-width:unset;width:calc(100% - 4px)}.search-location__input{flex:1 0 auto}.search-location .govuk-button--secondary{background-color:#ddd}"]
|
|
4708
5107
|
}] }
|
|
4709
5108
|
];
|
|
4710
5109
|
FindLocationComponent.propDecorators = {
|
|
@@ -5457,7 +5856,7 @@ var FindServiceComponent = /** @class */ (function () {
|
|
|
5457
5856
|
FindServiceComponent.decorators = [
|
|
5458
5857
|
{ type: Component, args: [{
|
|
5459
5858
|
selector: 'xuilib-find-service',
|
|
5460
|
-
template: "<div class=\"service-picker-custom\">\n <div class=\"search-service\">\n <div>\n <label id=\"input-selected-service-label\" *ngIf=\"serviceTitle\">{{serviceTitle}}</label>\n </div>\n <exui-search-service class=\"search-service\"\n [services]=\"services\"\n [selectedServices]=\"selectedServices\"\n [delay]=\"300\"\n [disabled]=\"disabled\"></exui-search-service>\n <a href=\"javascript:void(0)\" (click)=\"addService()\" class=\"govuk-button govuk-button--secondary govuk-!-margin-bottom-0\"
|
|
5859
|
+
template: "<div class=\"service-picker-custom\">\n <div class=\"search-service\">\n <div>\n <label id=\"input-selected-service-label\" *ngIf=\"serviceTitle\">{{serviceTitle}}</label>\n </div>\n <exui-search-service class=\"search-service\"\n [services]=\"services\"\n [selectedServices]=\"selectedServices\"\n [delay]=\"300\"\n [disabled]=\"disabled\"></exui-search-service>\n <a href=\"javascript:void(0)\" (click)=\"addService()\" class=\"govuk-button govuk-button--secondary govuk-!-margin-bottom-0\"\n data-module=\"govuk-button\" *ngIf=\"enableAddServiceButton\" id=\"add-service\">\n Add\n </a>\n </div>\n <ul class=\"hmcts-filter-tags selection-container\" *ngIf=\"field.maxSelected != 1\">\n <li class=\"service-selection\" *ngFor=\"let selection of selectedServices\">\n <a class=\"hmcts-filter__tag\" href=\"javascript:void(0)\">\n {{ selection.name }}\n </a>\n </li>\n </ul>\n </div>\n",
|
|
5461
5860
|
styles: ["#add-service{background-color:#ddd}"]
|
|
5462
5861
|
}] }
|
|
5463
5862
|
];
|
|
@@ -5477,29 +5876,248 @@ var FindServiceComponent = /** @class */ (function () {
|
|
|
5477
5876
|
|
|
5478
5877
|
/**
|
|
5479
5878
|
* @fileoverview added by tsickle
|
|
5480
|
-
* Generated from: lib/
|
|
5879
|
+
* Generated from: lib/services/task-name/task-name.service.ts
|
|
5481
5880
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
5482
5881
|
*/
|
|
5483
|
-
var
|
|
5484
|
-
function
|
|
5485
|
-
this.
|
|
5486
|
-
this.
|
|
5487
|
-
|
|
5488
|
-
|
|
5489
|
-
|
|
5490
|
-
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
-
|
|
5495
|
-
|
|
5496
|
-
|
|
5497
|
-
|
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
|
|
5501
|
-
|
|
5502
|
-
|
|
5882
|
+
var TaskNameService = /** @class */ (function () {
|
|
5883
|
+
function TaskNameService(http, sessionStorageService) {
|
|
5884
|
+
this.http = http;
|
|
5885
|
+
this.sessionStorageService = sessionStorageService;
|
|
5886
|
+
}
|
|
5887
|
+
/**
|
|
5888
|
+
* @return Observable<any[]>: Array of taskName in Observable
|
|
5889
|
+
*/
|
|
5890
|
+
/**
|
|
5891
|
+
* @return {?} Observable<any[]>: Array of taskName in Observable
|
|
5892
|
+
*/
|
|
5893
|
+
TaskNameService.prototype.getTaskName = /**
|
|
5894
|
+
* @return {?} Observable<any[]>: Array of taskName in Observable
|
|
5895
|
+
*/
|
|
5896
|
+
function () {
|
|
5897
|
+
var _this = this;
|
|
5898
|
+
if (this.sessionStorageService.getItem(TaskNameService.taskNamesKey)) {
|
|
5899
|
+
/** @type {?} */
|
|
5900
|
+
var taskNames = JSON.parse(this.sessionStorageService.getItem(TaskNameService.taskNamesKey));
|
|
5901
|
+
return of((/** @type {?} */ (taskNames)));
|
|
5902
|
+
}
|
|
5903
|
+
return this.http.get("/workallocation/taskNames").pipe(tap((/**
|
|
5904
|
+
* @param {?} taskNames
|
|
5905
|
+
* @return {?}
|
|
5906
|
+
*/
|
|
5907
|
+
function (taskNames) { return _this.sessionStorageService.setItem(TaskNameService.taskNamesKey, JSON.stringify(taskNames)); })));
|
|
5908
|
+
};
|
|
5909
|
+
TaskNameService.taskNamesKey = 'taskNames';
|
|
5910
|
+
TaskNameService.decorators = [
|
|
5911
|
+
{ type: Injectable, args: [{
|
|
5912
|
+
providedIn: 'root'
|
|
5913
|
+
},] }
|
|
5914
|
+
];
|
|
5915
|
+
/** @nocollapse */
|
|
5916
|
+
TaskNameService.ctorParameters = function () { return [
|
|
5917
|
+
{ type: HttpClient },
|
|
5918
|
+
{ type: SessionStorageService }
|
|
5919
|
+
]; };
|
|
5920
|
+
/** @nocollapse */ TaskNameService.ngInjectableDef = defineInjectable({ factory: function TaskNameService_Factory() { return new TaskNameService(inject(HttpClient), inject(SessionStorageService)); }, token: TaskNameService, providedIn: "root" });
|
|
5921
|
+
return TaskNameService;
|
|
5922
|
+
}());
|
|
5923
|
+
|
|
5924
|
+
/**
|
|
5925
|
+
* @fileoverview added by tsickle
|
|
5926
|
+
* Generated from: lib/components/find-task-name/find-task-name.component.ts
|
|
5927
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
5928
|
+
*/
|
|
5929
|
+
var FindTaskNameComponent = /** @class */ (function () {
|
|
5930
|
+
function FindTaskNameComponent(cd, taskService) {
|
|
5931
|
+
this.cd = cd;
|
|
5932
|
+
this.taskService = taskService;
|
|
5933
|
+
this.taskNameSelected = new EventEmitter();
|
|
5934
|
+
this.taskNameFieldChanged = new EventEmitter();
|
|
5935
|
+
this.boldTitle = 'Find the task name';
|
|
5936
|
+
this.subTitle = 'Type the name of the task name and select them.';
|
|
5937
|
+
this.domain = PersonRole.ALL;
|
|
5938
|
+
this.findTaskNameGroup = new FormGroup({});
|
|
5939
|
+
this.submitted = true;
|
|
5940
|
+
this.userIncluded = false;
|
|
5941
|
+
this.placeholderContent = '';
|
|
5942
|
+
this.isNoResultsShown = true;
|
|
5943
|
+
this.showUpdatedColor = false;
|
|
5944
|
+
this.selectedTaskNames = [];
|
|
5945
|
+
this.errorMessage = 'You must select a name';
|
|
5946
|
+
this.idValue = '';
|
|
5947
|
+
this.services = ['IA'];
|
|
5948
|
+
this.disabled = null;
|
|
5949
|
+
this.showAutocomplete = false;
|
|
5950
|
+
this.filteredOptions = [];
|
|
5951
|
+
this.minSearchCharacters = 1;
|
|
5952
|
+
this.searchTerm = '';
|
|
5953
|
+
}
|
|
5954
|
+
/**
|
|
5955
|
+
* @return {?}
|
|
5956
|
+
*/
|
|
5957
|
+
FindTaskNameComponent.prototype.ngOnDestroy = /**
|
|
5958
|
+
* @return {?}
|
|
5959
|
+
*/
|
|
5960
|
+
function () {
|
|
5961
|
+
if (this.sub) {
|
|
5962
|
+
this.sub.unsubscribe();
|
|
5963
|
+
}
|
|
5964
|
+
};
|
|
5965
|
+
/**
|
|
5966
|
+
* @return {?}
|
|
5967
|
+
*/
|
|
5968
|
+
FindTaskNameComponent.prototype.ngOnChanges = /**
|
|
5969
|
+
* @return {?}
|
|
5970
|
+
*/
|
|
5971
|
+
function () {
|
|
5972
|
+
var _this = this;
|
|
5973
|
+
this.findTaskNameControl = new FormControl(this.selectedTaskName);
|
|
5974
|
+
this.findTaskNameGroup.addControl('findTaskNameControl', this.findTaskNameControl);
|
|
5975
|
+
this.sub = this.findTaskNameControl.valueChanges
|
|
5976
|
+
.pipe(tap((/**
|
|
5977
|
+
* @return {?}
|
|
5978
|
+
*/
|
|
5979
|
+
function () { return _this.showAutocomplete = false; })), tap((/**
|
|
5980
|
+
* @return {?}
|
|
5981
|
+
*/
|
|
5982
|
+
function () { return _this.filteredOptions = []; })), tap((/**
|
|
5983
|
+
* @param {?} term
|
|
5984
|
+
* @return {?}
|
|
5985
|
+
*/
|
|
5986
|
+
function (term) { return _this.searchTerm = term; })), debounceTime(300), tap((/**
|
|
5987
|
+
* @param {?} searchTerm
|
|
5988
|
+
* @return {?}
|
|
5989
|
+
*/
|
|
5990
|
+
function (searchTerm) {
|
|
5991
|
+
if (!searchTerm) {
|
|
5992
|
+
_this.taskNameSelected.emit('');
|
|
5993
|
+
}
|
|
5994
|
+
return searchTerm;
|
|
5995
|
+
})),
|
|
5996
|
+
// tap((searchTerm) => typeof searchTerm === 'string' ? this.taskNameSelected.emit('null') : void 0),
|
|
5997
|
+
filter((/**
|
|
5998
|
+
* @param {?} searchTerm
|
|
5999
|
+
* @return {?}
|
|
6000
|
+
*/
|
|
6001
|
+
function (searchTerm) { return searchTerm && searchTerm.length >= _this.minSearchCharacters; })), mergeMap((/**
|
|
6002
|
+
* @return {?}
|
|
6003
|
+
*/
|
|
6004
|
+
function () { return _this.getTaskName(); }))).subscribe((/**
|
|
6005
|
+
* @param {?} taskNameModel
|
|
6006
|
+
* @return {?}
|
|
6007
|
+
*/
|
|
6008
|
+
function (taskNameModel) {
|
|
6009
|
+
_this.filteredOptions = taskNameModel.map((/**
|
|
6010
|
+
* @param {?} task
|
|
6011
|
+
* @return {?}
|
|
6012
|
+
*/
|
|
6013
|
+
function (task) { return task.taskName; }));
|
|
6014
|
+
if (_this.searchTerm) {
|
|
6015
|
+
_this.filteredOptions = _this.filteredOptions.filter((/**
|
|
6016
|
+
* @param {?} taskName
|
|
6017
|
+
* @return {?}
|
|
6018
|
+
*/
|
|
6019
|
+
function (taskName) { return taskName.toLocaleLowerCase().includes(_this.searchTerm.toLocaleLowerCase()); })).map((/**
|
|
6020
|
+
* @param {?} taskName
|
|
6021
|
+
* @return {?}
|
|
6022
|
+
*/
|
|
6023
|
+
function (taskName) { return taskName; }));
|
|
6024
|
+
}
|
|
6025
|
+
_this.cd.detectChanges();
|
|
6026
|
+
}));
|
|
6027
|
+
};
|
|
6028
|
+
/**
|
|
6029
|
+
* @return {?}
|
|
6030
|
+
*/
|
|
6031
|
+
FindTaskNameComponent.prototype.getTaskName = /**
|
|
6032
|
+
* @return {?}
|
|
6033
|
+
*/
|
|
6034
|
+
function () {
|
|
6035
|
+
return this.taskService.getTaskName();
|
|
6036
|
+
};
|
|
6037
|
+
/**
|
|
6038
|
+
* @param {?} selectedTaskName
|
|
6039
|
+
* @return {?}
|
|
6040
|
+
*/
|
|
6041
|
+
FindTaskNameComponent.prototype.onSelectionChange = /**
|
|
6042
|
+
* @param {?} selectedTaskName
|
|
6043
|
+
* @return {?}
|
|
6044
|
+
*/
|
|
6045
|
+
function (selectedTaskName) {
|
|
6046
|
+
if (selectedTaskName) {
|
|
6047
|
+
this.taskNameSelected.emit(selectedTaskName);
|
|
6048
|
+
this.findTaskNameControl.setValue(selectedTaskName);
|
|
6049
|
+
}
|
|
6050
|
+
};
|
|
6051
|
+
/**
|
|
6052
|
+
* @return {?}
|
|
6053
|
+
*/
|
|
6054
|
+
FindTaskNameComponent.prototype.onInput = /**
|
|
6055
|
+
* @return {?}
|
|
6056
|
+
*/
|
|
6057
|
+
function () {
|
|
6058
|
+
this.taskNameFieldChanged.emit();
|
|
6059
|
+
};
|
|
6060
|
+
FindTaskNameComponent.decorators = [
|
|
6061
|
+
{ type: Component, args: [{
|
|
6062
|
+
selector: 'xuilib-find-task-name',
|
|
6063
|
+
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]=\"findTaskNameGroup\"\n [ngClass]=\"{'form-group-error': findTaskNameGroup.get('findTaskNameControl')?.invalid && 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=\"findTaskNameGroup && findTaskNameGroup.errors\">\n <span class=\"govuk-visually-hidden\">Error:</span>{{findTaskNameGroup.errors.error ? findTaskNameGroup.errors.error : errorMessage}}\n </span>\n <input id=\"inputSelectTaskName{{idValue}}\" type=\"text\" aria-label=\"select a task name\"\n formControlName=\"findTaskNameControl\"\n [matAutocomplete]=\"auto\"\n class=\"govuk-input govuk-!-width-one-third\"\n [placeholder]=\"placeholderContent\"\n [attr.disabled]=\"disabled\"\n (input)=\"onInput()\">\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\" (optionSelected)=\"onSelectionChange($event.option.value)\">\n <mat-option *ngFor=\"let option of filteredOptions\"\n [value]=\"option\"\n [ngClass]=\"{'hide-autocomplete': !showAutocomplete, 'select-option': showUpdatedColor}\">\n {{ option }}\n </mat-option>\n <mat-option [ngClass]=\"{'select-option': showUpdatedColor}\" *ngIf=\"isNoResultsShown && !filteredOptions.length && showAutocomplete\">No results found</mat-option>\n </mat-autocomplete>\n </fieldset>\n</div>\n",
|
|
6064
|
+
styles: [""]
|
|
6065
|
+
}] }
|
|
6066
|
+
];
|
|
6067
|
+
/** @nocollapse */
|
|
6068
|
+
FindTaskNameComponent.ctorParameters = function () { return [
|
|
6069
|
+
{ type: ChangeDetectorRef },
|
|
6070
|
+
{ type: TaskNameService }
|
|
6071
|
+
]; };
|
|
6072
|
+
FindTaskNameComponent.propDecorators = {
|
|
6073
|
+
taskNameSelected: [{ type: Output }],
|
|
6074
|
+
taskNameFieldChanged: [{ type: Output }],
|
|
6075
|
+
title: [{ type: Input }],
|
|
6076
|
+
boldTitle: [{ type: Input }],
|
|
6077
|
+
subTitle: [{ type: Input }],
|
|
6078
|
+
domain: [{ type: Input }],
|
|
6079
|
+
findTaskNameGroup: [{ type: Input }],
|
|
6080
|
+
selectedTaskName: [{ type: Input }],
|
|
6081
|
+
submitted: [{ type: Input }],
|
|
6082
|
+
userIncluded: [{ type: Input }],
|
|
6083
|
+
assignedUser: [{ type: Input }],
|
|
6084
|
+
placeholderContent: [{ type: Input }],
|
|
6085
|
+
isNoResultsShown: [{ type: Input }],
|
|
6086
|
+
showUpdatedColor: [{ type: Input }],
|
|
6087
|
+
selectedTaskNames: [{ type: Input }],
|
|
6088
|
+
errorMessage: [{ type: Input }],
|
|
6089
|
+
idValue: [{ type: Input }],
|
|
6090
|
+
services: [{ type: Input }],
|
|
6091
|
+
disabled: [{ type: Input }]
|
|
6092
|
+
};
|
|
6093
|
+
return FindTaskNameComponent;
|
|
6094
|
+
}());
|
|
6095
|
+
|
|
6096
|
+
/**
|
|
6097
|
+
* @fileoverview added by tsickle
|
|
6098
|
+
* Generated from: lib/components/search-judicials/search-judicials.component.ts
|
|
6099
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
6100
|
+
*/
|
|
6101
|
+
var SearchJudicialsComponent = /** @class */ (function () {
|
|
6102
|
+
function SearchJudicialsComponent(judicialService, fb) {
|
|
6103
|
+
this.judicialService = judicialService;
|
|
6104
|
+
this.disabled = null;
|
|
6105
|
+
this.selectedJudicials = [];
|
|
6106
|
+
this.submitted = true;
|
|
6107
|
+
this.placeholderContent = '';
|
|
6108
|
+
this.showAutocomplete = false;
|
|
6109
|
+
this.judicialChanged = new EventEmitter();
|
|
6110
|
+
this.idValue = '';
|
|
6111
|
+
this.errorMessage = 'You must select a name';
|
|
6112
|
+
this.serviceId = '';
|
|
6113
|
+
this.minSearchCharacters = 3;
|
|
6114
|
+
this.keyUpSubject$ = new Subject();
|
|
6115
|
+
this.searchInProgress = false;
|
|
6116
|
+
this.formGroup = fb.group({
|
|
6117
|
+
formControl: [null],
|
|
6118
|
+
selectedFormControl: [null]
|
|
6119
|
+
});
|
|
6120
|
+
}
|
|
5503
6121
|
/**
|
|
5504
6122
|
* @return {?}
|
|
5505
6123
|
*/
|
|
@@ -5723,7 +6341,9 @@ var SearchJudicialsComponent = /** @class */ (function () {
|
|
|
5723
6341
|
*/
|
|
5724
6342
|
var SearchServiceComponent = /** @class */ (function () {
|
|
5725
6343
|
function SearchServiceComponent() {
|
|
6344
|
+
this.services = [];
|
|
5726
6345
|
this.showAutocomplete = false;
|
|
6346
|
+
this.serviceChanged = new EventEmitter();
|
|
5727
6347
|
this.minSearchCharacters = 3;
|
|
5728
6348
|
this.term = '';
|
|
5729
6349
|
}
|
|
@@ -5737,18 +6357,26 @@ var SearchServiceComponent = /** @class */ (function () {
|
|
|
5737
6357
|
// Todo
|
|
5738
6358
|
};
|
|
5739
6359
|
/**
|
|
6360
|
+
* @param {?} key
|
|
5740
6361
|
* @return {?}
|
|
5741
6362
|
*/
|
|
5742
|
-
SearchServiceComponent.prototype.
|
|
6363
|
+
SearchServiceComponent.prototype.onSelectionChanged = /**
|
|
6364
|
+
* @param {?} key
|
|
5743
6365
|
* @return {?}
|
|
5744
6366
|
*/
|
|
5745
|
-
function () {
|
|
5746
|
-
|
|
6367
|
+
function (key) {
|
|
6368
|
+
/** @type {?} */
|
|
6369
|
+
var selectedService = this.services.find((/**
|
|
6370
|
+
* @param {?} s
|
|
6371
|
+
* @return {?}
|
|
6372
|
+
*/
|
|
6373
|
+
function (s) { return s.key === key; }));
|
|
6374
|
+
this.serviceChanged.emit(selectedService);
|
|
5747
6375
|
};
|
|
5748
6376
|
SearchServiceComponent.decorators = [
|
|
5749
6377
|
{ type: Component, args: [{
|
|
5750
6378
|
selector: 'exui-search-service',
|
|
5751
|
-
template: "<div class=\"auto-complete-container\">\n <input\n id=\"inputServiceSearch\"\n (input)=\"onInput()\"\n [formControl]=\"form?.controls.searchTerm\"\n [matAutocomplete]=\"autoSearchService\"\n class=\"govuk-input\"\n [attr.disabled]=\"disabled\">\n <mat-autocomplete class=\"mat-autocomplete-panel-extend\" autoActiveFirstOption #autoSearchService=\"matAutocomplete\">\n <mat-option *ngFor=\"let service of services\" (onSelectionChange)=\"
|
|
6379
|
+
template: "<div class=\"auto-complete-container\">\n <input\n id=\"inputServiceSearch\"\n (input)=\"onInput()\"\n [formControl]=\"form?.controls.searchTerm\"\n [matAutocomplete]=\"autoSearchService\"\n class=\"govuk-input\"\n [attr.disabled]=\"disabled\"\n (change)=\"onSelectionChanged($event.target.value)\">\n <mat-autocomplete class=\"mat-autocomplete-panel-extend\" autoActiveFirstOption #autoSearchService=\"matAutocomplete\">\n <mat-option *ngFor=\"let service of services\" (onSelectionChange)=\"onSelectionChanged($event.target.value)\">\n {{ service.name }}\n </mat-option>\n <mat-option *ngIf=\"!services?.length && showAutocomplete && term && term.length >= this.minSearchCharacters\">No results found</mat-option>\n </mat-autocomplete>\n</div>\n",
|
|
5752
6380
|
styles: [".autocomplete__input--show-all-values{padding:5px 34px 5px 5px;cursor:pointer}.autocomplete__dropdown-arrow-down{z-index:-1;display:inline-block;position:absolute;right:8px;width:24px;height:24px;top:10px}.autocomplete__menu{background-color:#fff;border:2px solid #0b0c0c;border-top:0;color:#0b0c0c;margin:0;max-height:342px;overflow-x:hidden;padding:0;width: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:13px;line-height:1.25}.autocomplete__hint,.autocomplete__option{padding:5px}@media (min-width:641px){.autocomplete__hint,.autocomplete__input,.autocomplete__option{font-size:13px;line-height:1.31579}}.div-action{display:inline-block}.add-location{display:inline}.remove-location-button{margin:5px}.hide-autocomplete{display:none}.auto-complete-container{min-width:250px;display:inline-block;margin-right:4px}.autocomplete__input{line-height:24px;font-size:19px}"]
|
|
5753
6381
|
}] }
|
|
5754
6382
|
];
|
|
@@ -5758,7 +6386,8 @@ var SearchServiceComponent = /** @class */ (function () {
|
|
|
5758
6386
|
disabled: [{ type: Input }],
|
|
5759
6387
|
delay: [{ type: Input }],
|
|
5760
6388
|
form: [{ type: Input }],
|
|
5761
|
-
showAutocomplete: [{ type: Input }]
|
|
6389
|
+
showAutocomplete: [{ type: Input }],
|
|
6390
|
+
serviceChanged: [{ type: Output }]
|
|
5762
6391
|
};
|
|
5763
6392
|
return SearchServiceComponent;
|
|
5764
6393
|
}());
|
|
@@ -6048,6 +6677,58 @@ var GovUkCheckboxComponent = /** @class */ (function () {
|
|
|
6048
6677
|
return GovUkCheckboxComponent;
|
|
6049
6678
|
}());
|
|
6050
6679
|
|
|
6680
|
+
/**
|
|
6681
|
+
* @fileoverview added by tsickle
|
|
6682
|
+
* Generated from: lib/gov-ui/util/helpers/html-templates.helper.ts
|
|
6683
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
6684
|
+
*/
|
|
6685
|
+
/*
|
|
6686
|
+
* Helper Class
|
|
6687
|
+
* Used for dynamic templates manipulation
|
|
6688
|
+
* */
|
|
6689
|
+
var /*
|
|
6690
|
+
* Helper Class
|
|
6691
|
+
* Used for dynamic templates manipulation
|
|
6692
|
+
* */
|
|
6693
|
+
HtmlTemplatesHelper = /** @class */ (function () {
|
|
6694
|
+
function HtmlTemplatesHelper() {
|
|
6695
|
+
}
|
|
6696
|
+
/*
|
|
6697
|
+
* Sets described by string depending if
|
|
6698
|
+
* there is an error, error and hit or nothing
|
|
6699
|
+
* */
|
|
6700
|
+
/*
|
|
6701
|
+
* Sets described by string depending if
|
|
6702
|
+
* there is an error, error and hit or nothing
|
|
6703
|
+
* */
|
|
6704
|
+
/**
|
|
6705
|
+
* @param {?} errorMessage
|
|
6706
|
+
* @param {?} config
|
|
6707
|
+
* @return {?}
|
|
6708
|
+
*/
|
|
6709
|
+
HtmlTemplatesHelper.setDescribedBy = /*
|
|
6710
|
+
* Sets described by string depending if
|
|
6711
|
+
* there is an error, error and hit or nothing
|
|
6712
|
+
* */
|
|
6713
|
+
/**
|
|
6714
|
+
* @param {?} errorMessage
|
|
6715
|
+
* @param {?} config
|
|
6716
|
+
* @return {?}
|
|
6717
|
+
*/
|
|
6718
|
+
function (errorMessage, config) {
|
|
6719
|
+
if (!errorMessage) {
|
|
6720
|
+
return config.hint ? config.id + "-hint" : null;
|
|
6721
|
+
}
|
|
6722
|
+
else if (errorMessage && errorMessage.isInvalid) {
|
|
6723
|
+
return config.hint ? config.id + "-hint " + config.id + "-error" : config.id + "-error";
|
|
6724
|
+
}
|
|
6725
|
+
else {
|
|
6726
|
+
return config.hint ? config.id + "-hint" : null;
|
|
6727
|
+
}
|
|
6728
|
+
};
|
|
6729
|
+
return HtmlTemplatesHelper;
|
|
6730
|
+
}());
|
|
6731
|
+
|
|
6051
6732
|
/**
|
|
6052
6733
|
* @fileoverview added by tsickle
|
|
6053
6734
|
* Generated from: lib/gov-ui/components/gov-uk-checkboxes/gov-uk-checkboxes.component.ts
|
|
@@ -6063,15 +6744,100 @@ var GovUkCheckboxComponent = /** @class */ (function () {
|
|
|
6063
6744
|
var GovUkCheckboxesComponent = /** @class */ (function () {
|
|
6064
6745
|
function GovUkCheckboxesComponent() {
|
|
6065
6746
|
}
|
|
6747
|
+
/**
|
|
6748
|
+
* @return {?}
|
|
6749
|
+
*/
|
|
6750
|
+
GovUkCheckboxesComponent.prototype.ngOnInit = /**
|
|
6751
|
+
* @return {?}
|
|
6752
|
+
*/
|
|
6753
|
+
function () {
|
|
6754
|
+
this.columns = this.setColumns();
|
|
6755
|
+
};
|
|
6756
|
+
/**
|
|
6757
|
+
* @return {?}
|
|
6758
|
+
*/
|
|
6759
|
+
GovUkCheckboxesComponent.prototype.setDescribedBy = /**
|
|
6760
|
+
* @return {?}
|
|
6761
|
+
*/
|
|
6762
|
+
function () {
|
|
6763
|
+
return HtmlTemplatesHelper.setDescribedBy(this.errorMessage, this.config);
|
|
6764
|
+
};
|
|
6765
|
+
/**
|
|
6766
|
+
* @param {?} checked
|
|
6767
|
+
* @param {?} value
|
|
6768
|
+
* @return {?}
|
|
6769
|
+
*/
|
|
6770
|
+
GovUkCheckboxesComponent.prototype.onChecked = /**
|
|
6771
|
+
* @param {?} checked
|
|
6772
|
+
* @param {?} value
|
|
6773
|
+
* @return {?}
|
|
6774
|
+
*/
|
|
6775
|
+
function (checked, value) {
|
|
6776
|
+
/** @type {?} */
|
|
6777
|
+
var formControl = this.group.get(this.config.name);
|
|
6778
|
+
/** @type {?} */
|
|
6779
|
+
var array = formControl.value ? formControl.value : [];
|
|
6780
|
+
if (!checked) {
|
|
6781
|
+
/** @type {?} */
|
|
6782
|
+
var modifiedArray = array.filter((/**
|
|
6783
|
+
* @param {?} item
|
|
6784
|
+
* @return {?}
|
|
6785
|
+
*/
|
|
6786
|
+
function (item) { return item !== value; }));
|
|
6787
|
+
formControl.setValue(modifiedArray);
|
|
6788
|
+
}
|
|
6789
|
+
else {
|
|
6790
|
+
formControl.setValue(__spread(array, [value]));
|
|
6791
|
+
}
|
|
6792
|
+
};
|
|
6793
|
+
/**
|
|
6794
|
+
* @param {?} value
|
|
6795
|
+
* @return {?}
|
|
6796
|
+
*/
|
|
6797
|
+
GovUkCheckboxesComponent.prototype.isChecked = /**
|
|
6798
|
+
* @param {?} value
|
|
6799
|
+
* @return {?}
|
|
6800
|
+
*/
|
|
6801
|
+
function (value) {
|
|
6802
|
+
/** @type {?} */
|
|
6803
|
+
var formControl = this.group.get(this.config.name);
|
|
6804
|
+
return formControl.value && formControl.value.includes(value);
|
|
6805
|
+
};
|
|
6806
|
+
/**
|
|
6807
|
+
* @private
|
|
6808
|
+
* @return {?}
|
|
6809
|
+
*/
|
|
6810
|
+
GovUkCheckboxesComponent.prototype.setColumns = /**
|
|
6811
|
+
* @private
|
|
6812
|
+
* @return {?}
|
|
6813
|
+
*/
|
|
6814
|
+
function () {
|
|
6815
|
+
if (this.config.rows && this.config.rows > 1) {
|
|
6816
|
+
/** @type {?} */
|
|
6817
|
+
var array = [];
|
|
6818
|
+
for (var i = 0; i < this.items.length; i += this.config.rows) {
|
|
6819
|
+
/** @type {?} */
|
|
6820
|
+
var arrayChunk = this.items.slice(i, i + this.config.rows);
|
|
6821
|
+
array.push(arrayChunk);
|
|
6822
|
+
}
|
|
6823
|
+
return array;
|
|
6824
|
+
}
|
|
6825
|
+
else {
|
|
6826
|
+
return [this.items];
|
|
6827
|
+
}
|
|
6828
|
+
};
|
|
6066
6829
|
GovUkCheckboxesComponent.decorators = [
|
|
6067
6830
|
{ type: Component, args: [{
|
|
6068
6831
|
selector: 'xuilib-gov-uk-checkboxes',
|
|
6069
|
-
template: "<
|
|
6832
|
+
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 <div class=\"govuk-checkboxes govuk-checkboxes--small govuk-checkboxes-multi-column\" data-module=\"govuk-checkboxes\">\n <div class=\"govuk-checkboxes-multi-column__single\" *ngFor=\"let columnItems of columns\">\n <div class=\"govuk-checkboxes__item\" *ngFor=\"let item of columnItems\">\n <input type=\"checkbox\" class=\"govuk-checkboxes__input\"\n [id]=\"item.id\" [name]=\"item.id\" [checked]=\"isChecked(item.value)\" [value]=\"item.value\"\n [attr.aria-describedby]=\"setDescribedBy()\"\n (change)=\"onChecked($event.target.checked, item.value)\"\n >\n <label class=\"govuk-label govuk-checkboxes__label\" [for]=\"item.id\">\n {{ item.label }}\n </label>\n <div *ngIf=\"item.hint\" class=\"govuk-hint govuk-checkboxes__hint\">\n {{ item.hint }}\n </div>\n </div>\n </div>\n </div>\n</div>\n",
|
|
6833
|
+
styles: [".govuk-checkboxes-multi-column{display:flex;flex-wrap:wrap;margin-left:-20px;margin-right:-20px}.govuk-checkboxes-multi-column__single{padding-left:20px;padding-right:20px}"]
|
|
6070
6834
|
}] }
|
|
6071
6835
|
];
|
|
6072
6836
|
GovUkCheckboxesComponent.propDecorators = {
|
|
6073
|
-
|
|
6074
|
-
|
|
6837
|
+
group: [{ type: Input }],
|
|
6838
|
+
config: [{ type: Input }],
|
|
6839
|
+
items: [{ type: Input }],
|
|
6840
|
+
errorMessage: [{ type: Input }]
|
|
6075
6841
|
};
|
|
6076
6842
|
return GovUkCheckboxesComponent;
|
|
6077
6843
|
}());
|
|
@@ -6222,58 +6988,6 @@ var GovUkErrorMessageComponent = /** @class */ (function () {
|
|
|
6222
6988
|
return GovUkErrorMessageComponent;
|
|
6223
6989
|
}());
|
|
6224
6990
|
|
|
6225
|
-
/**
|
|
6226
|
-
* @fileoverview added by tsickle
|
|
6227
|
-
* Generated from: lib/gov-ui/util/helpers/html-templates.helper.ts
|
|
6228
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
6229
|
-
*/
|
|
6230
|
-
/*
|
|
6231
|
-
* Helper Class
|
|
6232
|
-
* Used for dynamic templates manipulation
|
|
6233
|
-
* */
|
|
6234
|
-
var /*
|
|
6235
|
-
* Helper Class
|
|
6236
|
-
* Used for dynamic templates manipulation
|
|
6237
|
-
* */
|
|
6238
|
-
HtmlTemplatesHelper = /** @class */ (function () {
|
|
6239
|
-
function HtmlTemplatesHelper() {
|
|
6240
|
-
}
|
|
6241
|
-
/*
|
|
6242
|
-
* Sets described by string depending if
|
|
6243
|
-
* there is an error, error and hit or nothing
|
|
6244
|
-
* */
|
|
6245
|
-
/*
|
|
6246
|
-
* Sets described by string depending if
|
|
6247
|
-
* there is an error, error and hit or nothing
|
|
6248
|
-
* */
|
|
6249
|
-
/**
|
|
6250
|
-
* @param {?} errorMessage
|
|
6251
|
-
* @param {?} config
|
|
6252
|
-
* @return {?}
|
|
6253
|
-
*/
|
|
6254
|
-
HtmlTemplatesHelper.setDescribedBy = /*
|
|
6255
|
-
* Sets described by string depending if
|
|
6256
|
-
* there is an error, error and hit or nothing
|
|
6257
|
-
* */
|
|
6258
|
-
/**
|
|
6259
|
-
* @param {?} errorMessage
|
|
6260
|
-
* @param {?} config
|
|
6261
|
-
* @return {?}
|
|
6262
|
-
*/
|
|
6263
|
-
function (errorMessage, config) {
|
|
6264
|
-
if (!errorMessage) {
|
|
6265
|
-
return config.hint ? config.id + "-hint" : null;
|
|
6266
|
-
}
|
|
6267
|
-
else if (errorMessage && errorMessage.isInvalid) {
|
|
6268
|
-
return config.hint ? config.id + "-hint " + config.id + "-error" : config.id + "-error";
|
|
6269
|
-
}
|
|
6270
|
-
else {
|
|
6271
|
-
return config.hint ? config.id + "-hint" : null;
|
|
6272
|
-
}
|
|
6273
|
-
};
|
|
6274
|
-
return HtmlTemplatesHelper;
|
|
6275
|
-
}());
|
|
6276
|
-
|
|
6277
6991
|
/**
|
|
6278
6992
|
* @fileoverview added by tsickle
|
|
6279
6993
|
* Generated from: lib/gov-ui/components/gov-uk-fieldset/gov-uk-fieldset.component.ts
|
|
@@ -6421,7 +7135,7 @@ var GovUkInputComponent = /** @class */ (function () {
|
|
|
6421
7135
|
* @return {?}
|
|
6422
7136
|
*/
|
|
6423
7137
|
function () {
|
|
6424
|
-
this.config.classes = 'govuk-label--m';
|
|
7138
|
+
this.config.classes = typeof (this.config.classes) === 'string' ? this.config.classes : 'govuk-label govuk-label--m';
|
|
6425
7139
|
};
|
|
6426
7140
|
/**
|
|
6427
7141
|
* @return {?}
|
|
@@ -6435,7 +7149,7 @@ var GovUkInputComponent = /** @class */ (function () {
|
|
|
6435
7149
|
GovUkInputComponent.decorators = [
|
|
6436
7150
|
{ type: Component, args: [{
|
|
6437
7151
|
selector: 'xuilib-gov-uk-input',
|
|
6438
|
-
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",
|
|
7152
|
+
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 [class.govuk-!-width-full]=\"config.fullWidth\"\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",
|
|
6439
7153
|
styles: [".gov-uk-input input:disabled{background:#b1b4b6}"]
|
|
6440
7154
|
}] }
|
|
6441
7155
|
];
|
|
@@ -6466,7 +7180,8 @@ var GovUkLabelComponent = /** @class */ (function () {
|
|
|
6466
7180
|
GovUkLabelComponent.decorators = [
|
|
6467
7181
|
{ type: Component, args: [{
|
|
6468
7182
|
selector: 'xuilib-gov-label',
|
|
6469
|
-
template: "<h1 *ngIf=\"config.isPageHeading else noHeading\">\n <label *ngIf=\"config.label\" [class]=\"config.classes + ' govuk-label'\"
|
|
7183
|
+
template: "<h1 *ngIf=\"config.isPageHeading else noHeading\">\n <label *ngIf=\"config.label\" [for]=\"config.id\" [class]=\"config.classes + ' govuk-label'\">\n <span>{{ config.label }}</span>\n <span class=\"govuk-label__optional\" *ngIf=\"config.optional\">(optional)</span>\n </label>\n</h1>\n<ng-template #noHeading>\n <label *ngIf=\"config.label\" [for]=\"config.id\" [class]=\"config.classes + ' govuk-label'\">\n <span>{{ config.label }}</span>\n <span class=\"govuk-label__optional\" *ngIf=\"config.optional\">(optional)</span>\n </label>\n</ng-template>\n",
|
|
7184
|
+
styles: [".govuk-label{display:flex;align-items:center;flex-wrap:wrap}.govuk-label__optional{font-weight:400;font-size:16px;display:inline-block;margin-left:.75rem}"]
|
|
6470
7185
|
}] }
|
|
6471
7186
|
];
|
|
6472
7187
|
/** @nocollapse */
|
|
@@ -6585,7 +7300,7 @@ var GovUkSelectComponent = /** @class */ (function () {
|
|
|
6585
7300
|
GovUkSelectComponent.decorators = [
|
|
6586
7301
|
{ type: Component, args: [{
|
|
6587
7302
|
selector: 'xuilib-gov-select',
|
|
6588
|
-
template: "<div class=\"govuk-form-group\" [formGroup]=\"group\"\n[ngClass]=\"{'govuk-form-group--error': errorMessage?.isInvalid}\">\n<xuilib-gov-label [config]=\"config\"></xuilib-gov-label>\n<span *ngIf=\"config.hint\" [id]=\"config.id +'-hint'\" class=\"govuk-hint\">\n {{config.hint}}\n</span>\n<xuilib-gov-uk-error-message [config]=\"config\" [errorMessage]=\"errorMessage\"></xuilib-gov-uk-error-message>\n\n<select class=\"govuk-select\"
|
|
7303
|
+
template: "<div class=\"govuk-form-group\" [formGroup]=\"group\"\n[ngClass]=\"{'govuk-form-group--error': errorMessage?.isInvalid}\">\n<xuilib-gov-label [config]=\"config\"></xuilib-gov-label>\n<span *ngIf=\"config.hint\" [id]=\"config.id +'-hint'\" class=\"govuk-hint\">\n {{config.hint}}\n</span>\n<xuilib-gov-uk-error-message [config]=\"config\" [errorMessage]=\"errorMessage\"></xuilib-gov-uk-error-message>\n\n<select class=\"govuk-select\"\n [class.govuk-!-width-full]=\"config.fullWidth\"\n [id]=\"config.id\" [name]=\"config.id\" [formControlName]=\"config.id\" [attr.aria-describedby]='setDescribedBy()'>\n <option value=\"{{item.value}}\" *ngFor=\"let item of items\">{{item.label}}</option>\n</select>\n</div>\n"
|
|
6589
7304
|
}] }
|
|
6590
7305
|
];
|
|
6591
7306
|
/** @nocollapse */
|
|
@@ -6687,27 +7402,25 @@ var GovUkTextareaComponent = /** @class */ (function () {
|
|
|
6687
7402
|
* Generated from: lib/gov-ui/components/hmcts-banner/hmcts-banner.component.ts
|
|
6688
7403
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
6689
7404
|
*/
|
|
6690
|
-
/*
|
|
6691
|
-
* Hmcts Banner
|
|
6692
|
-
* Responsible for displaying prominent message and related actions
|
|
6693
|
-
* @prop message to display
|
|
6694
|
-
* @prop type
|
|
6695
|
-
* */
|
|
6696
7405
|
var HmctsBannerComponent = /** @class */ (function () {
|
|
6697
7406
|
function HmctsBannerComponent() {
|
|
7407
|
+
this.title = '';
|
|
7408
|
+
this.showMessageIcon = false;
|
|
7409
|
+
this.messageBoldText = false;
|
|
6698
7410
|
}
|
|
6699
7411
|
HmctsBannerComponent.decorators = [
|
|
6700
7412
|
{ type: Component, args: [{
|
|
6701
7413
|
selector: 'xuilib-hmcts-banner',
|
|
6702
|
-
template: "<div class=\"hmcts-banner hmcts-banner--{{type}}\">\n <svg class=\"hmcts-banner__icon\" fill=\"currentColor\" role=\"presentation\" focusable=\"false\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 25 25\" height=\"25\" width=\"25\">\n
|
|
6703
|
-
styles: ["
|
|
7414
|
+
template: "<ng-container *ngIf=\"message && type\">\n <div *ngIf=\"title\"\n class=\"hmcts-banner-title hmcts-banner-title--{{ type }}\">\n {{ title }}\n </div>\n <div class=\"hmcts-banner hmcts-banner--{{ type }}\">\n <ng-container *ngIf=\"showMessageIcon\">\n <ng-container [ngSwitch]=\"type\">\n <ng-container *ngSwitchCase=\"'warning'\">\n <svg class=\"hmcts-banner__icon hmcts-banner__icon--warning\" fill=\"currentColor\" role=\"presentation\" focusable=\"false\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 25 25\" height=\"25\" width=\"25\">\n <path d=\"M13.6,15.4h-2.3v-4.5h2.3V15.4z M13.6,19.8h-2.3v-2.2h2.3V19.8z M0,23.2h25L12.5,2L0,23.2z\"></path>\n </svg>\n </ng-container>\n <ng-container *ngSwitchCase=\"'success'\">\n <svg class=\"hmcts-banner__icon hmcts-banner__icon--success\" fill=\"currentColor\" role=\"presentation\" focusable=\"false\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 25 25\" height=\"25\" width=\"25\">\n <path d=\"M25,6.2L8.7,23.2L0,14.1l4-4.2l4.7,4.9L21,2L25,6.2z\"></path>\n </svg>\n </ng-container>\n <ng-container *ngSwitchCase=\"'information'\">\n <svg class=\"hmcts-banner__icon hmcts-banner__icon--information\" fill=\"currentColor\" role=\"presentation\" focusable=\"false\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 25 25\" height=\"25\" width=\"25\">\n <path d=\"M13.7,18.5h-2.4v-2.4h2.4V18.5z M12.5,13.7c-0.7,0-1.2-0.5-1.2-1.2V7.7c0-0.7,0.5-1.2,1.2-1.2s1.2,0.5,1.2,1.2v4.8\n C13.7,13.2,13.2,13.7,12.5,13.7z M12.5,0.5c-6.6,0-12,5.4-12,12s5.4,12,12,12s12-5.4,12-12S19.1,0.5,12.5,0.5z\"></path>\n </svg>\n </ng-container>\n </ng-container>\n </ng-container>\n\n <div class=\"hmcts-banner__message\" [class.hmcts-banner__message--bold]=\"messageBoldText\">\n <span class=\"hmcts-banner__assistive\">{{ type }}</span>\n <span class=\"hmcts-banner__message-text govuk-!-font-weight-bold\">{{ message }}</span>\n </div>\n </div>\n</ng-container>\n",
|
|
7415
|
+
styles: [".hmcts-banner-title{color:#fff;background-color:#1d70b8;font-weight:700;padding:10px 15px 5px}.hmcts-banner-title--success{background-color:#00703c}.hmcts-banner-title--warning{background-color:#d4351c}.hmcts-banner__message--bold{font-weight:700}"]
|
|
6704
7416
|
}] }
|
|
6705
7417
|
];
|
|
6706
|
-
/** @nocollapse */
|
|
6707
|
-
HmctsBannerComponent.ctorParameters = function () { return []; };
|
|
6708
7418
|
HmctsBannerComponent.propDecorators = {
|
|
7419
|
+
message: [{ type: Input }],
|
|
6709
7420
|
type: [{ type: Input }],
|
|
6710
|
-
|
|
7421
|
+
title: [{ type: Input }],
|
|
7422
|
+
showMessageIcon: [{ type: Input }],
|
|
7423
|
+
messageBoldText: [{ type: Input }]
|
|
6711
7424
|
};
|
|
6712
7425
|
return HmctsBannerComponent;
|
|
6713
7426
|
}());
|
|
@@ -6888,7 +7601,7 @@ var HmctsMainWrapperComponent = /** @class */ (function () {
|
|
|
6888
7601
|
HmctsMainWrapperComponent.decorators = [
|
|
6889
7602
|
{ type: Component, args: [{
|
|
6890
7603
|
selector: 'xuilib-hmcts-main-wrapper',
|
|
6891
|
-
template: "<a *ngIf=\"hasBackLink\" [routerLink]=\"backLink\" (click)=\"onGoBack()\" class=\"govuk-back-link\">Back</a>\n<main id=\"content\" role=\"main\" class=\"govuk-main-wrapper\">\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-two-thirds\">\n <xuilib-hmcts-error-summary\n *ngIf=\"summaryErrors && !summaryErrors.isFromValid\"\n [errorMessages]=\"summaryErrors.items\"\n [header]=\"summaryErrors.header\"\n [showWarningMessage]=\"showWarningMessage\">\n </xuilib-hmcts-error-summary>\n <xuilib-hmcts-banner *ngIf=\"bannerData\"
|
|
7604
|
+
template: "<a *ngIf=\"hasBackLink\" [routerLink]=\"backLink\" (click)=\"onGoBack()\" class=\"govuk-back-link\">Back</a>\n<main id=\"content\" role=\"main\" class=\"govuk-main-wrapper\">\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-two-thirds\">\n <xuilib-hmcts-error-summary\n *ngIf=\"summaryErrors && !summaryErrors.isFromValid\"\n [errorMessages]=\"summaryErrors.items\"\n [header]=\"summaryErrors.header\"\n [showWarningMessage]=\"showWarningMessage\">\n </xuilib-hmcts-error-summary>\n <xuilib-hmcts-banner *ngIf=\"bannerData\"\n [type]=\"bannerData.type\"\n [message]=\"bannerData.message\"\n ></xuilib-hmcts-banner>\n <h1 *ngIf=\"title\" class=\"govuk-heading-xl\">{{title}}</h1>\n <ng-content></ng-content>\n </div>\n <div class=\"govuk-grid-column-one-third\" *ngIf=\"actionButtons?.length > 0\">\n <div class=\"hmcts-page-heading__actions-wrapper\">\n <a\n *ngFor=\"let actionButton of actionButtons\"\n (click)=\"actionButton.action()\"\n role=\"button\"\n draggable=\"false\"\n class=\"govuk-button {{ actionButton.class }}\"\n >{{ actionButton.name }}</a>\n </div>\n </div>\n </div>\n</main>\n"
|
|
6892
7605
|
}] }
|
|
6893
7606
|
];
|
|
6894
7607
|
/** @nocollapse */
|
|
@@ -7040,6 +7753,33 @@ var RemoveHostDirective = /** @class */ (function () {
|
|
|
7040
7753
|
return RemoveHostDirective;
|
|
7041
7754
|
}());
|
|
7042
7755
|
|
|
7756
|
+
/**
|
|
7757
|
+
* @fileoverview added by tsickle
|
|
7758
|
+
* Generated from: lib/pipes/capitalize.pipe.ts
|
|
7759
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
7760
|
+
*/
|
|
7761
|
+
var CapitalizePipe = /** @class */ (function () {
|
|
7762
|
+
function CapitalizePipe() {
|
|
7763
|
+
}
|
|
7764
|
+
/**
|
|
7765
|
+
* @param {?} value
|
|
7766
|
+
* @return {?}
|
|
7767
|
+
*/
|
|
7768
|
+
CapitalizePipe.prototype.transform = /**
|
|
7769
|
+
* @param {?} value
|
|
7770
|
+
* @return {?}
|
|
7771
|
+
*/
|
|
7772
|
+
function (value) {
|
|
7773
|
+
/** @type {?} */
|
|
7774
|
+
var lowerCaseString = value.toLowerCase();
|
|
7775
|
+
return lowerCaseString.charAt(0).toUpperCase() + lowerCaseString.slice(1);
|
|
7776
|
+
};
|
|
7777
|
+
CapitalizePipe.decorators = [
|
|
7778
|
+
{ type: Pipe, args: [{ name: 'capitalize' },] }
|
|
7779
|
+
];
|
|
7780
|
+
return CapitalizePipe;
|
|
7781
|
+
}());
|
|
7782
|
+
|
|
7043
7783
|
/**
|
|
7044
7784
|
* @fileoverview added by tsickle
|
|
7045
7785
|
* Generated from: lib/exui-common-lib.module.ts
|
|
@@ -7078,6 +7818,7 @@ var COMMON_COMPONENTS = [
|
|
|
7078
7818
|
FindPersonComponent,
|
|
7079
7819
|
SearchJudicialsComponent,
|
|
7080
7820
|
FindLocationComponent,
|
|
7821
|
+
FindTaskNameComponent,
|
|
7081
7822
|
SearchLocationComponent,
|
|
7082
7823
|
FindServiceComponent,
|
|
7083
7824
|
SearchServiceComponent,
|
|
@@ -7109,13 +7850,17 @@ var GOV_UI_COMPONENTS = [
|
|
|
7109
7850
|
GovUkFileUploadComponent,
|
|
7110
7851
|
RemoveHostDirective
|
|
7111
7852
|
];
|
|
7853
|
+
/** @type {?} */
|
|
7854
|
+
var pipes = [
|
|
7855
|
+
CapitalizePipe
|
|
7856
|
+
];
|
|
7112
7857
|
var ɵ0 = windowProvider;
|
|
7113
7858
|
var ExuiCommonLibModule = /** @class */ (function () {
|
|
7114
7859
|
function ExuiCommonLibModule() {
|
|
7115
7860
|
}
|
|
7116
7861
|
ExuiCommonLibModule.decorators = [
|
|
7117
7862
|
{ type: NgModule, args: [{
|
|
7118
|
-
declarations: __spread(COMMON_COMPONENTS, GOV_UI_COMPONENTS),
|
|
7863
|
+
declarations: __spread(COMMON_COMPONENTS, GOV_UI_COMPONENTS, pipes),
|
|
7119
7864
|
imports: [
|
|
7120
7865
|
CommonModule,
|
|
7121
7866
|
FormsModule,
|
|
@@ -7131,7 +7876,7 @@ var ExuiCommonLibModule = /** @class */ (function () {
|
|
|
7131
7876
|
],
|
|
7132
7877
|
exports: __spread(COMMON_COMPONENTS, GOV_UI_COMPONENTS, [
|
|
7133
7878
|
PaginatePipe
|
|
7134
|
-
])
|
|
7879
|
+
], pipes)
|
|
7135
7880
|
},] }
|
|
7136
7881
|
];
|
|
7137
7882
|
return ExuiCommonLibModule;
|
|
@@ -7951,21 +8696,20 @@ var TimeoutNotificationsService = /** @class */ (function () {
|
|
|
7951
8696
|
*/
|
|
7952
8697
|
var RoleService = /** @class */ (function () {
|
|
7953
8698
|
function RoleService() {
|
|
7954
|
-
this.pRoles =
|
|
7955
|
-
|
|
7956
|
-
|
|
7957
|
-
get: /**
|
|
8699
|
+
this.pRoles = new BehaviorSubject(null);
|
|
8700
|
+
this.roles$ = this.pRoles.asObservable().pipe(skipWhile((/**
|
|
8701
|
+
* @param {?} item
|
|
7958
8702
|
* @return {?}
|
|
7959
8703
|
*/
|
|
7960
|
-
function () {
|
|
7961
|
-
|
|
7962
|
-
|
|
8704
|
+
function (item) { return item === null; })));
|
|
8705
|
+
}
|
|
8706
|
+
Object.defineProperty(RoleService.prototype, "roles", {
|
|
7963
8707
|
set: /**
|
|
7964
8708
|
* @param {?} roles
|
|
7965
8709
|
* @return {?}
|
|
7966
8710
|
*/
|
|
7967
8711
|
function (roles) {
|
|
7968
|
-
this.pRoles
|
|
8712
|
+
this.pRoles.next(roles);
|
|
7969
8713
|
},
|
|
7970
8714
|
enumerable: true,
|
|
7971
8715
|
configurable: true
|
|
@@ -8006,25 +8750,31 @@ var RoleGuard = /** @class */ (function () {
|
|
|
8006
8750
|
*/
|
|
8007
8751
|
function (route) {
|
|
8008
8752
|
var _this = this;
|
|
8009
|
-
/**
|
|
8010
|
-
|
|
8011
|
-
/** @type {?} */
|
|
8012
|
-
var check = (/**
|
|
8013
|
-
* @param {?} roleRegEx
|
|
8753
|
+
return this.roleService.roles$.pipe(map((/**
|
|
8754
|
+
* @param {?} roles
|
|
8014
8755
|
* @return {?}
|
|
8015
8756
|
*/
|
|
8016
|
-
function (
|
|
8757
|
+
function (roles) {
|
|
8017
8758
|
/** @type {?} */
|
|
8018
|
-
var
|
|
8019
|
-
|
|
8020
|
-
|
|
8759
|
+
var canActivateRoles = ((/** @type {?} */ (route.data.needsRole)));
|
|
8760
|
+
/** @type {?} */
|
|
8761
|
+
var check = (/**
|
|
8762
|
+
* @param {?} roleRegEx
|
|
8021
8763
|
* @return {?}
|
|
8022
8764
|
*/
|
|
8023
|
-
function (
|
|
8024
|
-
|
|
8025
|
-
|
|
8026
|
-
|
|
8027
|
-
|
|
8765
|
+
function (roleRegEx) {
|
|
8766
|
+
/** @type {?} */
|
|
8767
|
+
var regex = new RegExp(roleRegEx);
|
|
8768
|
+
return roles.some((/**
|
|
8769
|
+
* @param {?} role
|
|
8770
|
+
* @return {?}
|
|
8771
|
+
*/
|
|
8772
|
+
function (role) { return regex.test(role); }));
|
|
8773
|
+
});
|
|
8774
|
+
/** @type {?} */
|
|
8775
|
+
var match = route.data.roleMatching === RoleMatching.ALL ? canActivateRoles.every(check) : canActivateRoles.some(check);
|
|
8776
|
+
return match || _this.router.parseUrl((/** @type {?} */ (route.data.noRoleMatchRedirect)));
|
|
8777
|
+
})));
|
|
8028
8778
|
};
|
|
8029
8779
|
RoleGuard.decorators = [
|
|
8030
8780
|
{ type: Injectable, args: [{
|
|
@@ -8152,6 +8902,6 @@ var LoadingService = /** @class */ (function () {
|
|
|
8152
8902
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
8153
8903
|
*/
|
|
8154
8904
|
|
|
8155
|
-
export { AccessibilityComponent, CheckboxListComponent, ContactDetailsComponent, DueDateComponent, GenericFilterComponent, HmctsSessionDialogComponent, InviteUserFormComponent, InviteUserPermissionComponent, LoadingSpinnerComponent, SelectedCaseConfirmComponent, SelectedCaseListComponent, SelectedCaseComponent, ServiceMessageComponent, ServiceMessagesComponent, ShareCaseConfirmComponent, ShareCaseComponent, TabComponent, TcConfirmComponent, TcDisplayHtmlComponent, TcDisplayPlainComponent, TermsAndConditionsComponent, UserDetailsComponent, UserListComponent, CookieBannerComponent, FindLocationComponent, SearchLocationComponent, PaginationComponent, FeatureToggleDirective, LetContext, LetDirective, COMMON_COMPONENTS, GOV_UI_COMPONENTS, ExuiCommonLibModule, GovUiService, checkboxesBeCheckedValidator, dateValidator, radioGroupValidator, HmctsSubNavigationComponent, SharedCaseErrorMessages, BadgeColour, DateBadgeColour, SECONDS_IN_A_DAY, AnonymousFeatureUser, LoggedInFeatureUser, BookingCheckType, PersonRole, RoleCategory,
|
|
8905
|
+
export { AccessibilityComponent, CheckboxListComponent, ContactDetailsComponent, DueDateComponent, GenericFilterComponent, HmctsSessionDialogComponent, InviteUserFormComponent, InviteUserPermissionComponent, LoadingSpinnerComponent, SelectedCaseConfirmComponent, SelectedCaseListComponent, SelectedCaseComponent, ServiceMessageComponent, ServiceMessagesComponent, ShareCaseConfirmComponent, ShareCaseComponent, TabComponent, TcConfirmComponent, TcDisplayHtmlComponent, TcDisplayPlainComponent, TermsAndConditionsComponent, UserDetailsComponent, UserListComponent, CookieBannerComponent, FindLocationComponent, SearchLocationComponent, PaginationComponent, FeatureToggleDirective, LetContext, LetDirective, COMMON_COMPONENTS, GOV_UI_COMPONENTS, ExuiCommonLibModule, GovUiService, checkboxesBeCheckedValidator, dateValidator, radioGroupValidator, HmctsSubNavigationComponent, HmctsBannerComponent, SharedCaseErrorMessages, BadgeColour, DateBadgeColour, SECONDS_IN_A_DAY, AnonymousFeatureUser, LoggedInFeatureUser, RadioFilterFieldConfig, BookingCheckType, PersonRole, RoleCategory, FeatureToggleGuard, FeatureToggleService, LaunchDarklyService, GoogleAnalyticsService, GoogleTagManagerService, ManageSessionServices, TimeoutNotificationsService, RoleMatching, RoleGuard, RoleService, CookieService, HasLoadingState, LoadingService, FilterService, windowProvider, windowToken, AccessibilityComponent as ɵx, CheckboxListComponent as ɵz, ContactDetailsComponent as ɵf, CookieBannerComponent as ɵbf, DueDateComponent as ɵy, ExuiPageWrapperComponent as ɵa, FindLocationComponent as ɵbl, FindPersonComponent as ɵbh, FindServiceComponent as ɵbq, FindTaskNameComponent as ɵbo, GenericFilterComponent as ɵbd, HmctsSessionDialogComponent as ɵk, InviteUserFormComponent as ɵo, InviteUserPermissionComponent as ɵn, LoadingSpinnerComponent as ɵbc, PaginationComponent as ɵbt, SearchJudicialsComponent as ɵbk, SearchLocationComponent as ɵbm, SearchServiceComponent as ɵbr, SearchVenueComponent as ɵbs, SelectedCaseConfirmComponent as ɵv, SelectedCaseListComponent as ɵt, SelectedCaseComponent as ɵu, ServiceMessageComponent as ɵba, ServiceMessagesComponent as ɵbb, ShareCaseConfirmComponent as ɵs, ShareCaseComponent as ɵp, TabComponent as ɵw, TcConfirmComponent as ɵe, TcDisplayHtmlComponent as ɵc, TcDisplayPlainComponent as ɵd, TermsAndConditionsComponent as ɵb, UserDetailsComponent as ɵm, UserListComponent as ɵl, UserSelectComponent as ɵq, FeatureToggleDirective as ɵg, LetContext as ɵi, LetDirective as ɵj, GovUkCheckboxComponent as ɵcd, GovUkCheckboxesComponent as ɵcj, GovUkDateComponent as ɵci, GovUkErrorMessageComponent as ɵcg, GovUkFieldsetComponent as ɵch, GovUkFileUploadComponent as ɵco, GovUkFormGroupWrapperComponent as ɵce, GovUkInputComponent as ɵcc, GovUkLabelComponent as ɵcf, GovUkRadioComponent as ɵck, GovUkRadiosComponent as ɵcl, GovUkSelectComponent as ɵcm, GovukTableComponent as ɵcb, GovUkTextareaComponent as ɵcn, HmctsBannerComponent as ɵca, HmctsErrorSummaryComponent as ɵby, HmctsIdentityBarComponent as ɵbu, HmctsMainWrapperComponent as ɵbz, HmctsPaginationComponent as ɵbv, HmctsPrimaryNavigationComponent as ɵbx, HmctsSubNavigationComponent as ɵbw, RemoveHostDirective as ɵcp, CapitalizePipe as ɵcq, CaseSharingStateService as ɵr, CookieService as ɵbg, FeatureToggleService as ɵh, FilterService as ɵbe, FindAPersonService as ɵbi, LocationService as ɵbn, SessionStorageService as ɵbj, TaskNameService as ɵbp };
|
|
8156
8906
|
|
|
8157
8907
|
//# sourceMappingURL=hmcts-rpx-xui-common-lib.js.map
|