@adyen/kyc-components 2.62.1 → 2.63.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -45,6 +45,15 @@ class UserEvents {
45
45
  this.add({ type: "add_event", name: eventName, properties: { ...completeEvent } });
46
46
  this.notifySubscribers();
47
47
  }
48
+ /**
49
+ * Adds an event with context specific to task-related events
50
+ */
51
+ addTaskEvent(eventName, properties) {
52
+ this.addEvent(eventName, {
53
+ actionLevel: "task",
54
+ ...properties
55
+ });
56
+ }
48
57
  /**
49
58
  * Adds an event with context specific to page-related events
50
59
  */
@@ -105,11 +114,9 @@ class UserEvents {
105
114
  }
106
115
  const userEvents = new UserEvents();
107
116
  const getAssociatedLeAnalyticsPayload = ({
108
- task,
109
117
  associatedLegalEntity,
110
118
  associatedLegalEntityOrg
111
119
  }) => ({
112
- task,
113
120
  ...associatedLegalEntity ? {
114
121
  associatedLegalEntityId: associatedLegalEntity == null ? void 0 : associatedLegalEntity.id,
115
122
  associatedLegalEntityType: associatedLegalEntity == null ? void 0 : associatedLegalEntity.type
@@ -1083,7 +1090,7 @@ const defaultTrans = {
1083
1090
  objectOfCharitableTrust: "Object of charitable trust",
1084
1091
  objectOfTrust: "Object of trust",
1085
1092
  obligatory: "Obligatory",
1086
- officialEmailOrALetterFromYourBank: "Official email or a letter from your bank",
1093
+ aLetterFromYourBank: "A letter from your bank",
1087
1094
  oib: "OIB",
1088
1095
  onOnlineBankingEnvironment: "Or web version of online banking environment",
1089
1096
  onboardingRedirectAwaitingCtaButton: "Continue",
@@ -5664,7 +5671,7 @@ const businessRegistrationNumberMasks = {
5664
5671
  },
5665
5672
  [CountryCodes.Luxembourg]: {
5666
5673
  default: {
5667
- mask: makeMask(...alphaInputs(1), ...numericInputs(9, true)),
5674
+ mask: makeMask(...alphaInputs(1), ...numericInputs(5), ...numericInputs(2, true)),
5668
5675
  transformOnType: uppercase
5669
5676
  }
5670
5677
  },
@@ -6448,7 +6455,7 @@ const businessRegistrationNumberPatterns = {
6448
6455
  [CountryCodes.Latvia]: { default: /^\d{11}$/ },
6449
6456
  [CountryCodes.Liechtenstein]: { default: /FL-[0-9]{4}[.][0-9]{3}[.][0-9]{3}-[0-9]$/ },
6450
6457
  [CountryCodes.Lithuania]: { default: /^\d{6,9}$/ },
6451
- [CountryCodes.Luxembourg]: { default: /^[a-zA-Z]\d{1,9}$/ },
6458
+ [CountryCodes.Luxembourg]: { default: /^[a-zA-Z]\d{5,7}$/ },
6452
6459
  [CountryCodes.Malaysia]: { default: /^[A-Za-z0-9]{7,8}$|^[A-Za-z0-9]{12}$/ },
6453
6460
  [CountryCodes.Malta]: { default: /^C\s?\d{4,6}$/ },
6454
6461
  [CountryCodes.Monaco]: {
@@ -6994,8 +7001,10 @@ const defaultFieldConfig$9 = {
6994
7001
  businessRegistrationNumberPatterns[CountryCodes.Luxembourg].default
6995
7002
  ),
6996
7003
  guidanceText: {
6997
- key: "enter1LetterAndThenNDigitsForExample",
7004
+ key: "enter1LetterAndThenXToYDigitsForExample",
6998
7005
  values: {
7006
+ minDigits: "5",
7007
+ maxDigits: "7",
6999
7008
  example: "C127766"
7000
7009
  }
7001
7010
  }
@@ -8161,22 +8170,19 @@ function BusinessRegistrationNumberField({
8161
8170
  ] });
8162
8171
  }
8163
8172
  function ContextGuidance({
8164
- page,
8165
8173
  title,
8166
8174
  content,
8167
8175
  titleId,
8168
8176
  contentId,
8169
- baseTrackingPayload
8177
+ trackingParams
8170
8178
  }) {
8171
8179
  const onGuidanceToggle = (status) => {
8172
- userEvents.addEvent("Clicked accordion", {
8173
- ...baseTrackingPayload,
8180
+ userEvents.addFieldEvent("Clicked accordion", {
8174
8181
  actionType: status,
8175
- actionLevel: "field",
8176
8182
  field: "context guidance",
8177
- page,
8178
8183
  label: titleId,
8179
- content: contentId
8184
+ content: contentId,
8185
+ ...trackingParams
8180
8186
  });
8181
8187
  };
8182
8188
  return /* @__PURE__ */ jsx(Alert, { title, type: "collapsible", variant: "info", onToggle: onGuidanceToggle, children: content });
@@ -10082,46 +10088,6 @@ function VatNumberField({
10082
10088
  )
10083
10089
  ] });
10084
10090
  }
10085
- var TaskTypes = /* @__PURE__ */ ((TaskTypes2) => {
10086
- TaskTypes2["BUSINESS_TYPE_SELECTION"] = "BUSINESS_TYPE_SELECTION";
10087
- TaskTypes2["INTRODUCTION"] = "INTRODUCTION";
10088
- TaskTypes2["TASKS_OVERVIEW"] = "TASKS_OVERVIEW";
10089
- TaskTypes2["REVIEW"] = "REVIEW";
10090
- TaskTypes2["INDIVIDUAL"] = "INDIVIDUAL";
10091
- TaskTypes2["COMPANY"] = "COMPANY";
10092
- TaskTypes2["BUSINESS_DETAILS"] = "BUSINESS_DETAILS";
10093
- TaskTypes2["PAYOUT"] = "PAYOUT";
10094
- TaskTypes2["PAYIN"] = "PAYIN";
10095
- TaskTypes2["SERVICE_AGREEMENT"] = "SERVICE_AGREEMENT";
10096
- TaskTypes2["PCI_DSS"] = "PCI_DSS";
10097
- TaskTypes2["DECISION_MAKER"] = "DECISION_MAKER";
10098
- TaskTypes2["DECISION_MAKER_OVERVIEW"] = "DECISION_MAKER_OVERVIEW";
10099
- TaskTypes2["TRUST"] = "TRUST";
10100
- TaskTypes2["TRUST_MEMBER_OVERVIEW"] = "TRUST_MEMBER";
10101
- TaskTypes2["TRUST_MEMBER_INDIVIDUAL"] = "TRUST_MEMBER_INDIVIDUAL";
10102
- TaskTypes2["TRUST_MEMBER_COMPANY"] = "TRUST_MEMBER_COMPANY";
10103
- TaskTypes2["TRUST_MEMBER_ROLE_AND_TYPE"] = "TRUST_MEMBER_ROLE_AND_TYPE";
10104
- TaskTypes2["TRUST_MEMBER_COMPANY_OWNER"] = "TRUST_MEMBER_COMPANY_OWNER";
10105
- TaskTypes2["SOLE_PROPRIETOR_COMPANY"] = "SOLE_PROPRIETOR_COMPANY";
10106
- TaskTypes2["LEGAL_ENTITY_TYPE_SWITCHER"] = "LEGAL_ENTITY_TYPE_SWITCHER";
10107
- TaskTypes2["CAPABILITY_REJECTED"] = "CAPABILITY_REJECTED";
10108
- TaskTypes2["SINGPASS_SELECTION"] = "SINGPASS_SELECTION";
10109
- TaskTypes2["LEGAL_REPRESENTATIVE_DETAILS"] = "LEGAL_REPRESENTATIVE_DETAILS";
10110
- return TaskTypes2;
10111
- })(TaskTypes || {});
10112
- var TaskStatus = /* @__PURE__ */ ((TaskStatus2) => {
10113
- TaskStatus2[TaskStatus2["EMPTY"] = 0] = "EMPTY";
10114
- TaskStatus2[TaskStatus2["FINISHED"] = 1] = "FINISHED";
10115
- TaskStatus2[TaskStatus2["PROCESSING"] = 2] = "PROCESSING";
10116
- TaskStatus2[TaskStatus2["DETAILS_REQUIRED"] = 3] = "DETAILS_REQUIRED";
10117
- TaskStatus2[TaskStatus2["SIGN"] = 4] = "SIGN";
10118
- TaskStatus2[TaskStatus2["DOWNLOAD"] = 5] = "DOWNLOAD";
10119
- TaskStatus2[TaskStatus2["ERROR"] = 6] = "ERROR";
10120
- TaskStatus2[TaskStatus2["SIGNED"] = 7] = "SIGNED";
10121
- TaskStatus2[TaskStatus2["SUBMIT"] = 8] = "SUBMIT";
10122
- TaskStatus2[TaskStatus2["REMOVING"] = 9] = "REMOVING";
10123
- return TaskStatus2;
10124
- })(TaskStatus || {});
10125
10091
  const FLOWS_THAT_HIDE_REGISTRATION_NUMBER = [
10126
10092
  { companyType: [CompanyTypesValue.SOLE_PROPRIETORSHIP], country: CountryCodes.Gibraltar },
10127
10093
  { companyType: [CompanyTypesValue.SOLE_PROPRIETORSHIP], country: CountryCodes.Guernsey },
@@ -10308,12 +10274,10 @@ function CompanyRegistrationDetailsComponent(props) {
10308
10274
  /* @__PURE__ */ jsx(
10309
10275
  ContextGuidance,
10310
10276
  {
10311
- page: "Company registration details",
10312
10277
  title: i18n.get("whyDoINeedToFillInThisInformation"),
10313
10278
  content: i18n.get("reasonForFillingCompanyRegistrationDetails"),
10314
10279
  titleId: "whyDoINeedToFillInThisInformation",
10315
- contentId: "reasonForFillingCompanyRegistrationDetails",
10316
- baseTrackingPayload: { task: TaskTypes.COMPANY }
10280
+ contentId: "reasonForFillingCompanyRegistrationDetails"
10317
10281
  }
10318
10282
  ),
10319
10283
  /* @__PURE__ */ jsxs("fieldset", { form: COMPANY_REGISTRATION_DETAILS, children: [
@@ -13529,8 +13493,7 @@ function RegistrationAddressComponent(props) {
13529
13493
  handleFindAddress,
13530
13494
  country,
13531
13495
  data,
13532
- validators: validators2,
13533
- baseTrackingPayload
13496
+ validators: validators2
13534
13497
  } = props;
13535
13498
  const {
13536
13499
  requiredFields: registrationAddressRequiredFields,
@@ -13616,12 +13579,10 @@ function RegistrationAddressComponent(props) {
13616
13579
  /* @__PURE__ */ jsx(
13617
13580
  ContextGuidance,
13618
13581
  {
13619
- page: "Company registered address",
13620
13582
  titleId: "whyDoINeedToFillInThisInformation",
13621
13583
  contentId: "reasonForFillingCompanyAddressDetails",
13622
13584
  title: i18n.get("whyDoINeedToFillInThisInformation"),
13623
- content: i18n.get("reasonForFillingCompanyAddressDetails"),
13624
- baseTrackingPayload
13585
+ content: i18n.get("reasonForFillingCompanyAddressDetails")
13625
13586
  }
13626
13587
  ),
13627
13588
  /* @__PURE__ */ jsx(
@@ -14047,8 +14008,7 @@ function CompanyComponent(props) {
14047
14008
  country: props.country,
14048
14009
  problems: props.problems,
14049
14010
  handleAddressSearch: props.handleAddressSearch,
14050
- handleFindAddress: props.handleFindAddress,
14051
- baseTrackingPayload: { task: TaskTypes.COMPANY }
14011
+ handleFindAddress: props.handleFindAddress
14052
14012
  }
14053
14013
  )
14054
14014
  }
@@ -14280,6 +14240,46 @@ const fileToBase64 = (file) => new Promise((resolve, reject) => {
14280
14240
  reader.onerror = (error) => reject(error);
14281
14241
  });
14282
14242
  const getFileExtention = (fileName) => fileName.split(".").pop();
14243
+ var TaskTypes = /* @__PURE__ */ ((TaskTypes2) => {
14244
+ TaskTypes2["BUSINESS_TYPE_SELECTION"] = "BUSINESS_TYPE_SELECTION";
14245
+ TaskTypes2["INTRODUCTION"] = "INTRODUCTION";
14246
+ TaskTypes2["TASKS_OVERVIEW"] = "TASKS_OVERVIEW";
14247
+ TaskTypes2["REVIEW"] = "REVIEW";
14248
+ TaskTypes2["INDIVIDUAL"] = "INDIVIDUAL";
14249
+ TaskTypes2["COMPANY"] = "COMPANY";
14250
+ TaskTypes2["BUSINESS_DETAILS"] = "BUSINESS_DETAILS";
14251
+ TaskTypes2["PAYOUT"] = "PAYOUT";
14252
+ TaskTypes2["PAYIN"] = "PAYIN";
14253
+ TaskTypes2["SERVICE_AGREEMENT"] = "SERVICE_AGREEMENT";
14254
+ TaskTypes2["PCI_DSS"] = "PCI_DSS";
14255
+ TaskTypes2["DECISION_MAKER"] = "DECISION_MAKER";
14256
+ TaskTypes2["DECISION_MAKER_OVERVIEW"] = "DECISION_MAKER_OVERVIEW";
14257
+ TaskTypes2["TRUST"] = "TRUST";
14258
+ TaskTypes2["TRUST_MEMBER_OVERVIEW"] = "TRUST_MEMBER";
14259
+ TaskTypes2["TRUST_MEMBER_INDIVIDUAL"] = "TRUST_MEMBER_INDIVIDUAL";
14260
+ TaskTypes2["TRUST_MEMBER_COMPANY"] = "TRUST_MEMBER_COMPANY";
14261
+ TaskTypes2["TRUST_MEMBER_ROLE_AND_TYPE"] = "TRUST_MEMBER_ROLE_AND_TYPE";
14262
+ TaskTypes2["TRUST_MEMBER_COMPANY_OWNER"] = "TRUST_MEMBER_COMPANY_OWNER";
14263
+ TaskTypes2["SOLE_PROPRIETOR_COMPANY"] = "SOLE_PROPRIETOR_COMPANY";
14264
+ TaskTypes2["LEGAL_ENTITY_TYPE_SWITCHER"] = "LEGAL_ENTITY_TYPE_SWITCHER";
14265
+ TaskTypes2["CAPABILITY_REJECTED"] = "CAPABILITY_REJECTED";
14266
+ TaskTypes2["SINGPASS_SELECTION"] = "SINGPASS_SELECTION";
14267
+ TaskTypes2["LEGAL_REPRESENTATIVE_DETAILS"] = "LEGAL_REPRESENTATIVE_DETAILS";
14268
+ return TaskTypes2;
14269
+ })(TaskTypes || {});
14270
+ var TaskStatus = /* @__PURE__ */ ((TaskStatus2) => {
14271
+ TaskStatus2[TaskStatus2["EMPTY"] = 0] = "EMPTY";
14272
+ TaskStatus2[TaskStatus2["FINISHED"] = 1] = "FINISHED";
14273
+ TaskStatus2[TaskStatus2["PROCESSING"] = 2] = "PROCESSING";
14274
+ TaskStatus2[TaskStatus2["DETAILS_REQUIRED"] = 3] = "DETAILS_REQUIRED";
14275
+ TaskStatus2[TaskStatus2["SIGN"] = 4] = "SIGN";
14276
+ TaskStatus2[TaskStatus2["DOWNLOAD"] = 5] = "DOWNLOAD";
14277
+ TaskStatus2[TaskStatus2["ERROR"] = 6] = "ERROR";
14278
+ TaskStatus2[TaskStatus2["SIGNED"] = 7] = "SIGNED";
14279
+ TaskStatus2[TaskStatus2["SUBMIT"] = 8] = "SUBMIT";
14280
+ TaskStatus2[TaskStatus2["REMOVING"] = 9] = "REMOVING";
14281
+ return TaskStatus2;
14282
+ })(TaskStatus || {});
14283
14283
  const COUNTRIES_THAT_DONT_REQUIRE_SOLE_PROP_REGISTRATION = [
14284
14284
  CountryCodes.Australia,
14285
14285
  CountryCodes.Gibraltar,
@@ -15991,7 +15991,6 @@ function IdVerificationMethodComponent(props) {
15991
15991
  /* @__PURE__ */ jsx(
15992
15992
  ContextGuidance,
15993
15993
  {
15994
- page: "Instant verification with Onfido",
15995
15994
  title: i18n.get("howVerificationWithOnfidoWork"),
15996
15995
  content: /* @__PURE__ */ jsxs(Fragment, { children: [
15997
15996
  /* @__PURE__ */ jsx(Typography, { className: "adyen-kyc-u-margin-bottom-8", children: i18n.get("onfidoIsOurTrustedPartner") }),
@@ -16004,8 +16003,7 @@ function IdVerificationMethodComponent(props) {
16004
16003
  /* @__PURE__ */ jsx(Link, { href: "https://www.adyen.com/policies-and-disclaimer/privacy-policy", external: true, children: i18n.get("learnMore") })
16005
16004
  ] }),
16006
16005
  titleId: "howVerificationWithOnfidoWork",
16007
- contentId: "howVerificationWithOnfidoWorkContent",
16008
- baseTrackingPayload: { task: TaskTypes.INDIVIDUAL }
16006
+ contentId: "howVerificationWithOnfidoWorkContent"
16009
16007
  }
16010
16008
  ),
16011
16009
  (countryOfResidence === CountryCodes.PuertoRico || countryOfResidence === CountryCodes.UnitedStates) && data.idVerificationMethod === "instantVerification" && /* @__PURE__ */ jsx(
@@ -17609,8 +17607,7 @@ const DriversLicense$1 = ({
17609
17607
  formUtils,
17610
17608
  isValid,
17611
17609
  errorMessages,
17612
- shouldValidate,
17613
- baseTrackingPayload
17610
+ shouldValidate
17614
17611
  }) => {
17615
17612
  const { i18n } = useI18nContext();
17616
17613
  const { dataset: auStates } = useDataset(datasetIdentifier.state("AU"));
@@ -17682,7 +17679,6 @@ const DriversLicense$1 = ({
17682
17679
  /* @__PURE__ */ jsx(
17683
17680
  ContextGuidance,
17684
17681
  {
17685
- page: "Personal details",
17686
17682
  title: i18n.get("whereCanIFindTheseNumbersOnMyDriversLicense"),
17687
17683
  content: /* @__PURE__ */ jsxs(Fragment, { children: [
17688
17684
  i18n.get("whereToFindNumbersOnDriversLicense"),
@@ -17690,8 +17686,7 @@ const DriversLicense$1 = ({
17690
17686
  /* @__PURE__ */ jsx(Link, { href: "https://www.usi.gov.au/about/forms-id/drivers-licence", children: i18n.get("iStillCantFindIt") })
17691
17687
  ] }),
17692
17688
  titleId: "whereCanIFindTheseNumbersOnMyDriversLicense",
17693
- contentId: "whereToFindNumbersOnDriversLicense",
17694
- baseTrackingPayload
17689
+ contentId: "whereToFindNumbersOnDriversLicense"
17695
17690
  }
17696
17691
  )
17697
17692
  ] });
@@ -17827,8 +17822,7 @@ function IdentityAuComponent({
17827
17822
  ),
17828
17823
  issuerState: formUtils.getErrorMessage("issuerState", errors, fieldProblems)
17829
17824
  },
17830
- shouldValidate,
17831
- baseTrackingPayload: { task: TaskTypes.INDIVIDUAL }
17825
+ shouldValidate
17832
17826
  }
17833
17827
  ) : void 0
17834
17828
  ] });
@@ -17945,8 +17939,7 @@ const DriversLicense = ({
17945
17939
  formUtils,
17946
17940
  isValid,
17947
17941
  errorMessages,
17948
- shouldValidate,
17949
- baseTrackingPayload
17942
+ shouldValidate
17950
17943
  }) => {
17951
17944
  const { i18n } = useI18nContext();
17952
17945
  return /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -17997,7 +17990,6 @@ const DriversLicense = ({
17997
17990
  /* @__PURE__ */ jsx(
17998
17991
  ContextGuidance,
17999
17992
  {
18000
- page: "Personal details",
18001
17993
  title: i18n.get("whereCanIFindTheseNumbersOnMyDriversLicense"),
18002
17994
  content: /* @__PURE__ */ jsxs(Fragment, { children: [
18003
17995
  i18n.get("whereToFindNumbersOnDriversLicense__NZ"),
@@ -18005,8 +17997,7 @@ const DriversLicense = ({
18005
17997
  /* @__PURE__ */ jsx(Link, { href: "https://www.nzta.govt.nz/driver-licences/getting-a-licence/your-driver-licence-explained/", children: i18n.get("iStillCantFindIt") })
18006
17998
  ] }),
18007
17999
  titleId: "whereCanIFindTheseNumbersOnMyDriversLicense",
18008
- contentId: "whereToFindNumbersOnDriversLicense",
18009
- baseTrackingPayload
18000
+ contentId: "whereToFindNumbersOnDriversLicense"
18010
18001
  }
18011
18002
  )
18012
18003
  ] });
@@ -18170,8 +18161,7 @@ function IdentityNZComponent({
18170
18161
  fieldProblems
18171
18162
  )
18172
18163
  },
18173
- shouldValidate,
18174
- baseTrackingPayload: { task: TaskTypes.INDIVIDUAL }
18164
+ shouldValidate
18175
18165
  }
18176
18166
  ) : void 0
18177
18167
  ] });
@@ -18394,10 +18384,6 @@ function PersonalDetailsComponent(props) {
18394
18384
  }
18395
18385
  };
18396
18386
  const alertProps = getAlertProps();
18397
- const baseTrackingPayload = getAssociatedLeAnalyticsPayload({
18398
- task: props.taskType,
18399
- ...isDecisionMakerTask ? { associatedLegalEntity: props.parentLegalEntity } : {}
18400
- });
18401
18387
  return /* @__PURE__ */ jsxs(LoaderWrapper, { status, formOpacityWhenLoading: 0.3, loaderSize: "large", children: [
18402
18388
  /* @__PURE__ */ jsx(StateContextSetter, { owner: PERSONAL_DETAILS, stateRef }),
18403
18389
  /* @__PURE__ */ jsx(StateContextWatcher, { owner: PERSONAL_DETAILS, onChange: handleStateChange }),
@@ -18429,12 +18415,10 @@ function PersonalDetailsComponent(props) {
18429
18415
  /* @__PURE__ */ jsx(
18430
18416
  ContextGuidance,
18431
18417
  {
18432
- page: "Personal details",
18433
18418
  title: i18n.get("whyDoINeedToFillInThisInformation"),
18434
18419
  content: i18n.get("reasonForFillingIndividualPersonalDetails"),
18435
18420
  titleId: "whyDoINeedToFillInThisInformation",
18436
- contentId: "reasonForFillingIndividualPersonalDetails",
18437
- baseTrackingPayload
18421
+ contentId: "reasonForFillingIndividualPersonalDetails"
18438
18422
  }
18439
18423
  ),
18440
18424
  isDecisionMakerTask && props.trustedFieldsProvider === TrustedFieldsProvider.SINGPASS && props.readOnlyFields && /* @__PURE__ */ jsx(Typography, { color: "secondary", variant: "caption", children: i18n.get(
@@ -18942,12 +18926,10 @@ function IndividualComponent(props) {
18942
18926
  /* @__PURE__ */ jsx(
18943
18927
  ContextGuidance,
18944
18928
  {
18945
- page: "Personal address",
18946
18929
  title: i18n.get("whyDoINeedToFillInThisInformation"),
18947
18930
  content: i18n.get("reasonForFillingIndividualAddressDetails"),
18948
18931
  titleId: "whyDoINeedToFillInThisInformation",
18949
- contentId: "reasonForFillingIndividualAddressDetails",
18950
- baseTrackingPayload: { task: taskType }
18932
+ contentId: "reasonForFillingIndividualAddressDetails"
18951
18933
  }
18952
18934
  ),
18953
18935
  /* @__PURE__ */ jsx(
@@ -19257,7 +19239,7 @@ var BankDocumentTypes = /* @__PURE__ */ ((BankDocumentTypes2) => {
19257
19239
  BankDocumentTypes2["BANK_STATEMENT"] = "bankStatement";
19258
19240
  BankDocumentTypes2["DEPOSIT_SLIP"] = "depositSlip";
19259
19241
  BankDocumentTypes2["SCREENSHOT_OF_BANK"] = "screenshotOfOnlineBankingEnviroment";
19260
- BankDocumentTypes2["OFFICIAL_EMAIL"] = "officialEmailOrALetterFromYourBank";
19242
+ BankDocumentTypes2["A_LETTER_FROM_YOUR_BANK"] = "aLetterFromYourBank";
19261
19243
  BankDocumentTypes2["CHECK"] = "check";
19262
19244
  return BankDocumentTypes2;
19263
19245
  })(BankDocumentTypes || {});
@@ -19265,7 +19247,7 @@ const bankDocumentOptions = [
19265
19247
  { id: "bankStatement", name: "bankStatementDocument" },
19266
19248
  { id: "depositSlip", name: "depositSlip" },
19267
19249
  { id: "screenshotOfOnlineBankingEnviroment", name: "screenshotOfOnlineBankingEnviroment" },
19268
- { id: "officialEmailOrALetterFromYourBank", name: "officialEmailOrALetterFromYourBank" },
19250
+ { id: "aLetterFromYourBank", name: "aLetterFromYourBank" },
19269
19251
  { id: "check", name: "check" }
19270
19252
  ];
19271
19253
  var BankDocumentRequirement = /* @__PURE__ */ ((BankDocumentRequirement2) => {
@@ -19379,7 +19361,7 @@ const getBankDocumentRequirements = (country, documentType, documentModifiers) =
19379
19361
  { key: BankDocumentRequirement.ROUTING_NUMBER }
19380
19362
  ] : [{ key: BankDocumentRequirement.ACCOUNT_NUMBER_OR_IBAN }];
19381
19363
  const requireLast12Months = documentType !== BankDocumentTypes.SCREENSHOT_OF_BANK;
19382
- const requireStampOrSignature = documentType === BankDocumentTypes.DEPOSIT_SLIP || documentType === BankDocumentTypes.OFFICIAL_EMAIL;
19364
+ const requireStampOrSignature = documentType === BankDocumentTypes.DEPOSIT_SLIP || documentType === BankDocumentTypes.A_LETTER_FROM_YOUR_BANK;
19383
19365
  const requirements = [
19384
19366
  applyNamedModifiers(country, documentModifiers),
19385
19367
  ...accountNumberRequirement,
@@ -22026,7 +22008,6 @@ function PayoutVerificationMethod(props) {
22026
22008
  !enablePreferInstantVerificationMethodFlow && providerName && bankVendorsLoadingStatus === "success" ? /* @__PURE__ */ jsx(
22027
22009
  ContextGuidance,
22028
22010
  {
22029
- page: "Instant verification with partner",
22030
22011
  titleId: "howDoesVerificationWithOurPartnerWorks",
22031
22012
  contentId: "bankVerificationWithPartnerSteps",
22032
22013
  title: i18n.get("howDoesVerificationWithOurPartnerWorks", {
@@ -22043,8 +22024,7 @@ function PayoutVerificationMethod(props) {
22043
22024
  ] }),
22044
22025
  /* @__PURE__ */ jsx(Typography, { children: i18n.get("adyenWillOnlyGetTemporaryAccess") }),
22045
22026
  /* @__PURE__ */ jsx(Link, { href: "https://www.adyen.com/policies-and-disclaimer/privacy-policy", external: true, children: /* @__PURE__ */ jsx(Typography, { variant: "caption", children: i18n.get("learnMore") }) })
22046
- ] }),
22047
- baseTrackingPayload: { task: TaskTypes.PAYOUT }
22027
+ ] })
22048
22028
  }
22049
22029
  ) : void 0
22050
22030
  ] });
@@ -22414,8 +22394,7 @@ function SolePropComponent(props) {
22414
22394
  country: props.country,
22415
22395
  problems: props == null ? void 0 : props.problems,
22416
22396
  handleAddressSearch: props.handleAddressSearch,
22417
- handleFindAddress: props.handleFindAddress,
22418
- baseTrackingPayload: { task: TaskTypes.SOLE_PROPRIETOR_COMPANY }
22397
+ handleFindAddress: props.handleFindAddress
22419
22398
  }
22420
22399
  )
22421
22400
  }
@@ -23362,8 +23341,7 @@ function TrustComponent(props) {
23362
23341
  problems: props == null ? void 0 : props.problems,
23363
23342
  labels: { operationalAddressIsSame: "isTrustOperationAddressSame" },
23364
23343
  handleAddressSearch: props.handleAddressSearch,
23365
- handleFindAddress: props.handleFindAddress,
23366
- baseTrackingPayload: { task: TaskTypes.TRUST }
23344
+ handleFindAddress: props.handleFindAddress
23367
23345
  }
23368
23346
  )
23369
23347
  }
@@ -24056,14 +24034,14 @@ const trackNavigation = ({
24056
24034
  toForm,
24057
24035
  label,
24058
24036
  returnValue,
24059
- baseTrackingPayload
24037
+ additionalTrackingParams
24060
24038
  }) => {
24061
24039
  userEvents.addPageEvent("Clicked button", {
24062
24040
  actionType,
24063
24041
  toPage: toForm,
24064
24042
  label,
24065
24043
  returnValue,
24066
- ...baseTrackingPayload
24044
+ ...additionalTrackingParams
24067
24045
  });
24068
24046
  };
24069
24047
  const useHideButton = (condition, setHideState) => {
@@ -24091,7 +24069,7 @@ const getOpeningStep = (forms, remediationActions) => {
24091
24069
  };
24092
24070
  const useFormComposer = ({
24093
24071
  problems,
24094
- baseTrackingPayload,
24072
+ navigationTrackingParams,
24095
24073
  forms,
24096
24074
  formRef,
24097
24075
  submitButtonLabel,
@@ -24121,7 +24099,7 @@ const useFormComposer = ({
24121
24099
  }, [forms]);
24122
24100
  useEffect(() => {
24123
24101
  userEvents.updateSharedEventProperties({ page: activeForm.formName });
24124
- }, [activeForm]);
24102
+ }, [activeForm.formName]);
24125
24103
  useEffect(() => {
24126
24104
  if (hasAlreadyNavigatedForm) return;
24127
24105
  const openingStep = getOpeningStep(forms, problems == null ? void 0 : problems.remediationActions);
@@ -24145,8 +24123,16 @@ const useFormComposer = ({
24145
24123
  const validateCurrentForm = () => {
24146
24124
  setShouldValidate(true);
24147
24125
  };
24126
+ const trackSubmitClick = () => {
24127
+ trackNavigation({
24128
+ actionType: "submit",
24129
+ label: "submit",
24130
+ additionalTrackingParams: navigationTrackingParams
24131
+ });
24132
+ };
24148
24133
  const handleNextClick = () => {
24149
24134
  if (isFormSummaryStep(activeForm)) {
24135
+ trackSubmitClick();
24150
24136
  if (skipSubmit) {
24151
24137
  onSkipSubmit == null ? void 0 : onSkipSubmit();
24152
24138
  } else {
@@ -24160,11 +24146,12 @@ const useFormComposer = ({
24160
24146
  actionType: "next",
24161
24147
  label: "next",
24162
24148
  returnValue: "validation error",
24163
- baseTrackingPayload
24149
+ additionalTrackingParams: navigationTrackingParams
24164
24150
  });
24165
24151
  return;
24166
24152
  }
24167
24153
  if (isFinalStep) {
24154
+ trackSubmitClick();
24168
24155
  onSubmit();
24169
24156
  return;
24170
24157
  }
@@ -24176,7 +24163,7 @@ const useFormComposer = ({
24176
24163
  toForm: forms[toFormIndex].formName,
24177
24164
  label: "next",
24178
24165
  returnValue: "success",
24179
- baseTrackingPayload
24166
+ additionalTrackingParams: navigationTrackingParams
24180
24167
  });
24181
24168
  };
24182
24169
  const handleBackClick = () => {
@@ -24188,7 +24175,7 @@ const useFormComposer = ({
24188
24175
  actionType: "back",
24189
24176
  toForm: toForm.formName,
24190
24177
  label: "back",
24191
- baseTrackingPayload
24178
+ additionalTrackingParams: navigationTrackingParams
24192
24179
  });
24193
24180
  }
24194
24181
  };
@@ -26655,7 +26642,6 @@ function BusinessDetailsComponent(props) {
26655
26642
  country,
26656
26643
  isTopLevelEntity,
26657
26644
  activeForm,
26658
- baseTrackingPayload,
26659
26645
  showCompanyStructure,
26660
26646
  showBusinessSelection,
26661
26647
  setShowBusinessSelection,
@@ -26688,7 +26674,6 @@ function BusinessDetailsComponent(props) {
26688
26674
  id: forms.basicInformation.formId,
26689
26675
  heading: i18n.get((activeForm == null ? void 0 : activeForm.formHeading) || forms.basicInformation.formHeading),
26690
26676
  description: (activeForm == null ? void 0 : activeForm.formDescription) ? i18n.get(activeForm == null ? void 0 : activeForm.formDescription) : void 0,
26691
- baseTrackingPayload,
26692
26677
  country,
26693
26678
  companyType: companyStructure == null ? void 0 : companyStructure.entityType,
26694
26679
  isTopLevelEntity,
@@ -27725,7 +27710,7 @@ const FormWrapper = ({
27725
27710
  activeForm,
27726
27711
  handleGetIdVerificationToken,
27727
27712
  validateForm,
27728
- baseTrackingPayload,
27713
+ navigationTrackingParams,
27729
27714
  hideDropinLayout,
27730
27715
  hideFooter,
27731
27716
  hideHomeButton,
@@ -27745,7 +27730,14 @@ const FormWrapper = ({
27745
27730
  const { data: summaryData, omittedForms, omittedKeys, labels: labels2 } = summary2 || {};
27746
27731
  const [isOpen, setIsOpen] = useState(true);
27747
27732
  const [finishLaterLoading, setFinishLaterLoading] = useState(false);
27733
+ const translationKeys = {
27734
+ saveAndGoToOverview: "saveAndGoToOverview"
27735
+ };
27748
27736
  const onHomeClick = () => {
27737
+ userEvents.addPageEvent("Clicked button", {
27738
+ actionType: "save",
27739
+ label: translationKeys.saveAndGoToOverview
27740
+ });
27749
27741
  if (canSubmit2) {
27750
27742
  onSubmit();
27751
27743
  } else {
@@ -27764,10 +27756,10 @@ const FormWrapper = ({
27764
27756
  (props) => {
27765
27757
  trackNavigation({
27766
27758
  ...props,
27767
- baseTrackingPayload
27759
+ additionalTrackingParams: navigationTrackingParams
27768
27760
  });
27769
27761
  },
27770
- [baseTrackingPayload]
27762
+ [navigationTrackingParams]
27771
27763
  );
27772
27764
  const summaryContent = /* @__PURE__ */ jsx("div", { className: "adyen-kyc-form-wrapper", children: /* @__PURE__ */ jsx(
27773
27765
  Summary,
@@ -27785,6 +27777,10 @@ const FormWrapper = ({
27785
27777
  }
27786
27778
  ) });
27787
27779
  const handleFinishLater = () => {
27780
+ userEvents.addPageEvent("Clicked button", {
27781
+ actionType: "save",
27782
+ label: translationKeys.saveAndGoToOverview
27783
+ });
27788
27784
  setFinishLaterLoading(true);
27789
27785
  onSubmit().then(() => {
27790
27786
  setIsOpen(false);
@@ -28141,7 +28137,7 @@ async function submitDocuments({
28141
28137
  legalEntity,
28142
28138
  forms,
28143
28139
  documentUtils,
28144
- baseTrackingPayload
28140
+ additionalTrackingParams
28145
28141
  }) {
28146
28142
  if (!isDocumentsRequired$2(forms)) return;
28147
28143
  const logger2 = createLogger("submitDocuments");
@@ -28152,7 +28148,7 @@ async function submitDocuments({
28152
28148
  formattedDocument.forEach((doc) => {
28153
28149
  var _a;
28154
28150
  userEvents.addEvent("Success", {
28155
- ...baseTrackingPayload,
28151
+ ...additionalTrackingParams,
28156
28152
  actionLevel: "task",
28157
28153
  actionType: "upload",
28158
28154
  documentType: doc.type,
@@ -28163,7 +28159,7 @@ async function submitDocuments({
28163
28159
  } catch (err) {
28164
28160
  logger2.error(err);
28165
28161
  userEvents.addEvent("Encountered error", {
28166
- ...baseTrackingPayload,
28162
+ ...additionalTrackingParams,
28167
28163
  actionLevel: "task",
28168
28164
  actionType: "upload",
28169
28165
  returnType: err.errorCode,
@@ -28174,7 +28170,7 @@ async function submitDocuments({
28174
28170
  async function submit({
28175
28171
  data,
28176
28172
  legalEntityResponse,
28177
- baseTrackingPayload,
28173
+ additionalTrackingParams,
28178
28174
  forms,
28179
28175
  problems,
28180
28176
  documentUtils,
@@ -28191,7 +28187,7 @@ async function submit({
28191
28187
  const logger2 = createLogger("submitBusinessDetails");
28192
28188
  setLoadingStatus("loading");
28193
28189
  const trackingPayload = {
28194
- ...baseTrackingPayload,
28190
+ ...additionalTrackingParams,
28195
28191
  actionLevel: "task",
28196
28192
  actionType: "submit",
28197
28193
  companyStructure: ((_a = data.companyStructure) == null ? void 0 : _a.entityType) ?? null,
@@ -28210,7 +28206,6 @@ async function submit({
28210
28206
  )
28211
28207
  };
28212
28208
  try {
28213
- userEvents.addEvent("Clicked button", trackingPayload);
28214
28209
  await Promise.all([
28215
28210
  handleUpdateLegalEntity(drop("type").from(legalEntity), legalEntityResponse.id),
28216
28211
  submitDocuments({
@@ -28220,7 +28215,7 @@ async function submit({
28220
28215
  id: legalEntityResponse.id,
28221
28216
  type: LegalEntityType.ORGANIZATION
28222
28217
  },
28223
- baseTrackingPayload,
28218
+ additionalTrackingParams,
28224
28219
  documentUtils,
28225
28220
  forms
28226
28221
  })
@@ -28287,12 +28282,11 @@ function BusinessDetailsDropinComponent({
28287
28282
  const {
28288
28283
  state: { currentState }
28289
28284
  } = useStateContext();
28290
- const baseTrackingPayload = useMemo(
28285
+ const associatedLeTrackingParams = useMemo(
28291
28286
  () => getAssociatedLeAnalyticsPayload({
28292
- task: taskType,
28293
28287
  associatedLegalEntity: parentLegalEntity
28294
28288
  }),
28295
- [parentLegalEntity, taskType]
28289
+ [parentLegalEntity]
28296
28290
  );
28297
28291
  useEffect(() => {
28298
28292
  onChange == null ? void 0 : onChange(currentState);
@@ -28300,9 +28294,9 @@ function BusinessDetailsDropinComponent({
28300
28294
  useEffect(() => {
28301
28295
  userEvents.updateBaseTrackingPayload({ task: taskType });
28302
28296
  userEvents.addEvent("Landed on page", {
28303
- ...baseTrackingPayload,
28304
28297
  actionLevel: "task",
28305
- actionType: "start"
28298
+ actionType: "start",
28299
+ ...associatedLeTrackingParams
28306
28300
  });
28307
28301
  }, []);
28308
28302
  const formRef = useRef(null);
@@ -28446,7 +28440,7 @@ function BusinessDetailsDropinComponent({
28446
28440
  data: currentState.data,
28447
28441
  legalEntityResponse,
28448
28442
  isTargetLegalEntityType: Boolean(isTargetLegalEntityType),
28449
- baseTrackingPayload,
28443
+ additionalTrackingParams: associatedLeTrackingParams,
28450
28444
  problems: currentProblems,
28451
28445
  forms,
28452
28446
  documentUtils,
@@ -28464,7 +28458,7 @@ function BusinessDetailsDropinComponent({
28464
28458
  currentState.data,
28465
28459
  legalEntityResponse,
28466
28460
  isTargetLegalEntityType,
28467
- baseTrackingPayload,
28461
+ associatedLeTrackingParams,
28468
28462
  currentProblems,
28469
28463
  forms,
28470
28464
  documentUtils,
@@ -28486,7 +28480,7 @@ function BusinessDetailsDropinComponent({
28486
28480
  nextButtonLabel
28487
28481
  } = useFormComposer({
28488
28482
  problems: currentProblems,
28489
- baseTrackingPayload,
28483
+ navigationTrackingParams: associatedLeTrackingParams,
28490
28484
  forms,
28491
28485
  formRef,
28492
28486
  onSubmit: submitTask
@@ -28740,7 +28734,7 @@ function BusinessDetailsDropinComponent({
28740
28734
  forms,
28741
28735
  activeForm,
28742
28736
  validateForm: () => setShouldValidate(true),
28743
- baseTrackingPayload,
28737
+ navigationTrackingParams: associatedLeTrackingParams,
28744
28738
  onSubmit: submitTask,
28745
28739
  problems: currentProblems,
28746
28740
  canSubmit: canSubmitForm,
@@ -28762,7 +28756,6 @@ function BusinessDetailsDropinComponent({
28762
28756
  activeForm,
28763
28757
  shouldValidate,
28764
28758
  isTopLevelEntity: taskType === TaskTypes.BUSINESS_DETAILS,
28765
- baseTrackingPayload,
28766
28759
  showBusinessSelection,
28767
28760
  setShowBusinessSelection,
28768
28761
  showCompanyStructure,
@@ -28862,17 +28855,14 @@ function CompanyDropinComponent({
28862
28855
  );
28863
28856
  const [loadingStatus, setLoadingStatus] = useState("success");
28864
28857
  const formRef = useRef(null);
28865
- const baseTrackingPayload = getAssociatedLeAnalyticsPayload({
28866
- task: taskType,
28867
- ...isTrustMemberCompany ? {
28868
- associatedLegalEntity: legalEntityResponse,
28869
- associatedLegalEntityOrg: parentLegalEntity
28870
- } : {}
28871
- });
28858
+ const associatedLeTrackingParams = isTrustMemberCompany ? getAssociatedLeAnalyticsPayload({
28859
+ associatedLegalEntity: legalEntityResponse,
28860
+ associatedLegalEntityOrg: parentLegalEntity
28861
+ }) : {};
28872
28862
  useEffect(() => {
28873
28863
  userEvents.updateBaseTrackingPayload({ task: taskType });
28874
28864
  userEvents.addEvent("Landed on page", {
28875
- ...baseTrackingPayload,
28865
+ ...associatedLeTrackingParams,
28876
28866
  actionLevel: "task",
28877
28867
  actionType: "start"
28878
28868
  });
@@ -28957,7 +28947,7 @@ function CompanyDropinComponent({
28957
28947
  await documentUtils.uploadDocuments(formattedDocument, legalEntity.id);
28958
28948
  formattedDocument.forEach((doc) => {
28959
28949
  userEvents.addEvent("Success", {
28960
- ...baseTrackingPayload,
28950
+ ...associatedLeTrackingParams,
28961
28951
  actionLevel: "task",
28962
28952
  actionType: "save",
28963
28953
  documentType: doc.type,
@@ -29010,10 +29000,6 @@ function CompanyDropinComponent({
29010
29000
  delete legalEntity.organization.countryOfGoverningLaw;
29011
29001
  }
29012
29002
  try {
29013
- userEvents.addEvent("Clicked button", {
29014
- ...baseTrackingPayload,
29015
- ...companyTrackingPayload
29016
- });
29017
29003
  if (!(legalEntityResponse == null ? void 0 : legalEntityResponse.id)) {
29018
29004
  legalEntity = await handleCreateLegalEntity(legalEntity);
29019
29005
  } else {
@@ -29024,7 +29010,7 @@ function CompanyDropinComponent({
29024
29010
  }
29025
29011
  setAccountHolder(accountHolder);
29026
29012
  userEvents.addEvent("Success", {
29027
- ...baseTrackingPayload,
29013
+ ...associatedLeTrackingParams,
29028
29014
  ...companyTrackingPayload,
29029
29015
  legalEntityId: legalEntity.id,
29030
29016
  entityType: legalEntity.type
@@ -29050,7 +29036,7 @@ function CompanyDropinComponent({
29050
29036
  }
29051
29037
  setLoadingStatus("success");
29052
29038
  userEvents.addEvent("Encountered error", {
29053
- ...baseTrackingPayload,
29039
+ ...associatedLeTrackingParams,
29054
29040
  actionLevel: "task",
29055
29041
  actionType: "submit",
29056
29042
  returnType: e.errorCode,
@@ -29181,7 +29167,7 @@ function CompanyDropinComponent({
29181
29167
  nextButtonLabel
29182
29168
  } = useFormComposer({
29183
29169
  problems,
29184
- baseTrackingPayload,
29170
+ navigationTrackingParams: associatedLeTrackingParams,
29185
29171
  forms,
29186
29172
  formRef,
29187
29173
  onSubmit
@@ -29203,7 +29189,7 @@ function CompanyDropinComponent({
29203
29189
  forms,
29204
29190
  activeForm,
29205
29191
  validateForm: () => setShouldValidate(true),
29206
- baseTrackingPayload,
29192
+ navigationTrackingParams: associatedLeTrackingParams,
29207
29193
  onSubmit,
29208
29194
  problems,
29209
29195
  canSubmit: canSubmit$1(data) && hasDataChanged(dataFromResponse, data),
@@ -30121,8 +30107,7 @@ const BusinessTypeSelection = ({
30121
30107
  if (loadingStatus === "loading") return;
30122
30108
  triggerValidation();
30123
30109
  if (isValid) {
30124
- userEvents.addEvent("Clicked button", {
30125
- actionLevel: "task",
30110
+ userEvents.addPageEvent("Clicked button", {
30126
30111
  actionType: "next"
30127
30112
  });
30128
30113
  if (((_a2 = data.businessType) == null ? void 0 : _a2.id) === "legalArrangement") {
@@ -30903,7 +30888,6 @@ const DecisionMakersComponent = ({
30903
30888
  /* @__PURE__ */ jsx(
30904
30889
  ContextGuidance,
30905
30890
  {
30906
- page: "Decision makers",
30907
30891
  title: i18n.get("whatIsTheDifferenceBetweenTheseRoles"),
30908
30892
  content: /* @__PURE__ */ jsx("ul", { className: "adyen-kyc-guidance-list", children: availableDecisionMakers.map(({ roleType }) => /* @__PURE__ */ jsx(
30909
30893
  "li",
@@ -30918,8 +30902,7 @@ const DecisionMakersComponent = ({
30918
30902
  roleType
30919
30903
  )) }),
30920
30904
  titleId: "whatIsTheDifferenceBetweenTheseRoles",
30921
- contentId: "differenceBetweenAnOwnerControllingPersonAndSignatory",
30922
- baseTrackingPayload: { task: TaskTypes.DECISION_MAKER_OVERVIEW }
30905
+ contentId: "differenceBetweenAnOwnerControllingPersonAndSignatory"
30923
30906
  }
30924
30907
  ),
30925
30908
  showWarning && /* @__PURE__ */ jsx(
@@ -32380,7 +32363,6 @@ const TrustMembersOverview = ({
32380
32363
  /* @__PURE__ */ jsx(
32381
32364
  ContextGuidance,
32382
32365
  {
32383
- page: "Trust members",
32384
32366
  title: i18n.get("whatIsTheDifferenceBetweenTheseRoles"),
32385
32367
  content: /* @__PURE__ */ jsx("ul", { className: "adyen-kyc-guidance-list", children: trustMemberRequirements.map(({ label }) => /* @__PURE__ */ jsx(
32386
32368
  "li",
@@ -32392,8 +32374,7 @@ const TrustMembersOverview = ({
32392
32374
  label
32393
32375
  )) }),
32394
32376
  titleId: "whatIsTheDifferenceBetweenTheseRoles",
32395
- contentId: "differenceBetweenTrustMemberRoles",
32396
- baseTrackingPayload: { task: TaskTypes.TRUST_MEMBER_OVERVIEW }
32377
+ contentId: "differenceBetweenTrustMemberRoles"
32397
32378
  }
32398
32379
  ),
32399
32380
  /* @__PURE__ */ jsx(CardGroup, { children: trustMembers.map((trustMember) => {
@@ -32641,20 +32622,14 @@ function IndividualDropinComponent({
32641
32622
  accountHolder,
32642
32623
  handleOpenSingpassAuthorizationLink
32643
32624
  });
32644
- const baseTrackingPayload = getAssociatedLeAnalyticsPayload({
32645
- task: taskType,
32646
- ...taskType === TaskTypes.INDIVIDUAL ? {} : taskType === TaskTypes.TRUST_MEMBER_COMPANY_OWNER ? {
32647
- associatedLegalEntity: legalEntityResponse,
32648
- associatedLegalEntityOrg: parentLegalEntity
32649
- } : {
32650
- // i.e. legal arrangement, decision maker, or trust member individual
32651
- associatedLegalEntity: legalEntityResponse
32652
- }
32625
+ const associatedLeTrackingParams = taskType === TaskTypes.INDIVIDUAL ? {} : getAssociatedLeAnalyticsPayload({
32626
+ associatedLegalEntity: legalEntityResponse,
32627
+ associatedLegalEntityOrg: taskType === TaskTypes.TRUST_MEMBER_COMPANY_OWNER ? parentLegalEntity : void 0
32653
32628
  });
32654
32629
  useEffect(() => {
32655
32630
  userEvents.updateBaseTrackingPayload({ task: taskType });
32656
32631
  userEvents.addEvent("Landed on page", {
32657
- ...baseTrackingPayload,
32632
+ ...associatedLeTrackingParams,
32658
32633
  actionLevel: "task",
32659
32634
  actionType: "start"
32660
32635
  });
@@ -32787,7 +32762,7 @@ function IndividualDropinComponent({
32787
32762
  }
32788
32763
  updatedLegalEntity = await handleCreateLegalEntity(legalEntity);
32789
32764
  userEvents.addEvent("Success", {
32790
- ...baseTrackingPayload,
32765
+ ...associatedLeTrackingParams,
32791
32766
  actionLevel: "task",
32792
32767
  actionType: "submit",
32793
32768
  legalEntityId: updatedLegalEntity.id,
@@ -32798,7 +32773,7 @@ function IndividualDropinComponent({
32798
32773
  } else {
32799
32774
  updatedLegalEntity = await handleUpdateLegalEntity(drop("type").from(legalEntity), leId);
32800
32775
  userEvents.addEvent("Success", {
32801
- ...baseTrackingPayload,
32776
+ ...associatedLeTrackingParams,
32802
32777
  actionLevel: "task",
32803
32778
  actionType: "submit",
32804
32779
  legalEntityId: updatedLegalEntity.id,
@@ -32840,7 +32815,7 @@ function IndividualDropinComponent({
32840
32815
  uploadedDocuments == null ? void 0 : uploadedDocuments.forEach((doc) => {
32841
32816
  var _a3;
32842
32817
  userEvents.addEvent("Success", {
32843
- ...baseTrackingPayload,
32818
+ ...associatedLeTrackingParams,
32844
32819
  actionLevel: "task",
32845
32820
  actionType: "upload",
32846
32821
  documentType: doc.type,
@@ -32893,7 +32868,7 @@ function IndividualDropinComponent({
32893
32868
  }
32894
32869
  };
32895
32870
  const onSubmit = async () => {
32896
- var _a2, _b2;
32871
+ var _a2;
32897
32872
  setLoadingStatus("loading");
32898
32873
  const dataSubmitted = omitObscuredFieldsIfUnchanged(
32899
32874
  individualObscuredFields,
@@ -32911,13 +32886,6 @@ function IndividualDropinComponent({
32911
32886
  return ((_a3 = dataSubmitted == null ? void 0 : dataSubmitted.idDocument) == null ? void 0 : _a3.idDocumentType) === id;
32912
32887
  }
32913
32888
  )) == null ? void 0 : _a2.id;
32914
- userEvents.addEvent("Clicked button", {
32915
- ...baseTrackingPayload,
32916
- actionLevel: "task",
32917
- actionType: "submit",
32918
- countryOfRegistration: ((_b2 = dataSubmitted == null ? void 0 : dataSubmitted.personalDetails) == null ? void 0 : _b2.residencyCountry) || null,
32919
- documentType: idDocumentType || null
32920
- });
32921
32889
  legalEntity.entityAssociations = filterOutUnwantedAssociationsIfRootLE(
32922
32890
  taskType,
32923
32891
  legalEntityResponse,
@@ -32956,7 +32924,7 @@ function IndividualDropinComponent({
32956
32924
  }
32957
32925
  setLoadingStatus("success");
32958
32926
  userEvents.addEvent("Encountered error", {
32959
- ...baseTrackingPayload,
32927
+ ...associatedLeTrackingParams,
32960
32928
  actionLevel: "task",
32961
32929
  actionType: "submit",
32962
32930
  returnType: e.errorCode,
@@ -33067,7 +33035,7 @@ function IndividualDropinComponent({
33067
33035
  totalSteps
33068
33036
  } = useFormComposer({
33069
33037
  problems,
33070
- baseTrackingPayload,
33038
+ navigationTrackingParams: associatedLeTrackingParams,
33071
33039
  externalBackClick,
33072
33040
  forms,
33073
33041
  formRef,
@@ -33092,7 +33060,7 @@ function IndividualDropinComponent({
33092
33060
  loadingStatus,
33093
33061
  forms,
33094
33062
  onSubmit,
33095
- baseTrackingPayload,
33063
+ navigationTrackingParams: associatedLeTrackingParams,
33096
33064
  handleGetIdVerificationToken,
33097
33065
  gotoFormByFormIndex,
33098
33066
  nextButtonLabel,
@@ -33518,7 +33486,6 @@ function PayoutDetailsDropinComponent({
33518
33486
  bankCountry: (payoutVerificationMethod == null ? void 0 : payoutVerificationMethod.bankCountry) ?? defaultPayoutCountry,
33519
33487
  bankCurrency: (payoutAccountDetails == null ? void 0 : payoutAccountDetails.currency) ?? null
33520
33488
  };
33521
- userEvents.addEvent("Clicked button", baseTracking);
33522
33489
  let transferInstrument2 = mapPayoutAccountToTransferInstrument({
33523
33490
  data: dataSubmitted,
33524
33491
  legalEntity: legalEntityResponse
@@ -33627,7 +33594,6 @@ function PayoutDetailsDropinComponent({
33627
33594
  nextButtonLabel
33628
33595
  } = useFormComposer({
33629
33596
  problems,
33630
- baseTrackingPayload: {},
33631
33597
  forms,
33632
33598
  submitButtonLabel,
33633
33599
  externalBackClick,
@@ -33672,7 +33638,6 @@ function PayoutDetailsDropinComponent({
33672
33638
  loadingStatus,
33673
33639
  forms,
33674
33640
  onSubmit,
33675
- baseTrackingPayload: {},
33676
33641
  gotoFormByFormIndex,
33677
33642
  nextButtonLabel,
33678
33643
  homeButtonLabel,
@@ -33792,7 +33757,6 @@ function PciDropinComponent({
33792
33757
  actionType: "sign",
33793
33758
  label: translationKeys.sign
33794
33759
  };
33795
- userEvents.addEvent("Clicked button", baseTracking);
33796
33760
  triggerValidation();
33797
33761
  if (isValid) {
33798
33762
  try {
@@ -33820,18 +33784,16 @@ function PciDropinComponent({
33820
33784
  }
33821
33785
  };
33822
33786
  const goHome = () => {
33823
- userEvents.addEvent("Clicked button", {
33824
- actionLevel: "task",
33787
+ userEvents.addPageEvent("Clicked button", {
33825
33788
  actionType: "back",
33826
33789
  label: translationKeys.home
33827
33790
  });
33828
33791
  handleHomeClick();
33829
33792
  };
33830
33793
  const handleExpandSection = (title) => {
33831
- userEvents.addEvent("Clicked accordion", {
33832
- actionLevel: "task",
33794
+ userEvents.addFieldEvent("Clicked accordion", {
33833
33795
  actionType: "open",
33834
- label: title
33796
+ field: title
33835
33797
  });
33836
33798
  };
33837
33799
  useEffect(() => {
@@ -34818,7 +34780,6 @@ function ServiceAgreementDropinComponent({
34818
34780
  actionLevel: "task",
34819
34781
  actionType: "sign"
34820
34782
  };
34821
- userEvents.addEvent("Clicked button", { ...baseTracking, label: translationKeys.next });
34822
34783
  triggerValidation();
34823
34784
  if (loadingStatus === "loading" || !serviceAgreement || !data.signer) return;
34824
34785
  if (isValid) {
@@ -34851,8 +34812,7 @@ function ServiceAgreementDropinComponent({
34851
34812
  }
34852
34813
  };
34853
34814
  const goHome = () => {
34854
- userEvents.addEvent("Clicked button", {
34855
- actionLevel: "task",
34815
+ userEvents.addPageEvent("Clicked button", {
34856
34816
  actionType: "back",
34857
34817
  label: translationKeys.home
34858
34818
  });
@@ -35172,8 +35132,7 @@ function SolePropDropinComponent({
35172
35132
  const dataFromResponse = getDataWithDefaultAddress(legalEntityResponse, parentLegalEntity);
35173
35133
  const [data, setData] = useState(dataFromResponse);
35174
35134
  const country = ((_b = (_a = currentState.data) == null ? void 0 : _a.solePropNameAndCountry) == null ? void 0 : _b.country) || ((_c = dataFromResponse == null ? void 0 : dataFromResponse.solePropRegistrationAddress) == null ? void 0 : _c.registrationAddress.country) || externalCountry;
35175
- const baseTrackingPayload = getAssociatedLeAnalyticsPayload({
35176
- task: taskType,
35135
+ const associatedLeTrackingParams = getAssociatedLeAnalyticsPayload({
35177
35136
  associatedLegalEntity: legalEntityResponse
35178
35137
  });
35179
35138
  const getConfigurationData = useCallback(
@@ -35371,7 +35330,7 @@ function SolePropDropinComponent({
35371
35330
  nextButtonLabel
35372
35331
  } = useFormComposer({
35373
35332
  problems,
35374
- baseTrackingPayload,
35333
+ navigationTrackingParams: associatedLeTrackingParams,
35375
35334
  forms,
35376
35335
  formRef,
35377
35336
  onSubmit: handleOnSubmit
@@ -35395,7 +35354,7 @@ function SolePropDropinComponent({
35395
35354
  onSubmit: handleOnSubmit,
35396
35355
  validateForm: () => setShouldValidate(true),
35397
35356
  canSubmit: canSubmit(data) && hasDataChanged(dataFromResponse, data),
35398
- baseTrackingPayload,
35357
+ navigationTrackingParams: associatedLeTrackingParams,
35399
35358
  problems,
35400
35359
  summary: {
35401
35360
  data: formatDataForSummary2(data, forms),
@@ -35680,8 +35639,7 @@ function TrustDropinComponent({
35680
35639
  const value = getProp(data2, detail);
35681
35640
  return !isEmpty$1(value);
35682
35641
  });
35683
- const baseTrackingPayload = getAssociatedLeAnalyticsPayload({
35684
- task: taskType,
35642
+ const associatedLeTrackingParams = getAssociatedLeAnalyticsPayload({
35685
35643
  associatedLegalEntity: legalEntityResponse
35686
35644
  });
35687
35645
  const {
@@ -35694,7 +35652,7 @@ function TrustDropinComponent({
35694
35652
  nextButtonLabel
35695
35653
  } = useFormComposer({
35696
35654
  problems,
35697
- baseTrackingPayload,
35655
+ navigationTrackingParams: associatedLeTrackingParams,
35698
35656
  forms,
35699
35657
  formRef,
35700
35658
  onSubmit
@@ -35710,7 +35668,7 @@ function TrustDropinComponent({
35710
35668
  loadingStatus,
35711
35669
  forms,
35712
35670
  activeForm,
35713
- baseTrackingPayload,
35671
+ navigationTrackingParams: associatedLeTrackingParams,
35714
35672
  onSubmit,
35715
35673
  hideDropinLayout,
35716
35674
  handleHomeClick,
@@ -39082,7 +39040,7 @@ function UpdateLegalEntityForHighExposure({
39082
39040
  const value = getProp(data2, detail);
39083
39041
  return !isEmpty$1(value);
39084
39042
  });
39085
- const baseTrackingPayload = getAssociatedLeAnalyticsPayload({
39043
+ const associatedLeTrackingParams = getAssociatedLeAnalyticsPayload({
39086
39044
  associatedLegalEntity: parentLegalEntity
39087
39045
  });
39088
39046
  const {
@@ -39095,7 +39053,6 @@ function UpdateLegalEntityForHighExposure({
39095
39053
  nextButtonLabel
39096
39054
  } = useFormComposer({
39097
39055
  problems,
39098
- baseTrackingPayload,
39099
39056
  forms,
39100
39057
  formRef,
39101
39058
  onSubmit
@@ -39111,7 +39068,7 @@ function UpdateLegalEntityForHighExposure({
39111
39068
  loadingStatus,
39112
39069
  forms,
39113
39070
  activeForm,
39114
- baseTrackingPayload,
39071
+ navigationTrackingParams: associatedLeTrackingParams,
39115
39072
  onSubmit,
39116
39073
  hideDropinLayout,
39117
39074
  handleHomeClick,
@@ -39409,7 +39366,7 @@ const useAnalytics = async ({
39409
39366
  userEvents.subscribe((data) => {
39410
39367
  onUserEvent({
39411
39368
  ...data,
39412
- properties: { ...data.properties || {}, ...sessionData }
39369
+ properties: { ...sessionData, ...data.properties || {} }
39413
39370
  });
39414
39371
  });
39415
39372
  }
@@ -39710,7 +39667,7 @@ const ConfigurationApiProvider = ({
39710
39667
  }) => {
39711
39668
  const authContext = useAuthContext();
39712
39669
  const { isEmbeddedDropin, loadingContext } = authContext;
39713
- const sdkVersion = "2.62.1";
39670
+ const sdkVersion = "2.63.0";
39714
39671
  useAnalytics({
39715
39672
  onUserEvent,
39716
39673
  legalEntityId: rootLegalEntityId,
@@ -39875,6 +39832,9 @@ const I18nProvider = ({
39875
39832
  }),
39876
39833
  [loadedLocale, translations, customTranslations, allowedLocales]
39877
39834
  );
39835
+ useEffect(() => {
39836
+ userEvents.updateBaseTrackingPayload({ locale });
39837
+ }, [locale]);
39878
39838
  const contextValue = useMemo(
39879
39839
  () => ({
39880
39840
  i18n,
@@ -40383,7 +40343,7 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
40383
40343
  };
40384
40344
  const copyToClipboard = async () => {
40385
40345
  const toCopy = {
40386
- sdkVersion: "2.62.1",
40346
+ sdkVersion: "2.63.0",
40387
40347
  experiments: Object.fromEntries(allExperimentsWithValues),
40388
40348
  settings: Object.fromEntries(allSettingsWithValues)
40389
40349
  };
@@ -40448,7 +40408,7 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
40448
40408
  /* @__PURE__ */ jsx("div", { className: "adyen-kyc-debug-modal__meta", children: /* @__PURE__ */ jsx("table", { children: /* @__PURE__ */ jsxs("tbody", { children: [
40449
40409
  /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsxs("td", { children: [
40450
40410
  /* @__PURE__ */ jsx("span", { className: "adyen-kyc-debug-modal__table-key", children: "SDK version" }),
40451
- /* @__PURE__ */ jsx(Tag, { variant: "green", className: "adyen-kyc-tag--large", children: "2.62.1" })
40411
+ /* @__PURE__ */ jsx(Tag, { variant: "green", className: "adyen-kyc-tag--large", children: "2.63.0" })
40452
40412
  ] }) }),
40453
40413
  /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsxs("td", { children: [
40454
40414
  /* @__PURE__ */ jsx("span", { className: "adyen-kyc-debug-modal__table-key", children: "rootLegalEntityId" }),