@24city/web-console 0.1.3 → 0.2.1
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/CHANGELOG.md +58 -0
- package/GUIDELINES.md +223 -0
- package/README.md +42 -10
- package/dist/account/index.js +2 -2
- package/dist/chunks/console-layout-BWz1qRog.js +210 -0
- package/dist/chunks/page-YBG0dEN1.js +111 -0
- package/dist/chunks/scale-smFifpMm.js +26 -0
- package/dist/chunks/{stale-build-DUKkQHuu.js → stale-build-DG-Tb2RA.js} +24 -20
- package/dist/chunks/status-tag-BrLUhH6Z.js +87 -0
- package/dist/chunks/text-link-BAKoHe5o.js +64 -0
- package/dist/chunks/unsupported-browser-Dwq1mNRy.js +48 -0
- package/dist/chunks/upgrade-modal-DgChxbLm.js +667 -0
- package/dist/chunks/{wallet-badge-BXu-WxJa.js → wallet-badge-dVrO6py9.js} +136 -136
- package/dist/chunks/waterfall-CQG8aVdx.js +613 -0
- package/dist/data/index.d.ts +2 -0
- package/dist/data/index.js +6 -0
- package/dist/data/metric-card.d.ts +41 -0
- package/dist/data/status-tag.d.ts +18 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +160 -120
- package/dist/layout/index.js +1 -1
- package/dist/list/choice-cards.d.ts +29 -0
- package/dist/list/content-square.d.ts +50 -0
- package/dist/list/filter-dropdown.d.ts +43 -0
- package/dist/list/filter-panel.d.ts +94 -0
- package/dist/list/index.d.ts +7 -0
- package/dist/list/index.js +27 -0
- package/dist/list/list-toolbar.d.ts +56 -0
- package/dist/list/waterfall-layout.d.ts +11 -0
- package/dist/list/waterfall.d.ts +13 -0
- package/dist/page/index.d.ts +2 -0
- package/dist/page/index.js +19 -15
- package/dist/page/page.d.ts +21 -2
- package/dist/page/select-label.d.ts +11 -0
- package/dist/page/unsupported-browser.d.ts +2 -0
- package/dist/runtime/browser-support.d.ts +6 -0
- package/dist/runtime/index.d.ts +1 -0
- package/dist/runtime/index.js +38 -37
- package/dist/runtime/providers.d.ts +1 -1
- package/dist/styles.css +1973 -575
- package/dist/testing/guard.d.ts +20 -0
- package/dist/testing/guard.js +83 -36
- package/dist/theme/index.d.ts +1 -0
- package/dist/theme/index.js +29 -25
- package/dist/theme/scale.d.ts +34 -0
- package/package.json +13 -2
- package/dist/chunks/console-layout-D5YgsZYN.js +0 -208
- package/dist/chunks/error-boundary-D3qiD7ov.js +0 -35
- package/dist/chunks/page-BaitnD--.js +0 -89
- package/dist/chunks/text-link-FTsBp_QU.js +0 -54
- package/dist/chunks/upgrade-modal-J0X79nT2.js +0 -667
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
2
|
+
import { Empty as p, Spin as m, Card as c, Button as f, Skeleton as i, Space as I, Typography as h } from "@douyinfe/semi-ui";
|
|
3
|
+
import { IllustrationSuccess as T, IllustrationSuccessDark as v, IllustrationIdle as y, IllustrationIdleDark as P, IllustrationNotFound as C, IllustrationNotFoundDark as E, IllustrationNoAccess as w, IllustrationNoAccessDark as D, IllustrationFailure as H, IllustrationFailureDark as S, IllustrationNoContentDark as b, IllustrationNoContent as k } from "@douyinfe/semi-illustrations";
|
|
4
|
+
const B = "_fullPage_17xbx_3", F = "_fullPageCard_17xbx_13", M = "_page_17xbx_18", L = "_pageHeader_17xbx_26", R = "_pageHeaderMain_17xbx_34", A = "_pageBack_17xbx_51", j = "_pageTitleRow_17xbx_70", $ = "_pageTitle_17xbx_70", U = "_pageDescription_17xbx_88", q = "_pageExtra_17xbx_95", z = "_toolbar_17xbx_114", G = "_block_17xbx_123", J = "_blockText_17xbx_141", K = "_status_17xbx_147", O = "_statusExtra_17xbx_151", Q = "_skeleton_17xbx_157", V = "_skeletonImage_17xbx_161", W = "_skeletonText_17xbx_166", X = "_loadingCard_17xbx_178", e = {
|
|
5
|
+
fullPage: B,
|
|
6
|
+
fullPageCard: F,
|
|
7
|
+
page: M,
|
|
8
|
+
pageHeader: L,
|
|
9
|
+
pageHeaderMain: R,
|
|
10
|
+
pageBack: A,
|
|
11
|
+
pageTitleRow: j,
|
|
12
|
+
pageTitle: $,
|
|
13
|
+
pageDescription: U,
|
|
14
|
+
pageExtra: q,
|
|
15
|
+
toolbar: z,
|
|
16
|
+
block: G,
|
|
17
|
+
blockText: J,
|
|
18
|
+
status: K,
|
|
19
|
+
statusExtra: O,
|
|
20
|
+
skeleton: Q,
|
|
21
|
+
skeletonImage: V,
|
|
22
|
+
skeletonText: W,
|
|
23
|
+
loadingCard: X
|
|
24
|
+
}, Y = {
|
|
25
|
+
error: [H, S],
|
|
26
|
+
forbidden: [w, D],
|
|
27
|
+
"not-found": [C, E],
|
|
28
|
+
info: [y, P],
|
|
29
|
+
success: [T, v]
|
|
30
|
+
}, N = ({ status: l, title: t, description: n, extra: s, size: r = 140, className: d, children: g }) => {
|
|
31
|
+
const [u, x] = l === "loading" ? [null, null] : Y[l], _ = { width: r, height: r };
|
|
32
|
+
return /* @__PURE__ */ a(
|
|
33
|
+
p,
|
|
34
|
+
{
|
|
35
|
+
className: d ? `${e.status} ${d}` : e.status,
|
|
36
|
+
image: u ? /* @__PURE__ */ a(u, { style: _ }) : /* @__PURE__ */ a(m, { size: "large" }),
|
|
37
|
+
darkModeImage: x ? /* @__PURE__ */ a(x, { style: _ }) : void 0,
|
|
38
|
+
title: t,
|
|
39
|
+
description: n,
|
|
40
|
+
children: s || g ? /* @__PURE__ */ o("div", { className: e.statusExtra, children: [
|
|
41
|
+
s,
|
|
42
|
+
g
|
|
43
|
+
] }) : null
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
}, ta = ({ title: l, description: t, extra: n, back: s, titleAfter: r, width: d = "full", testId: g, children: u }) => /* @__PURE__ */ o("section", { className: e.page, "data-width": d, "data-testid": g, children: [
|
|
47
|
+
/* @__PURE__ */ o("div", { className: e.pageHeader, children: [
|
|
48
|
+
/* @__PURE__ */ o("div", { className: e.pageHeaderMain, children: [
|
|
49
|
+
s ? /* @__PURE__ */ a("div", { className: e.pageBack, children: s }) : null,
|
|
50
|
+
/* @__PURE__ */ o("div", { className: e.pageTitleRow, children: [
|
|
51
|
+
/* @__PURE__ */ a(h.Title, { heading: 1, className: e.pageTitle, children: l }),
|
|
52
|
+
r
|
|
53
|
+
] }),
|
|
54
|
+
t ? /* @__PURE__ */ a(h.Paragraph, { className: e.pageDescription, children: t }) : null
|
|
55
|
+
] }),
|
|
56
|
+
n ? /* @__PURE__ */ a("div", { className: e.pageExtra, children: n }) : null
|
|
57
|
+
] }),
|
|
58
|
+
u
|
|
59
|
+
] }), Z = ({ children: l }) => /* @__PURE__ */ a("main", { className: e.fullPage, children: /* @__PURE__ */ a(c, { className: e.fullPageCard, bordered: !1, children: l }) }), sa = () => /* @__PURE__ */ a(Z, { children: /* @__PURE__ */ a("div", { "aria-busy": "true", children: /* @__PURE__ */ a(i, { loading: !0, active: !0, placeholder: /* @__PURE__ */ a(i.Paragraph, { rows: 4 }) }) }) }), ra = ({ children: l }) => /* @__PURE__ */ a("div", { className: e.toolbar, children: l }), oa = ({ message: l = "当前会话或空间不可用,请重新登录。" }) => /* @__PURE__ */ a(c, { bordered: !1, children: /* @__PURE__ */ a("div", { role: "alert", children: /* @__PURE__ */ a(N, { status: "forbidden", title: "当前会话或空间不可用", description: l }) }) }), na = ({ rows: l = 3, image: t = !1 }) => /* @__PURE__ */ a("div", { "aria-busy": "true", children: /* @__PURE__ */ a(c, { bordered: !1, className: e.loadingCard, children: /* @__PURE__ */ a(
|
|
60
|
+
i,
|
|
61
|
+
{
|
|
62
|
+
loading: !0,
|
|
63
|
+
active: !0,
|
|
64
|
+
placeholder: /* @__PURE__ */ o(I, { vertical: !0, align: "start", spacing: 12, className: e.skeleton, children: [
|
|
65
|
+
t ? /* @__PURE__ */ a(i.Image, { className: e.skeletonImage }) : null,
|
|
66
|
+
/* @__PURE__ */ a(i.Paragraph, { rows: l, className: e.skeletonText })
|
|
67
|
+
] })
|
|
68
|
+
}
|
|
69
|
+
) }) }), ia = ({ title: l, message: t, retryLabel: n = "重新加载", retrying: s = !1, onRetry: r }) => /* @__PURE__ */ a(c, { bordered: !1, children: /* @__PURE__ */ a("div", { role: "alert", children: /* @__PURE__ */ a(
|
|
70
|
+
N,
|
|
71
|
+
{
|
|
72
|
+
status: "error",
|
|
73
|
+
title: l,
|
|
74
|
+
description: t,
|
|
75
|
+
extra: r ? /* @__PURE__ */ a(f, { theme: "solid", type: "primary", loading: s, onClick: r, children: n }) : void 0
|
|
76
|
+
}
|
|
77
|
+
) }) }), ca = ({ description: l = "暂无数据", action: t }) => /* @__PURE__ */ a(
|
|
78
|
+
p,
|
|
79
|
+
{
|
|
80
|
+
className: e.block,
|
|
81
|
+
image: /* @__PURE__ */ a(k, { style: { width: 80, height: 80 } }),
|
|
82
|
+
darkModeImage: /* @__PURE__ */ a(b, { style: { width: 80, height: 80 } }),
|
|
83
|
+
description: l,
|
|
84
|
+
children: t ? /* @__PURE__ */ a("div", { className: e.statusExtra, children: t }) : null
|
|
85
|
+
}
|
|
86
|
+
), da = ({ text: l = "加载中…" }) => /* @__PURE__ */ o("div", { className: e.block, "data-loading": "true", role: "status", "aria-busy": "true", children: [
|
|
87
|
+
/* @__PURE__ */ a(m, {}),
|
|
88
|
+
l ? /* @__PURE__ */ a("span", { className: e.blockText, children: l }) : null
|
|
89
|
+
] }), ga = ({ description: l, action: t }) => /* @__PURE__ */ a(c, { bordered: !1, children: /* @__PURE__ */ a(
|
|
90
|
+
p,
|
|
91
|
+
{
|
|
92
|
+
className: e.status,
|
|
93
|
+
image: /* @__PURE__ */ a(k, { style: { width: 120, height: 120 } }),
|
|
94
|
+
darkModeImage: /* @__PURE__ */ a(b, { style: { width: 120, height: 120 } }),
|
|
95
|
+
description: l,
|
|
96
|
+
children: t ? /* @__PURE__ */ a("div", { className: e.statusExtra, children: t }) : null
|
|
97
|
+
}
|
|
98
|
+
) });
|
|
99
|
+
export {
|
|
100
|
+
ca as E,
|
|
101
|
+
Z as F,
|
|
102
|
+
da as L,
|
|
103
|
+
ta as P,
|
|
104
|
+
oa as S,
|
|
105
|
+
ra as T,
|
|
106
|
+
ga as a,
|
|
107
|
+
ia as b,
|
|
108
|
+
sa as c,
|
|
109
|
+
na as d,
|
|
110
|
+
N as e
|
|
111
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const o = {
|
|
2
|
+
h1: 32,
|
|
3
|
+
h2: 28,
|
|
4
|
+
h3: 24,
|
|
5
|
+
h4: 20,
|
|
6
|
+
h5: 18,
|
|
7
|
+
h6: 16,
|
|
8
|
+
lead: 15,
|
|
9
|
+
body: 14,
|
|
10
|
+
compact: 13,
|
|
11
|
+
caption: 12,
|
|
12
|
+
badge: 11
|
|
13
|
+
}, n = [36, 40, 48, 56, 64], a = {
|
|
14
|
+
phone: 576,
|
|
15
|
+
tablet: 768,
|
|
16
|
+
desktop: 992,
|
|
17
|
+
wide: 1200,
|
|
18
|
+
xwide: 1440
|
|
19
|
+
}, s = (t) => `(min-width: ${a[t]}px)`, e = (t) => `(max-width: ${a[t]}px)`;
|
|
20
|
+
export {
|
|
21
|
+
a as B,
|
|
22
|
+
n as D,
|
|
23
|
+
o as F,
|
|
24
|
+
s as a,
|
|
25
|
+
e as b
|
|
26
|
+
};
|
|
@@ -4,54 +4,58 @@ import { useMemo as i } from "react";
|
|
|
4
4
|
import { CustomerRuntimeConfigProvider as f } from "@24city/web-runtime/runtime-config-provider";
|
|
5
5
|
import { A as d } from "./auth-provider-CqiyTeOt.js";
|
|
6
6
|
import { b as m, A as p } from "./logout-signal-CiD_zY5M.js";
|
|
7
|
-
import {
|
|
8
|
-
import { C as
|
|
9
|
-
import { parseCustomerRuntimeConfig as
|
|
10
|
-
const
|
|
7
|
+
import { U as C, E as y } from "./unsupported-browser-Dwq1mNRy.js";
|
|
8
|
+
import { C as h } from "./context-CaVim6ZO.js";
|
|
9
|
+
import { parseCustomerRuntimeConfig as R, loadCustomerRuntimeConfig as v } from "@24city/web-runtime/core/runtime-config";
|
|
10
|
+
const w = (e = window) => {
|
|
11
|
+
const r = e;
|
|
12
|
+
return !r.CSS || typeof r.CSS.supports != "function" ? !0 : typeof r.CSSLayerBlockRule < "u";
|
|
13
|
+
}, g = () => new c({
|
|
11
14
|
defaultOptions: {
|
|
12
15
|
queries: { staleTime: 3e4, refetchOnWindowFocus: !1, retry: 1 },
|
|
13
16
|
mutations: { retry: !1 }
|
|
14
17
|
}
|
|
15
18
|
}), F = ({ runtime: e, queryClient: r, authStore: o, children: n }) => {
|
|
16
|
-
const
|
|
17
|
-
return /* @__PURE__ */ t(
|
|
18
|
-
},
|
|
19
|
+
const u = i(() => r ?? g(), [r]), a = i(() => o ?? m(), [o]);
|
|
20
|
+
return w() ? /* @__PURE__ */ t(y, { children: /* @__PURE__ */ t(l, { client: u, children: /* @__PURE__ */ t(f, { config: e.config, children: /* @__PURE__ */ t(h, { runtime: e, children: /* @__PURE__ */ t(p, { value: a, children: /* @__PURE__ */ t(d, { children: n }) }) }) }) }) }) : /* @__PURE__ */ t(C, {});
|
|
21
|
+
}, S = (e) => {
|
|
19
22
|
const r = e.trim();
|
|
20
23
|
if (!r) throw new Error("受空间影响的 Query Key 必须包含 activeSpaceId");
|
|
21
24
|
return r;
|
|
22
25
|
}, s = {
|
|
23
26
|
all: ["product-web"],
|
|
24
|
-
feature: (e, r) => [...s.all,
|
|
27
|
+
feature: (e, r) => [...s.all, S(e), r],
|
|
25
28
|
scope: (e, r, ...o) => [...s.feature(e, r), ...o]
|
|
26
|
-
},
|
|
29
|
+
}, A = "/runtime-config.json", M = R, T = (e = fetch) => v({ fetcher: e, url: A }), b = (e = window) => {
|
|
27
30
|
const r = e.__24cityRuntimeConfig;
|
|
28
31
|
return e.__24cityRuntimeConfig = void 0, r ? (o, n) => r.catch(() => fetch(o, n)) : fetch;
|
|
29
|
-
},
|
|
30
|
-
function
|
|
32
|
+
}, E = 6e4;
|
|
33
|
+
function j(e = window, r = () => e.location.reload()) {
|
|
31
34
|
e.addEventListener("vite:preloadError", (o) => {
|
|
32
|
-
|
|
35
|
+
_(e.performance) && (o.preventDefault(), r());
|
|
33
36
|
});
|
|
34
37
|
}
|
|
35
|
-
function
|
|
38
|
+
function x(e) {
|
|
36
39
|
return e.then((r) => r === void 0 ? new Promise(() => {
|
|
37
40
|
}) : r);
|
|
38
41
|
}
|
|
39
|
-
function
|
|
42
|
+
function _(e) {
|
|
40
43
|
try {
|
|
41
44
|
const [r] = (e == null ? void 0 : e.getEntriesByType("navigation")) ?? [];
|
|
42
|
-
return !r || !e ? !1 : r.type !== "reload" || e.now() >=
|
|
45
|
+
return !r || !e ? !1 : r.type !== "reload" || e.now() >= E;
|
|
43
46
|
} catch {
|
|
44
47
|
return !1;
|
|
45
48
|
}
|
|
46
49
|
}
|
|
47
50
|
export {
|
|
48
51
|
F as C,
|
|
49
|
-
|
|
52
|
+
A as R,
|
|
50
53
|
s as a,
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
+
g as c,
|
|
55
|
+
b as e,
|
|
56
|
+
x as k,
|
|
54
57
|
T as l,
|
|
55
58
|
M as p,
|
|
56
|
-
|
|
59
|
+
j as r,
|
|
60
|
+
w as s
|
|
57
61
|
};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { Card as m, Tooltip as f, Progress as u, Tag as p, Spin as b } from "@douyinfe/semi-ui";
|
|
3
|
+
import { IconHelpCircle as y, IconArrowUp as N, IconArrowDown as z } from "@douyinfe/semi-icons";
|
|
4
|
+
const q = "_card_zq4gf_6", w = "_body_zq4gf_16", $ = "_head_zq4gf_59", v = "_icon_zq4gf_69", x = "_label_zq4gf_75", O = "_tip_zq4gf_79", C = "_value_zq4gf_97", M = "_ringRow_zq4gf_113", I = "_footer_zq4gf_120", R = "_change_zq4gf_130", S = "_srOnly_zq4gf_147", k = "_grid_zq4gf_159", t = {
|
|
5
|
+
card: q,
|
|
6
|
+
body: w,
|
|
7
|
+
head: $,
|
|
8
|
+
icon: v,
|
|
9
|
+
label: x,
|
|
10
|
+
tip: O,
|
|
11
|
+
value: C,
|
|
12
|
+
ringRow: M,
|
|
13
|
+
footer: I,
|
|
14
|
+
change: R,
|
|
15
|
+
srOnly: S,
|
|
16
|
+
grid: k
|
|
17
|
+
}, T = (n) => {
|
|
18
|
+
if (typeof n != "string") return null;
|
|
19
|
+
const a = n.trim().match(/^(-?\d+(?:\.\d+)?)%$/);
|
|
20
|
+
if (!a) return null;
|
|
21
|
+
const r = Number.parseFloat(a[1]);
|
|
22
|
+
return Number.isFinite(r) ? Math.min(100, Math.max(0, r)) : null;
|
|
23
|
+
}, j = (n) => {
|
|
24
|
+
if (typeof n == "number") return String(Math.abs(n));
|
|
25
|
+
const a = n.trim();
|
|
26
|
+
return !a || a === "-" || a === "--" ? "-" : a.replace(/^[+-]/, "");
|
|
27
|
+
}, A = ({ comparison: n }) => {
|
|
28
|
+
const a = j(n.value), r = a === "-" ? "flat" : n.direction ?? "flat", s = r === "increase" ? "上升" : r === "decrease" ? "下降" : "";
|
|
29
|
+
return /* @__PURE__ */ c("div", { className: t.footer, children: [
|
|
30
|
+
/* @__PURE__ */ e("span", { children: n.label ?? "较上次" }),
|
|
31
|
+
/* @__PURE__ */ c("span", { className: t.change, "data-direction": r, children: [
|
|
32
|
+
s ? /* @__PURE__ */ e("span", { className: t.srOnly, children: s }) : null,
|
|
33
|
+
a,
|
|
34
|
+
r === "increase" ? /* @__PURE__ */ e(N, { "aria-hidden": "true" }) : null,
|
|
35
|
+
r === "decrease" ? /* @__PURE__ */ e(z, { "aria-hidden": "true" }) : null
|
|
36
|
+
] })
|
|
37
|
+
] });
|
|
38
|
+
}, W = ({ label: n, icon: a, value: r, tip: s, helper: i, comparison: o, tone: d = "brand", align: h = "center", className: _ }) => {
|
|
39
|
+
const g = T(r);
|
|
40
|
+
return /* @__PURE__ */ e(m, { bordered: !1, className: _ ? `${t.card} ${_}` : t.card, children: /* @__PURE__ */ c("div", { className: t.body, "data-tone": d, "data-align": h, children: [
|
|
41
|
+
/* @__PURE__ */ c("div", { className: t.head, children: [
|
|
42
|
+
a ? /* @__PURE__ */ e("span", { className: t.icon, "aria-hidden": "true", children: a }) : null,
|
|
43
|
+
/* @__PURE__ */ e("span", { className: t.label, children: n }),
|
|
44
|
+
s ? /* @__PURE__ */ e(f, { content: s, children: /* @__PURE__ */ e("span", { className: t.tip, tabIndex: 0, role: "img", "aria-label": `${n}说明:${s}`, children: /* @__PURE__ */ e(y, { "aria-hidden": "true" }) }) }) : null
|
|
45
|
+
] }),
|
|
46
|
+
g === null ? /* @__PURE__ */ e("div", { className: t.value, children: r }) : /* @__PURE__ */ c("div", { className: t.ringRow, children: [
|
|
47
|
+
/* @__PURE__ */ e(
|
|
48
|
+
u,
|
|
49
|
+
{
|
|
50
|
+
type: "circle",
|
|
51
|
+
percent: g,
|
|
52
|
+
width: 56,
|
|
53
|
+
strokeWidth: 7,
|
|
54
|
+
showInfo: !1,
|
|
55
|
+
motion: !1,
|
|
56
|
+
stroke: "var(--metric-color)",
|
|
57
|
+
orbitStroke: "var(--metric-track)",
|
|
58
|
+
"aria-label": `${n} ${r}`
|
|
59
|
+
}
|
|
60
|
+
),
|
|
61
|
+
/* @__PURE__ */ e("div", { className: t.value, "data-size": "ring", children: r })
|
|
62
|
+
] }),
|
|
63
|
+
o ? /* @__PURE__ */ e(A, { comparison: o }) : i ? /* @__PURE__ */ e("div", { className: t.footer, children: i }) : null
|
|
64
|
+
] }) });
|
|
65
|
+
}, E = ({ columns: n = 4, children: a, className: r }) => /* @__PURE__ */ e("div", { className: r ? `${t.grid} ${r}` : t.grid, style: { "--metric-columns": n }, children: a }), F = "_tag_brdn3_3", B = "_brand_brdn3_14", D = "_icon_brdn3_19", G = "_spin_brdn3_24", l = {
|
|
66
|
+
tag: F,
|
|
67
|
+
brand: B,
|
|
68
|
+
icon: D,
|
|
69
|
+
spin: G
|
|
70
|
+
}, H = {
|
|
71
|
+
success: "green",
|
|
72
|
+
warning: "orange",
|
|
73
|
+
danger: "red",
|
|
74
|
+
info: "blue",
|
|
75
|
+
neutral: "grey"
|
|
76
|
+
}, J = ({ tone: n = "neutral", loading: a = !1, icon: r, className: s, children: i }) => {
|
|
77
|
+
const o = [l.tag, n === "brand" ? l.brand : "", s ?? ""].filter(Boolean).join(" "), d = a ? /* @__PURE__ */ e(b, { size: "small", wrapperClassName: l.spin }) : r ? /* @__PURE__ */ e("span", { className: l.icon, "aria-hidden": "true", children: r }) : null;
|
|
78
|
+
return /* @__PURE__ */ c(p, { size: "large", type: "light", color: n === "brand" ? "grey" : H[n], className: o, children: [
|
|
79
|
+
d,
|
|
80
|
+
i
|
|
81
|
+
] });
|
|
82
|
+
};
|
|
83
|
+
export {
|
|
84
|
+
W as M,
|
|
85
|
+
J as S,
|
|
86
|
+
E as a
|
|
87
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { jsx as n, jsxs as m, Fragment as w } from "react/jsx-runtime";
|
|
2
|
+
import { Button as d, Typography as x } from "@douyinfe/semi-ui";
|
|
3
|
+
import { useNavigate as b } from "react-router";
|
|
4
|
+
import { b as N } from "./context-CaVim6ZO.js";
|
|
5
|
+
import { F as u, e as p } from "./page-YBG0dEN1.js";
|
|
6
|
+
import { useId as v, cloneElement as z } from "react";
|
|
7
|
+
const R = () => {
|
|
8
|
+
const { config: r } = N(), o = b();
|
|
9
|
+
return /* @__PURE__ */ n(u, { children: /* @__PURE__ */ n(
|
|
10
|
+
p,
|
|
11
|
+
{
|
|
12
|
+
status: "not-found",
|
|
13
|
+
title: "页面不存在",
|
|
14
|
+
description: "请检查地址,或返回产品首页继续。",
|
|
15
|
+
extra: /* @__PURE__ */ n(d, { theme: "solid", type: "primary", onClick: () => o(r.routes.publicHome), children: "返回首页" })
|
|
16
|
+
}
|
|
17
|
+
) });
|
|
18
|
+
}, F = "_srOnly_1mfs8_2", O = {
|
|
19
|
+
srOnly: F
|
|
20
|
+
}, H = ({ label: r, children: o }) => {
|
|
21
|
+
const e = v();
|
|
22
|
+
return /* @__PURE__ */ m(w, { children: [
|
|
23
|
+
/* @__PURE__ */ n("span", { id: e, className: O.srOnly, children: r }),
|
|
24
|
+
z(o, { "aria-labelledby": e })
|
|
25
|
+
] });
|
|
26
|
+
}, $ = () => /* @__PURE__ */ n(u, { children: /* @__PURE__ */ n("div", { role: "alert", children: /* @__PURE__ */ n(
|
|
27
|
+
p,
|
|
28
|
+
{
|
|
29
|
+
status: "error",
|
|
30
|
+
title: "应用配置暂时无法加载",
|
|
31
|
+
description: "启动检查未通过。请检查运行时配置和网络连接后重新加载。",
|
|
32
|
+
extra: /* @__PURE__ */ n(d, { theme: "solid", type: "primary", onClick: () => window.location.reload(), children: "重新加载" })
|
|
33
|
+
}
|
|
34
|
+
) }) }), S = "_link_1mzr6_2", T = "_danger_1mzr6_28", j = "_warning_1mzr6_33", D = "_icon_1mzr6_38", i = {
|
|
35
|
+
link: S,
|
|
36
|
+
danger: T,
|
|
37
|
+
warning: j,
|
|
38
|
+
icon: D
|
|
39
|
+
}, q = ({ href: r, target: o, rel: e, download: y, onClick: s, icon: l, status: c, disabled: t = !1, className: g, children: _, ...f }) => {
|
|
40
|
+
const k = [i.link, c === "danger" ? i.danger : c === "warning" ? i.warning : "", g ?? ""].filter(Boolean).join(" "), h = {
|
|
41
|
+
href: r,
|
|
42
|
+
target: o,
|
|
43
|
+
rel: o === "_blank" ? e ?? "noreferrer" : e,
|
|
44
|
+
download: y,
|
|
45
|
+
onClick: t ? void 0 : s,
|
|
46
|
+
onKeyDown: (a) => {
|
|
47
|
+
r || t || !s || (a.key === "Enter" || a.key === " ") && (a.preventDefault(), s(a));
|
|
48
|
+
},
|
|
49
|
+
role: r ? void 0 : "button",
|
|
50
|
+
tabIndex: r || t ? void 0 : 0,
|
|
51
|
+
"aria-disabled": t || void 0,
|
|
52
|
+
"aria-label": f["aria-label"]
|
|
53
|
+
};
|
|
54
|
+
return /* @__PURE__ */ m(x.Text, { link: h, disabled: t, className: k, children: [
|
|
55
|
+
l ? /* @__PURE__ */ n("span", { className: i.icon, children: l }) : null,
|
|
56
|
+
_
|
|
57
|
+
] });
|
|
58
|
+
};
|
|
59
|
+
export {
|
|
60
|
+
R as N,
|
|
61
|
+
H as S,
|
|
62
|
+
q as T,
|
|
63
|
+
$ as a
|
|
64
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
var l = Object.defineProperty;
|
|
2
|
+
var d = (r, t, o) => t in r ? l(r, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : r[t] = o;
|
|
3
|
+
var a = (r, t, o) => d(r, typeof t != "symbol" ? t + "" : t, o);
|
|
4
|
+
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
5
|
+
import { Component as m } from "react";
|
|
6
|
+
import { Card as p, Button as f } from "@douyinfe/semi-ui";
|
|
7
|
+
import { F as n, e as h } from "./page-YBG0dEN1.js";
|
|
8
|
+
const i = () => /* @__PURE__ */ e("div", { role: "alert", children: /* @__PURE__ */ e(
|
|
9
|
+
h,
|
|
10
|
+
{
|
|
11
|
+
status: "error",
|
|
12
|
+
title: "页面暂时无法显示",
|
|
13
|
+
description: "本次页面加载没有完成。您可以重新加载;如问题持续,请联系管理员。",
|
|
14
|
+
extra: /* @__PURE__ */ e(f, { theme: "solid", type: "primary", onClick: () => window.location.reload(), children: "重新加载" })
|
|
15
|
+
}
|
|
16
|
+
) }), C = ({ inLayout: r = !1 }) => r ? /* @__PURE__ */ e(p, { bordered: !1, children: /* @__PURE__ */ e(i, {}) }) : /* @__PURE__ */ e(n, { children: /* @__PURE__ */ e(i, {}) });
|
|
17
|
+
class E extends m {
|
|
18
|
+
constructor() {
|
|
19
|
+
super(...arguments);
|
|
20
|
+
a(this, "state", { failed: !1 });
|
|
21
|
+
}
|
|
22
|
+
static getDerivedStateFromError() {
|
|
23
|
+
return { failed: !0 };
|
|
24
|
+
}
|
|
25
|
+
componentDidCatch(o, s) {
|
|
26
|
+
console.error("产品用户 Web 渲染失败", o, s.componentStack);
|
|
27
|
+
}
|
|
28
|
+
render() {
|
|
29
|
+
return this.state.failed ? /* @__PURE__ */ e(n, { children: /* @__PURE__ */ e(i, {}) }) : this.props.children;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
const g = {
|
|
33
|
+
maxWidth: 480,
|
|
34
|
+
margin: "15vh auto 0",
|
|
35
|
+
padding: 24,
|
|
36
|
+
color: "#262626",
|
|
37
|
+
fontFamily: "-apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif",
|
|
38
|
+
fontSize: 14,
|
|
39
|
+
lineHeight: 1.7
|
|
40
|
+
}, v = () => /* @__PURE__ */ c("div", { role: "alert", style: g, children: [
|
|
41
|
+
/* @__PURE__ */ e("h1", { style: { margin: "0 0 12px", fontSize: 20, fontWeight: 500 }, children: "当前浏览器版本过低" }),
|
|
42
|
+
/* @__PURE__ */ e("p", { style: { margin: 0 }, children: "页面无法正常显示。请把 Chrome、Edge、Safari 或 Firefox 升级到最新版后再打开;使用 360、QQ、搜狗等浏览器时,请升级到最新版并切换到极速模式。" })
|
|
43
|
+
] });
|
|
44
|
+
export {
|
|
45
|
+
E,
|
|
46
|
+
C as R,
|
|
47
|
+
v as U
|
|
48
|
+
};
|