@blocklet/launcher-workflow 1.7.77 → 1.8.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 (2) hide show
  1. package/lib/purchase.js +52 -46
  2. package/package.json +28 -28
package/lib/purchase.js CHANGED
@@ -39,6 +39,8 @@ var _pageHeader = _interopRequireDefault(require("@blocklet/launcher-layout/lib/
39
39
 
40
40
  var _constant = require("@blocklet/launcher-util/lib/constant");
41
41
 
42
+ var _submit = _interopRequireDefault(require("@blocklet/launcher-ux/lib/hot-key/submit"));
43
+
42
44
  var _useMediaQuery = _interopRequireDefault(require("@mui/material/useMediaQuery"));
43
45
 
44
46
  var _plan = _interopRequireDefault(require("./components/plan"));
@@ -271,53 +273,57 @@ function PurchasePage() {
271
273
  className: "page-body body",
272
274
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
273
275
  className: "page-body-article",
274
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_compactLayout.default, {
275
- onBottomFix: type => setButtonInFix(type === 'fix'),
276
- bottom: plans.length ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
277
- className: "button-container container-padding ".concat(buttonInFix ? 'has-shadow' : ''),
278
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
279
- onClick: () => handleRedeem(),
280
- variant: "outlined",
281
- color: "primary",
282
- style: {
283
- marginRight: '24px'
284
- },
285
- children: t('common.redeem')
286
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Button.default, {
287
- onClick: () => handlePay(paymentMethod),
288
- disabled: paying,
289
- variant: "contained",
290
- color: "primary",
291
- children: [paying && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Spinner.default, {
292
- size: 14
293
- }), paying ? t('common.paying') : t('common.purchase')]
294
- })]
295
- }) : '',
296
- children: [(!isEmbed || isMobile) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_pageHeader.default, {
297
- title: t('plan.title'),
298
- subTitle: t('plan.subTitle'),
299
- onClickBack: disabledBack.includes('purchase') ? '' : clickBack
300
- }), plans.length ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
301
- className: "select-payment",
302
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tabs.default, {
303
- tabs: paymentTypes,
304
- current: paymentMethod,
305
- onChange: e => setPaymentType(e)
306
- })
307
- }) : '', /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
308
- className: "select-plan small-select-plan-".concat(plans.length),
309
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
310
- className: "selector-container container-padding",
311
- children: plans.length ? plans.map(item => /*#__PURE__*/(0, _jsxRuntime.jsx)(_plan.default, {
312
- paymentMethod: paymentMethod,
313
- onClick: () => selectPlan(item),
314
- selected: plan && plan._id === item._id,
315
- data: item
316
- }, item._id)) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Empty.default, {
317
- children: t('plan.noPlan')
276
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_submit.default, {
277
+ disabled: paying,
278
+ onConfirm: () => handlePay(paymentMethod),
279
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_compactLayout.default, {
280
+ onBottomFix: type => setButtonInFix(type === 'fix'),
281
+ bottom: plans.length ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
282
+ className: "button-container container-padding ".concat(buttonInFix ? 'has-shadow' : ''),
283
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
284
+ onClick: () => handleRedeem(),
285
+ variant: "outlined",
286
+ color: "primary",
287
+ style: {
288
+ marginRight: '24px'
289
+ },
290
+ children: t('common.redeem')
291
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Button.default, {
292
+ onClick: () => handlePay(paymentMethod),
293
+ disabled: paying,
294
+ variant: "contained",
295
+ color: "primary",
296
+ children: [paying && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Spinner.default, {
297
+ size: 14
298
+ }), paying ? t('common.paying') : t('common.purchase')]
299
+ })]
300
+ }) : '',
301
+ children: [(!isEmbed || isMobile) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_pageHeader.default, {
302
+ title: t('plan.title'),
303
+ subTitle: t('plan.subTitle'),
304
+ onClickBack: disabledBack.includes('purchase') ? '' : clickBack
305
+ }), plans.length ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
306
+ className: "select-payment",
307
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tabs.default, {
308
+ tabs: paymentTypes,
309
+ current: paymentMethod,
310
+ onChange: e => setPaymentType(e)
318
311
  })
319
- })
320
- })]
312
+ }) : '', /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
313
+ className: "select-plan small-select-plan-".concat(plans.length),
314
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
315
+ className: "selector-container container-padding",
316
+ children: plans.length ? plans.map(item => /*#__PURE__*/(0, _jsxRuntime.jsx)(_plan.default, {
317
+ paymentMethod: paymentMethod,
318
+ onClick: () => selectPlan(item),
319
+ selected: plan && plan._id === item._id,
320
+ data: item
321
+ }, item._id)) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Empty.default, {
322
+ children: t('plan.noPlan')
323
+ })
324
+ })
325
+ })]
326
+ })
321
327
  })
322
328
  })
323
329
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Connect.default, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/launcher-workflow",
3
- "version": "1.7.77",
3
+ "version": "1.8.0",
4
4
  "description": "Purchase components for Launcher UI",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -37,42 +37,42 @@
37
37
  "react": ">=18.1.0"
38
38
  },
39
39
  "dependencies": {
40
- "@arcblock/did-connect": "^2.1.71",
41
- "@arcblock/icons": "^2.1.71",
42
- "@arcblock/license": "^2.1.71",
43
- "@arcblock/ux": "^2.1.71",
44
- "@blocklet/launcher-layout": "1.7.77",
45
- "@blocklet/launcher-util": "1.7.77",
46
- "@blocklet/launcher-ux": "1.7.77",
47
- "@emotion/react": "^11.9.0",
48
- "@emotion/styled": "^11.8.1",
49
- "@mui/icons-material": "^5.6.2",
50
- "@mui/lab": "^5.0.0-alpha.81",
51
- "@mui/material": "^5.6.4",
52
- "@mui/styles": "^5.6.2",
53
- "@ocap/util": "^1.17.6",
54
- "@stripe/react-stripe-js": "^1.7.0",
55
- "@stripe/stripe-js": "^1.22.0",
40
+ "@arcblock/did-connect": "^2.2.0",
41
+ "@arcblock/icons": "^2.2.0",
42
+ "@arcblock/license": "^2.2.0",
43
+ "@arcblock/ux": "^2.2.0",
44
+ "@blocklet/launcher-layout": "1.8.0",
45
+ "@blocklet/launcher-util": "1.8.0",
46
+ "@blocklet/launcher-ux": "1.8.0",
47
+ "@emotion/react": "^11.10.0",
48
+ "@emotion/styled": "^11.10.0",
49
+ "@mui/icons-material": "^5.8.4",
50
+ "@mui/lab": "^5.0.0-alpha.93",
51
+ "@mui/material": "^5.9.3",
52
+ "@mui/styles": "^5.9.3",
53
+ "@ocap/util": "^1.17.7",
54
+ "@stripe/react-stripe-js": "^1.10.0",
55
+ "@stripe/stripe-js": "^1.34.0",
56
56
  "@styled-icons/remix-fill": "^10.18.0",
57
- "axios": "^0.26.0",
57
+ "axios": "^0.26.1",
58
58
  "flat": "^5.0.2",
59
59
  "js-cookie": "^3.0.1",
60
60
  "lodash.get": "^4.4.2",
61
61
  "lodash.throttle": "^4.1.1",
62
62
  "prop-types": "^15.8.1",
63
- "react-lottie-player": "^1.4.2",
64
- "react-router-dom": "^5.1.2",
65
- "react-use": "^17.3.2",
66
- "styled-components": "^5.3.3",
63
+ "react-lottie-player": "^1.4.3",
64
+ "react-router-dom": "^5.3.3",
65
+ "react-use": "^17.4.0",
66
+ "styled-components": "^5.3.5",
67
67
  "url-join": "^4.0.1"
68
68
  },
69
69
  "devDependencies": {
70
- "@babel/cli": "^7.8.4",
71
- "@babel/core": "^7.8.4",
72
- "@babel/preset-env": "^7.8.4",
73
- "@babel/preset-react": "^7.8.3",
70
+ "@babel/cli": "^7.18.10",
71
+ "@babel/core": "^7.18.10",
72
+ "@babel/preset-env": "^7.18.10",
73
+ "@babel/preset-react": "^7.18.6",
74
74
  "babel-plugin-inline-react-svg": "^2.0.1",
75
- "babel-plugin-styled-components": "^1.10.7"
75
+ "babel-plugin-styled-components": "^1.13.3"
76
76
  },
77
- "gitHead": "ee72e94fd3a327359e6cf62c3d12ec52fdf3d4bf"
77
+ "gitHead": "f3ae76788c6fae79943d18d94e1eb909a0ba7f6e"
78
78
  }