@hmcts/ccd-case-ui-toolkit 7.0.72 → 7.0.74-special-characters
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/esm2022/lib/shared/components/case-editor/case-edit-utils/case-edit.utils.mjs +35 -0
- package/esm2022/lib/shared/components/case-editor/services/cases.service.mjs +12 -6
- package/esm2022/lib/shared/components/case-viewer/case-specific-access-request/case-specific-access-request.component.mjs +12 -5
- package/esm2022/lib/shared/components/event-start/services/event-start-state-machine.service.mjs +1 -1
- package/esm2022/lib/shared/components/palette/complex/read-complex-field-table.component.mjs +21 -5
- package/esm2022/lib/shared/components/palette/yes-no/write-yes-no-field.component.mjs +5 -6
- package/esm2022/lib/shared/directives/conditional-show/services/condition-parser.service.mjs +4 -2
- package/esm2022/lib/shared/pipes/complex/ccd-read-fields-filter.pipe.mjs +9 -2
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs +91 -20
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/lib/shared/components/case-editor/case-edit-utils/case-edit.utils.d.ts +8 -0
- package/lib/shared/components/case-editor/case-edit-utils/case-edit.utils.d.ts.map +1 -0
- package/lib/shared/components/case-editor/services/cases.service.d.ts.map +1 -1
- package/lib/shared/components/case-viewer/case-specific-access-request/case-specific-access-request.component.d.ts +1 -0
- package/lib/shared/components/case-viewer/case-specific-access-request/case-specific-access-request.component.d.ts.map +1 -1
- package/lib/shared/components/palette/complex/read-complex-field-table.component.d.ts +7 -1
- package/lib/shared/components/palette/complex/read-complex-field-table.component.d.ts.map +1 -1
- package/lib/shared/directives/conditional-show/services/condition-parser.service.d.ts.map +1 -1
- package/lib/shared/pipes/complex/ccd-read-fields-filter.pipe.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -4675,7 +4675,9 @@ class ConditionParser {
|
|
|
4675
4675
|
}
|
|
4676
4676
|
}
|
|
4677
4677
|
else {
|
|
4678
|
-
|
|
4678
|
+
// EXUI-2460 - if path present then show error, otherwise log message to stop unnecessary console errors
|
|
4679
|
+
path ? console.error('Path in formArray should start with ', head, ', full path: ', path) :
|
|
4680
|
+
console.log('Path not present in formArray');
|
|
4679
4681
|
}
|
|
4680
4682
|
}
|
|
4681
4683
|
static removeStarChar(str) {
|
|
@@ -7980,6 +7982,41 @@ class WizardPageFieldToCaseFieldMapper {
|
|
|
7980
7982
|
}]
|
|
7981
7983
|
}], null, null); })();
|
|
7982
7984
|
|
|
7985
|
+
function convertNonASCIICharacter(character) {
|
|
7986
|
+
if (character === '£') {
|
|
7987
|
+
// pound sign will be frequently used and works for btoa despite being non-ASCII
|
|
7988
|
+
// note: this could be done for other characters provided they work for btoa()
|
|
7989
|
+
return character;
|
|
7990
|
+
}
|
|
7991
|
+
// Note: Will convert to HTML entity
|
|
7992
|
+
return CaseEditUtils.PREFIX + character.charCodeAt(0) + CaseEditUtils.SUFFIX;
|
|
7993
|
+
}
|
|
7994
|
+
class CaseEditUtils {
|
|
7995
|
+
static PREFIX = '&#';
|
|
7996
|
+
static SUFFIX = ';';
|
|
7997
|
+
convertNonASCIICharacters(rawString) {
|
|
7998
|
+
return rawString ? rawString.replace(/[^\x20-\x7E]/g, function (c) {
|
|
7999
|
+
return convertNonASCIICharacter(c);
|
|
8000
|
+
}) : '';
|
|
8001
|
+
}
|
|
8002
|
+
convertHTMLEntities(editedString) {
|
|
8003
|
+
const revertedCharacterList = editedString.split(CaseEditUtils.PREFIX);
|
|
8004
|
+
let rawString = revertedCharacterList[0];
|
|
8005
|
+
for (let index = 1; index < revertedCharacterList.length; index++) {
|
|
8006
|
+
const currentSection = revertedCharacterList[index];
|
|
8007
|
+
if (!currentSection.includes(CaseEditUtils.SUFFIX)) {
|
|
8008
|
+
return rawString.concat(currentSection);
|
|
8009
|
+
}
|
|
8010
|
+
else {
|
|
8011
|
+
const suffixSplitList = currentSection.split(CaseEditUtils.SUFFIX);
|
|
8012
|
+
const characterCode = Number(suffixSplitList[0]);
|
|
8013
|
+
rawString = rawString.concat(String.fromCharCode(characterCode), suffixSplitList[1]);
|
|
8014
|
+
}
|
|
8015
|
+
}
|
|
8016
|
+
return rawString;
|
|
8017
|
+
}
|
|
8018
|
+
}
|
|
8019
|
+
|
|
7983
8020
|
class CasesService {
|
|
7984
8021
|
http;
|
|
7985
8022
|
appConfig;
|
|
@@ -8268,8 +8305,12 @@ class CasesService {
|
|
|
8268
8305
|
addClientContextHeader(headers) {
|
|
8269
8306
|
const clientContextDetails = this.sessionStorageService.getItem('clientContext');
|
|
8270
8307
|
if (clientContextDetails) {
|
|
8271
|
-
|
|
8272
|
-
|
|
8308
|
+
let clientContextEdit = JSON.parse(clientContextDetails);
|
|
8309
|
+
clientContextEdit.client_context.user_task.task_data.name = 'Review ㅪ the ㋚ appeal \`';
|
|
8310
|
+
const caseEditUtils = new CaseEditUtils();
|
|
8311
|
+
// below changes non-ASCII characters
|
|
8312
|
+
const editedClientContext = caseEditUtils.convertNonASCIICharacters(clientContextDetails);
|
|
8313
|
+
const clientContext = window.btoa(editedClientContext);
|
|
8273
8314
|
if (clientContext) {
|
|
8274
8315
|
headers = headers.set('Client-Context', clientContext);
|
|
8275
8316
|
}
|
|
@@ -8277,11 +8318,12 @@ class CasesService {
|
|
|
8277
8318
|
return headers;
|
|
8278
8319
|
}
|
|
8279
8320
|
updateClientContextStorage(headers) {
|
|
8280
|
-
// for mocking - TODO: Kasi Remove/Uncomment for testing
|
|
8281
|
-
// headers = this.setMockClientContextHeader(headers);
|
|
8282
8321
|
if (headers && headers.get('Client-Context')) {
|
|
8322
|
+
const caseEditUtils = new CaseEditUtils();
|
|
8283
8323
|
const clientContextString = window.atob(headers.get('Client-Context'));
|
|
8284
|
-
|
|
8324
|
+
// below reverts non-ASCII characters
|
|
8325
|
+
const editedClientContextString = caseEditUtils.convertHTMLEntities(clientContextString);
|
|
8326
|
+
this.sessionStorageService.setItem('clientContext', editedClientContextString);
|
|
8285
8327
|
}
|
|
8286
8328
|
}
|
|
8287
8329
|
static ɵfac = function CasesService_Factory(t) { return new (t || CasesService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig), i0.ɵɵinject(OrderService), i0.ɵɵinject(HttpErrorService), i0.ɵɵinject(WizardPageFieldToCaseFieldMapper), i0.ɵɵinject(LoadingService), i0.ɵɵinject(SessionStorageService), i0.ɵɵinject(RetryUtil)); };
|
|
@@ -21600,19 +21642,18 @@ function WriteYesNoFieldComponent_div_7_Template(rf, ctx) { if (rf & 1) {
|
|
|
21600
21642
|
i0.ɵɵelementStart(2, "label", 12);
|
|
21601
21643
|
i0.ɵɵtext(3);
|
|
21602
21644
|
i0.ɵɵpipe(4, "rpxTranslate");
|
|
21603
|
-
i0.ɵɵpipe(5, "rpxTranslate");
|
|
21604
21645
|
i0.ɵɵelementEnd()();
|
|
21605
21646
|
} if (rf & 2) {
|
|
21606
21647
|
const value_r2 = ctx.$implicit;
|
|
21607
21648
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
21608
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(
|
|
21649
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(12, _c1$b, ctx_r0.yesNoControl.value === value_r2));
|
|
21609
21650
|
i0.ɵɵadvance();
|
|
21610
21651
|
i0.ɵɵproperty("id", ctx_r0.createElementId(value_r2))("name", ctx_r0.id())("formControl", ctx_r0.yesNoControl)("value", value_r2);
|
|
21611
21652
|
i0.ɵɵattribute("name", ctx_r0.id());
|
|
21612
21653
|
i0.ɵɵadvance();
|
|
21613
21654
|
i0.ɵɵproperty("for", ctx_r0.createElementId(value_r2));
|
|
21614
21655
|
i0.ɵɵadvance();
|
|
21615
|
-
i0.ɵɵtextInterpolate(ctx_r0.caseField.label ? i0.ɵɵ
|
|
21656
|
+
i0.ɵɵtextInterpolate(ctx_r0.caseField.label ? i0.ɵɵpipeBind3(4, 8, ctx_r0.caseField.label, null, value_r2) : value_r2);
|
|
21616
21657
|
} }
|
|
21617
21658
|
class WriteYesNoFieldComponent extends AbstractFieldWriteComponent {
|
|
21618
21659
|
yesNoService;
|
|
@@ -21632,7 +21673,7 @@ class WriteYesNoFieldComponent extends AbstractFieldWriteComponent {
|
|
|
21632
21673
|
i0.ɵɵelementEnd();
|
|
21633
21674
|
i0.ɵɵtemplate(4, WriteYesNoFieldComponent_span_4_Template, 3, 3, "span", 3)(5, WriteYesNoFieldComponent_span_5_Template, 3, 4, "span", 4);
|
|
21634
21675
|
i0.ɵɵelementStart(6, "div", 5);
|
|
21635
|
-
i0.ɵɵtemplate(7, WriteYesNoFieldComponent_div_7_Template,
|
|
21676
|
+
i0.ɵɵtemplate(7, WriteYesNoFieldComponent_div_7_Template, 5, 14, "div", 6);
|
|
21636
21677
|
i0.ɵɵelementEnd()()();
|
|
21637
21678
|
} if (rf & 2) {
|
|
21638
21679
|
i0.ɵɵproperty("id", ctx.id())("ngClass", i0.ɵɵpureFunction1(7, _c0$y, !ctx.yesNoControl.valid && (ctx.yesNoControl.dirty || ctx.yesNoControl.touched)));
|
|
@@ -21650,7 +21691,7 @@ class WriteYesNoFieldComponent extends AbstractFieldWriteComponent {
|
|
|
21650
21691
|
}
|
|
21651
21692
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteYesNoFieldComponent, [{
|
|
21652
21693
|
type: Component,
|
|
21653
|
-
args: [{ selector: 'ccd-write-yes-no-field', template: "<div [id]=\"id()\" class=\"form-group bottom-30\" [ngClass]=\"{'form-group-error': !yesNoControl.valid && (yesNoControl.dirty || yesNoControl.touched)}\">\n\t<fieldset class=\"inline\">\n <legend>\n <span class=\"form-label\" *ngIf=\"caseField.label\">{{caseField | ccdFieldLabel}}</span>\n </legend>\n <span class=\"form-hint\" *ngIf=\"caseField.hint_text\">{{caseField.hint_text | rpxTranslate}}</span>\n <span class=\"error-message\" *ngIf=\"yesNoControl.errors && (yesNoControl.dirty || yesNoControl.touched)\">\n {{yesNoControl.errors | ccdFirstError:caseField.label}}\n </span>\n\n <div [id]=\"createElementId('radio')\">\n \t <div class=\"multiple-choice\" *ngFor=\"let value of yesNoValues\" [ngClass]=\"{selected: yesNoControl.value === value}\">\n \t <input class=\"form-control\" [id]=\"createElementId(value)\" [attr.name]=\"id()\" [name]=\"id()\" type=\"radio\" [formControl]=\"yesNoControl\" [value]=\"value\">\n <label class=\"form-label\" [for]=\"createElementId(value)\">{{caseField.label ? (caseField.label | rpxTranslate:null:value
|
|
21694
|
+
args: [{ selector: 'ccd-write-yes-no-field', template: "<div [id]=\"id()\" class=\"form-group bottom-30\" [ngClass]=\"{'form-group-error': !yesNoControl.valid && (yesNoControl.dirty || yesNoControl.touched)}\">\n\t<fieldset class=\"inline\">\n <legend>\n <span class=\"form-label\" *ngIf=\"caseField.label\">{{caseField | ccdFieldLabel}}</span>\n </legend>\n <span class=\"form-hint\" *ngIf=\"caseField.hint_text\">{{caseField.hint_text | rpxTranslate}}</span>\n <span class=\"error-message\" *ngIf=\"yesNoControl.errors && (yesNoControl.dirty || yesNoControl.touched)\">\n {{yesNoControl.errors | ccdFirstError:caseField.label}}\n </span>\n\n <div [id]=\"createElementId('radio')\">\n \t <div class=\"multiple-choice\" *ngFor=\"let value of yesNoValues\" [ngClass]=\"{selected: yesNoControl.value === value}\">\n \t <input class=\"form-control\" [id]=\"createElementId(value)\" [attr.name]=\"id()\" [name]=\"id()\" type=\"radio\" [formControl]=\"yesNoControl\" [value]=\"value\">\n <label class=\"form-label\" [for]=\"createElementId(value)\">{{caseField.label ? (caseField.label | rpxTranslate:null:value) : value}}</label>\n \t </div>\n </div>\n\t</fieldset>\n</div>\n" }]
|
|
21654
21695
|
}], () => [{ type: YesNoService }], null); })();
|
|
21655
21696
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(WriteYesNoFieldComponent, { className: "WriteYesNoFieldComponent", filePath: "lib/shared/components/palette/yes-no/write-yes-no-field.component.ts", lineNumber: 10 }); })();
|
|
21656
21697
|
|
|
@@ -25842,7 +25883,7 @@ class ReadComplexFieldRawComponent extends AbstractFieldReadComponent {
|
|
|
25842
25883
|
}] }); })();
|
|
25843
25884
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadComplexFieldRawComponent, { className: "ReadComplexFieldRawComponent", filePath: "lib/shared/components/palette/complex/read-complex-field-raw.component.ts", lineNumber: 16 }); })();
|
|
25844
25885
|
|
|
25845
|
-
const _c0$j = (a0, a1, a2) => [a0, false, undefined, true, a1,
|
|
25886
|
+
const _c0$j = (a0, a1, a2, a3) => [a0, false, undefined, true, a1, a2, a3];
|
|
25846
25887
|
function ReadComplexFieldTableComponent_ng_container_9_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
25847
25888
|
i0.ɵɵelementContainerStart(0);
|
|
25848
25889
|
i0.ɵɵelementStart(1, "tr", 7)(2, "td", 8)(3, "span", 3);
|
|
@@ -25887,9 +25928,25 @@ function ReadComplexFieldTableComponent_ng_container_9_Template(rf, ctx) { if (r
|
|
|
25887
25928
|
i0.ɵɵproperty("ngIf", i0.ɵɵpipeBind1(2, 2, field_r1))("ngIfElse", SimpleRow_r3);
|
|
25888
25929
|
} }
|
|
25889
25930
|
class ReadComplexFieldTableComponent extends AbstractFieldReadComponent {
|
|
25931
|
+
// parent_ can be replaced with any ***_ - underscore is only important character
|
|
25932
|
+
// value can also be replaced with anything
|
|
25933
|
+
static DUMMY_STRING_PRE = 'parent_';
|
|
25934
|
+
static DUMMY_STRING_POST = 'value';
|
|
25890
25935
|
caseFields = [];
|
|
25936
|
+
path;
|
|
25937
|
+
ngOnInit() {
|
|
25938
|
+
this.setDummyPathForChildArrays();
|
|
25939
|
+
}
|
|
25940
|
+
/* In order to get child arrays (within casefield) to display their logic
|
|
25941
|
+
we need to add a path. This path needs to include the idPrefix as that
|
|
25942
|
+
is the part of the path that is used to display the elements.
|
|
25943
|
+
The joining strings will allow us to use the existing show condition to
|
|
25944
|
+
match against this path. */
|
|
25945
|
+
setDummyPathForChildArrays() {
|
|
25946
|
+
this.path = ReadComplexFieldTableComponent.DUMMY_STRING_PRE + this.idPrefix + ReadComplexFieldTableComponent.DUMMY_STRING_POST;
|
|
25947
|
+
}
|
|
25891
25948
|
static ɵfac = /*@__PURE__*/ (() => { let ɵReadComplexFieldTableComponent_BaseFactory; return function ReadComplexFieldTableComponent_Factory(t) { return (ɵReadComplexFieldTableComponent_BaseFactory || (ɵReadComplexFieldTableComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ReadComplexFieldTableComponent)))(t || ReadComplexFieldTableComponent); }; })();
|
|
25892
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ReadComplexFieldTableComponent, selectors: [["ccd-read-complex-field-table"]], inputs: { caseFields: "caseFields" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 11, vars:
|
|
25949
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ReadComplexFieldTableComponent, selectors: [["ccd-read-complex-field-table"]], inputs: { caseFields: "caseFields" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 11, vars: 17, consts: [["SimpleRow", ""], [1, "complex-panel"], [1, "complex-panel-title"], [1, "text-16"], ["aria-describedby", "complex field table", 1, "complex-panel-table"], [4, "ngFor", "ngForOf"], [4, "ngIf", "ngIfElse"], [1, "complex-panel-compound-field", 3, "hidden"], ["colspan", "2"], [3, "topLevelFormGroup", "caseField", "context"], [1, "complex-panel-simple-field", 3, "hidden"], ["id", "complex-panel-simple-field-label"]], template: function ReadComplexFieldTableComponent_Template(rf, ctx) { if (rf & 1) {
|
|
25893
25950
|
i0.ɵɵelementStart(0, "div", 1)(1, "dl", 2)(2, "dt")(3, "span", 3);
|
|
25894
25951
|
i0.ɵɵtext(4);
|
|
25895
25952
|
i0.ɵɵpipe(5, "rpxTranslate");
|
|
@@ -25904,12 +25961,12 @@ class ReadComplexFieldTableComponent extends AbstractFieldReadComponent {
|
|
|
25904
25961
|
i0.ɵɵadvance(4);
|
|
25905
25962
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 2, ctx.caseField.label));
|
|
25906
25963
|
i0.ɵɵadvance(5);
|
|
25907
|
-
i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBindV(10, 4, i0.ɵɵ
|
|
25964
|
+
i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBindV(10, 4, i0.ɵɵpureFunction4(12, _c0$j, ctx.caseField, ctx.topLevelFormGroup, ctx.path, ctx.idPrefix)));
|
|
25908
25965
|
} }, styles: [".complex-panel[_ngcontent-%COMP%]{margin:13px 0;border:1px solid #bfc1c3}.complex-panel[_ngcontent-%COMP%] .complex-panel-title[_ngcontent-%COMP%]{background-color:#dee0e2;padding:5px 5px 2px;border-bottom:1px solid #bfc1c3;display:block;color:#0b0c0c;font-family:nta,Arial,sans-serif;font-weight:700;text-transform:none;font-size:16px;line-height:1.25}@media (min-width: 641px){.complex-panel[_ngcontent-%COMP%] .complex-panel-title[_ngcontent-%COMP%]{font-size:19px;line-height:1.3157894737}}.complex-panel[_ngcontent-%COMP%] .complex-panel-table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{vertical-align:top}.complex-panel[_ngcontent-%COMP%] .complex-panel-table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]:last-child > th[_ngcontent-%COMP%], .complex-panel[_ngcontent-%COMP%] .complex-panel-table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]:last-child > td[_ngcontent-%COMP%]{border-bottom:none}.complex-panel[_ngcontent-%COMP%] .complex-panel-simple-field[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding-left:5px;width:295px}.complex-panel[_ngcontent-%COMP%] .complex-panel-compound-field[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:5px}"] });
|
|
25909
25966
|
}
|
|
25910
25967
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadComplexFieldTableComponent, [{
|
|
25911
25968
|
type: Component,
|
|
25912
|
-
args: [{ selector: 'ccd-read-complex-field-table', template: "<div class=\"complex-panel\">\n <dl class=\"complex-panel-title\"><dt><span class=\"text-16\">{{caseField.label | rpxTranslate}}</span></dt><dd></dd></dl>\n <table class=\"complex-panel-table\" aria-describedby=\"complex field table\">\n <tbody>\n <ng-container *ngFor=\"let field of caseField | ccdReadFieldsFilter:false :undefined :true :topLevelFormGroup:
|
|
25969
|
+
args: [{ selector: 'ccd-read-complex-field-table', template: "<div class=\"complex-panel\">\n <dl class=\"complex-panel-title\"><dt><span class=\"text-16\">{{caseField.label | rpxTranslate}}</span></dt><dd></dd></dl>\n <table class=\"complex-panel-table\" aria-describedby=\"complex field table\">\n <tbody>\n <ng-container *ngFor=\"let field of caseField | ccdReadFieldsFilter:false :undefined :true :topLevelFormGroup :path :idPrefix\">\n <ng-container *ngIf=\"(field | ccdIsCompound); else SimpleRow\">\n <tr class=\"complex-panel-compound-field\" [hidden]=\"field.hidden\">\n <td colspan=\"2\">\n <span class=\"text-16\">\n <ccd-field-read [topLevelFormGroup]=\"topLevelFormGroup\"\n [caseField]=\"field\" [context]=\"context\"></ccd-field-read>\n </span>\n </td>\n </tr>\n </ng-container>\n <ng-template #SimpleRow>\n <tr class=\"complex-panel-simple-field\" [hidden]=\"field.hidden\">\n <th id=\"complex-panel-simple-field-label\"><span class=\"text-16\">{{field.label | rpxTranslate}}</span></th>\n <td>\n <span class=\"text-16\">\n <ccd-field-read [topLevelFormGroup]=\"topLevelFormGroup\"\n [caseField]=\"field\" [context]=\"context\"></ccd-field-read>\n </span>\n </td>\n </tr>\n </ng-template>\n </ng-container>\n </tbody>\n </table>\n</div>\n", styles: [".complex-panel{margin:13px 0;border:1px solid #bfc1c3}.complex-panel .complex-panel-title{background-color:#dee0e2;padding:5px 5px 2px;border-bottom:1px solid #bfc1c3;display:block;color:#0b0c0c;font-family:nta,Arial,sans-serif;font-weight:700;text-transform:none;font-size:16px;line-height:1.25}@media (min-width: 641px){.complex-panel .complex-panel-title{font-size:19px;line-height:1.3157894737}}.complex-panel .complex-panel-table>tbody>tr>th{vertical-align:top}.complex-panel .complex-panel-table>tbody>tr:last-child>th,.complex-panel .complex-panel-table>tbody>tr:last-child>td{border-bottom:none}.complex-panel .complex-panel-simple-field th{padding-left:5px;width:295px}.complex-panel .complex-panel-compound-field td{padding:5px}\n"] }]
|
|
25913
25970
|
}], null, { caseFields: [{
|
|
25914
25971
|
type: Input
|
|
25915
25972
|
}] }); })();
|
|
@@ -27257,7 +27314,14 @@ class ReadFieldsFilterPipe {
|
|
|
27257
27314
|
else {
|
|
27258
27315
|
cond = ShowCondition.getInstance(field.show_condition);
|
|
27259
27316
|
}
|
|
27260
|
-
|
|
27317
|
+
if (path) {
|
|
27318
|
+
// EXUI-2460 - evaluate with and without path to ensure validity
|
|
27319
|
+
field.hidden = !cond.match(formValue, path) ? !cond.match(formValue) : false;
|
|
27320
|
+
}
|
|
27321
|
+
else {
|
|
27322
|
+
// if no path there is no need to evaluate twice
|
|
27323
|
+
field.hidden = !cond.match(formValue);
|
|
27324
|
+
}
|
|
27261
27325
|
}
|
|
27262
27326
|
else {
|
|
27263
27327
|
field.hidden = false;
|
|
@@ -35045,6 +35109,7 @@ class CaseSpecificAccessRequestComponent {
|
|
|
35045
35109
|
$roleAssignmentResponseSubscription;
|
|
35046
35110
|
genericError = 'There is a problem';
|
|
35047
35111
|
specificReasonControlName = 'specificReason';
|
|
35112
|
+
getSpecificAccessError = false;
|
|
35048
35113
|
constructor(fb, router, casesService, route, caseNotifier) {
|
|
35049
35114
|
this.fb = fb;
|
|
35050
35115
|
this.router = router;
|
|
@@ -35099,9 +35164,15 @@ class CaseSpecificAccessRequestComponent {
|
|
|
35099
35164
|
.subscribe(() => {
|
|
35100
35165
|
// Would have been nice to pass the caseId within state.data, but this isn't part of NavigationExtras until
|
|
35101
35166
|
// Angular 7.2
|
|
35167
|
+
this.getSpecificAccessError = false;
|
|
35102
35168
|
this.router.navigate(['success'], { relativeTo: this.route });
|
|
35103
35169
|
}, () => {
|
|
35104
|
-
//
|
|
35170
|
+
// Show the generic error message
|
|
35171
|
+
this.getSpecificAccessError = true;
|
|
35172
|
+
this.errorMessage = {
|
|
35173
|
+
title: this.genericError,
|
|
35174
|
+
description: 'Sorry, there is a problem with the service; Try again later.'
|
|
35175
|
+
};
|
|
35105
35176
|
});
|
|
35106
35177
|
}
|
|
35107
35178
|
}
|
|
@@ -35118,7 +35189,7 @@ class CaseSpecificAccessRequestComponent {
|
|
|
35118
35189
|
return input.value === null || input.value.trim().length === 0;
|
|
35119
35190
|
}
|
|
35120
35191
|
static ɵfac = function CaseSpecificAccessRequestComponent_Factory(t) { return new (t || CaseSpecificAccessRequestComponent)(i0.ɵɵdirectiveInject(i4.FormBuilder), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(CaseNotifier)); };
|
|
35121
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseSpecificAccessRequestComponent, selectors: [["ccd-case-specific-access-request"]], decls: 50, vars: 42, consts: [[3, "error", 4, "ngIf"], ["type", "information"], [3, "submit", "formGroup"], [1, "govuk-form-group", 3, "ngClass"], ["aria-describedby", "reason-hint", 1, "govuk-fieldset"], [1, "govuk-fieldset__legend", "govuk-fieldset__legend--l"], [1, "govuk-fieldset__heading"], ["data-module", "govuk-details", "role", "group", 1, "govuk-details"], ["
|
|
35192
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseSpecificAccessRequestComponent, selectors: [["ccd-case-specific-access-request"]], decls: 50, vars: 42, consts: [[3, "error", 4, "ngIf"], ["type", "information"], [3, "submit", "formGroup"], [1, "govuk-form-group", 3, "ngClass"], ["aria-describedby", "reason-hint", 1, "govuk-fieldset"], [1, "govuk-fieldset__legend", "govuk-fieldset__legend--l"], [1, "govuk-fieldset__heading"], ["data-module", "govuk-details", "role", "group", 1, "govuk-details"], ["aria-expanded", "false", 1, "govuk-details__summary"], [1, "govuk-details__summary-text"], ["aria-hidden", "true", 1, "govuk-details__text"], [1, "govuk-body"], [1, "govuk-list", "govuk-list--bullet"], ["id", "reason-hint", 1, "govuk-hint"], ["id", "conditional-reason-3"], [1, "govuk-form-group"], ["id", "specific-reason-error-message", "class", "govuk-error-message", 4, "ngIf"], ["id", "specific-reason", "name", "specific-reason", "rows", "8", "formControlName", "specificReason", 1, "govuk-textarea", 3, "ngClass"], [1, "govuk-button-group"], ["type", "submit", 1, "govuk-button", "govuk-!-margin-right-3"], [1, "govuk-grid-column-full", "govuk-!-padding-left-0"], ["href", "javascript:void(0)", 1, "govuk-body", 3, "click"], [3, "error"], ["id", "specific-reason-error-message", 1, "govuk-error-message"]], template: function CaseSpecificAccessRequestComponent_Template(rf, ctx) { if (rf & 1) {
|
|
35122
35193
|
i0.ɵɵtemplate(0, CaseSpecificAccessRequestComponent_exui_error_message_0_Template, 1, 1, "exui-error-message", 0);
|
|
35123
35194
|
i0.ɵɵelementStart(1, "cut-alert", 1);
|
|
35124
35195
|
i0.ɵɵtext(2);
|
|
@@ -35172,7 +35243,7 @@ class CaseSpecificAccessRequestComponent {
|
|
|
35172
35243
|
i0.ɵɵpipe(49, "rpxTranslate");
|
|
35173
35244
|
i0.ɵɵelementEnd()()()()();
|
|
35174
35245
|
} if (rf & 2) {
|
|
35175
|
-
i0.ɵɵproperty("ngIf", ctx.formGroup.invalid && ctx.submitted);
|
|
35246
|
+
i0.ɵɵproperty("ngIf", ctx.formGroup.invalid && ctx.submitted || ctx.getSpecificAccessError);
|
|
35176
35247
|
i0.ɵɵadvance(2);
|
|
35177
35248
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 16, "Authorisation is needed to access this case."), "");
|
|
35178
35249
|
i0.ɵɵadvance(3);
|
|
@@ -35207,7 +35278,7 @@ class CaseSpecificAccessRequestComponent {
|
|
|
35207
35278
|
}
|
|
35208
35279
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseSpecificAccessRequestComponent, [{
|
|
35209
35280
|
type: Component,
|
|
35210
|
-
args: [{ selector: 'ccd-case-specific-access-request', template: "<exui-error-message\n *ngIf=\"formGroup.invalid && submitted\"\n [error]=\"errorMessage\"></exui-error-message>\n<cut-alert type=\"information\">\n {{'Authorisation is needed to access this case.' | rpxTranslate}}<br />\n {{'This could be because it\\'s outside your jurisdiction, or you may be excluded from the case. If you request access to this case, it will be logged for auditing purposes.' | rpxTranslate}}\n</cut-alert>\n<form [formGroup]=\"formGroup\" (submit)=\"onSubmit()\">\n <div class=\"govuk-form-group\"\n [ngClass]=\"{ 'form-group-error': formGroup.invalid && submitted }\">\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"reason-hint\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--l\">\n <h1 class=\"govuk-fieldset__heading\">\n {{ title | rpxTranslate }}\n </h1>\n </legend>\n\n <details class=\"govuk-details\" data-module=\"govuk-details\" role=\"group\">\n <summary\n class=\"govuk-details__summary\"\n
|
|
35281
|
+
args: [{ selector: 'ccd-case-specific-access-request', template: "<exui-error-message\n *ngIf=\"(formGroup.invalid && submitted) || getSpecificAccessError\"\n [error]=\"errorMessage\"></exui-error-message>\n<cut-alert type=\"information\">\n {{'Authorisation is needed to access this case.' | rpxTranslate}}<br />\n {{'This could be because it\\'s outside your jurisdiction, or you may be excluded from the case. If you request access to this case, it will be logged for auditing purposes.' | rpxTranslate}}\n</cut-alert>\n<form [formGroup]=\"formGroup\" (submit)=\"onSubmit()\">\n <div class=\"govuk-form-group\"\n [ngClass]=\"{ 'form-group-error': formGroup.invalid && submitted }\">\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"reason-hint\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--l\">\n <h1 class=\"govuk-fieldset__heading\">\n {{ title | rpxTranslate }}\n </h1>\n </legend>\n\n <details class=\"govuk-details\" data-module=\"govuk-details\" role=\"group\">\n <summary\n class=\"govuk-details__summary\"\n aria-expanded=\"false\">\n <span class=\"govuk-details__summary-text\">\n {{'Help with requesting case access' | rpxTranslate}}\n </span>\n </summary>\n <div\n class=\"govuk-details__text\"\n aria-hidden=\"true\">\n <p class=\"govuk-body\">{{'You could include:' | rpxTranslate}}</p>\n <ul class=\"govuk-list govuk-list--bullet\">\n <li>{{'the case reference of the linked case' | rpxTranslate}}</li>\n <li>{{'how long you require access to this case' | rpxTranslate}}</li>\n <li>{{'any other reasons why you require access' | rpxTranslate}}</li>\n </ul>\n </div>\n </details>\n\n <div id=\"reason-hint\" class=\"govuk-hint\">\n {{ hint | rpxTranslate }}\n </div>\n <div id=\"conditional-reason-3\">\n <div class=\"govuk-form-group\">\n <div\n id=\"specific-reason-error-message\"\n class=\"govuk-error-message\"\n *ngIf=\"formGroup.get('specificReason').invalid && submitted\">\n {{ errorMessage.description | rpxTranslate }}\n </div>\n <textarea\n class=\"govuk-textarea\"\n [ngClass]=\"{\n 'govuk-textarea--error':\n formGroup.get('specificReason').invalid && submitted\n }\"\n id=\"specific-reason\"\n name=\"specific-reason\"\n rows=\"8\"\n formControlName=\"specificReason\">\n </textarea>\n </div>\n </div>\n </fieldset>\n </div>\n\n <div class=\"govuk-button-group\">\n <button class=\"govuk-button govuk-!-margin-right-3\" type=\"submit\">\n {{'Submit' | rpxTranslate}}\n </button>\n <div class=\"govuk-grid-column-full govuk-!-padding-left-0\">\n <p>\n <a class=\"govuk-body\" (click)=\"onCancel()\" href=\"javascript:void(0)\">\n {{'Cancel' | rpxTranslate}}\n </a>\n </p>\n </div>\n </div>\n</form>\n" }]
|
|
35211
35282
|
}], () => [{ type: i4.FormBuilder }, { type: i1$1.Router }, { type: CasesService }, { type: i1$1.ActivatedRoute }, { type: CaseNotifier }], null); })();
|
|
35212
35283
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseSpecificAccessRequestComponent, { className: "CaseSpecificAccessRequestComponent", filePath: "lib/shared/components/case-viewer/case-specific-access-request/case-specific-access-request.component.ts", lineNumber: 22 }); })();
|
|
35213
35284
|
|