@adyen/kyc-components 3.51.0 → 3.51.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.
@@ -1,7 +1,7 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- import { b as createContext, d as createSignal, o as onMount, e as createEffect, c as createMemo, a as createComponent, P as Portal, S as Show, t as template, i as insert, f as createRenderEffect, h as className, j as clearDelegatedEvents, k as delegateEvents, u as useContext, l as onCleanup, s as sortFns, m as mutationSortFns, n as on, p as setAttribute, q as getSidedProp, r as use, v as createUniqueId, w as batch, x as getQueryStatusLabel, y as getMutationStatusColor, z as getQueryStatusColor, A as getQueryStatusColorByLabel, B as displayValue, F as For, C as convertRemToPixels, D as untrack, $ as $TRACK, E as useTransition, G as spread, H as mergeProps, I as createRoot, J as serialize, K as Index, L as updateNestedDataByPath, M as addEventListener, N as stringify, O as Match, Q as Switch, R as deleteNestedDataByPath, T as splitProps, U as Dynamic, V as createComputed } from "./index-CsxVaeY_.js";
4
+ import { b as createContext, d as createSignal, o as onMount, e as createEffect, c as createMemo, a as createComponent, P as Portal, S as Show, t as template, i as insert, f as createRenderEffect, h as className, j as clearDelegatedEvents, k as delegateEvents, u as useContext, l as onCleanup, s as sortFns, m as mutationSortFns, n as on, p as setAttribute, q as getSidedProp, r as use, v as createUniqueId, w as batch, x as getQueryStatusLabel, y as getMutationStatusColor, z as getQueryStatusColor, A as getQueryStatusColorByLabel, B as displayValue, F as For, C as convertRemToPixels, D as untrack, $ as $TRACK, E as useTransition, G as spread, H as mergeProps, I as createRoot, J as serialize, K as Index, L as updateNestedDataByPath, M as addEventListener, N as stringify, O as Match, Q as Switch, R as deleteNestedDataByPath, T as splitProps, U as Dynamic, V as createComputed } from "./index-CA2oyCNl.js";
5
5
  var isNonNullable = (i2) => i2 != null;
6
6
  var filterNonNullable = (arr) => arr.filter(isNonNullable);
7
7
  function chain(callbacks) {
@@ -1,5 +1,5 @@
1
- import { c as createLocalStorage, T as THEME_PREFERENCE, P as PiPProvider, a as ThemeContext, D as Devtools, Q as QueryDevtoolsContext } from "./B4MFY5CR-HldG4P4R.js";
2
- import { g as getPreferredColorScheme, c as createMemo, a as createComponent } from "./index-CsxVaeY_.js";
1
+ import { c as createLocalStorage, T as THEME_PREFERENCE, P as PiPProvider, a as ThemeContext, D as Devtools, Q as QueryDevtoolsContext } from "./B4MFY5CR-DkcZuwrr.js";
2
+ import { g as getPreferredColorScheme, c as createMemo, a as createComponent } from "./index-CA2oyCNl.js";
3
3
  var DevtoolsComponent = (props) => {
4
4
  const [localStore, setLocalStore] = createLocalStorage({
5
5
  prefix: "TanstackQueryDevtools"
@@ -1,5 +1,5 @@
1
- import { c as createLocalStorage, T as THEME_PREFERENCE, P as PiPProvider, a as ThemeContext, b as ParentPanel, C as ContentView, Q as QueryDevtoolsContext } from "./B4MFY5CR-HldG4P4R.js";
2
- import { g as getPreferredColorScheme, c as createMemo, a as createComponent } from "./index-CsxVaeY_.js";
1
+ import { c as createLocalStorage, T as THEME_PREFERENCE, P as PiPProvider, a as ThemeContext, b as ParentPanel, C as ContentView, Q as QueryDevtoolsContext } from "./B4MFY5CR-DkcZuwrr.js";
2
+ import { g as getPreferredColorScheme, c as createMemo, a as createComponent } from "./index-CA2oyCNl.js";
3
3
  var DevtoolsPanelComponent = (props) => {
4
4
  const [localStore, setLocalStore] = createLocalStorage({
5
5
  prefix: "TanstackQueryDevtools"
@@ -1,4 +1,4 @@
1
- import { W } from "./index-CsxVaeY_.js";
1
+ import { W } from "./index-CA2oyCNl.js";
2
2
  export {
3
3
  W as default
4
4
  };
@@ -15580,12 +15580,16 @@ function Address({
15580
15580
  } = form;
15581
15581
  const { isValid } = form;
15582
15582
  if (handleFieldChange && requiredFields && propFieldValidationErrors) {
15583
+ const allFields2 = [...requiredFields, ...optionalFields];
15584
+ const fieldsInOrder = getAddressSchemaForCountry(dataProp == null ? void 0 : dataProp.country).filter(
15585
+ (field) => allFields2.includes(field)
15586
+ );
15583
15587
  handleChangeFor = handleFieldChange;
15584
15588
  formData = dataProp ?? {};
15585
15589
  formErrors = errorProp;
15586
15590
  formValid = validProp;
15587
15591
  formFieldProblems = propFieldValidationErrors;
15588
- formSchema = requiredFields;
15592
+ formSchema = fieldsInOrder;
15589
15593
  }
15590
15594
  useEffect(() => {
15591
15595
  if (verifiedAddress) {
@@ -19307,7 +19311,10 @@ function PersonalDetails(props) {
19307
19311
  readonly: !isAllowedEditPrefilledCountry && !isDecisionMakerTask || formUtils.isReadOnly("residencyCountry"),
19308
19312
  allowedCountries: isTopLevelEntity ? allowedCountries : void 0,
19309
19313
  classNameModifiers: ["country"],
19310
- handleChangeFor: () => handleFieldChange("residencyCountry", "input")
19314
+ handleChangeFor: () => (e) => {
19315
+ handleFieldChange("residencyCountry", "input")(e);
19316
+ handleChangeFor("country", "address")(e);
19317
+ }
19311
19318
  }
19312
19319
  ),
19313
19320
  isAgeVerificationEnabled && formUtils.isRequiredField("relationship") && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
@@ -29104,6 +29111,7 @@ const useFormComposer = ({
29104
29111
  onSubmit,
29105
29112
  triggerValidation
29106
29113
  }) => {
29114
+ var _a2;
29107
29115
  const [shouldValidate, setShouldValidate] = useState(false);
29108
29116
  const [activeForm, setActiveForm] = useState(forms[0]);
29109
29117
  const isFormSummaryStep = (form) => form.formId === summaryStep.formId;
@@ -29112,6 +29120,7 @@ const useFormComposer = ({
29112
29120
  const totalSteps = forms.length;
29113
29121
  const isFinalStep = currentStep === totalSteps - 1;
29114
29122
  const isFirstStep = currentStep === 0;
29123
+ const firstStepId = (_a2 = forms[0]) == null ? void 0 : _a2.formId;
29115
29124
  useEffect(() => {
29116
29125
  setActiveForm(
29117
29126
  (activeForm2) => forms.find(({ formId }) => formId === activeForm2.formId) ?? activeForm2
@@ -29123,7 +29132,7 @@ const useFormComposer = ({
29123
29132
  useEffect(() => {
29124
29133
  const openingStep = getOpeningStep(forms, problems == null ? void 0 : problems.remediationActions);
29125
29134
  setActiveForm(openingStep);
29126
- }, []);
29135
+ }, [firstStepId, problems == null ? void 0 : problems.remediationActions]);
29127
29136
  const gotoFormByFormIndex = (nextFormIndex) => {
29128
29137
  setActiveForm(forms[nextFormIndex]);
29129
29138
  };
@@ -29407,6 +29416,9 @@ const identityBase = {
29407
29416
  otherAddressInformation: {
29408
29417
  rule: "otherAddressInfoIfRequiredForCountry"
29409
29418
  },
29419
+ country: {
29420
+ rule: "REQUIRED"
29421
+ },
29410
29422
  postalCode: {
29411
29423
  rule: "postalCodeIfRequiredForCountry"
29412
29424
  },
@@ -39962,6 +39974,9 @@ function IndividualDropin({
39962
39974
  return {
39963
39975
  personalDetails: {
39964
39976
  residencyCountry: parentCountry
39977
+ },
39978
+ address: {
39979
+ country: parentCountry
39965
39980
  }
39966
39981
  };
39967
39982
  }, [legalEntityResponse, isTargetLegalEntityType]);
@@ -52142,7 +52157,7 @@ const ConfigurationApiProvider = ({
52142
52157
  }) => {
52143
52158
  const authContext = useAuthContext();
52144
52159
  const { isEmbeddedDropin, loadingContext } = authContext;
52145
- const sdkVersion = "3.51.0";
52160
+ const sdkVersion = "3.51.1";
52146
52161
  const rootLegalEntityId = useGlobalStore((store) => store.rootLegalEntity.id);
52147
52162
  useAnalytics({
52148
52163
  onUserEvent,
@@ -52882,7 +52897,7 @@ const DebugModal = ({ onExit }) => {
52882
52897
  const [tab, setTab] = useState("metadata");
52883
52898
  const rootLegalEntity = useGlobalStore((store) => store.rootLegalEntity);
52884
52899
  const metadata = {
52885
- sdkVersion: "3.51.0",
52900
+ sdkVersion: "3.51.1",
52886
52901
  locale: i18n.locale,
52887
52902
  rootLegalEntityId: rootLegalEntity.id
52888
52903
  };
@@ -55879,7 +55894,7 @@ var TanstackQueryDevtools = (_k = class {
55879
55894
  if (__privateGet(this, _Component)) {
55880
55895
  Devtools = __privateGet(this, _Component);
55881
55896
  } else {
55882
- Devtools = lazy(() => import("./HO4MOOFI-B0LIhOPC.js"));
55897
+ Devtools = lazy(() => import("./HO4MOOFI-C34-7HCT.js"));
55883
55898
  __privateSet(this, _Component, Devtools);
55884
55899
  }
55885
55900
  setupStyleSheet(__privateGet(this, _styleNonce), __privateGet(this, _shadowDOMTarget));
@@ -56001,7 +56016,7 @@ var TanstackQueryDevtoolsPanel = (_l = class {
56001
56016
  if (__privateGet(this, _Component2)) {
56002
56017
  Devtools = __privateGet(this, _Component2);
56003
56018
  } else {
56004
- Devtools = lazy(() => import("./HUY7CZI3-B3UlKGgb.js"));
56019
+ Devtools = lazy(() => import("./HUY7CZI3-amkPei4o.js"));
56005
56020
  __privateSet(this, _Component2, Devtools);
56006
56021
  }
56007
56022
  setupStyleSheet(__privateGet(this, _styleNonce2), __privateGet(this, _shadowDOMTarget2));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adyen/kyc-components",
3
- "version": "3.51.0",
3
+ "version": "3.51.1",
4
4
  "keywords": [
5
5
  "adyen",
6
6
  "adyen-kyc",