@blocklet/ui-react 3.1.5 → 3.1.6
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/Footer/index.d.ts +1 -1
- package/lib/Footer/index.js +12 -12
- package/lib/Header/index.js +1 -1
- package/package.json +6 -6
- package/src/Footer/index.jsx +1 -1
- package/src/Header/index.tsx +3 -3
package/lib/Footer/index.d.ts
CHANGED
package/lib/Footer/index.js
CHANGED
|
@@ -9,11 +9,11 @@ import L from "@arcblock/ux/lib/hooks/use-blocklet-logo";
|
|
|
9
9
|
import j from "lodash/omit";
|
|
10
10
|
import C from "./internal-footer.js";
|
|
11
11
|
import { mapRecursive as E } from "../utils.js";
|
|
12
|
-
import { formatBlockletInfo as I, getLocalizedNavigation as
|
|
12
|
+
import { formatBlockletInfo as I, getLocalizedNavigation as l } from "../blocklets.js";
|
|
13
13
|
import { BlockletMetaProps as P } from "../types.js";
|
|
14
14
|
import z from "../libs/with-hide-when-embed.js";
|
|
15
|
-
function d({ meta: o = {}, theme: t =
|
|
16
|
-
const { locale:
|
|
15
|
+
function d({ meta: o = {}, theme: t = {}, ...n }) {
|
|
16
|
+
const { locale: i } = N() || {}, c = x(), r = s(() => {
|
|
17
17
|
const e = Object.assign({}, window.blocklet, o);
|
|
18
18
|
try {
|
|
19
19
|
return I(e);
|
|
@@ -28,18 +28,18 @@ function d({ meta: o = {}, theme: t = null, ...n }) {
|
|
|
28
28
|
});
|
|
29
29
|
if (!r.appName)
|
|
30
30
|
return null;
|
|
31
|
-
const { appName: b, appDescription: k, description:
|
|
32
|
-
footerNav:
|
|
33
|
-
socialMedia:
|
|
34
|
-
links:
|
|
31
|
+
const { appName: b, appDescription: k, description: g, copyright: u } = r, h = m.palette.background.default, a = {
|
|
32
|
+
footerNav: l(r?.navigation?.footer, i) || [],
|
|
33
|
+
socialMedia: l(r?.navigation?.social, i) || [],
|
|
34
|
+
links: l(r?.navigation?.bottom, i) || []
|
|
35
35
|
}, y = {
|
|
36
36
|
brand: {
|
|
37
37
|
name: b,
|
|
38
|
-
description: k ||
|
|
38
|
+
description: k || g,
|
|
39
39
|
logo: f
|
|
40
40
|
},
|
|
41
41
|
navigation: E(
|
|
42
|
-
|
|
42
|
+
a.footerNav,
|
|
43
43
|
(e) => ({
|
|
44
44
|
...e,
|
|
45
45
|
label: e.title,
|
|
@@ -47,9 +47,9 @@ function d({ meta: o = {}, theme: t = null, ...n }) {
|
|
|
47
47
|
}),
|
|
48
48
|
"items"
|
|
49
49
|
),
|
|
50
|
-
copyright:
|
|
51
|
-
socialMedia:
|
|
52
|
-
links:
|
|
50
|
+
copyright: u,
|
|
51
|
+
socialMedia: a.socialMedia,
|
|
52
|
+
links: a.links.map((e) => ({ ...e, label: e.title }))
|
|
53
53
|
};
|
|
54
54
|
return /* @__PURE__ */ p(B, { theme: m, children: /* @__PURE__ */ p(D, { ...y, ...j(n, ["bordered"]), $bordered: n?.bordered, $bgcolor: h }) });
|
|
55
55
|
}
|
package/lib/Header/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/ui-react",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.6",
|
|
4
4
|
"description": "Some useful front-end web components that can be used in Blocklets.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@abtnode/constant": "^1.16.47",
|
|
37
37
|
"@abtnode/util": "^1.16.47",
|
|
38
|
-
"@arcblock/bridge": "3.1.
|
|
39
|
-
"@arcblock/icons": "3.1.
|
|
40
|
-
"@arcblock/react-hooks": "3.1.
|
|
38
|
+
"@arcblock/bridge": "3.1.6",
|
|
39
|
+
"@arcblock/icons": "3.1.6",
|
|
40
|
+
"@arcblock/react-hooks": "3.1.6",
|
|
41
41
|
"@arcblock/ws": "^1.21.2",
|
|
42
42
|
"@blocklet/constant": "^1.16.47",
|
|
43
43
|
"@blocklet/did-space-react": "^1.1.14",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"access": "public"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
|
-
"@arcblock/did-connect-react": "3.1.
|
|
87
|
+
"@arcblock/did-connect-react": "3.1.6",
|
|
88
88
|
"@types/dompurify": "^3.2.0",
|
|
89
89
|
"@types/ua-parser-js": "^0.7.39",
|
|
90
90
|
"@types/validator": "^13.15.2",
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"jest": "^29.7.0",
|
|
93
93
|
"unbuild": "^2.0.0"
|
|
94
94
|
},
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "d3267421c4d35038b226d34edc0e7bc943c5c926"
|
|
96
96
|
}
|
package/src/Footer/index.jsx
CHANGED
|
@@ -16,7 +16,7 @@ import withHideWhenEmbed from '../libs/with-hide-when-embed';
|
|
|
16
16
|
/**
|
|
17
17
|
* 专门用于 (composable) blocklet 的 Footer 组件, 基于 blocklet meta 中的数据渲染
|
|
18
18
|
*/
|
|
19
|
-
function Footer({ meta = {}, theme: themeOverrides =
|
|
19
|
+
function Footer({ meta = {}, theme: themeOverrides = {}, ...rest }) {
|
|
20
20
|
const { locale } = useLocaleContext() || {};
|
|
21
21
|
const parentTheme = useTheme();
|
|
22
22
|
const formattedBlocklet = useMemo(() => {
|
package/src/Header/index.tsx
CHANGED
|
@@ -10,7 +10,7 @@ import { translate } from '@arcblock/ux/lib/Locale/util';
|
|
|
10
10
|
import useBlockletLogo from '@arcblock/ux/lib/hooks/use-blocklet-logo';
|
|
11
11
|
import omit from 'lodash/omit';
|
|
12
12
|
import isFinite from 'lodash/isFinite';
|
|
13
|
-
import type { BoxProps, Breakpoint } from '@mui/material';
|
|
13
|
+
import type { BoxProps, Breakpoint, Theme } from '@mui/material';
|
|
14
14
|
import clsx from 'clsx';
|
|
15
15
|
|
|
16
16
|
import Icon from '../Icon';
|
|
@@ -107,7 +107,7 @@ function Header({
|
|
|
107
107
|
showRole: true,
|
|
108
108
|
},
|
|
109
109
|
homeLink = publicPath,
|
|
110
|
-
theme: themeOverrides =
|
|
110
|
+
theme: themeOverrides = {},
|
|
111
111
|
hideNavMenu = false,
|
|
112
112
|
showDomainWarningDialog = true,
|
|
113
113
|
...rest
|
|
@@ -127,7 +127,7 @@ function Header({
|
|
|
127
127
|
return blocklet;
|
|
128
128
|
}
|
|
129
129
|
}, [meta]);
|
|
130
|
-
const mergeTheme = useMemo(() => deepmerge(parentTheme, themeOverrides), [parentTheme, themeOverrides]);
|
|
130
|
+
const mergeTheme = useMemo(() => deepmerge(parentTheme, themeOverrides), [parentTheme, themeOverrides]) as Theme;
|
|
131
131
|
const appLogo = useBlockletLogo({
|
|
132
132
|
meta,
|
|
133
133
|
theme: themeOverrides,
|