@ministryofjustice/hmpps-connect-dps-shared-items 4.3.1 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -6
- package/dist/assets/dps/components/address-autosuggest/_address-autosuggest.scss +9 -10
- package/dist/assets/dps/components/address-autosuggest/abortable-fetch.js +40 -46
- package/dist/assets/dps/components/address-autosuggest/autosuggest-address.js +74 -85
- package/dist/assets/dps/components/address-autosuggest/autosuggest-ui.js +343 -383
- package/dist/assets/dps/components/address-autosuggest/index.js +9 -8
- package/dist/assets/dps/components/alert-flag/_alert-flag.scss +5 -4
- package/dist/assets/dps/components/alert-flag/macro.njk +1 -1
- package/dist/assets/dps/components/modal/_index.scss +148 -0
- package/dist/assets/dps/components/modal/index.js +171 -0
- package/dist/assets/dps/components/modal/index.ts +203 -0
- package/dist/assets/dps/components/modal/macro.njk +48 -0
- package/dist/assets/dps/components/webcam-capture/_webcam-capture.scss +11 -10
- package/dist/assets/dps/components/webcam-capture/index.js +126 -149
- package/dist/assets/dps/components/webcam-capture/macro.njk +10 -26
- package/dist/assets/js/all.js +10 -5
- package/dist/assets/scss/all.css +844 -0
- package/dist/assets/scss/all.scss +4 -3
- package/dist/index.cjs +10 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +10 -0
- package/dist/index.esm.js.map +1 -1
- package/package.json +18 -7
- package/dist/assets/dps/components/_common.scss +0 -21
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
@
|
|
2
|
-
@
|
|
1
|
+
@use "govuk-frontend/dist/govuk/helpers/colour";
|
|
2
|
+
@use "govuk-frontend/dist/govuk/helpers/spacing";
|
|
3
3
|
|
|
4
4
|
$hmpps-webcam-capture-width: 221px;
|
|
5
5
|
$hmpps-webcam-capture-height: 276px;
|
|
@@ -7,21 +7,21 @@ $hmpps-webcam-capture-height: 276px;
|
|
|
7
7
|
.hmpps-webcam-capture {
|
|
8
8
|
.hmpps-webcam-capture-photo-container {
|
|
9
9
|
width: 100%;
|
|
10
|
-
@include govuk-responsive-padding(2);
|
|
11
|
-
@include govuk-responsive-margin(6, 'bottom');
|
|
10
|
+
@include spacing.govuk-responsive-padding(2);
|
|
11
|
+
@include spacing.govuk-responsive-margin(6, 'bottom');
|
|
12
12
|
|
|
13
13
|
&__with-border {
|
|
14
|
-
border: 1px solid
|
|
14
|
+
border: 1px solid colour.govuk-functional-colour(border);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
&__error {
|
|
18
|
-
border: 5px solid
|
|
18
|
+
border: 5px solid #eb611cff;
|
|
19
19
|
|
|
20
20
|
.hmpps-webcam-error-icon {
|
|
21
21
|
display: block;
|
|
22
22
|
width: 1.875rem;
|
|
23
23
|
height: 1.875rem;
|
|
24
|
-
color:
|
|
24
|
+
color: #eb611cff;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
|
|
@@ -42,14 +42,14 @@ $hmpps-webcam-capture-height: 276px;
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
&__description {
|
|
45
|
-
@include govuk-responsive-padding(2, 'top');
|
|
45
|
+
@include spacing.govuk-responsive-padding(2, 'top');
|
|
46
46
|
display: flex;
|
|
47
47
|
gap: 10px;
|
|
48
48
|
margin-left: 24px;
|
|
49
49
|
min-width: 0;
|
|
50
50
|
|
|
51
51
|
h2 {
|
|
52
|
-
@include govuk-responsive-margin(3, 'bottom');
|
|
52
|
+
@include spacing.govuk-responsive-margin(3, 'bottom');
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
}
|
|
@@ -77,6 +77,7 @@ $hmpps-webcam-capture-height: 276px;
|
|
|
77
77
|
gap: 5px;
|
|
78
78
|
justify-content: center;
|
|
79
79
|
font-size: 16px;
|
|
80
|
+
color: colour.govuk-colour("black");
|
|
80
81
|
|
|
81
82
|
img {
|
|
82
83
|
width: auto;
|
|
@@ -102,6 +103,7 @@ $hmpps-webcam-capture-height: 276px;
|
|
|
102
103
|
align-items: center;
|
|
103
104
|
background-color: #505a5f;
|
|
104
105
|
border: 2px solid #333;
|
|
106
|
+
color: colour.govuk-colour("white");
|
|
105
107
|
display: flex;
|
|
106
108
|
height: 276px;
|
|
107
109
|
justify-content: center;
|
|
@@ -122,4 +124,3 @@ $hmpps-webcam-capture-height: 276px;
|
|
|
122
124
|
display: none;
|
|
123
125
|
}
|
|
124
126
|
}
|
|
125
|
-
|
|
@@ -1,157 +1,134 @@
|
|
|
1
1
|
function hmppsWebcamCapture(component) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
if (videoDevices.length < 2) {
|
|
55
|
-
webcamSelectFormGroup.style.display = 'none'
|
|
2
|
+
const video = document.getElementById('hmpps-webcam__webcam');
|
|
3
|
+
const captureBtn = document.getElementById('hmpps-webcam__captureImageButton');
|
|
4
|
+
const clearImageBtn = document.getElementById('hmpps-webcam__clearImageButton');
|
|
5
|
+
const snapshot = document.getElementById('hmpps-webcam__snapshot');
|
|
6
|
+
const webcamImageFileInput = document.getElementById('hmpps-webcam__webcam-image-input');
|
|
7
|
+
const webcamSelect = document.getElementById('hmpps-webcam__select-webcam');
|
|
8
|
+
const webcamSelectFormGroup = document.getElementById('hmpps-webcam__webcam-select-form-group');
|
|
9
|
+
const webcamSubmit = document.getElementById('hmpps-webcam__webcam-submit');
|
|
10
|
+
const webcamPlaceholder = document.getElementById('hmpps-webcam__webcam-placeholder');
|
|
11
|
+
const fileName = component.dataset.fileName ?? 'webcam-capture';
|
|
12
|
+
const enableReporting = component.dataset.reportErrors === 'true';
|
|
13
|
+
// Permissions
|
|
14
|
+
const permissionRequested = document.getElementById('hmpps-webcam__permission-requested');
|
|
15
|
+
const permissionGranted = document.getElementById('hmpps-webcam__permission-granted');
|
|
16
|
+
const webcamError = document.getElementById('hmpps-webcam__webcam-error');
|
|
17
|
+
// Preview elements
|
|
18
|
+
const photoPreviewContainer = document.getElementById('hmpps-webcam__photo-preview-container');
|
|
19
|
+
const photoCaptureContainer = document.getElementById('hmpps-webcam__photo-capture-container');
|
|
20
|
+
const photoCaptureErrorContainer = document.getElementById('hmpps-webcam__photo-capture-container__error');
|
|
21
|
+
const mimetype = 'image/jpeg';
|
|
22
|
+
let stream = null;
|
|
23
|
+
function updateWebcamList({ activeDeviceId }) {
|
|
24
|
+
webcamSelect.querySelectorAll('option').forEach(option => {
|
|
25
|
+
if (option.value === activeDeviceId && option.label.indexOf('- Active') === -1) {
|
|
26
|
+
option.label = `${option.label} - Active`;
|
|
27
|
+
}
|
|
28
|
+
else if (option.value !== activeDeviceId && option.label.indexOf('- Active') > -1) {
|
|
29
|
+
option.label = option.label.replace(' - Active', '');
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
async function getWebcamList() {
|
|
34
|
+
// get camera permissions
|
|
35
|
+
try {
|
|
36
|
+
permissionRequested.style.display = 'block';
|
|
37
|
+
await navigator.mediaDevices.getUserMedia({ video: true, audio: false });
|
|
38
|
+
navigator.mediaDevices.enumerateDevices().then(devices => {
|
|
39
|
+
const videoDevices = devices.filter(device => device.kind === 'videoinput');
|
|
40
|
+
videoDevices.forEach((device, index) => {
|
|
41
|
+
const option = document.createElement('option');
|
|
42
|
+
option.value = device.deviceId;
|
|
43
|
+
option.text = device.label || `Camera ${index + 1}`;
|
|
44
|
+
webcamSelect.appendChild(option);
|
|
45
|
+
});
|
|
46
|
+
if (videoDevices.length < 2) {
|
|
47
|
+
webcamSelectFormGroup.style.display = 'none';
|
|
48
|
+
}
|
|
49
|
+
if (videoDevices.length > 0) {
|
|
50
|
+
startWebcam(videoDevices[0].deviceId);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
56
53
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
54
|
+
catch (e) {
|
|
55
|
+
photoCaptureContainer.style.display = 'none';
|
|
56
|
+
photoCaptureErrorContainer.style.display = 'block';
|
|
57
|
+
if (enableReporting) {
|
|
58
|
+
await fetch(`/api/report-error?pageUrl=${encodeURIComponent(location.href)}&error=${e.name}`, {
|
|
59
|
+
method: 'GET',
|
|
60
|
+
});
|
|
61
|
+
}
|
|
60
62
|
}
|
|
61
|
-
})
|
|
62
|
-
} catch (e) {
|
|
63
|
-
photoCaptureContainer.style.display = 'none'
|
|
64
|
-
photoCaptureErrorContainer.style.display = 'block'
|
|
65
|
-
if (enableReporting) {
|
|
66
|
-
await fetch(`/api/report-error?pageUrl=${encodeURIComponent(location.href)}&error=${e.name}`, {
|
|
67
|
-
method: 'GET',
|
|
68
|
-
})
|
|
69
|
-
}
|
|
70
63
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
stream.getTracks().forEach(track => track.stop())
|
|
64
|
+
async function stopWebcam() {
|
|
65
|
+
if (stream) {
|
|
66
|
+
stream.getTracks().forEach(track => track.stop());
|
|
67
|
+
}
|
|
76
68
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
69
|
+
async function startWebcam(deviceId) {
|
|
70
|
+
try {
|
|
71
|
+
stopWebcam();
|
|
72
|
+
stream = await navigator.mediaDevices.getUserMedia({
|
|
73
|
+
video: {
|
|
74
|
+
deviceId: { exact: deviceId },
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
video.srcObject = stream;
|
|
78
|
+
permissionRequested.style.display = 'none';
|
|
79
|
+
permissionGranted.style.display = 'block';
|
|
80
|
+
webcamPlaceholder.style.display = 'none';
|
|
81
|
+
video.style.display = 'block';
|
|
82
|
+
captureBtn.disabled = false;
|
|
83
|
+
updateWebcamList({ activeDeviceId: deviceId });
|
|
84
|
+
}
|
|
85
|
+
catch (error) {
|
|
86
|
+
permissionRequested.style.display = 'none';
|
|
87
|
+
webcamError.style.display = 'block';
|
|
88
|
+
console.error('Webcam error:', error);
|
|
89
|
+
}
|
|
98
90
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
mimetype,
|
|
135
|
-
0.92,
|
|
136
|
-
)
|
|
137
|
-
|
|
138
|
-
photoPreviewContainer.style.display = 'block'
|
|
139
|
-
photoCaptureContainer.style.display = 'none'
|
|
140
|
-
webcamSubmit.disabled = false
|
|
141
|
-
})
|
|
142
|
-
|
|
143
|
-
function pageInit() {
|
|
144
|
-
photoPreviewContainer.style.display = 'none'
|
|
145
|
-
photoCaptureContainer.style.display = 'block'
|
|
146
|
-
getWebcamList()
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
pageInit()
|
|
91
|
+
webcamSelect.addEventListener('change', () => {
|
|
92
|
+
startWebcam(webcamSelect.value);
|
|
93
|
+
});
|
|
94
|
+
clearImageBtn.addEventListener('click', () => {
|
|
95
|
+
snapshot.src = '';
|
|
96
|
+
photoPreviewContainer.style.display = 'none';
|
|
97
|
+
photoCaptureContainer.style.display = 'block';
|
|
98
|
+
webcamSubmit.disabled = true;
|
|
99
|
+
});
|
|
100
|
+
captureBtn.addEventListener('click', () => {
|
|
101
|
+
const canvas = document.createElement('canvas');
|
|
102
|
+
canvas.width = video.videoWidth;
|
|
103
|
+
canvas.height = video.videoHeight;
|
|
104
|
+
const ctx = canvas.getContext('2d');
|
|
105
|
+
ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
|
|
106
|
+
const imageDataUrl = canvas.toDataURL(mimetype);
|
|
107
|
+
snapshot.src = imageDataUrl;
|
|
108
|
+
canvas.toBlob(blob => {
|
|
109
|
+
if (!blob)
|
|
110
|
+
return;
|
|
111
|
+
const file = new File([blob], `${fileName}.jpg`, { type: mimetype });
|
|
112
|
+
const dataTransfer = new DataTransfer();
|
|
113
|
+
dataTransfer.items.add(file);
|
|
114
|
+
webcamImageFileInput.files = dataTransfer.files;
|
|
115
|
+
}, mimetype, 0.92);
|
|
116
|
+
photoPreviewContainer.style.display = 'block';
|
|
117
|
+
photoCaptureContainer.style.display = 'none';
|
|
118
|
+
webcamSubmit.disabled = false;
|
|
119
|
+
});
|
|
120
|
+
function pageInit() {
|
|
121
|
+
photoPreviewContainer.style.display = 'none';
|
|
122
|
+
photoCaptureContainer.style.display = 'block';
|
|
123
|
+
return getWebcamList();
|
|
124
|
+
}
|
|
125
|
+
return pageInit();
|
|
150
126
|
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
}
|
|
127
|
+
function init() {
|
|
128
|
+
const webcamContainer = document.getElementById('hmpps-webcam-capture-component');
|
|
129
|
+
if (webcamContainer) {
|
|
130
|
+
hmppsWebcamCapture(webcamContainer);
|
|
131
|
+
}
|
|
157
132
|
}
|
|
133
|
+
|
|
134
|
+
export { init };
|
|
@@ -3,14 +3,20 @@
|
|
|
3
3
|
|
|
4
4
|
{% macro cameraSvg() %}
|
|
5
5
|
<svg width="24" height="18" viewBox="0 0 24 18" xmlns="http://www.w3.org/2000/svg">
|
|
6
|
-
<path fill
|
|
7
|
-
<path fill
|
|
6
|
+
<path fill="currentColor" d="M12.935 4.843c2.686.135 4.822 2.345 4.822 5.05l-.007.26c-.136 2.67-2.356 4.795-5.076 4.795l-.262-.007c-2.6-.13-4.684-2.203-4.815-4.789l-.007-.26c0-2.792 2.276-5.056 5.084-5.056zm-.261 1.493c-1.975 0-3.576 1.593-3.576 3.557s1.601 3.555 3.576 3.555c1.974 0 3.575-1.592 3.575-3.555s-1.6-3.557-3.575-3.557"/>
|
|
7
|
+
<path fill="currentColor" d="M15.267.193a2.26 2.26 0 0 1 1.905 1.343l.426.97h4.116a2.257 2.257 0 0 1 2.263 2.25v10.753l-.012.23a2.26 2.26 0 0 1-2.019 2.008l-.232.012H3.24a2.26 2.26 0 0 1-2.25-2.02l-.012-.23V4.756a2.256 2.256 0 0 1 2.262-2.25h4.115l.426-.97A2.26 2.26 0 0 1 9.854.188h5.245zM9.854 1.688c-.3 0-.571.177-.691.45l-.624 1.419a.76.76 0 0 1-.691.449h-4.61a.75.75 0 0 0-.753.75v10.753l.004.076c.038.378.36.674.75.674h18.475l.077-.004a.75.75 0 0 0 .673-.67l.004-.076V4.756a.75.75 0 0 0-.677-.746l-.077-.004h-4.61a.76.76 0 0 1-.691-.45l-.623-1.418a.75.75 0 0 0-.58-.443l-.11-.008z"/>
|
|
8
8
|
</svg>
|
|
9
9
|
{% endmacro %}
|
|
10
10
|
|
|
11
11
|
{% macro noCameraSvg() %}
|
|
12
12
|
<svg width="69" height="47" viewBox="0 0 69 47" xmlns="http://www.w3.org/2000/svg">
|
|
13
|
-
<path d="M41.
|
|
13
|
+
<path fill="currentColor" d="M41.9.016a5.87 5.87 0 0 1 4.941 3.5l1.106 2.529H58.62a5.85 5.85 0 0 1 4.231 1.806l2.877-1.66a1.956 1.956 0 1 1 1.955 3.388l-3.217 1.856q.02.236.022.477v28.039l-.03.601a5.87 5.87 0 0 1-5.236 5.236l-.602.03H10.707a5.84 5.84 0 0 1-3.641-1.268l-3.791 2.188A1.956 1.956 0 0 1 1.32 43.35l3.663-2.114a6 6 0 0 1-.112-.684l-.03-.601V11.912a5.87 5.87 0 0 1 5.866-5.867h10.672l1.105-2.528A5.87 5.87 0 0 1 27.862 0h13.604Zm5.779 21.103c.44 1.316.68 2.724.68 4.188l-.019.677c-.353 6.966-6.112 12.505-13.165 12.506l-.68-.018a13.15 13.15 0 0 1-9.2-4.44L11.65 41.908H58.62l.2-.01a1.96 1.96 0 0 0 1.747-1.747l.01-.2V13.68ZM27.862 3.911a1.96 1.96 0 0 0-1.793 1.174l-1.616 3.7a1.96 1.96 0 0 1-1.793 1.171H10.707c-1.08 0-1.955.876-1.955 1.956v27.15l14.41-8.314a13.1 13.1 0 0 1-1.154-4.764l-.018-.677c0-7.281 5.904-13.186 13.185-13.186l.678.018a13.17 13.17 0 0 1 10.043 5.493l13.2-7.615a2 2 0 0 0-.276-.05l-.2-.01H46.665c-.777 0-1.481-.46-1.793-1.172l-1.616-3.7a1.96 1.96 0 0 0-1.503-1.153l-.287-.02zm.922 28.109a9.24 9.24 0 0 0 6.39 2.559 9.273 9.273 0 0 0 9.015-11.446zm6.39-15.988c-5.12 0-9.273 4.154-9.273 9.275 0 1.228.241 2.4.675 3.472l15.906-9.177a9.25 9.25 0 0 0-7.307-3.57"/>
|
|
14
|
+
</svg>
|
|
15
|
+
{% endmacro %}
|
|
16
|
+
|
|
17
|
+
{% macro webcamError() %}
|
|
18
|
+
<svg class="hmpps-webcam-error-icon" width="30" height="30" viewBox="0 0 30 30" role="presentation" focusable="false" xmlns="http://www.w3.org/2000/svg">
|
|
19
|
+
<path fill="currentColor" d="M15 2.449 1.25 26.199h27.5ZM13.51 9.496h2.959l-.227 8.271h-2.496ZM15 19.947a1 1 0 0 1-.001 3.746A1 1 0 0 1 15 19.947Z"/>
|
|
14
20
|
</svg>
|
|
15
21
|
{% endmacro %}
|
|
16
22
|
|
|
@@ -119,27 +125,7 @@
|
|
|
119
125
|
</div>
|
|
120
126
|
<div class="hmpps-webcam-capture-photo-container__description">
|
|
121
127
|
<div>
|
|
122
|
-
|
|
123
|
-
class="hmpps-webcam-error-icon"
|
|
124
|
-
role="presentation"
|
|
125
|
-
focusable="false"
|
|
126
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
127
|
-
viewBox="0 0 30 30"
|
|
128
|
-
height="30"
|
|
129
|
-
width="30">
|
|
130
|
-
<path
|
|
131
|
-
fill-rule="evenodd"
|
|
132
|
-
clip-rule="evenodd"
|
|
133
|
-
d="M15 2.44922L28.75 26.1992H1.25L15 2.44922ZM13.5107 9.49579H16.4697L16.2431 17.7678H13.7461L13.5107 9.49579ZM13.1299
|
|
134
|
-
21.82C13.1299 21.5661 13.1787 21.3285 13.2764 21.1071C13.374 20.8793 13.5075 20.6807 13.6768 20.5114C13.8525 20.3421
|
|
135
|
-
14.0544 20.2087 14.2822 20.111C14.5101 20.0134 14.7542 19.9645 15.0146 19.9645C15.2686 19.9645 15.5062 20.0134 15.7275
|
|
136
|
-
20.111C15.9554 20.2087 16.154 20.3421 16.3232 20.5114C16.4925 20.6807 16.626 20.8793 16.7236 21.1071C16.8213 21.3285
|
|
137
|
-
16.8701 21.5661 16.8701 21.82C16.8701 22.0804 16.8213 22.3246 16.7236 22.5524C16.626 22.7803 16.4925 22.9789 16.3232
|
|
138
|
-
23.1481C16.154 23.3174 15.9554 23.4509 15.7275 23.5485C15.5062 23.6462 15.2686 23.695 15.0146 23.695C14.7542 23.695
|
|
139
|
-
14.5101 23.6462 14.2822 23.5485C14.0544 23.4509 13.8525 23.3174 13.6768 23.1481C13.5075 22.9789 13.374 22.7803 13.2764
|
|
140
|
-
22.5524C13.1787 22.3246 13.1299 22.0804 13.1299 21.82Z"
|
|
141
|
-
fill="currentColor"/>
|
|
142
|
-
</svg>
|
|
128
|
+
{{ webcamError() }}
|
|
143
129
|
</div>
|
|
144
130
|
<div>
|
|
145
131
|
<h2 class="govuk-heading-m">
|
|
@@ -182,5 +168,3 @@
|
|
|
182
168
|
</div>
|
|
183
169
|
</div>
|
|
184
170
|
{% endmacro %}
|
|
185
|
-
|
|
186
|
-
|
package/dist/assets/js/all.js
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { init } from '../dps/components/address-autosuggest/index.js';
|
|
2
|
+
import { Modal } from '../dps/components/modal/index.js';
|
|
3
|
+
import { init as init$1 } from '../dps/components/webcam-capture/index.js';
|
|
3
4
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
// eslint-disable-next-line import/prefer-default-export
|
|
6
|
+
function initAll() {
|
|
7
|
+
init();
|
|
8
|
+
Modal.init();
|
|
9
|
+
init$1();
|
|
7
10
|
}
|
|
11
|
+
|
|
12
|
+
export { initAll };
|