@abtnode/ux 1.16.25-beta-4f765cf3 → 1.16.25-beta-708d1e12
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/blocklet/component/add-component-core.js +6 -4
- package/es/blocklet/component/index.js +7 -2
- package/es/blocklet/component/optional-component-cell.js +11 -15
- package/es/blocklet/router/rule-list.js +1 -0
- package/es/util/index.js +6 -2
- package/lib/blocklet/component/add-component-core.js +6 -4
- package/lib/blocklet/component/index.js +7 -2
- package/lib/blocklet/component/optional-component-cell.js +7 -15
- package/lib/blocklet/router/rule-list.js +1 -0
- package/lib/util/index.js +6 -2
- package/package.json +15 -15
|
@@ -335,10 +335,11 @@ export default function AddComponentCore({
|
|
|
335
335
|
configs = [],
|
|
336
336
|
registryUrl,
|
|
337
337
|
inStore,
|
|
338
|
-
inputUrl
|
|
338
|
+
inputUrl,
|
|
339
|
+
dist
|
|
339
340
|
} = component.current?.meta || {};
|
|
340
341
|
const downloadTokenList = component.current?.downloadTokenList;
|
|
341
|
-
const url = inStore ? getBlockletMetaUrl(registryUrl, bundleDid) : inputUrl;
|
|
342
|
+
const url = inStore ? getBlockletMetaUrl(registryUrl, bundleDid, dist) : inputUrl;
|
|
342
343
|
setLoading(true);
|
|
343
344
|
const installInput = {
|
|
344
345
|
rootDid: blocklet.meta.did,
|
|
@@ -458,9 +459,10 @@ export default function AddComponentCore({
|
|
|
458
459
|
const {
|
|
459
460
|
registryUrl,
|
|
460
461
|
inStore,
|
|
461
|
-
inputUrl
|
|
462
|
+
inputUrl,
|
|
463
|
+
dist
|
|
462
464
|
} = meta;
|
|
463
|
-
const url = inStore ? getBlockletMetaUrl(registryUrl, bundleDid) : inputUrl;
|
|
465
|
+
const url = inStore ? getBlockletMetaUrl(registryUrl, bundleDid, dist) : inputUrl;
|
|
464
466
|
setPurchaseData({
|
|
465
467
|
meta,
|
|
466
468
|
installOpts: {
|
|
@@ -391,8 +391,13 @@ export default function BlockletComponent({
|
|
|
391
391
|
children: t('blocklet.component.noComponent')
|
|
392
392
|
})
|
|
393
393
|
}), !!blocklet.site.rules.length && /*#__PURE__*/_jsx(Box, {
|
|
394
|
-
|
|
395
|
-
|
|
394
|
+
sx: {
|
|
395
|
+
mt: 0,
|
|
396
|
+
'.component-item__indent': {
|
|
397
|
+
pl: 2,
|
|
398
|
+
width: 0
|
|
399
|
+
}
|
|
400
|
+
},
|
|
396
401
|
children: /*#__PURE__*/_jsx(RuleList, {})
|
|
397
402
|
}), !!updateConfirm && /*#__PURE__*/_jsx(Dialog, {
|
|
398
403
|
open: true,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import Avatar from '@mui/material/Avatar';
|
|
2
1
|
import PropTypes from 'prop-types';
|
|
3
2
|
import styled from '@emotion/styled';
|
|
4
3
|
import { Box, Button } from '@mui/material';
|
|
@@ -30,22 +29,15 @@ export default function OptionalComponentCell({
|
|
|
30
29
|
className: "cell",
|
|
31
30
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
32
31
|
className: "component-left",
|
|
33
|
-
children: [/*#__PURE__*/
|
|
32
|
+
children: [/*#__PURE__*/_jsx("img", {
|
|
34
33
|
className: "component-logo",
|
|
34
|
+
src: logoUrl,
|
|
35
|
+
onError: () => `${node.imgPrefix}/blocklet.png`,
|
|
36
|
+
alt: meta.title,
|
|
35
37
|
style: {
|
|
36
|
-
backgroundColor: 'transparent',
|
|
37
38
|
width: size,
|
|
38
|
-
height: size
|
|
39
|
-
|
|
40
|
-
},
|
|
41
|
-
children: [/*#__PURE__*/_jsx("img", {
|
|
42
|
-
src: logoUrl,
|
|
43
|
-
onError: () => `${node.imgPrefix}/blocklet.png`,
|
|
44
|
-
alt: meta.title,
|
|
45
|
-
style: {
|
|
46
|
-
width: size
|
|
47
|
-
}
|
|
48
|
-
}), ";"]
|
|
39
|
+
height: size
|
|
40
|
+
}
|
|
49
41
|
}), /*#__PURE__*/_jsxs("div", {
|
|
50
42
|
className: "component-header",
|
|
51
43
|
children: [/*#__PURE__*/_jsx("div", {
|
|
@@ -116,11 +108,15 @@ const StyledDiv = styled(StyledComponentRow)`
|
|
|
116
108
|
.component-left {
|
|
117
109
|
display: flex;
|
|
118
110
|
flex-direction: row;
|
|
119
|
-
|
|
111
|
+
justify-content: flex-start;
|
|
120
112
|
align-items: center;
|
|
121
113
|
}
|
|
122
114
|
.component-logo {
|
|
115
|
+
width: 40px;
|
|
116
|
+
margin-left: 16px;
|
|
123
117
|
opacity: 0.5;
|
|
118
|
+
border-radius: 10px;
|
|
119
|
+
overflow: hidden;
|
|
124
120
|
}
|
|
125
121
|
.component-header {
|
|
126
122
|
opacity: 0.5;
|
|
@@ -112,6 +112,7 @@ function RuleList({
|
|
|
112
112
|
display: "flex",
|
|
113
113
|
alignItems: "center",
|
|
114
114
|
children: [/*#__PURE__*/_jsx(Box, {
|
|
115
|
+
className: "component-item__indent",
|
|
115
116
|
width: 28
|
|
116
117
|
}), typeof avatar === 'object' ? avatar : /*#__PURE__*/_jsx(Avatar, {
|
|
117
118
|
children: avatar
|
package/es/util/index.js
CHANGED
|
@@ -495,8 +495,12 @@ export function extractStatusUrlFromNextWorkflow(nextWorkflow) {
|
|
|
495
495
|
token: new URL(nextWorkflowURL).searchParams.get('_t_')
|
|
496
496
|
};
|
|
497
497
|
}
|
|
498
|
-
export function getBlockletMetaUrl(storeUrl, did) {
|
|
499
|
-
|
|
498
|
+
export function getBlockletMetaUrl(storeUrl, did, dist) {
|
|
499
|
+
let origin = storeUrl;
|
|
500
|
+
if (!origin && dist?.tarball) {
|
|
501
|
+
origin = new URL(dist.tarball).origin;
|
|
502
|
+
}
|
|
503
|
+
return joinUrl(origin, BLOCKLET_STORE_API_PREFIX, `/blocklets/${did}/blocklet.json`);
|
|
500
504
|
}
|
|
501
505
|
export async function getAsset(chainHost, address) {
|
|
502
506
|
const result = await axios.post(joinUrl(chainHost, '/api/gql/'), JSON.stringify({
|
|
@@ -355,10 +355,11 @@ function AddComponentCore(_ref3) {
|
|
|
355
355
|
configs = [],
|
|
356
356
|
registryUrl,
|
|
357
357
|
inStore,
|
|
358
|
-
inputUrl
|
|
358
|
+
inputUrl,
|
|
359
|
+
dist
|
|
359
360
|
} = ((_component$current2 = component.current) === null || _component$current2 === void 0 ? void 0 : _component$current2.meta) || {};
|
|
360
361
|
const downloadTokenList = (_component$current3 = component.current) === null || _component$current3 === void 0 ? void 0 : _component$current3.downloadTokenList;
|
|
361
|
-
const url = inStore ? (0, _util2.getBlockletMetaUrl)(registryUrl, bundleDid) : inputUrl;
|
|
362
|
+
const url = inStore ? (0, _util2.getBlockletMetaUrl)(registryUrl, bundleDid, dist) : inputUrl;
|
|
362
363
|
setLoading(true);
|
|
363
364
|
const installInput = _objectSpread(_objectSpread(_objectSpread({
|
|
364
365
|
rootDid: blocklet.meta.did,
|
|
@@ -473,9 +474,10 @@ function AddComponentCore(_ref3) {
|
|
|
473
474
|
const {
|
|
474
475
|
registryUrl,
|
|
475
476
|
inStore,
|
|
476
|
-
inputUrl
|
|
477
|
+
inputUrl,
|
|
478
|
+
dist
|
|
477
479
|
} = meta;
|
|
478
|
-
const url = inStore ? (0, _util2.getBlockletMetaUrl)(registryUrl, bundleDid) : inputUrl;
|
|
480
|
+
const url = inStore ? (0, _util2.getBlockletMetaUrl)(registryUrl, bundleDid, dist) : inputUrl;
|
|
479
481
|
setPurchaseData({
|
|
480
482
|
meta,
|
|
481
483
|
installOpts: {
|
|
@@ -419,8 +419,13 @@ function BlockletComponent(_ref) {
|
|
|
419
419
|
children: t('blocklet.component.noComponent')
|
|
420
420
|
})
|
|
421
421
|
}), !!blocklet.site.rules.length && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
422
|
-
|
|
423
|
-
|
|
422
|
+
sx: {
|
|
423
|
+
mt: 0,
|
|
424
|
+
'.component-item__indent': {
|
|
425
|
+
pl: 2,
|
|
426
|
+
width: 0
|
|
427
|
+
}
|
|
428
|
+
},
|
|
424
429
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ruleList.default, {})
|
|
425
430
|
}), !!updateConfirm && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Dialog.default, {
|
|
426
431
|
open: true,
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = OptionalComponentCell;
|
|
7
|
-
var _Avatar = _interopRequireDefault(require("@mui/material/Avatar"));
|
|
8
7
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
8
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
10
9
|
var _material = require("@mui/material");
|
|
@@ -39,22 +38,15 @@ function OptionalComponentCell(_ref) {
|
|
|
39
38
|
className: "cell",
|
|
40
39
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
41
40
|
className: "component-left",
|
|
42
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.
|
|
41
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
43
42
|
className: "component-logo",
|
|
43
|
+
src: logoUrl,
|
|
44
|
+
onError: () => "".concat(node.imgPrefix, "/blocklet.png"),
|
|
45
|
+
alt: meta.title,
|
|
44
46
|
style: {
|
|
45
|
-
backgroundColor: 'transparent',
|
|
46
47
|
width: size,
|
|
47
|
-
height: size
|
|
48
|
-
|
|
49
|
-
},
|
|
50
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
51
|
-
src: logoUrl,
|
|
52
|
-
onError: () => "".concat(node.imgPrefix, "/blocklet.png"),
|
|
53
|
-
alt: meta.title,
|
|
54
|
-
style: {
|
|
55
|
-
width: size
|
|
56
|
-
}
|
|
57
|
-
}), ";"]
|
|
48
|
+
height: size
|
|
49
|
+
}
|
|
58
50
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
59
51
|
className: "component-header",
|
|
60
52
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -109,4 +101,4 @@ OptionalComponentCell.defaultProps = {
|
|
|
109
101
|
logoUrl: '',
|
|
110
102
|
dependencies: []
|
|
111
103
|
};
|
|
112
|
-
const StyledDiv = (0, _styled.default)(_componentCell.StyledComponentRow)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .line {\n opacity: 0.5;\n }\n .cell {\n display: flex;\n width: 100%;\n flex-direction: row;\n align-items: center;\n justify-content: flex-start;\n padding-top: 16px;\n padding-bottom: 16px;\n }\n .component-left {\n display: flex;\n flex-direction: row;\n
|
|
104
|
+
const StyledDiv = (0, _styled.default)(_componentCell.StyledComponentRow)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .line {\n opacity: 0.5;\n }\n .cell {\n display: flex;\n width: 100%;\n flex-direction: row;\n align-items: center;\n justify-content: flex-start;\n padding-top: 16px;\n padding-bottom: 16px;\n }\n .component-left {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n }\n .component-logo {\n width: 40px;\n margin-left: 16px;\n opacity: 0.5;\n border-radius: 10px;\n overflow: hidden;\n }\n .component-header {\n opacity: 0.5;\n margin-left: 12px;\n display: flex;\n align-items: center;\n align-items: flex-end;\n cursor: pointer;\n }\n .component-name {\n opacity: 0.5;\n color: #222;\n font-size: 16px;\n }\n .component-version {\n opacity: 0.8;\n color: #999;\n font-size: 12px;\n margin-left: 4px;\n transform: translateY(-1px);\n }\n"])));
|
|
@@ -123,6 +123,7 @@ function RuleList(_ref2) {
|
|
|
123
123
|
display: "flex",
|
|
124
124
|
alignItems: "center",
|
|
125
125
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
126
|
+
className: "component-item__indent",
|
|
126
127
|
width: 28
|
|
127
128
|
}), typeof avatar === 'object' ? avatar : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Avatar.default, {
|
|
128
129
|
children: avatar
|
package/lib/util/index.js
CHANGED
|
@@ -594,8 +594,12 @@ function extractStatusUrlFromNextWorkflow(nextWorkflow) {
|
|
|
594
594
|
token: new URL(nextWorkflowURL).searchParams.get('_t_')
|
|
595
595
|
};
|
|
596
596
|
}
|
|
597
|
-
function getBlockletMetaUrl(storeUrl, did) {
|
|
598
|
-
|
|
597
|
+
function getBlockletMetaUrl(storeUrl, did, dist) {
|
|
598
|
+
let origin = storeUrl;
|
|
599
|
+
if (!origin && dist !== null && dist !== void 0 && dist.tarball) {
|
|
600
|
+
origin = new URL(dist.tarball).origin;
|
|
601
|
+
}
|
|
602
|
+
return (0, _urlJoin.default)(origin, _constant.BLOCKLET_STORE_API_PREFIX, "/blocklets/".concat(did, "/blocklet.json"));
|
|
599
603
|
}
|
|
600
604
|
async function getAsset(chainHost, address) {
|
|
601
605
|
const result = await _axios.default.post((0, _urlJoin.default)(chainHost, '/api/gql/'), JSON.stringify({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abtnode/ux",
|
|
3
|
-
"version": "1.16.25-beta-
|
|
3
|
+
"version": "1.16.25-beta-708d1e12",
|
|
4
4
|
"description": "UX components shared across abtnode packages",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -28,23 +28,23 @@
|
|
|
28
28
|
"author": "linchen <linchen1987@foxmail.com> (http://github.com/linchen1987)",
|
|
29
29
|
"license": "Apache-2.0",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@abtnode/auth": "1.16.25-beta-
|
|
32
|
-
"@abtnode/constant": "1.16.25-beta-
|
|
33
|
-
"@abtnode/util": "1.16.25-beta-
|
|
31
|
+
"@abtnode/auth": "1.16.25-beta-708d1e12",
|
|
32
|
+
"@abtnode/constant": "1.16.25-beta-708d1e12",
|
|
33
|
+
"@abtnode/util": "1.16.25-beta-708d1e12",
|
|
34
34
|
"@ahooksjs/use-url-state": "^3.5.1",
|
|
35
35
|
"@arcblock/did": "^1.18.113",
|
|
36
|
-
"@arcblock/did-connect": "^2.9.
|
|
36
|
+
"@arcblock/did-connect": "^2.9.50",
|
|
37
37
|
"@arcblock/did-motif": "^1.1.13",
|
|
38
|
-
"@arcblock/icons": "^2.9.
|
|
39
|
-
"@arcblock/nft-display": "2.9.
|
|
40
|
-
"@arcblock/react-hooks": "^2.9.
|
|
41
|
-
"@arcblock/terminal": "^2.9.
|
|
42
|
-
"@arcblock/ux": "^2.9.
|
|
43
|
-
"@blocklet/constant": "1.16.25-beta-
|
|
38
|
+
"@arcblock/icons": "^2.9.50",
|
|
39
|
+
"@arcblock/nft-display": "2.9.50",
|
|
40
|
+
"@arcblock/react-hooks": "^2.9.50",
|
|
41
|
+
"@arcblock/terminal": "^2.9.50",
|
|
42
|
+
"@arcblock/ux": "^2.9.50",
|
|
43
|
+
"@blocklet/constant": "1.16.25-beta-708d1e12",
|
|
44
44
|
"@blocklet/launcher-layout": "2.2.54",
|
|
45
|
-
"@blocklet/list": "^0.12.
|
|
46
|
-
"@blocklet/meta": "1.16.25-beta-
|
|
47
|
-
"@blocklet/ui-react": "^2.9.
|
|
45
|
+
"@blocklet/list": "^0.12.75",
|
|
46
|
+
"@blocklet/meta": "1.16.25-beta-708d1e12",
|
|
47
|
+
"@blocklet/ui-react": "^2.9.50",
|
|
48
48
|
"@blocklet/uploader": "^0.0.74",
|
|
49
49
|
"@emotion/react": "^11.10.4",
|
|
50
50
|
"@emotion/styled": "^11.10.4",
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
"jest": "^29.7.0",
|
|
107
107
|
"jest-environment-jsdom": "^29.7.0"
|
|
108
108
|
},
|
|
109
|
-
"gitHead": "
|
|
109
|
+
"gitHead": "2abdc1c1a5c3c74926052acee6fed3cb99e96714",
|
|
110
110
|
"exports": {
|
|
111
111
|
".": {
|
|
112
112
|
"import": "./es/index.js",
|