@blocklet/launcher-workflow 1.7.79 → 1.8.2
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/lib/components/instance-operation.js +8 -13
- package/lib/components/payment-method.js +7 -9
- package/lib/components/plan.js +6 -5
- package/lib/components/stripe/checkout.js +6 -5
- package/lib/components/stripe/paying.js +6 -5
- package/lib/prepare.js +9 -12
- package/lib/purchase.js +10 -14
- package/package.json +26 -29
|
@@ -17,7 +17,7 @@ var _useInterval = _interopRequireDefault(require("react-use/lib/useInterval"));
|
|
|
17
17
|
|
|
18
18
|
var _lodash2 = _interopRequireDefault(require("lodash.throttle"));
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
21
21
|
|
|
22
22
|
var _Button = _interopRequireDefault(require("@arcblock/ux/lib/Button"));
|
|
23
23
|
|
|
@@ -45,8 +45,12 @@ var _locale = require("../contexts/locale");
|
|
|
45
45
|
|
|
46
46
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
47
47
|
|
|
48
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
49
|
+
|
|
48
50
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
49
51
|
|
|
52
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
53
|
+
|
|
50
54
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
51
55
|
|
|
52
56
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -243,20 +247,11 @@ function OperationPage(_ref) {
|
|
|
243
247
|
});
|
|
244
248
|
}
|
|
245
249
|
|
|
246
|
-
const LinkEle =
|
|
247
|
-
displayName: "instance-operation__LinkEle",
|
|
248
|
-
componentId: "sc-1fcaixs-0"
|
|
249
|
-
})(["display:flex;justify-content:center;align-items:center;height:36px;color:", ";"], props => props.theme.palette.primary.main);
|
|
250
|
+
const LinkEle = _styled.default.a(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n align-items: center;\n height: 36px;\n color: ", ";\n"])), props => props.theme.palette.primary.main);
|
|
250
251
|
|
|
251
|
-
const WaiterContainer =
|
|
252
|
-
displayName: "instance-operation__WaiterContainer",
|
|
253
|
-
componentId: "sc-1fcaixs-1"
|
|
254
|
-
})(["color:#1dc1c7;"]);
|
|
252
|
+
const WaiterContainer = _styled.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: #1dc1c7;\n"])));
|
|
255
253
|
|
|
256
|
-
const Content =
|
|
257
|
-
displayName: "instance-operation__Content",
|
|
258
|
-
componentId: "sc-1fcaixs-2"
|
|
259
|
-
})(["margin:auto;height:100%;.link{color:", ";}.link:hover{text-decoration:underline !important;}.status{color:", ";display:flex;flex-direction:column;align-items:center;.status-spinner{color:inherit !important;}.status-text{display:inline-block;padding:0 20px;max-width:420px;margin-top:24px;text-align:center;}}.button{min-width:150px;margin-bottom:100px;}.center{display:flex;align-items:center;justify-content:center;width:100%;height:100%;}.launch-page-header{transition:all ease 0.3s;&.header-hide{opacity:0;}}"], props => props.theme.palette.primary.main, props => props.theme.palette.primary.main);
|
|
254
|
+
const Content = _styled.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin: auto;\n height: 100%;\n\n .link {\n color: ", ";\n }\n\n .link:hover {\n text-decoration: underline !important;\n }\n\n .status {\n color: ", ";\n display: flex;\n flex-direction: column;\n align-items: center;\n\n .status-spinner {\n color: inherit !important;\n }\n\n .status-text {\n display: inline-block;\n padding: 0 20px;\n max-width: 420px;\n margin-top: 24px;\n text-align: center;\n }\n }\n\n .button {\n min-width: 150px;\n margin-bottom: 100px;\n }\n .center {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n }\n .launch-page-header {\n transition: all ease 0.3s;\n &.header-hide {\n opacity: 0;\n }\n }\n"])), props => props.theme.palette.primary.main, props => props.theme.palette.primary.main);
|
|
260
255
|
|
|
261
256
|
OperationPage.propTypes = {
|
|
262
257
|
type: _propTypes.default.oneOf(['launch', 'start']),
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = PaymentMethod;
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
@@ -19,10 +19,14 @@ var _locale = require("../contexts/locale");
|
|
|
19
19
|
|
|
20
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
21
|
|
|
22
|
+
var _templateObject, _templateObject2;
|
|
23
|
+
|
|
22
24
|
const _excluded = ["type"];
|
|
23
25
|
|
|
24
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
27
|
|
|
28
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
29
|
+
|
|
26
30
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
27
31
|
|
|
28
32
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -58,15 +62,9 @@ function PaymentMethod(_ref) {
|
|
|
58
62
|
}));
|
|
59
63
|
}
|
|
60
64
|
|
|
61
|
-
const Container =
|
|
62
|
-
displayName: "payment-method__Container",
|
|
63
|
-
componentId: "sc-tig09z-0"
|
|
64
|
-
})(["display:flex;justify-content:center;align-items:center;.payment-icon{margin-right:4px;}"]);
|
|
65
|
+
const Container = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n align-items: center;\n\n .payment-icon {\n margin-right: 4px;\n }\n"])));
|
|
65
66
|
|
|
66
|
-
const CryptoIcon = (0,
|
|
67
|
-
displayName: "payment-method__CryptoIcon",
|
|
68
|
-
componentId: "sc-tig09z-1"
|
|
69
|
-
})(["font-size:14px;height:22px;"]);
|
|
67
|
+
const CryptoIcon = (0, _styled.default)(_Coins.Coins)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n font-size: 14px;\n height: 22px;\n"])));
|
|
70
68
|
PaymentMethod.propTypes = {
|
|
71
69
|
type: _propTypes.default.oneOf([_constant.CURRENCY_TYPE.crypto, _constant.CURRENCY_TYPE.fiat]).isRequired
|
|
72
70
|
};
|
package/lib/components/plan.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = NodeType;
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
@@ -23,10 +23,14 @@ var _locale = require("../contexts/locale");
|
|
|
23
23
|
|
|
24
24
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
25
25
|
|
|
26
|
+
var _templateObject;
|
|
27
|
+
|
|
26
28
|
const _excluded = ["data", "selected", "paymentMethod"];
|
|
27
29
|
|
|
28
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
31
|
|
|
32
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
33
|
+
|
|
30
34
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
31
35
|
|
|
32
36
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -91,7 +95,4 @@ NodeType.defaultProps = {
|
|
|
91
95
|
paymentMethod: _constant.CURRENCY_TYPE.crypto
|
|
92
96
|
};
|
|
93
97
|
|
|
94
|
-
const Container =
|
|
95
|
-
displayName: "plan__Container",
|
|
96
|
-
componentId: "sc-1ts75ga-0"
|
|
97
|
-
})(["position:relative;border:1px solid ", ";border-radius:8px;padding:16px;cursor:pointer;transition:background-color ease 0.2s,border ease 0.2s;&.item-selected{background-color:#ecfbfd;border-color:#ecfbfd;cursor:default;}.name{color:", ";font-size:16px;line-height:20px;font-weight:500;}.price{margin-top:8px;font-size:24px;font-weight:700;color:", ";}.rights{font-size:14px;& > ul li{list-style-type:none;margin:0;vertical-align:middle;color:", ";}& > ul li:not(:first-child){margin-top:8px;}.rights-list{margin-top:8px;}}.item-block{display:flex;.item-icon{margin-right:6px;font-size:14px;color:", ";flex-shrink:0;}.item-desc{flex:1;}}.check-container{position:absolute;right:0;bottom:0;display:flex;justify-content:flex-end;align-items:flex-end;width:30px;height:30px;border-radius:0 0 7px 0;color:", ";overflow:hidden;transition:all ease 0.3s;&:after{position:absolute;z-index:0;left:30px;top:30px;display:block;width:0;height:0;border-top:transparent solid 15px;border-left:transparent solid 15px;border-bottom:", " solid 15px;border-right:", " solid 15px;transition:all ease 0.1s;content:'';}.check-icon{position:relative;z-index:2;margin:0 1px 1px 0;font-size:16px;transform:scale(0);transition:all ease 0.2s;}}&.item-selected{.check-container{&:after{left:0;top:0;}.check-icon{transform:scale(1);}}}"], props => props.theme.palette.grey[200], props => props.theme.palette.grey[900], props => props.theme.palette.primary.main, props => props.theme.palette.grey[700], props => props.theme.palette.primary.main, props => props.theme.palette.common.white, props => props.theme.palette.primary.main, props => props.theme.palette.primary.main);
|
|
98
|
+
const Container = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n border: 1px solid ", ";\n border-radius: 8px;\n padding: 16px;\n cursor: pointer;\n transition: background-color ease 0.2s, border ease 0.2s;\n\n &.item-selected {\n background-color: #ecfbfd;\n border-color: #ecfbfd;\n cursor: default;\n }\n\n .name {\n color: ", ";\n font-size: 16px;\n line-height: 20px;\n font-weight: 500;\n }\n\n .price {\n margin-top: 8px;\n font-size: 24px;\n font-weight: 700;\n color: ", ";\n }\n\n .rights {\n font-size: 14px;\n\n & > ul li {\n list-style-type: none;\n margin: 0;\n vertical-align: middle;\n color: ", ";\n }\n\n & > ul li:not(:first-of-type) {\n margin-top: 8px;\n }\n\n .rights-list {\n margin-top: 8px;\n }\n }\n\n .item-block {\n display: flex;\n .item-icon {\n margin-right: 6px;\n font-size: 14px;\n color: ", ";\n flex-shrink: 0;\n }\n .item-desc {\n flex: 1;\n }\n }\n\n .check-container {\n position: absolute;\n right: 0;\n bottom: 0;\n display: flex;\n justify-content: flex-end;\n align-items: flex-end;\n width: 30px;\n height: 30px;\n border-radius: 0 0 7px 0;\n color: ", ";\n overflow: hidden;\n transition: all ease 0.3s;\n &:after {\n position: absolute;\n z-index: 0;\n left: 30px;\n top: 30px;\n display: block;\n width: 0;\n height: 0;\n border-top: transparent solid 15px;\n border-left: transparent solid 15px;\n border-bottom: ", " solid 15px;\n border-right: ", " solid 15px;\n transition: all ease 0.1s;\n content: '';\n }\n\n .check-icon {\n position: relative;\n z-index: 2;\n margin: 0 1px 1px 0;\n font-size: 16px;\n transform: scale(0);\n transition: all ease 0.2s;\n }\n }\n\n &.item-selected {\n .check-container {\n &:after {\n left: 0;\n top: 0;\n }\n .check-icon {\n transform: scale(1);\n }\n }\n }\n"])), props => props.theme.palette.grey[200], props => props.theme.palette.grey[900], props => props.theme.palette.primary.main, props => props.theme.palette.grey[700], props => props.theme.palette.primary.main, props => props.theme.palette.common.white, props => props.theme.palette.primary.main, props => props.theme.palette.primary.main);
|
|
@@ -9,7 +9,7 @@ var _react = require("react");
|
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
13
13
|
|
|
14
14
|
var _stripeJs = require("@stripe/stripe-js");
|
|
15
15
|
|
|
@@ -31,8 +31,12 @@ var _paying = _interopRequireDefault(require("./paying"));
|
|
|
31
31
|
|
|
32
32
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
33
33
|
|
|
34
|
+
var _templateObject;
|
|
35
|
+
|
|
34
36
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
35
37
|
|
|
38
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
39
|
+
|
|
36
40
|
function CheckoutForm(_ref) {
|
|
37
41
|
let {
|
|
38
42
|
clientSecret,
|
|
@@ -136,10 +140,7 @@ function CheckoutForm(_ref) {
|
|
|
136
140
|
});
|
|
137
141
|
}
|
|
138
142
|
|
|
139
|
-
const Content =
|
|
140
|
-
displayName: "checkout__Content",
|
|
141
|
-
componentId: "sc-1ktna5f-0"
|
|
142
|
-
})(["display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;height:100%;#submit{margin-top:16px;width:100%;}#payment-message{margin-top:16px;color:", ";}"], props => props.theme.palette.error.main);
|
|
143
|
+
const Content = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n\n #submit {\n margin-top: 16px;\n width: 100%;\n }\n\n #payment-message {\n margin-top: 16px;\n color: ", ";\n }\n"])), props => props.theme.palette.error.main);
|
|
143
144
|
|
|
144
145
|
CheckoutForm.propTypes = {
|
|
145
146
|
clientSecret: _propTypes.default.string.isRequired,
|
|
@@ -7,7 +7,7 @@ exports.default = Paying;
|
|
|
7
7
|
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
11
11
|
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
|
|
@@ -27,8 +27,12 @@ var _request = _interopRequireDefault(require("../../contexts/request"));
|
|
|
27
27
|
|
|
28
28
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
29
29
|
|
|
30
|
+
var _templateObject;
|
|
31
|
+
|
|
30
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
33
|
|
|
34
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
35
|
+
|
|
32
36
|
function Paying(_ref) {
|
|
33
37
|
let {
|
|
34
38
|
paymentId,
|
|
@@ -79,7 +83,4 @@ Paying.propTypes = {
|
|
|
79
83
|
onComplete: _propTypes.default.func.isRequired
|
|
80
84
|
};
|
|
81
85
|
|
|
82
|
-
const Content =
|
|
83
|
-
displayName: "paying__Content",
|
|
84
|
-
componentId: "sc-1n02bp2-0"
|
|
85
|
-
})(["display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;height:100%;.status{margin-top:32px;}.status--succeed_icon{background-color:#3ab39d;display:inline-flex;justify-content:center;align-items:center;width:48px;height:48px;border-radius:100%;color:", ";}"], props => props.theme.palette.common.white);
|
|
86
|
+
const Content = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n\n .status {\n margin-top: 32px;\n }\n\n .status--succeed_icon {\n background-color: #3ab39d;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n width: 48px;\n height: 48px;\n border-radius: 100%;\n color: ", ";\n }\n"])), props => props.theme.palette.common.white);
|
package/lib/prepare.js
CHANGED
|
@@ -9,7 +9,7 @@ var _react = require("react");
|
|
|
9
9
|
|
|
10
10
|
var _reactRouterDom = require("react-router-dom");
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
13
13
|
|
|
14
14
|
var _Toast = _interopRequireDefault(require("@arcblock/ux/lib/Toast"));
|
|
15
15
|
|
|
@@ -43,12 +43,16 @@ var _util = require("./util");
|
|
|
43
43
|
|
|
44
44
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
45
45
|
|
|
46
|
+
var _templateObject;
|
|
47
|
+
|
|
46
48
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
47
49
|
|
|
48
50
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
49
51
|
|
|
50
52
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
51
53
|
|
|
54
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
55
|
+
|
|
52
56
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
53
57
|
|
|
54
58
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -72,7 +76,7 @@ function PreparePage() {
|
|
|
72
76
|
const {
|
|
73
77
|
nftId
|
|
74
78
|
} = (0, _reactRouterDom.useParams)();
|
|
75
|
-
const
|
|
79
|
+
const navigate = (0, _reactRouterDom.useNavigate)();
|
|
76
80
|
const {
|
|
77
81
|
create: createRequest,
|
|
78
82
|
api
|
|
@@ -178,7 +182,7 @@ function PreparePage() {
|
|
|
178
182
|
let {
|
|
179
183
|
nftId
|
|
180
184
|
} = _ref;
|
|
181
|
-
|
|
185
|
+
navigate((0, _router.default)(routerPrefix, "/in-progress/".concat(nftId).concat(window.location.search)));
|
|
182
186
|
};
|
|
183
187
|
|
|
184
188
|
const handleCloseAuthDialog = () => {
|
|
@@ -187,11 +191,7 @@ function PreparePage() {
|
|
|
187
191
|
};
|
|
188
192
|
|
|
189
193
|
const clickBack = () => {
|
|
190
|
-
|
|
191
|
-
history.goBack();
|
|
192
|
-
} else {
|
|
193
|
-
history.push("/launch/new".concat(window.location.search));
|
|
194
|
-
}
|
|
194
|
+
navigate(-1);
|
|
195
195
|
};
|
|
196
196
|
|
|
197
197
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
@@ -280,7 +280,4 @@ function PreparePage() {
|
|
|
280
280
|
});
|
|
281
281
|
}
|
|
282
282
|
|
|
283
|
-
const Container =
|
|
284
|
-
displayName: "prepare__Container",
|
|
285
|
-
componentId: "sc-1ddofcz-0"
|
|
286
|
-
})(["display:flex;flex-direction:column;width:100%;height:100%;.page-logo{display:flex;justify-content:center;margin-top:62px;", "{margin-top:48px;}}.inputs{display:flex;align-items:center;flex-direction:column;text-align:center;}.input-item{margin-top:24px;width:90%;max-width:460px;font-size:14px;input,textarea{font-size:14px;}}.botton-container{width:100%;margin:24px auto;max-width:460px;text-align:center;}"], props => props.theme.breakpoints.down('md'));
|
|
283
|
+
const Container = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n\n .page-logo {\n display: flex;\n justify-content: center;\n margin-top: 62px;\n ", " {\n margin-top: 48px;\n }\n }\n\n .inputs {\n display: flex;\n align-items: center;\n flex-direction: column;\n text-align: center;\n }\n .input-item {\n margin-top: 24px;\n width: 90%;\n max-width: 460px;\n font-size: 14px;\n input,\n textarea {\n font-size: 14px;\n }\n }\n .botton-container {\n width: 100%;\n margin: 24px auto;\n max-width: 460px;\n text-align: center;\n }\n"])), props => props.theme.breakpoints.down('md'));
|
package/lib/purchase.js
CHANGED
|
@@ -13,7 +13,7 @@ var _reactUse = require("react-use");
|
|
|
13
13
|
|
|
14
14
|
var _lodash = _interopRequireDefault(require("lodash.get"));
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
17
17
|
|
|
18
18
|
var _jsCookie = _interopRequireDefault(require("js-cookie"));
|
|
19
19
|
|
|
@@ -61,12 +61,16 @@ var _paymentMethod = _interopRequireDefault(require("./components/payment-method
|
|
|
61
61
|
|
|
62
62
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
63
63
|
|
|
64
|
+
var _templateObject;
|
|
65
|
+
|
|
64
66
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
65
67
|
|
|
66
68
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
67
69
|
|
|
68
70
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
69
71
|
|
|
72
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
73
|
+
|
|
70
74
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
71
75
|
|
|
72
76
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -83,7 +87,7 @@ function PurchasePage() {
|
|
|
83
87
|
create: createRequest
|
|
84
88
|
} = (0, _request.default)();
|
|
85
89
|
const query = (0, _query.default)();
|
|
86
|
-
const
|
|
90
|
+
const navigate = (0, _reactRouterDom.useNavigate)();
|
|
87
91
|
const disabledBack = (0, _router.useDisabledBack)();
|
|
88
92
|
const [plan, setPlan] = (0, _react.useState)(null);
|
|
89
93
|
const {
|
|
@@ -179,7 +183,7 @@ function PurchasePage() {
|
|
|
179
183
|
}
|
|
180
184
|
|
|
181
185
|
const url = "/prepare/".concat(nftId).concat(window.location.search);
|
|
182
|
-
|
|
186
|
+
navigate((0, _router.default)(routerPrefix, url));
|
|
183
187
|
};
|
|
184
188
|
|
|
185
189
|
const handleCloseAuthDialog = () => {
|
|
@@ -253,11 +257,7 @@ function PurchasePage() {
|
|
|
253
257
|
};
|
|
254
258
|
|
|
255
259
|
const clickBack = () => {
|
|
256
|
-
|
|
257
|
-
history.goBack();
|
|
258
|
-
} else {
|
|
259
|
-
history.push("/launch/select".concat(window.location.search));
|
|
260
|
-
}
|
|
260
|
+
navigate(-1);
|
|
261
261
|
};
|
|
262
262
|
|
|
263
263
|
return (
|
|
@@ -355,11 +355,7 @@ function PurchasePage() {
|
|
|
355
355
|
);
|
|
356
356
|
}
|
|
357
357
|
|
|
358
|
-
const Container =
|
|
359
|
-
displayName: "purchase__Container",
|
|
360
|
-
componentId: "sc-1knmtel-0"
|
|
361
|
-
})(["display:flex;flex-direction:column;width:100%;height:100%;.select-payment{display:flex;justify-content:center;align-items:center;padding-top:30px;}.select-plan{margin:48px auto 33px;", "{margin:30px auto;}&.small-select-plan-2{max-width:780px;}&.small-select-plan-0,&.small-select-plan-1{max-width:460px;}}.page-body{position:relative;flex:1;margin-top:0;}.page-body-article{position:absolute;left:0;top:0;width:100%;height:100%;overflow-y:auto;}.selector-container{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:24px;margin-top:18px;}.button-container{display:flex;justify-content:center;align-items:center;padding-bottom:15px;padding-top:15px;> button{width:200px;}&.has-shadow{box-shadow:0px -1px 1px 0px rgba(168,180,197,0.12);}}.container-padding{padding-left:24px;padding-right:24px;}"], props => props.theme.breakpoints.down('md'));
|
|
362
|
-
|
|
363
|
-
var _default = (0, _reactRouterDom.withRouter)(PurchasePage);
|
|
358
|
+
const Container = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n\n .select-payment {\n display: flex;\n justify-content: center;\n align-items: center;\n padding-top: 30px;\n }\n\n .select-plan {\n margin: 48px auto 33px;\n\n ", " {\n margin: 30px auto;\n }\n &.small-select-plan-2 {\n max-width: 780px;\n }\n &.small-select-plan-0,\n &.small-select-plan-1 {\n max-width: 460px;\n }\n }\n\n .page-body {\n position: relative;\n flex: 1;\n margin-top: 0;\n }\n\n .page-body-article {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n overflow-y: auto;\n }\n\n .selector-container {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));\n gap: 24px;\n margin-top: 18px;\n }\n\n .button-container {\n display: flex;\n justify-content: center;\n align-items: center;\n padding-bottom: 15px;\n padding-top: 15px;\n > button {\n width: 200px;\n }\n &.has-shadow {\n box-shadow: 0px -1px 1px 0px rgba(168, 180, 197, 0.12);\n }\n }\n\n .container-padding {\n padding-left: 24px;\n padding-right: 24px;\n }\n"])), props => props.theme.breakpoints.down('md'));
|
|
364
359
|
|
|
360
|
+
var _default = PurchasePage;
|
|
365
361
|
exports.default = _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/launcher-workflow",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.2",
|
|
4
4
|
"description": "Purchase components for Launcher UI",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -37,42 +37,39 @@
|
|
|
37
37
|
"react": ">=18.1.0"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@arcblock/did-connect": "^2.
|
|
41
|
-
"@arcblock/icons": "^2.
|
|
42
|
-
"@arcblock/license": "^2.
|
|
43
|
-
"@arcblock/ux": "^2.
|
|
44
|
-
"@blocklet/launcher-layout": "1.
|
|
45
|
-
"@blocklet/launcher-util": "1.
|
|
46
|
-
"@blocklet/launcher-ux": "1.
|
|
47
|
-
"@emotion/react": "^11.
|
|
48
|
-
"@emotion/styled": "^11.
|
|
49
|
-
"@mui/icons-material": "^5.
|
|
50
|
-
"@mui/lab": "^5.0.0-alpha.
|
|
51
|
-
"@mui/material": "^5.
|
|
52
|
-
"@
|
|
53
|
-
"@
|
|
54
|
-
"@stripe/
|
|
55
|
-
"@stripe/stripe-js": "^1.22.0",
|
|
40
|
+
"@arcblock/did-connect": "^2.4.0",
|
|
41
|
+
"@arcblock/icons": "^2.4.0",
|
|
42
|
+
"@arcblock/license": "^2.4.0",
|
|
43
|
+
"@arcblock/ux": "^2.4.0",
|
|
44
|
+
"@blocklet/launcher-layout": "1.8.2",
|
|
45
|
+
"@blocklet/launcher-util": "1.8.2",
|
|
46
|
+
"@blocklet/launcher-ux": "1.8.2",
|
|
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.94",
|
|
51
|
+
"@mui/material": "^5.10.0",
|
|
52
|
+
"@ocap/util": "^1.17.10",
|
|
53
|
+
"@stripe/react-stripe-js": "^1.10.0",
|
|
54
|
+
"@stripe/stripe-js": "^1.35.0",
|
|
56
55
|
"@styled-icons/remix-fill": "^10.18.0",
|
|
57
|
-
"axios": "^0.26.
|
|
56
|
+
"axios": "^0.26.1",
|
|
58
57
|
"flat": "^5.0.2",
|
|
59
58
|
"js-cookie": "^3.0.1",
|
|
60
59
|
"lodash.get": "^4.4.2",
|
|
61
60
|
"lodash.throttle": "^4.1.1",
|
|
62
61
|
"prop-types": "^15.8.1",
|
|
63
|
-
"react-lottie-player": "^1.4.
|
|
64
|
-
"react-router-dom": "^
|
|
65
|
-
"react-use": "^17.
|
|
66
|
-
"styled-components": "^5.3.3",
|
|
62
|
+
"react-lottie-player": "^1.4.3",
|
|
63
|
+
"react-router-dom": "^6.3.0",
|
|
64
|
+
"react-use": "^17.4.0",
|
|
67
65
|
"url-join": "^4.0.1"
|
|
68
66
|
},
|
|
69
67
|
"devDependencies": {
|
|
70
|
-
"@babel/cli": "^7.
|
|
71
|
-
"@babel/core": "^7.
|
|
72
|
-
"@babel/preset-env": "^7.
|
|
73
|
-
"@babel/preset-react": "^7.
|
|
74
|
-
"babel-plugin-inline-react-svg": "^2.0.1"
|
|
75
|
-
"babel-plugin-styled-components": "^1.10.7"
|
|
68
|
+
"@babel/cli": "^7.18.10",
|
|
69
|
+
"@babel/core": "^7.18.10",
|
|
70
|
+
"@babel/preset-env": "^7.18.10",
|
|
71
|
+
"@babel/preset-react": "^7.18.6",
|
|
72
|
+
"babel-plugin-inline-react-svg": "^2.0.1"
|
|
76
73
|
},
|
|
77
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "de0a7f5a5195fd0a33810a8cc1edd266a9658b69"
|
|
78
75
|
}
|