@ministryofjustice/hmpps-connect-dps-shared-items 4.1.1 → 4.2.1

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.
@@ -297,7 +297,11 @@ export class AutosuggestUi {
297
297
 
298
298
  const message = reason === NoResults.type_more ? this.typeMore : this.noResults
299
299
  this.setAriaStatus(message)
300
- this.listbox.innerHTML = `<li class="${this.stylingBaseClass}${classSuffixOption} ${this.stylingBaseClass}${classSuffixOptionNoResults}">${message}</li>`
300
+ this.listbox.innerHTML = ''
301
+ const noResultsItem = document.createElement('li')
302
+ noResultsItem.className = `${this.stylingBaseClass}${classSuffixOption} ${this.stylingBaseClass}${classSuffixOptionNoResults}`
303
+ noResultsItem.textContent = message
304
+ this.listbox.appendChild(noResultsItem)
301
305
  } else {
302
306
  this.displayAPIError()
303
307
  }
@@ -308,7 +312,7 @@ export class AutosuggestUi {
308
312
  this.input.setAttribute('disabled', true)
309
313
  this.clearListbox()
310
314
  this.errorContainer.classList.remove('hmpps-display-none')
311
- this.errorTextContainer.innerHTML = this.errorMessage
315
+ this.errorTextContainer.textContent = this.errorMessage
312
316
  this.ariaStatus.setAttribute('aria-hidden', 'true')
313
317
  this.setAriaStatus(this.errorMessage)
314
318
  }
@@ -363,7 +367,7 @@ export class AutosuggestUi {
363
367
  content = this.ariaNResults.replace('{n}', this.numberOfResults)
364
368
  }
365
369
  }
366
- this.ariaStatus.innerHTML = content
370
+ this.ariaStatus.textContent = content
367
371
  }
368
372
 
369
373
  emboldenMatch(string, query) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ministryofjustice/hmpps-connect-dps-shared-items",
3
- "version": "4.1.1",
3
+ "version": "4.2.1",
4
4
  "description": "A package to share Connect DPS functionality across applications",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.esm.js",
@@ -57,23 +57,26 @@
57
57
  "@rollup/plugin-typescript": "^12.3.0",
58
58
  "@tsconfig/node24": "24.0.4",
59
59
  "@types/jest": "^30.0.0",
60
- "@types/superagent": "^8.1.10",
61
- "govuk-frontend": "6.2.0",
60
+ "@types/superagent": "^8.1.11",
61
+ "govuk-frontend": "6.4.0",
62
62
  "jest": "^30.4.2",
63
63
  "jest-html-reporter": "^4.4.0",
64
64
  "jest-junit": "^17.0.0",
65
- "lint-staged": "^17.0.7",
66
- "nock": "14.0.15",
67
- "rollup": "4.61.0",
65
+ "lint-staged": "^17.2.0",
66
+ "nock": "14.0.16",
67
+ "rollup": "4.62.3",
68
68
  "rollup-plugin-dts": "6.4.1",
69
- "ts-jest": "29.4.11",
69
+ "ts-jest": "29.4.12",
70
70
  "tslib": "^2.8.1",
71
71
  "typescript": "6.0.3"
72
72
  },
73
73
  "dependencies": {
74
- "@ministryofjustice/hmpps-rest-client": "2.1.0",
74
+ "@ministryofjustice/hmpps-rest-client": "2.2.0",
75
75
  "@types/bunyan": "^1.8.11",
76
- "fuse.js": "7.4.1",
76
+ "fuse.js": "7.5.0",
77
77
  "superagent": "10.3.0"
78
+ },
79
+ "overrides": {
80
+ "brace-expansion": "5.0.9"
78
81
  }
79
82
  }