@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,8 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
user:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
1
|
+
import { BoxProps } from '@mui/material';
|
|
2
|
+
import { User, UserCenterTab } from '../../@types';
|
|
3
|
+
export default function Settings({ user, settings, onSave, isMobile, ...rest }: {
|
|
4
|
+
user: User;
|
|
5
|
+
onSave: (type: 'privacy' | 'profile') => void;
|
|
6
|
+
settings: {
|
|
7
|
+
userCenterTabs: UserCenterTab[];
|
|
8
|
+
};
|
|
9
|
+
isMobile: boolean;
|
|
10
|
+
} & BoxProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
value:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
interface DateTimeInputProps {
|
|
2
|
+
value: Date;
|
|
3
|
+
onChange: (value: Date) => void;
|
|
4
|
+
error?: boolean;
|
|
5
|
+
helperText?: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
timezone?: string;
|
|
8
|
+
}
|
|
9
|
+
export default function DateTimeInput({ value, onChange, error, helperText, label, timezone, }: DateTimeInputProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -1,14 +1,21 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as
|
|
1
|
+
import { jsxs as d, jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as p } from "react";
|
|
3
3
|
import { FormControl as f, TextField as h, FormHelperText as C } from "@mui/material";
|
|
4
|
-
import
|
|
4
|
+
import e from "dayjs";
|
|
5
5
|
import { useCreation as Y } from "ahooks";
|
|
6
|
-
function T({
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
function T({
|
|
7
|
+
value: o,
|
|
8
|
+
onChange: a,
|
|
9
|
+
error: n = void 0,
|
|
10
|
+
helperText: i = void 0,
|
|
11
|
+
label: m = void 0,
|
|
12
|
+
timezone: r = void 0
|
|
13
|
+
}) {
|
|
14
|
+
const l = p(null), s = e().format("YYYY-MM-DDTHH:mm"), c = Y(() => {
|
|
15
|
+
let t = e();
|
|
16
|
+
return o && (t = r ? e(o).tz(r) : e(o)), t.format("YYYY-MM-DD HH:mm");
|
|
17
|
+
}, [o, r]);
|
|
18
|
+
return /* @__PURE__ */ d(f, { fullWidth: !0, error: n, children: [
|
|
12
19
|
/* @__PURE__ */ u(
|
|
13
20
|
h,
|
|
14
21
|
{
|
|
@@ -19,7 +26,7 @@ function T({ value: e, onChange: a, error: o, helperText: i, label: m, timezone:
|
|
|
19
26
|
a(new Date(t.target.value));
|
|
20
27
|
},
|
|
21
28
|
label: m,
|
|
22
|
-
error:
|
|
29
|
+
error: n,
|
|
23
30
|
onClick: () => {
|
|
24
31
|
var t;
|
|
25
32
|
(t = l.current) == null || t.showPicker();
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { UserMetadata } from '../../../@types';
|
|
2
|
+
import { StatusItem } from '../status-selector/menu-item';
|
|
3
|
+
interface StatusDialogProps {
|
|
4
|
+
open: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
data: Array<StatusItem>;
|
|
7
|
+
selected: UserMetadata['status'];
|
|
8
|
+
onSelect: (v: UserMetadata['status']) => void;
|
|
9
|
+
timezone?: string;
|
|
10
|
+
}
|
|
11
|
+
export default function StatusDialog({ open, onClose, data, selected, onSelect, timezone, }: StatusDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -29,7 +29,14 @@ const O = {
|
|
|
29
29
|
alignItems: "center"
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
|
-
function go({
|
|
32
|
+
function go({
|
|
33
|
+
open: j,
|
|
34
|
+
onClose: u,
|
|
35
|
+
data: m,
|
|
36
|
+
selected: i,
|
|
37
|
+
onSelect: h,
|
|
38
|
+
timezone: F = void 0
|
|
39
|
+
}) {
|
|
33
40
|
var I, k;
|
|
34
41
|
const { locale: L } = $(), t = _((o, e = {}) => Z(oo, o, L, "en", e)), [l, S] = s((i == null ? void 0 : i.value) || ""), [a, y] = s((i == null ? void 0 : i.duration) || ""), [d, x] = s(((I = i == null ? void 0 : i.dateRange) == null ? void 0 : I[1]) || ""), [N, c] = s(!1);
|
|
35
42
|
V(() => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
data:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export
|
|
1
|
+
import { BaseStatusProps, StatusItem } from './menu-item';
|
|
2
|
+
interface StatusDurationMenuProps extends BaseStatusProps {
|
|
3
|
+
data: StatusItem;
|
|
4
|
+
}
|
|
5
|
+
declare function DurationMenu({ data, selected, onSelect }: StatusDurationMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export default DurationMenu;
|
|
7
|
+
export declare const MenuDiv: import('@emotion/styled').StyledComponent<import('@mui/material').MenuProps & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
anchorEl
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { PopoverProps } from '@mui/material';
|
|
2
|
+
import { BaseStatusProps, StatusItem } from './menu-item';
|
|
3
|
+
interface StatusSelectorProps extends BaseStatusProps {
|
|
4
|
+
data: Array<StatusItem>;
|
|
5
|
+
open: boolean;
|
|
6
|
+
anchorEl?: PopoverProps['anchorEl'];
|
|
7
|
+
}
|
|
8
|
+
declare function StatusSelector({ data, open, onSelect, anchorEl, selected }: StatusSelectorProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default StatusSelector;
|
|
@@ -5,10 +5,10 @@ import { useMemoizedFn as S } from "ahooks";
|
|
|
5
5
|
import { useLocaleContext as x } from "@arcblock/ux/lib/Locale/context";
|
|
6
6
|
import h from "./duration-menu.js";
|
|
7
7
|
import M, { StyledMenu as y } from "./menu-item.js";
|
|
8
|
-
import { translations as
|
|
9
|
-
function L({ data: e, open: a, onSelect:
|
|
10
|
-
const { locale: s } = x(), l = S((o, c = {}) => d(
|
|
11
|
-
|
|
8
|
+
import { translations as v } from "../../libs/locales.js";
|
|
9
|
+
function L({ data: e, open: a, onSelect: i, anchorEl: u = void 0, selected: r }) {
|
|
10
|
+
const { locale: s } = x(), l = S((o, c = {}) => d(v, o, s, "en", c)), n = (o) => {
|
|
11
|
+
i(o);
|
|
12
12
|
}, p = () => e.map((o) => o.children ? /* @__PURE__ */ t(h, { data: o, selected: r, onSelect: n }, o.id) : /* @__PURE__ */ t(
|
|
13
13
|
M,
|
|
14
14
|
{
|
|
@@ -19,7 +19,7 @@ function L({ data: e, open: a, onSelect: u, anchorEl: i, selected: r }) {
|
|
|
19
19
|
},
|
|
20
20
|
o.id
|
|
21
21
|
));
|
|
22
|
-
return /* @__PURE__ */ m(y, { open: a, onClose: () => n(), anchorEl:
|
|
22
|
+
return /* @__PURE__ */ m(y, { open: a, onClose: () => n(), anchorEl: u, children: [
|
|
23
23
|
/* @__PURE__ */ t(
|
|
24
24
|
f,
|
|
25
25
|
{
|
|
@@ -1,9 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { SvgIconProps } from '@mui/material';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
import { UserMetadata } from '../../../@types';
|
|
4
|
+
interface StatusMenuItemProps {
|
|
5
|
+
icon?: React.FC<SvgIconProps>;
|
|
6
|
+
selected?: boolean;
|
|
7
|
+
onClick: (e: React.MouseEvent<HTMLElement>) => void;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export default function StatusMenuItem({ icon, selected, onClick, children, }: StatusMenuItemProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const StyledMenu: import('@emotion/styled').StyledComponent<import('@mui/material').MenuProps & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
|
|
12
|
+
export interface StatusItem {
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
icon?: React.FC<SvgIconProps>;
|
|
16
|
+
duration?: string;
|
|
17
|
+
durationName?: string;
|
|
18
|
+
children?: Array<StatusItem>;
|
|
19
|
+
}
|
|
20
|
+
export interface BaseStatusProps {
|
|
21
|
+
selected: UserMetadata['status'];
|
|
22
|
+
onSelect: (v: UserMetadata['status']) => void;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import { jsxs as i, jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { styled as
|
|
3
|
-
import
|
|
4
|
-
function c({
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
import { styled as d, Menu as n, MenuItem as l, ListItemIcon as p } from "@mui/material";
|
|
3
|
+
import a from "react";
|
|
4
|
+
function c({
|
|
5
|
+
icon: e = void 0,
|
|
6
|
+
selected: t = void 0,
|
|
7
|
+
onClick: o,
|
|
8
|
+
children: r
|
|
9
|
+
}) {
|
|
10
|
+
return /* @__PURE__ */ i(l, { onClick: o, className: t ? "selected" : "", children: [
|
|
11
|
+
e && /* @__PURE__ */ s(p, { style: { minWidth: "24px" }, children: a.createElement(e, {
|
|
7
12
|
style: { fontSize: "16px", width: "16px", height: "16px" }
|
|
8
13
|
}) }),
|
|
9
14
|
r
|
|
10
15
|
] });
|
|
11
16
|
}
|
|
12
|
-
const h = n
|
|
17
|
+
const h = d(n)`
|
|
13
18
|
.MuiPaper-root {
|
|
14
19
|
box-shadow: 0px 6px 24px rgba(0, 0, 0, 0.15);
|
|
15
20
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { DIDSpaceGateway, DIDSpaceStatus } from '@blocklet/did-space-react';
|
|
2
|
+
import { Session } from '../../../@types';
|
|
3
|
+
declare function Action({ session, spaceGateway, spaceStatus, refresh, }: {
|
|
4
|
+
session: Session;
|
|
5
|
+
spaceGateway: DIDSpaceGateway;
|
|
6
|
+
spaceStatus: DIDSpaceStatus;
|
|
7
|
+
refresh: Function;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default Action;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
declare function
|
|
3
|
-
spaceGateway:
|
|
4
|
-
}): import(
|
|
1
|
+
import { SpaceGateway } from '../../../contexts/config-user-space';
|
|
2
|
+
declare function Connected({ spaceGateway }: {
|
|
3
|
+
spaceGateway: SpaceGateway | undefined;
|
|
4
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export default Connected;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
declare function
|
|
3
|
-
spaceGateway:
|
|
4
|
-
onDeleteSpace:
|
|
5
|
-
}): import(
|
|
1
|
+
import { SpaceGateway } from '../../../contexts/config-user-space';
|
|
2
|
+
declare function SpaceDelete({ spaceGateway, onDeleteSpace, }: {
|
|
3
|
+
spaceGateway: SpaceGateway;
|
|
4
|
+
onDeleteSpace: (spaceGateway: SpaceGateway) => Promise<void>;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export default SpaceDelete;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
declare function Disconnect(): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export default Disconnect;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
declare function DidSpace(): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export default DidSpace;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
declare function PreviewSpaceNft({ src, alt }: {
|
|
2
|
+
src: string;
|
|
3
|
+
alt: string;
|
|
4
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export default PreviewSpaceNft;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
user:
|
|
4
|
-
}): import(
|
|
1
|
+
import { User } from '../../../@types';
|
|
2
|
+
export default function ThirdPartyLogin({ user }: {
|
|
3
|
+
user: User;
|
|
4
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -63,43 +63,37 @@ function q({ user: r }) {
|
|
|
63
63
|
display: "grid",
|
|
64
64
|
gridTemplateColumns: "1fr min-content"
|
|
65
65
|
},
|
|
66
|
-
children: !h.length && !g.length && !y.length ? (
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
children: !h.length && !g.length && !y.length ? /* @__PURE__ */ s(
|
|
67
|
+
T,
|
|
68
|
+
{
|
|
69
|
+
behavior: "only-new",
|
|
70
|
+
action: "connect",
|
|
71
|
+
createMode: "connect",
|
|
72
|
+
createButtonText: "Add Passkey",
|
|
73
|
+
onSuccess: a,
|
|
74
|
+
onError: a,
|
|
75
|
+
dense: !0
|
|
76
|
+
}
|
|
77
|
+
) : /* @__PURE__ */ L(O, { children: [
|
|
78
|
+
h.map((e) => /* @__PURE__ */ s(u, { item: e }, e == null ? void 0 : e.provider)),
|
|
79
|
+
g.map((e) => /* @__PURE__ */ s(u, { item: e }, e.id)),
|
|
80
|
+
y.map((e) => /* @__PURE__ */ s(u, { item: e }, e.id)),
|
|
81
|
+
A.wallet || A.arcSphere ? null : /* @__PURE__ */ s(
|
|
69
82
|
T,
|
|
70
83
|
{
|
|
71
84
|
behavior: "only-new",
|
|
72
85
|
action: "connect",
|
|
73
86
|
createMode: "connect",
|
|
74
|
-
createButtonText: "Add Passkey",
|
|
87
|
+
createButtonText: "Add New Passkey",
|
|
75
88
|
onSuccess: a,
|
|
76
89
|
onError: a,
|
|
77
|
-
dense: !0
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
g.map((e) => /* @__PURE__ */ s(u, { item: e }, e.id)),
|
|
83
|
-
y.map((e) => /* @__PURE__ */ s(u, { item: e }, e.id)),
|
|
84
|
-
A.wallet || A.arcSphere ? null : (
|
|
85
|
-
// @ts-expect-error 忽略 ref 类型
|
|
86
|
-
/* @__PURE__ */ s(
|
|
87
|
-
T,
|
|
88
|
-
{
|
|
89
|
-
behavior: "only-new",
|
|
90
|
-
action: "connect",
|
|
91
|
-
createMode: "connect",
|
|
92
|
-
createButtonText: "Add New Passkey",
|
|
93
|
-
onSuccess: a,
|
|
94
|
-
onError: a,
|
|
95
|
-
dense: !0,
|
|
96
|
-
sx: {
|
|
97
|
-
px: 1.5,
|
|
98
|
-
py: 1,
|
|
99
|
-
gap: 0.75
|
|
100
|
-
}
|
|
90
|
+
dense: !0,
|
|
91
|
+
sx: {
|
|
92
|
+
px: 1.5,
|
|
93
|
+
py: 1,
|
|
94
|
+
gap: 0.75
|
|
101
95
|
}
|
|
102
|
-
|
|
96
|
+
}
|
|
103
97
|
)
|
|
104
98
|
] })
|
|
105
99
|
}
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
item:
|
|
4
|
-
|
|
1
|
+
import { OAuthAccount } from '../../../@types';
|
|
2
|
+
export default function ThirdPartyItem({ item, }: {
|
|
3
|
+
item: {
|
|
4
|
+
provider: string;
|
|
5
|
+
did: string;
|
|
6
|
+
pk: string;
|
|
7
|
+
userInfo?: OAuthAccount['userInfo'];
|
|
8
|
+
id: string;
|
|
9
|
+
_bind?: boolean;
|
|
10
|
+
_rawProvider?: string;
|
|
11
|
+
_mainProvider?: boolean;
|
|
12
|
+
};
|
|
13
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
children: any;
|
|
4
|
-
notLoginContent?:
|
|
5
|
-
currentTab:
|
|
6
|
-
contentProps?:
|
|
7
|
-
disableAutoRedirect?: boolean
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { BoxProps } from '@mui/material';
|
|
2
|
+
export default function UserCenter({ children, notLoginContent, currentTab, contentProps, disableAutoRedirect, hideFooter, headerProps, footerProps, userDid, stickySidebar, embed, onlyProfile, }: {
|
|
3
|
+
readonly children: any;
|
|
4
|
+
readonly notLoginContent?: any;
|
|
5
|
+
readonly currentTab: string;
|
|
6
|
+
readonly contentProps?: BoxProps;
|
|
7
|
+
readonly disableAutoRedirect?: boolean;
|
|
8
|
+
readonly autoPopupSetting?: boolean;
|
|
9
|
+
readonly hideFooter?: boolean;
|
|
10
|
+
readonly headerProps?: any;
|
|
11
|
+
readonly footerProps?: any;
|
|
12
|
+
readonly userDid?: string;
|
|
13
|
+
readonly stickySidebar?: boolean;
|
|
14
|
+
readonly embed?: boolean;
|
|
15
|
+
readonly onlyProfile?: boolean;
|
|
16
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,7 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { UserAddress } from '../../../@types';
|
|
2
|
+
interface AddressErrors {
|
|
3
|
+
country?: string;
|
|
4
|
+
province?: string;
|
|
5
|
+
city?: string;
|
|
6
|
+
line1?: string;
|
|
7
|
+
line2?: string;
|
|
8
|
+
postalCode?: string;
|
|
9
|
+
}
|
|
10
|
+
export default function AddressEditor({ address, errors, handleChange, defaultCountry, }: {
|
|
11
|
+
address: UserAddress;
|
|
12
|
+
errors: AddressErrors;
|
|
13
|
+
handleChange: (field: keyof UserAddress, value: string) => void;
|
|
14
|
+
defaultCountry: string;
|
|
15
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export { m as SwitchRole, f as UserBasicInfo, s as UserInfo, t as UserInfoItem };
|
|
1
|
+
export { default as UserBasicInfo } from './user-basic-info';
|
|
2
|
+
export { default as UserInfoItem } from './user-info-item';
|
|
3
|
+
export { default as UserInfo } from './user-info';
|
|
4
|
+
export { default as SwitchRole } from './switch-role';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
export {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
links
|
|
5
|
-
|
|
6
|
-
}): import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
|
|
1
|
+
export declare function LinkPreviewInput({ editable, links, onChange, }: {
|
|
2
|
+
editable?: boolean;
|
|
3
|
+
links?: string[];
|
|
4
|
+
onChange: (links: string[]) => void;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { User, UserAddress, UserMetadata } from '../../../@types';
|
|
2
|
+
export default function UserMetadataComponent({ isMyself, user, onSave, isMobile, }: {
|
|
3
|
+
isMobile: boolean;
|
|
4
|
+
isMyself: boolean;
|
|
5
|
+
user: User;
|
|
6
|
+
onSave: (v: {
|
|
7
|
+
metadata: UserMetadata;
|
|
8
|
+
address: UserAddress;
|
|
9
|
+
}) => void;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
declare
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { User } from '../../../@types';
|
|
2
|
+
declare function SwitchRole({ user, switchPassport }: {
|
|
3
|
+
user: User;
|
|
4
|
+
switchPassport: () => void;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare const _default: import('react').MemoExoticComponent<typeof SwitchRole>;
|
|
7
|
+
export default _default;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
value:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
interface TimezoneSelectProps {
|
|
2
|
+
value: string;
|
|
3
|
+
onChange: (value: string) => void;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
mode?: 'drawer' | 'self';
|
|
6
|
+
}
|
|
7
|
+
export declare function TimezoneSelect({ value, onChange, disabled, mode }: TimezoneSelectProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
user:
|
|
5
|
-
isMyself?: boolean
|
|
6
|
-
showFullDid?: boolean
|
|
7
|
-
switchPassport:
|
|
8
|
-
switchProfile:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { BoxProps } from '@mui/material';
|
|
2
|
+
import { User } from '../../../@types';
|
|
3
|
+
export default function UserBasicInfo({ user, isMyself, showFullDid, switchPassport, switchProfile, isMobile, onlyProfile, refreshProfile, ...rest }: {
|
|
4
|
+
user: User;
|
|
5
|
+
isMyself?: boolean;
|
|
6
|
+
showFullDid?: boolean;
|
|
7
|
+
switchPassport: () => void;
|
|
8
|
+
switchProfile: () => void;
|
|
9
|
+
size?: number;
|
|
10
|
+
isMobile?: boolean;
|
|
11
|
+
onlyProfile?: boolean;
|
|
12
|
+
refreshProfile: () => void;
|
|
13
|
+
} & BoxProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { BoxProps } from '@mui/material';
|
|
2
|
+
type TUserInfoItemProps = {
|
|
3
|
+
data: {
|
|
4
|
+
icon: any;
|
|
5
|
+
title: string;
|
|
6
|
+
content: any;
|
|
7
|
+
};
|
|
8
|
+
verified?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export default function UserInfoItem({ data, verified, ...rest }: TUserInfoItemProps & BoxProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as t, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { Box as n, Typography as o } from "@mui/material";
|
|
3
3
|
import { Verified as l } from "@mui/icons-material";
|
|
4
|
-
function x({ data: e, verified: s, ...r }) {
|
|
4
|
+
function x({ data: e, verified: s = !1, ...r }) {
|
|
5
5
|
return /* @__PURE__ */ t(
|
|
6
6
|
n,
|
|
7
7
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
user:
|
|
5
|
-
isMySelf?: boolean
|
|
6
|
-
}): import(
|
|
1
|
+
import { BoxProps } from '@mui/material';
|
|
2
|
+
import { User } from '../../../@types';
|
|
3
|
+
export default function UserInfo({ user, isMySelf, ...rest }: {
|
|
4
|
+
user: User;
|
|
5
|
+
isMySelf?: boolean;
|
|
6
|
+
} & BoxProps): import("react/jsx-runtime").JSX.Element;
|