everest-npm-features 0.0.46 → 0.0.48
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.
- package/dist/{PlayArrow-Cm8tJN8W.js → PlayArrow-Cnrxi5yr.js} +1 -1
- package/dist/assets/styles.css +1 -1
- package/dist/assets/styles2.css +1 -1
- package/dist/assets/styles3.css +1 -1
- package/dist/assets/styles4.css +1 -0
- package/dist/{auth-D0r8wtCH.js → auth-C45E0xvK.js} +1 -1
- package/dist/{bank-BmV_keEr.js → bank-DIdz4BaB.js} +1 -1
- package/dist/components/RocketRamp/MinimalKyc/form.js +2 -2
- package/dist/components/RocketRamp/Player/Buy/cardPayment.js +3 -3
- package/dist/components/RocketRamp/Player/Buy/confirmTransaction.js +3 -3
- package/dist/components/RocketRamp/Player/Buy/form.js +4 -4
- package/dist/components/RocketRamp/Player/Buy/index.js +5 -5
- package/dist/components/RocketRamp/Player/Dashboard/index.js +2 -2
- package/dist/components/RocketRamp/Player/Sell/confirmTransaction.js +3 -3
- package/dist/components/RocketRamp/Player/Sell/form.js +4 -4
- package/dist/components/RocketRamp/Player/Sell/index.js +5 -5
- package/dist/components/RocketRamp/Player/SignIn/index.js +2 -2
- package/dist/components/RocketRamp/Player/SignIn/loginForm.js +2 -2
- package/dist/components/RocketRamp/Player/SignIn/otpForm.js +2 -2
- package/dist/components/RocketRamp/Player/SignUp/email.js +2 -2
- package/dist/components/RocketRamp/Player/SignUp/index.js +2 -2
- package/dist/components/RocketRamp/Player/SignUp/personalInfo.js +2 -2
- package/dist/components/RocketRamp/ResetPassword/index.js +2 -2
- package/dist/components/RocketRamp/Store/SignUp/index.js +2 -2
- package/dist/components/RocketRamp/Store/SignUp/personalInfo.js +2 -2
- package/dist/components/RocketRamp/Store/SignUp/storeInfo.js +2 -2
- package/dist/components/RocketRamp/Transactions/index.js +2 -2
- package/dist/components/Shared/FullKyc/edd.js +2 -2
- package/dist/components/Shared/FullKyc/index.js +3 -3
- package/dist/components/Shared/FullKyc/pep.js +1 -1
- package/dist/components/Shared/FullKyc/personalDetails.js +2 -2
- package/dist/components/Shared/FullKyc/userInfo.js +3 -3
- package/dist/components/Shared/MinimalKyc/index.js +2 -2
- package/dist/components/Wallet/Account/createIban.js +1 -1
- package/dist/components/Wallet/Account/iban.js +2 -2
- package/dist/components/Wallet/Account/ibanItem.js +1 -1
- package/dist/components/Wallet/Account/index.js +3 -3
- package/dist/components/Wallet/Account/sendIban.js +2 -2
- package/dist/components/Wallet/Buy/confirmTransaction.js +5 -5
- package/dist/components/Wallet/Buy/form.js +5 -5
- package/dist/components/Wallet/Buy/index.js +6 -6
- package/dist/components/Wallet/Deposit/index.js +1 -1
- package/dist/components/Wallet/EnterpriseKyc/edd.js +1 -1
- package/dist/components/Wallet/EnterpriseKyc/index.js +3 -3
- package/dist/components/Wallet/EnterpriseKyc/orgDetails.js +2 -2
- package/dist/components/Wallet/EnterpriseKyc/orgInfo.js +1 -1
- package/dist/components/Wallet/EnterpriseKyc/verify.js +1 -1
- package/dist/components/Wallet/History/index.js +2 -2
- package/dist/components/Wallet/MoveToEthereumOrEverChain/index.js +2 -2
- package/dist/components/Wallet/Portfolio/index.js +18 -18
- package/dist/components/Wallet/Profile/documents.js +526 -28
- package/dist/components/Wallet/Profile/index.js +178 -149
- package/dist/components/Wallet/Profile/storage.d.ts +11 -0
- package/dist/components/Wallet/Profile/storage.js +267 -0
- package/dist/components/Wallet/Receive/index.js +2 -2
- package/dist/components/Wallet/Sell/confirmTransaction.js +4 -4
- package/dist/components/Wallet/Sell/form.js +5 -5
- package/dist/components/Wallet/Sell/index.js +6 -6
- package/dist/components/Wallet/Send/index.js +29 -29
- package/dist/components/Wallet/Shared/Auth/otpForm.js +2 -2
- package/dist/components/Wallet/Shared/BankSelect/index.js +4 -4
- package/dist/components/Wallet/Shared/CardCorp/index.js +1 -1
- package/dist/components/Wallet/Shared/addBank.js +2 -2
- package/dist/components/Wallet/Shared/connectPlaidBank.js +2 -2
- package/dist/components/Wallet/Shared/manualSend.js +4 -4
- package/dist/components/Wallet/Shared/pin.js +1 -1
- package/dist/components/Wallet/SignIn/index.js +2 -2
- package/dist/components/Wallet/SignUp/index.js +2 -2
- package/dist/components/Wallet/Stake/gems/index.js +1 -1
- package/dist/components/Wallet/Stake/id/index.js +1 -1
- package/dist/components/Wallet/Stake/index.js +4 -4
- package/dist/components/Wallet/Swap/form.js +6 -6
- package/dist/components/Wallet/Swap/index.js +5 -5
- package/dist/components/Wallet/Withdraw/bankSelect.js +5 -5
- package/dist/components/Wallet/Withdraw/confirmTransaction.js +4 -4
- package/dist/components/Wallet/Withdraw/form.js +5 -5
- package/dist/components/Wallet/Withdraw/index.js +5 -5
- package/dist/{constants-BJhUp96H.js → constants-BSdmHYnc.js} +364 -359
- package/dist/{cryptoAssets-Q_UWeuzR.js → cryptoAssets-BdNVnpA_.js} +1 -1
- package/dist/hooks/useDialog/index.js +1 -1
- package/dist/{index-pCrOsXNC.js → index-BXF4OI74.js} +17 -17
- package/dist/{index-Dkjl8hIv.js → index-Be3ndI6s.js} +13 -13
- package/dist/{index-Dq5wTY4S.js → index-BlfzmV5M.js} +4 -4
- package/dist/{index-BRnTzw1Z.js → index-CRyby3Qm.js} +2 -2
- package/dist/{index-B2wXmFh5.js → index-Cvp4wWrB.js} +5 -5
- package/dist/{index-DegQ9bTI.js → index-D3OzGVxQ.js} +7 -7
- package/dist/{index-BTqlsA2t.js → index-HZ9RrpTC.js} +113 -120
- package/dist/{kyc-DLaLS7sp.js → kyc-BQsiHtP6.js} +1 -1
- package/dist/main.js +7 -7
- package/dist/{order-fWKVFTau.js → order-BKKCskeq.js} +1 -1
- package/dist/{stake-CQLutF0z.js → stake-WjG22nIX.js} +1 -1
- package/dist/{styles.module-O5VVND5e.js → styles.module-C1sNeKjL.js} +1 -1
- package/dist/styles.module-CHPRGltL.js +28 -0
- package/dist/{styles.module-CHEBh2ID.js → styles.module-DMd29SPQ.js} +1 -1
- package/dist/{styles.module-CUA1zLEJ.js → styles.module-verVx4pE.js} +1 -1
- package/dist/util/constants.d.ts +3 -0
- package/dist/util/constants.js +83 -80
- package/dist/util/functions.js +36 -36
- package/dist/{wallet-CuQDBP6a.js → wallet-BXA-R-Ks.js} +1 -1
- package/package.json +2 -2
- package/dist/assets/documents.css +0 -1
- package/dist/documents-RjwlADn2.js +0 -552
|
@@ -1,30 +1,528 @@
|
|
|
1
|
-
import "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
|
-
import "../../../Close-CNwiMz_O.js";
|
|
4
|
-
import "../../../Delete-jpMstGIF.js";
|
|
5
|
-
import "../../../Cancel-4lT7GZUA.js";
|
|
6
|
-
import "../Shared/inputField.js";
|
|
7
|
-
import "../Shared/step.js";
|
|
8
|
-
import "../../../react-webcam-B3cXh1XT.js";
|
|
9
|
-
import {
|
|
10
|
-
import "../../Shared/transition.js";
|
|
11
|
-
import "../../../util/functions.js";
|
|
12
|
-
import "../../../react-redux-B4BZippc.js";
|
|
13
|
-
import "../../../constants-
|
|
14
|
-
import "../../../index-BQNs1mvn.js";
|
|
15
|
-
import "../../../
|
|
16
|
-
import "../../../
|
|
17
|
-
import "
|
|
18
|
-
import "
|
|
19
|
-
import "../../../
|
|
20
|
-
import "../../../
|
|
21
|
-
import "../../../
|
|
22
|
-
import "../../../
|
|
23
|
-
import "../../../
|
|
24
|
-
import "../../../
|
|
25
|
-
import "../../../
|
|
26
|
-
import "../../../
|
|
27
|
-
import "../../../
|
|
1
|
+
import { jsx as e, jsxs as t, Fragment as v } from "react/jsx-runtime";
|
|
2
|
+
import { useState as f, useEffect as A, useRef as Y } from "react";
|
|
3
|
+
import { C as F } from "../../../Close-CNwiMz_O.js";
|
|
4
|
+
import { D as oe } from "../../../Delete-jpMstGIF.js";
|
|
5
|
+
import { C as re } from "../../../Cancel-4lT7GZUA.js";
|
|
6
|
+
import ie from "../Shared/inputField.js";
|
|
7
|
+
import j from "../Shared/step.js";
|
|
8
|
+
import { W as ce } from "../../../react-webcam-B3cXh1XT.js";
|
|
9
|
+
import { c as ae } from "../../../createSvgIcon-Cuzqm90l.js";
|
|
10
|
+
import se from "../../Shared/transition.js";
|
|
11
|
+
import { getDocName as le } from "../../../util/functions.js";
|
|
12
|
+
import { u as me, a as de } from "../../../react-redux-B4BZippc.js";
|
|
13
|
+
import { aq as ue, ar as he, as as pe, at as fe, au as ge, av as xe } from "../../../constants-BSdmHYnc.js";
|
|
14
|
+
import { e as De } from "../../../index-BQNs1mvn.js";
|
|
15
|
+
import { s as i } from "../../../styles.module-CHPRGltL.js";
|
|
16
|
+
import { RIGHT_ARROW as M, DELETE_ICON as Ce } from "../../../util/constants.js";
|
|
17
|
+
import { useDialog as be } from "../../../hooks/useDialog/index.js";
|
|
18
|
+
import g from "../Shared/appButton.js";
|
|
19
|
+
import { B as ve } from "../../../Backdrop-CioURPVG.js";
|
|
20
|
+
import { C as W } from "../../../CircularProgress-xZA3lvba.js";
|
|
21
|
+
import { T as a } from "../../../Typography-pAaje37G.js";
|
|
22
|
+
import { B as Ne } from "../../../Button-Df4vgU24.js";
|
|
23
|
+
import { B as c } from "../../../Box-B0YSYLco.js";
|
|
24
|
+
import { D as L, a as z } from "../../../DialogContent-BMwlOnbW.js";
|
|
25
|
+
import { D as $ } from "../../../DialogTitle-CfS0bb2K.js";
|
|
26
|
+
import { I as T } from "../../../IconButton-DHm-hucF.js";
|
|
27
|
+
import { D as V } from "../../../Divider-BShhMFf4.js";
|
|
28
|
+
import { G as u } from "../../../Grid-CFe3amXO.js";
|
|
29
|
+
const ye = () => ({
|
|
30
|
+
type: he
|
|
31
|
+
}), Ee = (o) => ({
|
|
32
|
+
type: fe,
|
|
33
|
+
payload: o
|
|
34
|
+
}), Se = (o) => ({
|
|
35
|
+
type: ge,
|
|
36
|
+
payload: o
|
|
37
|
+
}), J = () => ({
|
|
38
|
+
type: ue
|
|
39
|
+
}), Ie = (o) => ({
|
|
40
|
+
type: xe,
|
|
41
|
+
payload: o
|
|
42
|
+
}), Te = (o) => ({
|
|
43
|
+
type: pe,
|
|
44
|
+
payload: o
|
|
45
|
+
}), ke = ae(/* @__PURE__ */ e("path", {
|
|
46
|
+
d: "M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"
|
|
47
|
+
}), "ArrowBack"), Re = ({
|
|
48
|
+
showAlertMessage: o,
|
|
49
|
+
documentName: d,
|
|
50
|
+
setDocumentName: x,
|
|
51
|
+
setDocumentScreen: h
|
|
52
|
+
}) => /* @__PURE__ */ t(c, { className: "text-center", children: [
|
|
53
|
+
/* @__PURE__ */ e(j, { totalSteps: 2, currentStep: 1 }),
|
|
54
|
+
/* @__PURE__ */ e(a, { className: "secondary-text-color", variant: "h5", children: /* @__PURE__ */ e("strong", { children: "Name your document" }) }),
|
|
55
|
+
/* @__PURE__ */ e(
|
|
56
|
+
ie,
|
|
57
|
+
{
|
|
58
|
+
label: "Document Name",
|
|
59
|
+
value: d,
|
|
60
|
+
onChangeHandler: (r) => x(r)
|
|
61
|
+
}
|
|
62
|
+
),
|
|
63
|
+
/* @__PURE__ */ e(
|
|
64
|
+
g,
|
|
65
|
+
{
|
|
66
|
+
sx: { mt: 4, mb: 4 },
|
|
67
|
+
onClick: () => {
|
|
68
|
+
if (!d)
|
|
69
|
+
return o({ message: "Please provide the document name" }), !1;
|
|
70
|
+
h(2);
|
|
71
|
+
},
|
|
72
|
+
disabled: !d,
|
|
73
|
+
fullWidth: !0,
|
|
74
|
+
children: /* @__PURE__ */ e("strong", { children: "Next" })
|
|
75
|
+
}
|
|
76
|
+
)
|
|
77
|
+
] }), We = ({
|
|
78
|
+
showAlertMessage: o,
|
|
79
|
+
uploadLoader: d,
|
|
80
|
+
uploadDocument: x,
|
|
81
|
+
documentFile: h,
|
|
82
|
+
setDocumentFile: s,
|
|
83
|
+
setDocumentScreen: r
|
|
84
|
+
}) => {
|
|
85
|
+
const l = Y(null), [D, p] = f("Choose File");
|
|
86
|
+
return /* @__PURE__ */ t(c, { className: "text-center", children: [
|
|
87
|
+
/* @__PURE__ */ e(j, { totalSteps: 2, currentStep: 2 }),
|
|
88
|
+
/* @__PURE__ */ e(a, { className: "fw500", variant: "h6", children: "Uploaded files must be image format (PDF, PNG or JPEG/JPG)" }),
|
|
89
|
+
/* @__PURE__ */ t(u, { mt: 2, container: !0, spacing: 2, children: [
|
|
90
|
+
/* @__PURE__ */ e(u, { size: 6, children: /* @__PURE__ */ e(
|
|
91
|
+
g,
|
|
92
|
+
{
|
|
93
|
+
variantType: "secondary",
|
|
94
|
+
onClick: () => r(3),
|
|
95
|
+
fullWidth: !0,
|
|
96
|
+
children: "Use Camera"
|
|
97
|
+
}
|
|
98
|
+
) }),
|
|
99
|
+
/* @__PURE__ */ e(u, { size: 6, children: /* @__PURE__ */ e(
|
|
100
|
+
g,
|
|
101
|
+
{
|
|
102
|
+
variantType: "secondary",
|
|
103
|
+
onClick: () => l.current && l.current.click(),
|
|
104
|
+
sx: { overflow: "hidden" },
|
|
105
|
+
fullWidth: !0,
|
|
106
|
+
children: D
|
|
107
|
+
}
|
|
108
|
+
) })
|
|
109
|
+
] }),
|
|
110
|
+
/* @__PURE__ */ e(
|
|
111
|
+
"input",
|
|
112
|
+
{
|
|
113
|
+
ref: l,
|
|
114
|
+
onChange: (m) => {
|
|
115
|
+
if (m.target.files && !m.target.files[0].name.match(/.(jpg|jpeg|png)$/i))
|
|
116
|
+
o({ message: "Please provide a valid file" });
|
|
117
|
+
else if (m.target.files && m.target.files[0]) {
|
|
118
|
+
p(m.target.files[0].name);
|
|
119
|
+
let b = new FileReader();
|
|
120
|
+
b.onload = (k) => {
|
|
121
|
+
var E;
|
|
122
|
+
const y = (E = k.target) == null ? void 0 : E.result;
|
|
123
|
+
if (typeof y == "string") {
|
|
124
|
+
const w = y.split(/[,]/);
|
|
125
|
+
s(w[1]);
|
|
126
|
+
}
|
|
127
|
+
}, b.readAsDataURL(m.target.files[0]);
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
accept: ".jpg,.jpeg,.png,.pdf,",
|
|
131
|
+
type: "file",
|
|
132
|
+
hidden: !0
|
|
133
|
+
}
|
|
134
|
+
),
|
|
135
|
+
d ? /* @__PURE__ */ t(c, { mt: 4, sx: { color: "#00B171", textAlign: "center" }, children: [
|
|
136
|
+
/* @__PURE__ */ e(W, { size: 30, color: "inherit" }),
|
|
137
|
+
/* @__PURE__ */ t(a, { variant: "h5", sx: { fontWeight: "bold" }, children: [
|
|
138
|
+
"Processing...",
|
|
139
|
+
/* @__PURE__ */ e("br", {}),
|
|
140
|
+
"one moment please"
|
|
141
|
+
] })
|
|
142
|
+
] }) : /* @__PURE__ */ e(
|
|
143
|
+
g,
|
|
144
|
+
{
|
|
145
|
+
sx: { mt: 4, mb: 4 },
|
|
146
|
+
onClick: () => {
|
|
147
|
+
if (!h)
|
|
148
|
+
return o({ message: "Please provide the document" }), !1;
|
|
149
|
+
x();
|
|
150
|
+
},
|
|
151
|
+
disabled: !h,
|
|
152
|
+
fullWidth: !0,
|
|
153
|
+
children: /* @__PURE__ */ e("strong", { children: "Submit" })
|
|
154
|
+
}
|
|
155
|
+
)
|
|
156
|
+
] });
|
|
157
|
+
}, we = ({
|
|
158
|
+
showAlertMessage: o,
|
|
159
|
+
documentFile: d,
|
|
160
|
+
setDocumentFile: x,
|
|
161
|
+
uploadDocument: h,
|
|
162
|
+
uploadLoader: s
|
|
163
|
+
}) => {
|
|
164
|
+
const r = Y(null), l = {
|
|
165
|
+
audio: !1,
|
|
166
|
+
height: {
|
|
167
|
+
min: 720
|
|
168
|
+
},
|
|
169
|
+
width: {
|
|
170
|
+
ideal: 1280
|
|
171
|
+
},
|
|
172
|
+
aspectRatio: 1.333,
|
|
173
|
+
// 4:3
|
|
174
|
+
facingMode: "user",
|
|
175
|
+
frameRate: {
|
|
176
|
+
ideal: 30,
|
|
177
|
+
max: 30
|
|
178
|
+
}
|
|
179
|
+
}, [D, p] = f(""), C = () => {
|
|
180
|
+
if (r.current) {
|
|
181
|
+
const m = r.current.getScreenshot(), b = m.split(/[,]/);
|
|
182
|
+
x(b[1]), p(m);
|
|
183
|
+
}
|
|
184
|
+
}, N = () => {
|
|
185
|
+
if (!D)
|
|
186
|
+
return o({
|
|
187
|
+
message: "Please take the photo of the document"
|
|
188
|
+
}), !1;
|
|
189
|
+
h();
|
|
190
|
+
};
|
|
191
|
+
return /* @__PURE__ */ t(c, { className: "text-center", children: [
|
|
192
|
+
/* @__PURE__ */ e(j, { totalSteps: 2, currentStep: 2 }),
|
|
193
|
+
D ? /* @__PURE__ */ t(v, { children: [
|
|
194
|
+
/* @__PURE__ */ t(
|
|
195
|
+
c,
|
|
196
|
+
{
|
|
197
|
+
className: `${i["doc-video-box"]} ${i["image-corner-color"]}`,
|
|
198
|
+
children: [
|
|
199
|
+
/* @__PURE__ */ e("span", {}),
|
|
200
|
+
/* @__PURE__ */ e(
|
|
201
|
+
"img",
|
|
202
|
+
{
|
|
203
|
+
className: i["video-box-inner-content"],
|
|
204
|
+
src: D,
|
|
205
|
+
alt: "doc"
|
|
206
|
+
}
|
|
207
|
+
)
|
|
208
|
+
]
|
|
209
|
+
}
|
|
210
|
+
),
|
|
211
|
+
s ? /* @__PURE__ */ t(c, { mt: 4, sx: { color: "#00B171", textAlign: "center" }, children: [
|
|
212
|
+
/* @__PURE__ */ e(W, { size: 30, color: "inherit" }),
|
|
213
|
+
/* @__PURE__ */ t(a, { variant: "h5", sx: { fontWeight: "bold" }, children: [
|
|
214
|
+
"Processing...",
|
|
215
|
+
/* @__PURE__ */ e("br", {}),
|
|
216
|
+
"one moment please"
|
|
217
|
+
] })
|
|
218
|
+
] }) : /* @__PURE__ */ t(v, { children: [
|
|
219
|
+
/* @__PURE__ */ e(
|
|
220
|
+
g,
|
|
221
|
+
{
|
|
222
|
+
onClick: N,
|
|
223
|
+
sx: { mt: 6 },
|
|
224
|
+
disabled: !d,
|
|
225
|
+
fullWidth: !0,
|
|
226
|
+
children: /* @__PURE__ */ e("strong", { children: "Submit" })
|
|
227
|
+
}
|
|
228
|
+
),
|
|
229
|
+
/* @__PURE__ */ e(
|
|
230
|
+
g,
|
|
231
|
+
{
|
|
232
|
+
variantType: "secondary",
|
|
233
|
+
onClick: () => p(""),
|
|
234
|
+
sx: { mt: 2 },
|
|
235
|
+
fullWidth: !0,
|
|
236
|
+
children: /* @__PURE__ */ e("strong", { children: "Retake Photo" })
|
|
237
|
+
}
|
|
238
|
+
)
|
|
239
|
+
] })
|
|
240
|
+
] }) : /* @__PURE__ */ t(v, { children: [
|
|
241
|
+
/* @__PURE__ */ t(c, { className: i["doc-video-box"], children: [
|
|
242
|
+
/* @__PURE__ */ e("span", {}),
|
|
243
|
+
/* @__PURE__ */ e(
|
|
244
|
+
ce,
|
|
245
|
+
{
|
|
246
|
+
className: i["video-box-inner-content"],
|
|
247
|
+
audio: !1,
|
|
248
|
+
ref: r,
|
|
249
|
+
screenshotFormat: "image/jpeg",
|
|
250
|
+
videoConstraints: l,
|
|
251
|
+
minScreenshotHeight: l.height.min,
|
|
252
|
+
minScreenshotWidth: l.width.ideal,
|
|
253
|
+
screenshotQuality: 1
|
|
254
|
+
}
|
|
255
|
+
)
|
|
256
|
+
] }),
|
|
257
|
+
/* @__PURE__ */ e(g, { onClick: C, sx: { mt: 8 }, fullWidth: !0, children: /* @__PURE__ */ e("strong", { children: "Take Photo" }) })
|
|
258
|
+
] })
|
|
259
|
+
] });
|
|
260
|
+
}, ct = ({ showAlertMessage: o, identityDocs: d }) => {
|
|
261
|
+
const { openDialog: x, ConfirmDialog: h } = be(), s = me(), r = de(De), l = r.data, D = r.loader, p = r.message, C = r.error, N = r.preview.front, m = r.preview.back, b = r.preview.loader, k = r.uploadLoader, [y, E] = f(!1), [w, O] = f(!1), [P, S] = f(1), [K, q] = f(!1), [U, G] = f(""), [R, B] = f("");
|
|
262
|
+
A(() => {
|
|
263
|
+
C && o({ message: C });
|
|
264
|
+
}, [C]), A(() => {
|
|
265
|
+
p && (o({ message: p, type: "success" }), E(!1), _());
|
|
266
|
+
}, [p]);
|
|
267
|
+
const Q = () => {
|
|
268
|
+
if (!U)
|
|
269
|
+
return o({ message: "Please provide the document name" }), !1;
|
|
270
|
+
if (!R)
|
|
271
|
+
return o({ message: "Please provide the document" }), !1;
|
|
272
|
+
s(
|
|
273
|
+
Te({
|
|
274
|
+
filename: U.trim(),
|
|
275
|
+
content: R
|
|
276
|
+
})
|
|
277
|
+
);
|
|
278
|
+
}, X = () => {
|
|
279
|
+
s(ye());
|
|
280
|
+
};
|
|
281
|
+
A(() => {
|
|
282
|
+
X();
|
|
283
|
+
}, []);
|
|
284
|
+
const Z = (n) => {
|
|
285
|
+
s(Ee(n));
|
|
286
|
+
}, ee = (n) => {
|
|
287
|
+
s(Se(n));
|
|
288
|
+
}, te = (n) => {
|
|
289
|
+
x({
|
|
290
|
+
icon: Ce,
|
|
291
|
+
height: "450px",
|
|
292
|
+
title: "Are you sure you want to delete?",
|
|
293
|
+
message: "This action cannot be undone.",
|
|
294
|
+
onConfirm: () => {
|
|
295
|
+
ne(n);
|
|
296
|
+
},
|
|
297
|
+
cancelButtonShow: !0
|
|
298
|
+
});
|
|
299
|
+
}, ne = (n) => {
|
|
300
|
+
s(Ie(n));
|
|
301
|
+
}, H = ({ data: n, type: I }) => I === "identity" ? /* @__PURE__ */ e(
|
|
302
|
+
c,
|
|
303
|
+
{
|
|
304
|
+
className: i["menu-item"],
|
|
305
|
+
onClick: () => n.documentId && Z(n.documentId),
|
|
306
|
+
children: /* @__PURE__ */ t(u, { container: !0, sx: { width: "100%" }, children: [
|
|
307
|
+
/* @__PURE__ */ e(u, { size: 10, className: "content-center", children: /* @__PURE__ */ e(c, { sx: { textAlign: "left" }, children: /* @__PURE__ */ e(a, { color: "primary", children: /* @__PURE__ */ e("strong", { children: n.documentType && le(n.documentType) }) }) }) }),
|
|
308
|
+
/* @__PURE__ */ e(u, { size: 2, children: /* @__PURE__ */ e(a, { sx: { textAlign: "right" }, children: /* @__PURE__ */ e("img", { src: M, alt: "arrow" }) }) })
|
|
309
|
+
] })
|
|
310
|
+
}
|
|
311
|
+
) : /* @__PURE__ */ t(c, { sx: { position: "relative" }, className: i["menu-item"], children: [
|
|
312
|
+
y && /* @__PURE__ */ e(
|
|
313
|
+
T,
|
|
314
|
+
{
|
|
315
|
+
className: i["remove-icon"],
|
|
316
|
+
onClick: () => te(n.filename),
|
|
317
|
+
children: /* @__PURE__ */ e(re, {})
|
|
318
|
+
}
|
|
319
|
+
),
|
|
320
|
+
/* @__PURE__ */ t(
|
|
321
|
+
u,
|
|
322
|
+
{
|
|
323
|
+
onClick: () => ee(n.filename),
|
|
324
|
+
container: !0,
|
|
325
|
+
sx: { width: "100%" },
|
|
326
|
+
children: [
|
|
327
|
+
/* @__PURE__ */ e(u, { size: 10, className: "content-center", children: /* @__PURE__ */ e(c, { sx: { textAlign: "left" }, children: /* @__PURE__ */ e(a, { color: "primary", children: /* @__PURE__ */ e("strong", { children: n.filename }) }) }) }),
|
|
328
|
+
/* @__PURE__ */ e(u, { size: 2, children: /* @__PURE__ */ e(a, { sx: { textAlign: "right" }, children: /* @__PURE__ */ e("img", { src: M, alt: "arrow" }) }) })
|
|
329
|
+
]
|
|
330
|
+
}
|
|
331
|
+
)
|
|
332
|
+
] }), _ = () => {
|
|
333
|
+
G(""), B(""), S(1), q(!1);
|
|
334
|
+
};
|
|
335
|
+
return /* @__PURE__ */ t(v, { children: [
|
|
336
|
+
/* @__PURE__ */ e(h, {}),
|
|
337
|
+
/* @__PURE__ */ e(
|
|
338
|
+
ve,
|
|
339
|
+
{
|
|
340
|
+
sx: {
|
|
341
|
+
color: "#fff",
|
|
342
|
+
zIndex: (n) => n.zIndex.drawer + 1e3
|
|
343
|
+
},
|
|
344
|
+
open: b,
|
|
345
|
+
children: /* @__PURE__ */ e(W, { color: "inherit" })
|
|
346
|
+
}
|
|
347
|
+
),
|
|
348
|
+
/* @__PURE__ */ e(a, { className: i.heading, variant: "h6", children: /* @__PURE__ */ e("strong", { children: "My Documents" }) }),
|
|
349
|
+
l.length > 0 && /* @__PURE__ */ t(
|
|
350
|
+
Ne,
|
|
351
|
+
{
|
|
352
|
+
className: `${y ? i["delete-disable"] : i["confirm-edit"]} normal-text`,
|
|
353
|
+
sx: { mt: 3, mb: 3 },
|
|
354
|
+
variant: "contained",
|
|
355
|
+
onClick: () => E((n) => !n),
|
|
356
|
+
children: [
|
|
357
|
+
/* @__PURE__ */ e(oe, {}),
|
|
358
|
+
"Delete"
|
|
359
|
+
]
|
|
360
|
+
}
|
|
361
|
+
),
|
|
362
|
+
D ? /* @__PURE__ */ e(c, { className: "text-center", mt: 8, children: /* @__PURE__ */ e(W, {}) }) : /* @__PURE__ */ t(v, { children: [
|
|
363
|
+
d && d.map((n, I) => /* @__PURE__ */ e(H, { data: n, type: "identity" }, I)),
|
|
364
|
+
l && l.map((n, I) => /* @__PURE__ */ e(H, { data: n, type: "normal" }, I)),
|
|
365
|
+
!d && l.length === 0 && /* @__PURE__ */ e(a, { mt: 4, className: "text-center", variant: "h4", children: "No Documents" })
|
|
366
|
+
] }),
|
|
367
|
+
/* @__PURE__ */ e(
|
|
368
|
+
g,
|
|
369
|
+
{
|
|
370
|
+
sx: { mt: 4 },
|
|
371
|
+
onClick: () => q(!0),
|
|
372
|
+
fullWidth: !0,
|
|
373
|
+
children: /* @__PURE__ */ e("strong", { children: "Add new document" })
|
|
374
|
+
}
|
|
375
|
+
),
|
|
376
|
+
/* @__PURE__ */ t(
|
|
377
|
+
L,
|
|
378
|
+
{
|
|
379
|
+
open: w,
|
|
380
|
+
fullWidth: !0,
|
|
381
|
+
onClose: () => O(!1),
|
|
382
|
+
children: [
|
|
383
|
+
/* @__PURE__ */ e($, { sx: { mt: 1, p: 2, color: "#16359D" }, children: /* @__PURE__ */ e(
|
|
384
|
+
T,
|
|
385
|
+
{
|
|
386
|
+
"aria-label": "close",
|
|
387
|
+
onClick: () => O(!1),
|
|
388
|
+
sx: {
|
|
389
|
+
position: "absolute",
|
|
390
|
+
right: 8,
|
|
391
|
+
top: 8,
|
|
392
|
+
color: "#16359D"
|
|
393
|
+
},
|
|
394
|
+
children: /* @__PURE__ */ e(F, {})
|
|
395
|
+
}
|
|
396
|
+
) }),
|
|
397
|
+
/* @__PURE__ */ e(V, { sx: { mt: 2 } }),
|
|
398
|
+
/* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(c, { children: "Add Document Modal" }) })
|
|
399
|
+
]
|
|
400
|
+
}
|
|
401
|
+
),
|
|
402
|
+
/* @__PURE__ */ t(
|
|
403
|
+
L,
|
|
404
|
+
{
|
|
405
|
+
open: !!N,
|
|
406
|
+
fullWidth: !0,
|
|
407
|
+
onClose: () => s(J()),
|
|
408
|
+
children: [
|
|
409
|
+
/* @__PURE__ */ e($, { sx: { mt: 1, p: 2, color: "#16359D" }, children: /* @__PURE__ */ e(
|
|
410
|
+
T,
|
|
411
|
+
{
|
|
412
|
+
"aria-label": "close",
|
|
413
|
+
onClick: () => s(J()),
|
|
414
|
+
sx: {
|
|
415
|
+
position: "absolute",
|
|
416
|
+
right: 8,
|
|
417
|
+
top: 8,
|
|
418
|
+
color: "#16359D"
|
|
419
|
+
},
|
|
420
|
+
children: /* @__PURE__ */ e(F, {})
|
|
421
|
+
}
|
|
422
|
+
) }),
|
|
423
|
+
/* @__PURE__ */ e(V, { sx: { mt: 2 } }),
|
|
424
|
+
/* @__PURE__ */ e(z, { children: /* @__PURE__ */ t(c, { children: [
|
|
425
|
+
/* @__PURE__ */ e(a, { variant: "h5", mb: 3, children: "Front Image" }),
|
|
426
|
+
/* @__PURE__ */ e(
|
|
427
|
+
"img",
|
|
428
|
+
{
|
|
429
|
+
className: i["video-box-inner-content"],
|
|
430
|
+
src: "data:image/jpeg;base64," + N,
|
|
431
|
+
alt: "Front"
|
|
432
|
+
}
|
|
433
|
+
),
|
|
434
|
+
m && /* @__PURE__ */ t(v, { children: [
|
|
435
|
+
/* @__PURE__ */ e(a, { variant: "h5", mt: 2, mb: 3, children: "Back Image" }),
|
|
436
|
+
/* @__PURE__ */ e(
|
|
437
|
+
"img",
|
|
438
|
+
{
|
|
439
|
+
className: i["video-box-inner-content"],
|
|
440
|
+
src: "data:image/jpeg;base64," + m,
|
|
441
|
+
alt: "Back"
|
|
442
|
+
}
|
|
443
|
+
)
|
|
444
|
+
] })
|
|
445
|
+
] }) })
|
|
446
|
+
]
|
|
447
|
+
}
|
|
448
|
+
),
|
|
449
|
+
/* @__PURE__ */ t(
|
|
450
|
+
L,
|
|
451
|
+
{
|
|
452
|
+
fullWidth: !0,
|
|
453
|
+
open: K,
|
|
454
|
+
onClose: _,
|
|
455
|
+
TransitionComponent: se,
|
|
456
|
+
children: [
|
|
457
|
+
/* @__PURE__ */ t(c, { className: i["asset-header"], children: [
|
|
458
|
+
/* @__PURE__ */ e(
|
|
459
|
+
T,
|
|
460
|
+
{
|
|
461
|
+
"aria-label": "close",
|
|
462
|
+
onClick: () => S(
|
|
463
|
+
P - 1 <= 0 ? 1 : P - 1
|
|
464
|
+
),
|
|
465
|
+
sx: { color: "#16359d", ml: "20px" },
|
|
466
|
+
children: /* @__PURE__ */ e(ke, {})
|
|
467
|
+
}
|
|
468
|
+
),
|
|
469
|
+
/* @__PURE__ */ e(
|
|
470
|
+
a,
|
|
471
|
+
{
|
|
472
|
+
className: "secondary-text-color",
|
|
473
|
+
variant: "subtitle1",
|
|
474
|
+
component: "p",
|
|
475
|
+
children: /* @__PURE__ */ e("strong", { children: "Add new document" })
|
|
476
|
+
}
|
|
477
|
+
),
|
|
478
|
+
/* @__PURE__ */ e(
|
|
479
|
+
T,
|
|
480
|
+
{
|
|
481
|
+
"aria-label": "close",
|
|
482
|
+
onClick: _,
|
|
483
|
+
className: i["asset-close-btn"],
|
|
484
|
+
children: /* @__PURE__ */ e(F, {})
|
|
485
|
+
}
|
|
486
|
+
)
|
|
487
|
+
] }),
|
|
488
|
+
/* @__PURE__ */ e(z, { sx: { padding: "20px 45px" }, dividers: !0, children: {
|
|
489
|
+
1: /* @__PURE__ */ e(
|
|
490
|
+
Re,
|
|
491
|
+
{
|
|
492
|
+
showAlertMessage: o,
|
|
493
|
+
documentName: U,
|
|
494
|
+
setDocumentName: G,
|
|
495
|
+
setDocumentScreen: S
|
|
496
|
+
}
|
|
497
|
+
),
|
|
498
|
+
2: /* @__PURE__ */ e(
|
|
499
|
+
We,
|
|
500
|
+
{
|
|
501
|
+
showAlertMessage: o,
|
|
502
|
+
setDocumentScreen: S,
|
|
503
|
+
documentFile: R,
|
|
504
|
+
setDocumentFile: B,
|
|
505
|
+
uploadDocument: Q,
|
|
506
|
+
uploadLoader: k
|
|
507
|
+
}
|
|
508
|
+
),
|
|
509
|
+
3: /* @__PURE__ */ e(
|
|
510
|
+
we,
|
|
511
|
+
{
|
|
512
|
+
showAlertMessage: o,
|
|
513
|
+
setDocumentScreen: S,
|
|
514
|
+
documentFile: R,
|
|
515
|
+
setDocumentFile: B,
|
|
516
|
+
uploadDocument: Q,
|
|
517
|
+
uploadLoader: k
|
|
518
|
+
}
|
|
519
|
+
)
|
|
520
|
+
}[P] })
|
|
521
|
+
]
|
|
522
|
+
}
|
|
523
|
+
)
|
|
524
|
+
] });
|
|
525
|
+
};
|
|
28
526
|
export {
|
|
29
|
-
|
|
527
|
+
ct as default
|
|
30
528
|
};
|