@adyen/adyen-web 5.44.0 → 5.45.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/dist/adyen.css +1 -0
- package/dist/adyen.css.map +1 -1
- package/dist/adyen.js +1 -1
- package/dist/adyen.js.map +1 -1
- package/dist/cjs/adyen.css +1 -0
- package/dist/cjs/adyen.css.map +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/es/adyen.css +1 -0
- package/dist/es/adyen.css.map +1 -1
- package/dist/es/index.js +1 -1
- package/dist/es.modern/adyen.css +1 -0
- package/dist/es.modern/adyen.css.map +1 -1
- package/dist/es.modern/index.js +1 -1
- package/dist/types/components/Ach/Ach.d.ts +1 -1
- package/dist/types/components/ApplePay/utils.d.ts +1 -1
- package/dist/types/components/BcmcMobile/BcmcMobile.d.ts +1 -1
- package/dist/types/components/Card/Bancontact.d.ts +1 -1
- package/dist/types/components/Card/Card.d.ts +1 -1
- package/dist/types/components/Card/components/CardInput/components/CardFieldsWrapper.d.ts +2 -1
- package/dist/types/components/Card/components/CardInput/types.d.ts +2 -0
- package/dist/types/components/Card/types.d.ts +11 -0
- package/dist/types/components/CashAppPay/CashAppPay.d.ts +1 -1
- package/dist/types/components/CashAppPay/types.d.ts +10 -0
- package/dist/types/components/ClickToPay/ClickToPay.d.ts +1 -1
- package/dist/types/components/Dragonpay/Dragonpay.d.ts +1 -1
- package/dist/types/components/Dropin/Dropin.d.ts +1 -1
- package/dist/types/components/Dropin/components/PaymentMethod/OrderPaymentMethods.d.ts +2 -1
- package/dist/types/components/Dropin/components/PaymentMethod/useBrandLogoConfiguration.d.ts +6 -0
- package/dist/types/components/Dropin/types.d.ts +5 -0
- package/dist/types/components/DuitNow/DuitNow.d.ts +1 -1
- package/dist/types/components/Giftcard/components/GiftcardPinField.d.ts +1 -1
- package/dist/types/components/Giftcard/components/types.d.ts +2 -0
- package/dist/types/components/Klarna/types.d.ts +2 -0
- package/dist/types/components/PayNow/PayNow.d.ts +1 -1
- package/dist/types/components/PromptPay/PromptPay.d.ts +1 -1
- package/dist/types/components/Swish/Swish.d.ts +1 -1
- package/dist/types/components/WeChat/WeChat.d.ts +1 -1
- package/dist/types/components/internal/Address/components/AddressSearch.d.ts +16 -0
- package/dist/types/components/internal/Address/types.d.ts +6 -0
- package/dist/types/components/internal/Address/utils.d.ts +2 -0
- package/dist/types/components/internal/FormFields/Select/Select.d.ts +1 -1
- package/dist/types/components/internal/FormFields/Select/types.d.ts +3 -0
- package/dist/types/components/internal/IbanInput/specifications.d.ts +426 -0
- package/dist/types/components/internal/IbanInput/utils.d.ts +45 -0
- package/dist/types/components/internal/SecuredFields/lib/utilities/commonUtils.d.ts +45 -0
- package/dist/types/components/internal/SecuredFields/lib/utilities/dom.d.ts +7 -0
- package/dist/types/components/internal/SecuredFields/lib/utilities/logger.d.ts +23 -1
- package/dist/types/components/internal/SecuredFields/utils.d.ts +15 -0
- package/dist/types/components/types.d.ts +15 -1
- package/dist/types/core/core.d.ts +37 -0
- package/dist/types/core/types.d.ts +8 -0
- package/dist/types/language/config.d.ts +3 -0
- package/dist/types/language/locales/index.d.ts +6 -0
- package/dist/types/language/utils.d.ts +11 -0
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types/utils/amount-util.d.ts +28 -1
- package/dist/types/utils/base64.d.ts +8 -0
- package/package.json +1 -1
|
@@ -1 +1,427 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
* IBAN Countries, length, structure and examples
|
|
4
|
+
*/
|
|
5
|
+
declare const countries: {
|
|
6
|
+
AD: {
|
|
7
|
+
length: number;
|
|
8
|
+
structure: string;
|
|
9
|
+
example: string;
|
|
10
|
+
};
|
|
11
|
+
AE: {
|
|
12
|
+
length: number;
|
|
13
|
+
structure: string;
|
|
14
|
+
example: string;
|
|
15
|
+
};
|
|
16
|
+
AL: {
|
|
17
|
+
length: number;
|
|
18
|
+
structure: string;
|
|
19
|
+
example: string;
|
|
20
|
+
};
|
|
21
|
+
AT: {
|
|
22
|
+
length: number;
|
|
23
|
+
structure: string;
|
|
24
|
+
example: string;
|
|
25
|
+
};
|
|
26
|
+
AZ: {
|
|
27
|
+
length: number;
|
|
28
|
+
structure: string;
|
|
29
|
+
example: string;
|
|
30
|
+
};
|
|
31
|
+
BA: {
|
|
32
|
+
length: number;
|
|
33
|
+
structure: string;
|
|
34
|
+
example: string;
|
|
35
|
+
};
|
|
36
|
+
BE: {
|
|
37
|
+
length: number;
|
|
38
|
+
structure: string;
|
|
39
|
+
example: string;
|
|
40
|
+
};
|
|
41
|
+
BG: {
|
|
42
|
+
length: number;
|
|
43
|
+
structure: string;
|
|
44
|
+
example: string;
|
|
45
|
+
};
|
|
46
|
+
BH: {
|
|
47
|
+
length: number;
|
|
48
|
+
structure: string;
|
|
49
|
+
example: string;
|
|
50
|
+
};
|
|
51
|
+
BR: {
|
|
52
|
+
length: number;
|
|
53
|
+
structure: string;
|
|
54
|
+
example: string;
|
|
55
|
+
};
|
|
56
|
+
CH: {
|
|
57
|
+
length: number;
|
|
58
|
+
structure: string;
|
|
59
|
+
example: string;
|
|
60
|
+
};
|
|
61
|
+
CR: {
|
|
62
|
+
length: number;
|
|
63
|
+
structure: string;
|
|
64
|
+
example: string;
|
|
65
|
+
};
|
|
66
|
+
CY: {
|
|
67
|
+
length: number;
|
|
68
|
+
structure: string;
|
|
69
|
+
example: string;
|
|
70
|
+
};
|
|
71
|
+
CZ: {
|
|
72
|
+
length: number;
|
|
73
|
+
structure: string;
|
|
74
|
+
example: string;
|
|
75
|
+
};
|
|
76
|
+
DE: {
|
|
77
|
+
length: number;
|
|
78
|
+
structure: string;
|
|
79
|
+
example: string;
|
|
80
|
+
};
|
|
81
|
+
DK: {
|
|
82
|
+
length: number;
|
|
83
|
+
structure: string;
|
|
84
|
+
example: string;
|
|
85
|
+
};
|
|
86
|
+
DO: {
|
|
87
|
+
length: number;
|
|
88
|
+
structure: string;
|
|
89
|
+
example: string;
|
|
90
|
+
};
|
|
91
|
+
EE: {
|
|
92
|
+
length: number;
|
|
93
|
+
structure: string;
|
|
94
|
+
example: string;
|
|
95
|
+
};
|
|
96
|
+
ES: {
|
|
97
|
+
length: number;
|
|
98
|
+
structure: string;
|
|
99
|
+
example: string;
|
|
100
|
+
};
|
|
101
|
+
FI: {
|
|
102
|
+
length: number;
|
|
103
|
+
structure: string;
|
|
104
|
+
example: string;
|
|
105
|
+
};
|
|
106
|
+
FO: {
|
|
107
|
+
length: number;
|
|
108
|
+
structure: string;
|
|
109
|
+
example: string;
|
|
110
|
+
};
|
|
111
|
+
FR: {
|
|
112
|
+
length: number;
|
|
113
|
+
structure: string;
|
|
114
|
+
example: string;
|
|
115
|
+
};
|
|
116
|
+
GB: {
|
|
117
|
+
length: number;
|
|
118
|
+
structure: string;
|
|
119
|
+
example: string;
|
|
120
|
+
};
|
|
121
|
+
GE: {
|
|
122
|
+
length: number;
|
|
123
|
+
structure: string;
|
|
124
|
+
example: string;
|
|
125
|
+
};
|
|
126
|
+
GI: {
|
|
127
|
+
length: number;
|
|
128
|
+
structure: string;
|
|
129
|
+
example: string;
|
|
130
|
+
};
|
|
131
|
+
GL: {
|
|
132
|
+
length: number;
|
|
133
|
+
structure: string;
|
|
134
|
+
example: string;
|
|
135
|
+
};
|
|
136
|
+
GR: {
|
|
137
|
+
length: number;
|
|
138
|
+
structure: string;
|
|
139
|
+
example: string;
|
|
140
|
+
};
|
|
141
|
+
GT: {
|
|
142
|
+
length: number;
|
|
143
|
+
structure: string;
|
|
144
|
+
example: string;
|
|
145
|
+
};
|
|
146
|
+
HR: {
|
|
147
|
+
length: number;
|
|
148
|
+
structure: string;
|
|
149
|
+
example: string;
|
|
150
|
+
};
|
|
151
|
+
HU: {
|
|
152
|
+
length: number;
|
|
153
|
+
structure: string;
|
|
154
|
+
example: string;
|
|
155
|
+
};
|
|
156
|
+
IE: {
|
|
157
|
+
length: number;
|
|
158
|
+
structure: string;
|
|
159
|
+
example: string;
|
|
160
|
+
};
|
|
161
|
+
IL: {
|
|
162
|
+
length: number;
|
|
163
|
+
structure: string;
|
|
164
|
+
example: string;
|
|
165
|
+
};
|
|
166
|
+
IS: {
|
|
167
|
+
length: number;
|
|
168
|
+
structure: string;
|
|
169
|
+
example: string;
|
|
170
|
+
};
|
|
171
|
+
IT: {
|
|
172
|
+
length: number;
|
|
173
|
+
structure: string;
|
|
174
|
+
example: string;
|
|
175
|
+
};
|
|
176
|
+
KW: {
|
|
177
|
+
length: number;
|
|
178
|
+
structure: string;
|
|
179
|
+
example: string;
|
|
180
|
+
};
|
|
181
|
+
KZ: {
|
|
182
|
+
length: number;
|
|
183
|
+
structure: string;
|
|
184
|
+
example: string;
|
|
185
|
+
};
|
|
186
|
+
LB: {
|
|
187
|
+
length: number;
|
|
188
|
+
structure: string;
|
|
189
|
+
example: string;
|
|
190
|
+
};
|
|
191
|
+
LC: {
|
|
192
|
+
length: number;
|
|
193
|
+
structure: string;
|
|
194
|
+
example: string;
|
|
195
|
+
};
|
|
196
|
+
LI: {
|
|
197
|
+
length: number;
|
|
198
|
+
structure: string;
|
|
199
|
+
example: string;
|
|
200
|
+
};
|
|
201
|
+
LT: {
|
|
202
|
+
length: number;
|
|
203
|
+
structure: string;
|
|
204
|
+
example: string;
|
|
205
|
+
};
|
|
206
|
+
LU: {
|
|
207
|
+
length: number;
|
|
208
|
+
structure: string;
|
|
209
|
+
example: string;
|
|
210
|
+
};
|
|
211
|
+
LV: {
|
|
212
|
+
length: number;
|
|
213
|
+
structure: string;
|
|
214
|
+
example: string;
|
|
215
|
+
};
|
|
216
|
+
MC: {
|
|
217
|
+
length: number;
|
|
218
|
+
structure: string;
|
|
219
|
+
example: string;
|
|
220
|
+
};
|
|
221
|
+
MD: {
|
|
222
|
+
length: number;
|
|
223
|
+
structure: string;
|
|
224
|
+
example: string;
|
|
225
|
+
};
|
|
226
|
+
ME: {
|
|
227
|
+
length: number;
|
|
228
|
+
structure: string;
|
|
229
|
+
example: string;
|
|
230
|
+
};
|
|
231
|
+
MK: {
|
|
232
|
+
length: number;
|
|
233
|
+
structure: string;
|
|
234
|
+
example: string;
|
|
235
|
+
};
|
|
236
|
+
MR: {
|
|
237
|
+
length: number;
|
|
238
|
+
structure: string;
|
|
239
|
+
example: string;
|
|
240
|
+
};
|
|
241
|
+
MT: {
|
|
242
|
+
length: number;
|
|
243
|
+
structure: string;
|
|
244
|
+
example: string;
|
|
245
|
+
};
|
|
246
|
+
MU: {
|
|
247
|
+
length: number;
|
|
248
|
+
structure: string;
|
|
249
|
+
example: string;
|
|
250
|
+
};
|
|
251
|
+
NL: {
|
|
252
|
+
length: number;
|
|
253
|
+
structure: string;
|
|
254
|
+
example: string;
|
|
255
|
+
};
|
|
256
|
+
NO: {
|
|
257
|
+
length: number;
|
|
258
|
+
structure: string;
|
|
259
|
+
example: string;
|
|
260
|
+
};
|
|
261
|
+
PK: {
|
|
262
|
+
length: number;
|
|
263
|
+
structure: string;
|
|
264
|
+
example: string;
|
|
265
|
+
};
|
|
266
|
+
PL: {
|
|
267
|
+
length: number;
|
|
268
|
+
structure: string;
|
|
269
|
+
example: string;
|
|
270
|
+
};
|
|
271
|
+
PS: {
|
|
272
|
+
length: number;
|
|
273
|
+
structure: string;
|
|
274
|
+
example: string;
|
|
275
|
+
};
|
|
276
|
+
PT: {
|
|
277
|
+
length: number;
|
|
278
|
+
structure: string;
|
|
279
|
+
example: string;
|
|
280
|
+
};
|
|
281
|
+
RO: {
|
|
282
|
+
length: number;
|
|
283
|
+
structure: string;
|
|
284
|
+
example: string;
|
|
285
|
+
};
|
|
286
|
+
RS: {
|
|
287
|
+
length: number;
|
|
288
|
+
structure: string;
|
|
289
|
+
example: string;
|
|
290
|
+
};
|
|
291
|
+
SA: {
|
|
292
|
+
length: number;
|
|
293
|
+
structure: string;
|
|
294
|
+
example: string;
|
|
295
|
+
};
|
|
296
|
+
SE: {
|
|
297
|
+
length: number;
|
|
298
|
+
structure: string;
|
|
299
|
+
example: string;
|
|
300
|
+
};
|
|
301
|
+
SI: {
|
|
302
|
+
length: number;
|
|
303
|
+
structure: string;
|
|
304
|
+
example: string;
|
|
305
|
+
};
|
|
306
|
+
SK: {
|
|
307
|
+
length: number;
|
|
308
|
+
structure: string;
|
|
309
|
+
example: string;
|
|
310
|
+
};
|
|
311
|
+
SM: {
|
|
312
|
+
length: number;
|
|
313
|
+
structure: string;
|
|
314
|
+
example: string;
|
|
315
|
+
};
|
|
316
|
+
ST: {
|
|
317
|
+
length: number;
|
|
318
|
+
structure: string;
|
|
319
|
+
example: string;
|
|
320
|
+
};
|
|
321
|
+
TL: {
|
|
322
|
+
length: number;
|
|
323
|
+
structure: string;
|
|
324
|
+
example: string;
|
|
325
|
+
};
|
|
326
|
+
TN: {
|
|
327
|
+
length: number;
|
|
328
|
+
structure: string;
|
|
329
|
+
example: string;
|
|
330
|
+
};
|
|
331
|
+
TR: {
|
|
332
|
+
length: number;
|
|
333
|
+
structure: string;
|
|
334
|
+
example: string;
|
|
335
|
+
};
|
|
336
|
+
VG: {
|
|
337
|
+
length: number;
|
|
338
|
+
structure: string;
|
|
339
|
+
example: string;
|
|
340
|
+
};
|
|
341
|
+
XK: {
|
|
342
|
+
length: number;
|
|
343
|
+
structure: string;
|
|
344
|
+
example: string;
|
|
345
|
+
};
|
|
346
|
+
AO: {
|
|
347
|
+
length: number;
|
|
348
|
+
structure: string;
|
|
349
|
+
example: string;
|
|
350
|
+
};
|
|
351
|
+
BF: {
|
|
352
|
+
length: number;
|
|
353
|
+
structure: string;
|
|
354
|
+
example: string;
|
|
355
|
+
};
|
|
356
|
+
BI: {
|
|
357
|
+
length: number;
|
|
358
|
+
structure: string;
|
|
359
|
+
example: string;
|
|
360
|
+
};
|
|
361
|
+
BJ: {
|
|
362
|
+
length: number;
|
|
363
|
+
structure: string;
|
|
364
|
+
example: string;
|
|
365
|
+
};
|
|
366
|
+
CI: {
|
|
367
|
+
length: number;
|
|
368
|
+
structure: string;
|
|
369
|
+
example: string;
|
|
370
|
+
};
|
|
371
|
+
CM: {
|
|
372
|
+
length: number;
|
|
373
|
+
structure: string;
|
|
374
|
+
example: string;
|
|
375
|
+
};
|
|
376
|
+
CV: {
|
|
377
|
+
length: number;
|
|
378
|
+
structure: string;
|
|
379
|
+
example: string;
|
|
380
|
+
};
|
|
381
|
+
DZ: {
|
|
382
|
+
length: number;
|
|
383
|
+
structure: string;
|
|
384
|
+
example: string;
|
|
385
|
+
};
|
|
386
|
+
IR: {
|
|
387
|
+
length: number;
|
|
388
|
+
structure: string;
|
|
389
|
+
example: string;
|
|
390
|
+
};
|
|
391
|
+
JO: {
|
|
392
|
+
length: number;
|
|
393
|
+
structure: string;
|
|
394
|
+
example: string;
|
|
395
|
+
};
|
|
396
|
+
MG: {
|
|
397
|
+
length: number;
|
|
398
|
+
structure: string;
|
|
399
|
+
example: string;
|
|
400
|
+
};
|
|
401
|
+
ML: {
|
|
402
|
+
length: number;
|
|
403
|
+
structure: string;
|
|
404
|
+
example: string;
|
|
405
|
+
};
|
|
406
|
+
MZ: {
|
|
407
|
+
length: number;
|
|
408
|
+
structure: string;
|
|
409
|
+
example: string;
|
|
410
|
+
};
|
|
411
|
+
QA: {
|
|
412
|
+
length: number;
|
|
413
|
+
structure: string;
|
|
414
|
+
example: string;
|
|
415
|
+
};
|
|
416
|
+
SN: {
|
|
417
|
+
length: number;
|
|
418
|
+
structure: string;
|
|
419
|
+
example: string;
|
|
420
|
+
};
|
|
421
|
+
UA: {
|
|
422
|
+
length: number;
|
|
423
|
+
structure: string;
|
|
424
|
+
example: string;
|
|
425
|
+
};
|
|
426
|
+
};
|
|
1
427
|
export default countries;
|
|
@@ -1,4 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parse the BBAN structure used to configure each IBAN __specification and returns a matching regular expression.
|
|
3
|
+
* A structure is composed of blocks of 3 characters (one letter and 2 digits). Each block represents
|
|
4
|
+
* a logical group in the typical representation of the BBAN. For each group, the letter indicates which characters
|
|
5
|
+
* are allowed in this group and the following 2-digits number tells the length of the group.
|
|
6
|
+
*
|
|
7
|
+
* @param structure - the structure to parse
|
|
8
|
+
* @param countryCode - the countryCode to check format against
|
|
9
|
+
*
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export declare const parseStructure: (structure: any, countryCode: any) => false | RegExp;
|
|
13
|
+
/**
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
export declare const formatIban: (iban: any) => any;
|
|
1
17
|
export type ElectronicFormat = string;
|
|
18
|
+
/**
|
|
19
|
+
* Returns any non alphanumeric characters and uppercases them
|
|
20
|
+
*
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
export declare const electronicFormat: (iban: string) => ElectronicFormat;
|
|
24
|
+
/**
|
|
25
|
+
* Lazy-loaded regex (parse the structure and construct the regular expression the first time we need it for validation)
|
|
26
|
+
*
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
export declare const regex: (iban: any, countryCode: any) => false | RegExp;
|
|
30
|
+
/**
|
|
31
|
+
* Prepare an IBAN for mod 97 computation by moving the first 4 chars to the end and transforming the letters to
|
|
32
|
+
* numbers (A = 10, B = 11, ..., Z = 35), as specified in ISO13616.
|
|
33
|
+
* @param ibanInput - The IBAN value
|
|
34
|
+
* @returns The prepared IBAN
|
|
35
|
+
*
|
|
36
|
+
* @internal
|
|
37
|
+
*/
|
|
38
|
+
export declare const iso13616Prepare: (ibanInput: any) => any;
|
|
39
|
+
/**
|
|
40
|
+
* Calculates the MOD 97 10 of the passed IBAN as specified in ISO7064.
|
|
41
|
+
*
|
|
42
|
+
* @param iban -
|
|
43
|
+
*
|
|
44
|
+
* @internal
|
|
45
|
+
*/
|
|
46
|
+
export declare const iso7064Mod97_10: (iban: any) => number;
|
|
2
47
|
/**
|
|
3
48
|
* @param countryCode -
|
|
4
49
|
* @returns Example of IBAN Number
|
|
@@ -1,9 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if `prop` is classified as an `Array` primitive or object.
|
|
3
|
+
* @internal
|
|
4
|
+
* @param prop - The value to check.
|
|
5
|
+
* @returns Returns `true` if `prop` is correctly classified, else `false`.
|
|
6
|
+
* @example
|
|
7
|
+
* ```
|
|
8
|
+
* isArray([1, 2, 3]);
|
|
9
|
+
* // => true
|
|
10
|
+
*
|
|
11
|
+
* isArray(1);
|
|
12
|
+
* // => false
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export declare function isArray(prop: any): boolean;
|
|
1
16
|
/**
|
|
2
17
|
* Generate random number using window.crypto if available - otherwise fall back toMath.random
|
|
3
18
|
*
|
|
4
19
|
* @returns Number
|
|
5
20
|
*/
|
|
6
21
|
export declare function generateRandomNumber(): number;
|
|
22
|
+
/**
|
|
23
|
+
* wait
|
|
24
|
+
*
|
|
25
|
+
* Generic, Promise based, setTimeout call
|
|
26
|
+
*
|
|
27
|
+
* ms : Number - timeout value in milliseconds
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```
|
|
31
|
+
* wait(5000).then(() => { runMyFunction() } ).catch(() => console.log('error with the timeout'));
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
/**
|
|
35
|
+
* The function existy is meant to define the existence of something.
|
|
36
|
+
* Using the loose inequality operator (!=), it is possible to distinguish between null, undefined, and everything else.
|
|
37
|
+
* @internal
|
|
38
|
+
* @param x -
|
|
39
|
+
* @returns
|
|
40
|
+
*/
|
|
41
|
+
export declare function existy(x: any): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Used to determine if something should be considered a synonym for true
|
|
44
|
+
* NOTE: The number zero is considered “truthy” by design as is '' & `{}`.
|
|
45
|
+
* If you wish to retain the behavior where 0 is a synonym for false, then do not use truthy where you might expect 0
|
|
46
|
+
* So - returns true if something is not false, undefined or null
|
|
47
|
+
* @internal
|
|
48
|
+
* @param x -
|
|
49
|
+
* @returns
|
|
50
|
+
*/
|
|
51
|
+
export declare function truthy(x: any): boolean;
|
|
7
52
|
/**
|
|
8
53
|
* Recursively compare 2 objects
|
|
9
54
|
*/
|
|
@@ -3,4 +3,11 @@ declare const selectOne: (root: any, selector: any) => any;
|
|
|
3
3
|
declare const getAttribute: (node: any, attribute: any) => any;
|
|
4
4
|
declare const on: (node: any, event: any, callback: any, useCapture?: any) => void;
|
|
5
5
|
declare const off: (node: any, event: any, callback: any, useCapture?: any) => void;
|
|
6
|
+
/**
|
|
7
|
+
* @internal
|
|
8
|
+
* Removes all children elements of the given node.
|
|
9
|
+
*
|
|
10
|
+
* @param node -
|
|
11
|
+
*/
|
|
12
|
+
declare const removeAllChildren: (node: any) => void;
|
|
6
13
|
export { getAttribute, on, off, select, selectOne, removeAllChildren };
|
|
@@ -14,4 +14,26 @@
|
|
|
14
14
|
* }
|
|
15
15
|
* ```
|
|
16
16
|
*/
|
|
17
|
-
|
|
17
|
+
/**
|
|
18
|
+
* @internal
|
|
19
|
+
* Logs errors
|
|
20
|
+
* NOTE: changed to 'let' from 'const' for the purpose of running unit tests
|
|
21
|
+
*/
|
|
22
|
+
export declare let error: any;
|
|
23
|
+
/**
|
|
24
|
+
* @internal
|
|
25
|
+
* Logs info
|
|
26
|
+
*/
|
|
27
|
+
export declare const info: any;
|
|
28
|
+
/**
|
|
29
|
+
* @internal
|
|
30
|
+
* Logs
|
|
31
|
+
* NOTE: changed to 'let' from 'const' for the purpose of running unit tests
|
|
32
|
+
*/
|
|
33
|
+
export declare let log: any;
|
|
34
|
+
/**
|
|
35
|
+
* @internal
|
|
36
|
+
* Logs warnings
|
|
37
|
+
* NOTE: changed to 'let' from 'const' for the purpose of running unit tests
|
|
38
|
+
*/
|
|
39
|
+
export declare let warn: any;
|
|
@@ -10,6 +10,21 @@ export declare const resolvePlaceholders: (i18n?: Language) => SFPlaceholdersObj
|
|
|
10
10
|
* Used by SecuredFieldsProviderHandlers
|
|
11
11
|
*/
|
|
12
12
|
export declare const getCardImageUrl: (brand: any, resources: Resources) => any;
|
|
13
|
+
/**
|
|
14
|
+
* Checks if `prop` is classified as an `Array` primitive or object.
|
|
15
|
+
* @internal
|
|
16
|
+
* @param prop - The value to check.
|
|
17
|
+
* @returns Returns `true` if `prop` is correctly classified, else `false`.
|
|
18
|
+
* @example
|
|
19
|
+
* ```
|
|
20
|
+
* isArray([1, 2, 3]);
|
|
21
|
+
* // => true
|
|
22
|
+
*
|
|
23
|
+
* isArray(1);
|
|
24
|
+
* // => false
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare function isArray(prop: any): boolean;
|
|
13
28
|
/**
|
|
14
29
|
* 'Destructures' properties from object - returns a new object only containing those properties that were asked for (including if those properties
|
|
15
30
|
* have values that are falsy: null, undefined, false, '').
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { h } from 'preact';
|
|
1
2
|
import { Order, PaymentAction, PaymentAmount, PaymentAmountExtended } from '../types';
|
|
3
|
+
import Language from '../language/Language';
|
|
2
4
|
import UIElement from './UIElement';
|
|
3
5
|
import Core from '../core';
|
|
4
6
|
import Analytics from '../core/Analytics';
|
|
@@ -89,6 +91,7 @@ export interface ActionHandledReturnObject {
|
|
|
89
91
|
actionDescription: ActionDescriptionType;
|
|
90
92
|
}
|
|
91
93
|
export interface UIElementProps extends BaseElementProps {
|
|
94
|
+
environment?: string;
|
|
92
95
|
session?: Session;
|
|
93
96
|
onChange?: (state: any, element: UIElement) => void;
|
|
94
97
|
onValid?: (state: any, element: UIElement) => void;
|
|
@@ -101,7 +104,6 @@ export interface UIElementProps extends BaseElementProps {
|
|
|
101
104
|
onPaymentCompleted?: (result: any, element: UIElement) => void;
|
|
102
105
|
beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: UIElement) => void;
|
|
103
106
|
isInstantPayment?: boolean;
|
|
104
|
-
environment?: string;
|
|
105
107
|
type?: string;
|
|
106
108
|
name?: string;
|
|
107
109
|
icon?: string;
|
|
@@ -117,6 +119,18 @@ export interface UIElementProps extends BaseElementProps {
|
|
|
117
119
|
* @defaultValue true
|
|
118
120
|
*/
|
|
119
121
|
setStatusAutomatically?: boolean;
|
|
122
|
+
/** @internal */
|
|
123
|
+
payButton?: (options: PayButtonFunctionProps) => h.JSX.Element;
|
|
124
|
+
/** @internal */
|
|
125
|
+
loadingContext?: string;
|
|
126
|
+
/** @internal */
|
|
127
|
+
createFromAction?: (action: PaymentAction, props: object) => UIElement;
|
|
128
|
+
/** @internal */
|
|
129
|
+
clientKey?: string;
|
|
130
|
+
/** @internal */
|
|
131
|
+
elementRef?: any;
|
|
132
|
+
/** @internal */
|
|
133
|
+
i18n?: Language;
|
|
120
134
|
}
|
|
121
135
|
export interface ComponentMethodsRef {
|
|
122
136
|
showValidation?: () => void;
|
|
@@ -58,5 +58,42 @@ declare class Core {
|
|
|
58
58
|
* @returns this - the element instance
|
|
59
59
|
*/
|
|
60
60
|
remove: (component: any) => this;
|
|
61
|
+
/**
|
|
62
|
+
* @internal
|
|
63
|
+
* Enhances the config object passed when AdyenCheckout is initialised (environment, clientKey, etc...)
|
|
64
|
+
* (Re)Initializes core properties & processes (i18n, paymentMethodsResponse, etc...)
|
|
65
|
+
* @param options - the config object passed when AdyenCheckout is initialised
|
|
66
|
+
* @returns this
|
|
67
|
+
*/
|
|
68
|
+
private setOptions;
|
|
69
|
+
/**
|
|
70
|
+
* @internal
|
|
71
|
+
* @param options - options that will be merged to the global Checkout props
|
|
72
|
+
* @returns props for a new UIElement
|
|
73
|
+
*/
|
|
74
|
+
private getPropsForComponent;
|
|
75
|
+
/**
|
|
76
|
+
* @internal
|
|
77
|
+
* A recursive creation function that finalises by calling itself with a reference to a valid component class which it then initialises
|
|
78
|
+
*
|
|
79
|
+
* @param PaymentMethod - type varies:
|
|
80
|
+
* - usually a string
|
|
81
|
+
* - but for Dropin, when it starts creating payment methods, will be a fully formed object from the paymentMethods response .paymentMethods or .storedPaymentMethods
|
|
82
|
+
* - always finishes up as a reference to a valid component class
|
|
83
|
+
*
|
|
84
|
+
* @param options - an object whose form varies, it is *always* enhanced with props from this.getPropsForComponent(), and can also be:
|
|
85
|
+
* - the config object passed when a Component is created via checkout.create('card'|'dropin'|'ideal'|etc..) (scenario: usual first point of entry to this function)
|
|
86
|
+
* - the internally created props object from Dropin/components/utils.getCommonProps() (scenario: Dropin creating components for its PM list)
|
|
87
|
+
* - an object extracted from the paymentMethods response .paymentMethods or .storedPaymentMethods (scenarios: Dropin creating components for its PM list *or* standalone storedCard comp)
|
|
88
|
+
* - a combination of the previous 2 + the relevant object from the paymentMethodsConfiguration (scenario: Dropin creating components for its PM list)
|
|
89
|
+
*
|
|
90
|
+
*
|
|
91
|
+
* @returns new UIElement
|
|
92
|
+
*/
|
|
93
|
+
private handleCreate;
|
|
94
|
+
/**
|
|
95
|
+
* @internal
|
|
96
|
+
*/
|
|
97
|
+
private handleCreateError;
|
|
61
98
|
}
|
|
62
99
|
export default Core;
|
|
@@ -68,6 +68,10 @@ export interface CoreOptions {
|
|
|
68
68
|
* Screen Reader configuration
|
|
69
69
|
*/
|
|
70
70
|
srConfig?: SRPanelProps;
|
|
71
|
+
/**
|
|
72
|
+
* @internal
|
|
73
|
+
*/
|
|
74
|
+
cdnContext?: string;
|
|
71
75
|
resourceEnvironment?: string;
|
|
72
76
|
analytics?: AnalyticsOptions;
|
|
73
77
|
risk?: RiskModuleOptions;
|
|
@@ -104,6 +108,10 @@ export interface CoreOptions {
|
|
|
104
108
|
* https://docs.adyen.com/online-payments/donations/web-component
|
|
105
109
|
*/
|
|
106
110
|
onCancel?(): void;
|
|
111
|
+
/**
|
|
112
|
+
* @internal
|
|
113
|
+
*/
|
|
114
|
+
loadingContext?: string;
|
|
107
115
|
}
|
|
108
116
|
export type PaymentMethodsConfiguration = {
|
|
109
117
|
[key in keyof PaymentMethods]?: Partial<PaymentMethodOptions<key>>;
|
|
@@ -88,6 +88,9 @@ export declare const defaultTranslation: {
|
|
|
88
88
|
provinceOrTerritory: string;
|
|
89
89
|
cityTown: string;
|
|
90
90
|
address: string;
|
|
91
|
+
"address.placeholder": string;
|
|
92
|
+
"address.errors.incomplete": string;
|
|
93
|
+
"address.enterManually": string;
|
|
91
94
|
state: string;
|
|
92
95
|
"field.title.optional": string;
|
|
93
96
|
"creditCard.cvcField.title.optional": string;
|