@blocklet/launcher-workflow 2.3.139 → 2.4.1

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.
@@ -9,9 +9,9 @@ import UncheckedIcon from '../assets/images/checkbox-unchecked.svg?react';
9
9
  import { useLocaleContext } from '../contexts/locale';
10
10
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
11
  export default function CheckBox({
12
- label,
13
- checked,
14
- showHint,
12
+ label = '',
13
+ checked = false,
14
+ showHint = false,
15
15
  ...rest
16
16
  }) {
17
17
  const {
@@ -51,9 +51,4 @@ CheckBox.propTypes = {
51
51
  showHint: PropTypes.bool,
52
52
  checked: PropTypes.bool,
53
53
  label: PropTypes.any
54
- };
55
- CheckBox.defaultProps = {
56
- checked: false,
57
- showHint: false,
58
- label: ''
59
54
  };
@@ -24,14 +24,14 @@ const translations = {
24
24
  export default function ConfirmDialog({
25
25
  title,
26
26
  description,
27
- cancel,
28
- confirm,
29
- color,
30
- params: initialParams,
31
- onCancel,
27
+ cancel = '',
28
+ confirm = '',
29
+ color = 'error',
30
+ params: initialParams = {},
31
+ onCancel = () => {},
32
32
  onConfirm,
33
- locale,
34
- disableCancel
33
+ locale = 'en',
34
+ disableCancel = false
35
35
  }) {
36
36
  const {
37
37
  locale: innerLocale
@@ -85,13 +85,4 @@ ConfirmDialog.propTypes = {
85
85
  onConfirm: PropTypes.func.isRequired,
86
86
  locale: PropTypes.oneOf(['en', 'zh']),
87
87
  disableCancel: PropTypes.bool
88
- };
89
- ConfirmDialog.defaultProps = {
90
- onCancel: () => {},
91
- cancel: '',
92
- confirm: '',
93
- color: 'error',
94
- params: {},
95
- locale: 'en',
96
- disableCancel: false
97
88
  };
@@ -71,8 +71,10 @@ export default function InProgressSession() {
71
71
  title: t('purchase.inProgress.title'),
72
72
  onClose: () => handleClose(null),
73
73
  actions: /*#__PURE__*/_jsxs(Box, {
74
- display: "flex",
75
- gap: 2,
74
+ sx: {
75
+ display: 'flex',
76
+ gap: 2
77
+ },
76
78
  children: [/*#__PURE__*/_jsx(Button, {
77
79
  variant: "outlined",
78
80
  size: "small",
@@ -32,7 +32,7 @@ const STATUS = {
32
32
  };
33
33
  export default function LaunchDedicated({
34
34
  sessionId,
35
- type
35
+ type = 'launch'
36
36
  }) {
37
37
  const query = useQuery();
38
38
  const blockletMetaUrl = query.get('blocklet_meta_url');
@@ -294,7 +294,4 @@ const Content = styled.div`
294
294
  LaunchDedicated.propTypes = {
295
295
  sessionId: PropTypes.string.isRequired,
296
296
  type: PropTypes.oneOf(['launch', 'start'])
297
- };
298
- LaunchDedicated.defaultProps = {
299
- type: 'launch'
300
297
  };
@@ -1,11 +1,11 @@
1
1
  import PropTypes from 'prop-types';
2
2
  import styled from '@emotion/styled';
3
- import { forwardRef } from 'react';
4
3
  import { jsx as _jsx } from "react/jsx-runtime";
5
- const Body = /*#__PURE__*/forwardRef(function Body({
4
+ const Body = function Body({
5
+ ref = null,
6
6
  children,
7
7
  ...rest
8
- }, ref) {
8
+ }) {
9
9
  return /*#__PURE__*/_jsx(Container, {
10
10
  ref: ref,
11
11
  ...rest,
@@ -14,8 +14,9 @@ const Body = /*#__PURE__*/forwardRef(function Body({
14
14
  children: children
15
15
  })
16
16
  });
17
- });
17
+ };
18
18
  Body.propTypes = {
19
+ ref: PropTypes.any,
19
20
  children: PropTypes.any.isRequired
20
21
  };
21
22
  const Container = styled.div`
@@ -3,8 +3,8 @@ import PropTypes from 'prop-types';
3
3
  import PageHeader from '@blocklet/launcher-layout/lib/page-header';
4
4
  import { jsx as _jsx } from "react/jsx-runtime";
5
5
  export default function Header({
6
- title,
7
- disableBack
6
+ title = '',
7
+ disableBack = false
8
8
  }) {
9
9
  const navigate = useNavigate();
10
10
  const clickBack = () => {
@@ -18,8 +18,4 @@ export default function Header({
18
18
  Header.propTypes = {
19
19
  title: PropTypes.any,
20
20
  disableBack: PropTypes.bool
21
- };
22
- Header.defaultProps = {
23
- title: '',
24
- disableBack: false
25
21
  };
@@ -11,7 +11,7 @@ const {
11
11
  Provider
12
12
  } = RequestContext;
13
13
  export function RequestProvider({
14
- baseURL,
14
+ baseURL = '/',
15
15
  children
16
16
  }) {
17
17
  const {
@@ -61,10 +61,6 @@ RequestProvider.propTypes = {
61
61
  baseURL: PropTypes.string,
62
62
  children: PropTypes.any.isRequired
63
63
  };
64
- RequestProvider.defaultProps = {
65
- baseURL: '/'
66
- };
67
- RequestProvider.defaultProps = {};
68
64
  export default function useRequest() {
69
65
  const value = useContext(RequestContext);
70
66
  return value;
@@ -11,11 +11,11 @@ const {
11
11
  Provider
12
12
  } = Context;
13
13
  function WorkflowProvider({
14
- baseURL,
15
- embed,
16
- didPayPrefix,
17
- routerPrefix,
18
- locale,
14
+ baseURL = '/',
15
+ embed = true,
16
+ didPayPrefix = '/',
17
+ routerPrefix = '/',
18
+ locale = 'en',
19
19
  children
20
20
  }) {
21
21
  const [params] = useSearchParams();
@@ -50,13 +50,6 @@ WorkflowProvider.propTypes = {
50
50
  embed: PropTypes.bool,
51
51
  children: PropTypes.any.isRequired
52
52
  };
53
- WorkflowProvider.defaultProps = {
54
- baseURL: '/',
55
- routerPrefix: '/',
56
- didPayPrefix: '/',
57
- locale: 'en',
58
- embed: true
59
- };
60
53
  function useWorkflowContext() {
61
54
  const value = useContext(Context);
62
55
  return value;
package/es/prepare.js CHANGED
@@ -238,8 +238,8 @@ function Content({
238
238
  alignItems: 'center'
239
239
  },
240
240
  children: [/*#__PURE__*/_jsxs(Stack, {
241
- width: "100%",
242
241
  sx: {
242
+ width: '100%',
243
243
  position: 'relative',
244
244
  '@media (min-width: 1200px)': {
245
245
  maxWidth: '1000px'
@@ -25,9 +25,9 @@ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i
25
25
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
26
26
  function CheckBox(_ref) {
27
27
  let {
28
- label,
29
- checked,
30
- showHint
28
+ label = '',
29
+ checked = false,
30
+ showHint = false
31
31
  } = _ref,
32
32
  rest = _objectWithoutProperties(_ref, _excluded);
33
33
  const {
@@ -57,9 +57,4 @@ CheckBox.propTypes = {
57
57
  showHint: _propTypes.default.bool,
58
58
  checked: _propTypes.default.bool,
59
59
  label: _propTypes.default.any
60
- };
61
- CheckBox.defaultProps = {
62
- checked: false,
63
- showHint: false,
64
- label: ''
65
60
  };
@@ -32,14 +32,14 @@ function ConfirmDialog(_ref) {
32
32
  let {
33
33
  title,
34
34
  description,
35
- cancel,
36
- confirm,
37
- color,
38
- params: initialParams,
39
- onCancel,
35
+ cancel = '',
36
+ confirm = '',
37
+ color = 'error',
38
+ params: initialParams = {},
39
+ onCancel = () => {},
40
40
  onConfirm,
41
- locale,
42
- disableCancel
41
+ locale = 'en',
42
+ disableCancel = false
43
43
  } = _ref;
44
44
  const {
45
45
  locale: innerLocale
@@ -93,13 +93,4 @@ ConfirmDialog.propTypes = {
93
93
  onConfirm: _propTypes.default.func.isRequired,
94
94
  locale: _propTypes.default.oneOf(['en', 'zh']),
95
95
  disableCancel: _propTypes.default.bool
96
- };
97
- ConfirmDialog.defaultProps = {
98
- onCancel: () => {},
99
- cancel: '',
100
- confirm: '',
101
- color: 'error',
102
- params: {},
103
- locale: 'en',
104
- disableCancel: false
105
96
  };
@@ -78,8 +78,10 @@ function InProgressSession() {
78
78
  title: t('purchase.inProgress.title'),
79
79
  onClose: () => handleClose(null),
80
80
  actions: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
81
- display: "flex",
82
- gap: 2,
81
+ sx: {
82
+ display: 'flex',
83
+ gap: 2
84
+ },
83
85
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
84
86
  variant: "outlined",
85
87
  size: "small",
@@ -42,7 +42,7 @@ const STATUS = {
42
42
  function LaunchDedicated(_ref) {
43
43
  let {
44
44
  sessionId,
45
- type
45
+ type = 'launch'
46
46
  } = _ref;
47
47
  const query = (0, _query.default)();
48
48
  const blockletMetaUrl = query.get('blocklet_meta_url');
@@ -251,7 +251,4 @@ const Content = _styled.default.div(_templateObject3 || (_templateObject3 = _tag
251
251
  LaunchDedicated.propTypes = {
252
252
  sessionId: _propTypes.default.string.isRequired,
253
253
  type: _propTypes.default.oneOf(['launch', 'start'])
254
- };
255
- LaunchDedicated.defaultProps = {
256
- type: 'launch'
257
254
  };
@@ -6,10 +6,9 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _propTypes = _interopRequireDefault(require("prop-types"));
8
8
  var _styled = _interopRequireDefault(require("@emotion/styled"));
9
- var _react = require("react");
10
9
  var _jsxRuntime = require("react/jsx-runtime");
11
10
  var _templateObject;
12
- const _excluded = ["children"];
11
+ const _excluded = ["ref", "children"];
13
12
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
13
  function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
15
14
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -19,8 +18,9 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
19
18
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
20
19
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
21
20
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
22
- const Body = /*#__PURE__*/(0, _react.forwardRef)(function Body(_ref, ref) {
21
+ const Body = function Body(_ref) {
23
22
  let {
23
+ ref = null,
24
24
  children
25
25
  } = _ref,
26
26
  rest = _objectWithoutProperties(_ref, _excluded);
@@ -32,8 +32,9 @@ const Body = /*#__PURE__*/(0, _react.forwardRef)(function Body(_ref, ref) {
32
32
  children: children
33
33
  })
34
34
  }));
35
- });
35
+ };
36
36
  Body.propTypes = {
37
+ ref: _propTypes.default.any,
37
38
  children: _propTypes.default.any.isRequired
38
39
  };
39
40
  const Container = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n flex: 1;\n\n @media (min-width: 960px) {\n margin-top: 32px;\n }\n\n @media (max-width: 960px) {\n margin-top: 16px;\n }\n\n .page-body-article {\n width: 100%;\n height: 100%;\n overflow-y: auto;\n display: flex;\n flex-direction: column;\n gap: 16px;\n }\n"])));
@@ -11,8 +11,8 @@ var _jsxRuntime = require("react/jsx-runtime");
11
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
12
  function Header(_ref) {
13
13
  let {
14
- title,
15
- disableBack
14
+ title = '',
15
+ disableBack = false
16
16
  } = _ref;
17
17
  const navigate = (0, _reactRouterDom.useNavigate)();
18
18
  const clickBack = () => {
@@ -26,8 +26,4 @@ function Header(_ref) {
26
26
  Header.propTypes = {
27
27
  title: _propTypes.default.any,
28
28
  disableBack: _propTypes.default.bool
29
- };
30
- Header.defaultProps = {
31
- title: '',
32
- disableBack: false
33
29
  };
@@ -25,7 +25,7 @@ const {
25
25
  } = RequestContext;
26
26
  function RequestProvider(_ref) {
27
27
  let {
28
- baseURL,
28
+ baseURL = '/',
29
29
  children
30
30
  } = _ref;
31
31
  const {
@@ -74,10 +74,6 @@ RequestProvider.propTypes = {
74
74
  baseURL: _propTypes.default.string,
75
75
  children: _propTypes.default.any.isRequired
76
76
  };
77
- RequestProvider.defaultProps = {
78
- baseURL: '/'
79
- };
80
- RequestProvider.defaultProps = {};
81
77
  function useRequest() {
82
78
  const value = (0, _react.useContext)(RequestContext);
83
79
  return value;
@@ -20,11 +20,11 @@ const {
20
20
  } = Context;
21
21
  function WorkflowProvider(_ref) {
22
22
  let {
23
- baseURL,
24
- embed,
25
- didPayPrefix,
26
- routerPrefix,
27
- locale,
23
+ baseURL = '/',
24
+ embed = true,
25
+ didPayPrefix = '/',
26
+ routerPrefix = '/',
27
+ locale = 'en',
28
28
  children
29
29
  } = _ref;
30
30
  const [params] = (0, _reactRouterDom.useSearchParams)();
@@ -59,13 +59,6 @@ WorkflowProvider.propTypes = {
59
59
  embed: _propTypes.default.bool,
60
60
  children: _propTypes.default.any.isRequired
61
61
  };
62
- WorkflowProvider.defaultProps = {
63
- baseURL: '/',
64
- routerPrefix: '/',
65
- didPayPrefix: '/',
66
- locale: 'en',
67
- embed: true
68
- };
69
62
  function useWorkflowContext() {
70
63
  const value = (0, _react.useContext)(Context);
71
64
  return value;
package/lib/prepare.js CHANGED
@@ -251,8 +251,8 @@ function Content(_ref) {
251
251
  alignItems: 'center'
252
252
  },
253
253
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_Stack.default, {
254
- width: "100%",
255
254
  sx: {
255
+ width: '100%',
256
256
  position: 'relative',
257
257
  '@media (min-width: 1200px)': {
258
258
  maxWidth: '1000px'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/launcher-workflow",
3
- "version": "2.3.139",
3
+ "version": "2.4.1",
4
4
  "description": "Purchase components for Launcher UI",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -38,32 +38,32 @@
38
38
  "url": "https://github.com/blocklet/launcher/issues"
39
39
  },
40
40
  "peerDependencies": {
41
- "react": ">=18.1.0"
41
+ "react": ">=19.1.0"
42
42
  },
43
43
  "dependencies": {
44
- "@arcblock/did-connect": "^2.13.65",
45
- "@arcblock/icons": "^2.13.65",
46
- "@arcblock/license": "^2.13.65",
47
- "@arcblock/react-hooks": "^2.13.65",
48
- "@arcblock/ux": "^2.13.65",
49
- "@blocklet/launcher-layout": "^2.13.65",
50
- "@blocklet/launcher-util": "2.3.139",
51
- "@blocklet/launcher-ux": "2.3.139",
44
+ "@arcblock/did-connect": "^3.0.8",
45
+ "@arcblock/icons": "^3.0.8",
46
+ "@arcblock/license": "^3.0.8",
47
+ "@arcblock/react-hooks": "^3.0.8",
48
+ "@arcblock/ux": "^3.0.8",
49
+ "@blocklet/launcher-layout": "^3.0.8",
50
+ "@blocklet/launcher-util": "2.4.1",
51
+ "@blocklet/launcher-ux": "2.4.1",
52
52
  "@blocklet/payment": "^1.14.8",
53
- "@blocklet/payment-react": "^1.18.54",
53
+ "@blocklet/payment-react": "^1.19.0",
54
54
  "@emotion/react": "^11.14.0",
55
- "@emotion/styled": "^11.14.0",
56
- "@mui/icons-material": "^5.17.1",
57
- "@mui/lab": "^5.0.0-alpha.176",
58
- "@mui/material": "^5.17.1",
59
- "@ocap/util": "^1.20.14",
55
+ "@emotion/styled": "^11.14.1",
56
+ "@mui/icons-material": "^7.2.0",
57
+ "@mui/lab": "^7.0.0-beta.14",
58
+ "@mui/material": "^7.2.0",
59
+ "@ocap/util": "^1.20.15",
60
60
  "@splidejs/react-splide": "^0.7.12",
61
61
  "@splidejs/splide": "^4.1.4",
62
62
  "@splidejs/splide-extension-grid": "^0.4.1",
63
63
  "@stripe/react-stripe-js": "^1.16.5",
64
64
  "@stripe/stripe-js": "^1.54.2",
65
- "ahooks": "^3.8.5",
66
- "axios": "^1.9.0",
65
+ "ahooks": "^3.9.0",
66
+ "axios": "^1.10.0",
67
67
  "dsbridge": "^3.1.4",
68
68
  "flat": "^5.0.2",
69
69
  "js-cookie": "^3.0.5",
@@ -81,11 +81,11 @@
81
81
  },
82
82
  "devDependencies": {
83
83
  "@babel/cli": "^7.27.2",
84
- "@babel/core": "^7.27.4",
84
+ "@babel/core": "^7.27.7",
85
85
  "@babel/preset-env": "^7.27.2",
86
86
  "@babel/preset-react": "^7.27.1",
87
87
  "babel-plugin-inline-react-svg": "^2.0.2",
88
- "concurrently": "^9.1.2",
88
+ "concurrently": "^9.2.0",
89
89
  "glob": "^10.4.5"
90
90
  },
91
91
  "exports": {
@@ -106,5 +106,5 @@
106
106
  "require": "./lib/locales/index.js"
107
107
  }
108
108
  },
109
- "gitHead": "edc4cafa66a1d76b6f570fad3f82831909b52d06"
109
+ "gitHead": "3530b1a0c5b79b9a3e064d20dea7d74fe768dcfd"
110
110
  }