@adyen/adyen-web 5.43.1 → 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/README.md +1 -1
- package/dist/adyen.css +2 -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 +2 -0
- package/dist/cjs/adyen.css.map +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/es/adyen.css +2 -0
- package/dist/es/adyen.css.map +1 -1
- package/dist/es/index.js +1 -1
- package/dist/es.modern/adyen.css +2 -0
- package/dist/es.modern/adyen.css.map +1 -1
- package/dist/es.modern/index.js +1 -1
- package/dist/types/components/ApplePay/utils.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 +80 -0
- package/dist/types/components/CashAppPay/components/CashAppComponent.d.ts +16 -0
- package/dist/types/components/CashAppPay/defaultProps.d.ts +7 -0
- package/dist/types/components/CashAppPay/index.d.ts +1 -0
- package/dist/types/components/CashAppPay/services/CashAppSdkLoader.d.ts +9 -0
- package/dist/types/components/CashAppPay/services/CashAppService.d.ts +21 -0
- package/dist/types/components/CashAppPay/services/config.d.ts +3 -0
- package/dist/types/components/CashAppPay/services/types.d.ts +49 -0
- package/dist/types/components/CashAppPay/types.d.ts +70 -0
- 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/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/index.d.ts +2 -0
- 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/Countdown/CountdownA11yReporter.d.ts +25 -0
- package/dist/types/components/internal/Countdown/index.d.ts +3 -29
- package/dist/types/components/internal/Countdown/types.d.ts +9 -0
- package/dist/types/components/internal/Countdown/useCountdownA11yReporter.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/RedirectButton/RedirectButton.d.ts +3 -1
- 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 +14 -0
- package/dist/types/core/Errors/SRPanel.d.ts +3 -7
- package/dist/types/core/Errors/types.d.ts +6 -0
- 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 +4 -0
- package/dist/types/language/locales/index.d.ts +8 -0
- package/dist/types/language/utils.d.ts +12 -1
- 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 +2 -2
|
@@ -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,6 +1,8 @@
|
|
|
1
1
|
import { h } from 'preact';
|
|
2
|
-
declare function RedirectButton({ payButton, onSubmit, amount, name, ...props }: {
|
|
2
|
+
declare function RedirectButton({ label, icon, payButton, onSubmit, amount, name, ...props }: {
|
|
3
3
|
[x: string]: any;
|
|
4
|
+
label?: any;
|
|
5
|
+
icon?: any;
|
|
4
6
|
payButton: any;
|
|
5
7
|
onSubmit: any;
|
|
6
8
|
amount?: any;
|
|
@@ -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';
|
|
@@ -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;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h } from 'preact';
|
|
2
2
|
import './SRPanel.scss';
|
|
3
|
-
import { SRPanelProps } from './types';
|
|
3
|
+
import { AriaAttributes, SRPanelProps } from './types';
|
|
4
4
|
import BaseElement from '../../components/BaseElement';
|
|
5
5
|
/**
|
|
6
6
|
* A panel meant to hold messages that will be read out by ScreenReaders on an aria-live="polite" basis
|
|
@@ -9,12 +9,7 @@ import BaseElement from '../../components/BaseElement';
|
|
|
9
9
|
*/
|
|
10
10
|
export declare class SRPanel extends BaseElement<SRPanelProps> {
|
|
11
11
|
static type: string;
|
|
12
|
-
static defaultProps:
|
|
13
|
-
enabled: boolean;
|
|
14
|
-
node: string;
|
|
15
|
-
showPanel: boolean;
|
|
16
|
-
id: string;
|
|
17
|
-
};
|
|
12
|
+
static defaultProps: SRPanelProps;
|
|
18
13
|
private readonly srPanelContainer;
|
|
19
14
|
private readonly id;
|
|
20
15
|
private readonly showPanel;
|
|
@@ -25,6 +20,7 @@ export declare class SRPanel extends BaseElement<SRPanelProps> {
|
|
|
25
20
|
setComponentRef: (ref: any) => void;
|
|
26
21
|
get enabled(): boolean;
|
|
27
22
|
get moveFocus(): boolean;
|
|
23
|
+
setAriaProps(ariaAttributes: AriaAttributes): void;
|
|
28
24
|
setMessages: (messages: string[] | string) => void;
|
|
29
25
|
render(): h.JSX.Element;
|
|
30
26
|
}
|
|
@@ -21,12 +21,18 @@ export interface SortedErrorObject {
|
|
|
21
21
|
errorMessage: string;
|
|
22
22
|
errorCode: string;
|
|
23
23
|
}
|
|
24
|
+
export interface AriaAttributes {
|
|
25
|
+
'aria-relevant'?: 'additions' | 'all' | 'removals' | 'text' | 'additions text';
|
|
26
|
+
'aria-live'?: 'off' | 'polite' | 'assertive';
|
|
27
|
+
'aria-atomic'?: 'true' | 'false';
|
|
28
|
+
}
|
|
24
29
|
export interface SRPanelProps extends BaseElementProps {
|
|
25
30
|
enabled?: boolean;
|
|
26
31
|
node?: string;
|
|
27
32
|
showPanel?: boolean;
|
|
28
33
|
moveFocus?: boolean;
|
|
29
34
|
id?: string;
|
|
35
|
+
ariaAttributes?: AriaAttributes;
|
|
30
36
|
}
|
|
31
37
|
export interface SRMessagesProps {
|
|
32
38
|
setComponentRef: (ref: any) => void;
|