@hmcts/ccd-case-ui-toolkit 7.4.22-exui-5310-sonar-fixes → 7.4.23-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.
@@ -188,13 +188,13 @@ class Profile {
188
188
  default;
189
189
  isSolicitor() {
190
190
  if (hasRoles(this)) {
191
- return this.user.idam.roles.some(r => r.endsWith('-solicitor'));
191
+ return this.user.idam.roles.find(r => r.endsWith('-solicitor')) !== undefined;
192
192
  }
193
193
  return false;
194
194
  }
195
195
  isCourtAdmin() {
196
196
  if (hasRoles(this)) {
197
- return this.user.idam.roles.some(r => r.endsWith('-courtadmin'));
197
+ return this.user.idam.roles.find(r => r.endsWith('-courtadmin')) !== undefined;
198
198
  }
199
199
  return false;
200
200
  }
@@ -610,7 +610,7 @@ class HttpErrorService {
610
610
  }
611
611
  let httpError = new HttpError();
612
612
  if (error instanceof HttpErrorResponse) {
613
- if (error.headers?.get(HttpErrorService.CONTENT_TYPE).includes(HttpErrorService.JSON)) {
613
+ if (error.headers?.get(HttpErrorService.CONTENT_TYPE).indexOf(HttpErrorService.JSON) !== -1) {
614
614
  try {
615
615
  httpError = HttpError.from(error);
616
616
  }
@@ -1698,7 +1698,7 @@ class TabsComponent {
1698
1698
  const panels = this.panels.toArray();
1699
1699
  id = id || panels[0].id;
1700
1700
  /* istanbul ignore else */
1701
- if (!this.panelIds.includes(id)) {
1701
+ if (0 > this.panelIds.indexOf(id)) {
1702
1702
  id = panels[0].id;
1703
1703
  }
1704
1704
  panels.forEach((panel) => panel.selected = id === panel.id);
@@ -2043,7 +2043,7 @@ class ActivityService {
2043
2043
  verifyUserIsAuthorized() {
2044
2044
  if (this.sessionStorageService.getItem(USER_DETAILS) && this.activityUrl() && this.userAuthorised === undefined) {
2045
2045
  this.getActivities(ActivityService.DUMMY_CASE_REFERENCE).subscribe(() => this.userAuthorised = true, error => {
2046
- this.userAuthorised = ![401, 403].includes(error.status);
2046
+ this.userAuthorised = [401, 403].indexOf(error.status) <= -1;
2047
2047
  });
2048
2048
  }
2049
2049
  }
@@ -2689,7 +2689,7 @@ class GreyBarService {
2689
2689
  this.fieldsToggledToShow = this.fieldsToggledToShow.filter(id => id !== fieldId);
2690
2690
  }
2691
2691
  wasToggledToShow(fieldId) {
2692
- return this.fieldsToggledToShow.some(id => id === fieldId);
2692
+ return this.fieldsToggledToShow.find(id => id === fieldId) !== undefined;
2693
2693
  }
2694
2694
  reset() {
2695
2695
  this.fieldsToggledToShow = [];
@@ -3119,31 +3119,31 @@ class FormatTranslatorService {
3119
3119
  }
3120
3120
  hasDate(value) {
3121
3121
  return this.translate(value).length &&
3122
- value.toLowerCase().includes('d') &&
3123
- value.includes('M') && value.toLowerCase().includes('y');
3122
+ value.toLowerCase().indexOf('d') >= 0 &&
3123
+ value.indexOf('M') >= 0 && value.toLowerCase().indexOf('y') >= 0;
3124
3124
  }
3125
3125
  is24Hour(value) {
3126
3126
  return this.translate(value).length &&
3127
- value.includes('H');
3127
+ value.indexOf('H') >= 0;
3128
3128
  }
3129
3129
  hasNoDay(value) {
3130
- return this.translate(value).length && !value.toLowerCase().includes('d') &&
3131
- value.includes('M') && value.toLowerCase().includes('y');
3130
+ return this.translate(value).length && value.toLowerCase().indexOf('d') === -1 &&
3131
+ value.indexOf('M') >= 0 && value.toLowerCase().indexOf('y') >= 0;
3132
3132
  }
3133
3133
  hasNoDayAndMonth(value) {
3134
3134
  return this.translate(value).length &&
3135
- !value.toLowerCase().includes('d') &&
3136
- !value.includes('M') &&
3137
- value.toLowerCase().includes('y');
3135
+ value.toLowerCase().indexOf('d') === -1 &&
3136
+ value.indexOf('M') === -1 &&
3137
+ value.toLowerCase().indexOf('y') >= 0;
3138
3138
  }
3139
3139
  hasHours(value) {
3140
- return this.translate(value).length && value.toLowerCase().includes('h') && !value.includes('m');
3140
+ return this.translate(value).length && value.toLowerCase().indexOf('h') >= 0 && value.indexOf('m') === -1;
3141
3141
  }
3142
3142
  hasMinutes(value) {
3143
- return this.translate(value).length && value.includes('m') && value.toLowerCase().includes('h');
3143
+ return this.translate(value).length && value.indexOf('m') >= 0 && value.toLowerCase().indexOf('h') >= 0;
3144
3144
  }
3145
3145
  hasSeconds(value) {
3146
- return this.translate(value).length && value.toLowerCase().includes('s');
3146
+ return this.translate(value).length && value.toLowerCase().indexOf('s') >= 0;
3147
3147
  }
3148
3148
  static ɵfac = function FormatTranslatorService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || FormatTranslatorService)(); };
3149
3149
  static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: FormatTranslatorService, factory: FormatTranslatorService.ɵfac });
@@ -3209,10 +3209,10 @@ class DatePipe {
3209
3209
  // we could attempt to do something with.
3210
3210
  const parsedDate = Date.parse(value);
3211
3211
  // We successfully parsed it so let's use it.
3212
- if (!Number.isNaN(parsedDate)) {
3212
+ if (!isNaN(parsedDate)) {
3213
3213
  const d = new Date(parsedDate);
3214
3214
  // If what we received didn't include time, don't include it here either.
3215
- if (!value.includes(':')) {
3215
+ if (value.indexOf(':') < 0) {
3216
3216
  const shortDate = d.toLocaleDateString('en-GB');
3217
3217
  const shortISO = shortDate.split('/').reverse().join('-');
3218
3218
  return this.transform(shortISO, zone, format);
@@ -3264,7 +3264,7 @@ class DatePipe {
3264
3264
  return hourNum;
3265
3265
  }
3266
3266
  toInt(str) {
3267
- return Number.parseInt(str, 10);
3267
+ return parseInt(str, 10);
3268
3268
  }
3269
3269
  pad(num, padNum = 2) {
3270
3270
  const val = num !== undefined ? num.toString() : '';
@@ -3406,8 +3406,8 @@ class IsCompoundPipe {
3406
3406
  if (!field || !field.field_type || !field.field_type.type) {
3407
3407
  return false;
3408
3408
  }
3409
- if (IsCompoundPipe.COMPOUND_TYPES.includes(field.field_type.type)) {
3410
- if (IsCompoundPipe.EXCLUDE.includes(field.field_type.id)) {
3409
+ if (IsCompoundPipe.COMPOUND_TYPES.indexOf(field.field_type.type) !== -1) {
3410
+ if (IsCompoundPipe.EXCLUDE.indexOf(field.field_type.id) !== -1) {
3411
3411
  return false;
3412
3412
  }
3413
3413
  return true;
@@ -3950,10 +3950,10 @@ class CaseEventTrigger {
3950
3950
  end_button_label;
3951
3951
  can_save_draft;
3952
3952
  hasFields() {
3953
- return !!this.case_fields?.length;
3953
+ return this.case_fields && this.case_fields.length !== 0;
3954
3954
  }
3955
3955
  hasPages() {
3956
- return !!this.wizard_pages?.length;
3956
+ return this.wizard_pages && this.wizard_pages.length !== 0;
3957
3957
  }
3958
3958
  }
3959
3959
  __decorate([
@@ -4518,7 +4518,7 @@ class FieldsUtils {
4518
4518
  case 'Complex': {
4519
4519
  if (result[field.id] && field.field_type.complex_fields) {
4520
4520
  field.field_type.complex_fields.forEach((f) => {
4521
- if (['Collection', 'Complex', 'MultiSelectList'].includes(f.field_type.type)) {
4521
+ if (['Collection', 'Complex', 'MultiSelectList'].indexOf(f.field_type.type) > -1) {
4522
4522
  FieldsUtils.LABEL_MERGE_FUNCTION(f, result[field.id]);
4523
4523
  }
4524
4524
  });
@@ -4542,7 +4542,7 @@ class FieldsUtils {
4542
4542
  case 'Complex': {
4543
4543
  if (field.field_type.collection_field_type.complex_fields) {
4544
4544
  field.field_type.collection_field_type.complex_fields.forEach((f) => {
4545
- if (['Collection', 'Complex', 'MultiSelectList'].includes(f.field_type.type)) {
4545
+ if (['Collection', 'Complex', 'MultiSelectList'].indexOf(f.field_type.type) > -1) {
4546
4546
  FieldsUtils.LABEL_MERGE_FUNCTION(f, elem.value);
4547
4547
  }
4548
4548
  });
@@ -4591,7 +4591,7 @@ class FieldsUtils {
4591
4591
  if (caseFieldType.type === FieldsUtils.SERVER_RESPONSE_FIELD_TYPE_COMPLEX) {
4592
4592
  caseFieldType.complex_fields.forEach(field => {
4593
4593
  try {
4594
- const isDynamicField = FieldsUtils.SERVER_RESPONSE_FIELD_TYPE_DYNAMIC_LIST_TYPE.includes(field.field_type.type);
4594
+ const isDynamicField = FieldsUtils.SERVER_RESPONSE_FIELD_TYPE_DYNAMIC_LIST_TYPE.indexOf(field.field_type.type) !== -1;
4595
4595
  if (isDynamicField) {
4596
4596
  const dynamicListValue = this.getDynamicListValue(rootCaseField.value, field.id);
4597
4597
  if (dynamicListValue) {
@@ -5930,7 +5930,7 @@ class ConditionParser {
5930
5930
  }
5931
5931
  const validJoinComparators = ['AND', 'OR'];
5932
5932
  return conditions.reduce((accumulator, condition, index) => {
5933
- const isJoinComparator = (comparator) => (typeof comparator === 'string' && validJoinComparators.includes(comparator));
5933
+ const isJoinComparator = (comparator) => (typeof comparator === 'string' && validJoinComparators.indexOf(comparator) !== -1);
5934
5934
  if (isJoinComparator(condition)) {
5935
5935
  return accumulator;
5936
5936
  }
@@ -5984,9 +5984,9 @@ class ConditionParser {
5984
5984
  }
5985
5985
  static getField(condition) {
5986
5986
  let separator = ShowCondition.CONTAINS;
5987
- if (!condition.includes(ShowCondition.CONTAINS)) {
5987
+ if (condition.indexOf(ShowCondition.CONTAINS) < 0) {
5988
5988
  separator = ShowCondition.CONDITION_EQUALS;
5989
- if (condition.includes(ShowCondition.CONDITION_NOT_EQUALS)) {
5989
+ if (condition.indexOf(ShowCondition.CONDITION_NOT_EQUALS) > -1) {
5990
5990
  separator = ShowCondition.CONDITION_NOT_EQUALS;
5991
5991
  }
5992
5992
  }
@@ -6051,11 +6051,13 @@ class ConditionParser {
6051
6051
  if (tail.length === 0) {
6052
6052
  return this.getValue(fields, head);
6053
6053
  }
6054
- else if (FieldsUtils.isArray(fields[head])) {
6055
- return this.findValueForComplexConditionInArray(fields, head, tail, path);
6056
- }
6057
6054
  else {
6058
- return this.findValueForComplexConditionForPathIfAny(fields, head, tail, path);
6055
+ if (FieldsUtils.isArray(fields[head])) {
6056
+ return this.findValueForComplexConditionInArray(fields, head, tail, path);
6057
+ }
6058
+ else {
6059
+ return this.findValueForComplexConditionForPathIfAny(fields, head, tail, path);
6060
+ }
6059
6061
  }
6060
6062
  }
6061
6063
  static findValueForComplexConditionForPathIfAny(fields, head, tail, path) {
@@ -6092,7 +6094,7 @@ class ConditionParser {
6092
6094
  }
6093
6095
  }
6094
6096
  static removeStarChar(str) {
6095
- if (str && str.includes('*')) {
6097
+ if (str && str.indexOf('*') > -1) {
6096
6098
  return str.substring(0, str.indexOf('*'));
6097
6099
  }
6098
6100
  return str;
@@ -6131,14 +6133,16 @@ class ShowCondition {
6131
6133
  let finalCondition = originalCondition;
6132
6134
  if (Array.isArray(formula)) {
6133
6135
  formula.forEach(condition => {
6134
- if (typeof condition === 'string' && this.validJoinComparators.includes(condition)) {
6136
+ if (typeof condition === 'string' && this.validJoinComparators.indexOf(condition) !== -1) {
6135
6137
  // do nothing
6136
6138
  }
6137
- else if (Array.isArray(condition)) {
6138
- finalCondition = this.processAddPathPrefixToCondition(condition, pathPrefix, finalCondition);
6139
- }
6140
6139
  else {
6141
- finalCondition = this.extractConditions(condition, pathPrefix, finalCondition);
6140
+ if (Array.isArray(condition)) {
6141
+ finalCondition = this.processAddPathPrefixToCondition(condition, pathPrefix, finalCondition);
6142
+ }
6143
+ else {
6144
+ finalCondition = this.extractConditions(condition, pathPrefix, finalCondition);
6145
+ }
6142
6146
  }
6143
6147
  });
6144
6148
  }
@@ -6151,14 +6155,16 @@ class ShowCondition {
6151
6155
  if (condition.fieldReference.startsWith(pathPrefix)) {
6152
6156
  return originalCondition;
6153
6157
  }
6154
- else if (originalCondition.includes(condition.fieldReference)) {
6155
- if (this.processedList && !this.processedList.includes(condition.fieldReference)) {
6156
- this.processedList.push(condition.fieldReference);
6157
- const regularExp = new RegExp(`(\\b)${condition.fieldReference}(?=[^"]*(?:"[^"]*"[^"]*)*$)(\\b)`, 'g');
6158
- return originalCondition.replace(regularExp, `${pathPrefix}.${condition.fieldReference}`);
6159
- }
6160
- else {
6161
- return originalCondition;
6158
+ else {
6159
+ if (originalCondition.indexOf(condition.fieldReference) > -1) {
6160
+ if (this.processedList && this.processedList.indexOf(condition.fieldReference) === -1) {
6161
+ this.processedList.push(condition.fieldReference);
6162
+ const regularExp = new RegExp(`(\\b)${condition.fieldReference}(?=[^"]*(?:"[^"]*"[^"]*)*$)(\\b)`, 'g');
6163
+ return originalCondition.replace(regularExp, `${pathPrefix}.${condition.fieldReference}`);
6164
+ }
6165
+ else {
6166
+ return originalCondition;
6167
+ }
6162
6168
  }
6163
6169
  }
6164
6170
  }
@@ -6173,9 +6179,9 @@ class ShowCondition {
6173
6179
  }
6174
6180
  static getField(condition) {
6175
6181
  let separator = ShowCondition.CONTAINS;
6176
- if (!condition.includes(ShowCondition.CONTAINS)) {
6182
+ if (condition.indexOf(ShowCondition.CONTAINS) < 0) {
6177
6183
  separator = ShowCondition.CONDITION_EQUALS;
6178
- if (condition.includes(ShowCondition.CONDITION_NOT_EQUALS)) {
6184
+ if (condition.indexOf(ShowCondition.CONDITION_NOT_EQUALS) > -1) {
6179
6185
  separator = ShowCondition.CONDITION_NOT_EQUALS;
6180
6186
  }
6181
6187
  }
@@ -6187,7 +6193,7 @@ class ShowCondition {
6187
6193
  const newFormula = typeof formula === 'string' ? JSON.parse(formula) : formula;
6188
6194
  if (Array.isArray(newFormula)) {
6189
6195
  newFormula.forEach(condition => {
6190
- if (!(typeof condition === 'string' && this.validJoinComparators.includes(condition))) {
6196
+ if (!(typeof condition === 'string' && this.validJoinComparators.indexOf(condition) !== -1)) {
6191
6197
  if (Array.isArray(condition)) {
6192
6198
  conditionList.push(ShowCondition.getConditions(condition).toString());
6193
6199
  }
@@ -6226,7 +6232,7 @@ class ShowCondition {
6226
6232
  if (caseField) {
6227
6233
  // Jump out if this is HIDDEN or READONLY, regardless of whether or not it's
6228
6234
  // complex or a collection - nested fields will "inherit" the display_context.
6229
- if (['HIDDEN', 'READONLY'].includes(caseField.display_context)) {
6235
+ if (['HIDDEN', 'READONLY'].indexOf(caseField.display_context) > -1) {
6230
6236
  break;
6231
6237
  }
6232
6238
  // Consider what type of field this is.
@@ -6247,7 +6253,7 @@ class ShowCondition {
6247
6253
  }
6248
6254
  }
6249
6255
  if (caseField) {
6250
- allUnchangeable = allUnchangeable && ['HIDDEN', 'READONLY'].includes(caseField.display_context);
6256
+ allUnchangeable = allUnchangeable && ['HIDDEN', 'READONLY'].indexOf(caseField.display_context) > -1;
6251
6257
  }
6252
6258
  }
6253
6259
  return allUnchangeable;
@@ -6513,8 +6519,8 @@ class AbstractFormFieldComponent {
6513
6519
  return this.addControlToFormGroup(control, parent, replace);
6514
6520
  }
6515
6521
  addControlToFormArray(control, parent, replace) {
6516
- const index = Number.parseInt(this.caseField.id, 10);
6517
- if (replace && !Number.isNaN(index)) {
6522
+ const index = parseInt(this.caseField.id, 10);
6523
+ if (replace && !isNaN(index)) {
6518
6524
  parent.setControl(index, control);
6519
6525
  }
6520
6526
  else {
@@ -6822,7 +6828,7 @@ class FieldsPurger {
6822
6828
  retainHiddenValueByFieldType(field, form) {
6823
6829
  // so far only applies to the new field type OrganisationPolicy which needs to retain the default case role value
6824
6830
  // for other case fields there should be no side effects
6825
- if (field?.field_type?.id === 'OrganisationPolicy') {
6831
+ if (field && field.field_type && field.field_type.id === 'OrganisationPolicy') {
6826
6832
  // <bubble_wrap>
6827
6833
  // Doing some null checking to stop it from falling over.
6828
6834
  const data = form.get('data');
@@ -7167,13 +7173,13 @@ class FieldTypeSanitiser {
7167
7173
  });
7168
7174
  }
7169
7175
  isDynamicList(fieldType) {
7170
- return FieldTypeSanitiser.DYNAMIC_LIST_TYPE.includes(fieldType);
7176
+ return FieldTypeSanitiser.DYNAMIC_LIST_TYPE.indexOf(fieldType) !== -1;
7171
7177
  }
7172
7178
  convertArrayToDynamicListOutput(field, data) {
7173
7179
  const values = data[field.id];
7174
7180
  if (Array.isArray(values)) {
7175
7181
  const listItems = this.getListItems(field);
7176
- const matches = listItems.filter(item => values.map(v => v.code).includes(item.code));
7182
+ const matches = listItems.filter(item => values.map(v => v.code).indexOf(item.code) !== -1);
7177
7183
  data[field.id] = {
7178
7184
  value: matches,
7179
7185
  list_items: listItems
@@ -7198,7 +7204,7 @@ class FieldTypeSanitiser {
7198
7204
  if (field.list_items) {
7199
7205
  return field.list_items;
7200
7206
  }
7201
- if (field.formatted_value?.list_items) {
7207
+ if (field.formatted_value && field.formatted_value.list_items) {
7202
7208
  return field.formatted_value.list_items;
7203
7209
  }
7204
7210
  }
@@ -7316,7 +7322,7 @@ class FormValueService {
7316
7322
  filterCurrentPageFields(caseFields, editForm) {
7317
7323
  const cloneForm = {
7318
7324
  ...(editForm || {}),
7319
- data: { ...(editForm?.data || {}) }
7325
+ data: { ...((editForm && editForm.data) || {}) }
7320
7326
  };
7321
7327
  Object.keys(cloneForm.data).forEach((key) => {
7322
7328
  if (caseFields.findIndex((element) => element.id === key) < 0) {
@@ -7337,7 +7343,7 @@ class FormValueService {
7337
7343
  for (const key in rawObject) {
7338
7344
  // If the key is one of documentFieldKeys, it means the field is of Document type. If the value of any of these
7339
7345
  // properties is null, the entire sanitised object to be returned should be null
7340
- if (documentFieldKeys.includes(key) && rawObject[key] === null) {
7346
+ if (documentFieldKeys.indexOf(key) > -1 && rawObject[key] === null) {
7341
7347
  sanitisedObject = null;
7342
7348
  break;
7343
7349
  }
@@ -7365,7 +7371,7 @@ class FormValueService {
7365
7371
  return rawArray;
7366
7372
  }
7367
7373
  rawArray.forEach((item) => {
7368
- if (item?.hasOwnProperty('value')) {
7374
+ if (item && item.hasOwnProperty('value')) {
7369
7375
  item.value = this.sanitiseValue(item.value, isCaseFlagJourney);
7370
7376
  }
7371
7377
  });
@@ -7393,14 +7399,14 @@ class FormValueService {
7393
7399
  }
7394
7400
  clearNonCaseFields(data, caseFields) {
7395
7401
  for (const dataKey in data) {
7396
- if (!caseFields.some((cf) => cf.id === dataKey)) {
7402
+ if (!caseFields.find((cf) => cf.id === dataKey)) {
7397
7403
  delete data[dataKey];
7398
7404
  }
7399
7405
  }
7400
7406
  }
7401
7407
  // TODO refactor so that this and remove unnecessary fields have a common iterator that applies functions to each node visited
7402
7408
  removeNullLabels(data, caseFields) {
7403
- if (data && caseFields?.length > 0) {
7409
+ if (data && caseFields && caseFields.length > 0) {
7404
7410
  // check if there is any data at the top level of the form that's not in the caseFields
7405
7411
  for (const field of caseFields) {
7406
7412
  if (field.field_type) {
@@ -7440,7 +7446,7 @@ class FormValueService {
7440
7446
  }
7441
7447
  // TODO refactor so that this and remove unnecessary fields have a common iterator that applies functions to each node visited
7442
7448
  removeEmptyDocuments(data, caseFields) {
7443
- if (data && caseFields?.length > 0) {
7449
+ if (data && caseFields && caseFields.length > 0) {
7444
7450
  // check if there is any data at the top level of the form that's not in the caseFields
7445
7451
  for (const field of caseFields) {
7446
7452
  if (field.field_type) {
@@ -7489,7 +7495,7 @@ class FormValueService {
7489
7495
  * @param clearNonCase Whether or not we should clear out non-case fields at the top level.
7490
7496
  */
7491
7497
  removeUnnecessaryFields(data, caseFields, clearEmpty = false, clearNonCase = false, fromPreviousPage = false, currentPageCaseFields = []) {
7492
- if (data && caseFields?.length > 0) {
7498
+ if (data && caseFields && caseFields.length > 0) {
7493
7499
  // check if there is any data at the top level of the form that's not in the caseFields
7494
7500
  if (clearNonCase) {
7495
7501
  this.clearNonCaseFields(data, caseFields);
@@ -7557,7 +7563,7 @@ class FormValueService {
7557
7563
  removeInvalidCollectionData(data, field) {
7558
7564
  if (data[field.id] && data[field.id].length > 0) {
7559
7565
  for (const objCollection of data[field.id]) {
7560
- if (Object.keys(objCollection).length === 1 && Object.keys(objCollection).includes('id')) {
7566
+ if (Object.keys(objCollection).length === 1 && Object.keys(objCollection).indexOf('id') > -1) {
7561
7567
  data[field.id] = [];
7562
7568
  }
7563
7569
  }
@@ -7571,7 +7577,7 @@ class FormValueService {
7571
7577
  * @param caseFields The list of underlying {@link CaseField} domain model objects for each field
7572
7578
  */
7573
7579
  removeEmptyCollectionsWithMinValidation(data, caseFields) {
7574
- if (data && caseFields?.length > 0) {
7580
+ if (data && caseFields && caseFields.length > 0) {
7575
7581
  for (const field of caseFields) {
7576
7582
  if (field.field_type.type === 'Collection' && typeof field.field_type.min === 'number' && field.field_type.min > 0 &&
7577
7583
  data[field.id] && Array.isArray(data[field.id]) && data[field.id].length === 0) {
@@ -7590,7 +7596,7 @@ class FormValueService {
7590
7596
  * @param types An array of one or more field types
7591
7597
  */
7592
7598
  removeCaseFieldsOfType(data, caseFields, types) {
7593
- if (data && caseFields?.length > 0 && types.length > 0) {
7599
+ if (data && caseFields && caseFields.length > 0 && types.length > 0) {
7594
7600
  const caseFieldsToRemove = caseFields.filter((caseField) => FieldsUtils.isCaseFieldOfType(caseField, types));
7595
7601
  for (const caseField of caseFieldsToRemove) {
7596
7602
  delete data[caseField.id];
@@ -7609,7 +7615,7 @@ class FormValueService {
7609
7615
  * @param caseFields The list of underlying {@link CaseField} domain model objects for each field
7610
7616
  */
7611
7617
  repopulateFormDataFromCaseFieldValues(data, caseFields) {
7612
- if (data && caseFields?.length > 0 &&
7618
+ if (data && caseFields && caseFields.length > 0 &&
7613
7619
  caseFields.findIndex((caseField) => FieldsUtils.isCaseFieldOfType(caseField, ['FlagLauncher'])) > -1) {
7614
7620
  // Ignore the FlagLauncher CaseField because it does not hold any values
7615
7621
  caseFields.filter((caseField) => !FieldsUtils.isCaseFieldOfType(caseField, ['FlagLauncher']))
@@ -7644,7 +7650,7 @@ class FormValueService {
7644
7650
  * @param caseFields The list of underlying {@link CaseField} domain model objects for each field
7645
7651
  */
7646
7652
  populateLinkedCasesDetailsFromCaseFields(data, caseFields) {
7647
- if (data && caseFields?.length > 0) {
7653
+ if (data && caseFields && caseFields.length > 0) {
7648
7654
  caseFields.filter((caseField) => !FieldsUtils.isCaseFieldOfType(caseField, ['ComponentLauncher']))
7649
7655
  .forEach((caseField) => {
7650
7656
  if (data.hasOwnProperty('caseLinks') && caseField.value) {
@@ -8018,7 +8024,7 @@ class LabelSubstitutorDirective {
8018
8024
  }
8019
8025
  }
8020
8026
  shouldSubstitute(element) {
8021
- return this.elementsToSubstitute.some(e => e === element);
8027
+ return this.elementsToSubstitute.find(e => e === element) !== undefined;
8022
8028
  }
8023
8029
  getReadOnlyAndFormFields() {
8024
8030
  const formFields = this.getFormFieldsValuesIncludingDisabled();
@@ -8681,16 +8687,16 @@ class DocumentManagementService {
8681
8687
  }
8682
8688
  }
8683
8689
  isImage(imageType) {
8684
- return DocumentManagementService.imagesList.some(e => e === imageType);
8690
+ return DocumentManagementService.imagesList.find(e => e === imageType) !== undefined;
8685
8691
  }
8686
8692
  isWord(wordType) {
8687
- return DocumentManagementService.wordList.some(e => e === wordType);
8693
+ return DocumentManagementService.wordList.find(e => e === wordType) !== undefined;
8688
8694
  }
8689
8695
  isExcel(excelType) {
8690
- return DocumentManagementService.excelList.some(e => e === excelType);
8696
+ return DocumentManagementService.excelList.find(e => e === excelType) !== undefined;
8691
8697
  }
8692
8698
  isPowerpoint(powerpointType) {
8693
- return DocumentManagementService.powerpointList.some(e => e === powerpointType);
8699
+ return DocumentManagementService.powerpointList.find(e => e === powerpointType) !== undefined;
8694
8700
  }
8695
8701
  parseCaseInfo(caseInfo) {
8696
8702
  if (!caseInfo) {
@@ -9282,7 +9288,7 @@ class SearchService {
9282
9288
  class RouterHelperService {
9283
9289
  getUrlSegmentsFromRoot(route) {
9284
9290
  return route.pathFromRoot
9285
- .filter(r => r.url?.length)
9291
+ .filter(r => r.url && r.url.length)
9286
9292
  .reduce((acc, r) => {
9287
9293
  r.url.forEach(url => {
9288
9294
  acc.push(url.path);
@@ -9699,11 +9705,11 @@ class OrganisationService {
9699
9705
 
9700
9706
  class BrowserService {
9701
9707
  isFirefox() {
9702
- return window.navigator.userAgent.includes('Firefox');
9708
+ return window.navigator.userAgent.indexOf('Firefox') > -1;
9703
9709
  }
9704
9710
  isSafari() {
9705
- const isSafariAgent = window.navigator.userAgent.includes('Safari');
9706
- const isChromeAgent = window.navigator.userAgent.includes('Chrome');
9711
+ const isSafariAgent = window.navigator.userAgent.indexOf('Safari') > -1;
9712
+ const isChromeAgent = window.navigator.userAgent.indexOf('Chrome') > -1;
9707
9713
  if ((isChromeAgent) && (isSafariAgent)) {
9708
9714
  return false;
9709
9715
  }
@@ -10121,7 +10127,7 @@ class CaseEditWizardGuard {
10121
10127
  }
10122
10128
  processEventTrigger(route, eventTrigger) {
10123
10129
  if (!eventTrigger.hasFields() || !eventTrigger.hasPages()) {
10124
- void this.goToSubmit(route);
10130
+ this.goToSubmit(route);
10125
10131
  return Promise.resolve(false);
10126
10132
  }
10127
10133
  const wizard = this.wizardFactory.create(eventTrigger);
@@ -10131,17 +10137,15 @@ class CaseEditWizardGuard {
10131
10137
  return ShowCondition.getInstance(page.show_condition).match(currentState);
10132
10138
  };
10133
10139
  if (!route.params['page']) {
10134
- void this.goToFirst(wizard, canShowPredicate, route);
10140
+ this.goToFirst(wizard, canShowPredicate, route);
10135
10141
  return Promise.resolve(false);
10136
10142
  }
10137
10143
  const pageId = route.params['page'];
10138
10144
  if (!wizard.hasPage(pageId)) {
10139
- void this.goToFirst(wizard, canShowPredicate, route)
10145
+ this.goToFirst(wizard, canShowPredicate, route)
10140
10146
  .then(() => {
10141
10147
  const replacements = { PAGEID: pageId };
10142
10148
  this.alertService.error({ phrase: 'No page could be found for %PAGEID%', replacements });
10143
- }, () => {
10144
- this.alertService.error({ phrase: 'Unable to navigate to the first page' });
10145
10149
  });
10146
10150
  return Promise.resolve(false);
10147
10151
  }
@@ -10525,7 +10529,7 @@ class PageValidationService {
10525
10529
  isHidden(caseField, editForm, path) {
10526
10530
  const formFields = editForm.getRawValue();
10527
10531
  const condition = ShowCondition.getInstance(caseField.show_condition);
10528
- if (path && !path.includes(`_${caseField.id}_`)) {
10532
+ if (path && path.indexOf(`_${caseField.id}_`) === -1) {
10529
10533
  path = `${path}${caseField.id}`;
10530
10534
  }
10531
10535
  return !condition.match(formFields.data, path);
@@ -10628,7 +10632,7 @@ class WorkAllocationService {
10628
10632
  return false;
10629
10633
  }
10630
10634
  this.features.configurations.forEach(serviceConfig => {
10631
- if (serviceConfig.serviceName === jurisdiction && serviceConfig.caseTypes.includes(caseType)) {
10635
+ if (serviceConfig.serviceName === jurisdiction && (serviceConfig.caseTypes.indexOf(caseType) !== -1)) {
10632
10636
  enabled = true;
10633
10637
  }
10634
10638
  });
@@ -10732,7 +10736,7 @@ class WorkAllocationService {
10732
10736
  return this.searchTasks(taskSearchParameter)
10733
10737
  .pipe(map((response) => {
10734
10738
  const tasks = response.tasks;
10735
- if (tasks?.length > 0) {
10739
+ if (tasks && tasks.length > 0) {
10736
10740
  if (tasks.length === 1) {
10737
10741
  this.completeTask(tasks[0].id, eventId).subscribe();
10738
10742
  }
@@ -10929,7 +10933,7 @@ class CaseEditComponent {
10929
10933
  if (this.isPageRefreshed && this.initialUrl) {
10930
10934
  this.sessionStorageService.removeItem('eventUrl');
10931
10935
  this.isRefreshModalVisible = true;
10932
- void this.router.navigate([this.initialUrl], { relativeTo: this.route });
10936
+ this.router.navigate([this.initialUrl], { relativeTo: this.route });
10933
10937
  return true;
10934
10938
  }
10935
10939
  // if the url contains /submit there is the potential that the user has gone straight to the submit page
@@ -10940,7 +10944,7 @@ class CaseEditComponent {
10940
10944
  if (this.eventTrigger.wizard_pages && this.eventTrigger.wizard_pages.length > 0) {
10941
10945
  const firstPage = this.eventTrigger.wizard_pages.reduce((min, page) => page.order < min.order ? page : min, this.eventTrigger.wizard_pages[0]);
10942
10946
  this.isRefreshModalVisible = true;
10943
- void this.router.navigate([firstPage ? firstPage.id : 'submit'], { relativeTo: this.route });
10947
+ this.router.navigate([firstPage ? firstPage.id : 'submit'], { relativeTo: this.route });
10944
10948
  }
10945
10949
  }
10946
10950
  return false;
@@ -11189,11 +11193,13 @@ class CaseEditComponent {
11189
11193
  // Use the CaseField's existing *formatted_value* from the parent, if available. (This is necessary for
11190
11194
  // Complex fields, whose sub-fields do not hold any values in the model.) Otherwise, use formatted_value
11191
11195
  // from the CaseField itself.
11192
- if (parentField?.formatted_value) {
11196
+ if (parentField && parentField.formatted_value) {
11193
11197
  rawFormValueData[key] = parentField.formatted_value[caseField.id];
11194
11198
  }
11195
- else if (!(caseField.hidden && caseField.retain_hidden_value)) {
11196
- rawFormValueData[key] = caseField.formatted_value;
11199
+ else {
11200
+ if (!(caseField.hidden && caseField.retain_hidden_value)) {
11201
+ rawFormValueData[key] = caseField.formatted_value;
11202
+ }
11197
11203
  }
11198
11204
  }
11199
11205
  handleComplexField(caseField, formGroup, key, rawFormValueData) {
@@ -11308,27 +11314,31 @@ class CaseEditComponent {
11308
11314
  if (this.taskIsForEvent(taskInSessionStorage, eventDetails)) {
11309
11315
  return true;
11310
11316
  }
11311
- // client context still needed for language
11312
- removeTaskFromClientContext(this.sessionStorageService);
11313
- return false;
11317
+ else {
11318
+ // client context still needed for language
11319
+ removeTaskFromClientContext(this.sessionStorageService);
11320
+ return false;
11321
+ }
11314
11322
  }
11315
- if (taskEventCompletionInfo.taskId !== taskInSessionStorage.id) {
11323
+ else {
11324
+ if (taskEventCompletionInfo.taskId !== taskInSessionStorage.id) {
11325
+ return true;
11326
+ }
11327
+ else if ((taskEventCompletionInfo.taskId === taskInSessionStorage.id &&
11328
+ this.eventDetailsDoNotMatch(taskEventCompletionInfo, eventDetails))
11329
+ || this.eventMoreThanDayAgo(taskEventCompletionInfo.createdTimestamp)) {
11330
+ // if the session storage not related to event, ignore it and remove
11331
+ removeTaskFromClientContext(this.sessionStorageService);
11332
+ this.sessionStorageService.removeItem(CaseEditComponent.TASK_EVENT_COMPLETION_INFO);
11333
+ return false;
11334
+ }
11335
+ if (eventDetails.assignNeeded === 'false' && eventDetails.userId !== taskInSessionStorage.assignee) {
11336
+ // if the user does not match task assignee, assign is now needed
11337
+ // data cannot be deleted and ignored as it matches understanding
11338
+ this.sessionStorageService.setItem('assignNeeded', 'true');
11339
+ }
11316
11340
  return true;
11317
11341
  }
11318
- else if ((taskEventCompletionInfo.taskId === taskInSessionStorage.id &&
11319
- this.eventDetailsDoNotMatch(taskEventCompletionInfo, eventDetails))
11320
- || this.eventMoreThanDayAgo(taskEventCompletionInfo.createdTimestamp)) {
11321
- // if the session storage not related to event, ignore it and remove
11322
- removeTaskFromClientContext(this.sessionStorageService);
11323
- this.sessionStorageService.removeItem(CaseEditComponent.TASK_EVENT_COMPLETION_INFO);
11324
- return false;
11325
- }
11326
- if (eventDetails.assignNeeded === 'false' && eventDetails.userId !== taskInSessionStorage.assignee) {
11327
- // if the user does not match task assignee, assign is now needed
11328
- // data cannot be deleted and ignored as it matches understanding
11329
- this.sessionStorageService.setItem('assignNeeded', 'true');
11330
- }
11331
- return true;
11332
11342
  }
11333
11343
  onEventCanBeCompleted({ eventTrigger, eventCanBeCompleted, caseDetails, form, submit }) {
11334
11344
  if (eventCanBeCompleted) {
@@ -11338,7 +11348,7 @@ class CaseEditComponent {
11338
11348
  }
11339
11349
  else {
11340
11350
  // Navigate to tasks tab on case details page
11341
- void this.router.navigate([`/cases/case-details/${this.caseDetails.case_type.jurisdiction.id}/${this.caseDetails.case_type.id}/${this.getCaseId(caseDetails)}`], { fragment: 'Tasks' });
11351
+ this.router.navigate([`/cases/case-details/${this.caseDetails.case_type.jurisdiction.id}/${this.caseDetails.case_type.id}/${this.getCaseId(caseDetails)}`], { fragment: 'Tasks' });
11342
11352
  }
11343
11353
  }
11344
11354
  getStatus(response) {
@@ -11509,7 +11519,7 @@ class CasesService {
11509
11519
  let http$ = this.http.get(url, { headers, observe: 'body' });
11510
11520
  const artificialDelay = this.appConfig.getTimeoutsCaseRetrievalArtificialDelay();
11511
11521
  const timeoutPeriods = this.appConfig.getTimeoutsForCaseRetrieval();
11512
- if (timeoutPeriods?.length > 0 && timeoutPeriods[0] > 0) {
11522
+ if (timeoutPeriods && timeoutPeriods.length > 0 && timeoutPeriods[0] > 0) {
11513
11523
  http$ = this.retryUtil.pipeTimeoutMechanismOn(http$, artificialDelay, timeoutPeriods);
11514
11524
  }
11515
11525
  else {
@@ -12359,7 +12369,7 @@ class LinkedCasesService {
12359
12369
  caseService: item.service,
12360
12370
  caseType: item.caseType,
12361
12371
  unlink: false,
12362
- reasons: item.reasons?.map(reason => {
12372
+ reasons: item.reasons && item.reasons.map(reason => {
12363
12373
  return {
12364
12374
  Reason: reason
12365
12375
  };
@@ -12382,15 +12392,15 @@ class LinkedCasesService {
12382
12392
  const state = selectedCaseType && selectedCaseType.states.find(item => item.id === fieldValue);
12383
12393
  switch (fieldName) {
12384
12394
  case 'JURISDICTION':
12385
- return selectedJurisdiction?.description;
12395
+ return selectedJurisdiction && selectedJurisdiction.description;
12386
12396
  case 'CASE_TYPE':
12387
- return selectedCaseType?.name;
12397
+ return selectedCaseType && selectedCaseType.name;
12388
12398
  case 'CASE_TYPE_DESCRIPTION':
12389
- return selectedCaseType?.description;
12399
+ return selectedCaseType && selectedCaseType.description;
12390
12400
  case 'STATE':
12391
- return state?.name || fieldValue;
12401
+ return state && state.name || fieldValue;
12392
12402
  case 'STATE_DESCRIPTION':
12393
- return state?.description || fieldValue;
12403
+ return state && state.description || fieldValue;
12394
12404
  default:
12395
12405
  break;
12396
12406
  }
@@ -12731,11 +12741,13 @@ class CaseEditPageComponent {
12731
12741
  if (page) {
12732
12742
  this.currentPage = page;
12733
12743
  }
12734
- else if (this.currentPage) {
12735
- return this.next();
12736
- }
12737
12744
  else {
12738
- return this.first();
12745
+ if (this.currentPage) {
12746
+ return this.next();
12747
+ }
12748
+ else {
12749
+ return this.first();
12750
+ }
12739
12751
  }
12740
12752
  this.hasPreviousPage$.next(this.caseEdit.hasPrevious(this.currentPage?.id));
12741
12753
  }
@@ -12828,7 +12840,7 @@ class CaseEditPageComponent {
12828
12840
  const label = this.getInterpolatedFieldLabel(casefield);
12829
12841
  let id = casefield.id;
12830
12842
  if (fieldElement['component'] && (fieldElement['component'].parent || sourceFromComplexField)) {
12831
- if (!fieldElement['component'].idPrefix.includes(`_${id}_`)) {
12843
+ if (fieldElement['component'].idPrefix.indexOf(`_${id}_`) === -1) {
12832
12844
  id = `${fieldElement['component'].idPrefix}${id}`;
12833
12845
  }
12834
12846
  else {
@@ -13954,13 +13966,13 @@ class FieldsFilterPipe {
13954
13966
  values = values || {};
13955
13967
  const type = field.field_type;
13956
13968
  const value = FieldsFilterPipe.getValue(field, values);
13957
- const hasChildrenWithValue = type.complex_fields.some(f => {
13969
+ const hasChildrenWithValue = type.complex_fields.find(f => {
13958
13970
  return FieldsFilterPipe.keepField(f, value);
13959
13971
  });
13960
- return hasChildrenWithValue;
13972
+ return !!hasChildrenWithValue;
13961
13973
  }
13962
13974
  static isEmpty(value) {
13963
- return FieldsFilterPipe.EMPTY_VALUES.includes(value)
13975
+ return FieldsFilterPipe.EMPTY_VALUES.indexOf(value) !== -1
13964
13976
  || value.length === 0;
13965
13977
  }
13966
13978
  static isCompound(field) {
@@ -14156,7 +14168,7 @@ class WriteComplexFieldComponent extends AbstractFieldWriteComponent {
14156
14168
  return (Constants.MANDATORY === caseField.display_context || !this.ignoreMandatory);
14157
14169
  }
14158
14170
  isAddressUK() {
14159
- return ADDRESS_FIELD_TYPES.includes(this.caseField.field_type.id);
14171
+ return ADDRESS_FIELD_TYPES.indexOf(this.caseField.field_type.id) > -1;
14160
14172
  }
14161
14173
  isTopLevelWithinCollection() {
14162
14174
  if (this.parent) {
@@ -14871,7 +14883,7 @@ class CaseFileViewFieldComponent {
14871
14883
  }
14872
14884
  setMediaViewerFile(document) {
14873
14885
  const documentDetails = {
14874
- document_binary_url: document.document_binary_url,
14886
+ document_binary_url: this.withLegacyDocumentAccessContext(this.documentManagementService.getDocumentBinaryUrl(document)),
14875
14887
  document_filename: document.document_filename,
14876
14888
  content_type: document.content_type
14877
14889
  };
@@ -14886,6 +14898,19 @@ class CaseFileViewFieldComponent {
14886
14898
  const mediaViewerInfo = this.documentManagementService.getMediaViewerInfo(documentDetails);
14887
14899
  this.currentDocument = JSON.parse(mediaViewerInfo);
14888
14900
  }
14901
+ withLegacyDocumentAccessContext(documentBinaryUrl) {
14902
+ if (!documentBinaryUrl || !this.caseId) {
14903
+ return documentBinaryUrl;
14904
+ }
14905
+ const [path, query = ''] = documentBinaryUrl.split('?');
14906
+ if (!/^\/documents\/[^/]+\/binary\/?$/.test(path)) {
14907
+ return documentBinaryUrl;
14908
+ }
14909
+ // XUI validates legacy document access against the case before proxying the binary request.
14910
+ const searchParams = new URLSearchParams(query);
14911
+ searchParams.set('caseId', this.caseId);
14912
+ return `${path}?${searchParams.toString()}`;
14913
+ }
14889
14914
  moveDocument(data) {
14890
14915
  const cid = this.route.snapshot.paramMap.get(CaseFileViewFieldComponent.PARAM_CASE_ID);
14891
14916
  const loadingToken = this.loadingService.register();
@@ -15107,7 +15132,7 @@ function ReadCaseFlagFieldComponent_ng_container_1_ng_container_2_Template(rf, c
15107
15132
  i0.ɵɵproperty("ngForOf", ctx_r1.partyLevelCaseFlagData);
15108
15133
  } }
15109
15134
  function ReadCaseFlagFieldComponent_ng_container_1_ng_container_3_div_4_ccd_case_flag_table_1_Template(rf, ctx) { if (rf & 1) {
15110
- i0.ɵɵelement(0, "ccd-case-flag-table", 11);
15135
+ i0.ɵɵelement(0, "ccd-case-flag-table", 10);
15111
15136
  i0.ɵɵpipe(1, "rpxTranslate");
15112
15137
  } if (rf & 2) {
15113
15138
  const flagData_r4 = i0.ɵɵnextContext().$implicit;
@@ -15115,7 +15140,7 @@ function ReadCaseFlagFieldComponent_ng_container_1_ng_container_3_div_4_ccd_case
15115
15140
  } }
15116
15141
  function ReadCaseFlagFieldComponent_ng_container_1_ng_container_3_div_4_Template(rf, ctx) { if (rf & 1) {
15117
15142
  i0.ɵɵelementStart(0, "div");
15118
- i0.ɵɵtemplate(1, ReadCaseFlagFieldComponent_ng_container_1_ng_container_3_div_4_ccd_case_flag_table_1_Template, 2, 5, "ccd-case-flag-table", 10);
15143
+ i0.ɵɵtemplate(1, ReadCaseFlagFieldComponent_ng_container_1_ng_container_3_div_4_ccd_case_flag_table_1_Template, 2, 5, "ccd-case-flag-table", 9);
15119
15144
  i0.ɵɵelementEnd();
15120
15145
  } if (rf & 2) {
15121
15146
  const flagData_r4 = ctx.$implicit;
@@ -15124,7 +15149,7 @@ function ReadCaseFlagFieldComponent_ng_container_1_ng_container_3_div_4_Template
15124
15149
  } }
15125
15150
  function ReadCaseFlagFieldComponent_ng_container_1_ng_container_3_div_5_Template(rf, ctx) { if (rf & 1) {
15126
15151
  i0.ɵɵelementStart(0, "div");
15127
- i0.ɵɵelement(1, "ccd-case-flag-table", 11);
15152
+ i0.ɵɵelement(1, "ccd-case-flag-table", 10);
15128
15153
  i0.ɵɵpipe(2, "rpxTranslate");
15129
15154
  i0.ɵɵpipe(3, "rpxTranslate");
15130
15155
  i0.ɵɵelementEnd();
@@ -15135,7 +15160,7 @@ function ReadCaseFlagFieldComponent_ng_container_1_ng_container_3_div_5_Template
15135
15160
  } }
15136
15161
  function ReadCaseFlagFieldComponent_ng_container_1_ng_container_3_Template(rf, ctx) { if (rf & 1) {
15137
15162
  i0.ɵɵelementContainerStart(0);
15138
- i0.ɵɵelementStart(1, "h2", 9);
15163
+ i0.ɵɵelementStart(1, "h2", 5);
15139
15164
  i0.ɵɵtext(2);
15140
15165
  i0.ɵɵpipe(3, "rpxTranslate");
15141
15166
  i0.ɵɵelementEnd();
@@ -15304,7 +15329,7 @@ class ReadCaseFlagFieldComponent extends AbstractFieldReadComponent {
15304
15329
  let flagsCaseFieldValue = selectedFlagsLocation.caseField?.value;
15305
15330
  const path = selectedFlagsLocation.pathToFlagsFormGroup;
15306
15331
  // Root-level Flags CaseFields don't have a dot-delimited path - just the CaseField ID itself - so don't drill down
15307
- if (path.includes('.')) {
15332
+ if (path.indexOf('.') > -1) {
15308
15333
  path.slice(path.indexOf('.') + 1).split('.').forEach(part => flagsCaseFieldValue = flagsCaseFieldValue[part]);
15309
15334
  }
15310
15335
  if (flagsCaseFieldValue) {
@@ -15321,7 +15346,7 @@ class ReadCaseFlagFieldComponent extends AbstractFieldReadComponent {
15321
15346
  this.router.navigate([`../${this.caseFlagStateService.pageLocation}`], { relativeTo: this.route });
15322
15347
  }
15323
15348
  static ɵfac = function ReadCaseFlagFieldComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ReadCaseFlagFieldComponent)(i0.ɵɵdirectiveInject(i1$2.ActivatedRoute), i0.ɵɵdirectiveInject(i1$2.Router), i0.ɵɵdirectiveInject(CaseFlagStateService)); };
15324
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ReadCaseFlagFieldComponent, selectors: [["ccd-read-case-flag-field"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 2, vars: 2, consts: [[4, "ngIf"], [3, "changeButtonEmitter", "flagForSummaryDisplay", "displayContextParameter"], [3, "ngSwitch"], [4, "ngSwitchCase"], [4, "ngSwitchDefault"], ["id", "read-external-case-flag-title", 1, "govuk-heading-l"], [4, "ngFor", "ngForOf"], [3, "tableCaption", "flagData", "firstColumnHeader", "caseFlagsExternalUser", 4, "ngIf"], [3, "tableCaption", "flagData", "firstColumnHeader", "caseFlagsExternalUser"], ["id", "read-case-flag-title", 1, "govuk-heading-l"], [3, "tableCaption", "flagData", "firstColumnHeader", 4, "ngIf"], [3, "tableCaption", "flagData", "firstColumnHeader"]], template: function ReadCaseFlagFieldComponent_Template(rf, ctx) { if (rf & 1) {
15349
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ReadCaseFlagFieldComponent, selectors: [["ccd-read-case-flag-field"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 2, vars: 2, consts: [[4, "ngIf"], [3, "changeButtonEmitter", "flagForSummaryDisplay", "displayContextParameter"], [3, "ngSwitch"], [4, "ngSwitchCase"], [4, "ngSwitchDefault"], ["id", "read-case-flag-title", 1, "govuk-heading-l"], [4, "ngFor", "ngForOf"], [3, "tableCaption", "flagData", "firstColumnHeader", "caseFlagsExternalUser", 4, "ngIf"], [3, "tableCaption", "flagData", "firstColumnHeader", "caseFlagsExternalUser"], [3, "tableCaption", "flagData", "firstColumnHeader", 4, "ngIf"], [3, "tableCaption", "flagData", "firstColumnHeader"]], template: function ReadCaseFlagFieldComponent_Template(rf, ctx) { if (rf & 1) {
15325
15350
  i0.ɵɵtemplate(0, ReadCaseFlagFieldComponent_ng_container_0_Template, 2, 2, "ng-container", 0)(1, ReadCaseFlagFieldComponent_ng_container_1_Template, 4, 2, "ng-container", 0);
15326
15351
  } if (rf & 2) {
15327
15352
  i0.ɵɵproperty("ngIf", ctx.context === ctx.paletteContext.CHECK_YOUR_ANSWER);
@@ -15331,7 +15356,7 @@ class ReadCaseFlagFieldComponent extends AbstractFieldReadComponent {
15331
15356
  }
15332
15357
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadCaseFlagFieldComponent, [{
15333
15358
  type: Component,
15334
- args: [{ selector: 'ccd-read-case-flag-field', standalone: false, template: "<ng-container *ngIf=\"context === paletteContext.CHECK_YOUR_ANSWER\">\n <ccd-case-flag-summary-list\n [flagForSummaryDisplay]=\"flagForSummaryDisplay\"\n [displayContextParameter]=\"displayContextParameter\"\n (changeButtonEmitter)=\"navigateBackToForm($event)\">\n </ccd-case-flag-summary-list>\n</ng-container>\n\n<ng-container *ngIf=\"context !== paletteContext.CHECK_YOUR_ANSWER\">\n <ng-container [ngSwitch]=\"displayContextParameter\">\n <ng-container *ngSwitchCase=\"caseFlagDisplayContextParameter.READ_EXTERNAL\">\n <h2 id=\"read-external-case-flag-title\" class=\"govuk-heading-l\">\n {{ 'Support requested' | rpxTranslate }}\n </h2>\n\n <div *ngFor=\"let flagData of partyLevelCaseFlagData\">\n <ccd-case-flag-table *ngIf=\"flagData.flags.partyName\"\n [tableCaption]=\"''\"\n [flagData]=\"flagData\"\n [firstColumnHeader]=\"flagData.flags.partyName\"\n [caseFlagsExternalUser]=\"caseFlagsExternalUser\"\n ></ccd-case-flag-table>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <h2 id=\"read-case-flag-title\" class=\"govuk-heading-l\">\n {{ 'Case flags' | rpxTranslate }}\n </h2>\n\n <div *ngFor=\"let flagData of partyLevelCaseFlagData\">\n <ccd-case-flag-table *ngIf=\"flagData.flags.partyName\"\n [tableCaption]=\"flagData.flags.partyName\"\n [flagData]=\"flagData\"\n [firstColumnHeader]=\"'Party level flags' | rpxTranslate\"\n ></ccd-case-flag-table>\n </div>\n <div *ngIf=\"caseLevelCaseFlagData\">\n <ccd-case-flag-table\n [tableCaption]=\"'Case level flags' | rpxTranslate\"\n [flagData]=\"caseLevelCaseFlagData\"\n [firstColumnHeader]=\"'Case flags' | rpxTranslate\"\n ></ccd-case-flag-table>\n </div>\n </ng-container>\n </ng-container>\n</ng-container>\n", styles: [".govuk-heading-l{margin-top:30px}\n"] }]
15359
+ args: [{ selector: 'ccd-read-case-flag-field', standalone: false, template: "<ng-container *ngIf=\"context === paletteContext.CHECK_YOUR_ANSWER\">\n <ccd-case-flag-summary-list\n [flagForSummaryDisplay]=\"flagForSummaryDisplay\"\n [displayContextParameter]=\"displayContextParameter\"\n (changeButtonEmitter)=\"navigateBackToForm($event)\">\n </ccd-case-flag-summary-list>\n</ng-container>\n\n<ng-container *ngIf=\"context !== paletteContext.CHECK_YOUR_ANSWER\">\n <ng-container [ngSwitch]=\"displayContextParameter\">\n <ng-container *ngSwitchCase=\"caseFlagDisplayContextParameter.READ_EXTERNAL\">\n <h2 id=\"read-case-flag-title\" class=\"govuk-heading-l\">\n {{ 'Support requested' | rpxTranslate }}\n </h2>\n\n <div *ngFor=\"let flagData of partyLevelCaseFlagData\">\n <ccd-case-flag-table *ngIf=\"flagData.flags.partyName\"\n [tableCaption]=\"''\"\n [flagData]=\"flagData\"\n [firstColumnHeader]=\"flagData.flags.partyName\"\n [caseFlagsExternalUser]=\"caseFlagsExternalUser\"\n ></ccd-case-flag-table>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <h2 id=\"read-case-flag-title\" class=\"govuk-heading-l\">\n {{ 'Case flags' | rpxTranslate }}\n </h2>\n\n <div *ngFor=\"let flagData of partyLevelCaseFlagData\">\n <ccd-case-flag-table *ngIf=\"flagData.flags.partyName\"\n [tableCaption]=\"flagData.flags.partyName\"\n [flagData]=\"flagData\"\n [firstColumnHeader]=\"'Party level flags' | rpxTranslate\"\n ></ccd-case-flag-table>\n </div>\n <div *ngIf=\"caseLevelCaseFlagData\">\n <ccd-case-flag-table\n [tableCaption]=\"'Case level flags' | rpxTranslate\"\n [flagData]=\"caseLevelCaseFlagData\"\n [firstColumnHeader]=\"'Case flags' | rpxTranslate\"\n ></ccd-case-flag-table>\n </div>\n </ng-container>\n </ng-container>\n</ng-container>\n", styles: [".govuk-heading-l{margin-top:30px}\n"] }]
15335
15360
  }], () => [{ type: i1$2.ActivatedRoute }, { type: i1$2.Router }, { type: CaseFlagStateService }], null); })();
15336
15361
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadCaseFlagFieldComponent, { className: "ReadCaseFlagFieldComponent", filePath: "lib/shared/components/palette/case-flag/read-case-flag-field.component.ts", lineNumber: 18 }); })();
15337
15362
 
@@ -15584,7 +15609,7 @@ class WriteCaseFlagFieldComponent extends AbstractFieldWriteJourneyComponent {
15584
15609
  }), true);
15585
15610
  // Get the case type ID from the CaseView object in the snapshot data (required for retrieving the available flag
15586
15611
  // types for a case)
15587
- if (this.route.snapshot.data.case?.case_type) {
15612
+ if (this.route.snapshot.data.case && this.route.snapshot.data.case.case_type) {
15588
15613
  this.caseTypeId = this.route.snapshot.data.case.case_type.id;
15589
15614
  // Get the jurisdiction (required for retrieving the available flag types if unable to determine using case type ID)
15590
15615
  if (this.route.snapshot.data.case.case_type.jurisdiction) {
@@ -15807,7 +15832,7 @@ class WriteCaseFlagFieldComponent extends AbstractFieldWriteJourneyComponent {
15807
15832
  let value = instance.caseField?.value;
15808
15833
  const pathToValue = instance.pathToFlagsFormGroup;
15809
15834
  // Root-level Flags CaseFields don't have a dot-delimited path - just the CaseField ID itself - so don't drill down
15810
- if (pathToValue.includes('.')) {
15835
+ if (pathToValue.indexOf('.') > -1) {
15811
15836
  pathToValue.slice(pathToValue.indexOf('.') + 1).split('.').forEach(part => value = value[part]);
15812
15837
  }
15813
15838
  if (value?.details?.length > 0) {
@@ -15832,7 +15857,7 @@ class WriteCaseFlagFieldComponent extends AbstractFieldWriteJourneyComponent {
15832
15857
  // Use the pathToFlagsFormGroup property from the selected flag location to drill down to the correct part of the
15833
15858
  // CaseField value to apply changes to
15834
15859
  // Root-level Flags CaseFields don't have a dot-delimited path - just the CaseField ID itself - so don't drill down
15835
- if (path.includes('.')) {
15860
+ if (path.indexOf('.') > -1) {
15836
15861
  path.slice(path.indexOf('.') + 1).split('.').forEach(part => flagsCaseFieldValue = flagsCaseFieldValue[part]);
15837
15862
  }
15838
15863
  // If the CaseField for the selected flags location has no value, set it to an empty object so it can be populated
@@ -15934,7 +15959,7 @@ class WriteCaseFlagFieldComponent extends AbstractFieldWriteJourneyComponent {
15934
15959
  let formattedValue = instance.caseField?.formatted_value;
15935
15960
  const pathToValue = instance.pathToFlagsFormGroup;
15936
15961
  // Root-level Flags CaseFields don't have a dot-delimited path - just the CaseField ID itself - so don't drill down
15937
- if (pathToValue.includes('.')) {
15962
+ if (pathToValue.indexOf('.') > -1) {
15938
15963
  pathToValue.slice(pathToValue.indexOf('.') + 1).split('.').forEach(part => {
15939
15964
  value = value[part];
15940
15965
  if (formattedValue && FieldsUtils.isNonEmptyObject(formattedValue)) {
@@ -15965,7 +15990,7 @@ class WriteCaseFlagFieldComponent extends AbstractFieldWriteJourneyComponent {
15965
15990
  // CaseField value to apply changes to
15966
15991
  const path = this.selectedFlag.pathToFlagsFormGroup;
15967
15992
  // Root-level Flags CaseFields don't have a dot-delimited path - just the CaseField ID itself - so don't drill down
15968
- if (path.includes('.')) {
15993
+ if (path.indexOf('.') > -1) {
15969
15994
  path.slice(path.indexOf('.') + 1).split('.').forEach(part => flagsCaseFieldValue = flagsCaseFieldValue[part]);
15970
15995
  }
15971
15996
  if (flagsCaseFieldValue) {
@@ -16174,7 +16199,7 @@ function ReadCaseLinkFieldComponent_a_0_Template(rf, ctx) { if (rf & 1) {
16174
16199
  } }
16175
16200
  class ReadCaseLinkFieldComponent extends AbstractFieldReadComponent {
16176
16201
  hasReference() {
16177
- return this.caseField.value?.CaseReference;
16202
+ return this.caseField.value && this.caseField.value.CaseReference;
16178
16203
  }
16179
16204
  static ɵfac = /*@__PURE__*/ (() => { let ɵReadCaseLinkFieldComponent_BaseFactory; return function ReadCaseLinkFieldComponent_Factory(__ngFactoryType__) { return (ɵReadCaseLinkFieldComponent_BaseFactory || (ɵReadCaseLinkFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ReadCaseLinkFieldComponent)))(__ngFactoryType__ || ReadCaseLinkFieldComponent); }; })();
16180
16205
  static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ReadCaseLinkFieldComponent, selectors: [["ccd-read-case-link-field"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [["target", "_blank", 3, "href", 4, "ngIf"], ["target", "_blank", 3, "href"], [1, "text-16"]], template: function ReadCaseLinkFieldComponent_Template(rf, ctx) { if (rf & 1) {
@@ -16254,8 +16279,10 @@ class WriteCaseLinkFieldComponent extends AbstractFieldWriteComponent {
16254
16279
  }
16255
16280
  return { error: 'Please use a valid 16 Digit Case Reference' };
16256
16281
  }
16257
- else if (control.touched) {
16258
- return { error: 'Please use a valid 16 Digit Case Reference' };
16282
+ else {
16283
+ if (control.touched) {
16284
+ return { error: 'Please use a valid 16 Digit Case Reference' };
16285
+ }
16259
16286
  }
16260
16287
  return null;
16261
16288
  };
@@ -16369,12 +16396,12 @@ class ReadCollectionFieldComponent extends AbstractFieldReadComponent {
16369
16396
  static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ReadCollectionFieldComponent, selectors: [["ccd-read-collection-field"]], inputs: { caseFields: "caseFields" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [["class", "collection-field-table", "aria-label", "collection table", 4, "ngIf"], ["aria-label", "collection table", 1, "collection-field-table"], [3, "ngSwitch"], [4, "ngSwitchCase"], ["id", "hiddenHeader", 2, "display", "none"], [3, "caseField", "context", "caseFields", "topLevelFormGroup"], [4, "ngFor", "ngForOf"], [3, "caseField", "context", "caseFields", "topLevelFormGroup", "idPrefix"]], template: function ReadCollectionFieldComponent_Template(rf, ctx) { if (rf & 1) {
16370
16397
  i0.ɵɵtemplate(0, ReadCollectionFieldComponent_table_0_Template, 4, 3, "table", 0);
16371
16398
  } if (rf & 2) {
16372
- i0.ɵɵproperty("ngIf", ctx.caseField.value == null ? null : ctx.caseField.value.length);
16399
+ i0.ɵɵproperty("ngIf", ctx.caseField.value && ctx.caseField.value.length);
16373
16400
  } }, styles: [".govuk-js-link[_ngcontent-%COMP%]{appearance:none;background:none;border:none;color:#005ea5;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0;text-decoration:underline}.govuk-js-link[_ngcontent-%COMP%]:hover{color:#2b8cc4;text-decoration-thickness:max(3px,.1875rem,.12em)}.govuk-js-link[_ngcontent-%COMP%]:focus{background-color:#ffbf47;color:#000;outline:3px solid transparent;text-decoration:none;box-shadow:0 -2px #ffbf47,0 4px #000}.govuk-js-link[_ngcontent-%COMP%]:visited{color:#4c2c92}.collection-field-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:first-child > td[_ngcontent-%COMP%]{padding-top:0}.collection-field-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child > td[_ngcontent-%COMP%]{border-bottom:none}.collection-field-table[_ngcontent-%COMP%] td.collection-actions[_ngcontent-%COMP%]{width:1px;white-space:nowrap}.error-spacing[_ngcontent-%COMP%]{margin-top:10px}.collection-title[_ngcontent-%COMP%]{height:51px}.float-left[_ngcontent-%COMP%]{float:left;padding-top:8px}.float-right[_ngcontent-%COMP%]{float:right}.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}}@media print{.complex-panel[_ngcontent-%COMP%] .complex-panel-title[_ngcontent-%COMP%]{font-size:14pt}}.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}.collection-indicator[_ngcontent-%COMP%]{border-left:solid 5px #b1b4b6}"] });
16374
16401
  }
16375
16402
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadCollectionFieldComponent, [{
16376
16403
  type: Component,
16377
- args: [{ selector: 'ccd-read-collection-field', standalone: false, template: "<table *ngIf=\"caseField.value?.length\" class=\"collection-field-table\" aria-label=\"collection table\">\n <ng-container [ngSwitch]=\"isDisplayContextParameterAvailable\">\n <tbody *ngSwitchCase=\"true\">\n <tr>\n <th id=\"hiddenHeader\" style=\"display: none;\"></th>\n <td>\n <ccd-field-read\n [caseField]=\"{\n id: caseField.label,\n label: caseField.label,\n field_type: caseField.field_type.collection_field_type,\n display_context_parameter: caseField.display_context_parameter,\n value: caseField.value,\n hidden: caseField.hidden,\n parent: caseField\n }\"\n [context]=\"context\"\n [caseFields]=\"caseFields\"\n [topLevelFormGroup]=\"topLevelFormGroup\">\n </ccd-field-read>\n </td>\n </tr>\n </tbody>\n <tbody *ngSwitchCase=\"false\">\n <tr *ngFor=\"let item of caseField.value; let i = index\">\n <td>\n <ccd-field-read\n [caseField]=\"{\n id: i + '',\n label: caseField.label + ' ' + (i + 1),\n field_type: caseField.field_type.collection_field_type,\n value: item.value,\n hidden: caseField.hidden,\n parent: caseField\n }\"\n [context]=\"context\"\n [caseFields]=\"caseFields\"\n [topLevelFormGroup]=\"topLevelFormGroup\"\n [idPrefix]=\"buildIdPrefix(i)\">\n </ccd-field-read>\n </td>\n </tr>\n </tbody>\n </ng-container>\n</table>\n", styles: [".govuk-js-link{appearance:none;background:none;border:none;color:#005ea5;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0;text-decoration:underline}.govuk-js-link:hover{color:#2b8cc4;text-decoration-thickness:max(3px,.1875rem,.12em)}.govuk-js-link:focus{background-color:#ffbf47;color:#000;outline:3px solid transparent;text-decoration:none;box-shadow:0 -2px #ffbf47,0 4px #000}.govuk-js-link:visited{color:#4c2c92}.collection-field-table tr:first-child>td{padding-top:0}.collection-field-table tr:last-child>td{border-bottom:none}.collection-field-table td.collection-actions{width:1px;white-space:nowrap}.error-spacing{margin-top:10px}.collection-title{height:51px}.float-left{float:left;padding-top:8px}.float-right{float:right}.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}}@media print{.complex-panel .complex-panel-title{font-size:14pt}}.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}.collection-indicator{border-left:solid 5px #b1b4b6}\n"] }]
16404
+ args: [{ selector: 'ccd-read-collection-field', standalone: false, template: "<table *ngIf=\"caseField.value && caseField.value.length \" class=\"collection-field-table\" aria-label=\"collection table\">\n <ng-container [ngSwitch]=\"isDisplayContextParameterAvailable\">\n <tbody *ngSwitchCase=\"true\">\n <tr>\n <th id=\"hiddenHeader\" style=\"display: none;\"></th>\n <td>\n <ccd-field-read\n [caseField]=\"{\n id: caseField.label,\n label: caseField.label,\n field_type: caseField.field_type.collection_field_type,\n display_context_parameter: caseField.display_context_parameter,\n value: caseField.value,\n hidden: caseField.hidden,\n parent: caseField\n }\"\n [context]=\"context\"\n [caseFields]=\"caseFields\"\n [topLevelFormGroup]=\"topLevelFormGroup\">\n </ccd-field-read>\n </td>\n </tr>\n </tbody>\n <tbody *ngSwitchCase=\"false\">\n <tr *ngFor=\"let item of caseField.value; let i = index\">\n <td>\n <ccd-field-read\n [caseField]=\"{\n id: i + '',\n label: caseField.label + ' ' + (i + 1),\n field_type: caseField.field_type.collection_field_type,\n value: item.value,\n hidden: caseField.hidden,\n parent: caseField\n }\"\n [context]=\"context\"\n [caseFields]=\"caseFields\"\n [topLevelFormGroup]=\"topLevelFormGroup\"\n [idPrefix]=\"buildIdPrefix(i)\">\n </ccd-field-read>\n </td>\n </tr>\n </tbody>\n </ng-container>\n</table>\n", styles: [".govuk-js-link{appearance:none;background:none;border:none;color:#005ea5;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0;text-decoration:underline}.govuk-js-link:hover{color:#2b8cc4;text-decoration-thickness:max(3px,.1875rem,.12em)}.govuk-js-link:focus{background-color:#ffbf47;color:#000;outline:3px solid transparent;text-decoration:none;box-shadow:0 -2px #ffbf47,0 4px #000}.govuk-js-link:visited{color:#4c2c92}.collection-field-table tr:first-child>td{padding-top:0}.collection-field-table tr:last-child>td{border-bottom:none}.collection-field-table td.collection-actions{width:1px;white-space:nowrap}.error-spacing{margin-top:10px}.collection-title{height:51px}.float-left{float:left;padding-top:8px}.float-right{float:right}.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}}@media print{.complex-panel .complex-panel-title{font-size:14pt}}.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}.collection-indicator{border-left:solid 5px #b1b4b6}\n"] }]
16378
16405
  }], null, { caseFields: [{
16379
16406
  type: Input
16380
16407
  }] }); })();
@@ -16479,35 +16506,37 @@ function WriteCollectionFieldComponent_h2_6_Template(rf, ctx) { if (rf & 1) {
16479
16506
  } }
16480
16507
  function WriteCollectionFieldComponent_div_7_div_2_Template(rf, ctx) { if (rf & 1) {
16481
16508
  const _r2 = i0.ɵɵgetCurrentView();
16482
- i0.ɵɵelementStart(0, "div", 1, 0)(2, "div", 16)(3, "div", 17)(4, "legend", 18)(5, "h3", 19);
16483
- i0.ɵɵtext(6);
16484
- i0.ɵɵpipe(7, "rpxTranslate");
16485
- i0.ɵɵelementEnd()()();
16486
- i0.ɵɵelementStart(8, "div", 20)(9, "button", 21);
16487
- i0.ɵɵlistener("click", function WriteCollectionFieldComponent_div_7_div_2_Template_button_click_9_listener() { const i_r3 = i0.ɵɵrestoreView(_r2).index; const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.openModal(i_r3)); });
16488
- i0.ɵɵtext(10);
16489
- i0.ɵɵpipe(11, "rpxTranslate");
16509
+ i0.ɵɵelementStart(0, "div", 1, 0)(2, "div", 16)(3, "div", 17)(4, "legend", 18)(5, "label", 19)(6, "h3", 20);
16510
+ i0.ɵɵtext(7);
16511
+ i0.ɵɵpipe(8, "rpxTranslate");
16512
+ i0.ɵɵelementEnd()()()();
16513
+ i0.ɵɵelementStart(9, "div", 21)(10, "button", 22);
16514
+ i0.ɵɵlistener("click", function WriteCollectionFieldComponent_div_7_div_2_Template_button_click_10_listener() { const i_r3 = i0.ɵɵrestoreView(_r2).index; const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.openModal(i_r3)); });
16515
+ i0.ɵɵtext(11);
16516
+ i0.ɵɵpipe(12, "rpxTranslate");
16490
16517
  i0.ɵɵelementEnd()()();
16491
- i0.ɵɵelement(12, "ccd-field-write", 22);
16518
+ i0.ɵɵelement(13, "ccd-field-write", 23);
16492
16519
  i0.ɵɵelementEnd();
16493
16520
  } if (rf & 2) {
16494
16521
  const item_r4 = ctx.$implicit;
16495
16522
  const i_r3 = ctx.index;
16496
16523
  const ctx_r0 = i0.ɵɵnextContext(2);
16497
16524
  i0.ɵɵproperty("id", ctx_r0.buildIdPrefix(i_r3) + i_r3);
16498
- i0.ɵɵadvance(6);
16499
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(7, 14, ctx_r0.itemLabel(i_r3)));
16525
+ i0.ɵɵadvance(5);
16526
+ i0.ɵɵproperty("for", item_r4.prefix + i_r3);
16527
+ i0.ɵɵadvance(2);
16528
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(8, 15, ctx_r0.itemLabel(i_r3)));
16500
16529
  i0.ɵɵadvance(3);
16501
16530
  i0.ɵɵattribute("aria-label", i0.ɵɵinterpolate1("Remove ", ctx_r0.itemLabel(i_r3)));
16502
16531
  i0.ɵɵproperty("disabled", ctx_r0.isNotAuthorisedToDelete(i_r3));
16503
16532
  i0.ɵɵadvance();
16504
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(11, 16, "Remove"));
16533
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(12, 17, "Remove"));
16505
16534
  i0.ɵɵadvance(2);
16506
16535
  i0.ɵɵproperty("caseField", item_r4.caseField)("caseFields", ctx_r0.caseFields)("formGroup", ctx_r0.formGroup)("parent", item_r4.container)("idPrefix", item_r4.prefix)("hidden", item_r4.caseField.hidden)("isExpanded", ctx_r0.isExpanded)("isInSearchBlock", ctx_r0.isInSearchBlock);
16507
16536
  } }
16508
16537
  function WriteCollectionFieldComponent_div_7_Template(rf, ctx) { if (rf & 1) {
16509
16538
  i0.ɵɵelementStart(0, "div", 13)(1, "fieldset", 14);
16510
- i0.ɵɵtemplate(2, WriteCollectionFieldComponent_div_7_div_2_Template, 13, 18, "div", 15);
16539
+ i0.ɵɵtemplate(2, WriteCollectionFieldComponent_div_7_div_2_Template, 14, 19, "div", 15);
16511
16540
  i0.ɵɵelementEnd()();
16512
16541
  } if (rf & 2) {
16513
16542
  const ctx_r0 = i0.ɵɵnextContext();
@@ -16517,7 +16546,7 @@ function WriteCollectionFieldComponent_div_7_Template(rf, ctx) { if (rf & 1) {
16517
16546
  } }
16518
16547
  function WriteCollectionFieldComponent_button_8_Template(rf, ctx) { if (rf & 1) {
16519
16548
  const _r5 = i0.ɵɵgetCurrentView();
16520
- i0.ɵɵelementStart(0, "button", 23);
16549
+ i0.ɵɵelementStart(0, "button", 24);
16521
16550
  i0.ɵɵlistener("click", function WriteCollectionFieldComponent_button_8_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.addItem(false)); });
16522
16551
  i0.ɵɵtext(1);
16523
16552
  i0.ɵɵpipe(2, "rpxTranslate");
@@ -16809,7 +16838,7 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
16809
16838
  return false;
16810
16839
  }
16811
16840
  hasUpdateAccess(role) {
16812
- return this.caseField.acls.some(acl => acl.role === role && acl.update === true);
16841
+ return !!this.caseField.acls.find(acl => acl.role === role && acl.update === true);
16813
16842
  }
16814
16843
  isNotAuthorisedToDelete(index) {
16815
16844
  if (this.isExpanded) {
@@ -16850,7 +16879,7 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
16850
16879
  }
16851
16880
  isCollectionOfSimpleType(caseField) {
16852
16881
  const notSimple = ['Collection', 'Complex'];
16853
- return !notSimple.includes(caseField.field_type.collection_field_type.type);
16882
+ return notSimple.indexOf(caseField.field_type.collection_field_type.type) < 0;
16854
16883
  }
16855
16884
  static ɵfac = function WriteCollectionFieldComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || WriteCollectionFieldComponent)(i0.ɵɵdirectiveInject(i1$3.MatDialog), i0.ɵɵdirectiveInject(ProfileNotifier), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
16856
16885
  static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteCollectionFieldComponent, selectors: [["ccd-write-collection-field"]], viewQuery: function WriteCollectionFieldComponent_Query(rf, ctx) { if (rf & 1) {
@@ -16858,7 +16887,7 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
16858
16887
  } if (rf & 2) {
16859
16888
  let _t;
16860
16889
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.items = _t);
16861
- } }, inputs: { caseFields: "caseFields" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 9, vars: 9, consts: [["collectionItem", ""], [1, "form-group", 3, "id"], [1, "panel", "collection-indicator"], ["class", "heading-h2 error-spacing", 4, "ngIf"], ["type", "button", 1, "button", "write-collection-add-item__top", 3, "click", "disabled"], ["class", "form-group", 3, "hidden", 4, "ngIf"], ["class", "button write-collection-add-item__bottom", "type", "button", 3, "disabled", "click", 4, "ngIf"], [1, "heading-h2", "error-spacing"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], [1, "form-hint"], [3, "content"], [1, "error-message"], [1, "form-group", 3, "hidden"], [1, "govuk-fieldset"], ["class", "form-group", 3, "id", 4, "ngFor", "ngForOf", "ngForTrackBy"], [1, "collection-title"], [1, "float-left"], [1, "govuk-fieldset__legend"], [1, "heading-h3"], [1, "float-right"], ["type", "button", 1, "button", "button-secondary", 3, "click", "disabled"], [3, "caseField", "caseFields", "formGroup", "parent", "idPrefix", "hidden", "isExpanded", "isInSearchBlock"], ["type", "button", 1, "button", "write-collection-add-item__bottom", 3, "click", "disabled"]], template: function WriteCollectionFieldComponent_Template(rf, ctx) { if (rf & 1) {
16890
+ } }, inputs: { caseFields: "caseFields" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 9, vars: 9, consts: [["collectionItem", ""], [1, "form-group", 3, "id"], [1, "panel", "collection-indicator"], ["class", "heading-h2 error-spacing", 4, "ngIf"], ["type", "button", 1, "button", "write-collection-add-item__top", 3, "click", "disabled"], ["class", "form-group", 3, "hidden", 4, "ngIf"], ["class", "button write-collection-add-item__bottom", "type", "button", 3, "disabled", "click", 4, "ngIf"], [1, "heading-h2", "error-spacing"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], [1, "form-hint"], [3, "content"], [1, "error-message"], [1, "form-group", 3, "hidden"], [1, "govuk-fieldset"], ["class", "form-group", 3, "id", 4, "ngFor", "ngForOf", "ngForTrackBy"], [1, "collection-title"], [1, "float-left"], [1, "govuk-fieldset__legend"], [3, "for"], [1, "heading-h3"], [1, "float-right"], ["type", "button", 1, "button", "button-secondary", 3, "click", "disabled"], [3, "caseField", "caseFields", "formGroup", "parent", "idPrefix", "hidden", "isExpanded", "isInSearchBlock"], ["type", "button", 1, "button", "write-collection-add-item__bottom", 3, "click", "disabled"]], template: function WriteCollectionFieldComponent_Template(rf, ctx) { if (rf & 1) {
16862
16891
  i0.ɵɵelementStart(0, "div", 1)(1, "div", 2);
16863
16892
  i0.ɵɵtemplate(2, WriteCollectionFieldComponent_h2_2_Template, 3, 3, "h2", 3);
16864
16893
  i0.ɵɵelementStart(3, "button", 4);
@@ -16879,14 +16908,14 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
16879
16908
  i0.ɵɵadvance(2);
16880
16909
  i0.ɵɵproperty("ngIf", ctx.caseField.hint_text || ctx.formArray.errors);
16881
16910
  i0.ɵɵadvance();
16882
- i0.ɵɵproperty("ngIf", ctx.caseField.value == null ? null : ctx.caseField.value.length);
16911
+ i0.ɵɵproperty("ngIf", ctx.caseField.value && ctx.caseField.value.length);
16883
16912
  i0.ɵɵadvance();
16884
- i0.ɵɵproperty("ngIf", ctx.caseField.value == null ? null : ctx.caseField.value.length);
16913
+ i0.ɵɵproperty("ngIf", ctx.caseField.value && ctx.caseField.value.length);
16885
16914
  } }, styles: [".govuk-js-link[_ngcontent-%COMP%]{appearance:none;background:none;border:none;color:#005ea5;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0;text-decoration:underline}.govuk-js-link[_ngcontent-%COMP%]:hover{color:#2b8cc4;text-decoration-thickness:max(3px,.1875rem,.12em)}.govuk-js-link[_ngcontent-%COMP%]:focus{background-color:#ffbf47;color:#000;outline:3px solid transparent;text-decoration:none;box-shadow:0 -2px #ffbf47,0 4px #000}.govuk-js-link[_ngcontent-%COMP%]:visited{color:#4c2c92}.collection-field-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:first-child > td[_ngcontent-%COMP%]{padding-top:0}.collection-field-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child > td[_ngcontent-%COMP%]{border-bottom:none}.collection-field-table[_ngcontent-%COMP%] td.collection-actions[_ngcontent-%COMP%]{width:1px;white-space:nowrap}.error-spacing[_ngcontent-%COMP%]{margin-top:10px}.collection-title[_ngcontent-%COMP%]{height:51px}.float-left[_ngcontent-%COMP%]{float:left;padding-top:8px}.float-right[_ngcontent-%COMP%]{float:right}.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}}@media print{.complex-panel[_ngcontent-%COMP%] .complex-panel-title[_ngcontent-%COMP%]{font-size:14pt}}.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}.collection-indicator[_ngcontent-%COMP%]{border-left:solid 5px #b1b4b6}"] });
16886
16915
  }
16887
16916
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteCollectionFieldComponent, [{
16888
16917
  type: Component,
16889
- args: [{ selector: 'ccd-write-collection-field', standalone: false, template: "<div class=\"form-group\" [id]=\"id()\">\n\n <div class=\"panel collection-indicator\">\n\n <h2 class=\"heading-h2 error-spacing\" *ngIf=\"!caseField.hidden\">\n {{(caseField | ccdFieldLabel)}}\n </h2>\n <button class=\"button write-collection-add-item__top\" type=\"button\" (click)=\"addItem(true)\" [disabled]=\"isNotAuthorisedToCreate() || isSearchFilter()\">{{'Add new' | rpxTranslate}}</button>\n <h2 class=\"heading-h2 error-spacing\" *ngIf=\"caseField.hint_text || formArray.errors\">\n <span *ngIf=\"caseField.hint_text\" class=\"form-hint\">\n <ccd-markdown [content]=\"caseField.hint_text | rpxTranslate\"></ccd-markdown>\n </span>\n <span *ngIf=\"formArray.errors\" class=\"error-message\">\n {{(formArray.errors | ccdFirstError:caseField.label)}}\n </span>\n </h2>\n\n <div class=\"form-group\" [hidden]=\"caseField.hidden\" *ngIf=\"caseField.value?.length\">\n <fieldset class=\"govuk-fieldset\">\n <div *ngFor=\"let item of collItems; let i = index; trackBy: trackByCollectionItem\" #collectionItem\n [id]=\"this.buildIdPrefix(i) + i\" class=\"form-group\">\n <div class=\"collection-title\">\n <div class=\"float-left\">\n <legend class=\"govuk-fieldset__legend\">\n <h3 class=\"heading-h3\">{{itemLabel(i) | rpxTranslate}}</h3>\n </legend>\n </div>\n <div class=\"float-right\">\n <button class=\"button button-secondary\" type=\"button\" (click)=\"openModal(i)\"\n [disabled]=\"isNotAuthorisedToDelete(i)\"\n attr.aria-label=\"Remove {{ itemLabel(i) }}\">{{'Remove' | rpxTranslate}}</button>\n </div>\n </div>\n <ccd-field-write [caseField]=\"item.caseField\"\n [caseFields]=\"caseFields\"\n [formGroup]=\"formGroup\"\n [parent]=\"item.container\"\n [idPrefix]=\"item.prefix\"\n [hidden]=\"item.caseField.hidden\"\n [isExpanded]=\"isExpanded\"\n [isInSearchBlock]=\"isInSearchBlock\">\n </ccd-field-write>\n </div>\n </fieldset>\n </div>\n\n <button class=\"button write-collection-add-item__bottom\" type=\"button\" (click)=\"addItem(false)\" [disabled]=\"isNotAuthorisedToCreate() || isSearchFilter()\" *ngIf=\"caseField.value?.length\">{{'Add new' | rpxTranslate }}</button>\n\n </div>\n\n</div>\n", styles: [".govuk-js-link{appearance:none;background:none;border:none;color:#005ea5;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0;text-decoration:underline}.govuk-js-link:hover{color:#2b8cc4;text-decoration-thickness:max(3px,.1875rem,.12em)}.govuk-js-link:focus{background-color:#ffbf47;color:#000;outline:3px solid transparent;text-decoration:none;box-shadow:0 -2px #ffbf47,0 4px #000}.govuk-js-link:visited{color:#4c2c92}.collection-field-table tr:first-child>td{padding-top:0}.collection-field-table tr:last-child>td{border-bottom:none}.collection-field-table td.collection-actions{width:1px;white-space:nowrap}.error-spacing{margin-top:10px}.collection-title{height:51px}.float-left{float:left;padding-top:8px}.float-right{float:right}.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}}@media print{.complex-panel .complex-panel-title{font-size:14pt}}.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}.collection-indicator{border-left:solid 5px #b1b4b6}\n"] }]
16918
+ args: [{ selector: 'ccd-write-collection-field', standalone: false, template: "<div class=\"form-group\" [id]=\"id()\">\n\n <div class=\"panel collection-indicator\">\n\n <h2 class=\"heading-h2 error-spacing\" *ngIf=\"!caseField.hidden\">\n {{(caseField | ccdFieldLabel)}}\n </h2>\n <button class=\"button write-collection-add-item__top\" type=\"button\" (click)=\"addItem(true)\" [disabled]=\"isNotAuthorisedToCreate() || isSearchFilter()\">{{'Add new' | rpxTranslate}}</button>\n <h2 class=\"heading-h2 error-spacing\" *ngIf=\"caseField.hint_text || formArray.errors\">\n <span *ngIf=\"caseField.hint_text\" class=\"form-hint\">\n <ccd-markdown [content]=\"caseField.hint_text | rpxTranslate\"></ccd-markdown>\n </span>\n <span *ngIf=\"formArray.errors\" class=\"error-message\">\n {{(formArray.errors | ccdFirstError:caseField.label)}}\n </span>\n </h2>\n\n <div class=\"form-group\" [hidden]=\"caseField.hidden\" *ngIf=\"caseField.value && caseField.value.length\">\n <fieldset class=\"govuk-fieldset\">\n <div *ngFor=\"let item of collItems; let i = index; trackBy: trackByCollectionItem\" #collectionItem\n [id]=\"this.buildIdPrefix(i) + i\" class=\"form-group\">\n <div class=\"collection-title\">\n <div class=\"float-left\">\n <legend class=\"govuk-fieldset__legend\">\n <label [for]=\"item.prefix + i\"><h3 class=\"heading-h3\">{{itemLabel(i) | rpxTranslate}}</h3></label>\n </legend>\n </div>\n <div class=\"float-right\">\n <button class=\"button button-secondary\" type=\"button\" (click)=\"openModal(i)\"\n [disabled]=\"isNotAuthorisedToDelete(i)\"\n attr.aria-label=\"Remove {{ itemLabel(i) }}\">{{'Remove' | rpxTranslate}}</button>\n </div>\n </div>\n <ccd-field-write [caseField]=\"item.caseField\"\n [caseFields]=\"caseFields\"\n [formGroup]=\"formGroup\"\n [parent]=\"item.container\"\n [idPrefix]=\"item.prefix\"\n [hidden]=\"item.caseField.hidden\"\n [isExpanded]=\"isExpanded\"\n [isInSearchBlock]=\"isInSearchBlock\">\n </ccd-field-write>\n </div>\n </fieldset>\n </div>\n\n <button class=\"button write-collection-add-item__bottom\" type=\"button\" (click)=\"addItem(false)\" [disabled]=\"isNotAuthorisedToCreate() || isSearchFilter()\" *ngIf=\"caseField.value && caseField.value.length\">{{'Add new' | rpxTranslate }}</button>\n\n </div>\n\n</div>\n", styles: [".govuk-js-link{appearance:none;background:none;border:none;color:#005ea5;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0;text-decoration:underline}.govuk-js-link:hover{color:#2b8cc4;text-decoration-thickness:max(3px,.1875rem,.12em)}.govuk-js-link:focus{background-color:#ffbf47;color:#000;outline:3px solid transparent;text-decoration:none;box-shadow:0 -2px #ffbf47,0 4px #000}.govuk-js-link:visited{color:#4c2c92}.collection-field-table tr:first-child>td{padding-top:0}.collection-field-table tr:last-child>td{border-bottom:none}.collection-field-table td.collection-actions{width:1px;white-space:nowrap}.error-spacing{margin-top:10px}.collection-title{height:51px}.float-left{float:left;padding-top:8px}.float-right{float:right}.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}}@media print{.complex-panel .complex-panel-title{font-size:14pt}}.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}.collection-indicator{border-left:solid 5px #b1b4b6}\n"] }]
16890
16919
  }], () => [{ type: i1$3.MatDialog }, { type: ProfileNotifier }, { type: i0.ChangeDetectorRef }], { caseFields: [{
16891
16920
  type: Input
16892
16921
  }], items: [{
@@ -17058,8 +17087,10 @@ class ReadDocumentFieldComponent extends AbstractFieldReadComponent {
17058
17087
  }
17059
17088
  });
17060
17089
  }
17061
- else if (this.caseField && this.caseField.value) {
17062
- this.openMediaViewer(this.caseField.value);
17090
+ else {
17091
+ if (this.caseField && this.caseField.value) {
17092
+ this.openMediaViewer(this.caseField.value);
17093
+ }
17063
17094
  }
17064
17095
  }
17065
17096
  openMediaViewer(documentFieldValue) {
@@ -17246,10 +17277,12 @@ class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
17246
17277
  this.jurisdictionId = caseInfo.jurisdiction;
17247
17278
  this.caseId = caseInfo.caseId;
17248
17279
  }
17249
- else if (currUrl.includes('/case-details/')) {
17250
- this.jurisdictionId = currUrl.split('/')[3];
17251
- this.caseTypeId = currUrl.split('/')[4];
17252
- this.caseId = currUrl.split('/')[5];
17280
+ else {
17281
+ if (currUrl.includes('/case-details/')) {
17282
+ this.jurisdictionId = currUrl.split('/')[3];
17283
+ this.caseTypeId = currUrl.split('/')[4];
17284
+ this.caseId = currUrl.split('/')[5];
17285
+ }
17253
17286
  }
17254
17287
  }
17255
17288
  else {
@@ -17331,7 +17364,7 @@ class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
17331
17364
  this.fileInput.nativeElement.click();
17332
17365
  }
17333
17366
  fileSelectEvent() {
17334
- if ((this.caseField.value?.document_filename) ||
17367
+ if ((this.caseField.value && this.caseField.value.document_filename) ||
17335
17368
  (this.selectedFile && this.selectedFile.name)) {
17336
17369
  this.openDialog(this.dialogConfig);
17337
17370
  }
@@ -18073,7 +18106,7 @@ class DynamicRadioListPipe {
18073
18106
  *
18074
18107
  * If value is object with element `value.code`, use code instead.
18075
18108
  */
18076
- if (value?.value?.code) {
18109
+ if (value && value.value && value.value.code) {
18077
18110
  value = value.value.code;
18078
18111
  }
18079
18112
  const item = items.find(i => i.code === value);
@@ -18131,8 +18164,8 @@ class ReadDynamicRadioListFieldComponent extends AbstractFieldReadComponent {
18131
18164
 
18132
18165
  const _c0$S = a0 => ({ "form-group-error": a0 });
18133
18166
  const _c1$m = a0 => ({ selected: a0 });
18134
- function WriteDynamicRadioListFieldComponent_span_3_Template(rf, ctx) { if (rf & 1) {
18135
- i0.ɵɵelementStart(0, "span", 5);
18167
+ function WriteDynamicRadioListFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
18168
+ i0.ɵɵelementStart(0, "span", 7);
18136
18169
  i0.ɵɵtext(1);
18137
18170
  i0.ɵɵpipe(2, "ccdFieldLabel");
18138
18171
  i0.ɵɵelementEnd();
@@ -18141,8 +18174,8 @@ function WriteDynamicRadioListFieldComponent_span_3_Template(rf, ctx) { if (rf &
18141
18174
  i0.ɵɵadvance();
18142
18175
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
18143
18176
  } }
18144
- function WriteDynamicRadioListFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
18145
- i0.ɵɵelementStart(0, "span", 6);
18177
+ function WriteDynamicRadioListFieldComponent_span_5_Template(rf, ctx) { if (rf & 1) {
18178
+ i0.ɵɵelementStart(0, "span", 8);
18146
18179
  i0.ɵɵtext(1);
18147
18180
  i0.ɵɵpipe(2, "rpxTranslate");
18148
18181
  i0.ɵɵelementEnd();
@@ -18151,8 +18184,8 @@ function WriteDynamicRadioListFieldComponent_span_4_Template(rf, ctx) { if (rf &
18151
18184
  i0.ɵɵadvance();
18152
18185
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField.hint_text));
18153
18186
  } }
18154
- function WriteDynamicRadioListFieldComponent_span_5_Template(rf, ctx) { if (rf & 1) {
18155
- i0.ɵɵelementStart(0, "span", 5);
18187
+ function WriteDynamicRadioListFieldComponent_span_6_Template(rf, ctx) { if (rf & 1) {
18188
+ i0.ɵɵelementStart(0, "span", 7);
18156
18189
  i0.ɵɵtext(1);
18157
18190
  i0.ɵɵpipe(2, "rpxTranslate");
18158
18191
  i0.ɵɵelementEnd();
@@ -18160,8 +18193,8 @@ function WriteDynamicRadioListFieldComponent_span_5_Template(rf, ctx) { if (rf &
18160
18193
  i0.ɵɵadvance();
18161
18194
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "Select an option below"));
18162
18195
  } }
18163
- function WriteDynamicRadioListFieldComponent_span_6_Template(rf, ctx) { if (rf & 1) {
18164
- i0.ɵɵelementStart(0, "span", 7);
18196
+ function WriteDynamicRadioListFieldComponent_span_7_Template(rf, ctx) { if (rf & 1) {
18197
+ i0.ɵɵelementStart(0, "span", 9);
18165
18198
  i0.ɵɵtext(1);
18166
18199
  i0.ɵɵpipe(2, "ccdFirstError");
18167
18200
  i0.ɵɵelementEnd();
@@ -18170,10 +18203,10 @@ function WriteDynamicRadioListFieldComponent_span_6_Template(rf, ctx) { if (rf &
18170
18203
  i0.ɵɵadvance();
18171
18204
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.dynamicRadioListControl.errors));
18172
18205
  } }
18173
- function WriteDynamicRadioListFieldComponent_div_8_Template(rf, ctx) { if (rf & 1) {
18174
- i0.ɵɵelementStart(0, "div", 8);
18175
- i0.ɵɵelement(1, "input", 9);
18176
- i0.ɵɵelementStart(2, "label", 10);
18206
+ function WriteDynamicRadioListFieldComponent_div_9_Template(rf, ctx) { if (rf & 1) {
18207
+ i0.ɵɵelementStart(0, "div", 10);
18208
+ i0.ɵɵelement(1, "input", 11);
18209
+ i0.ɵɵelementStart(2, "label", 12);
18177
18210
  i0.ɵɵtext(3);
18178
18211
  i0.ɵɵpipe(4, "rpxTranslate");
18179
18212
  i0.ɵɵelementEnd()();
@@ -18213,17 +18246,21 @@ class WriteDynamicRadioListFieldComponent extends AbstractFieldWriteComponent {
18213
18246
  return this.parent?.value?.id ? this.parent.value.id + this.parent.value.value : super.createElementId(name);
18214
18247
  }
18215
18248
  static ɵfac = /*@__PURE__*/ (() => { let ɵWriteDynamicRadioListFieldComponent_BaseFactory; return function WriteDynamicRadioListFieldComponent_Factory(__ngFactoryType__) { return (ɵWriteDynamicRadioListFieldComponent_BaseFactory || (ɵWriteDynamicRadioListFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(WriteDynamicRadioListFieldComponent)))(__ngFactoryType__ || WriteDynamicRadioListFieldComponent); }; })();
18216
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteDynamicRadioListFieldComponent, selectors: [["ccd-write-dynamic-radio-list-field"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 9, vars: 9, consts: [[1, "form-group", "bottom-30", 3, "ngClass", "id"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], ["class", "multiple-choice", 3, "ngClass", 4, "ngFor", "ngForOf"], [1, "form-label"], [1, "form-hint"], [1, "error-message"], [1, "multiple-choice", 3, "ngClass"], ["type", "radio", 1, "form-control", 3, "id", "name", "formControl", "value"], [1, "form-label", 3, "for"]], template: function WriteDynamicRadioListFieldComponent_Template(rf, ctx) { if (rf & 1) {
18217
- i0.ɵɵelementStart(0, "div", 0)(1, "fieldset")(2, "legend");
18218
- i0.ɵɵtemplate(3, WriteDynamicRadioListFieldComponent_span_3_Template, 3, 3, "span", 1)(4, WriteDynamicRadioListFieldComponent_span_4_Template, 3, 3, "span", 2)(5, WriteDynamicRadioListFieldComponent_span_5_Template, 3, 3, "span", 1)(6, WriteDynamicRadioListFieldComponent_span_6_Template, 3, 3, "span", 3);
18249
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteDynamicRadioListFieldComponent, selectors: [["ccd-write-dynamic-radio-list-field"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 10, vars: 10, consts: [[1, "form-group", "bottom-30", 3, "ngClass", "id"], [2, "display", "none"], [3, "for"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], ["class", "multiple-choice", 3, "ngClass", 4, "ngFor", "ngForOf"], [1, "form-label"], [1, "form-hint"], [1, "error-message"], [1, "multiple-choice", 3, "ngClass"], ["type", "radio", 1, "form-control", 3, "id", "name", "formControl", "value"], [1, "form-label", 3, "for"]], template: function WriteDynamicRadioListFieldComponent_Template(rf, ctx) { if (rf & 1) {
18250
+ i0.ɵɵelementStart(0, "div", 0)(1, "fieldset");
18251
+ i0.ɵɵelement(2, "legend", 1);
18252
+ i0.ɵɵelementStart(3, "label", 2);
18253
+ i0.ɵɵtemplate(4, WriteDynamicRadioListFieldComponent_span_4_Template, 3, 3, "span", 3)(5, WriteDynamicRadioListFieldComponent_span_5_Template, 3, 3, "span", 4)(6, WriteDynamicRadioListFieldComponent_span_6_Template, 3, 3, "span", 3)(7, WriteDynamicRadioListFieldComponent_span_7_Template, 3, 3, "span", 5);
18219
18254
  i0.ɵɵelementEnd();
18220
- i0.ɵɵelementContainerStart(7);
18221
- i0.ɵɵtemplate(8, WriteDynamicRadioListFieldComponent_div_8_Template, 5, 11, "div", 4);
18255
+ i0.ɵɵelementContainerStart(8);
18256
+ i0.ɵɵtemplate(9, WriteDynamicRadioListFieldComponent_div_9_Template, 5, 11, "div", 6);
18222
18257
  i0.ɵɵelementContainerEnd();
18223
18258
  i0.ɵɵelementEnd()();
18224
18259
  } if (rf & 2) {
18225
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$S, !ctx.dynamicRadioListControl.valid && ctx.dynamicRadioListControl.dirty))("id", ctx.id());
18260
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$S, !ctx.dynamicRadioListControl.valid && ctx.dynamicRadioListControl.dirty))("id", ctx.id());
18226
18261
  i0.ɵɵadvance(3);
18262
+ i0.ɵɵproperty("for", ctx.id());
18263
+ i0.ɵɵadvance();
18227
18264
  i0.ɵɵproperty("ngIf", ctx.caseField.label);
18228
18265
  i0.ɵɵadvance();
18229
18266
  i0.ɵɵproperty("ngIf", ctx.caseField.hint_text);
@@ -18237,7 +18274,7 @@ class WriteDynamicRadioListFieldComponent extends AbstractFieldWriteComponent {
18237
18274
  }
18238
18275
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteDynamicRadioListFieldComponent, [{
18239
18276
  type: Component,
18240
- args: [{ selector: 'ccd-write-dynamic-radio-list-field', standalone: false, template: "<div class=\"form-group bottom-30\"\n [ngClass]=\"{'form-group-error': !dynamicRadioListControl.valid && dynamicRadioListControl.dirty}\" [id]=\"id()\">\n <fieldset>\n <legend>\n <span class=\"form-label\" *ngIf=\"caseField.label\">{{(caseField | ccdFieldLabel)}}</span>\n <span class=\"form-hint\" *ngIf=\"caseField.hint_text\">{{caseField.hint_text | rpxTranslate}}</span>\n <span class=\"form-label\" *ngIf=\"!caseField.label && !caseField.hint_text\">{{'Select an option below' | rpxTranslate}}</span>\n <span class=\"error-message\"\n *ngIf=\"dynamicRadioListControl.errors && dynamicRadioListControl.dirty\">{{(dynamicRadioListControl.errors |\n ccdFirstError)}}</span>\n </legend>\n\n <ng-container>\n <div class=\"multiple-choice\" *ngFor=\"let radioButton of caseField.list_items\" [ngClass]=\"{selected: dynamicRadioListControl.value === radioButton.code}\">\n <input class=\"form-control\" [id]=\"createElementId(radioButton.code)\" [name]=\"id()\" type=\"radio\" [formControl]=\"dynamicRadioListControl\" [value]=\"radioButton.code\">\n <label class=\"form-label\" [for]=\"createElementId(radioButton.code)\">{{radioButton.label | rpxTranslate}}</label>\n </div>\n </ng-container>\n </fieldset>\n</div>\n" }]
18277
+ args: [{ selector: 'ccd-write-dynamic-radio-list-field', standalone: false, template: "<div class=\"form-group bottom-30\"\n [ngClass]=\"{'form-group-error': !dynamicRadioListControl.valid && dynamicRadioListControl.dirty}\" [id]=\"id()\">\n <fieldset>\n <legend style=\"display: none;\"></legend>\n <label [for]=\"id()\">\n <span class=\"form-label\" *ngIf=\"caseField.label\">{{(caseField | ccdFieldLabel)}}</span>\n <span class=\"form-hint\" *ngIf=\"caseField.hint_text\">{{caseField.hint_text | rpxTranslate}}</span>\n <span class=\"form-label\" *ngIf=\"!caseField.label && !caseField.hint_text\">{{'Select an option below' | rpxTranslate}}</span>\n <span class=\"error-message\"\n *ngIf=\"dynamicRadioListControl.errors && dynamicRadioListControl.dirty\">{{(dynamicRadioListControl.errors |\n ccdFirstError)}}</span>\n </label>\n\n <ng-container>\n <div class=\"multiple-choice\" *ngFor=\"let radioButton of caseField.list_items\" [ngClass]=\"{selected: dynamicRadioListControl.value === radioButton.code}\">\n <input class=\"form-control\" [id]=\"createElementId(radioButton.code)\" [name]=\"id()\" type=\"radio\" [formControl]=\"dynamicRadioListControl\" [value]=\"radioButton.code\">\n <label class=\"form-label\" [for]=\"createElementId(radioButton.code)\">{{radioButton.label | rpxTranslate}}</label>\n </div>\n </ng-container>\n </fieldset>\n</div>\n" }]
18241
18278
  }], null, null); })();
18242
18279
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(WriteDynamicRadioListFieldComponent, { className: "WriteDynamicRadioListFieldComponent", filePath: "lib/shared/components/palette/dynamic-radio-list/write-dynamic-radio-list-field.component.ts", lineNumber: 10 }); })();
18243
18280
 
@@ -18502,8 +18539,8 @@ class ReadFixedRadioListFieldComponent extends AbstractFieldReadComponent {
18502
18539
 
18503
18540
  const _c0$P = a0 => ({ "form-group-error": a0 });
18504
18541
  const _c1$k = a0 => ({ selected: a0 });
18505
- function WriteFixedRadioListFieldComponent_span_3_Template(rf, ctx) { if (rf & 1) {
18506
- i0.ɵɵelementStart(0, "span", 5);
18542
+ function WriteFixedRadioListFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
18543
+ i0.ɵɵelementStart(0, "span", 6);
18507
18544
  i0.ɵɵtext(1);
18508
18545
  i0.ɵɵpipe(2, "ccdFieldLabel");
18509
18546
  i0.ɵɵelementEnd();
@@ -18512,8 +18549,8 @@ function WriteFixedRadioListFieldComponent_span_3_Template(rf, ctx) { if (rf & 1
18512
18549
  i0.ɵɵadvance();
18513
18550
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
18514
18551
  } }
18515
- function WriteFixedRadioListFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
18516
- i0.ɵɵelementStart(0, "span", 6);
18552
+ function WriteFixedRadioListFieldComponent_span_5_Template(rf, ctx) { if (rf & 1) {
18553
+ i0.ɵɵelementStart(0, "span", 7);
18517
18554
  i0.ɵɵtext(1);
18518
18555
  i0.ɵɵpipe(2, "rpxTranslate");
18519
18556
  i0.ɵɵelementEnd();
@@ -18522,8 +18559,8 @@ function WriteFixedRadioListFieldComponent_span_4_Template(rf, ctx) { if (rf & 1
18522
18559
  i0.ɵɵadvance();
18523
18560
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField.hint_text));
18524
18561
  } }
18525
- function WriteFixedRadioListFieldComponent_span_5_Template(rf, ctx) { if (rf & 1) {
18526
- i0.ɵɵelementStart(0, "span", 7);
18562
+ function WriteFixedRadioListFieldComponent_span_6_Template(rf, ctx) { if (rf & 1) {
18563
+ i0.ɵɵelementStart(0, "span", 8);
18527
18564
  i0.ɵɵtext(1);
18528
18565
  i0.ɵɵpipe(2, "ccdFirstError");
18529
18566
  i0.ɵɵelementEnd();
@@ -18532,10 +18569,10 @@ function WriteFixedRadioListFieldComponent_span_5_Template(rf, ctx) { if (rf & 1
18532
18569
  i0.ɵɵadvance();
18533
18570
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r0.fixedRadioListControl.errors, ctx_r0.caseField.label));
18534
18571
  } }
18535
- function WriteFixedRadioListFieldComponent_div_7_Template(rf, ctx) { if (rf & 1) {
18536
- i0.ɵɵelementStart(0, "div", 8);
18537
- i0.ɵɵelement(1, "input", 9);
18538
- i0.ɵɵelementStart(2, "label", 10);
18572
+ function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) { if (rf & 1) {
18573
+ i0.ɵɵelementStart(0, "div", 9);
18574
+ i0.ɵɵelement(1, "input", 10);
18575
+ i0.ɵɵelementStart(2, "label", 11);
18539
18576
  i0.ɵɵtext(3);
18540
18577
  i0.ɵɵpipe(4, "rpxTranslate");
18541
18578
  i0.ɵɵelementEnd()();
@@ -18557,17 +18594,21 @@ class WriteFixedRadioListFieldComponent extends AbstractFieldWriteComponent {
18557
18594
  this.fixedRadioListControl = this.registerControl(new FormControl(notEmpty ? this.caseField.value : null));
18558
18595
  }
18559
18596
  static ɵfac = /*@__PURE__*/ (() => { let ɵWriteFixedRadioListFieldComponent_BaseFactory; return function WriteFixedRadioListFieldComponent_Factory(__ngFactoryType__) { return (ɵWriteFixedRadioListFieldComponent_BaseFactory || (ɵWriteFixedRadioListFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(WriteFixedRadioListFieldComponent)))(__ngFactoryType__ || WriteFixedRadioListFieldComponent); }; })();
18560
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteFixedRadioListFieldComponent, selectors: [["ccd-write-fixed-radio-list-field"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 8, vars: 8, consts: [[1, "form-group", "bottom-30", 3, "ngClass", "id"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], ["class", "multiple-choice", 3, "ngClass", 4, "ngFor", "ngForOf"], [1, "form-label"], [1, "form-hint"], [1, "error-message"], [1, "multiple-choice", 3, "ngClass"], ["type", "radio", 1, "form-control", 3, "id", "name", "formControl", "value"], [1, "form-label", 3, "for"]], template: function WriteFixedRadioListFieldComponent_Template(rf, ctx) { if (rf & 1) {
18561
- i0.ɵɵelementStart(0, "div", 0)(1, "fieldset")(2, "legend");
18562
- i0.ɵɵtemplate(3, WriteFixedRadioListFieldComponent_span_3_Template, 3, 3, "span", 1)(4, WriteFixedRadioListFieldComponent_span_4_Template, 3, 3, "span", 2)(5, WriteFixedRadioListFieldComponent_span_5_Template, 3, 4, "span", 3);
18597
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteFixedRadioListFieldComponent, selectors: [["ccd-write-fixed-radio-list-field"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 9, vars: 9, consts: [[1, "form-group", "bottom-30", 3, "ngClass", "id"], [3, "for"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], ["class", "multiple-choice", 3, "ngClass", 4, "ngFor", "ngForOf"], [1, "form-label"], [1, "form-hint"], [1, "error-message"], [1, "multiple-choice", 3, "ngClass"], ["type", "radio", 1, "form-control", 3, "id", "name", "formControl", "value"], [1, "form-label", 3, "for"]], template: function WriteFixedRadioListFieldComponent_Template(rf, ctx) { if (rf & 1) {
18598
+ i0.ɵɵelementStart(0, "div", 0)(1, "fieldset")(2, "legend")(3, "label", 1);
18599
+ i0.ɵɵtemplate(4, WriteFixedRadioListFieldComponent_span_4_Template, 3, 3, "span", 2);
18600
+ i0.ɵɵelementEnd();
18601
+ i0.ɵɵtemplate(5, WriteFixedRadioListFieldComponent_span_5_Template, 3, 3, "span", 3)(6, WriteFixedRadioListFieldComponent_span_6_Template, 3, 4, "span", 4);
18563
18602
  i0.ɵɵelementEnd();
18564
- i0.ɵɵelementContainerStart(6);
18565
- i0.ɵɵtemplate(7, WriteFixedRadioListFieldComponent_div_7_Template, 5, 11, "div", 4);
18603
+ i0.ɵɵelementContainerStart(7);
18604
+ i0.ɵɵtemplate(8, WriteFixedRadioListFieldComponent_div_8_Template, 5, 11, "div", 5);
18566
18605
  i0.ɵɵelementContainerEnd();
18567
18606
  i0.ɵɵelementEnd()();
18568
18607
  } if (rf & 2) {
18569
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c0$P, !ctx.fixedRadioListControl.valid && (ctx.fixedRadioListControl.dirty || ctx.fixedRadioListControl.touched)))("id", ctx.id());
18608
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$P, !ctx.fixedRadioListControl.valid && (ctx.fixedRadioListControl.dirty || ctx.fixedRadioListControl.touched)))("id", ctx.id());
18570
18609
  i0.ɵɵadvance(3);
18610
+ i0.ɵɵproperty("for", ctx.id());
18611
+ i0.ɵɵadvance();
18571
18612
  i0.ɵɵproperty("ngIf", ctx.caseField.label);
18572
18613
  i0.ɵɵadvance();
18573
18614
  i0.ɵɵproperty("ngIf", ctx.caseField.hint_text);
@@ -18579,7 +18620,7 @@ class WriteFixedRadioListFieldComponent extends AbstractFieldWriteComponent {
18579
18620
  }
18580
18621
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteFixedRadioListFieldComponent, [{
18581
18622
  type: Component,
18582
- args: [{ selector: 'ccd-write-fixed-radio-list-field', standalone: false, template: "<div class=\"form-group bottom-30\" [ngClass]=\"{'form-group-error': !fixedRadioListControl.valid && (fixedRadioListControl.dirty || fixedRadioListControl.touched)}\" [id]=\"id()\">\n <fieldset>\n <legend>\n <span class=\"form-label\" *ngIf=\"caseField.label\">{{(caseField | ccdFieldLabel)}}</span>\n <span class=\"form-hint\" *ngIf=\"caseField.hint_text\">{{caseField.hint_text | rpxTranslate }}</span>\n <span class=\"error-message\" *ngIf=\"fixedRadioListControl.errors && (fixedRadioListControl.dirty || fixedRadioListControl.touched)\">{{(fixedRadioListControl.errors | ccdFirstError:caseField.label)}}</span>\n </legend>\n <ng-container>\n <div class=\"multiple-choice\" *ngFor=\"let radioButton of caseField.field_type.fixed_list_items\" [ngClass]=\"{selected: fixedRadioListControl.value === radioButton.code}\">\n <input class=\"form-control\" [id]=\"id()+'-'+radioButton.code\" [name]=\"id()\" type=\"radio\" [formControl]=\"fixedRadioListControl\" [value]=\"radioButton.code\">\n <label class=\"form-label\" [for]=\"id()+'-'+radioButton.code\">{{radioButton.label | rpxTranslate}}</label>\n </div>\n </ng-container>\n </fieldset>\n</div>\n" }]
18623
+ args: [{ selector: 'ccd-write-fixed-radio-list-field', standalone: false, template: "<div class=\"form-group bottom-30\" [ngClass]=\"{'form-group-error': !fixedRadioListControl.valid && (fixedRadioListControl.dirty || fixedRadioListControl.touched)}\" [id]=\"id()\">\n <fieldset>\n <legend>\n <label [for]=\"id()\">\n <span class=\"form-label\" *ngIf=\"caseField.label\">{{(caseField | ccdFieldLabel)}}</span>\n </label>\n <span class=\"form-hint\" *ngIf=\"caseField.hint_text\">{{caseField.hint_text | rpxTranslate }}</span>\n <span class=\"error-message\" *ngIf=\"fixedRadioListControl.errors && (fixedRadioListControl.dirty || fixedRadioListControl.touched)\">{{(fixedRadioListControl.errors | ccdFirstError:caseField.label)}}</span>\n </legend>\n <ng-container>\n <div class=\"multiple-choice\" *ngFor=\"let radioButton of caseField.field_type.fixed_list_items\" [ngClass]=\"{selected: fixedRadioListControl.value === radioButton.code}\">\n <input class=\"form-control\" [id]=\"id()+'-'+radioButton.code\" [name]=\"id()\" type=\"radio\" [formControl]=\"fixedRadioListControl\" [value]=\"radioButton.code\">\n <label class=\"form-label\" [for]=\"id()+'-'+radioButton.code\">{{radioButton.label | rpxTranslate}}</label>\n </div>\n </ng-container>\n </fieldset>\n</div>\n" }]
18583
18624
  }], null, null); })();
18584
18625
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(WriteFixedRadioListFieldComponent, { className: "WriteFixedRadioListFieldComponent", filePath: "lib/shared/components/palette/fixed-radio-list/write-fixed-radio-list-field.component.ts", lineNumber: 10 }); })();
18585
18626
 
@@ -19376,7 +19417,7 @@ class BeforeYouStartComponent extends AbstractJourneyComponent {
19376
19417
  this.serverLinkedApiError = this.linkedCasesService.serverLinkedApiError;
19377
19418
  const linkedCaseReferenceIds = this.linkedCasesService.caseFieldValue.filter((item) => item).map((item) => item.id);
19378
19419
  if (this.linkedCasesService.initialCaseLinks.length !== (this.linkedCasesService.caseFieldValue.length + this.linkedCasesService.casesToUnlink.length)) {
19379
- this.linkedCasesService.linkedCases = this.linkedCasesService.linkedCases.filter((item) => linkedCaseReferenceIds.includes(item.caseReference));
19420
+ this.linkedCasesService.linkedCases = this.linkedCasesService.linkedCases.filter((item) => linkedCaseReferenceIds.indexOf(item.caseReference) !== -1);
19380
19421
  }
19381
19422
  if (this.linkedCasesService.linkedCases.length === 0 && this.linkedCasesService.caseFieldValue.length !== 0 && !this.linkedCasesService.hasContinuedFromStart) {
19382
19423
  this.linkedCasesService.caseFieldValue.forEach((item) => {
@@ -19663,7 +19704,7 @@ class ValidatorsUtils {
19663
19704
  const _c0$M = a0 => ({ "govuk-form-group--error": a0 });
19664
19705
  const _c1$h = a0 => ({ "table-group-error": a0 });
19665
19706
  function LinkCasesComponent_div_8_span_4_Template(rf, ctx) { if (rf & 1) {
19666
- i0.ɵɵelementStart(0, "span", 30)(1, "span", 31);
19707
+ i0.ɵɵelementStart(0, "span", 28)(1, "span", 29);
19667
19708
  i0.ɵɵtext(2, "Error:");
19668
19709
  i0.ɵɵelementEnd();
19669
19710
  i0.ɵɵtext(3);
@@ -19673,8 +19714,8 @@ function LinkCasesComponent_div_8_span_4_Template(rf, ctx) { if (rf & 1) {
19673
19714
  i0.ɵɵadvance(3);
19674
19715
  i0.ɵɵtextInterpolate1(" ", ctx_r1.caseNumberError, " ");
19675
19716
  } }
19676
- function LinkCasesComponent_div_8_span_13_Template(rf, ctx) { if (rf & 1) {
19677
- i0.ɵɵelementStart(0, "span", 30)(1, "span", 31);
19717
+ function LinkCasesComponent_div_8_span_11_Template(rf, ctx) { if (rf & 1) {
19718
+ i0.ɵɵelementStart(0, "span", 28)(1, "span", 29);
19678
19719
  i0.ɵɵtext(2, "Error:");
19679
19720
  i0.ɵɵelementEnd();
19680
19721
  i0.ɵɵtext(3);
@@ -19684,12 +19725,12 @@ function LinkCasesComponent_div_8_span_13_Template(rf, ctx) { if (rf & 1) {
19684
19725
  i0.ɵɵadvance(3);
19685
19726
  i0.ɵɵtextInterpolate1(" ", ctx_r1.caseReasonError, " ");
19686
19727
  } }
19687
- function LinkCasesComponent_div_8_div_15_Template(rf, ctx) { if (rf & 1) {
19728
+ function LinkCasesComponent_div_8_div_13_Template(rf, ctx) { if (rf & 1) {
19688
19729
  const _r3 = i0.ɵɵgetCurrentView();
19689
- i0.ɵɵelementStart(0, "div", 32)(1, "input", 33);
19690
- i0.ɵɵlistener("change", function LinkCasesComponent_div_8_div_15_Template_input_change_1_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.toggleLinkCaseReasonOtherComments($event)); });
19730
+ i0.ɵɵelementStart(0, "div", 30)(1, "input", 31);
19731
+ i0.ɵɵlistener("change", function LinkCasesComponent_div_8_div_13_Template_input_change_1_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.toggleLinkCaseReasonOtherComments($event)); });
19691
19732
  i0.ɵɵelementEnd();
19692
- i0.ɵɵelementStart(2, "label", 34);
19733
+ i0.ɵɵelementStart(2, "label", 32);
19693
19734
  i0.ɵɵtext(3);
19694
19735
  i0.ɵɵelementEnd()();
19695
19736
  } if (rf & 2) {
@@ -19703,8 +19744,8 @@ function LinkCasesComponent_div_8_div_15_Template(rf, ctx) { if (rf & 1) {
19703
19744
  i0.ɵɵadvance();
19704
19745
  i0.ɵɵtextInterpolate(reason_r4.value_en);
19705
19746
  } }
19706
- function LinkCasesComponent_div_8_div_16_span_3_Template(rf, ctx) { if (rf & 1) {
19707
- i0.ɵɵelementStart(0, "span", 30)(1, "span", 31);
19747
+ function LinkCasesComponent_div_8_div_14_span_3_Template(rf, ctx) { if (rf & 1) {
19748
+ i0.ɵɵelementStart(0, "span", 28)(1, "span", 29);
19708
19749
  i0.ɵɵtext(2, "Error:");
19709
19750
  i0.ɵɵelementEnd();
19710
19751
  i0.ɵɵtext(3);
@@ -19714,30 +19755,25 @@ function LinkCasesComponent_div_8_div_16_span_3_Template(rf, ctx) { if (rf & 1)
19714
19755
  i0.ɵɵadvance(3);
19715
19756
  i0.ɵɵtextInterpolate1(" ", ctx_r1.caseReasonCommentsError, " ");
19716
19757
  } }
19717
- function LinkCasesComponent_div_8_div_16_Template(rf, ctx) { if (rf & 1) {
19718
- i0.ɵɵelementStart(0, "div", 35)(1, "h3", 21);
19758
+ function LinkCasesComponent_div_8_div_14_Template(rf, ctx) { if (rf & 1) {
19759
+ i0.ɵɵelementStart(0, "div", 33)(1, "h3", 20);
19719
19760
  i0.ɵɵtext(2, "Comments");
19720
19761
  i0.ɵɵelementEnd();
19721
- i0.ɵɵtemplate(3, LinkCasesComponent_div_8_div_16_span_3_Template, 4, 1, "span", 6);
19722
- i0.ɵɵelementStart(4, "label", 36);
19723
- i0.ɵɵtext(5);
19724
- i0.ɵɵelementEnd();
19725
- i0.ɵɵelementStart(6, "textarea", 37);
19726
- i0.ɵɵtext(7, " ");
19762
+ i0.ɵɵtemplate(3, LinkCasesComponent_div_8_div_14_span_3_Template, 4, 1, "span", 6);
19763
+ i0.ɵɵelementStart(4, "textarea", 34);
19764
+ i0.ɵɵtext(5, " ");
19727
19765
  i0.ɵɵelementEnd();
19728
- i0.ɵɵelementStart(8, "div", 38);
19729
- i0.ɵɵtext(9, " You can enter up to 100 characters ");
19766
+ i0.ɵɵelementStart(6, "div", 35);
19767
+ i0.ɵɵtext(7, " You can enter up to 100 characters ");
19730
19768
  i0.ɵɵelementEnd()();
19731
19769
  } if (rf & 2) {
19732
19770
  const ctx_r1 = i0.ɵɵnextContext(2);
19733
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(3, _c0$M, !!ctx_r1.caseReasonCommentsError));
19771
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(2, _c0$M, !!ctx_r1.caseReasonCommentsError));
19734
19772
  i0.ɵɵadvance(3);
19735
19773
  i0.ɵɵproperty("ngIf", ctx_r1.caseReasonCommentsError);
19736
- i0.ɵɵadvance(2);
19737
- i0.ɵɵtextInterpolate1(" ", "Other description", " ");
19738
19774
  } }
19739
- function LinkCasesComponent_div_8_span_19_Template(rf, ctx) { if (rf & 1) {
19740
- i0.ɵɵelementStart(0, "span", 30)(1, "span", 31);
19775
+ function LinkCasesComponent_div_8_span_17_Template(rf, ctx) { if (rf & 1) {
19776
+ i0.ɵɵelementStart(0, "span", 28)(1, "span", 29);
19741
19777
  i0.ɵɵtext(2, "Error:");
19742
19778
  i0.ɵɵelementEnd();
19743
19779
  i0.ɵɵtext(3);
@@ -19749,43 +19785,38 @@ function LinkCasesComponent_div_8_span_19_Template(rf, ctx) { if (rf & 1) {
19749
19785
  } }
19750
19786
  function LinkCasesComponent_div_8_Template(rf, ctx) { if (rf & 1) {
19751
19787
  const _r1 = i0.ɵɵgetCurrentView();
19752
- i0.ɵɵelementStart(0, "div", 19)(1, "div", 20)(2, "h3", 21);
19788
+ i0.ɵɵelementStart(0, "div", 19)(1, "div", 5)(2, "h3", 20);
19753
19789
  i0.ɵɵtext(3, "Enter case reference");
19754
19790
  i0.ɵɵelementEnd();
19755
19791
  i0.ɵɵtemplate(4, LinkCasesComponent_div_8_span_4_Template, 4, 1, "span", 6);
19756
- i0.ɵɵelementStart(5, "label", 22);
19757
- i0.ɵɵtext(6);
19758
- i0.ɵɵelementEnd();
19759
- i0.ɵɵelement(7, "input", 23);
19792
+ i0.ɵɵelement(5, "input", 21);
19760
19793
  i0.ɵɵelementEnd();
19761
- i0.ɵɵelementStart(8, "div", 24)(9, "h3", 21);
19762
- i0.ɵɵtext(10, "Why should these cases be linked?");
19794
+ i0.ɵɵelementStart(6, "div", 22)(7, "h3", 20);
19795
+ i0.ɵɵtext(8, "Why should these cases be linked?");
19763
19796
  i0.ɵɵelementEnd();
19764
- i0.ɵɵelementStart(11, "div", 25);
19765
- i0.ɵɵtext(12, " Select all that apply. ");
19797
+ i0.ɵɵelementStart(9, "div", 23);
19798
+ i0.ɵɵtext(10, " Select all that apply. ");
19766
19799
  i0.ɵɵelementEnd();
19767
- i0.ɵɵtemplate(13, LinkCasesComponent_div_8_span_13_Template, 4, 1, "span", 6);
19768
- i0.ɵɵelementStart(14, "div", 26);
19769
- i0.ɵɵtemplate(15, LinkCasesComponent_div_8_div_15_Template, 4, 7, "div", 27);
19800
+ i0.ɵɵtemplate(11, LinkCasesComponent_div_8_span_11_Template, 4, 1, "span", 6);
19801
+ i0.ɵɵelementStart(12, "div", 24);
19802
+ i0.ɵɵtemplate(13, LinkCasesComponent_div_8_div_13_Template, 4, 7, "div", 25);
19770
19803
  i0.ɵɵelementEnd()();
19771
- i0.ɵɵtemplate(16, LinkCasesComponent_div_8_div_16_Template, 10, 5, "div", 28);
19772
- i0.ɵɵelement(17, "br")(18, "br");
19773
- i0.ɵɵtemplate(19, LinkCasesComponent_div_8_span_19_Template, 4, 1, "span", 6);
19774
- i0.ɵɵelementStart(20, "button", 29);
19775
- i0.ɵɵlistener("click", function LinkCasesComponent_div_8_Template_button_click_20_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.submitCaseInfo()); });
19776
- i0.ɵɵtext(21, "Propose case link");
19804
+ i0.ɵɵtemplate(14, LinkCasesComponent_div_8_div_14_Template, 8, 4, "div", 26);
19805
+ i0.ɵɵelement(15, "br")(16, "br");
19806
+ i0.ɵɵtemplate(17, LinkCasesComponent_div_8_span_17_Template, 4, 1, "span", 6);
19807
+ i0.ɵɵelementStart(18, "button", 27);
19808
+ i0.ɵɵlistener("click", function LinkCasesComponent_div_8_Template_button_click_18_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.submitCaseInfo()); });
19809
+ i0.ɵɵtext(19, "Propose case link");
19777
19810
  i0.ɵɵelementEnd()();
19778
19811
  } if (rf & 2) {
19779
19812
  const ctx_r1 = i0.ɵɵnextContext();
19780
19813
  i0.ɵɵproperty("formGroup", ctx_r1.linkCaseForm);
19781
19814
  i0.ɵɵadvance();
19782
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c0$M, !!ctx_r1.caseNumberError));
19815
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$M, !!ctx_r1.caseNumberError));
19783
19816
  i0.ɵɵadvance(3);
19784
19817
  i0.ɵɵproperty("ngIf", ctx_r1.caseNumberError);
19785
19818
  i0.ɵɵadvance(2);
19786
- i0.ɵɵtextInterpolate1(" ", "Enter case reference", " ");
19787
- i0.ɵɵadvance(2);
19788
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(11, _c0$M, !!ctx_r1.caseReasonError));
19819
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c0$M, !!ctx_r1.caseReasonError));
19789
19820
  i0.ɵɵadvance(5);
19790
19821
  i0.ɵɵproperty("ngIf", ctx_r1.caseReasonError);
19791
19822
  i0.ɵɵadvance(2);
@@ -19796,7 +19827,7 @@ function LinkCasesComponent_div_8_Template(rf, ctx) { if (rf & 1) {
19796
19827
  i0.ɵɵproperty("ngIf", ctx_r1.caseSelectionError);
19797
19828
  } }
19798
19829
  function LinkCasesComponent_span_13_Template(rf, ctx) { if (rf & 1) {
19799
- i0.ɵɵelementStart(0, "span", 30)(1, "span", 31);
19830
+ i0.ɵɵelementStart(0, "span", 28)(1, "span", 29);
19800
19831
  i0.ɵɵtext(2, "Error:");
19801
19832
  i0.ɵɵelementEnd();
19802
19833
  i0.ɵɵtext(3);
@@ -19819,27 +19850,27 @@ function LinkCasesComponent_tr_31_span_15_Template(rf, ctx) { if (rf & 1) {
19819
19850
  } }
19820
19851
  function LinkCasesComponent_tr_31_Template(rf, ctx) { if (rf & 1) {
19821
19852
  const _r6 = i0.ɵɵgetCurrentView();
19822
- i0.ɵɵelementStart(0, "tr", 10)(1, "td", 39);
19823
- i0.ɵɵelement(2, "div", 40);
19853
+ i0.ɵɵelementStart(0, "tr", 10)(1, "td", 36);
19854
+ i0.ɵɵelement(2, "div", 37);
19824
19855
  i0.ɵɵelementStart(3, "span");
19825
19856
  i0.ɵɵtext(4);
19826
19857
  i0.ɵɵelement(5, "br");
19827
19858
  i0.ɵɵtext(6);
19828
19859
  i0.ɵɵpipe(7, "ccdCaseReference");
19829
19860
  i0.ɵɵelementEnd()();
19830
- i0.ɵɵelementStart(8, "td", 41);
19861
+ i0.ɵɵelementStart(8, "td", 38);
19831
19862
  i0.ɵɵtext(9);
19832
19863
  i0.ɵɵelementEnd();
19833
- i0.ɵɵelementStart(10, "td", 39);
19864
+ i0.ɵɵelementStart(10, "td", 36);
19834
19865
  i0.ɵɵtext(11);
19835
19866
  i0.ɵɵelementEnd();
19836
- i0.ɵɵelementStart(12, "td", 41);
19867
+ i0.ɵɵelementStart(12, "td", 38);
19837
19868
  i0.ɵɵtext(13);
19838
19869
  i0.ɵɵelementEnd();
19839
- i0.ɵɵelementStart(14, "td", 39);
19840
- i0.ɵɵtemplate(15, LinkCasesComponent_tr_31_span_15_Template, 4, 3, "span", 42);
19870
+ i0.ɵɵelementStart(14, "td", 36);
19871
+ i0.ɵɵtemplate(15, LinkCasesComponent_tr_31_span_15_Template, 4, 3, "span", 39);
19841
19872
  i0.ɵɵelementEnd();
19842
- i0.ɵɵelementStart(16, "td", 39)(17, "a", 43);
19873
+ i0.ɵɵelementStart(16, "td", 36)(17, "a", 40);
19843
19874
  i0.ɵɵlistener("click", function LinkCasesComponent_tr_31_Template_a_click_17_listener() { const ctx_r7 = i0.ɵɵrestoreView(_r6); const case_r9 = ctx_r7.$implicit; const pos_r10 = ctx_r7.index; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onSelectedLinkedCaseRemove(pos_r10, case_r9.caseReference)); });
19844
19875
  i0.ɵɵtext(18, "Remove");
19845
19876
  i0.ɵɵelementEnd()()();
@@ -19868,7 +19899,7 @@ function LinkCasesComponent_tr_31_Template(rf, ctx) { if (rf & 1) {
19868
19899
  i0.ɵɵattribute("id", case_r9.caseReference);
19869
19900
  } }
19870
19901
  function LinkCasesComponent_tr_32_Template(rf, ctx) { if (rf & 1) {
19871
- i0.ɵɵelementStart(0, "tr", 10)(1, "td", 44);
19902
+ i0.ɵɵelementStart(0, "tr", 10)(1, "td", 41);
19872
19903
  i0.ɵɵtext(2, " None ");
19873
19904
  i0.ɵɵelementEnd()();
19874
19905
  } }
@@ -19936,7 +19967,7 @@ class LinkCasesComponent extends AbstractJourneyComponent {
19936
19967
  }
19937
19968
  toggleLinkCaseReasonOtherComments(event) {
19938
19969
  this.linkCaseReasons.find((reason) => reason.value_en === event.target.value).selected = event.target.checked;
19939
- this.showComments = this.linkCaseReasons.some((reason) => reason.value_en === 'Other' && reason.selected);
19970
+ this.showComments = this.linkCaseReasons.find((reason) => reason.value_en === 'Other')?.selected;
19940
19971
  }
19941
19972
  submitCaseInfo() {
19942
19973
  this.errorMessages = [];
@@ -19964,7 +19995,7 @@ class LinkCasesComponent extends AbstractJourneyComponent {
19964
19995
  return false;
19965
19996
  }
19966
19997
  const caseNumber = this.linkCaseForm.value.caseNumber;
19967
- return linkedCases.some((caseLink) => caseLink.caseReference.split('-').join('').trim() === caseNumber.split('-').join('').trim());
19998
+ return !!linkedCases.find((caseLink) => caseLink.caseReference.split('-').join('').trim() === caseNumber.split('-').join('').trim());
19968
19999
  }
19969
20000
  isCaseInInitial(proposedCaseLink) {
19970
20001
  if (proposedCaseLink) {
@@ -19999,7 +20030,7 @@ class LinkCasesComponent extends AbstractJourneyComponent {
19999
20030
  });
20000
20031
  }
20001
20032
  if (this.linkCaseForm.controls.reasonType.valid
20002
- && this.linkCaseReasons.some((reason) => reason.value_en === 'Other' && reason.selected)) {
20033
+ && this.linkCaseReasons.find((reason) => reason.value_en === 'Other').selected) {
20003
20034
  if (this.linkCaseForm.controls.otherDescription.value.trim().length === 0) {
20004
20035
  this.caseReasonCommentsError = LinkedCasesErrorMessages.otherDescriptionError;
20005
20036
  this.errorMessages.push({
@@ -20172,7 +20203,7 @@ class LinkCasesComponent extends AbstractJourneyComponent {
20172
20203
  }
20173
20204
  }
20174
20205
  static ɵfac = function LinkCasesComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LinkCasesComponent)(i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(i4.FormBuilder), i0.ɵɵdirectiveInject(ValidatorsUtils), i0.ɵɵdirectiveInject(LinkedCasesService), i0.ɵɵdirectiveInject(MultipageComponentStateService)); };
20175
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LinkCasesComponent, selectors: [["ccd-link-cases"]], outputs: { linkedCasesStateEmitter: "linkedCasesStateEmitter" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 33, vars: 11, consts: [[1, "govuk-grid-row"], [1, "govuk-grid-column-full"], [1, "govuk-caption-l"], [1, "govuk-heading-xl"], ["class", "form-group", 3, "formGroup", 4, "ngIf"], ["id", "proposedCaseLinks", 1, "govuk-form-group", 3, "ngClass"], ["class", "govuk-error-message", 4, "ngIf"], [1, "govuk-table"], [1, "govuk-table__caption", "govuk-table__caption--m"], [1, "govuk-table__head"], [1, "govuk-table__row"], ["scope", "col", 1, "govuk-table__header", "case-table-column-300"], ["scope", "col", 1, "govuk-table__header", "case-table-column-150"], ["scope", "col", 1, "govuk-table__header", "case-table-column-200"], ["scope", "col", 1, "govuk-table__header", "case-table-column-400"], ["scope", "col", 1, "govuk-table__header", "case-table-column-50"], [1, "govuk-table__body"], ["class", "govuk-table__row", 4, "ngFor", "ngForOf"], ["class", "govuk-table__row", 4, "ngIf"], [1, "form-group", 3, "formGroup"], ["id", "caseNumber", 1, "govuk-form-group", 3, "ngClass"], [1, "govuk-heading-s"], ["for", "width-20", 1, "govuk-label", "govuk-visually-hidden"], ["formControlName", "caseNumber", "id", "width-20", "name", "width-20", "type", "text", 1, "govuk-input", "govuk-input--width-20"], [1, "govuk-!-margin-top-3", 3, "ngClass"], ["id", "waste-hint", 1, "govuk-hint"], ["data-module", "govuk-checkboxes", "formArrayName", "reasonType", "id", "caseReason", 1, "govuk-checkboxes"], ["class", "govuk-checkboxes__item", 3, "formGroupName", 4, "ngFor", "ngForOf"], ["id", "other-description-char-limit-error", "class", "govuk-!-margin-top-3", 3, "ngClass", 4, "ngIf"], ["id", "propose", "type", "button", "data-module", "govuk-button", 1, "govuk-button", "govuk-button--secondary", 3, "click"], [1, "govuk-error-message"], [1, "govuk-visually-hidden"], [1, "govuk-checkboxes__item", 3, "formGroupName"], ["formControlName", "selected", "name", "pos", "type", "checkbox", 1, "govuk-checkboxes__input", 3, "change", "id", "value"], [1, "govuk-label", "govuk-checkboxes__label", 3, "for"], ["id", "other-description-char-limit-error", 1, "govuk-!-margin-top-3", 3, "ngClass"], ["for", "otherDescription", 1, "govuk-label", "govuk-visually-hidden"], ["id", "otherDescription", "name", "otherDescription", "formControlName", "otherDescription", "rows", "5", "aria-describedby", "other-description-char-limit-info other-description-char-limit-error", 1, "govuk-textarea", "govuk-input--width-30"], ["id", "other-description-char-limit-info", "aria-live", "polite", 1, "govuk-hint", "govuk-character-count__message"], [1, "govuk-table__cell"], [1, "govuk-form-group--error", 3, "ngClass"], [1, "govuk-table__cell", 3, "title"], [4, "ngFor", "ngForOf"], [1, "govuk-link", "no-visited-state", 3, "click"], ["colspan", "6", 1, "govuk-table__cell"]], template: function LinkCasesComponent_Template(rf, ctx) { if (rf & 1) {
20206
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LinkCasesComponent, selectors: [["ccd-link-cases"]], outputs: { linkedCasesStateEmitter: "linkedCasesStateEmitter" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 33, vars: 11, consts: [[1, "govuk-grid-row"], [1, "govuk-grid-column-full"], [1, "govuk-caption-l"], [1, "govuk-heading-xl"], ["class", "form-group", 3, "formGroup", 4, "ngIf"], ["id", "caseNumber", 1, "govuk-form-group", 3, "ngClass"], ["class", "govuk-error-message", 4, "ngIf"], [1, "govuk-table"], [1, "govuk-table__caption", "govuk-table__caption--m"], [1, "govuk-table__head"], [1, "govuk-table__row"], ["scope", "col", "width", "300", 1, "govuk-table__header"], ["scope", "col", "width", "150", 1, "govuk-table__header"], ["scope", "col", "width", "200", 1, "govuk-table__header"], ["scope", "col", "width", "400", 1, "govuk-table__header"], ["scope", "col", "width", "50", 1, "govuk-table__header"], [1, "govuk-table__body"], ["class", "govuk-table__row", 4, "ngFor", "ngForOf"], ["class", "govuk-table__row", 4, "ngIf"], [1, "form-group", 3, "formGroup"], [1, "govuk-heading-s"], ["formControlName", "caseNumber", "id", "width-20", "name", "width-20", "type", "text", 1, "govuk-input", "govuk-input--width-20"], [1, "govuk-!-margin-top-3", 3, "ngClass"], ["id", "waste-hint", 1, "govuk-hint"], ["data-module", "govuk-checkboxes", "formArrayName", "reasonType", "id", "caseReason", 1, "govuk-checkboxes"], ["class", "govuk-checkboxes__item", 3, "formGroupName", 4, "ngFor", "ngForOf"], ["id", "other-description-char-limit-error", "class", "govuk-!-margin-top-3", 3, "ngClass", 4, "ngIf"], ["id", "propose", "type", "button", "data-module", "govuk-button", 1, "govuk-button", "govuk-button--secondary", 3, "click"], [1, "govuk-error-message"], [1, "govuk-visually-hidden"], [1, "govuk-checkboxes__item", 3, "formGroupName"], ["formControlName", "selected", "name", "pos", "type", "checkbox", 1, "govuk-checkboxes__input", 3, "change", "id", "value"], [1, "govuk-label", "govuk-checkboxes__label", 3, "for"], ["id", "other-description-char-limit-error", 1, "govuk-!-margin-top-3", 3, "ngClass"], ["id", "otherDescription", "name", "otherDescription", "formControlName", "otherDescription", "rows", "5", "aria-describedby", "other-description-hint other-description-char-limit-info other-description-char-limit-error", 1, "govuk-textarea", "govuk-input--width-30"], ["id", "other-description-char-limit-info", "aria-live", "polite", 1, "govuk-hint", "govuk-character-count__message"], [1, "govuk-table__cell"], [1, "govuk-form-group--error", 3, "ngClass"], [1, "govuk-table__cell", 3, "title"], [4, "ngFor", "ngForOf"], [1, "govuk-link", "no-visited-state", 3, "click"], ["colspan", "6", 1, "govuk-table__cell"]], template: function LinkCasesComponent_Template(rf, ctx) { if (rf & 1) {
20176
20207
  i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "div")(3, "span", 2);
20177
20208
  i0.ɵɵtext(4);
20178
20209
  i0.ɵɵpipe(5, "ccdCaseReference");
@@ -20180,7 +20211,7 @@ class LinkCasesComponent extends AbstractJourneyComponent {
20180
20211
  i0.ɵɵelementStart(6, "h1", 3);
20181
20212
  i0.ɵɵtext(7, "Select a\u00A0case you want to link to this case");
20182
20213
  i0.ɵɵelementEnd();
20183
- i0.ɵɵtemplate(8, LinkCasesComponent_div_8_Template, 22, 13, "div", 4);
20214
+ i0.ɵɵtemplate(8, LinkCasesComponent_div_8_Template, 20, 12, "div", 4);
20184
20215
  i0.ɵɵelement(9, "hr")(10, "br")(11, "br");
20185
20216
  i0.ɵɵelementStart(12, "div", 5);
20186
20217
  i0.ɵɵtemplate(13, LinkCasesComponent_span_13_Template, 4, 1, "span", 6);
@@ -20220,11 +20251,11 @@ class LinkCasesComponent extends AbstractJourneyComponent {
20220
20251
  i0.ɵɵproperty("ngForOf", ctx.selectedCases);
20221
20252
  i0.ɵɵadvance();
20222
20253
  i0.ɵɵproperty("ngIf", !ctx.selectedCases.length);
20223
- } }, styles: [".no-visited-state[_ngcontent-%COMP%]{color:#1d70b8;cursor:pointer}.no-visited-state[_ngcontent-%COMP%]:hover{color:#003078}.govuk-checkboxes[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-wrap:wrap;max-height:500px;width:100%;overflow-x:auto;overflow-y:hidden;padding-top:5px}.govuk-checkboxes[_ngcontent-%COMP%] .govuk-checkboxes__item[_ngcontent-%COMP%]{display:flex} .govuk-width-container .screen-990 .width-50{width:100%}.govuk-table__row[_ngcontent-%COMP%]{position:relative}.govuk-table__row[_ngcontent-%COMP%] .table-group-error[_ngcontent-%COMP%]{position:absolute;height:calc(100% - 20px);margin-left:-15px}.case-table-column-300[_ngcontent-%COMP%]{width:300px}.case-table-column-150[_ngcontent-%COMP%]{width:150px}.case-table-column-200[_ngcontent-%COMP%]{width:200px}.case-table-column-400[_ngcontent-%COMP%]{width:400px}.case-table-column-50[_ngcontent-%COMP%]{width:50px}"] });
20254
+ } }, styles: [".no-visited-state[_ngcontent-%COMP%]{color:#1d70b8;cursor:pointer}.no-visited-state[_ngcontent-%COMP%]:hover{color:#003078}.govuk-checkboxes[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-wrap:wrap;max-height:500px;width:100%;overflow-x:auto;overflow-y:hidden;padding-top:5px}.govuk-checkboxes[_ngcontent-%COMP%] .govuk-checkboxes__item[_ngcontent-%COMP%]{display:flex} .govuk-width-container .screen-990 .width-50{width:100%}.govuk-table__row[_ngcontent-%COMP%]{position:relative}.govuk-table__row[_ngcontent-%COMP%] .table-group-error[_ngcontent-%COMP%]{position:absolute;height:calc(100% - 20px);margin-left:-15px}"] });
20224
20255
  }
20225
20256
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LinkCasesComponent, [{
20226
20257
  type: Component,
20227
- args: [{ selector: 'ccd-link-cases', standalone: false, template: "<div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-full\">\n <div>\n <span class=\"govuk-caption-l\">Link cases to {{caseName}} {{caseId | ccdCaseReference}}</span>\n <h1 class=\"govuk-heading-xl\">Select a&nbsp;case you want to link to this case</h1>\n <div class=\"form-group\" [formGroup]=\"linkCaseForm\" *ngIf=\"linkCaseForm\">\n <div class=\"govuk-form-group\" id=\"caseNumber\" [ngClass]=\"{'govuk-form-group--error': !!caseNumberError}\">\n <h3 class=\"govuk-heading-s\">Enter case reference</h3>\n <span class=\"govuk-error-message\" *ngIf=\"caseNumberError\">\n <span class=\"govuk-visually-hidden\">Error:</span> {{caseNumberError}}\n </span>\n <label class=\"govuk-label govuk-visually-hidden\" for=\"width-20\">\n {{ 'Enter case reference' }}\n </label>\n <input class=\"govuk-input govuk-input--width-20\" formControlName=\"caseNumber\" id=\"width-20\" name=\"width-20\"\n type=\"text\">\n </div>\n <div [ngClass]=\"{'govuk-form-group--error': !!caseReasonError}\" class=\"govuk-!-margin-top-3\">\n <h3 class=\"govuk-heading-s\">Why should these cases be linked?</h3>\n <div id=\"waste-hint\" class=\"govuk-hint\">\n Select all that apply.\n </div>\n <span class=\"govuk-error-message\" *ngIf=\"caseReasonError\">\n <span class=\"govuk-visually-hidden\">Error:</span> {{caseReasonError}}\n </span>\n <div class=\"govuk-checkboxes\" data-module=\"govuk-checkboxes\" formArrayName=\"reasonType\" id=\"caseReason\">\n <div class=\"govuk-checkboxes__item\" *ngFor=\"let reason of linkCaseReasons;index as pos\" [formGroupName]=\"pos\">\n <input class=\"govuk-checkboxes__input\" id=\"{{reason.key}}\" formControlName=\"selected\" name=\"pos\"\n type=\"checkbox\" [value]=\"reason.value_en\" (change)=\"toggleLinkCaseReasonOtherComments($event)\">\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"{{reason.key}}\">{{reason.value_en}}</label>\n </div>\n </div>\n </div>\n <div id=\"other-description-char-limit-error\" [ngClass]=\"{'govuk-form-group--error': !!caseReasonCommentsError}\" class=\"govuk-!-margin-top-3\" *ngIf=\"showComments\">\n <h3 class=\"govuk-heading-s\">Comments</h3>\n <span class=\"govuk-error-message\" *ngIf=\"caseReasonCommentsError\">\n <span class=\"govuk-visually-hidden\">Error:</span> {{caseReasonCommentsError}}\n </span>\n <label class=\"govuk-label govuk-visually-hidden\" for=\"otherDescription\">\n {{ 'Other description' }}\n </label>\n <textarea class=\"govuk-textarea govuk-input--width-30\" id=\"otherDescription\"\n name=\"otherDescription\" formControlName=\"otherDescription\" rows=\"5\"\n aria-describedby=\"other-description-char-limit-info other-description-char-limit-error\">\n </textarea>\n <div id=\"other-description-char-limit-info\" aria-live=\"polite\" class=\"govuk-hint govuk-character-count__message\">\n You can enter up to 100 characters\n </div>\n </div>\n <br><br>\n <span class=\"govuk-error-message\" *ngIf=\"caseSelectionError\">\n <span class=\"govuk-visually-hidden\">Error:</span> {{caseSelectionError}}\n </span>\n <button id=\"propose\" type=\"button\" class=\"govuk-button govuk-button--secondary\" data-module=\"govuk-button\"\n (click)=\"submitCaseInfo()\">Propose case link</button>\n </div>\n <hr>\n <br><br>\n <div class=\"govuk-form-group\" id=\"proposedCaseLinks\" [ngClass]=\"{'govuk-form-group--error': !!noSelectedCaseError}\">\n <span class=\"govuk-error-message\" *ngIf=\"noSelectedCaseError\">\n <span class=\"govuk-visually-hidden\">Error:</span> {{noSelectedCaseError}}\n </span>\n <table class=\"govuk-table\">\n <caption class=\"govuk-table__caption govuk-table__caption--m\">Proposed case links </caption>\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th scope=\"col\" class=\"govuk-table__header case-table-column-300\">Case name and number</th>\n <th scope=\"col\" class=\"govuk-table__header case-table-column-150\">Case type </th>\n <th scope=\"col\" class=\"govuk-table__header case-table-column-200\">Service</th>\n <th scope=\"col\" class=\"govuk-table__header case-table-column-200\">State</th>\n <th scope=\"col\" class=\"govuk-table__header case-table-column-400\">Reasons for case link</th>\n <th scope=\"col\" class=\"govuk-table__header case-table-column-50\"></th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\" *ngFor=\"let case of selectedCases; let pos = index\">\n <td class=\"govuk-table__cell\">\n <div class=\"govuk-form-group--error\"\n [ngClass]=\"{'table-group-error':caseSelectionError && case.caseReference === linkCaseForm.value.caseNumber}\">\n </div>\n <span>{{case.caseName}} <br> {{case.caseReference | ccdCaseReference}}</span>\n </td>\n <td class=\"govuk-table__cell\" [title]=\"case.caseTypeDescription\">{{case.caseType}}</td>\n <td class=\"govuk-table__cell\">{{case.caseService}}</td>\n <td class=\"govuk-table__cell\" [title]=\"case.caseStateDescription\">{{case.caseState}}</td>\n <td class=\"govuk-table__cell\"><span\n *ngFor=\"let reason of case.reasons\">{{reason | ccdLinkCasesReasonValue}}<br></span></td>\n <td class=\"govuk-table__cell\"><a [attr.id]=\"case.caseReference\" (click)=\"onSelectedLinkedCaseRemove(pos, case.caseReference);\"\n class=\"govuk-link no-visited-state\">Remove</a></td>\n </tr>\n <tr class=\"govuk-table__row\" *ngIf=\"!selectedCases.length\">\n <td class=\"govuk-table__cell\" colspan=\"6\">\n None\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n </div>\n</div>\n", styles: [".no-visited-state{color:#1d70b8;cursor:pointer}.no-visited-state:hover{color:#003078}.govuk-checkboxes{display:flex;flex-direction:column;flex-wrap:wrap;max-height:500px;width:100%;overflow-x:auto;overflow-y:hidden;padding-top:5px}.govuk-checkboxes .govuk-checkboxes__item{display:flex}::ng-deep .govuk-width-container .screen-990 .width-50{width:100%}.govuk-table__row{position:relative}.govuk-table__row .table-group-error{position:absolute;height:calc(100% - 20px);margin-left:-15px}.case-table-column-300{width:300px}.case-table-column-150{width:150px}.case-table-column-200{width:200px}.case-table-column-400{width:400px}.case-table-column-50{width:50px}\n"] }]
20258
+ args: [{ selector: 'ccd-link-cases', standalone: false, template: "<div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-full\">\n <div>\n <span class=\"govuk-caption-l\">Link cases to {{caseName}} {{caseId | ccdCaseReference}}</span>\n <h1 class=\"govuk-heading-xl\">Select a&nbsp;case you want to link to this case</h1>\n <div class=\"form-group\" [formGroup]=\"linkCaseForm\" *ngIf=\"linkCaseForm\">\n <div class=\"govuk-form-group\" id=\"caseNumber\" [ngClass]=\"{'govuk-form-group--error': !!caseNumberError}\">\n <h3 class=\"govuk-heading-s\">Enter case reference</h3>\n <span class=\"govuk-error-message\" *ngIf=\"caseNumberError\">\n <span class=\"govuk-visually-hidden\">Error:</span> {{caseNumberError}}\n </span>\n <input class=\"govuk-input govuk-input--width-20\" formControlName=\"caseNumber\" id=\"width-20\" name=\"width-20\"\n type=\"text\">\n </div>\n <div [ngClass]=\"{'govuk-form-group--error': !!caseReasonError}\" class=\"govuk-!-margin-top-3\">\n <h3 class=\"govuk-heading-s\">Why should these cases be linked?</h3>\n <div id=\"waste-hint\" class=\"govuk-hint\">\n Select all that apply.\n </div>\n <span class=\"govuk-error-message\" *ngIf=\"caseReasonError\">\n <span class=\"govuk-visually-hidden\">Error:</span> {{caseReasonError}}\n </span>\n <div class=\"govuk-checkboxes\" data-module=\"govuk-checkboxes\" formArrayName=\"reasonType\" id=\"caseReason\">\n <div class=\"govuk-checkboxes__item\" *ngFor=\"let reason of linkCaseReasons;index as pos\" [formGroupName]=\"pos\">\n <input class=\"govuk-checkboxes__input\" id=\"{{reason.key}}\" formControlName=\"selected\" name=\"pos\"\n type=\"checkbox\" [value]=\"reason.value_en\" (change)=\"toggleLinkCaseReasonOtherComments($event)\">\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"{{reason.key}}\">{{reason.value_en}}</label>\n </div>\n </div>\n </div>\n <div id=\"other-description-char-limit-error\" [ngClass]=\"{'govuk-form-group--error': !!caseReasonCommentsError}\" class=\"govuk-!-margin-top-3\" *ngIf=\"showComments\">\n <h3 class=\"govuk-heading-s\">Comments</h3>\n <span class=\"govuk-error-message\" *ngIf=\"caseReasonCommentsError\">\n <span class=\"govuk-visually-hidden\">Error:</span> {{caseReasonCommentsError}}\n </span>\n <textarea class=\"govuk-textarea govuk-input--width-30\" id=\"otherDescription\"\n name=\"otherDescription\" formControlName=\"otherDescription\" rows=\"5\"\n aria-describedby=\"other-description-hint other-description-char-limit-info other-description-char-limit-error\">\n </textarea>\n <div id=\"other-description-char-limit-info\" aria-live=\"polite\" class=\"govuk-hint govuk-character-count__message\">\n You can enter up to 100 characters\n </div>\n </div>\n <br><br>\n <span class=\"govuk-error-message\" *ngIf=\"caseSelectionError\">\n <span class=\"govuk-visually-hidden\">Error:</span> {{caseSelectionError}}\n </span>\n <button id=\"propose\" type=\"button\" class=\"govuk-button govuk-button--secondary\" data-module=\"govuk-button\"\n (click)=\"submitCaseInfo()\">Propose case link</button>\n </div>\n <hr>\n <br><br>\n <div class=\"govuk-form-group\" id=\"caseNumber\" [ngClass]=\"{'govuk-form-group--error': !!noSelectedCaseError}\">\n <span class=\"govuk-error-message\" *ngIf=\"noSelectedCaseError\">\n <span class=\"govuk-visually-hidden\">Error:</span> {{noSelectedCaseError}}\n </span>\n <table class=\"govuk-table\">\n <caption class=\"govuk-table__caption govuk-table__caption--m\">Proposed case links </caption>\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th scope=\"col\" class=\"govuk-table__header\" width=\"300\">Case name and number</th>\n <th scope=\"col\" class=\"govuk-table__header\" width=\"150\">Case type </th>\n <th scope=\"col\" class=\"govuk-table__header\" width=\"200\">Service</th>\n <th scope=\"col\" class=\"govuk-table__header\" width=\"200\">State</th>\n <th scope=\"col\" class=\"govuk-table__header\" width=\"400\">Reasons for case link</th>\n <th scope=\"col\" class=\"govuk-table__header\" width=\"50\"></th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\" *ngFor=\"let case of selectedCases; let pos = index\">\n <td class=\"govuk-table__cell\">\n <div class=\"govuk-form-group--error\"\n [ngClass]=\"{'table-group-error':caseSelectionError && case.caseReference === linkCaseForm.value.caseNumber}\">\n </div>\n <span>{{case.caseName}} <br> {{case.caseReference | ccdCaseReference}}</span>\n </td>\n <td class=\"govuk-table__cell\" [title]=\"case.caseTypeDescription\">{{case.caseType}}</td>\n <td class=\"govuk-table__cell\">{{case.caseService}}</td>\n <td class=\"govuk-table__cell\" [title]=\"case.caseStateDescription\">{{case.caseState}}</td>\n <td class=\"govuk-table__cell\"><span\n *ngFor=\"let reason of case.reasons\">{{reason | ccdLinkCasesReasonValue}}<br></span></td>\n <td class=\"govuk-table__cell\"><a [attr.id]=\"case.caseReference\" (click)=\"onSelectedLinkedCaseRemove(pos, case.caseReference);\"\n class=\"govuk-link no-visited-state\">Remove</a></td>\n </tr>\n <tr class=\"govuk-table__row\" *ngIf=\"!selectedCases.length\">\n <td class=\"govuk-table__cell\" colspan=\"6\">\n None\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n </div>\n</div>\n", styles: [".no-visited-state{color:#1d70b8;cursor:pointer}.no-visited-state:hover{color:#003078}.govuk-checkboxes{display:flex;flex-direction:column;flex-wrap:wrap;max-height:500px;width:100%;overflow-x:auto;overflow-y:hidden;padding-top:5px}.govuk-checkboxes .govuk-checkboxes__item{display:flex}::ng-deep .govuk-width-container .screen-990 .width-50{width:100%}.govuk-table__row{position:relative}.govuk-table__row .table-group-error{position:absolute;height:calc(100% - 20px);margin-left:-15px}\n"] }]
20228
20259
  }], () => [{ type: CasesService }, { type: i4.FormBuilder }, { type: ValidatorsUtils }, { type: LinkedCasesService }, { type: MultipageComponentStateService }], { linkedCasesStateEmitter: [{
20229
20260
  type: Output
20230
20261
  }] }); })();
@@ -20388,7 +20419,7 @@ class LinkedCasesFromTableComponent {
20388
20419
  }
20389
20420
  ngAfterViewInit() {
20390
20421
  const labelField = document.getElementsByClassName('case-viewer-label');
20391
- if (labelField?.length) {
20422
+ if (labelField && labelField.length) {
20392
20423
  labelField[0].replaceWith('');
20393
20424
  }
20394
20425
  }
@@ -20448,7 +20479,7 @@ class LinkedCasesFromTableComponent {
20448
20479
  : 'Show';
20449
20480
  }
20450
20481
  static ɵfac = function LinkedCasesFromTableComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LinkedCasesFromTableComponent)(i0.ɵɵdirectiveInject(i1$2.ActivatedRoute), i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(LinkedCasesService)); };
20451
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LinkedCasesFromTableComponent, selectors: [["ccd-linked-cases-from-table"]], inputs: { caseField: "caseField" }, outputs: { notifyAPIFailure: "notifyAPIFailure" }, standalone: false, decls: 2, vars: 2, consts: [["type", "button", "id", "show-hide-link", "class", "govuk-js-link", 3, "click", 4, "ngIf"], ["aria-label", "table to display cases linked from", 4, "ngIf"], ["type", "button", "id", "show-hide-link", 1, "govuk-js-link", 3, "click"], ["aria-label", "table to display cases linked from"], [1, "govuk-table__head"], [1, "govuk-table__row"], ["scope", "col", 1, "govuk-table__header", "case-table-column"], ["class", "govuk-table__body", 4, "ngIf"], [1, "govuk-table__body"], ["class", "govuk-table__row", 4, "ngFor", "ngForOf"], ["class", "govuk-table__row", 4, "ngIf"], [1, "govuk-table__header", "case-table-column", "width-20"], [1, "govuk-body"], ["target", "_blank", "rel", "noopener", 1, "govuk-link", 3, "href"], [1, "case-table-column"], [3, "title"], ["class", "case-table-column", 4, "ngFor", "ngForOf"], [4, "ngFor", "ngForOf"], ["class", "govuk-!-padding-left-1", 3, "href", 4, "ngIf"], [4, "ngIf"], [1, "govuk-!-padding-left-1", 3, "href"], ["colspan", "5", 1, "govuk-table__cell"]], template: function LinkedCasesFromTableComponent_Template(rf, ctx) { if (rf & 1) {
20482
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LinkedCasesFromTableComponent, selectors: [["ccd-linked-cases-from-table"]], inputs: { caseField: "caseField" }, outputs: { notifyAPIFailure: "notifyAPIFailure" }, standalone: false, decls: 2, vars: 2, consts: [["type", "button", "id", "show-hide-link", "class", "govuk-js-link", 3, "click", 4, "ngIf"], ["aria-label", "table to display cases linked from", 4, "ngIf"], ["type", "button", "id", "show-hide-link", 1, "govuk-js-link", 3, "click"], ["aria-label", "table to display cases linked from"], [1, "govuk-table__head"], [1, "govuk-table__row"], ["scope", "col", "width", "20%", 1, "govuk-table__header", "case-table-column"], ["class", "govuk-table__body", 4, "ngIf"], [1, "govuk-table__body"], ["class", "govuk-table__row", 4, "ngFor", "ngForOf"], ["class", "govuk-table__row", 4, "ngIf"], [1, "govuk-table__header", "case-table-column", "width-20"], [1, "govuk-body"], ["target", "_blank", "rel", "noopener", 1, "govuk-link", 3, "href"], [1, "case-table-column"], [3, "title"], ["class", "case-table-column", 4, "ngFor", "ngForOf"], [4, "ngFor", "ngForOf"], ["class", "govuk-!-padding-left-1", 3, "href", 4, "ngIf"], [4, "ngIf"], [1, "govuk-!-padding-left-1", 3, "href"], ["colspan", "5", 1, "govuk-table__cell"]], template: function LinkedCasesFromTableComponent_Template(rf, ctx) { if (rf & 1) {
20452
20483
  i0.ɵɵtemplate(0, LinkedCasesFromTableComponent_button_0_Template, 2, 1, "button", 0)(1, LinkedCasesFromTableComponent_table_1_Template, 14, 1, "table", 1);
20453
20484
  } if (rf & 2) {
20454
20485
  i0.ɵɵproperty("ngIf", !ctx.noLinkedCases && !ctx.isServerError);
@@ -20458,7 +20489,7 @@ class LinkedCasesFromTableComponent {
20458
20489
  }
20459
20490
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LinkedCasesFromTableComponent, [{
20460
20491
  type: Component,
20461
- args: [{ selector: 'ccd-linked-cases-from-table', standalone: false, template: "<button type=\"button\" *ngIf=\"!noLinkedCases && !isServerError\" id=\"show-hide-link\" class=\"govuk-js-link\"\n (click)=\"onClick()\">{{showHideLinkText}}</button>\n<table *ngIf=\"(getLinkedCasesResponse && showHideLinkText === 'Hide') || noLinkedCases\"\n aria-label=\"table to display cases linked from\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th scope=\"col\" class=\"govuk-table__header case-table-column\">Case name and number</th>\n <th scope=\"col\" class=\"govuk-table__header case-table-column\">Case type </th>\n <th scope=\"col\" class=\"govuk-table__header case-table-column\">Service</th>\n <th scope=\"col\" class=\"govuk-table__header case-table-column\">State</th>\n <th scope=\"col\" class=\"govuk-table__header case-table-column\">Reasons for case link</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"getLinkedCasesResponse && (!isServerError && !isServerReasonCodeError)\">\n <tr class=\"govuk-table__row\" *ngFor=\"let case of getLinkedCasesResponse\">\n <td class=\"govuk-table__header case-table-column width-20\">\n <p class=\"govuk-body\"><a target=\"_blank\" class=\"govuk-link\" href=\"cases/case-details/{{ case.ccdJurisdiction }}/{{ case.ccdCaseType }}/{{case.caseReference}}\"\n rel=\"noopener\"><span>{{case.caseNameHmctsInternal}} <br>\n {{case.caseReference | ccdCaseReference}}</span></a></p>\n </td>\n <td class=\"case-table-column\"><span [title]=\"case.ccdCaseTypeDescription\">{{case.ccdCaseType}}</span></td>\n <td class=\"case-table-column\"><span>{{case.ccdJurisdiction}}</span></td>\n <td class=\"case-table-column\"><span [title]=\"case.stateDescription\">{{case.state}}</span></td>\n <td class=\"case-table-column\" *ngFor=\"let details of case.linkDetails\">\n <span *ngFor=\"let reason of details.reasons; let i = index; let isLast = last\">\n {{reason | ccdLinkCasesFromReasonValue}}<span><a class=\"govuk-!-padding-left-1\"\n href=\"cases/case-details/{{ case.ccdJurisdiction }}/{{ case.ccdCaseType }}/{{ case.caseReference }}\"\n *ngIf=\"hasLeadCaseOrConsolidated(reason.reasonCode)\">{{getCaseReferenceLink(case.caseReference)}}</a></span>\n <br *ngIf=\"!isLast\" />\n </span>\n </td>\n </tr>\n <tr class=\"govuk-table__row\" *ngIf=\"noLinkedCases\">\n <td class=\"govuk-table__cell\" colspan=\"5\">\n None\n </td>\n </tr>\n </tbody>\n</table>\n", styles: [".govuk-js-link{appearance:none;background:none;border:none;color:#005ea5;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0;text-decoration:underline}.govuk-js-link:hover{color:#2b8cc4;text-decoration-thickness:max(3px,.1875rem,.12em)}.govuk-js-link:focus{background-color:#ffbf47;color:#000;outline:3px solid transparent;text-decoration:none;box-shadow:0 -2px #ffbf47,0 4px #000}.govuk-js-link:visited{color:#4c2c92}.case-table-column{min-width:20%;max-width:20%}.heading-h2{margin-bottom:0}\n"] }]
20492
+ args: [{ selector: 'ccd-linked-cases-from-table', standalone: false, template: "<button type=\"button\" *ngIf=\"!noLinkedCases && !isServerError\" id=\"show-hide-link\" class=\"govuk-js-link\"\n (click)=\"onClick()\">{{showHideLinkText}}</button>\n<table *ngIf=\"(getLinkedCasesResponse && showHideLinkText === 'Hide') || noLinkedCases\"\n aria-label=\"table to display cases linked from\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th scope=\"col\" class=\"govuk-table__header case-table-column\" width=\"20%\">Case name and number</th>\n <th scope=\"col\" class=\"govuk-table__header case-table-column\" width=\"20%\">Case type </th>\n <th scope=\"col\" class=\"govuk-table__header case-table-column\" width=\"20%\">Service</th>\n <th scope=\"col\" class=\"govuk-table__header case-table-column\" width=\"20%\">State</th>\n <th scope=\"col\" class=\"govuk-table__header case-table-column\" width=\"20%\">Reasons for case link</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"getLinkedCasesResponse && (!isServerError && !isServerReasonCodeError)\">\n <tr class=\"govuk-table__row\" *ngFor=\"let case of getLinkedCasesResponse\">\n <td class=\"govuk-table__header case-table-column width-20\">\n <p class=\"govuk-body\"><a target=\"_blank\" class=\"govuk-link\" href=\"cases/case-details/{{ case.ccdJurisdiction }}/{{ case.ccdCaseType }}/{{case.caseReference}}\"\n rel=\"noopener\"><span>{{case.caseNameHmctsInternal}} <br>\n {{case.caseReference | ccdCaseReference}}</span></a></p>\n </td>\n <td class=\"case-table-column\"><span [title]=\"case.ccdCaseTypeDescription\">{{case.ccdCaseType}}</span></td>\n <td class=\"case-table-column\"><span>{{case.ccdJurisdiction}}</span></td>\n <td class=\"case-table-column\"><span [title]=\"case.stateDescription\">{{case.state}}</span></td>\n <td class=\"case-table-column\" *ngFor=\"let details of case.linkDetails\">\n <span *ngFor=\"let reason of details.reasons; let i = index; let isLast = last\">\n {{reason | ccdLinkCasesFromReasonValue}}<span><a class=\"govuk-!-padding-left-1\"\n href=\"cases/case-details/{{ case.ccdJurisdiction }}/{{ case.ccdCaseType }}/{{ case.caseReference }}\"\n *ngIf=\"hasLeadCaseOrConsolidated(reason.reasonCode)\">{{getCaseReferenceLink(case.caseReference)}}</a></span>\n <br *ngIf=\"!isLast\" />\n </span>\n </td>\n </tr>\n <tr class=\"govuk-table__row\" *ngIf=\"noLinkedCases\">\n <td class=\"govuk-table__cell\" colspan=\"5\">\n None\n </td>\n </tr>\n </tbody> \n</table>\n", styles: [".govuk-js-link{appearance:none;background:none;border:none;color:#005ea5;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0;text-decoration:underline}.govuk-js-link:hover{color:#2b8cc4;text-decoration-thickness:max(3px,.1875rem,.12em)}.govuk-js-link:focus{background-color:#ffbf47;color:#000;outline:3px solid transparent;text-decoration:none;box-shadow:0 -2px #ffbf47,0 4px #000}.govuk-js-link:visited{color:#4c2c92}.case-table-column{min-width:20%;max-width:20%}.heading-h2{margin-bottom:0}\n"] }]
20462
20493
  }], () => [{ type: i1$2.ActivatedRoute }, { type: CasesService }, { type: LinkedCasesService }], { caseField: [{
20463
20494
  type: Input
20464
20495
  }], notifyAPIFailure: [{
@@ -20601,11 +20632,11 @@ class LinkedCasesToTableComponent {
20601
20632
  }
20602
20633
  ngAfterViewInit() {
20603
20634
  let labelField = document.getElementsByClassName('govuk-heading-l');
20604
- if (labelField?.length) {
20635
+ if (labelField && labelField.length) {
20605
20636
  labelField[0].replaceWith('');
20606
20637
  }
20607
20638
  labelField = document.getElementsByClassName('heading-h2');
20608
- if (labelField?.length) {
20639
+ if (labelField && labelField.length) {
20609
20640
  labelField[0].replaceWith('');
20610
20641
  }
20611
20642
  }
@@ -20724,7 +20755,7 @@ class LinkedCasesToTableComponent {
20724
20755
  };
20725
20756
  }
20726
20757
  static ɵfac = function LinkedCasesToTableComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LinkedCasesToTableComponent)(i0.ɵɵdirectiveInject(i1$2.ActivatedRoute), i0.ɵɵdirectiveInject(LinkedCasesService), i0.ɵɵdirectiveInject(CasesService)); };
20727
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LinkedCasesToTableComponent, selectors: [["ccd-linked-cases-to-table"]], inputs: { caseField: "caseField" }, outputs: { notifyAPIFailure: "notifyAPIFailure" }, standalone: false, decls: 3, vars: 1, consts: [[1, "govuk-grid-row", "govuk-!-margin-bottom-2"], [1, "govuk-grid-column-full"], ["aria-label", "table to display cases linked TO", 4, "ngIf"], ["aria-label", "table to display cases linked TO"], [1, "govuk-table__row"], ["scope", "col", 1, "govuk-table__header", "case-table-column"], [1, "govuk-table__body"], ["class", "govuk-table__row", 4, "ngFor", "ngForOf"], ["class", "govuk-table__row", 4, "ngIf"], [1, "govuk-body"], ["target", "_blank", "rel", "noopener", 3, "href"], [1, "govuk-link"], [3, "title"], [4, "ngIf"], [4, "ngFor", "ngForOf"], ["class", "govuk-!-padding-left-1", 3, "href", 4, "ngIf"], [1, "govuk-!-padding-left-1", 3, "href"], ["colspan", "5", 1, "govuk-table__cell"]], template: function LinkedCasesToTableComponent_Template(rf, ctx) { if (rf & 1) {
20758
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LinkedCasesToTableComponent, selectors: [["ccd-linked-cases-to-table"]], inputs: { caseField: "caseField" }, outputs: { notifyAPIFailure: "notifyAPIFailure" }, standalone: false, decls: 3, vars: 1, consts: [[1, "govuk-grid-row", "govuk-!-margin-bottom-2"], [1, "govuk-grid-column-full"], ["aria-label", "table to display cases linked TO", 4, "ngIf"], ["aria-label", "table to display cases linked TO"], [1, "govuk-table__row"], ["scope", "col", "width", "20%", 1, "govuk-table__header", "case-table-column"], [1, "govuk-table__body"], ["class", "govuk-table__row", 4, "ngFor", "ngForOf"], ["class", "govuk-table__row", 4, "ngIf"], [1, "govuk-body"], ["target", "_blank", "rel", "noopener", 3, "href"], [1, "govuk-link"], [3, "title"], [4, "ngIf"], [4, "ngFor", "ngForOf"], ["class", "govuk-!-padding-left-1", 3, "href", 4, "ngIf"], [1, "govuk-!-padding-left-1", 3, "href"], ["colspan", "5", 1, "govuk-table__cell"]], template: function LinkedCasesToTableComponent_Template(rf, ctx) { if (rf & 1) {
20728
20759
  i0.ɵɵelementStart(0, "div", 0)(1, "div", 1);
20729
20760
  i0.ɵɵtemplate(2, LinkedCasesToTableComponent_table_2_Template, 16, 2, "table", 2);
20730
20761
  i0.ɵɵelementEnd()();
@@ -20735,7 +20766,7 @@ class LinkedCasesToTableComponent {
20735
20766
  }
20736
20767
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LinkedCasesToTableComponent, [{
20737
20768
  type: Component,
20738
- args: [{ selector: 'ccd-linked-cases-to-table', standalone: false, template: "<div class=\"govuk-grid-row govuk-!-margin-bottom-2\">\n <div class=\"govuk-grid-column-full\">\n <table *ngIf=\"linkedCasesFromResponse\" aria-label=\"table to display cases linked TO\">\n <thead>\n <tr class=\"govuk-table__row\">\n <th scope=\"col\" class=\"govuk-table__header case-table-column\">Case name and number</th>\n <th scope=\"col\" class=\"govuk-table__header case-table-column\">Case type </th>\n <th scope=\"col\" class=\"govuk-table__header case-table-column\">Service</th>\n <th scope=\"col\" class=\"govuk-table__header case-table-column\">State</th>\n <th scope=\"col\" class=\"govuk-table__header case-table-column\">Reasons for case link</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\" *ngFor=\"let case of linkedCasesFromResponse\">\n <td>\n <p class=\"govuk-body\"><a target=\"_blank\" href=\"cases/case-details/{{ case.service }}/{{ case.caseType }}/{{case.caseReference}}\"\n rel=\"noopener\"><span class=\"govuk-link\">{{case.caseName}} <br>\n {{case.caseReference | ccdCaseReference}}</span></a></p>\n </td>\n <td><span [title]=\"case.caseTypeDescription\">{{case.caseType}}</span></td>\n <td><span>{{case.service}}</span></td>\n <td><span [title]=\"case.stateDescription\">{{case.state}}</span>\n </td>\n <td *ngIf=\"case && case.reasons\">\n <span *ngFor=\"let reason of case.reasons; let i = index; let isLast = last\">\n {{reason.value | ccdLinkCasesReasonValue}}<span><a class=\"govuk-!-padding-left-1\"\n href=\"cases/case-details/{{ case.service }}/{{ case.caseType }}/{{ case.caseReference }}\"\n *ngIf=\"hasLeadCaseOrConsolidated(reason.value.Reason)\">{{getCaseRefereneLink(case.caseReference)}}</a></span>\n <br *ngIf=\"!isLast\" />\n </span>\n </td>\n </tr>\n <tr class=\"govuk-table__row\" *ngIf=\"linkedCasesFromResponse.length === 0 && (!isServerError && !isServerReasonCodeError)\">\n <td class=\"govuk-table__cell\" colspan=\"5\">\n None\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n</div>\n", styles: [".case-table-column{min-width:20%;max-width:20%}\n"] }]
20769
+ args: [{ selector: 'ccd-linked-cases-to-table', standalone: false, template: "<div class=\"govuk-grid-row govuk-!-margin-bottom-2\">\n <div class=\"govuk-grid-column-full\">\n <table *ngIf=\"linkedCasesFromResponse\" aria-label=\"table to display cases linked TO\">\n <thead>\n <tr class=\"govuk-table__row\">\n <th scope=\"col\" class=\"govuk-table__header case-table-column\" width=\"20%\">Case name and number</th>\n <th scope=\"col\" class=\"govuk-table__header case-table-column\" width=\"20%\">Case type </th>\n <th scope=\"col\" class=\"govuk-table__header case-table-column\" width=\"20%\">Service</th>\n <th scope=\"col\" class=\"govuk-table__header case-table-column\" width=\"20%\">State</th>\n <th scope=\"col\" class=\"govuk-table__header case-table-column\" width=\"20%\">Reasons for case link</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\" *ngFor=\"let case of linkedCasesFromResponse\">\n <td>\n <p class=\"govuk-body\"><a target=\"_blank\" href=\"cases/case-details/{{ case.service }}/{{ case.caseType }}/{{case.caseReference}}\"\n rel=\"noopener\"><span class=\"govuk-link\">{{case.caseName}} <br>\n {{case.caseReference | ccdCaseReference}}</span></a></p>\n </td>\n <td><span [title]=\"case.caseTypeDescription\">{{case.caseType}}</span></td>\n <td><span>{{case.service}}</span></td>\n <td><span [title]=\"case.stateDescription\">{{case.state}}</span>\n </td>\n <td *ngIf=\"case && case.reasons\">\n <span *ngFor=\"let reason of case.reasons; let i = index; let isLast = last\">\n {{reason.value | ccdLinkCasesReasonValue}}<span><a class=\"govuk-!-padding-left-1\"\n href=\"cases/case-details/{{ case.service }}/{{ case.caseType }}/{{ case.caseReference }}\"\n *ngIf=\"hasLeadCaseOrConsolidated(reason.value.Reason)\">{{getCaseRefereneLink(case.caseReference)}}</a></span>\n <br *ngIf=\"!isLast\" />\n </span>\n </td>\n </tr>\n <tr class=\"govuk-table__row\" *ngIf=\"linkedCasesFromResponse.length === 0 && (!isServerError && !isServerReasonCodeError)\">\n <td class=\"govuk-table__cell\" colspan=\"5\">\n None\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n</div>\n", styles: [".case-table-column{min-width:20%;max-width:20%}\n"] }]
20739
20770
  }], () => [{ type: i1$2.ActivatedRoute }, { type: LinkedCasesService }, { type: CasesService }], { caseField: [{
20740
20771
  type: Input
20741
20772
  }], notifyAPIFailure: [{
@@ -20933,7 +20964,7 @@ class UnLinkCasesComponent extends AbstractFieldWriteJourneyComponent {
20933
20964
  searchCases.forEach((response) => {
20934
20965
  const linkedCaseFromList = this.linkedCases.find((linkedCase) => {
20935
20966
  const caseRefToUse = this.getLinkedCaseId(linkedCase);
20936
- if (this.linkedCasesService.casesToUnlink.includes(caseRefToUse)) {
20967
+ if (this.linkedCasesService.casesToUnlink.indexOf(caseRefToUse) > -1) {
20937
20968
  linkedCase.unlink = true;
20938
20969
  }
20939
20970
  return caseRefToUse === response.case_id;
@@ -20991,7 +21022,7 @@ class UnLinkCasesComponent extends AbstractFieldWriteJourneyComponent {
20991
21022
  onNext() {
20992
21023
  this.resetErrorMessages();
20993
21024
  let navigateToNextPage = true;
20994
- const casesMarkedToUnlink = this.linkedCases.some((linkedCase) => linkedCase.unlink && linkedCase.unlink === true);
21025
+ const casesMarkedToUnlink = this.linkedCases.find((linkedCase) => linkedCase.unlink && linkedCase.unlink === true);
20995
21026
  if (!casesMarkedToUnlink) {
20996
21027
  this.errorMessages.push({
20997
21028
  title: 'case-selection',
@@ -21161,7 +21192,7 @@ function ReadLinkedCasesFieldComponent_ng_template_18_Template(rf, ctx) { if (rf
21161
21192
  i0.ɵɵelementStart(0, "div", 8)(1, "p", 9);
21162
21193
  i0.ɵɵtext(2);
21163
21194
  i0.ɵɵelementEnd();
21164
- i0.ɵɵelementStart(3, "span", 10)(4, "a", 12);
21195
+ i0.ɵɵelementStart(3, "span", 10)(4, "a", 11);
21165
21196
  i0.ɵɵlistener("click", function ReadLinkedCasesFieldComponent_ng_template_18_Template_a_click_4_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(); ctx_r2.reloadCurrentRoute(); return i0.ɵɵresetView($event.preventDefault()); });
21166
21197
  i0.ɵɵtext(5, "Reload the Linked cases tab");
21167
21198
  i0.ɵɵelementEnd()()();
@@ -21193,7 +21224,7 @@ class ReadLinkedCasesFieldComponent {
21193
21224
  this.commonDataService = commonDataService;
21194
21225
  }
21195
21226
  ngOnInit() {
21196
- if (this.route.snapshot.data.case?.tabs) {
21227
+ if (this.route.snapshot.data.case && this.route.snapshot.data.case.tabs) {
21197
21228
  const tabs = this.route.snapshot.data.case.tabs;
21198
21229
  const tab = tabs?.filter(tabItem => tabItem.fields?.some(field => field.id === 'caseLinks'))[0];
21199
21230
  this.caseField = tab?.fields?.find(field => field.id === 'caseLinks');
@@ -21220,15 +21251,15 @@ class ReadLinkedCasesFieldComponent {
21220
21251
  ngAfterViewInit() {
21221
21252
  this.linkedCasesService.caseFieldValue = this.caseField?.value ?? [];
21222
21253
  let labelField = document.getElementsByClassName('govuk-heading-l');
21223
- if (labelField?.length) {
21254
+ if (labelField && labelField.length) {
21224
21255
  labelField[0].replaceWith('');
21225
21256
  }
21226
21257
  labelField = document.getElementsByClassName('heading-h2');
21227
- if (labelField?.length) {
21258
+ if (labelField && labelField.length) {
21228
21259
  labelField[0].replaceWith('');
21229
21260
  }
21230
21261
  labelField = document.getElementsByClassName('case-viewer-label');
21231
- if (labelField?.length) {
21262
+ if (labelField && labelField.length) {
21232
21263
  labelField[0].replaceWith('');
21233
21264
  }
21234
21265
  }
@@ -21242,12 +21273,12 @@ class ReadLinkedCasesFieldComponent {
21242
21273
  this.isServerLinkedFromError = true;
21243
21274
  }
21244
21275
  static ɵfac = function ReadLinkedCasesFieldComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ReadLinkedCasesFieldComponent)(i0.ɵɵdirectiveInject(i1$2.ActivatedRoute), i0.ɵɵdirectiveInject(i1$2.Router), i0.ɵɵdirectiveInject(LinkedCasesService), i0.ɵɵdirectiveInject(AbstractAppConfig), i0.ɵɵdirectiveInject(CommonDataService)); };
21245
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ReadLinkedCasesFieldComponent, selectors: [["ccd-read-linked-cases-field"]], standalone: false, decls: 20, vars: 10, consts: [["singleApiError", ""], ["multiApisError", ""], [1, "govuk-!-margin-bottom-2"], [1, "heading-h1"], [1, "table-sub-heading"], ["reloadPage", "reload", 3, "notifyAPIFailure", "caseField"], [4, "ngIf", "ngIfThen"], [1, "govuk-!-margin-top-8"], [1, "govuk-main-wrapper"], [1, "govuk-body"], [1, "govuk-body", "align-left"], ["href", "#", "id", "reload-linked-cases-single-error-tab", 1, "govuk-link", 3, "click"], ["href", "#", "id", "reload-linked-cases-multi-error-tab", 1, "govuk-link", 3, "click"]], template: function ReadLinkedCasesFieldComponent_Template(rf, ctx) { if (rf & 1) {
21276
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ReadLinkedCasesFieldComponent, selectors: [["ccd-read-linked-cases-field"]], standalone: false, decls: 20, vars: 10, consts: [["singleApiError", ""], ["multiApisError", ""], [1, "govuk-!-margin-bottom-2"], [1, "heading-h1"], [1, "table-sub-heading"], ["reloadPage", "reload", 3, "notifyAPIFailure", "caseField"], [4, "ngIf", "ngIfThen"], [1, "govuk-!-margin-top-8"], [1, "govuk-main-wrapper"], [1, "govuk-body"], [1, "govuk-body", "align-left"], ["href", "#", "id", "reload-linked-cases-tab", 1, "govuk-link", 3, "click"]], template: function ReadLinkedCasesFieldComponent_Template(rf, ctx) { if (rf & 1) {
21246
21277
  const _r1 = i0.ɵɵgetCurrentView();
21247
21278
  i0.ɵɵelementStart(0, "div")(1, "div", 2)(2, "h1", 3);
21248
21279
  i0.ɵɵtext(3, "Linked cases");
21249
21280
  i0.ɵɵelementEnd();
21250
- i0.ɵɵelementStart(4, "span", 4);
21281
+ i0.ɵɵelementStart(4, "label", 4);
21251
21282
  i0.ɵɵtext(5, "This case is linked to");
21252
21283
  i0.ɵɵelementEnd();
21253
21284
  i0.ɵɵelementStart(6, "ccd-linked-cases-to-table", 5);
@@ -21255,7 +21286,7 @@ class ReadLinkedCasesFieldComponent {
21255
21286
  i0.ɵɵelementEnd();
21256
21287
  i0.ɵɵtemplate(7, ReadLinkedCasesFieldComponent_ng_container_7_Template, 1, 0, "ng-container", 6)(8, ReadLinkedCasesFieldComponent_ng_container_8_Template, 1, 0, "ng-container", 6);
21257
21288
  i0.ɵɵelementEnd();
21258
- i0.ɵɵelementStart(9, "div", 7)(10, "span", 4);
21289
+ i0.ɵɵelementStart(9, "div", 7)(10, "label", 4);
21259
21290
  i0.ɵɵtext(11, "This case is linked from");
21260
21291
  i0.ɵɵelementEnd();
21261
21292
  i0.ɵɵelement(12, "br");
@@ -21284,7 +21315,7 @@ class ReadLinkedCasesFieldComponent {
21284
21315
  }
21285
21316
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadLinkedCasesFieldComponent, [{
21286
21317
  type: Component,
21287
- args: [{ selector: 'ccd-read-linked-cases-field', standalone: false, template: "<div>\n <div class=\"govuk-!-margin-bottom-2\">\n <h1 class=\"heading-h1\">Linked cases</h1>\n <span class=\"table-sub-heading\">This case is linked to</span>\n <ccd-linked-cases-to-table [caseField]=\"caseField\" (notifyAPIFailure)=\"getFailureLinkedToNotification($event)\"\n reloadPage=\"reload\"></ccd-linked-cases-to-table>\n <ng-container\n *ngIf=\"(isServerLinkedToError && isServerJurisdictionError && isServerReasonCodeError); then multiApisError;\">\n </ng-container>\n <ng-container\n *ngIf=\"!(isServerLinkedToError && isServerJurisdictionError && isServerReasonCodeError) && (isServerLinkedToError || isServerJurisdictionError || isServerReasonCodeError); then singleApiError;\">\n </ng-container>\n </div>\n <div class=\"govuk-!-margin-top-8\">\n <span class=\"table-sub-heading\">This case is linked from</span>\n <br>\n <ccd-linked-cases-from-table [caseField]=\"caseField\" (notifyAPIFailure)=\"getFailureLinkedFromNotification($event)\"\n reloadPage=\"reload\"></ccd-linked-cases-from-table>\n <ng-container\n *ngIf=\"(isServerLinkedFromError && isServerJurisdictionError && isServerReasonCodeError); then multiApisError;\">\n </ng-container>\n <ng-container\n *ngIf=\"!(isServerLinkedFromError && isServerJurisdictionError && isServerReasonCodeError) && (isServerLinkedFromError || isServerJurisdictionError || isServerReasonCodeError); then singleApiError;\">\n </ng-container>\n </div>\n</div>\n\n<ng-template #singleApiError>\n <div class=\"govuk-main-wrapper\">\n <p class=\"govuk-body\">{{serverLinkedApiError.message}}</p>\n <span class=\"govuk-body align-left\">\n <a href=\"#\" (click)=\"reloadCurrentRoute(); $event.preventDefault()\" id=\"reload-linked-cases-single-error-tab\" class=\"govuk-link\">Reload\n the Linked cases tab</a>\n </span>\n </div>\n</ng-template>\n<ng-template #multiApisError>\n <div class=\"govuk-main-wrapper\">\n <p class=\"govuk-body\">{{serverError.message}}</p>\n <span class=\"govuk-body align-left\">\n <a href=\"#\" (click)=\"reloadCurrentRoute(); $event.preventDefault()\" id=\"reload-linked-cases-multi-error-tab\" class=\"govuk-link\">Reload\n the Linked cases tab</a>\n </span>\n </div>\n</ng-template>\n", styles: [".table-sub-heading{font-size:24px;font-weight:700}\n"] }]
21318
+ args: [{ selector: 'ccd-read-linked-cases-field', standalone: false, template: "<div>\n <div class=\"govuk-!-margin-bottom-2\">\n <h1 class=\"heading-h1\">Linked cases</h1>\n <label class=\"table-sub-heading\">This case is linked to</label>\n <ccd-linked-cases-to-table [caseField]=\"caseField\" (notifyAPIFailure)=\"getFailureLinkedToNotification($event)\"\n reloadPage=\"reload\"></ccd-linked-cases-to-table>\n <ng-container\n *ngIf=\"(isServerLinkedToError && isServerJurisdictionError && isServerReasonCodeError); then multiApisError;\">\n </ng-container>\n <ng-container\n *ngIf=\"!(isServerLinkedToError && isServerJurisdictionError && isServerReasonCodeError) && (isServerLinkedToError || isServerJurisdictionError || isServerReasonCodeError); then singleApiError;\">\n </ng-container>\n </div>\n <div class=\"govuk-!-margin-top-8\">\n <label class=\"table-sub-heading\">This case is linked from</label>\n <br>\n <ccd-linked-cases-from-table [caseField]=\"caseField\" (notifyAPIFailure)=\"getFailureLinkedFromNotification($event)\"\n reloadPage=\"reload\"></ccd-linked-cases-from-table>\n <ng-container\n *ngIf=\"(isServerLinkedFromError && isServerJurisdictionError && isServerReasonCodeError); then multiApisError;\">\n </ng-container>\n <ng-container\n *ngIf=\"!(isServerLinkedFromError && isServerJurisdictionError && isServerReasonCodeError) && (isServerLinkedFromError || isServerJurisdictionError || isServerReasonCodeError); then singleApiError;\">\n </ng-container>\n </div>\n</div>\n\n<ng-template #singleApiError>\n <div class=\"govuk-main-wrapper\">\n <p class=\"govuk-body\">{{serverLinkedApiError.message}}</p>\n <span class=\"govuk-body align-left\">\n <a href=\"#\" (click)=\"reloadCurrentRoute(); $event.preventDefault()\" id=\"reload-linked-cases-tab\" class=\"govuk-link\">Reload\n the Linked cases tab</a>\n </span>\n </div>\n</ng-template>\n<ng-template #multiApisError>\n <div class=\"govuk-main-wrapper\">\n <p class=\"govuk-body\">{{serverError.message}}</p>\n <span class=\"govuk-body align-left\">\n <a href=\"#\" (click)=\"reloadCurrentRoute(); $event.preventDefault()\" id=\"reload-linked-cases-tab\" class=\"govuk-link\">Reload\n the Linked cases tab</a>\n </span>\n </div>\n</ng-template>\n", styles: [".table-sub-heading{font-size:24px;font-weight:700}\n"] }]
21288
21319
  }], () => [{ type: i1$2.ActivatedRoute }, { type: i1$2.Router }, { type: LinkedCasesService }, { type: AbstractAppConfig }, { type: CommonDataService }], null); })();
21289
21320
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadLinkedCasesFieldComponent, { className: "ReadLinkedCasesFieldComponent", filePath: "lib/shared/components/palette/linked-cases/read-linked-cases-field.component.ts", lineNumber: 14 }); })();
21290
21321
 
@@ -21433,10 +21464,12 @@ class WriteLinkedCasesFieldComponent extends AbstractFieldWriteJourneyComponent
21433
21464
  this.addState(this.linkedCasesPage);
21434
21465
  this.proceedToNextPage();
21435
21466
  }
21436
- else if (linkedCasesState.errorMessages?.length) {
21437
- linkedCasesState.errorMessages.forEach((errorMessage, index) => {
21438
- this.caseEditDataService.addFormValidationError({ id: errorMessage.fieldId, message: errorMessage.description });
21439
- });
21467
+ else {
21468
+ if (linkedCasesState.errorMessages && linkedCasesState.errorMessages.length) {
21469
+ linkedCasesState.errorMessages.forEach((errorMessage, index) => {
21470
+ this.caseEditDataService.addFormValidationError({ id: errorMessage.fieldId, message: errorMessage.description });
21471
+ });
21472
+ }
21440
21473
  }
21441
21474
  }
21442
21475
  getLinkedCaseReasons(serviceId) {
@@ -21488,7 +21521,7 @@ class WriteLinkedCasesFieldComponent extends AbstractFieldWriteJourneyComponent
21488
21521
  }
21489
21522
  const unlinkedCaseRefereneIds = this.linkedCasesService.linkedCases.filter(item => item.unlink).map(item => item.caseReference);
21490
21523
  const caseFieldValue = this.linkedCasesService.caseFieldValue;
21491
- this.linkedCasesService.caseFieldValue = caseFieldValue.filter(item => !unlinkedCaseRefereneIds.includes(item.id));
21524
+ this.linkedCasesService.caseFieldValue = caseFieldValue.filter(item => unlinkedCaseRefereneIds.indexOf(item.id) === -1);
21492
21525
  }
21493
21526
  this.formGroup.value.caseLinks = this.linkedCasesService.caseFieldValue;
21494
21527
  this.caseEditForm.controls['data'] = new FormGroup({ caseLinks: new FormControl(this.linkedCasesService.caseFieldValue || []) });
@@ -21528,7 +21561,7 @@ class WriteLinkedCasesFieldComponent extends AbstractFieldWriteJourneyComponent
21528
21561
  getLinkedCases() {
21529
21562
  this.casesService.getCaseViewV2(this.linkedCasesService.caseId).subscribe((caseView) => {
21530
21563
  const caseViewFiltered = caseView.tabs.filter((tab) => {
21531
- return tab.fields.some(({ field_type }) => field_type?.collection_field_type?.id === 'CaseLink');
21564
+ return tab.fields.some(({ field_type }) => field_type && field_type.collection_field_type && field_type.collection_field_type.id === 'CaseLink');
21532
21565
  });
21533
21566
  if (caseViewFiltered) {
21534
21567
  const caseLinkFieldValue = caseViewFiltered.map((filtered) => filtered.fields?.length > 0 && filtered.fields.filter((field) => field.id === 'caseLinks')[0].value);
@@ -21626,7 +21659,7 @@ class ReadMoneyGbpFieldComponent extends AbstractFieldReadComponent {
21626
21659
  }
21627
21660
  }
21628
21661
  isNumber() {
21629
- return null !== this.value && !Number.isNaN(Number(this.value));
21662
+ return null !== this.value && !isNaN(this.value);
21630
21663
  }
21631
21664
  static ɵfac = /*@__PURE__*/ (() => { let ɵReadMoneyGbpFieldComponent_BaseFactory; return function ReadMoneyGbpFieldComponent_Factory(__ngFactoryType__) { return (ɵReadMoneyGbpFieldComponent_BaseFactory || (ɵReadMoneyGbpFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ReadMoneyGbpFieldComponent)))(__ngFactoryType__ || ReadMoneyGbpFieldComponent); }; })();
21632
21665
  static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ReadMoneyGbpFieldComponent, selectors: [["ccd-read-money-gbp-field"]], inputs: { amount: "amount" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [[4, "ngIf"], [1, "text-16"]], template: function ReadMoneyGbpFieldComponent_Template(rf, ctx) { if (rf & 1) {
@@ -22475,11 +22508,13 @@ class WriteOrganisationFieldComponent extends AbstractFieldWriteComponent {
22475
22508
  }
22476
22509
  this.preSelectDefaultOrg();
22477
22510
  }
22478
- else if (this.caseField && this.caseField.value && this.caseField.value.OrganisationID) {
22479
- this.preSelectDefaultOrg();
22480
- }
22481
22511
  else {
22482
- this.preSelectEmptyOrg();
22512
+ if (this.caseField && this.caseField.value && this.caseField.value.OrganisationID) {
22513
+ this.preSelectDefaultOrg();
22514
+ }
22515
+ else {
22516
+ this.preSelectEmptyOrg();
22517
+ }
22483
22518
  }
22484
22519
  // Ensure that all sub-fields inherit the same value for retain_hidden_value as this parent; although an
22485
22520
  // Organisation field uses the Complex type, it is meant to be treated as one field
@@ -22513,7 +22548,7 @@ class WriteOrganisationFieldComponent extends AbstractFieldWriteComponent {
22513
22548
  });
22514
22549
  organisations.forEach((org) => {
22515
22550
  const resultSet = [...partMatchingResultSet, ...withSpaceMatchingResultSet];
22516
- const hasMatchingOrganisation = resultSet.some(item => item.organisationIdentifier === org.organisationIdentifier);
22551
+ const hasMatchingOrganisation = resultSet.find(item => item.organisationIdentifier === org.organisationIdentifier);
22517
22552
  const searchHasSpace = this.searchWithSpace(org, lowerOrgSearchText);
22518
22553
  const hasResultSetBelowMaxCount = resultSet.length < MAX_RESULT_COUNT;
22519
22554
  if (!hasMatchingOrganisation && partMatchingResultSet.length === 0 && hasResultSetBelowMaxCount && searchHasSpace) {
@@ -24325,17 +24360,19 @@ class QueryCheckYourAnswersComponent {
24325
24360
  this.error = null;
24326
24361
  this.callbackErrorsSubject.next(error);
24327
24362
  }
24328
- else if (error && error.status !== 401 && error.status !== 403) {
24329
- this.error = error;
24330
- }
24331
24363
  else {
24332
- this.router.navigate(['/', 'service-down']);
24364
+ if (error && error.status !== 401 && error.status !== 403) {
24365
+ this.error = error;
24366
+ }
24367
+ else {
24368
+ this.router.navigate(['/', 'service-down']);
24369
+ }
24333
24370
  }
24334
24371
  window.scrollTo({ left: 0, top: 0, behavior: 'smooth' });
24335
24372
  }
24336
24373
  getDocumentAttachments() {
24337
24374
  const attachmentsValue = this.formGroup.get('attachments').value;
24338
- if (attachmentsValue?.length > 0) {
24375
+ if (attachmentsValue && attachmentsValue.length > 0) {
24339
24376
  const documents = attachmentsValue;
24340
24377
  this.attachments = documents.map(QueryManagementUtils.documentToCollectionFormDocument);
24341
24378
  }
@@ -25149,7 +25186,7 @@ class QueryWriteDateInputComponent {
25149
25186
  onChange;
25150
25187
  onTouched;
25151
25188
  writeValue(date) {
25152
- if (date instanceof Date && !Number.isNaN(date.getTime())) {
25189
+ if (date instanceof Date && !isNaN(date.getTime())) {
25153
25190
  this.day = date.getDate();
25154
25191
  this.month = date.getMonth() + 1; // Months are zero-based
25155
25192
  this.year = date.getFullYear();
@@ -25325,7 +25362,7 @@ function QueryWriteRaiseQueryComponent_div_11_ng_container_50_p_7_Template(rf, c
25325
25362
  } }
25326
25363
  function QueryWriteRaiseQueryComponent_div_11_ng_container_50_Template(rf, ctx) { if (rf & 1) {
25327
25364
  i0.ɵɵelementContainerStart(0);
25328
- i0.ɵɵelementStart(1, "div", 36)(2, "fieldset", 37)(3, "legend")(4, "span", 38);
25365
+ i0.ɵɵelementStart(1, "div", 36)(2, "fieldset", 37)(3, "legend")(4, "label", 38);
25329
25366
  i0.ɵɵtext(5);
25330
25367
  i0.ɵɵpipe(6, "rpxTranslate");
25331
25368
  i0.ɵɵelementEnd()();
@@ -25377,7 +25414,7 @@ function QueryWriteRaiseQueryComponent_div_11_Template(rf, ctx) { if (rf & 1) {
25377
25414
  i0.ɵɵelementStart(30, "textarea", 22);
25378
25415
  i0.ɵɵtext(31, " ");
25379
25416
  i0.ɵɵelementEnd()();
25380
- i0.ɵɵelementStart(32, "div", 13)(33, "fieldset", 23)(34, "legend")(35, "span", 24);
25417
+ i0.ɵɵelementStart(32, "div", 13)(33, "fieldset", 23)(34, "legend")(35, "label", 24);
25381
25418
  i0.ɵɵtext(36);
25382
25419
  i0.ɵɵpipe(37, "rpxTranslate");
25383
25420
  i0.ɵɵelementEnd()();
@@ -25473,7 +25510,7 @@ class QueryWriteRaiseQueryComponent {
25473
25510
  onSubjectInput() {
25474
25511
  const control = this.formGroup.get('subject');
25475
25512
  const value = control?.value;
25476
- if (value?.length > 200) {
25513
+ if (value && value.length > 200) {
25477
25514
  control?.setValue(value.substring(0, 200));
25478
25515
  }
25479
25516
  }
@@ -25527,7 +25564,7 @@ class QueryWriteRaiseQueryComponent {
25527
25564
  }
25528
25565
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryWriteRaiseQueryComponent, [{
25529
25566
  type: Component,
25530
- args: [{ selector: 'ccd-query-write-raise-query', standalone: false, template: "<div>\n <div class=\"govuk-!-margin-bottom-6\">\n <div class=\"govuk-caption-l\">{{ 'Raise a query' | rpxTranslate }}</div>\n <h1 class=\"govuk-heading-l govuk-!-margin-bottom-4\">{{ 'Enter query details' | rpxTranslate }}</h1>\n </div>\n\n <div>\n <ccd-query-case-details-header [caseDetails]=\"caseDetails\" *ngIf=\"caseDetails\"></ccd-query-case-details-header>\n </div>\n\n <hr>\n\n <div class=\"govuk-!-margin-bottom-4\" *ngIf=\"showForm\">\n <div [formGroup]=\"formGroup\">\n <div>\n <div class=\"govuk-warning-text\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-visually-hidden\">Warning</span>\n <ccd-markdown\n [content]=\"serviceMessage | rpxTranslate\">\n </ccd-markdown>\n </strong>\n </div>\n <div class=\"govuk-form-group\" [ngClass]=\"{'govuk-form-group--error': submitted && formGroup.get('subject').hasError('required')}\">\n <div class=\"govuk-label-wrapper\">\n <label class=\"govuk-label govuk-label--m govuk-!-font-weight-bold\" for=\"subject\">\n {{ 'Query subject' | rpxTranslate }}\n </label>\n </div>\n <div id=\"subject-hint\" class=\"govuk-hint\">\n {{ 'The subject should be a summary of your query' | rpxTranslate }}\n </div>\n <p id=\"subject-error\" class=\"govuk-error-message\"\n *ngIf=\"submitted && (formGroup.get('subject').hasError('required') || formGroup.get('subject').hasError('maxlength'))\">\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate }}</span>\n {{ getSubjectErrorMessage() | rpxTranslate }}\n </p>\n\n <input type=\"text\"\n id=\"subject\"\n class=\"govuk-input\"\n formControlName=\"subject\"\n maxlength=\"200\"\n (input)=\"onSubjectInput()\"\n aria-describedby=\"subject-error\" />\n </div>\n\n <div class=\"govuk-form-group\"\n [ngClass]=\"{'govuk-form-group--error': submitted && formGroup.get('body').hasError('required')}\">\n <div class=\"govuk-label-wrapper\">\n <label class=\"govuk-label govuk-label--m govuk-!-font-weight-bold\" for=\"body\">\n {{ 'Query detail' | rpxTranslate }}\n </label>\n </div>\n <div id=\"body-hint\" class=\"govuk-hint\">\n {{ 'Include as many details as possible so case workers can respond to your query' | rpxTranslate }}\n </div>\n <p id=\"body-error\" class=\"govuk-error-message\"\n *ngIf=\"submitted && formGroup.get('body').hasError('required')\">\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate }} </span>{{ raiseQueryErrorMessage.QUERY_BODY | rpxTranslate }}\n </p>\n <textarea [formControlName]=\"'body'\"\n id=\"body\" name=\"body\" rows=\"5\"\n aria-describedby=\"body-hint body-error\"\n class=\"govuk-textarea\"\n [class.govuk-textarea--error]=\"submitted && formGroup.get('body').hasError('required')\"\n >\n </textarea>\n </div>\n\n <div class=\"govuk-form-group\"\n [ngClass]=\"{'govuk-form-group--error': submitted && formGroup.get('isHearingRelated').hasError('required')}\">\n <fieldset class=\"govuk-fieldset\">\n <legend>\n <span class=\"govuk-label govuk-label--m govuk-!-font-weight-bold\">\n {{ 'Is the query hearing related?' | rpxTranslate }}\n </span>\n </legend>\n <p id=\"isHearingRelated-error\" class=\"govuk-error-message\"\n *ngIf=\"submitted && formGroup.get('isHearingRelated').hasError('required')\">\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate }} </span>{{ raiseQueryErrorMessage.QUERY_HEARING_RELATED | rpxTranslate }}\n </p>\n <div class=\"govuk-radios govuk-radios--inline\" data-module=\"govuk-radios\">\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"isHearingRelated-yes\" name=\"isHearingRelated\"\n type=\"radio\"\n formControlName=\"isHearingRelated\"\n [checked]=\"formGroup.get('isHearingRelated').value === true\" [value]=\"true\"\n >\n <label class=\"govuk-label govuk-radios__label\" for=\"isHearingRelated-yes\">\n {{ 'Is the query hearing related?' | rpxTranslate: null : 'Yes' }}\n </label>\n </div>\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"isHearingRelated-no\" name=\"isHearingRelated\"\n type=\"radio\"\n formControlName=\"isHearingRelated\"\n [checked]=\"formGroup.get('isHearingRelated').value === false\" [value]=\"false\"\n >\n <label class=\"govuk-label govuk-radios__label\" for=\"isHearingRelated-no\">\n {{ 'Is the query hearing related?' | rpxTranslate: null : 'No' }}\n </label>\n </div>\n </div>\n </fieldset>\n\n <ng-container *ngIf=\"formGroup.get('isHearingRelated').value\">\n <div class=\"govuk-radios__conditional govuk-!-margin-top-1\"\n [ngClass]=\"{'govuk-form-group--error': submitted &&\n formGroup.get('isHearingRelated').value === true &&\n formGroup.get('hearingDate').value === null}\">\n <fieldset class=\"govuk-fieldset\" role=\"group\">\n <legend>\n <span class=\"govuk-label govuk-label--s\">\n {{ 'What is the date of the hearing?' | rpxTranslate }}\n </span>\n </legend>\n <p id=\"hearingDate-error\" class=\"govuk-error-message\"\n *ngIf=\"submitted && formGroup.get('isHearingRelated').value === true && formGroup.get('hearingDate').value === null\">\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate }} </span>{{ raiseQueryErrorMessage.QUERY_HEARING_DATE | rpxTranslate }}\n </p>\n <ccd-query-write-date-input formControlName=\"hearingDate\"></ccd-query-write-date-input>\n </fieldset>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n</div>\n" }]
25567
+ args: [{ selector: 'ccd-query-write-raise-query', standalone: false, template: "<div>\n <div class=\"govuk-!-margin-bottom-6\">\n <div class=\"govuk-caption-l\">{{ 'Raise a query' | rpxTranslate }}</div>\n <h1 class=\"govuk-heading-l govuk-!-margin-bottom-4\">{{ 'Enter query details' | rpxTranslate }}</h1>\n </div>\n\n <div>\n <ccd-query-case-details-header [caseDetails]=\"caseDetails\" *ngIf=\"caseDetails\"></ccd-query-case-details-header>\n </div>\n\n <hr>\n\n <div class=\"govuk-!-margin-bottom-4\" *ngIf=\"showForm\">\n <div [formGroup]=\"formGroup\">\n <div>\n <div class=\"govuk-warning-text\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-visually-hidden\">Warning</span>\n <ccd-markdown\n [content]=\"serviceMessage | rpxTranslate\">\n </ccd-markdown>\n </strong>\n </div>\n <div class=\"govuk-form-group\" [ngClass]=\"{'govuk-form-group--error': submitted && formGroup.get('subject').hasError('required')}\">\n <div class=\"govuk-label-wrapper\">\n <label class=\"govuk-label govuk-label--m govuk-!-font-weight-bold\" for=\"subject\">\n {{ 'Query subject' | rpxTranslate }}\n </label>\n </div>\n <div id=\"subject-hint\" class=\"govuk-hint\">\n {{ 'The subject should be a summary of your query' | rpxTranslate }}\n </div>\n <p id=\"subject-error\" class=\"govuk-error-message\"\n *ngIf=\"submitted && (formGroup.get('subject').hasError('required') || formGroup.get('subject').hasError('maxlength'))\">\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate }}</span>\n {{ getSubjectErrorMessage() | rpxTranslate }}\n </p>\n\n <input type=\"text\"\n id=\"subject\"\n class=\"govuk-input\"\n formControlName=\"subject\"\n maxlength=\"200\"\n (input)=\"onSubjectInput()\"\n aria-describedby=\"subject-error\" />\n </div>\n\n <div class=\"govuk-form-group\"\n [ngClass]=\"{'govuk-form-group--error': submitted && formGroup.get('body').hasError('required')}\">\n <div class=\"govuk-label-wrapper\">\n <label class=\"govuk-label govuk-label--m govuk-!-font-weight-bold\" for=\"body\">\n {{ 'Query detail' | rpxTranslate }}\n </label>\n </div>\n <div id=\"body-hint\" class=\"govuk-hint\">\n {{ 'Include as many details as possible so case workers can respond to your query' | rpxTranslate }}\n </div>\n <p id=\"body-error\" class=\"govuk-error-message\"\n *ngIf=\"submitted && formGroup.get('body').hasError('required')\">\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate }} </span>{{ raiseQueryErrorMessage.QUERY_BODY | rpxTranslate }}\n </p>\n <textarea [formControlName]=\"'body'\"\n id=\"body\" name=\"body\" rows=\"5\"\n aria-describedby=\"body-hint body-error\"\n class=\"govuk-textarea\"\n [class.govuk-textarea--error]=\"submitted && formGroup.get('body').hasError('required')\"\n >\n </textarea>\n </div>\n\n <div class=\"govuk-form-group\"\n [ngClass]=\"{'govuk-form-group--error': submitted && formGroup.get('isHearingRelated').hasError('required')}\">\n <fieldset class=\"govuk-fieldset\">\n <legend>\n <label class=\"govuk-label govuk-label--m govuk-!-font-weight-bold\">\n {{ 'Is the query hearing related?' | rpxTranslate }}\n </label>\n </legend>\n <p id=\"isHearingRelated-error\" class=\"govuk-error-message\"\n *ngIf=\"submitted && formGroup.get('isHearingRelated').hasError('required')\">\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate }} </span>{{ raiseQueryErrorMessage.QUERY_HEARING_RELATED | rpxTranslate }}\n </p>\n <div class=\"govuk-radios govuk-radios--inline\" data-module=\"govuk-radios\">\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"isHearingRelated-yes\" name=\"isHearingRelated\"\n type=\"radio\"\n formControlName=\"isHearingRelated\"\n [checked]=\"formGroup.get('isHearingRelated').value === true\" [value]=\"true\"\n >\n <label class=\"govuk-label govuk-radios__label\" for=\"isHearingRelated-yes\">\n {{ 'Is the query hearing related?' | rpxTranslate: null : 'Yes' }}\n </label>\n </div>\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"isHearingRelated-no\" name=\"isHearingRelated\"\n type=\"radio\"\n formControlName=\"isHearingRelated\"\n [checked]=\"formGroup.get('isHearingRelated').value === false\" [value]=\"false\"\n >\n <label class=\"govuk-label govuk-radios__label\" for=\"isHearingRelated-no\">\n {{ 'Is the query hearing related?' | rpxTranslate: null : 'No' }}\n </label>\n </div>\n </div>\n </fieldset>\n\n <ng-container *ngIf=\"formGroup.get('isHearingRelated').value\">\n <div class=\"govuk-radios__conditional govuk-!-margin-top-1\"\n [ngClass]=\"{'govuk-form-group--error': submitted &&\n formGroup.get('isHearingRelated').value === true &&\n formGroup.get('hearingDate').value === null}\">\n <fieldset class=\"govuk-fieldset\" role=\"group\">\n <legend>\n <label class=\"govuk-label govuk-label--s\">\n {{ 'What is the date of the hearing?' | rpxTranslate }}\n </label>\n </legend>\n <p id=\"hearingDate-error\" class=\"govuk-error-message\"\n *ngIf=\"submitted && formGroup.get('isHearingRelated').value === true && formGroup.get('hearingDate').value === null\">\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate }} </span>{{ raiseQueryErrorMessage.QUERY_HEARING_DATE | rpxTranslate }}\n </p>\n <ccd-query-write-date-input formControlName=\"hearingDate\"></ccd-query-write-date-input>\n </fieldset>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n</div>\n" }]
25531
25568
  }], () => [{ type: QueryManagementService }, { type: i1$2.ActivatedRoute }], { formGroup: [{
25532
25569
  type: Input
25533
25570
  }], submitted: [{
@@ -26091,7 +26128,7 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_conta
26091
26128
  } }
26092
26129
  function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_ng_container_0_Template(rf, ctx) { if (rf & 1) {
26093
26130
  i0.ɵɵelementContainerStart(0);
26094
- i0.ɵɵelementStart(1, "button", 11);
26131
+ i0.ɵɵelementStart(1, "button", 10);
26095
26132
  i0.ɵɵtext(2);
26096
26133
  i0.ɵɵpipe(3, "rpxTranslate");
26097
26134
  i0.ɵɵelementEnd();
@@ -26104,7 +26141,7 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_templ
26104
26141
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "Ask a follow-up question"), " ");
26105
26142
  } }
26106
26143
  function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_ng_template_1_Template(rf, ctx) { if (rf & 1) {
26107
- i0.ɵɵelementStart(0, "div")(1, "p", 12);
26144
+ i0.ɵɵelementStart(0, "div")(1, "p", 11);
26108
26145
  i0.ɵɵtext(2);
26109
26146
  i0.ɵɵpipe(3, "rpxTranslate");
26110
26147
  i0.ɵɵelementEnd();
@@ -26137,13 +26174,13 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_Template
26137
26174
  } }
26138
26175
  function ReadQueryManagementFieldComponent_ng_template_1_ng_container_2_Template(rf, ctx) { if (rf & 1) {
26139
26176
  i0.ɵɵelementContainerStart(0);
26140
- i0.ɵɵelementStart(1, "div", 13)(2, "span", 14);
26177
+ i0.ɵɵelementStart(1, "div", 12)(2, "span", 13);
26141
26178
  i0.ɵɵtext(3, "!");
26142
26179
  i0.ɵɵelementEnd();
26143
- i0.ɵɵelementStart(4, "strong", 15)(5, "span", 16);
26180
+ i0.ɵɵelementStart(4, "strong", 14)(5, "span", 15);
26144
26181
  i0.ɵɵtext(6, "Warning");
26145
26182
  i0.ɵɵelementEnd();
26146
- i0.ɵɵelementStart(7, "p", 17);
26183
+ i0.ɵɵelementStart(7, "p", 16);
26147
26184
  i0.ɵɵtext(8);
26148
26185
  i0.ɵɵpipe(9, "rpxTranslate");
26149
26186
  i0.ɵɵelementEnd()()();
@@ -26253,7 +26290,7 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
26253
26290
  : query?.messageType;
26254
26291
  }
26255
26292
  static ɵfac = function ReadQueryManagementFieldComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ReadQueryManagementFieldComponent)(i0.ɵɵdirectiveInject(i1$2.ActivatedRoute), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(AbstractAppConfig)); };
26256
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ReadQueryManagementFieldComponent, selectors: [["ccd-read-query-management-field"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 2, consts: [["singleQueryDetails", ""], ["sequentialQuery", ""], ["queryIsInReview", ""], [4, "ngIf", "ngIfElse"], [4, "ngFor", "ngForOf"], ["class", "govuk-!-margin-top-8 govuk-!-margin-bottom-8", 4, "ngIf"], [1, "govuk-!-margin-top-8", "govuk-!-margin-bottom-8"], [3, "selectedQuery", "caseQueriesCollection"], [3, "backClicked", "query", "caseId"], [4, "ngIf"], ["id", "ask-follow-up-question-external", "data-module", "govuk-button", 1, "govuk-button", 3, "routerLink"], ["id", "ask-follow-up-question", "data-module", "govuk-button", 1, "govuk-button", 3, "routerLink"], [1, "govuk-!-font-weight-bold"], [1, "govuk-warning-text"], ["aria-hidden", "true", 1, "govuk-warning-text__icon"], [1, "govuk-warning-text__text"], [1, "govuk-visually-hidden"], [1, "qm-service-message", "govuk-!-font-weight-bold"]], template: function ReadQueryManagementFieldComponent_Template(rf, ctx) { if (rf & 1) {
26293
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ReadQueryManagementFieldComponent, selectors: [["ccd-read-query-management-field"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 2, consts: [["singleQueryDetails", ""], ["sequentialQuery", ""], ["queryIsInReview", ""], [4, "ngIf", "ngIfElse"], [4, "ngFor", "ngForOf"], ["class", "govuk-!-margin-top-8 govuk-!-margin-bottom-8", 4, "ngIf"], [1, "govuk-!-margin-top-8", "govuk-!-margin-bottom-8"], [3, "selectedQuery", "caseQueriesCollection"], [3, "backClicked", "query", "caseId"], [4, "ngIf"], ["id", "ask-follow-up-question", "data-module", "govuk-button", 1, "govuk-button", 3, "routerLink"], [1, "govuk-!-font-weight-bold"], [1, "govuk-warning-text"], ["aria-hidden", "true", 1, "govuk-warning-text__icon"], [1, "govuk-warning-text__text"], [1, "govuk-visually-hidden"], [1, "qm-service-message", "govuk-!-font-weight-bold"]], template: function ReadQueryManagementFieldComponent_Template(rf, ctx) { if (rf & 1) {
26257
26294
  i0.ɵɵtemplate(0, ReadQueryManagementFieldComponent_ng_container_0_Template, 2, 1, "ng-container", 3)(1, ReadQueryManagementFieldComponent_ng_template_1_Template, 3, 4, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
26258
26295
  } if (rf & 2) {
26259
26296
  const singleQueryDetails_r7 = i0.ɵɵreference(2);
@@ -26262,7 +26299,7 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
26262
26299
  }
26263
26300
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadQueryManagementFieldComponent, [{
26264
26301
  type: Component,
26265
- args: [{ selector: 'ccd-read-query-management-field', standalone: false, template: "<ng-container *ngIf=\"showQueryList; else singleQueryDetails\">\n <ng-container *ngFor=\"let caseQueriesCollection of caseQueriesCollections\">\n <div *ngIf=\"showQueryList\" class=\"govuk-!-margin-top-8 govuk-!-margin-bottom-8\">\n <ccd-query-list (selectedQuery)=\"setQuery($event)\" [caseQueriesCollection]=\"caseQueriesCollection\"></ccd-query-list>\n </div>\n </ng-container>\n</ng-container>\n\n<ng-template #singleQueryDetails>\n <ccd-query-details\n [query]=\"query\"\n (backClicked)=\"showQueryList = true\"\n [caseId]=\"caseId\"\n ></ccd-query-details>\n\n <ng-container *ngIf=\"!isInternalUser() && !isQueryClosed && !isJudiciaryUser()\">\n <ng-container *ngIf=\"(messageType && messageType === followUpQuery && isMultipleFollowUpEnabled) ||\n (messageType && messageType === respondToQuery) || (messageType && messageType === followUpQuery && query?.isHmctsStaff?.toLowerCase() === 'yes'); else sequentialQuery\">\n <button id=\"ask-follow-up-question-external\" class=\"govuk-button\" data-module=\"govuk-button\"\n [routerLink]=\"['/query-management', 'query', caseId, '4', query.id]\">\n {{ 'Ask a follow-up question' | rpxTranslate }}\n </button>\n </ng-container>\n <ng-template #sequentialQuery>\n <ng-container *ngIf=\"query?.children?.length > 0 && query?.children?.length % 2 === 1; else queryIsInReview\">\n <button id=\"ask-follow-up-question\" class=\"govuk-button\" data-module=\"govuk-button\"\n [routerLink]=\"['/query-management', 'query', caseId, '4', query.id]\">\n {{ 'Ask a follow-up question' | rpxTranslate }}\n </button>\n </ng-container>\n\n <ng-template #queryIsInReview>\n <div>\n <p class=\"govuk-!-font-weight-bold\">{{ 'Your query is under review' | rpxTranslate }}</p>\n <p>{{ 'Our team will read your query and respond. Do not submit the same query more than once.' | rpxTranslate }}</p>\n </div>\n </ng-template>\n </ng-template>\n\n </ng-container>\n <ng-container *ngIf=\"isQueryClosed\">\n <div class=\"govuk-warning-text\">\n <span aria-hidden=\"true\" class=\"govuk-warning-text__icon\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-visually-hidden\">Warning</span>\n <p class=\"qm-service-message govuk-!-font-weight-bold\">{{ 'This query has been closed by HMCTS staff.' | rpxTranslate }}</p>\n </strong>\n </div>\n </ng-container>\n</ng-template>\n" }]
26302
+ args: [{ selector: 'ccd-read-query-management-field', standalone: false, template: "<ng-container *ngIf=\"showQueryList; else singleQueryDetails\">\n <ng-container *ngFor=\"let caseQueriesCollection of caseQueriesCollections\">\n <div *ngIf=\"showQueryList\" class=\"govuk-!-margin-top-8 govuk-!-margin-bottom-8\">\n <ccd-query-list (selectedQuery)=\"setQuery($event)\" [caseQueriesCollection]=\"caseQueriesCollection\"></ccd-query-list>\n </div>\n </ng-container>\n</ng-container>\n\n<ng-template #singleQueryDetails>\n <ccd-query-details\n [query]=\"query\"\n (backClicked)=\"showQueryList = true\"\n [caseId]=\"caseId\"\n ></ccd-query-details>\n\n <ng-container *ngIf=\"!isInternalUser() && !isQueryClosed && !isJudiciaryUser()\">\n <ng-container *ngIf=\"(messageType && messageType === followUpQuery && isMultipleFollowUpEnabled) ||\n (messageType && messageType === respondToQuery) || (messageType && messageType === followUpQuery && query?.isHmctsStaff?.toLowerCase() === 'yes'); else sequentialQuery\">\n <button id=\"ask-follow-up-question\" class=\"govuk-button\" data-module=\"govuk-button\"\n [routerLink]=\"['/query-management', 'query', caseId, '4', query.id]\">\n {{ 'Ask a follow-up question' | rpxTranslate }}\n </button>\n </ng-container>\n <ng-template #sequentialQuery>\n <ng-container *ngIf=\"query?.children?.length > 0 && query?.children?.length % 2 === 1; else queryIsInReview\">\n <button id=\"ask-follow-up-question\" class=\"govuk-button\" data-module=\"govuk-button\"\n [routerLink]=\"['/query-management', 'query', caseId, '4', query.id]\">\n {{ 'Ask a follow-up question' | rpxTranslate }}\n </button>\n </ng-container>\n\n <ng-template #queryIsInReview>\n <div>\n <p class=\"govuk-!-font-weight-bold\">{{ 'Your query is under review' | rpxTranslate }}</p>\n <p>{{ 'Our team will read your query and respond. Do not submit the same query more than once.' | rpxTranslate }}</p>\n </div>\n </ng-template>\n </ng-template>\n\n </ng-container>\n <ng-container *ngIf=\"isQueryClosed\">\n <div class=\"govuk-warning-text\">\n <span aria-hidden=\"true\" class=\"govuk-warning-text__icon\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-visually-hidden\">Warning</span>\n <p class=\"qm-service-message govuk-!-font-weight-bold\">{{ 'This query has been closed by HMCTS staff.' | rpxTranslate }}</p>\n </strong>\n </div>\n </ng-container>\n</ng-template>\n" }]
26266
26303
  }], () => [{ type: i1$2.ActivatedRoute }, { type: SessionStorageService }, { type: CaseNotifier }, { type: AbstractAppConfig }], null); })();
26267
26304
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadQueryManagementFieldComponent, { className: "ReadQueryManagementFieldComponent", filePath: "lib/shared/components/palette/query-management/read-query-management-field.component.ts", lineNumber: 19 }); })();
26268
26305
 
@@ -29572,7 +29609,7 @@ class YesNoService {
29572
29609
  case 'boolean':
29573
29610
  return value;
29574
29611
  case 'string':
29575
- return YesNoService.YES_INPUTS.includes(value.toUpperCase());
29612
+ return YesNoService.YES_INPUTS.indexOf(value.toUpperCase()) !== -1;
29576
29613
  }
29577
29614
  return false;
29578
29615
  }
@@ -29582,7 +29619,7 @@ class YesNoService {
29582
29619
  case 'boolean':
29583
29620
  return !value;
29584
29621
  case 'string':
29585
- return YesNoService.NO_INPUTS.includes(value.toUpperCase());
29622
+ return YesNoService.NO_INPUTS.indexOf(value.toUpperCase()) !== -1;
29586
29623
  }
29587
29624
  return false;
29588
29625
  }
@@ -29801,7 +29838,7 @@ class PaletteService {
29801
29838
  if (argumentValue) {
29802
29839
  const displayContextParameterArray = argumentValue.includes(',') ? argumentValue.split(',') : [argumentValue];
29803
29840
  const componentToRender = displayContextParameterArray.filter(displayContextParameter => {
29804
- return !Object.values(DisplayContextParameter).some(displayContextParameterFromLookup => {
29841
+ return !Object.values(DisplayContextParameter).find(displayContextParameterFromLookup => {
29805
29842
  return displayContextParameter === displayContextParameterFromLookup;
29806
29843
  });
29807
29844
  });
@@ -29834,7 +29871,7 @@ class FieldReadComponent extends AbstractFieldReadComponent {
29834
29871
  }
29835
29872
  ngOnInit() {
29836
29873
  // Ensure all field values are resolved by label interpolation before the component is fully initialised.
29837
- void Promise.resolve(null).then(() => {
29874
+ Promise.resolve(null).then(() => {
29838
29875
  const componentClass = this.paletteService.getFieldComponentClass(this.caseField, false);
29839
29876
  const injector = Injector.create({
29840
29877
  providers: [],
@@ -29847,7 +29884,7 @@ class FieldReadComponent extends AbstractFieldReadComponent {
29847
29884
  // TODO AW 30/12/20 figure out why FixedLists need plainToClassFromExist
29848
29885
  // Added a check to make sure it's NOT already a CaseField and then
29849
29886
  // assigning it back to this.caseField so we don't create separation.
29850
- if (FIX_CASEFIELD_FOR$1.includes(this.caseField.field_type.type) && !(this.caseField instanceof CaseField)) {
29887
+ if (FIX_CASEFIELD_FOR$1.indexOf(this.caseField.field_type.type) > -1 && !(this.caseField instanceof CaseField)) {
29851
29888
  this.caseField = plainToClassFromExist(new CaseField(), this.caseField);
29852
29889
  }
29853
29890
  component.instance['caseField'] = this.caseField;
@@ -29923,7 +29960,7 @@ class FieldWriteComponent extends AbstractFieldWriteComponent {
29923
29960
  // TODO AW 30/12/20 figure out why FixedLists need plainToClassFromExist
29924
29961
  // Added a check to make sure it's NOT already a CaseField and then
29925
29962
  // assigning it back to this.caseField so we don't create separation.
29926
- if (FIX_CASEFIELD_FOR.includes(this.caseField.field_type.type) && !(this.caseField instanceof CaseField)) {
29963
+ if (FIX_CASEFIELD_FOR.indexOf(this.caseField.field_type.type) > -1 && !(this.caseField instanceof CaseField)) {
29927
29964
  this.caseField = plainToClassFromExist(new CaseField(), this.caseField);
29928
29965
  }
29929
29966
  this.applyInputsToChild();
@@ -30127,7 +30164,7 @@ class CaseFileViewFolderSelectorComponent {
30127
30164
  if (evt.target.checked) {
30128
30165
  this.select(evt.target.id);
30129
30166
  // get level of this checkbox so we can clear all lower levels
30130
- let level = Number.parseInt(evt.target.name.split('-')[1], 10) + 1;
30167
+ let level = parseInt(evt.target.name.split('-')[1], 10) + 1;
30131
30168
  let nodes = document.getElementsByName(`level-${level}`);
30132
30169
  while (nodes.length > 0) {
30133
30170
  nodes.forEach((node) => node.checked = false);
@@ -30168,10 +30205,10 @@ class CaseFileViewFolderSelectorComponent {
30168
30205
  return null;
30169
30206
  }
30170
30207
  static ɵfac = function CaseFileViewFolderSelectorComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaseFileViewFolderSelectorComponent)(i0.ɵɵdirectiveInject(i1$3.MatDialogRef), i0.ɵɵdirectiveInject(MAT_DIALOG_DATA)); };
30171
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseFileViewFolderSelectorComponent, selectors: [["xui-case-file-view-folder-selector"]], standalone: false, decls: 14, vars: 2, consts: [["folder", ""], ["type", "button", "aria-label", "Close", 1, "close", 3, "click"], [1, "govuk-heading-l"], [1, "folders", "govuk-radios", "govuk-radios--conditional"], [4, "ngFor", "ngForOf"], [1, "govuk-button-group"], ["type", "button", 1, "button", "button-primary", 3, "click"], ["href", "#", 1, "cancel", 3, "click"], [4, "ngTemplateOutlet", "ngTemplateOutletContext"], [1, "folder", "govuk-radios__item"], ["type", "radio", 1, "govuk-radios__input", 3, "click", "keyup", "name", "id"], [1, "govuk-label", "govuk-radios__label", 3, "for"], ["src", "/assets/images/folder.png", "alt", "Folder icon", 1, "iconImg"]], template: function CaseFileViewFolderSelectorComponent_Template(rf, ctx) { if (rf & 1) {
30208
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseFileViewFolderSelectorComponent, selectors: [["xui-case-file-view-folder-selector"]], standalone: false, decls: 14, vars: 2, consts: [["folder", ""], ["tabindex", "0", "aria-label", "close", 1, "close", 3, "click", "keyup"], [1, "govuk-heading-l"], [1, "folders", "govuk-radios", "govuk-radios--conditional"], [4, "ngFor", "ngForOf"], [1, "govuk-button-group"], ["type", "button", 1, "button", "button-primary", 3, "click"], ["href", "#", 1, "cancel", 3, "click"], [4, "ngTemplateOutlet", "ngTemplateOutletContext"], [1, "folder", "govuk-radios__item"], ["type", "radio", 1, "govuk-radios__input", 3, "click", "keyup", "name", "id"], [1, "govuk-label", "govuk-radios__label", 3, "for"], ["src", "/assets/images/folder.png", "alt", "Folder icon", 1, "iconImg"]], template: function CaseFileViewFolderSelectorComponent_Template(rf, ctx) { if (rf & 1) {
30172
30209
  const _r1 = i0.ɵɵgetCurrentView();
30173
- i0.ɵɵelementStart(0, "button", 1);
30174
- i0.ɵɵlistener("click", function CaseFileViewFolderSelectorComponent_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.cancel()); });
30210
+ i0.ɵɵelementStart(0, "span", 1);
30211
+ i0.ɵɵlistener("click", function CaseFileViewFolderSelectorComponent_Template_span_click_0_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.cancel()); })("keyup", function CaseFileViewFolderSelectorComponent_Template_span_keyup_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView($event.key === "Enter" ? ctx.cancel() : null); });
30175
30212
  i0.ɵɵelementEnd();
30176
30213
  i0.ɵɵelementStart(1, "h2", 2);
30177
30214
  i0.ɵɵtext(2, "Move File");
@@ -30200,7 +30237,7 @@ class CaseFileViewFolderSelectorComponent {
30200
30237
  }
30201
30238
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFileViewFolderSelectorComponent, [{
30202
30239
  type: Component,
30203
- args: [{ selector: 'xui-case-file-view-folder-selector', encapsulation: ViewEncapsulation.None, standalone: false, template: "<button type=\"button\" aria-label=\"Close\" class=\"close\" (click)=\"cancel()\"></button>\n<h2 class=\"govuk-heading-l\">Move File</h2>\n<p>Where do you want to move \"{{ data.document.document_filename }}\" file?</p>\n<div class=\"folders govuk-radios govuk-radios--conditional\">\n <ng-container *ngFor=\"let cat of currentCategories\">\n <ng-container *ngTemplateOutlet=\"folder;context:{cat:cat,level:1}\"></ng-container>\n </ng-container>\n</div>\n<div class=\"govuk-button-group\">\n <button class=\"button button-primary\" type=\"button\" (click)=\"save()\">Save</button>\n <a (click)=\"cancel(); $event.preventDefault()\" class=\"cancel\" href=\"#\">Cancel</a>\n</div>\n\n<ng-template #folder let-cat=\"cat\" let-level=\"level\">\n <div class=\"folder govuk-radios__item\">\n <input class=\"govuk-radios__input\" type=\"radio\" name=\"level-{{level}}\" [id]=\"cat.category_id\" (click)=\"handleChange($event)\" (keyup)=\"$event.key === 'Enter' ? handleChange($event) : null\" />\n <label class=\"govuk-label govuk-radios__label\" [for]=\"cat.category_id\">\n <img class=\"iconImg\" src=\"/assets/images/folder.png\" alt=\"Folder icon\" />\n {{ cat.category_name }}\n </label>\n <ng-container *ngFor=\"let subcat of cat.sub_categories\">\n <ng-container *ngTemplateOutlet=\"folder;context:{cat:subcat,level:level+1}\"></ng-container>\n </ng-container>\n </div>\n</ng-template>\n", styles: [":host{position:relative;display:block}.folders{margin-bottom:20px}.folder{display:none;border-top:1px solid #CCC;margin:0 0 -1px}.folder:last-child{border-bottom:1px solid #CCC}.folders>.folder{display:block}input:checked~.folder{display:block}.iconImg{position:relative;display:inline-block;height:28px}.folder>.folder{margin-left:20px}.folder label:before{top:3px}.folder label:after{top:13px}p{font-weight:700}button{margin-right:20px}.close{float:right;width:30px;height:30px;background:url(/assets/img/x.PNG) no-repeat center center;cursor:pointer}.cancel{cursor:pointer}.cdk-overlay-pane{overflow:auto;background:#fff}.cdk-overlay-pane::-webkit-scrollbar{width:7px}.cdk-overlay-pane::-webkit-scrollbar-thumb{border:4px solid rgba(0,0,0,0);background-clip:padding-box;border-radius:9999px;background-color:#aaa}.cdk-overlay-pane::-webkit-scrollbar-button{display:none}.cdk-overlay-pane::-webkit-scrollbar-track-piece{background:#eee}.cdk-overlay-pane::-webkit-scrollbar-thumb{background:#ccc}\n"] }]
30240
+ args: [{ selector: 'xui-case-file-view-folder-selector', encapsulation: ViewEncapsulation.None, standalone: false, template: "<span tabindex=\"0\" aria-label=\"close\" class=\"close\" (click)=\"cancel()\" (keyup)=\"$event.key === 'Enter' ? cancel() : null\"></span>\n<h2 class=\"govuk-heading-l\">Move File</h2>\n<p>Where do you want to move \"{{ data.document.document_filename }}\" file?</p>\n<div class=\"folders govuk-radios govuk-radios--conditional\">\n <ng-container *ngFor=\"let cat of currentCategories\">\n <ng-container *ngTemplateOutlet=\"folder;context:{cat:cat,level:1}\"></ng-container>\n </ng-container>\n</div>\n<div class=\"govuk-button-group\">\n <button class=\"button button-primary\" type=\"button\" (click)=\"save()\">Save</button>\n <a (click)=\"cancel(); $event.preventDefault()\" class=\"cancel\" href=\"#\">Cancel</a>\n</div>\n\n<ng-template #folder let-cat=\"cat\" let-level=\"level\">\n <div class=\"folder govuk-radios__item\">\n <input class=\"govuk-radios__input\" type=\"radio\" name=\"level-{{level}}\" [id]=\"cat.category_id\" (click)=\"handleChange($event)\" (keyup)=\"$event.key === 'Enter' ? handleChange($event) : null\" />\n <label class=\"govuk-label govuk-radios__label\" [for]=\"cat.category_id\">\n <img class=\"iconImg\" src=\"/assets/images/folder.png\" alt=\"Folder icon\" />\n {{ cat.category_name }}\n </label>\n <ng-container *ngFor=\"let subcat of cat.sub_categories\">\n <ng-container *ngTemplateOutlet=\"folder;context:{cat:subcat,level:level+1}\"></ng-container>\n </ng-container>\n </div>\n</ng-template>", styles: [":host{position:relative;display:block}.folders{margin-bottom:20px}.folder{display:none;border-top:1px solid #CCC;margin:0 0 -1px}.folder:last-child{border-bottom:1px solid #CCC}.folders>.folder{display:block}input:checked~.folder{display:block}.iconImg{position:relative;display:inline-block;height:28px}.folder>.folder{margin-left:20px}.folder label:before{top:3px}.folder label:after{top:13px}p{font-weight:700}button{margin-right:20px}.close{float:right;width:30px;height:30px;background:url(/assets/img/x.PNG) no-repeat center center;cursor:pointer}.cancel{cursor:pointer}.cdk-overlay-pane{overflow:auto;background:#fff}.cdk-overlay-pane::-webkit-scrollbar{width:7px}.cdk-overlay-pane::-webkit-scrollbar-thumb{border:4px solid rgba(0,0,0,0);background-clip:padding-box;border-radius:9999px;background-color:#aaa}.cdk-overlay-pane::-webkit-scrollbar-button{display:none}.cdk-overlay-pane::-webkit-scrollbar-track-piece{background:#eee}.cdk-overlay-pane::-webkit-scrollbar-thumb{background:#ccc}\n"] }]
30204
30241
  }], () => [{ type: i1$3.MatDialogRef }, { type: undefined, decorators: [{
30205
30242
  type: Inject,
30206
30243
  args: [MAT_DIALOG_DATA]
@@ -30220,7 +30257,7 @@ function CaseFileViewOverlayMenuComponent_ng_template_4_ng_container_1_Template(
30220
30257
  i0.ɵɵadvance(2);
30221
30258
  i0.ɵɵtextInterpolate(ctx_r1.title);
30222
30259
  } }
30223
- function CaseFileViewOverlayMenuComponent_ng_template_4_ng_container_3_img_3_Template(rf, ctx) { if (rf & 1) {
30260
+ function CaseFileViewOverlayMenuComponent_ng_template_4_ng_container_3_img_2_Template(rf, ctx) { if (rf & 1) {
30224
30261
  i0.ɵɵelement(0, "img", 10);
30225
30262
  } if (rf & 2) {
30226
30263
  const item_r4 = i0.ɵɵnextContext().$implicit;
@@ -30229,16 +30266,16 @@ function CaseFileViewOverlayMenuComponent_ng_template_4_ng_container_3_img_3_Tem
30229
30266
  function CaseFileViewOverlayMenuComponent_ng_template_4_ng_container_3_Template(rf, ctx) { if (rf & 1) {
30230
30267
  const _r3 = i0.ɵɵgetCurrentView();
30231
30268
  i0.ɵɵelementContainerStart(0);
30232
- i0.ɵɵelementStart(1, "li")(2, "button", 7);
30233
- i0.ɵɵlistener("click", function CaseFileViewOverlayMenuComponent_ng_template_4_ng_container_3_Template_button_click_2_listener() { const item_r4 = i0.ɵɵrestoreView(_r3).$implicit; const ctx_r1 = i0.ɵɵnextContext(2); item_r4.actionFn(); return i0.ɵɵresetView(ctx_r1.closeOverlay()); });
30234
- i0.ɵɵtemplate(3, CaseFileViewOverlayMenuComponent_ng_template_4_ng_container_3_img_3_Template, 1, 3, "img", 8);
30235
- i0.ɵɵelementStart(4, "span", 9);
30236
- i0.ɵɵtext(5);
30237
- i0.ɵɵelementEnd()()();
30269
+ i0.ɵɵelementStart(1, "li", 7);
30270
+ i0.ɵɵlistener("click", function CaseFileViewOverlayMenuComponent_ng_template_4_ng_container_3_Template_li_click_1_listener() { const item_r4 = i0.ɵɵrestoreView(_r3).$implicit; const ctx_r1 = i0.ɵɵnextContext(2); item_r4.actionFn(); return i0.ɵɵresetView(ctx_r1.closeOverlay()); })("keydown.enter", function CaseFileViewOverlayMenuComponent_ng_template_4_ng_container_3_Template_li_keydown_enter_1_listener() { const item_r4 = i0.ɵɵrestoreView(_r3).$implicit; const ctx_r1 = i0.ɵɵnextContext(2); item_r4.actionFn(); return i0.ɵɵresetView(ctx_r1.closeOverlay()); });
30271
+ i0.ɵɵtemplate(2, CaseFileViewOverlayMenuComponent_ng_template_4_ng_container_3_img_2_Template, 1, 3, "img", 8);
30272
+ i0.ɵɵelementStart(3, "span", 9);
30273
+ i0.ɵɵtext(4);
30274
+ i0.ɵɵelementEnd()();
30238
30275
  i0.ɵɵelementContainerEnd();
30239
30276
  } if (rf & 2) {
30240
30277
  const item_r4 = ctx.$implicit;
30241
- i0.ɵɵadvance(3);
30278
+ i0.ɵɵadvance(2);
30242
30279
  i0.ɵɵproperty("ngIf", item_r4.iconSrc);
30243
30280
  i0.ɵɵadvance(2);
30244
30281
  i0.ɵɵtextInterpolate(item_r4.actionText);
@@ -30247,7 +30284,7 @@ function CaseFileViewOverlayMenuComponent_ng_template_4_Template(rf, ctx) { if (
30247
30284
  i0.ɵɵelementStart(0, "div", 3);
30248
30285
  i0.ɵɵtemplate(1, CaseFileViewOverlayMenuComponent_ng_template_4_ng_container_1_Template, 3, 1, "ng-container", 4);
30249
30286
  i0.ɵɵelementStart(2, "ul");
30250
- i0.ɵɵtemplate(3, CaseFileViewOverlayMenuComponent_ng_template_4_ng_container_3_Template, 6, 2, "ng-container", 5);
30287
+ i0.ɵɵtemplate(3, CaseFileViewOverlayMenuComponent_ng_template_4_ng_container_3_Template, 5, 2, "ng-container", 5);
30251
30288
  i0.ɵɵelementEnd()();
30252
30289
  } if (rf & 2) {
30253
30290
  const ctx_r1 = i0.ɵɵnextContext();
@@ -30278,7 +30315,7 @@ class CaseFileViewOverlayMenuComponent {
30278
30315
  }
30279
30316
  }
30280
30317
  static ɵfac = function CaseFileViewOverlayMenuComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaseFileViewOverlayMenuComponent)(); };
30281
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseFileViewOverlayMenuComponent, selectors: [["ccd-case-file-view-overlay-menu"]], inputs: { title: "title", menuItems: "menuItems", isOpen: "isOpen" }, outputs: { isOpenChange: "isOpenChange" }, standalone: false, ngContentSelectors: _c1$9, decls: 5, vars: 5, consts: [["trigger", "cdkOverlayOrigin"], ["type", "button", "cdkOverlayOrigin", "", "aria-haspopup", "true", 1, "overlay-toggle", 3, "click"], ["cdkConnectedOverlay", "", 3, "backdropClick", "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayBackdropClass"], [1, "overlay-menu"], [4, "ngIf"], [4, "ngFor", "ngForOf"], [1, "overlay-menu__title"], ["type", "button", 1, "overlay-menu__item", 3, "click"], ["class", "overlay-menu__itemIcon", "aria-hidden", "true", 3, "src", "alt", 4, "ngIf"], [1, "overlay-menu__actionText"], ["aria-hidden", "true", 1, "overlay-menu__itemIcon", 3, "src", "alt"]], template: function CaseFileViewOverlayMenuComponent_Template(rf, ctx) { if (rf & 1) {
30318
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseFileViewOverlayMenuComponent, selectors: [["ccd-case-file-view-overlay-menu"]], inputs: { title: "title", menuItems: "menuItems", isOpen: "isOpen" }, outputs: { isOpenChange: "isOpenChange" }, standalone: false, ngContentSelectors: _c1$9, decls: 5, vars: 5, consts: [["trigger", "cdkOverlayOrigin"], ["type", "button", "cdkOverlayOrigin", "", "aria-haspopup", "true", 1, "overlay-toggle", 3, "click"], ["cdkConnectedOverlay", "", 3, "backdropClick", "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayBackdropClass"], [1, "overlay-menu"], [4, "ngIf"], [4, "ngFor", "ngForOf"], [1, "overlay-menu__title"], ["tabindex", "0", 1, "overlay-menu__item", 3, "click", "keydown.enter"], ["class", "overlay-menu__itemIcon", "aria-hidden", "true", 3, "src", "alt", 4, "ngIf"], [1, "overlay-menu__actionText"], ["aria-hidden", "true", 1, "overlay-menu__itemIcon", 3, "src", "alt"]], template: function CaseFileViewOverlayMenuComponent_Template(rf, ctx) { if (rf & 1) {
30282
30319
  const _r1 = i0.ɵɵgetCurrentView();
30283
30320
  i0.ɵɵprojectionDef(_c0$v);
30284
30321
  i0.ɵɵelementStart(0, "div")(1, "button", 1, 0);
@@ -30298,7 +30335,7 @@ class CaseFileViewOverlayMenuComponent {
30298
30335
  }
30299
30336
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFileViewOverlayMenuComponent, [{
30300
30337
  type: Component,
30301
- args: [{ selector: 'ccd-case-file-view-overlay-menu', standalone: false, template: "<div>\n <button type=\"button\"\n class=\"overlay-toggle\"\n (click)=\"$event.stopPropagation(); setOpen()\"\n cdkOverlayOrigin #trigger=\"cdkOverlayOrigin\"\n aria-haspopup=\"true\"\n [attr.aria-expanded]=\"isOpen\">\n <ng-content select=\"[trigger]\" aria-hidden=\"true\"></ng-content>\n </button>\n\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isOpen\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n [cdkConnectedOverlayBackdropClass]=\"'cdk-overlay-transparent-backdrop'\"\n (backdropClick)=\"closeOverlay()\"\n >\n <div class=\"overlay-menu\">\n <ng-container *ngIf=\"title\">\n <div class=\"overlay-menu__title\">{{title}}</div>\n </ng-container>\n\n <ul>\n <ng-container *ngFor=\"let item of menuItems;\">\n <li>\n <button type=\"button\" class=\"overlay-menu__item\" (click)=\"item.actionFn(); closeOverlay();\">\n <img *ngIf=\"item.iconSrc\" [src]=\"item.iconSrc\" class=\"overlay-menu__itemIcon\" alt=\"{{item.actionText}} icon\" aria-hidden=\"true\" />\n <span class=\"overlay-menu__actionText\">{{item.actionText}}</span>\n </button>\n </li>\n </ng-container>\n </ul>\n </div>\n </ng-template>\n</div>\n", styles: [".overlay-toggle{display:block;background:none;border:0;padding:0 6px;margin-right:-4px;cursor:pointer}.overlay-menu{background-color:#fafafa;border:1px solid grey;margin-top:8px;font-size:1rem}.overlay-menu__title,.overlay-menu__item{padding:10px;border-bottom:1px solid grey}.overlay-menu__title:last-child,.overlay-menu__item:last-child{border:none}.overlay-menu__title{padding-left:6px;padding-right:6px}.overlay-menu__item{display:flex;align-items:center;cursor:pointer;font-size:.875em}.overlay-menu__item:hover{background-color:#fff2cc}.overlay-menu__item:focus{border:2px solid #ffbf47}.overlay-menu__itemIcon{height:1.25em;width:1.25em;margin-right:6px}\n"] }]
30338
+ args: [{ selector: 'ccd-case-file-view-overlay-menu', standalone: false, template: "<div>\n <button type=\"button\"\n class=\"overlay-toggle\"\n (click)=\"$event.stopPropagation(); setOpen()\"\n cdkOverlayOrigin #trigger=\"cdkOverlayOrigin\"\n aria-haspopup=\"true\"\n [attr.aria-expanded]=\"isOpen\">\n <ng-content select=\"[trigger]\" aria-hidden=\"true\"></ng-content>\n </button>\n\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isOpen\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n [cdkConnectedOverlayBackdropClass]=\"'cdk-overlay-transparent-backdrop'\"\n (backdropClick)=\"closeOverlay()\"\n >\n <div class=\"overlay-menu\">\n <ng-container *ngIf=\"title\">\n <div class=\"overlay-menu__title\">{{title}}</div>\n </ng-container>\n\n <ul>\n <ng-container *ngFor=\"let item of menuItems;\">\n <li class=\"overlay-menu__item\" tabindex=\"0\" (click)=\"item.actionFn(); closeOverlay();\" (keydown.enter)=\"item.actionFn(); closeOverlay();\">\n <img *ngIf=\"item.iconSrc\" [src]=\"item.iconSrc\" class=\"overlay-menu__itemIcon\" alt=\"{{item.actionText}} icon\" aria-hidden=\"true\" />\n <span class=\"overlay-menu__actionText\">{{item.actionText}}</span>\n </li>\n </ng-container>\n </ul>\n </div>\n </ng-template>\n</div>\n", styles: [".overlay-toggle{display:block;background:none;border:0;padding:0 6px;margin-right:-4px;cursor:pointer}.overlay-menu{background-color:#fafafa;border:1px solid grey;margin-top:8px;font-size:1rem}.overlay-menu__title,.overlay-menu__item{padding:10px;border-bottom:1px solid grey}.overlay-menu__title:last-child,.overlay-menu__item:last-child{border:none}.overlay-menu__title{padding-left:6px;padding-right:6px}.overlay-menu__item{display:flex;align-items:center;cursor:pointer;font-size:.875em}.overlay-menu__item:hover{background-color:#fff2cc}.overlay-menu__item:focus{border:2px solid #ffbf47}.overlay-menu__itemIcon{height:1.25em;width:1.25em;margin-right:6px}\n"] }]
30302
30339
  }], null, { title: [{
30303
30340
  type: Input
30304
30341
  }], menuItems: [{
@@ -31807,7 +31844,7 @@ class ManageCaseFlagsComponent extends AbstractJourneyComponent {
31807
31844
  if (this.flagsData) {
31808
31845
  this.flagsDisplayData = this.flagsData.reduce((displayData, flagsInstance) => {
31809
31846
  /* istanbul ignore else */
31810
- if (flagsInstance.flags.details?.length > 0) {
31847
+ if (flagsInstance.flags.details && flagsInstance.flags.details.length > 0) {
31811
31848
  displayData = [
31812
31849
  ...displayData,
31813
31850
  ...flagsInstance.flags.details.map((detail) => this.mapFlagDetailForDisplay(detail, flagsInstance, originalStatus, originalIdToFlag))
@@ -31817,7 +31854,7 @@ class ManageCaseFlagsComponent extends AbstractJourneyComponent {
31817
31854
  }, []).filter((flagForDisplay) => !this.excludedFlagStatuses.includes(flagForDisplay.originalStatus));
31818
31855
  }
31819
31856
  // Add a FormControl for the selected case flag if there is at least one flags instance remaining after mapping
31820
- if (this.flagsDisplayData?.length > 0) {
31857
+ if (this.flagsDisplayData && this.flagsDisplayData.length > 0) {
31821
31858
  this.formGroup.addControl(this.selectedControlName, new FormControl(null));
31822
31859
  }
31823
31860
  else {
@@ -31913,7 +31950,7 @@ class ManageCaseFlagsComponent extends AbstractJourneyComponent {
31913
31950
  // CaseField formatted_value from which to get the original persisted data
31914
31951
  const pathToValue = flagsInstance.pathToFlagsFormGroup;
31915
31952
  // Root-level Flags CaseFields don't have a dot-delimited path - just the CaseField ID itself - so don't drill down
31916
- if (pathToValue.includes('.')) {
31953
+ if (pathToValue.indexOf('.') > -1) {
31917
31954
  pathToValue.slice(pathToValue.indexOf('.') + 1).split('.').forEach((part) => {
31918
31955
  if (formattedValue && FieldsUtils.isNonEmptyObject(formattedValue)) {
31919
31956
  formattedValue = formattedValue[part];
@@ -33550,7 +33587,7 @@ class UpdateFlagComponent extends AbstractJourneyComponent {
33550
33587
  static ɵfac = function UpdateFlagComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || UpdateFlagComponent)(i0.ɵɵdirectiveInject(i1.RpxTranslationService), i0.ɵɵdirectiveInject(MultipageComponentStateService)); };
33551
33588
  static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UpdateFlagComponent, selectors: [["ccd-update-flag"]], inputs: { formGroup: "formGroup", displayContextParameter: "displayContextParameter" }, outputs: { caseFlagStateEmitter: "caseFlagStateEmitter" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 23, vars: 22, consts: [["externalUser", ""], ["updateFlagStatusReason", ""], [3, "formGroup"], ["data-module", "govuk-character-count", "data-maxlength", "200", 1, "govuk-character-count"], [1, "govuk-form-group", 3, "ngClass"], [1, "govuk-label-wrapper", "govuk-!-margin-bottom-4"], [1, "govuk-label", "govuk-label--m"], ["id", "update-flag-hint-external", "class", "govuk-hint", 4, "ngIf"], [1, "govuk-!-margin-bottom-4"], [1, "govuk-label", "govuk-label--s", 3, "for"], ["id", "update-flag-comments-hint-external", "class", "govuk-hint", 4, "ngIf"], [4, "ngIf", "ngIfElse"], ["id", "flag-status-container-v2_1", "class", "govuk-!-margin-bottom-4", 4, "ngIf"], ["id", "translation-checkbox-container", "class", "govuk-!-margin-bottom-6", 4, "ngIf"], ["id", "flag-status-container-v1", "class", "govuk-grid-row", 4, "ngIf"], ["id", "update-flag-hint-external", 1, "govuk-hint"], ["id", "update-flag-comments-hint-external", 1, "govuk-hint"], ["id", "update-flag-comments-hint", 1, "govuk-hint"], ["class", "govuk-warning-text", 4, "ngIf"], ["id", "update-flag-comments-not-entered-error-message", "class", "govuk-error-message", 4, "ngIf"], ["id", "update-flag-comments-char-limit-error", "class", "govuk-error-message", 4, "ngIf"], ["rows", "5", "aria-describedby", "update-flag-comments-hint update-flag-comments-char-limit-info update-flag-comments-char-limit-error", 1, "govuk-textarea", 3, "id", "name", "formControlName"], ["id", "update-flag-comments-char-limit-info", "aria-live", "polite", 1, "govuk-hint", "govuk-character-count__message"], [1, "govuk-warning-text"], ["aria-hidden", "true", 1, "govuk-warning-text__icon"], [1, "govuk-warning-text__text"], [1, "govuk-visually-hidden"], ["id", "update-flag-comments-not-entered-error-message", 1, "govuk-error-message"], ["id", "update-flag-comments-char-limit-error", 1, "govuk-error-message"], [4, "ngIf"], [4, "ngTemplateOutlet"], ["id", "update-flag-status-reason-not-entered-error-message", "class", "govuk-error-message", 4, "ngIf"], ["id", "update-flag-status-reason-char-limit-error", "class", "govuk-error-message", 4, "ngIf"], ["rows", "5", "aria-describedby", "update-flag-comments-hint-external update-flag-status-hint update-flag-status-reason-char-limit-info\n update-flag-status-reason-char-limit-error", 1, "govuk-textarea", 3, "id", "name", "formControlName"], ["id", "update-flag-status-reason-char-limit-info", "aria-live", "polite", 1, "govuk-hint", "govuk-character-count__message"], ["id", "update-flag-status-reason-not-entered-error-message", 1, "govuk-error-message"], ["id", "update-flag-status-reason-char-limit-error", 1, "govuk-error-message"], ["id", "flag-status-container-v2_1", 1, "govuk-!-margin-bottom-4"], ["aria-describedby", "update-flag-status-heading", 1, "govuk-fieldset"], [1, "govuk-fieldset__legend", "govuk-fieldset__legend--s"], ["id", "update-flag-status-heading", 1, "govuk-fieldset__heading"], ["data-module", "govuk-radios", 1, "govuk-radios", "govuk-radios--conditional", "govuk-!-margin-bottom-4", 3, "id"], ["class", "govuk-radios__item", 4, "ngFor", "ngForOf"], ["id", "update-flag-status-hint", 1, "govuk-hint"], [1, "govuk-radios__item"], ["type", "radio", 1, "govuk-radios__input", 3, "id", "name", "formControlName", "value"], [1, "govuk-label", "govuk-radios__label", 3, "for"], ["id", "translation-checkbox-container", 1, "govuk-!-margin-bottom-6"], ["data-module", "govuk-checkboxes", 1, "govuk-checkboxes"], [1, "govuk-checkboxes__item"], ["type", "checkbox", 1, "govuk-checkboxes__input", 3, "formControlName", "id", "name"], [1, "govuk-label", "govuk-checkboxes__label", 3, "for"], ["id", "flag-status-container-v1", 1, "govuk-grid-row"], [1, "govuk-grid-column-one-half"], [1, "govuk-tag", 3, "ngClass"], ["class", "button button-secondary", "type", "button", 3, "click", 4, "ngIf"], ["type", "button", 1, "button", "button-secondary", 3, "click"]], template: function UpdateFlagComponent_Template(rf, ctx) { if (rf & 1) {
33552
33589
  i0.ɵɵelementContainerStart(0, 2);
33553
- i0.ɵɵelementStart(1, "div", 3)(2, "div", 4)(3, "h1", 5)(4, "span", 6);
33590
+ i0.ɵɵelementStart(1, "div", 3)(2, "div", 4)(3, "h1", 5)(4, "label", 6);
33554
33591
  i0.ɵɵtext(5);
33555
33592
  i0.ɵɵpipe(6, "rpxTranslate");
33556
33593
  i0.ɵɵelementEnd()();
@@ -33593,7 +33630,7 @@ class UpdateFlagComponent extends AbstractJourneyComponent {
33593
33630
  }
33594
33631
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UpdateFlagComponent, [{
33595
33632
  type: Component,
33596
- args: [{ selector: 'ccd-update-flag', standalone: false, template: "<ng-container [formGroup]=\"formGroup\">\n <div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"200\">\n <div class=\"govuk-form-group\" [ngClass]=\"{'form-group-error': errorMessages.length > 0}\">\n <h1 class=\"govuk-label-wrapper govuk-!-margin-bottom-4\">\n <span class=\"govuk-label govuk-label--m\">\n {{updateFlagTitle | rpxTranslate}}\n </span>\n </h1>\n <div id=\"update-flag-hint-external\" class=\"govuk-hint\" *ngIf=\"externalUserUpdate\">\n {{selectedFlag?.flagDetailDisplay?.flagDetail | updateFlagTitleDisplay}}\n </div>\n\n <div class=\"govuk-!-margin-bottom-4\">\n <label class=\"govuk-label govuk-label--s\" [for]=\"caseFlagFormFields.COMMENTS\">\n {{\n externalUserUpdate\n ? (updateFlagStepEnum.COMMENT_FIELD_LABEL_EXTERNAL | rpxTranslate)\n : (updateFlagTitle | rpxTranslate) + (' comments' | rpxTranslate)\n }}\n </label>\n <div id=\"update-flag-comments-hint-external\" class=\"govuk-hint\" *ngIf=\"externalUserUpdate\">\n {{updateFlagStepEnum.COMMENT_HINT_TEXT_EXTERNAL | rpxTranslate}}\n </div>\n <ng-container *ngIf=\"internalUserUpdate || internalUser2Point1EnabledUpdate || displayContextParameter === '';\n else externalUser\">\n <div id=\"update-flag-comments-hint\" class=\"govuk-hint\">\n {{\n internalUserUpdate\n ? (updateFlagStepEnum.COMMENT_HINT_TEXT_INTERNAL | rpxTranslate)\n : (updateFlagStepEnum.COMMENT_HINT_TEXT_INTERNAL_2_POINT_1 | rpxTranslate)\n }}\n </div>\n <div class=\"govuk-warning-text\" *ngIf=\"internalUser2Point1EnabledUpdate && externallyVisibleFlag\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-visually-hidden\">{{'Warning' | rpxTranslate}}</span>\n {{updateFlagStepEnum.WARNING_TEXT | rpxTranslate}}\n </strong>\n </div>\n <div id=\"update-flag-comments-not-entered-error-message\" class=\"govuk-error-message\" *ngIf=\"commentsNotEnteredErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{commentsNotEnteredErrorMessage | rpxTranslate}}\n </div>\n <div id=\"update-flag-comments-char-limit-error\" class=\"govuk-error-message\" *ngIf=\"commentsCharLimitErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{commentsCharLimitErrorMessage | rpxTranslate}}\n </div>\n <textarea class=\"govuk-textarea\"\n [id]=\"caseFlagFormFields.COMMENTS\"\n [name]=\"caseFlagFormFields.COMMENTS\"\n [formControlName]=\"caseFlagFormFields.COMMENTS\"\n rows=\"5\"\n aria-describedby=\"update-flag-comments-hint update-flag-comments-char-limit-info update-flag-comments-char-limit-error\">\n </textarea>\n <div id=\"update-flag-comments-char-limit-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n {{updateFlagStepEnum.CHARACTER_LIMIT_INFO | rpxTranslate}}\n </div>\n </ng-container>\n <ng-template #externalUser>\n <ng-container *ngIf=\"externalUserUpdate\">\n <ng-container *ngTemplateOutlet=\"updateFlagStatusReason\"></ng-container>\n </ng-container>\n </ng-template>\n </div>\n\n <ng-template #updateFlagStatusReason>\n <div id=\"update-flag-status-reason-not-entered-error-message\" class=\"govuk-error-message\" *ngIf=\"statusReasonNotEnteredErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{statusReasonNotEnteredErrorMessage | rpxTranslate}}\n </div>\n <div id=\"update-flag-status-reason-char-limit-error\" class=\"govuk-error-message\" *ngIf=\"statusReasonCharLimitErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{statusReasonCharLimitErrorMessage | rpxTranslate}}\n </div>\n <textarea class=\"govuk-textarea\"\n [id]=\"caseFlagFormFields.STATUS_CHANGE_REASON\"\n [name]=\"caseFlagFormFields.STATUS_CHANGE_REASON\"\n [formControlName]=\"caseFlagFormFields.STATUS_CHANGE_REASON\"\n rows=\"5\"\n aria-describedby=\"update-flag-comments-hint-external update-flag-status-hint update-flag-status-reason-char-limit-info\n update-flag-status-reason-char-limit-error\">\n </textarea>\n <div id=\"update-flag-status-reason-char-limit-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n {{updateFlagStepEnum.CHARACTER_LIMIT_INFO | rpxTranslate}}\n </div>\n </ng-template>\n\n <div id=\"flag-status-container-v2_1\" class=\"govuk-!-margin-bottom-4\" *ngIf=\"internalUser2Point1EnabledUpdate\">\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"update-flag-status-heading\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--s\">\n <h1 id=\"update-flag-status-heading\" class=\"govuk-fieldset__heading\">\n {{updateFlagTitle | rpxTranslate}} {{'status' | rpxTranslate}}\n </h1>\n </legend>\n <div class=\"govuk-radios govuk-radios--conditional govuk-!-margin-bottom-4\" data-module=\"govuk-radios\" [id]=\"caseFlagFormFields.STATUS\">\n <div class=\"govuk-radios__item\" *ngFor=\"let status of validStatusProgressions\">\n <input class=\"govuk-radios__input\" type=\"radio\"\n [id]=\"caseFlagFormFields.STATUS + '_' + status\"\n [name]=\"caseFlagFormFields.STATUS\"\n [formControlName]=\"caseFlagFormFields.STATUS\"\n [value]=\"status\">\n <label class=\"govuk-label govuk-radios__label\" [for]=\"caseFlagFormFields.STATUS + '_' + status\">\n {{caseFlagStatusEnum[status] | rpxTranslate}}\n </label>\n </div>\n </div>\n </fieldset>\n\n <div id=\"update-flag-status-hint\" class=\"govuk-hint\">\n {{updateFlagStepEnum.STATUS_HINT_TEXT | rpxTranslate}}\n </div>\n <ng-container *ngTemplateOutlet=\"updateFlagStatusReason\"></ng-container>\n </div>\n\n <div id=\"translation-checkbox-container\" class=\"govuk-!-margin-bottom-6\" *ngIf=\"internalUser2Point1EnabledUpdate\">\n <div class=\"govuk-checkboxes\" data-module=\"govuk-checkboxes\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" type=\"checkbox\"\n [formControlName]=\"caseFlagFormFields.IS_WELSH_TRANSLATION_NEEDED\"\n [id]=\"caseFlagFormFields.IS_WELSH_TRANSLATION_NEEDED\"\n [name]=\"caseFlagFormFields.IS_WELSH_TRANSLATION_NEEDED\">\n <label class=\"govuk-label govuk-checkboxes__label\"\n [for]=\"caseFlagFormFields.IS_WELSH_TRANSLATION_NEEDED\">\n {{'I need to add a translation' | rpxTranslate}}\n </label>\n </div>\n </div>\n </div>\n\n <div id=\"flag-status-container-v1\" class=\"govuk-grid-row\" *ngIf=\"internalUserUpdate\">\n <div class=\"govuk-grid-column-one-half\">\n <p>{{'Flag status:' | rpxTranslate}}\n <span>\n <strong class=\"govuk-tag\" [ngClass]=\"{'govuk-tag--grey': selectedFlag.flagDetailDisplay.flagDetail.status === 'Inactive'}\">\n {{selectedFlag?.flagDetailDisplay?.flagDetail?.status | rpxTranslate}}\n </strong>\n </span>\n </p>\n </div>\n <div class=\"govuk-grid-column-one-half\">\n <button class=\"button button-secondary\" type=\"button\" (click)=\"onMakeInactive()\" *ngIf=\"selectedFlag.flagDetailDisplay.flagDetail.status === 'Active'\">\n {{'Make inactive' | rpxTranslate}}\n </button>\n </div>\n </div>\n </div>\n </div>\n</ng-container>\n" }]
33633
+ args: [{ selector: 'ccd-update-flag', standalone: false, template: "<ng-container [formGroup]=\"formGroup\">\n <div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"200\">\n <div class=\"govuk-form-group\" [ngClass]=\"{'form-group-error': errorMessages.length > 0}\">\n <h1 class=\"govuk-label-wrapper govuk-!-margin-bottom-4\">\n <label class=\"govuk-label govuk-label--m\">\n {{updateFlagTitle | rpxTranslate}}\n </label>\n </h1>\n <div id=\"update-flag-hint-external\" class=\"govuk-hint\" *ngIf=\"externalUserUpdate\">\n {{selectedFlag?.flagDetailDisplay?.flagDetail | updateFlagTitleDisplay}}\n </div>\n\n <div class=\"govuk-!-margin-bottom-4\">\n <label class=\"govuk-label govuk-label--s\" [for]=\"caseFlagFormFields.COMMENTS\">\n {{\n externalUserUpdate\n ? (updateFlagStepEnum.COMMENT_FIELD_LABEL_EXTERNAL | rpxTranslate)\n : (updateFlagTitle | rpxTranslate) + (' comments' | rpxTranslate)\n }}\n </label>\n <div id=\"update-flag-comments-hint-external\" class=\"govuk-hint\" *ngIf=\"externalUserUpdate\">\n {{updateFlagStepEnum.COMMENT_HINT_TEXT_EXTERNAL | rpxTranslate}}\n </div>\n <ng-container *ngIf=\"internalUserUpdate || internalUser2Point1EnabledUpdate || displayContextParameter === '';\n else externalUser\">\n <div id=\"update-flag-comments-hint\" class=\"govuk-hint\">\n {{\n internalUserUpdate\n ? (updateFlagStepEnum.COMMENT_HINT_TEXT_INTERNAL | rpxTranslate)\n : (updateFlagStepEnum.COMMENT_HINT_TEXT_INTERNAL_2_POINT_1 | rpxTranslate)\n }}\n </div>\n <div class=\"govuk-warning-text\" *ngIf=\"internalUser2Point1EnabledUpdate && externallyVisibleFlag\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-visually-hidden\">{{'Warning' | rpxTranslate}}</span>\n {{updateFlagStepEnum.WARNING_TEXT | rpxTranslate}}\n </strong>\n </div>\n <div id=\"update-flag-comments-not-entered-error-message\" class=\"govuk-error-message\" *ngIf=\"commentsNotEnteredErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{commentsNotEnteredErrorMessage | rpxTranslate}}\n </div>\n <div id=\"update-flag-comments-char-limit-error\" class=\"govuk-error-message\" *ngIf=\"commentsCharLimitErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{commentsCharLimitErrorMessage | rpxTranslate}}\n </div>\n <textarea class=\"govuk-textarea\"\n [id]=\"caseFlagFormFields.COMMENTS\"\n [name]=\"caseFlagFormFields.COMMENTS\"\n [formControlName]=\"caseFlagFormFields.COMMENTS\"\n rows=\"5\"\n aria-describedby=\"update-flag-comments-hint update-flag-comments-char-limit-info update-flag-comments-char-limit-error\">\n </textarea>\n <div id=\"update-flag-comments-char-limit-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n {{updateFlagStepEnum.CHARACTER_LIMIT_INFO | rpxTranslate}}\n </div>\n </ng-container>\n <ng-template #externalUser>\n <ng-container *ngIf=\"externalUserUpdate\">\n <ng-container *ngTemplateOutlet=\"updateFlagStatusReason\"></ng-container>\n </ng-container>\n </ng-template>\n </div>\n\n <ng-template #updateFlagStatusReason>\n <div id=\"update-flag-status-reason-not-entered-error-message\" class=\"govuk-error-message\" *ngIf=\"statusReasonNotEnteredErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{statusReasonNotEnteredErrorMessage | rpxTranslate}}\n </div>\n <div id=\"update-flag-status-reason-char-limit-error\" class=\"govuk-error-message\" *ngIf=\"statusReasonCharLimitErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{statusReasonCharLimitErrorMessage | rpxTranslate}}\n </div>\n <textarea class=\"govuk-textarea\"\n [id]=\"caseFlagFormFields.STATUS_CHANGE_REASON\"\n [name]=\"caseFlagFormFields.STATUS_CHANGE_REASON\"\n [formControlName]=\"caseFlagFormFields.STATUS_CHANGE_REASON\"\n rows=\"5\"\n aria-describedby=\"update-flag-comments-hint-external update-flag-status-hint update-flag-status-reason-char-limit-info\n update-flag-status-reason-char-limit-error\">\n </textarea>\n <div id=\"update-flag-status-reason-char-limit-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n {{updateFlagStepEnum.CHARACTER_LIMIT_INFO | rpxTranslate}}\n </div>\n </ng-template>\n\n <div id=\"flag-status-container-v2_1\" class=\"govuk-!-margin-bottom-4\" *ngIf=\"internalUser2Point1EnabledUpdate\">\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"update-flag-status-heading\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--s\">\n <h1 id=\"update-flag-status-heading\" class=\"govuk-fieldset__heading\">\n {{updateFlagTitle | rpxTranslate}} {{'status' | rpxTranslate}}\n </h1>\n </legend>\n <div class=\"govuk-radios govuk-radios--conditional govuk-!-margin-bottom-4\" data-module=\"govuk-radios\" [id]=\"caseFlagFormFields.STATUS\">\n <div class=\"govuk-radios__item\" *ngFor=\"let status of validStatusProgressions\">\n <input class=\"govuk-radios__input\" type=\"radio\"\n [id]=\"caseFlagFormFields.STATUS + '_' + status\"\n [name]=\"caseFlagFormFields.STATUS\"\n [formControlName]=\"caseFlagFormFields.STATUS\"\n [value]=\"status\">\n <label class=\"govuk-label govuk-radios__label\" [for]=\"caseFlagFormFields.STATUS + '_' + status\">\n {{caseFlagStatusEnum[status] | rpxTranslate}}\n </label>\n </div>\n </div>\n </fieldset>\n\n <div id=\"update-flag-status-hint\" class=\"govuk-hint\">\n {{updateFlagStepEnum.STATUS_HINT_TEXT | rpxTranslate}}\n </div>\n <ng-container *ngTemplateOutlet=\"updateFlagStatusReason\"></ng-container>\n </div>\n\n <div id=\"translation-checkbox-container\" class=\"govuk-!-margin-bottom-6\" *ngIf=\"internalUser2Point1EnabledUpdate\">\n <div class=\"govuk-checkboxes\" data-module=\"govuk-checkboxes\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" type=\"checkbox\"\n [formControlName]=\"caseFlagFormFields.IS_WELSH_TRANSLATION_NEEDED\"\n [id]=\"caseFlagFormFields.IS_WELSH_TRANSLATION_NEEDED\"\n [name]=\"caseFlagFormFields.IS_WELSH_TRANSLATION_NEEDED\">\n <label class=\"govuk-label govuk-checkboxes__label\"\n [for]=\"caseFlagFormFields.IS_WELSH_TRANSLATION_NEEDED\">\n {{'I need to add a translation' | rpxTranslate}}\n </label>\n </div>\n </div>\n </div>\n\n <div id=\"flag-status-container-v1\" class=\"govuk-grid-row\" *ngIf=\"internalUserUpdate\">\n <div class=\"govuk-grid-column-one-half\">\n <p>{{'Flag status:' | rpxTranslate}}\n <span>\n <strong class=\"govuk-tag\" [ngClass]=\"{'govuk-tag--grey': selectedFlag.flagDetailDisplay.flagDetail.status === 'Inactive'}\">\n {{selectedFlag?.flagDetailDisplay?.flagDetail?.status | rpxTranslate}}\n </strong>\n </span>\n </p>\n </div>\n <div class=\"govuk-grid-column-one-half\">\n <button class=\"button button-secondary\" type=\"button\" (click)=\"onMakeInactive()\" *ngIf=\"selectedFlag.flagDetailDisplay.flagDetail.status === 'Active'\">\n {{'Make inactive' | rpxTranslate}}\n </button>\n </div>\n </div>\n </div>\n </div>\n</ng-container>\n" }]
33597
33634
  }], () => [{ type: i1.RpxTranslationService }, { type: MultipageComponentStateService }], { formGroup: [{
33598
33635
  type: Input
33599
33636
  }], displayContextParameter: [{
@@ -33751,7 +33788,7 @@ class UpdateFlagAddTranslationFormComponent extends AbstractJourneyComponent {
33751
33788
  static ɵfac = /*@__PURE__*/ (() => { let ɵUpdateFlagAddTranslationFormComponent_BaseFactory; return function UpdateFlagAddTranslationFormComponent_Factory(__ngFactoryType__) { return (ɵUpdateFlagAddTranslationFormComponent_BaseFactory || (ɵUpdateFlagAddTranslationFormComponent_BaseFactory = i0.ɵɵgetInheritedFactory(UpdateFlagAddTranslationFormComponent)))(__ngFactoryType__ || UpdateFlagAddTranslationFormComponent); }; })();
33752
33789
  static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UpdateFlagAddTranslationFormComponent, selectors: [["ccd-update-flag-add-translation-form"]], inputs: { formGroup: "formGroup" }, outputs: { caseFlagStateEmitter: "caseFlagStateEmitter" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 50, vars: 54, consts: [[3, "formGroup"], ["data-module", "govuk-character-count", "data-maxlength", "200", 1, "govuk-character-count"], [1, "govuk-form-group", 3, "ngClass"], [1, "govuk-label-wrapper", "govuk-!-margin-bottom-6"], [1, "govuk-label", "govuk-label--m"], ["id", "add-translation-form-hint", 1, "govuk-hint"], [1, "govuk-!-margin-bottom-4"], [1, "govuk-label", "govuk-label--s", 3, "for"], ["id", "add-translation-other-flag-description-char-limit-error", "class", "govuk-error-message", 4, "ngIf"], ["rows", "5", 1, "govuk-textarea", 3, "id", "name", "formControlName"], ["id", "add-translation-other-flag-description-char-limit-info", "aria-live", "polite", 1, "govuk-hint", "govuk-character-count__message"], ["id", "add-translation-other-flag-description-welsh-char-limit-error", "class", "govuk-error-message", 4, "ngIf"], ["id", "add-translation-other-flag-description-welsh-char-limit-info", "aria-live", "polite", 1, "govuk-hint", "govuk-character-count__message"], ["id", "add-translation-flag-comments-char-limit-error", "class", "govuk-error-message", 4, "ngIf"], ["id", "add-translation-flag-comments-char-limit-info", "aria-live", "polite", 1, "govuk-hint", "govuk-character-count__message"], ["id", "add-translation-flag-comments-welsh-char-limit-error", "class", "govuk-error-message", 4, "ngIf"], ["id", "add-translation-flag-comments-welsh-char-limit-info", "aria-live", "polite", 1, "govuk-hint", "govuk-character-count__message"], ["id", "add-translation-other-flag-description-char-limit-error", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], ["id", "add-translation-other-flag-description-welsh-char-limit-error", 1, "govuk-error-message"], ["id", "add-translation-flag-comments-char-limit-error", 1, "govuk-error-message"], ["id", "add-translation-flag-comments-welsh-char-limit-error", 1, "govuk-error-message"]], template: function UpdateFlagAddTranslationFormComponent_Template(rf, ctx) { if (rf & 1) {
33753
33790
  i0.ɵɵelementContainerStart(0, 0);
33754
- i0.ɵɵelementStart(1, "div", 1)(2, "div", 2)(3, "h1", 3)(4, "span", 4);
33791
+ i0.ɵɵelementStart(1, "div", 1)(2, "div", 2)(3, "h1", 3)(4, "label", 4);
33755
33792
  i0.ɵɵtext(5);
33756
33793
  i0.ɵɵpipe(6, "rpxTranslate");
33757
33794
  i0.ɵɵelementEnd()();
@@ -33860,7 +33897,7 @@ class UpdateFlagAddTranslationFormComponent extends AbstractJourneyComponent {
33860
33897
  }
33861
33898
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UpdateFlagAddTranslationFormComponent, [{
33862
33899
  type: Component,
33863
- args: [{ selector: 'ccd-update-flag-add-translation-form', standalone: false, template: "<ng-container [formGroup]=\"formGroup\">\n <div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"200\">\n <div class=\"govuk-form-group\" [ngClass]=\"{'form-group-error': errorMessages.length > 0}\">\n <h1 class=\"govuk-label-wrapper govuk-!-margin-bottom-6\">\n <span class=\"govuk-label govuk-label--m\">\n {{ updateFlagAddTranslationTitle | rpxTranslate}}\n </span>\n </h1>\n <div id=\"add-translation-form-hint\" class=\"govuk-hint\">\n {{ updateFlagAddTranslationStepEnum.HINT_TEXT | rpxTranslate}}\n </div>\n\n <div class=\"govuk-!-margin-bottom-4\">\n <label [for]=\"caseFlagFormFields.OTHER_FLAG_DESCRIPTION\" class=\"govuk-label govuk-label--s\">{{'Other description' | rpxTranslate}}</label>\n <div id=\"add-translation-other-flag-description-char-limit-error\" class=\"govuk-error-message\"\n *ngIf=\"otherFlagDescriptionCharLimitErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{otherFlagDescriptionCharLimitErrorMessage | rpxTranslate}}\n </div>\n <textarea\n class=\"govuk-textarea\" rows=\"5\"\n [id]=\"caseFlagFormFields.OTHER_FLAG_DESCRIPTION\"\n [name]=\"caseFlagFormFields.OTHER_FLAG_DESCRIPTION\"\n [formControlName]=\"caseFlagFormFields.OTHER_FLAG_DESCRIPTION\">\n </textarea>\n <div id=\"add-translation-other-flag-description-char-limit-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n {{updateFlagAddTranslationStepEnum.CHARACTER_LIMIT_INFO | rpxTranslate}}\n </div>\n </div>\n\n <div class=\"govuk-!-margin-bottom-4\">\n <label [for]=\"caseFlagFormFields.OTHER_FLAG_DESCRIPTION_WELSH\" class=\"govuk-label govuk-label--s\">{{'Other description (Welsh)' | rpxTranslate}}</label>\n <div id=\"add-translation-other-flag-description-welsh-char-limit-error\" class=\"govuk-error-message\"\n *ngIf=\"otherFlagDescriptionWelshCharLimitErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{otherFlagDescriptionWelshCharLimitErrorMessage | rpxTranslate}}\n </div>\n <textarea\n class=\"govuk-textarea\" rows=\"5\"\n [id]=\"caseFlagFormFields.OTHER_FLAG_DESCRIPTION_WELSH\"\n [name]=\"caseFlagFormFields.OTHER_FLAG_DESCRIPTION_WELSH\"\n [formControlName]=\"caseFlagFormFields.OTHER_FLAG_DESCRIPTION_WELSH\">\n </textarea>\n <div id=\"add-translation-other-flag-description-welsh-char-limit-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n {{updateFlagAddTranslationStepEnum.CHARACTER_LIMIT_INFO | rpxTranslate}}\n </div>\n </div>\n\n <div class=\"govuk-!-margin-bottom-4\">\n <label [for]=\"caseFlagFormFields.COMMENTS\" class=\"govuk-label govuk-label--s\">{{'Flag comments' | rpxTranslate}}</label>\n <div id=\"add-translation-flag-comments-char-limit-error\" class=\"govuk-error-message\"\n *ngIf=\"flagCommentsCharLimitErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{flagCommentsCharLimitErrorMessage | rpxTranslate}}\n </div>\n <textarea\n class=\"govuk-textarea\" rows=\"5\"\n [id]=\"caseFlagFormFields.COMMENTS\"\n [name]=\"caseFlagFormFields.COMMENTS\"\n [formControlName]=\"caseFlagFormFields.COMMENTS\">\n </textarea>\n <div id=\"add-translation-flag-comments-char-limit-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n {{updateFlagAddTranslationStepEnum.CHARACTER_LIMIT_INFO | rpxTranslate}}\n </div>\n </div>\n\n <div class=\"govuk-!-margin-bottom-4\">\n <label [for]=\"caseFlagFormFields.COMMENTS_WELSH\" class=\"govuk-label govuk-label--s\">{{'Flag comments (Welsh)' | rpxTranslate}}</label>\n <div id=\"add-translation-flag-comments-welsh-char-limit-error\" class=\"govuk-error-message\"\n *ngIf=\"flagCommentsWelshCharLimitErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{flagCommentsWelshCharLimitErrorMessage | rpxTranslate}}\n </div>\n <textarea\n class=\"govuk-textarea\" rows=\"5\"\n [id]=\"caseFlagFormFields.COMMENTS_WELSH\"\n [name]=\"caseFlagFormFields.COMMENTS_WELSH\"\n [formControlName]=\"caseFlagFormFields.COMMENTS_WELSH\">\n </textarea>\n <div id=\"add-translation-flag-comments-welsh-char-limit-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n {{updateFlagAddTranslationStepEnum.CHARACTER_LIMIT_INFO | rpxTranslate}}\n </div>\n </div>\n </div>\n </div>\n</ng-container>\n" }]
33900
+ args: [{ selector: 'ccd-update-flag-add-translation-form', standalone: false, template: "<ng-container [formGroup]=\"formGroup\">\n <div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"200\">\n <div class=\"govuk-form-group\" [ngClass]=\"{'form-group-error': errorMessages.length > 0}\">\n <h1 class=\"govuk-label-wrapper govuk-!-margin-bottom-6\">\n <label class=\"govuk-label govuk-label--m\">\n {{ updateFlagAddTranslationTitle | rpxTranslate}}\n </label>\n </h1>\n <div id=\"add-translation-form-hint\" class=\"govuk-hint\">\n {{ updateFlagAddTranslationStepEnum.HINT_TEXT | rpxTranslate}}\n </div>\n\n <div class=\"govuk-!-margin-bottom-4\">\n <label [for]=\"caseFlagFormFields.OTHER_FLAG_DESCRIPTION\" class=\"govuk-label govuk-label--s\">{{'Other description' | rpxTranslate}}</label>\n <div id=\"add-translation-other-flag-description-char-limit-error\" class=\"govuk-error-message\"\n *ngIf=\"otherFlagDescriptionCharLimitErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{otherFlagDescriptionCharLimitErrorMessage | rpxTranslate}}\n </div>\n <textarea\n class=\"govuk-textarea\" rows=\"5\"\n [id]=\"caseFlagFormFields.OTHER_FLAG_DESCRIPTION\"\n [name]=\"caseFlagFormFields.OTHER_FLAG_DESCRIPTION\"\n [formControlName]=\"caseFlagFormFields.OTHER_FLAG_DESCRIPTION\">\n </textarea>\n <div id=\"add-translation-other-flag-description-char-limit-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n {{updateFlagAddTranslationStepEnum.CHARACTER_LIMIT_INFO | rpxTranslate}}\n </div>\n </div>\n\n <div class=\"govuk-!-margin-bottom-4\">\n <label [for]=\"caseFlagFormFields.OTHER_FLAG_DESCRIPTION_WELSH\" class=\"govuk-label govuk-label--s\">{{'Other description (Welsh)' | rpxTranslate}}</label>\n <div id=\"add-translation-other-flag-description-welsh-char-limit-error\" class=\"govuk-error-message\"\n *ngIf=\"otherFlagDescriptionWelshCharLimitErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{otherFlagDescriptionWelshCharLimitErrorMessage | rpxTranslate}}\n </div>\n <textarea\n class=\"govuk-textarea\" rows=\"5\"\n [id]=\"caseFlagFormFields.OTHER_FLAG_DESCRIPTION_WELSH\"\n [name]=\"caseFlagFormFields.OTHER_FLAG_DESCRIPTION_WELSH\"\n [formControlName]=\"caseFlagFormFields.OTHER_FLAG_DESCRIPTION_WELSH\">\n </textarea>\n <div id=\"add-translation-other-flag-description-welsh-char-limit-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n {{updateFlagAddTranslationStepEnum.CHARACTER_LIMIT_INFO | rpxTranslate}}\n </div>\n </div>\n\n <div class=\"govuk-!-margin-bottom-4\">\n <label [for]=\"caseFlagFormFields.COMMENTS\" class=\"govuk-label govuk-label--s\">{{'Flag comments' | rpxTranslate}}</label>\n <div id=\"add-translation-flag-comments-char-limit-error\" class=\"govuk-error-message\"\n *ngIf=\"flagCommentsCharLimitErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{flagCommentsCharLimitErrorMessage | rpxTranslate}}\n </div>\n <textarea\n class=\"govuk-textarea\" rows=\"5\"\n [id]=\"caseFlagFormFields.COMMENTS\"\n [name]=\"caseFlagFormFields.COMMENTS\"\n [formControlName]=\"caseFlagFormFields.COMMENTS\">\n </textarea>\n <div id=\"add-translation-flag-comments-char-limit-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n {{updateFlagAddTranslationStepEnum.CHARACTER_LIMIT_INFO | rpxTranslate}}\n </div>\n </div>\n\n <div class=\"govuk-!-margin-bottom-4\">\n <label [for]=\"caseFlagFormFields.COMMENTS_WELSH\" class=\"govuk-label govuk-label--s\">{{'Flag comments (Welsh)' | rpxTranslate}}</label>\n <div id=\"add-translation-flag-comments-welsh-char-limit-error\" class=\"govuk-error-message\"\n *ngIf=\"flagCommentsWelshCharLimitErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{flagCommentsWelshCharLimitErrorMessage | rpxTranslate}}\n </div>\n <textarea\n class=\"govuk-textarea\" rows=\"5\"\n [id]=\"caseFlagFormFields.COMMENTS_WELSH\"\n [name]=\"caseFlagFormFields.COMMENTS_WELSH\"\n [formControlName]=\"caseFlagFormFields.COMMENTS_WELSH\">\n </textarea>\n <div id=\"add-translation-flag-comments-welsh-char-limit-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n {{updateFlagAddTranslationStepEnum.CHARACTER_LIMIT_INFO | rpxTranslate}}\n </div>\n </div>\n </div>\n </div>\n</ng-container>" }]
33864
33901
  }], null, { formGroup: [{
33865
33902
  type: Input
33866
33903
  }], caseFlagStateEmitter: [{
@@ -34668,12 +34705,14 @@ class ReadComplexFieldCollectionTableComponent extends AbstractFieldReadComponen
34668
34705
  if (this.isHidden[row]) {
34669
34706
  return 'assets/img/accordion-plus.png';
34670
34707
  }
34671
- else if (this.isVerticleDataNotEmpty(row)) {
34672
- return 'assets/img/accordion-minus.png';
34673
- }
34674
34708
  else {
34675
- this.isHidden[row] = true;
34676
- return 'assets/img/accordion-plus.png';
34709
+ if (this.isVerticleDataNotEmpty(row)) {
34710
+ return 'assets/img/accordion-minus.png';
34711
+ }
34712
+ else {
34713
+ this.isHidden[row] = true;
34714
+ return 'assets/img/accordion-plus.png';
34715
+ }
34677
34716
  }
34678
34717
  }
34679
34718
  /**
@@ -35754,11 +35793,11 @@ class ReadFieldsFilterPipe {
35754
35793
  values = values || {};
35755
35794
  const type = field.field_type;
35756
35795
  const value = ReadFieldsFilterPipe.getValue(field, values);
35757
- const hasChildrenWithValue = type.complex_fields.some(f => {
35796
+ const hasChildrenWithValue = type.complex_fields.find(f => {
35758
35797
  const willKeep = ReadFieldsFilterPipe.keepField(f, value, true, checkConditionalShowAgainst);
35759
35798
  return willKeep && ReadFieldsFilterPipe.evaluateConditionalShow(f, checkConditionalShowAgainst).hidden !== true;
35760
35799
  });
35761
- return hasChildrenWithValue;
35800
+ return !!hasChildrenWithValue;
35762
35801
  }
35763
35802
  static isValidCollection(field, values, checkConditionalShowAgainst) {
35764
35803
  // if field is collection and it has complex/collection child field; parent field doesnt have value defined
@@ -35767,7 +35806,7 @@ class ReadFieldsFilterPipe {
35767
35806
  }
35768
35807
  const isNotEmpty = Array.isArray(field.value) && field.value.length > 0;
35769
35808
  if (isNotEmpty && field.field_type.collection_field_type.type === 'Complex') {
35770
- return field.value.some(item => {
35809
+ return !!field.value.find(item => {
35771
35810
  const complexField = plainToClassFromExist(new CaseField(), {
35772
35811
  id: field.field_type.collection_field_type.id,
35773
35812
  field_type: field.field_type.collection_field_type,
@@ -35781,7 +35820,7 @@ class ReadFieldsFilterPipe {
35781
35820
  }
35782
35821
  static isEmpty(value) {
35783
35822
  const fieldValue = value?.hasOwnProperty('list_items') && value?.hasOwnProperty('value') ? value.value : value;
35784
- return ReadFieldsFilterPipe.EMPTY_VALUES.includes(fieldValue)
35823
+ return ReadFieldsFilterPipe.EMPTY_VALUES.indexOf(fieldValue) !== -1
35785
35824
  || fieldValue.length === 0;
35786
35825
  }
35787
35826
  static isCompound(field) {
@@ -35892,7 +35931,7 @@ class ReadFieldsFilterPipe {
35892
35931
  return true;
35893
35932
  }
35894
35933
  // We also shouldn't ditch fields that will always come back with a null value.
35895
- if (this.ALWAYS_NULL_FIELDS.includes(field.field_type.type)) {
35934
+ if (this.ALWAYS_NULL_FIELDS.indexOf(field.field_type.type) !== -1) {
35896
35935
  return true;
35897
35936
  }
35898
35937
  value = value || {};
@@ -35921,7 +35960,7 @@ class ReadFieldsFilterPipe {
35921
35960
  }
35922
35961
  else if (field.show_condition) {
35923
35962
  let cond;
35924
- if (fieldId && field.show_condition.includes(`${fieldId}.`) && !formGroupAvailable && !!Object.keys(formValue).length) {
35963
+ if (fieldId && field.show_condition.indexOf(`${fieldId}.`) > -1 && !formGroupAvailable && !!Object.keys(formValue).length) {
35925
35964
  const search = `/.*${fieldId}./`;
35926
35965
  const searchRegExp = new RegExp(search, 'g');
35927
35966
  const replaceWith = '';
@@ -36004,7 +36043,7 @@ class CcdPageFieldsPipe {
36004
36043
  const control = dataFormGroup.controls['data'].get(key);
36005
36044
  return control['caseField'];
36006
36045
  }).filter(field => {
36007
- return field && page.case_fields.some(pcf => pcf.id === field.id);
36046
+ return field && !!page.case_fields.find(pcf => pcf.id === field.id);
36008
36047
  }).sort((a, b) => a.order - b.order);
36009
36048
  const rawValue = dataFormGroup.value;
36010
36049
  const value = page.case_fields.reduce((acc, field) => {
@@ -36548,9 +36587,9 @@ class FormModule {
36548
36587
  class CollectionCreateCheckerService {
36549
36588
  setDisplayContextForChildren(caseField, profile) {
36550
36589
  const children = this.getCaseFieldChildren(caseField);
36551
- if (children?.length > 0) {
36590
+ if (children && children.length > 0) {
36552
36591
  children.forEach(child => {
36553
- if (profile.user.idam.roles.some(role => this.hasCreateAccess(child, role))) {
36592
+ if (!!profile.user.idam.roles.find(role => this.hasCreateAccess(child, role))) {
36554
36593
  child.display_context = caseField.display_context;
36555
36594
  }
36556
36595
  if (this.isCollection(child) || this.isComplex(child)) {
@@ -36576,7 +36615,7 @@ class CollectionCreateCheckerService {
36576
36615
  return caseField.field_type.type === 'Collection';
36577
36616
  }
36578
36617
  hasCreateAccess(caseField, role) {
36579
- return caseField.acls.some(acl => acl.role === role && acl.create === true);
36618
+ return !!caseField.acls.find(acl => acl.role === role && acl.create === true);
36580
36619
  }
36581
36620
  static ɵfac = function CollectionCreateCheckerService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CollectionCreateCheckerService)(); };
36582
36621
  static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: CollectionCreateCheckerService, factory: CollectionCreateCheckerService.ɵfac });
@@ -37784,7 +37823,7 @@ class CaseEditSubmitComponent {
37784
37823
  return this.caseEdit?.error?.callbackErrors?.length;
37785
37824
  }
37786
37825
  navigateToPage(pageId) {
37787
- void this.caseEdit.navigateToPage(pageId);
37826
+ this.caseEdit.navigateToPage(pageId);
37788
37827
  }
37789
37828
  callbackErrorsNotify(errorContext) {
37790
37829
  this.caseEdit.ignoreWarning = errorContext.ignoreWarning;
@@ -38128,20 +38167,20 @@ class LoadingSpinnerModule {
38128
38167
  (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(LoadingSpinnerModule, { declarations: [LoadingSpinnerComponent], imports: [CommonModule, i1.RpxTranslationModule], exports: [LoadingSpinnerComponent] }); })();
38129
38168
 
38130
38169
  function CaseEditGenericErrorsComponent_div_0_Template(rf, ctx) { if (rf & 1) {
38131
- i0.ɵɵelementStart(0, "div", 2)(1, "h1", 3);
38170
+ i0.ɵɵelementStart(0, "div", 1)(1, "h1", 2);
38132
38171
  i0.ɵɵtext(2, " Something went wrong ");
38133
38172
  i0.ɵɵelementEnd();
38134
- i0.ɵɵelementStart(3, "div", 4)(4, "p");
38173
+ i0.ɵɵelementStart(3, "div", 3)(4, "p");
38135
38174
  i0.ɵɵtext(5, "We're working to fix the problem. Try again shortly.");
38136
38175
  i0.ɵɵelementEnd();
38137
- i0.ɵɵelementStart(6, "p")(7, "a", 5);
38176
+ i0.ɵɵelementStart(6, "p")(7, "a", 4);
38138
38177
  i0.ɵɵtext(8, "Contact us");
38139
38178
  i0.ɵɵelementEnd();
38140
38179
  i0.ɵɵtext(9, " if you're still having problems.");
38141
38180
  i0.ɵɵelementEnd()()();
38142
38181
  } }
38143
38182
  function CaseEditGenericErrorsComponent_div_1_ul_5_li_1_Template(rf, ctx) { if (rf & 1) {
38144
- i0.ɵɵelementStart(0, "li", 11);
38183
+ i0.ɵɵelementStart(0, "li", 9);
38145
38184
  i0.ɵɵtext(1);
38146
38185
  i0.ɵɵelementEnd();
38147
38186
  } if (rf & 2) {
@@ -38150,8 +38189,8 @@ function CaseEditGenericErrorsComponent_div_1_ul_5_li_1_Template(rf, ctx) { if (
38150
38189
  i0.ɵɵtextInterpolate(fieldError_r1.message);
38151
38190
  } }
38152
38191
  function CaseEditGenericErrorsComponent_div_1_ul_5_Template(rf, ctx) { if (rf & 1) {
38153
- i0.ɵɵelementStart(0, "ul", 9);
38154
- i0.ɵɵtemplate(1, CaseEditGenericErrorsComponent_div_1_ul_5_li_1_Template, 2, 1, "li", 10);
38192
+ i0.ɵɵelementStart(0, "ul", 7);
38193
+ i0.ɵɵtemplate(1, CaseEditGenericErrorsComponent_div_1_ul_5_li_1_Template, 2, 1, "li", 8);
38155
38194
  i0.ɵɵelementEnd();
38156
38195
  } if (rf & 2) {
38157
38196
  const ctx_r1 = i0.ɵɵnextContext(2);
@@ -38159,13 +38198,13 @@ function CaseEditGenericErrorsComponent_div_1_ul_5_Template(rf, ctx) { if (rf &
38159
38198
  i0.ɵɵproperty("ngForOf", ctx_r1.error.details.field_errors);
38160
38199
  } }
38161
38200
  function CaseEditGenericErrorsComponent_div_1_Template(rf, ctx) { if (rf & 1) {
38162
- i0.ɵɵelementStart(0, "div", 6)(1, "h3", 7);
38201
+ i0.ɵɵelementStart(0, "div", 1)(1, "h3", 5);
38163
38202
  i0.ɵɵtext(2, " The event could not be created ");
38164
38203
  i0.ɵɵelementEnd();
38165
38204
  i0.ɵɵelementStart(3, "p");
38166
38205
  i0.ɵɵtext(4);
38167
38206
  i0.ɵɵelementEnd();
38168
- i0.ɵɵtemplate(5, CaseEditGenericErrorsComponent_div_1_ul_5_Template, 2, 1, "ul", 8);
38207
+ i0.ɵɵtemplate(5, CaseEditGenericErrorsComponent_div_1_ul_5_Template, 2, 1, "ul", 6);
38169
38208
  i0.ɵɵelementEnd();
38170
38209
  } if (rf & 2) {
38171
38210
  const ctx_r1 = i0.ɵɵnextContext();
@@ -38177,8 +38216,8 @@ function CaseEditGenericErrorsComponent_div_1_Template(rf, ctx) { if (rf & 1) {
38177
38216
  class CaseEditGenericErrorsComponent {
38178
38217
  error;
38179
38218
  static ɵfac = function CaseEditGenericErrorsComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaseEditGenericErrorsComponent)(); };
38180
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEditGenericErrorsComponent, selectors: [["ccd-case-edit-generic-errors"]], inputs: { error: "error" }, standalone: false, features: [i0.ɵɵProvidersFeature([])], decls: 2, vars: 2, consts: [["class", "error-summary", "role", "group", "aria-labelledby", "edit-case-event_error_generic-summary-heading", "tabindex", "-1", 4, "ngIf"], ["class", "error-summary", "role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 4, "ngIf"], ["role", "group", "aria-labelledby", "edit-case-event_error_generic-summary-heading", "tabindex", "-1", 1, "error-summary"], ["id", "edit-case-event_error_generic-summary-heading", 1, "heading-h1", "error-summary-heading"], ["id", "edit-case-event_error_generic-summary-body", 1, "govuk-error-summary__body"], ["href", "get-help", "target", "_blank"], ["role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 1, "error-summary"], ["id", "edit-case-event_error-summary-heading", 1, "heading-h3", "error-summary-heading"], ["class", "error-summary-list", 4, "ngIf"], [1, "error-summary-list"], ["class", "ccd-error-summary-li", 4, "ngFor", "ngForOf"], [1, "ccd-error-summary-li"]], template: function CaseEditGenericErrorsComponent_Template(rf, ctx) { if (rf & 1) {
38181
- i0.ɵɵtemplate(0, CaseEditGenericErrorsComponent_div_0_Template, 10, 0, "div", 0)(1, CaseEditGenericErrorsComponent_div_1_Template, 6, 2, "div", 1);
38219
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEditGenericErrorsComponent, selectors: [["ccd-case-edit-generic-errors"]], inputs: { error: "error" }, standalone: false, features: [i0.ɵɵProvidersFeature([])], decls: 2, vars: 2, consts: [["class", "error-summary", "role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 4, "ngIf"], ["role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 1, "error-summary"], ["id", "edit-case-event_error-summary-heading", 1, "heading-h1", "error-summary-heading"], ["id", "edit-case-event_error-summary-body", 1, "govuk-error-summary__body"], ["href", "get-help", "target", "_blank"], ["id", "edit-case-event_error-summary-heading", 1, "heading-h3", "error-summary-heading"], ["class", "error-summary-list", 4, "ngIf"], [1, "error-summary-list"], ["class", "ccd-error-summary-li", 4, "ngFor", "ngForOf"], [1, "ccd-error-summary-li"]], template: function CaseEditGenericErrorsComponent_Template(rf, ctx) { if (rf & 1) {
38220
+ i0.ɵɵtemplate(0, CaseEditGenericErrorsComponent_div_0_Template, 10, 0, "div", 0)(1, CaseEditGenericErrorsComponent_div_1_Template, 6, 2, "div", 0);
38182
38221
  } if (rf & 2) {
38183
38222
  i0.ɵɵproperty("ngIf", ctx.error && (!(ctx.error.callbackErrors || ctx.error.callbackWarnings || ctx.error.details) && !ctx.error.message));
38184
38223
  i0.ɵɵadvance();
@@ -38187,7 +38226,7 @@ class CaseEditGenericErrorsComponent {
38187
38226
  }
38188
38227
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditGenericErrorsComponent, [{
38189
38228
  type: Component,
38190
- args: [{ selector: 'ccd-case-edit-generic-errors', providers: [], standalone: false, template: "<!-- Generic error heading and error message to be displayed only if there are no specific callback errors or warnings, or no error details -->\n<div *ngIf=\"error && (!(error.callbackErrors || error.callbackWarnings || error.details) && !error.message)\" class=\"error-summary\" role=\"group\" aria-labelledby=\"edit-case-event_error_generic-summary-heading\" tabindex=\"-1\">\n <h1 class=\"heading-h1 error-summary-heading\" id=\"edit-case-event_error_generic-summary-heading\">\n Something went wrong\n </h1>\n <div class=\"govuk-error-summary__body\" id=\"edit-case-event_error_generic-summary-body\">\n <p>We're working to fix the problem. Try again shortly.</p>\n <p><a href=\"get-help\" target=\"_blank\">Contact us</a> if you're still having problems.</p>\n </div>\n </div>\n <!-- Event error heading and error message to be displayed if there are specific error details -->\n <div *ngIf=\"error && (error.details || error.message)\" class=\"error-summary\" role=\"group\" aria-labelledby=\"edit-case-event_error-summary-heading\" tabindex=\"-1\">\n <h3 class=\"heading-h3 error-summary-heading\" id=\"edit-case-event_error-summary-heading\">\n The event could not be created\n </h3>\n <p>{{error.message}}</p>\n <ul *ngIf=\"error.details?.field_errors\" class=\"error-summary-list\">\n <li *ngFor=\"let fieldError of error.details.field_errors\" class=\"ccd-error-summary-li\">{{fieldError.message}}</li>\n </ul>\n </div>\n", styles: ["#fieldset-case-data{margin-bottom:30px}#fieldset-case-data th{width:1%;white-space:nowrap;vertical-align:top}.compound-field td{padding:0}#confirmation-header{width:630px;background-color:#17958b;border:solid 1px #979797;color:#fff;text-align:center}#confirmation-body{width:630px;background-color:#fff}.valign-top{vertical-align:top}.summary-fields{margin-bottom:30px}.summary-fields tbody tr th,.summary-fields tbody tr td{border-bottom:0px}a.disabled{pointer-events:none;cursor:default}.case-field-label{width:45%}.case-field-content{width:50%}.no-bottom-border{border-bottom:none}.case-field-change{width:5%}.refresh-modal-backdrop{position:fixed;inset:0;background:#0006;display:flex;align-items:center;justify-content:center;z-index:1000}.refresh-modal{background:#fff;padding:24px;max-width:520px;width:90%;box-shadow:0 8px 24px #0003;border-radius:4px;text-align:center}.refresh-modal .button{margin-top:12px}\n"] }]
38229
+ args: [{ selector: 'ccd-case-edit-generic-errors', providers: [], standalone: false, template: "<!-- Generic error heading and error message to be displayed only if there are no specific callback errors or warnings, or no error details -->\n<div *ngIf=\"error && (!(error.callbackErrors || error.callbackWarnings || error.details) && !error.message)\" class=\"error-summary\" role=\"group\" aria-labelledby=\"edit-case-event_error-summary-heading\" tabindex=\"-1\">\n <h1 class=\"heading-h1 error-summary-heading\" id=\"edit-case-event_error-summary-heading\">\n Something went wrong\n </h1>\n <div class=\"govuk-error-summary__body\" id=\"edit-case-event_error-summary-body\">\n <p>We're working to fix the problem. Try again shortly.</p>\n <p><a href=\"get-help\" target=\"_blank\">Contact us</a> if you're still having problems.</p>\n </div>\n </div>\n <!-- Event error heading and error message to be displayed if there are specific error details -->\n <div *ngIf=\"error && (error.details || error.message)\" class=\"error-summary\" role=\"group\" aria-labelledby=\"edit-case-event_error-summary-heading\" tabindex=\"-1\">\n <h3 class=\"heading-h3 error-summary-heading\" id=\"edit-case-event_error-summary-heading\">\n The event could not be created\n </h3>\n <p>{{error.message}}</p>\n <ul *ngIf=\"error.details?.field_errors\" class=\"error-summary-list\">\n <li *ngFor=\"let fieldError of error.details.field_errors\" class=\"ccd-error-summary-li\">{{fieldError.message}}</li>\n </ul>\n </div>\n ", styles: ["#fieldset-case-data{margin-bottom:30px}#fieldset-case-data th{width:1%;white-space:nowrap;vertical-align:top}.compound-field td{padding:0}#confirmation-header{width:630px;background-color:#17958b;border:solid 1px #979797;color:#fff;text-align:center}#confirmation-body{width:630px;background-color:#fff}.valign-top{vertical-align:top}.summary-fields{margin-bottom:30px}.summary-fields tbody tr th,.summary-fields tbody tr td{border-bottom:0px}a.disabled{pointer-events:none;cursor:default}.case-field-label{width:45%}.case-field-content{width:50%}.no-bottom-border{border-bottom:none}.case-field-change{width:5%}.refresh-modal-backdrop{position:fixed;inset:0;background:#0006;display:flex;align-items:center;justify-content:center;z-index:1000}.refresh-modal{background:#fff;padding:24px;max-width:520px;width:90%;box-shadow:0 8px 24px #0003;border-radius:4px;text-align:center}.refresh-modal .button{margin-top:12px}\n"] }]
38191
38230
  }], null, { error: [{
38192
38231
  type: Input
38193
38232
  }] }); })();
@@ -38728,13 +38767,14 @@ function CaseListComponent_td_6_Template(rf, ctx) { if (rf & 1) {
38728
38767
  i0.ɵɵelementStart(0, "td", 8)(1, "div", 9)(2, "input", 10);
38729
38768
  i0.ɵɵlistener("change", function CaseListComponent_td_6_Template_input_change_2_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.selectAll()); });
38730
38769
  i0.ɵɵelementEnd();
38731
- i0.ɵɵelementStart(3, "label", 11);
38732
- i0.ɵɵtext(4, " Select all cases ");
38733
- i0.ɵɵelementEnd()()();
38770
+ i0.ɵɵelement(3, "label", 11);
38771
+ i0.ɵɵelementEnd()();
38734
38772
  } if (rf & 2) {
38735
38773
  const ctx_r1 = i0.ɵɵnextContext();
38736
38774
  i0.ɵɵadvance(2);
38737
38775
  i0.ɵɵproperty("checked", ctx_r1.allOnPageSelected())("disabled", !ctx_r1.canAnyBeShared());
38776
+ i0.ɵɵadvance();
38777
+ i0.ɵɵattribute("aria-labelledby", "select-all");
38738
38778
  } }
38739
38779
  function CaseListComponent_th_7_Template(rf, ctx) { if (rf & 1) {
38740
38780
  i0.ɵɵelementStart(0, "th", 12);
@@ -38751,9 +38791,8 @@ function CaseListComponent_ng_container_9_td_2_Template(rf, ctx) { if (rf & 1) {
38751
38791
  i0.ɵɵelementStart(0, "td", 15)(1, "div", 9)(2, "input", 16);
38752
38792
  i0.ɵɵlistener("change", function CaseListComponent_ng_container_9_td_2_Template_input_change_2_listener() { i0.ɵɵrestoreView(_r4); const c_r5 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.changeSelection(c_r5)); })("keyup", function CaseListComponent_ng_container_9_td_2_Template_input_keyup_2_listener($event) { i0.ɵɵrestoreView(_r4); const c_r5 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onKeyUp($event, c_r5)); });
38753
38793
  i0.ɵɵelementEnd();
38754
- i0.ɵɵelementStart(3, "label", 17);
38755
- i0.ɵɵtext(4);
38756
- i0.ɵɵelementEnd()()();
38794
+ i0.ɵɵelement(3, "label", 17);
38795
+ i0.ɵɵelementEnd()();
38757
38796
  } if (rf & 2) {
38758
38797
  const ctx_r5 = i0.ɵɵnextContext();
38759
38798
  const c_r5 = ctx_r5.$implicit;
@@ -38763,8 +38802,7 @@ function CaseListComponent_ng_container_9_td_2_Template(rf, ctx) { if (rf & 1) {
38763
38802
  i0.ɵɵproperty("id", i0.ɵɵinterpolate1("select-", c_r5[ctx_r1.tableConfig.idField] || i_r7))("name", i0.ɵɵinterpolate1("select-", c_r5[ctx_r1.tableConfig.idField] || i_r7))("checked", ctx_r1.isSelected(c_r5))("disabled", !ctx_r1.canBeShared(c_r5));
38764
38803
  i0.ɵɵadvance();
38765
38804
  i0.ɵɵproperty("for", i0.ɵɵinterpolate1("select-", c_r5[ctx_r1.tableConfig.idField] || i_r7));
38766
- i0.ɵɵadvance();
38767
- i0.ɵɵtextInterpolate1(" Select case ", c_r5[ctx_r1.tableConfig.idField] || i_r7, " ");
38805
+ i0.ɵɵattribute("aria-labelledby", "select-" + (c_r5[ctx_r1.tableConfig.idField] || i_r7));
38768
38806
  } }
38769
38807
  function CaseListComponent_ng_container_9_ng_container_3_th_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
38770
38808
  i0.ɵɵelementContainerStart(0);
@@ -38895,7 +38933,7 @@ function CaseListComponent_ng_container_9_ng_container_3_Template(rf, ctx) { if
38895
38933
  function CaseListComponent_ng_container_9_Template(rf, ctx) { if (rf & 1) {
38896
38934
  i0.ɵɵelementContainerStart(0);
38897
38935
  i0.ɵɵelementStart(1, "tr", 13);
38898
- i0.ɵɵtemplate(2, CaseListComponent_ng_container_9_td_2_Template, 5, 9, "td", 14)(3, CaseListComponent_ng_container_9_ng_container_3_Template, 3, 2, "ng-container", 6);
38936
+ i0.ɵɵtemplate(2, CaseListComponent_ng_container_9_td_2_Template, 4, 9, "td", 14)(3, CaseListComponent_ng_container_9_ng_container_3_Template, 3, 2, "ng-container", 6);
38899
38937
  i0.ɵɵelementEnd();
38900
38938
  i0.ɵɵelementContainerEnd();
38901
38939
  } if (rf & 2) {
@@ -38976,8 +39014,10 @@ class CaseListComponent {
38976
39014
  }
38977
39015
  });
38978
39016
  }
38979
- else if (this.canBeShared(aCase)) {
38980
- this.selectedCases = [...this.selectedCases, aCase];
39017
+ else {
39018
+ if (this.canBeShared(aCase)) {
39019
+ this.selectedCases = [...this.selectedCases, aCase];
39020
+ }
38981
39021
  }
38982
39022
  this.selection.emit(this.selectedCases);
38983
39023
  }
@@ -39006,13 +39046,13 @@ class CaseListComponent {
39006
39046
  this.pageChange.emit(pageNumber);
39007
39047
  }
39008
39048
  static ɵfac = function CaseListComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaseListComponent)(i0.ɵɵdirectiveInject(BrowserService)); };
39009
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseListComponent, selectors: [["ccd-case-list"]], inputs: { classes: "classes", caption: "caption", firstCellIsHeader: "firstCellIsHeader", cases: "cases", tableConfig: "tableConfig", selectionEnabled: "selectionEnabled", selectedCases: "selectedCases", currentPageNo: "currentPageNo", totalResultsCount: "totalResultsCount", pageSize: "pageSize" }, outputs: { selection: "selection", pageChange: "pageChange" }, standalone: false, decls: 12, vars: 16, consts: [[1, "govuk-table__caption"], [1, "govuk-table__head"], [1, "govuk-table__row"], ["class", "govuk-table__header", 4, "ngIf"], ["class", "govuk-table__header", "scope", "col", 4, "ngFor", "ngForOf"], [1, "govuk-table__body"], [4, "ngFor", "ngForOf"], [3, "pageChange", 4, "ngIf"], [1, "govuk-table__header"], [1, "govuk-checkboxes__item"], ["id", "select-all", "name", "select-all", "type", "checkbox", 1, "govuk-checkboxes__input", 3, "change", "checked", "disabled"], ["for", "select-all", 1, "govuk-label", "govuk-checkboxes__label", "govuk-visually-hidden"], ["scope", "col", 1, "govuk-table__header"], ["data-selector", "table-row", 1, "govuk-table__row"], ["data-selector", "table-header", "class", "govuk-table__header", "scope", "row", 4, "ngIf"], ["data-selector", "table-header", "scope", "row", 1, "govuk-table__header"], ["type", "checkbox", 1, "govuk-checkboxes__input", 3, "change", "keyup", "id", "name", "checked", "disabled"], [1, "govuk-label", "govuk-checkboxes__label", "govuk-visually-hidden", 3, "for"], ["data-selector", "table-cell", "class", "govuk-table__cell", 3, "ngSwitch", 4, "ngIf"], [4, "ngIf"], [1, "govuk-link", 3, "routerLink"], ["data-selector", "table-cell", 1, "govuk-table__cell", 3, "ngSwitch"], [4, "ngSwitchCase"], [4, "ngSwitchDefault"], [3, "pageChange"]], template: function CaseListComponent_Template(rf, ctx) { if (rf & 1) {
39049
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseListComponent, selectors: [["ccd-case-list"]], inputs: { classes: "classes", caption: "caption", firstCellIsHeader: "firstCellIsHeader", cases: "cases", tableConfig: "tableConfig", selectionEnabled: "selectionEnabled", selectedCases: "selectedCases", currentPageNo: "currentPageNo", totalResultsCount: "totalResultsCount", pageSize: "pageSize" }, outputs: { selection: "selection", pageChange: "pageChange" }, standalone: false, decls: 12, vars: 16, consts: [[1, "govuk-table__caption"], [1, "govuk-table__head"], [1, "govuk-table__row"], ["class", "govuk-table__header", 4, "ngIf"], ["class", "govuk-table__header", "scope", "col", 4, "ngFor", "ngForOf"], [1, "govuk-table__body"], [4, "ngFor", "ngForOf"], [3, "pageChange", 4, "ngIf"], [1, "govuk-table__header"], [1, "govuk-checkboxes__item"], ["id", "select-all", "name", "select-all", "type", "checkbox", 1, "govuk-checkboxes__input", 3, "change", "checked", "disabled"], ["for", "select-all", 1, "govuk-label", "govuk-checkboxes__label"], ["scope", "col", 1, "govuk-table__header"], ["data-selector", "table-row", 1, "govuk-table__row"], ["data-selector", "table-header", "class", "govuk-table__header", "scope", "row", 4, "ngIf"], ["data-selector", "table-header", "scope", "row", 1, "govuk-table__header"], ["type", "checkbox", 1, "govuk-checkboxes__input", 3, "change", "keyup", "id", "name", "checked", "disabled"], [1, "govuk-label", "govuk-checkboxes__label", 3, "for"], ["data-selector", "table-cell", "class", "govuk-table__cell", 3, "ngSwitch", 4, "ngIf"], [4, "ngIf"], [1, "govuk-link", 3, "routerLink"], ["data-selector", "table-cell", 1, "govuk-table__cell", 3, "ngSwitch"], [4, "ngSwitchCase"], [4, "ngSwitchDefault"], [3, "pageChange"]], template: function CaseListComponent_Template(rf, ctx) { if (rf & 1) {
39010
39050
  i0.ɵɵelementStart(0, "table")(1, "caption", 0);
39011
39051
  i0.ɵɵtext(2);
39012
39052
  i0.ɵɵpipe(3, "rpxTranslate");
39013
39053
  i0.ɵɵelementEnd();
39014
39054
  i0.ɵɵelementStart(4, "thead", 1)(5, "tr", 2);
39015
- i0.ɵɵtemplate(6, CaseListComponent_td_6_Template, 5, 2, "td", 3)(7, CaseListComponent_th_7_Template, 3, 3, "th", 4);
39055
+ i0.ɵɵtemplate(6, CaseListComponent_td_6_Template, 4, 3, "td", 3)(7, CaseListComponent_th_7_Template, 3, 3, "th", 4);
39016
39056
  i0.ɵɵelementEnd()();
39017
39057
  i0.ɵɵelementStart(8, "tbody", 5);
39018
39058
  i0.ɵɵtemplate(9, CaseListComponent_ng_container_9_Template, 4, 2, "ng-container", 6);
@@ -39035,7 +39075,7 @@ class CaseListComponent {
39035
39075
  }
39036
39076
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseListComponent, [{
39037
39077
  type: Component,
39038
- args: [{ selector: 'ccd-case-list', standalone: false, template: "<table class=\"{{'govuk-table ' + classes}}\">\n <caption class=\"govuk-table__caption\">{{caption | rpxTranslate}}</caption>\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header\" *ngIf=\"selectionEnabled\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" id=\"select-all\" name=\"select-all\" type=\"checkbox\" (change)=\"selectAll()\"\n [checked]=\"allOnPageSelected()\" [disabled]=\"!canAnyBeShared()\" />\n <!-- This label element is used to hide the standard checkbox with a govuk-styled one -->\n <label class=\"govuk-label govuk-checkboxes__label govuk-visually-hidden\" for=\"select-all\">\n Select all cases\n </label>\n </div>\n </td>\n <th class=\"govuk-table__header\" scope=\"col\" *ngFor=\"let h of tableConfig.columnConfigs\">{{h.header | rpxTranslate}}</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <ng-container *ngFor=\"let c of cases | paginate: { itemsPerPage: pageSize, currentPage: currentPageNo, totalItems: totalResultsCount }; index as i\">\n <tr data-selector=\"table-row\" class=\"govuk-table__row\">\n <td data-selector=\"table-header\" class=\"govuk-table__header\" scope=\"row\" *ngIf=\"selectionEnabled\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" id=\"select-{{ c[tableConfig.idField] || i }}\" name=\"select-{{ c[tableConfig.idField] || i }}\"\n type=\"checkbox\" (change)=\"changeSelection(c)\" [checked]=\"isSelected(c)\" [disabled]=\"!canBeShared(c)\" (keyup)=\"onKeyUp($event, c)\" />\n <!-- This label element is used to hide the standard checkbox with a govuk-styled one -->\n <label class=\"govuk-label govuk-checkboxes__label govuk-visually-hidden\" for=\"select-{{ c[tableConfig.idField] || i }}\">\n Select case {{ c[tableConfig.idField] || i }}\n </label>\n </div>\n </td>\n <ng-container *ngFor=\"let col of tableConfig.columnConfigs; first as isFirst\">\n <th data-selector=\"table-header\" class=\"govuk-table__header\" scope=\"row\" *ngIf=\"isFirst && firstCellIsHeader\">\n <ng-container *ngIf=\"!col.type || col.type === 'text'\">{{c[col.key] | rpxTranslate}}</ng-container>\n <ng-container *ngIf=\"col.type === 'link' && c.routerLink\">\n <a class=\"govuk-link\" [routerLink]=\"c.routerLink\">{{c[col.key] | rpxTranslate}}</a>\n </ng-container>\n </th>\n <td data-selector=\"table-cell\" class=\"govuk-table__cell\" *ngIf=\"!(isFirst && firstCellIsHeader)\" [ngSwitch]=\"col?.type\">\n <ng-container *ngIf=\"col.type === 'link' && c.routerLink\">\n <a class=\"govuk-link\" [routerLink]=\"c.routerLink\">{{c[col.key] | rpxTranslate}}</a>\n </ng-container>\n <ng-container *ngSwitchCase=\"'money'\">-{{ c[col.key] | currency:'GBP' }}</ng-container>\n <ng-container *ngSwitchCase=\"'date'\">{{formatDate(c[col.key])}}</ng-container>\n <ng-container *ngSwitchCase=\"'dateAtTime'\">{{formatDateAtTime(c[col.key])}}</ng-container>\n <ng-container *ngSwitchDefault>{{c[col.key] | rpxTranslate}}</ng-container>\n </td>\n </ng-container>\n </tr>\n </ng-container>\n </tbody>\n</table>\n<ccd-pagination *ngIf=\"totalResultsCount > pageSize\"\n (pageChange)=\"goToPage($event)\"\n></ccd-pagination>\n" }]
39078
+ args: [{ selector: 'ccd-case-list', standalone: false, template: "<table class=\"{{'govuk-table ' + classes}}\">\n <caption class=\"govuk-table__caption\">{{caption | rpxTranslate}}</caption>\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header\" *ngIf=\"selectionEnabled\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" id=\"select-all\" name=\"select-all\" type=\"checkbox\" (change)=\"selectAll()\"\n [checked]=\"allOnPageSelected()\" [disabled]=\"!canAnyBeShared()\" />\n <!-- This label element is used to hide the standard checkbox with a govuk-styled one -->\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"select-all\" [attr.aria-labelledby]=\"'select-all'\">\n </label>\n </div>\n </td>\n <th class=\"govuk-table__header\" scope=\"col\" *ngFor=\"let h of tableConfig.columnConfigs\">{{h.header | rpxTranslate}}</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <ng-container *ngFor=\"let c of cases | paginate: { itemsPerPage: pageSize, currentPage: currentPageNo, totalItems: totalResultsCount }; index as i\">\n <tr data-selector=\"table-row\" class=\"govuk-table__row\">\n <td data-selector=\"table-header\" class=\"govuk-table__header\" scope=\"row\" *ngIf=\"selectionEnabled\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" id=\"select-{{ c[tableConfig.idField] || i }}\" name=\"select-{{ c[tableConfig.idField] || i }}\"\n type=\"checkbox\" (change)=\"changeSelection(c)\" [checked]=\"isSelected(c)\" [disabled]=\"!canBeShared(c)\" (keyup)=\"onKeyUp($event, c)\" />\n <!-- This label element is used to hide the standard checkbox with a govuk-styled one -->\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"select-{{ c[tableConfig.idField] || i }}\" [attr.aria-labelledby]=\"'select-' + (c[tableConfig.idField] || i)\">\n </label>\n </div>\n </td>\n <ng-container *ngFor=\"let col of tableConfig.columnConfigs; first as isFirst\">\n <th data-selector=\"table-header\" class=\"govuk-table__header\" scope=\"row\" *ngIf=\"isFirst && firstCellIsHeader\">\n <ng-container *ngIf=\"!col.type || col.type === 'text'\">{{c[col.key] | rpxTranslate}}</ng-container>\n <ng-container *ngIf=\"col.type === 'link' && c.routerLink\">\n <a class=\"govuk-link\" [routerLink]=\"c.routerLink\">{{c[col.key] | rpxTranslate}}</a>\n </ng-container>\n </th>\n <td data-selector=\"table-cell\" class=\"govuk-table__cell\" *ngIf=\"!(isFirst && firstCellIsHeader)\" [ngSwitch]=\"col?.type\">\n <ng-container *ngIf=\"col.type === 'link' && c.routerLink\">\n <a class=\"govuk-link\" [routerLink]=\"c.routerLink\">{{c[col.key] | rpxTranslate}}</a>\n </ng-container>\n <ng-container *ngSwitchCase=\"'money'\">-{{ c[col.key] | currency:'GBP' }}</ng-container>\n <ng-container *ngSwitchCase=\"'date'\">{{formatDate(c[col.key])}}</ng-container>\n <ng-container *ngSwitchCase=\"'dateAtTime'\">{{formatDateAtTime(c[col.key])}}</ng-container>\n <ng-container *ngSwitchDefault>{{c[col.key] | rpxTranslate}}</ng-container>\n </td>\n </ng-container>\n </tr>\n </ng-container>\n </tbody>\n</table>\n<ccd-pagination *ngIf=\"totalResultsCount > pageSize\"\n (pageChange)=\"goToPage($event)\"\n></ccd-pagination>\n" }]
39039
39079
  }], () => [{ type: BrowserService }], { classes: [{
39040
39080
  type: Input
39041
39081
  }], caption: [{
@@ -40389,20 +40429,22 @@ class CaseResolver {
40389
40429
  }
40390
40430
  isTabViewRoute(route) {
40391
40431
  // is route case/:jid/:ctid/:cid#fragment
40392
- return route.firstChild?.fragment;
40432
+ return route.firstChild && route.firstChild.fragment;
40393
40433
  }
40394
40434
  getAndCacheCaseView(cid) {
40395
40435
  if (this.caseNotifier.cachedCaseView && this.caseNotifier.cachedCaseView.case_id && this.caseNotifier.cachedCaseView.case_id === cid) {
40396
40436
  this.caseNotifier.announceCase(this.caseNotifier.cachedCaseView);
40397
40437
  return of(this.caseNotifier.cachedCaseView).toPromise();
40398
40438
  }
40399
- else if (Draft.isDraft(cid)) {
40400
- return this.getAndCacheDraft(cid);
40401
- }
40402
40439
  else {
40403
- return this.caseNotifier.fetchAndRefresh(cid)
40404
- .pipe(catchError(error => this.processErrorInCaseFetch(error, cid)))
40405
- .toPromise();
40440
+ if (Draft.isDraft(cid)) {
40441
+ return this.getAndCacheDraft(cid);
40442
+ }
40443
+ else {
40444
+ return this.caseNotifier.fetchAndRefresh(cid)
40445
+ .pipe(catchError(error => this.processErrorInCaseFetch(error, cid)))
40446
+ .toPromise();
40447
+ }
40406
40448
  }
40407
40449
  }
40408
40450
  getAndCacheDraft(cid) {
@@ -40540,7 +40582,7 @@ class EventTriggerResolver {
40540
40582
  const caseType = route.parent.paramMap.get('caseType');
40541
40583
  const eventTriggerId = route.paramMap.get(EventTriggerResolver.PARAM_EVENT_ID);
40542
40584
  let ignoreWarning = route.queryParamMap.get(EventTriggerResolver.IGNORE_WARNING);
40543
- if (!EventTriggerResolver.IGNORE_WARNING_VALUES.includes(ignoreWarning)) {
40585
+ if (-1 === EventTriggerResolver.IGNORE_WARNING_VALUES.indexOf(ignoreWarning)) {
40544
40586
  ignoreWarning = 'false';
40545
40587
  }
40546
40588
  const profile$ = this.profileService.get().pipe(tap(profile => this.profileNotifier.announceProfile(profile)));
@@ -40708,7 +40750,7 @@ class CaseEventTriggerComponent {
40708
40750
  let previousUrl = this.routerCurrentNavigation?.previousNavigation?.finalUrl?.toString();
40709
40751
  if (previousUrl) {
40710
40752
  previousUrl = this.getNavigationUrl(previousUrl);
40711
- if (previousUrl.includes('#')) {
40753
+ if (previousUrl.indexOf('#') > -1) {
40712
40754
  const url = previousUrl.split('#')[0];
40713
40755
  const fragment = previousUrl.split('#')[1].replace(/%20/g, ' ');
40714
40756
  return this.router.navigate([url], { fragment: fragment });
@@ -41164,15 +41206,15 @@ class DialogsModule {
41164
41206
  const _c0$c = ["tabGroup"];
41165
41207
  const _c1$3 = (a0, a1) => [a0, false, undefined, true, a1];
41166
41208
  function CaseFullAccessViewComponent_div_0_Template(rf, ctx) { if (rf & 1) {
41167
- i0.ɵɵelementStart(0, "div", 13)(1, "h1", 14);
41209
+ i0.ɵɵelementStart(0, "div", 12)(1, "h1", 13);
41168
41210
  i0.ɵɵtext(2);
41169
41211
  i0.ɵɵpipe(3, "rpxTranslate");
41170
41212
  i0.ɵɵelementEnd();
41171
- i0.ɵɵelementStart(4, "div", 15)(5, "p");
41213
+ i0.ɵɵelementStart(4, "div", 14)(5, "p");
41172
41214
  i0.ɵɵtext(6);
41173
41215
  i0.ɵɵpipe(7, "rpxTranslate");
41174
41216
  i0.ɵɵelementEnd();
41175
- i0.ɵɵelementStart(8, "p")(9, "a", 16);
41217
+ i0.ɵɵelementStart(8, "p")(9, "a", 15);
41176
41218
  i0.ɵɵtext(10);
41177
41219
  i0.ɵɵpipe(11, "rpxTranslate");
41178
41220
  i0.ɵɵelementEnd();
@@ -41200,8 +41242,8 @@ function CaseFullAccessViewComponent_div_1_ul_7_li_1_Template(rf, ctx) { if (rf
41200
41242
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, fieldError_r1.message), " ");
41201
41243
  } }
41202
41244
  function CaseFullAccessViewComponent_div_1_ul_7_Template(rf, ctx) { if (rf & 1) {
41203
- i0.ɵɵelementStart(0, "ul", 20);
41204
- i0.ɵɵtemplate(1, CaseFullAccessViewComponent_div_1_ul_7_li_1_Template, 3, 3, "li", 21);
41245
+ i0.ɵɵelementStart(0, "ul", 18);
41246
+ i0.ɵɵtemplate(1, CaseFullAccessViewComponent_div_1_ul_7_li_1_Template, 3, 3, "li", 19);
41205
41247
  i0.ɵɵelementEnd();
41206
41248
  } if (rf & 2) {
41207
41249
  const ctx_r1 = i0.ɵɵnextContext(2);
@@ -41209,7 +41251,7 @@ function CaseFullAccessViewComponent_div_1_ul_7_Template(rf, ctx) { if (rf & 1)
41209
41251
  i0.ɵɵproperty("ngForOf", ctx_r1.error.details.field_errors);
41210
41252
  } }
41211
41253
  function CaseFullAccessViewComponent_div_1_Template(rf, ctx) { if (rf & 1) {
41212
- i0.ɵɵelementStart(0, "div", 17)(1, "h2", 18);
41254
+ i0.ɵɵelementStart(0, "div", 12)(1, "h2", 16);
41213
41255
  i0.ɵɵtext(2);
41214
41256
  i0.ɵɵpipe(3, "rpxTranslate");
41215
41257
  i0.ɵɵelementEnd();
@@ -41217,7 +41259,7 @@ function CaseFullAccessViewComponent_div_1_Template(rf, ctx) { if (rf & 1) {
41217
41259
  i0.ɵɵtext(5);
41218
41260
  i0.ɵɵpipe(6, "rpxTranslate");
41219
41261
  i0.ɵɵelementEnd();
41220
- i0.ɵɵtemplate(7, CaseFullAccessViewComponent_div_1_ul_7_Template, 2, 1, "ul", 19);
41262
+ i0.ɵɵtemplate(7, CaseFullAccessViewComponent_div_1_ul_7_Template, 2, 1, "ul", 17);
41221
41263
  i0.ɵɵelementEnd();
41222
41264
  } if (rf & 2) {
41223
41265
  const ctx_r1 = i0.ɵɵnextContext();
@@ -41229,7 +41271,7 @@ function CaseFullAccessViewComponent_div_1_Template(rf, ctx) { if (rf & 1) {
41229
41271
  i0.ɵɵproperty("ngIf", ctx_r1.error.details == null ? null : ctx_r1.error.details.field_errors);
41230
41272
  } }
41231
41273
  function CaseFullAccessViewComponent_div_7_Template(rf, ctx) { if (rf & 1) {
41232
- i0.ɵɵelementStart(0, "div", 22)(1, "a", 23);
41274
+ i0.ɵɵelementStart(0, "div", 20)(1, "a", 21);
41233
41275
  i0.ɵɵtext(2);
41234
41276
  i0.ɵɵpipe(3, "rpxTranslate");
41235
41277
  i0.ɵɵelementEnd()();
@@ -41239,7 +41281,7 @@ function CaseFullAccessViewComponent_div_7_Template(rf, ctx) { if (rf & 1) {
41239
41281
  } }
41240
41282
  function CaseFullAccessViewComponent_div_8_Template(rf, ctx) { if (rf & 1) {
41241
41283
  const _r3 = i0.ɵɵgetCurrentView();
41242
- i0.ɵɵelementStart(0, "div", 6)(1, "ccd-event-trigger", 24);
41284
+ i0.ɵɵelementStart(0, "div", 5)(1, "ccd-event-trigger", 22);
41243
41285
  i0.ɵɵlistener("onTriggerChange", function CaseFullAccessViewComponent_div_8_Template_ccd_event_trigger_onTriggerChange_1_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.clearErrorsAndWarnings()); })("onTriggerSubmit", function CaseFullAccessViewComponent_div_8_Template_ccd_event_trigger_onTriggerSubmit_1_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.applyTrigger($event)); });
41244
41286
  i0.ɵɵelementEnd()();
41245
41287
  } if (rf & 2) {
@@ -41249,7 +41291,7 @@ function CaseFullAccessViewComponent_div_8_Template(rf, ctx) { if (rf & 1) {
41249
41291
  } }
41250
41292
  function CaseFullAccessViewComponent_div_9_Template(rf, ctx) { if (rf & 1) {
41251
41293
  const _r4 = i0.ɵɵgetCurrentView();
41252
- i0.ɵɵelementStart(0, "div", 5)(1, "div", 11)(2, "ccd-notification-banner", 25);
41294
+ i0.ɵɵelementStart(0, "div", 4)(1, "div", 10)(2, "ccd-notification-banner", 23);
41253
41295
  i0.ɵɵlistener("linkClicked", function CaseFullAccessViewComponent_div_9_Template_ccd_notification_banner_linkClicked_2_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onLinkClicked($event)); });
41254
41296
  i0.ɵɵelementEnd()()();
41255
41297
  } if (rf & 2) {
@@ -41268,7 +41310,7 @@ function CaseFullAccessViewComponent_ng_container_12_mat_tab_3_ng_template_2_ng_
41268
41310
  i0.ɵɵelementContainerEnd();
41269
41311
  } }
41270
41312
  function CaseFullAccessViewComponent_ng_container_12_mat_tab_3_ng_template_2_Template(rf, ctx) { if (rf & 1) {
41271
- i0.ɵɵtemplate(0, CaseFullAccessViewComponent_ng_container_12_mat_tab_3_ng_template_2_ng_container_0_Template, 2, 0, "ng-container", 12)(1, CaseFullAccessViewComponent_ng_container_12_mat_tab_3_ng_template_2_ng_container_1_Template, 2, 0, "ng-container", 12);
41313
+ i0.ɵɵtemplate(0, CaseFullAccessViewComponent_ng_container_12_mat_tab_3_ng_template_2_ng_container_0_Template, 2, 0, "ng-container", 11)(1, CaseFullAccessViewComponent_ng_container_12_mat_tab_3_ng_template_2_ng_container_1_Template, 2, 0, "ng-container", 11);
41272
41314
  } if (rf & 2) {
41273
41315
  const tab_r6 = i0.ɵɵnextContext().$implicit;
41274
41316
  i0.ɵɵproperty("ngIf", tab_r6.id === "tasks");
@@ -41276,9 +41318,9 @@ function CaseFullAccessViewComponent_ng_container_12_mat_tab_3_ng_template_2_Tem
41276
41318
  i0.ɵɵproperty("ngIf", tab_r6.id === "roles-and-access");
41277
41319
  } }
41278
41320
  function CaseFullAccessViewComponent_ng_container_12_mat_tab_3_Template(rf, ctx) { if (rf & 1) {
41279
- i0.ɵɵelementStart(0, "mat-tab", 29);
41321
+ i0.ɵɵelementStart(0, "mat-tab", 27);
41280
41322
  i0.ɵɵpipe(1, "rpxTranslate");
41281
- i0.ɵɵtemplate(2, CaseFullAccessViewComponent_ng_container_12_mat_tab_3_ng_template_2_Template, 2, 2, "ng-template", 30);
41323
+ i0.ɵɵtemplate(2, CaseFullAccessViewComponent_ng_container_12_mat_tab_3_ng_template_2_Template, 2, 2, "ng-template", 28);
41282
41324
  i0.ɵɵelementEnd();
41283
41325
  } if (rf & 2) {
41284
41326
  const tab_r6 = ctx.$implicit;
@@ -41286,7 +41328,7 @@ function CaseFullAccessViewComponent_ng_container_12_mat_tab_3_Template(rf, ctx)
41286
41328
  i0.ɵɵattribute("data-case-tab-id", tab_r6.id);
41287
41329
  } }
41288
41330
  function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_ng_container_3_tr_4_th_1_Template(rf, ctx) { if (rf & 1) {
41289
- i0.ɵɵelementStart(0, "th", 40)(1, "div", 41);
41331
+ i0.ɵɵelementStart(0, "th", 38)(1, "div", 39);
41290
41332
  i0.ɵɵtext(2);
41291
41333
  i0.ɵɵpipe(3, "rpxTranslate");
41292
41334
  i0.ɵɵelementEnd()();
@@ -41298,9 +41340,9 @@ function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_ng_
41298
41340
  } }
41299
41341
  function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_ng_container_3_tr_4_Template(rf, ctx) { if (rf & 1) {
41300
41342
  i0.ɵɵelementStart(0, "tr");
41301
- i0.ɵɵtemplate(1, CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_ng_container_3_tr_4_th_1_Template, 4, 4, "th", 36);
41302
- i0.ɵɵelementStart(2, "td", 37)(3, "span", 38);
41303
- i0.ɵɵelement(4, "ccd-field-read", 39);
41343
+ i0.ɵɵtemplate(1, CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_ng_container_3_tr_4_th_1_Template, 4, 4, "th", 34);
41344
+ i0.ɵɵelementStart(2, "td", 35)(3, "span", 36);
41345
+ i0.ɵɵelement(4, "ccd-field-read", 37);
41304
41346
  i0.ɵɵelementEnd()()();
41305
41347
  } if (rf & 2) {
41306
41348
  const field_r7 = i0.ɵɵnextContext().$implicit;
@@ -41313,10 +41355,10 @@ function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_ng_
41313
41355
  i0.ɵɵproperty("topLevelFormGroup", ctx_r1.formGroup == null ? null : ctx_r1.formGroup.controls["data"])("caseFields", ctx_r1.caseFields)("caseField", field_r7)("caseReference", ctx_r1.caseDetails.case_id);
41314
41356
  } }
41315
41357
  function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_ng_container_3_tr_5_Template(rf, ctx) { if (rf & 1) {
41316
- i0.ɵɵelementStart(0, "tr", 42)(1, "td", 43);
41358
+ i0.ɵɵelementStart(0, "tr", 40)(1, "td", 41);
41317
41359
  i0.ɵɵpipe(2, "rpxTranslate");
41318
- i0.ɵɵelementStart(3, "span", 38);
41319
- i0.ɵɵelement(4, "ccd-field-read", 39);
41360
+ i0.ɵɵelementStart(3, "span", 36);
41361
+ i0.ɵɵelement(4, "ccd-field-read", 37);
41320
41362
  i0.ɵɵelementEnd()()();
41321
41363
  } if (rf & 2) {
41322
41364
  const field_r7 = i0.ɵɵnextContext().$implicit;
@@ -41329,10 +41371,10 @@ function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_ng_
41329
41371
  } }
41330
41372
  function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_ng_container_3_Template(rf, ctx) { if (rf & 1) {
41331
41373
  i0.ɵɵelementContainerStart(0);
41332
- i0.ɵɵelementStart(1, "div", 32);
41333
- i0.ɵɵelementContainerStart(2, 33);
41374
+ i0.ɵɵelementStart(1, "div", 30);
41375
+ i0.ɵɵelementContainerStart(2, 31);
41334
41376
  i0.ɵɵpipe(3, "ccdIsCompound");
41335
- i0.ɵɵtemplate(4, CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_ng_container_3_tr_4_Template, 5, 6, "tr", 34)(5, CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_ng_container_3_tr_5_Template, 5, 8, "tr", 35);
41377
+ i0.ɵɵtemplate(4, CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_ng_container_3_tr_4_Template, 5, 6, "tr", 32)(5, CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_ng_container_3_tr_5_Template, 5, 8, "tr", 33);
41336
41378
  i0.ɵɵelementContainerEnd();
41337
41379
  i0.ɵɵelementEnd();
41338
41380
  i0.ɵɵelementContainerEnd();
@@ -41352,7 +41394,7 @@ function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_Tem
41352
41394
  i0.ɵɵelementStart(0, "table");
41353
41395
  i0.ɵɵpipe(1, "rpxTranslate");
41354
41396
  i0.ɵɵelementStart(2, "tbody");
41355
- i0.ɵɵtemplate(3, CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_ng_container_3_Template, 6, 8, "ng-container", 21);
41397
+ i0.ɵɵtemplate(3, CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_ng_container_3_Template, 6, 8, "ng-container", 19);
41356
41398
  i0.ɵɵpipe(4, "ccdTabFields");
41357
41399
  i0.ɵɵpipe(5, "ccdReadFieldsFilter");
41358
41400
  i0.ɵɵelementEnd()();
@@ -41365,10 +41407,10 @@ function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_Tem
41365
41407
  i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBindV(5, 8, i0.ɵɵpureFunction2(14, _c1$3, i0.ɵɵpipeBind1(4, 6, tab_r8), ctx_r1.formGroup == null ? null : ctx_r1.formGroup.controls["data"])));
41366
41408
  } }
41367
41409
  function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_Template(rf, ctx) { if (rf & 1) {
41368
- i0.ɵɵelementStart(0, "mat-tab", 31);
41410
+ i0.ɵɵelementStart(0, "mat-tab", 29);
41369
41411
  i0.ɵɵpipe(1, "rpxTranslate");
41370
41412
  i0.ɵɵpipe(2, "rpxTranslate");
41371
- i0.ɵɵtemplate(3, CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_Template, 6, 17, "ng-template", 30);
41413
+ i0.ɵɵtemplate(3, CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_Template, 6, 17, "ng-template", 28);
41372
41414
  i0.ɵɵelementEnd();
41373
41415
  } if (rf & 2) {
41374
41416
  const tab_r8 = ctx.$implicit;
@@ -41383,15 +41425,15 @@ function CaseFullAccessViewComponent_ng_container_12_mat_tab_5_ng_template_2_ng_
41383
41425
  i0.ɵɵelementContainerEnd();
41384
41426
  } }
41385
41427
  function CaseFullAccessViewComponent_ng_container_12_mat_tab_5_ng_template_2_Template(rf, ctx) { if (rf & 1) {
41386
- i0.ɵɵtemplate(0, CaseFullAccessViewComponent_ng_container_12_mat_tab_5_ng_template_2_ng_container_0_Template, 2, 0, "ng-container", 12);
41428
+ i0.ɵɵtemplate(0, CaseFullAccessViewComponent_ng_container_12_mat_tab_5_ng_template_2_ng_container_0_Template, 2, 0, "ng-container", 11);
41387
41429
  } if (rf & 2) {
41388
41430
  const tab_r10 = i0.ɵɵnextContext().$implicit;
41389
41431
  i0.ɵɵproperty("ngIf", tab_r10.id === "hearings");
41390
41432
  } }
41391
41433
  function CaseFullAccessViewComponent_ng_container_12_mat_tab_5_Template(rf, ctx) { if (rf & 1) {
41392
- i0.ɵɵelementStart(0, "mat-tab", 29);
41434
+ i0.ɵɵelementStart(0, "mat-tab", 27);
41393
41435
  i0.ɵɵpipe(1, "rpxTranslate");
41394
- i0.ɵɵtemplate(2, CaseFullAccessViewComponent_ng_container_12_mat_tab_5_ng_template_2_Template, 1, 1, "ng-template", 30);
41436
+ i0.ɵɵtemplate(2, CaseFullAccessViewComponent_ng_container_12_mat_tab_5_ng_template_2_Template, 1, 1, "ng-template", 28);
41395
41437
  i0.ɵɵelementEnd();
41396
41438
  } if (rf & 2) {
41397
41439
  const tab_r10 = ctx.$implicit;
@@ -41401,10 +41443,10 @@ function CaseFullAccessViewComponent_ng_container_12_mat_tab_5_Template(rf, ctx)
41401
41443
  function CaseFullAccessViewComponent_ng_container_12_Template(rf, ctx) { if (rf & 1) {
41402
41444
  const _r5 = i0.ɵɵgetCurrentView();
41403
41445
  i0.ɵɵelementContainerStart(0);
41404
- i0.ɵɵelementStart(1, "mat-tab-group", 26, 0);
41446
+ i0.ɵɵelementStart(1, "mat-tab-group", 24, 0);
41405
41447
  i0.ɵɵlistener("selectedIndexChange", function CaseFullAccessViewComponent_ng_container_12_Template_mat_tab_group_selectedIndexChange_1_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.tabChanged($event)); });
41406
41448
  i0.ɵɵtwoWayListener("selectedIndexChange", function CaseFullAccessViewComponent_ng_container_12_Template_mat_tab_group_selectedIndexChange_1_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.selectedTabIndex, $event) || (ctx_r1.selectedTabIndex = $event); return i0.ɵɵresetView($event); });
41407
- i0.ɵɵtemplate(3, CaseFullAccessViewComponent_ng_container_12_mat_tab_3_Template, 3, 4, "mat-tab", 27)(4, CaseFullAccessViewComponent_ng_container_12_mat_tab_4_Template, 4, 7, "mat-tab", 28)(5, CaseFullAccessViewComponent_ng_container_12_mat_tab_5_Template, 3, 4, "mat-tab", 27);
41449
+ i0.ɵɵtemplate(3, CaseFullAccessViewComponent_ng_container_12_mat_tab_3_Template, 3, 4, "mat-tab", 25)(4, CaseFullAccessViewComponent_ng_container_12_mat_tab_4_Template, 4, 7, "mat-tab", 26)(5, CaseFullAccessViewComponent_ng_container_12_mat_tab_5_Template, 3, 4, "mat-tab", 25);
41408
41450
  i0.ɵɵelementEnd();
41409
41451
  i0.ɵɵelementContainerEnd();
41410
41452
  } if (rf & 2) {
@@ -41877,21 +41919,21 @@ class CaseFullAccessViewComponent {
41877
41919
  } if (rf & 2) {
41878
41920
  let _t;
41879
41921
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.tabGroup = _t.first);
41880
- } }, inputs: { hasPrint: "hasPrint", hasEventSelector: "hasEventSelector", caseDetails: "caseDetails", prependedTabs: "prependedTabs", appendedTabs: "appendedTabs" }, standalone: false, features: [i0.ɵɵNgOnChangesFeature], decls: 13, vars: 12, consts: [["tabGroup", ""], ["class", "error-summary", "role", "group", "aria-labelledby", "edit-case-event_error_generic-summary-heading", "tabindex", "-1", 4, "ngIf"], ["class", "error-summary", "role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 4, "ngIf"], [3, "callbackErrorsContext", "triggerTextContinue", "triggerTextIgnore", "callbackErrorsSubject"], [3, "caseId", "displayMode"], [1, "grid-row"], [1, "column-one-half"], [3, "caseDetails"], ["class", "case-viewer-controls", 4, "ngIf"], ["class", "column-one-half", 4, "ngIf"], ["class", "grid-row", 4, "ngIf"], [1, "column-full"], [4, "ngIf"], ["role", "group", "aria-labelledby", "edit-case-event_error_generic-summary-heading", "tabindex", "-1", 1, "error-summary"], ["id", "edit-case-event_error_generic-summary-heading", 1, "heading-h1", "error-summary-heading"], ["id", "edit-case-event_error-summary-body", 1, "govuk-error-summary__body"], ["href", "get-help", "target", "_blank"], ["role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 1, "error-summary"], ["id", "edit-case-event_error-summary-heading", 1, "heading-h2", "error-summary-heading"], ["class", "error-summary-list", 4, "ngIf"], [1, "error-summary-list"], [4, "ngFor", "ngForOf"], [1, "case-viewer-controls"], ["id", "case-viewer-control-print", "routerLink", "print", 1, "button", "button-secondary"], [3, "onTriggerChange", "onTriggerSubmit", "isDisabled", "triggers", "triggerText", "eventId"], [3, "linkClicked", "notificationBannerConfig"], ["animationDuration", "0ms", 3, "selectedIndexChange", "disableRipple", "selectedIndex", "selectedIndex"], [3, "label", 4, "ngFor", "ngForOf"], [3, "label", "aria-label", 4, "ngFor", "ngForOf"], [3, "label"], ["matTabContent", ""], [3, "label", "aria-label"], ["ccdLabelSubstitutor", "", 3, "caseField", "contextFields", "hidden"], [3, "ngSwitch"], [4, "ngSwitchCase"], ["class", "compound-field", 4, "ngSwitchCase"], ["scope", "row", 3, "id", 4, "ngIf"], ["scope", "col", 3, "id"], [1, "text-16"], [3, "topLevelFormGroup", "caseFields", "caseField", "caseReference"], ["scope", "row", 3, "id"], [1, "case-viewer-label", "text-16"], [1, "compound-field"], ["role", "rowheader", 3, "id"]], template: function CaseFullAccessViewComponent_Template(rf, ctx) { if (rf & 1) {
41881
- i0.ɵɵtemplate(0, CaseFullAccessViewComponent_div_0_Template, 14, 12, "div", 1)(1, CaseFullAccessViewComponent_div_1_Template, 8, 7, "div", 2);
41882
- i0.ɵɵelementStart(2, "ccd-callback-errors", 3);
41922
+ } }, inputs: { hasPrint: "hasPrint", hasEventSelector: "hasEventSelector", caseDetails: "caseDetails", prependedTabs: "prependedTabs", appendedTabs: "appendedTabs" }, standalone: false, features: [i0.ɵɵNgOnChangesFeature], decls: 13, vars: 12, consts: [["tabGroup", ""], ["class", "error-summary", "role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 4, "ngIf"], [3, "callbackErrorsContext", "triggerTextContinue", "triggerTextIgnore", "callbackErrorsSubject"], [3, "caseId", "displayMode"], [1, "grid-row"], [1, "column-one-half"], [3, "caseDetails"], ["class", "case-viewer-controls", 4, "ngIf"], ["class", "column-one-half", 4, "ngIf"], ["class", "grid-row", 4, "ngIf"], [1, "column-full"], [4, "ngIf"], ["role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 1, "error-summary"], ["id", "edit-case-event_error-summary-heading", 1, "heading-h1", "error-summary-heading"], ["id", "edit-case-event_error-summary-body", 1, "govuk-error-summary__body"], ["href", "get-help", "target", "_blank"], ["id", "edit-case-event_error-summary-heading", 1, "heading-h2", "error-summary-heading"], ["class", "error-summary-list", 4, "ngIf"], [1, "error-summary-list"], [4, "ngFor", "ngForOf"], [1, "case-viewer-controls"], ["id", "case-viewer-control-print", "routerLink", "print", 1, "button", "button-secondary"], [3, "onTriggerChange", "onTriggerSubmit", "isDisabled", "triggers", "triggerText", "eventId"], [3, "linkClicked", "notificationBannerConfig"], ["animationDuration", "0ms", 3, "selectedIndexChange", "disableRipple", "selectedIndex", "selectedIndex"], [3, "label", 4, "ngFor", "ngForOf"], [3, "label", "aria-label", 4, "ngFor", "ngForOf"], [3, "label"], ["matTabContent", ""], [3, "label", "aria-label"], ["ccdLabelSubstitutor", "", 3, "caseField", "contextFields", "hidden"], [3, "ngSwitch"], [4, "ngSwitchCase"], ["class", "compound-field", 4, "ngSwitchCase"], ["scope", "row", 3, "id", 4, "ngIf"], ["scope", "col", 3, "id"], [1, "text-16"], [3, "topLevelFormGroup", "caseFields", "caseField", "caseReference"], ["scope", "row", 3, "id"], [1, "case-viewer-label", "text-16"], [1, "compound-field"], ["role", "rowheader", 3, "id"]], template: function CaseFullAccessViewComponent_Template(rf, ctx) { if (rf & 1) {
41923
+ i0.ɵɵtemplate(0, CaseFullAccessViewComponent_div_0_Template, 14, 12, "div", 1)(1, CaseFullAccessViewComponent_div_1_Template, 8, 7, "div", 1);
41924
+ i0.ɵɵelementStart(2, "ccd-callback-errors", 2);
41883
41925
  i0.ɵɵlistener("callbackErrorsContext", function CaseFullAccessViewComponent_Template_ccd_callback_errors_callbackErrorsContext_2_listener($event) { return ctx.callbackErrorsNotify($event); });
41884
41926
  i0.ɵɵelementEnd();
41885
- i0.ɵɵelement(3, "ccd-activity", 4);
41886
- i0.ɵɵelementStart(4, "div", 5)(5, "div", 6);
41887
- i0.ɵɵelement(6, "ccd-case-header", 7);
41888
- i0.ɵɵtemplate(7, CaseFullAccessViewComponent_div_7_Template, 4, 3, "div", 8);
41927
+ i0.ɵɵelement(3, "ccd-activity", 3);
41928
+ i0.ɵɵelementStart(4, "div", 4)(5, "div", 5);
41929
+ i0.ɵɵelement(6, "ccd-case-header", 6);
41930
+ i0.ɵɵtemplate(7, CaseFullAccessViewComponent_div_7_Template, 4, 3, "div", 7);
41889
41931
  i0.ɵɵelementEnd();
41890
- i0.ɵɵtemplate(8, CaseFullAccessViewComponent_div_8_Template, 2, 4, "div", 9);
41932
+ i0.ɵɵtemplate(8, CaseFullAccessViewComponent_div_8_Template, 2, 4, "div", 8);
41891
41933
  i0.ɵɵelementEnd();
41892
- i0.ɵɵtemplate(9, CaseFullAccessViewComponent_div_9_Template, 3, 1, "div", 10);
41893
- i0.ɵɵelementStart(10, "div", 5)(11, "div", 11);
41894
- i0.ɵɵtemplate(12, CaseFullAccessViewComponent_ng_container_12_Template, 6, 6, "ng-container", 12);
41934
+ i0.ɵɵtemplate(9, CaseFullAccessViewComponent_div_9_Template, 3, 1, "div", 9);
41935
+ i0.ɵɵelementStart(10, "div", 4)(11, "div", 10);
41936
+ i0.ɵɵtemplate(12, CaseFullAccessViewComponent_ng_container_12_Template, 6, 6, "ng-container", 11);
41895
41937
  i0.ɵɵelementEnd()();
41896
41938
  } if (rf & 2) {
41897
41939
  i0.ɵɵproperty("ngIf", ctx.error && !(ctx.error.callbackErrors || ctx.error.callbackWarnings || ctx.error.details));
@@ -41915,7 +41957,7 @@ class CaseFullAccessViewComponent {
41915
41957
  }
41916
41958
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFullAccessViewComponent, [{
41917
41959
  type: Component,
41918
- args: [{ selector: 'ccd-case-full-access-view', standalone: false, template: "<!-- Generic error heading and error message to be displayed only if there are no specific callback errors or warnings, or no error details -->\n<div *ngIf=\"error && !(error.callbackErrors || error.callbackWarnings || error.details)\" class=\"error-summary\"\n role=\"group\" aria-labelledby=\"edit-case-event_error_generic-summary-heading\" tabindex=\"-1\">\n <h1 class=\"heading-h1 error-summary-heading\" id=\"edit-case-event_error_generic-summary-heading\">\n {{'Something went wrong' | rpxTranslate}}\n </h1>\n <div class=\"govuk-error-summary__body\" id=\"edit-case-event_error-summary-body\">\n <p>{{\"We're working to fix the problem. Try again shortly.\" | rpxTranslate}}</p>\n <p>\n <a href=\"get-help\" target=\"_blank\">\n {{\"Contact us\" | rpxTranslate}}</a> {{\"if you're still having problems.\" | rpxTranslate}}\n </p>\n </div>\n</div>\n<!-- Callback error heading and error message to be displayed if there are specific error details -->\n<div *ngIf=\"error && error.details\" class=\"error-summary\" role=\"group\"\n aria-labelledby=\"edit-case-event_error-summary-heading\" tabindex=\"-1\">\n <h2 class=\"heading-h2 error-summary-heading\" id=\"edit-case-event_error-summary-heading\">\n {{'The callback data failed validation' | rpxTranslate}}\n </h2>\n <p>{{error.message | rpxTranslate}}</p>\n <ul *ngIf=\"error.details?.field_errors\" class=\"error-summary-list\">\n <li *ngFor=\"let fieldError of error.details.field_errors\">\n {{fieldError.message | rpxTranslate}}\n </li>\n </ul>\n</div>\n<ccd-callback-errors\n [triggerTextContinue]=\"triggerTextStart\"\n [triggerTextIgnore]=\"triggerTextIgnoreWarnings\"\n [callbackErrorsSubject]=\"callbackErrorsSubject\"\n (callbackErrorsContext)=\"callbackErrorsNotify($event)\">\n</ccd-callback-errors>\n<ccd-activity [caseId]=\"caseDetails.case_id\" [displayMode]=\"BANNER\"></ccd-activity>\n<div class=\"grid-row\">\n <div class=\"column-one-half\">\n <ccd-case-header [caseDetails]=\"caseDetails\"></ccd-case-header>\n <div class=\"case-viewer-controls\" *ngIf=\"hasPrint && !isDraft() && isPrintEnabled()\">\n <a id=\"case-viewer-control-print\" routerLink=\"print\" class=\"button button-secondary\">{{'Print' | rpxTranslate}}</a>\n </div>\n </div>\n <div *ngIf=\"hasEventSelector\" class=\"column-one-half\">\n <ccd-event-trigger [isDisabled]=\"isTriggerButtonDisabled()\" [triggers]=\"caseDetails.triggers\"\n [triggerText]=\"triggerText\"\n [eventId]=\"eventId\"\n (onTriggerChange)=\"clearErrorsAndWarnings()\"\n (onTriggerSubmit)=\"applyTrigger($event)\"></ccd-event-trigger>\n </div>\n</div>\n<div class=\"grid-row\" *ngIf=\"activeCaseFlags && !caseFlagsExternalUser\">\n <div class=\"column-full\">\n <ccd-notification-banner [notificationBannerConfig]=\"notificationBannerConfig\" (linkClicked)=\"onLinkClicked($event)\">\n </ccd-notification-banner>\n </div>\n</div>\n<div class=\"grid-row\">\n <div class=\"column-full\">\n <ng-container *ngIf=\"hasTabsPresent()\">\n <!-- Let Material generate header IDs so URL tab fragments do not trigger anchor scrolling. -->\n <mat-tab-group #tabGroup animationDuration=\"0ms\" (selectedIndexChange)=\"tabChanged($event)\" [disableRipple]=\"true\" [(selectedIndex)]=\"selectedTabIndex\"\n [selectedIndex]=\"selectedTabIndex\">\n <mat-tab *ngFor=\"let tab of prependedTabs\" [attr.data-case-tab-id]=\"tab.id\" [label]=\"tab.label | rpxTranslate\">\n <ng-template matTabContent>\n <ng-container *ngIf=\"tab.id === 'tasks'\">\n <exui-tasks-ce></exui-tasks-ce>\n </ng-container>\n <ng-container *ngIf=\"tab.id === 'roles-and-access'\">\n <exui-roles-and-access-ce></exui-roles-and-access-ce>\n </ng-container>\n </ng-template>\n </mat-tab>\n <mat-tab *ngFor=\"let tab of sortedTabs; let curIdx=index\" [attr.data-case-tab-id]=\"tab.id\" [label]=\"tab.label | rpxTranslate\" [aria-label]=\"curIdx === 0 ? tab.label + ', Please use left and right arrow keys to navigate case tabs' : '' | rpxTranslate\">\n <ng-template matTabContent>\n <table [class]=\"tab.id\" [attr.aria-label]=\"'case viewer table' | rpxTranslate\">\n <tbody>\n <ng-container *ngFor=\"let field of tab | ccdTabFields | ccdReadFieldsFilter:false :undefined :true : formGroup?.controls['data']\">\n <div ccdLabelSubstitutor [caseField]=\"field\" [contextFields]=\"caseFields\" [hidden]=\"field.hidden\">\n <ng-container [ngSwitch]=\"!(field | ccdIsCompound)\">\n <tr *ngSwitchCase=\"true\">\n <th [id]=\"'case-viewer-field-label--' + field.id\" scope=\"row\" *ngIf=\"!isFieldToHaveNoLabel(field) && field.label\">\n <div class=\"case-viewer-label text-16\">\n {{field.label | rpxTranslate}}</div>\n </th>\n <td [id]=\"'case-viewer-field-read--' + field.id\" scope=\"col\">\n <span class=\"text-16\">\n <ccd-field-read [topLevelFormGroup]=\"formGroup?.controls['data']\" [caseFields]=\"caseFields\"\n [caseField]=\"field\" [caseReference]=\"caseDetails.case_id\">\n </ccd-field-read>\n </span>\n </td>\n </tr>\n <tr *ngSwitchCase=\"false\" class=\"compound-field\">\n <td role=\"rowheader\" [attr.aria-label]=\"(field.label || field.id) | rpxTranslate\" [id]=\"'case-viewer-field-read--' + field.id\">\n <span class=\"text-16\">\n <ccd-field-read [topLevelFormGroup]=\"formGroup.controls['data']\" [caseFields]=\"caseFields\"\n [caseField]=\"field\" [caseReference]=\"caseDetails.case_id\">\n </ccd-field-read>\n </span>\n </td>\n </tr>\n </ng-container>\n </div>\n </ng-container>\n </tbody>\n </table>\n </ng-template>\n </mat-tab>\n <mat-tab *ngFor=\"let tab of appendedTabs\" [attr.data-case-tab-id]=\"tab.id\" [label]=\"tab.label | rpxTranslate\">\n <ng-template matTabContent>\n <ng-container *ngIf=\"tab.id === 'hearings'\">\n <exui-case-hearings-ce></exui-case-hearings-ce>\n </ng-container>\n </ng-template>\n </mat-tab>\n </mat-tab-group>\n </ng-container>\n </div>\n</div>\n", styles: ["th,.compound-field>td{width:1%;white-space:nowrap;vertical-align:top}.compound-field th{padding:0}.compound-field>td{padding:0}.case-viewer-controls{margin-top:47px;margin-bottom:20px}ccd-case-header{float:left;margin-right:10px}ccd-event-trigger{float:right}.case-viewer-label{min-width:300px;white-space:normal}.markdown h3{margin-bottom:0}.hide-table-capion{position:absolute;visibility:hidden}\n"] }]
41960
+ args: [{ selector: 'ccd-case-full-access-view', standalone: false, template: "<!-- Generic error heading and error message to be displayed only if there are no specific callback errors or warnings, or no error details -->\n<div *ngIf=\"error && !(error.callbackErrors || error.callbackWarnings || error.details)\" class=\"error-summary\"\n role=\"group\" aria-labelledby=\"edit-case-event_error-summary-heading\" tabindex=\"-1\">\n <h1 class=\"heading-h1 error-summary-heading\" id=\"edit-case-event_error-summary-heading\">\n {{'Something went wrong' | rpxTranslate}}\n </h1>\n <div class=\"govuk-error-summary__body\" id=\"edit-case-event_error-summary-body\">\n <p>{{\"We're working to fix the problem. Try again shortly.\" | rpxTranslate}}</p>\n <p>\n <a href=\"get-help\" target=\"_blank\">\n {{\"Contact us\" | rpxTranslate}}</a> {{\"if you're still having problems.\" | rpxTranslate}}\n </p>\n </div>\n</div>\n<!-- Callback error heading and error message to be displayed if there are specific error details -->\n<div *ngIf=\"error && error.details\" class=\"error-summary\" role=\"group\"\n aria-labelledby=\"edit-case-event_error-summary-heading\" tabindex=\"-1\">\n <h2 class=\"heading-h2 error-summary-heading\" id=\"edit-case-event_error-summary-heading\">\n {{'The callback data failed validation' | rpxTranslate}}\n </h2>\n <p>{{error.message | rpxTranslate}}</p>\n <ul *ngIf=\"error.details?.field_errors\" class=\"error-summary-list\">\n <li *ngFor=\"let fieldError of error.details.field_errors\">\n {{fieldError.message | rpxTranslate}}\n </li>\n </ul>\n</div>\n<ccd-callback-errors\n [triggerTextContinue]=\"triggerTextStart\"\n [triggerTextIgnore]=\"triggerTextIgnoreWarnings\"\n [callbackErrorsSubject]=\"callbackErrorsSubject\"\n (callbackErrorsContext)=\"callbackErrorsNotify($event)\">\n</ccd-callback-errors>\n<ccd-activity [caseId]=\"caseDetails.case_id\" [displayMode]=\"BANNER\"></ccd-activity>\n<div class=\"grid-row\">\n <div class=\"column-one-half\">\n <ccd-case-header [caseDetails]=\"caseDetails\"></ccd-case-header>\n <div class=\"case-viewer-controls\" *ngIf=\"hasPrint && !isDraft() && isPrintEnabled()\">\n <a id=\"case-viewer-control-print\" routerLink=\"print\" class=\"button button-secondary\">{{'Print' | rpxTranslate}}</a>\n </div>\n </div>\n <div *ngIf=\"hasEventSelector\" class=\"column-one-half\">\n <ccd-event-trigger [isDisabled]=\"isTriggerButtonDisabled()\" [triggers]=\"caseDetails.triggers\"\n [triggerText]=\"triggerText\"\n [eventId]=\"eventId\"\n (onTriggerChange)=\"clearErrorsAndWarnings()\"\n (onTriggerSubmit)=\"applyTrigger($event)\"></ccd-event-trigger>\n </div>\n</div>\n<div class=\"grid-row\" *ngIf=\"activeCaseFlags && !caseFlagsExternalUser\">\n <div class=\"column-full\">\n <ccd-notification-banner [notificationBannerConfig]=\"notificationBannerConfig\" (linkClicked)=\"onLinkClicked($event)\">\n </ccd-notification-banner>\n </div>\n</div>\n<div class=\"grid-row\">\n <div class=\"column-full\">\n <ng-container *ngIf=\"hasTabsPresent()\">\n <!-- Let Material generate header IDs so URL tab fragments do not trigger anchor scrolling. -->\n <mat-tab-group #tabGroup animationDuration=\"0ms\" (selectedIndexChange)=\"tabChanged($event)\" [disableRipple]=\"true\" [(selectedIndex)]=\"selectedTabIndex\"\n [selectedIndex]=\"selectedTabIndex\">\n <mat-tab *ngFor=\"let tab of prependedTabs\" [attr.data-case-tab-id]=\"tab.id\" [label]=\"tab.label | rpxTranslate\">\n <ng-template matTabContent>\n <ng-container *ngIf=\"tab.id === 'tasks'\">\n <exui-tasks-ce></exui-tasks-ce>\n </ng-container>\n <ng-container *ngIf=\"tab.id === 'roles-and-access'\">\n <exui-roles-and-access-ce></exui-roles-and-access-ce>\n </ng-container>\n </ng-template>\n </mat-tab>\n <mat-tab *ngFor=\"let tab of sortedTabs; let curIdx=index\" [attr.data-case-tab-id]=\"tab.id\" [label]=\"tab.label | rpxTranslate\" [aria-label]=\"curIdx === 0 ? tab.label + ', Please use left and right arrow keys to navigate case tabs' : '' | rpxTranslate\">\n <ng-template matTabContent>\n <table [class]=\"tab.id\" [attr.aria-label]=\"'case viewer table' | rpxTranslate\">\n <tbody>\n <ng-container *ngFor=\"let field of tab | ccdTabFields | ccdReadFieldsFilter:false :undefined :true : formGroup?.controls['data']\">\n <div ccdLabelSubstitutor [caseField]=\"field\" [contextFields]=\"caseFields\" [hidden]=\"field.hidden\">\n <ng-container [ngSwitch]=\"!(field | ccdIsCompound)\">\n <tr *ngSwitchCase=\"true\">\n <th [id]=\"'case-viewer-field-label--' + field.id\" scope=\"row\" *ngIf=\"!isFieldToHaveNoLabel(field) && field.label\">\n <div class=\"case-viewer-label text-16\">\n {{field.label | rpxTranslate}}</div>\n </th>\n <td [id]=\"'case-viewer-field-read--' + field.id\" scope=\"col\">\n <span class=\"text-16\">\n <ccd-field-read [topLevelFormGroup]=\"formGroup?.controls['data']\" [caseFields]=\"caseFields\"\n [caseField]=\"field\" [caseReference]=\"caseDetails.case_id\">\n </ccd-field-read>\n </span>\n </td>\n </tr>\n <tr *ngSwitchCase=\"false\" class=\"compound-field\">\n <td role=\"rowheader\" [attr.aria-label]=\"(field.label || field.id) | rpxTranslate\" [id]=\"'case-viewer-field-read--' + field.id\">\n <span class=\"text-16\">\n <ccd-field-read [topLevelFormGroup]=\"formGroup.controls['data']\" [caseFields]=\"caseFields\"\n [caseField]=\"field\" [caseReference]=\"caseDetails.case_id\">\n </ccd-field-read>\n </span>\n </td>\n </tr>\n </ng-container>\n </div>\n </ng-container>\n </tbody>\n </table>\n </ng-template>\n </mat-tab>\n <mat-tab *ngFor=\"let tab of appendedTabs\" [attr.data-case-tab-id]=\"tab.id\" [label]=\"tab.label | rpxTranslate\">\n <ng-template matTabContent>\n <ng-container *ngIf=\"tab.id === 'hearings'\">\n <exui-case-hearings-ce></exui-case-hearings-ce>\n </ng-container>\n </ng-template>\n </mat-tab>\n </mat-tab-group>\n </ng-container>\n </div>\n</div>\n", styles: ["th,.compound-field>td{width:1%;white-space:nowrap;vertical-align:top}.compound-field th{padding:0}.compound-field>td{padding:0}.case-viewer-controls{margin-top:47px;margin-bottom:20px}ccd-case-header{float:left;margin-right:10px}ccd-event-trigger{float:right}.case-viewer-label{min-width:300px;white-space:normal}.markdown h3{margin-bottom:0}.hide-table-capion{position:absolute;visibility:hidden}\n"] }]
41919
41961
  }], () => [{ type: i0.NgZone }, { type: i1$2.ActivatedRoute }, { type: i1$2.Router }, { type: NavigationNotifierService }, { type: OrderService }, { type: ActivityPollingService }, { type: i1$3.MatDialog }, { type: AlertService }, { type: DraftService }, { type: ErrorNotifierService }, { type: ConvertHrefToRouterService }, { type: i5.Location }, { type: i0.ChangeDetectorRef }, { type: SessionStorageService }, { type: i1.RpxTranslatePipe }, { type: LoadingService }, { type: LinkedCasesService }, { type: CaseFlagStateService }, { type: i0.NgZone }], { hasPrint: [{
41920
41962
  type: Input
41921
41963
  }], hasEventSelector: [{
@@ -41958,8 +42000,8 @@ class PrintUrlPipe {
41958
42000
  * the rendering engine, "Trident" (used to identify IE 11 because it no longer reports as "MSIE").
41959
42001
  * Note: IE does not support the URL interface and requires a workaround to parse URLs.
41960
42002
  */
41961
- if (navigator.userAgent.includes(PrintUrlPipe.MSIE_BROWSER_NAME) ||
41962
- navigator.userAgent.includes(PrintUrlPipe.IE11_BROWSER_ENGINE)) {
42003
+ if (navigator.userAgent.indexOf(PrintUrlPipe.MSIE_BROWSER_NAME) !== -1 ||
42004
+ navigator.userAgent.indexOf(PrintUrlPipe.IE11_BROWSER_ENGINE) !== -1) {
41963
42005
  // Workaround for not being able to use the URL interface
41964
42006
  const urlParser = document.createElement('a');
41965
42007
  urlParser.href = remoteUrl;
@@ -42175,7 +42217,7 @@ class CaseViewerComponent {
42175
42217
  return !!this.caseDetails;
42176
42218
  }
42177
42219
  hasStandardAccess() {
42178
- return !this.accessGranted ? !CaseViewerComponent.NON_STANDARD_USER_ACCESS_TYPES.includes(this.userAccessType) : true;
42220
+ return !this.accessGranted ? CaseViewerComponent.NON_STANDARD_USER_ACCESS_TYPES.indexOf(this.userAccessType) === -1 : true;
42179
42221
  }
42180
42222
  suffixDuplicateTabs(tabs) {
42181
42223
  const count = {};
@@ -43467,7 +43509,7 @@ function CaseChallengedAccessRequestComponent_div_24_Template(rf, ctx) { if (rf
43467
43509
  i0.ɵɵattribute("aria-describedby", ((tmp_5_0 = ctx_r0.formGroup.get("caseReference")) == null ? null : tmp_5_0.invalid) && ctx_r0.submitted ? "case-reference-error-message" : null);
43468
43510
  } }
43469
43511
  function CaseChallengedAccessRequestComponent_div_40_div_2_Template(rf, ctx) { if (rf & 1) {
43470
- i0.ɵɵelementStart(0, "div", 36);
43512
+ i0.ɵɵelementStart(0, "div", 35);
43471
43513
  i0.ɵɵtext(1);
43472
43514
  i0.ɵɵpipe(2, "rpxTranslate");
43473
43515
  i0.ɵɵelementEnd();
@@ -43479,25 +43521,19 @@ function CaseChallengedAccessRequestComponent_div_40_div_2_Template(rf, ctx) { i
43479
43521
  function CaseChallengedAccessRequestComponent_div_40_Template(rf, ctx) { if (rf & 1) {
43480
43522
  i0.ɵɵelementStart(0, "div", 32)(1, "div", 3);
43481
43523
  i0.ɵɵtemplate(2, CaseChallengedAccessRequestComponent_div_40_div_2_Template, 3, 3, "div", 33);
43482
- i0.ɵɵelementStart(3, "label", 34);
43483
- i0.ɵɵtext(4);
43484
- i0.ɵɵpipe(5, "rpxTranslate");
43485
- i0.ɵɵelementEnd();
43486
- i0.ɵɵelement(6, "textarea", 35);
43524
+ i0.ɵɵelement(3, "textarea", 34);
43487
43525
  i0.ɵɵelementEnd()();
43488
43526
  } if (rf & 2) {
43489
43527
  let tmp_1_0;
43490
- let tmp_5_0;
43528
+ let tmp_4_0;
43491
43529
  const ctx_r0 = i0.ɵɵnextContext();
43492
43530
  i0.ɵɵadvance();
43493
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$4, ((tmp_1_0 = ctx_r0.formGroup.get("otherReason")) == null ? null : tmp_1_0.invalid) && ctx_r0.submitted));
43531
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c0$4, ((tmp_1_0 = ctx_r0.formGroup.get("otherReason")) == null ? null : tmp_1_0.invalid) && ctx_r0.submitted));
43494
43532
  i0.ɵɵadvance();
43495
43533
  i0.ɵɵproperty("ngIf", ctx_r0.formGroup.get("otherReason").invalid && ctx_r0.submitted);
43496
- i0.ɵɵadvance(2);
43497
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 5, "Other reason"), " ");
43498
- i0.ɵɵadvance(2);
43499
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c2, ctx_r0.formGroup.get("otherReason").invalid && ctx_r0.submitted));
43500
- i0.ɵɵattribute("aria-describedby", "reason-3-label" + (((tmp_5_0 = ctx_r0.formGroup.get("otherReason")) == null ? null : tmp_5_0.invalid) && ctx_r0.submitted ? " other-reason-error-message" : ""));
43534
+ i0.ɵɵadvance();
43535
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c2, ctx_r0.formGroup.get("otherReason").invalid && ctx_r0.submitted));
43536
+ i0.ɵɵattribute("aria-describedby", "reason-3-label" + (((tmp_4_0 = ctx_r0.formGroup.get("otherReason")) == null ? null : tmp_4_0.invalid) && ctx_r0.submitted ? " other-reason-error-message" : ""));
43501
43537
  } }
43502
43538
  class CaseChallengedAccessRequestComponent {
43503
43539
  fb;
@@ -43645,7 +43681,7 @@ class CaseChallengedAccessRequestComponent {
43645
43681
  return input.value === null || input.value.trim().length === 0;
43646
43682
  }
43647
43683
  static ɵfac = function CaseChallengedAccessRequestComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaseChallengedAccessRequestComponent)(i0.ɵɵdirectiveInject(i4.FormBuilder), i0.ɵɵdirectiveInject(i1$2.Router), i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(i1$2.ActivatedRoute), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(i4$1.Title)); };
43648
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseChallengedAccessRequestComponent, selectors: [["ccd-case-challenged-access-request"]], standalone: false, decls: 50, vars: 50, 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"], ["id", "reason-hint", 1, "govuk-hint"], ["id", "error-message", "class", "govuk-error-message", 4, "ngIf"], ["data-module", "govuk-radios", 1, "govuk-radios", "govuk-radios--conditional"], [1, "govuk-radios__item"], ["id", "reason-0", "name", "radioSelected", "type", "radio", "data-aria-controls", "conditional-reason-0", "formControlName", "radioSelected", 1, "govuk-radios__input", 3, "change", "value", "checked"], ["for", "reason-0", 1, "govuk-label", "govuk-radios__label"], ["id", "conditional-reason-0", "class", "govuk-radios__conditional", 4, "ngIf"], ["id", "reason-1", "name", "radioSelected", "type", "radio", "formControlName", "radioSelected", 1, "govuk-radios__input", 3, "change", "value", "checked"], ["for", "reason-1", 1, "govuk-label", "govuk-radios__label"], ["id", "reason-2", "name", "radioSelected", "type", "radio", "formControlName", "radioSelected", 1, "govuk-radios__input", 3, "change", "value", "checked"], ["for", "reason-2", 1, "govuk-label", "govuk-radios__label"], ["id", "reason-3", "name", "radioSelected", "type", "radio", "data-aria-controls", "conditional-reason-3", "formControlName", "radioSelected", 1, "govuk-radios__input", 3, "change", "value", "checked"], ["for", "reason-3", "id", "reason-3-label", 1, "govuk-label", "govuk-radios__label"], ["id", "conditional-reason-3", "class", "govuk-radios__conditional", 4, "ngIf"], [1, "govuk-button-group"], ["type", "submit", 1, "govuk-button", "govuk-!-margin-right-3"], [1, "govuk-grid-column-full", "govuk-!-padding-left-0"], ["href", "#", 1, "govuk-body", 3, "click"], [3, "error"], ["id", "error-message", 1, "govuk-error-message"], ["id", "conditional-reason-0", 1, "govuk-radios__conditional"], ["for", "case-reference", 1, "govuk-label"], ["id", "case-reference-error-message", "class", "govuk-error-message", 4, "ngIf"], ["id", "case-reference", "name", "case-reference", "type", "text", "formControlName", "caseReference", 1, "govuk-input", "govuk-!-width-one-third", 3, "ngClass"], ["id", "case-reference-error-message", 1, "govuk-error-message"], ["id", "conditional-reason-3", 1, "govuk-radios__conditional"], ["id", "other-reason-error-message", "class", "govuk-error-message", 4, "ngIf"], ["for", "other-reason", 1, "govuk-label", "govuk-visually-hidden"], ["id", "other-reason", "name", "other-reason", "rows", "5", "formControlName", "otherReason", 1, "govuk-textarea", 3, "ngClass"], ["id", "other-reason-error-message", 1, "govuk-error-message"]], template: function CaseChallengedAccessRequestComponent_Template(rf, ctx) { if (rf & 1) {
43684
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseChallengedAccessRequestComponent, selectors: [["ccd-case-challenged-access-request"]], standalone: false, decls: 50, vars: 50, 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"], ["id", "reason-hint", 1, "govuk-hint"], ["id", "error-message", "class", "govuk-error-message", 4, "ngIf"], ["data-module", "govuk-radios", 1, "govuk-radios", "govuk-radios--conditional"], [1, "govuk-radios__item"], ["id", "reason-0", "name", "radioSelected", "type", "radio", "data-aria-controls", "conditional-reason-0", "formControlName", "radioSelected", 1, "govuk-radios__input", 3, "change", "value", "checked"], ["for", "reason-0", 1, "govuk-label", "govuk-radios__label"], ["id", "conditional-reason-0", "class", "govuk-radios__conditional", 4, "ngIf"], ["id", "reason-1", "name", "radioSelected", "type", "radio", "formControlName", "radioSelected", 1, "govuk-radios__input", 3, "change", "value", "checked"], ["for", "reason-1", 1, "govuk-label", "govuk-radios__label"], ["id", "reason-2", "name", "radioSelected", "type", "radio", "formControlName", "radioSelected", 1, "govuk-radios__input", 3, "change", "value", "checked"], ["for", "reason-2", 1, "govuk-label", "govuk-radios__label"], ["id", "reason-3", "name", "radioSelected", "type", "radio", "data-aria-controls", "conditional-reason-3", "formControlName", "radioSelected", 1, "govuk-radios__input", 3, "change", "value", "checked"], ["for", "reason-3", "id", "reason-3-label", 1, "govuk-label", "govuk-radios__label"], ["id", "conditional-reason-3", "class", "govuk-radios__conditional", 4, "ngIf"], [1, "govuk-button-group"], ["type", "submit", 1, "govuk-button", "govuk-!-margin-right-3"], [1, "govuk-grid-column-full", "govuk-!-padding-left-0"], ["href", "#", 1, "govuk-body", 3, "click"], [3, "error"], ["id", "error-message", 1, "govuk-error-message"], ["id", "conditional-reason-0", 1, "govuk-radios__conditional"], ["for", "case-reference", 1, "govuk-label"], ["id", "case-reference-error-message", "class", "govuk-error-message", 4, "ngIf"], ["id", "case-reference", "name", "case-reference", "type", "text", "formControlName", "caseReference", 1, "govuk-input", "govuk-!-width-one-third", 3, "ngClass"], ["id", "case-reference-error-message", 1, "govuk-error-message"], ["id", "conditional-reason-3", 1, "govuk-radios__conditional"], ["id", "other-reason-error-message", "class", "govuk-error-message", 4, "ngIf"], ["id", "other-reason", "name", "other-reason", "rows", "5", "formControlName", "otherReason", 1, "govuk-textarea", 3, "ngClass"], ["id", "other-reason-error-message", 1, "govuk-error-message"]], template: function CaseChallengedAccessRequestComponent_Template(rf, ctx) { if (rf & 1) {
43649
43685
  i0.ɵɵtemplate(0, CaseChallengedAccessRequestComponent_exui_error_message_0_Template, 1, 1, "exui-error-message", 0);
43650
43686
  i0.ɵɵelementStart(1, "cut-alert", 1);
43651
43687
  i0.ɵɵtext(2);
@@ -43694,7 +43730,7 @@ class CaseChallengedAccessRequestComponent {
43694
43730
  i0.ɵɵtext(38);
43695
43731
  i0.ɵɵpipe(39, "rpxTranslate");
43696
43732
  i0.ɵɵelementEnd()();
43697
- i0.ɵɵtemplate(40, CaseChallengedAccessRequestComponent_div_40_Template, 7, 11, "div", 20);
43733
+ i0.ɵɵtemplate(40, CaseChallengedAccessRequestComponent_div_40_Template, 4, 8, "div", 20);
43698
43734
  i0.ɵɵelementEnd()()();
43699
43735
  i0.ɵɵelementStart(41, "div", 21)(42, "button", 22);
43700
43736
  i0.ɵɵtext(43);
@@ -43758,7 +43794,7 @@ class CaseChallengedAccessRequestComponent {
43758
43794
  }
43759
43795
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseChallengedAccessRequestComponent, [{
43760
43796
  type: Component,
43761
- args: [{ selector: 'ccd-case-challenged-access-request', standalone: false, template: "<exui-error-message *ngIf=\"formGroup.invalid && submitted\" [error]=\"errorMessage\"></exui-error-message>\n<cut-alert type=\"information\">\n {{'This case requires challenged access.' | rpxTranslate}}<br/>\n {{'This is because the case is outside your work area. If you request access to the case, it will be logged for auditing purposes.' | rpxTranslate}}\n</cut-alert>\n<form [formGroup]=\"formGroup\" (submit)=\"onSubmit()\">\n <div class=\"govuk-form-group\" [ngClass]=\"{'govuk-form-group--error': formGroup.get('radioSelected')?.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 <div id=\"reason-hint\" class=\"govuk-hint\">\n {{hint | rpxTranslate}}\n </div>\n <div id=\"error-message\" class=\"govuk-error-message\" *ngIf=\"formGroup.get('radioSelected').invalid && submitted\">\n {{errorMessage.description | rpxTranslate}}\n </div>\n <div class=\"govuk-radios govuk-radios--conditional\" data-module=\"govuk-radios\">\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"reason-0\" name=\"radioSelected\" type=\"radio\" [value]=\"accessReasons[0].reason\"\n data-aria-controls=\"conditional-reason-0\" formControlName=\"radioSelected\" [checked]=\"accessReasons[0].checked\"\n [attr.aria-describedby]=\"formGroup.get('radioSelected')?.invalid && submitted ? 'error-message' : null\" (change)=\"onChange()\"/>\n <label class=\"govuk-label govuk-radios__label\" for=\"reason-0\">\n {{accessReasons[0].reason | rpxTranslate}}\n </label>\n </div>\n <div id=\"conditional-reason-0\" *ngIf=\"formGroup.get('radioSelected').value === accessReasons[0].reason\"\n class=\"govuk-radios__conditional\">\n <div class=\"govuk-form-group\" [ngClass]=\"{'govuk-form-group--error': formGroup.get('caseReference')?.invalid && submitted}\">\n <label class=\"govuk-label\" for=\"case-reference\">\n {{caseRefLabel}}\n </label>\n <div id=\"case-reference-error-message\" class=\"govuk-error-message\" *ngIf=\"formGroup.get('caseReference').invalid && submitted\">\n {{errorMessage.description | rpxTranslate}}\n </div>\n <input class=\"govuk-input govuk-!-width-one-third\"\n [ngClass]=\"{'govuk-input--error': formGroup.get('caseReference').invalid && submitted}\" id=\"case-reference\"\n name=\"case-reference\" type=\"text\" [attr.aria-describedby]=\"formGroup.get('caseReference')?.invalid && submitted ? 'case-reference-error-message' : null\" formControlName=\"caseReference\">\n </div>\n </div>\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"reason-1\" name=\"radioSelected\" type=\"radio\" [value]=\"accessReasons[1].reason\"\n formControlName=\"radioSelected\" [checked]=\"accessReasons[1].checked\" [attr.aria-describedby]=\"formGroup.get('radioSelected')?.invalid && submitted ? 'error-message' : null\" (change)=\"onChange()\"/>\n <label class=\"govuk-label govuk-radios__label\" for=\"reason-1\">\n {{accessReasons[1].reason | rpxTranslate}}\n </label>\n </div>\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"reason-2\" name=\"radioSelected\" type=\"radio\" [value]=\"accessReasons[2].reason\"\n formControlName=\"radioSelected\" [checked]=\"accessReasons[2].checked\" [attr.aria-describedby]=\"formGroup.get('radioSelected')?.invalid && submitted ? 'error-message' : null\" (change)=\"onChange()\"/>\n <label class=\"govuk-label govuk-radios__label\" for=\"reason-2\">\n {{accessReasons[2].reason | rpxTranslate}}\n </label>\n </div>\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"reason-3\" name=\"radioSelected\" type=\"radio\" [value]=\"accessReasons[3].reason\"\n data-aria-controls=\"conditional-reason-3\" formControlName=\"radioSelected\" [checked]=\"accessReasons[3].checked\"\n [attr.aria-describedby]=\"formGroup.get('radioSelected')?.invalid && submitted ? 'error-message' : null\" (change)=\"onChange()\"/>\n <label class=\"govuk-label govuk-radios__label\" for=\"reason-3\" id=\"reason-3-label\">\n {{accessReasons[3].reason | rpxTranslate}}\n </label>\n </div>\n <div id=\"conditional-reason-3\" *ngIf=\"formGroup.get('radioSelected').value === accessReasons[3].reason\"\n class=\"govuk-radios__conditional\">\n <div class=\"govuk-form-group\" [ngClass]=\"{'govuk-form-group--error': formGroup.get('otherReason')?.invalid && submitted}\">\n <div id=\"other-reason-error-message\" class=\"govuk-error-message\" *ngIf=\"formGroup.get('otherReason').invalid && submitted\">\n {{errorMessage.description | rpxTranslate}}\n </div>\n <label class=\"govuk-label govuk-visually-hidden\" for=\"other-reason\">\n {{ 'Other reason' | rpxTranslate }}\n </label>\n <textarea class=\"govuk-textarea\" [ngClass]=\"{'govuk-textarea--error': formGroup.get('otherReason').invalid && submitted}\"\n id=\"other-reason\" name=\"other-reason\" rows=\"5\" [attr.aria-describedby]=\"'reason-3-label' + (formGroup.get('otherReason')?.invalid && submitted ? ' other-reason-error-message' : '')\" formControlName=\"otherReason\"></textarea>\n </div>\n </div>\n </div>\n </fieldset>\n </div>\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(); $event.preventDefault()\" href=\"#\">\n {{'Cancel' | rpxTranslate}}\n </a>\n </p>\n </div>\n </div>\n</form>\n" }]
43797
+ args: [{ selector: 'ccd-case-challenged-access-request', standalone: false, template: "<exui-error-message *ngIf=\"formGroup.invalid && submitted\" [error]=\"errorMessage\"></exui-error-message>\n<cut-alert type=\"information\">\n {{'This case requires challenged access.' | rpxTranslate}}<br/>\n {{'This is because the case is outside your work area. If you request access to the case, it will be logged for auditing purposes.' | rpxTranslate}}\n</cut-alert>\n<form [formGroup]=\"formGroup\" (submit)=\"onSubmit()\">\n <div class=\"govuk-form-group\" [ngClass]=\"{'govuk-form-group--error': formGroup.get('radioSelected')?.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 <div id=\"reason-hint\" class=\"govuk-hint\">\n {{hint | rpxTranslate}}\n </div>\n <div id=\"error-message\" class=\"govuk-error-message\" *ngIf=\"formGroup.get('radioSelected').invalid && submitted\">\n {{errorMessage.description | rpxTranslate}}\n </div>\n <div class=\"govuk-radios govuk-radios--conditional\" data-module=\"govuk-radios\">\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"reason-0\" name=\"radioSelected\" type=\"radio\" [value]=\"accessReasons[0].reason\"\n data-aria-controls=\"conditional-reason-0\" formControlName=\"radioSelected\" [checked]=\"accessReasons[0].checked\"\n [attr.aria-describedby]=\"formGroup.get('radioSelected')?.invalid && submitted ? 'error-message' : null\" (change)=\"onChange()\"/>\n <label class=\"govuk-label govuk-radios__label\" for=\"reason-0\">\n {{accessReasons[0].reason | rpxTranslate}}\n </label>\n </div>\n <div id=\"conditional-reason-0\" *ngIf=\"formGroup.get('radioSelected').value === accessReasons[0].reason\"\n class=\"govuk-radios__conditional\">\n <div class=\"govuk-form-group\" [ngClass]=\"{'govuk-form-group--error': formGroup.get('caseReference')?.invalid && submitted}\">\n <label class=\"govuk-label\" for=\"case-reference\">\n {{caseRefLabel}}\n </label>\n <div id=\"case-reference-error-message\" class=\"govuk-error-message\" *ngIf=\"formGroup.get('caseReference').invalid && submitted\">\n {{errorMessage.description | rpxTranslate}}\n </div>\n <input class=\"govuk-input govuk-!-width-one-third\"\n [ngClass]=\"{'govuk-input--error': formGroup.get('caseReference').invalid && submitted}\" id=\"case-reference\"\n name=\"case-reference\" type=\"text\" [attr.aria-describedby]=\"formGroup.get('caseReference')?.invalid && submitted ? 'case-reference-error-message' : null\" formControlName=\"caseReference\">\n </div>\n </div>\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"reason-1\" name=\"radioSelected\" type=\"radio\" [value]=\"accessReasons[1].reason\"\n formControlName=\"radioSelected\" [checked]=\"accessReasons[1].checked\" [attr.aria-describedby]=\"formGroup.get('radioSelected')?.invalid && submitted ? 'error-message' : null\" (change)=\"onChange()\"/>\n <label class=\"govuk-label govuk-radios__label\" for=\"reason-1\">\n {{accessReasons[1].reason | rpxTranslate}}\n </label>\n </div>\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"reason-2\" name=\"radioSelected\" type=\"radio\" [value]=\"accessReasons[2].reason\"\n formControlName=\"radioSelected\" [checked]=\"accessReasons[2].checked\" [attr.aria-describedby]=\"formGroup.get('radioSelected')?.invalid && submitted ? 'error-message' : null\" (change)=\"onChange()\"/>\n <label class=\"govuk-label govuk-radios__label\" for=\"reason-2\">\n {{accessReasons[2].reason | rpxTranslate}}\n </label>\n </div>\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"reason-3\" name=\"radioSelected\" type=\"radio\" [value]=\"accessReasons[3].reason\"\n data-aria-controls=\"conditional-reason-3\" formControlName=\"radioSelected\" [checked]=\"accessReasons[3].checked\"\n [attr.aria-describedby]=\"formGroup.get('radioSelected')?.invalid && submitted ? 'error-message' : null\" (change)=\"onChange()\"/>\n <label class=\"govuk-label govuk-radios__label\" for=\"reason-3\" id=\"reason-3-label\">\n {{accessReasons[3].reason | rpxTranslate}}\n </label>\n </div>\n <div id=\"conditional-reason-3\" *ngIf=\"formGroup.get('radioSelected').value === accessReasons[3].reason\"\n class=\"govuk-radios__conditional\">\n <div class=\"govuk-form-group\" [ngClass]=\"{'govuk-form-group--error': formGroup.get('otherReason')?.invalid && submitted}\">\n <div id=\"other-reason-error-message\" class=\"govuk-error-message\" *ngIf=\"formGroup.get('otherReason').invalid && submitted\">\n {{errorMessage.description | rpxTranslate}}\n </div>\n <textarea class=\"govuk-textarea\" [ngClass]=\"{'govuk-textarea--error': formGroup.get('otherReason').invalid && submitted}\"\n id=\"other-reason\" name=\"other-reason\" rows=\"5\" [attr.aria-describedby]=\"'reason-3-label' + (formGroup.get('otherReason')?.invalid && submitted ? ' other-reason-error-message' : '')\" formControlName=\"otherReason\"></textarea>\n </div>\n </div>\n </div>\n </fieldset>\n </div>\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(); $event.preventDefault()\" href=\"#\">\n {{'Cancel' | rpxTranslate}}\n </a>\n </p>\n </div>\n </div>\n</form>\n" }]
43762
43798
  }], () => [{ type: i4.FormBuilder }, { type: i1$2.Router }, { type: CasesService }, { type: i1$2.ActivatedRoute }, { type: CaseNotifier }, { type: i4$1.Title }], null); })();
43763
43799
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseChallengedAccessRequestComponent, { className: "CaseChallengedAccessRequestComponent", filePath: "lib/shared/components/case-viewer/case-challenged-access-request/case-challenged-access-request.component.ts", lineNumber: 16 }); })();
43764
43800
 
@@ -44846,10 +44882,10 @@ class CreateCaseFiltersComponent {
44846
44882
  retainEventsWithCreateRights(events) {
44847
44883
  const userProfile = safeJsonParse(this.sessionStorageService.getItem(USER_DETAILS), null);
44848
44884
  return events.filter(event => userProfile && userProfile.roles &&
44849
- userProfile.roles.some(role => this.hasCreateAccess(event, role)));
44885
+ !!userProfile.roles.find(role => this.hasCreateAccess(event, role)));
44850
44886
  }
44851
44887
  hasCreateAccess(caseEvent, role) {
44852
- return caseEvent.acls.some(acl => acl.role === role && acl.create === true);
44888
+ return !!caseEvent.acls.find(acl => acl.role === role && acl.create === true);
44853
44889
  }
44854
44890
  selectJurisdiction(jurisdictions, filterJurisdictionControl) {
44855
44891
  if (jurisdictions.length === 1) {
@@ -45129,7 +45165,7 @@ class SearchFiltersComponent {
45129
45165
  this.selected.jurisdiction = this.jurisdictions
45130
45166
  .filter(j => j.id === jurisdiction.id)[0];
45131
45167
  if (jurisdiction.currentCaseType &&
45132
- this.selected.jurisdiction.caseTypes.some(ct => ct.id === jurisdiction.currentCaseType.id)) {
45168
+ this.selected.jurisdiction.caseTypes.find(ct => ct.id === jurisdiction.currentCaseType.id)) {
45133
45169
  this.selected.jurisdiction.currentCaseType = jurisdiction.currentCaseType;
45134
45170
  }
45135
45171
  else {
@@ -45581,13 +45617,14 @@ function SearchResultComponent_table_0_td_10_Template(rf, ctx) { if (rf & 1) {
45581
45617
  i0.ɵɵelementStart(0, "td", 21)(1, "div", 22)(2, "input", 23);
45582
45618
  i0.ɵɵlistener("change", function SearchResultComponent_table_0_td_10_Template_input_change_2_listener() { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.selectAll()); });
45583
45619
  i0.ɵɵelementEnd();
45584
- i0.ɵɵelementStart(3, "label", 24);
45585
- i0.ɵɵtext(4, " Select all cases ");
45586
- i0.ɵɵelementEnd()()();
45620
+ i0.ɵɵelement(3, "label", 24);
45621
+ i0.ɵɵelementEnd()();
45587
45622
  } if (rf & 2) {
45588
45623
  const ctx_r0 = i0.ɵɵnextContext(2);
45589
45624
  i0.ɵɵadvance(2);
45590
45625
  i0.ɵɵproperty("checked", ctx_r0.allOnPageSelected())("disabled", !ctx_r0.canAnyBeShared());
45626
+ i0.ɵɵadvance();
45627
+ i0.ɵɵattribute("aria-labelledby", "select-all");
45591
45628
  } }
45592
45629
  function SearchResultComponent_table_0_th_11_div_5_Template(rf, ctx) { if (rf & 1) {
45593
45630
  const _r6 = i0.ɵɵgetCurrentView();
@@ -45630,18 +45667,16 @@ function SearchResultComponent_table_0_ng_container_14_tr_1_td_1_Template(rf, ct
45630
45667
  i0.ɵɵelementStart(0, "td", 34)(1, "div", 22)(2, "input", 35);
45631
45668
  i0.ɵɵlistener("change", function SearchResultComponent_table_0_ng_container_14_tr_1_td_1_Template_input_change_2_listener() { i0.ɵɵrestoreView(_r7); const result_r8 = i0.ɵɵnextContext().$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.changeSelection(result_r8)); });
45632
45669
  i0.ɵɵelementEnd();
45633
- i0.ɵɵelementStart(3, "label", 36);
45634
- i0.ɵɵtext(4);
45635
- i0.ɵɵelementEnd()()();
45670
+ i0.ɵɵelement(3, "label", 36);
45671
+ i0.ɵɵelementEnd()();
45636
45672
  } if (rf & 2) {
45637
45673
  const result_r8 = i0.ɵɵnextContext().$implicit;
45638
45674
  const ctx_r0 = i0.ɵɵnextContext(3);
45639
45675
  i0.ɵɵadvance(2);
45640
- i0.ɵɵproperty("id", i0.ɵɵinterpolate1("consumer-select-", result_r8.case_id))("name", i0.ɵɵinterpolate1("consumer-select-", result_r8.case_id))("checked", ctx_r0.isSelected(result_r8))("disabled", !ctx_r0.canBeShared(result_r8));
45676
+ i0.ɵɵproperty("id", i0.ɵɵinterpolate1("select-", result_r8.case_id))("name", i0.ɵɵinterpolate1("select-", result_r8.case_id))("checked", ctx_r0.isSelected(result_r8))("disabled", !ctx_r0.canBeShared(result_r8));
45641
45677
  i0.ɵɵadvance();
45642
- i0.ɵɵproperty("for", i0.ɵɵinterpolate1("consumer-select-", result_r8.case_id));
45643
- i0.ɵɵadvance();
45644
- i0.ɵɵtextInterpolate1(" Select case ", result_r8.case_id, " ");
45678
+ i0.ɵɵproperty("for", i0.ɵɵinterpolate1("select-", result_r8.case_id));
45679
+ i0.ɵɵattribute("aria-labelledby", "select-" + result_r8.case_id);
45645
45680
  } }
45646
45681
  function SearchResultComponent_table_0_ng_container_14_tr_1_td_2_a_1_ng_container_2_ccd_field_read_1_Template(rf, ctx) { if (rf & 1) {
45647
45682
  i0.ɵɵelement(0, "ccd-field-read", 44);
@@ -45720,7 +45755,7 @@ function SearchResultComponent_table_0_ng_container_14_tr_1_td_3_Template(rf, ct
45720
45755
  } }
45721
45756
  function SearchResultComponent_table_0_ng_container_14_tr_1_Template(rf, ctx) { if (rf & 1) {
45722
45757
  i0.ɵɵelementStart(0, "tr");
45723
- i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_14_tr_1_td_1_Template, 5, 9, "td", 32)(2, SearchResultComponent_table_0_ng_container_14_tr_1_td_2_Template, 3, 2, "td", 33)(3, SearchResultComponent_table_0_ng_container_14_tr_1_td_3_Template, 3, 4, "td", 1);
45758
+ i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_14_tr_1_td_1_Template, 4, 9, "td", 32)(2, SearchResultComponent_table_0_ng_container_14_tr_1_td_2_Template, 3, 2, "td", 33)(3, SearchResultComponent_table_0_ng_container_14_tr_1_td_3_Template, 3, 4, "td", 1);
45724
45759
  i0.ɵɵelementEnd();
45725
45760
  } if (rf & 2) {
45726
45761
  const ctx_r0 = i0.ɵɵnextContext(3);
@@ -45746,9 +45781,8 @@ function SearchResultComponent_table_0_ng_container_15_tr_1_td_1_Template(rf, ct
45746
45781
  i0.ɵɵelementStart(0, "td", 34)(1, "div", 22)(2, "input", 46);
45747
45782
  i0.ɵɵlistener("change", function SearchResultComponent_table_0_ng_container_15_tr_1_td_1_Template_input_change_2_listener() { i0.ɵɵrestoreView(_r12); const result_r13 = i0.ɵɵnextContext().$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.changeSelection(result_r13)); })("keyup", function SearchResultComponent_table_0_ng_container_15_tr_1_td_1_Template_input_keyup_2_listener($event) { i0.ɵɵrestoreView(_r12); const result_r13 = i0.ɵɵnextContext().$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.onKeyUp($event, result_r13)); });
45748
45783
  i0.ɵɵelementEnd();
45749
- i0.ɵɵelementStart(3, "label", 36);
45750
- i0.ɵɵtext(4);
45751
- i0.ɵɵelementEnd()()();
45784
+ i0.ɵɵelement(3, "label", 36);
45785
+ i0.ɵɵelementEnd()();
45752
45786
  } if (rf & 2) {
45753
45787
  const result_r13 = i0.ɵɵnextContext().$implicit;
45754
45788
  const ctx_r0 = i0.ɵɵnextContext(3);
@@ -45756,8 +45790,7 @@ function SearchResultComponent_table_0_ng_container_15_tr_1_td_1_Template(rf, ct
45756
45790
  i0.ɵɵproperty("id", i0.ɵɵinterpolate1("select-", result_r13.case_id))("name", i0.ɵɵinterpolate1("select-", result_r13.case_id))("checked", ctx_r0.isSelected(result_r13))("disabled", !ctx_r0.canBeShared(result_r13));
45757
45791
  i0.ɵɵadvance();
45758
45792
  i0.ɵɵproperty("for", i0.ɵɵinterpolate1("select-", result_r13.case_id));
45759
- i0.ɵɵadvance();
45760
- i0.ɵɵtextInterpolate1(" Select case ", result_r13.case_id, " ");
45793
+ i0.ɵɵattribute("aria-labelledby", "select-" + result_r13.case_id);
45761
45794
  } }
45762
45795
  function SearchResultComponent_table_0_ng_container_15_tr_1_td_2_a_1_ng_container_2_ccd_field_read_1_Template(rf, ctx) { if (rf & 1) {
45763
45796
  i0.ɵɵelement(0, "ccd-field-read", 44);
@@ -45836,7 +45869,7 @@ function SearchResultComponent_table_0_ng_container_15_tr_1_td_3_Template(rf, ct
45836
45869
  } }
45837
45870
  function SearchResultComponent_table_0_ng_container_15_tr_1_Template(rf, ctx) { if (rf & 1) {
45838
45871
  i0.ɵɵelementStart(0, "tr");
45839
- i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_15_tr_1_td_1_Template, 5, 9, "td", 32)(2, SearchResultComponent_table_0_ng_container_15_tr_1_td_2_Template, 3, 2, "td", 33)(3, SearchResultComponent_table_0_ng_container_15_tr_1_td_3_Template, 3, 4, "td", 1);
45872
+ i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_15_tr_1_td_1_Template, 4, 9, "td", 32)(2, SearchResultComponent_table_0_ng_container_15_tr_1_td_2_Template, 3, 2, "td", 33)(3, SearchResultComponent_table_0_ng_container_15_tr_1_td_3_Template, 3, 4, "td", 1);
45840
45873
  i0.ɵɵelementEnd();
45841
45874
  } if (rf & 2) {
45842
45875
  const ctx_r0 = i0.ɵɵnextContext(3);
@@ -45866,7 +45899,7 @@ function SearchResultComponent_table_0_Template(rf, ctx) { if (rf & 1) {
45866
45899
  i0.ɵɵtemplate(5, SearchResultComponent_table_0_div_5_Template, 11, 12, "div", 5)(6, SearchResultComponent_table_0_div_6_Template, 18, 18, "div", 6)(7, SearchResultComponent_table_0_div_7_Template, 6, 6, "div", 7);
45867
45900
  i0.ɵɵelementEnd();
45868
45901
  i0.ɵɵelementStart(8, "thead")(9, "tr", 8);
45869
- i0.ɵɵtemplate(10, SearchResultComponent_table_0_td_10_Template, 5, 2, "td", 9)(11, SearchResultComponent_table_0_th_11_Template, 6, 5, "th", 10)(12, SearchResultComponent_table_0_th_12_Template, 2, 0, "th", 11);
45902
+ i0.ɵɵtemplate(10, SearchResultComponent_table_0_td_10_Template, 4, 3, "td", 9)(11, SearchResultComponent_table_0_th_11_Template, 6, 5, "th", 10)(12, SearchResultComponent_table_0_th_12_Template, 2, 0, "th", 11);
45870
45903
  i0.ɵɵelementEnd()();
45871
45904
  i0.ɵɵelementStart(13, "tbody");
45872
45905
  i0.ɵɵtemplate(14, SearchResultComponent_table_0_ng_container_14_Template, 3, 8, "ng-container", 1)(15, SearchResultComponent_table_0_ng_container_15_Template, 4, 11, "ng-container", 1);
@@ -46002,7 +46035,7 @@ class SearchResultComponent {
46002
46035
  this.selection.emit(this.selectedCases);
46003
46036
  }
46004
46037
  canBeShared(caseView) {
46005
- return !!caseView.supplementary_data?.hasOwnProperty('orgs_assigned_users');
46038
+ return caseView.supplementary_data && caseView.supplementary_data.hasOwnProperty('orgs_assigned_users');
46006
46039
  }
46007
46040
  canAnyBeShared() {
46008
46041
  for (let i = 0, l = this.resultView.results.length; i < l; i++) {
@@ -46040,8 +46073,10 @@ class SearchResultComponent {
46040
46073
  }
46041
46074
  });
46042
46075
  }
46043
- else if (this.canBeShared(c)) {
46044
- this.selectedCases.push(c);
46076
+ else {
46077
+ if (this.canBeShared(c)) {
46078
+ this.selectedCases.push(c);
46079
+ }
46045
46080
  }
46046
46081
  this.selection.emit(this.selectedCases);
46047
46082
  }
@@ -46157,14 +46192,16 @@ class SearchResultComponent {
46157
46192
  this.consumerSortParameters.type = column.case_field_type.type;
46158
46193
  this.sortHandler.emit(this.consumerSortParameters);
46159
46194
  }
46160
- else if (this.comparator(column) === undefined) {
46161
- return;
46162
- }
46163
- else if (this.isSortAscending(column)) {
46164
- this.sortParameters = new SortParameters(this.comparator(column), SortOrder$1.ASCENDING);
46165
- }
46166
46195
  else {
46167
- this.sortParameters = new SortParameters(this.comparator(column), SortOrder$1.DESCENDING);
46196
+ if (this.comparator(column) === undefined) {
46197
+ return;
46198
+ }
46199
+ else if (this.isSortAscending(column)) {
46200
+ this.sortParameters = new SortParameters(this.comparator(column), SortOrder$1.ASCENDING);
46201
+ }
46202
+ else {
46203
+ this.sortParameters = new SortParameters(this.comparator(column), SortOrder$1.DESCENDING);
46204
+ }
46168
46205
  }
46169
46206
  }
46170
46207
  sortWidget(column) {
@@ -46186,13 +46223,19 @@ class SearchResultComponent {
46186
46223
  if (col.case_field_id === '[CASE_REFERENCE]') {
46187
46224
  return this.caseReferencePipe.transform(result.case_fields[col.case_field_id]);
46188
46225
  }
46189
- if (!col.id) {
46190
- return result.case_fields[col.case_field_id];
46191
- }
46192
- if (col.id === '[CASE_REFERENCE]') {
46193
- return this.caseReferencePipe.transform(result.case_fields[col.id]);
46226
+ else {
46227
+ if (col.id) {
46228
+ if (col.id === '[CASE_REFERENCE]') {
46229
+ return this.caseReferencePipe.transform(result.case_fields[col.id]);
46230
+ }
46231
+ else {
46232
+ return result.case_fields[col.id];
46233
+ }
46234
+ }
46235
+ else {
46236
+ return result.case_fields[col.case_field_id];
46237
+ }
46194
46238
  }
46195
- return result.case_fields[col.id];
46196
46239
  }
46197
46240
  draftPrefixOrGet(col, result) {
46198
46241
  return result.case_id.startsWith(DRAFT_PREFIX) ? DRAFT_PREFIX : this.hyphenateIfCaseReferenceOrGet(col, result);
@@ -46244,7 +46287,7 @@ class SearchResultComponent {
46244
46287
  // eslint-disable-next-line @typescript-eslint/no-empty-function
46245
46288
  noop() { }
46246
46289
  static ɵfac = function SearchResultComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SearchResultComponent)(i0.ɵɵdirectiveInject(SearchResultViewItemComparatorFactory), i0.ɵɵdirectiveInject(AbstractAppConfig), i0.ɵɵdirectiveInject(ActivityService), i0.ɵɵdirectiveInject(CaseReferencePipe), i0.ɵɵdirectiveInject(PlaceholderService), i0.ɵɵdirectiveInject(BrowserService), i0.ɵɵdirectiveInject(SessionStorageService)); };
46247
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SearchResultComponent, selectors: [["ccd-search-result"]], inputs: { caseLinkUrlTemplate: "caseLinkUrlTemplate", jurisdiction: "jurisdiction", caseType: "caseType", caseState: "caseState", caseFilterFG: "caseFilterFG", resultView: "resultView", page: "page", paginationMetadata: "paginationMetadata", metadataFields: "metadataFields", selectionEnabled: "selectionEnabled", showOnlySelected: "showOnlySelected", preSelectedCases: "preSelectedCases", consumerSortingEnabled: "consumerSortingEnabled" }, outputs: { selection: "selection", changePage: "changePage", clickCase: "clickCase", sortHandler: "sortHandler" }, standalone: false, features: [i0.ɵɵNgOnChangesFeature], decls: 3, vars: 3, consts: [["case_reference", ""], [4, "ngIf"], [3, "visibilityLabel", "autoHide", "maxSize", "screenReaderPaginationLabel", "screenReaderPageLabel", "screenReaderCurrentLabel", "pageChange", 4, "ngIf"], ["class", "notification", "role", "status", 4, "ngIf"], ["id", "search-result-heading__text", "tabindex", "-1", 1, "heading-h2"], ["class", "govuk-warning-text pagination-limit-warning", 4, "ngIf"], ["class", "pagination-top", 4, "ngIf"], ["class", "reset-selection", 4, "ngIf"], ["scope", "row"], ["class", "govuk-table__checkbox", 4, "ngIf"], ["class", "search-result-column-header", "scope", "col", 4, "ngFor", "ngForOf"], ["style", "width: 110px;", "scope", "col", 4, "ngIf"], [1, "govuk-warning-text", "pagination-limit-warning"], ["aria-hidden", "true", 1, "govuk-warning-text__icon"], [1, "govuk-warning-text__text"], [1, "govuk-visually-hidden"], [1, "pagination-top"], ["id", "search-result-summary__text", 1, "text-16"], [1, "govuk-!-font-weight-bold"], [1, "reset-selection"], ["href", "#", 1, "search-result-reset-link", 3, "click"], [1, "govuk-table__checkbox"], [1, "govuk-checkboxes__item"], ["id", "select-all", "name", "select-all", "type", "checkbox", 1, "govuk-checkboxes__input", 3, "change", "checked", "disabled"], ["for", "select-all", 1, "govuk-label", "govuk-checkboxes__label", "govuk-visually-hidden"], ["scope", "col", 1, "search-result-column-header"], [1, "search-result-column-label", 3, "click", "keyup"], ["class", "search-result-column-sort", 4, "ngIf"], [1, "search-result-column-sort"], ["href", "#", 1, "sort-widget", 3, "click", "keyup.enter", "innerHTML"], ["scope", "col", 2, "width", "110px"], [4, "ngFor", "ngForOf"], ["class", "govuk-table__checkbox", "scope", "col", 4, "ngIf"], ["class", "search-result-column-cell", "scope", "row", 4, "ngFor", "ngForOf"], ["scope", "col", 1, "govuk-table__checkbox"], ["type", "checkbox", 1, "govuk-checkboxes__input", 3, "change", "id", "name", "checked", "disabled"], [1, "govuk-label", "govuk-checkboxes__label", "govuk-visually-hidden", 3, "for"], ["scope", "row", 1, "search-result-column-cell"], ["class", "govuk-link", 3, "routerLink", 4, "ngIf"], ["class", "text-16", 3, "visibility", 4, "ngIf"], [1, "govuk-link", 3, "routerLink"], ["class", "text-16", 4, "ngIf"], [1, "text-16"], ["ccdLabelSubstitutor", "", 3, "caseField", "contextFields", "elementsToSubstitute", 4, "ngIf", "ngIfElse"], ["ccdLabelSubstitutor", "", 3, "caseField", "contextFields", "elementsToSubstitute"], [3, "caseId", "displayMode"], ["type", "checkbox", 1, "govuk-checkboxes__input", 3, "change", "keyup", "id", "name", "checked", "disabled"], [3, "pageChange", "visibilityLabel", "autoHide", "maxSize", "screenReaderPaginationLabel", "screenReaderPageLabel", "screenReaderCurrentLabel"], ["role", "status", 1, "notification"]], template: function SearchResultComponent_Template(rf, ctx) { if (rf & 1) {
46290
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SearchResultComponent, selectors: [["ccd-search-result"]], inputs: { caseLinkUrlTemplate: "caseLinkUrlTemplate", jurisdiction: "jurisdiction", caseType: "caseType", caseState: "caseState", caseFilterFG: "caseFilterFG", resultView: "resultView", page: "page", paginationMetadata: "paginationMetadata", metadataFields: "metadataFields", selectionEnabled: "selectionEnabled", showOnlySelected: "showOnlySelected", preSelectedCases: "preSelectedCases", consumerSortingEnabled: "consumerSortingEnabled" }, outputs: { selection: "selection", changePage: "changePage", clickCase: "clickCase", sortHandler: "sortHandler" }, standalone: false, features: [i0.ɵɵNgOnChangesFeature], decls: 3, vars: 3, consts: [["case_reference", ""], [4, "ngIf"], [3, "visibilityLabel", "autoHide", "maxSize", "screenReaderPaginationLabel", "screenReaderPageLabel", "screenReaderCurrentLabel", "pageChange", 4, "ngIf"], ["class", "notification", "role", "status", 4, "ngIf"], ["id", "search-result-heading__text", "tabindex", "-1", 1, "heading-h2"], ["class", "govuk-warning-text pagination-limit-warning", 4, "ngIf"], ["class", "pagination-top", 4, "ngIf"], ["class", "reset-selection", 4, "ngIf"], ["scope", "row"], ["class", "govuk-table__checkbox", 4, "ngIf"], ["class", "search-result-column-header", "scope", "col", 4, "ngFor", "ngForOf"], ["style", "width: 110px;", "scope", "col", 4, "ngIf"], [1, "govuk-warning-text", "pagination-limit-warning"], ["aria-hidden", "true", 1, "govuk-warning-text__icon"], [1, "govuk-warning-text__text"], [1, "govuk-visually-hidden"], [1, "pagination-top"], ["id", "search-result-summary__text", 1, "text-16"], [1, "govuk-!-font-weight-bold"], [1, "reset-selection"], ["href", "#", 1, "search-result-reset-link", 3, "click"], [1, "govuk-table__checkbox"], [1, "govuk-checkboxes__item"], ["id", "select-all", "name", "select-all", "type", "checkbox", 1, "govuk-checkboxes__input", 3, "change", "checked", "disabled"], ["for", "select-all", 1, "govuk-label", "govuk-checkboxes__label"], ["scope", "col", 1, "search-result-column-header"], [1, "search-result-column-label", 3, "click", "keyup"], ["class", "search-result-column-sort", 4, "ngIf"], [1, "search-result-column-sort"], ["href", "#", 1, "sort-widget", 3, "click", "keyup.enter", "innerHTML"], ["scope", "col", 2, "width", "110px"], [4, "ngFor", "ngForOf"], ["class", "govuk-table__checkbox", "scope", "col", 4, "ngIf"], ["class", "search-result-column-cell", "scope", "row", 4, "ngFor", "ngForOf"], ["scope", "col", 1, "govuk-table__checkbox"], ["type", "checkbox", 1, "govuk-checkboxes__input", 3, "change", "id", "name", "checked", "disabled"], [1, "govuk-label", "govuk-checkboxes__label", 3, "for"], ["scope", "row", 1, "search-result-column-cell"], ["class", "govuk-link", 3, "routerLink", 4, "ngIf"], ["class", "text-16", 3, "visibility", 4, "ngIf"], [1, "govuk-link", 3, "routerLink"], ["class", "text-16", 4, "ngIf"], [1, "text-16"], ["ccdLabelSubstitutor", "", 3, "caseField", "contextFields", "elementsToSubstitute", 4, "ngIf", "ngIfElse"], ["ccdLabelSubstitutor", "", 3, "caseField", "contextFields", "elementsToSubstitute"], [3, "caseId", "displayMode"], ["type", "checkbox", 1, "govuk-checkboxes__input", 3, "change", "keyup", "id", "name", "checked", "disabled"], [3, "pageChange", "visibilityLabel", "autoHide", "maxSize", "screenReaderPaginationLabel", "screenReaderPageLabel", "screenReaderCurrentLabel"], ["role", "status", 1, "notification"]], template: function SearchResultComponent_Template(rf, ctx) { if (rf & 1) {
46248
46291
  i0.ɵɵtemplate(0, SearchResultComponent_table_0_Template, 16, 11, "table", 1)(1, SearchResultComponent_ccd_pagination_1_Template, 1, 6, "ccd-pagination", 2)(2, SearchResultComponent_div_2_Template, 3, 3, "div", 3);
46249
46292
  } if (rf & 2) {
46250
46293
  i0.ɵɵproperty("ngIf", ctx.hasResults() || ctx.hasDrafts());
@@ -46256,7 +46299,7 @@ class SearchResultComponent {
46256
46299
  }
46257
46300
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SearchResultComponent, [{
46258
46301
  type: Component,
46259
- args: [{ selector: 'ccd-search-result', standalone: false, template: "<table *ngIf=\"hasResults() || hasDrafts()\">\n <caption>\n <h2 class=\"heading-h2\" id=\"search-result-heading__text\" tabindex=\"-1\">{{ (caseState ? 'Your cases' : 'Search result') | rpxTranslate}}</h2>\n\n <div class=\"govuk-warning-text pagination-limit-warning\" *ngIf=\"paginationLimitEnforced\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-visually-hidden\">{{'Warning' | rpxTranslate}}</span>\n {{'The total size of the result set is' | rpxTranslate}} {{paginationMetadata.totalResultsCount | number}}. {{'Only the first 10,000 records are available for display.' | rpxTranslate}}\n </strong>\n </div>\n\n <div *ngIf=\"(hasResults() || hasDrafts())\" class=\"pagination-top\">\n <output [attr.aria-label]=\"getTotalResults() + ' ' + ('results have been found' | rpxTranslate)\"></output>\n <span class=\"text-16\" id=\"search-result-summary__text\">{{'Showing' | rpxTranslate}}\n <span class=\"govuk-!-font-weight-bold\">{{ getFirstResult() }}</span>\n {{'to' | rpxTranslate}}\n <span class=\"govuk-!-font-weight-bold\">{{ getLastResult() }}</span>\n {{'of' | rpxTranslate}}\n <span class=\"govuk-!-font-weight-bold\">{{ getTotalResults() }}</span> {{'results' | rpxTranslate}}</span>\n </div>\n <div *ngIf=\"(hasResults() || hasDrafts()) && selectionEnabled\" class=\"reset-selection\"\n [attr.aria-label]=\"'Reset selection' | rpxTranslate\">\n <span><a class=\"search-result-reset-link\" href=\"#\" (click)=\"clearSelection(); $event.preventDefault()\">{{'Reset case selection' | rpxTranslate}}</a></span>\n </div>\n </caption>\n <thead>\n <tr scope=\"row\">\n <td *ngIf=\"selectionEnabled\" class=\"govuk-table__checkbox\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" id=\"select-all\" name=\"select-all\" type=\"checkbox\" (change)=\"selectAll()\" [checked]=\"allOnPageSelected()\" [disabled]=\"!canAnyBeShared()\" />\n <label class=\"govuk-label govuk-checkboxes__label govuk-visually-hidden\" for=\"select-all\">\n Select all cases\n </label>\n </div>\n </td>\n <th *ngFor=\"let col of resultView.columns\" class=\"search-result-column-header\"\n [attr.aria-sort]=\"isSortAscending(col) === null ? null : (isSortAscending(col) ? 'ascending' : 'descending')\" scope=\"col\">\n <div>\n <div class=\"search-result-column-label\" (click)=\"sort(col)\" (keyup)=\"noop()\">\n {{ isTranslatable(col) ? (col.label | rpxTranslate) : col.label }}\n </div>\n <div *ngIf=\"comparator(col)\" class=\"search-result-column-sort\">\n <a (click)=\"sort(col); $event.preventDefault()\" (keyup.enter)=\"sort(col)\" class=\"sort-widget\" [innerHTML]=\"sortWidget(col)\" [attr.aria-label]=\"'Sort ' + col.label | rpxTranslate\" href=\"#\"></a>\n </div>\n </div>\n </th>\n <th *ngIf=\"activityEnabled()\" style=\"width: 110px;\" scope=\"col\">&ZeroWidthSpace;</th>\n </tr>\n </thead>\n\n <tbody>\n <!-- sorted by consumer -->\n <ng-container *ngIf=\"consumerSortingEnabled\">\n <tr *ngFor=\"let result of resultView.results | paginate: { itemsPerPage: paginationPageSize, currentPage: selected.page, totalItems: resultTotal }\">\n <td *ngIf=\"selectionEnabled\" class=\"govuk-table__checkbox\" scope=\"col\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" id=\"consumer-select-{{ result.case_id }}\" name=\"consumer-select-{{ result.case_id }}\"\n type=\"checkbox\" (change)=\"changeSelection(result)\" [checked]=\"isSelected(result)\" [disabled]=\"!canBeShared(result)\" />\n <label class=\"govuk-label govuk-checkboxes__label govuk-visually-hidden\" for=\"consumer-select-{{ result.case_id }}\">\n Select case {{ result.case_id }}\n </label>\n </div>\n </td>\n <td class=\"search-result-column-cell\" *ngFor=\"let col of resultView.columns; let colIndex = index\" scope=\"row\">\n <a *ngIf=\"colIndex == 0\" [routerLink]=\"prepareCaseLinkUrl(result.case_id)\"\n attr.aria-label=\"go to case with Case reference:{{ result.case_id | ccdCaseReference }}\" class=\"govuk-link\">\n <ng-container class=\"text-16\" *ngIf=\"!hideRows\">\n <ccd-field-read *ngIf=\"draftPrefixOrGet(col, result); else case_reference\"\n ccdLabelSubstitutor [caseField]=\"getColumnsWithPrefix(result.columns[col.case_field_id], result)\"\n [contextFields]=\"result.hydrated_case_fields\"\n [elementsToSubstitute]=\"['value']\"></ccd-field-read>\n <ng-template #case_reference>{{result.case_id | ccdCaseReference}}</ng-template>\n </ng-container>\n </a>\n <div *ngIf=\"colIndex != 0\" class=\"text-16\" [style.visibility]=\"hideRows ? 'hidden' : 'visible'\">\n <ccd-field-read ccdLabelSubstitutor\n [caseField]=\"result.columns[col.case_field_id]\"\n [contextFields]=\"result.hydrated_case_fields\"\n [elementsToSubstitute]=\"['value']\"></ccd-field-read>\n </div>\n </td>\n <td *ngIf=\"activityEnabled()\">\n <div [style.visibility]=\"hideRows ? 'hidden' : 'visible'\">\n <ccd-activity [caseId]=\"result.case_id\" [displayMode]=\"ICON\"></ccd-activity>\n </div>\n </td>\n </tr>\n </ng-container>\n <!-- sorted by toolkit -->\n <ng-container *ngIf=\"!consumerSortingEnabled\">\n <tr *ngFor=\"let result of resultView.results | ccdSortSearchResult : sortParameters | paginate: { itemsPerPage: paginationPageSize, currentPage: selected.page, totalItems: resultTotal }\">\n <td *ngIf=\"selectionEnabled\" class=\"govuk-table__checkbox\" scope=\"col\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" id=\"select-{{ result.case_id }}\" name=\"select-{{ result.case_id }}\"\n type=\"checkbox\" (change)=\"changeSelection(result)\" [checked]=\"isSelected(result)\" [disabled]=\"!canBeShared(result)\" (keyup)=\"onKeyUp($event, result)\" />\n <label class=\"govuk-label govuk-checkboxes__label govuk-visually-hidden\" for=\"select-{{ result.case_id }}\">\n Select case {{ result.case_id }}\n </label>\n </div>\n </td>\n <td class=\"search-result-column-cell\" *ngFor=\"let col of resultView.columns; let colIndex = index\" scope=\"row\">\n\n <a *ngIf=\"colIndex == 0\" [routerLink]=\"prepareCaseLinkUrl(result.case_id)\"\n attr.aria-label=\"go to case with Case reference:{{ result.case_id | ccdCaseReference }}\" class=\"govuk-link\">\n <ng-container class=\"text-16\" *ngIf=\"!hideRows\">\n <ccd-field-read *ngIf=\"draftPrefixOrGet(col, result); else case_reference\"\n ccdLabelSubstitutor [caseField]=\"getColumnsWithPrefix(result.columns[col.case_field_id], result)\"\n [contextFields]=\"result.hydrated_case_fields\"\n [elementsToSubstitute]=\"['value']\"></ccd-field-read>\n <ng-template #case_reference>{{result.case_id | ccdCaseReference}}</ng-template>\n </ng-container>\n </a>\n <div *ngIf=\"colIndex != 0\" class=\"text-16\" [style.visibility]=\"hideRows ? 'hidden' : 'visible'\">\n <ccd-field-read ccdLabelSubstitutor\n [caseField]=\"result.columns[col.case_field_id]\"\n [contextFields]=\"result.hydrated_case_fields\"\n [elementsToSubstitute]=\"['value']\"></ccd-field-read>\n </div>\n </td>\n <td *ngIf=\"activityEnabled()\">\n <div [style.visibility]=\"hideRows ? 'hidden' : 'visible'\">\n <ccd-activity [caseId]=\"result.case_id\" [displayMode]=\"ICON\"></ccd-activity>\n </div>\n </td>\n </tr>\n </ng-container>\n\n </tbody>\n</table>\n\n<ccd-pagination\n *ngIf=\"hasResults()\"\n (pageChange)=\"goToPage($event)\"\n [visibilityLabel]=\"hideRows ? 'hidden' : 'visible'\"\n [autoHide]=\"true\"\n [maxSize]=\"8\"\n [screenReaderPaginationLabel]=\"'Pagination'\"\n [screenReaderPageLabel]=\"page\"\n [screenReaderCurrentLabel]=\"'You\\'re on page'\"></ccd-pagination>\n\n<div *ngIf=\"!(hasResults() || hasDrafts())\" class=\"notification\" role=\"status\">\n{{'No cases found. Try using different filters.' | rpxTranslate}}\n</div>\n", styles: [".govuk-js-link{appearance:none;background:none;border:none;color:#005ea5;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0;text-decoration:underline}.govuk-js-link:hover{color:#2b8cc4;text-decoration-thickness:max(3px,.1875rem,.12em)}.govuk-js-link:focus{background-color:#ffbf47;color:#000;outline:3px solid transparent;text-decoration:none;box-shadow:0 -2px #ffbf47,0 4px #000}.govuk-js-link:visited{color:#4c2c92}table thead tr th{vertical-align:top}table tbody tr td{font-size:16px;word-wrap:break-word}table tbody tr td a{float:left}table .caseid-col{white-space:nowrap}.notification{text-align:center;padding:30px 0;margin-top:75px}a:hover{color:#005ea5}.search-result-reset-link{padding-right:15px;padding-left:15px}.search-result-column-header{width:unset;table-layout:normal}.search-result-column-header div{display:table-cell;width:auto}@media screen and (max-width:379px){.search-result-column-header div{display:block;float:right}}.search-result-column-label{font-size:16px;font-weight:700;word-wrap:break-word;cursor:pointer;padding-right:15px}.search-result-column-sort{font-size:16px}.sort-widget{cursor:pointer;text-decoration:none;color:#231f20}span.heading-medium{margin-top:-20px}.govuk-table__checkbox{vertical-align:middle;padding-left:3px}#search-result-heading__text:focus{outline:none}\n"] }]
46302
+ args: [{ selector: 'ccd-search-result', standalone: false, template: "<table *ngIf=\"hasResults() || hasDrafts()\">\n <caption>\n <h2 class=\"heading-h2\" id=\"search-result-heading__text\" tabindex=\"-1\">{{ (caseState ? 'Your cases' : 'Search result') | rpxTranslate}}</h2>\n\n <div class=\"govuk-warning-text pagination-limit-warning\" *ngIf=\"paginationLimitEnforced\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-visually-hidden\">{{'Warning' | rpxTranslate}}</span>\n {{'The total size of the result set is' | rpxTranslate}} {{paginationMetadata.totalResultsCount | number}}. {{'Only the first 10,000 records are available for display.' | rpxTranslate}}\n </strong>\n </div>\n\n <div *ngIf=\"(hasResults() || hasDrafts())\" class=\"pagination-top\">\n <output [attr.aria-label]=\"getTotalResults() + ' ' + ('results have been found' | rpxTranslate)\"></output>\n <span class=\"text-16\" id=\"search-result-summary__text\">{{'Showing' | rpxTranslate}}\n <span class=\"govuk-!-font-weight-bold\">{{ getFirstResult() }}</span>\n {{'to' | rpxTranslate}}\n <span class=\"govuk-!-font-weight-bold\">{{ getLastResult() }}</span>\n {{'of' | rpxTranslate}}\n <span class=\"govuk-!-font-weight-bold\">{{ getTotalResults() }}</span> {{'results' | rpxTranslate}}</span>\n </div>\n <div *ngIf=\"(hasResults() || hasDrafts()) && selectionEnabled\" class=\"reset-selection\"\n [attr.aria-label]=\"'Reset selection' | rpxTranslate\">\n <span><a class=\"search-result-reset-link\" href=\"#\" (click)=\"clearSelection(); $event.preventDefault()\">{{'Reset case selection' | rpxTranslate}}</a></span>\n </div>\n </caption>\n <thead>\n <tr scope=\"row\">\n <td *ngIf=\"selectionEnabled\" class=\"govuk-table__checkbox\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" id=\"select-all\" name=\"select-all\" type=\"checkbox\" (change)=\"selectAll()\" [checked]=\"allOnPageSelected()\" [disabled]=\"!canAnyBeShared()\" />\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"select-all\" [attr.aria-labelledby]=\"'select-all'\">\n </label>\n </div>\n </td>\n <th *ngFor=\"let col of resultView.columns\" class=\"search-result-column-header\"\n [attr.aria-sort]=\"isSortAscending(col) === null ? null : (isSortAscending(col) ? 'ascending' : 'descending')\" scope=\"col\">\n <div>\n <div class=\"search-result-column-label\" (click)=\"sort(col)\" (keyup)=\"noop()\">\n {{ isTranslatable(col) ? (col.label | rpxTranslate) : col.label }}\n </div>\n <div *ngIf=\"comparator(col)\" class=\"search-result-column-sort\">\n <a (click)=\"sort(col); $event.preventDefault()\" (keyup.enter)=\"sort(col)\" class=\"sort-widget\" [innerHTML]=\"sortWidget(col)\" [attr.aria-label]=\"'Sort ' + col.label | rpxTranslate\" href=\"#\"></a>\n </div>\n </div>\n </th>\n <th *ngIf=\"activityEnabled()\" style=\"width: 110px;\" scope=\"col\">&ZeroWidthSpace;</th>\n </tr>\n </thead>\n\n <tbody>\n <!-- sorted by consumer -->\n <ng-container *ngIf=\"consumerSortingEnabled\">\n <tr *ngFor=\"let result of resultView.results | paginate: { itemsPerPage: paginationPageSize, currentPage: selected.page, totalItems: resultTotal }\">\n <td *ngIf=\"selectionEnabled\" class=\"govuk-table__checkbox\" scope=\"col\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" id=\"select-{{ result.case_id }}\" name=\"select-{{ result.case_id }}\"\n type=\"checkbox\" (change)=\"changeSelection(result)\" [checked]=\"isSelected(result)\" [disabled]=\"!canBeShared(result)\" />\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"select-{{ result.case_id }}\" [attr.aria-labelledby]=\"'select-' + result.case_id\">\n </label>\n </div>\n </td>\n <td class=\"search-result-column-cell\" *ngFor=\"let col of resultView.columns; let colIndex = index\" scope=\"row\">\n <a *ngIf=\"colIndex == 0\" [routerLink]=\"prepareCaseLinkUrl(result.case_id)\"\n attr.aria-label=\"go to case with Case reference:{{ result.case_id | ccdCaseReference }}\" class=\"govuk-link\">\n <ng-container class=\"text-16\" *ngIf=\"!hideRows\">\n <ccd-field-read *ngIf=\"draftPrefixOrGet(col, result); else case_reference\"\n ccdLabelSubstitutor [caseField]=\"getColumnsWithPrefix(result.columns[col.case_field_id], result)\"\n [contextFields]=\"result.hydrated_case_fields\"\n [elementsToSubstitute]=\"['value']\"></ccd-field-read>\n <ng-template #case_reference>{{result.case_id | ccdCaseReference}}</ng-template>\n </ng-container>\n </a>\n <div *ngIf=\"colIndex != 0\" class=\"text-16\" [style.visibility]=\"hideRows ? 'hidden' : 'visible'\">\n <ccd-field-read ccdLabelSubstitutor\n [caseField]=\"result.columns[col.case_field_id]\"\n [contextFields]=\"result.hydrated_case_fields\"\n [elementsToSubstitute]=\"['value']\"></ccd-field-read>\n </div>\n </td>\n <td *ngIf=\"activityEnabled()\">\n <div [style.visibility]=\"hideRows ? 'hidden' : 'visible'\">\n <ccd-activity [caseId]=\"result.case_id\" [displayMode]=\"ICON\"></ccd-activity>\n </div>\n </td>\n </tr>\n </ng-container>\n <!-- sorted by toolkit -->\n <ng-container *ngIf=\"!consumerSortingEnabled\">\n <tr *ngFor=\"let result of resultView.results | ccdSortSearchResult : sortParameters | paginate: { itemsPerPage: paginationPageSize, currentPage: selected.page, totalItems: resultTotal }\">\n <td *ngIf=\"selectionEnabled\" class=\"govuk-table__checkbox\" scope=\"col\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" id=\"select-{{ result.case_id }}\" name=\"select-{{ result.case_id }}\"\n type=\"checkbox\" (change)=\"changeSelection(result)\" [checked]=\"isSelected(result)\" [disabled]=\"!canBeShared(result)\" (keyup)=\"onKeyUp($event, result)\" />\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"select-{{ result.case_id }}\" [attr.aria-labelledby]=\"'select-' + result.case_id\">\n </label>\n </div>\n </td>\n <td class=\"search-result-column-cell\" *ngFor=\"let col of resultView.columns; let colIndex = index\" scope=\"row\">\n\n <a *ngIf=\"colIndex == 0\" [routerLink]=\"prepareCaseLinkUrl(result.case_id)\"\n attr.aria-label=\"go to case with Case reference:{{ result.case_id | ccdCaseReference }}\" class=\"govuk-link\">\n <ng-container class=\"text-16\" *ngIf=\"!hideRows\">\n <ccd-field-read *ngIf=\"draftPrefixOrGet(col, result); else case_reference\"\n ccdLabelSubstitutor [caseField]=\"getColumnsWithPrefix(result.columns[col.case_field_id], result)\"\n [contextFields]=\"result.hydrated_case_fields\"\n [elementsToSubstitute]=\"['value']\"></ccd-field-read>\n <ng-template #case_reference>{{result.case_id | ccdCaseReference}}</ng-template>\n </ng-container>\n </a>\n <div *ngIf=\"colIndex != 0\" class=\"text-16\" [style.visibility]=\"hideRows ? 'hidden' : 'visible'\">\n <ccd-field-read ccdLabelSubstitutor\n [caseField]=\"result.columns[col.case_field_id]\"\n [contextFields]=\"result.hydrated_case_fields\"\n [elementsToSubstitute]=\"['value']\"></ccd-field-read>\n </div>\n </td>\n <td *ngIf=\"activityEnabled()\">\n <div [style.visibility]=\"hideRows ? 'hidden' : 'visible'\">\n <ccd-activity [caseId]=\"result.case_id\" [displayMode]=\"ICON\"></ccd-activity>\n </div>\n </td>\n </tr>\n </ng-container>\n\n </tbody>\n</table>\n\n<ccd-pagination\n *ngIf=\"hasResults()\"\n (pageChange)=\"goToPage($event)\"\n [visibilityLabel]=\"hideRows ? 'hidden' : 'visible'\"\n [autoHide]=\"true\"\n [maxSize]=\"8\"\n [screenReaderPaginationLabel]=\"'Pagination'\"\n [screenReaderPageLabel]=\"page\"\n [screenReaderCurrentLabel]=\"'You\\'re on page'\"></ccd-pagination>\n\n<div *ngIf=\"!(hasResults() || hasDrafts())\" class=\"notification\" role=\"status\">\n{{'No cases found. Try using different filters.' | rpxTranslate}}\n</div>\n", styles: [".govuk-js-link{appearance:none;background:none;border:none;color:#005ea5;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0;text-decoration:underline}.govuk-js-link:hover{color:#2b8cc4;text-decoration-thickness:max(3px,.1875rem,.12em)}.govuk-js-link:focus{background-color:#ffbf47;color:#000;outline:3px solid transparent;text-decoration:none;box-shadow:0 -2px #ffbf47,0 4px #000}.govuk-js-link:visited{color:#4c2c92}table thead tr th{vertical-align:top}table tbody tr td{font-size:16px;word-wrap:break-word}table tbody tr td a{float:left}table .caseid-col{white-space:nowrap}.notification{text-align:center;padding:30px 0;margin-top:75px}a:hover{color:#005ea5}.search-result-reset-link{padding-right:15px;padding-left:15px}.search-result-column-header{width:unset;table-layout:normal}.search-result-column-header div{display:table-cell;width:auto}@media screen and (max-width:379px){.search-result-column-header div{display:block;float:right}}.search-result-column-label{font-size:16px;font-weight:700;word-wrap:break-word;cursor:pointer;padding-right:15px}.search-result-column-sort{font-size:16px}.sort-widget{cursor:pointer;text-decoration:none;color:#231f20}span.heading-medium{margin-top:-20px}.govuk-table__checkbox{vertical-align:middle;padding-left:3px}#search-result-heading__text:focus{outline:none}\n"] }]
46260
46303
  }], () => [{ type: SearchResultViewItemComparatorFactory }, { type: AbstractAppConfig }, { type: ActivityService }, { type: CaseReferencePipe }, { type: PlaceholderService }, { type: BrowserService }, { type: SessionStorageService }], { caseLinkUrlTemplate: [{
46261
46304
  type: Input
46262
46305
  }], jurisdiction: [{