gbc-kyc-kit 1.8.13 → 1.8.15

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.
@@ -18009,9 +18009,6 @@ function createFormControl(props = {}, flushRootRender) {
18009
18009
  }
18010
18010
  });
18011
18011
  _names.mount.add(name);
18012
- if (!isUndefined(options.value)) {
18013
- set$1(_formValues, name, options.value);
18014
- }
18015
18012
  field ? disabledIsDefined && set$1(_formValues, name, options.disabled ? void 0 : get$2(_formValues, name, getFieldValue(field._f))) : updateValidAndValue(name, true, options.value);
18016
18013
  return {
18017
18014
  ...disabledIsDefined ? { disabled: options.disabled } : {},
@@ -21702,22 +21699,22 @@ var o = function(o2, n2, a) {
21702
21699
  }
21703
21700
  };
21704
21701
  };
21705
- function r(e2) {
21702
+ function r$1(e2) {
21706
21703
  var t2, f2, n2 = "";
21707
21704
  if ("string" == typeof e2 || "number" == typeof e2)
21708
21705
  n2 += e2;
21709
21706
  else if ("object" == typeof e2)
21710
21707
  if (Array.isArray(e2))
21711
21708
  for (t2 = 0; t2 < e2.length; t2++)
21712
- e2[t2] && (f2 = r(e2[t2])) && (n2 && (n2 += " "), n2 += f2);
21709
+ e2[t2] && (f2 = r$1(e2[t2])) && (n2 && (n2 += " "), n2 += f2);
21713
21710
  else
21714
21711
  for (t2 in e2)
21715
21712
  e2[t2] && (n2 && (n2 += " "), n2 += t2);
21716
21713
  return n2;
21717
21714
  }
21718
- function clsx() {
21715
+ function clsx$1() {
21719
21716
  for (var e2, t2, f2 = 0, n2 = ""; f2 < arguments.length; )
21720
- (e2 = arguments[f2++]) && (t2 = r(e2)) && (n2 && (n2 += " "), n2 += t2);
21717
+ (e2 = arguments[f2++]) && (t2 = r$1(e2)) && (n2 && (n2 += " "), n2 += t2);
21721
21718
  return n2;
21722
21719
  }
21723
21720
  const u = (t2) => "number" == typeof t2 && !isNaN(t2), d = (t2) => "string" == typeof t2, p$1 = (t2) => "function" == typeof t2, m$1 = (t2) => d(t2) || p$1(t2) ? t2 : null, f$1 = (t2) => isValidElement(t2) || d(t2) || p$1(t2) || u(t2);
@@ -21917,15 +21914,15 @@ function O(e2) {
21917
21914
  let { delay: n2, isRunning: o2, closeToast: s, type: a = "default", hide: r2, className: i, style: l2, controlledProgress: u2, progress: d2, rtl: m2, isIn: f2, theme: g2 } = e2;
21918
21915
  const h2 = r2 || u2 && 0 === d2, y2 = { ...l2, animationDuration: `${n2}ms`, animationPlayState: o2 ? "running" : "paused", opacity: h2 ? 0 : 1 };
21919
21916
  u2 && (y2.transform = `scaleX(${d2})`);
21920
- const v2 = clsx("Toastify__progress-bar", u2 ? "Toastify__progress-bar--controlled" : "Toastify__progress-bar--animated", `Toastify__progress-bar-theme--${g2}`, `Toastify__progress-bar--${a}`, { "Toastify__progress-bar--rtl": m2 }), T2 = p$1(i) ? i({ rtl: m2, type: a, defaultClassName: v2 }) : clsx(v2, i);
21917
+ const v2 = clsx$1("Toastify__progress-bar", u2 ? "Toastify__progress-bar--controlled" : "Toastify__progress-bar--animated", `Toastify__progress-bar-theme--${g2}`, `Toastify__progress-bar--${a}`, { "Toastify__progress-bar--rtl": m2 }), T2 = p$1(i) ? i({ rtl: m2, type: a, defaultClassName: v2 }) : clsx$1(v2, i);
21921
21918
  return React__default$1.createElement("div", { role: "progressbar", "aria-hidden": h2 ? "true" : "false", "aria-label": "notification timer", className: T2, style: y2, [u2 && d2 >= 1 ? "onTransitionEnd" : "onAnimationEnd"]: u2 && d2 < 1 ? null : () => {
21922
21919
  f2 && s();
21923
21920
  } });
21924
21921
  }
21925
21922
  const N = (n2) => {
21926
- const { isRunning: o2, preventExitTransition: s, toastRef: r2, eventHandlers: i } = _(n2), { closeButton: l2, children: u2, autoClose: d2, onClick: m2, type: f2, hideProgressBar: g2, closeToast: h2, transition: y2, position: v2, className: T2, style: E2, bodyClassName: C2, bodyStyle: b2, progressClassName: I2, progressStyle: N2, updateId: M2, role: R2, progress: w, rtl: x, toastId: $, deleteToast: k2, isIn: P2, isLoading: B2, iconOut: D2, closeOnClick: A2, theme: z2 } = n2, F2 = clsx("Toastify__toast", `Toastify__toast-theme--${z2}`, `Toastify__toast--${f2}`, { "Toastify__toast--rtl": x }, { "Toastify__toast--close-on-click": A2 }), H2 = p$1(T2) ? T2({ rtl: x, position: v2, type: f2, defaultClassName: F2 }) : clsx(F2, T2), S2 = !!w || !d2, q2 = { closeToast: h2, type: f2, theme: z2 };
21923
+ const { isRunning: o2, preventExitTransition: s, toastRef: r2, eventHandlers: i } = _(n2), { closeButton: l2, children: u2, autoClose: d2, onClick: m2, type: f2, hideProgressBar: g2, closeToast: h2, transition: y2, position: v2, className: T2, style: E2, bodyClassName: C2, bodyStyle: b2, progressClassName: I2, progressStyle: N2, updateId: M2, role: R2, progress: w, rtl: x, toastId: $, deleteToast: k2, isIn: P2, isLoading: B2, iconOut: D2, closeOnClick: A2, theme: z2 } = n2, F2 = clsx$1("Toastify__toast", `Toastify__toast-theme--${z2}`, `Toastify__toast--${f2}`, { "Toastify__toast--rtl": x }, { "Toastify__toast--close-on-click": A2 }), H2 = p$1(T2) ? T2({ rtl: x, position: v2, type: f2, defaultClassName: F2 }) : clsx$1(F2, T2), S2 = !!w || !d2, q2 = { closeToast: h2, type: f2, theme: z2 };
21927
21924
  let Q2 = null;
21928
- return false === l2 || (Q2 = p$1(l2) ? l2(q2) : isValidElement(l2) ? cloneElement(l2, q2) : L(q2)), React__default$1.createElement(y2, { isIn: P2, done: k2, position: v2, preventExitTransition: s, nodeRef: r2 }, React__default$1.createElement("div", { id: $, onClick: m2, className: H2, ...i, style: E2, ref: r2 }, React__default$1.createElement("div", { ...P2 && { role: R2 }, className: p$1(C2) ? C2({ type: f2 }) : clsx("Toastify__toast-body", C2), style: b2 }, null != D2 && React__default$1.createElement("div", { className: clsx("Toastify__toast-icon", { "Toastify--animate-icon Toastify__zoom-enter": !B2 }) }, D2), React__default$1.createElement("div", null, u2)), Q2, React__default$1.createElement(O, { ...M2 && !S2 ? { key: `pb-${M2}` } : {}, rtl: x, theme: z2, delay: d2, isRunning: o2, isIn: P2, closeToast: h2, hide: g2, type: f2, style: N2, className: I2, controlledProgress: S2, progress: w || 0 })));
21925
+ return false === l2 || (Q2 = p$1(l2) ? l2(q2) : isValidElement(l2) ? cloneElement(l2, q2) : L(q2)), React__default$1.createElement(y2, { isIn: P2, done: k2, position: v2, preventExitTransition: s, nodeRef: r2 }, React__default$1.createElement("div", { id: $, onClick: m2, className: H2, ...i, style: E2, ref: r2 }, React__default$1.createElement("div", { ...P2 && { role: R2 }, className: p$1(C2) ? C2({ type: f2 }) : clsx$1("Toastify__toast-body", C2), style: b2 }, null != D2 && React__default$1.createElement("div", { className: clsx$1("Toastify__toast-icon", { "Toastify--animate-icon Toastify__zoom-enter": !B2 }) }, D2), React__default$1.createElement("div", null, u2)), Q2, React__default$1.createElement(O, { ...M2 && !S2 ? { key: `pb-${M2}` } : {}, rtl: x, theme: z2, delay: d2, isRunning: o2, isIn: P2, closeToast: h2, hide: g2, type: f2, style: N2, className: I2, controlledProgress: S2, progress: w || 0 })));
21929
21926
  }, M = function(t2, e2) {
21930
21927
  return void 0 === e2 && (e2 = false), { enter: `Toastify--animate Toastify__${t2}-enter`, exit: `Toastify--animate Toastify__${t2}-exit`, appendPosition: e2 };
21931
21928
  }, R = h(M("bounce", true));
@@ -21935,8 +21932,8 @@ h(M("flip"));
21935
21932
  const k$1 = forwardRef((e2, n2) => {
21936
21933
  const { getToastToRender: o2, containerRef: a, isToastActive: r2 } = C(e2), { className: i, style: l2, rtl: u2, containerId: d2 } = e2;
21937
21934
  function f2(t2) {
21938
- const e3 = clsx("Toastify__toast-container", `Toastify__toast-container--${t2}`, { "Toastify__toast-container--rtl": u2 });
21939
- return p$1(i) ? i({ position: t2, rtl: u2, defaultClassName: e3 }) : clsx(e3, m$1(i));
21935
+ const e3 = clsx$1("Toastify__toast-container", `Toastify__toast-container--${t2}`, { "Toastify__toast-container--rtl": u2 });
21936
+ return p$1(i) ? i({ position: t2, rtl: u2, defaultClassName: e3 }) : clsx$1(e3, m$1(i));
21940
21937
  }
21941
21938
  return useEffect(() => {
21942
21939
  n2 && (n2.current = a.current);
@@ -22104,14 +22101,14 @@ function useGeolocation(inProduction) {
22104
22101
  return geolocation;
22105
22102
  }
22106
22103
  const saveDataToDB = async ({ data: data2, component, eventId, inProduction, source: source2, clientId, geolocation }) => {
22104
+ let customHeaders = {};
22105
+ geolocation && Object.assign(customHeaders, { check_ip: JSON.stringify(geolocation) });
22107
22106
  const parseReq = {
22108
22107
  method: "POST",
22109
22108
  inProduction,
22110
22109
  path: `api/v1/kyc-kit/events/register/${component}/${source2}/${clientId}/${eventId}`,
22111
22110
  bodyParams: data2,
22112
- customHeaders: {
22113
- check_ip: JSON.stringify(geolocation)
22114
- }
22111
+ customHeaders
22115
22112
  };
22116
22113
  try {
22117
22114
  const res = await request2(parseReq);
@@ -22201,12 +22198,12 @@ const BlackListController = (clientId, authorize, eventId, inProduction, country
22201
22198
  customHeaders,
22202
22199
  inProduction,
22203
22200
  bodyParams: {
22204
- first_name,
22205
- second_name,
22206
- first_last_name,
22207
- second_last_name,
22208
- country: select,
22209
- birth_date: Date.parse(birth_date)
22201
+ first_name: first_name === "" ? null : first_name,
22202
+ second_name: second_name === "" ? null : second_name,
22203
+ first_last_name: first_last_name === "" ? null : first_last_name,
22204
+ second_last_name: second_last_name === "" ? null : second_last_name,
22205
+ country: select === "" ? null : select,
22206
+ birth_date: birth_date ? Date.parse(birth_date) : null
22210
22207
  }
22211
22208
  };
22212
22209
  setDataReq(parseReq.bodyParams);
@@ -22221,12 +22218,12 @@ const BlackListController = (clientId, authorize, eventId, inProduction, country
22221
22218
  const dataToRegisterBlackList = {
22222
22219
  request_match: match2,
22223
22220
  request_payload: payload,
22224
- first_name,
22225
- second_name,
22226
- first_last_name,
22227
- second_last_name,
22228
- country: select,
22229
- date_birth: Date.parse(birth_date)
22221
+ first_name: first_name === "" ? null : first_name,
22222
+ second_name: second_name === "" ? null : second_name,
22223
+ first_last_name: first_last_name === "" ? null : first_last_name,
22224
+ second_last_name: second_last_name === "" ? null : second_last_name,
22225
+ country: select === "" ? null : select,
22226
+ birth_date: birth_date ? Date.parse(birth_date) : null
22230
22227
  };
22231
22228
  await saveDataToDB({
22232
22229
  data: dataToRegisterBlackList,
@@ -26061,6 +26058,24 @@ function extendSxProp(props) {
26061
26058
  sx: finalSx
26062
26059
  });
26063
26060
  }
26061
+ function r(e2) {
26062
+ var t2, f2, n2 = "";
26063
+ if ("string" == typeof e2 || "number" == typeof e2)
26064
+ n2 += e2;
26065
+ else if ("object" == typeof e2)
26066
+ if (Array.isArray(e2))
26067
+ for (t2 = 0; t2 < e2.length; t2++)
26068
+ e2[t2] && (f2 = r(e2[t2])) && (n2 && (n2 += " "), n2 += f2);
26069
+ else
26070
+ for (t2 in e2)
26071
+ e2[t2] && (n2 && (n2 += " "), n2 += t2);
26072
+ return n2;
26073
+ }
26074
+ function clsx() {
26075
+ for (var e2, t2, f2 = 0, n2 = ""; f2 < arguments.length; )
26076
+ (e2 = arguments[f2++]) && (t2 = r(e2)) && (n2 && (n2 += " "), n2 += t2);
26077
+ return n2;
26078
+ }
26064
26079
  const _excluded$7 = ["className", "component"];
26065
26080
  function createBox(options = {}) {
26066
26081
  const {
@@ -26156,6 +26171,12 @@ function shouldForwardProp(prop) {
26156
26171
  return prop !== "ownerState" && prop !== "theme" && prop !== "sx" && prop !== "as";
26157
26172
  }
26158
26173
  const systemDefaultTheme = createTheme$1();
26174
+ const lowercaseFirstLetter = (string2) => {
26175
+ if (!string2) {
26176
+ return string2;
26177
+ }
26178
+ return string2.charAt(0).toLowerCase() + string2.slice(1);
26179
+ };
26159
26180
  function resolveTheme({
26160
26181
  defaultTheme: defaultTheme2,
26161
26182
  theme,
@@ -26163,6 +26184,12 @@ function resolveTheme({
26163
26184
  }) {
26164
26185
  return isEmpty(theme) ? defaultTheme2 : theme[themeId] || theme;
26165
26186
  }
26187
+ function defaultOverridesResolver(slot) {
26188
+ if (!slot) {
26189
+ return null;
26190
+ }
26191
+ return (props, styles2) => styles2[slot];
26192
+ }
26166
26193
  function createStyled2(input = {}) {
26167
26194
  const {
26168
26195
  themeId,
@@ -26186,13 +26213,13 @@ function createStyled2(input = {}) {
26186
26213
  slot: componentSlot,
26187
26214
  skipVariantsResolver: inputSkipVariantsResolver,
26188
26215
  skipSx: inputSkipSx,
26189
- overridesResolver
26216
+ overridesResolver = defaultOverridesResolver(lowercaseFirstLetter(componentSlot))
26190
26217
  } = inputOptions, options = _objectWithoutPropertiesLoose$1(inputOptions, _excluded$5);
26191
- const skipVariantsResolver = inputSkipVariantsResolver !== void 0 ? inputSkipVariantsResolver : componentSlot && componentSlot !== "Root" || false;
26218
+ const skipVariantsResolver = inputSkipVariantsResolver !== void 0 ? inputSkipVariantsResolver : componentSlot && componentSlot !== "Root" && componentSlot !== "root" || false;
26192
26219
  const skipSx = inputSkipSx || false;
26193
26220
  let label;
26194
26221
  let shouldForwardPropOption = shouldForwardProp;
26195
- if (componentSlot === "Root") {
26222
+ if (componentSlot === "Root" || componentSlot === "root") {
26196
26223
  shouldForwardPropOption = rootShouldForwardProp2;
26197
26224
  } else if (componentSlot) {
26198
26225
  shouldForwardPropOption = slotShouldForwardProp;