@arcblock/ux 3.0.7 → 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/ActionButton/index.js +8 -8
- package/lib/ActivityIndicator/index.js +7 -6
- package/lib/Address/compact-text.js +3 -2
- package/lib/Address/did-address.js +3 -3
- package/lib/Address/index.js +2 -2
- package/lib/Address/responsive-did-address.js +3 -3
- package/lib/Alert/index.js +7 -7
- package/lib/AnimationWaiter/dark-animation.json.js +27 -0
- package/lib/AnimationWaiter/default-animation.json.js +29 -0
- package/lib/AnimationWaiter/index.js +10 -10
- package/lib/Async/index.js +4 -4
- package/lib/Avatar/etherscan-blockies.js +15 -15
- package/lib/Avatar/index.js +5 -5
- package/lib/Badge/index.js +4 -4
- package/lib/Blocklet/blocklet.js +10 -10
- package/lib/Blocklet/index.js +5 -6
- package/lib/Blocklet/utils.js +1 -1
- package/lib/BlockletContext/index.js +1 -1
- package/lib/BlockletNFT/index.js +18 -18
- package/lib/BlockletV2/blocklet.js +36 -35
- package/lib/BlockletV2/components/icon-text.js +1 -1
- package/lib/BlockletV2/components/tooltip-icon.js +1 -1
- package/lib/BlockletV2/index.js +7 -8
- package/lib/BlockletV2/utils.js +1 -1
- package/lib/Button/index.js +1 -1
- package/lib/Button/wrap.js +2 -2
- package/lib/ButtonGroup/index.js +1 -1
- package/lib/Center/index.js +1 -1
- package/lib/ClickToCopy/copy-button.js +1 -1
- package/lib/ClickToCopy/index.js +5 -5
- package/lib/CloseButton/index.js +1 -1
- package/lib/CodeBlock/index.js +3 -3
- package/lib/Colors/index.js +3 -3
- package/lib/Config/config-provider.js +16 -15
- package/lib/Config/index.js +5 -3
- package/lib/Config/theme-mode-toggle.js +1 -1
- package/lib/ContactForm/index.js +4 -4
- package/lib/CookieConsent/index.js +1 -1
- package/lib/CountDown/index.js +2 -2
- package/lib/DID/index.js +49 -49
- package/lib/DIDConnect/app-icon.js +10 -10
- package/lib/DIDConnect/app-info-item.js +4 -4
- package/lib/DIDConnect/auth-apps/auth-apps-info.js +1 -1
- package/lib/DIDConnect/auth-apps/index.js +9 -9
- package/lib/DIDConnect/did-connect-container.js +19 -18
- package/lib/DIDConnect/did-connect-footer.js +6 -6
- package/lib/DIDConnect/index.js +10 -10
- package/lib/DIDConnect/landing-page.js +30 -29
- package/lib/DIDConnect/powered-by.js +2 -2
- package/lib/DIDConnect/request-storage-access-api-dialog.js +5 -5
- package/lib/DIDConnect/with-container.js +26 -25
- package/lib/DIDConnect/with-ux-theme.js +7 -6
- package/lib/Datatable/CustomToolbar.js +12 -12
- package/lib/Datatable/TableSearch.js +2 -2
- package/lib/Datatable/index.js +4 -4
- package/lib/Dialog/confirm.js +10 -10
- package/lib/Dialog/dialog.js +7 -7
- package/lib/Dialog/index.js +3 -3
- package/lib/Dialog/use-confirm.js +1 -1
- package/lib/DriftBot/index.js +1 -1
- package/lib/Earth/countries.json.js +13 -0
- package/lib/Earth/index.js +9 -9
- package/lib/Empty/index.js +1 -1
- package/lib/ErrorBoundary/fallback.js +15 -15
- package/lib/ErrorBoundary/index.js +6 -1
- package/lib/Footer/index.js +3 -3
- package/lib/Header/auto-hidden.js +1 -1
- package/lib/Header/header.js +3 -3
- package/lib/Header/index.js +3 -3
- package/lib/Header/responsive-header.js +6 -6
- package/lib/Icon/image.js +2 -2
- package/lib/Icon/index.js +18 -18
- package/lib/Img/index.js +1 -1
- package/lib/InfoRow/index.js +1 -1
- package/lib/Layout/dashboard/index.js +31 -29
- package/lib/Layout/dashboard/sidebar.js +2 -2
- package/lib/Layout/dashboard-legacy/header.js +2 -2
- package/lib/Layout/dashboard-legacy/index.js +4 -4
- package/lib/Layout/dashboard-legacy/sidebar.js +8 -8
- package/lib/Layout/index.js +5 -5
- package/lib/Locale/context.js +20 -20
- package/lib/Locale/selector.js +3 -3
- package/lib/Logo/images/logo-dark-text.svg.js +5 -0
- package/lib/Logo/images/logo-dark-top.svg.js +5 -0
- package/lib/Logo/images/logo-light-text.svg.js +5 -0
- package/lib/Logo/images/logo-light-top.svg.js +5 -0
- package/lib/Logo/index.js +18 -18
- package/lib/Metric/index.js +2 -2
- package/lib/NFTDisplay/NFTBroken.svg.js +108 -0
- package/lib/NFTDisplay/aspect-ratio-container.js +1 -1
- package/lib/NFTDisplay/broken.js +2 -2
- package/lib/NFTDisplay/index.js +35 -35
- package/lib/NFTDisplay/loading.js +1 -1
- package/lib/NFTDisplay/render-svg.js +1 -1
- package/lib/NFTDisplay/svg-embedder/img.js +3 -3
- package/lib/NFTDisplay/svg-embedder/inline-svg.js +1 -1
- package/lib/NavMenu/images/OCAP.svg.js +5 -0
- package/lib/NavMenu/images/abt-network.svg.js +7 -0
- package/lib/NavMenu/images/ai-kit.svg.js +7 -0
- package/lib/NavMenu/images/aigne.svg.js +7 -0
- package/lib/NavMenu/images/aistro.svg.js +5 -0
- package/lib/NavMenu/images/arcsphere.svg.js +10 -0
- package/lib/NavMenu/images/blocklet-framework.svg.js +7 -0
- package/lib/NavMenu/images/blocklet-launcher.svg.js +5 -0
- package/lib/NavMenu/images/blocklet-server.svg.js +7 -0
- package/lib/NavMenu/images/blocklet-store.svg.js +5 -0
- package/lib/NavMenu/images/creator-studio.svg.js +7 -0
- package/lib/NavMenu/images/did-connect.svg.js +5 -0
- package/lib/NavMenu/images/did-name-service.svg.js +5 -0
- package/lib/NavMenu/images/did-wallet.svg.js +7 -0
- package/lib/NavMenu/images/did.svg.js +5 -0
- package/lib/NavMenu/images/nft-studio.svg.js +5 -0
- package/lib/NavMenu/images/vc.svg.js +5 -0
- package/lib/NavMenu/images/web3-kit.svg.js +7 -0
- package/lib/NavMenu/index.js +2 -2
- package/lib/NavMenu/nav-menu.js +23 -22
- package/lib/NavMenu/products.js +32 -32
- package/lib/NavMenu/style.js +1 -1
- package/lib/NavMenu/sub-item-group.js +1 -1
- package/lib/PageScroller/index.js +19 -19
- package/lib/PageScroller/story/FullPage.js +27 -27
- package/lib/PageScroller/story/PageContain.js +8 -8
- package/lib/Passport/index.js +2 -3
- package/lib/Passport/passport.js +2 -2
- package/lib/PhoneInput/country-select.js +1 -1
- package/lib/PhoneInput/index.js +2 -2
- package/lib/PricingTable/PricingPlan.js +1 -1
- package/lib/PricingTable/index.js +3 -3
- package/lib/RelativeTime/index.js +1 -1
- package/lib/Result/common.js +6 -4
- package/lib/Result/index.js +2 -2
- package/lib/Result/result.js +1 -1
- package/lib/Screenshot/BaseScreenshot/index.js +3 -3
- package/lib/Screenshot/index.js +9 -9
- package/lib/SessionBlocklet/index.js +8 -8
- package/lib/SessionManager/index.js +2 -3
- package/lib/SessionUser/components/did-space.js +14 -14
- package/lib/SessionUser/components/logged-in.js +33 -33
- package/lib/SessionUser/components/quick-login-item.js +29 -29
- package/lib/SessionUser/components/session-user-item.js +23 -23
- package/lib/SessionUser/components/session-user-switch.js +4 -4
- package/lib/SessionUser/components/un-login.js +7 -7
- package/lib/SessionUser/components/user-info.js +16 -16
- package/lib/SessionUser/images/did-spaces.svg.js +5 -0
- package/lib/SessionUser/index.js +2 -2
- package/lib/SharedBridge/index.js +23 -23
- package/lib/Spinner/index.js +1 -1
- package/lib/SplitButton/index.js +1 -1
- package/lib/Switch/index.js +1 -1
- package/lib/Tabs/index.js +1 -1
- package/lib/Tag/index.js +6 -6
- package/lib/TextCollapse/index.js +2 -2
- package/lib/Theme/index.js +22 -11
- package/lib/Theme/theme-provider.js +2 -2
- package/lib/Theme/theme.js +4 -4
- package/lib/Toast/index.js +11 -11
- package/lib/UserCard/Cards/avatar-only.js +2 -2
- package/lib/UserCard/Cards/basic-info.js +3 -3
- package/lib/UserCard/Cards/index.js +3 -3
- package/lib/UserCard/Cards/name-only.js +1 -1
- package/lib/UserCard/Container/card.js +2 -2
- package/lib/UserCard/Container/dialog.js +1 -1
- package/lib/UserCard/Content/basic.js +1 -1
- package/lib/UserCard/Content/clock.js +3 -3
- package/lib/UserCard/Content/minimal.js +8 -8
- package/lib/UserCard/Content/tooltip-avatar.js +1 -1
- package/lib/UserCard/components.js +23 -23
- package/lib/UserCard/index.js +12 -12
- package/lib/Util/index.js +2 -2
- package/lib/VerificationCode/index.js +1 -1
- package/lib/Video/index.js +2 -2
- package/lib/Wallet/Action.js +4 -4
- package/lib/Wallet/Download.js +6 -6
- package/lib/Wallet/Open.js +1 -1
- package/lib/Wallet/images/android_download.svg.js +5 -0
- package/lib/Wallet/images/app-store.svg.js +5 -0
- package/lib/Wallet/images/google-play.svg.js +5 -0
- package/lib/WalletOSIcon/index.js +1 -1
- package/lib/WebWalletSWKeeper/index.js +2 -2
- package/lib/WechatPrompt/index.js +1 -1
- package/lib/hooks/use-blocklet-logo.js +15 -13
- package/lib/hooks/use-clock.js +1 -1
- package/lib/index.js +79 -74
- package/lib/ux.css +1 -0
- package/lib/withTheme/index.js +7 -6
- package/lib/withTracker/error_boundary.js +1 -1
- package/package.json +7 -7
- package/vite.config.mjs +1 -1
package/lib/Passport/index.js
CHANGED
package/lib/Passport/passport.js
CHANGED
@@ -2,8 +2,8 @@ import { jsxs as r, jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import f from "lodash/upperFirst";
|
3
3
|
import { Box as i } from "@mui/material";
|
4
4
|
import x from "@arcblock/icons/lib/RevokeIcon";
|
5
|
-
import u from "../NFTDisplay";
|
6
|
-
import { useLocaleContext as y } from "../Locale/context";
|
5
|
+
import u from "../NFTDisplay/index.js";
|
6
|
+
import { useLocaleContext as y } from "../Locale/context.js";
|
7
7
|
function b({
|
8
8
|
passport: e,
|
9
9
|
user: m,
|
@@ -3,7 +3,7 @@ import { useState as O, useMemo as x } from "react";
|
|
3
3
|
import { Box as C, Typography as a, Select as z, TextField as j, MenuItem as k } from "@mui/material";
|
4
4
|
import { defaultCountries as u, parseCountry as c, FlagEmoji as y } from "react-international-phone";
|
5
5
|
import P from "@arcblock/icons/lib/ArrowDown";
|
6
|
-
import { mergeSx as F } from "../Util/style";
|
6
|
+
import { mergeSx as F } from "../Util/style.js";
|
7
7
|
function L({
|
8
8
|
ref: w = void 0,
|
9
9
|
value: i,
|
package/lib/PhoneInput/index.js
CHANGED
@@ -3,8 +3,8 @@ import { useMemo as P, useState as F, useCallback as k } from "react";
|
|
3
3
|
import { Box as I, Typography as A, TextField as L } from "@mui/material";
|
4
4
|
import { parsePhoneNumber as v } from "awesome-phonenumber";
|
5
5
|
import { defaultCountries as f, parseCountry as p, usePhoneInput as R } from "react-international-phone";
|
6
|
-
import V from "./country-select";
|
7
|
-
import { mergeSx as q } from "../Util/style";
|
6
|
+
import V from "./country-select.js";
|
7
|
+
import { mergeSx as q } from "../Util/style.js";
|
8
8
|
function W(e, t, n = "") {
|
9
9
|
var c, h;
|
10
10
|
if (!e) return !1;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { jsxs as t, jsx as n } from "react/jsx-runtime";
|
2
2
|
import { Card as a, CardContent as o, Typography as r, Button as c } from "@mui/material";
|
3
|
-
import { styled as l } from "../Theme";
|
3
|
+
import { styled as l } from "../Theme/index.js";
|
4
4
|
function f({ plan: e }) {
|
5
5
|
return /* @__PURE__ */ t(s, { $shadow: !0, children: [
|
6
6
|
/* @__PURE__ */ n("div", { className: "card-header", children: /* @__PURE__ */ n("div", { className: "title", children: e.name }) }),
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
2
2
|
import { Grid as n } from "@mui/material";
|
3
|
-
import a from "./PricingPlan";
|
4
|
-
import { styled as m } from "../Theme";
|
5
|
-
import { withDeprecated as o } from "../Util/deprecate";
|
3
|
+
import a from "./PricingPlan.js";
|
4
|
+
import { styled as m } from "../Theme/index.js";
|
5
|
+
import { withDeprecated as o } from "../Util/deprecate.js";
|
6
6
|
function d({ plans: i = [] }) {
|
7
7
|
return i && i.length > 0 ? /* @__PURE__ */ e(f, { variant: "even", children: /* @__PURE__ */ e(
|
8
8
|
n,
|
@@ -9,7 +9,7 @@ import E from "dayjs/plugin/relativeTime";
|
|
9
9
|
import H from "dayjs/plugin/updateLocale";
|
10
10
|
import N from "dayjs/plugin/localizedFormat";
|
11
11
|
import { create as Z } from "zustand";
|
12
|
-
import {
|
12
|
+
import { formatToDatetime as D, setDateTool as q } from "../Util/index.js";
|
13
13
|
r.extend(N);
|
14
14
|
r.extend(k);
|
15
15
|
r.extend(B);
|
package/lib/Result/common.js
CHANGED
@@ -1,9 +1,11 @@
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
2
2
|
import { CancelRounded as f, Info as p } from "@mui/icons-material";
|
3
|
-
import o from "./result";
|
4
|
-
import r from "./translations";
|
5
|
-
import { useLocaleContext as d } from "../Locale/context";
|
6
|
-
import { useTheme as m } from "
|
3
|
+
import o from "./result.js";
|
4
|
+
import r from "./translations.js";
|
5
|
+
import { useLocaleContext as d } from "../Locale/context.js";
|
6
|
+
import { useTheme as m } from "@mui/material";
|
7
|
+
import "../Theme/theme.js";
|
8
|
+
import "../Theme/theme-provider.js";
|
7
9
|
const e = (t) => {
|
8
10
|
t = ["zh", "en"].includes(t) ? t : "";
|
9
11
|
const { locale: n } = d() || { locale: "en" }, c = t || n;
|
package/lib/Result/index.js
CHANGED
package/lib/Result/result.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { jsxs as f, jsx as e } from "react/jsx-runtime";
|
2
2
|
import { Box as n } from "@mui/material";
|
3
|
-
import { styled as c } from "../Theme";
|
3
|
+
import { styled as c } from "../Theme/index.js";
|
4
4
|
function g({ icon: r = null, title: t = "", description: o = "", extra: i = null, ...l }) {
|
5
5
|
return /* @__PURE__ */ f(s, { ...l, children: [
|
6
6
|
r,
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { jsx as o, jsxs as c } from "react/jsx-runtime";
|
2
|
-
import p from "./shells/Phone";
|
3
|
-
import f from "./shells/Macbook";
|
4
|
-
import { styled as m } from "../../Theme";
|
2
|
+
import p from "./shells/Phone.js";
|
3
|
+
import f from "./shells/Macbook.js";
|
4
|
+
import { styled as m } from "../../Theme/index.js";
|
5
5
|
const u = {
|
6
6
|
phone: p,
|
7
7
|
macbook: f
|
package/lib/Screenshot/index.js
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
import { jsx as s, jsxs as N } from "react/jsx-runtime";
|
2
|
-
import { useRef as k, useState as v, useEffect as S, Children as g, cloneElement as
|
2
|
+
import { useRef as k, useState as v, useEffect as S, Children as g, cloneElement as $, createElement as z } from "react";
|
3
3
|
import a from "lodash/isUndefined";
|
4
|
-
import { mergeProps as C } from "../Util";
|
5
|
-
import { styled as b } from "../Theme";
|
6
|
-
import j from "./BaseScreenshot";
|
7
|
-
|
4
|
+
import { mergeProps as C } from "../Util/index.js";
|
5
|
+
import { styled as b } from "../Theme/index.js";
|
6
|
+
import j from "./BaseScreenshot/index.js";
|
7
|
+
/* empty css */
|
8
8
|
const u = {
|
9
9
|
"iphone-x": {
|
10
10
|
borderRadius: 32,
|
@@ -75,7 +75,7 @@ const u = {
|
|
75
75
|
img: ["alt", "title", "src", "srcSet", "sizes", "loading", "key", "children"],
|
76
76
|
video: ["alt", "title", "muted", "autoplay", "loop", "key", "children"]
|
77
77
|
}, O = (t) => [
|
78
|
-
|
78
|
+
z(
|
79
79
|
t.type,
|
80
80
|
E[t.type].reduce((e, i) => (e[i] = t.props[i], e), {})
|
81
81
|
)
|
@@ -107,7 +107,7 @@ function y(t) {
|
|
107
107
|
contentRadius: d,
|
108
108
|
contentZIndex: h,
|
109
109
|
children: [
|
110
|
-
/* @__PURE__ */ s("div", { className: "device-frame", children: /* @__PURE__ */ s("div", { className: "device-content", children: (f = w(g.toArray(n))) == null ? void 0 : f.map((R, x) =>
|
110
|
+
/* @__PURE__ */ s("div", { className: "device-frame", children: /* @__PURE__ */ s("div", { className: "device-content", children: (f = w(g.toArray(n))) == null ? void 0 : f.map((R, x) => $(R, { key: x })) }) }),
|
111
111
|
/* @__PURE__ */ s("div", { className: "device-stripe" }),
|
112
112
|
/* @__PURE__ */ s("div", { className: "device-header" }),
|
113
113
|
/* @__PURE__ */ s("div", { className: "device-sensors" }),
|
@@ -155,10 +155,10 @@ const W = b("div")`
|
|
155
155
|
transform-origin: 0 0;
|
156
156
|
}
|
157
157
|
`;
|
158
|
-
function
|
158
|
+
function _({ type: t, src: e = "", children: i, sx: r = {}, ...n }) {
|
159
159
|
const o = t.toLowerCase();
|
160
160
|
return ["phone", "macbook"].includes(o) ? /* @__PURE__ */ s(j, { type: o, sx: r, ...n, children: i || (e ? /* @__PURE__ */ s("img", { src: e, alt: "screenshot" }) : null) }) : /* @__PURE__ */ s(P, { type: t, sx: { ...r, margin: "auto" }, ...n, children: i || (e ? /* @__PURE__ */ s("img", { src: e, alt: "screenshot" }) : null) });
|
161
161
|
}
|
162
162
|
export {
|
163
|
-
|
163
|
+
_ as default
|
164
164
|
};
|
@@ -1,14 +1,14 @@
|
|
1
1
|
import { jsxs as d, jsx as o } from "react/jsx-runtime";
|
2
2
|
import { useRef as R } from "react";
|
3
|
-
import { useTheme as b, Box as u, IconButton as w, Popper as
|
3
|
+
import { useTheme as b, Box as u, IconButton as w, Popper as C, ClickAwayListener as P, Fade as k, Paper as L, List as z, ListItem as A, ListItemButton as M, Typography as S } from "@mui/material";
|
4
4
|
import { Icon as m } from "@iconify/react";
|
5
5
|
import T from "iconify-icons-material-symbols-400/dashboard-outline-rounded";
|
6
6
|
import B from "@iconify-icons/material-symbols/widgets-outline-rounded";
|
7
7
|
import { useReactive as E, useMemoizedFn as j } from "ahooks";
|
8
|
-
import F from "../Button";
|
9
|
-
import { BLOCKLET_SERVICE_PATH_PREFIX as O, NAVIGATION_URL as _ } from "../Util/constant";
|
10
|
-
import D from "../SessionPermission";
|
11
|
-
import { getTranslation as f } from "../Util";
|
8
|
+
import F from "../Button/index.js";
|
9
|
+
import { BLOCKLET_SERVICE_PATH_PREFIX as O, NAVIGATION_URL as _ } from "../Util/constant.js";
|
10
|
+
import D from "../SessionPermission/index.js";
|
11
|
+
import { getTranslation as f } from "../Util/index.js";
|
12
12
|
function J({
|
13
13
|
session: t,
|
14
14
|
locale: a = "zh",
|
@@ -40,7 +40,7 @@ function J({
|
|
40
40
|
children: [
|
41
41
|
/* @__PURE__ */ o(w, { size: "medium", ref: s, children: /* @__PURE__ */ o(m, { icon: T, fontSize: h, style: { transform: "scale(1.08)" } }) }),
|
42
42
|
/* @__PURE__ */ o(
|
43
|
-
|
43
|
+
C,
|
44
44
|
{
|
45
45
|
open: c.open,
|
46
46
|
anchorEl: s.current,
|
@@ -48,12 +48,12 @@ function J({
|
|
48
48
|
placement: "bottom-end",
|
49
49
|
sx: { zIndex: 1600 },
|
50
50
|
children: ({ TransitionProps: n }) => /* @__PURE__ */ o(
|
51
|
-
|
51
|
+
P,
|
52
52
|
{
|
53
53
|
onClickAway: (e) => {
|
54
54
|
e.preventDefault(), e.stopPropagation(), i(!1);
|
55
55
|
},
|
56
|
-
children: /* @__PURE__ */ o(
|
56
|
+
children: /* @__PURE__ */ o(k, { ...n, timeout: 350, children: /* @__PURE__ */ d(
|
57
57
|
L,
|
58
58
|
{
|
59
59
|
variant: "outlined",
|
@@ -1,22 +1,22 @@
|
|
1
1
|
import { jsxs as a, Fragment as h, jsx as e } from "react/jsx-runtime";
|
2
2
|
import { useState as y } from "react";
|
3
|
-
import { useMemoizedFn as
|
3
|
+
import { useMemoizedFn as s } from "ahooks";
|
4
4
|
import { useTheme as g, MenuItem as S, Divider as u } from "@mui/material";
|
5
|
-
import { Icon as
|
6
|
-
import
|
7
|
-
import { translate as
|
8
|
-
import { translations as
|
9
|
-
import w from "../images/did-spaces.svg";
|
10
|
-
import { DID_SPACE_URL as z } from "../../Util/constant";
|
11
|
-
import { TBox as k } from "../../MuiWrap";
|
12
|
-
import F from "../../Typography";
|
13
|
-
function O({ session:
|
5
|
+
import { Icon as D } from "@iconify/react";
|
6
|
+
import I from "@iconify-icons/material-symbols/lens";
|
7
|
+
import { translate as v } from "../../Locale/util.js";
|
8
|
+
import { translations as T } from "../libs/translation.js";
|
9
|
+
import w from "../images/did-spaces.svg.js";
|
10
|
+
import { DID_SPACE_URL as z } from "../../Util/constant.js";
|
11
|
+
import { TBox as k } from "../../MuiWrap/index.js";
|
12
|
+
import F from "../../Typography/index.js";
|
13
|
+
function O({ session: m, locale: l = "en", ...c }) {
|
14
14
|
var p;
|
15
|
-
const d =
|
15
|
+
const d = s((r, i = {}) => v(T, r, l, "en", i)), t = g(), o = ((p = m.user) == null ? void 0 : p.didSpace) ?? {}, [n, f] = y(0), x = s(({ fontSize: r, initialSize: i }) => {
|
16
16
|
f(Math.ceil((i - r) / 4));
|
17
17
|
});
|
18
18
|
return /* @__PURE__ */ a(h, { children: [
|
19
|
-
/* @__PURE__ */ e(k, { component: "a", href: z, sx: { p: 0.5, display: "block", textDecoration: "none" }, ...
|
19
|
+
/* @__PURE__ */ e(k, { component: "a", href: z, sx: { p: 0.5, display: "block", textDecoration: "none" }, ...c, children: /* @__PURE__ */ a(
|
20
20
|
S,
|
21
21
|
{
|
22
22
|
sx: {
|
@@ -52,10 +52,10 @@ function O({ session: s, locale: c = "en", ...l }) {
|
|
52
52
|
}
|
53
53
|
),
|
54
54
|
/* @__PURE__ */ e(
|
55
|
-
|
55
|
+
D,
|
56
56
|
{
|
57
57
|
style: { marginTop: `${n}px`, flexShrink: 0 },
|
58
|
-
icon:
|
58
|
+
icon: I,
|
59
59
|
fontSize: 8,
|
60
60
|
color: o.did ? t.palette.success.main : t.palette.grey[200]
|
61
61
|
}
|
@@ -10,50 +10,50 @@ import ee from "@iconify-icons/material-symbols/account-circle-off-outline-round
|
|
10
10
|
import re from "@iconify-icons/material-symbols/featured-seasonal-and-gifts-rounded";
|
11
11
|
import te from "copy-to-clipboard";
|
12
12
|
import P from "lodash/noop";
|
13
|
-
import oe from "../../Toast";
|
14
|
-
import ie from "../../Avatar";
|
15
|
-
import { getUserAvatar as ne } from "../../Util";
|
16
|
-
import ce from "./user-info";
|
17
|
-
import { DASHBOARD_URL as
|
18
|
-
import pe from "../../SessionPermission";
|
19
|
-
import { translations as ue } from "../libs/translation";
|
20
|
-
import { translate as de } from "../../Locale/util";
|
21
|
-
import me from "./did-space";
|
22
|
-
import { mergeSx as se } from "../../Util/style";
|
23
|
-
import { createDebug as fe } from "../../Util/logger";
|
13
|
+
import oe from "../../Toast/index.js";
|
14
|
+
import ie from "../../Avatar/index.js";
|
15
|
+
import { getUserAvatar as ne } from "../../Util/index.js";
|
16
|
+
import ce from "./user-info.js";
|
17
|
+
import { DASHBOARD_URL as ae, PROFILE_URL as le } from "../../Util/constant.js";
|
18
|
+
import pe from "../../SessionPermission/index.js";
|
19
|
+
import { translations as ue } from "../libs/translation.js";
|
20
|
+
import { translate as de } from "../../Locale/util.js";
|
21
|
+
import me from "./did-space.js";
|
22
|
+
import { mergeSx as se } from "../../Util/style.js";
|
23
|
+
import { createDebug as fe } from "../../Util/logger.js";
|
24
24
|
const he = (e) => {
|
25
|
-
const
|
26
|
-
return
|
25
|
+
const l = new URL(window.location.href);
|
26
|
+
return l.searchParams.set("inviter", e), l.toString();
|
27
27
|
}, v = fe("did-connect");
|
28
28
|
function je({
|
29
29
|
session: e,
|
30
|
-
onBindWallet:
|
30
|
+
onBindWallet: l = P,
|
31
31
|
isBlocklet: c = !0,
|
32
32
|
locale: f = "en",
|
33
33
|
size: R = 24,
|
34
34
|
popperType: C = "click",
|
35
|
-
sx:
|
36
|
-
...
|
35
|
+
sx: B,
|
36
|
+
...D
|
37
37
|
}) {
|
38
38
|
var S, b;
|
39
39
|
const u = n((r, o = {}) => de(ue, r, f, "en", o)), L = H(() => {
|
40
|
-
var r, o,
|
41
|
-
return !!((
|
40
|
+
var r, o, a;
|
41
|
+
return !!((a = (o = (r = globalThis == null ? void 0 : globalThis.blocklet) == null ? void 0 : r.settings) == null ? void 0 : o.invite) != null && a.enabled);
|
42
42
|
}, []), x = T(null), h = N({
|
43
43
|
open: !1
|
44
44
|
}), i = n((r = !h.open) => {
|
45
45
|
h.open = r;
|
46
|
-
}), O = C === "hover" ? { onMouseEnter: () => i(!0), onMouseLeave: () => i(!1) } : { onClick: () => i() }, M = ne((b = (S = e.user) == null ? void 0 : S.avatar) == null ? void 0 : b.replace(/\s/g, encodeURIComponent(" "))),
|
47
|
-
var
|
46
|
+
}), O = C === "hover" ? { onMouseEnter: () => i(!0), onMouseLeave: () => i(!1) } : { onClick: () => i() }, M = ne((b = (S = e.user) == null ? void 0 : S.avatar) == null ? void 0 : b.replace(/\s/g, encodeURIComponent(" "))), E = e.useOAuth(), U = typeof e.usePasskey == "function" ? e.usePasskey() : null, w = n(({ inArcSphere: r = !1 } = {}) => {
|
47
|
+
var a, d, p;
|
48
48
|
const o = {};
|
49
|
-
r && (
|
50
|
-
}), A = n(({ userSession: r, inArcSphere: o = !1 } = {}) => new Promise((
|
49
|
+
r && (a = e == null ? void 0 : e.user) != null && a.sourceAppPid && (o.sourceAppPid = e.user.sourceAppPid), i(!1), ((d = e == null ? void 0 : e.user) == null ? void 0 : d.sourceProvider) === "passkey" ? U.switchPassport(e.user) : ["google", "apple", "email", "github"].includes((p = e == null ? void 0 : e.user) == null ? void 0 : p.sourceProvider) ? E.switchOAuthPassport(e.user) : e.switchPassport(P, o);
|
50
|
+
}), A = n(({ userSession: r, inArcSphere: o = !1 } = {}) => new Promise((a) => {
|
51
51
|
const d = {};
|
52
52
|
o && e.user.sourceAppPid && (d.sourceAppPid = e.user.sourceAppPid);
|
53
53
|
const p = {};
|
54
54
|
r ? p.userSession = r : (i(!1), p.showQuickConnect = !1), e.switchDid(
|
55
55
|
() => {
|
56
|
-
i(!1),
|
56
|
+
i(!1), a();
|
57
57
|
},
|
58
58
|
d,
|
59
59
|
p
|
@@ -63,9 +63,9 @@ function je({
|
|
63
63
|
r && e.user.sourceAppPid && (o.sourceAppPid = e.user.sourceAppPid), i(!1), e.switchProfile(P, o);
|
64
64
|
}), F = n(() => {
|
65
65
|
i(!1), e.logout();
|
66
|
-
}), z = n(() => {
|
67
|
-
i(!1), e.bindWallet(a);
|
68
66
|
}), W = n(() => {
|
67
|
+
i(!1), e.bindWallet(l);
|
68
|
+
}), z = n(() => {
|
69
69
|
i(!1);
|
70
70
|
const r = he(e.user.did);
|
71
71
|
te(r), oe.success(u("inviteCopied"));
|
@@ -88,9 +88,9 @@ function je({
|
|
88
88
|
justifyContent: "center"
|
89
89
|
},
|
90
90
|
// @ts-ignore
|
91
|
-
|
91
|
+
B
|
92
92
|
),
|
93
|
-
...
|
93
|
+
...D,
|
94
94
|
children: [
|
95
95
|
/* @__PURE__ */ t(
|
96
96
|
Q,
|
@@ -139,7 +139,7 @@ function je({
|
|
139
139
|
onSwitchPassport: w,
|
140
140
|
onSwitchAccount: A,
|
141
141
|
onSwitchProfile: k,
|
142
|
-
onBindWallet:
|
142
|
+
onBindWallet: W
|
143
143
|
}
|
144
144
|
),
|
145
145
|
/* @__PURE__ */ t(I, { sx: { m: "0 !important" } }),
|
@@ -151,7 +151,7 @@ function je({
|
|
151
151
|
icon: $,
|
152
152
|
title: u("dashboard"),
|
153
153
|
component: "a",
|
154
|
-
href:
|
154
|
+
href: ae,
|
155
155
|
sx: { display: "block", textDecoration: "none", color: "inherit" }
|
156
156
|
}
|
157
157
|
) }),
|
@@ -161,7 +161,7 @@ function je({
|
|
161
161
|
icon: Z,
|
162
162
|
title: u("profile"),
|
163
163
|
component: "a",
|
164
|
-
href:
|
164
|
+
href: le,
|
165
165
|
sx: { display: "block", textDecoration: "none", color: "inherit" }
|
166
166
|
}
|
167
167
|
),
|
@@ -171,7 +171,7 @@ function je({
|
|
171
171
|
icon: re,
|
172
172
|
title: u("invite"),
|
173
173
|
component: "div",
|
174
|
-
onClick:
|
174
|
+
onClick: z,
|
175
175
|
sx: { display: "block", color: "inherit" }
|
176
176
|
}
|
177
177
|
),
|
@@ -203,7 +203,7 @@ function je({
|
|
203
203
|
}
|
204
204
|
function s({
|
205
205
|
icon: e,
|
206
|
-
title:
|
206
|
+
title: l,
|
207
207
|
...c
|
208
208
|
}) {
|
209
209
|
return /* @__PURE__ */ t(y, { ...c, sx: { p: 0.5, ...c == null ? void 0 : c.sx }, children: /* @__PURE__ */ m(
|
@@ -221,7 +221,7 @@ function s({
|
|
221
221
|
},
|
222
222
|
children: [
|
223
223
|
/* @__PURE__ */ t(Y, { icon: e, fontSize: 24 }),
|
224
|
-
|
224
|
+
l
|
225
225
|
]
|
226
226
|
}
|
227
227
|
) });
|
@@ -1,20 +1,20 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { useTheme as g, useMediaQuery as v, Box as
|
1
|
+
import { jsxs as e, jsx as r } from "react/jsx-runtime";
|
2
|
+
import { useTheme as g, useMediaQuery as v, Box as o, Typography as n, Chip as y } from "@mui/material";
|
3
3
|
import b from "lodash/noop";
|
4
|
-
import w from "../../RelativeTime";
|
5
|
-
import
|
6
|
-
import { DID as
|
7
|
-
import
|
8
|
-
import { getSourceProvider as I } from "../libs/utils";
|
9
|
-
function
|
4
|
+
import w from "../../RelativeTime/index.js";
|
5
|
+
import u from "../../WalletOSIcon/index.js";
|
6
|
+
import { DID as z } from "../../DID/index.js";
|
7
|
+
import k from "../../Avatar/index.js";
|
8
|
+
import { getSourceProvider as I } from "../libs/utils.js";
|
9
|
+
function M({
|
10
10
|
userSession: t,
|
11
11
|
locale: a = "en",
|
12
|
-
onClick:
|
12
|
+
onClick: p = b
|
13
13
|
}) {
|
14
|
-
var l, i,
|
14
|
+
var l, i, d, c;
|
15
15
|
const { palette: m } = g(), x = v((h) => h.breakpoints.down("md")), f = I(t == null ? void 0 : t.user) === "wallet";
|
16
|
-
return /* @__PURE__ */
|
17
|
-
|
16
|
+
return /* @__PURE__ */ e(
|
17
|
+
o,
|
18
18
|
{
|
19
19
|
sx: {
|
20
20
|
p: 2,
|
@@ -32,10 +32,10 @@ function Q({
|
|
32
32
|
},
|
33
33
|
width: "100%"
|
34
34
|
},
|
35
|
-
onClick:
|
35
|
+
onClick: p,
|
36
36
|
children: [
|
37
|
-
/* @__PURE__ */
|
38
|
-
|
37
|
+
/* @__PURE__ */ e(
|
38
|
+
o,
|
39
39
|
{
|
40
40
|
sx: {
|
41
41
|
display: "flex",
|
@@ -45,12 +45,12 @@ function Q({
|
|
45
45
|
overflow: "hidden"
|
46
46
|
},
|
47
47
|
children: [
|
48
|
-
/* @__PURE__ */ r(
|
49
|
-
/* @__PURE__ */ o
|
50
|
-
/* @__PURE__ */
|
51
|
-
|
48
|
+
/* @__PURE__ */ r(k, { src: t.user.avatar, did: t.user.did, size: 44, variant: "circle", shape: "circle" }),
|
49
|
+
/* @__PURE__ */ e(o, { sx: { flex: 1, overflow: "hidden" }, children: [
|
50
|
+
/* @__PURE__ */ e(
|
51
|
+
n,
|
52
52
|
{
|
53
|
-
component:
|
53
|
+
component: o,
|
54
54
|
sx: {
|
55
55
|
fontSize: "16px",
|
56
56
|
fontWeight: 500,
|
@@ -79,8 +79,8 @@ function Q({
|
|
79
79
|
]
|
80
80
|
}
|
81
81
|
),
|
82
|
-
f ? /* @__PURE__ */
|
83
|
-
|
82
|
+
f ? /* @__PURE__ */ e(
|
83
|
+
o,
|
84
84
|
{
|
85
85
|
sx: {
|
86
86
|
display: "flex",
|
@@ -89,15 +89,15 @@ function Q({
|
|
89
89
|
},
|
90
90
|
children: [
|
91
91
|
/* @__PURE__ */ r(
|
92
|
-
|
92
|
+
u,
|
93
93
|
{
|
94
|
-
provider: (
|
95
|
-
walletOS: (
|
94
|
+
provider: (d = t == null ? void 0 : t.extra) == null ? void 0 : d.provider,
|
95
|
+
walletOS: (c = t == null ? void 0 : t.extra) == null ? void 0 : c.walletOS,
|
96
96
|
color: m.text.secondary
|
97
97
|
}
|
98
98
|
),
|
99
99
|
/* @__PURE__ */ r(
|
100
|
-
|
100
|
+
z,
|
101
101
|
{
|
102
102
|
locale: a,
|
103
103
|
did: t.user.did,
|
@@ -115,16 +115,16 @@ function Q({
|
|
115
115
|
)
|
116
116
|
]
|
117
117
|
}
|
118
|
-
) : /* @__PURE__ */ r(
|
118
|
+
) : /* @__PURE__ */ r(n, { sx: { fontSize: "12px", color: "text.secondary" }, children: t.user.email })
|
119
119
|
] })
|
120
120
|
]
|
121
121
|
}
|
122
122
|
),
|
123
|
-
t.updatedAt && !x && /* @__PURE__ */ r(
|
123
|
+
t.updatedAt && !x && /* @__PURE__ */ r(o, { component: "span", sx: { color: "text.hint", fontSize: "12px", flexShrink: 0 }, children: /* @__PURE__ */ r(w, { value: t.updatedAt, locale: a }) })
|
124
124
|
]
|
125
125
|
}
|
126
126
|
);
|
127
127
|
}
|
128
128
|
export {
|
129
|
-
|
129
|
+
M as default
|
130
130
|
};
|
@@ -1,24 +1,24 @@
|
|
1
1
|
import { jsxs as t, jsx as l } from "react/jsx-runtime";
|
2
|
-
import { useTheme as u, Box as
|
3
|
-
import { Icon as
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import S from "../../Avatar";
|
7
|
-
import { DID as g } from "../../DID";
|
8
|
-
import { getSourceProvider as z } from "../libs/utils";
|
9
|
-
function
|
2
|
+
import { useTheme as u, Box as e, Tooltip as x, Typography as h, IconButton as v } from "@mui/material";
|
3
|
+
import { Icon as y } from "@iconify/react";
|
4
|
+
import m from "@iconify-icons/material-symbols/lens";
|
5
|
+
import w from "../../WalletOSIcon/index.js";
|
6
|
+
import S from "../../Avatar/index.js";
|
7
|
+
import { DID as g } from "../../DID/index.js";
|
8
|
+
import { getSourceProvider as z } from "../libs/utils.js";
|
9
|
+
function R({
|
10
10
|
ref: p = void 0,
|
11
11
|
sessionItem: r,
|
12
12
|
statusContent: c = null,
|
13
|
-
active:
|
14
|
-
...
|
13
|
+
active: n = !1,
|
14
|
+
...a
|
15
15
|
}) {
|
16
|
-
var
|
17
|
-
const { palette:
|
16
|
+
var i, d;
|
17
|
+
const { palette: o } = u(), f = z(r == null ? void 0 : r.user) === "wallet";
|
18
18
|
return /* @__PURE__ */ t(
|
19
|
-
|
19
|
+
e,
|
20
20
|
{
|
21
|
-
...
|
21
|
+
...a,
|
22
22
|
ref: p,
|
23
23
|
sx: {
|
24
24
|
display: "flex",
|
@@ -27,11 +27,11 @@ function W({
|
|
27
27
|
py: 0.75,
|
28
28
|
px: 1,
|
29
29
|
width: "100%",
|
30
|
-
...
|
30
|
+
...a == null ? void 0 : a.sx
|
31
31
|
},
|
32
32
|
children: [
|
33
33
|
/* @__PURE__ */ t(
|
34
|
-
|
34
|
+
e,
|
35
35
|
{
|
36
36
|
sx: {
|
37
37
|
display: "flex",
|
@@ -43,17 +43,17 @@ function W({
|
|
43
43
|
}
|
44
44
|
},
|
45
45
|
children: [
|
46
|
-
/* @__PURE__ */ l(
|
46
|
+
/* @__PURE__ */ l(e, { sx: { mr: 0.5, fontSize: 0 }, children: /* @__PURE__ */ l(S, { did: r.userDid, size: 36 }) }),
|
47
47
|
/* @__PURE__ */ l(
|
48
|
-
|
48
|
+
w,
|
49
49
|
{
|
50
|
-
color:
|
50
|
+
color: o.text.secondary,
|
51
51
|
loading: r.__isDefault,
|
52
|
-
provider: (
|
52
|
+
provider: (i = r == null ? void 0 : r.extra) == null ? void 0 : i.provider,
|
53
53
|
walletOS: (d = r == null ? void 0 : r.extra) == null ? void 0 : d.walletOS
|
54
54
|
}
|
55
55
|
),
|
56
|
-
|
56
|
+
f ? /* @__PURE__ */ l(g, { did: r.userDid, copyable: !1, size: 14, responsive: !1, compact: !0, sx: { lineHeight: 1 } }) : r.user.email && /* @__PURE__ */ l(
|
57
57
|
x,
|
58
58
|
{
|
59
59
|
title: r.user.email,
|
@@ -77,11 +77,11 @@ function W({
|
|
77
77
|
]
|
78
78
|
}
|
79
79
|
),
|
80
|
-
c ||
|
80
|
+
c || n && /* @__PURE__ */ l(v, { size: "small", disableRipple: !0, children: /* @__PURE__ */ l(y, { icon: m, fontSize: 6, color: o.success.main }) })
|
81
81
|
]
|
82
82
|
}
|
83
83
|
);
|
84
84
|
}
|
85
85
|
export {
|
86
|
-
|
86
|
+
R as default
|
87
87
|
};
|