@smileid/web-components 2.0.1 → 2.0.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.
Files changed (61) hide show
  1. package/package.json +58 -58
  2. package/src/components/README.md +14 -14
  3. package/src/components/attribution/PoweredBySmileId.js +42 -42
  4. package/src/components/camera-permission/CameraPermission.js +140 -140
  5. package/src/components/camera-permission/CameraPermission.stories.js +27 -27
  6. package/src/components/combobox/src/Combobox.js +589 -589
  7. package/src/components/combobox/src/index.js +1 -1
  8. package/src/components/document/src/DocumentCaptureScreens.js +409 -409
  9. package/src/components/document/src/DocumentCaptureScreens.stories.js +57 -57
  10. package/src/components/document/src/README.md +111 -111
  11. package/src/components/document/src/document-capture/DocumentCapture.js +760 -760
  12. package/src/components/document/src/document-capture/DocumentCapture.stories.js +78 -78
  13. package/src/components/document/src/document-capture/README.md +90 -90
  14. package/src/components/document/src/document-capture/index.js +3 -3
  15. package/src/components/document/src/document-capture-instructions/DocumentCaptureInstructions.js +499 -499
  16. package/src/components/document/src/document-capture-instructions/DocumentCaptureInstructions.stories.js +24 -24
  17. package/src/components/document/src/document-capture-instructions/README.md +56 -56
  18. package/src/components/document/src/document-capture-instructions/index.js +3 -3
  19. package/src/components/document/src/document-capture-review/DocumentCaptureReview.js +362 -362
  20. package/src/components/document/src/document-capture-review/DocumentCaptureReview.stories.js +24 -24
  21. package/src/components/document/src/document-capture-review/README.md +79 -79
  22. package/src/components/document/src/document-capture-review/index.js +3 -3
  23. package/src/components/document/src/index.js +3 -3
  24. package/src/components/end-user-consent/src/EndUserConsent.js +795 -795
  25. package/src/components/end-user-consent/src/EndUserConsent.stories.js +29 -29
  26. package/src/components/end-user-consent/src/index.js +4 -4
  27. package/src/components/navigation/src/Navigation.js +171 -171
  28. package/src/components/navigation/src/Navigation.stories.js +24 -24
  29. package/src/components/navigation/src/index.js +3 -3
  30. package/src/components/selfie/README.md +225 -225
  31. package/src/components/selfie/src/SelfieCaptureScreens.js +282 -282
  32. package/src/components/selfie/src/SelfieCaptureScreens.stories.js +29 -29
  33. package/src/components/selfie/src/index.js +5 -5
  34. package/src/components/selfie/src/selfie-capture/SelfieCapture.js +1041 -1010
  35. package/src/components/selfie/src/selfie-capture/SelfieCapture.stories.js +36 -36
  36. package/src/components/selfie/src/selfie-capture/index.js +3 -3
  37. package/src/components/selfie/src/selfie-capture-instructions/SelfieCaptureInstructions.js +657 -648
  38. package/src/components/selfie/src/selfie-capture-instructions/SelfieCaptureInstructions.stories.js +23 -23
  39. package/src/components/selfie/src/selfie-capture-instructions/index.js +3 -3
  40. package/src/components/selfie/src/selfie-capture-review/SelfieCaptureReview.js +347 -347
  41. package/src/components/selfie/src/selfie-capture-review/SelfieCaptureReview.stories.js +24 -24
  42. package/src/components/selfie/src/selfie-capture-review/index.js +3 -3
  43. package/src/components/signature-pad/package-lock.json +3009 -3009
  44. package/src/components/signature-pad/package.json +30 -30
  45. package/src/components/signature-pad/src/SignaturePad.js +484 -484
  46. package/src/components/signature-pad/src/SignaturePad.stories.js +32 -32
  47. package/src/components/signature-pad/src/index.js +3 -3
  48. package/src/components/smart-camera-web/src/README.md +207 -207
  49. package/src/components/smart-camera-web/src/SmartCameraWeb.js +299 -299
  50. package/src/components/smart-camera-web/src/SmartCameraWeb.stories.js +57 -57
  51. package/src/components/totp-consent/src/TotpConsent.js +949 -949
  52. package/src/components/totp-consent/src/index.js +4 -4
  53. package/src/domain/camera/src/README.md +38 -38
  54. package/src/domain/camera/src/SmartCamera.js +109 -109
  55. package/src/domain/constants/src/Constants.js +27 -27
  56. package/src/domain/file-upload/README.md +35 -35
  57. package/src/domain/file-upload/src/SmartFileUpload.js +65 -65
  58. package/src/index.js +5 -5
  59. package/src/styles/README.md +3 -3
  60. package/src/styles/src/styles.js +359 -359
  61. package/src/styles/src/typography.js +52 -52
@@ -1,347 +1,347 @@
1
- import styles from '../../../../styles/src/styles';
2
- import '../../../navigation/src';
3
-
4
- function templateString() {
5
- return `
6
- <style>
7
- .retake-photo.button[data-variant~="ghost"] {
8
- color: #FF5805;
9
- }
10
- .icon-btn {
11
- appearance: none;
12
- background: none;
13
- border: none;
14
- color: hsl(0deg 0% 94%);
15
- cursor: pointer;
16
- display: flex;
17
- align-items: center;
18
- justify-content: center;
19
- padding: 4px 8px;
20
- }
21
- .justify-right {
22
- justify-content: end !important;
23
- }
24
- .nav {
25
- display: flex;
26
- justify-content: space-between;
27
- }
28
- .back-wrapper {
29
- display: flex;
30
- align-items: center;
31
- }
32
- .back-button-text {
33
- font-size: 11px;
34
- line-height: 11px;
35
- color: rgb(21, 31, 114);
36
- }
37
- .section {
38
- border-radius: .5rem;
39
- margin-left: auto;
40
- margin-right: auto;
41
- max-width: 35ch;
42
- padding: 1rem;
43
- }
44
- .selfie-capture-review-image {
45
- overflow: hidden;
46
- aspect-ratio: 1/1;
47
- }
48
- #review-image {
49
- scale: 1.75;
50
- }
51
- @media (max-aspect-ratio: 1/1) {
52
- #review-image {
53
- transform: scaleX(-1) translateY(-10%);
54
- }
55
- }
56
- .tips,
57
- .powered-by {
58
- align-items: center;
59
- border-radius: 0.25rem;
60
- color: #4e6577;
61
- display: flex;
62
- justify-content: center;
63
- letter-spacing: 0.075em;
64
- }
65
- .powered-by {
66
- box-shadow: 0px 2.57415px 2.57415px rgba(0, 0, 0, 0.06);
67
- display: inline-flex;
68
- font-size: 0.5rem;
69
- }
70
- .tips {
71
- margin-left: auto;
72
- margin-right: auto;
73
- max-width: 17rem;
74
- }
75
- .tips > * + *,
76
- .powered-by > * + * {
77
- display: inline-block;
78
- margin-left: 0.5em;
79
- }
80
- .powered-by .company {
81
- color: #18406d;
82
- font-weight: 700;
83
- letter-spacing: 0.15rem;
84
- }
85
- .logo-mark {
86
- background-color: #004071;
87
- display: inline-block;
88
- padding: 0.25em 0.5em;
89
- }
90
- .logo-mark svg {
91
- height: auto;
92
- justify-self: center;
93
- width: 0.75em;
94
- }
95
- #selfie-capture-review-screen {
96
- block-size: 45rem;
97
- padding-block: 2rem;
98
- display: flex;
99
- flex-direction: column;
100
- max-block-size: 100%;
101
- max-inline-size: 40ch;
102
- }
103
- #selfie-capture-review-screen .selfie-review-container.landscape {
104
- height: auto;
105
- }
106
- #selfie-capture-review-screen header p {
107
- margin-block: 0 !important;
108
- }
109
- .selfie-review-container.portrait {
110
- width: 100%;
111
- position: relative;
112
- height: calc(200px * 1.4);
113
- }
114
-
115
- .selfie-review-container.portrait img {
116
- width: calc(213px + 0.9rem);
117
- height: 100%;
118
- position: absolute;
119
- top: 239px;
120
- left: 161px;
121
- padding-bottom: calc((214px * 1.4) / 3);
122
- padding-top: calc((191px * 1.4) / 3);
123
- object-fit: cover;
124
-
125
- transform: translateX(-50%) translateY(-50%);
126
- z-index: 1;
127
- block-size: 100%;
128
- }
129
-
130
- .selfie-container,
131
- .selfie-review-container.landscape {
132
- height: auto;
133
- clip-path: inset(15% 20% 20% 20% round 10px);
134
- overflow: hidden;
135
- }
136
-
137
- .selfie-container img {
138
- background-color: black;
139
- position: absolute;
140
- left: 50%;
141
- height: calc(100% - 6px);
142
- clip-path: ellipse(101px 118px);
143
- }
144
-
145
- .description {
146
- color: var(--neutral-off-black, #2D2B2A);
147
- text-align: center;
148
- /* p */
149
- font-family: DM Sans;
150
- font-size: 0.875rem;
151
- font-style: normal;
152
- font-weight: 400;
153
- line-height: 18px;
154
- }
155
- .padding-bottom-2 {
156
- padding-bottom: 2rem;
157
- }
158
- .instructions-wrapper {
159
- display: inline-flex;
160
- flex-direction: column;
161
- align-items: flex-start;
162
- gap: 2rem;
163
- margin-block-start: 2rem;
164
- margin-block-end: 4rem;
165
- }
166
- .instructions {
167
- display: flex;
168
- align-items: center;
169
- text-align: initial;
170
- }
171
- .instructions svg {
172
- flex-shrink: 0;
173
- margin-inline-end: 2rem;
174
- }
175
- .instructions p {
176
- margin-block: 0;
177
- }
178
- .instruction-body {
179
- font-size: 0.75rem;
180
- }
181
- h1 {
182
- color: var(--web-digital-blue, #001096);
183
- text-align: center;
184
- /* h1 */
185
- font-size: 1.5rem;
186
- font-style: normal;
187
- font-weight: 700;
188
- line-height: 36px; /* 150% */
189
- }
190
- .p2 {
191
- font-size: 1rem;
192
- font-style: normal;
193
- font-weight: 500;
194
- line-height: 1rem;
195
- }
196
- .instruction-header {
197
- color: var(--web-digital-blue, #001096);
198
- }
199
- .h2 {
200
- font-size: 1rem;
201
- font-style: normal;
202
- font-weight: 700;
203
- line-height: 1.5rem;
204
- }
205
- </style>
206
- ${styles(this.themeColor)}
207
- <div id='selfie-capture-review-screen' class='flow center'>
208
- <smileid-navigation ${this.showNavigation ? 'show-navigation' : ''} hide-back></smileid-navigation>
209
- <h1 class="header-title text-2xl title-color font-bold">
210
- Is your whole face visible and clear in this photo?
211
- </h1>
212
- <div class='section | flow'>
213
- <div class='selfie-review-container ${this.isPortraitCaptureView ? 'portrait' : 'landscape'}'>
214
- ${
215
- this.imageSrc
216
- ? `<img
217
- alt='your ID card'
218
- id='document-capture-review-image'
219
- src='${this.imageSrc}'
220
- width='396'
221
- />`
222
- : ''
223
- }
224
- </div>
225
- <div class='flow action-buttons'>
226
- <button data-variant='solid full-width' class='button' type='button' id='select-id-image'>
227
- Yes, use this
228
- </button>
229
- <button data-variant='ghost full-width' class='button retake-photo' type='button' id='re-capture-image'>
230
- No, Retake Selfie
231
- </button>
232
- </div>
233
- ${
234
- this.hideAttribution
235
- ? ''
236
- : `
237
- <powered-by-smile-id></powered-by-smile-id>
238
- `
239
- }
240
- </div>
241
- </div>
242
- `;
243
- }
244
-
245
- class SelfieCaptureReview extends HTMLElement {
246
- constructor() {
247
- super();
248
- this.templateString = templateString.bind(this);
249
- this.render = () => this.templateString();
250
-
251
- this.attachShadow({ mode: 'open' });
252
- }
253
-
254
- connectedCallback() {
255
- const template = document.createElement('template');
256
- template.innerHTML = this.render();
257
- this.shadowRoot.innerHTML = '';
258
- this.shadowRoot.appendChild(template.content.cloneNode(true));
259
- this.setUpEventListeners();
260
- }
261
-
262
- static get observedAttributes() {
263
- return ['hide-back-to-host', 'show-navigation', 'data-image'];
264
- }
265
-
266
- get hideBack() {
267
- return this.hasAttribute('hide-back-to-host');
268
- }
269
-
270
- get showNavigation() {
271
- return this.hasAttribute('show-navigation');
272
- }
273
-
274
- get themeColor() {
275
- return this.getAttribute('theme-color') || '#001096';
276
- }
277
-
278
- get hideAttribution() {
279
- return this.hasAttribute('hide-attribution');
280
- }
281
-
282
- get imageSrc() {
283
- return this.getAttribute('data-image');
284
- }
285
-
286
- get title() {
287
- return this.getAttribute('title') || 'Submit Front of ID';
288
- }
289
-
290
- handleBackEvents() {
291
- this.dispatchEvent(new CustomEvent('selfie-capture-review.cancelled'));
292
- }
293
-
294
- handleCloseEvents() {
295
- this.dispatchEvent(new CustomEvent('selfie-capture-review.close'));
296
- }
297
-
298
- attributeChangedCallback(name) {
299
- switch (name) {
300
- case 'data-image':
301
- case 'hide-back-to-host':
302
- case 'show-navigation':
303
- this.shadowRoot.innerHTML = this.render();
304
- this.setUpEventListeners();
305
- break;
306
- default:
307
- break;
308
- }
309
- }
310
-
311
- setUpEventListeners() {
312
- this.selectImage = this.shadowRoot.querySelector('#select-id-image');
313
- this.reCaptureImage = this.shadowRoot.querySelector('#re-capture-image');
314
- this.navigation = this.shadowRoot.querySelector('smileid-navigation');
315
-
316
- this.navigation.addEventListener('navigation.back', () => {
317
- this.handleBackEvents();
318
- });
319
- this.navigation.addEventListener('navigation.close', () => {
320
- this.handleCloseEvents();
321
- });
322
-
323
- this.selectImage.addEventListener('click', () => {
324
- this.dispatchEvent(
325
- new CustomEvent('selfie-capture-review.accepted', {
326
- detail: {},
327
- }),
328
- );
329
- });
330
- this.reCaptureImage.addEventListener('click', () => {
331
- this.dispatchEvent(
332
- new CustomEvent('selfie-capture-review.rejected', {
333
- detail: {},
334
- }),
335
- );
336
- });
337
- }
338
- }
339
-
340
- if (
341
- 'customElements' in window &&
342
- !customElements.get('selfie-capture-review')
343
- ) {
344
- window.customElements.define('selfie-capture-review', SelfieCaptureReview);
345
- }
346
-
347
- export default SelfieCaptureReview;
1
+ import styles from '../../../../styles/src/styles';
2
+ import '../../../navigation/src';
3
+
4
+ function templateString() {
5
+ return `
6
+ <style>
7
+ .retake-photo.button[data-variant~="ghost"] {
8
+ color: #FF5805;
9
+ }
10
+ .icon-btn {
11
+ appearance: none;
12
+ background: none;
13
+ border: none;
14
+ color: hsl(0deg 0% 94%);
15
+ cursor: pointer;
16
+ display: flex;
17
+ align-items: center;
18
+ justify-content: center;
19
+ padding: 4px 8px;
20
+ }
21
+ .justify-right {
22
+ justify-content: end !important;
23
+ }
24
+ .nav {
25
+ display: flex;
26
+ justify-content: space-between;
27
+ }
28
+ .back-wrapper {
29
+ display: flex;
30
+ align-items: center;
31
+ }
32
+ .back-button-text {
33
+ font-size: 11px;
34
+ line-height: 11px;
35
+ color: rgb(21, 31, 114);
36
+ }
37
+ .section {
38
+ border-radius: .5rem;
39
+ margin-left: auto;
40
+ margin-right: auto;
41
+ max-width: 35ch;
42
+ padding: 1rem;
43
+ }
44
+ .selfie-capture-review-image {
45
+ overflow: hidden;
46
+ aspect-ratio: 1/1;
47
+ }
48
+ #review-image {
49
+ scale: 1.75;
50
+ }
51
+ @media (max-aspect-ratio: 1/1) {
52
+ #review-image {
53
+ transform: scaleX(-1) translateY(-10%);
54
+ }
55
+ }
56
+ .tips,
57
+ .powered-by {
58
+ align-items: center;
59
+ border-radius: 0.25rem;
60
+ color: #4e6577;
61
+ display: flex;
62
+ justify-content: center;
63
+ letter-spacing: 0.075em;
64
+ }
65
+ .powered-by {
66
+ box-shadow: 0px 2.57415px 2.57415px rgba(0, 0, 0, 0.06);
67
+ display: inline-flex;
68
+ font-size: 0.5rem;
69
+ }
70
+ .tips {
71
+ margin-left: auto;
72
+ margin-right: auto;
73
+ max-width: 17rem;
74
+ }
75
+ .tips > * + *,
76
+ .powered-by > * + * {
77
+ display: inline-block;
78
+ margin-left: 0.5em;
79
+ }
80
+ .powered-by .company {
81
+ color: #18406d;
82
+ font-weight: 700;
83
+ letter-spacing: 0.15rem;
84
+ }
85
+ .logo-mark {
86
+ background-color: #004071;
87
+ display: inline-block;
88
+ padding: 0.25em 0.5em;
89
+ }
90
+ .logo-mark svg {
91
+ height: auto;
92
+ justify-self: center;
93
+ width: 0.75em;
94
+ }
95
+ #selfie-capture-review-screen {
96
+ block-size: 45rem;
97
+ padding-block: 2rem;
98
+ display: flex;
99
+ flex-direction: column;
100
+ max-block-size: 100%;
101
+ max-inline-size: 40ch;
102
+ }
103
+ #selfie-capture-review-screen .selfie-review-container.landscape {
104
+ height: auto;
105
+ }
106
+ #selfie-capture-review-screen header p {
107
+ margin-block: 0 !important;
108
+ }
109
+ .selfie-review-container.portrait {
110
+ width: 100%;
111
+ position: relative;
112
+ height: calc(200px * 1.4);
113
+ }
114
+
115
+ .selfie-review-container.portrait img {
116
+ width: calc(213px + 0.9rem);
117
+ height: 100%;
118
+ position: absolute;
119
+ top: 239px;
120
+ left: 161px;
121
+ padding-bottom: calc((214px * 1.4) / 3);
122
+ padding-top: calc((191px * 1.4) / 3);
123
+ object-fit: cover;
124
+
125
+ transform: translateX(-50%) translateY(-50%);
126
+ z-index: 1;
127
+ block-size: 100%;
128
+ }
129
+
130
+ .selfie-container,
131
+ .selfie-review-container.landscape {
132
+ height: auto;
133
+ clip-path: inset(15% 20% 20% 20% round 10px);
134
+ overflow: hidden;
135
+ }
136
+
137
+ .selfie-container img {
138
+ background-color: black;
139
+ position: absolute;
140
+ left: 50%;
141
+ height: calc(100% - 6px);
142
+ clip-path: ellipse(101px 118px);
143
+ }
144
+
145
+ .description {
146
+ color: var(--neutral-off-black, #2D2B2A);
147
+ text-align: center;
148
+ /* p */
149
+ font-family: DM Sans;
150
+ font-size: 0.875rem;
151
+ font-style: normal;
152
+ font-weight: 400;
153
+ line-height: 18px;
154
+ }
155
+ .padding-bottom-2 {
156
+ padding-bottom: 2rem;
157
+ }
158
+ .instructions-wrapper {
159
+ display: inline-flex;
160
+ flex-direction: column;
161
+ align-items: flex-start;
162
+ gap: 2rem;
163
+ margin-block-start: 2rem;
164
+ margin-block-end: 4rem;
165
+ }
166
+ .instructions {
167
+ display: flex;
168
+ align-items: center;
169
+ text-align: initial;
170
+ }
171
+ .instructions svg {
172
+ flex-shrink: 0;
173
+ margin-inline-end: 2rem;
174
+ }
175
+ .instructions p {
176
+ margin-block: 0;
177
+ }
178
+ .instruction-body {
179
+ font-size: 0.75rem;
180
+ }
181
+ h1 {
182
+ color: var(--web-digital-blue, #001096);
183
+ text-align: center;
184
+ /* h1 */
185
+ font-size: 1.5rem;
186
+ font-style: normal;
187
+ font-weight: 700;
188
+ line-height: 36px; /* 150% */
189
+ }
190
+ .p2 {
191
+ font-size: 1rem;
192
+ font-style: normal;
193
+ font-weight: 500;
194
+ line-height: 1rem;
195
+ }
196
+ .instruction-header {
197
+ color: var(--web-digital-blue, #001096);
198
+ }
199
+ .h2 {
200
+ font-size: 1rem;
201
+ font-style: normal;
202
+ font-weight: 700;
203
+ line-height: 1.5rem;
204
+ }
205
+ </style>
206
+ ${styles(this.themeColor)}
207
+ <div id='selfie-capture-review-screen' class='flow center'>
208
+ <smileid-navigation ${this.showNavigation ? 'show-navigation' : ''} hide-back></smileid-navigation>
209
+ <h1 class="header-title text-2xl title-color font-bold">
210
+ Is your whole face visible and clear in this photo?
211
+ </h1>
212
+ <div class='section | flow'>
213
+ <div class='selfie-review-container ${this.isPortraitCaptureView ? 'portrait' : 'landscape'}'>
214
+ ${
215
+ this.imageSrc
216
+ ? `<img
217
+ alt='your ID card'
218
+ id='document-capture-review-image'
219
+ src='${this.imageSrc}'
220
+ width='396'
221
+ />`
222
+ : ''
223
+ }
224
+ </div>
225
+ <div class='flow action-buttons'>
226
+ <button data-variant='solid full-width' class='button' type='button' id='select-id-image'>
227
+ Yes, use this
228
+ </button>
229
+ <button data-variant='ghost full-width' class='button retake-photo' type='button' id='re-capture-image'>
230
+ No, Retake Selfie
231
+ </button>
232
+ </div>
233
+ ${
234
+ this.hideAttribution
235
+ ? ''
236
+ : `
237
+ <powered-by-smile-id></powered-by-smile-id>
238
+ `
239
+ }
240
+ </div>
241
+ </div>
242
+ `;
243
+ }
244
+
245
+ class SelfieCaptureReview extends HTMLElement {
246
+ constructor() {
247
+ super();
248
+ this.templateString = templateString.bind(this);
249
+ this.render = () => this.templateString();
250
+
251
+ this.attachShadow({ mode: 'open' });
252
+ }
253
+
254
+ connectedCallback() {
255
+ const template = document.createElement('template');
256
+ template.innerHTML = this.render();
257
+ this.shadowRoot.innerHTML = '';
258
+ this.shadowRoot.appendChild(template.content.cloneNode(true));
259
+ this.setUpEventListeners();
260
+ }
261
+
262
+ static get observedAttributes() {
263
+ return ['hide-back-to-host', 'show-navigation', 'data-image'];
264
+ }
265
+
266
+ get hideBack() {
267
+ return this.hasAttribute('hide-back-to-host');
268
+ }
269
+
270
+ get showNavigation() {
271
+ return this.hasAttribute('show-navigation');
272
+ }
273
+
274
+ get themeColor() {
275
+ return this.getAttribute('theme-color') || '#001096';
276
+ }
277
+
278
+ get hideAttribution() {
279
+ return this.hasAttribute('hide-attribution');
280
+ }
281
+
282
+ get imageSrc() {
283
+ return this.getAttribute('data-image');
284
+ }
285
+
286
+ get title() {
287
+ return this.getAttribute('title') || 'Submit Front of ID';
288
+ }
289
+
290
+ handleBackEvents() {
291
+ this.dispatchEvent(new CustomEvent('selfie-capture-review.cancelled'));
292
+ }
293
+
294
+ handleCloseEvents() {
295
+ this.dispatchEvent(new CustomEvent('selfie-capture-review.close'));
296
+ }
297
+
298
+ attributeChangedCallback(name) {
299
+ switch (name) {
300
+ case 'data-image':
301
+ case 'hide-back-to-host':
302
+ case 'show-navigation':
303
+ this.shadowRoot.innerHTML = this.render();
304
+ this.setUpEventListeners();
305
+ break;
306
+ default:
307
+ break;
308
+ }
309
+ }
310
+
311
+ setUpEventListeners() {
312
+ this.selectImage = this.shadowRoot.querySelector('#select-id-image');
313
+ this.reCaptureImage = this.shadowRoot.querySelector('#re-capture-image');
314
+ this.navigation = this.shadowRoot.querySelector('smileid-navigation');
315
+
316
+ this.navigation.addEventListener('navigation.back', () => {
317
+ this.handleBackEvents();
318
+ });
319
+ this.navigation.addEventListener('navigation.close', () => {
320
+ this.handleCloseEvents();
321
+ });
322
+
323
+ this.selectImage.addEventListener('click', () => {
324
+ this.dispatchEvent(
325
+ new CustomEvent('selfie-capture-review.accepted', {
326
+ detail: {},
327
+ }),
328
+ );
329
+ });
330
+ this.reCaptureImage.addEventListener('click', () => {
331
+ this.dispatchEvent(
332
+ new CustomEvent('selfie-capture-review.rejected', {
333
+ detail: {},
334
+ }),
335
+ );
336
+ });
337
+ }
338
+ }
339
+
340
+ if (
341
+ 'customElements' in window &&
342
+ !customElements.get('selfie-capture-review')
343
+ ) {
344
+ window.customElements.define('selfie-capture-review', SelfieCaptureReview);
345
+ }
346
+
347
+ export default SelfieCaptureReview;