@adyen/kyc-components 3.0.0-beta.19 → 3.0.0-beta.20
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 +695 -423
- package/dist/style.css +12 -11
- package/dist/types/components/Dropins/IndividualDropin/components/IndividualDropinComponent.d.ts +1 -1
- package/dist/types/components/EmbeddedDropins/CreateIndividualComponent/CreateIndividualComponent.d.ts +16 -0
- package/dist/types/components/EmbeddedDropins/CreateTransferInstrumentComponent/CreateTransferInstrumentComponent.d.ts +11 -0
- package/dist/types/components/Individual/types.d.ts +2 -1
- package/dist/types/components/Introduction/Introduction.d.ts +10 -0
- package/dist/types/components/Introduction/IntroductionScreen.d.ts +8 -0
- package/dist/types/components/Introduction/constants.d.ts +3 -0
- package/dist/types/components/Introduction/copy.d.ts +14 -0
- package/dist/types/components/Introduction/types.d.ts +12 -0
- package/dist/types/components/TaskList/types.d.ts +1 -1
- package/dist/types/components/index.d.ts +4 -2
- package/dist/types/components/internal/AccountHolder/types.d.ts +1 -1
- package/dist/types/components/internal/Address/utils.d.ts +1 -1
- package/dist/types/core/Context/SettingsContext/types.d.ts +6 -2
- package/dist/types/core/SDKValidation/index.d.ts +1 -1
- package/dist/types/core/Services/componentApi/create-legal-entity.d.ts +3 -0
- package/dist/types/core/Services/componentApi/index.d.ts +2 -0
- package/dist/types/core/Services/componentApi/update-legal-entity.d.ts +3 -0
- package/dist/types/core/core.d.ts +1 -1
- package/dist/types/core/hooks/introduction/useCanSeeIntroduction.d.ts +5 -0
- package/dist/types/core/hooks/introduction/useHasSeenIntroduction.d.ts +7 -0
- package/dist/types/core/hooks/introduction/useIntroductionScreens.d.ts +8 -0
- package/dist/types/core/hooks/introduction/useShouldShowIntroduction.d.ts +5 -0
- package/dist/types/core/hooks/useBusinessSetup.d.ts +1 -1
- package/dist/types/core/hooks/useComponentApi.d.ts +6 -0
- package/dist/types/core/hooks/useLegalEntityType.d.ts +6 -0
- package/dist/types/core/hooks/useLocalStorage.d.ts +5 -2
- package/dist/types/core/models/api/organization.d.ts +1 -1
- package/dist/types/core/models/errors/entity-problems.d.ts +1 -1
- package/dist/types/core/models/form-rules.d.ts +1 -0
- package/dist/types/language/config.d.ts +46 -28
- 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/trust-util.d.ts +1 -1
- package/package.json +1 -1
- package/dist/types/components/EmbeddedDropins/TransferInstrumentComponent/TransferInstrumentComponent.d.ts +0 -11
- package/dist/types/components/TaskIntros/TaskIntro.d.ts +0 -8
- package/dist/types/components/TaskIntros/TaskIntros.d.ts +0 -10
- package/dist/types/components/TaskIntros/copy.d.ts +0 -14
- package/dist/types/components/TaskIntros/types.d.ts +0 -8
- package/dist/types/core/hooks/taskIntros.d.ts +0 -10
|
@@ -139,8 +139,13 @@ const privateCompanyTitle = "Private company";
|
|
|
139
139
|
const privateCompanyDescription = "Owned privately. The shareholders don’t necessarily trade on public exchanges (like the stock market).";
|
|
140
140
|
const publicCompanyTitle = "Public company";
|
|
141
141
|
const publicCompanyDescription = "Owned by public shareholders. They’re also required to disclose financial information to the public regularly.";
|
|
142
|
+
const incorporatedPartnership = "Incorporated partnership";
|
|
143
|
+
const unincorporatedPartnership = "Unincorporated partnership";
|
|
142
144
|
const incorporatedPartnershipTitle = "Incorporated partnership";
|
|
143
145
|
const incorporatedPartnershipDescription = "An agreement between two or more people who run a business together.";
|
|
146
|
+
const incorporatedPartnershipNewEntryFlowDescription = "You and your partners have limited liability for business debts.";
|
|
147
|
+
const unincorporatedPartnershipDescription = "You or your partners are personally liable for business debts.";
|
|
148
|
+
const unincorporatedPartnershipNewEntryFlowDescription = "You or your partners are personally liable for business debts.";
|
|
144
149
|
const nonProfitOrCharitableOrgTitle = "Non-profit or charitable organization";
|
|
145
150
|
const nonProfitOrCharitableOrgDescription = "An organization that has an official status as not for profit or tax exempt, sometimes called an NGO.";
|
|
146
151
|
const governmentalOrganizationTitle = "Governmental organization";
|
|
@@ -320,9 +325,9 @@ const directorDescription = "Someone appointed to manage a company's business an
|
|
|
320
325
|
const provideAllDirectors = "Add <strong>all directors</strong>. You should have at least 1 director.";
|
|
321
326
|
const addDecisionMaker = "Add decision-maker";
|
|
322
327
|
const decisionMakers = "Decision-makers";
|
|
323
|
-
const
|
|
328
|
+
const goToIntroduction = "How does it work?";
|
|
324
329
|
const goToOverview = "Go to overview";
|
|
325
|
-
const
|
|
330
|
+
const goToOverviewFromIntroduction = "Skip intro";
|
|
326
331
|
const saveAndGoToOverview = "Save and go to overview";
|
|
327
332
|
const pleaseEnsureTheFollowing = "Please ensure the following section is fulfilled to complete the review of your data.";
|
|
328
333
|
const edit = "Edit";
|
|
@@ -1097,32 +1102,45 @@ const firstNameOfSettlor = "First name of settlor";
|
|
|
1097
1102
|
const lastNameOfSettlor = "Last name of settlor";
|
|
1098
1103
|
const enterSettlorsFirstNameExactlyAsItAppearsInID = "Enter the settlor's first name(s) exactly as it appears on their identity document";
|
|
1099
1104
|
const enterSettlorsLastNameExactlyAsItAppearsInID = "Enter the settlor's last name(s) exactly as it appears on their identity document";
|
|
1100
|
-
const
|
|
1101
|
-
const
|
|
1102
|
-
const
|
|
1103
|
-
const
|
|
1104
|
-
const
|
|
1105
|
-
const
|
|
1106
|
-
const
|
|
1107
|
-
const
|
|
1108
|
-
const
|
|
1109
|
-
const
|
|
1110
|
-
const
|
|
1111
|
-
const
|
|
1112
|
-
const
|
|
1113
|
-
const
|
|
1114
|
-
const
|
|
1115
|
-
const
|
|
1116
|
-
const
|
|
1117
|
-
const
|
|
1118
|
-
const
|
|
1119
|
-
const
|
|
1120
|
-
const
|
|
1121
|
-
const
|
|
1122
|
-
const
|
|
1123
|
-
const
|
|
1124
|
-
const
|
|
1125
|
-
const
|
|
1105
|
+
const introductionScreenPrologueTitle = "Before you begin...";
|
|
1106
|
+
const introductionScreenPrologueDescriptionP1 = "We’ll ask for some details about your business as part of financial regulations.";
|
|
1107
|
+
const introductionScreenPrologueDescriptionP2 = "Our advice? Have these details on hand so you can get verified quickly.";
|
|
1108
|
+
const introductionScreenCompanyTitle = "Company details";
|
|
1109
|
+
const introductionScreenCompanyDescriptionP1 = "For example, your company name and registration number.";
|
|
1110
|
+
const introductionScreenCompanyDescriptionP2 = "Where to find this information";
|
|
1111
|
+
const introductionScreenCompanyDescriptionLI1 = "Your company registration document";
|
|
1112
|
+
const introductionScreenIndividualTitle = "Personal details";
|
|
1113
|
+
const introductionScreenIndividualDescriptionP1 = "For example, your name and residential address.";
|
|
1114
|
+
const introductionScreenIndividualDescriptionP2 = "Where to find this information";
|
|
1115
|
+
const introductionScreenIndividualDescriptionLI1 = "Driver’s license";
|
|
1116
|
+
const introductionScreenIndividualDescriptionLI2 = "Passport";
|
|
1117
|
+
const introductionScreenIndividualDescriptionLI3 = "ID document";
|
|
1118
|
+
const introductionScreenDecisionMakerTitle = "Decision-makers";
|
|
1119
|
+
const introductionScreenDecisionMakerDescriptionP1 = "For example, the name and address of important people in your company.";
|
|
1120
|
+
const introductionScreenDecisionMakerDescriptionP2 = "Where to find this information";
|
|
1121
|
+
const introductionScreenDecisionMakerDescriptionLI1 = "Driver’s license";
|
|
1122
|
+
const introductionScreenDecisionMakerDescriptionLI2 = "Passport";
|
|
1123
|
+
const introductionScreenDecisionMakerDescriptionLI3 = "ID document";
|
|
1124
|
+
const introductionScreenSoleProprietorCompanyTitle = "Sole proprietorship details";
|
|
1125
|
+
const introductionScreenSoleProprietorCompanyDescriptionP1 = "For example, your business name and tax identification number.";
|
|
1126
|
+
const introductionScreenSoleProprietorCompanyDescriptionP2 = "Where to find this information";
|
|
1127
|
+
const introductionScreenSoleProprietorCompanyDescriptionLI1 = "Your sole proprietorship registration document";
|
|
1128
|
+
const introductionScreenTrustTitle = "Trust details";
|
|
1129
|
+
const introductionScreenTrustDescriptionP1 = "For example, your trust’s name and business number. You’ll also need to upload your trust deed.";
|
|
1130
|
+
const introductionScreenTrustDescriptionP2 = "Where to find this information";
|
|
1131
|
+
const introductionScreenTrustDescriptionLI1 = "Your trust registration document";
|
|
1132
|
+
const introductionScreenTrustMemberTitle = "Trust members";
|
|
1133
|
+
const introductionScreenTrustMemberDescriptionP1 = "The name, date of birth, and address of trust members such as settlors and beneficiaries.";
|
|
1134
|
+
const introductionScreenTrustMemberDescriptionP2 = "Where to find this information";
|
|
1135
|
+
const introductionScreenTrustMemberDescriptionLI1 = "Driver’s license";
|
|
1136
|
+
const introductionScreenTrustMemberDescriptionLI2 = "Passport";
|
|
1137
|
+
const introductionScreenTrustMemberDescriptionLI3 = "ID document";
|
|
1138
|
+
const introductionScreenAccountTitle = "Bank account details";
|
|
1139
|
+
const introductionScreenAccountDescriptionP1 = "For example, the account holder name and account number.";
|
|
1140
|
+
const introductionScreenAccountDescriptionP2 = "This is the bank account you use to send or receive funds.";
|
|
1141
|
+
const introductionScreenEpilogueTitle = "Why do we need this information?";
|
|
1142
|
+
const introductionScreenEpilogueDescriptionP1 = "We check all this information against official records to verify your identity and comply with financial regulations.";
|
|
1143
|
+
const introductionScreenEpilogueDescriptionP2 = "Your information will be used only for these purposes.";
|
|
1126
1144
|
const addBankDetails = "Add bank details";
|
|
1127
1145
|
const addMissingBankDetails = "We are missing your bank details in order to perform payouts, please add your bank account.";
|
|
1128
1146
|
const bankDetails = "Bank details";
|
|
@@ -1262,8 +1280,13 @@ const defaultTrans = {
|
|
|
1262
1280
|
privateCompanyDescription,
|
|
1263
1281
|
publicCompanyTitle,
|
|
1264
1282
|
publicCompanyDescription,
|
|
1283
|
+
incorporatedPartnership,
|
|
1284
|
+
unincorporatedPartnership,
|
|
1265
1285
|
incorporatedPartnershipTitle,
|
|
1266
1286
|
incorporatedPartnershipDescription,
|
|
1287
|
+
incorporatedPartnershipNewEntryFlowDescription,
|
|
1288
|
+
unincorporatedPartnershipDescription,
|
|
1289
|
+
unincorporatedPartnershipNewEntryFlowDescription,
|
|
1267
1290
|
nonProfitOrCharitableOrgTitle,
|
|
1268
1291
|
nonProfitOrCharitableOrgDescription,
|
|
1269
1292
|
governmentalOrganizationTitle,
|
|
@@ -1443,9 +1466,9 @@ const defaultTrans = {
|
|
|
1443
1466
|
provideAllDirectors,
|
|
1444
1467
|
addDecisionMaker,
|
|
1445
1468
|
decisionMakers,
|
|
1446
|
-
|
|
1469
|
+
goToIntroduction,
|
|
1447
1470
|
goToOverview,
|
|
1448
|
-
|
|
1471
|
+
goToOverviewFromIntroduction,
|
|
1449
1472
|
saveAndGoToOverview,
|
|
1450
1473
|
pleaseEnsureTheFollowing,
|
|
1451
1474
|
edit,
|
|
@@ -2237,32 +2260,45 @@ const defaultTrans = {
|
|
|
2237
2260
|
lastNameOfSettlor,
|
|
2238
2261
|
enterSettlorsFirstNameExactlyAsItAppearsInID,
|
|
2239
2262
|
enterSettlorsLastNameExactlyAsItAppearsInID,
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2263
|
+
introductionScreenPrologueTitle,
|
|
2264
|
+
introductionScreenPrologueDescriptionP1,
|
|
2265
|
+
introductionScreenPrologueDescriptionP2,
|
|
2266
|
+
introductionScreenCompanyTitle,
|
|
2267
|
+
introductionScreenCompanyDescriptionP1,
|
|
2268
|
+
introductionScreenCompanyDescriptionP2,
|
|
2269
|
+
introductionScreenCompanyDescriptionLI1,
|
|
2270
|
+
introductionScreenIndividualTitle,
|
|
2271
|
+
introductionScreenIndividualDescriptionP1,
|
|
2272
|
+
introductionScreenIndividualDescriptionP2,
|
|
2273
|
+
introductionScreenIndividualDescriptionLI1,
|
|
2274
|
+
introductionScreenIndividualDescriptionLI2,
|
|
2275
|
+
introductionScreenIndividualDescriptionLI3,
|
|
2276
|
+
introductionScreenDecisionMakerTitle,
|
|
2277
|
+
introductionScreenDecisionMakerDescriptionP1,
|
|
2278
|
+
introductionScreenDecisionMakerDescriptionP2,
|
|
2279
|
+
introductionScreenDecisionMakerDescriptionLI1,
|
|
2280
|
+
introductionScreenDecisionMakerDescriptionLI2,
|
|
2281
|
+
introductionScreenDecisionMakerDescriptionLI3,
|
|
2282
|
+
introductionScreenSoleProprietorCompanyTitle,
|
|
2283
|
+
introductionScreenSoleProprietorCompanyDescriptionP1,
|
|
2284
|
+
introductionScreenSoleProprietorCompanyDescriptionP2,
|
|
2285
|
+
introductionScreenSoleProprietorCompanyDescriptionLI1,
|
|
2286
|
+
introductionScreenTrustTitle,
|
|
2287
|
+
introductionScreenTrustDescriptionP1,
|
|
2288
|
+
introductionScreenTrustDescriptionP2,
|
|
2289
|
+
introductionScreenTrustDescriptionLI1,
|
|
2290
|
+
introductionScreenTrustMemberTitle,
|
|
2291
|
+
introductionScreenTrustMemberDescriptionP1,
|
|
2292
|
+
introductionScreenTrustMemberDescriptionP2,
|
|
2293
|
+
introductionScreenTrustMemberDescriptionLI1,
|
|
2294
|
+
introductionScreenTrustMemberDescriptionLI2,
|
|
2295
|
+
introductionScreenTrustMemberDescriptionLI3,
|
|
2296
|
+
introductionScreenAccountTitle,
|
|
2297
|
+
introductionScreenAccountDescriptionP1,
|
|
2298
|
+
introductionScreenAccountDescriptionP2,
|
|
2299
|
+
introductionScreenEpilogueTitle,
|
|
2300
|
+
introductionScreenEpilogueDescriptionP1,
|
|
2301
|
+
introductionScreenEpilogueDescriptionP2,
|
|
2266
2302
|
addBankDetails,
|
|
2267
2303
|
addMissingBankDetails,
|
|
2268
2304
|
bankDetails,
|
|
@@ -2962,7 +2998,7 @@ const createLogger = (namespace) => {
|
|
|
2962
2998
|
});
|
|
2963
2999
|
return methods;
|
|
2964
3000
|
};
|
|
2965
|
-
const logger$
|
|
3001
|
+
const logger$q = createLogger("Link");
|
|
2966
3002
|
const getIconClass = (icon, external) => {
|
|
2967
3003
|
if (external) {
|
|
2968
3004
|
return "adl-link__icon adyen-kyc-icon-external-link";
|
|
@@ -2974,7 +3010,7 @@ const getIconClass = (icon, external) => {
|
|
|
2974
3010
|
};
|
|
2975
3011
|
const isValidLink = (href) => {
|
|
2976
3012
|
if (href === "#") {
|
|
2977
|
-
logger$
|
|
3013
|
+
logger$q.error('Links must include a valid href. If your href is "#", consider using a Button instead');
|
|
2978
3014
|
return false;
|
|
2979
3015
|
}
|
|
2980
3016
|
return true;
|
|
@@ -3210,11 +3246,15 @@ var SettingNames = /* @__PURE__ */ ((SettingNames2) => {
|
|
|
3210
3246
|
SettingNames2["AllowIntraRegionCrossBorderPayout"] = "allowIntraRegionCrossBorderPayout";
|
|
3211
3247
|
SettingNames2["AllowLegalEntityTypeChange"] = "changeLegalEntityType";
|
|
3212
3248
|
SettingNames2["AllowPrefilledCountryEdit"] = "editPrefilledCountry";
|
|
3213
|
-
SettingNames2["ViewOnboardingGuidance"] = "viewOnboardingGuidance";
|
|
3214
3249
|
SettingNames2["RequirePciSignEcommerce"] = "requirePciSignEcommerce";
|
|
3215
3250
|
SettingNames2["RequirePciSignPos"] = "requirePciSignPos";
|
|
3216
3251
|
SettingNames2["RequirePciSignEcomMoto"] = "requirePciSignEcomMoto";
|
|
3217
3252
|
SettingNames2["RequirePciSignPosMoto"] = "requirePciSignPosMoto";
|
|
3253
|
+
SettingNames2["HideOnboardingIntroductionIndividual"] = "hideOnboardingIntroductionIndividual";
|
|
3254
|
+
SettingNames2["HideOnboardingIntroductionOrganization"] = "hideOnboardingIntroductionOrganization";
|
|
3255
|
+
SettingNames2["HideOnboardingIntroductionTrust"] = "hideOnboardingIntroductionTrust";
|
|
3256
|
+
SettingNames2["HideOnboardingIntroductionSoleProprietor"] = "hideOnboardingIntroductionSoleProprietor";
|
|
3257
|
+
SettingNames2["ViewOnboardingGuidance"] = "viewOnboardingGuidance";
|
|
3218
3258
|
return SettingNames2;
|
|
3219
3259
|
})(SettingNames || {});
|
|
3220
3260
|
const ON_CHANGE_DEBOUNCE_DURATION = 200;
|
|
@@ -3264,14 +3304,14 @@ function useResetGlobalData(caller) {
|
|
|
3264
3304
|
}
|
|
3265
3305
|
}), [dispatch, caller]);
|
|
3266
3306
|
}
|
|
3267
|
-
const logger$
|
|
3307
|
+
const logger$p = createLogger("useAllowedCountries");
|
|
3268
3308
|
const useAllowedCountries = () => {
|
|
3269
3309
|
const {
|
|
3270
3310
|
getAllowedCountries: getAllowedCountries2
|
|
3271
3311
|
} = useConfigurationApi();
|
|
3272
3312
|
const [allowedCountries, setAllowedCountries] = useState();
|
|
3273
3313
|
useEffect(() => {
|
|
3274
|
-
getAllowedCountries2().then((response) => setAllowedCountries(response.countries)).catch(logger$
|
|
3314
|
+
getAllowedCountries2().then((response) => setAllowedCountries(response.countries)).catch(logger$p.error);
|
|
3275
3315
|
}, []);
|
|
3276
3316
|
return allowedCountries;
|
|
3277
3317
|
};
|
|
@@ -3610,7 +3650,7 @@ class ValidationResult {
|
|
|
3610
3650
|
return this.validationResults.filter((result) => result.hasError);
|
|
3611
3651
|
}
|
|
3612
3652
|
}
|
|
3613
|
-
const logger$
|
|
3653
|
+
const logger$o = createLogger("useAsyncValidator");
|
|
3614
3654
|
const useAsyncValidator = (asyncRules) => {
|
|
3615
3655
|
const [asyncValidationResults, setAsyncValidationResults] = useState({});
|
|
3616
3656
|
const clearAsyncValidationResults = useCallback(() => setAsyncValidationResults({}), []);
|
|
@@ -3633,7 +3673,7 @@ const useAsyncValidator = (asyncRules) => {
|
|
|
3633
3673
|
hasError: !isValid
|
|
3634
3674
|
}])
|
|
3635
3675
|
});
|
|
3636
|
-
}).catch(logger$
|
|
3676
|
+
}).catch(logger$o.error);
|
|
3637
3677
|
}, [asyncRules, clearAsyncValidationResults]);
|
|
3638
3678
|
return {
|
|
3639
3679
|
asyncValidationResults,
|
|
@@ -5054,7 +5094,7 @@ const Select = ({
|
|
|
5054
5094
|
})]
|
|
5055
5095
|
});
|
|
5056
5096
|
};
|
|
5057
|
-
const logger$
|
|
5097
|
+
const logger$n = createLogger("CountryField");
|
|
5058
5098
|
const COUNTRY_FIELD = ["country"];
|
|
5059
5099
|
function CountryField({
|
|
5060
5100
|
data,
|
|
@@ -5077,7 +5117,7 @@ function CountryField({
|
|
|
5077
5117
|
dataset: countriesFromApi
|
|
5078
5118
|
} = useDataset(datasetIdentifier.country);
|
|
5079
5119
|
useEffect(() => {
|
|
5080
|
-
loadFlags2().catch(logger$
|
|
5120
|
+
loadFlags2().catch(logger$n.error);
|
|
5081
5121
|
}, [loadFlags2]);
|
|
5082
5122
|
const countries = countriesFromApi.filter((country2) => allowedCountries ? allowedCountries.includes(country2.id) : true).map((item) => ({
|
|
5083
5123
|
...item,
|
|
@@ -8772,7 +8812,7 @@ var DecisionMakerType = /* @__PURE__ */ ((DecisionMakerType2) => {
|
|
|
8772
8812
|
})(DecisionMakerType || {});
|
|
8773
8813
|
var TaskTypes = /* @__PURE__ */ ((TaskTypes2) => {
|
|
8774
8814
|
TaskTypes2["BUSINESS_TYPE_SELECTION"] = "BUSINESS_TYPE_SELECTION";
|
|
8775
|
-
TaskTypes2["
|
|
8815
|
+
TaskTypes2["INTRODUCTION"] = "INTRODUCTION";
|
|
8776
8816
|
TaskTypes2["TASKS_OVERVIEW"] = "TASKS_OVERVIEW";
|
|
8777
8817
|
TaskTypes2["REVIEW"] = "REVIEW";
|
|
8778
8818
|
TaskTypes2["INDIVIDUAL"] = "INDIVIDUAL";
|
|
@@ -8821,7 +8861,8 @@ const EXPIRY_DATE_REQUIRED_FOR_COUNTRIES = [CountryCodes.NewZealand];
|
|
|
8821
8861
|
const rules$3 = ({
|
|
8822
8862
|
data,
|
|
8823
8863
|
country: country2,
|
|
8824
|
-
taskType
|
|
8864
|
+
taskType,
|
|
8865
|
+
isEmbeddedDropin
|
|
8825
8866
|
}) => ({
|
|
8826
8867
|
isDirectorIdNumberRequiredForCountry: () => {
|
|
8827
8868
|
var _a, _b, _c, _d, _e;
|
|
@@ -8886,7 +8927,7 @@ const rules$3 = ({
|
|
|
8886
8927
|
}
|
|
8887
8928
|
},
|
|
8888
8929
|
accountHolderIfCustomer: () => {
|
|
8889
|
-
if (taskType === TaskTypes.INDIVIDUAL) {
|
|
8930
|
+
if (taskType === TaskTypes.INDIVIDUAL && !isEmbeddedDropin) {
|
|
8890
8931
|
return REQUIRED;
|
|
8891
8932
|
}
|
|
8892
8933
|
},
|
|
@@ -8918,7 +8959,7 @@ const accountHolderValidationRules = {
|
|
|
8918
8959
|
}
|
|
8919
8960
|
};
|
|
8920
8961
|
const accountHolderFields = ["accountHolder"];
|
|
8921
|
-
const logger$
|
|
8962
|
+
const logger$m = createLogger("AccountHolder");
|
|
8922
8963
|
function getAvailableAccountHolderOptions(legalEntityType, isChangeOfLegalEntityTypeAllowed, isTrustFlowEnabled, isSoleProprietorshipAllowed, isChangeToMyNameAllowed) {
|
|
8923
8964
|
switch (legalEntityType) {
|
|
8924
8965
|
case LegalEntityType.ORGANIZATION: {
|
|
@@ -8928,7 +8969,7 @@ function getAvailableAccountHolderOptions(legalEntityType, isChangeOfLegalEntity
|
|
|
8928
8969
|
return [...isChangeToMyNameAllowed ? ["myName"] : [], ...isChangeOfLegalEntityTypeAllowed ? ["theCompanyIWorkFor"] : [], ...isTrustFlowEnabled ? ["aTrust"] : [], ...isSoleProprietorshipAllowed ? ["mySoleProprietorName"] : []];
|
|
8929
8970
|
}
|
|
8930
8971
|
default:
|
|
8931
|
-
logger$
|
|
8972
|
+
logger$m.error(`No available account holder options for legal entity type '${legalEntityType}'`);
|
|
8932
8973
|
return [];
|
|
8933
8974
|
}
|
|
8934
8975
|
}
|
|
@@ -9668,7 +9709,7 @@ function Dropzone(props) {
|
|
|
9668
9709
|
})]
|
|
9669
9710
|
});
|
|
9670
9711
|
}
|
|
9671
|
-
const logger$
|
|
9712
|
+
const logger$l = createLogger("TextArea");
|
|
9672
9713
|
function TextArea(props) {
|
|
9673
9714
|
const {
|
|
9674
9715
|
classNameModifiers,
|
|
@@ -9689,7 +9730,7 @@ function TextArea(props) {
|
|
|
9689
9730
|
} = useI18nContext();
|
|
9690
9731
|
const [value, setValue] = useState("");
|
|
9691
9732
|
if (Object.prototype.hasOwnProperty.call(props, "onChange")) {
|
|
9692
|
-
logger$
|
|
9733
|
+
logger$l.error("Error: Form fields that rely on InputBase may not have an onChange property");
|
|
9693
9734
|
}
|
|
9694
9735
|
const handleInput = (e) => {
|
|
9695
9736
|
var _a;
|
|
@@ -10101,7 +10142,7 @@ function FieldContainer(props) {
|
|
|
10101
10142
|
}
|
|
10102
10143
|
return renderField(fieldName);
|
|
10103
10144
|
}
|
|
10104
|
-
const logger$
|
|
10145
|
+
const logger$k = createLogger("SearchAddress");
|
|
10105
10146
|
const SearchAddress = ({
|
|
10106
10147
|
data,
|
|
10107
10148
|
legalEntityId,
|
|
@@ -10127,7 +10168,7 @@ const SearchAddress = ({
|
|
|
10127
10168
|
const response = await handleFindAddress(selectedAddressId);
|
|
10128
10169
|
autocompleteAddressForm(response);
|
|
10129
10170
|
} catch (e) {
|
|
10130
|
-
logger$
|
|
10171
|
+
logger$k.error(e);
|
|
10131
10172
|
}
|
|
10132
10173
|
};
|
|
10133
10174
|
const onDrilldown = async (selectedAddress) => {
|
|
@@ -10139,7 +10180,7 @@ const SearchAddress = ({
|
|
|
10139
10180
|
}, legalEntityId);
|
|
10140
10181
|
setItems((response == null ? void 0 : response.results) || []);
|
|
10141
10182
|
} catch (e) {
|
|
10142
|
-
logger$
|
|
10183
|
+
logger$k.error(e);
|
|
10143
10184
|
}
|
|
10144
10185
|
};
|
|
10145
10186
|
const onChange = (e) => {
|
|
@@ -10194,7 +10235,7 @@ const SearchAddress = ({
|
|
|
10194
10235
|
setItems([]);
|
|
10195
10236
|
}
|
|
10196
10237
|
} catch (e) {
|
|
10197
|
-
logger$
|
|
10238
|
+
logger$k.error(e);
|
|
10198
10239
|
}
|
|
10199
10240
|
setLoading(false);
|
|
10200
10241
|
}
|
|
@@ -13652,7 +13693,7 @@ const initOnfido = async ({
|
|
|
13652
13693
|
language: getOnfidoLocaleConfig(i18n)
|
|
13653
13694
|
});
|
|
13654
13695
|
};
|
|
13655
|
-
const logger$
|
|
13696
|
+
const logger$j = createLogger("IdVerificationComponent");
|
|
13656
13697
|
function IdVerificationComponent({
|
|
13657
13698
|
userDetails,
|
|
13658
13699
|
legalEntityId,
|
|
@@ -13685,7 +13726,7 @@ function IdVerificationComponent({
|
|
|
13685
13726
|
onIdVerificationError,
|
|
13686
13727
|
onIdVerificationComplete
|
|
13687
13728
|
});
|
|
13688
|
-
})().catch(logger$
|
|
13729
|
+
})().catch(logger$j.error);
|
|
13689
13730
|
return () => {
|
|
13690
13731
|
if (onfidoSdk.current)
|
|
13691
13732
|
onfidoSdk.current.tearDown();
|
|
@@ -13737,7 +13778,7 @@ function IdDocumentAlreadyUpload(props) {
|
|
|
13737
13778
|
})]
|
|
13738
13779
|
});
|
|
13739
13780
|
}
|
|
13740
|
-
const logger$
|
|
13781
|
+
const logger$i = createLogger("IdDocumentInstantVerificationComponent");
|
|
13741
13782
|
const idVerificationSchema = ["instantIdVerificationData", "idDocumentType"];
|
|
13742
13783
|
const documentTypeValidationRules = {
|
|
13743
13784
|
instantIdVerificationData: {
|
|
@@ -13819,7 +13860,7 @@ function IdDocumentInstantVerificationComponent(props) {
|
|
|
13819
13860
|
userDetails: props.userDetails,
|
|
13820
13861
|
legalEntityId: props.legalEntityId,
|
|
13821
13862
|
onIdVerificationComplete: handleIdVerificationComplete,
|
|
13822
|
-
onIdVerificationError: logger$
|
|
13863
|
+
onIdVerificationError: logger$i.error
|
|
13823
13864
|
}), jsxs("div", {
|
|
13824
13865
|
className: "adyen-kyc-document-upload__manual-upload",
|
|
13825
13866
|
children: [i18n.get("canNotCompleteInstantVerification"), " ", jsx("button", {
|
|
@@ -16534,7 +16575,7 @@ class AdyenKycSdkError extends Error {
|
|
|
16534
16575
|
}
|
|
16535
16576
|
let sdkToken;
|
|
16536
16577
|
let fetchSdkToken;
|
|
16537
|
-
const logger$
|
|
16578
|
+
const logger$h = createLogger("Session");
|
|
16538
16579
|
const setSdkToken = (token) => {
|
|
16539
16580
|
sdkToken = token;
|
|
16540
16581
|
};
|
|
@@ -16552,7 +16593,7 @@ const refreshSession = async () => {
|
|
|
16552
16593
|
} = await fetchSdkToken();
|
|
16553
16594
|
setSdkToken(token);
|
|
16554
16595
|
} catch (e) {
|
|
16555
|
-
logger$
|
|
16596
|
+
logger$h.error("Failed to fetch sdk token", e);
|
|
16556
16597
|
}
|
|
16557
16598
|
};
|
|
16558
16599
|
const addAnimationStartListener = (element, listener) => {
|
|
@@ -16565,7 +16606,7 @@ const removeAnimationStartListener = (element, listener) => {
|
|
|
16565
16606
|
element.removeEventListener("MSAnimationStart", listener, false);
|
|
16566
16607
|
element.removeEventListener("webkitAnimationStart", listener, false);
|
|
16567
16608
|
};
|
|
16568
|
-
const logger$
|
|
16609
|
+
const logger$g = createLogger("Fetch");
|
|
16569
16610
|
const getRequestObject = (options, data) => {
|
|
16570
16611
|
const {
|
|
16571
16612
|
headers = [],
|
|
@@ -16612,10 +16653,10 @@ const logFetchError = (message, level) => {
|
|
|
16612
16653
|
case "info":
|
|
16613
16654
|
case "warn":
|
|
16614
16655
|
case "error":
|
|
16615
|
-
logger$
|
|
16656
|
+
logger$g[level](message);
|
|
16616
16657
|
break;
|
|
16617
16658
|
default:
|
|
16618
|
-
logger$
|
|
16659
|
+
logger$g.error(message);
|
|
16619
16660
|
}
|
|
16620
16661
|
};
|
|
16621
16662
|
const handleFetchResponse = async (response, responseType) => {
|
|
@@ -16711,7 +16752,7 @@ const RELEVANT_MESSAGE_TYPES = ["account_verification_report_id", "error"];
|
|
|
16711
16752
|
const TERMINAL_DATA_PROPS = ["accounts", "error", "reference"];
|
|
16712
16753
|
const MOUNT_TIMEOUT = 10 * 1e3;
|
|
16713
16754
|
const TINK_VENDOR = "Tink";
|
|
16714
|
-
const logger$
|
|
16755
|
+
const logger$f = createLogger("iframeWidget");
|
|
16715
16756
|
const isObjectData = (data) => typeof data === "object" && !Array.isArray(data) && data !== null;
|
|
16716
16757
|
const isTerminalMessageData = (data) => Object.entries(data).some(([prop]) => TERMINAL_DATA_PROPS.includes(prop));
|
|
16717
16758
|
const parseMessageJson = (message) => {
|
|
@@ -16730,7 +16771,7 @@ const callbackErrorHandler = async (response) => {
|
|
|
16730
16771
|
try {
|
|
16731
16772
|
await response;
|
|
16732
16773
|
} catch (ex) {
|
|
16733
|
-
logger$
|
|
16774
|
+
logger$f.error(ex);
|
|
16734
16775
|
}
|
|
16735
16776
|
return {
|
|
16736
16777
|
error: "UNKNOWN_ERROR",
|
|
@@ -16836,7 +16877,7 @@ class IFrameWidget {
|
|
|
16836
16877
|
message = responseData.errorMessage;
|
|
16837
16878
|
}
|
|
16838
16879
|
} catch (ex) {
|
|
16839
|
-
logger$
|
|
16880
|
+
logger$f.error(ex);
|
|
16840
16881
|
}
|
|
16841
16882
|
throw new AdyenKycSdkError(reason, jsonData.error);
|
|
16842
16883
|
}
|
|
@@ -17022,7 +17063,7 @@ function BankVerificationWidget({
|
|
|
17022
17063
|
ref: widgetContainerRef
|
|
17023
17064
|
});
|
|
17024
17065
|
}
|
|
17025
|
-
const logger$
|
|
17066
|
+
const logger$e = createLogger("BankVerification");
|
|
17026
17067
|
const accountVerificationFields = ["verifiedAccountHolder", "verifiedBankCountry", "verifiedBankName", "verifiedCurrencyCode", "verifiedBankAccountNumber"];
|
|
17027
17068
|
const InstantVerificationErrorContext = createContext(null);
|
|
17028
17069
|
const useInstantVerificationErrorNotification = (notificationVisibilityDuration) => {
|
|
@@ -17056,7 +17097,7 @@ const usePreferredVendorForCountry = (country2, getBankVerificationVendors) => {
|
|
|
17056
17097
|
const preferredVendor2 = vendors[0];
|
|
17057
17098
|
setPreferredVendor(preferredVendor2.name ? preferredVendor2 : null);
|
|
17058
17099
|
};
|
|
17059
|
-
getPreferredVendor().catch(logger$
|
|
17100
|
+
getPreferredVendor().catch(logger$e.error);
|
|
17060
17101
|
}, [country2, getBankVerificationVendors]);
|
|
17061
17102
|
return preferredVendor;
|
|
17062
17103
|
};
|
|
@@ -19538,7 +19579,7 @@ var VerificationErrorType = /* @__PURE__ */ ((VerificationErrorType2) => {
|
|
|
19538
19579
|
VerificationErrorType2["REJECTED"] = "rejected";
|
|
19539
19580
|
return VerificationErrorType2;
|
|
19540
19581
|
})(VerificationErrorType || {});
|
|
19541
|
-
const UNRELATED_DATA_MISSING_ERROR_CODES = ["2_8036"];
|
|
19582
|
+
const UNRELATED_DATA_MISSING_ERROR_CODES = ["2_8036", "2_8064", "2_8067", "2_8189"];
|
|
19542
19583
|
const UNRELATED_INVALID_INPUT_ERROR_CODES = ["1_14", "2_901", "2_902"];
|
|
19543
19584
|
const getComponentMappingFromLEFieldPath = (context, entityType2) => {
|
|
19544
19585
|
if (!(context == null ? void 0 : context.key)) {
|
|
@@ -19681,8 +19722,8 @@ function getEntityProblems(verificationErrors, entityType2) {
|
|
|
19681
19722
|
break;
|
|
19682
19723
|
}
|
|
19683
19724
|
case VerificationErrorType.DATA_MISSING: {
|
|
19725
|
+
currEntityProblems.missingData = getMissingDataError(verificationError, currEntityProblems);
|
|
19684
19726
|
if (!isUnRelatedErrorCode(verificationError)) {
|
|
19685
|
-
currEntityProblems.missingData = getMissingDataError(verificationError, currEntityProblems);
|
|
19686
19727
|
currEntityProblems.status = getPriorityStatus(entityProblems, TaskStatus.DETAILS_REQUIRED);
|
|
19687
19728
|
}
|
|
19688
19729
|
break;
|
|
@@ -20390,7 +20431,7 @@ const defaultPayoutAccountFormat = {
|
|
|
20390
20431
|
[CountryCodes.Sweden]: "local",
|
|
20391
20432
|
[CountryCodes.UnitedKingdom]: "local"
|
|
20392
20433
|
};
|
|
20393
|
-
const logger$
|
|
20434
|
+
const logger$d = createLogger("useScenarioConfiguration");
|
|
20394
20435
|
const useScenarioConfiguration = ({
|
|
20395
20436
|
getConfigurationData,
|
|
20396
20437
|
getPayoutAccountFormatData,
|
|
@@ -20412,12 +20453,12 @@ const useScenarioConfiguration = ({
|
|
|
20412
20453
|
const response = await getConfigurationData();
|
|
20413
20454
|
setConfigurationResponse(response);
|
|
20414
20455
|
} catch (err) {
|
|
20415
|
-
logger$
|
|
20456
|
+
logger$d.warn("WARNING: Configuration request failed - error:", err);
|
|
20416
20457
|
} finally {
|
|
20417
20458
|
setLoadingStatus("success");
|
|
20418
20459
|
}
|
|
20419
20460
|
};
|
|
20420
|
-
makeConfigCallAndSave().catch(logger$
|
|
20461
|
+
makeConfigCallAndSave().catch(logger$d.error);
|
|
20421
20462
|
}, [getConfigurationData, setLoadingStatus]);
|
|
20422
20463
|
useEffect(() => {
|
|
20423
20464
|
setLoadingStatus("loading");
|
|
@@ -20433,12 +20474,12 @@ const useScenarioConfiguration = ({
|
|
|
20433
20474
|
const defaultAccountFormat = defaultPayoutAccountFormat[country2] ?? allowedBankAccountFormats[0];
|
|
20434
20475
|
setAccountFormat(defaultAccountFormat);
|
|
20435
20476
|
} catch (err) {
|
|
20436
|
-
logger$
|
|
20477
|
+
logger$d.warn("WARNING: Payout format request failed - error:", err);
|
|
20437
20478
|
} finally {
|
|
20438
20479
|
setLoadingStatus("success");
|
|
20439
20480
|
}
|
|
20440
20481
|
};
|
|
20441
|
-
makePayoutFormatCallAndSave().catch(logger$
|
|
20482
|
+
makePayoutFormatCallAndSave().catch(logger$d.error);
|
|
20442
20483
|
}, [country2, setAccountFormat, getPayoutAccountFormatData, setLoadingStatus]);
|
|
20443
20484
|
const {
|
|
20444
20485
|
fieldConfigurations,
|
|
@@ -21094,7 +21135,7 @@ var ToastType = /* @__PURE__ */ ((ToastType2) => {
|
|
|
21094
21135
|
return ToastType2;
|
|
21095
21136
|
})(ToastType || {});
|
|
21096
21137
|
const FormComposer = "";
|
|
21097
|
-
const logger$
|
|
21138
|
+
const logger$c = createLogger("FormRouterContextProvider");
|
|
21098
21139
|
function FormRouterContextProvider({
|
|
21099
21140
|
children,
|
|
21100
21141
|
forms,
|
|
@@ -21114,7 +21155,7 @@ function FormRouterContextProvider({
|
|
|
21114
21155
|
if (formIndex > -1) {
|
|
21115
21156
|
setFormIndex(formIndex);
|
|
21116
21157
|
} else {
|
|
21117
|
-
logger$
|
|
21158
|
+
logger$c.error("No form was found to have that field so form navigation failed.");
|
|
21118
21159
|
}
|
|
21119
21160
|
}
|
|
21120
21161
|
}), [forms, handleGetIdVerificationToken, setFormIndex]);
|
|
@@ -21714,8 +21755,8 @@ function CompanyDropinComponent({
|
|
|
21714
21755
|
})
|
|
21715
21756
|
});
|
|
21716
21757
|
}
|
|
21717
|
-
const logger$
|
|
21718
|
-
|
|
21758
|
+
const logger$b = createLogger("useLocalStorage");
|
|
21759
|
+
const useLocalStorage = (key, defaultValue, options) => {
|
|
21719
21760
|
const {
|
|
21720
21761
|
serializer,
|
|
21721
21762
|
parser,
|
|
@@ -21735,7 +21776,7 @@ function useLocalStorage(key, defaultValue, options) {
|
|
|
21735
21776
|
const res = rawValueRef.current ? parser(rawValueRef.current) : defaultValue;
|
|
21736
21777
|
return res;
|
|
21737
21778
|
} catch (err) {
|
|
21738
|
-
logger$
|
|
21779
|
+
logger$b.error(err);
|
|
21739
21780
|
return defaultValue;
|
|
21740
21781
|
}
|
|
21741
21782
|
});
|
|
@@ -21767,7 +21808,7 @@ function useLocalStorage(key, defaultValue, options) {
|
|
|
21767
21808
|
try {
|
|
21768
21809
|
updateLocalStorage();
|
|
21769
21810
|
} catch (err) {
|
|
21770
|
-
logger$
|
|
21811
|
+
logger$b.error(err);
|
|
21771
21812
|
}
|
|
21772
21813
|
}, [value]);
|
|
21773
21814
|
useEffect(() => {
|
|
@@ -21782,7 +21823,7 @@ function useLocalStorage(key, defaultValue, options) {
|
|
|
21782
21823
|
setValue(event.newValue ? parser(event.newValue) : void 0);
|
|
21783
21824
|
}
|
|
21784
21825
|
} catch (err) {
|
|
21785
|
-
logger$
|
|
21826
|
+
logger$b.error(err);
|
|
21786
21827
|
}
|
|
21787
21828
|
};
|
|
21788
21829
|
if (typeof window === "undefined")
|
|
@@ -21791,32 +21832,74 @@ function useLocalStorage(key, defaultValue, options) {
|
|
|
21791
21832
|
return () => window.removeEventListener("storage", handleStorageChange);
|
|
21792
21833
|
}, [key, syncData]);
|
|
21793
21834
|
return [value, setValue];
|
|
21794
|
-
}
|
|
21795
|
-
const isIntroForLE = (legalEntity) => Boolean(legalEntity.type) && (legalEntity.type === LegalEntityType.INDIVIDUAL || legalEntity.type === LegalEntityType.ORGANIZATION) && !(hasOwnEntityAssociationOfType(LegalEntityType.SOLE_PROPRIETORSHIP, legalEntity.entityAssociations, legalEntity.id) || hasOwnEntityAssociationOfType(LegalEntityType.TRUST, legalEntity.entityAssociations, legalEntity.id));
|
|
21796
|
-
const useCanSeeIntro = (legalEntity) => {
|
|
21797
|
-
const {
|
|
21798
|
-
isSettingEnabled
|
|
21799
|
-
} = useSettingsContext();
|
|
21800
|
-
return {
|
|
21801
|
-
canSeeIntro: isSettingEnabled("viewOnboardingGuidance") && isIntroForLE(legalEntity)
|
|
21802
|
-
};
|
|
21803
21835
|
};
|
|
21804
|
-
const
|
|
21805
|
-
const
|
|
21806
|
-
|
|
21836
|
+
const getHasSeenIntroductionStorageKey = (legalEntityId) => `COMPLETED_INTRO-${legalEntityId}`;
|
|
21837
|
+
const useHasSeenIntroduction = ({
|
|
21838
|
+
legalEntityId
|
|
21839
|
+
}) => {
|
|
21840
|
+
const [hasSeenIntroduction, setHasSeenIntroduction] = useLocalStorage(getHasSeenIntroductionStorageKey(legalEntityId), false);
|
|
21807
21841
|
return {
|
|
21808
|
-
|
|
21809
|
-
|
|
21842
|
+
hasSeenIntroduction,
|
|
21843
|
+
setHasSeenIntroduction
|
|
21810
21844
|
};
|
|
21811
21845
|
};
|
|
21812
|
-
const
|
|
21846
|
+
const useLegalEntityType = ({
|
|
21847
|
+
legalEntity
|
|
21848
|
+
}) => {
|
|
21813
21849
|
const {
|
|
21814
|
-
|
|
21815
|
-
} =
|
|
21850
|
+
isExperimentEnabled
|
|
21851
|
+
} = useExperimentsContext();
|
|
21852
|
+
const isTrust = isPartOfTrustFromLegalEntity(legalEntity);
|
|
21853
|
+
const isSoleProprietor = hasSolePropInLegalEntity(legalEntity);
|
|
21854
|
+
const hasLegalAssociation = isTrust || isSoleProprietor;
|
|
21855
|
+
switch (legalEntity.type) {
|
|
21856
|
+
case LegalEntityType.INDIVIDUAL:
|
|
21857
|
+
case LegalEntityType.ORGANIZATION:
|
|
21858
|
+
if (!hasLegalAssociation)
|
|
21859
|
+
return legalEntity.type;
|
|
21860
|
+
if (isSoleProprietor)
|
|
21861
|
+
return LegalEntityType.SOLE_PROPRIETORSHIP;
|
|
21862
|
+
if (isTrust)
|
|
21863
|
+
return isExperimentEnabled(ExperimentNames.EnableTrustFlow) ? LegalEntityType.TRUST : legalEntity.type;
|
|
21864
|
+
break;
|
|
21865
|
+
default:
|
|
21866
|
+
return void 0;
|
|
21867
|
+
}
|
|
21868
|
+
};
|
|
21869
|
+
const useCanSeeIntroduction = ({
|
|
21870
|
+
legalEntity
|
|
21871
|
+
}) => {
|
|
21872
|
+
const legalEntityType = useLegalEntityType({
|
|
21873
|
+
legalEntity
|
|
21874
|
+
});
|
|
21875
|
+
const {
|
|
21876
|
+
isSettingEnabled
|
|
21877
|
+
} = useSettingsContext();
|
|
21878
|
+
switch (legalEntityType) {
|
|
21879
|
+
case LegalEntityType.INDIVIDUAL:
|
|
21880
|
+
return !isSettingEnabled(SettingNames.HideOnboardingIntroductionIndividual);
|
|
21881
|
+
case LegalEntityType.ORGANIZATION:
|
|
21882
|
+
return !isSettingEnabled(SettingNames.HideOnboardingIntroductionOrganization);
|
|
21883
|
+
case LegalEntityType.SOLE_PROPRIETORSHIP:
|
|
21884
|
+
return !isSettingEnabled(SettingNames.HideOnboardingIntroductionSoleProprietor);
|
|
21885
|
+
case LegalEntityType.TRUST:
|
|
21886
|
+
return !isSettingEnabled(SettingNames.HideOnboardingIntroductionTrust);
|
|
21887
|
+
default:
|
|
21888
|
+
return false;
|
|
21889
|
+
}
|
|
21890
|
+
};
|
|
21891
|
+
const useShouldShowIntroduction = ({
|
|
21892
|
+
legalEntity
|
|
21893
|
+
}) => {
|
|
21894
|
+
const canSeeIntroduction = useCanSeeIntroduction({
|
|
21895
|
+
legalEntity
|
|
21896
|
+
});
|
|
21816
21897
|
const {
|
|
21817
|
-
|
|
21818
|
-
} =
|
|
21819
|
-
|
|
21898
|
+
hasSeenIntroduction
|
|
21899
|
+
} = useHasSeenIntroduction({
|
|
21900
|
+
legalEntityId: legalEntity.id
|
|
21901
|
+
});
|
|
21902
|
+
return canSeeIntroduction && !hasSeenIntroduction;
|
|
21820
21903
|
};
|
|
21821
21904
|
const useShouldShowBusinessTypeSelection = (accountHolder2) => {
|
|
21822
21905
|
const {
|
|
@@ -21824,7 +21907,7 @@ const useShouldShowBusinessTypeSelection = (accountHolder2) => {
|
|
|
21824
21907
|
} = useExperimentsContext();
|
|
21825
21908
|
return isExperimentEnabled("EnableNewEntryFlow") && !accountHolder2;
|
|
21826
21909
|
};
|
|
21827
|
-
const logger$
|
|
21910
|
+
const logger$a = createLogger("useExemptSettlor");
|
|
21828
21911
|
const useExemptSettlor = ({
|
|
21829
21912
|
trust: trust2,
|
|
21830
21913
|
handleGetLegalEntity
|
|
@@ -21836,7 +21919,7 @@ const useExemptSettlor = ({
|
|
|
21836
21919
|
setExemptSettlor(exemptSettlorLE);
|
|
21837
21920
|
}, [handleGetLegalEntity]);
|
|
21838
21921
|
useEffect(() => {
|
|
21839
|
-
updateExemptSettlor(trust2).catch(logger$
|
|
21922
|
+
updateExemptSettlor(trust2).catch(logger$a.error);
|
|
21840
21923
|
}, [trust2, updateExemptSettlor]);
|
|
21841
21924
|
return exemptSettlor;
|
|
21842
21925
|
};
|
|
@@ -22353,14 +22436,19 @@ const legalArrangementItems = [{
|
|
|
22353
22436
|
name: "trust",
|
|
22354
22437
|
description: "youAreTrusteeManagingTheTrustForBeneficiaries"
|
|
22355
22438
|
}, {
|
|
22356
|
-
id: "
|
|
22357
|
-
accountHolder: "
|
|
22358
|
-
name: "
|
|
22359
|
-
description: "
|
|
22439
|
+
id: "incorporatedPartnership",
|
|
22440
|
+
accountHolder: "incorporatedPartnership",
|
|
22441
|
+
name: "incorporatedPartnership",
|
|
22442
|
+
description: "incorporatedPartnershipNewEntryFlowDescription"
|
|
22443
|
+
}, {
|
|
22444
|
+
id: "unincorporatedPartnership",
|
|
22445
|
+
accountHolder: "unincorporatedPartnership",
|
|
22446
|
+
name: "unincorporatedPartnership",
|
|
22447
|
+
description: "unincorporatedPartnershipNewEntryFlowDescription"
|
|
22360
22448
|
}, {
|
|
22361
22449
|
id: "anAssociation",
|
|
22362
22450
|
accountHolder: "anAssociation",
|
|
22363
|
-
name: "
|
|
22451
|
+
name: "associationIncorporatedTitle",
|
|
22364
22452
|
description: "groupOfPeopleActingTogetherForNonCommercialPurpose"
|
|
22365
22453
|
}];
|
|
22366
22454
|
const trusteeTypeItems = [{
|
|
@@ -22381,9 +22469,6 @@ const getFormSchema = (isLegalArrangement, isTrust) => {
|
|
|
22381
22469
|
return schema;
|
|
22382
22470
|
};
|
|
22383
22471
|
const getBusinessTypes = (includeTrust, includeSoleProp) => businessTypes.filter((businessType) => {
|
|
22384
|
-
if (businessType.id === "legalArrangement") {
|
|
22385
|
-
return includeTrust;
|
|
22386
|
-
}
|
|
22387
22472
|
if (businessType.id === "soleProprietorship") {
|
|
22388
22473
|
return includeSoleProp;
|
|
22389
22474
|
}
|
|
@@ -22433,6 +22518,9 @@ const getTargetLegalEntityType = (businessType, legalArrangement, trusteeType, c
|
|
|
22433
22518
|
if (isOrganization && businessType === "legalArrangement" && legalArrangement === "aTrust" && trusteeType === "individual" || businessType === "individual" || businessType === "soleProprietorship") {
|
|
22434
22519
|
return LegalEntityType.INDIVIDUAL;
|
|
22435
22520
|
}
|
|
22521
|
+
if (legalArrangement === "incorporatedPartnership") {
|
|
22522
|
+
return LegalEntityType.ORGANIZATION;
|
|
22523
|
+
}
|
|
22436
22524
|
return currentLegalEntityType;
|
|
22437
22525
|
};
|
|
22438
22526
|
const BusinessTypeSelection = ({
|
|
@@ -22464,7 +22552,7 @@ const BusinessTypeSelection = ({
|
|
|
22464
22552
|
const businessTypeItems = getBusinessTypes(showTrustOption, showSolePropOption);
|
|
22465
22553
|
const getDefaultBusinessType = () => {
|
|
22466
22554
|
if (accountHolder2) {
|
|
22467
|
-
if (["aTrust", "
|
|
22555
|
+
if (["aTrust", "incorporatedPartnership", "unincorporatedPartnership", "anAssociation"].includes(accountHolder2)) {
|
|
22468
22556
|
return businessTypeItems.find((businessTypeItem) => businessTypeItem.id === "legalArrangement");
|
|
22469
22557
|
}
|
|
22470
22558
|
return businessTypeItems.find((businessTypeItem) => businessTypeItem.accountHolder === accountHolder2);
|
|
@@ -22501,7 +22589,7 @@ const BusinessTypeSelection = ({
|
|
|
22501
22589
|
setFormSchema(getFormSchema(((_a2 = data.businessType) == null ? void 0 : _a2.id) === "legalArrangement" && !!data.legalArrangement || currentStep === 1, ((_b2 = data.legalArrangement) == null ? void 0 : _b2.id) === "aTrust"));
|
|
22502
22590
|
}, [data.businessType, data.legalArrangement, currentStep]);
|
|
22503
22591
|
const handleNextClick = async () => {
|
|
22504
|
-
var _a2, _b2
|
|
22592
|
+
var _a2, _b2;
|
|
22505
22593
|
if (loadingStatus === "loading")
|
|
22506
22594
|
return;
|
|
22507
22595
|
triggerValidation();
|
|
@@ -22514,7 +22602,8 @@ const BusinessTypeSelection = ({
|
|
|
22514
22602
|
);
|
|
22515
22603
|
return;
|
|
22516
22604
|
}
|
|
22517
|
-
|
|
22605
|
+
const legalArrangementId = (_b2 = data.legalArrangement) == null ? void 0 : _b2.id;
|
|
22606
|
+
if (legalArrangementId === "anAssociation" || legalArrangementId === "unincorporatedPartnership") {
|
|
22518
22607
|
setCurrentStep(
|
|
22519
22608
|
2
|
|
22520
22609
|
/* WE_CANNOT_SET_UP_ACCOUNT */
|
|
@@ -22537,13 +22626,33 @@ const BusinessTypeSelection = ({
|
|
|
22537
22626
|
}
|
|
22538
22627
|
};
|
|
22539
22628
|
const updateLegalEntityAndSelectAccountHolder = async () => {
|
|
22629
|
+
var _a2;
|
|
22630
|
+
const selectedLegalArrangement = (_a2 = data.legalArrangement) == null ? void 0 : _a2.id;
|
|
22540
22631
|
try {
|
|
22541
22632
|
if (legalEntityResponse.type !== targetLegalEntityType) {
|
|
22542
22633
|
setLoadingStatus("loading");
|
|
22543
|
-
|
|
22544
|
-
type: targetLegalEntityType
|
|
22545
|
-
|
|
22546
|
-
|
|
22634
|
+
const updateLegalEntityPayload = {
|
|
22635
|
+
type: targetLegalEntityType
|
|
22636
|
+
};
|
|
22637
|
+
await (handleUpdateLegalEntity == null ? void 0 : handleUpdateLegalEntity(updateLegalEntityPayload, legalEntityResponse == null ? void 0 : legalEntityResponse.id));
|
|
22638
|
+
if (selectedLegalArrangement === "incorporatedPartnership") {
|
|
22639
|
+
await (handleUpdateLegalEntity == null ? void 0 : handleUpdateLegalEntity({
|
|
22640
|
+
type: LegalEntityType.ORGANIZATION
|
|
22641
|
+
}, legalEntityResponse == null ? void 0 : legalEntityResponse.id));
|
|
22642
|
+
await (handleUpdateLegalEntity == null ? void 0 : handleUpdateLegalEntity({
|
|
22643
|
+
organization: {
|
|
22644
|
+
type: CompanyTypesValue.INCORPORATED_PARTNERSHIP
|
|
22645
|
+
}
|
|
22646
|
+
}, legalEntityResponse == null ? void 0 : legalEntityResponse.id));
|
|
22647
|
+
}
|
|
22648
|
+
} else if (newAccountHolder !== accountHolder2) {
|
|
22649
|
+
if (newAccountHolder === "theCompanyIWorkFor") {
|
|
22650
|
+
await (handleUpdateLegalEntity == null ? void 0 : handleUpdateLegalEntity({
|
|
22651
|
+
organization: {
|
|
22652
|
+
type: ""
|
|
22653
|
+
}
|
|
22654
|
+
}, legalEntityResponse == null ? void 0 : legalEntityResponse.id));
|
|
22655
|
+
}
|
|
22547
22656
|
}
|
|
22548
22657
|
} catch (e) {
|
|
22549
22658
|
showToast({
|
|
@@ -22695,12 +22804,13 @@ function useDataMissingRemediations({
|
|
|
22695
22804
|
const remediation = DATA_MISSING_DECISION_MAKER_ERROR_CODE_MAPPING[error.code];
|
|
22696
22805
|
return remediation ? [...remediations, remediation] : remediations;
|
|
22697
22806
|
}, []);
|
|
22698
|
-
|
|
22807
|
+
const uniqueRemediations = [...new Set(remediationCodes)];
|
|
22808
|
+
switch (uniqueRemediations == null ? void 0 : uniqueRemediations.length) {
|
|
22699
22809
|
case void 0:
|
|
22700
22810
|
case 0:
|
|
22701
22811
|
return void 0;
|
|
22702
22812
|
case 1:
|
|
22703
|
-
return
|
|
22813
|
+
return uniqueRemediations[0] ? i18n.get(`remediationMessage_${uniqueRemediations[0]}`) : i18n.get("missingMultipleDecisionMakers");
|
|
22704
22814
|
default:
|
|
22705
22815
|
return i18n.get("missingMultipleDecisionMakers");
|
|
22706
22816
|
}
|
|
@@ -23454,6 +23564,189 @@ function Shimmer() {
|
|
|
23454
23564
|
})]
|
|
23455
23565
|
});
|
|
23456
23566
|
}
|
|
23567
|
+
const _introduction_component = "";
|
|
23568
|
+
var IntroductionScreens = ((IntroductionScreens2) => {
|
|
23569
|
+
IntroductionScreens2["PROLOGUE"] = "PROLOGUE";
|
|
23570
|
+
IntroductionScreens2[IntroductionScreens2["COMPANY"] = TaskTypes.COMPANY] = "COMPANY";
|
|
23571
|
+
IntroductionScreens2[IntroductionScreens2["INDIVIDUAL"] = TaskTypes.INDIVIDUAL] = "INDIVIDUAL";
|
|
23572
|
+
IntroductionScreens2[IntroductionScreens2["DECISION_MAKER"] = TaskTypes.DECISION_MAKER] = "DECISION_MAKER";
|
|
23573
|
+
IntroductionScreens2[IntroductionScreens2["SOLE_PROPRIETOR_COMPANY"] = TaskTypes.SOLE_PROPRIETOR_COMPANY] = "SOLE_PROPRIETOR_COMPANY";
|
|
23574
|
+
IntroductionScreens2[IntroductionScreens2["TRUST"] = TaskTypes.TRUST] = "TRUST";
|
|
23575
|
+
IntroductionScreens2[IntroductionScreens2["TRUST_MEMBER_OVERVIEW"] = TaskTypes.TRUST_MEMBER_OVERVIEW] = "TRUST_MEMBER_OVERVIEW";
|
|
23576
|
+
IntroductionScreens2["ACCOUNT"] = "ACCOUNT";
|
|
23577
|
+
IntroductionScreens2["EPILOGUE"] = "EPILOGUE";
|
|
23578
|
+
return IntroductionScreens2;
|
|
23579
|
+
})(IntroductionScreens || {});
|
|
23580
|
+
const introductionScreensByLegalEntityType = {
|
|
23581
|
+
[LegalEntityType.INDIVIDUAL]: [IntroductionScreens.PROLOGUE, IntroductionScreens.INDIVIDUAL, IntroductionScreens.ACCOUNT, IntroductionScreens.EPILOGUE],
|
|
23582
|
+
[LegalEntityType.ORGANIZATION]: [IntroductionScreens.PROLOGUE, IntroductionScreens.COMPANY, IntroductionScreens.DECISION_MAKER, IntroductionScreens.ACCOUNT, IntroductionScreens.EPILOGUE],
|
|
23583
|
+
[LegalEntityType.SOLE_PROPRIETORSHIP]: [IntroductionScreens.PROLOGUE, IntroductionScreens.INDIVIDUAL, IntroductionScreens.SOLE_PROPRIETOR_COMPANY, IntroductionScreens.ACCOUNT, IntroductionScreens.EPILOGUE],
|
|
23584
|
+
[LegalEntityType.TRUST]: [IntroductionScreens.PROLOGUE, IntroductionScreens.COMPANY, IntroductionScreens.INDIVIDUAL, IntroductionScreens.DECISION_MAKER, IntroductionScreens.TRUST, IntroductionScreens.TRUST_MEMBER_OVERVIEW, IntroductionScreens.ACCOUNT, IntroductionScreens.EPILOGUE]
|
|
23585
|
+
};
|
|
23586
|
+
const useIntroductionScreens = ({
|
|
23587
|
+
legalEntity,
|
|
23588
|
+
tasks
|
|
23589
|
+
}) => {
|
|
23590
|
+
const canSeeIntroduction = useCanSeeIntroduction({
|
|
23591
|
+
legalEntity
|
|
23592
|
+
});
|
|
23593
|
+
const legalEntityType = useLegalEntityType({
|
|
23594
|
+
legalEntity
|
|
23595
|
+
});
|
|
23596
|
+
const introductionScreens = useMemo$1(() => legalEntityType ? introductionScreensByLegalEntityType[legalEntityType].filter((screen, _i, a) => {
|
|
23597
|
+
const isAccountScreen = screen === IntroductionScreens.ACCOUNT;
|
|
23598
|
+
const hasAccountTask = tasks.includes(TaskTypes.PAYIN) || tasks.includes(TaskTypes.PAYOUT);
|
|
23599
|
+
const isSoleProprietorScreen = screen === IntroductionScreens.SOLE_PROPRIETOR_COMPANY;
|
|
23600
|
+
const isSoleProprietor = legalEntityType === LegalEntityType.SOLE_PROPRIETORSHIP;
|
|
23601
|
+
const isTrustScreen = screen === IntroductionScreens.TRUST || screen === IntroductionScreens.TRUST_MEMBER_OVERVIEW;
|
|
23602
|
+
const isTrust = legalEntityType === LegalEntityType.TRUST;
|
|
23603
|
+
if (isAccountScreen)
|
|
23604
|
+
return hasAccountTask;
|
|
23605
|
+
if (isSoleProprietorScreen)
|
|
23606
|
+
return isSoleProprietor;
|
|
23607
|
+
if (isTrustScreen)
|
|
23608
|
+
return isTrust;
|
|
23609
|
+
return tasks.some((task) => screen === task);
|
|
23610
|
+
}) : [], [legalEntityType, tasks]);
|
|
23611
|
+
return canSeeIntroduction && (introductionScreens == null ? void 0 : introductionScreens.length) > 0 ? [IntroductionScreens.PROLOGUE, ...introductionScreens, IntroductionScreens.EPILOGUE] : void 0;
|
|
23612
|
+
};
|
|
23613
|
+
const StepProgressIndicator$1 = "";
|
|
23614
|
+
const StepProgressIndicator = ({
|
|
23615
|
+
activeStepIndex,
|
|
23616
|
+
stepsCount
|
|
23617
|
+
}) => stepsCount > 0 ? jsx("div", {
|
|
23618
|
+
"aria-label": `Step ${activeStepIndex + 1} of ${stepsCount}`,
|
|
23619
|
+
className: "adyen-kyc-progress",
|
|
23620
|
+
role: "group",
|
|
23621
|
+
children: jsx("ol", {
|
|
23622
|
+
className: "adyen-kyc-progress__bar",
|
|
23623
|
+
children: range(stepsCount).map((stepNumber) => {
|
|
23624
|
+
const isActive = stepNumber === activeStepIndex;
|
|
23625
|
+
return jsx("li", {
|
|
23626
|
+
"aria-current": isActive ? "step" : void 0,
|
|
23627
|
+
className: cx("adyen-kyc-progress__step", {
|
|
23628
|
+
"adyen-kyc-progress__step--active": isActive
|
|
23629
|
+
}),
|
|
23630
|
+
children: jsx("span", {
|
|
23631
|
+
className: "adyen-kyc-progress__step-label",
|
|
23632
|
+
children: `Step ${stepNumber + 1}: ${stepNumber < activeStepIndex ? "completed" : "not completed"}`
|
|
23633
|
+
})
|
|
23634
|
+
}, stepNumber);
|
|
23635
|
+
})
|
|
23636
|
+
})
|
|
23637
|
+
}) : null;
|
|
23638
|
+
const toCapitalized = (s) => `${s[0].toUpperCase()}${s.slice(1).toLowerCase()}`;
|
|
23639
|
+
const toPascalCase = (s) => s.split(/[^A-Za-z]/).map((word) => toCapitalized(word)).join("");
|
|
23640
|
+
var IntroductionScreenTranslationKeyElements = /* @__PURE__ */ ((IntroductionScreenTranslationKeyElements2) => {
|
|
23641
|
+
IntroductionScreenTranslationKeyElements2["ListItem"] = "LI";
|
|
23642
|
+
IntroductionScreenTranslationKeyElements2["Paragraph"] = "P";
|
|
23643
|
+
return IntroductionScreenTranslationKeyElements2;
|
|
23644
|
+
})(IntroductionScreenTranslationKeyElements || {});
|
|
23645
|
+
const getIntroductionScreenTranslationKeys = (translations, factors) => {
|
|
23646
|
+
const elForKey = (factors.elementType || "").toUpperCase();
|
|
23647
|
+
const lForKey = toPascalCase(factors.legalEntityType || "");
|
|
23648
|
+
const iForKey = toPascalCase(factors.introductionScreen);
|
|
23649
|
+
const keyPrefix = `introductionScreen${iForKey}Description${elForKey}`;
|
|
23650
|
+
const keyPrefixWithL = `introductionScreen${iForKey}${lForKey}Description${elForKey}`;
|
|
23651
|
+
const keys = getTranslationKeysByPrefix(translations, keyPrefix);
|
|
23652
|
+
const keysWithL = getTranslationKeysByPrefix(translations, keyPrefixWithL);
|
|
23653
|
+
return (keysWithL.length ? keysWithL : keys).sort((a, b) => Number(a.charAt(a.length - 1)) - Number(b.charAt(b.length - 1)));
|
|
23654
|
+
};
|
|
23655
|
+
const IntroductionScreen = ({
|
|
23656
|
+
introductionScreen,
|
|
23657
|
+
legalEntity,
|
|
23658
|
+
number: number2
|
|
23659
|
+
}) => {
|
|
23660
|
+
const {
|
|
23661
|
+
i18n
|
|
23662
|
+
} = useI18nContext();
|
|
23663
|
+
const legalEntityType = useLegalEntityType({
|
|
23664
|
+
legalEntity
|
|
23665
|
+
});
|
|
23666
|
+
const paragraphKeys = useMemo(() => legalEntityType ? getIntroductionScreenTranslationKeys(i18n.translations, {
|
|
23667
|
+
introductionScreen,
|
|
23668
|
+
legalEntityType,
|
|
23669
|
+
elementType: IntroductionScreenTranslationKeyElements.Paragraph
|
|
23670
|
+
}) : void 0, [i18n, introductionScreen, legalEntityType]);
|
|
23671
|
+
const listItemKeys = useMemo(() => legalEntityType ? getIntroductionScreenTranslationKeys(i18n.translations, {
|
|
23672
|
+
introductionScreen,
|
|
23673
|
+
legalEntityType,
|
|
23674
|
+
elementType: IntroductionScreenTranslationKeyElements.ListItem
|
|
23675
|
+
}) : void 0, [i18n, introductionScreen, legalEntityType]);
|
|
23676
|
+
return jsxs(Fragment, {
|
|
23677
|
+
children: [jsx("div", {
|
|
23678
|
+
className: "adyen-kyc-introduction__number",
|
|
23679
|
+
children: number2
|
|
23680
|
+
}), jsx("div", {
|
|
23681
|
+
className: "adyen-kyc-introduction__title",
|
|
23682
|
+
children: i18n.get(`introductionScreen${toPascalCase(introductionScreen)}Title`)
|
|
23683
|
+
}), jsxs("div", {
|
|
23684
|
+
className: "adyen-kyc-introduction__description",
|
|
23685
|
+
children: [!!(paragraphKeys == null ? void 0 : paragraphKeys.length) && paragraphKeys.map((key) => jsx("p", {
|
|
23686
|
+
children: i18n.get(key)
|
|
23687
|
+
}, key)), !!(listItemKeys == null ? void 0 : listItemKeys.length) && jsx("ul", {
|
|
23688
|
+
children: listItemKeys.map((key) => jsx("li", {
|
|
23689
|
+
children: i18n.get(key)
|
|
23690
|
+
}, key))
|
|
23691
|
+
})]
|
|
23692
|
+
})]
|
|
23693
|
+
});
|
|
23694
|
+
};
|
|
23695
|
+
const Introduction = ({
|
|
23696
|
+
legalEntity,
|
|
23697
|
+
onExitIntroduction,
|
|
23698
|
+
tasks
|
|
23699
|
+
}) => {
|
|
23700
|
+
const {
|
|
23701
|
+
i18n
|
|
23702
|
+
} = useI18nContext();
|
|
23703
|
+
const introductionScreens = useIntroductionScreens({
|
|
23704
|
+
legalEntity,
|
|
23705
|
+
tasks
|
|
23706
|
+
});
|
|
23707
|
+
const [activeIndex, setActiveIndex] = useState(0);
|
|
23708
|
+
useEffect(() => {
|
|
23709
|
+
if (!(introductionScreens == null ? void 0 : introductionScreens.length))
|
|
23710
|
+
onExitIntroduction();
|
|
23711
|
+
}, [onExitIntroduction, introductionScreens]);
|
|
23712
|
+
return (introductionScreens == null ? void 0 : introductionScreens.length) ? jsxs("div", {
|
|
23713
|
+
className: "adyen-kyc-introduction",
|
|
23714
|
+
children: [jsx(StepProgressIndicator, {
|
|
23715
|
+
activeStepIndex: activeIndex,
|
|
23716
|
+
stepsCount: introductionScreens.length
|
|
23717
|
+
}), jsx("div", {
|
|
23718
|
+
className: "adyen-kyc-introduction__skip",
|
|
23719
|
+
children: jsx(Button, {
|
|
23720
|
+
label: i18n.get("goToOverviewFromIntroduction"),
|
|
23721
|
+
onClick: () => onExitIntroduction(),
|
|
23722
|
+
showAsLink: true,
|
|
23723
|
+
type: "button"
|
|
23724
|
+
})
|
|
23725
|
+
}), jsx(IntroductionScreen, {
|
|
23726
|
+
introductionScreen: introductionScreens[activeIndex],
|
|
23727
|
+
legalEntity,
|
|
23728
|
+
number: activeIndex > 0 && activeIndex < introductionScreens.length - 1 ? activeIndex : void 0
|
|
23729
|
+
// prologue and epilogue should not be numbered
|
|
23730
|
+
}, introductionScreens[activeIndex]), jsxs("div", {
|
|
23731
|
+
className: "adyen-kyc-introduction__nav",
|
|
23732
|
+
children: [jsx(Button, {
|
|
23733
|
+
disabled: activeIndex === 0,
|
|
23734
|
+
label: "Back",
|
|
23735
|
+
onClick: () => setActiveIndex((currentValue) => currentValue - 1),
|
|
23736
|
+
secondary: true,
|
|
23737
|
+
type: "button"
|
|
23738
|
+
}), activeIndex + 1 === introductionScreens.length ? jsx(Button, {
|
|
23739
|
+
label: "Start",
|
|
23740
|
+
onClick: () => onExitIntroduction(),
|
|
23741
|
+
type: "button"
|
|
23742
|
+
}) : jsx(Button, {
|
|
23743
|
+
label: "Next",
|
|
23744
|
+
onClick: () => setActiveIndex((currentValue) => currentValue + 1),
|
|
23745
|
+
type: "button"
|
|
23746
|
+
})]
|
|
23747
|
+
})]
|
|
23748
|
+
}) : null;
|
|
23749
|
+
};
|
|
23457
23750
|
function LegalEntityTypeSwitcher({
|
|
23458
23751
|
targetLegalEntityType,
|
|
23459
23752
|
handleHomeClick,
|
|
@@ -23596,151 +23889,6 @@ function ReviewComponent({
|
|
|
23596
23889
|
footer
|
|
23597
23890
|
});
|
|
23598
23891
|
}
|
|
23599
|
-
const _taskIntros_component = "";
|
|
23600
|
-
const StepProgressIndicator$1 = "";
|
|
23601
|
-
const StepProgressIndicator = ({
|
|
23602
|
-
activeStepIndex,
|
|
23603
|
-
stepsCount
|
|
23604
|
-
}) => stepsCount > 0 ? jsx("div", {
|
|
23605
|
-
"aria-label": `Step ${activeStepIndex + 1} of ${stepsCount}`,
|
|
23606
|
-
className: "adyen-kyc-progress",
|
|
23607
|
-
role: "group",
|
|
23608
|
-
children: jsx("ol", {
|
|
23609
|
-
className: "adyen-kyc-progress__bar",
|
|
23610
|
-
children: range(stepsCount).map((stepNumber) => {
|
|
23611
|
-
const isActive = stepNumber === activeStepIndex;
|
|
23612
|
-
return jsx("li", {
|
|
23613
|
-
"aria-current": isActive ? "step" : void 0,
|
|
23614
|
-
className: cx("adyen-kyc-progress__step", {
|
|
23615
|
-
"adyen-kyc-progress__step--active": isActive
|
|
23616
|
-
}),
|
|
23617
|
-
children: jsx("span", {
|
|
23618
|
-
className: "adyen-kyc-progress__step-label",
|
|
23619
|
-
children: `Step ${stepNumber + 1}: ${stepNumber < activeStepIndex ? "completed" : "not completed"}`
|
|
23620
|
-
})
|
|
23621
|
-
}, stepNumber);
|
|
23622
|
-
})
|
|
23623
|
-
})
|
|
23624
|
-
}) : null;
|
|
23625
|
-
const toCapitalized = (s) => `${s[0].toUpperCase()}${s.slice(1).toLowerCase()}`;
|
|
23626
|
-
const toPascalCase = (s) => s.split(/[^A-Za-z]/).map((word) => toCapitalized(word)).join("");
|
|
23627
|
-
var IntroDescriptionTranslationKeyElements = /* @__PURE__ */ ((IntroDescriptionTranslationKeyElements2) => {
|
|
23628
|
-
IntroDescriptionTranslationKeyElements2["ListItem"] = "LI";
|
|
23629
|
-
IntroDescriptionTranslationKeyElements2["Paragraph"] = "P";
|
|
23630
|
-
return IntroDescriptionTranslationKeyElements2;
|
|
23631
|
-
})(IntroDescriptionTranslationKeyElements || {});
|
|
23632
|
-
const getIntroDescriptionTranslationKeys = (translations, factors) => {
|
|
23633
|
-
const elForKey = (factors.elementType || "").toUpperCase();
|
|
23634
|
-
const lForKey = toPascalCase(factors.legalEntityType || "");
|
|
23635
|
-
const iForKey = toPascalCase(factors.introType);
|
|
23636
|
-
const keyPrefix = `taskIntro${iForKey}Description${elForKey}`;
|
|
23637
|
-
const keyPrefixWithL = `taskIntro${iForKey}${lForKey}Description${elForKey}`;
|
|
23638
|
-
const keys = getTranslationKeysByPrefix(translations, keyPrefix);
|
|
23639
|
-
const keysWithL = getTranslationKeysByPrefix(translations, keyPrefixWithL);
|
|
23640
|
-
return (keysWithL.length ? keysWithL : keys).sort((a, b) => Number(a.charAt(a.length - 1)) - Number(b.charAt(b.length - 1)));
|
|
23641
|
-
};
|
|
23642
|
-
const TaskIntro = ({
|
|
23643
|
-
intro,
|
|
23644
|
-
legalEntityType,
|
|
23645
|
-
number: number2
|
|
23646
|
-
}) => {
|
|
23647
|
-
const {
|
|
23648
|
-
i18n
|
|
23649
|
-
} = useI18nContext();
|
|
23650
|
-
const paragraphKeys = useMemo(() => getIntroDescriptionTranslationKeys(i18n.translations, {
|
|
23651
|
-
introType: intro,
|
|
23652
|
-
legalEntityType,
|
|
23653
|
-
elementType: IntroDescriptionTranslationKeyElements.Paragraph
|
|
23654
|
-
}), [i18n, intro, legalEntityType]);
|
|
23655
|
-
const listItemKeys = useMemo(() => getIntroDescriptionTranslationKeys(i18n.translations, {
|
|
23656
|
-
introType: intro,
|
|
23657
|
-
legalEntityType,
|
|
23658
|
-
elementType: IntroDescriptionTranslationKeyElements.ListItem
|
|
23659
|
-
}), [i18n, intro, legalEntityType]);
|
|
23660
|
-
return jsxs(Fragment, {
|
|
23661
|
-
children: [jsx("div", {
|
|
23662
|
-
className: "adyen-kyc-task-intros__number",
|
|
23663
|
-
children: number2
|
|
23664
|
-
}), jsx("div", {
|
|
23665
|
-
className: "adyen-kyc-task-intros__title",
|
|
23666
|
-
children: i18n.get(`taskIntro${toPascalCase(intro)}Title`)
|
|
23667
|
-
}), jsxs("div", {
|
|
23668
|
-
className: "adyen-kyc-task-intros__description",
|
|
23669
|
-
children: [paragraphKeys.map((key) => jsx("p", {
|
|
23670
|
-
children: i18n.get(key)
|
|
23671
|
-
}, key)), !!listItemKeys.length && jsx("ul", {
|
|
23672
|
-
children: listItemKeys.map((key) => jsx("li", {
|
|
23673
|
-
children: i18n.get(key)
|
|
23674
|
-
}, key))
|
|
23675
|
-
})]
|
|
23676
|
-
})]
|
|
23677
|
-
});
|
|
23678
|
-
};
|
|
23679
|
-
const taskIntrosInOrder = [
|
|
23680
|
-
TaskTypes.COMPANY,
|
|
23681
|
-
TaskTypes.DECISION_MAKER,
|
|
23682
|
-
TaskTypes.INDIVIDUAL,
|
|
23683
|
-
// TaskTypes.PAYIN,
|
|
23684
|
-
TaskTypes.PAYOUT
|
|
23685
|
-
];
|
|
23686
|
-
var ExtraIntroTypes = /* @__PURE__ */ ((ExtraIntroTypes2) => {
|
|
23687
|
-
ExtraIntroTypes2["PROLOGUE"] = "prologue";
|
|
23688
|
-
ExtraIntroTypes2["EPILOGUE"] = "epilogue";
|
|
23689
|
-
return ExtraIntroTypes2;
|
|
23690
|
-
})(ExtraIntroTypes || {});
|
|
23691
|
-
const TaskIntros = ({
|
|
23692
|
-
legalEntityType,
|
|
23693
|
-
onExitIntro,
|
|
23694
|
-
tasks
|
|
23695
|
-
}) => {
|
|
23696
|
-
const {
|
|
23697
|
-
i18n
|
|
23698
|
-
} = useI18nContext();
|
|
23699
|
-
const [activeIndex, setActiveIndex] = useState(0);
|
|
23700
|
-
const taskIntros = useMemo(() => taskIntrosInOrder.filter((taskIntro) => tasks.some((t) => t === taskIntro)), [tasks]);
|
|
23701
|
-
const allIntros = useMemo(() => (taskIntros == null ? void 0 : taskIntros.length) ? [ExtraIntroTypes.PROLOGUE, ...taskIntros, ExtraIntroTypes.EPILOGUE] : void 0, [taskIntros]);
|
|
23702
|
-
useEffect(() => {
|
|
23703
|
-
if (!taskIntros.length)
|
|
23704
|
-
onExitIntro();
|
|
23705
|
-
}, [onExitIntro, taskIntros]);
|
|
23706
|
-
return (allIntros == null ? void 0 : allIntros.length) ? jsxs("div", {
|
|
23707
|
-
className: "adyen-kyc-task-intros",
|
|
23708
|
-
children: [jsx(StepProgressIndicator, {
|
|
23709
|
-
activeStepIndex: activeIndex,
|
|
23710
|
-
stepsCount: allIntros.length
|
|
23711
|
-
}), jsx("div", {
|
|
23712
|
-
className: "adyen-kyc-task-intros__skip",
|
|
23713
|
-
children: jsx(Button, {
|
|
23714
|
-
label: i18n.get("goToOverviewFromIntro"),
|
|
23715
|
-
onClick: () => onExitIntro(),
|
|
23716
|
-
showAsLink: true,
|
|
23717
|
-
type: "button"
|
|
23718
|
-
})
|
|
23719
|
-
}), jsx(TaskIntro, {
|
|
23720
|
-
intro: allIntros[activeIndex],
|
|
23721
|
-
legalEntityType,
|
|
23722
|
-
number: activeIndex > 0 && activeIndex < allIntros.length - 1 ? activeIndex : void 0
|
|
23723
|
-
// prologue and epilogue should not be numbered
|
|
23724
|
-
}, allIntros[activeIndex]), jsxs("div", {
|
|
23725
|
-
className: "adyen-kyc-task-intros__nav",
|
|
23726
|
-
children: [jsx(Button, {
|
|
23727
|
-
disabled: activeIndex === 0,
|
|
23728
|
-
label: "Back",
|
|
23729
|
-
onClick: () => setActiveIndex((currentValue) => currentValue - 1),
|
|
23730
|
-
secondary: true,
|
|
23731
|
-
type: "button"
|
|
23732
|
-
}), activeIndex + 1 === allIntros.length ? jsx(Button, {
|
|
23733
|
-
label: "Start",
|
|
23734
|
-
onClick: () => onExitIntro(),
|
|
23735
|
-
type: "button"
|
|
23736
|
-
}) : jsx(Button, {
|
|
23737
|
-
label: "Next",
|
|
23738
|
-
onClick: () => setActiveIndex((currentValue) => currentValue + 1),
|
|
23739
|
-
type: "button"
|
|
23740
|
-
})]
|
|
23741
|
-
})]
|
|
23742
|
-
}) : null;
|
|
23743
|
-
};
|
|
23744
23892
|
const TaskList = "";
|
|
23745
23893
|
const businessTypeMapping = {
|
|
23746
23894
|
myName: {
|
|
@@ -23769,7 +23917,7 @@ const useBusinessSetup = (legalEntityResponse) => {
|
|
|
23769
23917
|
const accountHolderType = accountHolder2 || getDefaultAccountHolderType(legalEntityResponse);
|
|
23770
23918
|
const businessSetup = (_a = businessTypeMapping[accountHolderType]) == null ? void 0 : _a[legalEntityResponse == null ? void 0 : legalEntityResponse.type];
|
|
23771
23919
|
return {
|
|
23772
|
-
businessSetup
|
|
23920
|
+
businessSetup: businessSetup || accountHolder2
|
|
23773
23921
|
};
|
|
23774
23922
|
};
|
|
23775
23923
|
const useEnableNewEntryFlow = () => {
|
|
@@ -23955,9 +24103,9 @@ function TaskListComponent({
|
|
|
23955
24103
|
const {
|
|
23956
24104
|
isExperimentEnabled
|
|
23957
24105
|
} = useExperimentsContext();
|
|
23958
|
-
const {
|
|
23959
|
-
|
|
23960
|
-
}
|
|
24106
|
+
const canSeeIntroduction = useCanSeeIntroduction({
|
|
24107
|
+
legalEntity: legalEntityResponse
|
|
24108
|
+
});
|
|
23961
24109
|
const {
|
|
23962
24110
|
remediationMessages
|
|
23963
24111
|
} = useDataMissingRemediations({
|
|
@@ -23999,11 +24147,11 @@ function TaskListComponent({
|
|
|
23999
24147
|
const companyTaskDescriptionKey = isReview ? "businessAccountDetailsDescriptionReview" : "businessAccountDetailsDescription";
|
|
24000
24148
|
const payoutTaskDescriptionKey = isReview ? "payoutAccountsDescriptionReview" : "payoutAccountsDescription";
|
|
24001
24149
|
return jsxs("div", {
|
|
24002
|
-
children: [
|
|
24150
|
+
children: [canSeeIntroduction && jsx("div", {
|
|
24003
24151
|
className: "adyen-task-list__nav",
|
|
24004
24152
|
children: jsx(Button, {
|
|
24005
|
-
label: i18n.get("
|
|
24006
|
-
onClick: () => onNavigateToTask(TaskTypes.
|
|
24153
|
+
label: i18n.get("goToIntroduction"),
|
|
24154
|
+
onClick: () => onNavigateToTask(TaskTypes.INTRODUCTION),
|
|
24007
24155
|
showAsLink: true,
|
|
24008
24156
|
type: "button"
|
|
24009
24157
|
})
|
|
@@ -24500,7 +24648,9 @@ function IndividualDropinComponent({
|
|
|
24500
24648
|
handleUpdateLegalEntity,
|
|
24501
24649
|
trustMember,
|
|
24502
24650
|
onSubmit: externalOnSubmit,
|
|
24503
|
-
onTypeSwitch
|
|
24651
|
+
onTypeSwitch,
|
|
24652
|
+
hideNavigation = false,
|
|
24653
|
+
handleBackClick: externalBackClick
|
|
24504
24654
|
}) {
|
|
24505
24655
|
var _a, _b, _c, _d;
|
|
24506
24656
|
const {
|
|
@@ -24517,6 +24667,9 @@ function IndividualDropinComponent({
|
|
|
24517
24667
|
const {
|
|
24518
24668
|
getConfiguration: getConfiguration2
|
|
24519
24669
|
} = useConfigurationApi();
|
|
24670
|
+
const {
|
|
24671
|
+
isEmbeddedDropin
|
|
24672
|
+
} = useAuthContext();
|
|
24520
24673
|
let dataFromResponse = mapLegalEntityToIndividual(legalEntityResponse, isTargetLegalEntityType);
|
|
24521
24674
|
const documentUtils = documentApiUtils(handleCreateDocument, handleGetDocument, handleUpdateDocument);
|
|
24522
24675
|
let roleTypes = [];
|
|
@@ -24558,7 +24711,8 @@ function IndividualDropinComponent({
|
|
|
24558
24711
|
const fieldsFromCustomRules = useMemo(() => rules$3({
|
|
24559
24712
|
data,
|
|
24560
24713
|
country: country2,
|
|
24561
|
-
taskType
|
|
24714
|
+
taskType,
|
|
24715
|
+
isEmbeddedDropin
|
|
24562
24716
|
}), [country2, data, taskType]);
|
|
24563
24717
|
const derivedProps = useMemo(() => getPropsFromConfigurations(fieldConfigurations, individualForms, (problems == null ? void 0 : problems.remediationActions) ? Object.values(problems == null ? void 0 : problems.remediationActions) : [], (problems == null ? void 0 : problems.missingData) ?? [], legalEntityResponse ? getFieldsWithExistingData(legalEntityResponse) : [], fieldsFromCustomRules), [fieldConfigurations, fieldsFromCustomRules, problems == null ? void 0 : problems.remediationActions]);
|
|
24564
24718
|
const {
|
|
@@ -24876,6 +25030,7 @@ function IndividualDropinComponent({
|
|
|
24876
25030
|
} = useFormComposer({
|
|
24877
25031
|
problems,
|
|
24878
25032
|
baseTrackingPayload,
|
|
25033
|
+
externalBackClick,
|
|
24879
25034
|
forms,
|
|
24880
25035
|
formRef,
|
|
24881
25036
|
onSubmit
|
|
@@ -24902,6 +25057,7 @@ function IndividualDropinComponent({
|
|
|
24902
25057
|
validateForm: () => setShouldValidate(true),
|
|
24903
25058
|
canSubmit: canSubmit2() && hasDataChanged(dataFromResponse, data),
|
|
24904
25059
|
problems,
|
|
25060
|
+
hideNavigation,
|
|
24905
25061
|
children: jsx(IndividualComponent, {
|
|
24906
25062
|
...derivedProps,
|
|
24907
25063
|
capabilities: Object.keys((legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) ?? {}),
|
|
@@ -26588,7 +26744,7 @@ const serviceAgreementValidationRules = {
|
|
|
26588
26744
|
errorMessage: "fieldIsRequired"
|
|
26589
26745
|
}
|
|
26590
26746
|
};
|
|
26591
|
-
const logger$
|
|
26747
|
+
const logger$9 = createLogger("useServiceAgreement");
|
|
26592
26748
|
const FALLBACK_LANGUAGE_CODE = "en";
|
|
26593
26749
|
const useServiceAgreement = ({
|
|
26594
26750
|
handleGetServiceAgreement,
|
|
@@ -26617,7 +26773,7 @@ const useServiceAgreement = ({
|
|
|
26617
26773
|
language: agreementLanguage
|
|
26618
26774
|
});
|
|
26619
26775
|
if (!document2) {
|
|
26620
|
-
logger$
|
|
26776
|
+
logger$9.log('"document" field was missing in response');
|
|
26621
26777
|
return;
|
|
26622
26778
|
}
|
|
26623
26779
|
const contract = JSON.parse(decodeURIComponent(escape(window.atob(document2))));
|
|
@@ -26635,7 +26791,7 @@ const useServiceAgreement = ({
|
|
|
26635
26791
|
throw err;
|
|
26636
26792
|
}
|
|
26637
26793
|
};
|
|
26638
|
-
requestServiceAgreement().catch(logger$
|
|
26794
|
+
requestServiceAgreement().catch(logger$9.error);
|
|
26639
26795
|
}, [handleGetServiceAgreement, handleServiceAgreementIsNotAvailableInThatLanguage, agreementLanguage, legalEntityId, serviceAgreementType]);
|
|
26640
26796
|
return {
|
|
26641
26797
|
loading: loading2,
|
|
@@ -27977,7 +28133,7 @@ function TrustDropinComponent(props) {
|
|
|
27977
28133
|
}
|
|
27978
28134
|
const PAGES_WITH_STATUS = [TaskTypes.DECISION_MAKER_OVERVIEW, TaskTypes.TASKS_OVERVIEW];
|
|
27979
28135
|
const POLLING_INTERVAL = 3e3;
|
|
27980
|
-
const logger$
|
|
28136
|
+
const logger$8 = createLogger("DropinComposerComponent");
|
|
27981
28137
|
const isOrganizationSettlorWithExemptionReasonEnabled = (enabled, country2) => country2 === CountryCodes.Australia && enabled;
|
|
27982
28138
|
function DropinComposerComponent({
|
|
27983
28139
|
capabilities,
|
|
@@ -28011,18 +28167,22 @@ function DropinComposerComponent({
|
|
|
28011
28167
|
const [isLoadingConfiguration, setIsLoadingConfiguration] = useState(false);
|
|
28012
28168
|
const [pollingId, setPollingId] = useState(null);
|
|
28013
28169
|
const showBusinessTypeSelection = useShouldShowBusinessTypeSelection(accountHolder2);
|
|
28014
|
-
const
|
|
28170
|
+
const showIntroduction = useShouldShowIntroduction({
|
|
28171
|
+
legalEntity: legalEntityResponse
|
|
28172
|
+
});
|
|
28015
28173
|
const {
|
|
28016
|
-
|
|
28017
|
-
} =
|
|
28174
|
+
setHasSeenIntroduction
|
|
28175
|
+
} = useHasSeenIntroduction({
|
|
28176
|
+
legalEntityId: legalEntityResponse.id
|
|
28177
|
+
});
|
|
28018
28178
|
const [tasks, setTasks] = useState([]);
|
|
28019
28179
|
const initialTask = useMemo(() => {
|
|
28020
28180
|
if (showBusinessTypeSelection)
|
|
28021
28181
|
return TaskTypes.BUSINESS_TYPE_SELECTION;
|
|
28022
|
-
if (
|
|
28023
|
-
return TaskTypes.
|
|
28182
|
+
if (showIntroduction)
|
|
28183
|
+
return TaskTypes.INTRODUCTION;
|
|
28024
28184
|
return TaskTypes.TASKS_OVERVIEW;
|
|
28025
|
-
}, [showBusinessTypeSelection,
|
|
28185
|
+
}, [showBusinessTypeSelection, showIntroduction]);
|
|
28026
28186
|
const [taskHistory, setTaskHistory] = useState([initialTask]);
|
|
28027
28187
|
const [legalEntity, setLegalEntity] = useState(legalEntityResponse);
|
|
28028
28188
|
const [associatedLegalEntity, setAssociatedLegalEntity] = useState(null);
|
|
@@ -28066,7 +28226,7 @@ function DropinComposerComponent({
|
|
|
28066
28226
|
setPciStatus(response);
|
|
28067
28227
|
return response;
|
|
28068
28228
|
} catch (e) {
|
|
28069
|
-
logger$
|
|
28229
|
+
logger$8.warn(i18n.get("failedToGetPciStatus"));
|
|
28070
28230
|
}
|
|
28071
28231
|
}
|
|
28072
28232
|
return void 0;
|
|
@@ -28095,7 +28255,7 @@ function DropinComposerComponent({
|
|
|
28095
28255
|
useEffect(() => {
|
|
28096
28256
|
if (!tasks.includes(TaskTypes.PCI_DSS))
|
|
28097
28257
|
return;
|
|
28098
|
-
getPciTemplate().catch(logger$
|
|
28258
|
+
getPciTemplate().catch(logger$8.error);
|
|
28099
28259
|
}, [getPciTemplate, tasks]);
|
|
28100
28260
|
const getServiceAgreementAcceptanceInfos = async () => {
|
|
28101
28261
|
if (legalEntity.id && (args == null ? void 0 : args.handleGetServiceAgreementAcceptanceInfos)) {
|
|
@@ -28103,7 +28263,7 @@ function DropinComposerComponent({
|
|
|
28103
28263
|
const response = await args.handleGetServiceAgreementAcceptanceInfos(legalEntity.id);
|
|
28104
28264
|
setServiceAgreementAcceptanceInfos(response.data);
|
|
28105
28265
|
} catch (e) {
|
|
28106
|
-
logger$
|
|
28266
|
+
logger$8.warn(i18n.get("failedToGetServiceAgreementStatus"));
|
|
28107
28267
|
}
|
|
28108
28268
|
}
|
|
28109
28269
|
};
|
|
@@ -28113,7 +28273,7 @@ function DropinComposerComponent({
|
|
|
28113
28273
|
const response = await args.handleGetServiceAgreementStatus(legalEntity.id);
|
|
28114
28274
|
setServiceAgreementTypes(response.termsOfServiceTypes);
|
|
28115
28275
|
} catch (e) {
|
|
28116
|
-
logger$
|
|
28276
|
+
logger$8.warn(i18n.get("failedToGetServiceAgreementStatus"));
|
|
28117
28277
|
}
|
|
28118
28278
|
}
|
|
28119
28279
|
};
|
|
@@ -28152,7 +28312,7 @@ function DropinComposerComponent({
|
|
|
28152
28312
|
setCapabilityProblems(getCapabilityProblems(response));
|
|
28153
28313
|
return response;
|
|
28154
28314
|
} catch (e) {
|
|
28155
|
-
logger$
|
|
28315
|
+
logger$8.warn(i18n.get("failedToFetchLegalEntityDetails"));
|
|
28156
28316
|
}
|
|
28157
28317
|
}
|
|
28158
28318
|
return void 0;
|
|
@@ -28164,7 +28324,7 @@ function DropinComposerComponent({
|
|
|
28164
28324
|
setTrust(response);
|
|
28165
28325
|
return response;
|
|
28166
28326
|
} catch (e) {
|
|
28167
|
-
logger$
|
|
28327
|
+
logger$8.warn(i18n.get("failedToFetchTrustDetails"));
|
|
28168
28328
|
}
|
|
28169
28329
|
}
|
|
28170
28330
|
return void 0;
|
|
@@ -28214,7 +28374,7 @@ function DropinComposerComponent({
|
|
|
28214
28374
|
label: i18n.get("successFullyRemovedTrustMember")
|
|
28215
28375
|
});
|
|
28216
28376
|
} catch (err) {
|
|
28217
|
-
logger$
|
|
28377
|
+
logger$8.error(`Failed to delete trust member`, err);
|
|
28218
28378
|
showToast({
|
|
28219
28379
|
type: ToastType.ERROR,
|
|
28220
28380
|
label: i18n.get("failedToRemoveTrustMember")
|
|
@@ -28284,7 +28444,7 @@ function DropinComposerComponent({
|
|
|
28284
28444
|
}
|
|
28285
28445
|
break;
|
|
28286
28446
|
default:
|
|
28287
|
-
logger$
|
|
28447
|
+
logger$8.warn(`Updating trust member type "${trustMember.trustMemberType}" is not implemented.`);
|
|
28288
28448
|
}
|
|
28289
28449
|
showToast({
|
|
28290
28450
|
label: i18n.get("successfullyUpdatedDetails"),
|
|
@@ -28292,7 +28452,7 @@ function DropinComposerComponent({
|
|
|
28292
28452
|
});
|
|
28293
28453
|
await refreshTrustAndRunOnSubmit(trust2, 1);
|
|
28294
28454
|
} catch (err) {
|
|
28295
|
-
logger$
|
|
28455
|
+
logger$8.error(err);
|
|
28296
28456
|
showToast({
|
|
28297
28457
|
label: i18n.get("failedToUpdateDetails"),
|
|
28298
28458
|
type: ToastType.ERROR
|
|
@@ -28515,7 +28675,7 @@ function DropinComposerComponent({
|
|
|
28515
28675
|
}
|
|
28516
28676
|
};
|
|
28517
28677
|
setIsLoadingConfiguration(true);
|
|
28518
|
-
fetchConfiguration().catch(logger$
|
|
28678
|
+
fetchConfiguration().catch(logger$8.error).finally(() => {
|
|
28519
28679
|
setIsLoadingConfiguration(false);
|
|
28520
28680
|
onLoad();
|
|
28521
28681
|
});
|
|
@@ -28565,14 +28725,14 @@ function DropinComposerComponent({
|
|
|
28565
28725
|
onAccountHolderSelect: async (newAccountHolder) => {
|
|
28566
28726
|
setAccountHolder(newAccountHolder);
|
|
28567
28727
|
await refreshLegalEntity();
|
|
28568
|
-
onNavigateTo(
|
|
28728
|
+
onNavigateTo(showIntroduction ? TaskTypes.INTRODUCTION : TaskTypes.TASKS_OVERVIEW);
|
|
28569
28729
|
}
|
|
28570
28730
|
});
|
|
28571
|
-
case TaskTypes.
|
|
28572
|
-
return jsx(
|
|
28573
|
-
|
|
28574
|
-
|
|
28575
|
-
|
|
28731
|
+
case TaskTypes.INTRODUCTION:
|
|
28732
|
+
return jsx(Introduction, {
|
|
28733
|
+
legalEntity,
|
|
28734
|
+
onExitIntroduction: () => {
|
|
28735
|
+
setHasSeenIntroduction(true);
|
|
28576
28736
|
onNavigateTo(TaskTypes.TASKS_OVERVIEW);
|
|
28577
28737
|
},
|
|
28578
28738
|
tasks
|
|
@@ -28883,7 +29043,6 @@ function DropinComposerComponent({
|
|
|
28883
29043
|
return null;
|
|
28884
29044
|
}
|
|
28885
29045
|
}
|
|
28886
|
-
const ManageTransferInstrumentComponent$1 = "";
|
|
28887
29046
|
const createDocument = async (context, document2, ownerId) => {
|
|
28888
29047
|
const {
|
|
28889
29048
|
loadingContext,
|
|
@@ -28900,6 +29059,22 @@ const createDocument = async (context, document2, ownerId) => {
|
|
|
28900
29059
|
}
|
|
28901
29060
|
}, document2);
|
|
28902
29061
|
};
|
|
29062
|
+
const createLegalEntity = async (context, legalEntity) => {
|
|
29063
|
+
const {
|
|
29064
|
+
loadingContext,
|
|
29065
|
+
legalEntityId
|
|
29066
|
+
} = context;
|
|
29067
|
+
return httpPost({
|
|
29068
|
+
loadingContext,
|
|
29069
|
+
errorLevel: "warn",
|
|
29070
|
+
errorMessage: `LegalEntity creation available`,
|
|
29071
|
+
path: `${legalEntityId}`,
|
|
29072
|
+
authentication: "jwt",
|
|
29073
|
+
headers: {
|
|
29074
|
+
"Content-Type": "application/json"
|
|
29075
|
+
}
|
|
29076
|
+
}, legalEntity);
|
|
29077
|
+
};
|
|
28903
29078
|
const createTransferInstrument = async (context, transferInstrument) => {
|
|
28904
29079
|
const {
|
|
28905
29080
|
loadingContext,
|
|
@@ -29070,6 +29245,22 @@ const updateDocument = async (context, document2, documentId, ownerId) => {
|
|
|
29070
29245
|
}
|
|
29071
29246
|
}, document2);
|
|
29072
29247
|
};
|
|
29248
|
+
const updateLegalEntity = async (context, legalEntity) => {
|
|
29249
|
+
const {
|
|
29250
|
+
loadingContext,
|
|
29251
|
+
legalEntityId
|
|
29252
|
+
} = context;
|
|
29253
|
+
return httpPost({
|
|
29254
|
+
loadingContext,
|
|
29255
|
+
errorLevel: "warn",
|
|
29256
|
+
errorMessage: `LegalEntity update failed`,
|
|
29257
|
+
path: `${legalEntityId}`,
|
|
29258
|
+
authentication: "jwt",
|
|
29259
|
+
headers: {
|
|
29260
|
+
"Content-Type": "application/json"
|
|
29261
|
+
}
|
|
29262
|
+
}, legalEntity);
|
|
29263
|
+
};
|
|
29073
29264
|
const updateTransferInstrument = async (context, transferInstrument, transferInstrumentId) => {
|
|
29074
29265
|
const {
|
|
29075
29266
|
loadingContext,
|
|
@@ -29165,6 +29356,14 @@ const useComponentApi = (rootLegalEntityId) => {
|
|
|
29165
29356
|
...baseRequestContext,
|
|
29166
29357
|
legalEntityId
|
|
29167
29358
|
}),
|
|
29359
|
+
updateLegalEntity: async (legalEntity, legalEntityId) => updateLegalEntity({
|
|
29360
|
+
...baseRequestContext,
|
|
29361
|
+
legalEntityId
|
|
29362
|
+
}, legalEntity),
|
|
29363
|
+
createLegalEntity: async (legalEntity) => createLegalEntity({
|
|
29364
|
+
...baseRequestContext,
|
|
29365
|
+
legalEntityId: rootLegalEntityId
|
|
29366
|
+
}, legalEntity),
|
|
29168
29367
|
getTransferInstrument: async (transferInstrumentId) => getTransferInstrument(baseRequestContext, transferInstrumentId),
|
|
29169
29368
|
getBankVerificationVendor: async (country2) => getBankVerificationVendor(baseRequestContext, country2),
|
|
29170
29369
|
getDocument: async (documentId) => getDocument(baseRequestContext, documentId),
|
|
@@ -29179,6 +29378,143 @@ const useComponentApi = (rootLegalEntityId) => {
|
|
|
29179
29378
|
};
|
|
29180
29379
|
}, [base, rootLegalEntityId]);
|
|
29181
29380
|
};
|
|
29381
|
+
class EventEmitter {
|
|
29382
|
+
constructor() {
|
|
29383
|
+
this.listeners = {
|
|
29384
|
+
next: [],
|
|
29385
|
+
back: [],
|
|
29386
|
+
validate: [],
|
|
29387
|
+
updateLocale: []
|
|
29388
|
+
};
|
|
29389
|
+
this.on = (eventName, listener) => {
|
|
29390
|
+
this.listeners[eventName].push(listener);
|
|
29391
|
+
};
|
|
29392
|
+
this.off = (eventName, toRemove) => {
|
|
29393
|
+
this.listeners[eventName] = this.listeners[eventName].filter((listener) => listener !== toRemove);
|
|
29394
|
+
};
|
|
29395
|
+
this.emit = (eventName, ...data) => {
|
|
29396
|
+
this.listeners[eventName].forEach((listener) => listener(data[0]));
|
|
29397
|
+
};
|
|
29398
|
+
}
|
|
29399
|
+
}
|
|
29400
|
+
const logger$7 = createLogger("CreateIndividualComponent");
|
|
29401
|
+
function CreateIndividualComponent({
|
|
29402
|
+
parentLegalEntityId,
|
|
29403
|
+
legalEntityId,
|
|
29404
|
+
taskType,
|
|
29405
|
+
onSubmitSuccess,
|
|
29406
|
+
handleBackClick,
|
|
29407
|
+
eventEmitter
|
|
29408
|
+
}) {
|
|
29409
|
+
if (!legalEntityId && !parentLegalEntityId) {
|
|
29410
|
+
throw new Error("Must provide at-least one of parentLegalEntityId or legalEntityId");
|
|
29411
|
+
}
|
|
29412
|
+
const {
|
|
29413
|
+
getLegalEntity: getLegalEntity2,
|
|
29414
|
+
createLegalEntity: createLegalEntity2,
|
|
29415
|
+
updateLegalEntity: updateLegalEntity2,
|
|
29416
|
+
getDocument: getDocument2,
|
|
29417
|
+
createDocument: createDocument2,
|
|
29418
|
+
updateDocument: updateDocument2
|
|
29419
|
+
} = useComponentApi(legalEntityId ?? parentLegalEntityId);
|
|
29420
|
+
const [legalEntity, setLegalEntity] = useState();
|
|
29421
|
+
const [parentLegalEntity, setParentLegalEntity] = useState();
|
|
29422
|
+
const [loadingStatus, setLoadingStatus] = useState("loading");
|
|
29423
|
+
const fetchLegalEntity = useCallback(async () => {
|
|
29424
|
+
try {
|
|
29425
|
+
const [parentEntity, entity] = await Promise.all([parentLegalEntityId ? getLegalEntity2(parentLegalEntityId) : Promise.resolve(void 0), legalEntityId ? getLegalEntity2(legalEntityId) : Promise.resolve(void 0)]);
|
|
29426
|
+
setParentLegalEntity(parentEntity);
|
|
29427
|
+
setLegalEntity(entity);
|
|
29428
|
+
} catch (error) {
|
|
29429
|
+
logger$7.error(error);
|
|
29430
|
+
} finally {
|
|
29431
|
+
setLoadingStatus("success");
|
|
29432
|
+
}
|
|
29433
|
+
}, [parentLegalEntityId, legalEntityId, getLegalEntity2]);
|
|
29434
|
+
useEffect(() => {
|
|
29435
|
+
fetchLegalEntity().catch(logger$7.error);
|
|
29436
|
+
}, [fetchLegalEntity]);
|
|
29437
|
+
return loadingStatus === "loading" ? jsx(Loader, {
|
|
29438
|
+
size: "medium"
|
|
29439
|
+
}) : jsx(IndividualDropinComponent, {
|
|
29440
|
+
eventEmitter: eventEmitter ?? new EventEmitter(),
|
|
29441
|
+
parentLegalEntity,
|
|
29442
|
+
legalEntityResponse: legalEntity,
|
|
29443
|
+
handleGetDocument: getDocument2,
|
|
29444
|
+
handleCreateDocument: createDocument2,
|
|
29445
|
+
handleUpdateDocument: updateDocument2,
|
|
29446
|
+
handleUpdateLegalEntity: updateLegalEntity2,
|
|
29447
|
+
handleCreateLegalEntity: createLegalEntity2,
|
|
29448
|
+
handleBackClick,
|
|
29449
|
+
hideNavigation: true,
|
|
29450
|
+
onSubmit: onSubmitSuccess,
|
|
29451
|
+
taskType
|
|
29452
|
+
});
|
|
29453
|
+
}
|
|
29454
|
+
const logger$6 = createLogger("CreateTransferInstrumentComponent");
|
|
29455
|
+
function CreateTransferInstrumentComponent({
|
|
29456
|
+
legalEntityId,
|
|
29457
|
+
transferInstrumentId,
|
|
29458
|
+
onSubmitSuccess,
|
|
29459
|
+
handleBackClick,
|
|
29460
|
+
eventEmitter
|
|
29461
|
+
}) {
|
|
29462
|
+
const {
|
|
29463
|
+
getLegalEntity: getLegalEntity2,
|
|
29464
|
+
getTransferInstrument: getTransferInstrument2,
|
|
29465
|
+
getBankVerificationVendor: getBankVerificationVendor2,
|
|
29466
|
+
getDocument: getDocument2,
|
|
29467
|
+
createDocument: createDocument2,
|
|
29468
|
+
updateDocument: updateDocument2,
|
|
29469
|
+
createTransferInstrument: createTransferInstrument2,
|
|
29470
|
+
updateTransferInstrument: updateTransferInstrument2,
|
|
29471
|
+
createTrustedTransferInstrument: createTrustedTransferInstrument2,
|
|
29472
|
+
handleBankVerificationError: handleBankVerificationError2
|
|
29473
|
+
} = useComponentApi(legalEntityId);
|
|
29474
|
+
const [legalEntity, setLegalEntity] = useState();
|
|
29475
|
+
const [transferInstrument, setTransferInstrument] = useState();
|
|
29476
|
+
const [loadingStatus, setLoadingStatus] = useState("success");
|
|
29477
|
+
const fetchLegalEntity = useCallback(async () => {
|
|
29478
|
+
const le = await getLegalEntity2(legalEntityId);
|
|
29479
|
+
setLegalEntity(le);
|
|
29480
|
+
return le;
|
|
29481
|
+
}, [getLegalEntity2, legalEntityId]);
|
|
29482
|
+
useEffect(() => {
|
|
29483
|
+
(async () => {
|
|
29484
|
+
setLoadingStatus("loading");
|
|
29485
|
+
await fetchLegalEntity();
|
|
29486
|
+
if (transferInstrumentId) {
|
|
29487
|
+
const ti = await getTransferInstrument2(transferInstrumentId);
|
|
29488
|
+
setTransferInstrument(ti);
|
|
29489
|
+
}
|
|
29490
|
+
})().catch(logger$6.error).finally(() => {
|
|
29491
|
+
setLoadingStatus("success");
|
|
29492
|
+
});
|
|
29493
|
+
}, [transferInstrumentId, fetchLegalEntity, getTransferInstrument2]);
|
|
29494
|
+
return loadingStatus === "loading" || !legalEntity ? jsx(Loader, {
|
|
29495
|
+
size: "medium"
|
|
29496
|
+
}) : jsx(PayoutDetailsDropinComponent, {
|
|
29497
|
+
eventEmitter: eventEmitter ?? new EventEmitter(),
|
|
29498
|
+
transferInstrument,
|
|
29499
|
+
setTransferInstrument,
|
|
29500
|
+
legalEntityResponse: legalEntity,
|
|
29501
|
+
handleGetTransferInstrument: getTransferInstrument2,
|
|
29502
|
+
handleGetBankVerificationVendors: getBankVerificationVendor2,
|
|
29503
|
+
handleGetDocument: getDocument2,
|
|
29504
|
+
handleCreateDocument: createDocument2,
|
|
29505
|
+
handleUpdateDocument: updateDocument2,
|
|
29506
|
+
handleCreateTransferInstrument: createTransferInstrument2,
|
|
29507
|
+
handleUpdateTransferInstrument: updateTransferInstrument2,
|
|
29508
|
+
handleBackClick,
|
|
29509
|
+
hideNavigation: true,
|
|
29510
|
+
refreshLegalEntity: fetchLegalEntity,
|
|
29511
|
+
onSubmit: onSubmitSuccess,
|
|
29512
|
+
createTrustedTransferInstrument: createTrustedTransferInstrument2,
|
|
29513
|
+
handleBankVerificationError: handleBankVerificationError2,
|
|
29514
|
+
taskType: TaskTypes.PAYOUT
|
|
29515
|
+
});
|
|
29516
|
+
}
|
|
29517
|
+
const ManageTransferInstrumentComponent$1 = "";
|
|
29182
29518
|
const DEFAULT_POLLING_INTERVAL = 3e3;
|
|
29183
29519
|
const DEFAULT_POLLING_INTERVAL_RETRY_COUNT = 3;
|
|
29184
29520
|
function useInterval(callback, initialDelay = DEFAULT_POLLING_INTERVAL) {
|
|
@@ -29352,7 +29688,7 @@ function ManageTransferInstrumentOverviewItem({
|
|
|
29352
29688
|
})]
|
|
29353
29689
|
}, transferInstrumentReference.transferInstrument.id);
|
|
29354
29690
|
}
|
|
29355
|
-
const logger$
|
|
29691
|
+
const logger$5 = createLogger("ManageTransferInstrumentOverview");
|
|
29356
29692
|
function ManageTransferInstrumentOverview({
|
|
29357
29693
|
transferInstrumentReferences,
|
|
29358
29694
|
onAdd,
|
|
@@ -29377,7 +29713,7 @@ function ManageTransferInstrumentOverview({
|
|
|
29377
29713
|
...transferInstrumentsMap
|
|
29378
29714
|
});
|
|
29379
29715
|
} catch (e) {
|
|
29380
|
-
logger$
|
|
29716
|
+
logger$5.error(e);
|
|
29381
29717
|
}
|
|
29382
29718
|
};
|
|
29383
29719
|
const onRemoveTransferinstrument = async (transferInstrumentId) => {
|
|
@@ -29385,7 +29721,7 @@ function ManageTransferInstrumentOverview({
|
|
|
29385
29721
|
await deleteTransferInstrument2(transferInstrumentId);
|
|
29386
29722
|
onRemove(transferInstrumentId);
|
|
29387
29723
|
} catch (e) {
|
|
29388
|
-
logger$
|
|
29724
|
+
logger$5.error(e);
|
|
29389
29725
|
}
|
|
29390
29726
|
};
|
|
29391
29727
|
const transferInstrumentListEle = transferInstrumentReferences.map((transferInstrumentRef) => jsx(ManageTransferInstrumentOverviewItem, {
|
|
@@ -29410,7 +29746,7 @@ function ManageTransferInstrumentOverview({
|
|
|
29410
29746
|
})]
|
|
29411
29747
|
});
|
|
29412
29748
|
}
|
|
29413
|
-
const logger$
|
|
29749
|
+
const logger$4 = createLogger("ManageTransferInstrumentComponent");
|
|
29414
29750
|
function ManageTransferInstrumentComponent({
|
|
29415
29751
|
legalEntityId,
|
|
29416
29752
|
onAdd,
|
|
@@ -29446,7 +29782,7 @@ function ManageTransferInstrumentComponent({
|
|
|
29446
29782
|
}, [getTransferInstruments2, getLegalEntity2, i18n, legalEntityId]);
|
|
29447
29783
|
useEffect(() => {
|
|
29448
29784
|
eventEmitter == null ? void 0 : eventEmitter.on("updateLocale", (locale) => setLocale(locale));
|
|
29449
|
-
init2().catch(logger$
|
|
29785
|
+
init2().catch(logger$4.error).finally(() => {
|
|
29450
29786
|
setLoadingStatus("success");
|
|
29451
29787
|
});
|
|
29452
29788
|
}, [init2, setLocale, eventEmitter]);
|
|
@@ -29456,7 +29792,7 @@ function ManageTransferInstrumentComponent({
|
|
|
29456
29792
|
}
|
|
29457
29793
|
}, [hasOnlyVerifiedTransferInstruments, timeoutId, transferInstruments]);
|
|
29458
29794
|
const onRemove = (transferInstrumentId) => {
|
|
29459
|
-
refreshTransferInstruments().catch(logger$
|
|
29795
|
+
refreshTransferInstruments().catch(logger$4.error);
|
|
29460
29796
|
onRemoveSuccess == null ? void 0 : onRemoveSuccess(transferInstrumentId, legalEntityId);
|
|
29461
29797
|
};
|
|
29462
29798
|
const render2 = () => {
|
|
@@ -29484,90 +29820,6 @@ function ManageTransferInstrumentComponent({
|
|
|
29484
29820
|
children: render2()
|
|
29485
29821
|
});
|
|
29486
29822
|
}
|
|
29487
|
-
class EventEmitter {
|
|
29488
|
-
constructor() {
|
|
29489
|
-
this.listeners = {
|
|
29490
|
-
next: [],
|
|
29491
|
-
back: [],
|
|
29492
|
-
validate: [],
|
|
29493
|
-
updateLocale: []
|
|
29494
|
-
};
|
|
29495
|
-
this.on = (eventName, listener) => {
|
|
29496
|
-
this.listeners[eventName].push(listener);
|
|
29497
|
-
};
|
|
29498
|
-
this.off = (eventName, toRemove) => {
|
|
29499
|
-
this.listeners[eventName] = this.listeners[eventName].filter((listener) => listener !== toRemove);
|
|
29500
|
-
};
|
|
29501
|
-
this.emit = (eventName, ...data) => {
|
|
29502
|
-
this.listeners[eventName].forEach((listener) => listener(data[0]));
|
|
29503
|
-
};
|
|
29504
|
-
}
|
|
29505
|
-
}
|
|
29506
|
-
const logger$4 = createLogger("TransferInstrumentComponent");
|
|
29507
|
-
function TransferInstrumentComponent({
|
|
29508
|
-
legalEntityId,
|
|
29509
|
-
transferInstrumentId,
|
|
29510
|
-
onChange,
|
|
29511
|
-
onSubmit,
|
|
29512
|
-
handleBackClick,
|
|
29513
|
-
eventEmitter
|
|
29514
|
-
}) {
|
|
29515
|
-
const {
|
|
29516
|
-
getLegalEntity: getLegalEntity2,
|
|
29517
|
-
getTransferInstrument: getTransferInstrument2,
|
|
29518
|
-
getBankVerificationVendor: getBankVerificationVendor2,
|
|
29519
|
-
getDocument: getDocument2,
|
|
29520
|
-
createDocument: createDocument2,
|
|
29521
|
-
updateDocument: updateDocument2,
|
|
29522
|
-
createTransferInstrument: createTransferInstrument2,
|
|
29523
|
-
updateTransferInstrument: updateTransferInstrument2,
|
|
29524
|
-
createTrustedTransferInstrument: createTrustedTransferInstrument2,
|
|
29525
|
-
handleBankVerificationError: handleBankVerificationError2
|
|
29526
|
-
} = useComponentApi(legalEntityId);
|
|
29527
|
-
const [legalEntity, setLegalEntity] = useState();
|
|
29528
|
-
const [transferInstrument, setTransferInstrument] = useState();
|
|
29529
|
-
const [loadingStatus, setLoadingStatus] = useState("success");
|
|
29530
|
-
const fetchLegalEntity = useCallback(async () => {
|
|
29531
|
-
const le = await getLegalEntity2(legalEntityId);
|
|
29532
|
-
setLegalEntity(le);
|
|
29533
|
-
return le;
|
|
29534
|
-
}, [getLegalEntity2, legalEntityId]);
|
|
29535
|
-
useEffect(() => {
|
|
29536
|
-
(async () => {
|
|
29537
|
-
setLoadingStatus("loading");
|
|
29538
|
-
await fetchLegalEntity();
|
|
29539
|
-
if (transferInstrumentId) {
|
|
29540
|
-
const ti = await getTransferInstrument2(transferInstrumentId);
|
|
29541
|
-
setTransferInstrument(ti);
|
|
29542
|
-
}
|
|
29543
|
-
})().catch(logger$4.error).finally(() => {
|
|
29544
|
-
setLoadingStatus("success");
|
|
29545
|
-
});
|
|
29546
|
-
}, [transferInstrumentId, fetchLegalEntity, getTransferInstrument2]);
|
|
29547
|
-
return loadingStatus === "loading" || !legalEntity ? jsx(Loader, {
|
|
29548
|
-
size: "medium"
|
|
29549
|
-
}) : jsx(PayoutDetailsDropinComponent, {
|
|
29550
|
-
eventEmitter: eventEmitter ?? new EventEmitter(),
|
|
29551
|
-
transferInstrument,
|
|
29552
|
-
setTransferInstrument,
|
|
29553
|
-
legalEntityResponse: legalEntity,
|
|
29554
|
-
handleGetTransferInstrument: getTransferInstrument2,
|
|
29555
|
-
handleGetBankVerificationVendors: getBankVerificationVendor2,
|
|
29556
|
-
handleGetDocument: getDocument2,
|
|
29557
|
-
handleCreateDocument: createDocument2,
|
|
29558
|
-
handleUpdateDocument: updateDocument2,
|
|
29559
|
-
handleCreateTransferInstrument: createTransferInstrument2,
|
|
29560
|
-
handleUpdateTransferInstrument: updateTransferInstrument2,
|
|
29561
|
-
handleBackClick,
|
|
29562
|
-
hideNavigation: true,
|
|
29563
|
-
refreshLegalEntity: fetchLegalEntity,
|
|
29564
|
-
onChange,
|
|
29565
|
-
onSubmit,
|
|
29566
|
-
createTrustedTransferInstrument: createTrustedTransferInstrument2,
|
|
29567
|
-
handleBankVerificationError: handleBankVerificationError2,
|
|
29568
|
-
taskType: TaskTypes.PAYOUT
|
|
29569
|
-
});
|
|
29570
|
-
}
|
|
29571
29823
|
const componentsMap = {
|
|
29572
29824
|
individualDropin: IndividualDropinComponent,
|
|
29573
29825
|
companyDropin: CompanyDropinComponent,
|
|
@@ -29576,7 +29828,8 @@ const componentsMap = {
|
|
|
29576
29828
|
trustDropin: TrustDropinComponent,
|
|
29577
29829
|
soleProprietorDropin: SolePropDropinComponent,
|
|
29578
29830
|
pci: PciDropinComponent,
|
|
29579
|
-
|
|
29831
|
+
createTransferInstrumentComponent: CreateTransferInstrumentComponent,
|
|
29832
|
+
createIndividualComponent: CreateIndividualComponent,
|
|
29580
29833
|
manageTransferInstrumentComponent: ManageTransferInstrumentComponent
|
|
29581
29834
|
};
|
|
29582
29835
|
const AuthProvider = ({
|
|
@@ -29668,7 +29921,7 @@ const getEmbeddedApi = ({
|
|
|
29668
29921
|
const [scenarios, tasks] = await Promise.all([getScenarios(baseRequestContext), getTasks(baseRequestContext)]);
|
|
29669
29922
|
return {
|
|
29670
29923
|
matchingScenario: {
|
|
29671
|
-
|
|
29924
|
+
...scenarios
|
|
29672
29925
|
},
|
|
29673
29926
|
taskList: tasks
|
|
29674
29927
|
};
|
|
@@ -30159,6 +30412,10 @@ const I18nProvider = ({
|
|
|
30159
30412
|
const settingsDefaults = {
|
|
30160
30413
|
changeLegalEntityType: true,
|
|
30161
30414
|
editPrefilledCountry: true,
|
|
30415
|
+
hideOnboardingIntroductionIndividual: true,
|
|
30416
|
+
hideOnboardingIntroductionOrganization: true,
|
|
30417
|
+
hideOnboardingIntroductionTrust: true,
|
|
30418
|
+
hideOnboardingIntroductionSoleProprietor: true,
|
|
30162
30419
|
viewOnboardingGuidance: false
|
|
30163
30420
|
};
|
|
30164
30421
|
function SettingsContextProvider({
|
|
@@ -30810,11 +31067,8 @@ const pciDropinSchema = {
|
|
|
30810
31067
|
}
|
|
30811
31068
|
}
|
|
30812
31069
|
};
|
|
30813
|
-
const
|
|
30814
|
-
|
|
30815
|
-
type: "function"
|
|
30816
|
-
},
|
|
30817
|
-
onSubmit: {
|
|
31070
|
+
const createTransferInstrumentComponentSchema = {
|
|
31071
|
+
onSubmitSuccess: {
|
|
30818
31072
|
type: "function"
|
|
30819
31073
|
},
|
|
30820
31074
|
legalEntityId: {
|
|
@@ -30837,6 +31091,23 @@ const manageTransferInstrumentComponentSchema = {
|
|
|
30837
31091
|
required: true
|
|
30838
31092
|
}
|
|
30839
31093
|
};
|
|
31094
|
+
const createIndividualComponentSchema = {
|
|
31095
|
+
onSubmitSuccess: {
|
|
31096
|
+
type: "function"
|
|
31097
|
+
},
|
|
31098
|
+
legalEntityId: {
|
|
31099
|
+
type: "string"
|
|
31100
|
+
},
|
|
31101
|
+
parentLegalEntityId: {
|
|
31102
|
+
type: "string"
|
|
31103
|
+
},
|
|
31104
|
+
taskType: {
|
|
31105
|
+
type: "string"
|
|
31106
|
+
},
|
|
31107
|
+
handleBackClick: {
|
|
31108
|
+
type: "function"
|
|
31109
|
+
}
|
|
31110
|
+
};
|
|
30840
31111
|
const componentsSchemaMap = {
|
|
30841
31112
|
payoutAccount: payoutAccountSchema,
|
|
30842
31113
|
soleProprietorDropin: solePropDropinSchema,
|
|
@@ -30845,8 +31116,9 @@ const componentsSchemaMap = {
|
|
|
30845
31116
|
individualDropin: individualDropinSchema,
|
|
30846
31117
|
trustDropin: trustDropinSchema,
|
|
30847
31118
|
taskList: taskListSchema,
|
|
30848
|
-
|
|
30849
|
-
|
|
31119
|
+
manageTransferInstrumentComponent: manageTransferInstrumentComponentSchema,
|
|
31120
|
+
createIndividualComponent: createIndividualComponentSchema,
|
|
31121
|
+
createTransferInstrumentComponent: createTransferInstrumentComponentSchema
|
|
30850
31122
|
};
|
|
30851
31123
|
const validateComponentName = (componentName) => {
|
|
30852
31124
|
if (!componentName) {
|