payment-kit 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.
Files changed (130) hide show
  1. package/.eslintrc.js +6 -0
  2. package/api/src/libs/queue/index.ts +1 -3
  3. package/blocklet.yml +1 -1
  4. package/package.json +57 -58
  5. package/src/components/actions.tsx +22 -9
  6. package/src/components/balance-list.tsx +40 -12
  7. package/src/components/collapse.tsx +22 -14
  8. package/src/components/copyable.tsx +8 -7
  9. package/src/components/currency.tsx +15 -7
  10. package/src/components/customer/actions.tsx +1 -5
  11. package/src/components/customer/form.tsx +3 -1
  12. package/src/components/customer/link.tsx +4 -12
  13. package/src/components/customer/notification-preference.tsx +18 -9
  14. package/src/components/customer/overdraft-protection.tsx +112 -41
  15. package/src/components/drawer-form.tsx +42 -18
  16. package/src/components/error.tsx +1 -5
  17. package/src/components/event/list.tsx +9 -10
  18. package/src/components/filter-toolbar.tsx +20 -19
  19. package/src/components/info-card.tsx +32 -18
  20. package/src/components/info-metric.tsx +16 -6
  21. package/src/components/info-row-group.tsx +1 -7
  22. package/src/components/info-row.tsx +30 -24
  23. package/src/components/invoice/action.tsx +1 -7
  24. package/src/components/invoice/list.tsx +15 -25
  25. package/src/components/invoice/recharge.tsx +5 -7
  26. package/src/components/invoice/table.tsx +17 -12
  27. package/src/components/layout/user.tsx +1 -1
  28. package/src/components/metadata/form.tsx +13 -13
  29. package/src/components/metadata/list.tsx +11 -3
  30. package/src/components/passport/actions.tsx +9 -4
  31. package/src/components/payment-currency/add.tsx +16 -3
  32. package/src/components/payment-currency/form.tsx +12 -6
  33. package/src/components/payment-intent/actions.tsx +24 -16
  34. package/src/components/payment-intent/list.tsx +11 -8
  35. package/src/components/payment-link/actions.tsx +1 -5
  36. package/src/components/payment-link/after-pay.tsx +4 -2
  37. package/src/components/payment-link/before-pay.tsx +14 -4
  38. package/src/components/payment-link/item.tsx +27 -6
  39. package/src/components/payment-link/preview.tsx +9 -9
  40. package/src/components/payment-link/product-select.tsx +17 -3
  41. package/src/components/payment-method/arcblock.tsx +6 -1
  42. package/src/components/payment-method/base.tsx +6 -1
  43. package/src/components/payment-method/bitcoin.tsx +6 -1
  44. package/src/components/payment-method/ethereum.tsx +6 -1
  45. package/src/components/payment-method/evm-rpc-input.tsx +11 -7
  46. package/src/components/payment-method/form.tsx +2 -7
  47. package/src/components/payouts/actions.tsx +1 -5
  48. package/src/components/payouts/list.tsx +11 -9
  49. package/src/components/payouts/portal/list.tsx +11 -9
  50. package/src/components/price/currency-select.tsx +28 -17
  51. package/src/components/price/form.tsx +135 -84
  52. package/src/components/price/upsell-select.tsx +10 -2
  53. package/src/components/price/upsell.tsx +7 -2
  54. package/src/components/pricing-table/actions.tsx +1 -5
  55. package/src/components/pricing-table/customer-settings.tsx +5 -1
  56. package/src/components/pricing-table/payment-settings.tsx +14 -4
  57. package/src/components/pricing-table/preview.tsx +9 -9
  58. package/src/components/pricing-table/price-item.tsx +6 -1
  59. package/src/components/pricing-table/product-item.tsx +6 -1
  60. package/src/components/pricing-table/product-settings.tsx +17 -4
  61. package/src/components/product/actions.tsx +1 -5
  62. package/src/components/product/create.tsx +1 -5
  63. package/src/components/product/cross-sell-select.tsx +5 -1
  64. package/src/components/product/cross-sell.tsx +7 -2
  65. package/src/components/product/features.tsx +13 -3
  66. package/src/components/product/form.tsx +38 -10
  67. package/src/components/progress-bar.tsx +1 -1
  68. package/src/components/refund/actions.tsx +1 -7
  69. package/src/components/refund/list.tsx +12 -17
  70. package/src/components/section/header.tsx +23 -12
  71. package/src/components/subscription/actions/cancel.tsx +22 -5
  72. package/src/components/subscription/actions/index.tsx +9 -10
  73. package/src/components/subscription/actions/pause.tsx +32 -6
  74. package/src/components/subscription/actions/slash-stake.tsx +5 -3
  75. package/src/components/subscription/description.tsx +12 -8
  76. package/src/components/subscription/items/index.tsx +30 -15
  77. package/src/components/subscription/items/usage-records.tsx +19 -5
  78. package/src/components/subscription/list.tsx +5 -7
  79. package/src/components/subscription/metrics.tsx +27 -12
  80. package/src/components/subscription/portal/actions.tsx +76 -70
  81. package/src/components/subscription/portal/cancel.tsx +10 -3
  82. package/src/components/subscription/portal/list.tsx +48 -26
  83. package/src/components/uploader.tsx +5 -13
  84. package/src/components/webhook/attempts.tsx +51 -16
  85. package/src/components/webhook/request-info.tsx +8 -6
  86. package/src/contexts/products.tsx +1 -1
  87. package/src/pages/admin/billing/invoices/detail.tsx +48 -12
  88. package/src/pages/admin/billing/subscriptions/detail.tsx +43 -11
  89. package/src/pages/admin/customers/customers/detail.tsx +53 -12
  90. package/src/pages/admin/customers/customers/index.tsx +6 -1
  91. package/src/pages/admin/developers/events/detail.tsx +36 -10
  92. package/src/pages/admin/developers/webhooks/detail.tsx +41 -11
  93. package/src/pages/admin/index.tsx +15 -2
  94. package/src/pages/admin/overview.tsx +107 -19
  95. package/src/pages/admin/payments/intents/detail.tsx +57 -13
  96. package/src/pages/admin/payments/payouts/detail.tsx +62 -14
  97. package/src/pages/admin/payments/refunds/detail.tsx +57 -13
  98. package/src/pages/admin/products/index.tsx +8 -2
  99. package/src/pages/admin/products/links/create.tsx +22 -4
  100. package/src/pages/admin/products/links/detail.tsx +42 -13
  101. package/src/pages/admin/products/passports/index.tsx +23 -4
  102. package/src/pages/admin/products/prices/actions.tsx +1 -6
  103. package/src/pages/admin/products/prices/detail.tsx +43 -11
  104. package/src/pages/admin/products/prices/list.tsx +7 -2
  105. package/src/pages/admin/products/pricing-tables/create.tsx +45 -12
  106. package/src/pages/admin/products/pricing-tables/detail.tsx +44 -13
  107. package/src/pages/admin/products/products/create.tsx +4 -1
  108. package/src/pages/admin/products/products/detail.tsx +72 -17
  109. package/src/pages/admin/settings/index.tsx +8 -1
  110. package/src/pages/admin/settings/payment-methods/index.tsx +84 -19
  111. package/src/pages/admin/settings/vault-config/edit-form.tsx +42 -28
  112. package/src/pages/admin/settings/vault-config/index.tsx +57 -10
  113. package/src/pages/customer/index.tsx +41 -15
  114. package/src/pages/customer/invoice/detail.tsx +63 -14
  115. package/src/pages/customer/invoice/past-due.tsx +11 -3
  116. package/src/pages/customer/payout/detail.tsx +56 -13
  117. package/src/pages/customer/recharge/account.tsx +80 -20
  118. package/src/pages/customer/recharge/subscription.tsx +86 -25
  119. package/src/pages/customer/refund/list.tsx +60 -24
  120. package/src/pages/customer/subscription/change-payment.tsx +13 -4
  121. package/src/pages/customer/subscription/change-plan.tsx +34 -7
  122. package/src/pages/customer/subscription/detail.tsx +86 -20
  123. package/src/pages/customer/subscription/embed.tsx +24 -4
  124. package/src/pages/home.tsx +26 -4
  125. package/src/pages/integrations/donations/edit-form.tsx +25 -9
  126. package/src/pages/integrations/donations/index.tsx +26 -9
  127. package/src/pages/integrations/donations/preview.tsx +59 -15
  128. package/src/pages/integrations/index.tsx +10 -1
  129. package/src/pages/integrations/overview.tsx +78 -17
  130. package/vite.config.ts +60 -30
@@ -107,12 +107,21 @@ export default function InvoiceDetail(props: { id: string }) {
107
107
  return (
108
108
  <Root direction="column" spacing={2.5} sx={{ mb: 4 }}>
109
109
  <Box>
110
- <Stack className="page-header" direction="row" justifyContent="space-between" alignItems="center">
110
+ <Stack
111
+ className="page-header"
112
+ direction="row"
113
+ sx={{
114
+ justifyContent: 'space-between',
115
+ alignItems: 'center',
116
+ }}>
111
117
  <Stack
112
118
  direction="row"
113
- alignItems="center"
114
- sx={{ fontWeight: 'normal', cursor: 'pointer' }}
115
- onClick={() => goBackOrFallback('/admin/billing/invoices')}>
119
+ onClick={() => goBackOrFallback('/admin/billing/invoices')}
120
+ sx={{
121
+ alignItems: 'center',
122
+ fontWeight: 'normal',
123
+ cursor: 'pointer',
124
+ }}>
116
125
  <ArrowBackOutlined fontSize="small" sx={{ mr: 0.5, color: 'text.secondary' }} />
117
126
  <Typography variant="h6" sx={{ color: 'text.secondary', fontWeight: 'normal' }}>
118
127
  {t('admin.invoices')}
@@ -124,29 +133,41 @@ export default function InvoiceDetail(props: { id: string }) {
124
133
  </Box>
125
134
  </Stack>
126
135
  <Box
127
- mt={4}
128
- mb={3}
129
136
  sx={{
137
+ mt: 4,
138
+ mb: 3,
130
139
  display: 'flex',
140
+
131
141
  gap: {
132
142
  xs: 2,
133
143
  sm: 2,
134
144
  md: 5,
135
145
  },
146
+
136
147
  flexWrap: 'wrap',
148
+
137
149
  flexDirection: {
138
150
  xs: 'column',
139
151
  sm: 'column',
140
152
  md: 'row',
141
153
  },
154
+
142
155
  alignItems: {
143
156
  xs: 'flex-start',
144
157
  sm: 'flex-start',
145
158
  md: 'center',
146
159
  },
147
160
  }}>
148
- <Stack direction="column" gap={1}>
149
- <Stack direction="row" alignItems="center">
161
+ <Stack
162
+ direction="column"
163
+ sx={{
164
+ gap: 1,
165
+ }}>
166
+ <Stack
167
+ direction="row"
168
+ sx={{
169
+ alignItems: 'center',
170
+ }}>
150
171
  <Typography variant="h2" sx={{ fontWeight: 600 }}>
151
172
  {data.number}
152
173
  </Typography>
@@ -161,18 +182,22 @@ export default function InvoiceDetail(props: { id: string }) {
161
182
  </Stack>
162
183
  <Stack
163
184
  className="section-body"
164
- justifyContent="flex-start"
165
- flexWrap="wrap"
166
185
  sx={{
186
+ justifyContent: 'flex-start',
187
+ flexWrap: 'wrap',
188
+
167
189
  'hr.MuiDivider-root:last-child': {
168
190
  display: 'none',
169
191
  },
192
+
170
193
  flexDirection: {
171
194
  xs: 'column',
172
195
  sm: 'column',
173
196
  md: 'row',
174
197
  },
198
+
175
199
  alignItems: 'flex-start',
200
+
176
201
  gap: {
177
202
  xs: 1,
178
203
  sm: 1,
@@ -189,7 +214,11 @@ export default function InvoiceDetail(props: { id: string }) {
189
214
  label={t('admin.subscription.name')}
190
215
  value={
191
216
  <Link to={`/admin/billing/${data.subscription.id}`}>
192
- <Typography variant="body1" color="text.link">
217
+ <Typography
218
+ variant="body1"
219
+ sx={{
220
+ color: 'text.link',
221
+ }}>
193
222
  {data.subscription.description || data.subscription.id}
194
223
  </Typography>
195
224
  </Link>
@@ -238,7 +267,14 @@ export default function InvoiceDetail(props: { id: string }) {
238
267
  },
239
268
  },
240
269
  }}>
241
- <Box flex={1} className="payment-link-column-1" sx={{ gap: 2.5, display: 'flex', flexDirection: 'column' }}>
270
+ <Box
271
+ className="payment-link-column-1"
272
+ sx={{
273
+ flex: 1,
274
+ gap: 2.5,
275
+ display: 'flex',
276
+ flexDirection: 'column',
277
+ }}>
242
278
  <Box className="section" sx={{ containerType: 'inline-size' }}>
243
279
  <SectionHeader title={t('admin.details')} />
244
280
  <InfoRowGroup
@@ -79,12 +79,21 @@ export default function SubscriptionDetail(props: { id: string }) {
79
79
  return (
80
80
  <Root direction="column" spacing={2.5} sx={{ mb: 4 }}>
81
81
  <Box>
82
- <Stack className="page-header" direction="row" justifyContent="space-between" alignItems="center">
82
+ <Stack
83
+ className="page-header"
84
+ direction="row"
85
+ sx={{
86
+ justifyContent: 'space-between',
87
+ alignItems: 'center',
88
+ }}>
83
89
  <Stack
84
90
  direction="row"
85
- alignItems="center"
86
- sx={{ fontWeight: 'normal', cursor: 'pointer' }}
87
- onClick={() => goBackOrFallback('/admin/billing/subscriptions')}>
91
+ onClick={() => goBackOrFallback('/admin/billing/subscriptions')}
92
+ sx={{
93
+ alignItems: 'center',
94
+ fontWeight: 'normal',
95
+ cursor: 'pointer',
96
+ }}>
88
97
  <ArrowBackOutlined fontSize="small" sx={{ mr: 0.5, color: 'text.secondary' }} />
89
98
  <Typography variant="h6" sx={{ color: 'text.secondary', fontWeight: 'normal' }}>
90
99
  {t('admin.subscriptions')}
@@ -93,29 +102,41 @@ export default function SubscriptionDetail(props: { id: string }) {
93
102
  <SubscriptionActions data={data} onChange={runAsync} variant="normal" />
94
103
  </Stack>
95
104
  <Box
96
- mt={4}
97
- mb={3}
98
105
  sx={{
106
+ mt: 4,
107
+ mb: 3,
99
108
  display: 'flex',
109
+
100
110
  gap: {
101
111
  xs: 2,
102
112
  sm: 2,
103
113
  md: 5,
104
114
  },
115
+
105
116
  flexWrap: 'wrap',
117
+
106
118
  flexDirection: {
107
119
  xs: 'column',
108
120
  sm: 'column',
109
121
  md: 'row',
110
122
  },
123
+
111
124
  alignItems: {
112
125
  xs: 'flex-start',
113
126
  sm: 'flex-start',
114
127
  md: 'center',
115
128
  },
116
129
  }}>
117
- <Stack direction="column" gap={1}>
118
- <Stack direction="row" alignItems="center">
130
+ <Stack
131
+ direction="column"
132
+ sx={{
133
+ gap: 1,
134
+ }}>
135
+ <Stack
136
+ direction="row"
137
+ sx={{
138
+ alignItems: 'center',
139
+ }}>
119
140
  <Typography variant="h2" sx={{ fontWeight: 600 }}>
120
141
  {data.description}
121
142
  </Typography>
@@ -124,18 +145,22 @@ export default function SubscriptionDetail(props: { id: string }) {
124
145
  </Stack>
125
146
  <Stack
126
147
  className="section-body"
127
- justifyContent="flex-start"
128
- flexWrap="wrap"
129
148
  sx={{
149
+ justifyContent: 'flex-start',
150
+ flexWrap: 'wrap',
151
+
130
152
  'hr.MuiDivider-root:last-child': {
131
153
  display: 'none',
132
154
  },
155
+
133
156
  flexDirection: {
134
157
  xs: 'column',
135
158
  sm: 'column',
136
159
  md: 'row',
137
160
  },
161
+
138
162
  alignItems: 'flex-start',
163
+
139
164
  gap: {
140
165
  xs: 1,
141
166
  sm: 1,
@@ -175,7 +200,14 @@ export default function SubscriptionDetail(props: { id: string }) {
175
200
  },
176
201
  },
177
202
  }}>
178
- <Box flex={1} className="payment-link-column-1" sx={{ gap: 2.5, display: 'flex', flexDirection: 'column' }}>
203
+ <Box
204
+ className="payment-link-column-1"
205
+ sx={{
206
+ flex: 1,
207
+ gap: 2.5,
208
+ display: 'flex',
209
+ flexDirection: 'column',
210
+ }}>
179
211
  <Box className="section" sx={{ containerType: 'inline-size' }}>
180
212
  <SectionHeader title={t('admin.details')} />
181
213
  <InfoRowGroup
@@ -158,12 +158,21 @@ export default function CustomerDetail(props: { id: string }) {
158
158
  return (
159
159
  <Root direction="column" spacing={2.5} sx={{ mb: 4 }}>
160
160
  <Box>
161
- <Stack className="page-header" direction="row" justifyContent="space-between" alignItems="center">
161
+ <Stack
162
+ className="page-header"
163
+ direction="row"
164
+ sx={{
165
+ justifyContent: 'space-between',
166
+ alignItems: 'center',
167
+ }}>
162
168
  <Stack
163
169
  direction="row"
164
- alignItems="center"
165
- sx={{ fontWeight: 'normal', cursor: 'pointer' }}
166
- onClick={() => goBackOrFallback('/admin/customers')}>
170
+ onClick={() => goBackOrFallback('/admin/customers')}
171
+ sx={{
172
+ alignItems: 'center',
173
+ fontWeight: 'normal',
174
+ cursor: 'pointer',
175
+ }}>
167
176
  <ArrowBackOutlined fontSize="small" sx={{ mr: 0.5, color: 'text.secondary' }} />
168
177
  <Typography variant="h6" sx={{ color: 'text.secondary', fontWeight: 'normal' }}>
169
178
  {t('admin.customers')}
@@ -180,29 +189,43 @@ export default function CustomerDetail(props: { id: string }) {
180
189
  {/* <CustomerActions data={data.customer} onChange={onChange} variant="normal" /> */}
181
190
  </Stack>
182
191
  <Box
183
- mt={4}
184
- mb={3}
185
192
  sx={{
193
+ mt: 4,
194
+ mb: 3,
186
195
  display: 'flex',
196
+
187
197
  gap: {
188
198
  xs: 2,
189
199
  sm: 2,
190
200
  md: 5,
191
201
  },
202
+
192
203
  flexWrap: 'wrap',
204
+
193
205
  flexDirection: {
194
206
  xs: 'column',
195
207
  sm: 'column',
196
208
  md: 'row',
197
209
  },
210
+
198
211
  alignItems: {
199
212
  xs: 'flex-start',
200
213
  sm: 'flex-start',
201
214
  md: 'center',
202
215
  },
203
216
  }}>
204
- <Stack direction="row" justifyContent="space-between" alignItems="center">
205
- <Stack direction="row" alignItems="center" spacing={1}>
217
+ <Stack
218
+ direction="row"
219
+ sx={{
220
+ justifyContent: 'space-between',
221
+ alignItems: 'center',
222
+ }}>
223
+ <Stack
224
+ direction="row"
225
+ spacing={1}
226
+ sx={{
227
+ alignItems: 'center',
228
+ }}>
206
229
  <Avatar
207
230
  title={data.customer.name}
208
231
  src={getCustomerAvatar(
@@ -221,18 +244,22 @@ export default function CustomerDetail(props: { id: string }) {
221
244
  </Stack>
222
245
  <Stack
223
246
  className="section-body"
224
- justifyContent="flex-start"
225
- flexWrap="wrap"
226
247
  sx={{
248
+ justifyContent: 'flex-start',
249
+ flexWrap: 'wrap',
250
+
227
251
  'hr.MuiDivider-root:last-child': {
228
252
  display: 'none',
229
253
  },
254
+
230
255
  flexDirection: {
231
256
  xs: 'column',
232
257
  sm: 'column',
233
258
  md: 'row',
234
259
  },
260
+
235
261
  alignItems: 'flex-start',
262
+
236
263
  gap: {
237
264
  xs: 1,
238
265
  sm: 1,
@@ -274,7 +301,14 @@ export default function CustomerDetail(props: { id: string }) {
274
301
  },
275
302
  },
276
303
  }}>
277
- <Box flex={1} className="payment-link-column-1" sx={{ gap: 2.5, display: 'flex', flexDirection: 'column' }}>
304
+ <Box
305
+ className="payment-link-column-1"
306
+ sx={{
307
+ flex: 1,
308
+ gap: 2.5,
309
+ display: 'flex',
310
+ flexDirection: 'column',
311
+ }}>
278
312
  <Box className="section" sx={{ containerType: 'inline-size' }}>
279
313
  <SectionHeader title={t('admin.details')} />
280
314
  <InfoRowGroup
@@ -436,7 +470,14 @@ export default function CustomerDetail(props: { id: string }) {
436
470
  label={t('admin.customer.address.country')}
437
471
  value={
438
472
  data.customer.address?.country ? (
439
- <Box display="flex" alignItems="center" flexWrap="nowrap" gap={0.5} sx={{ cursor: 'pointer' }}>
473
+ <Box
474
+ sx={{
475
+ display: 'flex',
476
+ alignItems: 'center',
477
+ flexWrap: 'nowrap',
478
+ gap: 0.5,
479
+ cursor: 'pointer',
480
+ }}>
440
481
  <FlagEmoji iso2={data.customer.address?.country} style={{ display: 'flex', width: 24 }} />
441
482
  <Typography>{countryDetail?.name}</Typography>
442
483
  </Box>
@@ -68,7 +68,12 @@ export default function CustomersList() {
68
68
  const item = data.list[index] as TCustomer;
69
69
  return (
70
70
  <Link to={`/admin/customers/${item.id}`}>
71
- <Stack direction="row" alignItems="center" spacing={1}>
71
+ <Stack
72
+ direction="row"
73
+ spacing={1}
74
+ sx={{
75
+ alignItems: 'center',
76
+ }}>
72
77
  <Avatar
73
78
  src={getCustomerAvatar(
74
79
  item?.did,
@@ -33,12 +33,21 @@ export default function EventDetail(props: { id: string }) {
33
33
  return (
34
34
  <Root direction="column" spacing={2.5} sx={{ mb: 4 }}>
35
35
  <Box>
36
- <Stack className="page-header" direction="row" justifyContent="space-between" alignItems="center">
36
+ <Stack
37
+ className="page-header"
38
+ direction="row"
39
+ sx={{
40
+ justifyContent: 'space-between',
41
+ alignItems: 'center',
42
+ }}>
37
43
  <Stack
38
44
  direction="row"
39
- alignItems="center"
40
- sx={{ fontWeight: 'normal', cursor: 'pointer' }}
41
- onClick={() => goBackOrFallback('/admin/developers/events')}>
45
+ onClick={() => goBackOrFallback('/admin/developers/events')}
46
+ sx={{
47
+ alignItems: 'center',
48
+ fontWeight: 'normal',
49
+ cursor: 'pointer',
50
+ }}>
42
51
  <ArrowBackOutlined fontSize="small" sx={{ mr: 0.5, color: 'text.secondary' }} />
43
52
  <Typography variant="h6" sx={{ color: 'text.secondary', fontWeight: 'normal' }}>
44
53
  {t('admin.events')}
@@ -46,46 +55,63 @@ export default function EventDetail(props: { id: string }) {
46
55
  </Stack>
47
56
  </Stack>
48
57
  <Box
49
- mt={4}
50
- mb={3}
51
58
  sx={{
59
+ mt: 4,
60
+ mb: 3,
52
61
  display: 'flex',
62
+
53
63
  gap: {
54
64
  xs: 2,
55
65
  sm: 2,
56
66
  md: 5,
57
67
  },
68
+
58
69
  flexWrap: 'wrap',
70
+
59
71
  flexDirection: {
60
72
  xs: 'column',
61
73
  sm: 'column',
62
74
  md: 'row',
63
75
  },
76
+
64
77
  alignItems: {
65
78
  xs: 'flex-start',
66
79
  sm: 'flex-start',
67
80
  md: 'center',
68
81
  },
69
82
  }}>
70
- <Stack direction="row" justifyContent="space-between" alignItems="center">
71
- <Typography variant="h2" fontWeight={600}>
83
+ <Stack
84
+ direction="row"
85
+ sx={{
86
+ justifyContent: 'space-between',
87
+ alignItems: 'center',
88
+ }}>
89
+ <Typography
90
+ variant="h2"
91
+ sx={{
92
+ fontWeight: 600,
93
+ }}>
72
94
  {data.type}
73
95
  </Typography>
74
96
  </Stack>
75
97
  <Stack
76
98
  className="section-body"
77
- justifyContent="flex-start"
78
- flexWrap="wrap"
79
99
  sx={{
100
+ justifyContent: 'flex-start',
101
+ flexWrap: 'wrap',
102
+
80
103
  'hr.MuiDivider-root:last-child': {
81
104
  display: 'none',
82
105
  },
106
+
83
107
  flexDirection: {
84
108
  xs: 'column',
85
109
  sm: 'column',
86
110
  md: 'row',
87
111
  },
112
+
88
113
  alignItems: 'flex-start',
114
+
89
115
  gap: {
90
116
  xs: 1,
91
117
  sm: 1,
@@ -33,12 +33,21 @@ export default function WebhookDetail(props: { id: string }) {
33
33
  return (
34
34
  <Root direction="column" spacing={4} sx={{ mb: 4 }}>
35
35
  <Box>
36
- <Stack className="page-header" direction="row" justifyContent="space-between" alignItems="center">
36
+ <Stack
37
+ className="page-header"
38
+ direction="row"
39
+ sx={{
40
+ justifyContent: 'space-between',
41
+ alignItems: 'center',
42
+ }}>
37
43
  <Stack
38
44
  direction="row"
39
- alignItems="center"
40
- sx={{ fontWeight: 'normal', cursor: 'pointer' }}
41
- onClick={() => goBackOrFallback('/admin/developers/webhooks')}>
45
+ onClick={() => goBackOrFallback('/admin/developers/webhooks')}
46
+ sx={{
47
+ alignItems: 'center',
48
+ fontWeight: 'normal',
49
+ cursor: 'pointer',
50
+ }}>
42
51
  <ArrowBackOutlined fontSize="small" sx={{ mr: 0.5, color: 'text.secondary' }} />
43
52
  <Typography variant="h6" sx={{ color: 'text.secondary', fontWeight: 'normal' }}>
44
53
  {t('admin.webhooks')}
@@ -46,11 +55,27 @@ export default function WebhookDetail(props: { id: string }) {
46
55
  </Stack>
47
56
  <Copyable text={props.id} style={{ marginLeft: 4 }} />
48
57
  </Stack>
49
- <Box mt={2}>
50
- <Stack direction="row" justifyContent="space-between" alignItems="center">
51
- <Stack direction="column" alignItems="flex-start">
58
+ <Box
59
+ sx={{
60
+ mt: 2,
61
+ }}>
62
+ <Stack
63
+ direction="row"
64
+ sx={{
65
+ justifyContent: 'space-between',
66
+ alignItems: 'center',
67
+ }}>
68
+ <Stack
69
+ direction="column"
70
+ sx={{
71
+ alignItems: 'flex-start',
72
+ }}>
52
73
  <Typography variant="h5">{data.url}</Typography>
53
- <Typography variant="body1" color="text.secondary">
74
+ <Typography
75
+ variant="body1"
76
+ sx={{
77
+ color: 'text.secondary',
78
+ }}>
54
79
  {data.description}
55
80
  </Typography>
56
81
  </Stack>
@@ -59,9 +84,14 @@ export default function WebhookDetail(props: { id: string }) {
59
84
  className="section-body"
60
85
  direction="row"
61
86
  spacing={3}
62
- justifyContent="flex-start"
63
- flexWrap="wrap"
64
- sx={{ pt: 2, mt: 2, borderTop: '1px solid', borderColor: 'grey.100' }}>
87
+ sx={{
88
+ justifyContent: 'flex-start',
89
+ flexWrap: 'wrap',
90
+ pt: 2,
91
+ mt: 2,
92
+ borderTop: '1px solid',
93
+ borderColor: 'grey.100',
94
+ }}>
65
95
  <InfoMetric
66
96
  label={t('common.status')}
67
97
  value={<Status label={data.status} color={getWebhookStatusColor(data.status)} />}
@@ -73,7 +73,16 @@ function Admin() {
73
73
  return (
74
74
  <>
75
75
  <ProgressBar pending={isPending} />
76
- <Stack direction="row" alignItems="center" justifyContent="end" flexWrap="wrap" spacing={1} sx={{ mt: 1, pb: 2 }}>
76
+ <Stack
77
+ direction="row"
78
+ spacing={1}
79
+ sx={{
80
+ alignItems: 'center',
81
+ justifyContent: 'end',
82
+ flexWrap: 'wrap',
83
+ mt: 1,
84
+ pb: 2,
85
+ }}>
77
86
  {/* <Box>{renderNav(group, onTabChange, group1)}</Box> */}
78
87
  {/* @ts-ignore */}
79
88
  <Tabs
@@ -101,7 +110,11 @@ function Admin() {
101
110
  },
102
111
  }}
103
112
  />
104
- <Stack direction="row" alignItems="center">
113
+ <Stack
114
+ direction="row"
115
+ sx={{
116
+ alignItems: 'center',
117
+ }}>
105
118
  {renderNav(group, onTabChange, group2)}
106
119
  <label
107
120
  htmlFor="livemode-switch"