@adyen/kyc-components 2.66.0 → 2.67.1
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 +53 -46
- package/dist/es/external-link-B2BGNXtd.js +5 -0
- package/dist/style.css +11 -9
- package/dist/types/components/Dropins/HighExposureDropin/components/AmountSelector/types.d.ts +2 -1
- package/dist/types/components/FinancialInformation/component/ReportedValue.d.ts +2 -1
- package/dist/types/components/PersonalDetails/component/IdentityComponent/IdentityAu/component/DriversLicense.d.ts +2 -1
- package/dist/types/components/PersonalDetails/component/IdentityComponent/IdentityNZ/component/DriversLicense.d.ts +2 -1
- package/dist/types/components/PersonalDetails/component/IdentityComponent/TypeOfIdentity/index.d.ts +2 -1
- package/dist/types/components/internal/FormFields/Field/Field.d.ts +1 -1
- package/dist/types/components/internal/FormFields/Field/types.d.ts +2 -2
- package/dist/types/components/internal/FormFields/MaskedInputText/MaskedInputText.d.ts +2 -1
- package/dist/types/components/internal/LegalFormField/types.d.ts +2 -1
- package/dist/types/components/internal/NaceCodeField/types.d.ts +2 -1
- package/dist/types/components/internal/Svg/svgs.d.ts +1 -0
- package/dist/types/core/hooks/useForm/types.d.ts +1 -1
- package/dist/types/utils/formUtils.d.ts +2 -2
- package/package.json +1 -1
|
@@ -2172,7 +2172,7 @@ const formUtilities = (props, i18n) => ({
|
|
|
2172
2172
|
getErrorMessage: (field, errors, fieldProblems) => {
|
|
2173
2173
|
var _a;
|
|
2174
2174
|
const errorMessage = (_a = errors == null ? void 0 : errors[field]) == null ? void 0 : _a.errorMessage;
|
|
2175
|
-
return errorMessage
|
|
2175
|
+
return errorMessage || Boolean(fieldProblems == null ? void 0 : fieldProblems[field]);
|
|
2176
2176
|
},
|
|
2177
2177
|
getFieldData: (formData, fieldKeys) => getDataByFields(formData, fieldKeys),
|
|
2178
2178
|
getFieldValid: (formValid, fieldKeys) => entriesOf(formValid).reduce(
|
|
@@ -2183,7 +2183,7 @@ const formUtilities = (props, i18n) => ({
|
|
|
2183
2183
|
var _a;
|
|
2184
2184
|
if (fieldKeys.includes(key)) {
|
|
2185
2185
|
const error = (_a = formErrors == null ? void 0 : formErrors[key]) == null ? void 0 : _a.errorMessage;
|
|
2186
|
-
return error ? { ...acc, [key]:
|
|
2186
|
+
return error ? { ...acc, [key]: error } : { ...acc, [key]: Boolean(fieldProblems == null ? void 0 : fieldProblems[key]) };
|
|
2187
2187
|
}
|
|
2188
2188
|
return acc;
|
|
2189
2189
|
}, {}),
|
|
@@ -2327,6 +2327,7 @@ const svgs = {
|
|
|
2327
2327
|
document: lazy(() => import("./document-1-BN3bKHzc.js")),
|
|
2328
2328
|
download: lazy(() => import("./download-Doa1e9Lk.js")),
|
|
2329
2329
|
edit: lazy(() => import("./edit-1-CfwIJ2-1.js")),
|
|
2330
|
+
"external-link": lazy(() => import("./external-link-B2BGNXtd.js")),
|
|
2330
2331
|
"field-error": lazy(
|
|
2331
2332
|
() => import("./warning-circle-fill-FaaY90uz.js")
|
|
2332
2333
|
),
|
|
@@ -2732,15 +2733,16 @@ const Link = ({
|
|
|
2732
2733
|
const target = external ? "_blank" : "_self";
|
|
2733
2734
|
const rel = external ? "external noopener noreferrer" : void 0;
|
|
2734
2735
|
const showIcon = icon || external;
|
|
2736
|
+
const iconLeft = showIcon && iconPosition === "left" && !external;
|
|
2735
2737
|
const classNames = showAsButton ? cx("adyen-kyc-button", className, {
|
|
2736
|
-
"adyen-kyc-button--icon-left":
|
|
2738
|
+
"adyen-kyc-button--icon-left": iconLeft
|
|
2737
2739
|
}) : cx("adyen-kyc-link", className, {
|
|
2738
2740
|
"adyen-kyc-link--with-icon": showIcon,
|
|
2739
|
-
"adyen-kyc-link--icon-left":
|
|
2741
|
+
"adyen-kyc-link--icon-left": iconLeft
|
|
2740
2742
|
});
|
|
2741
2743
|
return /* @__PURE__ */ jsxs("a", { href, className: classNames, target, rel, onClick, children: [
|
|
2742
2744
|
/* @__PURE__ */ jsx("span", { className: "adyen-kyc-link__text adyen-kyc-link--inherit", children }),
|
|
2743
|
-
showIcon &&
|
|
2745
|
+
showIcon && /* @__PURE__ */ jsx(Icon, { name: external ? "external-link" : icon, className: "adyen-kyc-link__icon" })
|
|
2744
2746
|
] });
|
|
2745
2747
|
};
|
|
2746
2748
|
const NavigateToFieldLink = ({ fieldName, label }) => {
|
|
@@ -3760,7 +3762,7 @@ const Field = ({
|
|
|
3760
3762
|
});
|
|
3761
3763
|
useEffect(() => {
|
|
3762
3764
|
if (!errorMessage) return;
|
|
3763
|
-
const returnValue = typeof errorMessage === "string" && errorMessage || "invalid";
|
|
3765
|
+
const returnValue = typeof errorMessage === "string" && errorMessage || typeof errorMessage === "object" && errorMessage.key || "invalid";
|
|
3764
3766
|
userEvents.addFieldEvent("Encountered error", {
|
|
3765
3767
|
actionType: "input",
|
|
3766
3768
|
field: name,
|
|
@@ -3835,20 +3837,20 @@ const Field = ({
|
|
|
3835
3837
|
uniqueId
|
|
3836
3838
|
}),
|
|
3837
3839
|
helper && helperPosition === "below" && /* @__PURE__ */ jsx("span", { className: "adyen-kyc-helper-text adyen-kyc-helper-text__below", children: helper }),
|
|
3838
|
-
isLoading && /* @__PURE__ */ jsx("span", { className: "adyen-kyc-input__inline-validation
|
|
3840
|
+
isLoading && /* @__PURE__ */ jsx("span", { className: "adyen-kyc-input__inline-validation", children: /* @__PURE__ */ jsx(Loader, { size: "small" }) }),
|
|
3839
3841
|
isValid && /* @__PURE__ */ jsx("span", { className: "adyen-kyc-input__inline-validation adyen-kyc-input__inline-validation--valid", children: /* @__PURE__ */ jsx(Icon, { name: "check" }) }),
|
|
3840
3842
|
!!errorMessage && !showErrorIconBottom && /* @__PURE__ */ jsx("span", { className: "adyen-kyc-input__inline-validation adyen-kyc-input__inline-validation--invalid", children: /* @__PURE__ */ jsx(Icon, { name: "field-error" }) })
|
|
3841
3843
|
]
|
|
3842
3844
|
}
|
|
3843
3845
|
),
|
|
3844
|
-
!!errorMessage && /* @__PURE__ */ jsxs(
|
|
3846
|
+
!!errorMessage && typeof errorMessage !== "boolean" && /* @__PURE__ */ jsxs(
|
|
3845
3847
|
"span",
|
|
3846
3848
|
{
|
|
3847
3849
|
"aria-live": "polite",
|
|
3848
3850
|
className: "adyen-kyc-error-text",
|
|
3849
3851
|
id: `${uniqueId}${ARIA_ERROR_SUFFIX}`,
|
|
3850
3852
|
children: [
|
|
3851
|
-
errorMessage,
|
|
3853
|
+
isValidElement(errorMessage) ? errorMessage : i18n.get(errorMessage),
|
|
3852
3854
|
showErrorIconBottom && /* @__PURE__ */ jsx("span", { className: "adyen-kyc-input__inline-validation adyen-kyc-input__inline-validation--invalid-bottom", children: /* @__PURE__ */ jsx(Icon, { name: "field-error" }) })
|
|
3853
3855
|
]
|
|
3854
3856
|
}
|
|
@@ -7460,7 +7462,8 @@ const deriveInputState = (isValid, isFocused, isDisabled, isOptional, hasNullish
|
|
|
7460
7462
|
if (!isValid && (shouldValidate || hasBlurred))
|
|
7461
7463
|
return {
|
|
7462
7464
|
isError: true,
|
|
7463
|
-
|
|
7465
|
+
errorMessage,
|
|
7466
|
+
text: formatGuidance
|
|
7464
7467
|
};
|
|
7465
7468
|
return {
|
|
7466
7469
|
isError: false
|
|
@@ -7615,20 +7618,9 @@ Falling back to partially valid value "${fallback}"`
|
|
|
7615
7618
|
inputEl.value = newMaskResult.displayValue;
|
|
7616
7619
|
onInput(newPureValue);
|
|
7617
7620
|
};
|
|
7618
|
-
const getErrorMessage = () => {
|
|
7619
|
-
if (inputState.isError) {
|
|
7620
|
-
if (helper) {
|
|
7621
|
-
return /* @__PURE__ */ jsxs("span", { children: [
|
|
7622
|
-
/* @__PURE__ */ jsx("div", { children: helper }),
|
|
7623
|
-
/* @__PURE__ */ jsx("div", { children: inputState.text })
|
|
7624
|
-
] });
|
|
7625
|
-
}
|
|
7626
|
-
return inputState.text ?? true;
|
|
7627
|
-
}
|
|
7628
|
-
};
|
|
7629
7621
|
const getHelper = () => {
|
|
7630
7622
|
if (inputState.isError) {
|
|
7631
|
-
return;
|
|
7623
|
+
return inputState.text;
|
|
7632
7624
|
}
|
|
7633
7625
|
if (helper) {
|
|
7634
7626
|
return /* @__PURE__ */ jsxs("span", { children: [
|
|
@@ -7644,7 +7636,7 @@ Falling back to partially valid value "${fallback}"`
|
|
|
7644
7636
|
name,
|
|
7645
7637
|
label,
|
|
7646
7638
|
isValid: !inputState.isError,
|
|
7647
|
-
errorMessage:
|
|
7639
|
+
errorMessage: inputState.errorMessage || inputState.isError,
|
|
7648
7640
|
helper: getHelper(),
|
|
7649
7641
|
helperPosition,
|
|
7650
7642
|
classNameModifiers: classNameModifiers == null ? void 0 : classNameModifiers.field,
|
|
@@ -15151,7 +15143,7 @@ const mapLegalEntityToSoleProp = (legalEntity) => {
|
|
|
15151
15143
|
return solePropCompData;
|
|
15152
15144
|
};
|
|
15153
15145
|
const mapSolePropToLegalEntity = (data) => {
|
|
15154
|
-
var _a, _b;
|
|
15146
|
+
var _a, _b, _c, _d;
|
|
15155
15147
|
const requestObj = {
|
|
15156
15148
|
...formatObject(data, solePropApiKeyMapping)
|
|
15157
15149
|
};
|
|
@@ -15172,6 +15164,7 @@ const mapSolePropToLegalEntity = (data) => {
|
|
|
15172
15164
|
delete requestObj.soleProprietorship.vatNumber;
|
|
15173
15165
|
delete requestObj.soleProprietorship.registrationNumber;
|
|
15174
15166
|
}
|
|
15167
|
+
requestObj.soleProprietorship.doingBusinessAs = ((_c = data.solePropRegistrationDetails) == null ? void 0 : _c.dbaName) || ((_d = data.solePropRegistrationDetails) == null ? void 0 : _d.tradingName) || "";
|
|
15175
15168
|
requestObj.type = LegalEntityType.SOLE_PROPRIETORSHIP;
|
|
15176
15169
|
return requestObj;
|
|
15177
15170
|
};
|
|
@@ -15360,7 +15353,7 @@ const documentTypeValidationRules$1 = {
|
|
|
15360
15353
|
}
|
|
15361
15354
|
};
|
|
15362
15355
|
function IdDocumentManualUploadComponent(props) {
|
|
15363
|
-
var _a;
|
|
15356
|
+
var _a, _b;
|
|
15364
15357
|
const { i18n } = useI18nContext();
|
|
15365
15358
|
const [idFrontPage, setIdFrontPage] = useState({});
|
|
15366
15359
|
const [idBackPage, setIdBackPage] = useState({});
|
|
@@ -15384,9 +15377,9 @@ function IdDocumentManualUploadComponent(props) {
|
|
|
15384
15377
|
fieldProblems: props == null ? void 0 : props.fieldValidationErrors
|
|
15385
15378
|
});
|
|
15386
15379
|
useEffect(() => {
|
|
15387
|
-
var _a2,
|
|
15380
|
+
var _a2, _b2, _c, _d;
|
|
15388
15381
|
if ((_a2 = props.data) == null ? void 0 : _a2.idDocumentType) {
|
|
15389
|
-
setData("idDocumentType", (
|
|
15382
|
+
setData("idDocumentType", (_b2 = props.data) == null ? void 0 : _b2.idDocumentType);
|
|
15390
15383
|
setIdFrontPage({ idFrontPage: (_c = props.data) == null ? void 0 : _c.idFrontPage });
|
|
15391
15384
|
setIdBackPage({ idBackPage: (_d = props.data) == null ? void 0 : _d.idBackPage });
|
|
15392
15385
|
triggerValidation();
|
|
@@ -15409,8 +15402,8 @@ function IdDocumentManualUploadComponent(props) {
|
|
|
15409
15402
|
...hasBack ? ["idBackPage"] : []
|
|
15410
15403
|
];
|
|
15411
15404
|
useEffect(() => {
|
|
15412
|
-
var _a2,
|
|
15413
|
-
(
|
|
15405
|
+
var _a2, _b2;
|
|
15406
|
+
(_b2 = (_a2 = stateRef.current) == null ? void 0 : _a2.setState) == null ? void 0 : _b2.call(_a2, {
|
|
15414
15407
|
type: "addToState",
|
|
15415
15408
|
value: {
|
|
15416
15409
|
data,
|
|
@@ -15428,8 +15421,8 @@ function IdDocumentManualUploadComponent(props) {
|
|
|
15428
15421
|
prevState,
|
|
15429
15422
|
changeInitiatedBy
|
|
15430
15423
|
}) => {
|
|
15431
|
-
var _a2,
|
|
15432
|
-
if (changeInitiatedBy === "idDocument" && ((
|
|
15424
|
+
var _a2, _b2, _c, _d, _e, _f;
|
|
15425
|
+
if (changeInitiatedBy === "idDocument" && ((_b2 = (_a2 = currentState == null ? void 0 : currentState.data) == null ? void 0 : _a2.idDocument) == null ? void 0 : _b2.idDocumentType) !== ((_d = (_c = prevState == null ? void 0 : prevState.data) == null ? void 0 : _c.idDocument) == null ? void 0 : _d.idDocumentType)) {
|
|
15433
15426
|
const idDocumentType = (_f = (_e = currentState.data) == null ? void 0 : _e.idDocument) == null ? void 0 : _f.idDocumentType;
|
|
15434
15427
|
const document2 = idDocumentType ? getDocument$1(props.legalEntityId, idDocumentType) : void 0;
|
|
15435
15428
|
if (!document2) {
|
|
@@ -15470,7 +15463,7 @@ function IdDocumentManualUploadComponent(props) {
|
|
|
15470
15463
|
{
|
|
15471
15464
|
name: "idDocumentType",
|
|
15472
15465
|
label: i18n.get("selectDocumentType"),
|
|
15473
|
-
errorMessage:
|
|
15466
|
+
errorMessage: (_b = errors.idDocumentType) == null ? void 0 : _b.errorMessage,
|
|
15474
15467
|
isValid: valid.idDocumentType,
|
|
15475
15468
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
15476
15469
|
Select,
|
|
@@ -20044,6 +20037,13 @@ class IFrameWidget {
|
|
|
20044
20037
|
const WIDGET_IFRAME_CLASS = "adyen-kyc-bank-verification-widget";
|
|
20045
20038
|
const WIDGET_CONTAINER_CLASS = `${WIDGET_IFRAME_CLASS}-container`;
|
|
20046
20039
|
const EMPTY_WIDGET_CONTAINER_ANIMATION = "adyen-kyc:empty-bank-verification-widget-container";
|
|
20040
|
+
const trackVerificationError = (returnValue) => {
|
|
20041
|
+
userEvents.addPageEvent("Encountered error", {
|
|
20042
|
+
actionType: "add",
|
|
20043
|
+
returnType: "sdk error",
|
|
20044
|
+
returnValue
|
|
20045
|
+
});
|
|
20046
|
+
};
|
|
20047
20047
|
const DEFAULT_ERROR = {
|
|
20048
20048
|
error: "UNKNOWN_ERROR",
|
|
20049
20049
|
message: `We couldn't complete the account check. Please try again later or provide account details manually.`
|
|
@@ -20130,20 +20130,23 @@ function BankVerificationWidget({
|
|
|
20130
20130
|
link: url,
|
|
20131
20131
|
successHandler: (code, state) => {
|
|
20132
20132
|
createTrustedTransferInstrument2(code, state).then((res) => {
|
|
20133
|
+
userEvents.addPageEvent("Success", { actionType: "add" });
|
|
20133
20134
|
if (res) {
|
|
20134
20135
|
widgetCallback({
|
|
20135
20136
|
action: "verification_success",
|
|
20136
20137
|
result: res
|
|
20137
20138
|
});
|
|
20138
20139
|
}
|
|
20139
|
-
}).catch(
|
|
20140
|
-
()
|
|
20140
|
+
}).catch(() => {
|
|
20141
|
+
trackVerificationError(DEFAULT_ERROR.error);
|
|
20142
|
+
widgetCallback({
|
|
20141
20143
|
action: "handle_exception",
|
|
20142
20144
|
err: DEFAULT_ERROR
|
|
20143
|
-
})
|
|
20144
|
-
);
|
|
20145
|
+
});
|
|
20146
|
+
});
|
|
20145
20147
|
},
|
|
20146
20148
|
errorHandler: (errorCode, errorMessage, state, metadata) => {
|
|
20149
|
+
trackVerificationError(errorCode);
|
|
20147
20150
|
handleBankVerificationError2 == null ? void 0 : handleBankVerificationError2(errorCode, errorMessage, state, metadata).then(
|
|
20148
20151
|
(error) => widgetCallback({
|
|
20149
20152
|
action: "handle_exception",
|
|
@@ -20173,6 +20176,7 @@ function BankVerificationWidget({
|
|
|
20173
20176
|
action: "verification_success",
|
|
20174
20177
|
result
|
|
20175
20178
|
});
|
|
20179
|
+
userEvents.addPageEvent("Success", { actionType: "add" });
|
|
20176
20180
|
} catch (err) {
|
|
20177
20181
|
if (err instanceof AdyenKycSdkError) {
|
|
20178
20182
|
switch (err.message) {
|
|
@@ -20199,6 +20203,9 @@ function BankVerificationWidget({
|
|
|
20199
20203
|
});
|
|
20200
20204
|
}
|
|
20201
20205
|
}
|
|
20206
|
+
trackVerificationError(
|
|
20207
|
+
err instanceof AdyenKycSdkError ? err.message : "sdk error"
|
|
20208
|
+
);
|
|
20202
20209
|
return widgetCallback({
|
|
20203
20210
|
action: "handle_exception",
|
|
20204
20211
|
err
|
|
@@ -30211,7 +30218,7 @@ const BusinessTypeSelection = ({
|
|
|
30211
30218
|
{
|
|
30212
30219
|
name: "businessType",
|
|
30213
30220
|
useLabelElement: false,
|
|
30214
|
-
errorMessage:
|
|
30221
|
+
errorMessage: (_i = errors.businessType) == null ? void 0 : _i.errorMessage,
|
|
30215
30222
|
showErrorIconBottom: true,
|
|
30216
30223
|
isValid: valid.businessType,
|
|
30217
30224
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
@@ -30237,7 +30244,7 @@ const BusinessTypeSelection = ({
|
|
|
30237
30244
|
{
|
|
30238
30245
|
name: "legalArrangement",
|
|
30239
30246
|
useLabelElement: false,
|
|
30240
|
-
errorMessage:
|
|
30247
|
+
errorMessage: (_j = errors.legalArrangement) == null ? void 0 : _j.errorMessage,
|
|
30241
30248
|
showErrorIconBottom: true,
|
|
30242
30249
|
isValid: valid.legalArrangement,
|
|
30243
30250
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
@@ -30265,7 +30272,7 @@ const BusinessTypeSelection = ({
|
|
|
30265
30272
|
label: i18n.get("whatTypeOfTrusteeAreYou"),
|
|
30266
30273
|
className: "adyen-kyc-u-margin-top-32",
|
|
30267
30274
|
useLabelElement: false,
|
|
30268
|
-
errorMessage:
|
|
30275
|
+
errorMessage: (_l = errors.trusteeType) == null ? void 0 : _l.errorMessage,
|
|
30269
30276
|
showErrorIconBottom: true,
|
|
30270
30277
|
isValid: valid.trusteeType,
|
|
30271
30278
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
@@ -33804,7 +33811,7 @@ function PciDropinComponent({
|
|
|
33804
33811
|
label: i18n.get("signer"),
|
|
33805
33812
|
classNameModifiers: ["col-50"],
|
|
33806
33813
|
className: "adyen-kyc-u-margin-y-32",
|
|
33807
|
-
errorMessage:
|
|
33814
|
+
errorMessage: (_c = errors.signer) == null ? void 0 : _c.errorMessage,
|
|
33808
33815
|
isValid: valid.signer,
|
|
33809
33816
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
33810
33817
|
Select,
|
|
@@ -33823,7 +33830,7 @@ function PciDropinComponent({
|
|
|
33823
33830
|
Field,
|
|
33824
33831
|
{
|
|
33825
33832
|
name: "acceptPci",
|
|
33826
|
-
errorMessage:
|
|
33833
|
+
errorMessage: (_d = errors.acceptPci) == null ? void 0 : _d.errorMessage,
|
|
33827
33834
|
isValid: valid.acceptPci,
|
|
33828
33835
|
showErrorIconBottom: true,
|
|
33829
33836
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
@@ -34966,7 +34973,7 @@ function ServiceAgreementDropinComponent({
|
|
|
34966
34973
|
label: i18n.get("signer"),
|
|
34967
34974
|
classNameModifiers: ["col-50"],
|
|
34968
34975
|
className: "adyen-kyc-u-margin-top-32",
|
|
34969
|
-
errorMessage:
|
|
34976
|
+
errorMessage: (_a = errors.signer) == null ? void 0 : _a.errorMessage,
|
|
34970
34977
|
isValid: valid.signer,
|
|
34971
34978
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
34972
34979
|
Select,
|
|
@@ -34987,7 +34994,7 @@ function ServiceAgreementDropinComponent({
|
|
|
34987
34994
|
{
|
|
34988
34995
|
name: "acceptServiceAgreement",
|
|
34989
34996
|
className: "adyen-kyc-u-margin-top-16",
|
|
34990
|
-
errorMessage:
|
|
34997
|
+
errorMessage: (_b = errors.acceptServiceAgreement) == null ? void 0 : _b.errorMessage,
|
|
34991
34998
|
isValid: valid.acceptServiceAgreement,
|
|
34992
34999
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
34993
35000
|
Checkbox,
|
|
@@ -39649,7 +39656,7 @@ const ConfigurationApiProvider = ({
|
|
|
39649
39656
|
}) => {
|
|
39650
39657
|
const authContext = useAuthContext();
|
|
39651
39658
|
const { isEmbeddedDropin, loadingContext } = authContext;
|
|
39652
|
-
const sdkVersion = "2.
|
|
39659
|
+
const sdkVersion = "2.67.1";
|
|
39653
39660
|
useAnalytics({
|
|
39654
39661
|
onUserEvent,
|
|
39655
39662
|
legalEntityId: rootLegalEntityId,
|
|
@@ -40283,7 +40290,7 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
|
|
|
40283
40290
|
};
|
|
40284
40291
|
const copyToClipboard = async () => {
|
|
40285
40292
|
const toCopy = {
|
|
40286
|
-
sdkVersion: "2.
|
|
40293
|
+
sdkVersion: "2.67.1",
|
|
40287
40294
|
experiments: Object.fromEntries(allExperimentsWithValues),
|
|
40288
40295
|
settings: Object.fromEntries(allSettingsWithValues)
|
|
40289
40296
|
};
|
|
@@ -40348,7 +40355,7 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
|
|
|
40348
40355
|
/* @__PURE__ */ jsx("div", { className: "adyen-kyc-debug-modal__meta", children: /* @__PURE__ */ jsx("table", { children: /* @__PURE__ */ jsxs("tbody", { children: [
|
|
40349
40356
|
/* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsxs("td", { children: [
|
|
40350
40357
|
/* @__PURE__ */ jsx("span", { className: "adyen-kyc-debug-modal__table-key", children: "SDK version" }),
|
|
40351
|
-
/* @__PURE__ */ jsx(Tag, { variant: "green", className: "adyen-kyc-tag--large", children: "2.
|
|
40358
|
+
/* @__PURE__ */ jsx(Tag, { variant: "green", className: "adyen-kyc-tag--large", children: "2.67.1" })
|
|
40352
40359
|
] }) }),
|
|
40353
40360
|
/* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsxs("td", { children: [
|
|
40354
40361
|
/* @__PURE__ */ jsx("span", { className: "adyen-kyc-debug-modal__table-key", children: "rootLegalEntityId" }),
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx } from "preact/compat/jsx-runtime";
|
|
2
|
+
const SvgExternalLink = (props) => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: 16, height: 16, fill: "none", role: "img", ...props, children: /* @__PURE__ */ jsx("path", { fill: "#00112C", d: "M2.93933 11.9999L10.1893 4.74989H5.24999V3.24989H12.75V10.7499H11.25V5.81055L3.99999 13.0605L2.93933 11.9999Z" }) });
|
|
3
|
+
export {
|
|
4
|
+
SvgExternalLink as default
|
|
5
|
+
};
|
package/dist/style.css
CHANGED
|
@@ -255,24 +255,25 @@ button[disabled]:hover {
|
|
|
255
255
|
color: var(--adyen-sdk-color-link-primary-active, #8d95a3);
|
|
256
256
|
}
|
|
257
257
|
.adyen-kyc-link:focus {
|
|
258
|
-
|
|
259
|
-
|
|
258
|
+
box-shadow: 0 0 0 var(--adyen-sdk-focus-ring-spacer, 1px) var(--adyen-sdk-color-background-primary, #ffffff), 0 0 0 var(--adyen-sdk-focus-ring-outline, 3px) var(--adyen-sdk-focus-ring-color, rgba(0, 112, 245, 0.8));
|
|
259
|
+
border-radius: var(--adyen-sdk-border-radius-xs, 2px);
|
|
260
|
+
transition: var(--adyen-sdk-animation-duration-fast, 100ms) var(--adyen-sdk-animation-easing-standard, cubic-bezier(0.2, 0, 0.4, 0.9));
|
|
261
|
+
transition-property: box-shadow;
|
|
260
262
|
}
|
|
261
263
|
.adyen-kyc-link:visited {
|
|
262
264
|
color: var(--adyen-sdk-color-link-primary, #00112c);
|
|
263
265
|
}
|
|
264
|
-
.adyen-kyc-link--with-icon
|
|
265
|
-
|
|
266
|
+
.adyen-kyc-link--with-icon {
|
|
267
|
+
display: inline-flex;
|
|
268
|
+
width: fit-content;
|
|
269
|
+
gap: var(--adyen-sdk-spacer-020, 4px);
|
|
266
270
|
}
|
|
267
271
|
.adyen-kyc-link--with-icon:hover {
|
|
268
272
|
color: var(--adyen-sdk-color-link-primary-hover, #5c687c);
|
|
269
|
-
margin-right: var(--adyen-sdk-spacer-000, 0px);
|
|
270
273
|
text-decoration: none;
|
|
271
274
|
}
|
|
272
275
|
.adyen-kyc-link--icon-left {
|
|
273
|
-
display: inline-flex;
|
|
274
276
|
flex-direction: row-reverse;
|
|
275
|
-
gap: var(--adyen-sdk-spacer-020, 4px);
|
|
276
277
|
}
|
|
277
278
|
.adyen-kyc-link__text {
|
|
278
279
|
display: inline;
|
|
@@ -1329,6 +1330,7 @@ button[disabled]:hover {
|
|
|
1329
1330
|
right: 14px;
|
|
1330
1331
|
transform: translateY(-50%);
|
|
1331
1332
|
width: 16px;
|
|
1333
|
+
top: var(--adyen-sdk-spacer-080, 20px);
|
|
1332
1334
|
}
|
|
1333
1335
|
.adyen-kyc-input__inline-validation--valid {
|
|
1334
1336
|
color: var(--adyen-sdk-color-label-success, #07893c);
|
|
@@ -1336,7 +1338,6 @@ button[disabled]:hover {
|
|
|
1336
1338
|
}
|
|
1337
1339
|
.adyen-kyc-input__inline-validation--invalid {
|
|
1338
1340
|
color: var(--adyen-sdk-color-label-critical, #e22d2d);
|
|
1339
|
-
top: 50%;
|
|
1340
1341
|
}
|
|
1341
1342
|
.adyen-kyc-input__inline-validation--invalid-bottom {
|
|
1342
1343
|
top: var(--adyen-sdk-spacer-040, 8px);
|
|
@@ -1496,7 +1497,8 @@ button[disabled]:hover {
|
|
|
1496
1497
|
background-color: var(--adyen-sdk-color-background-primary-hover, #f7f7f8);
|
|
1497
1498
|
}
|
|
1498
1499
|
.adyen-kyc-input-radio__input:focus {
|
|
1499
|
-
box-shadow: 0 0 0 var(--adyen-sdk-focus-ring-spacer, 1px) var(--adyen-sdk-
|
|
1500
|
+
box-shadow: 0 0 0 var(--adyen-sdk-focus-ring-spacer, 1px) var(--adyen-sdk-color-background-primary, #ffffff), 0 0 0 var(--adyen-sdk-focus-ring-outline, 3px) var(--adyen-sdk-focus-ring-color, rgba(0, 112, 245, 0.8));
|
|
1501
|
+
border-radius: var(--adyen-sdk-border-radius-xs, 2px);
|
|
1500
1502
|
transition: var(--adyen-sdk-animation-duration-fast, 100ms) var(--adyen-sdk-animation-easing-standard, cubic-bezier(0.2, 0, 0.4, 0.9));
|
|
1501
1503
|
transition-property: box-shadow;
|
|
1502
1504
|
}
|
package/dist/types/components/Dropins/HighExposureDropin/components/AmountSelector/types.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CountryCode } from '../../../../../core/models/country-code';
|
|
2
|
+
import type { Translatable } from '../../../../../language/types';
|
|
2
3
|
export type AmountSelectorProps = {
|
|
3
4
|
country: CountryCode;
|
|
4
5
|
handleChangeForCurrency: (e: any) => void;
|
|
@@ -6,7 +7,7 @@ export type AmountSelectorProps = {
|
|
|
6
7
|
fieldName: string;
|
|
7
8
|
fieldLabel?: string;
|
|
8
9
|
fieldHelper?: string;
|
|
9
|
-
errorMessage?:
|
|
10
|
+
errorMessage?: Translatable | boolean;
|
|
10
11
|
currency?: string;
|
|
11
12
|
value?: number;
|
|
12
13
|
validCurrency?: any;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { JSX } from 'preact';
|
|
2
2
|
import type { Currency } from '../../../core/models/currency';
|
|
3
|
+
import type { Translatable } from '../../../language/types';
|
|
3
4
|
interface ReportedValueProps {
|
|
4
5
|
currency: Currency;
|
|
5
6
|
amount: number | undefined;
|
|
6
7
|
onAmountChanged: (amount: number) => void;
|
|
7
8
|
helper: string;
|
|
8
9
|
fieldName: string;
|
|
9
|
-
errorMessage
|
|
10
|
+
errorMessage?: Translatable | boolean | JSX.Element;
|
|
10
11
|
isValid: boolean | undefined;
|
|
11
12
|
}
|
|
12
13
|
export declare const ReportedValue: ({ currency, amount, onAmountChanged, helper, fieldName, errorMessage, isValid, }: ReportedValueProps) => JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Translatable } from '../../../../../../language/types';
|
|
1
2
|
import type { FormUtils } from '../../../../../../utils/formUtils';
|
|
2
3
|
import type { IdentityNumberSchema } from '../../../../../IdentityNumber/type';
|
|
3
4
|
import type { MultiSelectOnChangeProps, SingleSelectOnChangeProps } from '../../../../../internal/FormFields/Select/types';
|
|
@@ -16,7 +17,7 @@ interface DriversLicenseProps {
|
|
|
16
17
|
onCardNumberBlur: (event: Event) => void;
|
|
17
18
|
formUtils: FormUtils<AuDriversLicenseSchema>;
|
|
18
19
|
isValid: Record<keyof AuDriversLicenseSchema, boolean>;
|
|
19
|
-
errorMessages: Record<keyof AuDriversLicenseSchema,
|
|
20
|
+
errorMessages: Record<keyof AuDriversLicenseSchema, Translatable | boolean>;
|
|
20
21
|
shouldValidate?: boolean;
|
|
21
22
|
}
|
|
22
23
|
export declare const DriversLicense: ({ driversLicense, onIssuerStateChange, onLicenseNumberInput, onLicenseNumberBlur, onCardNumberInput, onCardNumberBlur, formUtils, isValid, errorMessages, shouldValidate, }: DriversLicenseProps) => import("preact").JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Translatable } from '../../../../../../language/types';
|
|
1
2
|
import type { FormUtils } from '../../../../../../utils/formUtils';
|
|
2
3
|
import type { IdentityNumberSchema } from '../../../../../IdentityNumber/type';
|
|
3
4
|
import type { AdditionalIdentityInfoSchema } from '../../types';
|
|
@@ -13,7 +14,7 @@ interface DriversLicenseProps {
|
|
|
13
14
|
onCardNumberBlur: (event: Event) => void;
|
|
14
15
|
formUtils: FormUtils<NZDriversLicenseSchema>;
|
|
15
16
|
isValid: Record<keyof NZDriversLicenseSchema, boolean>;
|
|
16
|
-
errorMessages: Record<keyof NZDriversLicenseSchema,
|
|
17
|
+
errorMessages: Record<keyof NZDriversLicenseSchema, Translatable | boolean>;
|
|
17
18
|
shouldValidate?: boolean;
|
|
18
19
|
}
|
|
19
20
|
export declare const DriversLicense: ({ driversLicense, onLicenseNumberInput, onLicenseNumberBlur, onCardNumberInput, onCardNumberBlur, formUtils, isValid, errorMessages, shouldValidate, }: DriversLicenseProps) => import("preact").JSX.Element;
|
package/dist/types/components/PersonalDetails/component/IdentityComponent/TypeOfIdentity/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import type { Translatable } from '../../../../../language/types';
|
|
1
2
|
import type { IndividualIdNumberOption, IndividualIdNumberType } from '../../../../internal/IdFieldTypeSelector/countryIdNumberTypes';
|
|
2
3
|
export interface TypeOfIdentityProps {
|
|
3
4
|
availableIdentityTypesOptions: readonly IndividualIdNumberOption[];
|
|
4
5
|
selectedIdentityType: IndividualIdNumberType | undefined;
|
|
5
6
|
setSelectedIdentityType: (type: IndividualIdNumberType) => void;
|
|
6
|
-
errorMessage:
|
|
7
|
+
errorMessage: Translatable | boolean;
|
|
7
8
|
isValid: boolean;
|
|
8
9
|
label?: string;
|
|
9
10
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import './Field.scss';
|
|
2
|
-
import type
|
|
2
|
+
import { type ComponentChildren, type ComponentProps, type JSX } from 'preact';
|
|
3
3
|
import type { FieldProps } from './types';
|
|
4
4
|
export type MaybeLabelElementProps = {
|
|
5
5
|
children: ComponentChildren;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ComponentChildren, JSX } from 'preact';
|
|
2
2
|
import type { ChangeEventHandler } from 'preact/compat';
|
|
3
3
|
import type { MutableRef } from 'preact/hooks';
|
|
4
|
+
import type { Translatable } from '../../../../language/types';
|
|
4
5
|
export interface FieldChildProps {
|
|
5
6
|
isInvalid: boolean;
|
|
6
7
|
isValid: boolean;
|
|
@@ -15,8 +16,7 @@ export interface FieldProps {
|
|
|
15
16
|
dataPlaceholder?: string;
|
|
16
17
|
disabled?: boolean;
|
|
17
18
|
optional?: boolean;
|
|
18
|
-
|
|
19
|
-
errorMessage?: string | boolean | JSX.Element | null;
|
|
19
|
+
errorMessage?: Translatable | boolean | JSX.Element;
|
|
20
20
|
filled?: boolean;
|
|
21
21
|
focused?: boolean;
|
|
22
22
|
helper?: string | JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import './MaskedInputText.scss';
|
|
2
2
|
import type { JSX } from 'preact';
|
|
3
3
|
import type { MaskSettings } from '../../../../core/hooks/useForm/types';
|
|
4
|
+
import type { Translatable } from '../../../../language/types';
|
|
4
5
|
import type { MismatchResult } from '../../../../utils/masking/matchAgainstMask';
|
|
5
6
|
export interface MaskedInputTextProps extends MaskSettings {
|
|
6
7
|
value: string;
|
|
@@ -9,7 +10,7 @@ export interface MaskedInputTextProps extends MaskSettings {
|
|
|
9
10
|
onBlur?: (event: JSX.TargetedFocusEvent<HTMLInputElement>) => void;
|
|
10
11
|
onMismatch?: (mismatch: MismatchResult) => void;
|
|
11
12
|
isValid: boolean;
|
|
12
|
-
errorMessage?:
|
|
13
|
+
errorMessage?: Translatable | boolean;
|
|
13
14
|
shouldValidate?: boolean;
|
|
14
15
|
label: string;
|
|
15
16
|
name: string;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { JSX } from 'preact';
|
|
2
2
|
import type { BaseFormFieldProps } from '../../../core/hooks/useForm/types';
|
|
3
3
|
import type { CountryCode } from '../../../core/models/country-code';
|
|
4
|
+
import type { Translatable } from '../../../language/types';
|
|
4
5
|
interface LegalFormFieldSchema {
|
|
5
6
|
legalForm?: string;
|
|
6
7
|
}
|
|
7
8
|
export interface LegalFormFieldProps extends Omit<BaseFormFieldProps<LegalFormFieldSchema>, 'errors' | 'labels'> {
|
|
8
|
-
errorMessage?:
|
|
9
|
+
errorMessage?: Translatable | boolean | JSX.Element;
|
|
9
10
|
countryCode?: CountryCode;
|
|
10
11
|
label?: string;
|
|
11
12
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { JSX } from 'preact';
|
|
2
2
|
import type { BaseFormFieldProps } from '../../../core/hooks/useForm/types';
|
|
3
|
+
import type { Translatable } from '../../../language/types';
|
|
3
4
|
interface NaceCodeFieldSchema {
|
|
4
5
|
naceCode?: string;
|
|
5
6
|
}
|
|
6
7
|
export interface NaceCodeFieldProps extends Omit<BaseFormFieldProps<NaceCodeFieldSchema>, 'errors' | 'labels'> {
|
|
7
|
-
errorMessage?:
|
|
8
|
+
errorMessage?: Translatable | boolean | JSX.Element;
|
|
8
9
|
label?: string;
|
|
9
10
|
}
|
|
10
11
|
export {};
|
|
@@ -33,6 +33,7 @@ export declare const svgs: {
|
|
|
33
33
|
readonly document: import("preact").FunctionComponent<import("preact").JSX.SVGAttributes<SVGSVGElement>>;
|
|
34
34
|
readonly download: import("preact").FunctionComponent<import("preact").JSX.SVGAttributes<SVGSVGElement>>;
|
|
35
35
|
readonly edit: import("preact").FunctionComponent<import("preact").JSX.SVGAttributes<SVGSVGElement>>;
|
|
36
|
+
readonly 'external-link': import("preact").FunctionComponent<import("preact").JSX.SVGAttributes<SVGSVGElement>>;
|
|
36
37
|
readonly 'field-error': import("preact").FunctionComponent<import("preact").JSX.SVGAttributes<SVGSVGElement>>;
|
|
37
38
|
readonly hide: import("preact").FunctionComponent<import("preact").JSX.SVGAttributes<SVGSVGElement>>;
|
|
38
39
|
readonly 'info-circle': import("preact").FunctionComponent<import("preact").JSX.SVGAttributes<SVGSVGElement>>;
|
|
@@ -16,7 +16,7 @@ export type FieldValid<FieldSchema> = {
|
|
|
16
16
|
[fieldValid in keyof FieldSchema]: boolean;
|
|
17
17
|
};
|
|
18
18
|
export type FieldErrors<FieldSchema> = {
|
|
19
|
-
[fieldError in keyof FieldSchema]:
|
|
19
|
+
[fieldError in keyof FieldSchema]: Translatable | boolean;
|
|
20
20
|
};
|
|
21
21
|
export type FieldLabels<FieldSchema> = {
|
|
22
22
|
[fieldLabel in keyof FieldSchema]?: string;
|
|
@@ -16,12 +16,12 @@ export type FormUtils<Schema> = {
|
|
|
16
16
|
isReadOnly: (field: keyof Schema) => boolean;
|
|
17
17
|
isTrusted: (field: keyof Schema) => boolean;
|
|
18
18
|
getVal: (val: Translatable) => string;
|
|
19
|
-
getErrorMessage: (field: keyof Schema, errors: ValidationRuleResults<Schema> | null, fieldProblems: Partial<Record<keyof Schema, boolean>> | undefined) =>
|
|
19
|
+
getErrorMessage: (field: keyof Schema, errors: ValidationRuleResults<Schema> | null, fieldProblems: Partial<Record<keyof Schema, boolean>> | undefined) => Translatable | boolean;
|
|
20
20
|
getFieldData: <Fields extends Array<keyof Schema>, FieldSchema extends {
|
|
21
21
|
[field in keyof Schema]: Schema[field];
|
|
22
22
|
}>(formData: Schema, fieldKeys: Fields) => FieldData<FieldSchema>;
|
|
23
23
|
getFieldValid: (formValid: Record<keyof Schema, boolean>, fieldKeys: Array<keyof Schema>) => Record<keyof Schema, boolean>;
|
|
24
|
-
getFieldErrors: (formErrors: Record<keyof Schema, ValidationRuleResult | null>, fieldProblems: Partial<Record<keyof Schema, boolean>> | undefined, fieldKeys: Array<keyof Schema>) => Record<keyof Schema,
|
|
24
|
+
getFieldErrors: (formErrors: Record<keyof Schema, ValidationRuleResult | null>, fieldProblems: Partial<Record<keyof Schema, boolean>> | undefined, fieldKeys: Array<keyof Schema>) => Record<keyof Schema, Translatable | boolean>;
|
|
25
25
|
getFieldLabels: (fieldKeys: Array<keyof Schema>, fallbackLabelKeys?: Partial<Record<keyof Schema, TranslationKey>>) => Partial<Record<keyof Schema, string>>;
|
|
26
26
|
getFieldPlaceholders: (fieldKeys: Array<keyof Schema>, fallbackPlaceholderKeys?: Partial<Record<keyof Schema, TranslationKey>>) => Partial<Record<keyof Schema, string>>;
|
|
27
27
|
getFieldHelperText: (fieldKeys: Array<keyof Schema>, fallbackHelperTextKeys?: Partial<Record<keyof Schema, TranslationKey>>) => Partial<Record<keyof Schema, string>>;
|