@ministryofjustice/hmpps-connect-dps-shared-items 4.2.0 → 4.2.2
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 =
|
|
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.
|
|
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.
|
|
370
|
+
this.ariaStatus.textContent = content
|
|
367
371
|
}
|
|
368
372
|
|
|
369
373
|
emboldenMatch(string, query) {
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
class="hmpps-address-autosuggest__instructions hmpps-js-autosuggest-instructions govuk-visually-hidden"
|
|
45
45
|
id="address-autosuggest-instructions"
|
|
46
46
|
tabindex="-1">
|
|
47
|
-
Use up and down keys to navigate suggestions once you have typed
|
|
47
|
+
Use up and down keys to navigate suggestions once you have typed three or more characters. Use the enter key to select a
|
|
48
48
|
suggestion. Touch device users, explore by touch or with swipe gestures.
|
|
49
49
|
</div>
|
|
50
50
|
<div
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ministryofjustice/hmpps-connect-dps-shared-items",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.2",
|
|
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.
|
|
61
|
-
"govuk-frontend": "6.
|
|
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
|
|
65
|
+
"lint-staged": "^17.2.0",
|
|
66
66
|
"nock": "14.0.16",
|
|
67
|
-
"rollup": "4.62.
|
|
67
|
+
"rollup": "4.62.3",
|
|
68
68
|
"rollup-plugin-dts": "6.4.1",
|
|
69
|
-
"ts-jest": "29.4.
|
|
69
|
+
"ts-jest": "29.4.12",
|
|
70
70
|
"tslib": "^2.8.1",
|
|
71
71
|
"typescript": "6.0.3"
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
74
|
"@ministryofjustice/hmpps-rest-client": "2.2.0",
|
|
75
75
|
"@types/bunyan": "^1.8.11",
|
|
76
|
-
"fuse.js": "7.
|
|
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
|
}
|