@adyen/kyc-components 3.43.0 → 3.43.2

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.
@@ -10712,7 +10712,8 @@ function CompanyRegistrationDetails(props) {
10712
10712
  resolveFieldMetadata(
10713
10713
  defaultFieldConfig$6[country],
10714
10714
  {
10715
- taxIdNumberType
10715
+ taxIdNumberType,
10716
+ companyType: mergedProps.companyType
10716
10717
  },
10717
10718
  defaultFieldMetadata$7
10718
10719
  ),
@@ -11356,7 +11357,7 @@ const EntityTypeRadioGroupCard = ({
11356
11357
  EntityTypeSelectionRadioCardBody,
11357
11358
  {
11358
11359
  description: optionDescription(option),
11359
- examples: examples == null ? void 0 : examples[baseProps.optionId]
11360
+ examples: examples == null ? void 0 : examples[option]
11360
11361
  }
11361
11362
  ) : void 0,
11362
11363
  optionClassNames: () => ({
@@ -27889,7 +27890,8 @@ function BasicInformation({
27889
27890
  resolveFieldMetadata(
27890
27891
  defaultFieldConfig$6[country],
27891
27892
  {
27892
- taxIdNumberType
27893
+ taxIdNumberType,
27894
+ companyType
27893
27895
  },
27894
27896
  defaultFieldMetadata$7
27895
27897
  ),
@@ -29410,7 +29412,9 @@ const FormWrapper = ({
29410
29412
  canSubmit: canSubmit2,
29411
29413
  onSubmit,
29412
29414
  problems,
29413
- steps
29415
+ steps,
29416
+ showBackButton,
29417
+ hideNextButton
29414
29418
  }) => {
29415
29419
  var _a;
29416
29420
  const { i18n } = useI18nContext();
@@ -29496,7 +29500,7 @@ const FormWrapper = ({
29496
29500
  }
29497
29501
  ) }),
29498
29502
  /* @__PURE__ */ jsx("div", { style: { flex: "1" } }),
29499
- !isFirstStep && handleBackClick && /* @__PURE__ */ jsx(Button, { secondary: true, label: i18n.get("back"), onClick: handleBackClick }),
29503
+ (!isFirstStep || showBackButton) && handleBackClick && /* @__PURE__ */ jsx(Button, { secondary: true, label: i18n.get("back"), onClick: handleBackClick }),
29500
29504
  !isFirstStep && !isFinalStep && /* @__PURE__ */ jsx(
29501
29505
  Button,
29502
29506
  {
@@ -29507,7 +29511,7 @@ const FormWrapper = ({
29507
29511
  loading: finishLaterLoading
29508
29512
  }
29509
29513
  ),
29510
- !isFinalStep && /* @__PURE__ */ jsx(Button, { label: i18n.get("next"), onClick: handleNextClick }),
29514
+ !isFinalStep && !hideNextButton && /* @__PURE__ */ jsx(Button, { label: i18n.get("next"), onClick: handleNextClick }),
29511
29515
  isFinalStep && /* @__PURE__ */ jsx(Button, { label: i18n.get("submit"), onClick: handleNextClick })
29512
29516
  ] })
29513
29517
  ] });
@@ -30165,7 +30169,7 @@ function BusinessDetailsDropin({
30165
30169
  keys: ["operationalAddressIsSame"]
30166
30170
  }
30167
30171
  }),
30168
- [currentState.data, derivedProps == null ? void 0 : derivedProps.labels, forms, i18n]
30172
+ [currentState.data, derivedProps == null ? void 0 : derivedProps.labels, forms, i18n, isExperimentEnabled]
30169
30173
  );
30170
30174
  const submitTask = useCallback(() => {
30171
30175
  setAccountHolder(accountHolder);
@@ -30200,7 +30204,8 @@ function BusinessDetailsDropin({
30200
30204
  showToast,
30201
30205
  clearToasts,
30202
30206
  handleUpdateLegalEntity,
30203
- onExternalSubmit
30207
+ onExternalSubmit,
30208
+ isExperimentEnabled
30204
30209
  ]);
30205
30210
  const {
30206
30211
  handleNextClick,
@@ -30289,6 +30294,21 @@ function BusinessDetailsDropin({
30289
30294
  [activeForm.formId, showBusinessSelection]
30290
30295
  );
30291
30296
  const hideFooter = isBusinessSelection === true && (searching === "loading" || fetching === "loading" || verifying === "loading" || resettingTrustedData === "loading");
30297
+ const hideNextButton = useMemo(() => {
30298
+ switch (activeForm.formId) {
30299
+ case "basicInformation":
30300
+ return isBusinessSelection;
30301
+ default:
30302
+ return false;
30303
+ }
30304
+ }, [activeForm.formId, isBusinessSelection]);
30305
+ const showBackButton = useMemo(() => {
30306
+ if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry)) return false;
30307
+ if (isBusinessSelection) {
30308
+ return searching !== "loading" || fetching !== "loading" || verifying !== "loading" || resettingTrustedData !== "loading";
30309
+ }
30310
+ return false;
30311
+ }, [currentCountry, isBusinessSelection, searching, fetching, verifying, resettingTrustedData]);
30292
30312
  const goToForm = useCallback(
30293
30313
  (index) => {
30294
30314
  if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry))
@@ -30427,6 +30447,8 @@ function BusinessDetailsDropin({
30427
30447
  handleBackClick: backClick,
30428
30448
  handleHomeClick,
30429
30449
  steps,
30450
+ showBackButton,
30451
+ hideNextButton,
30430
30452
  children: /* @__PURE__ */ jsx(
30431
30453
  BusinessDetails,
30432
30454
  {
@@ -32853,7 +32875,11 @@ const calculateTaskStatus = ({
32853
32875
  if (!matchingAccount) throw new Error(`Could not find transfer instrument with id ${id}`);
32854
32876
  ignorePendingCapabilities = isInstantVerifiedAccount(matchingAccount);
32855
32877
  relevantEntityIds = [id];
32878
+ break;
32856
32879
  }
32880
+ case TaskTypes.CUSTOMER_SUPPORT:
32881
+ relevantEntityIds = [rootLegalEntity.id];
32882
+ break;
32857
32883
  }
32858
32884
  return getRegularTaskStatus({
32859
32885
  taskType,
@@ -32872,6 +32898,11 @@ const splitTaskIdentifier = (taskIdentifier) => {
32872
32898
  const id = taskIdentifier.slice(firstDashIndex + 1);
32873
32899
  return { taskType, id };
32874
32900
  };
32901
+ const NEEDS_SUPPORT_DETAILS = [
32902
+ "theCompanyIWorkFor",
32903
+ "mySoleProprietorName",
32904
+ "aTrust"
32905
+ ];
32875
32906
  const determineTaskIdentifiers = ({
32876
32907
  taskTypes: receivedTaskTypes,
32877
32908
  rootLegalEntity,
@@ -32917,6 +32948,9 @@ const determineTaskIdentifiers = ({
32917
32948
  }
32918
32949
  });
32919
32950
  }
32951
+ if (accountHolder && NEEDS_SUPPORT_DETAILS.includes(accountHolder)) {
32952
+ tasks.push("CUSTOMER_SUPPORT");
32953
+ }
32920
32954
  return tasks;
32921
32955
  };
32922
32956
  const mapReceivedTaskType = (taskType) => {
@@ -39002,7 +39036,7 @@ function DropinComposer({
39002
39036
  }
39003
39037
  );
39004
39038
  case TaskTypes.BUSINESS_DETAILS:
39005
- return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-u-display-flex adyen-kyc-u-justify-content-center", children: /* @__PURE__ */ jsx(
39039
+ return /* @__PURE__ */ jsx(
39006
39040
  BusinessDetailsDropin,
39007
39041
  {
39008
39042
  ...args,
@@ -39039,7 +39073,7 @@ function DropinComposer({
39039
39073
  handleClearCompanyData: args.handleClearCompanyData,
39040
39074
  isTargetLegalEntityType: targetLegalEntityType === LegalEntityType.ORGANIZATION
39041
39075
  }
39042
- ) });
39076
+ );
39043
39077
  case TaskTypes.TRUST_MEMBER_COMPANY:
39044
39078
  return /* @__PURE__ */ jsx(
39045
39079
  CompanyDropin,
@@ -43796,7 +43830,7 @@ const ConfigurationApiProvider = ({
43796
43830
  }) => {
43797
43831
  const authContext = useAuthContext();
43798
43832
  const { isEmbeddedDropin, loadingContext } = authContext;
43799
- const sdkVersion = "3.43.0";
43833
+ const sdkVersion = "3.43.2";
43800
43834
  useAnalytics({
43801
43835
  onUserEvent,
43802
43836
  legalEntityId: rootLegalEntityId,
@@ -44641,7 +44675,7 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
44641
44675
  const { i18n } = useI18nContext();
44642
44676
  const [tab, setTab] = useState("metadata");
44643
44677
  const metadata = {
44644
- sdkVersion: "3.43.0",
44678
+ sdkVersion: "3.43.2",
44645
44679
  locale: i18n.locale,
44646
44680
  rootLegalEntityId
44647
44681
  };
@@ -36,5 +36,7 @@ export interface FormWrapperProps {
36
36
  current: number;
37
37
  total: number;
38
38
  };
39
+ showBackButton?: boolean;
40
+ hideNextButton?: boolean;
39
41
  }
40
- export declare const FormWrapper: ({ asModal, summary, taskName, children, handleNextClick, handleBackClick, handleCloseClick, handleHomeClick, loadingStatus, gotoFormByFormIndex, forms, activeForm, handleGetIdVerificationToken, validateForm, baseTrackingPayload, hideSidebar, hideFooter, canSubmit, onSubmit, problems, steps, }: FormWrapperProps) => import("preact").JSX.Element;
42
+ export declare const FormWrapper: ({ asModal, summary, taskName, children, handleNextClick, handleBackClick, handleCloseClick, handleHomeClick, loadingStatus, gotoFormByFormIndex, forms, activeForm, handleGetIdVerificationToken, validateForm, baseTrackingPayload, hideSidebar, hideFooter, canSubmit, onSubmit, problems, steps, showBackButton, hideNextButton, }: FormWrapperProps) => import("preact").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adyen/kyc-components",
3
- "version": "3.43.0",
3
+ "version": "3.43.2",
4
4
  "keywords": [
5
5
  "adyen",
6
6
  "adyen-kyc",