@adyen/kyc-components 3.43.0 → 3.43.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.
@@ -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
  ),
@@ -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
  {
@@ -39002,7 +39024,7 @@ function DropinComposer({
39002
39024
  }
39003
39025
  );
39004
39026
  case TaskTypes.BUSINESS_DETAILS:
39005
- return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-u-display-flex adyen-kyc-u-justify-content-center", children: /* @__PURE__ */ jsx(
39027
+ return /* @__PURE__ */ jsx(
39006
39028
  BusinessDetailsDropin,
39007
39029
  {
39008
39030
  ...args,
@@ -39039,7 +39061,7 @@ function DropinComposer({
39039
39061
  handleClearCompanyData: args.handleClearCompanyData,
39040
39062
  isTargetLegalEntityType: targetLegalEntityType === LegalEntityType.ORGANIZATION
39041
39063
  }
39042
- ) });
39064
+ );
39043
39065
  case TaskTypes.TRUST_MEMBER_COMPANY:
39044
39066
  return /* @__PURE__ */ jsx(
39045
39067
  CompanyDropin,
@@ -43796,7 +43818,7 @@ const ConfigurationApiProvider = ({
43796
43818
  }) => {
43797
43819
  const authContext = useAuthContext();
43798
43820
  const { isEmbeddedDropin, loadingContext } = authContext;
43799
- const sdkVersion = "3.43.0";
43821
+ const sdkVersion = "3.43.1";
43800
43822
  useAnalytics({
43801
43823
  onUserEvent,
43802
43824
  legalEntityId: rootLegalEntityId,
@@ -44641,7 +44663,7 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
44641
44663
  const { i18n } = useI18nContext();
44642
44664
  const [tab, setTab] = useState("metadata");
44643
44665
  const metadata = {
44644
- sdkVersion: "3.43.0",
44666
+ sdkVersion: "3.43.1",
44645
44667
  locale: i18n.locale,
44646
44668
  rootLegalEntityId
44647
44669
  };
@@ -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.1",
4
4
  "keywords": [
5
5
  "adyen",
6
6
  "adyen-kyc",