@adyen/kyc-components 2.9.1 → 2.10.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 +412 -342
- package/dist/style.css +1524 -1496
- package/dist/types/components/AccountSetupRejected/component/AccountSetupRejected.d.ts +2 -0
- package/dist/types/components/CompanyDetails/types.d.ts +1 -1
- package/dist/types/components/Dropins/PayoutDetailsDropin/components/PayoutDetailsDropinComponent.d.ts +1 -1
- package/dist/types/components/Dropins/PciDropin/components/PciDropinComponent.d.ts +1 -1
- package/dist/types/components/Dropins/PciDropin/types.d.ts +0 -1
- package/dist/types/components/PayoutDetails/types.d.ts +1 -0
- package/dist/types/components/TaskList/types.d.ts +2 -1
- package/dist/types/components/TrustRegistrationDetails/types.d.ts +4 -2
- package/dist/types/components/internal/Address/utils.d.ts +1 -1
- package/dist/types/components/internal/Alert/Alert.d.ts +1 -1
- package/dist/types/components/internal/Alert/types.d.ts +1 -0
- package/dist/types/components/internal/TaxId/types.d.ts +1 -0
- package/dist/types/core/Services/componentApi/get-allowed-locales.d.ts +3 -0
- package/dist/types/core/models/api/legal-arrangement.d.ts +2 -2
- package/dist/types/core/models/api/organization.d.ts +2 -2
- package/dist/types/language/config.d.ts +3 -0
- package/dist/types/utils/company-util.d.ts +2 -1
- package/dist/types/utils/decision-maker-roles.d.ts +1 -1
- package/dist/types/utils/entity-status-util.d.ts +2 -2
- package/dist/types/utils/get-task-status.d.ts +1 -0
- package/dist/types/utils/mapping/componentApiMapping.d.ts +2 -2
- package/dist/types/utils/regex/passportNumberPatterns.d.ts +1 -0
- package/dist/types/utils/trust-util.d.ts +4 -1
- package/package.json +2 -2
- package/dist/types/components/UenOrGst/types.d.ts +0 -9
|
@@ -218,6 +218,8 @@ const completeReview = "Complete review";
|
|
|
218
218
|
const submitReview = "Submit review";
|
|
219
219
|
const undoWithTimer = "Undo %{secondsLeft}";
|
|
220
220
|
const removing = "Removing...";
|
|
221
|
+
const cantSetUpAcccount = "You can’t set up an account";
|
|
222
|
+
const accountCantBeSetUp = "Your account can’t be set up as your information couldn’t be verified. To find out more, reach out to customer support.";
|
|
221
223
|
const pleaseNote = "Please note:";
|
|
222
224
|
const byClickingSubmitReview = "By clicking 'Submit review', you confirm that all of your information has been reviewed, and that all newly provided or already existing data is accurate and up-to-date.";
|
|
223
225
|
const nameAndCountry = "Name and country";
|
|
@@ -440,6 +442,7 @@ const numerodeIVA = "Número de IVA";
|
|
|
440
442
|
const NIF = "NIF (Número de Identificación Fiscal)";
|
|
441
443
|
const uen = "Unique Entity Number (UEN)";
|
|
442
444
|
const gst = "Goods and Services Tax (GST)";
|
|
445
|
+
const iDoNotHaveGst = "I do not have a Goods and Services Tax (GST) number";
|
|
443
446
|
const number = "Number";
|
|
444
447
|
const nric = "National Registration Identity Card (NRIC)";
|
|
445
448
|
const hkid = "HKID Number";
|
|
@@ -1272,6 +1275,8 @@ const defaultTrans = {
|
|
|
1272
1275
|
submitReview,
|
|
1273
1276
|
undoWithTimer,
|
|
1274
1277
|
removing,
|
|
1278
|
+
cantSetUpAcccount,
|
|
1279
|
+
accountCantBeSetUp,
|
|
1275
1280
|
pleaseNote,
|
|
1276
1281
|
byClickingSubmitReview,
|
|
1277
1282
|
nameAndCountry,
|
|
@@ -1495,6 +1500,7 @@ const defaultTrans = {
|
|
|
1495
1500
|
NIF,
|
|
1496
1501
|
uen,
|
|
1497
1502
|
gst,
|
|
1503
|
+
iDoNotHaveGst,
|
|
1498
1504
|
number,
|
|
1499
1505
|
nric,
|
|
1500
1506
|
hkid,
|
|
@@ -2574,6 +2580,7 @@ const Alert = ({
|
|
|
2574
2580
|
});
|
|
2575
2581
|
};
|
|
2576
2582
|
const AlertIcon = ({
|
|
2583
|
+
className,
|
|
2577
2584
|
type
|
|
2578
2585
|
}) => {
|
|
2579
2586
|
switch (type) {
|
|
@@ -2583,7 +2590,8 @@ const AlertIcon = ({
|
|
|
2583
2590
|
});
|
|
2584
2591
|
case AlertTypes.ERROR:
|
|
2585
2592
|
return jsx(Icon, {
|
|
2586
|
-
name: "warning"
|
|
2593
|
+
name: "warning",
|
|
2594
|
+
className
|
|
2587
2595
|
});
|
|
2588
2596
|
case AlertTypes.WARNING:
|
|
2589
2597
|
return jsx(Icon, {
|
|
@@ -2745,7 +2753,7 @@ const createLogger = (namespace) => {
|
|
|
2745
2753
|
});
|
|
2746
2754
|
return methods;
|
|
2747
2755
|
};
|
|
2748
|
-
const logger$
|
|
2756
|
+
const logger$m = createLogger("Link");
|
|
2749
2757
|
const getIconClass = (icon, external) => {
|
|
2750
2758
|
if (external) {
|
|
2751
2759
|
return "adl-link__icon adyen-kyc-icon-external-link";
|
|
@@ -2757,7 +2765,7 @@ const getIconClass = (icon, external) => {
|
|
|
2757
2765
|
};
|
|
2758
2766
|
const isValidLink = (href) => {
|
|
2759
2767
|
if (href === "#") {
|
|
2760
|
-
logger$
|
|
2768
|
+
logger$m.error('Links must include a valid href. If your href is "#", consider using a Button instead');
|
|
2761
2769
|
return false;
|
|
2762
2770
|
}
|
|
2763
2771
|
return true;
|
|
@@ -3350,7 +3358,7 @@ class ValidationResult {
|
|
|
3350
3358
|
return this.validationResults.filter((result) => result.hasError);
|
|
3351
3359
|
}
|
|
3352
3360
|
}
|
|
3353
|
-
const logger$
|
|
3361
|
+
const logger$l = createLogger("useAsyncValidator");
|
|
3354
3362
|
const useAsyncValidator = (asyncRules) => {
|
|
3355
3363
|
const [asyncValidationResults, setAsyncValidationResults] = useState({});
|
|
3356
3364
|
const clearAsyncValidationResults = useCallback(() => setAsyncValidationResults({}), []);
|
|
@@ -3373,7 +3381,7 @@ const useAsyncValidator = (asyncRules) => {
|
|
|
3373
3381
|
hasError: !isValid
|
|
3374
3382
|
}])
|
|
3375
3383
|
});
|
|
3376
|
-
}).catch(logger$
|
|
3384
|
+
}).catch(logger$l.error);
|
|
3377
3385
|
}, [asyncRules, clearAsyncValidationResults]);
|
|
3378
3386
|
return {
|
|
3379
3387
|
asyncValidationResults,
|
|
@@ -4603,7 +4611,8 @@ const DriversLicenseNumberPatterns = {
|
|
|
4603
4611
|
};
|
|
4604
4612
|
const PassportNumberPatterns = {
|
|
4605
4613
|
[CountryCodes.Australia]: /^[A-Z]{1,2}\d{7}$/,
|
|
4606
|
-
[CountryCodes.HongKong]: /^(?=.{9}$)[A-Z]{1,2}\d{6}[A-Z0-9]{1,2}
|
|
4614
|
+
[CountryCodes.HongKong]: /^(?=.{9}$)[A-Z]{1,2}\d{6}[A-Z0-9]{1,2}$/,
|
|
4615
|
+
[CountryCodes.NewZealand]: /[A-Za-z0-9]{8,9}/
|
|
4607
4616
|
};
|
|
4608
4617
|
const ProofOfIdentityCardPatterns = {
|
|
4609
4618
|
[CountryCodes.Australia]: /^[A-Za-z\d]{6,10}$/,
|
|
@@ -5200,59 +5209,6 @@ function InputDate(props) {
|
|
|
5200
5209
|
maxLength: 10
|
|
5201
5210
|
});
|
|
5202
5211
|
}
|
|
5203
|
-
const RadioGroup$1 = "";
|
|
5204
|
-
const _inputRadio = "";
|
|
5205
|
-
const InputRadio = ({
|
|
5206
|
-
className,
|
|
5207
|
-
...props
|
|
5208
|
-
}) => jsx("input", {
|
|
5209
|
-
...props,
|
|
5210
|
-
className: cx("adl-input-radio__input", className)
|
|
5211
|
-
});
|
|
5212
|
-
function RadioGroup({
|
|
5213
|
-
items,
|
|
5214
|
-
i18n,
|
|
5215
|
-
name,
|
|
5216
|
-
onChange,
|
|
5217
|
-
value,
|
|
5218
|
-
isInvalid,
|
|
5219
|
-
uniqueId: uniqueId2,
|
|
5220
|
-
className,
|
|
5221
|
-
disabled = false
|
|
5222
|
-
}) {
|
|
5223
|
-
const uniqueIdBase = uniqueId2 == null ? void 0 : uniqueId2.replace(/[0-9]/g, "").substring(0, uniqueId2.lastIndexOf("-"));
|
|
5224
|
-
return jsx("div", {
|
|
5225
|
-
className: "adyen-kyc-radio-group",
|
|
5226
|
-
children: items.map((item) => {
|
|
5227
|
-
const uniqueId22 = getUniqueId(uniqueIdBase);
|
|
5228
|
-
return jsxs("label", {
|
|
5229
|
-
htmlFor: uniqueId22,
|
|
5230
|
-
className: "adl-input-radio",
|
|
5231
|
-
children: [jsx(InputRadio, {
|
|
5232
|
-
id: uniqueId22,
|
|
5233
|
-
type: "radio",
|
|
5234
|
-
checked: value === item.id,
|
|
5235
|
-
"aria-checked": value === item.id,
|
|
5236
|
-
name,
|
|
5237
|
-
onChange,
|
|
5238
|
-
onClick: onChange,
|
|
5239
|
-
value: item.id,
|
|
5240
|
-
disabled
|
|
5241
|
-
}), jsx("span", {
|
|
5242
|
-
className: cx(["adl-input-radio__label", "adyen-kyc-label__text", className, {
|
|
5243
|
-
"adyen-kyc-radio-group__label--invalid": isInvalid
|
|
5244
|
-
}]),
|
|
5245
|
-
children: i18n.get(item.name)
|
|
5246
|
-
})]
|
|
5247
|
-
}, item.id);
|
|
5248
|
-
})
|
|
5249
|
-
});
|
|
5250
|
-
}
|
|
5251
|
-
RadioGroup.defaultProps = {
|
|
5252
|
-
onChange: () => {
|
|
5253
|
-
},
|
|
5254
|
-
items: []
|
|
5255
|
-
};
|
|
5256
5212
|
const FormHeader$1 = "";
|
|
5257
5213
|
function FormHeader({
|
|
5258
5214
|
heading,
|
|
@@ -5289,6 +5245,53 @@ function FormHeader({
|
|
|
5289
5245
|
children: [headerEl, descEl]
|
|
5290
5246
|
});
|
|
5291
5247
|
}
|
|
5248
|
+
const ON_CHANGE_DEBOUNCE_DURATION = 200;
|
|
5249
|
+
const KEYBOARD_KEYS = {
|
|
5250
|
+
arrowDown: "ArrowDown",
|
|
5251
|
+
arrowUp: "ArrowUp",
|
|
5252
|
+
enter: "Enter",
|
|
5253
|
+
escape: "Escape",
|
|
5254
|
+
space: " ",
|
|
5255
|
+
tab: "Tab"
|
|
5256
|
+
};
|
|
5257
|
+
function useGlobalData() {
|
|
5258
|
+
const {
|
|
5259
|
+
getData
|
|
5260
|
+
} = useStateContext();
|
|
5261
|
+
return getData();
|
|
5262
|
+
}
|
|
5263
|
+
function useGlobalDataSlice(sliceId, caller) {
|
|
5264
|
+
const {
|
|
5265
|
+
dispatch,
|
|
5266
|
+
getData
|
|
5267
|
+
} = useStateContext();
|
|
5268
|
+
const sliceData = getData()[sliceId];
|
|
5269
|
+
const updateState = useCallback((updatedSlice) => dispatch({
|
|
5270
|
+
type: "addToState",
|
|
5271
|
+
value: {
|
|
5272
|
+
...updatedSlice,
|
|
5273
|
+
dataStoreId: sliceId,
|
|
5274
|
+
caller
|
|
5275
|
+
}
|
|
5276
|
+
// TODO merge SFValue and StateSlice types
|
|
5277
|
+
}), [sliceId, caller]);
|
|
5278
|
+
const updateStateSlice = useMemo(() => debounce(updateState, ON_CHANGE_DEBOUNCE_DURATION), [updateState]);
|
|
5279
|
+
return {
|
|
5280
|
+
sliceData,
|
|
5281
|
+
updateStateSlice
|
|
5282
|
+
};
|
|
5283
|
+
}
|
|
5284
|
+
function useResetGlobalData(caller) {
|
|
5285
|
+
const {
|
|
5286
|
+
dispatch
|
|
5287
|
+
} = useStateContext();
|
|
5288
|
+
return useCallback(() => dispatch({
|
|
5289
|
+
type: "resetState",
|
|
5290
|
+
value: {
|
|
5291
|
+
caller
|
|
5292
|
+
}
|
|
5293
|
+
}), [dispatch, caller]);
|
|
5294
|
+
}
|
|
5292
5295
|
const BR_PATTERNS = {
|
|
5293
5296
|
// CNPJ is a 14 digits number, formatted like 00.000.000/0001-00
|
|
5294
5297
|
tax: [/^\d{14}$/, /^\d{2}\.\d{3}\.\d{3}\/\d{4}-\d{2}$/],
|
|
@@ -5437,7 +5440,7 @@ const countryBasedValidatorRules$1 = {
|
|
|
5437
5440
|
}]
|
|
5438
5441
|
}
|
|
5439
5442
|
};
|
|
5440
|
-
const taxIdFields = ["taxId", "exemptedFromTax"];
|
|
5443
|
+
const taxIdFields = ["taxId", "exemptedFromTax", "isUen"];
|
|
5441
5444
|
function TaxId(props) {
|
|
5442
5445
|
const {
|
|
5443
5446
|
data: propData,
|
|
@@ -5462,13 +5465,14 @@ function TaxId(props) {
|
|
|
5462
5465
|
fieldProblems
|
|
5463
5466
|
} = useForm({
|
|
5464
5467
|
...props,
|
|
5465
|
-
schema: (data2) => data2.exemptedFromTax ? ["exemptedFromTax"] : ["taxId", "exemptedFromTax"],
|
|
5468
|
+
schema: (data2) => formUtils.isRequiredField("isUen") ? ["taxId", "isUen"] : data2.exemptedFromTax ? ["exemptedFromTax"] : ["taxId", "exemptedFromTax"],
|
|
5466
5469
|
rules: validationRules,
|
|
5467
5470
|
defaultData: {
|
|
5468
5471
|
...propData,
|
|
5469
|
-
exemptedFromTax: Boolean(propData == null ? void 0 : propData.exemptedFromTax)
|
|
5472
|
+
exemptedFromTax: Boolean(propData == null ? void 0 : propData.exemptedFromTax),
|
|
5473
|
+
// exemptedFromTax should be a boolean
|
|
5474
|
+
isUen: formUtils.isRequiredField("isUen") ? Boolean(propData == null ? void 0 : propData.isUen) : void 0
|
|
5470
5475
|
},
|
|
5471
|
-
// exemptedFromTax should be a boolean
|
|
5472
5476
|
fieldProblems: fieldValidationErrors
|
|
5473
5477
|
});
|
|
5474
5478
|
useEffect(() => {
|
|
@@ -5489,11 +5493,28 @@ function TaxId(props) {
|
|
|
5489
5493
|
}
|
|
5490
5494
|
});
|
|
5491
5495
|
}, [data, valid, errors, isValid, dataStoreId]);
|
|
5496
|
+
const {
|
|
5497
|
+
sliceData: companyDetails2
|
|
5498
|
+
} = useGlobalDataSlice("companyDetails");
|
|
5499
|
+
const registrationNumber2 = companyDetails2 == null ? void 0 : companyDetails2.registrationNumber;
|
|
5500
|
+
const handleUenOrGstChange = (isUen) => {
|
|
5501
|
+
handleChangeFor("isUen", "input")(isUen);
|
|
5502
|
+
if (isUen) {
|
|
5503
|
+
handleChangeFor("taxId", "blur")(registrationNumber2);
|
|
5504
|
+
return;
|
|
5505
|
+
}
|
|
5506
|
+
handleChangeFor("taxId", "blur")("");
|
|
5507
|
+
};
|
|
5508
|
+
useEffect(() => {
|
|
5509
|
+
if (data.isUen) {
|
|
5510
|
+
handleChangeFor("taxId", "blur")(registrationNumber2);
|
|
5511
|
+
}
|
|
5512
|
+
}, [registrationNumber2]);
|
|
5492
5513
|
return !formUtils.isRequiredField("taxId") ? null : jsxs("div", {
|
|
5493
5514
|
className: "adyen-kyc-field--tax-id",
|
|
5494
5515
|
children: [jsx(StateContextSetter, {
|
|
5495
5516
|
stateRef
|
|
5496
|
-
}), jsx(Field, {
|
|
5517
|
+
}), !data.isUen && jsx(Field, {
|
|
5497
5518
|
name: "taxId",
|
|
5498
5519
|
label: formUtils.getLabel("taxId"),
|
|
5499
5520
|
classNameModifiers: ["tax-id"],
|
|
@@ -5507,11 +5528,20 @@ function TaxId(props) {
|
|
|
5507
5528
|
classNameModifiers: ["taxId"],
|
|
5508
5529
|
onInput: handleChangeFor("taxId", "input"),
|
|
5509
5530
|
onBlur: handleChangeFor("taxId", "blur"),
|
|
5510
|
-
disabled: data.exemptedFromTax,
|
|
5531
|
+
disabled: data.exemptedFromTax || data.isUen,
|
|
5511
5532
|
"aria-required": true,
|
|
5512
5533
|
"aria-label": formUtils.getLabel("taxId"),
|
|
5513
5534
|
"aria-invalid": !valid.taxId
|
|
5514
5535
|
})
|
|
5536
|
+
}), formUtils.isRequiredField("isUen") && jsx(Checkbox, {
|
|
5537
|
+
name: "isUen",
|
|
5538
|
+
label: formUtils.getLabel("iDoNotHaveGst"),
|
|
5539
|
+
classNameModifiers: ["exempted-from-tax"],
|
|
5540
|
+
checked: Boolean(data.isUen),
|
|
5541
|
+
onChange: handleUenOrGstChange,
|
|
5542
|
+
"aria-required": false,
|
|
5543
|
+
"aria-label": formUtils.getLabel("iDoNotHaveGst"),
|
|
5544
|
+
"aria-invalid": false
|
|
5515
5545
|
}), formUtils.isRequiredField("exemptedFromTax") && jsx(Checkbox, {
|
|
5516
5546
|
name: "exemptedFromTax",
|
|
5517
5547
|
label: formUtils.getLabel("exemptedFromTax"),
|
|
@@ -5528,15 +5558,6 @@ function TaxId(props) {
|
|
|
5528
5558
|
}
|
|
5529
5559
|
const vatAbsenceReasons = ["industryExemption", "belowTaxThreshold"];
|
|
5530
5560
|
const Select$1 = "";
|
|
5531
|
-
const ON_CHANGE_DEBOUNCE_DURATION = 200;
|
|
5532
|
-
const KEYBOARD_KEYS = {
|
|
5533
|
-
arrowDown: "ArrowDown",
|
|
5534
|
-
arrowUp: "ArrowUp",
|
|
5535
|
-
enter: "Enter",
|
|
5536
|
-
escape: "Escape",
|
|
5537
|
-
space: " ",
|
|
5538
|
-
tab: "Tab"
|
|
5539
|
-
};
|
|
5540
5561
|
const getScrollParent = (node) => {
|
|
5541
5562
|
const isElement = node instanceof HTMLElement;
|
|
5542
5563
|
const overflowY = isElement && window.getComputedStyle(node).overflowY;
|
|
@@ -7117,13 +7138,6 @@ function VatNumber(props) {
|
|
|
7117
7138
|
}) : null]
|
|
7118
7139
|
});
|
|
7119
7140
|
}
|
|
7120
|
-
const uenOrGstItems = [{
|
|
7121
|
-
id: "UEN",
|
|
7122
|
-
name: "uen"
|
|
7123
|
-
}, {
|
|
7124
|
-
id: "GST",
|
|
7125
|
-
name: "gst"
|
|
7126
|
-
}];
|
|
7127
7141
|
const companyDetailsValidationRules = {
|
|
7128
7142
|
tradingName: {
|
|
7129
7143
|
modes: ["blur"],
|
|
@@ -7152,11 +7166,6 @@ const companyDetailsValidationRules = {
|
|
|
7152
7166
|
modes: ["blur"],
|
|
7153
7167
|
validate: (dateOfIncorporation2) => dateOfIncorporation2 && new Date(dateOfIncorporation2) < /* @__PURE__ */ new Date(),
|
|
7154
7168
|
errorMessage: "invalidDateOfIncorporation"
|
|
7155
|
-
}],
|
|
7156
|
-
uenOrGst: [{
|
|
7157
|
-
modes: ["blur"],
|
|
7158
|
-
validate: (uenOrGst) => !!uenOrGst,
|
|
7159
|
-
errorMessage: "fieldIsRequired"
|
|
7160
7169
|
}]
|
|
7161
7170
|
};
|
|
7162
7171
|
const FLOWS_THAT_HIDE_REGISTRATION_NUMBER = [{
|
|
@@ -7178,7 +7187,7 @@ const FLOWS_THAT_HIDE_REGISTRATION_NUMBER = [{
|
|
|
7178
7187
|
companyType: [CompanyTypesValue.SOLE_PROPRIETORSHIP],
|
|
7179
7188
|
country: CountryCodes.PuertoRico
|
|
7180
7189
|
}];
|
|
7181
|
-
const companyDetailFields = ["tradingName", "sameNameAsLegalName", ...businessRegistrationNumberFields, "stockExchangeMIC", "stockISIN", ...vatNumberFields, ...taxIdFields, "dateOfIncorporation"
|
|
7190
|
+
const companyDetailFields = ["tradingName", "sameNameAsLegalName", ...businessRegistrationNumberFields, "stockExchangeMIC", "stockISIN", ...vatNumberFields, ...taxIdFields, "dateOfIncorporation"];
|
|
7182
7191
|
function CompanyDetailsComponent(props) {
|
|
7183
7192
|
var _a, _b;
|
|
7184
7193
|
const {
|
|
@@ -7192,7 +7201,7 @@ function CompanyDetailsComponent(props) {
|
|
|
7192
7201
|
setState: null
|
|
7193
7202
|
});
|
|
7194
7203
|
const COMPANY_DETAILS = props.id;
|
|
7195
|
-
const directChildFields = (props.requiredFields || companyDetailFields).filter((field) => ["tradingName", "sameNameAsLegalName", "stockExchangeMIC", "stockISIN", "dateOfIncorporation"
|
|
7204
|
+
const directChildFields = (props.requiredFields || companyDetailFields).filter((field) => ["tradingName", "sameNameAsLegalName", "stockExchangeMIC", "stockISIN", "dateOfIncorporation"].includes(field));
|
|
7196
7205
|
const {
|
|
7197
7206
|
getData
|
|
7198
7207
|
} = useStateContext();
|
|
@@ -7386,25 +7395,7 @@ function CompanyDetailsComponent(props) {
|
|
|
7386
7395
|
...vatNumberProps,
|
|
7387
7396
|
dataStoreId: COMPANY_DETAILS,
|
|
7388
7397
|
country: props.country
|
|
7389
|
-
}), formUtils.isRequiredField("
|
|
7390
|
-
name: "uenOrGst",
|
|
7391
|
-
label: formUtils.getLabel("UEN/GST"),
|
|
7392
|
-
classNameModifiers: ["uenOrGst"],
|
|
7393
|
-
errorMessage: formUtils.getErrorMessage("dateOfIncorporation", errors, fieldProblems),
|
|
7394
|
-
isValid: valid.uenOrGst,
|
|
7395
|
-
children: (childProps) => jsx(RadioGroup, {
|
|
7396
|
-
...childProps,
|
|
7397
|
-
name: "uenOrGst",
|
|
7398
|
-
items: uenOrGstItems,
|
|
7399
|
-
value: data.uenOrGst,
|
|
7400
|
-
i18n,
|
|
7401
|
-
disabled: formUtils.isReadOnly("uenOrGst"),
|
|
7402
|
-
onChange: handleChangeFor("uenOrGst", "input"),
|
|
7403
|
-
"aria-required": true,
|
|
7404
|
-
"aria-label": formUtils.getLabel("uenOrGst"),
|
|
7405
|
-
"aria-invalid": !valid.uenOrGst
|
|
7406
|
-
})
|
|
7407
|
-
}), (formUtils.isRequiredField("taxId") && !formUtils.isRequiredField("uenOrGst") || formUtils.isRequiredField("uenOrGst") && !!data.uenOrGst) && jsx(TaxId, {
|
|
7398
|
+
}), formUtils.isRequiredField("taxId") && jsx(TaxId, {
|
|
7408
7399
|
...taxIdProps,
|
|
7409
7400
|
dataStoreId: COMPANY_DETAILS,
|
|
7410
7401
|
country: props.country
|
|
@@ -7443,44 +7434,6 @@ var SettingNames = /* @__PURE__ */ ((SettingNames2) => {
|
|
|
7443
7434
|
SettingNames2["RequirePciSignPosMoto"] = "requirePciSignPosMoto";
|
|
7444
7435
|
return SettingNames2;
|
|
7445
7436
|
})(SettingNames || {});
|
|
7446
|
-
function useGlobalData() {
|
|
7447
|
-
const {
|
|
7448
|
-
getData
|
|
7449
|
-
} = useStateContext();
|
|
7450
|
-
return getData();
|
|
7451
|
-
}
|
|
7452
|
-
function useGlobalDataSlice(sliceId, caller) {
|
|
7453
|
-
const {
|
|
7454
|
-
dispatch,
|
|
7455
|
-
getData
|
|
7456
|
-
} = useStateContext();
|
|
7457
|
-
const sliceData = getData()[sliceId];
|
|
7458
|
-
const updateState = useCallback((updatedSlice) => dispatch({
|
|
7459
|
-
type: "addToState",
|
|
7460
|
-
value: {
|
|
7461
|
-
...updatedSlice,
|
|
7462
|
-
dataStoreId: sliceId,
|
|
7463
|
-
caller
|
|
7464
|
-
}
|
|
7465
|
-
// TODO merge SFValue and StateSlice types
|
|
7466
|
-
}), [sliceId, caller]);
|
|
7467
|
-
const updateStateSlice = useMemo(() => debounce(updateState, ON_CHANGE_DEBOUNCE_DURATION), [updateState]);
|
|
7468
|
-
return {
|
|
7469
|
-
sliceData,
|
|
7470
|
-
updateStateSlice
|
|
7471
|
-
};
|
|
7472
|
-
}
|
|
7473
|
-
function useResetGlobalData(caller) {
|
|
7474
|
-
const {
|
|
7475
|
-
dispatch
|
|
7476
|
-
} = useStateContext();
|
|
7477
|
-
return useCallback(() => dispatch({
|
|
7478
|
-
type: "resetState",
|
|
7479
|
-
value: {
|
|
7480
|
-
caller
|
|
7481
|
-
}
|
|
7482
|
-
}), [dispatch, caller]);
|
|
7483
|
-
}
|
|
7484
7437
|
function useDataset(datasetIdentifier2, skip) {
|
|
7485
7438
|
const {
|
|
7486
7439
|
i18n
|
|
@@ -7558,7 +7511,7 @@ function datasetUtilities(locale) {
|
|
|
7558
7511
|
getDatasetKey: (identifier) => createDatasetKey(identifier, locale)
|
|
7559
7512
|
};
|
|
7560
7513
|
}
|
|
7561
|
-
const logger$
|
|
7514
|
+
const logger$k = createLogger("CountryField");
|
|
7562
7515
|
const COUNTRY_FIELD = "country";
|
|
7563
7516
|
function CountryField({
|
|
7564
7517
|
data,
|
|
@@ -7581,7 +7534,7 @@ function CountryField({
|
|
|
7581
7534
|
dataset: countriesFromApi
|
|
7582
7535
|
} = useDataset(datasetIdentifier.country);
|
|
7583
7536
|
useEffect(() => {
|
|
7584
|
-
loadFlags2().catch(logger$
|
|
7537
|
+
loadFlags2().catch(logger$k.error);
|
|
7585
7538
|
}, [loadFlags2]);
|
|
7586
7539
|
const countries = countriesFromApi.filter((country2) => allowedCountries.length ? allowedCountries.includes(country2.id) : true).map((item) => ({
|
|
7587
7540
|
...item,
|
|
@@ -7806,9 +7759,6 @@ const companyBase = {
|
|
|
7806
7759
|
dateOfIncorporation: {
|
|
7807
7760
|
rule: "countryRequiresDateOfIncorporationForCompanies"
|
|
7808
7761
|
},
|
|
7809
|
-
uenOrGst: {
|
|
7810
|
-
rule: "countryUsesUenOrGst"
|
|
7811
|
-
},
|
|
7812
7762
|
exemptedFromRegistrationNumber: {
|
|
7813
7763
|
rule: "companyRegistrationNumberExemptionAllowed"
|
|
7814
7764
|
},
|
|
@@ -7831,6 +7781,9 @@ const taxIdBase$1 = {
|
|
|
7831
7781
|
},
|
|
7832
7782
|
vatNumber: {
|
|
7833
7783
|
rule: "countryUsesVat"
|
|
7784
|
+
},
|
|
7785
|
+
isUen: {
|
|
7786
|
+
rule: "countryUsesUenOrGst"
|
|
7834
7787
|
}
|
|
7835
7788
|
};
|
|
7836
7789
|
const companyTypes = [{
|
|
@@ -8271,7 +8224,7 @@ const countryConfig$4 = {
|
|
|
8271
8224
|
label: "irdDocument"
|
|
8272
8225
|
},
|
|
8273
8226
|
registrationNumber: {
|
|
8274
|
-
label: "NZBN"
|
|
8227
|
+
label: "NZBN/NCN"
|
|
8275
8228
|
},
|
|
8276
8229
|
taxId: {
|
|
8277
8230
|
label: "IRD"
|
|
@@ -8388,7 +8341,7 @@ const countryConfig$4 = {
|
|
|
8388
8341
|
label: "companyType"
|
|
8389
8342
|
},
|
|
8390
8343
|
taxId: {
|
|
8391
|
-
label: "
|
|
8344
|
+
label: "gst"
|
|
8392
8345
|
},
|
|
8393
8346
|
exemptedFromVat: {
|
|
8394
8347
|
label: "vatNumberExempted"
|
|
@@ -8585,6 +8538,7 @@ var TaskTypes = /* @__PURE__ */ ((TaskTypes2) => {
|
|
|
8585
8538
|
TaskTypes2["TRUST_MEMBER_COMPANY_OWNER"] = "TRUST_MEMBER_COMPANY_OWNER";
|
|
8586
8539
|
TaskTypes2["SOLE_PROPRIETOR_COMPANY"] = "SOLE_PROPRIETOR_COMPANY";
|
|
8587
8540
|
TaskTypes2["LEGAL_ENTITY_TYPE_SWITCHER"] = "LEGAL_ENTITY_TYPE_SWITCHER";
|
|
8541
|
+
TaskTypes2["CAPABILITY_REJECTED"] = "CAPABILITY_REJECTED";
|
|
8588
8542
|
return TaskTypes2;
|
|
8589
8543
|
})(TaskTypes || {});
|
|
8590
8544
|
var TaskStatus = /* @__PURE__ */ ((TaskStatus2) => {
|
|
@@ -8708,7 +8662,7 @@ const accountHolderValidationRules = {
|
|
|
8708
8662
|
}
|
|
8709
8663
|
};
|
|
8710
8664
|
const accountHolderFields = ["accountHolder"];
|
|
8711
|
-
const logger$
|
|
8665
|
+
const logger$j = createLogger("AccountHolder");
|
|
8712
8666
|
function getAvailableAccountHolderOptions(legalEntityType, isChangeOfLegalEntityTypeAllowed, isTrustFlowEnabled, isSoleProprietorshipAllowed, isChangeToMyNameAllowed) {
|
|
8713
8667
|
switch (legalEntityType) {
|
|
8714
8668
|
case LegalEntityType.ORGANIZATION: {
|
|
@@ -8718,7 +8672,7 @@ function getAvailableAccountHolderOptions(legalEntityType, isChangeOfLegalEntity
|
|
|
8718
8672
|
return [...isChangeToMyNameAllowed ? ["myName"] : [], ...isChangeOfLegalEntityTypeAllowed ? ["theCompanyIWorkFor"] : [], ...isTrustFlowEnabled ? ["aTrust"] : [], ...isSoleProprietorshipAllowed ? ["mySoleTraderName"] : []];
|
|
8719
8673
|
}
|
|
8720
8674
|
default:
|
|
8721
|
-
logger$
|
|
8675
|
+
logger$j.error(`No available account holder options for legal entity type '${legalEntityType}'`);
|
|
8722
8676
|
return [];
|
|
8723
8677
|
}
|
|
8724
8678
|
}
|
|
@@ -8795,6 +8749,14 @@ function AccountHolder(props) {
|
|
|
8795
8749
|
});
|
|
8796
8750
|
}
|
|
8797
8751
|
const RadioCard$1 = "";
|
|
8752
|
+
const _inputRadio = "";
|
|
8753
|
+
const InputRadio = ({
|
|
8754
|
+
className,
|
|
8755
|
+
...props
|
|
8756
|
+
}) => jsx("input", {
|
|
8757
|
+
...props,
|
|
8758
|
+
className: cx("adl-input-radio__input", className)
|
|
8759
|
+
});
|
|
8798
8760
|
const RadioCard = ({
|
|
8799
8761
|
optionId,
|
|
8800
8762
|
optionName,
|
|
@@ -9440,7 +9402,7 @@ function Dropzone(props) {
|
|
|
9440
9402
|
})]
|
|
9441
9403
|
});
|
|
9442
9404
|
}
|
|
9443
|
-
const logger$
|
|
9405
|
+
const logger$i = createLogger("TextArea");
|
|
9444
9406
|
function TextArea(props) {
|
|
9445
9407
|
const {
|
|
9446
9408
|
classNameModifiers,
|
|
@@ -9461,7 +9423,7 @@ function TextArea(props) {
|
|
|
9461
9423
|
} = useI18nContext();
|
|
9462
9424
|
const [value, setValue] = useState("");
|
|
9463
9425
|
if (Object.prototype.hasOwnProperty.call(props, "onChange")) {
|
|
9464
|
-
logger$
|
|
9426
|
+
logger$i.error("Error: Form fields that rely on InputBase may not have an onChange property");
|
|
9465
9427
|
}
|
|
9466
9428
|
const handleInput = (e) => {
|
|
9467
9429
|
var _a;
|
|
@@ -9675,6 +9637,7 @@ const ADDRESS_SCHEMAS = {
|
|
|
9675
9637
|
[CountryCodes.UnitedKingdom]: [COUNTRY, HOUSE_NUMBER, STREET, CITY, POSTAL_CODE, STATE],
|
|
9676
9638
|
[CountryCodes.UnitedStates]: [COUNTRY, STREET, HOUSE_NUMBER, CITY, STATE, POSTAL_CODE],
|
|
9677
9639
|
[CountryCodes.HongKong]: [COUNTRY, STREET, HOUSE_NUMBER, CITY, STATE],
|
|
9640
|
+
[CountryCodes.NewZealand]: [COUNTRY, STREET, HOUSE_NUMBER, POSTAL_CODE, CITY, STATE],
|
|
9678
9641
|
default: [COUNTRY, STREET, HOUSE_NUMBER, POSTAL_CODE, CITY, STATE]
|
|
9679
9642
|
};
|
|
9680
9643
|
const LABELS = {
|
|
@@ -9869,7 +9832,7 @@ function FieldContainer(props) {
|
|
|
9869
9832
|
}
|
|
9870
9833
|
return renderField(fieldName);
|
|
9871
9834
|
}
|
|
9872
|
-
const logger$
|
|
9835
|
+
const logger$h = createLogger("SearchAddress");
|
|
9873
9836
|
const SearchAddress = ({
|
|
9874
9837
|
data,
|
|
9875
9838
|
legalEntityId,
|
|
@@ -9895,7 +9858,7 @@ const SearchAddress = ({
|
|
|
9895
9858
|
const response = await handleFindAddress(selectedAddressId);
|
|
9896
9859
|
autocompleteAddressForm(response);
|
|
9897
9860
|
} catch (e) {
|
|
9898
|
-
logger$
|
|
9861
|
+
logger$h.error(e);
|
|
9899
9862
|
}
|
|
9900
9863
|
};
|
|
9901
9864
|
const onDrilldown = async (selectedAddress) => {
|
|
@@ -9907,7 +9870,7 @@ const SearchAddress = ({
|
|
|
9907
9870
|
}, legalEntityId);
|
|
9908
9871
|
setItems((response == null ? void 0 : response.results) || []);
|
|
9909
9872
|
} catch (e) {
|
|
9910
|
-
logger$
|
|
9873
|
+
logger$h.error(e);
|
|
9911
9874
|
}
|
|
9912
9875
|
};
|
|
9913
9876
|
const onChange = (e) => {
|
|
@@ -9962,7 +9925,7 @@ const SearchAddress = ({
|
|
|
9962
9925
|
setItems([]);
|
|
9963
9926
|
}
|
|
9964
9927
|
} catch (e) {
|
|
9965
|
-
logger$
|
|
9928
|
+
logger$h.error(e);
|
|
9966
9929
|
}
|
|
9967
9930
|
setLoading(false);
|
|
9968
9931
|
}
|
|
@@ -10621,6 +10584,51 @@ Address.defaultProps = {
|
|
|
10621
10584
|
requiredFields: ADDRESS_SCHEMA,
|
|
10622
10585
|
countryCode: null
|
|
10623
10586
|
};
|
|
10587
|
+
const RadioGroup$1 = "";
|
|
10588
|
+
function RadioGroup({
|
|
10589
|
+
items,
|
|
10590
|
+
i18n,
|
|
10591
|
+
name,
|
|
10592
|
+
onChange,
|
|
10593
|
+
value,
|
|
10594
|
+
isInvalid,
|
|
10595
|
+
uniqueId: uniqueId2,
|
|
10596
|
+
className,
|
|
10597
|
+
disabled = false
|
|
10598
|
+
}) {
|
|
10599
|
+
const uniqueIdBase = uniqueId2 == null ? void 0 : uniqueId2.replace(/[0-9]/g, "").substring(0, uniqueId2.lastIndexOf("-"));
|
|
10600
|
+
return jsx("div", {
|
|
10601
|
+
className: "adyen-kyc-radio-group",
|
|
10602
|
+
children: items.map((item) => {
|
|
10603
|
+
const uniqueId22 = getUniqueId(uniqueIdBase);
|
|
10604
|
+
return jsxs("label", {
|
|
10605
|
+
htmlFor: uniqueId22,
|
|
10606
|
+
className: "adl-input-radio",
|
|
10607
|
+
children: [jsx(InputRadio, {
|
|
10608
|
+
id: uniqueId22,
|
|
10609
|
+
type: "radio",
|
|
10610
|
+
checked: value === item.id,
|
|
10611
|
+
"aria-checked": value === item.id,
|
|
10612
|
+
name,
|
|
10613
|
+
onChange,
|
|
10614
|
+
onClick: onChange,
|
|
10615
|
+
value: item.id,
|
|
10616
|
+
disabled
|
|
10617
|
+
}), jsx("span", {
|
|
10618
|
+
className: cx(["adl-input-radio__label", "adyen-kyc-label__text", className, {
|
|
10619
|
+
"adyen-kyc-radio-group__label--invalid": isInvalid
|
|
10620
|
+
}]),
|
|
10621
|
+
children: i18n.get(item.name)
|
|
10622
|
+
})]
|
|
10623
|
+
}, item.id);
|
|
10624
|
+
})
|
|
10625
|
+
});
|
|
10626
|
+
}
|
|
10627
|
+
RadioGroup.defaultProps = {
|
|
10628
|
+
onChange: () => {
|
|
10629
|
+
},
|
|
10630
|
+
items: []
|
|
10631
|
+
};
|
|
10624
10632
|
var operationalAddressIsSameIds = /* @__PURE__ */ ((operationalAddressIsSameIds2) => {
|
|
10625
10633
|
operationalAddressIsSameIds2["OPERATIONAL_ADDRESS_IS_SAME"] = "OperationAddressAnswerYes";
|
|
10626
10634
|
operationalAddressIsSameIds2["OPERATIONAL_ADDRESS_IS_NOT_SAME"] = "OperationAddressAnswerNo";
|
|
@@ -11131,8 +11139,8 @@ const fileToBase64 = (file) => new Promise((resolve, reject) => {
|
|
|
11131
11139
|
reader.onerror = (error) => reject(error);
|
|
11132
11140
|
});
|
|
11133
11141
|
const getFileExtention = (fileName2) => fileName2.split(".").pop();
|
|
11134
|
-
const COUNTRIES_THAT_DONT_REQUIRE_SOLE_PROP_REGISTRATION = [CountryCodes.Australia, CountryCodes.Gibraltar, CountryCodes.Guernsey, CountryCodes.Ireland, CountryCodes.IsleOfMan, CountryCodes.Jersey, CountryCodes.Malta, CountryCodes.PuertoRico, CountryCodes.Spain, CountryCodes.UnitedKingdom, CountryCodes.UnitedStates];
|
|
11135
|
-
const COUNTRIES_THAT_DONT_REQUIRE_COMPANY_REGISTRATION = [CountryCodes.
|
|
11142
|
+
const COUNTRIES_THAT_DONT_REQUIRE_SOLE_PROP_REGISTRATION = [CountryCodes.Australia, CountryCodes.Gibraltar, CountryCodes.Guernsey, CountryCodes.HongKong, CountryCodes.Ireland, CountryCodes.IsleOfMan, CountryCodes.Jersey, CountryCodes.Malta, CountryCodes.PuertoRico, CountryCodes.Spain, CountryCodes.UnitedKingdom, CountryCodes.UnitedStates];
|
|
11143
|
+
const COUNTRIES_THAT_DONT_REQUIRE_COMPANY_REGISTRATION = [CountryCodes.UnitedStates];
|
|
11136
11144
|
const COUNTRIES_WITH_POSSIBLE_REGISTRATION_EXEMPTIONS_FOR_SOLE_PROPS = [CountryCodes.Austria, CountryCodes.Canada, CountryCodes.Finland, CountryCodes.Germany, CountryCodes.Lithuania, CountryCodes.Luxembourg, CountryCodes.Poland, CountryCodes.Sweden, CountryCodes.Switzerland];
|
|
11137
11145
|
const COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT = [CountryCodes.Australia, CountryCodes.Canada, CountryCodes.Gibraltar, CountryCodes.HongKong, CountryCodes.NewZealand, CountryCodes.PuertoRico, CountryCodes.Singapore, CountryCodes.UnitedStates];
|
|
11138
11146
|
const COUNTRIES_THAT_DO_NOT_USE_TAX_ID_FOR_SOLE_PROP = [CountryCodes.NewZealand, CountryCodes.Singapore];
|
|
@@ -11426,6 +11434,92 @@ const hasMinRequiredDecisionMakerCount = (legalEntityResponse) => {
|
|
|
11426
11434
|
return roleTypes.some((role2) => min ? (existingDecisionMakerCount == null ? void 0 : existingDecisionMakerCount[role2]) ?? min <= 0 : true);
|
|
11427
11435
|
});
|
|
11428
11436
|
};
|
|
11437
|
+
var TrustTypes = /* @__PURE__ */ ((TrustTypes2) => {
|
|
11438
|
+
TrustTypes2["BUSINESS_TRUST"] = "businessTrust";
|
|
11439
|
+
TrustTypes2["CASH_MANAGEMENT_TRUST"] = "cashManagementTrust";
|
|
11440
|
+
TrustTypes2["CHARTIABLE_TRUST"] = "charitableTrust";
|
|
11441
|
+
TrustTypes2["CORPORATE_UNIT_TRUST"] = "corporateUnitTrust";
|
|
11442
|
+
TrustTypes2["DECEASED_ESTATE"] = "deceasedEstate";
|
|
11443
|
+
TrustTypes2["DISCRETIONARY_INVESTMENT_TRUST"] = "discretionaryInvestmentTrust";
|
|
11444
|
+
TrustTypes2["DISCRETIONARY_SERVICES_MANAGEMENT_TRUST"] = "discretionaryServicesManagementTrust";
|
|
11445
|
+
TrustTypes2["DISCRETIONARY_TRADING_TRUST"] = "discretionaryTradingTrust";
|
|
11446
|
+
TrustTypes2["DISCRETIONARY_TRUST"] = "discretionaryTrust";
|
|
11447
|
+
TrustTypes2["FAMILY_TRUST"] = "familyTrust";
|
|
11448
|
+
TrustTypes2["FIRST_HOME_SAVER_ACCOUNTS_TRUST"] = "firstHomeSaverAccountsTrust";
|
|
11449
|
+
TrustTypes2["FIXED_TRUST"] = "fixedTrust";
|
|
11450
|
+
TrustTypes2["FIXED_UNIT_TRUST"] = "fixedUnitTrust";
|
|
11451
|
+
TrustTypes2["HYBRID_TRUST"] = "hybridTrust";
|
|
11452
|
+
TrustTypes2["LISTED_PUBLIC_UNIT_TRUST"] = "listedPublicUnitTrust";
|
|
11453
|
+
TrustTypes2["OTHER_TRUST"] = "otherTrust";
|
|
11454
|
+
TrustTypes2["POOLED_SUPERANNUATION_TRUST"] = "pooledSuperannuationTrust";
|
|
11455
|
+
TrustTypes2["PUBLIC_TRADING_TRUST"] = "publicTradingTrust";
|
|
11456
|
+
TrustTypes2["UNLISTED_PUBLIC_UNIT_TRUST"] = "unlistedPublicUnitTrust";
|
|
11457
|
+
return TrustTypes2;
|
|
11458
|
+
})(TrustTypes || {});
|
|
11459
|
+
const trustTypeOptions = [{
|
|
11460
|
+
id: TrustTypes.BUSINESS_TRUST,
|
|
11461
|
+
name: "businessTrust"
|
|
11462
|
+
}, {
|
|
11463
|
+
id: TrustTypes.CASH_MANAGEMENT_TRUST,
|
|
11464
|
+
name: "cashManagementTrust"
|
|
11465
|
+
}, {
|
|
11466
|
+
id: TrustTypes.CHARTIABLE_TRUST,
|
|
11467
|
+
name: "charitableTrust"
|
|
11468
|
+
}, {
|
|
11469
|
+
id: TrustTypes.CORPORATE_UNIT_TRUST,
|
|
11470
|
+
name: "corporateUnitTrust"
|
|
11471
|
+
}, {
|
|
11472
|
+
id: TrustTypes.DECEASED_ESTATE,
|
|
11473
|
+
name: "deceasedEstate"
|
|
11474
|
+
}, {
|
|
11475
|
+
id: TrustTypes.DISCRETIONARY_INVESTMENT_TRUST,
|
|
11476
|
+
name: "discretionaryInvestmentTrust"
|
|
11477
|
+
}, {
|
|
11478
|
+
id: TrustTypes.DISCRETIONARY_SERVICES_MANAGEMENT_TRUST,
|
|
11479
|
+
name: "discretionaryServicesManagementTrust"
|
|
11480
|
+
}, {
|
|
11481
|
+
id: TrustTypes.DISCRETIONARY_TRADING_TRUST,
|
|
11482
|
+
name: "discretionaryTradingTrust"
|
|
11483
|
+
}, {
|
|
11484
|
+
id: TrustTypes.DISCRETIONARY_TRUST,
|
|
11485
|
+
name: "discretionaryTrust"
|
|
11486
|
+
}, {
|
|
11487
|
+
id: TrustTypes.FAMILY_TRUST,
|
|
11488
|
+
name: "familyTrust"
|
|
11489
|
+
}, {
|
|
11490
|
+
id: TrustTypes.FIRST_HOME_SAVER_ACCOUNTS_TRUST,
|
|
11491
|
+
name: "firstHomeSaverAccountsTrust"
|
|
11492
|
+
}, {
|
|
11493
|
+
id: TrustTypes.FIXED_TRUST,
|
|
11494
|
+
name: "fixedTrust"
|
|
11495
|
+
}, {
|
|
11496
|
+
id: TrustTypes.FIXED_UNIT_TRUST,
|
|
11497
|
+
name: "fixedUnitTrust"
|
|
11498
|
+
}, {
|
|
11499
|
+
id: TrustTypes.HYBRID_TRUST,
|
|
11500
|
+
name: "hybridTrust"
|
|
11501
|
+
}, {
|
|
11502
|
+
id: TrustTypes.LISTED_PUBLIC_UNIT_TRUST,
|
|
11503
|
+
name: "listedPublicUnitTrust"
|
|
11504
|
+
}, {
|
|
11505
|
+
id: TrustTypes.OTHER_TRUST,
|
|
11506
|
+
name: "otherTrust"
|
|
11507
|
+
}, {
|
|
11508
|
+
id: TrustTypes.POOLED_SUPERANNUATION_TRUST,
|
|
11509
|
+
name: "pooledSuperannuationTrust"
|
|
11510
|
+
}, {
|
|
11511
|
+
id: TrustTypes.PUBLIC_TRADING_TRUST,
|
|
11512
|
+
name: "publicTradingTrust"
|
|
11513
|
+
}, {
|
|
11514
|
+
id: TrustTypes.UNLISTED_PUBLIC_UNIT_TRUST,
|
|
11515
|
+
name: "unlistedPublicUnitTrust"
|
|
11516
|
+
}];
|
|
11517
|
+
const nzSpecificTrustTypes = [TrustTypes.DISCRETIONARY_TRUST, TrustTypes.FAMILY_TRUST, TrustTypes.CHARTIABLE_TRUST, TrustTypes.BUSINESS_TRUST, TrustTypes.OTHER_TRUST];
|
|
11518
|
+
const auSpecificTrustTypes = [TrustTypes.CASH_MANAGEMENT_TRUST, TrustTypes.CORPORATE_UNIT_TRUST, TrustTypes.DECEASED_ESTATE, TrustTypes.DISCRETIONARY_INVESTMENT_TRUST, TrustTypes.DISCRETIONARY_SERVICES_MANAGEMENT_TRUST, TrustTypes.DISCRETIONARY_TRADING_TRUST, TrustTypes.FIRST_HOME_SAVER_ACCOUNTS_TRUST, TrustTypes.FIXED_TRUST, TrustTypes.FIXED_UNIT_TRUST, TrustTypes.HYBRID_TRUST, TrustTypes.LISTED_PUBLIC_UNIT_TRUST, TrustTypes.OTHER_TRUST, TrustTypes.POOLED_SUPERANNUATION_TRUST, TrustTypes.PUBLIC_TRADING_TRUST, TrustTypes.UNLISTED_PUBLIC_UNIT_TRUST];
|
|
11519
|
+
const countryToTrustTypes = {
|
|
11520
|
+
[CountryCodes.Australia]: auSpecificTrustTypes,
|
|
11521
|
+
[CountryCodes.NewZealand]: nzSpecificTrustTypes
|
|
11522
|
+
};
|
|
11429
11523
|
const TRUST_MEMBER_COUNT_RANGE = {
|
|
11430
11524
|
[TrustMemberTypes.DEFINED_BENEFICIARY]: {
|
|
11431
11525
|
min: 1
|
|
@@ -11531,6 +11625,20 @@ const trustMemberGuidanceRoles = {
|
|
|
11531
11625
|
className: "adl-tag--orange"
|
|
11532
11626
|
}
|
|
11533
11627
|
};
|
|
11628
|
+
const getCountrySpecificTrustTypeOptions = (country2) => {
|
|
11629
|
+
const countrySpecificTrustTypes = countryToTrustTypes[country2];
|
|
11630
|
+
if (!countrySpecificTrustTypes) {
|
|
11631
|
+
return [];
|
|
11632
|
+
}
|
|
11633
|
+
const countrySpecificTrustTypeOptions = countrySpecificTrustTypes.map((countrySpecificTrustType) => {
|
|
11634
|
+
const countrySpecificTrustTypeOption = trustTypeOptions.find((trustTypeOption) => trustTypeOption.id === countrySpecificTrustType);
|
|
11635
|
+
if (!countrySpecificTrustTypeOption) {
|
|
11636
|
+
throw new Error("getCountrySpecificTrustTypeOptions(): unknown trust type");
|
|
11637
|
+
}
|
|
11638
|
+
return countrySpecificTrustTypeOption;
|
|
11639
|
+
});
|
|
11640
|
+
return countrySpecificTrustTypeOptions;
|
|
11641
|
+
};
|
|
11534
11642
|
const entityAssociationRoles = {
|
|
11535
11643
|
...trustMemberRoles,
|
|
11536
11644
|
...decisionMakerRoles
|
|
@@ -11624,7 +11732,8 @@ function checkForImportantCapabilityStatus(type, capabilityProblems, entityIds)
|
|
|
11624
11732
|
return importantStatuses.reduce((prev, curr) => curr > prev ? curr : prev);
|
|
11625
11733
|
}
|
|
11626
11734
|
const hasPendingCapabilities = (legalEntityResponse) => Object.values(legalEntityResponse.capabilities ?? {}).some((capability) => capability.verificationStatus === "pending");
|
|
11627
|
-
const hasResolvedCapabilities = (legalEntityResponse) => Object.values((legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) ?? {}).every((capability) => capability.verificationStatus === VerificationStatus.VALID
|
|
11735
|
+
const hasResolvedCapabilities = (legalEntityResponse) => Object.values((legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) ?? {}).every((capability) => capability.verificationStatus === VerificationStatus.VALID);
|
|
11736
|
+
const hasRejectedCapabilities = (legalEntityResponse) => Object.values((legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) ?? {}).some((capability) => capability.verificationStatus === VerificationStatus.REJECTED);
|
|
11628
11737
|
const emptyFieldsForIndividual = ["name.firstName", "name.lastName", "residentialAddress.country"];
|
|
11629
11738
|
const emptyFieldsForOrganization = ["legalName", "registeredAddress.country"];
|
|
11630
11739
|
const emptyFieldsForTrust = ["name", "registeredAddress.country"];
|
|
@@ -11668,12 +11777,14 @@ const getDefaultAccountHolderType = (legalEntityResponse, isTypeChanging = false
|
|
|
11668
11777
|
const countryToTaxInfoTypeMap = {
|
|
11669
11778
|
US: "EIN",
|
|
11670
11779
|
AU: "ABN",
|
|
11671
|
-
NZ: "IRD"
|
|
11780
|
+
NZ: "IRD",
|
|
11781
|
+
HK: "BRN"
|
|
11672
11782
|
};
|
|
11673
11783
|
const updateTaxInformation = ({
|
|
11674
11784
|
taxId: taxId2,
|
|
11675
11785
|
country: country2,
|
|
11676
11786
|
exemptedFromTax: exemptedFromTax2 = false,
|
|
11787
|
+
isUen,
|
|
11677
11788
|
entity
|
|
11678
11789
|
}) => {
|
|
11679
11790
|
var _a;
|
|
@@ -11684,13 +11795,12 @@ const updateTaxInformation = ({
|
|
|
11684
11795
|
}, {})) ?? {};
|
|
11685
11796
|
if (exemptedFromTax2) {
|
|
11686
11797
|
delete taxInformation[country2];
|
|
11687
|
-
} else if (
|
|
11798
|
+
} else if (isUen !== void 0) {
|
|
11688
11799
|
taxInformation[country2] = {
|
|
11689
11800
|
country: country2,
|
|
11690
|
-
type:
|
|
11801
|
+
type: isUen ? "UEN" : "GST",
|
|
11691
11802
|
number: taxId2
|
|
11692
11803
|
};
|
|
11693
|
-
delete updatedEntity.uenOrGst;
|
|
11694
11804
|
} else {
|
|
11695
11805
|
taxInformation[country2] = {
|
|
11696
11806
|
country: country2,
|
|
@@ -11803,7 +11913,7 @@ const companyBaseMapping = {
|
|
|
11803
11913
|
"companyDetails.vatNumber": "organization.vatNumber",
|
|
11804
11914
|
"companyDetails.vatAbsenceReason": "organization.vatAbsenceReason",
|
|
11805
11915
|
"companyDetails.dateOfIncorporation": "organization.dateOfIncorporation",
|
|
11806
|
-
"companyDetails.
|
|
11916
|
+
"companyDetails.isUen": "organization.isUen",
|
|
11807
11917
|
"companyDetails.stockExchangeMIC": "organization.stockData.marketIdentifier",
|
|
11808
11918
|
"companyDetails.stockISIN": "organization.stockData.stockNumber",
|
|
11809
11919
|
"companyRegistrationAddress.registrationAddress.city": "organization.registeredAddress.city",
|
|
@@ -12053,7 +12163,12 @@ const mapLegalEntityToCompany = (legalEntity, isChangingType) => {
|
|
|
12053
12163
|
const countryTaxInformation = taxInformation.find((info) => info.country === country2);
|
|
12054
12164
|
companyCompData.companyDetails.taxId = countryTaxInformation == null ? void 0 : countryTaxInformation.number;
|
|
12055
12165
|
companyCompData.companyDetails.exemptedFromTax = false;
|
|
12056
|
-
|
|
12166
|
+
if ((countryTaxInformation == null ? void 0 : countryTaxInformation.type) === "UEN") {
|
|
12167
|
+
companyCompData.companyDetails.isUen = true;
|
|
12168
|
+
}
|
|
12169
|
+
if ((countryTaxInformation == null ? void 0 : countryTaxInformation.type) === "GST") {
|
|
12170
|
+
companyCompData.companyDetails.isUen = false;
|
|
12171
|
+
}
|
|
12057
12172
|
}
|
|
12058
12173
|
if ((_d = legalEntity == null ? void 0 : legalEntity.documentDetails) == null ? void 0 : _d.length) {
|
|
12059
12174
|
companyCompData = {
|
|
@@ -12082,6 +12197,7 @@ const mapCompanyToLegalEntity = (data) => {
|
|
|
12082
12197
|
requestObj.organization = updateTaxInformation({
|
|
12083
12198
|
taxId: data.companyDetails.taxId,
|
|
12084
12199
|
country: data.companyNameAndCountry.country,
|
|
12200
|
+
isUen: data.companyDetails.isUen,
|
|
12085
12201
|
entity: requestObj.organization
|
|
12086
12202
|
});
|
|
12087
12203
|
}
|
|
@@ -13148,7 +13264,7 @@ const initOnfido = async ({
|
|
|
13148
13264
|
language: getOnfidoLocaleConfig(i18n)
|
|
13149
13265
|
});
|
|
13150
13266
|
};
|
|
13151
|
-
const logger$
|
|
13267
|
+
const logger$g = createLogger("IdVerificationComponent");
|
|
13152
13268
|
function IdVerificationComponent({
|
|
13153
13269
|
userDetails,
|
|
13154
13270
|
handleGetIdVerificationToken,
|
|
@@ -13179,7 +13295,7 @@ function IdVerificationComponent({
|
|
|
13179
13295
|
onIdVerificationError,
|
|
13180
13296
|
onIdVerificationComplete
|
|
13181
13297
|
});
|
|
13182
|
-
})().catch(logger$
|
|
13298
|
+
})().catch(logger$g.error);
|
|
13183
13299
|
return () => {
|
|
13184
13300
|
if (onfidoSdk.current)
|
|
13185
13301
|
onfidoSdk.current.tearDown();
|
|
@@ -13231,7 +13347,7 @@ function IdDocumentAlreadyUpload(props) {
|
|
|
13231
13347
|
})]
|
|
13232
13348
|
});
|
|
13233
13349
|
}
|
|
13234
|
-
const logger$
|
|
13350
|
+
const logger$f = createLogger("IdDocumentInstantVerificationComponent");
|
|
13235
13351
|
const idVerificationSchema = ["instantIdVerificationData", "idDocumentType"];
|
|
13236
13352
|
const documentTypeValidationRules = {
|
|
13237
13353
|
instantIdVerificationData: {
|
|
@@ -13312,7 +13428,7 @@ function IdDocumentInstantVerificationComponent(props) {
|
|
|
13312
13428
|
handleGetIdVerificationToken: props.handleGetIdVerificationToken,
|
|
13313
13429
|
userDetails: props.userDetails,
|
|
13314
13430
|
onIdVerificationComplete: handleIdVerificationComplete,
|
|
13315
|
-
onIdVerificationError: logger$
|
|
13431
|
+
onIdVerificationError: logger$f.error
|
|
13316
13432
|
}), jsxs("div", {
|
|
13317
13433
|
className: "adyen-kyc-document-upload__manual-upload",
|
|
13318
13434
|
children: [i18n.get("canNotCompleteInstantVerification"), " ", jsx("button", {
|
|
@@ -15046,7 +15162,6 @@ function IdentityHKComponent(props) {
|
|
|
15046
15162
|
const hkIdentityFields = [...additionalIdentityInfoFields$1, "idNumber"];
|
|
15047
15163
|
const additionalIdentityInfoFields = ["typeOfIdentity", "licenseCardNumber"];
|
|
15048
15164
|
const identityTypes = ["nationalIdNumber", "passport", "driversLicense", "proofOfIdentityCard"];
|
|
15049
|
-
const PASSPORT_NUMBER_PATTERN = /^[A-Z]{1,2}\d{7}$/;
|
|
15050
15165
|
const nzIdentityValidationRules = {
|
|
15051
15166
|
typeOfIdentity: [isTruthyValidator],
|
|
15052
15167
|
idNumber: [{
|
|
@@ -15055,7 +15170,7 @@ const nzIdentityValidationRules = {
|
|
|
15055
15170
|
const value = val ?? "";
|
|
15056
15171
|
switch ((_b = (_a = context == null ? void 0 : context.state) == null ? void 0 : _a.data) == null ? void 0 : _b.typeOfIdentity) {
|
|
15057
15172
|
case "passport":
|
|
15058
|
-
return
|
|
15173
|
+
return PassportNumberPatterns[CountryCodes.NewZealand].test(value);
|
|
15059
15174
|
case "driversLicense":
|
|
15060
15175
|
return DriversLicenseNumberPatterns[CountryCodes.NewZealand].test(value);
|
|
15061
15176
|
default:
|
|
@@ -16102,7 +16217,7 @@ const removeAnimationStartListener = (element, listener) => {
|
|
|
16102
16217
|
element.removeEventListener("MSAnimationStart", listener, false);
|
|
16103
16218
|
element.removeEventListener("webkitAnimationStart", listener, false);
|
|
16104
16219
|
};
|
|
16105
|
-
const logger$
|
|
16220
|
+
const logger$e = createLogger("Fetch");
|
|
16106
16221
|
const getRequestObject = (options, data) => {
|
|
16107
16222
|
const {
|
|
16108
16223
|
headers = [],
|
|
@@ -16148,7 +16263,7 @@ const handleFetchError = (message, level) => {
|
|
|
16148
16263
|
case "info":
|
|
16149
16264
|
case "warn":
|
|
16150
16265
|
case "error":
|
|
16151
|
-
return logger$
|
|
16266
|
+
return logger$e[level](message);
|
|
16152
16267
|
default:
|
|
16153
16268
|
throw new Error(message);
|
|
16154
16269
|
}
|
|
@@ -16208,7 +16323,7 @@ const RELEVANT_MESSAGE_TYPES = ["account_verification_report_id", "error"];
|
|
|
16208
16323
|
const TERMINAL_DATA_PROPS = ["accounts", "error", "reference"];
|
|
16209
16324
|
const MOUNT_TIMEOUT = 10 * 1e3;
|
|
16210
16325
|
const TINK_VENDOR = "Tink";
|
|
16211
|
-
const logger$
|
|
16326
|
+
const logger$d = createLogger("iframeWidget");
|
|
16212
16327
|
const isObjectData = (data) => typeof data === "object" && !Array.isArray(data) && data !== null;
|
|
16213
16328
|
const isTerminalMessageData = (data) => Object.entries(data).some(([prop]) => TERMINAL_DATA_PROPS.includes(prop));
|
|
16214
16329
|
const parseMessageJson = (message) => {
|
|
@@ -16227,7 +16342,7 @@ const callbackErrorHandler = async (response) => {
|
|
|
16227
16342
|
try {
|
|
16228
16343
|
await response;
|
|
16229
16344
|
} catch (ex) {
|
|
16230
|
-
logger$
|
|
16345
|
+
logger$d.error(ex);
|
|
16231
16346
|
}
|
|
16232
16347
|
return {
|
|
16233
16348
|
error: "UNKNOWN_ERROR",
|
|
@@ -16333,7 +16448,7 @@ class IFrameWidget {
|
|
|
16333
16448
|
message = responseData.errorMessage;
|
|
16334
16449
|
}
|
|
16335
16450
|
} catch (ex) {
|
|
16336
|
-
logger$
|
|
16451
|
+
logger$d.error(ex);
|
|
16337
16452
|
}
|
|
16338
16453
|
throw new AdyenKycSdkError(message);
|
|
16339
16454
|
}
|
|
@@ -16512,7 +16627,7 @@ function BankVerificationWidget({
|
|
|
16512
16627
|
ref: widgetContainerRef
|
|
16513
16628
|
});
|
|
16514
16629
|
}
|
|
16515
|
-
const logger$
|
|
16630
|
+
const logger$c = createLogger("BankVerification");
|
|
16516
16631
|
const accountVerificationFields = ["verifiedAccountHolder", "verifiedBankCountry", "verifiedBankName", "verifiedCurrencyCode", "verifiedBankAccountNumber"];
|
|
16517
16632
|
const InstantVerificationErrorContext = createContext(null);
|
|
16518
16633
|
const useInstantVerificationErrorNotification = (notificationVisibilityDuration) => {
|
|
@@ -16546,7 +16661,7 @@ const usePreferredVendorForCountry = (country2, getBankVerificationVendors) => {
|
|
|
16546
16661
|
const preferredVendor2 = vendors[0];
|
|
16547
16662
|
setPreferredVendor(preferredVendor2.name ? preferredVendor2 : null);
|
|
16548
16663
|
};
|
|
16549
|
-
getPreferredVendor().catch(logger$
|
|
16664
|
+
getPreferredVendor().catch(logger$c.error);
|
|
16550
16665
|
}, [country2, getBankVerificationVendors]);
|
|
16551
16666
|
return preferredVendor;
|
|
16552
16667
|
};
|
|
@@ -18510,86 +18625,6 @@ const ContextHelper = ({
|
|
|
18510
18625
|
}), content]
|
|
18511
18626
|
})
|
|
18512
18627
|
});
|
|
18513
|
-
var TrustTypes = /* @__PURE__ */ ((TrustTypes2) => {
|
|
18514
|
-
TrustTypes2["BUSINESS_TRUST"] = "businessTrust";
|
|
18515
|
-
TrustTypes2["CASH_MANAGEMENT_TRUST"] = "cashManagementTrust";
|
|
18516
|
-
TrustTypes2["CHARTIABLE_TRUST"] = "charitableTrust";
|
|
18517
|
-
TrustTypes2["CORPORATE_UNIT_TRUST"] = "corporateUnitTrust";
|
|
18518
|
-
TrustTypes2["DECEASED_ESTATE"] = "deceasedEstate";
|
|
18519
|
-
TrustTypes2["DISCRETIONARY_INVESTMENT_TRUST"] = "discretionaryInvestmentTrust";
|
|
18520
|
-
TrustTypes2["DISCRETIONARY_SERVICES_MANAGEMENT_TRUST"] = "discretionaryServicesManagementTrust";
|
|
18521
|
-
TrustTypes2["DISCRETIONARY_TRADING_TRUST"] = "discretionaryTradingTrust";
|
|
18522
|
-
TrustTypes2["DISCRETIONARY_TRUST"] = "discretionaryTrust";
|
|
18523
|
-
TrustTypes2["FAMILY_TRUST"] = "familyTrust";
|
|
18524
|
-
TrustTypes2["FIRST_HOME_SAVER_ACCOUNTS_TRUST"] = "firstHomeSaverAccountsTrust";
|
|
18525
|
-
TrustTypes2["FIXED_TRUST"] = "fixedTrust";
|
|
18526
|
-
TrustTypes2["FIXED_UNIT_TRUST"] = "fixedUnitTrust";
|
|
18527
|
-
TrustTypes2["HYBRID_TRUST"] = "hybridTrust";
|
|
18528
|
-
TrustTypes2["LISTED_PUBLIC_UNIT_TRUST"] = "listedPublicUnitTrust";
|
|
18529
|
-
TrustTypes2["OTHER_TRUST"] = "otherTrust";
|
|
18530
|
-
TrustTypes2["POOLED_SUPERANNUATION_TRUST"] = "pooledSuperannuationTrust";
|
|
18531
|
-
TrustTypes2["PUBLIC_TRADING_TRUST"] = "publicTradingTrust";
|
|
18532
|
-
TrustTypes2["UNLISTED_PUBLIC_UNIT_TRUST"] = "unlistedPublicUnitTrust";
|
|
18533
|
-
return TrustTypes2;
|
|
18534
|
-
})(TrustTypes || {});
|
|
18535
|
-
const trustTypeOptions = [{
|
|
18536
|
-
id: TrustTypes.BUSINESS_TRUST,
|
|
18537
|
-
name: "businessTrust"
|
|
18538
|
-
}, {
|
|
18539
|
-
id: TrustTypes.CASH_MANAGEMENT_TRUST,
|
|
18540
|
-
name: "cashManagementTrust"
|
|
18541
|
-
}, {
|
|
18542
|
-
id: TrustTypes.CHARTIABLE_TRUST,
|
|
18543
|
-
name: "charitableTrust"
|
|
18544
|
-
}, {
|
|
18545
|
-
id: TrustTypes.CORPORATE_UNIT_TRUST,
|
|
18546
|
-
name: "corporateUnitTrust"
|
|
18547
|
-
}, {
|
|
18548
|
-
id: TrustTypes.DECEASED_ESTATE,
|
|
18549
|
-
name: "deceasedEstate"
|
|
18550
|
-
}, {
|
|
18551
|
-
id: TrustTypes.DISCRETIONARY_INVESTMENT_TRUST,
|
|
18552
|
-
name: "discretionaryInvestmentTrust"
|
|
18553
|
-
}, {
|
|
18554
|
-
id: TrustTypes.DISCRETIONARY_SERVICES_MANAGEMENT_TRUST,
|
|
18555
|
-
name: "discretionaryServicesManagementTrust"
|
|
18556
|
-
}, {
|
|
18557
|
-
id: TrustTypes.DISCRETIONARY_TRADING_TRUST,
|
|
18558
|
-
name: "discretionaryTradingTrust"
|
|
18559
|
-
}, {
|
|
18560
|
-
id: TrustTypes.DISCRETIONARY_TRUST,
|
|
18561
|
-
name: "discretionaryTrust"
|
|
18562
|
-
}, {
|
|
18563
|
-
id: TrustTypes.FAMILY_TRUST,
|
|
18564
|
-
name: "familyTrust"
|
|
18565
|
-
}, {
|
|
18566
|
-
id: TrustTypes.FIRST_HOME_SAVER_ACCOUNTS_TRUST,
|
|
18567
|
-
name: "firstHomeSaverAccountsTrust"
|
|
18568
|
-
}, {
|
|
18569
|
-
id: TrustTypes.FIXED_TRUST,
|
|
18570
|
-
name: "fixedTrust"
|
|
18571
|
-
}, {
|
|
18572
|
-
id: TrustTypes.FIXED_UNIT_TRUST,
|
|
18573
|
-
name: "fixedUnitTrust"
|
|
18574
|
-
}, {
|
|
18575
|
-
id: TrustTypes.HYBRID_TRUST,
|
|
18576
|
-
name: "hybridTrust"
|
|
18577
|
-
}, {
|
|
18578
|
-
id: TrustTypes.LISTED_PUBLIC_UNIT_TRUST,
|
|
18579
|
-
name: "listedPublicUnitTrust"
|
|
18580
|
-
}, {
|
|
18581
|
-
id: TrustTypes.OTHER_TRUST,
|
|
18582
|
-
name: "otherTrust"
|
|
18583
|
-
}, {
|
|
18584
|
-
id: TrustTypes.POOLED_SUPERANNUATION_TRUST,
|
|
18585
|
-
name: "pooledSuperannuationTrust"
|
|
18586
|
-
}, {
|
|
18587
|
-
id: TrustTypes.PUBLIC_TRADING_TRUST,
|
|
18588
|
-
name: "publicTradingTrust"
|
|
18589
|
-
}, {
|
|
18590
|
-
id: TrustTypes.UNLISTED_PUBLIC_UNIT_TRUST,
|
|
18591
|
-
name: "unlistedPublicUnitTrust"
|
|
18592
|
-
}];
|
|
18593
18628
|
const trustRegistrationDetailsValidations = {
|
|
18594
18629
|
trustType: {
|
|
18595
18630
|
modes: ["blur"],
|
|
@@ -18658,6 +18693,7 @@ function TrustRegistrationDetailsComponent(props) {
|
|
|
18658
18693
|
triggerValidation(["country"]);
|
|
18659
18694
|
}
|
|
18660
18695
|
}, [(_a = props.data) == null ? void 0 : _a.country]);
|
|
18696
|
+
const trustTypeOptions2 = getCountrySpecificTrustTypeOptions(props.country) ?? [];
|
|
18661
18697
|
return jsxs(Fragment, {
|
|
18662
18698
|
children: [jsx(StateContextSetter, {
|
|
18663
18699
|
owner: TRUST_REGISTRATION_DETAILS,
|
|
@@ -18711,7 +18747,7 @@ function TrustRegistrationDetailsComponent(props) {
|
|
|
18711
18747
|
name: "trustType",
|
|
18712
18748
|
onChange: handleChangeFor("trustType", "blur"),
|
|
18713
18749
|
selected: data.trustType,
|
|
18714
|
-
items:
|
|
18750
|
+
items: trustTypeOptions2.map(({
|
|
18715
18751
|
id: id2,
|
|
18716
18752
|
name
|
|
18717
18753
|
}) => ({
|
|
@@ -19751,7 +19787,7 @@ const defaultPayoutAccountFormat = {
|
|
|
19751
19787
|
[CountryCodes.Sweden]: "local",
|
|
19752
19788
|
[CountryCodes.UnitedKingdom]: "local"
|
|
19753
19789
|
};
|
|
19754
|
-
const logger$
|
|
19790
|
+
const logger$b = createLogger("useScenarioConfiguration");
|
|
19755
19791
|
const useScenarioConfiguration = ({
|
|
19756
19792
|
getConfigurationData,
|
|
19757
19793
|
getPayoutAccountFormatData,
|
|
@@ -19773,12 +19809,12 @@ const useScenarioConfiguration = ({
|
|
|
19773
19809
|
const response = await getConfigurationData();
|
|
19774
19810
|
setConfigurationResponse(response);
|
|
19775
19811
|
} catch (err) {
|
|
19776
|
-
logger$
|
|
19812
|
+
logger$b.warn("WARNING: Configuration request failed - error:", err);
|
|
19777
19813
|
} finally {
|
|
19778
19814
|
setLoadingStatus("success");
|
|
19779
19815
|
}
|
|
19780
19816
|
};
|
|
19781
|
-
makeConfigCallAndSave().catch(logger$
|
|
19817
|
+
makeConfigCallAndSave().catch(logger$b.error);
|
|
19782
19818
|
}, [getConfigurationData, setLoadingStatus]);
|
|
19783
19819
|
useEffect(() => {
|
|
19784
19820
|
setLoadingStatus("loading");
|
|
@@ -19794,12 +19830,12 @@ const useScenarioConfiguration = ({
|
|
|
19794
19830
|
const defaultAccountFormat = defaultPayoutAccountFormat[country2] ?? allowedBankAccountFormats[0];
|
|
19795
19831
|
setAccountFormat(defaultAccountFormat);
|
|
19796
19832
|
} catch (err) {
|
|
19797
|
-
logger$
|
|
19833
|
+
logger$b.warn("WARNING: Payout format request failed - error:", err);
|
|
19798
19834
|
} finally {
|
|
19799
19835
|
setLoadingStatus("success");
|
|
19800
19836
|
}
|
|
19801
19837
|
};
|
|
19802
|
-
makePayoutFormatCallAndSave().catch(logger$
|
|
19838
|
+
makePayoutFormatCallAndSave().catch(logger$b.error);
|
|
19803
19839
|
}, [country2, setAccountFormat, getPayoutAccountFormatData, setLoadingStatus]);
|
|
19804
19840
|
const {
|
|
19805
19841
|
fieldConfigurations,
|
|
@@ -20444,7 +20480,7 @@ var ToastType = /* @__PURE__ */ ((ToastType2) => {
|
|
|
20444
20480
|
return ToastType2;
|
|
20445
20481
|
})(ToastType || {});
|
|
20446
20482
|
const FormComposer = "";
|
|
20447
|
-
const logger$
|
|
20483
|
+
const logger$a = createLogger("FormRouterContextProvider");
|
|
20448
20484
|
function FormRouterContextProvider({
|
|
20449
20485
|
children,
|
|
20450
20486
|
forms,
|
|
@@ -20464,7 +20500,7 @@ function FormRouterContextProvider({
|
|
|
20464
20500
|
if (formIndex > -1) {
|
|
20465
20501
|
setFormIndex(formIndex);
|
|
20466
20502
|
} else {
|
|
20467
|
-
logger$
|
|
20503
|
+
logger$a.error("No form was found to have that field so form navigation failed.");
|
|
20468
20504
|
}
|
|
20469
20505
|
}
|
|
20470
20506
|
}), [forms, handleGetIdVerificationToken, setFormIndex]);
|
|
@@ -21061,7 +21097,7 @@ function CompanyDropinComponent({
|
|
|
21061
21097
|
})
|
|
21062
21098
|
});
|
|
21063
21099
|
}
|
|
21064
|
-
const logger$
|
|
21100
|
+
const logger$9 = createLogger("useExemptSettlor");
|
|
21065
21101
|
const useExemptSettlor = ({
|
|
21066
21102
|
trust,
|
|
21067
21103
|
handleGetLegalEntity
|
|
@@ -21073,7 +21109,7 @@ const useExemptSettlor = ({
|
|
|
21073
21109
|
setExemptSettlor(exemptSettlorLE);
|
|
21074
21110
|
}, [handleGetLegalEntity]);
|
|
21075
21111
|
useEffect(() => {
|
|
21076
|
-
updateExemptSettlor(trust).catch(logger$
|
|
21112
|
+
updateExemptSettlor(trust).catch(logger$9.error);
|
|
21077
21113
|
}, [trust, updateExemptSettlor]);
|
|
21078
21114
|
return exemptSettlor;
|
|
21079
21115
|
};
|
|
@@ -21081,22 +21117,24 @@ function useSalesChannelsSettings() {
|
|
|
21081
21117
|
const {
|
|
21082
21118
|
isSettingEnabled
|
|
21083
21119
|
} = useSettingsContext();
|
|
21084
|
-
|
|
21085
|
-
|
|
21086
|
-
|
|
21087
|
-
|
|
21088
|
-
|
|
21089
|
-
|
|
21090
|
-
|
|
21091
|
-
|
|
21092
|
-
|
|
21093
|
-
|
|
21094
|
-
|
|
21095
|
-
|
|
21096
|
-
|
|
21097
|
-
|
|
21120
|
+
return useMemo(() => {
|
|
21121
|
+
const settings = [];
|
|
21122
|
+
if (isSettingEnabled(SettingNames.RequirePciSignEcommerce)) {
|
|
21123
|
+
settings.push("eCommerce");
|
|
21124
|
+
}
|
|
21125
|
+
if (isSettingEnabled(SettingNames.RequirePciSignPos)) {
|
|
21126
|
+
settings.push("pos");
|
|
21127
|
+
}
|
|
21128
|
+
if (isSettingEnabled(SettingNames.RequirePciSignEcomMoto)) {
|
|
21129
|
+
settings.push("ecomMoto");
|
|
21130
|
+
}
|
|
21131
|
+
if (isSettingEnabled(SettingNames.RequirePciSignPosMoto)) {
|
|
21132
|
+
settings.push("posMoto");
|
|
21133
|
+
}
|
|
21134
|
+
return settings;
|
|
21135
|
+
}, [isSettingEnabled]);
|
|
21098
21136
|
}
|
|
21099
|
-
const logger$
|
|
21137
|
+
const logger$8 = createLogger("useLocalStorage");
|
|
21100
21138
|
function useLocalStorage(key, defaultValue, options) {
|
|
21101
21139
|
const {
|
|
21102
21140
|
serializer,
|
|
@@ -21117,7 +21155,7 @@ function useLocalStorage(key, defaultValue, options) {
|
|
|
21117
21155
|
const res = rawValueRef.current ? parser(rawValueRef.current) : defaultValue;
|
|
21118
21156
|
return res;
|
|
21119
21157
|
} catch (err) {
|
|
21120
|
-
logger$
|
|
21158
|
+
logger$8.error(err);
|
|
21121
21159
|
return defaultValue;
|
|
21122
21160
|
}
|
|
21123
21161
|
});
|
|
@@ -21149,7 +21187,7 @@ function useLocalStorage(key, defaultValue, options) {
|
|
|
21149
21187
|
try {
|
|
21150
21188
|
updateLocalStorage();
|
|
21151
21189
|
} catch (err) {
|
|
21152
|
-
logger$
|
|
21190
|
+
logger$8.error(err);
|
|
21153
21191
|
}
|
|
21154
21192
|
}, [value]);
|
|
21155
21193
|
useEffect(() => {
|
|
@@ -21164,7 +21202,7 @@ function useLocalStorage(key, defaultValue, options) {
|
|
|
21164
21202
|
setValue(event.newValue ? parser(event.newValue) : void 0);
|
|
21165
21203
|
}
|
|
21166
21204
|
} catch (err) {
|
|
21167
|
-
logger$
|
|
21205
|
+
logger$8.error(err);
|
|
21168
21206
|
}
|
|
21169
21207
|
};
|
|
21170
21208
|
if (typeof window === "undefined")
|
|
@@ -21444,6 +21482,24 @@ const updateExemptSettlorName = async ({
|
|
|
21444
21482
|
};
|
|
21445
21483
|
return handleUpdateLegalEntity(exemptSettlorPatch, exemptSettlor.legalEntityId);
|
|
21446
21484
|
};
|
|
21485
|
+
function AccountSetupRejected() {
|
|
21486
|
+
const {
|
|
21487
|
+
i18n
|
|
21488
|
+
} = useI18nContext();
|
|
21489
|
+
const content = jsxs("div", {
|
|
21490
|
+
children: [jsx(AlertIcon, {
|
|
21491
|
+
className: "adl-alert-error-icon",
|
|
21492
|
+
type: AlertTypes.ERROR
|
|
21493
|
+
}), jsx(FormHeader, {
|
|
21494
|
+
heading: i18n.get("cantSetUpAcccount")
|
|
21495
|
+
}), jsx("span", {
|
|
21496
|
+
children: i18n.get("accountCantBeSetUp")
|
|
21497
|
+
})]
|
|
21498
|
+
});
|
|
21499
|
+
return jsx(DropinLayout, {
|
|
21500
|
+
content
|
|
21501
|
+
});
|
|
21502
|
+
}
|
|
21447
21503
|
const DecisionMakers = "";
|
|
21448
21504
|
const iconStatus = (current, min, max) => {
|
|
21449
21505
|
const isEmpty2 = current === 0;
|
|
@@ -23748,6 +23804,7 @@ function PayoutDetailsDropinComponent({
|
|
|
23748
23804
|
capabilities,
|
|
23749
23805
|
handleHomeClick,
|
|
23750
23806
|
homeButtonLabel,
|
|
23807
|
+
hideNavigation,
|
|
23751
23808
|
refreshLegalEntity,
|
|
23752
23809
|
navigateBackToTaskList,
|
|
23753
23810
|
createTrustedTransferInstrument: createTrustedTransferInstrument2,
|
|
@@ -24077,6 +24134,7 @@ function PayoutDetailsDropinComponent({
|
|
|
24077
24134
|
hideDropinLayout,
|
|
24078
24135
|
hideHomeButton,
|
|
24079
24136
|
hideBackButton,
|
|
24137
|
+
hideNavigation,
|
|
24080
24138
|
loadingStatus,
|
|
24081
24139
|
forms,
|
|
24082
24140
|
onSubmit,
|
|
@@ -24426,14 +24484,15 @@ function PciDropinComponent({
|
|
|
24426
24484
|
legalEntityResponse,
|
|
24427
24485
|
pciTemplateResponse,
|
|
24428
24486
|
handleHomeClick,
|
|
24429
|
-
handleLanguageChange,
|
|
24430
24487
|
handleSign,
|
|
24431
24488
|
taskType,
|
|
24489
|
+
eventEmitter,
|
|
24432
24490
|
trackingConfig
|
|
24433
24491
|
}) {
|
|
24434
24492
|
var _a, _b, _c, _d;
|
|
24435
24493
|
const {
|
|
24436
|
-
i18n
|
|
24494
|
+
i18n,
|
|
24495
|
+
setLocale
|
|
24437
24496
|
} = useI18nContext();
|
|
24438
24497
|
const {
|
|
24439
24498
|
showToast
|
|
@@ -24535,8 +24594,8 @@ function PciDropinComponent({
|
|
|
24535
24594
|
});
|
|
24536
24595
|
};
|
|
24537
24596
|
useEffect(() => {
|
|
24538
|
-
|
|
24539
|
-
}, [
|
|
24597
|
+
eventEmitter.on("updateLocale", (locale) => setLocale(locale));
|
|
24598
|
+
}, []);
|
|
24540
24599
|
useEffect(() => {
|
|
24541
24600
|
userEvents.addPageView("PCI dropin");
|
|
24542
24601
|
userEvents.addEvent("Started PCI task", {
|
|
@@ -25090,7 +25149,7 @@ const serviceAgreementValidationRules = {
|
|
|
25090
25149
|
errorMessage: "fieldIsRequired"
|
|
25091
25150
|
}
|
|
25092
25151
|
};
|
|
25093
|
-
const logger$
|
|
25152
|
+
const logger$7 = createLogger("useServiceAgreement");
|
|
25094
25153
|
const FALLBACK_LANGUAGE_CODE = "en";
|
|
25095
25154
|
const useServiceAgreement = ({
|
|
25096
25155
|
handleGetServiceAgreement,
|
|
@@ -25119,7 +25178,7 @@ const useServiceAgreement = ({
|
|
|
25119
25178
|
language: agreementLanguage
|
|
25120
25179
|
});
|
|
25121
25180
|
if (!document2) {
|
|
25122
|
-
logger$
|
|
25181
|
+
logger$7.log('"document" field was missing in response');
|
|
25123
25182
|
return;
|
|
25124
25183
|
}
|
|
25125
25184
|
const contract = JSON.parse(decodeURIComponent(escape(window.atob(document2))));
|
|
@@ -25137,7 +25196,7 @@ const useServiceAgreement = ({
|
|
|
25137
25196
|
throw err;
|
|
25138
25197
|
}
|
|
25139
25198
|
};
|
|
25140
|
-
requestServiceAgreement().catch(logger$
|
|
25199
|
+
requestServiceAgreement().catch(logger$7.error);
|
|
25141
25200
|
}, [handleGetServiceAgreement, handleServiceAgreementIsNotAvailableInThatLanguage, agreementLanguage, legalEntityId, serviceAgreementType]);
|
|
25142
25201
|
return {
|
|
25143
25202
|
loading: loading2,
|
|
@@ -26449,7 +26508,7 @@ function TrustDropinComponent(props) {
|
|
|
26449
26508
|
}
|
|
26450
26509
|
const PAGES_WITH_STATUS = [TaskTypes.DECISION_MAKER_OVERVIEW, TaskTypes.TASKS_OVERVIEW];
|
|
26451
26510
|
const POLLING_INTERVAL = 3e3;
|
|
26452
|
-
const logger$
|
|
26511
|
+
const logger$6 = createLogger("DropinComposerComponent");
|
|
26453
26512
|
function DropinComposerComponent({
|
|
26454
26513
|
capabilities,
|
|
26455
26514
|
legalEntityResponse,
|
|
@@ -26526,12 +26585,12 @@ function DropinComposerComponent({
|
|
|
26526
26585
|
setPciStatus(response);
|
|
26527
26586
|
return response;
|
|
26528
26587
|
} catch (e) {
|
|
26529
|
-
logger$
|
|
26588
|
+
logger$6.warn(i18n.get("failedToGetPciStatus"));
|
|
26530
26589
|
}
|
|
26531
26590
|
}
|
|
26532
26591
|
return void 0;
|
|
26533
26592
|
};
|
|
26534
|
-
const getPciTemplate = async () => {
|
|
26593
|
+
const getPciTemplate = useCallback(async () => {
|
|
26535
26594
|
const requestPciTemplate = async (language) => {
|
|
26536
26595
|
const response = await args.handleGetPciTemplate(legalEntity.id, {
|
|
26537
26596
|
language,
|
|
@@ -26551,14 +26610,19 @@ function DropinComposerComponent({
|
|
|
26551
26610
|
await requestPciTemplate(fallbackLanguageCode);
|
|
26552
26611
|
}
|
|
26553
26612
|
}
|
|
26554
|
-
};
|
|
26613
|
+
}, [additionalSalesChannels, i18n, legalEntity.id, args.handleGetPciTemplate]);
|
|
26614
|
+
useEffect(() => {
|
|
26615
|
+
if (!tasks.includes(TaskTypes.PCI_DSS))
|
|
26616
|
+
return;
|
|
26617
|
+
getPciTemplate().catch(logger$6.error);
|
|
26618
|
+
}, [getPciTemplate, tasks]);
|
|
26555
26619
|
const getServiceAgreementAcceptanceInfos = async () => {
|
|
26556
26620
|
if (legalEntity.id && (args == null ? void 0 : args.handleGetServiceAgreementAcceptanceInfos)) {
|
|
26557
26621
|
try {
|
|
26558
26622
|
const response = await args.handleGetServiceAgreementAcceptanceInfos(legalEntity.id);
|
|
26559
26623
|
setServiceAgreementAcceptanceInfos(response.data);
|
|
26560
26624
|
} catch (e) {
|
|
26561
|
-
logger$
|
|
26625
|
+
logger$6.warn(i18n.get("failedToGetServiceAgreementStatus"));
|
|
26562
26626
|
}
|
|
26563
26627
|
}
|
|
26564
26628
|
};
|
|
@@ -26568,7 +26632,7 @@ function DropinComposerComponent({
|
|
|
26568
26632
|
const response = await args.handleGetServiceAgreementStatus(legalEntity.id);
|
|
26569
26633
|
setServiceAgreementTypes(response.termsOfServiceTypes);
|
|
26570
26634
|
} catch (e) {
|
|
26571
|
-
logger$
|
|
26635
|
+
logger$6.warn(i18n.get("failedToGetServiceAgreementStatus"));
|
|
26572
26636
|
}
|
|
26573
26637
|
}
|
|
26574
26638
|
};
|
|
@@ -26607,7 +26671,7 @@ function DropinComposerComponent({
|
|
|
26607
26671
|
setCapabilityProblems(getCapabilityProblems(response));
|
|
26608
26672
|
return response;
|
|
26609
26673
|
} catch (e) {
|
|
26610
|
-
logger$
|
|
26674
|
+
logger$6.warn(i18n.get("failedToFetchLegalEntityDetails"));
|
|
26611
26675
|
}
|
|
26612
26676
|
}
|
|
26613
26677
|
return void 0;
|
|
@@ -26619,7 +26683,7 @@ function DropinComposerComponent({
|
|
|
26619
26683
|
setTrust(response);
|
|
26620
26684
|
return response;
|
|
26621
26685
|
} catch (e) {
|
|
26622
|
-
logger$
|
|
26686
|
+
logger$6.warn(i18n.get("failedToFetchTrustDetails"));
|
|
26623
26687
|
}
|
|
26624
26688
|
}
|
|
26625
26689
|
return void 0;
|
|
@@ -26669,7 +26733,7 @@ function DropinComposerComponent({
|
|
|
26669
26733
|
label: i18n.get("successFullyRemovedTrustMember")
|
|
26670
26734
|
});
|
|
26671
26735
|
} catch (err) {
|
|
26672
|
-
logger$
|
|
26736
|
+
logger$6.error(`Failed to delete trust member`, err);
|
|
26673
26737
|
showToast({
|
|
26674
26738
|
type: ToastType.ERROR,
|
|
26675
26739
|
label: i18n.get("failedToRemoveTrustMember")
|
|
@@ -26721,7 +26785,7 @@ function DropinComposerComponent({
|
|
|
26721
26785
|
break;
|
|
26722
26786
|
case "rootTrustee":
|
|
26723
26787
|
default:
|
|
26724
|
-
logger$
|
|
26788
|
+
logger$6.warn(`Updating trust member type "${trustMember.trustMemberType}" is not implemented.`);
|
|
26725
26789
|
}
|
|
26726
26790
|
showToast({
|
|
26727
26791
|
label: i18n.get("successfullyUpdatedDetails"),
|
|
@@ -26729,7 +26793,7 @@ function DropinComposerComponent({
|
|
|
26729
26793
|
});
|
|
26730
26794
|
await refreshTrustAndRunOnSubmit(trust, 1);
|
|
26731
26795
|
} catch (err) {
|
|
26732
|
-
logger$
|
|
26796
|
+
logger$6.error(err);
|
|
26733
26797
|
showToast({
|
|
26734
26798
|
label: i18n.get("failedToUpdateDetails"),
|
|
26735
26799
|
type: ToastType.ERROR
|
|
@@ -26952,16 +27016,25 @@ function DropinComposerComponent({
|
|
|
26952
27016
|
}
|
|
26953
27017
|
};
|
|
26954
27018
|
setIsLoadingConfiguration(true);
|
|
26955
|
-
fetchConfiguration().catch(logger$
|
|
27019
|
+
fetchConfiguration().catch(logger$6.error).finally(() => {
|
|
26956
27020
|
setIsLoadingConfiguration(false);
|
|
26957
27021
|
onLoad();
|
|
26958
27022
|
});
|
|
26959
27023
|
}, [legalEntity.type, contextCountry]);
|
|
27024
|
+
useEffect(() => {
|
|
27025
|
+
if (hasRejectedCapabilities(legalEntity)) {
|
|
27026
|
+
setTaskHistory([TaskTypes.CAPABILITY_REJECTED]);
|
|
27027
|
+
}
|
|
27028
|
+
}, [legalEntity]);
|
|
26960
27029
|
useEffect(() => {
|
|
26961
27030
|
if (PAGES_WITH_STATUS.includes(taskHistory[taskHistory.length - 1])) {
|
|
26962
27031
|
if (!pollingId) {
|
|
26963
27032
|
const pollingInterval = setInterval(async () => {
|
|
26964
|
-
if (
|
|
27033
|
+
if (hasRejectedCapabilities(legalEntity)) {
|
|
27034
|
+
setTaskHistory([TaskTypes.CAPABILITY_REJECTED]);
|
|
27035
|
+
clearInterval(pollingId);
|
|
27036
|
+
setPollingId(null);
|
|
27037
|
+
} else if (hasResolvedCapabilities(legalEntity)) {
|
|
26965
27038
|
clearInterval(pollingId);
|
|
26966
27039
|
setPollingId(null);
|
|
26967
27040
|
} else {
|
|
@@ -26992,6 +27065,8 @@ function DropinComposerComponent({
|
|
|
26992
27065
|
},
|
|
26993
27066
|
tasks
|
|
26994
27067
|
});
|
|
27068
|
+
case TaskTypes.CAPABILITY_REJECTED:
|
|
27069
|
+
return jsx(AccountSetupRejected, {});
|
|
26995
27070
|
case TaskTypes.TASKS_OVERVIEW:
|
|
26996
27071
|
return jsx(TaskListComponent, {
|
|
26997
27072
|
onNavigateToTask: navigateTo,
|
|
@@ -27237,7 +27312,6 @@ function DropinComposerComponent({
|
|
|
27237
27312
|
},
|
|
27238
27313
|
taskType: TaskTypes.PCI_DSS,
|
|
27239
27314
|
handleHomeClick: navigateBack,
|
|
27240
|
-
handleLanguageChange: getPciTemplate,
|
|
27241
27315
|
handleSign: async (...params) => {
|
|
27242
27316
|
await args.handleSignPci(...params);
|
|
27243
27317
|
await getPciStatus();
|
|
@@ -27329,23 +27403,6 @@ const createTransferInstrument = async (context, transferInstrument) => {
|
|
|
27329
27403
|
}
|
|
27330
27404
|
}, transferInstrument);
|
|
27331
27405
|
};
|
|
27332
|
-
const getBankVerificationProviders = async (context) => {
|
|
27333
|
-
const {
|
|
27334
|
-
loadingContext,
|
|
27335
|
-
sdkToken,
|
|
27336
|
-
legalEntityId
|
|
27337
|
-
} = context;
|
|
27338
|
-
return httpGet({
|
|
27339
|
-
loadingContext,
|
|
27340
|
-
errorLevel: "warn",
|
|
27341
|
-
errorMessage: `Bank Verification providers not available`,
|
|
27342
|
-
path: `${legalEntityId}/configurations/bankVerificationProviders`,
|
|
27343
|
-
sdkToken,
|
|
27344
|
-
headers: {
|
|
27345
|
-
"Content-Type": "application/json"
|
|
27346
|
-
}
|
|
27347
|
-
});
|
|
27348
|
-
};
|
|
27349
27406
|
const getBankVerificationVendor = async (context, country2) => {
|
|
27350
27407
|
const {
|
|
27351
27408
|
loadingContext,
|
|
@@ -27607,6 +27664,7 @@ class EventEmitter {
|
|
|
27607
27664
|
};
|
|
27608
27665
|
}
|
|
27609
27666
|
}
|
|
27667
|
+
const logger$5 = createLogger("PayoutEmbeddedDropin");
|
|
27610
27668
|
function PayoutEmbeddedDropin({
|
|
27611
27669
|
legalEntityId,
|
|
27612
27670
|
transferInstrumentId,
|
|
@@ -27640,8 +27698,8 @@ function PayoutEmbeddedDropin({
|
|
|
27640
27698
|
const ti = await getTransferInstrument2(transferInstrumentId);
|
|
27641
27699
|
setTransferInstrument(ti);
|
|
27642
27700
|
}
|
|
27643
|
-
})();
|
|
27644
|
-
}, [
|
|
27701
|
+
})().catch(logger$5.error);
|
|
27702
|
+
}, [transferInstrumentId]);
|
|
27645
27703
|
return legalEntity ? jsx(PayoutDetailsDropinComponent, {
|
|
27646
27704
|
eventEmitter: eventEmitter ?? new EventEmitter(),
|
|
27647
27705
|
transferInstrument,
|
|
@@ -27653,6 +27711,7 @@ function PayoutEmbeddedDropin({
|
|
|
27653
27711
|
handleUpdateDocument: updateDocument2,
|
|
27654
27712
|
handleCreateTransferInstrument: createTransferInstrument2,
|
|
27655
27713
|
handleUpdateTransferInstrument: updateTransferInstrument2,
|
|
27714
|
+
hideNavigation: true,
|
|
27656
27715
|
refreshLegalEntity: fetchLegalEntity,
|
|
27657
27716
|
onChange,
|
|
27658
27717
|
onSubmit,
|
|
@@ -27775,6 +27834,23 @@ const getAccountFormatsForCountry = async (country2) => {
|
|
|
27775
27834
|
return (await importForCountry()).default;
|
|
27776
27835
|
};
|
|
27777
27836
|
const getPayoutAccountFormat = async (country2) => getAccountFormatsForCountry(country2);
|
|
27837
|
+
const getAllowedLocales$1 = async (context) => {
|
|
27838
|
+
const {
|
|
27839
|
+
loadingContext,
|
|
27840
|
+
sdkToken,
|
|
27841
|
+
legalEntityId
|
|
27842
|
+
} = context;
|
|
27843
|
+
return httpGet({
|
|
27844
|
+
loadingContext,
|
|
27845
|
+
errorLevel: "warn",
|
|
27846
|
+
errorMessage: `Supported locales not available`,
|
|
27847
|
+
path: `${legalEntityId}/configurations/supportedLocales`,
|
|
27848
|
+
sdkToken,
|
|
27849
|
+
headers: {
|
|
27850
|
+
"Content-Type": "application/json"
|
|
27851
|
+
}
|
|
27852
|
+
});
|
|
27853
|
+
};
|
|
27778
27854
|
const getEmbeddedApi = ({
|
|
27779
27855
|
base,
|
|
27780
27856
|
sdkToken,
|
|
@@ -27791,9 +27867,8 @@ const getEmbeddedApi = ({
|
|
|
27791
27867
|
getConfiguration: async ({
|
|
27792
27868
|
legalEntityType
|
|
27793
27869
|
}) => {
|
|
27794
|
-
const [
|
|
27870
|
+
const [scenarios, tasks] = await Promise.all([getScenarios(baseRequestContext), getTasks(baseRequestContext)]);
|
|
27795
27871
|
return {
|
|
27796
|
-
bankVerificationProviders,
|
|
27797
27872
|
matchingScenario: {
|
|
27798
27873
|
[legalEntityType]: scenarios
|
|
27799
27874
|
},
|
|
@@ -27811,9 +27886,7 @@ const getEmbeddedApi = ({
|
|
|
27811
27886
|
getAllowedCountries: () => {
|
|
27812
27887
|
throw new Error("getAllowedCountries: Not implemented in onboarding component api");
|
|
27813
27888
|
},
|
|
27814
|
-
getAllowedLocales: () =>
|
|
27815
|
-
throw new Error("getAllowedLocales: Not implemented in onboarding component api");
|
|
27816
|
-
},
|
|
27889
|
+
getAllowedLocales: async () => getAllowedLocales$1(baseRequestContext),
|
|
27817
27890
|
validatePhoneNumber: () => {
|
|
27818
27891
|
throw new Error("validatePhoneNumber: Not implemented in onboarding component api");
|
|
27819
27892
|
},
|
|
@@ -28167,7 +28240,7 @@ const useAllowedLocales = () => {
|
|
|
28167
28240
|
const [allowedLocales, setAllowedLocales] = useState();
|
|
28168
28241
|
useEffect(() => {
|
|
28169
28242
|
getAllowedLocales2().then((response) => setAllowedLocales(response.locales)).catch(logger$1.error);
|
|
28170
|
-
}, [
|
|
28243
|
+
}, []);
|
|
28171
28244
|
return allowedLocales;
|
|
28172
28245
|
};
|
|
28173
28246
|
const logger = createLogger("useTranslations");
|
|
@@ -28227,8 +28300,9 @@ const I18nProvider = ({
|
|
|
28227
28300
|
const i18n = useMemo(() => new Language({
|
|
28228
28301
|
locale: loadedLocale,
|
|
28229
28302
|
translations,
|
|
28230
|
-
customTranslations
|
|
28231
|
-
|
|
28303
|
+
customTranslations,
|
|
28304
|
+
allowedLocales
|
|
28305
|
+
}), [loadedLocale, translations, customTranslations, allowedLocales]);
|
|
28232
28306
|
const contextValue = useMemo(() => ({
|
|
28233
28307
|
i18n,
|
|
28234
28308
|
setLocale
|
|
@@ -28864,10 +28938,6 @@ const pciDropinSchema = {
|
|
|
28864
28938
|
type: "object",
|
|
28865
28939
|
required: true
|
|
28866
28940
|
},
|
|
28867
|
-
handleLanguageChange: {
|
|
28868
|
-
type: "function",
|
|
28869
|
-
required: true
|
|
28870
|
-
},
|
|
28871
28941
|
handleHomeClick: {
|
|
28872
28942
|
type: "function",
|
|
28873
28943
|
required: true
|