@pinerohit11/testwidget 0.1.59 → 0.1.61
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/index.js +178 -167
- package/dist/index.mjs +31 -14
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
@@ -17,9 +17,16 @@ var __spreadValues = (a, b) => {
|
|
17
17
|
return a;
|
18
18
|
};
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
20
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
21
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
22
|
+
}) : x)(function(x) {
|
23
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
24
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
25
|
+
});
|
20
26
|
|
21
27
|
// src/app/components/RequestPayment/RequestPayment.tsx
|
22
|
-
import
|
28
|
+
import "bootstrap/dist/js/bootstrap.bundle.min.js";
|
29
|
+
import React4, { useState, useEffect as useEffect2 } from "react";
|
23
30
|
|
24
31
|
// src/app/components/Loader/Loader.tsx
|
25
32
|
import React2 from "react";
|
@@ -151,7 +158,7 @@ var Loader = (props) => {
|
|
151
158
|
var Loader_default = Loader;
|
152
159
|
|
153
160
|
// src/app/components/RequestPayment/RequestPayment.tsx
|
154
|
-
import { Button, Form, Modal } from "react-bootstrap";
|
161
|
+
import { Button, Form, Modal, Stack } from "react-bootstrap";
|
155
162
|
|
156
163
|
// src/app/components/RequestPayment/RequestPaymentstyles.tsx
|
157
164
|
import React3 from "react";
|
@@ -1010,6 +1017,16 @@ var ErrorText = {
|
|
1010
1017
|
fractalpayclientidrequired: "Fractalpay client key is missing or empty."
|
1011
1018
|
};
|
1012
1019
|
|
1020
|
+
// src/app/components/Bootstrapclient.ts
|
1021
|
+
import { useEffect } from "react";
|
1022
|
+
function BootstrapClient() {
|
1023
|
+
useEffect(() => {
|
1024
|
+
__require("bootstrap/dist/js/bootstrap.bundle.min.js");
|
1025
|
+
}, []);
|
1026
|
+
return null;
|
1027
|
+
}
|
1028
|
+
var Bootstrapclient_default = BootstrapClient;
|
1029
|
+
|
1013
1030
|
// src/app/components/RequestPayment/RequestPayment.tsx
|
1014
1031
|
function RequestPayment(props) {
|
1015
1032
|
const fractalpayClientKey = props.fractalpayClientKey;
|
@@ -1165,7 +1182,7 @@ function RequestPayment(props) {
|
|
1165
1182
|
setErrors(newErrors);
|
1166
1183
|
return Object.keys(newErrors).length === 0;
|
1167
1184
|
};
|
1168
|
-
|
1185
|
+
useEffect2(() => {
|
1169
1186
|
if (props.amount) {
|
1170
1187
|
setRequestDetails((prev) => __spreadProps(__spreadValues({}, prev), { amount: props.amount }));
|
1171
1188
|
}
|
@@ -1175,7 +1192,7 @@ function RequestPayment(props) {
|
|
1175
1192
|
e.preventDefault();
|
1176
1193
|
}
|
1177
1194
|
};
|
1178
|
-
return /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement(RequestPaymentstyles_default, null), /* @__PURE__ */ React4.createElement(Loader_default, { loading }), /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement(
|
1195
|
+
return /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement(Bootstrapclient_default, null), /* @__PURE__ */ React4.createElement(RequestPaymentstyles_default, null), /* @__PURE__ */ React4.createElement(Loader_default, { loading }), /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement(Button, { className: "paymentBtn", onClick: handleShow }, "Request Payment"), /* @__PURE__ */ React4.createElement(
|
1179
1196
|
Modal,
|
1180
1197
|
{
|
1181
1198
|
show,
|
@@ -1185,7 +1202,7 @@ function RequestPayment(props) {
|
|
1185
1202
|
keyboard: false
|
1186
1203
|
},
|
1187
1204
|
/* @__PURE__ */ React4.createElement(Modal.Header, { closeButton: true }, /* @__PURE__ */ React4.createElement(Modal.Title, null, "Request Payment")),
|
1188
|
-
/* @__PURE__ */ React4.createElement(Modal.Body, { id: "Checkout" }, /* @__PURE__ */ React4.createElement(Form, null, /* @__PURE__ */ React4.createElement(
|
1205
|
+
/* @__PURE__ */ React4.createElement(Modal.Body, { id: "Checkout" }, /* @__PURE__ */ React4.createElement(Form, null, /* @__PURE__ */ React4.createElement(Stack, { gap: 3 }, /* @__PURE__ */ React4.createElement("div", null, /* @__PURE__ */ React4.createElement("label", { htmlFor: "exampleFormControlInput2", className: "form-label" }, "FULL NAME *"), /* @__PURE__ */ React4.createElement(
|
1189
1206
|
"input",
|
1190
1207
|
{
|
1191
1208
|
className: "form-control",
|
@@ -1206,7 +1223,7 @@ function RequestPayment(props) {
|
|
1206
1223
|
type: "text",
|
1207
1224
|
"data-token": "phone_number"
|
1208
1225
|
}
|
1209
|
-
), errors.phone_number && /* @__PURE__ */ React4.createElement("small", { className: "text-danger" }, errors.phone_number)), /* @__PURE__ */ React4.createElement("div", { className: "mb-3" }, /* @__PURE__ */ React4.createElement("label", { htmlFor: "exampleFormControlInput2", className: "form-label" }, "EMAIL"), /* @__PURE__ */ React4.createElement(
|
1226
|
+
), errors.phone_number && /* @__PURE__ */ React4.createElement("small", { className: "text-danger" }, errors.phone_number))), /* @__PURE__ */ React4.createElement("div", { className: "mb-3" }, /* @__PURE__ */ React4.createElement("label", { htmlFor: "exampleFormControlInput2", className: "form-label" }, "EMAIL"), /* @__PURE__ */ React4.createElement(
|
1210
1227
|
"input",
|
1211
1228
|
{
|
1212
1229
|
className: "form-control",
|
@@ -3116,7 +3133,7 @@ function Payment() {
|
|
3116
3133
|
}
|
3117
3134
|
|
3118
3135
|
// src/app/components/Transaction/CompletedTransactions.tsx
|
3119
|
-
import React12, { useEffect as
|
3136
|
+
import React12, { useEffect as useEffect4, useState as useState8 } from "react";
|
3120
3137
|
import { Col, Row, Table } from "react-bootstrap";
|
3121
3138
|
import {
|
3122
3139
|
DatatableWrapper,
|
@@ -3130,14 +3147,14 @@ import "react-datepicker/dist/react-datepicker.css";
|
|
3130
3147
|
import { toast as toast4 } from "react-toastify";
|
3131
3148
|
|
3132
3149
|
// src/app/components/Pagination/Pagination.tsx
|
3133
|
-
import React11, { useState as useState7, useEffect as
|
3150
|
+
import React11, { useState as useState7, useEffect as useEffect3 } from "react";
|
3134
3151
|
function PaginationPg({ totalPages, onPageChange, current }) {
|
3135
3152
|
const [currentPage, setCurrentPage] = useState7(current);
|
3136
3153
|
const [showPages, setShowPages] = useState7(false);
|
3137
|
-
|
3154
|
+
useEffect3(() => {
|
3138
3155
|
setCurrentPage(current);
|
3139
3156
|
}, [current]);
|
3140
|
-
|
3157
|
+
useEffect3(() => {
|
3141
3158
|
setTimeout(() => {
|
3142
3159
|
setShowPages(true);
|
3143
3160
|
}, 1e3);
|
@@ -3355,7 +3372,7 @@ function CompletedTransactions(props) {
|
|
3355
3372
|
}
|
3356
3373
|
}
|
3357
3374
|
};
|
3358
|
-
|
3375
|
+
useEffect4(() => {
|
3359
3376
|
fetchData(state.page, startDate, endDate);
|
3360
3377
|
}, [state.page]);
|
3361
3378
|
const handlePageChange = (pageNumber) => {
|
@@ -3801,7 +3818,7 @@ function TockenizPay() {
|
|
3801
3818
|
}
|
3802
3819
|
|
3803
3820
|
// src/app/components/Payment/GetPaymentDynamic.tsx
|
3804
|
-
import React15, { useEffect as
|
3821
|
+
import React15, { useEffect as useEffect5, useState as useState10 } from "react";
|
3805
3822
|
import { Modal as Modal8 } from "react-bootstrap";
|
3806
3823
|
|
3807
3824
|
// src/app/components/Loader/MyLoadingAnimation.tsx
|
@@ -3834,7 +3851,7 @@ function GetPaymentDynamic(props) {
|
|
3834
3851
|
console.error(ErrorText.fractalpayclientidrequired);
|
3835
3852
|
}
|
3836
3853
|
};
|
3837
|
-
|
3854
|
+
useEffect5(() => {
|
3838
3855
|
if (!fractalpayClientKey) {
|
3839
3856
|
console.error(ErrorText.fractalpayclientidrequired);
|
3840
3857
|
}
|
@@ -3857,7 +3874,7 @@ function GetPaymentDynamic(props) {
|
|
3857
3874
|
const handleLoad = () => {
|
3858
3875
|
setLoading(false);
|
3859
3876
|
};
|
3860
|
-
|
3877
|
+
useEffect5(() => {
|
3861
3878
|
const messageListener = (event) => {
|
3862
3879
|
var _a, _b;
|
3863
3880
|
const response = (_b = (_a = event == null ? void 0 : event.data) == null ? void 0 : _a.other) == null ? void 0 : _b.data;
|
package/package.json
CHANGED