@adyen/kyc-components 2.25.3 → 2.26.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/es/adyen-kyc-components.es.js +7006 -6799
- package/dist/style.css +4949 -3257
- package/dist/types/components/Company/rules.d.ts +0 -3
- package/dist/types/components/CompanyBasics/component/CompanyBasicsComponent.d.ts +1 -1
- package/dist/types/components/CompanyBasics/types.d.ts +3 -1
- package/dist/types/components/CompanyLookup/LookupResult.d.ts +1 -0
- package/dist/types/components/CompanyLookup/component/CompanyLookupComponent.d.ts +1 -1
- package/dist/types/components/CompanyLookup/types.d.ts +1 -0
- package/dist/types/components/CompanyOtherDetails/validate.d.ts +4 -3
- package/dist/types/components/Dropins/ServiceAgreementDropinComponent/components/useServiceAgreement.d.ts +2 -2
- package/dist/types/components/IdentityNumber/formats.d.ts +2 -2
- package/dist/types/components/Individual/rules.d.ts +0 -1
- package/dist/types/components/PayoutVerificationMethod/component/AccountHolderDescriptionFragment.d.ts +7 -0
- package/dist/types/components/PayoutVerificationMethod/types.d.ts +2 -2
- package/dist/types/components/PersonalDetails/component/IdentityComponent/identityUS/component/IdentityUSComponent.d.ts +1 -1
- package/dist/types/components/PersonalDetails/component/labels.d.ts +1 -1
- package/dist/types/components/RegistrationAddress/types.d.ts +1 -0
- package/dist/types/components/internal/Address/components/SearchAddress.d.ts +1 -1
- package/dist/types/components/internal/Address/types.d.ts +2 -0
- package/dist/types/components/internal/Address/utils.d.ts +1 -1
- package/dist/types/components/internal/BusinessRegistrationNumber/fieldConfig.d.ts +12 -0
- package/dist/types/components/internal/BusinessRegistrationNumber/types.d.ts +5 -5
- package/dist/types/components/internal/ContractViewer/ContractViewer.d.ts +1 -0
- package/dist/types/components/internal/ContractViewer/types.d.ts +4 -90
- package/dist/types/components/internal/FormFields/InputBase.d.ts +1 -1
- package/dist/types/components/internal/FormFields/InputText.d.ts +1 -1
- package/dist/types/components/internal/FormFields/MaskedInputText/MaskedInputText.d.ts +22 -0
- package/dist/types/components/internal/FormFields/RadioGroup/types.d.ts +1 -1
- package/dist/types/components/internal/IdFieldTypeSelector/CompanyRegistrationNumberTypeSelector.d.ts +11 -0
- package/dist/types/components/internal/IdFieldTypeSelector/IndividualIdNumberTypeSelector.d.ts +9 -0
- package/dist/types/components/internal/IdFieldTypeSelector/VatNumberTypeSelector.d.ts +9 -0
- package/dist/types/components/internal/IdFieldTypeSelector/countryIdNumberTypes.d.ts +90 -5
- package/dist/types/components/internal/VatNumber/types.d.ts +1 -6
- package/dist/types/components/internal/VatNumber/vatNumberValidation.d.ts +2 -3
- package/dist/types/core/Context/StateContext/types.d.ts +6 -6
- package/dist/types/core/Context/StateContext/useGlobalData.d.ts +4 -4
- package/dist/types/core/hooks/useCompanySearch/types.d.ts +2 -7
- package/dist/types/core/hooks/useForm/types.d.ts +5 -4
- package/dist/types/core/models/country-config.d.ts +7 -5
- package/dist/types/core/models/field-configurations.d.ts +5 -3
- package/dist/types/language/config.d.ts +27 -26
- package/dist/types/utils/entity-status-util.d.ts +1 -1
- package/dist/types/utils/formUtils.d.ts +6 -7
- package/dist/types/utils/makeArrayOfRepeatedObjects.d.ts +1 -0
- package/dist/types/utils/mapping/documentGuidanceMap.d.ts +1 -1
- package/dist/types/utils/masking/displayValueToPureValue.d.ts +10 -0
- package/dist/types/utils/masking/maskHelpers.d.ts +6 -0
- package/dist/types/utils/masking/masks/businessRegistrationNumberMasks.d.ts +256 -0
- package/dist/types/utils/masking/masks/vatNumberMasks.d.ts +4 -0
- package/dist/types/utils/masking/matchAgainstMask.d.ts +28 -0
- package/dist/types/utils/masking/transformers/types.d.ts +1 -0
- package/dist/types/utils/masking/transformers/uppercase.d.ts +2 -0
- package/dist/types/utils/perCountry.d.ts +5 -0
- package/dist/types/utils/regex/basePatterns.d.ts +1 -2
- package/dist/types/utils/regex/businessRegistrationNumberPatterns.d.ts +160 -2
- package/dist/types/utils/regex/countryIdNumberPatterns.d.ts +3 -2
- package/dist/types/utils/regex/index.d.ts +0 -3
- package/dist/types/utils/regex/patternValidators.d.ts +3 -0
- package/dist/types/utils/regex/vatNumberPatterns.d.ts +5 -4
- package/dist/types/utils/sanitizeHtml.d.ts +3 -0
- package/package.json +6 -4
- package/dist/types/components/internal/BusinessRegistrationNumber/formatters.d.ts +0 -4
- package/dist/types/components/internal/BusinessRegistrationNumber/validate.d.ts +0 -21
- package/dist/types/components/internal/BusinessRegistrationNumberField/validate.d.ts +0 -21
- package/dist/types/components/internal/ContractViewer/ReferenceContext/ReferenceContext.d.ts +0 -10
- package/dist/types/components/internal/ContractViewer/ReferenceContext/ReferenceContextProvider.d.ts +0 -6
- package/dist/types/components/internal/ContractViewer/ReferenceContext/useReferenceContext.d.ts +0 -1
- package/dist/types/components/internal/ContractViewer/components/Chapter/Chapter.d.ts +0 -2
- package/dist/types/components/internal/ContractViewer/components/ContentElements/ContentElements.d.ts +0 -2
- package/dist/types/components/internal/ContractViewer/components/InternalReference/InternalReference.d.ts +0 -2
- package/dist/types/components/internal/ContractViewer/components/List/List.d.ts +0 -2
- package/dist/types/components/internal/ContractViewer/components/Paragraph/Paragraph.d.ts +0 -3
- package/dist/types/components/internal/ContractViewer/components/Section/Section.d.ts +0 -3
- package/dist/types/components/internal/ContractViewer/components/Table/Table.d.ts +0 -3
- package/dist/types/components/internal/ContractViewer/components/Text/Text.d.ts +0 -3
- package/dist/types/components/internal/ContractViewer/components/Weblink/Weblink.d.ts +0 -3
- package/dist/types/components/internal/ContractViewer/utils/format-id.d.ts +0 -1
- package/dist/types/components/internal/IdFieldTypeSelector/IdFieldTypeSelector.d.ts +0 -2
- package/dist/types/components/internal/IdFieldTypeSelector/types.d.ts +0 -20
- package/dist/types/utils/delay.d.ts +0 -1
- package/dist/types/utils/escapeHtml.d.ts +0 -3
- package/dist/types/utils/regex/customRegistrationNumberPatterns.d.ts +0 -2
- package/dist/types/utils/regex/trustRegistrationNumberPatterns.d.ts +0 -2
- package/dist/types/utils/regex/types.d.ts +0 -39
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
export declare const businessRegistrationNumberMasks: {
|
|
2
|
+
AT: {
|
|
3
|
+
firmenbuchnummer: {
|
|
4
|
+
mask: import("../maskTypes").Mask;
|
|
5
|
+
};
|
|
6
|
+
ZVR: {
|
|
7
|
+
mask: import("../maskTypes").Mask;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
AU: {
|
|
11
|
+
default: {
|
|
12
|
+
mask: import("../maskTypes").Mask;
|
|
13
|
+
guidanceText: {
|
|
14
|
+
key: "enterNDigitsForExample";
|
|
15
|
+
values: {
|
|
16
|
+
numDigits: string;
|
|
17
|
+
example: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
BE: {
|
|
23
|
+
default: {
|
|
24
|
+
mask: import("../maskTypes").Mask;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
BR: {
|
|
28
|
+
default: {
|
|
29
|
+
mask: import("../maskTypes").Mask;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
BG: {
|
|
33
|
+
default: {
|
|
34
|
+
mask: import("../maskTypes").Mask;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
CA: {
|
|
38
|
+
default: {
|
|
39
|
+
mask: import("../maskTypes").Mask;
|
|
40
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
HR: {
|
|
44
|
+
default: {
|
|
45
|
+
mask: import("../maskTypes").Mask;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
CY: {
|
|
49
|
+
default: {
|
|
50
|
+
mask: import("../maskTypes").Mask;
|
|
51
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
CZ: {
|
|
55
|
+
default: {
|
|
56
|
+
mask: import("../maskTypes").Mask;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
DK: {
|
|
60
|
+
default: {
|
|
61
|
+
mask: import("../maskTypes").Mask;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
EE: {
|
|
65
|
+
default: {
|
|
66
|
+
mask: import("../maskTypes").Mask;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
FI: {
|
|
70
|
+
default: {
|
|
71
|
+
mask: import("../maskTypes").Mask;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
FR: {
|
|
75
|
+
SIRET: {
|
|
76
|
+
mask: import("../maskTypes").Mask;
|
|
77
|
+
};
|
|
78
|
+
RNA: {
|
|
79
|
+
mask: import("../maskTypes").Mask;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
DE: {
|
|
83
|
+
default: {
|
|
84
|
+
mask: import("../maskTypes").Mask;
|
|
85
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
GI: {
|
|
89
|
+
default: {
|
|
90
|
+
mask: import("../maskTypes").Mask;
|
|
91
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
GR: {
|
|
95
|
+
default: {
|
|
96
|
+
mask: import("../maskTypes").Mask;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
GG: {
|
|
100
|
+
default: {
|
|
101
|
+
mask: import("../maskTypes").Mask;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
HK: {
|
|
105
|
+
default: {
|
|
106
|
+
mask: import("../maskTypes").Mask;
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
HU: {
|
|
110
|
+
default: {
|
|
111
|
+
mask: import("../maskTypes").Mask;
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
IE: {
|
|
115
|
+
default: {
|
|
116
|
+
mask: import("../maskTypes").Mask;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
IM: {
|
|
120
|
+
default: {
|
|
121
|
+
mask: import("../maskTypes").Mask;
|
|
122
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
IT: {
|
|
126
|
+
codiceFiscale: {
|
|
127
|
+
mask: import("../maskTypes").Mask;
|
|
128
|
+
};
|
|
129
|
+
CCIAA: {
|
|
130
|
+
mask: import("../maskTypes").Mask;
|
|
131
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
JE: {
|
|
135
|
+
default: {
|
|
136
|
+
mask: import("../maskTypes").Mask;
|
|
137
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
LV: {
|
|
141
|
+
default: {
|
|
142
|
+
mask: import("../maskTypes").Mask;
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
LI: {
|
|
146
|
+
default: {
|
|
147
|
+
mask: import("../maskTypes").Mask;
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
LT: {
|
|
151
|
+
default: {
|
|
152
|
+
mask: import("../maskTypes").Mask;
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
LU: {
|
|
156
|
+
default: {
|
|
157
|
+
mask: import("../maskTypes").Mask;
|
|
158
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
MT: {
|
|
162
|
+
default: {
|
|
163
|
+
mask: import("../maskTypes").Mask;
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
MC: {
|
|
167
|
+
default: {
|
|
168
|
+
mask: import("../maskTypes").Mask;
|
|
169
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
170
|
+
};
|
|
171
|
+
soleProprietorship: {
|
|
172
|
+
mask: import("../maskTypes").Mask;
|
|
173
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
NL: {
|
|
177
|
+
default: {
|
|
178
|
+
mask: import("../maskTypes").Mask;
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
NZ: {
|
|
182
|
+
NZBN: {
|
|
183
|
+
mask: import("../maskTypes").Mask;
|
|
184
|
+
};
|
|
185
|
+
companyNumberNZ: {
|
|
186
|
+
mask: import("../maskTypes").Mask;
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
NO: {
|
|
190
|
+
default: {
|
|
191
|
+
mask: import("../maskTypes").Mask;
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
PL: {
|
|
195
|
+
krsNumber: {
|
|
196
|
+
mask: import("../maskTypes").Mask;
|
|
197
|
+
};
|
|
198
|
+
regon: {
|
|
199
|
+
mask: import("../maskTypes").Mask;
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
PT: {
|
|
203
|
+
default: {
|
|
204
|
+
mask: import("../maskTypes").Mask;
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
RO: {
|
|
208
|
+
default: {
|
|
209
|
+
mask: import("../maskTypes").Mask;
|
|
210
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
SG: {
|
|
214
|
+
default: {
|
|
215
|
+
mask: import("../maskTypes").Mask;
|
|
216
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
SK: {
|
|
220
|
+
default: {
|
|
221
|
+
mask: import("../maskTypes").Mask;
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
SI: {
|
|
225
|
+
default: {
|
|
226
|
+
mask: import("../maskTypes").Mask;
|
|
227
|
+
};
|
|
228
|
+
};
|
|
229
|
+
ES: {
|
|
230
|
+
default: {
|
|
231
|
+
mask: import("../maskTypes").Mask;
|
|
232
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
SE: {
|
|
236
|
+
default: {
|
|
237
|
+
mask: import("../maskTypes").Mask;
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
CH: {
|
|
241
|
+
default: {
|
|
242
|
+
mask: import("../maskTypes").Mask;
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
GB: {
|
|
246
|
+
default: {
|
|
247
|
+
mask: import("../maskTypes").Mask;
|
|
248
|
+
transformOnType: import("../transformers/types").InputTransformer;
|
|
249
|
+
};
|
|
250
|
+
};
|
|
251
|
+
US: {
|
|
252
|
+
default: {
|
|
253
|
+
mask: import("../maskTypes").Mask;
|
|
254
|
+
};
|
|
255
|
+
};
|
|
256
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Mask, MaskToken } from './maskTypes';
|
|
2
|
+
interface CorrectResult {
|
|
3
|
+
outcome: 'partialCorrect' | 'correct';
|
|
4
|
+
displayValue: string;
|
|
5
|
+
potentialForMoreOptionalInput?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface MismatchResult {
|
|
8
|
+
outcome: 'mismatch';
|
|
9
|
+
badChar: string;
|
|
10
|
+
mismatchAtChar: number;
|
|
11
|
+
mismatchedToken: MaskToken | 'inputTooLong';
|
|
12
|
+
partialDisplayValue: string;
|
|
13
|
+
}
|
|
14
|
+
export type MaskResult = CorrectResult | MismatchResult;
|
|
15
|
+
/**
|
|
16
|
+
* Takes some pure value e.g. `NL123456` and a {@link Mask}, and returns a `partialCorrect`,
|
|
17
|
+
* `correct` or `mismatch` {@link MaskResult} accordingly.
|
|
18
|
+
*
|
|
19
|
+
* This is the inverse of {@link displayValueToPureValue}.
|
|
20
|
+
*
|
|
21
|
+
* @returns the result of matching the given value against the mask
|
|
22
|
+
* @param pureValue the pure, unformatted input value
|
|
23
|
+
* @param mask the mask to match against
|
|
24
|
+
*
|
|
25
|
+
* @see displayValueToPureValue
|
|
26
|
+
*/
|
|
27
|
+
export declare const matchAgainstMask: (pureValue: string, mask: Mask) => MaskResult;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type InputTransformer = (str: string) => string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CountryCode } from '../core/models/country-code';
|
|
2
|
+
export type PerCountry<T> = Partial<Record<CountryCode, T>>;
|
|
3
|
+
export type PerCountryAndOtherDiscriminant<T, Discriminant extends string, IncludeDefault extends boolean = true> = Partial<Record<CountryCode, (IncludeDefault extends true ? {
|
|
4
|
+
default: T;
|
|
5
|
+
} : object) & Partial<Record<Discriminant, T>>>>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { RegexValidationOptions } from './types';
|
|
2
1
|
export declare const emailPattern: RegExp;
|
|
3
|
-
export declare const lengthValidationPatterns: Record<string,
|
|
2
|
+
export declare const lengthValidationPatterns: Record<string, RegExp>;
|
|
4
3
|
export declare const bankStatementDescriptionPattern: RegExp;
|
|
@@ -1,2 +1,160 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export declare const businessRegistrationNumberPatterns: {
|
|
2
|
+
AU: {
|
|
3
|
+
default: RegExp;
|
|
4
|
+
};
|
|
5
|
+
AT: {
|
|
6
|
+
firmenbuchnummer: RegExp;
|
|
7
|
+
ZVR: RegExp;
|
|
8
|
+
};
|
|
9
|
+
BE: {
|
|
10
|
+
default: RegExp;
|
|
11
|
+
};
|
|
12
|
+
BR: {
|
|
13
|
+
default: RegExp;
|
|
14
|
+
};
|
|
15
|
+
BG: {
|
|
16
|
+
default: RegExp;
|
|
17
|
+
};
|
|
18
|
+
CA: {
|
|
19
|
+
default: RegExp;
|
|
20
|
+
};
|
|
21
|
+
HR: {
|
|
22
|
+
default: RegExp;
|
|
23
|
+
soleProprietorship: RegExp;
|
|
24
|
+
};
|
|
25
|
+
CY: {
|
|
26
|
+
default: RegExp;
|
|
27
|
+
};
|
|
28
|
+
CZ: {
|
|
29
|
+
default: RegExp;
|
|
30
|
+
};
|
|
31
|
+
DK: {
|
|
32
|
+
default: RegExp;
|
|
33
|
+
};
|
|
34
|
+
EE: {
|
|
35
|
+
default: RegExp;
|
|
36
|
+
};
|
|
37
|
+
FI: {
|
|
38
|
+
default: RegExp;
|
|
39
|
+
};
|
|
40
|
+
FR: {
|
|
41
|
+
SIRET: RegExp;
|
|
42
|
+
RNA: RegExp;
|
|
43
|
+
};
|
|
44
|
+
GI: {
|
|
45
|
+
default: RegExp;
|
|
46
|
+
};
|
|
47
|
+
DE: {
|
|
48
|
+
default: RegExp;
|
|
49
|
+
};
|
|
50
|
+
GR: {
|
|
51
|
+
default: RegExp;
|
|
52
|
+
};
|
|
53
|
+
GG: {
|
|
54
|
+
default: RegExp;
|
|
55
|
+
};
|
|
56
|
+
HK: {
|
|
57
|
+
default: RegExp;
|
|
58
|
+
};
|
|
59
|
+
HU: {
|
|
60
|
+
default: RegExp;
|
|
61
|
+
};
|
|
62
|
+
IS: {
|
|
63
|
+
default: RegExp;
|
|
64
|
+
};
|
|
65
|
+
IN: {
|
|
66
|
+
default: RegExp;
|
|
67
|
+
};
|
|
68
|
+
ID: {
|
|
69
|
+
default: RegExp;
|
|
70
|
+
};
|
|
71
|
+
IE: {
|
|
72
|
+
default: RegExp;
|
|
73
|
+
};
|
|
74
|
+
IM: {
|
|
75
|
+
default: RegExp;
|
|
76
|
+
};
|
|
77
|
+
IT: {
|
|
78
|
+
codiceFiscale: RegExp;
|
|
79
|
+
CCIAA: RegExp;
|
|
80
|
+
};
|
|
81
|
+
JP: {
|
|
82
|
+
default: RegExp;
|
|
83
|
+
};
|
|
84
|
+
JE: {
|
|
85
|
+
default: RegExp;
|
|
86
|
+
};
|
|
87
|
+
KR: {
|
|
88
|
+
default: RegExp;
|
|
89
|
+
};
|
|
90
|
+
LV: {
|
|
91
|
+
default: RegExp;
|
|
92
|
+
};
|
|
93
|
+
LI: {
|
|
94
|
+
default: RegExp;
|
|
95
|
+
};
|
|
96
|
+
LT: {
|
|
97
|
+
default: RegExp;
|
|
98
|
+
};
|
|
99
|
+
LU: {
|
|
100
|
+
default: RegExp;
|
|
101
|
+
};
|
|
102
|
+
MY: {
|
|
103
|
+
default: RegExp;
|
|
104
|
+
};
|
|
105
|
+
MT: {
|
|
106
|
+
default: RegExp;
|
|
107
|
+
};
|
|
108
|
+
MC: {
|
|
109
|
+
default: RegExp;
|
|
110
|
+
soleProprietorship: RegExp;
|
|
111
|
+
};
|
|
112
|
+
NL: {
|
|
113
|
+
default: RegExp;
|
|
114
|
+
};
|
|
115
|
+
NZ: {
|
|
116
|
+
NZBN: RegExp;
|
|
117
|
+
companyNumberNZ: RegExp;
|
|
118
|
+
};
|
|
119
|
+
NO: {
|
|
120
|
+
default: RegExp;
|
|
121
|
+
};
|
|
122
|
+
PL: {
|
|
123
|
+
krsNumber: RegExp;
|
|
124
|
+
regon: RegExp;
|
|
125
|
+
};
|
|
126
|
+
PT: {
|
|
127
|
+
default: RegExp;
|
|
128
|
+
};
|
|
129
|
+
PR: {
|
|
130
|
+
default: RegExp;
|
|
131
|
+
};
|
|
132
|
+
RO: {
|
|
133
|
+
default: RegExp;
|
|
134
|
+
};
|
|
135
|
+
SG: {
|
|
136
|
+
default: RegExp;
|
|
137
|
+
};
|
|
138
|
+
SK: {
|
|
139
|
+
default: RegExp;
|
|
140
|
+
};
|
|
141
|
+
SI: {
|
|
142
|
+
default: RegExp;
|
|
143
|
+
};
|
|
144
|
+
ES: {
|
|
145
|
+
default: RegExp;
|
|
146
|
+
};
|
|
147
|
+
SE: {
|
|
148
|
+
default: RegExp;
|
|
149
|
+
};
|
|
150
|
+
CH: {
|
|
151
|
+
default: RegExp;
|
|
152
|
+
};
|
|
153
|
+
GB: {
|
|
154
|
+
default: RegExp;
|
|
155
|
+
nonProfit: RegExp;
|
|
156
|
+
};
|
|
157
|
+
US: {
|
|
158
|
+
default: RegExp;
|
|
159
|
+
};
|
|
160
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IndividualIdNumberType } from '../../components/internal/IdFieldTypeSelector/countryIdNumberTypes';
|
|
2
|
+
import { PerCountryAndOtherDiscriminant } from '../perCountry';
|
|
2
3
|
export declare const CountryIdNumberPatterns: {
|
|
3
4
|
BR: RegExp;
|
|
4
5
|
CA: RegExp;
|
|
@@ -12,4 +13,4 @@ export declare const CountryIdNumberPatterns: {
|
|
|
12
13
|
US: RegExp;
|
|
13
14
|
US9: RegExp;
|
|
14
15
|
};
|
|
15
|
-
export declare const customPatternsPerIdNumberType:
|
|
16
|
+
export declare const customPatternsPerIdNumberType: PerCountryAndOtherDiscriminant<RegExp, IndividualIdNumberType, false>;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
export * from './basePatterns';
|
|
2
2
|
export * from './businessRegistrationNumberPatterns';
|
|
3
3
|
export * from './countryIdNumberPatterns';
|
|
4
|
-
export * from './customRegistrationNumberPatterns';
|
|
5
4
|
export * from './driversLicenseCardNumberPatterns';
|
|
6
5
|
export * from './driversLicenseNumberPatterns';
|
|
7
6
|
export * from './passportNumberPatterns';
|
|
8
7
|
export * from './proofOfIdentityCardPatterns';
|
|
9
|
-
export * from './trustRegistrationNumberPatterns';
|
|
10
|
-
export * from './types';
|
|
11
8
|
export * from './vatNumberPatterns';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ValidatorRule } from '../validation/types';
|
|
2
|
+
export declare const validateNotEmptyOnBlur: ValidatorRule<string | undefined, object>;
|
|
3
|
+
export declare const validatePatternOnBlur: <ValueType extends string, FormSchema>(pattern: RegExp) => ValidatorRule<ValueType, FormSchema>;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { TaxIdNumberType } from '../../components/internal/IdFieldTypeSelector/countryIdNumberTypes';
|
|
2
|
+
import { PerCountry, PerCountryAndOtherDiscriminant } from '../perCountry';
|
|
2
3
|
/**
|
|
3
4
|
* Countries which follow the [countryCode][something] format
|
|
4
5
|
*
|
|
5
6
|
* @example
|
|
6
7
|
* France (FR) - FR12999999999
|
|
7
8
|
*/
|
|
8
|
-
export declare const vatSpecsPerCountry:
|
|
9
|
+
export declare const vatSpecsPerCountry: PerCountry<RegExp>;
|
|
9
10
|
/**
|
|
10
11
|
* Countries which do not follow the VAT rules ie the [countryCode][something] rule,
|
|
11
12
|
* and have their own system, or event a more complex setup
|
|
@@ -14,5 +15,5 @@ export declare const vatSpecsPerCountry: CountryRegexValidation;
|
|
|
14
15
|
* Monaco (MC) - FR12345678912
|
|
15
16
|
* Greece (GR or EL) - EL123456789
|
|
16
17
|
*/
|
|
17
|
-
export declare const nonVatSpecsPerCountry:
|
|
18
|
-
export declare const customSpecsPerVatNumberType:
|
|
18
|
+
export declare const nonVatSpecsPerCountry: PerCountry<RegExp | RegExp[]>;
|
|
19
|
+
export declare const customSpecsPerVatNumberType: PerCountryAndOtherDiscriminant<RegExp, TaxIdNumberType, false>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adyen/kyc-components",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.26.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -67,12 +67,13 @@
|
|
|
67
67
|
"types:watch": "tsc --watch --preserveWatchOutput"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
+
"@adyen/openbankingsdk": "^0.1.2",
|
|
71
|
+
"@adyen/adyen-document-viewer": "^1.1.0",
|
|
70
72
|
"classnames": "^2.3.2",
|
|
73
|
+
"isomorphic-dompurify": "^0.13.0",
|
|
71
74
|
"lodash": "^4.17.21",
|
|
72
75
|
"onfido-sdk-ui": "12.3.5",
|
|
73
|
-
"preact": "^10.17.1"
|
|
74
|
-
"sanitize-html": "^2.11.0",
|
|
75
|
-
"@adyen/openbankingsdk": "^0.1.2"
|
|
76
|
+
"preact": "^10.17.1"
|
|
76
77
|
},
|
|
77
78
|
"devDependencies": {
|
|
78
79
|
"@commitlint/cli": "^17.7.1",
|
|
@@ -89,6 +90,7 @@
|
|
|
89
90
|
"@testing-library/jest-dom": "^5.17.0",
|
|
90
91
|
"@testing-library/preact": "^3.2.3",
|
|
91
92
|
"@testing-library/user-event": "^14.4.3",
|
|
93
|
+
"@types/dompurify": "^3.0.5",
|
|
92
94
|
"@types/inquirer": "^9.0.3",
|
|
93
95
|
"@types/sanitize-html": "^2.9.0",
|
|
94
96
|
"@typescript-eslint/eslint-plugin": "^5.62.0",
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { CountryCode } from '../../../core/models/country-code';
|
|
2
|
-
import { FormatRules } from '../../../utils/validation/types';
|
|
3
|
-
import { BusinessRegistrationNumberSchema } from './types';
|
|
4
|
-
export declare const getRegistrationNumberFormatters: (country: CountryCode) => FormatRules<BusinessRegistrationNumberSchema>;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { CompanyTypesValue } from '../../../core/models/api/company-types-value';
|
|
2
|
-
import { TrustTypes } from '../../../core/models/api/trust-types-value';
|
|
3
|
-
import { CountryCode } from '../../../core/models/country-code';
|
|
4
|
-
import Language from '../../../language';
|
|
5
|
-
import { TranslationKey } from '../../../language/types';
|
|
6
|
-
import { CompanyTypeValidation, TrustTypeValidation } from '../../../utils/regex';
|
|
7
|
-
import { ValidatorRule, ValidatorRules } from '../../../utils/validation/types';
|
|
8
|
-
import { BusinessRegistrationNumberSchema } from './types';
|
|
9
|
-
interface TranslationMessage {
|
|
10
|
-
translationKey: TranslationKey;
|
|
11
|
-
format?: TranslationKey | string | undefined;
|
|
12
|
-
values?: Record<string, string | number> | undefined;
|
|
13
|
-
}
|
|
14
|
-
export declare const validateBusinessRegistrationNumber: (input: string, fallbackCountry?: CountryCode | null, companyType?: keyof CompanyTypeValidation, trustType?: keyof TrustTypeValidation, registrationNumberType?: TranslationKey) => {
|
|
15
|
-
isValid: boolean;
|
|
16
|
-
translationMessage: TranslationMessage;
|
|
17
|
-
};
|
|
18
|
-
export declare const getValidationRulesPerCountryAndType: (country: CountryCode, companyType: CompanyTypesValue | undefined, trustType: TrustTypes | undefined, i18n: Language, registrationNumberType?: TranslationKey) => ValidatorRule<string | undefined, BusinessRegistrationNumberSchema>;
|
|
19
|
-
export declare const defaultValidationRule: ValidatorRule<string | undefined, BusinessRegistrationNumberSchema>;
|
|
20
|
-
export declare const getRegistrationNumberValidationRules: (country: CountryCode, companyType: CompanyTypesValue | undefined, trustType: TrustTypes | undefined, i18n: Language, registrationNumberType?: TranslationKey) => ValidatorRules<BusinessRegistrationNumberSchema>;
|
|
21
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { CompanyTypesValue } from '../../../core/models/api/company-types-value';
|
|
2
|
-
import { TrustTypes } from '../../../core/models/api/trust-types-value';
|
|
3
|
-
import { CountryCode } from '../../../core/models/country-code';
|
|
4
|
-
import Language from '../../../language/Language';
|
|
5
|
-
import { TranslationKey } from '../../../language/types';
|
|
6
|
-
import { CompanyTypeValidation, TrustTypeValidation } from '../../../utils/regex';
|
|
7
|
-
import { ValidatorRule, ValidatorRules } from '../../../utils/validation/types';
|
|
8
|
-
import { BusinessRegistrationNumberFieldSchema } from './types';
|
|
9
|
-
interface TranslationMessage {
|
|
10
|
-
translationKey: TranslationKey;
|
|
11
|
-
format?: TranslationKey | string | undefined;
|
|
12
|
-
values?: Record<string, string | number> | undefined;
|
|
13
|
-
}
|
|
14
|
-
export declare const validateBusinessRegistrationNumber: (input: string, fallbackCountry?: CountryCode | null, companyType?: keyof CompanyTypeValidation, trustType?: keyof TrustTypeValidation, registrationNumberType?: TranslationKey) => {
|
|
15
|
-
isValid: boolean;
|
|
16
|
-
translationMessage: TranslationMessage;
|
|
17
|
-
};
|
|
18
|
-
export declare const getValidationRulesPerCountryAndType: (country: CountryCode, companyType: CompanyTypesValue | undefined, trustType: TrustTypes | undefined, i18n: Language, registrationNumberType?: TranslationKey) => ValidatorRule<string | undefined, BusinessRegistrationNumberFieldSchema>;
|
|
19
|
-
export declare const defaultValidationRule: ValidatorRule<string | undefined, BusinessRegistrationNumberFieldSchema>;
|
|
20
|
-
export declare const BusinessRegistrationNumberValidation: (country: CountryCode, i18n: Language, companyType?: CompanyTypesValue, trustType?: TrustTypes, registrationNumberType?: TranslationKey) => ValidatorRules<BusinessRegistrationNumberFieldSchema>;
|
|
21
|
-
export {};
|
package/dist/types/components/internal/ContractViewer/ReferenceContext/ReferenceContext.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export interface ReferenceContextValue {
|
|
2
|
-
references: References;
|
|
3
|
-
addReference: (references: References) => void;
|
|
4
|
-
}
|
|
5
|
-
export interface References {
|
|
6
|
-
[label: string]: {
|
|
7
|
-
openSection: () => void;
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
export declare const ReferenceContext: import("preact").Context<ReferenceContextValue>;
|
package/dist/types/components/internal/ContractViewer/ReferenceContext/useReferenceContext.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function useReferenceContext(): import("./ReferenceContext").ReferenceContextValue;
|