@adyen/kyc-components 2.11.0 → 2.13.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 +9 -9
- package/dist/es/adyen-kyc-components.es.js +577 -532
- package/dist/style.css +774 -772
- package/dist/types/components/Dropins/types.d.ts +4 -4
- package/dist/types/components/IdDocumentUpload/types.d.ts +1 -0
- package/dist/types/components/IdVerification/component/IdVerificationComponent.d.ts +1 -1
- package/dist/types/components/IdVerification/types.d.ts +1 -0
- package/dist/types/components/Individual/rules.d.ts +1 -0
- package/dist/types/components/PayoutVerificationMethod/allowedBankCountriesPerCountry.d.ts +1 -1
- package/dist/types/components/PersonalDetails/component/IdentityComponent/IdentityAu/component/DriversLicense.d.ts +1 -1
- package/dist/types/components/PersonalDetails/component/IdentityComponent/IdentityAu/component/IdentityAuComponent.d.ts +2 -2
- package/dist/types/components/PersonalDetails/component/IdentityComponent/IdentityAu/validate.d.ts +2 -2
- package/dist/types/components/PersonalDetails/component/IdentityComponent/IdentityHK/component/IdentityHKComponent.d.ts +2 -2
- package/dist/types/components/PersonalDetails/component/IdentityComponent/IdentityHK/validate.d.ts +2 -2
- package/dist/types/components/PersonalDetails/component/IdentityComponent/IdentityNZ/component/DriversLicense.d.ts +1 -1
- package/dist/types/components/PersonalDetails/component/IdentityComponent/IdentityNZ/component/IdentityNZComponent.d.ts +2 -2
- package/dist/types/components/PersonalDetails/component/IdentityComponent/IdentityNZ/validate.d.ts +2 -2
- package/dist/types/components/PersonalDetails/component/IdentityComponent/TypeOfIdentity/index.d.ts +10 -0
- package/dist/types/components/PersonalDetails/component/IdentityComponent/{IdentityHK/additionalIdentityInfoSchema.d.ts → TypeOfIdentity/types.d.ts} +1 -0
- package/dist/types/components/PersonalDetails/component/IdentityComponent/index.d.ts +2 -2
- package/dist/types/components/PersonalDetails/component/IdentityComponent/types.d.ts +16 -0
- package/dist/types/components/PersonalDetails/types.d.ts +2 -2
- package/dist/types/components/TaskIntros/TaskIntro.d.ts +2 -2
- package/dist/types/components/TaskIntros/types.d.ts +1 -1
- package/dist/types/components/TaskList/component/TaskItemStatus.d.ts +2 -1
- package/dist/types/components/TaskList/types.d.ts +1 -1
- package/dist/types/components/TrustRegistrationDetails/types.d.ts +2 -0
- package/dist/types/components/internal/Address/utils.d.ts +1 -1
- package/dist/types/core/Context/CoreContext.d.ts +0 -1
- package/dist/types/core/Context/CoreProvider.d.ts +1 -2
- package/dist/types/core/Services/componentApi/create-document.d.ts +2 -2
- package/dist/types/core/Services/componentApi/get-document.d.ts +2 -2
- package/dist/types/core/Services/componentApi/update-document.d.ts +2 -2
- package/dist/types/core/Services/utils.d.ts +8 -1
- package/dist/types/core/hooks/taskIntros.d.ts +10 -0
- package/dist/types/core/hooks/useIdVerificationToken.d.ts +2 -1
- package/dist/types/core/models/api/document.d.ts +7 -1
- package/dist/types/core/models/api/instant-id-verification.d.ts +1 -0
- package/dist/types/core/models/api/legal-arrangement.d.ts +3 -1
- package/dist/types/core/models/api/trust-types-value.d.ts +1 -1
- package/dist/types/core/models/currency.d.ts +1 -0
- package/dist/types/core/models/errors/validation-error.d.ts +1 -0
- package/dist/types/core/models/identity.d.ts +4 -1
- package/dist/types/language/config.d.ts +15 -13
- package/dist/types/utils/api/documentUtils.d.ts +14 -14
- package/dist/types/utils/decision-maker-roles.d.ts +1 -1
- package/dist/types/utils/entity-status-util.d.ts +2 -2
- package/dist/types/utils/formatting/stripNonAlphanumeric.d.ts +1 -0
- package/dist/types/utils/isValueMasked.d.ts +1 -0
- package/dist/types/utils/mapping/componentApiMapping.d.ts +2 -1
- package/dist/types/utils/mapping/utils.d.ts +1 -0
- package/dist/types/utils/omitMaskedFieldsIfUnchanged.d.ts +2 -0
- package/dist/types/utils/trust-util.d.ts +1 -1
- package/package.json +16 -15
- package/dist/mockServiceWorker.js +0 -302
- package/dist/types/components/PersonalDetails/component/IdentityComponent/IdentityAu/additionalIdentityInfoSchema.d.ts +0 -8
- package/dist/types/components/PersonalDetails/component/IdentityComponent/IdentityAu/component/TypeOfIdentity.d.ts +0 -12
- package/dist/types/components/PersonalDetails/component/IdentityComponent/IdentityAu/types.d.ts +0 -10
- package/dist/types/components/PersonalDetails/component/IdentityComponent/IdentityHK/component/TypeOfIdentity.d.ts +0 -12
- package/dist/types/components/PersonalDetails/component/IdentityComponent/IdentityHK/types.d.ts +0 -10
- package/dist/types/components/PersonalDetails/component/IdentityComponent/IdentityNZ/additionalIdentityInfoSchema.d.ts +0 -7
- package/dist/types/components/PersonalDetails/component/IdentityComponent/IdentityNZ/component/TypeOfIdentity.d.ts +0 -12
- package/dist/types/components/PersonalDetails/component/IdentityComponent/IdentityNZ/types.d.ts +0 -10
- package/dist/types/components/internal/Alert/components/ReviewAlert.d.ts +0 -2
- package/dist/types/core/hooks/useShouldShowGuidanceIntros.d.ts +0 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adyen/kyc-components",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.13.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -23,15 +23,18 @@
|
|
|
23
23
|
},
|
|
24
24
|
"type": "commonjs",
|
|
25
25
|
"scripts": {
|
|
26
|
-
"build:all": "npm run build && npm run types:build",
|
|
27
26
|
"build": "npm run clean && vite build",
|
|
28
|
-
"build:
|
|
27
|
+
"build:all": "npm run build && npm run types:build",
|
|
29
28
|
"build:demo": "vite build --mode demo",
|
|
29
|
+
"build:cdn": "npm run clean && vite build --mode production-cdn",
|
|
30
|
+
"build:watch": "npm run build -- --watch",
|
|
30
31
|
"buildAll": "npm run build:all",
|
|
31
|
-
"check:all": "concurrently \"npm run types:check\" \"npm run lint:quiet\" \"npm run lint:scss\" -n tsc,eslint,stylelint -c cyan,magenta,yellow",
|
|
32
|
+
"check:all": "concurrently \"npm run types:check\" \"npm run lint:quiet\" \"npm run lint:scss\" \"npm run prettier\" -n tsc,eslint,stylelint,prettier -c cyan,magenta,yellow,blue",
|
|
32
33
|
"check:commits": "commitlint --from",
|
|
33
34
|
"check:commits:since-main": "npm run check:commits -- main",
|
|
35
|
+
"clean": "rm -rf dist",
|
|
34
36
|
"commit": "commit",
|
|
37
|
+
"env:generate": "vite-node ./env/generateEnv.ts",
|
|
35
38
|
"demo": "npm run build:demo && npm run demo:serve",
|
|
36
39
|
"demo:serve": "vite preview --mode demo",
|
|
37
40
|
"dev": "concurrently \"vite dev\" \"npm run types:watch\" -n vite,tsc -c green,cyan -k",
|
|
@@ -46,8 +49,10 @@
|
|
|
46
49
|
"lint:quiet:fix": "npm run lint:fix -- --quiet",
|
|
47
50
|
"lint:scss": "stylelint 'src/**/*.scss' '!node_modules/**/*.scss'",
|
|
48
51
|
"lint:scss:fix": "npm run lint:scss -- --fix",
|
|
52
|
+
"prepare": "bash ./scripts/process-package-lock.sh",
|
|
49
53
|
"prettier": "prettier --config ./.prettierrc.json --ignore-unknown --check \"**/*\"",
|
|
50
54
|
"prettier:fix": "prettier --config ./.prettierrc.json --ignore-unknown --write \"**/*\"",
|
|
55
|
+
"release": "release-it",
|
|
51
56
|
"repo:setup": "bash ./scripts/first-time-setup.sh",
|
|
52
57
|
"start": "npm run dev",
|
|
53
58
|
"storybook": "vite-node ./.storybook/runStorybook.ts",
|
|
@@ -59,11 +64,7 @@
|
|
|
59
64
|
"test:watch": "npm run test --watch",
|
|
60
65
|
"types:build": "tsc --project tsconfig-build.json",
|
|
61
66
|
"types:check": "tsc && tsc-strict",
|
|
62
|
-
"types:watch": "tsc --watch --preserveWatchOutput"
|
|
63
|
-
"clean": "rm -rf dist",
|
|
64
|
-
"release": "release-it",
|
|
65
|
-
"prepare": "bash ./scripts/process-package-lock.sh",
|
|
66
|
-
"env:generate": "vite-node ./env/generateEnv.ts"
|
|
67
|
+
"types:watch": "tsc --watch --preserveWatchOutput"
|
|
67
68
|
},
|
|
68
69
|
"dependencies": {
|
|
69
70
|
"classnames": "^2.3.2",
|
|
@@ -78,12 +79,12 @@
|
|
|
78
79
|
"@commitlint/prompt-cli": "^17.7.1",
|
|
79
80
|
"@playwright/test": "^1.37.1",
|
|
80
81
|
"@preact/preset-vite": "^2.5.0",
|
|
81
|
-
"@storybook/addon-actions": "
|
|
82
|
-
"@storybook/addon-essentials": "
|
|
83
|
-
"@storybook/core-server": "
|
|
84
|
-
"@storybook/preact": "
|
|
85
|
-
"@storybook/preact-vite": "
|
|
86
|
-
"@storybook/types": "
|
|
82
|
+
"@storybook/addon-actions": "7.0.4",
|
|
83
|
+
"@storybook/addon-essentials": "7.0.4",
|
|
84
|
+
"@storybook/core-server": "7.0.4",
|
|
85
|
+
"@storybook/preact": "7.0.4",
|
|
86
|
+
"@storybook/preact-vite": "7.0.4",
|
|
87
|
+
"@storybook/types": "7.0.4",
|
|
87
88
|
"@testing-library/jest-dom": "^5.17.0",
|
|
88
89
|
"@testing-library/preact": "^3.2.3",
|
|
89
90
|
"@testing-library/user-event": "^14.4.3",
|
|
@@ -1,302 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Mock Service Worker (0.49.3).
|
|
6
|
-
* @see https://github.com/mswjs/msw
|
|
7
|
-
* - Please do NOT modify this file.
|
|
8
|
-
* - Please do NOT serve this file on production.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
const INTEGRITY_CHECKSUM = '3d6b9f06410d179a7f7404d4bf4c3c70';
|
|
12
|
-
const activeClientIds = new Set();
|
|
13
|
-
|
|
14
|
-
self.addEventListener('install', function () {
|
|
15
|
-
self.skipWaiting();
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
self.addEventListener('activate', function (event) {
|
|
19
|
-
event.waitUntil(self.clients.claim());
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
self.addEventListener('message', async function (event) {
|
|
23
|
-
const clientId = event.source.id;
|
|
24
|
-
|
|
25
|
-
if (!clientId || !self.clients) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
const client = await self.clients.get(clientId);
|
|
30
|
-
|
|
31
|
-
if (!client) {
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const allClients = await self.clients.matchAll({
|
|
36
|
-
type: 'window',
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
switch (event.data) {
|
|
40
|
-
case 'KEEPALIVE_REQUEST': {
|
|
41
|
-
sendToClient(client, {
|
|
42
|
-
type: 'KEEPALIVE_RESPONSE',
|
|
43
|
-
});
|
|
44
|
-
break;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
case 'INTEGRITY_CHECK_REQUEST': {
|
|
48
|
-
sendToClient(client, {
|
|
49
|
-
type: 'INTEGRITY_CHECK_RESPONSE',
|
|
50
|
-
payload: INTEGRITY_CHECKSUM,
|
|
51
|
-
});
|
|
52
|
-
break;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
case 'MOCK_ACTIVATE': {
|
|
56
|
-
activeClientIds.add(clientId);
|
|
57
|
-
|
|
58
|
-
sendToClient(client, {
|
|
59
|
-
type: 'MOCKING_ENABLED',
|
|
60
|
-
payload: true,
|
|
61
|
-
});
|
|
62
|
-
break;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
case 'MOCK_DEACTIVATE': {
|
|
66
|
-
activeClientIds.delete(clientId);
|
|
67
|
-
break;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
case 'CLIENT_CLOSED': {
|
|
71
|
-
activeClientIds.delete(clientId);
|
|
72
|
-
|
|
73
|
-
const remainingClients = allClients.filter((client) => {
|
|
74
|
-
return client.id !== clientId;
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
// Unregister itself when there are no more clients
|
|
78
|
-
if (remainingClients.length === 0) {
|
|
79
|
-
self.registration.unregister();
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
break;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
|
|
87
|
-
self.addEventListener('fetch', function (event) {
|
|
88
|
-
const { request } = event;
|
|
89
|
-
const accept = request.headers.get('accept') || '';
|
|
90
|
-
|
|
91
|
-
// Bypass server-sent events.
|
|
92
|
-
if (accept.includes('text/event-stream')) {
|
|
93
|
-
return;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
// Bypass navigation requests.
|
|
97
|
-
if (request.mode === 'navigate') {
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
// Opening the DevTools triggers the "only-if-cached" request
|
|
102
|
-
// that cannot be handled by the worker. Bypass such requests.
|
|
103
|
-
if (request.cache === 'only-if-cached' && request.mode !== 'same-origin') {
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
// Bypass all requests when there are no active clients.
|
|
108
|
-
// Prevents the self-unregistered worked from handling requests
|
|
109
|
-
// after it's been deleted (still remains active until the next reload).
|
|
110
|
-
if (activeClientIds.size === 0) {
|
|
111
|
-
return;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
// Generate unique request ID.
|
|
115
|
-
const requestId = Math.random().toString(16).slice(2);
|
|
116
|
-
|
|
117
|
-
event.respondWith(
|
|
118
|
-
handleRequest(event, requestId).catch((error) => {
|
|
119
|
-
if (error.name === 'NetworkError') {
|
|
120
|
-
console.warn(
|
|
121
|
-
'[MSW] Successfully emulated a network error for the "%s %s" request.',
|
|
122
|
-
request.method,
|
|
123
|
-
request.url,
|
|
124
|
-
);
|
|
125
|
-
return;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
// At this point, any exception indicates an issue with the original request/response.
|
|
129
|
-
console.error(
|
|
130
|
-
`\
|
|
131
|
-
[MSW] Caught an exception from the "%s %s" request (%s). This is probably not a problem with Mock Service Worker. There is likely an additional logging output above.`,
|
|
132
|
-
request.method,
|
|
133
|
-
request.url,
|
|
134
|
-
`${error.name}: ${error.message}`,
|
|
135
|
-
);
|
|
136
|
-
}),
|
|
137
|
-
);
|
|
138
|
-
});
|
|
139
|
-
|
|
140
|
-
async function handleRequest(event, requestId) {
|
|
141
|
-
const client = await resolveMainClient(event);
|
|
142
|
-
const response = await getResponse(event, client, requestId);
|
|
143
|
-
|
|
144
|
-
// Send back the response clone for the "response:*" life-cycle events.
|
|
145
|
-
// Ensure MSW is active and ready to handle the message, otherwise
|
|
146
|
-
// this message will pend indefinitely.
|
|
147
|
-
if (client && activeClientIds.has(client.id)) {
|
|
148
|
-
(async function () {
|
|
149
|
-
const clonedResponse = response.clone();
|
|
150
|
-
sendToClient(client, {
|
|
151
|
-
type: 'RESPONSE',
|
|
152
|
-
payload: {
|
|
153
|
-
requestId,
|
|
154
|
-
type: clonedResponse.type,
|
|
155
|
-
ok: clonedResponse.ok,
|
|
156
|
-
status: clonedResponse.status,
|
|
157
|
-
statusText: clonedResponse.statusText,
|
|
158
|
-
body: clonedResponse.body === null ? null : await clonedResponse.text(),
|
|
159
|
-
headers: Object.fromEntries(clonedResponse.headers.entries()),
|
|
160
|
-
redirected: clonedResponse.redirected,
|
|
161
|
-
},
|
|
162
|
-
});
|
|
163
|
-
})();
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
return response;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
// Resolve the main client for the given event.
|
|
170
|
-
// Client that issues a request doesn't necessarily equal the client
|
|
171
|
-
// that registered the worker. It's with the latter the worker should
|
|
172
|
-
// communicate with during the response resolving phase.
|
|
173
|
-
async function resolveMainClient(event) {
|
|
174
|
-
const client = await self.clients.get(event.clientId);
|
|
175
|
-
|
|
176
|
-
if (client?.frameType === 'top-level') {
|
|
177
|
-
return client;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
const allClients = await self.clients.matchAll({
|
|
181
|
-
type: 'window',
|
|
182
|
-
});
|
|
183
|
-
|
|
184
|
-
return allClients
|
|
185
|
-
.filter((client) => {
|
|
186
|
-
// Get only those clients that are currently visible.
|
|
187
|
-
return client.visibilityState === 'visible';
|
|
188
|
-
})
|
|
189
|
-
.find((client) => {
|
|
190
|
-
// Find the client ID that's recorded in the
|
|
191
|
-
// set of clients that have registered the worker.
|
|
192
|
-
return activeClientIds.has(client.id);
|
|
193
|
-
});
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
async function getResponse(event, client, requestId) {
|
|
197
|
-
const { request } = event;
|
|
198
|
-
const clonedRequest = request.clone();
|
|
199
|
-
|
|
200
|
-
function passthrough() {
|
|
201
|
-
// Clone the request because it might've been already used
|
|
202
|
-
// (i.e. its body has been read and sent to the client).
|
|
203
|
-
const headers = Object.fromEntries(clonedRequest.headers.entries());
|
|
204
|
-
|
|
205
|
-
// Remove MSW-specific request headers so the bypassed requests
|
|
206
|
-
// comply with the server's CORS preflight check.
|
|
207
|
-
// Operate with the headers as an object because request "Headers"
|
|
208
|
-
// are immutable.
|
|
209
|
-
delete headers['x-msw-bypass'];
|
|
210
|
-
|
|
211
|
-
return fetch(clonedRequest, { headers });
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
// Bypass mocking when the client is not active.
|
|
215
|
-
if (!client) {
|
|
216
|
-
return passthrough();
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
// Bypass initial page load requests (i.e. static assets).
|
|
220
|
-
// The absence of the immediate/parent client in the map of the active clients
|
|
221
|
-
// means that MSW hasn't dispatched the "MOCK_ACTIVATE" event yet
|
|
222
|
-
// and is not ready to handle requests.
|
|
223
|
-
if (!activeClientIds.has(client.id)) {
|
|
224
|
-
return passthrough();
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
// Bypass requests with the explicit bypass header.
|
|
228
|
-
// Such requests can be issued by "ctx.fetch()".
|
|
229
|
-
if (request.headers.get('x-msw-bypass') === 'true') {
|
|
230
|
-
return passthrough();
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
// Notify the client that a request has been intercepted.
|
|
234
|
-
const clientMessage = await sendToClient(client, {
|
|
235
|
-
type: 'REQUEST',
|
|
236
|
-
payload: {
|
|
237
|
-
id: requestId,
|
|
238
|
-
url: request.url,
|
|
239
|
-
method: request.method,
|
|
240
|
-
headers: Object.fromEntries(request.headers.entries()),
|
|
241
|
-
cache: request.cache,
|
|
242
|
-
mode: request.mode,
|
|
243
|
-
credentials: request.credentials,
|
|
244
|
-
destination: request.destination,
|
|
245
|
-
integrity: request.integrity,
|
|
246
|
-
redirect: request.redirect,
|
|
247
|
-
referrer: request.referrer,
|
|
248
|
-
referrerPolicy: request.referrerPolicy,
|
|
249
|
-
body: await request.text(),
|
|
250
|
-
bodyUsed: request.bodyUsed,
|
|
251
|
-
keepalive: request.keepalive,
|
|
252
|
-
},
|
|
253
|
-
});
|
|
254
|
-
|
|
255
|
-
switch (clientMessage.type) {
|
|
256
|
-
case 'MOCK_RESPONSE': {
|
|
257
|
-
return respondWithMock(clientMessage.data);
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
case 'MOCK_NOT_FOUND': {
|
|
261
|
-
return passthrough();
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
case 'NETWORK_ERROR': {
|
|
265
|
-
const { name, message } = clientMessage.data;
|
|
266
|
-
const networkError = new Error(message);
|
|
267
|
-
networkError.name = name;
|
|
268
|
-
|
|
269
|
-
// Rejecting a "respondWith" promise emulates a network error.
|
|
270
|
-
throw networkError;
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
return passthrough();
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
function sendToClient(client, message) {
|
|
278
|
-
return new Promise((resolve, reject) => {
|
|
279
|
-
const channel = new MessageChannel();
|
|
280
|
-
|
|
281
|
-
channel.port1.onmessage = (event) => {
|
|
282
|
-
if (event.data && event.data.error) {
|
|
283
|
-
return reject(event.data.error);
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
resolve(event.data);
|
|
287
|
-
};
|
|
288
|
-
|
|
289
|
-
client.postMessage(message, [channel.port2]);
|
|
290
|
-
});
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
function sleep(timeMs) {
|
|
294
|
-
return new Promise((resolve) => {
|
|
295
|
-
setTimeout(resolve, timeMs);
|
|
296
|
-
});
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
async function respondWithMock(response) {
|
|
300
|
-
await sleep(response.delay);
|
|
301
|
-
return new Response(response.body, response);
|
|
302
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export interface AdditionalIdentityInfoSchema {
|
|
2
|
-
typeOfIdentity?: IdentityType;
|
|
3
|
-
issuerState?: string;
|
|
4
|
-
licenseCardNumber?: string;
|
|
5
|
-
}
|
|
6
|
-
export declare const additionalIdentityInfoFields: ReadonlyArray<keyof AdditionalIdentityInfoSchema>;
|
|
7
|
-
export declare const identityTypes: readonly ["nationalIdNumber", "passport", "driversLicense", "proofOfIdentityCard"];
|
|
8
|
-
export type IdentityType = (typeof identityTypes)[number];
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { FormUtils } from '../../../../../../utils/formUtils';
|
|
2
|
-
import { AdditionalIdentityInfoSchema } from '../additionalIdentityInfoSchema';
|
|
3
|
-
import { AuIdentityType } from '../types';
|
|
4
|
-
export interface TypeOfIdentityProps {
|
|
5
|
-
availableIdentityTypes: readonly AuIdentityType[];
|
|
6
|
-
selectedIdentityType: AuIdentityType;
|
|
7
|
-
setSelectedIdentityType: (type: AuIdentityType) => void;
|
|
8
|
-
formUtils: FormUtils<AdditionalIdentityInfoSchema>;
|
|
9
|
-
errorMessage: string | boolean;
|
|
10
|
-
isValid: boolean;
|
|
11
|
-
}
|
|
12
|
-
export declare const TypeOfIdentity: ({ availableIdentityTypes, selectedIdentityType, setSelectedIdentityType, formUtils: { getLabel }, errorMessage, isValid, }: TypeOfIdentityProps) => import("preact").JSX.Element;
|
package/dist/types/components/PersonalDetails/component/IdentityComponent/IdentityAu/types.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { BaseInnerFormProps } from '../../../../../core/hooks/useForm';
|
|
2
|
-
import { IdentityNumberSchema } from '../../../../IdentityNumber/type';
|
|
3
|
-
import { AdditionalIdentityInfoSchema, IdentityType } from './additionalIdentityInfoSchema';
|
|
4
|
-
export type AuIdentityType = Exclude<IdentityType, 'nationalIdNumber'>;
|
|
5
|
-
export interface AuIdentitySchema extends AdditionalIdentityInfoSchema {
|
|
6
|
-
idNumber?: IdentityNumberSchema['idNumber'];
|
|
7
|
-
typeOfIdentity?: IdentityType;
|
|
8
|
-
}
|
|
9
|
-
export type IdentityAuProps = BaseInnerFormProps<AuIdentitySchema>;
|
|
10
|
-
export declare const auIdentityFields: ReadonlyArray<keyof AuIdentitySchema>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { FormUtils } from '../../../../../../utils/formUtils';
|
|
2
|
-
import { AdditionalIdentityInfoSchema } from '../additionalIdentityInfoSchema';
|
|
3
|
-
import { HKIdentityType } from '../types';
|
|
4
|
-
export interface TypeOfIdentityProps {
|
|
5
|
-
availableIdentityTypes: readonly HKIdentityType[];
|
|
6
|
-
selectedIdentityType: HKIdentityType;
|
|
7
|
-
setSelectedIdentityType: (type: HKIdentityType) => void;
|
|
8
|
-
formUtils: FormUtils<AdditionalIdentityInfoSchema>;
|
|
9
|
-
errorMessage: string | boolean;
|
|
10
|
-
isValid: boolean;
|
|
11
|
-
}
|
|
12
|
-
export declare const TypeOfIdentity: ({ availableIdentityTypes, selectedIdentityType, setSelectedIdentityType, formUtils: { getLabel }, errorMessage, isValid, }: TypeOfIdentityProps) => import("preact").JSX.Element;
|
package/dist/types/components/PersonalDetails/component/IdentityComponent/IdentityHK/types.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { BaseInnerFormProps } from '../../../../../core/hooks/useForm';
|
|
2
|
-
import { IdentityNumberSchema } from '../../../../IdentityNumber/type';
|
|
3
|
-
import { AdditionalIdentityInfoSchema, IdentityType } from './additionalIdentityInfoSchema';
|
|
4
|
-
export type HKIdentityType = Exclude<IdentityType, 'nationalIdNumber'>;
|
|
5
|
-
export interface HKIdentitySchema extends AdditionalIdentityInfoSchema {
|
|
6
|
-
idNumber?: IdentityNumberSchema['idNumber'];
|
|
7
|
-
typeOfIdentity?: IdentityType;
|
|
8
|
-
}
|
|
9
|
-
export type IdentityHKProps = BaseInnerFormProps<HKIdentitySchema>;
|
|
10
|
-
export declare const hkIdentityFields: ReadonlyArray<keyof HKIdentitySchema>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export interface AdditionalIdentityInfoSchema {
|
|
2
|
-
typeOfIdentity?: IdentityType;
|
|
3
|
-
licenseCardNumber?: string;
|
|
4
|
-
}
|
|
5
|
-
export declare const additionalIdentityInfoFields: ReadonlyArray<keyof AdditionalIdentityInfoSchema>;
|
|
6
|
-
export declare const identityTypes: readonly ["nationalIdNumber", "passport", "driversLicense", "proofOfIdentityCard"];
|
|
7
|
-
export type IdentityType = (typeof identityTypes)[number];
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { FormUtils } from '../../../../../../utils/formUtils';
|
|
2
|
-
import { AdditionalIdentityInfoSchema } from '../additionalIdentityInfoSchema';
|
|
3
|
-
import { NZIdentityType } from '../types';
|
|
4
|
-
export interface TypeOfIdentityProps {
|
|
5
|
-
availableIdentityTypes: readonly NZIdentityType[];
|
|
6
|
-
selectedIdentityType: NZIdentityType;
|
|
7
|
-
setSelectedIdentityType: (type: NZIdentityType) => void;
|
|
8
|
-
formUtils: FormUtils<AdditionalIdentityInfoSchema>;
|
|
9
|
-
errorMessage: string | boolean;
|
|
10
|
-
isValid: boolean;
|
|
11
|
-
}
|
|
12
|
-
export declare const TypeOfIdentity: ({ availableIdentityTypes, selectedIdentityType, setSelectedIdentityType, formUtils: { getLabel }, errorMessage, isValid, }: TypeOfIdentityProps) => import("preact").JSX.Element;
|
package/dist/types/components/PersonalDetails/component/IdentityComponent/IdentityNZ/types.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { BaseInnerFormProps } from '../../../../../core/hooks/useForm';
|
|
2
|
-
import { IdentityNumberSchema } from '../../../../IdentityNumber/type';
|
|
3
|
-
import { AdditionalIdentityInfoSchema, IdentityType } from './additionalIdentityInfoSchema';
|
|
4
|
-
export type NZIdentityType = Exclude<IdentityType, 'nationalIdNumber'>;
|
|
5
|
-
export interface NZIdentitySchema extends AdditionalIdentityInfoSchema {
|
|
6
|
-
idNumber?: IdentityNumberSchema['idNumber'];
|
|
7
|
-
typeOfIdentity?: IdentityType;
|
|
8
|
-
}
|
|
9
|
-
export type IdentityNZProps = BaseInnerFormProps<NZIdentitySchema>;
|
|
10
|
-
export declare const nzIdentityFields: ReadonlyArray<keyof NZIdentitySchema>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ExistingLegalEntity } from '../models/api/legal-entity';
|
|
2
|
-
export declare const useHasSeenIntro: (legalEntityId: string) => {
|
|
3
|
-
hasSeenIntro: boolean;
|
|
4
|
-
setHasSeenIntro: (value: boolean | ((prevState: boolean) => boolean)) => void;
|
|
5
|
-
};
|
|
6
|
-
export declare const guidanceAvailableForGivenLE: (legalEntity: ExistingLegalEntity) => boolean;
|
|
7
|
-
export declare const useShouldShowGuidanceIntros: (legalEntity: ExistingLegalEntity) => boolean;
|