everest-npm-features 0.0.39 → 0.0.40

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.
@@ -3,7 +3,7 @@ import "react";
3
3
  import "../../Wallet/Shared/Container/index.js";
4
4
  import "../Incode/index.js";
5
5
  import "../../../hoc/withThemeProvider.js";
6
- import { E as s, I as C, c as D, b as I, a as O, F as P } from "../../../index-CKEqyTf9.js";
6
+ import { E as s, I as C, c as D, b as I, a as O, F as P } from "../../../index-B_ZN1s9v.js";
7
7
  import "./pep.js";
8
8
  import "../../../constants-9grj4Du1.js";
9
9
  import "../../../kyc-MeOwOyUF.js";
@@ -18,7 +18,7 @@ import "../../../index.esm-BsMAMhYW.js";
18
18
  import "../../../web3-u4qDZYpo.js";
19
19
  import "../../../index-B8QKlEgj.js";
20
20
  import "../../../index-ceeCtFuh.js";
21
- import { P as z } from "../../../index-CKEqyTf9.js";
21
+ import { P as z } from "../../../index-B_ZN1s9v.js";
22
22
  import "../../../context/dialogContext.js";
23
23
  import "./countryList.js";
24
24
  import "../../../Box-B0YSYLco.js";
@@ -21,7 +21,7 @@ import "../../../countries-BVn1FubK.js";
21
21
  import "../../../web3-u4qDZYpo.js";
22
22
  import "../../../index-B8QKlEgj.js";
23
23
  import "../../../index-ceeCtFuh.js";
24
- import { U as H } from "../../../index-CKEqyTf9.js";
24
+ import { U as H } from "../../../index-B_ZN1s9v.js";
25
25
  import "../../../context/dialogContext.js";
26
26
  import "./countryList.js";
27
27
  import "../../../Box-B0YSYLco.js";
@@ -30,7 +30,7 @@ import "../../../index.esm-BsMAMhYW.js";
30
30
  import "../../../web3-u4qDZYpo.js";
31
31
  import "../../../index-B8QKlEgj.js";
32
32
  import "../../../index-ceeCtFuh.js";
33
- import { F as b } from "../../../index-CKEqyTf9.js";
33
+ import { F as b } from "../../../index-B_ZN1s9v.js";
34
34
  import "../../../context/dialogContext.js";
35
35
  import { u as de } from "../../../useTheme-BQJ5lp0i.js";
36
36
  import { D as De, a as Oe } from "../../../DialogContent-BMwlOnbW.js";
@@ -219,7 +219,8 @@ const o2 = () => ({
219
219
  {
220
220
  label: "Address Line 2",
221
221
  value: "",
222
- disabled: !0
222
+ disabled: !0,
223
+ required: !1
223
224
  }
224
225
  ),
225
226
  /* @__PURE__ */ e(
@@ -233,7 +234,7 @@ const o2 = () => ({
233
234
  /* @__PURE__ */ e(
234
235
  o,
235
236
  {
236
- label: "State",
237
+ label: "State/Province",
237
238
  value: p.state,
238
239
  disabled: !0
239
240
  }
@@ -1,4 +1,4 @@
1
- import { jsxs as y, Fragment as te, jsx as e } from "react/jsx-runtime";
1
+ import { jsxs as S, Fragment as te, jsx as e } from "react/jsx-runtime";
2
2
  import { useState as r, useEffect as F, useRef as ge } from "react";
3
3
  import { AuthContainer as Ce } from "./components/Wallet/Shared/Container/index.js";
4
4
  import ye from "./components/Shared/Incode/index.js";
@@ -46,7 +46,7 @@ const Be = ({
46
46
  }) => {
47
47
  const l = ue();
48
48
  _e();
49
- const { showAlertMessage: u } = pe(), a = f ?? ce, D = R ?? de, [c, _] = r(i.gender || ""), [m, N] = r(!1), [P, C] = r(i.email || ""), [Y, Z] = r(!1), [K, z] = r(""), [d, I] = r(i.address || ""), [t, O] = r(i.city || ""), [S, M] = r(i.state || ""), [b, A] = r(i.zipCode || ""), [B, q] = r(
49
+ const { showAlertMessage: c } = pe(), a = f ?? ce, D = R ?? de, [d, _] = r(i.gender || ""), [m, N] = r(!1), [P, C] = r(i.email || ""), [Y, Z] = r(!1), [K, q] = r(""), [u, z] = r(i.address || ""), [t, O] = r(i.city || ""), [y, I] = r(i.state || ""), [b, A] = r(i.zipCode || ""), [B, M] = r(
50
50
  i.country || null
51
51
  ), [s, X] = r(!1);
52
52
  F(() => {
@@ -62,9 +62,9 @@ const Be = ({
62
62
  const T = new Date(n.birthDate), $ = T.getTimezoneOffset() * 6e4, W = new Date(
63
63
  T.getTime() + $
64
64
  );
65
- if (z(W.toLocaleDateString("en-US")), (o = n.checkedAddressBean) != null && o.street) {
65
+ if (q(W.toLocaleDateString("en-US")), (o = n.checkedAddressBean) != null && o.street) {
66
66
  const E = n.checkedAddressBean;
67
- X(!0), I(E.street), O(E.city), M(E.state), A(E.postalCode);
67
+ X(!0), z(E.street), O(E.city), I(E.state), A(E.postalCode);
68
68
  }
69
69
  } else
70
70
  U();
@@ -72,11 +72,11 @@ const Be = ({
72
72
  const U = () => {
73
73
  l(ve());
74
74
  };
75
- return /* @__PURE__ */ y(te, { children: [
75
+ return /* @__PURE__ */ S(te, { children: [
76
76
  p !== v && /* @__PURE__ */ e(w, { display: "flex", justifyContent: "center", children: /* @__PURE__ */ e(me, { totalSteps: 4, currentStep: 2 }) }),
77
- /* @__PURE__ */ y(w, { pl: 2, mt: 4, children: [
77
+ /* @__PURE__ */ S(w, { pl: 2, mt: 4, children: [
78
78
  /* @__PURE__ */ e(j, { variant: "h5", sx: { fontWeight: "bold" }, color: "primary", children: "Personal details" }),
79
- p !== v && /* @__PURE__ */ y(te, { children: [
79
+ p !== v && /* @__PURE__ */ S(te, { children: [
80
80
  /* @__PURE__ */ e(j, { variant: "caption", children: "Good news! Some of the information will be populated from scanning your document earlier." }),
81
81
  /* @__PURE__ */ e(
82
82
  a,
@@ -88,15 +88,15 @@ const Be = ({
88
88
  required: !0
89
89
  }
90
90
  ),
91
- /* @__PURE__ */ y(Oe, { sx: { mt: 3 }, fullWidth: !0, children: [
91
+ /* @__PURE__ */ S(Oe, { sx: { mt: 3 }, fullWidth: !0, children: [
92
92
  /* @__PURE__ */ e(Re, { children: "Gender" }),
93
- /* @__PURE__ */ y(
93
+ /* @__PURE__ */ S(
94
94
  Ae,
95
95
  {
96
- value: c,
96
+ value: d,
97
97
  label: "Gender",
98
98
  onChange: (o) => _(o.target.value),
99
- disabled: !!(m && c),
99
+ disabled: !!(m && d),
100
100
  required: !0,
101
101
  children: [
102
102
  /* @__PURE__ */ e(Q, { value: "M", children: "Male" }, "M"),
@@ -123,13 +123,13 @@ const Be = ({
123
123
  {
124
124
  sx: { mt: 3 },
125
125
  label: "Home Address",
126
- value: d,
127
- onChange: (o) => I(o.target.value),
128
- disabled: !!(s && d),
126
+ value: u,
127
+ onChange: (o) => z(o.target.value),
128
+ disabled: !!(s && u),
129
129
  required: !0
130
130
  }
131
131
  ),
132
- /* @__PURE__ */ y(V, { container: !0, spacing: 2, sx: { mt: 3 }, children: [
132
+ /* @__PURE__ */ S(V, { container: !0, spacing: 2, sx: { mt: 3 }, children: [
133
133
  /* @__PURE__ */ e(V, { size: 6, children: /* @__PURE__ */ e(
134
134
  a,
135
135
  {
@@ -143,9 +143,10 @@ const Be = ({
143
143
  /* @__PURE__ */ e(V, { size: 6, children: /* @__PURE__ */ e(
144
144
  a,
145
145
  {
146
- label: "State",
147
- value: S,
148
- onChange: (o) => M(o.target.value)
146
+ label: "State/Province",
147
+ value: y,
148
+ onChange: (o) => I(o.target.value),
149
+ required: !0
149
150
  }
150
151
  ) })
151
152
  ] }),
@@ -164,7 +165,7 @@ const Be = ({
164
165
  re,
165
166
  {
166
167
  value: B,
167
- onChange: q,
168
+ onChange: M,
168
169
  label: "Country of residence"
169
170
  }
170
171
  )
@@ -177,33 +178,34 @@ const Be = ({
177
178
  onClick: () => {
178
179
  if (p !== v) {
179
180
  if (!K)
180
- return u({ message: "Please provide date of birth" });
181
- if (!c)
182
- return u({ message: "Please provide gender" });
181
+ return c({ message: "Please provide date of birth" });
182
+ if (!d)
183
+ return c({ message: "Please provide gender" });
183
184
  }
184
- if (!d)
185
- return u({ message: "Please provide address" });
186
- if (!t) return u({ message: "Please provide city" });
185
+ if (!u)
186
+ return c({ message: "Please provide address" });
187
+ if (!t) return c({ message: "Please provide city" });
188
+ if (!y) return c({ message: "Please provide state" });
187
189
  if (!b)
188
- return u({ message: "Please provide zip code" });
190
+ return c({ message: "Please provide zip code" });
189
191
  if (!B)
190
- return u({
192
+ return c({
191
193
  message: "Please select country of residency"
192
194
  });
193
195
  x({
194
196
  ...i,
195
- gender: c,
197
+ gender: d,
196
198
  email: P,
197
- address: d,
199
+ address: u,
198
200
  city: t,
199
- state: S,
201
+ state: y,
200
202
  zipCode: b,
201
203
  country: B
202
204
  }), h(
203
205
  p !== v ? se : oe
204
206
  );
205
207
  },
206
- disabled: p !== v && !P || p !== v && !c || !d || !B,
208
+ disabled: p !== v && !P || p !== v && !d || !u || !B,
207
209
  fullWidth: !0,
208
210
  children: /* @__PURE__ */ e("strong", { children: "Next" })
209
211
  }
@@ -216,21 +218,21 @@ const Be = ({
216
218
  inputComponent: i,
217
219
  buttonComponent: n
218
220
  }) => {
219
- const { showAlertMessage: h } = pe(), g = i ?? ce, p = n ?? de, [l, u] = r(
221
+ const { showAlertMessage: h } = pe(), g = i ?? ce, p = n ?? de, [l, c] = r(
220
222
  f.placeOfBirth || null
221
223
  ), [a, D] = r(
222
224
  f.nationality || null
223
- ), [c, _] = r(f.occupation || ""), [m, N] = r(f.employer || "");
224
- return /* @__PURE__ */ y(te, { children: [
225
+ ), [d, _] = r(f.occupation || ""), [m, N] = r(f.employer || "");
226
+ return /* @__PURE__ */ S(te, { children: [
225
227
  /* @__PURE__ */ e(w, { display: "flex", justifyContent: "center", children: /* @__PURE__ */ e(me, { totalSteps: 4, currentStep: 3 }) }),
226
- /* @__PURE__ */ y(w, { pl: 2, mt: 4, children: [
228
+ /* @__PURE__ */ S(w, { pl: 2, mt: 4, children: [
227
229
  /* @__PURE__ */ e(j, { variant: "h5", sx: { fontWeight: "bold" }, color: "primary", children: "More Personal details" }),
228
230
  /* @__PURE__ */ e(j, { variant: "caption", children: "Good news! Some of the information will be populated from scanning your document earlier." }),
229
231
  /* @__PURE__ */ e(
230
232
  re,
231
233
  {
232
234
  value: l,
233
- onChange: u,
235
+ onChange: c,
234
236
  label: "Place Of Birth"
235
237
  }
236
238
  ),
@@ -247,7 +249,7 @@ const Be = ({
247
249
  {
248
250
  sx: { mt: 3 },
249
251
  label: "Occupation",
250
- value: c,
252
+ value: d,
251
253
  onChange: (C) => _(C.target.value)
252
254
  }
253
255
  ),
@@ -275,7 +277,7 @@ const Be = ({
275
277
  h({ message: "Please provide address" });
276
278
  return;
277
279
  }
278
- if (!c) {
280
+ if (!d) {
279
281
  h({ message: "Please provide city" });
280
282
  return;
281
283
  }
@@ -283,11 +285,11 @@ const Be = ({
283
285
  ...f,
284
286
  placeOfBirth: l,
285
287
  nationality: a,
286
- occupation: c,
288
+ occupation: d,
287
289
  employer: m
288
290
  }), x(oe);
289
291
  },
290
- disabled: !l || !a || !c || !m,
292
+ disabled: !l || !a || !d || !m,
291
293
  fullWidth: !0,
292
294
  children: /* @__PURE__ */ e("strong", { children: "Next" })
293
295
  }
@@ -320,16 +322,16 @@ const Be = ({
320
322
  isModalView: p = !1,
321
323
  kycFlow: l
322
324
  }) => {
323
- const u = ge(!0), a = ue(), D = J((s) => s.user), c = J((s) => s.user.kyc), _ = J((s) => s.session.uuid), m = D.kyc, N = m.processComplete, P = {}, [C, Y] = r(P), [Z, K] = r({ token: "" }), [z, d] = r(
325
+ const c = ge(!0), a = ue(), D = J((s) => s.user), d = J((s) => s.user.kyc), _ = J((s) => s.session.uuid), m = D.kyc, N = m.processComplete, P = {}, [C, Y] = r(P), [Z, K] = r({ token: "" }), [q, u] = r(
324
326
  l === v ? k : ee
325
327
  );
326
328
  F(() => {
327
- if (u.current) {
328
- u.current = !1;
329
+ if (c.current) {
330
+ c.current = !1;
329
331
  return;
330
332
  }
331
333
  let s;
332
- switch (z) {
334
+ switch (q) {
333
335
  case k:
334
336
  s = ee;
335
337
  break;
@@ -342,11 +344,11 @@ const Be = ({
342
344
  default:
343
345
  s = ee;
344
346
  }
345
- d(s);
347
+ u(s);
346
348
  }, [g]), F(() => {
347
349
  h && N && h();
348
350
  }, [h, N]);
349
- const I = {
351
+ const z = {
350
352
  gender: "",
351
353
  email: "",
352
354
  address: "",
@@ -364,10 +366,10 @@ const Be = ({
364
366
  frequency: "",
365
367
  reason: "",
366
368
  source: ""
367
- }, [t, O] = r(I), [S, M] = r(Fe);
369
+ }, [t, O] = r(z), [y, I] = r(Fe);
368
370
  F(() => {
369
- S.BANK_STATEMENT.file.length > 0 && b(S);
370
- }, [S]);
371
+ y.BANK_STATEMENT.file.length > 0 && b(y);
372
+ }, [y]);
371
373
  const b = (s) => {
372
374
  A(
373
375
  t.isPoliticalExpose,
@@ -382,7 +384,7 @@ const Be = ({
382
384
  }, A = (s, X, U, H, o, L, T, $ = !1) => {
383
385
  var W, E, ie;
384
386
  if (l !== be && !$) {
385
- d(Te);
387
+ u(Te);
386
388
  return;
387
389
  }
388
390
  if (!m.loader) {
@@ -428,13 +430,13 @@ const Be = ({
428
430
  }
429
431
  a(xe(ne));
430
432
  }
431
- }, q = {
433
+ }, M = {
432
434
  INCODE_SCREEN: /* @__PURE__ */ e(
433
435
  ye,
434
436
  {
435
437
  uuid: _,
436
438
  successHandler: () => {
437
- d(k);
439
+ u(k);
438
440
  },
439
441
  configurationId: f,
440
442
  apiKey: R,
@@ -449,7 +451,7 @@ const Be = ({
449
451
  Be,
450
452
  {
451
453
  docData: C,
452
- setScreen: d,
454
+ setScreen: u,
453
455
  setUserInfo: O,
454
456
  userInfo: t,
455
457
  userEmail: D.profile.email,
@@ -459,7 +461,7 @@ const Be = ({
459
461
  PERSONAL_DETAILS_SCREEN: /* @__PURE__ */ e(
460
462
  Le,
461
463
  {
462
- setScreen: d,
464
+ setScreen: u,
463
465
  setUserInfo: O,
464
466
  userInfo: t
465
467
  }
@@ -467,7 +469,7 @@ const Be = ({
467
469
  PEP_SCREEN: /* @__PURE__ */ e(
468
470
  Ne,
469
471
  {
470
- setScreen: d,
472
+ setScreen: u,
471
473
  setUserInfo: O,
472
474
  userInfo: t,
473
475
  processKyc: A,
@@ -478,15 +480,15 @@ const Be = ({
478
480
  EDD_SCREEN: /* @__PURE__ */ e(
479
481
  Pe,
480
482
  {
481
- kycStoreData: c,
482
- eddData: S,
483
- setEddData: M,
483
+ kycStoreData: d,
484
+ eddData: y,
485
+ setEddData: I,
484
486
  processKyc: b,
485
487
  processLoader: m.loader
486
488
  }
487
489
  )
488
- }[z];
489
- return n ? /* @__PURE__ */ e(Ce, { addPadding: !1, children: q }) : q;
490
+ }[q];
491
+ return n ? /* @__PURE__ */ e(Ce, { addPadding: !1, children: M }) : M;
490
492
  }, Ct = Se(Ke);
491
493
  export {
492
494
  Te as E,
package/dist/main.js CHANGED
@@ -16,7 +16,7 @@ import { i as K } from "./index-CUhPCwCD.js";
16
16
  import { i as A } from "./index-grkjwLQL.js";
17
17
  import { default as H } from "./components/Wallet/EnterpriseKyc/index.js";
18
18
  import { default as M } from "./components/Wallet/Deposit/index.js";
19
- import { F as W } from "./index-CKEqyTf9.js";
19
+ import { F as W } from "./index-B_ZN1s9v.js";
20
20
  import { useSnackBar as j } from "./hooks/useSnackBar.js";
21
21
  import { SnackBarContext as z, useSnackBarContext as G } from "./context/snackBarContext.js";
22
22
  import { useDialog as L } from "./hooks/useDialog/index.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "everest-npm-features",
3
- "version": "0.0.39",
3
+ "version": "0.0.40",
4
4
  "description": "Everest frontend features library.",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",