everest-npm-features 0.0.31 → 0.0.32

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,25 +1,25 @@
1
1
  import { jsxs as l, Fragment as H, jsx as o } from "react/jsx-runtime";
2
2
  import z from "../../../hoc/withThemeProvider.js";
3
- import { useState as m, useEffect as u } from "react";
3
+ import { useState as m, useEffect as T } from "react";
4
4
  import j from "../../Shared/transition.js";
5
5
  import { C as X } from "../../../Close-CFg1QB5M.js";
6
6
  import q from "./kycType.js";
7
7
  import { KYC_STATUS_IN_PROGRESS as _, BACK_ARROW as Z, INDIVIDUAL_KYC_TYPE as J, KYC_BETWEEN_TRANSATION as I, ORGANIZATION_KYC_TYPE as Q, KYC_UNDER_TRANSATION as $ } from "../../../util/constants.js";
8
- import tt from "./individualKyc.js";
9
- import et from "../../Shared/MinimalKyc/index.js";
10
- import ot from "./kybIntro.js";
11
- import rt from "./kybTerms.js";
12
- import it from "./orgInfo.js";
13
- import st from "./orgDetails.js";
14
- import at from "./verify.js";
15
- import nt from "./success.js";
16
- import { K as f } from "../../../constants-DWENgBjv.js";
17
- import { r as E, k as ct } from "../../../kyc-DbZ4KGFX.js";
18
- import { a as mt, u as pt } from "../../../react-redux-C7I9-1M6.js";
19
- import lt from "../../Shared/loader.js";
20
- import ft from "../Shared/appButton.js";
8
+ import ee from "./individualKyc.js";
9
+ import te from "../../Shared/MinimalKyc/index.js";
10
+ import oe from "./kybIntro.js";
11
+ import re from "./kybTerms.js";
12
+ import ie from "./orgInfo.js";
13
+ import se from "./orgDetails.js";
14
+ import ae from "./verify.js";
15
+ import ne from "./success.js";
16
+ import { K as u } from "../../../constants-DWENgBjv.js";
17
+ import { r as E, k as ce } from "../../../kyc-DbZ4KGFX.js";
18
+ import { a as me, u as pe } from "../../../react-redux-C7I9-1M6.js";
19
+ import le from "../../Shared/loader.js";
20
+ import fe from "../Shared/appButton.js";
21
21
  import "../Shared/Auth/otpForm.js";
22
- import { useSnackBarContext as dt } from "../../../context/snackBarContext.js";
22
+ import { useSnackBarContext as de } from "../../../context/snackBarContext.js";
23
23
  import "../../../util/conversions.js";
24
24
  import "../../../index-CAoLi5Qq.js";
25
25
  import "../../../react-webcam-B3cXh1XT.js";
@@ -30,15 +30,15 @@ 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 Tt } from "../../../index-BvD3O03n.js";
33
+ import { F as Te } from "../../../index-BvD3O03n.js";
34
34
  import "../../../context/dialogContext.js";
35
- import ut from "./edd.js";
36
- import { u as Et } from "../../../useTheme-XTDzJ69d.js";
37
- import { D as Ot, a as Dt } from "../../../DialogContent-_gvZOy18.js";
38
- import { D as Nt } from "../../../DialogTitle-dq22bYlF.js";
39
- import { B as At } from "../../../Box-BwKpr_VI.js";
35
+ import ue from "./edd.js";
36
+ import { u as Ee } from "../../../useTheme-XTDzJ69d.js";
37
+ import { D as Oe, a as De } from "../../../DialogContent-_gvZOy18.js";
38
+ import { D as Ne } from "../../../DialogTitle-dq22bYlF.js";
39
+ import { B as Ae } from "../../../Box-BwKpr_VI.js";
40
40
  import { I as x } from "../../../IconButton-WneJM4uP.js";
41
- import { T as Ct } from "../../../Typography-BQDN44CM.js";
41
+ import { T as Ce } from "../../../Typography-BQDN44CM.js";
42
42
  const O = {
43
43
  type: J,
44
44
  transactAmount: I,
@@ -105,7 +105,7 @@ const O = {
105
105
  file: [],
106
106
  preview: []
107
107
  }
108
- }, _t = {
108
+ }, _e = {
109
109
  ID_CARD: {
110
110
  text: "",
111
111
  file: [],
@@ -126,83 +126,83 @@ const O = {
126
126
  file: [],
127
127
  preview: []
128
128
  }
129
- }, xt = ({
129
+ }, xe = ({
130
130
  configurationId: S,
131
131
  incodeApiKey: R,
132
- incodeApiUrl: h,
133
- incodeOnBoardingUrl: y
132
+ incodeApiUrl: y,
133
+ incodeOnBoardingUrl: h
134
134
  }) => {
135
- const F = Et(), p = mt(), { showAlertMessage: g } = dt(), i = pt((e) => e.user.kyc), d = i.error, D = i.processComplete, [b, T] = m(!1), [a, r] = m(1), [t, c] = m(O), [K, w] = m(_t), [U, k] = m(!1);
136
- u(() => {
137
- d && g({ message: d });
138
- }, [d]), u(() => {
135
+ const F = Ee(), p = me(), { showAlertMessage: g } = de(), i = pe((t) => t.user.kyc), f = i.error, D = i.processComplete, [b, d] = m(!1), [a, r] = m(1), [e, c] = m(O), [K, w] = m(_e), [U, k] = m(!1);
136
+ T(() => {
137
+ f && g({ message: f });
138
+ }, [f]), T(() => {
139
139
  D && r(10);
140
- }, [D]), u(() => () => {
140
+ }, [D]), T(() => () => {
141
141
  p(E());
142
142
  }, []);
143
143
  const M = () => {
144
- let e;
144
+ let t;
145
145
  switch (a) {
146
146
  case 4:
147
- e = 2;
147
+ t = 2;
148
148
  break;
149
149
  case 5:
150
- e = 1;
150
+ t = 1;
151
151
  break;
152
152
  case 11:
153
- e = 11, k((s) => !s);
153
+ t = 11, k((s) => !s);
154
154
  break;
155
155
  default:
156
- e = a - 1;
156
+ t = a - 1;
157
157
  }
158
- r(e);
159
- }, v = (e) => {
160
- c({ ...t, type: e }), r(e === Q ? 5 : (s) => s + 1);
161
- }, Y = (e) => {
162
- c({ ...t, transactAmount: e }), r(e === $ ? 3 : e === I ? 11 : 4);
158
+ r(t);
159
+ }, v = (t) => {
160
+ c({ ...e, type: t }), r(t === Q ? 5 : (s) => s + 1);
161
+ }, Y = (t) => {
162
+ c({ ...e, transactAmount: t }), r(t === $ ? 3 : t === I ? 11 : 4);
163
163
  }, N = () => {
164
- r((e) => e + 1);
165
- }, P = (e) => {
166
- c({ ...t, ...e }), r((s) => s + 1);
167
- }, B = (e) => {
168
- c({ ...t, ...e }), r((s) => s + 1);
164
+ r((t) => t + 1);
165
+ }, P = (t) => {
166
+ c({ ...e, ...t }), r((s) => s + 1);
167
+ }, B = (t) => {
168
+ c({ ...e, ...t }), r((s) => s + 1);
169
169
  }, L = () => {
170
- const e = Object.entries(t).flatMap(([W, C]) => C.file ? C.file.map((V) => ({
170
+ const t = Object.entries(e).flatMap(([W, C]) => C.file ? C.file.map((V) => ({
171
171
  type: W,
172
172
  file: V
173
173
  })) : []), s = {
174
- orgName: t.orgName,
175
- otherOrgName: t.orgOtherName,
176
- websiteUrl: t.website,
177
- phoneNumber: t.phone,
174
+ orgName: e.orgName,
175
+ otherOrgName: e.orgOtherName,
176
+ websiteUrl: e.website,
177
+ phoneNumber: e.phone,
178
178
  address: {
179
- country: t.country,
180
- city: t.city,
181
- fax: t.fax,
182
- postcode: t.postal,
183
- state: t.state,
184
- street: t.street
179
+ country: e.country,
180
+ city: e.city,
181
+ fax: e.fax,
182
+ postcode: e.postal,
183
+ state: e.state,
184
+ street: e.street
185
185
  },
186
186
  edd: {
187
- idDocument: t.ID_CARD.text,
188
- addressDocument: t.ADDRESS_DOCUMENT.text,
189
- auditedFinancialStatement: t.AUDITED_FINANCIAL_STATEMENT.text,
190
- certificateOfGoodStanding: t.CERTIFICATE_OF_GOOD_STANDING.text,
191
- certificateOfIncorporation: t.CERTIFICATE_OF_INCORPORATION.text,
192
- companyRegisterExtract: t.COMPANY_REGISTER_EXTRACT.text,
193
- memorandumOfAssociation: t.MEMORANDUM_OF_ASSOCIATION.text,
194
- ownershipStructureDocument: t.OWNERSHIP_STRUCTURE_DOCUMENT.text,
195
- otherRelevantDocuments: t.OTHER_RELEVANT_DOCUMENT.text
187
+ idDocument: e.ID_CARD.text,
188
+ addressDocument: e.ADDRESS_DOCUMENT.text,
189
+ auditedFinancialStatement: e.AUDITED_FINANCIAL_STATEMENT.text,
190
+ certificateOfGoodStanding: e.CERTIFICATE_OF_GOOD_STANDING.text,
191
+ certificateOfIncorporation: e.CERTIFICATE_OF_INCORPORATION.text,
192
+ companyRegisterExtract: e.COMPANY_REGISTER_EXTRACT.text,
193
+ memorandumOfAssociation: e.MEMORANDUM_OF_ASSOCIATION.text,
194
+ ownershipStructureDocument: e.OWNERSHIP_STRUCTURE_DOCUMENT.text,
195
+ otherRelevantDocuments: e.OTHER_RELEVANT_DOCUMENT.text
196
196
  },
197
- documents: e
197
+ documents: t
198
198
  };
199
- p(ct(s));
199
+ p(ce(s));
200
200
  }, A = () => {
201
201
  a > 1 && a !== 10 ? window.confirm(
202
202
  "Are you sure you want to close this? All progress will be lost."
203
- ) && (T(!1), p(E()), r(1), c(O)) : (T(!1), p(E()), r(1), c(O));
204
- }, G = (e) => {
205
- w(e), alert("API call");
203
+ ) && (d(!1), p(E()), r(1), c(O)) : (d(!1), p(E()), r(1), c(O));
204
+ }, G = (t) => {
205
+ w(t), alert("API call");
206
206
  };
207
207
  let n;
208
208
  switch (a) {
@@ -226,19 +226,19 @@ const O = {
226
226
  }
227
227
  return /* @__PURE__ */ l(H, { children: [
228
228
  i.status !== "" && /* @__PURE__ */ o(
229
- ft,
229
+ fe,
230
230
  {
231
- onClick: () => T(!0),
232
- disabled: i.status === _ || i.status === f,
233
- sx: {
234
- background: i.status === f ? "#28A745 !important" : "inherit",
235
- color: i.status === f ? "#FFFFFF !important" : "inherit"
236
- },
237
- children: i.status === _ ? "KYC Pending" : i.status === f ? "KYC Completed" : "Start KYC"
231
+ onClick: () => d(!0),
232
+ disabled: i.status === _ || i.status === u,
233
+ sx: i.status === u ? {
234
+ background: "#28A745 !important",
235
+ color: "#FFFFFF !important"
236
+ } : void 0,
237
+ children: i.status === _ ? "KYC Pending" : i.status === u ? "KYC Completed" : "Start KYC"
238
238
  }
239
239
  ),
240
240
  /* @__PURE__ */ l(
241
- Ot,
241
+ Oe,
242
242
  {
243
243
  open: b,
244
244
  fullWidth: !0,
@@ -252,16 +252,16 @@ const O = {
252
252
  TransitionComponent: j,
253
253
  children: [
254
254
  /* @__PURE__ */ o(
255
- Nt,
255
+ Ne,
256
256
  {
257
257
  sx: {
258
258
  background: "#FFFFFF",
259
259
  borderBottom: "0.5px solid #D0D0D0",
260
260
  height: "68px"
261
261
  },
262
- children: /* @__PURE__ */ l(At, { display: "flex", alignItems: "center", children: [
262
+ children: /* @__PURE__ */ l(Ae, { display: "flex", alignItems: "center", children: [
263
263
  a !== 1 && a !== 10 && /* @__PURE__ */ o(x, { onClick: M, size: "small", children: /* @__PURE__ */ o("img", { src: Z, alt: "back" }) }),
264
- /* @__PURE__ */ o(Ct, { variant: "subtitle1", fontWeight: 600, ml: 1, children: n }),
264
+ /* @__PURE__ */ o(Ce, { variant: "subtitle1", fontWeight: 600, ml: 1, children: n }),
265
265
  /* @__PURE__ */ o(
266
266
  x,
267
267
  {
@@ -274,41 +274,41 @@ const O = {
274
274
  ] })
275
275
  }
276
276
  ),
277
- /* @__PURE__ */ l(Dt, { sx: { padding: "50px", height: "620px" }, dividers: !0, children: [
278
- i.uploadLoader && /* @__PURE__ */ o(lt, {}),
277
+ /* @__PURE__ */ l(De, { sx: { padding: "50px", height: "620px" }, dividers: !0, children: [
278
+ i.uploadLoader && /* @__PURE__ */ o(le, {}),
279
279
  {
280
- 1: /* @__PURE__ */ o(q, { kycData: t, onNext: v }),
281
- 2: /* @__PURE__ */ o(tt, { kycData: t, onNext: Y }),
282
- 3: /* @__PURE__ */ o(et, { onComplete: () => r(10) }),
283
- 4: /* @__PURE__ */ o(ut, { onNext: G, eddData: K }),
284
- 5: /* @__PURE__ */ o(ot, { onNext: N }),
285
- 6: /* @__PURE__ */ o(rt, { onNext: N }),
286
- 7: /* @__PURE__ */ o(it, { kycData: t, onNext: P }),
280
+ 1: /* @__PURE__ */ o(q, { kycData: e, onNext: v }),
281
+ 2: /* @__PURE__ */ o(ee, { kycData: e, onNext: Y }),
282
+ 3: /* @__PURE__ */ o(te, { onComplete: () => r(10) }),
283
+ 4: /* @__PURE__ */ o(ue, { onNext: G, eddData: K }),
284
+ 5: /* @__PURE__ */ o(oe, { onNext: N }),
285
+ 6: /* @__PURE__ */ o(re, { onNext: N }),
286
+ 7: /* @__PURE__ */ o(ie, { kycData: e, onNext: P }),
287
287
  8: /* @__PURE__ */ o(
288
- st,
288
+ se,
289
289
  {
290
290
  kycStoreData: i,
291
- kycData: t,
291
+ kycData: e,
292
292
  onNext: B
293
293
  }
294
294
  ),
295
295
  9: /* @__PURE__ */ o(
296
- at,
296
+ ae,
297
297
  {
298
- kycData: t,
298
+ kycData: e,
299
299
  onNext: L,
300
300
  onEdit: () => r(7)
301
301
  }
302
302
  ),
303
- 10: /* @__PURE__ */ o(nt, { onNext: A }),
303
+ 10: /* @__PURE__ */ o(ne, { onNext: A }),
304
304
  11: /* @__PURE__ */ o(
305
- Tt,
305
+ Te,
306
306
  {
307
307
  theme: F,
308
308
  configurationId: S,
309
309
  incodeApiKey: R,
310
- incodeApiUrl: h,
311
- incodeOnBoardingUrl: y,
310
+ incodeApiUrl: y,
311
+ incodeOnBoardingUrl: h,
312
312
  updateScreen: U
313
313
  }
314
314
  )
@@ -318,8 +318,8 @@ const O = {
318
318
  }
319
319
  )
320
320
  ] });
321
- }, le = z(xt);
321
+ }, lt = z(xe);
322
322
  export {
323
- xt as EnterpriseKyc,
324
- le as default
323
+ xe as EnterpriseKyc,
324
+ lt as default
325
325
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "everest-npm-features",
3
- "version": "0.0.31",
3
+ "version": "0.0.32",
4
4
  "description": "Everest frontend features library.",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",