payment-kit 1.13.111 → 1.13.112
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/api/src/routes/products.ts +1 -0
- package/api/src/routes/subscriptions.ts +2 -0
- package/blocklet.yml +1 -1
- package/package.json +3 -3
- package/src/pages/admin/billing/index.tsx +4 -2
- package/src/pages/admin/customers/index.tsx +4 -2
- package/src/pages/admin/developers/index.tsx +4 -2
- package/src/pages/admin/index.tsx +4 -2
- package/src/pages/admin/payments/index.tsx +4 -2
- package/src/pages/admin/settings/index.tsx +4 -2
- package/src/pages/checkout/pay.tsx +2 -2
|
@@ -124,6 +124,8 @@ router.get('/', authMine, async (req, res) => {
|
|
|
124
124
|
{ model: SubscriptionItem, as: 'items' },
|
|
125
125
|
{ model: Customer, as: 'customer' },
|
|
126
126
|
],
|
|
127
|
+
// https://github.com/sequelize/sequelize/issues/9481
|
|
128
|
+
distinct: true,
|
|
127
129
|
});
|
|
128
130
|
|
|
129
131
|
const products = (await Product.findAll()).map((x) => x.toJSON());
|
package/blocklet.yml
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "payment-kit",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.112",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "cross-env COMPONENT_STORE_URL=https://test.store.blocklet.dev blocklet dev",
|
|
6
6
|
"eject": "vite eject",
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"@abtnode/types": "1.16.23-beta-aeb9f5bd",
|
|
111
111
|
"@arcblock/eslint-config": "^0.2.4",
|
|
112
112
|
"@arcblock/eslint-config-ts": "^0.2.4",
|
|
113
|
-
"@did-pay/types": "1.13.
|
|
113
|
+
"@did-pay/types": "1.13.112",
|
|
114
114
|
"@types/cookie-parser": "^1.4.6",
|
|
115
115
|
"@types/cors": "^2.8.17",
|
|
116
116
|
"@types/dotenv-flow": "^3.3.3",
|
|
@@ -149,5 +149,5 @@
|
|
|
149
149
|
"parser": "typescript"
|
|
150
150
|
}
|
|
151
151
|
},
|
|
152
|
-
"gitHead": "
|
|
152
|
+
"gitHead": "5db3e4ba2c5126a2ff6b8962b58d585b0eb0f01e"
|
|
153
153
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
2
2
|
import Tabs from '@arcblock/ux/lib/Tabs';
|
|
3
3
|
import { Typography } from '@mui/material';
|
|
4
|
-
import React, { isValidElement } from 'react';
|
|
4
|
+
import React, { isValidElement, startTransition } from 'react';
|
|
5
5
|
import { useNavigate, useParams } from 'react-router-dom';
|
|
6
6
|
|
|
7
7
|
const SubscriptionDetail = React.lazy(() => import('./subscriptions/detail'));
|
|
@@ -26,7 +26,9 @@ export default function BillingIndex() {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
const onTabChange = (newTab: string) => {
|
|
29
|
-
|
|
29
|
+
startTransition(() => {
|
|
30
|
+
navigate(`/admin/billing/${newTab}`);
|
|
31
|
+
});
|
|
30
32
|
};
|
|
31
33
|
|
|
32
34
|
// @ts-ignore
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
2
2
|
import Tabs from '@arcblock/ux/lib/Tabs';
|
|
3
3
|
import { Typography } from '@mui/material';
|
|
4
|
-
import React, { isValidElement } from 'react';
|
|
4
|
+
import React, { isValidElement, startTransition } from 'react';
|
|
5
5
|
import { useNavigate, useParams } from 'react-router-dom';
|
|
6
6
|
|
|
7
7
|
const CustomerDetail = React.lazy(() => import('./customers/detail'));
|
|
@@ -20,7 +20,9 @@ export default function CustomerIndex() {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
const onTabChange = (newTab: string) => {
|
|
23
|
-
|
|
23
|
+
startTransition(() => {
|
|
24
|
+
navigate(`/admin/customers/${newTab}`);
|
|
25
|
+
});
|
|
24
26
|
};
|
|
25
27
|
|
|
26
28
|
// @ts-ignore
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
2
2
|
import Tabs from '@arcblock/ux/lib/Tabs';
|
|
3
3
|
import { Typography } from '@mui/material';
|
|
4
|
-
import React, { isValidElement } from 'react';
|
|
4
|
+
import React, { isValidElement, startTransition } from 'react';
|
|
5
5
|
import { useNavigate, useParams } from 'react-router-dom';
|
|
6
6
|
|
|
7
7
|
const EventDetail = React.lazy(() => import('./events/detail'));
|
|
@@ -28,7 +28,9 @@ export default function DevelopersIndex() {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
const onTabChange = (newTab: string) => {
|
|
31
|
-
|
|
31
|
+
startTransition(() => {
|
|
32
|
+
navigate(`/admin/developers/${newTab}`);
|
|
33
|
+
});
|
|
32
34
|
};
|
|
33
35
|
|
|
34
36
|
// @ts-ignore
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
2
2
|
import { Box, Chip, Stack } from '@mui/material';
|
|
3
|
-
import React, { isValidElement } from 'react';
|
|
3
|
+
import React, { isValidElement, startTransition } from 'react';
|
|
4
4
|
import { useNavigate, useParams } from 'react-router-dom';
|
|
5
5
|
|
|
6
6
|
import Layout from '../../components/layout/admin';
|
|
@@ -50,7 +50,9 @@ function Admin() {
|
|
|
50
50
|
};
|
|
51
51
|
|
|
52
52
|
const onTabChange = (newTab: string) => {
|
|
53
|
-
|
|
53
|
+
startTransition(() => {
|
|
54
|
+
navigate(`/admin/${newTab}`);
|
|
55
|
+
});
|
|
54
56
|
};
|
|
55
57
|
|
|
56
58
|
// @ts-ignore
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
2
2
|
import Tabs from '@arcblock/ux/lib/Tabs';
|
|
3
3
|
import { Stack, Typography } from '@mui/material';
|
|
4
|
-
import React, { isValidElement } from 'react';
|
|
4
|
+
import React, { isValidElement, startTransition } from 'react';
|
|
5
5
|
import { useNavigate, useParams } from 'react-router-dom';
|
|
6
6
|
|
|
7
7
|
const PaymentLinkCreate = React.lazy(() => import('./links/create'));
|
|
@@ -27,7 +27,9 @@ export default function PaymentIndex() {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
const onTabChange = (newTab: string) => {
|
|
30
|
-
|
|
30
|
+
startTransition(() => {
|
|
31
|
+
navigate(`/admin/payments/${newTab}`);
|
|
32
|
+
});
|
|
31
33
|
};
|
|
32
34
|
|
|
33
35
|
// @ts-ignore
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
2
2
|
import Tabs from '@arcblock/ux/lib/Tabs';
|
|
3
3
|
import { Stack, Typography } from '@mui/material';
|
|
4
|
-
import React, { isValidElement } from 'react';
|
|
4
|
+
import React, { isValidElement, startTransition } from 'react';
|
|
5
5
|
import { useNavigate, useParams } from 'react-router-dom';
|
|
6
6
|
|
|
7
7
|
const PaymentMethodCreate = React.lazy(() => import('./payment-methods/create'));
|
|
@@ -18,7 +18,9 @@ export default function SettingsIndex() {
|
|
|
18
18
|
const { page = 'payment-methods' } = useParams();
|
|
19
19
|
|
|
20
20
|
const onTabChange = (newTab: string) => {
|
|
21
|
-
|
|
21
|
+
startTransition(() => {
|
|
22
|
+
navigate(`/admin/settings/${newTab}`);
|
|
23
|
+
});
|
|
22
24
|
};
|
|
23
25
|
|
|
24
26
|
// @ts-ignore
|
|
@@ -57,14 +57,14 @@ export default function Payment({ id }: Props) {
|
|
|
57
57
|
setTimeout(() => {
|
|
58
58
|
const tmp = new URL(data.checkoutSession.success_url as string, window.location.origin);
|
|
59
59
|
tmp.searchParams.set('checkout_session_id', data.checkoutSession.id);
|
|
60
|
-
window.location.
|
|
60
|
+
window.location.replace(tmp.href);
|
|
61
61
|
}, 1000);
|
|
62
62
|
} else if (data?.paymentLink) {
|
|
63
63
|
if (data.paymentLink.after_completion?.type === 'redirect' && data.paymentLink.after_completion?.redirect?.url) {
|
|
64
64
|
setTimeout(() => {
|
|
65
65
|
const tmp = new URL(data.paymentLink?.after_completion?.redirect?.url as string, window.location.origin);
|
|
66
66
|
tmp.searchParams.set('checkout_session_id', data.checkoutSession.id);
|
|
67
|
-
window.location.
|
|
67
|
+
window.location.replace(tmp.href);
|
|
68
68
|
}, 1000);
|
|
69
69
|
}
|
|
70
70
|
}
|