@blocklet/payment-react 1.24.0 → 1.24.2
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/components/over-due-invoice-payment.js +1 -1
- package/es/components/resume-subscription.js +1 -1
- package/es/components/stripe-payment-action.js +1 -1
- package/es/payment/success.js +1 -1
- package/lib/components/over-due-invoice-payment.js +2 -2
- package/lib/components/resume-subscription.js +2 -2
- package/lib/components/stripe-payment-action.js +2 -2
- package/lib/payment/success.js +3 -3
- package/package.json +11 -11
- package/src/components/over-due-invoice-payment.tsx +1 -1
- package/src/components/resume-subscription.tsx +1 -1
- package/src/components/stripe-payment-action.tsx +1 -1
- package/src/payment/success.tsx +1 -1
|
@@ -7,7 +7,7 @@ import Toast from "@arcblock/ux/lib/Toast";
|
|
|
7
7
|
import { joinURL } from "ufo";
|
|
8
8
|
import { useRequest } from "ahooks";
|
|
9
9
|
import pWaitFor from "p-wait-for";
|
|
10
|
-
import
|
|
10
|
+
import Dialog from "@arcblock/ux/lib/Dialog/dialog";
|
|
11
11
|
import { CheckCircle as CheckCircleIcon } from "@mui/icons-material";
|
|
12
12
|
import debounce from "lodash/debounce";
|
|
13
13
|
import { usePaymentContext } from "../contexts/payment.js";
|
|
@@ -5,7 +5,7 @@ import { useLocaleContext } from "@arcblock/ux/lib/Locale/context";
|
|
|
5
5
|
import Toast from "@arcblock/ux/lib/Toast";
|
|
6
6
|
import { joinURL } from "ufo";
|
|
7
7
|
import { useRequest } from "ahooks";
|
|
8
|
-
import
|
|
8
|
+
import Dialog from "@arcblock/ux/lib/Dialog/dialog";
|
|
9
9
|
import { usePaymentContext } from "../contexts/payment.js";
|
|
10
10
|
import { formatError, formatToDate, getPrefix, isCrossOrigin } from "../libs/util.js";
|
|
11
11
|
import api from "../libs/api.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useLocaleContext } from "@arcblock/ux/lib/Locale/context";
|
|
3
3
|
import Toast from "@arcblock/ux/lib/Toast";
|
|
4
|
-
import
|
|
4
|
+
import Dialog from "@arcblock/ux/lib/Dialog/dialog";
|
|
5
5
|
import { Button, Typography } from "@mui/material";
|
|
6
6
|
import { useSetState } from "ahooks";
|
|
7
7
|
import { useEffect, useRef } from "react";
|
package/es/payment/success.js
CHANGED
|
@@ -5,7 +5,7 @@ import { useLocaleContext } from "@arcblock/ux/lib/Locale/context";
|
|
|
5
5
|
import { Box, Grow, Link, Paper, Stack, styled, Typography } from "@mui/material";
|
|
6
6
|
import { useEffect, useRef, useState } from "react";
|
|
7
7
|
import { joinURL } from "ufo";
|
|
8
|
-
import
|
|
8
|
+
import Button from "@arcblock/ux/lib/Button";
|
|
9
9
|
import { usePaymentContext } from "../contexts/payment.js";
|
|
10
10
|
import { VendorPlaceholder, VendorProgressItem } from "./progress-item.js";
|
|
11
11
|
export default function PaymentSuccess({
|
|
@@ -13,7 +13,7 @@ var _Toast = _interopRequireDefault(require("@arcblock/ux/lib/Toast"));
|
|
|
13
13
|
var _ufo = require("ufo");
|
|
14
14
|
var _ahooks = require("ahooks");
|
|
15
15
|
var _pWaitFor = _interopRequireDefault(require("p-wait-for"));
|
|
16
|
-
var
|
|
16
|
+
var _dialog = _interopRequireDefault(require("@arcblock/ux/lib/Dialog/dialog"));
|
|
17
17
|
var _iconsMaterial = require("@mui/icons-material");
|
|
18
18
|
var _debounce = _interopRequireDefault(require("lodash/debounce"));
|
|
19
19
|
var _payment = require("../contexts/payment");
|
|
@@ -457,7 +457,7 @@ function OverdueInvoicePayment({
|
|
|
457
457
|
})
|
|
458
458
|
});
|
|
459
459
|
}
|
|
460
|
-
return /* @__PURE__ */(0, _jsxRuntime.jsx)(
|
|
460
|
+
return /* @__PURE__ */(0, _jsxRuntime.jsx)(_dialog.default, {
|
|
461
461
|
PaperProps: {
|
|
462
462
|
style: {
|
|
463
463
|
minHeight: "auto"
|
|
@@ -11,7 +11,7 @@ var _context = require("@arcblock/ux/lib/Locale/context");
|
|
|
11
11
|
var _Toast = _interopRequireDefault(require("@arcblock/ux/lib/Toast"));
|
|
12
12
|
var _ufo = require("ufo");
|
|
13
13
|
var _ahooks = require("ahooks");
|
|
14
|
-
var
|
|
14
|
+
var _dialog = _interopRequireDefault(require("@arcblock/ux/lib/Dialog/dialog"));
|
|
15
15
|
var _payment = require("../contexts/payment");
|
|
16
16
|
var _util = require("../libs/util");
|
|
17
17
|
var _api = _interopRequireDefault(require("../libs/api"));
|
|
@@ -152,7 +152,7 @@ function RecoverSubscription({
|
|
|
152
152
|
if (loading) {
|
|
153
153
|
return null;
|
|
154
154
|
}
|
|
155
|
-
return /* @__PURE__ */(0, _jsxRuntime.jsx)(
|
|
155
|
+
return /* @__PURE__ */(0, _jsxRuntime.jsx)(_dialog.default, {
|
|
156
156
|
PaperProps: {
|
|
157
157
|
style: {
|
|
158
158
|
minHeight: "auto"
|
|
@@ -7,7 +7,7 @@ module.exports = StripePaymentAction;
|
|
|
7
7
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
8
8
|
var _context = require("@arcblock/ux/lib/Locale/context");
|
|
9
9
|
var _Toast = _interopRequireDefault(require("@arcblock/ux/lib/Toast"));
|
|
10
|
-
var
|
|
10
|
+
var _dialog = _interopRequireDefault(require("@arcblock/ux/lib/Dialog/dialog"));
|
|
11
11
|
var _material = require("@mui/material");
|
|
12
12
|
var _ahooks = require("ahooks");
|
|
13
13
|
var _react = require("react");
|
|
@@ -148,7 +148,7 @@ function StripePaymentAction(props) {
|
|
|
148
148
|
onClose?.();
|
|
149
149
|
};
|
|
150
150
|
return /* @__PURE__ */(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
151
|
-
children: [children?.(handlePay, state.paying), state.confirmDialog && /* @__PURE__ */(0, _jsxRuntime.jsx)(
|
|
151
|
+
children: [children?.(handlePay, state.paying), state.confirmDialog && /* @__PURE__ */(0, _jsxRuntime.jsx)(_dialog.default, {
|
|
152
152
|
open: state.confirmDialog,
|
|
153
153
|
title: t("payment.customer.invoice.paymentConfirmTitle"),
|
|
154
154
|
onClose: handleConfirmCancel,
|
package/lib/payment/success.js
CHANGED
|
@@ -11,7 +11,7 @@ var _context = require("@arcblock/ux/lib/Locale/context");
|
|
|
11
11
|
var _material = require("@mui/material");
|
|
12
12
|
var _react = require("react");
|
|
13
13
|
var _ufo = require("ufo");
|
|
14
|
-
var
|
|
14
|
+
var _Button = _interopRequireDefault(require("@arcblock/ux/lib/Button"));
|
|
15
15
|
var _payment = require("../contexts/payment");
|
|
16
16
|
var _progressItem = require("./progress-item");
|
|
17
17
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -160,7 +160,7 @@ function PaymentSuccess({
|
|
|
160
160
|
borderColor: "grey.300",
|
|
161
161
|
mx: 2
|
|
162
162
|
}
|
|
163
|
-
}), /* @__PURE__ */(0, _jsxRuntime.jsx)(
|
|
163
|
+
}), /* @__PURE__ */(0, _jsxRuntime.jsx)(_Button.default, {
|
|
164
164
|
variant: "text",
|
|
165
165
|
color: "primary",
|
|
166
166
|
size: "small",
|
|
@@ -175,7 +175,7 @@ function PaymentSuccess({
|
|
|
175
175
|
}, subscription.id))
|
|
176
176
|
});
|
|
177
177
|
} else if (subscriptionId) {
|
|
178
|
-
next = /* @__PURE__ */(0, _jsxRuntime.jsx)(
|
|
178
|
+
next = /* @__PURE__ */(0, _jsxRuntime.jsx)(_Button.default, {
|
|
179
179
|
variant: "outlined",
|
|
180
180
|
color: "primary",
|
|
181
181
|
sx: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/payment-react",
|
|
3
|
-
"version": "1.24.
|
|
3
|
+
"version": "1.24.2",
|
|
4
4
|
"description": "Reusable react components for payment kit v2",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -54,18 +54,18 @@
|
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@arcblock/bridge": "^3.
|
|
58
|
-
"@arcblock/did-connect-react": "^3.
|
|
59
|
-
"@arcblock/react-hooks": "^3.
|
|
60
|
-
"@arcblock/ux": "^3.
|
|
61
|
-
"@arcblock/ws": "^1.28.
|
|
62
|
-
"@blocklet/theme": "^3.
|
|
63
|
-
"@blocklet/ui-react": "^3.
|
|
57
|
+
"@arcblock/bridge": "^3.4.7",
|
|
58
|
+
"@arcblock/did-connect-react": "^3.4.7",
|
|
59
|
+
"@arcblock/react-hooks": "^3.4.7",
|
|
60
|
+
"@arcblock/ux": "^3.4.7",
|
|
61
|
+
"@arcblock/ws": "^1.28.5",
|
|
62
|
+
"@blocklet/theme": "^3.4.7",
|
|
63
|
+
"@blocklet/ui-react": "^3.4.7",
|
|
64
64
|
"@mui/icons-material": "^7.1.2",
|
|
65
65
|
"@mui/lab": "7.0.0-beta.14",
|
|
66
66
|
"@mui/material": "^7.1.2",
|
|
67
67
|
"@mui/system": "^7.1.1",
|
|
68
|
-
"@ocap/util": "^1.28.
|
|
68
|
+
"@ocap/util": "^1.28.5",
|
|
69
69
|
"@stripe/react-stripe-js": "^2.9.0",
|
|
70
70
|
"@stripe/stripe-js": "^2.4.0",
|
|
71
71
|
"@vitejs/plugin-legacy": "^7.0.0",
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"@babel/core": "^7.27.4",
|
|
97
97
|
"@babel/preset-env": "^7.27.2",
|
|
98
98
|
"@babel/preset-react": "^7.27.1",
|
|
99
|
-
"@blocklet/payment-types": "1.24.
|
|
99
|
+
"@blocklet/payment-types": "1.24.2",
|
|
100
100
|
"@storybook/addon-essentials": "^7.6.20",
|
|
101
101
|
"@storybook/addon-interactions": "^7.6.20",
|
|
102
102
|
"@storybook/addon-links": "^7.6.20",
|
|
@@ -127,5 +127,5 @@
|
|
|
127
127
|
"vite-plugin-babel": "^1.3.1",
|
|
128
128
|
"vite-plugin-node-polyfills": "^0.23.0"
|
|
129
129
|
},
|
|
130
|
-
"gitHead": "
|
|
130
|
+
"gitHead": "8cefbfb9066513c7fb33beb2185ea4e58968aad7"
|
|
131
131
|
}
|
|
@@ -15,7 +15,7 @@ import type {
|
|
|
15
15
|
} from '@blocklet/payment-types';
|
|
16
16
|
import { useRequest } from 'ahooks';
|
|
17
17
|
import pWaitFor from 'p-wait-for';
|
|
18
|
-
import
|
|
18
|
+
import Dialog from '@arcblock/ux/lib/Dialog/dialog';
|
|
19
19
|
import { CheckCircle as CheckCircleIcon } from '@mui/icons-material';
|
|
20
20
|
import debounce from 'lodash/debounce';
|
|
21
21
|
import { usePaymentContext } from '../contexts/payment';
|
|
@@ -5,7 +5,7 @@ import Toast from '@arcblock/ux/lib/Toast';
|
|
|
5
5
|
import { joinURL } from 'ufo';
|
|
6
6
|
import type { Subscription, TSubscriptionExpanded } from '@blocklet/payment-types';
|
|
7
7
|
import { useRequest } from 'ahooks';
|
|
8
|
-
import
|
|
8
|
+
import Dialog from '@arcblock/ux/lib/Dialog/dialog';
|
|
9
9
|
import { usePaymentContext } from '../contexts/payment';
|
|
10
10
|
import { formatError, formatToDate, getPrefix, isCrossOrigin } from '../libs/util';
|
|
11
11
|
import api from '../libs/api';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable react/require-default-props */
|
|
2
2
|
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
3
3
|
import Toast from '@arcblock/ux/lib/Toast';
|
|
4
|
-
import
|
|
4
|
+
import Dialog from '@arcblock/ux/lib/Dialog/dialog';
|
|
5
5
|
import type { Customer, TPaymentMethod, TInvoiceExpanded } from '@blocklet/payment-types';
|
|
6
6
|
import { Button, Typography } from '@mui/material';
|
|
7
7
|
import { useSetState } from 'ahooks';
|
package/src/payment/success.tsx
CHANGED
|
@@ -5,7 +5,7 @@ import { Box, Grow, Link, Paper, Stack, styled, Typography } from '@mui/material
|
|
|
5
5
|
import { useEffect, useRef, useState } from 'react';
|
|
6
6
|
import { joinURL } from 'ufo';
|
|
7
7
|
|
|
8
|
-
import
|
|
8
|
+
import Button from '@arcblock/ux/lib/Button';
|
|
9
9
|
import { usePaymentContext } from '../contexts/payment';
|
|
10
10
|
import { VendorPlaceholder, VendorProgressItem } from './progress-item';
|
|
11
11
|
|