@adyen/kyc-components 2.62.1 → 2.63.1

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