@blocklet/ui-react 3.0.6 → 3.0.8
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/@types/index.d.ts +204 -3
- package/lib/BlockletStudio/index.d.ts +27 -26
- package/lib/BlockletStudio/index.js +66 -66
- package/lib/ComponentInstaller/index.d.ts +15 -15
- package/lib/ComponentInstaller/installer-item.d.ts +10 -10
- package/lib/ComponentInstaller/locales.d.ts +2 -2
- package/lib/ComponentInstaller/use-component-installed.d.ts +2 -2
- package/lib/ComponentManager/components/add-component.d.ts +16 -13
- package/lib/ComponentManager/components/add-component.js +29 -29
- package/lib/ComponentManager/components/check-component.d.ts +2 -2
- package/lib/ComponentManager/components/publish-component.d.ts +10 -7
- package/lib/ComponentManager/components/publish-component.js +19 -19
- package/lib/ComponentManager/components/resource-dialog.d.ts +13 -11
- package/lib/ComponentManager/components/resource-dialog.js +1 -1
- package/lib/ComponentManager/index.d.ts +3 -4
- package/lib/ComponentManager/libs/locales.d.ts +14 -19
- package/lib/Dashboard/index.d.ts +16 -13
- package/lib/Footer/brand.d.ts +8 -8
- package/lib/Footer/copyright.d.ts +7 -7
- package/lib/Footer/index.d.ts +2 -2
- package/lib/Footer/internal-footer.d.ts +26 -21
- package/lib/Footer/internal-footer.js +1 -1
- package/lib/Footer/layout/plain.d.ts +15 -12
- package/lib/Footer/layout/row.d.ts +7 -7
- package/lib/Footer/layout/standard.d.ts +17 -14
- package/lib/Footer/layout/standard.js +1 -1
- package/lib/Footer/links.d.ts +15 -12
- package/lib/Footer/links.js +3 -3
- package/lib/Footer/social-media.d.ts +8 -8
- package/lib/Header/index.d.ts +23 -13
- package/lib/Header/index.js +17 -17
- package/lib/Icon/index.d.ts +9 -7
- package/lib/Icon/index.js +6 -6
- package/lib/Notifications/Snackbar.d.ts +16 -8
- package/lib/Notifications/Snackbar.js +1 -1
- package/lib/Notifications/hooks/use-title.d.ts +48 -9
- package/lib/Notifications/hooks/use-title.js +9 -9
- package/lib/Notifications/hooks/use-width.d.ts +2 -2
- package/lib/Notifications/utils.d.ts +69 -9
- package/lib/UserCenter/components/config-inviter.d.ts +4 -4
- package/lib/UserCenter/components/config-profile.d.ts +5 -5
- package/lib/UserCenter/components/danger-zone.d.ts +1 -2
- package/lib/UserCenter/components/editable-field.d.ts +34 -30
- package/lib/UserCenter/components/editable-field.js +12 -12
- package/lib/UserCenter/components/nft.d.ts +4 -4
- package/lib/UserCenter/components/notification.d.ts +5 -5
- package/lib/UserCenter/components/notification.js +5 -5
- package/lib/UserCenter/components/passport.d.ts +5 -5
- package/lib/UserCenter/components/privacy.d.ts +11 -5
- package/lib/UserCenter/components/settings.d.ts +10 -8
- package/lib/UserCenter/components/status-dialog/date-picker.d.ts +10 -9
- package/lib/UserCenter/components/status-dialog/date-picker.js +17 -10
- package/lib/UserCenter/components/status-dialog/index.d.ts +12 -9
- package/lib/UserCenter/components/status-dialog/index.js +8 -1
- package/lib/UserCenter/components/status-selector/duration-menu.d.ts +7 -7
- package/lib/UserCenter/components/status-selector/index.d.ts +9 -8
- package/lib/UserCenter/components/status-selector/index.js +5 -5
- package/lib/UserCenter/components/status-selector/menu-item.d.ts +24 -9
- package/lib/UserCenter/components/status-selector/menu-item.js +11 -6
- package/lib/UserCenter/components/storage/action.d.ts +9 -7
- package/lib/UserCenter/components/storage/connected.d.ts +5 -4
- package/lib/UserCenter/components/storage/delete.d.ts +6 -5
- package/lib/UserCenter/components/storage/disconnect.d.ts +2 -2
- package/lib/UserCenter/components/storage/index.d.ts +2 -2
- package/lib/UserCenter/components/storage/preview-nft.d.ts +5 -5
- package/lib/UserCenter/components/third-party-login/index.d.ts +4 -4
- package/lib/UserCenter/components/third-party-login/index.js +23 -29
- package/lib/UserCenter/components/third-party-login/third-party-item.d.ts +13 -4
- package/lib/UserCenter/components/user-center.d.ts +16 -15
- package/lib/UserCenter/components/user-info/address.d.ts +16 -7
- package/lib/UserCenter/components/user-info/index.d.ts +4 -5
- package/lib/UserCenter/components/user-info/link-preview-input.d.ts +5 -6
- package/lib/UserCenter/components/user-info/metadata.d.ts +10 -7
- package/lib/UserCenter/components/user-info/switch-role.d.ts +7 -6
- package/lib/UserCenter/components/user-info/timezone-select.d.ts +8 -7
- package/lib/UserCenter/components/user-info/user-basic-info.d.ts +13 -12
- package/lib/UserCenter/components/user-info/user-info-item.d.ts +11 -6
- package/lib/UserCenter/components/user-info/user-info-item.js +1 -1
- package/lib/UserCenter/components/user-info/user-info.d.ts +6 -6
- package/lib/UserCenter/components/user-info/user-status.d.ts +9 -9
- package/lib/UserCenter/components/user-info/user-status.js +17 -17
- package/lib/UserCenter/components/user-info/utils.d.ts +33 -15
- package/lib/UserCenter/components/webhook-item.d.ts +2 -10
- package/lib/UserCenter/index.d.ts +1 -2
- package/lib/UserCenter/libs/locales.d.ts +345 -513
- package/lib/UserCenter/libs/utils.d.ts +4 -3
- package/lib/UserSessions/components/user-session-info.d.ts +5 -5
- package/lib/UserSessions/components/user-sessions.d.ts +20 -8
- package/lib/UserSessions/index.d.ts +1 -2
- package/lib/UserSessions/libs/locales.d.ts +60 -88
- package/lib/UserSessions/libs/utils.d.ts +2 -3
- package/lib/blocklets.d.ts +9 -10
- package/lib/common/domain-warning.d.ts +7 -7
- package/lib/common/header-addons.d.ts +9 -9
- package/lib/common/link-blocker.d.ts +6 -3
- package/lib/common/notification-addon.d.ts +6 -6
- package/lib/common/overridable-theme-provider.d.ts +10 -7
- package/lib/common/wallet-hidden-topbar.d.ts +1 -2
- package/lib/common/ws.d.ts +3 -4
- package/lib/contexts/config-user-space.d.ts +27 -7
- package/lib/hooks/use-mobile.d.ts +3 -3
- package/lib/index.d.ts +10 -12
- package/lib/libs/client.d.ts +2 -3
- package/lib/libs/constant.d.ts +1 -2
- package/lib/libs/spaces.d.ts +2 -3
- package/lib/libs/with-hide-when-embed.d.ts +2 -3
- package/lib/types.d.ts +31 -32
- package/lib/utils.d.ts +10 -11
- package/package.json +8 -6
- package/src/BlockletStudio/index.tsx +13 -13
- package/src/ComponentManager/components/add-component.tsx +6 -6
- package/src/ComponentManager/components/publish-component.tsx +2 -2
- package/src/ComponentManager/components/resource-dialog.tsx +1 -1
- package/src/Footer/internal-footer.jsx +1 -1
- package/src/Footer/layout/standard.jsx +1 -1
- package/src/Footer/links.jsx +1 -1
- package/src/Header/index.tsx +2 -2
- package/src/Icon/index.tsx +2 -2
- package/src/Notifications/Snackbar.tsx +2 -2
- package/src/Notifications/hooks/use-title.tsx +1 -1
- package/src/UserCenter/components/editable-field.tsx +6 -6
- package/src/UserCenter/components/notification.tsx +2 -2
- package/src/UserCenter/components/status-dialog/date-picker.tsx +8 -1
- package/src/UserCenter/components/status-dialog/index.tsx +8 -1
- package/src/UserCenter/components/status-selector/index.tsx +1 -1
- package/src/UserCenter/components/status-selector/menu-item.tsx +6 -1
- package/src/UserCenter/components/third-party-login/index.tsx +0 -2
- package/src/UserCenter/components/user-center.tsx +1 -1
- package/src/UserCenter/components/user-info/link-preview-input.tsx +2 -2
- package/src/UserCenter/components/user-info/user-info-item.tsx +1 -1
- package/src/UserCenter/components/user-info/user-info.tsx +1 -1
- package/src/UserCenter/components/user-info/user-status.tsx +2 -2
- package/lib/UserCenter/components/storage/icons/empty-spaces-nft.svg.d.ts +0 -3
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
componentDid:
|
|
4
|
-
grantedRoles
|
|
5
|
-
onClose:
|
|
6
|
-
render:
|
|
7
|
-
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
export default function PublishComponent({ componentDid, grantedRoles, onClose, render, }: {
|
|
3
|
+
componentDid: string;
|
|
4
|
+
grantedRoles?: string[];
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
render?: ({ onClick, loading }: {
|
|
7
|
+
onClick: () => void;
|
|
8
|
+
loading: boolean;
|
|
9
|
+
}) => ReactElement<any>;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,33 +2,33 @@ import { jsxs as x, Fragment as b, jsx as u } from "react/jsx-runtime";
|
|
|
2
2
|
import { use as w } from "react";
|
|
3
3
|
import L from "@arcblock/ux/lib/Button";
|
|
4
4
|
import { useLocaleContext as C } from "@arcblock/ux/lib/Locale/context";
|
|
5
|
-
import { BLOCKLET_SERVICE_PATH_PREFIX as
|
|
6
|
-
import { useMemoizedFn as
|
|
7
|
-
import { translate as
|
|
8
|
-
import { SessionContext as
|
|
5
|
+
import { BLOCKLET_SERVICE_PATH_PREFIX as v } from "@arcblock/ux/lib/Util/constant";
|
|
6
|
+
import { useMemoizedFn as t, useReactive as D } from "ahooks";
|
|
7
|
+
import { translate as E } from "@arcblock/ux/lib/Locale/util";
|
|
8
|
+
import { SessionContext as P } from "@arcblock/did-connect/lib/Session";
|
|
9
9
|
import c from "@arcblock/ux/lib/Toast";
|
|
10
|
-
import
|
|
11
|
-
import { translations as
|
|
10
|
+
import F from "./resource-dialog.js";
|
|
11
|
+
import { translations as S } from "../libs/locales.js";
|
|
12
12
|
function H({
|
|
13
13
|
componentDid: s,
|
|
14
|
-
grantedRoles:
|
|
15
|
-
onClose:
|
|
16
|
-
render: a
|
|
14
|
+
grantedRoles: i = void 0,
|
|
15
|
+
onClose: n,
|
|
16
|
+
render: a = void 0
|
|
17
17
|
}) {
|
|
18
|
-
const { session: l } = w(
|
|
18
|
+
const { session: l } = w(P), { locale: f } = C(), e = t((r, h = {}) => E(S, r, f, "en", h)), o = D({
|
|
19
19
|
showDialog: !1,
|
|
20
20
|
loading: !1
|
|
21
|
-
}),
|
|
22
|
-
o.showDialog = !1,
|
|
23
|
-
}), g =
|
|
21
|
+
}), d = `${v}/embed/resources/${s}/publish?mode=dialog`, p = t(() => {
|
|
22
|
+
o.showDialog = !1, n == null || n();
|
|
23
|
+
}), g = t(() => {
|
|
24
24
|
o.loading = !1;
|
|
25
|
-
}), m =
|
|
26
|
-
var
|
|
25
|
+
}), m = t(() => {
|
|
26
|
+
var r;
|
|
27
27
|
if (!l.user) {
|
|
28
28
|
c.warning(e("needLogin"));
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
|
-
if (
|
|
31
|
+
if (i && i.length > 0 && !(i != null && i.includes((r = l.user) == null ? void 0 : r.role))) {
|
|
32
32
|
c.warning(e("noPermission"));
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
@@ -50,11 +50,11 @@ function H({
|
|
|
50
50
|
"button"
|
|
51
51
|
),
|
|
52
52
|
o.showDialog && /* @__PURE__ */ u(
|
|
53
|
-
|
|
53
|
+
F,
|
|
54
54
|
{
|
|
55
|
-
src:
|
|
55
|
+
src: d,
|
|
56
56
|
open: !0,
|
|
57
|
-
onClose:
|
|
57
|
+
onClose: p,
|
|
58
58
|
onLoad: g,
|
|
59
59
|
componentDid: s,
|
|
60
60
|
loading: o.loading
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
open?: boolean
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
onClose?: (
|
|
9
|
-
onComplete?: (
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
declare const _default: import('react').ForwardRefExoticComponent<{
|
|
2
|
+
src: string;
|
|
3
|
+
componentDid: string;
|
|
4
|
+
open?: boolean;
|
|
5
|
+
loading?: boolean;
|
|
6
|
+
storeUrl?: string;
|
|
7
|
+
onLoad?: () => void;
|
|
8
|
+
onClose?: () => void;
|
|
9
|
+
onComplete?: () => void;
|
|
10
|
+
} & import('react').RefAttributes<{
|
|
11
|
+
selectBlocklet: (blockletMeta: any) => void;
|
|
12
|
+
}>>;
|
|
13
|
+
export default _default;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export { f as AddComponent, n as CheckComponent, t as PublishComponent };
|
|
1
|
+
export { default as PublishComponent } from './components/publish-component';
|
|
2
|
+
export { default as AddComponent } from './components/add-component';
|
|
3
|
+
export { default as CheckComponent } from './components/check-component';
|
|
@@ -1,19 +1,14 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export { noPermission_1 as noPermission };
|
|
16
|
-
let needLogin_1: string;
|
|
17
|
-
export { needLogin_1 as needLogin };
|
|
18
|
-
}
|
|
19
|
-
}
|
|
1
|
+
export declare const translations: {
|
|
2
|
+
zh: {
|
|
3
|
+
importResource: string;
|
|
4
|
+
exportResource: string;
|
|
5
|
+
noPermission: string;
|
|
6
|
+
needLogin: string;
|
|
7
|
+
};
|
|
8
|
+
en: {
|
|
9
|
+
importResource: string;
|
|
10
|
+
exportResource: string;
|
|
11
|
+
noPermission: string;
|
|
12
|
+
needLogin: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
package/lib/Dashboard/index.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { BlockletMetaProps
|
|
2
|
-
import { default as
|
|
3
|
-
export
|
|
4
|
-
|
|
1
|
+
import { BlockletMetaProps, SessionManagerProps } from '../types';
|
|
2
|
+
import { default as PropTypes } from 'prop-types';
|
|
3
|
+
export default Dashboard;
|
|
4
|
+
/**
|
|
5
|
+
* 专门用于 (composable) blocklet 的 Dashboard 组件, 解析 blocklet meta 中 section 为 dashboard 的 navigation 数据, 渲染一个 UX Dashboard
|
|
6
|
+
*/
|
|
7
|
+
declare function Dashboard({ meta, fallbackUrl, invalidPathFallback, headerAddons, sessionManagerProps, links, showDomainWarningDialog, ...rest }: {
|
|
5
8
|
[x: string]: any;
|
|
6
9
|
meta?: {} | undefined;
|
|
7
10
|
fallbackUrl?: any;
|
|
@@ -13,15 +16,15 @@ declare function K({ meta: l, fallbackUrl: c, invalidPathFallback: d, headerAddo
|
|
|
13
16
|
} | undefined;
|
|
14
17
|
links?: any[] | undefined;
|
|
15
18
|
showDomainWarningDialog?: boolean | undefined;
|
|
16
|
-
}): import(
|
|
17
|
-
declare namespace
|
|
19
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
20
|
+
declare namespace Dashboard {
|
|
18
21
|
namespace propTypes {
|
|
19
|
-
export {
|
|
20
|
-
export let fallbackUrl:
|
|
21
|
-
export let invalidPathFallback:
|
|
22
|
-
export let headerAddons:
|
|
23
|
-
export {
|
|
24
|
-
export let links:
|
|
25
|
-
export let showDomainWarningDialog:
|
|
22
|
+
export { BlockletMetaProps as meta };
|
|
23
|
+
export let fallbackUrl: PropTypes.Requireable<string>;
|
|
24
|
+
export let invalidPathFallback: PropTypes.Requireable<(...args: any[]) => any>;
|
|
25
|
+
export let headerAddons: PropTypes.Requireable<NonNullable<((...args: any[]) => any) | PropTypes.ReactNodeLike>>;
|
|
26
|
+
export { SessionManagerProps as sessionManagerProps };
|
|
27
|
+
export let links: PropTypes.Requireable<NonNullable<any[] | ((...args: any[]) => any) | null | undefined>>;
|
|
28
|
+
export let showDomainWarningDialog: PropTypes.Requireable<boolean>;
|
|
26
29
|
}
|
|
27
30
|
}
|
package/lib/Footer/brand.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
|
|
3
|
-
declare function p({ name: e, logo: t, description: r, ...a }: {
|
|
1
|
+
import { default as PropTypes } from 'prop-types';
|
|
2
|
+
declare function Brand({ name, logo, description, ...rest }: {
|
|
4
3
|
[x: string]: any;
|
|
5
4
|
name?: string | undefined;
|
|
6
5
|
logo?: string | undefined;
|
|
7
6
|
description?: string | undefined;
|
|
8
|
-
}): import(
|
|
9
|
-
declare namespace
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
+
declare namespace Brand {
|
|
10
9
|
namespace propTypes {
|
|
11
|
-
let name:
|
|
12
|
-
let logo:
|
|
13
|
-
let description:
|
|
10
|
+
let name: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
11
|
+
let logo: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
12
|
+
let description: PropTypes.Requireable<string>;
|
|
14
13
|
}
|
|
15
14
|
}
|
|
15
|
+
export default Brand;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
|
|
3
|
-
declare function n({ owner: t, year: e, ...o }: {
|
|
1
|
+
import { default as PropTypes } from 'prop-types';
|
|
2
|
+
declare function Copyright({ owner, year, ...rest }: {
|
|
4
3
|
[x: string]: any;
|
|
5
4
|
owner?: string | undefined;
|
|
6
5
|
year?: string | undefined;
|
|
7
|
-
}): import(
|
|
8
|
-
declare namespace
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare namespace Copyright {
|
|
9
8
|
namespace propTypes {
|
|
10
|
-
let owner:
|
|
11
|
-
let year:
|
|
9
|
+
let owner: PropTypes.Requireable<string>;
|
|
10
|
+
let year: PropTypes.Requireable<string>;
|
|
12
11
|
}
|
|
13
12
|
}
|
|
13
|
+
export default Copyright;
|
package/lib/Footer/index.d.ts
CHANGED
|
@@ -1,29 +1,34 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { default as PropTypes } from 'prop-types';
|
|
2
|
+
export default InternalFooter;
|
|
3
|
+
/**
|
|
4
|
+
* 通用的内部 footer 组件, 定义并渲染常见的几种 footer 元素: brand/navigation/social medial 等
|
|
5
|
+
*/
|
|
6
|
+
declare function InternalFooter({ ...props }: {
|
|
7
|
+
[x: string]: any;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare namespace InternalFooter {
|
|
5
10
|
namespace propTypes {
|
|
6
|
-
let brand:
|
|
7
|
-
name:
|
|
8
|
-
description:
|
|
9
|
-
logo:
|
|
11
|
+
let brand: PropTypes.Requireable<PropTypes.InferProps<{
|
|
12
|
+
name: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
13
|
+
description: PropTypes.Requireable<string>;
|
|
14
|
+
logo: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
10
15
|
}>>;
|
|
11
|
-
let navigation:
|
|
12
|
-
label:
|
|
13
|
-
link:
|
|
16
|
+
let navigation: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
17
|
+
label: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
18
|
+
link: PropTypes.Requireable<string>;
|
|
14
19
|
}> | null | undefined)[]>;
|
|
15
|
-
let socialMedia:
|
|
16
|
-
icon:
|
|
17
|
-
link:
|
|
20
|
+
let socialMedia: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
21
|
+
icon: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
22
|
+
link: PropTypes.Requireable<string>;
|
|
18
23
|
}> | null | undefined)[]>;
|
|
19
|
-
let copyright:
|
|
20
|
-
owner:
|
|
21
|
-
year:
|
|
24
|
+
let copyright: PropTypes.Requireable<PropTypes.InferProps<{
|
|
25
|
+
owner: PropTypes.Requireable<string>;
|
|
26
|
+
year: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
22
27
|
}>>;
|
|
23
|
-
let links:
|
|
24
|
-
label:
|
|
25
|
-
link:
|
|
28
|
+
let links: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
29
|
+
label: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
30
|
+
link: PropTypes.Requireable<string>;
|
|
26
31
|
}> | null | undefined)[]>;
|
|
27
|
-
let layout:
|
|
32
|
+
let layout: PropTypes.Requireable<string>;
|
|
28
33
|
}
|
|
29
34
|
}
|
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
export
|
|
3
|
-
|
|
1
|
+
import { default as PropTypes } from 'prop-types';
|
|
2
|
+
export default PlainLayout;
|
|
3
|
+
/**
|
|
4
|
+
* footer plain layout
|
|
5
|
+
*/
|
|
6
|
+
declare function PlainLayout({ elements, data, ...rest }: {
|
|
4
7
|
[x: string]: any;
|
|
5
8
|
elements: any;
|
|
6
9
|
data: any;
|
|
7
|
-
}): import(
|
|
8
|
-
declare namespace
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare namespace PlainLayout {
|
|
9
12
|
namespace propTypes {
|
|
10
|
-
let elements:
|
|
11
|
-
brand:
|
|
12
|
-
navigation:
|
|
13
|
-
socialMedia:
|
|
14
|
-
copyright:
|
|
15
|
-
links:
|
|
13
|
+
let elements: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
14
|
+
brand: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
|
15
|
+
navigation: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
|
16
|
+
socialMedia: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
|
17
|
+
copyright: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
|
18
|
+
links: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
|
16
19
|
}>>>;
|
|
17
|
-
let data:
|
|
20
|
+
let data: PropTypes.Validator<object>;
|
|
18
21
|
}
|
|
19
22
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
|
|
3
|
-
declare function m({ children: o, autoCenter: r, ...t }: {
|
|
1
|
+
import { default as PropTypes } from 'prop-types';
|
|
2
|
+
declare function Row({ children, autoCenter, ...rest }: {
|
|
4
3
|
[x: string]: any;
|
|
5
4
|
children?: null | undefined;
|
|
6
5
|
autoCenter?: boolean | undefined;
|
|
7
|
-
}): import(
|
|
8
|
-
declare namespace
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
+
declare namespace Row {
|
|
9
8
|
namespace propTypes {
|
|
10
|
-
let children:
|
|
11
|
-
let autoCenter:
|
|
9
|
+
let children: PropTypes.Requireable<any>;
|
|
10
|
+
let autoCenter: PropTypes.Requireable<boolean>;
|
|
12
11
|
}
|
|
13
12
|
}
|
|
13
|
+
export default Row;
|
|
@@ -1,21 +1,24 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
export
|
|
3
|
-
|
|
1
|
+
import { default as PropTypes } from 'prop-types';
|
|
2
|
+
export default StandardLayout;
|
|
3
|
+
/**
|
|
4
|
+
* footer standard layout
|
|
5
|
+
*/
|
|
6
|
+
declare function StandardLayout({ elements, data, className, ...rest }: {
|
|
4
7
|
[x: string]: any;
|
|
5
8
|
elements: any;
|
|
6
9
|
data: any;
|
|
7
|
-
className
|
|
8
|
-
}): import(
|
|
9
|
-
declare namespace
|
|
10
|
+
className?: string | undefined;
|
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare namespace StandardLayout {
|
|
10
13
|
namespace propTypes {
|
|
11
|
-
let elements:
|
|
12
|
-
brand:
|
|
13
|
-
navigation:
|
|
14
|
-
socialMedia:
|
|
15
|
-
copyright:
|
|
16
|
-
links:
|
|
14
|
+
let elements: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
15
|
+
brand: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
|
16
|
+
navigation: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
|
17
|
+
socialMedia: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
|
18
|
+
copyright: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
|
19
|
+
links: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
|
17
20
|
}>>>;
|
|
18
|
-
let data:
|
|
19
|
-
let className:
|
|
21
|
+
let data: PropTypes.Validator<object>;
|
|
22
|
+
let className: PropTypes.Requireable<string>;
|
|
20
23
|
}
|
|
21
24
|
}
|
|
@@ -4,7 +4,7 @@ import x from "clsx";
|
|
|
4
4
|
import { Container as t, Box as r } from "@mui/material";
|
|
5
5
|
import { styled as f } from "@arcblock/ux/lib/Theme";
|
|
6
6
|
import h from "./row.js";
|
|
7
|
-
function g({ elements: e, data: s, className: p, ...c }) {
|
|
7
|
+
function g({ elements: e, data: s, className: p = "", ...c }) {
|
|
8
8
|
var l;
|
|
9
9
|
const d = !!((l = s.navigation) != null && l.length);
|
|
10
10
|
let a = null;
|
package/lib/Footer/links.d.ts
CHANGED
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { default as PropTypes } from 'prop-types';
|
|
2
|
+
/**
|
|
3
|
+
* footer 中的 links (支持分组, 最多支持 2 级)
|
|
4
|
+
*/
|
|
5
|
+
declare function Links({ links, flowLayout, columns, ...rest }: {
|
|
4
6
|
[x: string]: any;
|
|
5
7
|
links?: any[] | undefined;
|
|
6
8
|
flowLayout?: boolean | undefined;
|
|
7
9
|
columns: any;
|
|
8
|
-
}): import(
|
|
9
|
-
declare namespace
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
11
|
+
declare namespace Links {
|
|
10
12
|
namespace propTypes {
|
|
11
|
-
let links:
|
|
12
|
-
label:
|
|
13
|
-
link:
|
|
14
|
-
render:
|
|
15
|
-
props:
|
|
13
|
+
let links: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
14
|
+
label: PropTypes.Requireable<string>;
|
|
15
|
+
link: PropTypes.Requireable<string>;
|
|
16
|
+
render: PropTypes.Requireable<(...args: any[]) => any>;
|
|
17
|
+
props: PropTypes.Requireable<object>;
|
|
16
18
|
}> | null | undefined)[]>;
|
|
17
|
-
let flowLayout:
|
|
18
|
-
let columns:
|
|
19
|
+
let flowLayout: PropTypes.Requireable<boolean>;
|
|
20
|
+
let columns: PropTypes.Validator<number>;
|
|
19
21
|
}
|
|
20
22
|
}
|
|
23
|
+
export default Links;
|
package/lib/Footer/links.js
CHANGED
|
@@ -77,7 +77,7 @@ function F({ links: e = [], flowLayout: d = !1, columns: u, ...k }) {
|
|
|
77
77
|
);
|
|
78
78
|
}) : null, [e, d, x, g]);
|
|
79
79
|
return e != null && e.length ? /* @__PURE__ */ n(
|
|
80
|
-
|
|
80
|
+
R,
|
|
81
81
|
{
|
|
82
82
|
...k,
|
|
83
83
|
className: c(k.className, {
|
|
@@ -101,9 +101,9 @@ F.propTypes = {
|
|
|
101
101
|
// 流动布局, 简单的从左到右排列
|
|
102
102
|
flowLayout: l.bool,
|
|
103
103
|
// 列布局
|
|
104
|
-
columns: l.number
|
|
104
|
+
columns: l.number.isRequired
|
|
105
105
|
};
|
|
106
|
-
const
|
|
106
|
+
const R = z("div")`
|
|
107
107
|
overflow: hidden;
|
|
108
108
|
color: ${({ theme: e }) => e.palette.text.secondary};
|
|
109
109
|
.footer-links-inner {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
|
|
3
|
-
declare function p({ items: r, ...t }: {
|
|
1
|
+
import { default as PropTypes } from 'prop-types';
|
|
2
|
+
declare function SocialMedia({ items, ...rest }: {
|
|
4
3
|
[x: string]: any;
|
|
5
4
|
items?: null | undefined;
|
|
6
|
-
}): import(
|
|
7
|
-
declare namespace
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
6
|
+
declare namespace SocialMedia {
|
|
8
7
|
namespace propTypes {
|
|
9
|
-
let items:
|
|
10
|
-
icon:
|
|
11
|
-
link:
|
|
8
|
+
let items: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
9
|
+
icon: PropTypes.Requireable<string>;
|
|
10
|
+
link: PropTypes.Requireable<string>;
|
|
12
11
|
}> | null | undefined)[]>;
|
|
13
12
|
}
|
|
14
13
|
}
|
|
14
|
+
export default SocialMedia;
|
package/lib/Header/index.d.ts
CHANGED
|
@@ -1,13 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
import { BoxProps, Breakpoint } from '@mui/material';
|
|
3
|
+
import { BlockletMetaProps, SessionManagerProps } from '../@types';
|
|
4
|
+
type HeaderProps = {
|
|
5
|
+
meta?: BlockletMetaProps;
|
|
6
|
+
addons?: Function | React.ReactNode;
|
|
7
|
+
sessionManagerProps?: SessionManagerProps;
|
|
8
|
+
homeLink?: string | ((brandContent: React.ReactNode) => JSX.Element | null);
|
|
9
|
+
theme?: object;
|
|
10
|
+
hideNavMenu?: boolean;
|
|
11
|
+
bordered?: boolean;
|
|
12
|
+
logo?: React.ReactNode;
|
|
13
|
+
brand?: React.ReactNode;
|
|
14
|
+
brandAddon?: React.ReactNode;
|
|
15
|
+
description?: React.ReactNode;
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
prepend?: React.ReactNode;
|
|
18
|
+
align?: 'left' | 'right';
|
|
19
|
+
maxWidth?: false | Breakpoint;
|
|
20
|
+
showDomainWarningDialog?: boolean;
|
|
21
|
+
};
|
|
22
|
+
declare const _default: import('react').ComponentType<HeaderProps & Omit<BoxProps, keyof HeaderProps>>;
|
|
23
|
+
export default _default;
|