@hmcts/ccd-case-ui-toolkit 7.3.99 → 7.4.2-broken-access
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.
|
@@ -14132,57 +14132,67 @@ class WriteComplexFieldComponent extends AbstractFieldWriteComponent {
|
|
|
14132
14132
|
const _c0$$ = ["writeComplexFieldComponent"];
|
|
14133
14133
|
const _c1$q = a0 => ({ "form-group-error": a0 });
|
|
14134
14134
|
const _c2$4 = a0 => ({ "govuk-input--error": a0 });
|
|
14135
|
-
function
|
|
14136
|
-
i0.ɵɵelementStart(0, "span",
|
|
14135
|
+
function WriteAddressFieldComponent_div_1_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
14136
|
+
i0.ɵɵelementStart(0, "span", 9);
|
|
14137
|
+
i0.ɵɵelement(1, "ccd-markdown", 10);
|
|
14138
|
+
i0.ɵɵpipe(2, "rpxTranslate");
|
|
14139
|
+
i0.ɵɵelementEnd();
|
|
14140
|
+
} if (rf & 2) {
|
|
14141
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
14142
|
+
i0.ɵɵadvance();
|
|
14143
|
+
i0.ɵɵproperty("content", i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField.hint_text));
|
|
14144
|
+
} }
|
|
14145
|
+
function WriteAddressFieldComponent_div_1_div_5_span_5_Template(rf, ctx) { if (rf & 1) {
|
|
14146
|
+
i0.ɵɵelementStart(0, "span", 17);
|
|
14137
14147
|
i0.ɵɵtext(1);
|
|
14138
14148
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
14139
14149
|
i0.ɵɵelementEnd();
|
|
14140
14150
|
} if (rf & 2) {
|
|
14141
|
-
const
|
|
14151
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
14142
14152
|
i0.ɵɵadvance();
|
|
14143
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1,
|
|
14153
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.errorMessage));
|
|
14144
14154
|
} }
|
|
14145
|
-
function
|
|
14146
|
-
const
|
|
14147
|
-
i0.ɵɵelementStart(0, "div",
|
|
14155
|
+
function WriteAddressFieldComponent_div_1_div_5_Template(rf, ctx) { if (rf & 1) {
|
|
14156
|
+
const _r2 = i0.ɵɵgetCurrentView();
|
|
14157
|
+
i0.ɵɵelementStart(0, "div", 11)(1, "label", 12)(2, "span", 13);
|
|
14148
14158
|
i0.ɵɵtext(3);
|
|
14149
14159
|
i0.ɵɵpipe(4, "rpxTranslate");
|
|
14150
14160
|
i0.ɵɵelementEnd()();
|
|
14151
|
-
i0.ɵɵtemplate(5,
|
|
14152
|
-
i0.ɵɵelement(6, "input",
|
|
14153
|
-
i0.ɵɵelementStart(7, "button",
|
|
14154
|
-
i0.ɵɵlistener("click", function
|
|
14161
|
+
i0.ɵɵtemplate(5, WriteAddressFieldComponent_div_1_div_5_span_5_Template, 3, 3, "span", 14);
|
|
14162
|
+
i0.ɵɵelement(6, "input", 15);
|
|
14163
|
+
i0.ɵɵelementStart(7, "button", 16);
|
|
14164
|
+
i0.ɵɵlistener("click", function WriteAddressFieldComponent_div_1_div_5_Template_button_click_7_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.findAddress()); });
|
|
14155
14165
|
i0.ɵɵtext(8);
|
|
14156
14166
|
i0.ɵɵpipe(9, "rpxTranslate");
|
|
14157
14167
|
i0.ɵɵelementEnd()();
|
|
14158
14168
|
} if (rf & 2) {
|
|
14159
|
-
const
|
|
14160
|
-
i0.ɵɵproperty("id",
|
|
14169
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
14170
|
+
i0.ɵɵproperty("id", ctx_r0.createElementId("postcodeLookup"))("ngClass", i0.ɵɵpureFunction1(14, _c1$q, ctx_r0.missingPostcode));
|
|
14161
14171
|
i0.ɵɵadvance();
|
|
14162
|
-
i0.ɵɵproperty("for",
|
|
14172
|
+
i0.ɵɵproperty("for", ctx_r0.createElementId("postcodeInput"));
|
|
14163
14173
|
i0.ɵɵadvance(2);
|
|
14164
14174
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 10, "Enter a UK postcode"));
|
|
14165
14175
|
i0.ɵɵadvance(2);
|
|
14166
|
-
i0.ɵɵproperty("ngIf",
|
|
14176
|
+
i0.ɵɵproperty("ngIf", ctx_r0.missingPostcode);
|
|
14167
14177
|
i0.ɵɵadvance();
|
|
14168
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(16, _c2$4,
|
|
14178
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(16, _c2$4, ctx_r0.missingPostcode))("id", ctx_r0.createElementId("postcodeInput"))("formControl", ctx_r0.postcode);
|
|
14169
14179
|
i0.ɵɵadvance();
|
|
14170
|
-
i0.ɵɵproperty("disabled",
|
|
14180
|
+
i0.ɵɵproperty("disabled", ctx_r0.loadingAddresses);
|
|
14171
14181
|
i0.ɵɵadvance();
|
|
14172
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(9, 12,
|
|
14182
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(9, 12, ctx_r0.loadingAddresses ? "Finding addresses..." : "Find address"), " ");
|
|
14173
14183
|
} }
|
|
14174
|
-
function
|
|
14175
|
-
i0.ɵɵelementStart(0, "span",
|
|
14184
|
+
function WriteAddressFieldComponent_div_1_div_6_span_5_Template(rf, ctx) { if (rf & 1) {
|
|
14185
|
+
i0.ɵɵelementStart(0, "span", 17);
|
|
14176
14186
|
i0.ɵɵtext(1);
|
|
14177
14187
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
14178
14188
|
i0.ɵɵelementEnd();
|
|
14179
14189
|
} if (rf & 2) {
|
|
14180
|
-
const
|
|
14190
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
14181
14191
|
i0.ɵɵadvance();
|
|
14182
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1,
|
|
14192
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.errorMessage));
|
|
14183
14193
|
} }
|
|
14184
|
-
function
|
|
14185
|
-
i0.ɵɵelementStart(0, "option",
|
|
14194
|
+
function WriteAddressFieldComponent_div_1_div_6_option_7_Template(rf, ctx) { if (rf & 1) {
|
|
14195
|
+
i0.ɵɵelementStart(0, "option", 22);
|
|
14186
14196
|
i0.ɵɵtext(1);
|
|
14187
14197
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
14188
14198
|
i0.ɵɵelementEnd();
|
|
@@ -14191,19 +14201,19 @@ function WriteAddressFieldComponent_div_1_div_5_option_7_Template(rf, ctx) { if
|
|
|
14191
14201
|
i0.ɵɵadvance();
|
|
14192
14202
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 2, "No address found"), " ");
|
|
14193
14203
|
} }
|
|
14194
|
-
function
|
|
14195
|
-
i0.ɵɵelementStart(0, "option",
|
|
14204
|
+
function WriteAddressFieldComponent_div_1_div_6_option_8_Template(rf, ctx) { if (rf & 1) {
|
|
14205
|
+
i0.ɵɵelementStart(0, "option", 22);
|
|
14196
14206
|
i0.ɵɵtext(1);
|
|
14197
14207
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
14198
14208
|
i0.ɵɵelementEnd();
|
|
14199
14209
|
} if (rf & 2) {
|
|
14200
|
-
const
|
|
14210
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
14201
14211
|
i0.ɵɵproperty("ngValue", undefined);
|
|
14202
14212
|
i0.ɵɵadvance();
|
|
14203
|
-
i0.ɵɵtextInterpolate2(" ",
|
|
14213
|
+
i0.ɵɵtextInterpolate2(" ", ctx_r0.addressOptions.length, " ", i0.ɵɵpipeBind1(2, 3, ctx_r0.addressOptions.length === 1 ? "address found" : "addresses found"), " ");
|
|
14204
14214
|
} }
|
|
14205
|
-
function
|
|
14206
|
-
i0.ɵɵelementStart(0, "option",
|
|
14215
|
+
function WriteAddressFieldComponent_div_1_div_6_option_9_Template(rf, ctx) { if (rf & 1) {
|
|
14216
|
+
i0.ɵɵelementStart(0, "option", 22);
|
|
14207
14217
|
i0.ɵɵtext(1);
|
|
14208
14218
|
i0.ɵɵelementEnd();
|
|
14209
14219
|
} if (rf & 2) {
|
|
@@ -14212,39 +14222,39 @@ function WriteAddressFieldComponent_div_1_div_5_option_9_Template(rf, ctx) { if
|
|
|
14212
14222
|
i0.ɵɵadvance();
|
|
14213
14223
|
i0.ɵɵtextInterpolate1(" ", addressOption_r4.description, " ");
|
|
14214
14224
|
} }
|
|
14215
|
-
function
|
|
14225
|
+
function WriteAddressFieldComponent_div_1_div_6_Template(rf, ctx) { if (rf & 1) {
|
|
14216
14226
|
const _r3 = i0.ɵɵgetCurrentView();
|
|
14217
|
-
i0.ɵɵelementStart(0, "div",
|
|
14227
|
+
i0.ɵɵelementStart(0, "div", 18)(1, "label", 12)(2, "span", 13);
|
|
14218
14228
|
i0.ɵɵtext(3);
|
|
14219
14229
|
i0.ɵɵpipe(4, "rpxTranslate");
|
|
14220
14230
|
i0.ɵɵelementEnd()();
|
|
14221
|
-
i0.ɵɵtemplate(5,
|
|
14222
|
-
i0.ɵɵelementStart(6, "select",
|
|
14223
|
-
i0.ɵɵlistener("change", function
|
|
14224
|
-
i0.ɵɵtemplate(7,
|
|
14231
|
+
i0.ɵɵtemplate(5, WriteAddressFieldComponent_div_1_div_6_span_5_Template, 3, 3, "span", 14);
|
|
14232
|
+
i0.ɵɵelementStart(6, "select", 19);
|
|
14233
|
+
i0.ɵɵlistener("change", function WriteAddressFieldComponent_div_1_div_6_Template_select_change_6_listener() { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.addressSelected()); });
|
|
14234
|
+
i0.ɵɵtemplate(7, WriteAddressFieldComponent_div_1_div_6_option_7_Template, 3, 4, "option", 20)(8, WriteAddressFieldComponent_div_1_div_6_option_8_Template, 3, 5, "option", 20)(9, WriteAddressFieldComponent_div_1_div_6_option_9_Template, 2, 2, "option", 21);
|
|
14225
14235
|
i0.ɵɵelementEnd()();
|
|
14226
14236
|
} if (rf & 2) {
|
|
14227
|
-
const
|
|
14228
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(11, _c1$q,
|
|
14237
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
14238
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(11, _c1$q, ctx_r0.noAddressSelected));
|
|
14229
14239
|
i0.ɵɵadvance();
|
|
14230
|
-
i0.ɵɵproperty("for",
|
|
14240
|
+
i0.ɵɵproperty("for", ctx_r0.createElementId("addressList"));
|
|
14231
14241
|
i0.ɵɵadvance(2);
|
|
14232
14242
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 9, "Select an address"));
|
|
14233
14243
|
i0.ɵɵadvance(2);
|
|
14234
|
-
i0.ɵɵproperty("ngIf",
|
|
14244
|
+
i0.ɵɵproperty("ngIf", ctx_r0.noAddressSelected);
|
|
14235
14245
|
i0.ɵɵadvance();
|
|
14236
|
-
i0.ɵɵproperty("id",
|
|
14246
|
+
i0.ɵɵproperty("id", ctx_r0.createElementId("addressList"))("formControl", ctx_r0.addressList);
|
|
14237
14247
|
i0.ɵɵadvance();
|
|
14238
|
-
i0.ɵɵproperty("ngIf",
|
|
14248
|
+
i0.ɵɵproperty("ngIf", ctx_r0.addressOptions.length === 0);
|
|
14239
14249
|
i0.ɵɵadvance();
|
|
14240
|
-
i0.ɵɵproperty("ngIf",
|
|
14250
|
+
i0.ɵɵproperty("ngIf", ctx_r0.addressOptions.length > 0);
|
|
14241
14251
|
i0.ɵɵadvance();
|
|
14242
|
-
i0.ɵɵproperty("ngForOf",
|
|
14252
|
+
i0.ɵɵproperty("ngForOf", ctx_r0.addressOptions);
|
|
14243
14253
|
} }
|
|
14244
|
-
function
|
|
14254
|
+
function WriteAddressFieldComponent_div_1_a_7_Template(rf, ctx) { if (rf & 1) {
|
|
14245
14255
|
const _r5 = i0.ɵɵgetCurrentView();
|
|
14246
|
-
i0.ɵɵelementStart(0, "a",
|
|
14247
|
-
i0.ɵɵlistener("click", function
|
|
14256
|
+
i0.ɵɵelementStart(0, "a", 23);
|
|
14257
|
+
i0.ɵɵlistener("click", function WriteAddressFieldComponent_div_1_a_7_Template_a_click_0_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r0 = i0.ɵɵnextContext(2); ctx_r0.blankAddress(); return i0.ɵɵresetView($event.preventDefault()); });
|
|
14248
14258
|
i0.ɵɵtext(1);
|
|
14249
14259
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
14250
14260
|
i0.ɵɵelementEnd();
|
|
@@ -14257,18 +14267,20 @@ function WriteAddressFieldComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
|
14257
14267
|
i0.ɵɵtext(2);
|
|
14258
14268
|
i0.ɵɵpipe(3, "ccdFieldLabel");
|
|
14259
14269
|
i0.ɵɵelementEnd();
|
|
14260
|
-
i0.ɵɵtemplate(4,
|
|
14270
|
+
i0.ɵɵtemplate(4, WriteAddressFieldComponent_div_1_span_4_Template, 3, 3, "span", 5)(5, WriteAddressFieldComponent_div_1_div_5_Template, 10, 18, "div", 6)(6, WriteAddressFieldComponent_div_1_div_6_Template, 10, 13, "div", 7)(7, WriteAddressFieldComponent_div_1_a_7_Template, 3, 3, "a", 8);
|
|
14261
14271
|
i0.ɵɵelementEnd();
|
|
14262
14272
|
} if (rf & 2) {
|
|
14263
|
-
const
|
|
14273
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
14264
14274
|
i0.ɵɵadvance(2);
|
|
14265
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3,
|
|
14275
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 5, ctx_r0.caseField));
|
|
14266
14276
|
i0.ɵɵadvance(2);
|
|
14267
|
-
i0.ɵɵproperty("ngIf",
|
|
14277
|
+
i0.ɵɵproperty("ngIf", ctx_r0.caseField.hint_text);
|
|
14268
14278
|
i0.ɵɵadvance();
|
|
14269
|
-
i0.ɵɵproperty("ngIf",
|
|
14279
|
+
i0.ɵɵproperty("ngIf", !ctx_r0.isExpanded);
|
|
14270
14280
|
i0.ɵɵadvance();
|
|
14271
|
-
i0.ɵɵproperty("ngIf",
|
|
14281
|
+
i0.ɵɵproperty("ngIf", ctx_r0.addressOptions);
|
|
14282
|
+
i0.ɵɵadvance();
|
|
14283
|
+
i0.ɵɵproperty("ngIf", !ctx_r0.shouldShowDetailFields());
|
|
14272
14284
|
} }
|
|
14273
14285
|
class WriteAddressFieldComponent extends AbstractFieldWriteComponent {
|
|
14274
14286
|
isCompoundPipe;
|
|
@@ -14402,9 +14414,9 @@ class WriteAddressFieldComponent extends AbstractFieldWriteComponent {
|
|
|
14402
14414
|
let _t;
|
|
14403
14415
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.writeComplexFieldComponent = _t.first);
|
|
14404
14416
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.focusElementDirectives = _t);
|
|
14405
|
-
} }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 4, vars: 9, consts: [["writeComplexFieldComponent", ""], [1, "form-group", 3, "id"], [4, "ngIf"], [3, "hidden", "caseField", "renderLabel", "parent", "formGroup", "ignoreMandatory", "idPrefix"], [1, "heading-h2"], ["class", "form-group bottom-30 postcodeLookup", 3, "id", "ngClass", 4, "ngIf"], ["class", "form-group", "id", "selectAddress", 3, "ngClass", 4, "ngIf"], ["class", "manual-link bottom-30", "href", "#", 3, "click", 4, "ngIf"], [1, "form-group", "bottom-30", "postcodeLookup", 3, "id", "ngClass"], [3, "for"], [1, "form-label"], ["class", "error-message", 4, "ngIf"], ["type", "text", "name", "postcode", 1, "form-control", "postcodeinput", "inline-block", 3, "ngClass", "id", "formControl"], ["type", "button", 1, "button", "button-30", 3, "click", "disabled"], [1, "error-message"], ["id", "selectAddress", 1, "form-group", 3, "ngClass"], ["name", "address", "focusElement", "", 1, "form-control", "ccd-dropdown", "addressList", 3, "change", "id", "formControl"], [3, "ngValue", 4, "ngIf"], [3, "ngValue", 4, "ngFor", "ngForOf"], [3, "ngValue"], ["href", "#", 1, "manual-link", "bottom-30", 3, "click"]], template: function WriteAddressFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
14417
|
+
} }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 4, vars: 9, consts: [["writeComplexFieldComponent", ""], [1, "form-group", 3, "id"], [4, "ngIf"], [3, "hidden", "caseField", "renderLabel", "parent", "formGroup", "ignoreMandatory", "idPrefix"], [1, "heading-h2"], ["class", "form-hint", 4, "ngIf"], ["class", "form-group bottom-30 postcodeLookup", 3, "id", "ngClass", 4, "ngIf"], ["class", "form-group", "id", "selectAddress", 3, "ngClass", 4, "ngIf"], ["class", "manual-link bottom-30", "href", "#", 3, "click", 4, "ngIf"], [1, "form-hint"], [3, "content"], [1, "form-group", "bottom-30", "postcodeLookup", 3, "id", "ngClass"], [3, "for"], [1, "form-label"], ["class", "error-message", 4, "ngIf"], ["type", "text", "name", "postcode", 1, "form-control", "postcodeinput", "inline-block", 3, "ngClass", "id", "formControl"], ["type", "button", 1, "button", "button-30", 3, "click", "disabled"], [1, "error-message"], ["id", "selectAddress", 1, "form-group", 3, "ngClass"], ["name", "address", "focusElement", "", 1, "form-control", "ccd-dropdown", "addressList", 3, "change", "id", "formControl"], [3, "ngValue", 4, "ngIf"], [3, "ngValue", 4, "ngFor", "ngForOf"], [3, "ngValue"], ["href", "#", 1, "manual-link", "bottom-30", 3, "click"]], template: function WriteAddressFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
14406
14418
|
i0.ɵɵelementStart(0, "div", 1);
|
|
14407
|
-
i0.ɵɵtemplate(1, WriteAddressFieldComponent_div_1_Template,
|
|
14419
|
+
i0.ɵɵtemplate(1, WriteAddressFieldComponent_div_1_Template, 8, 7, "div", 2);
|
|
14408
14420
|
i0.ɵɵelement(2, "ccd-write-complex-type-field", 3, 0);
|
|
14409
14421
|
i0.ɵɵelementEnd();
|
|
14410
14422
|
} if (rf & 2) {
|
|
@@ -14417,7 +14429,7 @@ class WriteAddressFieldComponent extends AbstractFieldWriteComponent {
|
|
|
14417
14429
|
}
|
|
14418
14430
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteAddressFieldComponent, [{
|
|
14419
14431
|
type: Component,
|
|
14420
|
-
args: [{ selector: 'ccd-write-address-field', standalone: false, template: "<div class=\"form-group\" [id]=\"id()\">\n <div *ngIf=\"!isComplexWithHiddenFields()\">\n <h2 class=\"heading-h2\">{{caseField | ccdFieldLabel}}</h2>\n\n <div class=\"form-group bottom-30 postcodeLookup\" [id]=\"createElementId('postcodeLookup')\" [ngClass]=\"{'form-group-error': missingPostcode}\" *ngIf=\"!isExpanded\">\n <label [for]=\"createElementId('postcodeInput')\">\n <span class=\"form-label\">{{'Enter a UK postcode' | rpxTranslate}}</span>\n </label>\n <span class=\"error-message\" *ngIf=\"missingPostcode\">{{errorMessage | rpxTranslate}}</span>\n <input type=\"text\" [ngClass]=\"{'govuk-input--error': missingPostcode}\"\n [id]=\"createElementId('postcodeInput')\" name=\"postcode\" class=\"form-control postcodeinput inline-block\" [formControl]=\"postcode\">\n <button type=\"button\" class=\"button button-30\" (click)=\"findAddress()\" [disabled]=\"loadingAddresses\">\n {{(loadingAddresses ? 'Finding addresses...' : 'Find address') | rpxTranslate}}\n </button>\n </div>\n\n <div class=\"form-group\" *ngIf=\"addressOptions\" id=\"selectAddress\" [ngClass]=\"{'form-group-error': noAddressSelected}\">\n <label [for]=\"createElementId('addressList')\">\n <span class=\"form-label\">{{'Select an address' | rpxTranslate}}</span>\n </label>\n <span class=\"error-message\" *ngIf=\"noAddressSelected\">{{errorMessage | rpxTranslate}}</span>\n <select class=\"form-control ccd-dropdown addressList\" [id]=\"createElementId('addressList')\" name=\"address\" [formControl]=\"addressList\" (change)=\"addressSelected()\" focusElement>\n <option *ngIf=\"addressOptions.length === 0\" [ngValue]=\"undefined\">\n {{'No address found' | rpxTranslate}}\n </option>\n <option *ngIf=\"addressOptions.length > 0\" [ngValue]=\"undefined\">\n {{addressOptions.length}} {{(addressOptions.length === 1 ? 'address found' : 'addresses found') | rpxTranslate}}\n </option>\n <option *ngFor=\"let addressOption of addressOptions\" [ngValue]=\"addressOption.value\">\n {{addressOption.description}}\n </option>\n </select>\n </div>\n\n <a class=\"manual-link bottom-30\" *ngIf=\"!shouldShowDetailFields()\" (click)=\"blankAddress(); $event.preventDefault()\" href=\"#\">\n {{\"I can't enter a UK postcode\" | rpxTranslate}}\n </a>\n </div>\n\n <ccd-write-complex-type-field\n [hidden]=\"!shouldShowDetailFields()\"\n [caseField]=\"caseField\"\n [renderLabel]=\"false\"\n [parent]=\"parent\"\n [formGroup]=\"formGroup\"\n [ignoreMandatory]=\"true\"\n [idPrefix]=\"buildIdPrefix('detail')\"\n #writeComplexFieldComponent>\n </ccd-write-complex-type-field>\n</div>\n", styles: [".manual-link{cursor:pointer;display:block;text-decoration:underline}\n"] }]
|
|
14432
|
+
args: [{ selector: 'ccd-write-address-field', standalone: false, template: "<div class=\"form-group\" [id]=\"id()\">\n <div *ngIf=\"!isComplexWithHiddenFields()\">\n <h2 class=\"heading-h2\">{{caseField | ccdFieldLabel}}</h2>\n <span class=\"form-hint\" *ngIf=\"caseField.hint_text\">\n <ccd-markdown [content]=\"caseField.hint_text | rpxTranslate\"></ccd-markdown>\n </span>\n\n <div class=\"form-group bottom-30 postcodeLookup\" [id]=\"createElementId('postcodeLookup')\" [ngClass]=\"{'form-group-error': missingPostcode}\" *ngIf=\"!isExpanded\">\n <label [for]=\"createElementId('postcodeInput')\">\n <span class=\"form-label\">{{'Enter a UK postcode' | rpxTranslate}}</span>\n </label>\n <span class=\"error-message\" *ngIf=\"missingPostcode\">{{errorMessage | rpxTranslate}}</span>\n <input type=\"text\" [ngClass]=\"{'govuk-input--error': missingPostcode}\"\n [id]=\"createElementId('postcodeInput')\" name=\"postcode\" class=\"form-control postcodeinput inline-block\" [formControl]=\"postcode\">\n <button type=\"button\" class=\"button button-30\" (click)=\"findAddress()\" [disabled]=\"loadingAddresses\">\n {{(loadingAddresses ? 'Finding addresses...' : 'Find address') | rpxTranslate}}\n </button>\n </div>\n\n <div class=\"form-group\" *ngIf=\"addressOptions\" id=\"selectAddress\" [ngClass]=\"{'form-group-error': noAddressSelected}\">\n <label [for]=\"createElementId('addressList')\">\n <span class=\"form-label\">{{'Select an address' | rpxTranslate}}</span>\n </label>\n <span class=\"error-message\" *ngIf=\"noAddressSelected\">{{errorMessage | rpxTranslate}}</span>\n <select class=\"form-control ccd-dropdown addressList\" [id]=\"createElementId('addressList')\" name=\"address\" [formControl]=\"addressList\" (change)=\"addressSelected()\" focusElement>\n <option *ngIf=\"addressOptions.length === 0\" [ngValue]=\"undefined\">\n {{'No address found' | rpxTranslate}}\n </option>\n <option *ngIf=\"addressOptions.length > 0\" [ngValue]=\"undefined\">\n {{addressOptions.length}} {{(addressOptions.length === 1 ? 'address found' : 'addresses found') | rpxTranslate}}\n </option>\n <option *ngFor=\"let addressOption of addressOptions\" [ngValue]=\"addressOption.value\">\n {{addressOption.description}}\n </option>\n </select>\n </div>\n\n <a class=\"manual-link bottom-30\" *ngIf=\"!shouldShowDetailFields()\" (click)=\"blankAddress(); $event.preventDefault()\" href=\"#\">\n {{\"I can't enter a UK postcode\" | rpxTranslate}}\n </a>\n </div>\n\n <ccd-write-complex-type-field\n [hidden]=\"!shouldShowDetailFields()\"\n [caseField]=\"caseField\"\n [renderLabel]=\"false\"\n [parent]=\"parent\"\n [formGroup]=\"formGroup\"\n [ignoreMandatory]=\"true\"\n [idPrefix]=\"buildIdPrefix('detail')\"\n #writeComplexFieldComponent>\n </ccd-write-complex-type-field>\n</div>\n", styles: [".manual-link{cursor:pointer;display:block;text-decoration:underline}\n"] }]
|
|
14421
14433
|
}], () => [{ type: AddressesService }, { type: IsCompoundPipe }], { writeComplexFieldComponent: [{
|
|
14422
14434
|
type: ViewChild,
|
|
14423
14435
|
args: ['writeComplexFieldComponent', { static: false }]
|
|
@@ -14775,7 +14787,7 @@ class CaseFileViewFieldComponent {
|
|
|
14775
14787
|
}
|
|
14776
14788
|
setMediaViewerFile(document) {
|
|
14777
14789
|
const documentDetails = {
|
|
14778
|
-
document_binary_url: document
|
|
14790
|
+
document_binary_url: this.withLegacyDocumentAccessContext(this.documentManagementService.getDocumentBinaryUrl(document)),
|
|
14779
14791
|
document_filename: document.document_filename,
|
|
14780
14792
|
content_type: document.content_type
|
|
14781
14793
|
};
|
|
@@ -14790,6 +14802,19 @@ class CaseFileViewFieldComponent {
|
|
|
14790
14802
|
const mediaViewerInfo = this.documentManagementService.getMediaViewerInfo(documentDetails);
|
|
14791
14803
|
this.currentDocument = JSON.parse(mediaViewerInfo);
|
|
14792
14804
|
}
|
|
14805
|
+
withLegacyDocumentAccessContext(documentBinaryUrl) {
|
|
14806
|
+
if (!documentBinaryUrl || !this.caseId) {
|
|
14807
|
+
return documentBinaryUrl;
|
|
14808
|
+
}
|
|
14809
|
+
const [path, query = ''] = documentBinaryUrl.split('?');
|
|
14810
|
+
if (!/^\/documents\/[^/]+\/binary\/?$/.test(path)) {
|
|
14811
|
+
return documentBinaryUrl;
|
|
14812
|
+
}
|
|
14813
|
+
// XUI validates legacy document access against the case before proxying the binary request.
|
|
14814
|
+
const searchParams = new URLSearchParams(query);
|
|
14815
|
+
searchParams.set('caseId', this.caseId);
|
|
14816
|
+
return `${path}?${searchParams.toString()}`;
|
|
14817
|
+
}
|
|
14793
14818
|
moveDocument(data) {
|
|
14794
14819
|
const cid = this.route.snapshot.paramMap.get(CaseFileViewFieldComponent.PARAM_CASE_ID);
|
|
14795
14820
|
const loadingToken = this.loadingService.register();
|
|
@@ -37041,7 +37066,7 @@ i0.ɵɵsetComponentScope(ReadLinkedCasesFieldComponent, function () { return [i5
|
|
|
37041
37066
|
// Components for linked cases
|
|
37042
37067
|
LinkedCasesToTableComponent,
|
|
37043
37068
|
LinkedCasesFromTableComponent]; }, []);
|
|
37044
|
-
i0.ɵɵsetComponentScope(WriteAddressFieldComponent, function () { return [i5.NgClass, i5.NgForOf, i5.NgIf, i4.NgSelectOption, i4.ɵNgSelectMultipleOption, i4.DefaultValueAccessor, i4.SelectControlValueAccessor, i4.NgControlStatus, i4.NgControlStatusGroup, i4.FormControlDirective, i4.FormGroupDirective, WriteComplexFieldComponent]; }, function () { return [FieldLabelPipe, i1.RpxTranslatePipe]; });
|
|
37069
|
+
i0.ɵɵsetComponentScope(WriteAddressFieldComponent, function () { return [i5.NgClass, i5.NgForOf, i5.NgIf, i4.NgSelectOption, i4.ɵNgSelectMultipleOption, i4.DefaultValueAccessor, i4.SelectControlValueAccessor, i4.NgControlStatus, i4.NgControlStatusGroup, i4.FormControlDirective, i4.FormGroupDirective, MarkdownComponent, WriteComplexFieldComponent]; }, function () { return [FieldLabelPipe, i1.RpxTranslatePipe]; });
|
|
37045
37070
|
i0.ɵɵsetComponentScope(WriteComplexFieldComponent, function () { return [i5.NgForOf, i5.NgIf, i5.NgSwitch, i5.NgSwitchCase, i4.NgControlStatusGroup, i4.FormGroupDirective, LabelSubstitutorDirective, FieldReadComponent,
|
|
37046
37071
|
FieldWriteComponent]; }, function () { return [FieldLabelPipe, IsReadOnlyPipe]; });
|
|
37047
37072
|
i0.ɵɵsetComponentScope(WriteDocumentFieldComponent, function () { return [i5.NgClass, i5.NgIf, i1$4.MarkdownComponent, ReadDocumentFieldComponent]; }, function () { return [FieldLabelPipe, i1.RpxTranslatePipe]; });
|