@blocklet/launcher-workflow 2.3.3 → 2.3.4

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/prepare.js CHANGED
@@ -56,6 +56,7 @@ function Content({
56
56
  const sessionId = params.get('sessionId');
57
57
  const blockletMetaUrl = getBlockletMetaUrlFromQuery(params);
58
58
  const defaultProductType = params.get('product_type');
59
+ const from = params.get('from');
59
60
  const productTypes = ['on-demand'];
60
61
  if (window.blocklet?.preferences?.dedicatedPricingTableId) {
61
62
  productTypes.push('dedicated');
@@ -110,7 +111,7 @@ function Content({
110
111
  return t('common.serviceError');
111
112
  }
112
113
  const handlePaid = () => {
113
- navigate(`/paid?&sessionId=${launch._id}&blocklet_meta_url=${launch.blockletMetaUrl}`);
114
+ navigate(`/paid?&sessionId=${launch._id}&blocklet_meta_url=${launch.blockletMetaUrl}&from=${from}`);
114
115
  };
115
116
  const handleChangeProductType = (a, newProductType) => {
116
117
  if (!newProductType) {
@@ -177,7 +178,7 @@ function Content({
177
178
  logoPath: x.meta.logo
178
179
  })
179
180
  })),
180
- blockletStoreURL: blocklet.registryUrl,
181
+ blockletStoreURL: from !== 'did-spaces' ?? blocklet.registryUrl,
181
182
  connectApi: connectApi,
182
183
  session: session,
183
184
  t: t,
package/lib/prepare.js CHANGED
@@ -33,7 +33,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
33
33
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
34
34
  const Root = (0, _styled.default)('div')(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n height: 100%;\n padding-top: 0;\n\n @media (max-width: 960px) {\n width: 100%;\n }\n"])));
35
35
  function Content(_ref) {
36
- var _window$blocklet, _window$blocklet2, _window$blocklet3, _window$blocklet4;
36
+ var _window$blocklet, _ref2, _window$blocklet2, _window$blocklet3, _window$blocklet4;
37
37
  let {
38
38
  blocklet
39
39
  } = _ref;
@@ -59,6 +59,7 @@ function Content(_ref) {
59
59
  const sessionId = params.get('sessionId');
60
60
  const blockletMetaUrl = (0, _util.getBlockletMetaUrlFromQuery)(params);
61
61
  const defaultProductType = params.get('product_type');
62
+ const from = params.get('from');
62
63
  const productTypes = ['on-demand'];
63
64
  if ((_window$blocklet = window.blocklet) !== null && _window$blocklet !== void 0 && (_window$blocklet = _window$blocklet.preferences) !== null && _window$blocklet !== void 0 && _window$blocklet.dedicatedPricingTableId) {
64
65
  productTypes.push('dedicated');
@@ -118,7 +119,7 @@ function Content(_ref) {
118
119
  return t('common.serviceError');
119
120
  }
120
121
  const handlePaid = () => {
121
- navigate("/paid?&sessionId=".concat(launch._id, "&blocklet_meta_url=").concat(launch.blockletMetaUrl));
122
+ navigate("/paid?&sessionId=".concat(launch._id, "&blocklet_meta_url=").concat(launch.blockletMetaUrl, "&from=").concat(from));
122
123
  };
123
124
  const handleChangeProductType = (a, newProductType) => {
124
125
  if (!newProductType) {
@@ -185,7 +186,7 @@ function Content(_ref) {
185
186
  logoPath: x.meta.logo
186
187
  })
187
188
  })),
188
- blockletStoreURL: blocklet.registryUrl,
189
+ blockletStoreURL: (_ref2 = from !== 'did-spaces') !== null && _ref2 !== void 0 ? _ref2 : blocklet.registryUrl,
189
190
  connectApi: connectApi,
190
191
  session: session,
191
192
  t: t,
@@ -260,10 +261,10 @@ function Content(_ref) {
260
261
  })
261
262
  });
262
263
  }
263
- function PreparePage(_ref2) {
264
+ function PreparePage(_ref3) {
264
265
  let {
265
266
  blocklet
266
- } = _ref2;
267
+ } = _ref3;
267
268
  const {
268
269
  t
269
270
  } = (0, _locale.useLocaleContext)();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/launcher-workflow",
3
- "version": "2.3.3",
3
+ "version": "2.3.4",
4
4
  "description": "Purchase components for Launcher UI",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -46,9 +46,9 @@
46
46
  "@arcblock/license": "^2.9.64",
47
47
  "@arcblock/react-hooks": "^2.9.64",
48
48
  "@arcblock/ux": "^2.9.64",
49
- "@blocklet/launcher-layout": "2.3.3",
50
- "@blocklet/launcher-util": "2.3.3",
51
- "@blocklet/launcher-ux": "2.3.3",
49
+ "@blocklet/launcher-layout": "2.3.4",
50
+ "@blocklet/launcher-util": "2.3.4",
51
+ "@blocklet/launcher-ux": "2.3.4",
52
52
  "@blocklet/payment": "^1.13.210",
53
53
  "@blocklet/payment-react": "^1.13.210",
54
54
  "@emotion/react": "^11.11.4",
@@ -106,5 +106,5 @@
106
106
  "require": "./lib/locales/index.js"
107
107
  }
108
108
  },
109
- "gitHead": "302f50de7320298341867471eb284862d845545a"
109
+ "gitHead": "75cc65c32522efad2abedf174ab00a4cfa0832c4"
110
110
  }