@blocklet/launcher-workflow 2.3.117 → 2.3.118
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/locales/en.js +1 -1
- package/es/locales/zh.js +1 -1
- package/es/prepare.js +52 -49
- package/lib/locales/en.js +1 -1
- package/lib/locales/zh.js +1 -1
- package/lib/prepare.js +53 -50
- package/package.json +12 -12
package/es/locales/en.js
CHANGED
|
@@ -104,7 +104,7 @@ export default {
|
|
|
104
104
|
pageTitle: 'Purchase Space',
|
|
105
105
|
noPlan: 'Select space to continue',
|
|
106
106
|
hasPlan: 'Continue with {name}',
|
|
107
|
-
selectSpaceHint: 'Already have dedicated space?
|
|
107
|
+
selectSpaceHint: 'Already have dedicated space? ',
|
|
108
108
|
morePlanPrompt: 'Flip the page to see more plans',
|
|
109
109
|
redeem: 'Select purchased space',
|
|
110
110
|
noProducts: 'No products available for purchase, please check your payment-kit config',
|
package/es/locales/zh.js
CHANGED
package/es/prepare.js
CHANGED
|
@@ -4,7 +4,6 @@ import { LAUNCH_STATUS } from '@blocklet/launcher-util/es/constant';
|
|
|
4
4
|
import { getBlockletAdminURL, getBlockletLogoUrl, getBlockletMetaUrlFromQuery } from '@blocklet/launcher-util/es/util';
|
|
5
5
|
import formatError from '@blocklet/launcher-util/lib/format-error';
|
|
6
6
|
import CheckoutOnDemand from '@blocklet/launcher-ux/lib/payment/checkout/on-demand';
|
|
7
|
-
import useMobile from '@blocklet/launcher-ux/lib/use-mobile';
|
|
8
7
|
import { CheckoutTable, PaymentProvider } from '@blocklet/payment-react';
|
|
9
8
|
import styled from '@emotion/styled';
|
|
10
9
|
import Box from '@mui/material/Box';
|
|
@@ -60,9 +59,6 @@ function Content({
|
|
|
60
59
|
t,
|
|
61
60
|
locale
|
|
62
61
|
} = useLocaleContext();
|
|
63
|
-
const {
|
|
64
|
-
isMobile
|
|
65
|
-
} = useMobile();
|
|
66
62
|
const navigate = useNavigate();
|
|
67
63
|
const sessionId = params.get('sessionId');
|
|
68
64
|
const blockletMetaUrl = getBlockletMetaUrlFromQuery(params);
|
|
@@ -241,34 +237,64 @@ function Content({
|
|
|
241
237
|
height: '100%',
|
|
242
238
|
alignItems: 'center'
|
|
243
239
|
},
|
|
244
|
-
children: [
|
|
245
|
-
|
|
246
|
-
color: "primary",
|
|
247
|
-
value: state.productType?.name,
|
|
248
|
-
size: "small",
|
|
249
|
-
onChange: handleChangeProductType,
|
|
250
|
-
exclusive: true,
|
|
240
|
+
children: [/*#__PURE__*/_jsxs(Stack, {
|
|
241
|
+
width: "100%",
|
|
251
242
|
sx: {
|
|
252
|
-
|
|
243
|
+
position: 'relative',
|
|
244
|
+
'@media (min-width: 1200px)': {
|
|
245
|
+
maxWidth: '1000px'
|
|
246
|
+
},
|
|
247
|
+
'@media (max-width: 1200px)': {
|
|
248
|
+
maxWidth: '100%'
|
|
249
|
+
},
|
|
250
|
+
flexWrap: 'wrap',
|
|
251
|
+
flexDirection: {
|
|
252
|
+
xs: 'column',
|
|
253
|
+
md: 'row'
|
|
254
|
+
},
|
|
255
|
+
justifyContent: {
|
|
256
|
+
xs: 'center',
|
|
257
|
+
md: 'space-between'
|
|
258
|
+
},
|
|
259
|
+
alignItems: 'center',
|
|
260
|
+
gap: 2
|
|
253
261
|
},
|
|
254
|
-
children: productTypes.
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
}
|
|
264
|
-
|
|
262
|
+
children: [productTypes.length > 1 && /*#__PURE__*/_jsx(ToggleButtonGroup, {
|
|
263
|
+
orientation: "horizontal",
|
|
264
|
+
color: "primary",
|
|
265
|
+
value: state.productType?.name,
|
|
266
|
+
size: "small",
|
|
267
|
+
onChange: handleChangeProductType,
|
|
268
|
+
exclusive: true,
|
|
269
|
+
children: productTypes.map(({
|
|
270
|
+
name
|
|
271
|
+
}) => {
|
|
272
|
+
return /*#__PURE__*/_jsx(ToggleButton, {
|
|
273
|
+
value: name,
|
|
274
|
+
sx: {
|
|
275
|
+
textTransform: 'capitalize'
|
|
276
|
+
},
|
|
277
|
+
children: t(`purchase.productType.${name}`)
|
|
278
|
+
}, name);
|
|
279
|
+
})
|
|
280
|
+
}), /*#__PURE__*/_jsx(Box, {
|
|
281
|
+
component: Link,
|
|
282
|
+
sx: {
|
|
283
|
+
color: 'text.link',
|
|
284
|
+
'&:hover': {
|
|
285
|
+
opacity: 0.8
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
to: joinURL(routerPrefix, `/purchase/select${window.location.search}`),
|
|
289
|
+
children: t('purchase.selectSpaceHint')
|
|
290
|
+
})]
|
|
265
291
|
}), /*#__PURE__*/_jsxs(Box, {
|
|
266
292
|
sx: {
|
|
267
293
|
width: '100%',
|
|
268
294
|
height: '100%',
|
|
269
295
|
marginTop: '24px',
|
|
270
296
|
'@media (min-width: 1200px)': {
|
|
271
|
-
maxWidth: '
|
|
297
|
+
maxWidth: '1000px'
|
|
272
298
|
},
|
|
273
299
|
'@media (max-width: 1200px)': {
|
|
274
300
|
maxWidth: '100%'
|
|
@@ -299,7 +325,8 @@ function Content({
|
|
|
299
325
|
api: launchSessionAPI,
|
|
300
326
|
freeTrialProducts: launchState.value?.metadata?.freeTrialProducts || [],
|
|
301
327
|
checkoutPath: "/payment/checkout",
|
|
302
|
-
minStakeAmount: launchState.value?.metadata?.minStakeAmount
|
|
328
|
+
minStakeAmount: launchState.value?.metadata?.minStakeAmount,
|
|
329
|
+
blockletMeta: launch?.blockletMeta
|
|
303
330
|
}), state.productType?.name === 'dedicated' && window.blocklet?.preferences?.dedicatedPricingTableId && /*#__PURE__*/_jsx(Box, {
|
|
304
331
|
sx: {
|
|
305
332
|
display: 'flex',
|
|
@@ -323,12 +350,6 @@ function Content({
|
|
|
323
350
|
marginBottom: 0
|
|
324
351
|
}
|
|
325
352
|
},
|
|
326
|
-
'& .cko-payment-submit': {
|
|
327
|
-
marginTop: 0,
|
|
328
|
-
'& button': {
|
|
329
|
-
fontSize: '1rem !important'
|
|
330
|
-
}
|
|
331
|
-
},
|
|
332
353
|
'& .btn-row': {
|
|
333
354
|
justifyContent: 'center !important'
|
|
334
355
|
}
|
|
@@ -349,24 +370,6 @@ function Content({
|
|
|
349
370
|
})
|
|
350
371
|
})
|
|
351
372
|
})]
|
|
352
|
-
}), /*#__PURE__*/_jsx(Box, {
|
|
353
|
-
sx: {
|
|
354
|
-
display: 'flex',
|
|
355
|
-
justifyContent: 'space-between'
|
|
356
|
-
},
|
|
357
|
-
children: /*#__PURE__*/_jsx(Box, {
|
|
358
|
-
component: Link,
|
|
359
|
-
sx: {
|
|
360
|
-
color: 'text.secondary',
|
|
361
|
-
marginTop: '24px',
|
|
362
|
-
marginBottom: isMobile ? '64px' : '12px',
|
|
363
|
-
'&:hover': {
|
|
364
|
-
textDecoration: 'underline !important'
|
|
365
|
-
}
|
|
366
|
-
},
|
|
367
|
-
to: joinURL(routerPrefix, `/purchase/select${window.location.search}`),
|
|
368
|
-
children: t('purchase.selectSpaceHint')
|
|
369
|
-
})
|
|
370
373
|
})]
|
|
371
374
|
})
|
|
372
375
|
});
|
package/lib/locales/en.js
CHANGED
|
@@ -110,7 +110,7 @@ var _default = exports.default = {
|
|
|
110
110
|
pageTitle: 'Purchase Space',
|
|
111
111
|
noPlan: 'Select space to continue',
|
|
112
112
|
hasPlan: 'Continue with {name}',
|
|
113
|
-
selectSpaceHint: 'Already have dedicated space?
|
|
113
|
+
selectSpaceHint: 'Already have dedicated space? ',
|
|
114
114
|
morePlanPrompt: 'Flip the page to see more plans',
|
|
115
115
|
redeem: 'Select purchased space',
|
|
116
116
|
noProducts: 'No products available for purchase, please check your payment-kit config',
|
package/lib/locales/zh.js
CHANGED
package/lib/prepare.js
CHANGED
|
@@ -10,7 +10,6 @@ var _constant = require("@blocklet/launcher-util/es/constant");
|
|
|
10
10
|
var _util = require("@blocklet/launcher-util/es/util");
|
|
11
11
|
var _formatError = _interopRequireDefault(require("@blocklet/launcher-util/lib/format-error"));
|
|
12
12
|
var _onDemand = _interopRequireDefault(require("@blocklet/launcher-ux/lib/payment/checkout/on-demand"));
|
|
13
|
-
var _useMobile = _interopRequireDefault(require("@blocklet/launcher-ux/lib/use-mobile"));
|
|
14
13
|
var _paymentReact = require("@blocklet/payment-react");
|
|
15
14
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
16
15
|
var _Box = _interopRequireDefault(require("@mui/material/Box"));
|
|
@@ -63,9 +62,6 @@ function Content(_ref) {
|
|
|
63
62
|
t,
|
|
64
63
|
locale
|
|
65
64
|
} = (0, _locale.useLocaleContext)();
|
|
66
|
-
const {
|
|
67
|
-
isMobile
|
|
68
|
-
} = (0, _useMobile.default)();
|
|
69
65
|
const navigate = (0, _reactRouterDom.useNavigate)();
|
|
70
66
|
const sessionId = params.get('sessionId');
|
|
71
67
|
const blockletMetaUrl = (0, _util.getBlockletMetaUrlFromQuery)(params);
|
|
@@ -254,35 +250,65 @@ function Content(_ref) {
|
|
|
254
250
|
height: '100%',
|
|
255
251
|
alignItems: 'center'
|
|
256
252
|
},
|
|
257
|
-
children: [
|
|
258
|
-
|
|
259
|
-
color: "primary",
|
|
260
|
-
value: (_state$productType = state.productType) === null || _state$productType === void 0 ? void 0 : _state$productType.name,
|
|
261
|
-
size: "small",
|
|
262
|
-
onChange: handleChangeProductType,
|
|
263
|
-
exclusive: true,
|
|
253
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_Stack.default, {
|
|
254
|
+
width: "100%",
|
|
264
255
|
sx: {
|
|
265
|
-
|
|
256
|
+
position: 'relative',
|
|
257
|
+
'@media (min-width: 1200px)': {
|
|
258
|
+
maxWidth: '1000px'
|
|
259
|
+
},
|
|
260
|
+
'@media (max-width: 1200px)': {
|
|
261
|
+
maxWidth: '100%'
|
|
262
|
+
},
|
|
263
|
+
flexWrap: 'wrap',
|
|
264
|
+
flexDirection: {
|
|
265
|
+
xs: 'column',
|
|
266
|
+
md: 'row'
|
|
267
|
+
},
|
|
268
|
+
justifyContent: {
|
|
269
|
+
xs: 'center',
|
|
270
|
+
md: 'space-between'
|
|
271
|
+
},
|
|
272
|
+
alignItems: 'center',
|
|
273
|
+
gap: 2
|
|
266
274
|
},
|
|
267
|
-
children: productTypes.
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
275
|
+
children: [productTypes.length > 1 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ToggleButtonGroup.default, {
|
|
276
|
+
orientation: "horizontal",
|
|
277
|
+
color: "primary",
|
|
278
|
+
value: (_state$productType = state.productType) === null || _state$productType === void 0 ? void 0 : _state$productType.name,
|
|
279
|
+
size: "small",
|
|
280
|
+
onChange: handleChangeProductType,
|
|
281
|
+
exclusive: true,
|
|
282
|
+
children: productTypes.map(_ref2 => {
|
|
283
|
+
let {
|
|
284
|
+
name
|
|
285
|
+
} = _ref2;
|
|
286
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ToggleButton.default, {
|
|
287
|
+
value: name,
|
|
288
|
+
sx: {
|
|
289
|
+
textTransform: 'capitalize'
|
|
290
|
+
},
|
|
291
|
+
children: t("purchase.productType.".concat(name))
|
|
292
|
+
}, name);
|
|
293
|
+
})
|
|
294
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
295
|
+
component: _reactRouterDom.Link,
|
|
296
|
+
sx: {
|
|
297
|
+
color: 'text.link',
|
|
298
|
+
'&:hover': {
|
|
299
|
+
opacity: 0.8
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
to: (0, _urlJoin.default)(routerPrefix, "/purchase/select".concat(window.location.search)),
|
|
303
|
+
children: t('purchase.selectSpaceHint')
|
|
304
|
+
})]
|
|
279
305
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
280
306
|
sx: {
|
|
281
307
|
width: '100%',
|
|
282
308
|
height: '100%',
|
|
283
309
|
marginTop: '24px',
|
|
284
310
|
'@media (min-width: 1200px)': {
|
|
285
|
-
maxWidth: '
|
|
311
|
+
maxWidth: '1000px'
|
|
286
312
|
},
|
|
287
313
|
'@media (max-width: 1200px)': {
|
|
288
314
|
maxWidth: '100%'
|
|
@@ -314,7 +340,8 @@ function Content(_ref) {
|
|
|
314
340
|
api: launchSessionAPI,
|
|
315
341
|
freeTrialProducts: ((_launchState$value7 = launchState.value) === null || _launchState$value7 === void 0 || (_launchState$value7 = _launchState$value7.metadata) === null || _launchState$value7 === void 0 ? void 0 : _launchState$value7.freeTrialProducts) || [],
|
|
316
342
|
checkoutPath: "/payment/checkout",
|
|
317
|
-
minStakeAmount: (_launchState$value8 = launchState.value) === null || _launchState$value8 === void 0 || (_launchState$value8 = _launchState$value8.metadata) === null || _launchState$value8 === void 0 ? void 0 : _launchState$value8.minStakeAmount
|
|
343
|
+
minStakeAmount: (_launchState$value8 = launchState.value) === null || _launchState$value8 === void 0 || (_launchState$value8 = _launchState$value8.metadata) === null || _launchState$value8 === void 0 ? void 0 : _launchState$value8.minStakeAmount,
|
|
344
|
+
blockletMeta: launch === null || launch === void 0 ? void 0 : launch.blockletMeta
|
|
318
345
|
}), ((_state$productType3 = state.productType) === null || _state$productType3 === void 0 ? void 0 : _state$productType3.name) === 'dedicated' && ((_window$blocklet3 = window.blocklet) === null || _window$blocklet3 === void 0 || (_window$blocklet3 = _window$blocklet3.preferences) === null || _window$blocklet3 === void 0 ? void 0 : _window$blocklet3.dedicatedPricingTableId) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
319
346
|
sx: {
|
|
320
347
|
display: 'flex',
|
|
@@ -338,12 +365,6 @@ function Content(_ref) {
|
|
|
338
365
|
marginBottom: 0
|
|
339
366
|
}
|
|
340
367
|
},
|
|
341
|
-
'& .cko-payment-submit': {
|
|
342
|
-
marginTop: 0,
|
|
343
|
-
'& button': {
|
|
344
|
-
fontSize: '1rem !important'
|
|
345
|
-
}
|
|
346
|
-
},
|
|
347
368
|
'& .btn-row': {
|
|
348
369
|
justifyContent: 'center !important'
|
|
349
370
|
}
|
|
@@ -364,24 +385,6 @@ function Content(_ref) {
|
|
|
364
385
|
})
|
|
365
386
|
})
|
|
366
387
|
})]
|
|
367
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
368
|
-
sx: {
|
|
369
|
-
display: 'flex',
|
|
370
|
-
justifyContent: 'space-between'
|
|
371
|
-
},
|
|
372
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
373
|
-
component: _reactRouterDom.Link,
|
|
374
|
-
sx: {
|
|
375
|
-
color: 'text.secondary',
|
|
376
|
-
marginTop: '24px',
|
|
377
|
-
marginBottom: isMobile ? '64px' : '12px',
|
|
378
|
-
'&:hover': {
|
|
379
|
-
textDecoration: 'underline !important'
|
|
380
|
-
}
|
|
381
|
-
},
|
|
382
|
-
to: (0, _urlJoin.default)(routerPrefix, "/purchase/select".concat(window.location.search)),
|
|
383
|
-
children: t('purchase.selectSpaceHint')
|
|
384
|
-
})
|
|
385
388
|
})]
|
|
386
389
|
})
|
|
387
390
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/launcher-workflow",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.118",
|
|
4
4
|
"description": "Purchase components for Launcher UI",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -41,22 +41,22 @@
|
|
|
41
41
|
"react": ">=18.1.0"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@arcblock/did-connect": "^2.13.
|
|
45
|
-
"@arcblock/icons": "^2.13.
|
|
46
|
-
"@arcblock/license": "^2.13.
|
|
47
|
-
"@arcblock/react-hooks": "^2.13.
|
|
48
|
-
"@arcblock/ux": "^2.13.
|
|
49
|
-
"@blocklet/launcher-layout": "^2.13.
|
|
50
|
-
"@blocklet/launcher-util": "2.3.
|
|
51
|
-
"@blocklet/launcher-ux": "2.3.
|
|
44
|
+
"@arcblock/did-connect": "^2.13.35",
|
|
45
|
+
"@arcblock/icons": "^2.13.35",
|
|
46
|
+
"@arcblock/license": "^2.13.35",
|
|
47
|
+
"@arcblock/react-hooks": "^2.13.35",
|
|
48
|
+
"@arcblock/ux": "^2.13.35",
|
|
49
|
+
"@blocklet/launcher-layout": "^2.13.35",
|
|
50
|
+
"@blocklet/launcher-util": "2.3.118",
|
|
51
|
+
"@blocklet/launcher-ux": "2.3.118",
|
|
52
52
|
"@blocklet/payment": "^1.14.8",
|
|
53
|
-
"@blocklet/payment-react": "^1.18.
|
|
53
|
+
"@blocklet/payment-react": "^1.18.43",
|
|
54
54
|
"@emotion/react": "^11.14.0",
|
|
55
55
|
"@emotion/styled": "^11.14.0",
|
|
56
56
|
"@mui/icons-material": "^5.17.1",
|
|
57
57
|
"@mui/lab": "^5.0.0-alpha.176",
|
|
58
58
|
"@mui/material": "^5.17.1",
|
|
59
|
-
"@ocap/util": "^1.20.
|
|
59
|
+
"@ocap/util": "^1.20.10",
|
|
60
60
|
"@splidejs/react-splide": "^0.7.12",
|
|
61
61
|
"@splidejs/splide": "^4.1.4",
|
|
62
62
|
"@splidejs/splide-extension-grid": "^0.4.1",
|
|
@@ -106,5 +106,5 @@
|
|
|
106
106
|
"require": "./lib/locales/index.js"
|
|
107
107
|
}
|
|
108
108
|
},
|
|
109
|
-
"gitHead": "
|
|
109
|
+
"gitHead": "76af82cb00a4d6d95dc5e046e8982375f38e65a1"
|
|
110
110
|
}
|