@abtnode/ux 1.8.61 → 1.8.63-beta-c51e554d
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.
|
@@ -98,10 +98,7 @@ function ComponentConfiguration(_ref) {
|
|
|
98
98
|
minHeight: 'auto'
|
|
99
99
|
}
|
|
100
100
|
},
|
|
101
|
-
children: isRoot ||
|
|
102
|
-
blocklet: blocklet,
|
|
103
|
-
ancestors: ancestors
|
|
104
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
101
|
+
children: isRoot || isDynamic ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
105
102
|
mt: 1,
|
|
106
103
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Tabs.default, {
|
|
107
104
|
tabs: tabs,
|
|
@@ -109,6 +106,9 @@ function ComponentConfiguration(_ref) {
|
|
|
109
106
|
onChange: onTabChange,
|
|
110
107
|
scrollButtons: "auto"
|
|
111
108
|
}), tabConfig.component]
|
|
109
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_environment.default, {
|
|
110
|
+
blocklet: blocklet,
|
|
111
|
+
ancestors: ancestors
|
|
112
112
|
})
|
|
113
113
|
})];
|
|
114
114
|
}
|
|
@@ -135,7 +135,8 @@ function ComponentItem(_ref) {
|
|
|
135
135
|
if (depth <= 1 && deletingComponents.includes(blocklet.meta.did)) {
|
|
136
136
|
status = 'deleting';
|
|
137
137
|
}
|
|
138
|
-
const mountPoint = "/".concat(ancestors.
|
|
138
|
+
const mountPoint = "/".concat(ancestors.slice(1) // ignore mountPoint of root component
|
|
139
|
+
.map(x => x.mountPoint || '/').join('/'), "/").concat(blocklet.mountPoint || '/').replace(/\/+/g, '/');
|
|
139
140
|
|
|
140
141
|
// hide root's status and only display specific status
|
|
141
142
|
const showStatus = !!ancestors.length && ['downloading', 'deleting', 'starting'].includes(status);
|
|
@@ -39,7 +39,9 @@ function ComponentSetting(_ref) {
|
|
|
39
39
|
const {
|
|
40
40
|
api
|
|
41
41
|
} = (0, _node.useNodeContext)();
|
|
42
|
-
const
|
|
42
|
+
const isRoot = !ancestors.length;
|
|
43
|
+
const isDynamic = blocklet.dynamic;
|
|
44
|
+
const rootDid = isRoot ? blocklet.meta.did : ancestors.map(x => x.meta.did)[0];
|
|
43
45
|
const [loading, setLoading] = (0, _react.useState)('');
|
|
44
46
|
const isDev = (0, _util.isBlockletDev)(blocklet);
|
|
45
47
|
const disabled = isDev || loading || !hasPermission;
|
|
@@ -70,12 +72,15 @@ function ComponentSetting(_ref) {
|
|
|
70
72
|
const onSubmitMountPoint = async value => {
|
|
71
73
|
setLoading(true);
|
|
72
74
|
try {
|
|
75
|
+
const input = {
|
|
76
|
+
rootDid,
|
|
77
|
+
mountPoint: value
|
|
78
|
+
};
|
|
79
|
+
if (!isRoot) {
|
|
80
|
+
input.did = blocklet.meta.did;
|
|
81
|
+
}
|
|
73
82
|
await api.updateComponentMountPoint({
|
|
74
|
-
input
|
|
75
|
-
rootDid,
|
|
76
|
-
did: blocklet.meta.did,
|
|
77
|
-
mountPoint: value
|
|
78
|
-
}
|
|
83
|
+
input
|
|
79
84
|
});
|
|
80
85
|
setLoading(false);
|
|
81
86
|
} catch (err) {
|
|
@@ -90,7 +95,7 @@ function ComponentSetting(_ref) {
|
|
|
90
95
|
}, rest), {}, {
|
|
91
96
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
92
97
|
mt: 3,
|
|
93
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_formTextInput.default, {
|
|
98
|
+
children: [isDynamic && /*#__PURE__*/(0, _jsxRuntime.jsx)(_formTextInput.default, {
|
|
94
99
|
label: t('common.title'),
|
|
95
100
|
style: {
|
|
96
101
|
marginTop: -24
|
|
@@ -27,8 +27,10 @@ function ConfigRoutingRule(_ref) {
|
|
|
27
27
|
t
|
|
28
28
|
} = (0, _context.useLocaleContext)();
|
|
29
29
|
const redirectCodesMap = {
|
|
30
|
+
301: t('common.redirectPermanently'),
|
|
30
31
|
302: t('common.redirectTemporary'),
|
|
31
|
-
|
|
32
|
+
307: t('common.redirectTemporary'),
|
|
33
|
+
308: t('common.redirectPermanently')
|
|
32
34
|
};
|
|
33
35
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
34
36
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_TextField.default, {
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.8.
|
|
6
|
+
"version": "1.8.63-beta-c51e554d",
|
|
7
7
|
"description": "UX components shared across abtnode packages",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -21,18 +21,18 @@
|
|
|
21
21
|
"author": "linchen <linchen1987@foxmail.com> (http://github.com/linchen1987)",
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@abtnode/auth": "1.8.
|
|
25
|
-
"@abtnode/constant": "1.8.
|
|
26
|
-
"@abtnode/util": "1.8.
|
|
24
|
+
"@abtnode/auth": "1.8.63-beta-c51e554d",
|
|
25
|
+
"@abtnode/constant": "1.8.63-beta-c51e554d",
|
|
26
|
+
"@abtnode/util": "1.8.63-beta-c51e554d",
|
|
27
27
|
"@arcblock/did-connect": "^2.4.65",
|
|
28
28
|
"@arcblock/did-motif": "^1.1.10",
|
|
29
29
|
"@arcblock/icons": "^2.4.65",
|
|
30
30
|
"@arcblock/terminal": "^2.4.65",
|
|
31
31
|
"@arcblock/ux": "^2.4.65",
|
|
32
|
-
"@blocklet/constant": "1.8.
|
|
32
|
+
"@blocklet/constant": "1.8.63-beta-c51e554d",
|
|
33
33
|
"@blocklet/launcher-layout": "^1.9.38",
|
|
34
34
|
"@blocklet/list": "^0.10.47",
|
|
35
|
-
"@blocklet/meta": "1.8.
|
|
35
|
+
"@blocklet/meta": "1.8.63-beta-c51e554d",
|
|
36
36
|
"@blocklet/ui-react": "^2.4.65",
|
|
37
37
|
"@emotion/react": "^11.10.4",
|
|
38
38
|
"@emotion/styled": "^11.10.4",
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"@babel/preset-react": "^7.18.6",
|
|
87
87
|
"babel-plugin-inline-react-svg": "^1.1.2"
|
|
88
88
|
},
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "9913ed7968dfab63d6549201a5a98f9819fcfac6"
|
|
90
90
|
}
|