@blocklet/payment-react 1.18.55 → 1.19.0
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/es/checkout/donate.d.ts +1 -15
- package/es/checkout/donate.js +301 -189
- package/es/checkout/form.d.ts +1 -15
- package/es/checkout/form.js +5 -13
- package/es/checkout/table.js +3 -3
- package/es/components/blockchain/gas.d.ts +1 -5
- package/es/components/blockchain/gas.js +10 -2
- package/es/components/blockchain/tx.d.ts +1 -8
- package/es/components/blockchain/tx.js +28 -7
- package/es/components/confirm.d.ts +1 -10
- package/es/components/confirm.js +4 -10
- package/es/components/country-select.d.ts +3 -2
- package/es/components/country-select.js +375 -352
- package/es/components/input.d.ts +11 -20
- package/es/components/input.js +46 -43
- package/es/components/lazy-loader.js +1 -2
- package/es/components/link.d.ts +2 -9
- package/es/components/link.js +9 -6
- package/es/components/livemode.d.ts +2 -8
- package/es/components/livemode.js +1 -5
- package/es/components/loading-button.d.ts +6 -1
- package/es/components/loading-button.js +56 -66
- package/es/components/over-due-invoice-payment.d.ts +0 -18
- package/es/components/over-due-invoice-payment.js +138 -95
- package/es/components/payment-beneficiaries.d.ts +2 -7
- package/es/components/payment-beneficiaries.js +86 -40
- package/es/components/pricing-item.d.ts +0 -5
- package/es/components/pricing-item.js +1 -4
- package/es/components/pricing-table.d.ts +2 -10
- package/es/components/pricing-table.js +8 -7
- package/es/components/resume-subscription.d.ts +0 -10
- package/es/components/resume-subscription.js +42 -21
- package/es/components/truncated-text.d.ts +2 -9
- package/es/components/truncated-text.js +0 -5
- package/es/contexts/donate.d.ts +0 -7
- package/es/contexts/donate.js +10 -8
- package/es/contexts/payment.d.ts +1 -4
- package/es/contexts/payment.js +7 -2
- package/es/history/invoice/list.d.ts +2 -18
- package/es/history/invoice/list.js +151 -73
- package/es/history/payment/list.js +115 -38
- package/es/hooks/keyboard.d.ts +1 -1
- package/es/hooks/keyboard.js +2 -4
- package/es/libs/cached-request.js +2 -4
- package/es/libs/phone-validator.js +1 -2
- package/es/libs/util.js +2 -4
- package/es/libs/validator.js +2 -4
- package/es/payment/amount.d.ts +2 -7
- package/es/payment/amount.js +1 -5
- package/es/payment/donation-form.d.ts +2 -10
- package/es/payment/donation-form.js +196 -160
- package/es/payment/error.d.ts +2 -8
- package/es/payment/error.js +40 -20
- package/es/payment/footer.d.ts +2 -3
- package/es/payment/footer.js +19 -6
- package/es/payment/form/addon.js +14 -4
- package/es/payment/form/address.d.ts +2 -9
- package/es/payment/form/address.js +3 -6
- package/es/payment/form/currency.js +45 -25
- package/es/payment/form/index.d.ts +2 -8
- package/es/payment/form/index.js +107 -65
- package/es/payment/form/phone.js +2 -4
- package/es/payment/form/stripe/form.d.ts +2 -8
- package/es/payment/form/stripe/form.js +1 -3
- package/es/payment/header.js +38 -16
- package/es/payment/index.d.ts +2 -9
- package/es/payment/index.js +5 -14
- package/es/payment/product-card.d.ts +2 -11
- package/es/payment/product-card.js +84 -50
- package/es/payment/product-donation.js +175 -114
- package/es/payment/product-item.d.ts +2 -9
- package/es/payment/product-item.js +185 -142
- package/es/payment/product-skeleton.js +2 -2
- package/es/payment/skeleton/donation.js +27 -7
- package/es/payment/skeleton/overview.js +22 -2
- package/es/payment/skeleton/payment.js +33 -5
- package/es/payment/success.d.ts +2 -9
- package/es/payment/success.js +41 -14
- package/es/payment/summary.d.ts +2 -17
- package/es/payment/summary.js +184 -111
- package/es/theme/index.d.ts +0 -5
- package/es/theme/index.js +2 -5
- package/es/theme/typography.d.ts +2 -2
- package/lib/checkout/donate.d.ts +1 -15
- package/lib/checkout/donate.js +75 -54
- package/lib/checkout/form.d.ts +1 -15
- package/lib/checkout/form.js +7 -15
- package/lib/checkout/table.js +4 -4
- package/lib/components/blockchain/gas.d.ts +1 -5
- package/lib/components/blockchain/gas.js +3 -2
- package/lib/components/blockchain/tx.d.ts +1 -8
- package/lib/components/blockchain/tx.js +11 -7
- package/lib/components/confirm.d.ts +1 -10
- package/lib/components/confirm.js +5 -11
- package/lib/components/country-select.d.ts +3 -2
- package/lib/components/country-select.js +23 -22
- package/lib/components/input.d.ts +11 -20
- package/lib/components/input.js +20 -23
- package/lib/components/lazy-loader.js +1 -1
- package/lib/components/link.d.ts +2 -9
- package/lib/components/link.js +3 -8
- package/lib/components/livemode.d.ts +2 -8
- package/lib/components/livemode.js +3 -7
- package/lib/components/loading-button.d.ts +6 -1
- package/lib/components/loading-button.js +9 -17
- package/lib/components/over-due-invoice-payment.d.ts +0 -18
- package/lib/components/over-due-invoice-payment.js +31 -33
- package/lib/components/payment-beneficiaries.d.ts +2 -7
- package/lib/components/payment-beneficiaries.js +12 -11
- package/lib/components/pricing-item.d.ts +0 -5
- package/lib/components/pricing-item.js +2 -5
- package/lib/components/pricing-table.d.ts +2 -10
- package/lib/components/pricing-table.js +5 -11
- package/lib/components/resume-subscription.d.ts +0 -10
- package/lib/components/resume-subscription.js +16 -16
- package/lib/components/table.js +1 -1
- package/lib/components/truncated-text.d.ts +2 -9
- package/lib/components/truncated-text.js +1 -6
- package/lib/contexts/donate.d.ts +0 -7
- package/lib/contexts/donate.js +4 -7
- package/lib/contexts/payment.d.ts +1 -4
- package/lib/contexts/payment.js +4 -7
- package/lib/history/invoice/list.d.ts +2 -18
- package/lib/history/invoice/list.js +49 -37
- package/lib/history/payment/list.js +30 -16
- package/lib/hooks/keyboard.d.ts +1 -1
- package/lib/hooks/mobile.js +1 -1
- package/lib/hooks/subscription.js +1 -1
- package/lib/index.js +2 -2
- package/lib/libs/api.js +1 -1
- package/lib/libs/dayjs.js +1 -1
- package/lib/libs/phone-validator.js +0 -2
- package/lib/libs/theme.js +1 -1
- package/lib/libs/util.js +1 -1
- package/lib/libs/validator.js +1 -1
- package/lib/locales/en.js +1 -1
- package/lib/locales/index.js +1 -1
- package/lib/locales/zh.js +1 -1
- package/lib/payment/amount.d.ts +2 -7
- package/lib/payment/amount.js +2 -6
- package/lib/payment/donation-form.d.ts +2 -10
- package/lib/payment/donation-form.js +33 -38
- package/lib/payment/error.d.ts +2 -8
- package/lib/payment/error.js +11 -13
- package/lib/payment/footer.d.ts +2 -3
- package/lib/payment/footer.js +5 -5
- package/lib/payment/form/addon.js +5 -3
- package/lib/payment/form/address.d.ts +2 -9
- package/lib/payment/form/address.js +5 -8
- package/lib/payment/form/currency.js +3 -3
- package/lib/payment/form/index.d.ts +2 -8
- package/lib/payment/form/index.js +19 -15
- package/lib/payment/form/phone.js +1 -1
- package/lib/payment/form/stripe/form.d.ts +2 -8
- package/lib/payment/form/stripe/form.js +3 -6
- package/lib/payment/header.js +8 -4
- package/lib/payment/index.d.ts +2 -9
- package/lib/payment/index.js +7 -16
- package/lib/payment/product-card.d.ts +2 -11
- package/lib/payment/product-card.js +13 -20
- package/lib/payment/product-donation.js +71 -66
- package/lib/payment/product-item.d.ts +2 -9
- package/lib/payment/product-item.js +24 -25
- package/lib/payment/product-skeleton.js +2 -2
- package/lib/payment/skeleton/donation.js +8 -4
- package/lib/payment/skeleton/overview.js +6 -2
- package/lib/payment/skeleton/payment.js +9 -3
- package/lib/payment/success.d.ts +2 -9
- package/lib/payment/success.js +12 -15
- package/lib/payment/summary.d.ts +2 -17
- package/lib/payment/summary.js +44 -45
- package/lib/theme/index.d.ts +0 -5
- package/lib/theme/index.js +2 -5
- package/lib/theme/typography.d.ts +2 -2
- package/package.json +40 -40
- package/src/checkout/donate.tsx +103 -35
- package/src/checkout/form.tsx +5 -14
- package/src/checkout/table.tsx +3 -3
- package/src/components/blockchain/gas.tsx +5 -3
- package/src/components/blockchain/tx.tsx +22 -8
- package/src/components/confirm.tsx +4 -11
- package/src/components/country-select.tsx +391 -378
- package/src/components/input.tsx +49 -45
- package/src/components/link.tsx +9 -7
- package/src/components/livemode.tsx +2 -6
- package/src/components/loading-button.tsx +63 -76
- package/src/components/over-due-invoice-payment.tsx +43 -28
- package/src/components/payment-beneficiaries.tsx +33 -14
- package/src/components/pricing-item.tsx +1 -4
- package/src/components/pricing-table.tsx +8 -8
- package/src/components/resume-subscription.tsx +20 -14
- package/src/components/table.tsx +2 -2
- package/src/components/truncated-text.tsx +0 -6
- package/src/contexts/donate.tsx +6 -7
- package/src/contexts/payment.tsx +7 -3
- package/src/history/invoice/list.tsx +74 -35
- package/src/history/payment/list.tsx +53 -16
- package/src/hooks/keyboard.ts +1 -1
- package/src/payment/amount.tsx +1 -6
- package/src/payment/donation-form.tsx +47 -29
- package/src/payment/error.tsx +16 -8
- package/src/payment/footer.tsx +11 -3
- package/src/payment/form/addon.tsx +6 -1
- package/src/payment/form/address.tsx +3 -7
- package/src/payment/form/currency.tsx +12 -2
- package/src/payment/form/index.tsx +30 -12
- package/src/payment/form/stripe/form.tsx +1 -5
- package/src/payment/header.tsx +14 -2
- package/src/payment/index.tsx +10 -21
- package/src/payment/product-card.tsx +41 -18
- package/src/payment/product-donation.tsx +85 -47
- package/src/payment/product-item.tsx +46 -24
- package/src/payment/product-skeleton.tsx +3 -2
- package/src/payment/skeleton/donation.tsx +12 -2
- package/src/payment/skeleton/overview.tsx +12 -2
- package/src/payment/skeleton/payment.tsx +16 -3
- package/src/payment/success.tsx +26 -15
- package/src/payment/summary.tsx +74 -42
- package/src/theme/index.tsx +5 -8
- package/src/theme/typography.ts +2 -2
|
@@ -22,8 +22,8 @@ var _util = require("../../libs/util");
|
|
|
22
22
|
var _table = _interopRequireDefault(require("../../components/table"));
|
|
23
23
|
var _navigation = require("../../libs/navigation");
|
|
24
24
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
25
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
|
26
|
-
function _interopRequireDefault(
|
|
25
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
26
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
27
27
|
const groupByDate = items => {
|
|
28
28
|
const grouped = {};
|
|
29
29
|
items.forEach(item => {
|
|
@@ -432,8 +432,8 @@ const InvoiceList = _react.default.memo(props => {
|
|
|
432
432
|
if (data && data.list.length === 0) {
|
|
433
433
|
if (data.subscription && ["active", "trialing"].includes(data.subscription.status)) {
|
|
434
434
|
return /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
435
|
-
color: "text.secondary",
|
|
436
435
|
sx: {
|
|
436
|
+
color: "text.secondary",
|
|
437
437
|
my: 0.5
|
|
438
438
|
},
|
|
439
439
|
children: t("payment.customer.invoice.next", {
|
|
@@ -442,8 +442,8 @@ const InvoiceList = _react.default.memo(props => {
|
|
|
442
442
|
});
|
|
443
443
|
}
|
|
444
444
|
return /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
445
|
-
color: "text.secondary",
|
|
446
445
|
sx: {
|
|
446
|
+
color: "text.secondary",
|
|
447
447
|
my: 0.5
|
|
448
448
|
},
|
|
449
449
|
children: t("payment.customer.invoice.empty")
|
|
@@ -480,17 +480,19 @@ const InvoiceList = _react.default.memo(props => {
|
|
|
480
480
|
return /* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Stack, {
|
|
481
481
|
direction: "row",
|
|
482
482
|
sx: {
|
|
483
|
+
gap: {
|
|
484
|
+
xs: 0.5,
|
|
485
|
+
sm: 1.5,
|
|
486
|
+
md: 3
|
|
487
|
+
},
|
|
488
|
+
alignItems: "center",
|
|
489
|
+
flexWrap: "nowrap",
|
|
483
490
|
my: 1
|
|
484
491
|
},
|
|
485
|
-
gap: {
|
|
486
|
-
xs: 0.5,
|
|
487
|
-
sm: 1.5,
|
|
488
|
-
md: 3
|
|
489
|
-
},
|
|
490
|
-
alignItems: "center",
|
|
491
|
-
flexWrap: "nowrap",
|
|
492
492
|
children: [/* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Box, {
|
|
493
|
-
|
|
493
|
+
sx: {
|
|
494
|
+
flex: 2
|
|
495
|
+
},
|
|
494
496
|
children: /* @__PURE__ */(0, _jsxRuntime.jsx)("a", {
|
|
495
497
|
href: link.url,
|
|
496
498
|
target: link.external ? "_blank" : target,
|
|
@@ -498,8 +500,10 @@ const InvoiceList = _react.default.memo(props => {
|
|
|
498
500
|
onClick: e => handleLinkClick(e, link),
|
|
499
501
|
children: /* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Stack, {
|
|
500
502
|
direction: "row",
|
|
501
|
-
alignItems: "center",
|
|
502
503
|
spacing: 0.5,
|
|
504
|
+
sx: {
|
|
505
|
+
alignItems: "center"
|
|
506
|
+
},
|
|
503
507
|
children: [/* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
504
508
|
component: "span",
|
|
505
509
|
children: invoice.number
|
|
@@ -516,8 +520,10 @@ const InvoiceList = _react.default.memo(props => {
|
|
|
516
520
|
})
|
|
517
521
|
})
|
|
518
522
|
}), /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Box, {
|
|
519
|
-
|
|
520
|
-
|
|
523
|
+
sx: {
|
|
524
|
+
flex: 1,
|
|
525
|
+
textAlign: "right"
|
|
526
|
+
},
|
|
521
527
|
children: /* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Typography, {
|
|
522
528
|
sx: isVoid ? {
|
|
523
529
|
textDecoration: "line-through"
|
|
@@ -525,16 +531,18 @@ const InvoiceList = _react.default.memo(props => {
|
|
|
525
531
|
children: [(0, _util.formatBNStr)(invoice.total, invoice.paymentCurrency.decimal), "\xA0", invoice.paymentCurrency.symbol]
|
|
526
532
|
})
|
|
527
533
|
}), /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Box, {
|
|
528
|
-
|
|
529
|
-
|
|
534
|
+
sx: {
|
|
535
|
+
flex: 1,
|
|
536
|
+
textAlign: "right"
|
|
537
|
+
},
|
|
530
538
|
children: /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
531
539
|
children: (0, _util.formatToDate)(invoice.created_at, locale, "HH:mm:ss")
|
|
532
540
|
})
|
|
533
541
|
}), !action && /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Box, {
|
|
534
|
-
flex: 2,
|
|
535
542
|
className: "invoice-description",
|
|
536
|
-
textAlign: "right",
|
|
537
543
|
sx: {
|
|
544
|
+
flex: 2,
|
|
545
|
+
textAlign: "right",
|
|
538
546
|
display: {
|
|
539
547
|
xs: "none",
|
|
540
548
|
lg: "inline-flex"
|
|
@@ -544,8 +552,10 @@ const InvoiceList = _react.default.memo(props => {
|
|
|
544
552
|
children: invoice.description || invoice.id
|
|
545
553
|
})
|
|
546
554
|
}), /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Box, {
|
|
547
|
-
|
|
548
|
-
|
|
555
|
+
sx: {
|
|
556
|
+
flex: 1,
|
|
557
|
+
textAlign: "right"
|
|
558
|
+
},
|
|
549
559
|
children: action ? connect ? /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Button, {
|
|
550
560
|
variant: "contained",
|
|
551
561
|
color: "primary",
|
|
@@ -595,7 +605,9 @@ const InvoiceList = _react.default.memo(props => {
|
|
|
595
605
|
resource: t("payment.customer.invoices")
|
|
596
606
|
})
|
|
597
607
|
}), !hasMore && data.count > size && /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
598
|
-
|
|
608
|
+
sx: {
|
|
609
|
+
color: "text.secondary"
|
|
610
|
+
},
|
|
599
611
|
children: t("common.noMore", {
|
|
600
612
|
resource: t("payment.customer.invoices")
|
|
601
613
|
})
|
|
@@ -603,7 +615,21 @@ const InvoiceList = _react.default.memo(props => {
|
|
|
603
615
|
})]
|
|
604
616
|
});
|
|
605
617
|
});
|
|
606
|
-
function CustomerInvoiceList(
|
|
618
|
+
function CustomerInvoiceList(rawProps) {
|
|
619
|
+
const props = Object.assign({
|
|
620
|
+
customer_id: "",
|
|
621
|
+
subscription_id: "",
|
|
622
|
+
currency_id: "",
|
|
623
|
+
include_staking: false,
|
|
624
|
+
include_recovered_from: false,
|
|
625
|
+
status: "open,paid,uncollectible",
|
|
626
|
+
pageSize: 10,
|
|
627
|
+
target: "_self",
|
|
628
|
+
action: "",
|
|
629
|
+
type: "list",
|
|
630
|
+
onTableDataChange: () => {},
|
|
631
|
+
relatedSubscription: false
|
|
632
|
+
}, rawProps);
|
|
607
633
|
const {
|
|
608
634
|
action,
|
|
609
635
|
type
|
|
@@ -672,20 +698,6 @@ function CustomerInvoiceList(props) {
|
|
|
672
698
|
onPay
|
|
673
699
|
});
|
|
674
700
|
}
|
|
675
|
-
CustomerInvoiceList.defaultProps = {
|
|
676
|
-
customer_id: "",
|
|
677
|
-
subscription_id: "",
|
|
678
|
-
currency_id: "",
|
|
679
|
-
include_staking: false,
|
|
680
|
-
include_recovered_from: false,
|
|
681
|
-
status: "open,paid,uncollectible",
|
|
682
|
-
pageSize: 10,
|
|
683
|
-
target: "_self",
|
|
684
|
-
action: "",
|
|
685
|
-
type: "list",
|
|
686
|
-
onTableDataChange: () => {},
|
|
687
|
-
relatedSubscription: false
|
|
688
|
-
};
|
|
689
701
|
const Root = (0, _system.styled)(_material.Stack)`
|
|
690
702
|
@media (max-width: ${({
|
|
691
703
|
theme
|
|
@@ -12,7 +12,7 @@ var _tx = _interopRequireDefault(require("../../components/blockchain/tx"));
|
|
|
12
12
|
var _status = _interopRequireDefault(require("../../components/status"));
|
|
13
13
|
var _api = _interopRequireDefault(require("../../libs/api"));
|
|
14
14
|
var _util = require("../../libs/util");
|
|
15
|
-
function _interopRequireDefault(
|
|
15
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
16
|
const groupByDate = items => {
|
|
17
17
|
const grouped = {};
|
|
18
18
|
items.forEach(item => {
|
|
@@ -58,7 +58,9 @@ function CustomerPaymentList({
|
|
|
58
58
|
}
|
|
59
59
|
if (data && data.list.length === 0) {
|
|
60
60
|
return /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
61
|
-
|
|
61
|
+
sx: {
|
|
62
|
+
color: "text.secondary"
|
|
63
|
+
},
|
|
62
64
|
children: t("payment.customer.payment.empty")
|
|
63
65
|
});
|
|
64
66
|
}
|
|
@@ -66,8 +68,8 @@ function CustomerPaymentList({
|
|
|
66
68
|
const grouped = groupByDate(data.list);
|
|
67
69
|
return /* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Stack, {
|
|
68
70
|
direction: "column",
|
|
69
|
-
gap: 1,
|
|
70
71
|
sx: {
|
|
72
|
+
gap: 1,
|
|
71
73
|
mt: 1
|
|
72
74
|
},
|
|
73
75
|
children: [Object.entries(grouped).map(([date, payments]) => /* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
@@ -85,39 +87,49 @@ function CustomerPaymentList({
|
|
|
85
87
|
sm: "row"
|
|
86
88
|
},
|
|
87
89
|
sx: {
|
|
90
|
+
gap: {
|
|
91
|
+
xs: 0.5,
|
|
92
|
+
sm: 1.5,
|
|
93
|
+
md: 3
|
|
94
|
+
},
|
|
95
|
+
flexWrap: "nowrap",
|
|
88
96
|
my: 1
|
|
89
97
|
},
|
|
90
|
-
gap: {
|
|
91
|
-
xs: 0.5,
|
|
92
|
-
sm: 1.5,
|
|
93
|
-
md: 3
|
|
94
|
-
},
|
|
95
|
-
flexWrap: "nowrap",
|
|
96
98
|
children: [/* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Box, {
|
|
97
|
-
|
|
99
|
+
sx: {
|
|
100
|
+
flex: 3
|
|
101
|
+
},
|
|
98
102
|
children: /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
99
103
|
children: (0, _util.formatToDate)(item.created_at)
|
|
100
104
|
})
|
|
101
105
|
}), /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Box, {
|
|
102
|
-
|
|
106
|
+
sx: {
|
|
107
|
+
flex: 2
|
|
108
|
+
},
|
|
103
109
|
children: /* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Typography, {
|
|
104
|
-
|
|
110
|
+
sx: {
|
|
111
|
+
textAlign: "right"
|
|
112
|
+
},
|
|
105
113
|
children: [(0, _util.formatBNStr)(item.amount_received, item.paymentCurrency.decimal), "\xA0", item.paymentCurrency.symbol]
|
|
106
114
|
})
|
|
107
115
|
}), /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Box, {
|
|
108
|
-
|
|
116
|
+
sx: {
|
|
117
|
+
flex: 3
|
|
118
|
+
},
|
|
109
119
|
children: /* @__PURE__ */(0, _jsxRuntime.jsx)(_status.default, {
|
|
110
120
|
label: item.status,
|
|
111
121
|
color: (0, _util.getPaymentIntentStatusColor)(item.status)
|
|
112
122
|
})
|
|
113
123
|
}), /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Box, {
|
|
114
|
-
|
|
124
|
+
sx: {
|
|
125
|
+
flex: 3
|
|
126
|
+
},
|
|
115
127
|
children: /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
116
128
|
children: item.description || "-"
|
|
117
129
|
})
|
|
118
130
|
}), /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Box, {
|
|
119
|
-
flex: 3,
|
|
120
131
|
sx: {
|
|
132
|
+
flex: 3,
|
|
121
133
|
minWidth: "220px"
|
|
122
134
|
},
|
|
123
135
|
children: (item.payment_details?.arcblock?.tx_hash || item.payment_details?.ethereum?.tx_hash || item.payment_details?.base?.tx_hash) && /* @__PURE__ */(0, _jsxRuntime.jsx)(_tx.default, {
|
|
@@ -140,7 +152,9 @@ function CustomerPaymentList({
|
|
|
140
152
|
resource: t("payment.customer.payments")
|
|
141
153
|
})
|
|
142
154
|
}), !hasMore && data.count > pageSize && /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
143
|
-
|
|
155
|
+
sx: {
|
|
156
|
+
color: "text.secondary"
|
|
157
|
+
},
|
|
144
158
|
children: t("common.noMore", {
|
|
145
159
|
resource: t("payment.customer.payments")
|
|
146
160
|
})
|
package/lib/hooks/keyboard.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ type TabNavigationOptions<T> = {
|
|
|
13
13
|
/** a selector to find navigable elements */
|
|
14
14
|
selector?: string;
|
|
15
15
|
/** an element container reference, limiting the query DOM range to improve performance */
|
|
16
|
-
containerRef?: RefObject<HTMLElement>;
|
|
16
|
+
containerRef?: RefObject<HTMLElement | null>;
|
|
17
17
|
/** the type of the current value, can be 'index' or 'value' */
|
|
18
18
|
valueType?: 'index' | 'value';
|
|
19
19
|
};
|
package/lib/hooks/mobile.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.useMobile = useMobile;
|
|
7
7
|
var _styles = require("@mui/material/styles");
|
|
8
8
|
var _useMediaQuery = _interopRequireDefault(require("@mui/material/useMediaQuery"));
|
|
9
|
-
function _interopRequireDefault(
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
10
|
const MOBILE_POINT = "md";
|
|
11
11
|
function useMobile(mobilePoint = MOBILE_POINT) {
|
|
12
12
|
const theme = (0, _styles.useTheme)();
|
|
@@ -7,7 +7,7 @@ exports.useSubscription = useSubscription;
|
|
|
7
7
|
var _ws = require("@arcblock/ws");
|
|
8
8
|
var _get = _interopRequireDefault(require("lodash/get"));
|
|
9
9
|
var _react = require("react");
|
|
10
|
-
function _interopRequireDefault(
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
11
|
const RELAY_SOCKET_PREFIX = "/.well-known/service/relay";
|
|
12
12
|
const getAppId = () => (0, _get.default)(window, "blocklet.appPid") || (0, _get.default)(window, "blocklet.appId") || "";
|
|
13
13
|
const getRelayChannel = token => `relay:${getAppId()}:${token}`;
|
package/lib/index.js
CHANGED
|
@@ -451,6 +451,6 @@ Object.keys(_validator).forEach(function (key) {
|
|
|
451
451
|
});
|
|
452
452
|
});
|
|
453
453
|
var _locales = require("./locales");
|
|
454
|
-
function _interopRequireDefault(
|
|
454
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
455
455
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
456
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
|
456
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
package/lib/libs/api.js
CHANGED
|
@@ -8,7 +8,7 @@ var _context = require("@arcblock/ux/lib/Locale/context");
|
|
|
8
8
|
var _jsSdk = require("@blocklet/js-sdk");
|
|
9
9
|
var _isNull = _interopRequireDefault(require("lodash/isNull"));
|
|
10
10
|
var _util = require("./util");
|
|
11
|
-
function _interopRequireDefault(
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
12
|
const api = (0, _jsSdk.createAxios)();
|
|
13
13
|
api.interceptors.request.use(config => {
|
|
14
14
|
const prefix = (0, _util.getPrefix)();
|
package/lib/libs/dayjs.js
CHANGED
|
@@ -10,7 +10,7 @@ var _localizedFormat = _interopRequireDefault(require("dayjs/plugin/localizedFor
|
|
|
10
10
|
var _relativeTime = _interopRequireDefault(require("dayjs/plugin/relativeTime"));
|
|
11
11
|
var _timezone = _interopRequireDefault(require("dayjs/plugin/timezone"));
|
|
12
12
|
var _utc = _interopRequireDefault(require("dayjs/plugin/utc"));
|
|
13
|
-
function _interopRequireDefault(
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
14
|
Promise.resolve().then(() => require("dayjs/locale/en"));
|
|
15
15
|
Promise.resolve().then(() => require("dayjs/locale/zh"));
|
|
16
16
|
_dayjs.default.extend(_relativeTime.default);
|
|
@@ -83,7 +83,6 @@ const formatPhone = (phoneNumber, defaultCountry = "US") => {
|
|
|
83
83
|
AE: "971"
|
|
84
84
|
// UAE
|
|
85
85
|
};
|
|
86
|
-
|
|
87
86
|
const COUNTRY_PATTERNS = [[/^1[3-9]\d{9}$/, "86"],
|
|
88
87
|
// China mobile: 11 digits, starts with 1
|
|
89
88
|
[/^\d{10}$/, "1"],
|
|
@@ -101,7 +100,6 @@ const formatPhone = (phoneNumber, defaultCountry = "US") => {
|
|
|
101
100
|
[/^[0-9]\d{8}$/, "86"]
|
|
102
101
|
// China landline: 9 digits
|
|
103
102
|
];
|
|
104
|
-
|
|
105
103
|
let numberToFormat = cleanedNumber;
|
|
106
104
|
if (numberToFormat.startsWith("0")) {
|
|
107
105
|
numberToFormat = numberToFormat.substring(1);
|
package/lib/libs/theme.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
module.exports = create;
|
|
7
7
|
var _Theme = require("@arcblock/ux/lib/Theme");
|
|
8
8
|
var _merge = _interopRequireDefault(require("lodash/merge"));
|
|
9
|
-
function _interopRequireDefault(
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
10
|
function create(settings = {}) {
|
|
11
11
|
return (0, _Theme.createTheme)((0, _merge.default)({
|
|
12
12
|
typography: {
|
package/lib/libs/util.js
CHANGED
|
@@ -73,7 +73,7 @@ var _reactInternationalPhone = require("react-international-phone");
|
|
|
73
73
|
var _ufo = require("ufo");
|
|
74
74
|
var _locales = require("../locales");
|
|
75
75
|
var _dayjs = _interopRequireDefault(require("./dayjs"));
|
|
76
|
-
function _interopRequireDefault(
|
|
76
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
77
77
|
const PAYMENT_KIT_DID = exports.PAYMENT_KIT_DID = "z2qaCNvKMv5GjouKdcDWexv6WqtHbpNPQDnAk";
|
|
78
78
|
const isPaymentKitMounted = () => {
|
|
79
79
|
return (window.blocklet?.componentMountPoints || []).some(x => x.did === PAYMENT_KIT_DID);
|
package/lib/libs/validator.js
CHANGED
|
@@ -7,7 +7,7 @@ exports.getFieldValidation = getFieldValidation;
|
|
|
7
7
|
exports.validatePostalCode = validatePostalCode;
|
|
8
8
|
var _isPostalCode = _interopRequireDefault(require("validator/lib/isPostalCode"));
|
|
9
9
|
var _locales = require("../locales");
|
|
10
|
-
function _interopRequireDefault(
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
11
|
const POSTAL_CODE_SUPPORTED_COUNTRIES = ["AD", "AT", "AU", "BE", "BG", "BR", "CA", "CH", "CN", "CZ", "DE", "DK", "DZ", "EE", "ES", "FI", "FR", "GB", "GR", "HR", "HU", "ID", "IE", "IL", "IN", "IR", "IS", "IT", "JP", "KE", "KR", "LI", "LT", "LU", "LV", "MX", "MT", "NL", "NO", "NZ", "PL", "PR", "PT", "RO", "RU", "SA", "SE", "SI", "SK", "TN", "TW", "UA", "US", "ZA", "ZM"];
|
|
12
12
|
function validatePostalCode(postalCode, country) {
|
|
13
13
|
if (!postalCode) return true;
|
package/lib/locales/en.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
|
|
7
7
|
var _flat = _interopRequireDefault(require("flat"));
|
|
8
8
|
var _constant = require("../libs/constant");
|
|
9
|
-
function _interopRequireDefault(
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
10
|
module.exports = (0, _flat.default)({
|
|
11
11
|
common: {
|
|
12
12
|
id: "ID",
|
package/lib/locales/index.js
CHANGED
|
@@ -7,7 +7,7 @@ exports.translations = exports.translate = exports.t = exports.createTranslator
|
|
|
7
7
|
var _template = _interopRequireDefault(require("lodash/template"));
|
|
8
8
|
var _en = _interopRequireDefault(require("./en"));
|
|
9
9
|
var _zh = _interopRequireDefault(require("./zh"));
|
|
10
|
-
function _interopRequireDefault(
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
11
|
const translations = exports.translations = {
|
|
12
12
|
zh: _zh.default,
|
|
13
13
|
en: _en.default
|
package/lib/locales/zh.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
|
|
7
7
|
var _flat = _interopRequireDefault(require("flat"));
|
|
8
8
|
var _constant = require("../libs/constant");
|
|
9
|
-
function _interopRequireDefault(
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
10
|
module.exports = (0, _flat.default)({
|
|
11
11
|
common: {
|
|
12
12
|
id: "ID",
|
package/lib/payment/amount.d.ts
CHANGED
|
@@ -2,10 +2,5 @@ import type { TypographyProps } from '@mui/material';
|
|
|
2
2
|
type Props = {
|
|
3
3
|
amount: string;
|
|
4
4
|
} & TypographyProps;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var defaultProps: {
|
|
8
|
-
sx: {};
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
export default PaymentAmount;
|
|
5
|
+
export default function PaymentAmount({ amount, sx }: Props): import("react").JSX.Element;
|
|
6
|
+
export {};
|
package/lib/payment/amount.js
CHANGED
|
@@ -8,7 +8,7 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
8
8
|
var _material = require("@mui/material");
|
|
9
9
|
function PaymentAmount({
|
|
10
10
|
amount,
|
|
11
|
-
sx
|
|
11
|
+
sx = {}
|
|
12
12
|
}) {
|
|
13
13
|
return /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
14
14
|
component: "div",
|
|
@@ -22,8 +22,4 @@ function PaymentAmount({
|
|
|
22
22
|
},
|
|
23
23
|
children: amount
|
|
24
24
|
});
|
|
25
|
-
}
|
|
26
|
-
PaymentAmount.defaultProps = {
|
|
27
|
-
// eslint-disable-next-line react/default-props-match-prop-types
|
|
28
|
-
sx: {}
|
|
29
|
-
};
|
|
25
|
+
}
|
|
@@ -8,17 +8,9 @@ type Props = CheckoutContext & CheckoutCallbacks & {
|
|
|
8
8
|
formRender?: Record<string, any>;
|
|
9
9
|
id: string;
|
|
10
10
|
};
|
|
11
|
-
|
|
12
|
-
declare namespace DonationForm {
|
|
13
|
-
var defaultProps: {
|
|
14
|
-
completed: boolean;
|
|
15
|
-
error: null;
|
|
16
|
-
showCheckoutSummary: boolean;
|
|
17
|
-
formRender: {};
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
export default DonationForm;
|
|
11
|
+
export default function DonationForm({ checkoutSession, paymentMethods, paymentIntent, paymentLink, customer, completed, error, mode, onPaid, onError, onChange, goBack, action, showCheckoutSummary, formRender, id, }: Props): import("react").JSX.Element;
|
|
21
12
|
type RootProps = {
|
|
22
13
|
mode: LiteralUnion<'standalone' | 'inline' | 'popup', string>;
|
|
23
14
|
} & BoxProps;
|
|
24
15
|
export declare const Root: React.FC<RootProps>;
|
|
16
|
+
export {};
|
|
@@ -29,31 +29,26 @@ var _confirm = _interopRequireDefault(require("../components/confirm"));
|
|
|
29
29
|
var _paymentBeneficiaries = _interopRequireDefault(require("../components/payment-beneficiaries"));
|
|
30
30
|
var _donation = _interopRequireDefault(require("./skeleton/donation"));
|
|
31
31
|
var _phoneValidator = require("../libs/phone-validator");
|
|
32
|
-
function _interopRequireDefault(
|
|
32
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
33
33
|
const getBenefits = async (id, url) => {
|
|
34
34
|
const {
|
|
35
35
|
data
|
|
36
36
|
} = await _api.default.get(`/api/payment-links/${id}/benefits?${url ? `url=${url}` : ""}`);
|
|
37
37
|
return data;
|
|
38
38
|
};
|
|
39
|
-
PaymentInner.defaultProps = {
|
|
40
|
-
completed: false,
|
|
41
|
-
showCheckoutSummary: true,
|
|
42
|
-
formRender: {}
|
|
43
|
-
};
|
|
44
39
|
function PaymentInner({
|
|
45
40
|
checkoutSession,
|
|
46
41
|
paymentMethods,
|
|
47
42
|
paymentLink,
|
|
48
43
|
paymentIntent,
|
|
49
44
|
customer,
|
|
50
|
-
completed,
|
|
45
|
+
completed = false,
|
|
51
46
|
mode,
|
|
52
47
|
onPaid,
|
|
53
48
|
onError,
|
|
54
49
|
onChange,
|
|
55
50
|
action,
|
|
56
|
-
formRender,
|
|
51
|
+
formRender = {},
|
|
57
52
|
benefits
|
|
58
53
|
}) {
|
|
59
54
|
const {
|
|
@@ -214,10 +209,12 @@ function PaymentInner({
|
|
|
214
209
|
}
|
|
215
210
|
}), /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Stack, {
|
|
216
211
|
direction: "row",
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
212
|
+
sx: {
|
|
213
|
+
justifyContent: "flex-end",
|
|
214
|
+
alignItems: "center",
|
|
215
|
+
flexWrap: "wrap",
|
|
216
|
+
gap: 1
|
|
217
|
+
},
|
|
221
218
|
children: /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Button, {
|
|
222
219
|
variant: "outlined",
|
|
223
220
|
size: "large",
|
|
@@ -240,9 +237,9 @@ function PaymentInner({
|
|
|
240
237
|
},
|
|
241
238
|
children: [/* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Stack, {
|
|
242
239
|
direction: "row",
|
|
243
|
-
justifyContent: "space-between",
|
|
244
|
-
alignItems: "center",
|
|
245
240
|
sx: {
|
|
241
|
+
justifyContent: "space-between",
|
|
242
|
+
alignItems: "center",
|
|
246
243
|
mb: 2
|
|
247
244
|
},
|
|
248
245
|
children: [/* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
@@ -299,10 +296,12 @@ function PaymentInner({
|
|
|
299
296
|
}
|
|
300
297
|
}), /* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Stack, {
|
|
301
298
|
direction: "row",
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
299
|
+
sx: {
|
|
300
|
+
justifyContent: "space-between",
|
|
301
|
+
alignItems: "center",
|
|
302
|
+
flexWrap: "wrap",
|
|
303
|
+
gap: 1
|
|
304
|
+
},
|
|
306
305
|
children: [benefits && benefits.length > 0 && (benefitsState.open ? /* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Typography, {
|
|
307
306
|
onClick: () => setBenefitsState({
|
|
308
307
|
open: false
|
|
@@ -324,13 +323,13 @@ function PaymentInner({
|
|
|
324
323
|
}
|
|
325
324
|
}), t("common.back")]
|
|
326
325
|
}) : /* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
327
|
-
display: "flex",
|
|
328
|
-
gap: 0.5,
|
|
329
|
-
alignItems: "center",
|
|
330
326
|
onClick: () => setBenefitsState({
|
|
331
327
|
open: true
|
|
332
328
|
}),
|
|
333
329
|
sx: {
|
|
330
|
+
display: "flex",
|
|
331
|
+
gap: 0.5,
|
|
332
|
+
alignItems: "center",
|
|
334
333
|
color: "text.secondary",
|
|
335
334
|
cursor: "pointer",
|
|
336
335
|
"& .benefits-arrow": {
|
|
@@ -360,9 +359,9 @@ function PaymentInner({
|
|
|
360
359
|
}
|
|
361
360
|
})]
|
|
362
361
|
})), benefitsState.open ? null : /* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
363
|
-
display: "flex",
|
|
364
|
-
gap: 2,
|
|
365
362
|
sx: {
|
|
363
|
+
display: "flex",
|
|
364
|
+
gap: 2,
|
|
366
365
|
flex: {
|
|
367
366
|
xs: 1,
|
|
368
367
|
md: "auto"
|
|
@@ -399,20 +398,14 @@ function PaymentInner({
|
|
|
399
398
|
})
|
|
400
399
|
});
|
|
401
400
|
}
|
|
402
|
-
DonationForm.defaultProps = {
|
|
403
|
-
completed: false,
|
|
404
|
-
error: null,
|
|
405
|
-
showCheckoutSummary: true,
|
|
406
|
-
formRender: {}
|
|
407
|
-
};
|
|
408
401
|
function DonationForm({
|
|
409
402
|
checkoutSession,
|
|
410
403
|
paymentMethods,
|
|
411
404
|
paymentIntent,
|
|
412
405
|
paymentLink,
|
|
413
406
|
customer,
|
|
414
|
-
completed,
|
|
415
|
-
error,
|
|
407
|
+
completed = false,
|
|
408
|
+
error = null,
|
|
416
409
|
mode,
|
|
417
410
|
onPaid,
|
|
418
411
|
onError,
|
|
@@ -420,7 +413,7 @@ function DonationForm({
|
|
|
420
413
|
goBack,
|
|
421
414
|
action,
|
|
422
415
|
showCheckoutSummary = true,
|
|
423
|
-
formRender,
|
|
416
|
+
formRender = {},
|
|
424
417
|
id
|
|
425
418
|
}) {
|
|
426
419
|
const {
|
|
@@ -476,10 +469,12 @@ function DonationForm({
|
|
|
476
469
|
}
|
|
477
470
|
}), /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Stack, {
|
|
478
471
|
direction: "row",
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
472
|
+
sx: {
|
|
473
|
+
justifyContent: "flex-end",
|
|
474
|
+
alignItems: "center",
|
|
475
|
+
flexWrap: "wrap",
|
|
476
|
+
gap: 1
|
|
477
|
+
},
|
|
483
478
|
children: /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Button, {
|
|
484
479
|
variant: "outlined",
|
|
485
480
|
size: "large",
|
|
@@ -540,9 +535,9 @@ function DonationForm({
|
|
|
540
535
|
});
|
|
541
536
|
};
|
|
542
537
|
return /* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Stack, {
|
|
543
|
-
display: "flex",
|
|
544
|
-
flexDirection: "column",
|
|
545
538
|
sx: {
|
|
539
|
+
display: "flex",
|
|
540
|
+
flexDirection: "column",
|
|
546
541
|
height: mode === "standalone" ? "100vh" : "auto",
|
|
547
542
|
overflow: isMobileSafariEnv ? "visible" : "hidden"
|
|
548
543
|
},
|
package/lib/payment/error.d.ts
CHANGED
|
@@ -6,11 +6,5 @@ type Props = {
|
|
|
6
6
|
button?: string | React.ReactNode;
|
|
7
7
|
mode?: ModeType;
|
|
8
8
|
};
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var defaultProps: {
|
|
12
|
-
button: string;
|
|
13
|
-
mode: string;
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
export default PaymentError;
|
|
9
|
+
export default function PaymentError({ title, description, button, mode }: Props): import("react").JSX.Element;
|
|
10
|
+
export {};
|