@lark-apaas/client-toolkit-lite 1.1.7-alpha.12 → 1.1.7-alpha.13
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/dist/index.cjs +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +81 -81
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ var __export = (target, all) => {
|
|
|
6
6
|
};
|
|
7
7
|
|
|
8
8
|
// src/components/AppContainer/index.tsx
|
|
9
|
-
import
|
|
9
|
+
import React4, { useEffect as useEffect5 } from "react";
|
|
10
10
|
import { MiaodaInspector } from "@lark-apaas/miaoda-inspector";
|
|
11
11
|
|
|
12
12
|
// src/runtime/react-devtools-hook.ts
|
|
@@ -772,7 +772,7 @@ if (!window.__FULLSTACK_RUNTIME_INITIALIZED__) {
|
|
|
772
772
|
}
|
|
773
773
|
|
|
774
774
|
// src/components/AppContainer/safety.tsx
|
|
775
|
-
import
|
|
775
|
+
import React2, { useEffect as useEffect3, useRef, useState as useState4 } from "react";
|
|
776
776
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
777
777
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
778
778
|
|
|
@@ -1065,12 +1065,12 @@ var useCurrentUserProfile = /* @__PURE__ */ __name(() => {
|
|
|
1065
1065
|
}, "useCurrentUserProfile");
|
|
1066
1066
|
|
|
1067
1067
|
// src/hooks/useIsMobile.ts
|
|
1068
|
-
import
|
|
1068
|
+
import React from "react";
|
|
1069
1069
|
import { debounce } from "lodash";
|
|
1070
1070
|
var MOBILE_BREAKPOINT = 768;
|
|
1071
1071
|
function useIsMobile() {
|
|
1072
|
-
const [isMobile2, setIsMobile] =
|
|
1073
|
-
|
|
1072
|
+
const [isMobile2, setIsMobile] = React.useState(window.innerWidth < MOBILE_BREAKPOINT);
|
|
1073
|
+
React.useEffect(() => {
|
|
1074
1074
|
const handleResize = /* @__PURE__ */ __name(() => {
|
|
1075
1075
|
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
1076
1076
|
}, "handleResize");
|
|
@@ -1455,7 +1455,7 @@ var mobileBtnFilled = {
|
|
|
1455
1455
|
};
|
|
1456
1456
|
var HoverButton = /* @__PURE__ */ __name(({ style, onClick, children, ...rest }) => {
|
|
1457
1457
|
const [hovered, setHovered] = useState4(false);
|
|
1458
|
-
return /* @__PURE__ */
|
|
1458
|
+
return /* @__PURE__ */ React2.createElement("div", {
|
|
1459
1459
|
style: {
|
|
1460
1460
|
...style,
|
|
1461
1461
|
...hovered ? btnHovered : {}
|
|
@@ -1466,7 +1466,7 @@ var HoverButton = /* @__PURE__ */ __name(({ style, onClick, children, ...rest })
|
|
|
1466
1466
|
...rest
|
|
1467
1467
|
}, children);
|
|
1468
1468
|
}, "HoverButton");
|
|
1469
|
-
var XIcon = /* @__PURE__ */ __name(({ style, onClick }) => /* @__PURE__ */
|
|
1469
|
+
var XIcon = /* @__PURE__ */ __name(({ style, onClick }) => /* @__PURE__ */ React2.createElement("svg", {
|
|
1470
1470
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1471
1471
|
width: "24",
|
|
1472
1472
|
height: "24",
|
|
@@ -1478,9 +1478,9 @@ var XIcon = /* @__PURE__ */ __name(({ style, onClick }) => /* @__PURE__ */ React
|
|
|
1478
1478
|
strokeLinejoin: "round",
|
|
1479
1479
|
style,
|
|
1480
1480
|
onClick
|
|
1481
|
-
}, /* @__PURE__ */
|
|
1481
|
+
}, /* @__PURE__ */ React2.createElement("path", {
|
|
1482
1482
|
d: "M18 6 6 18"
|
|
1483
|
-
}), /* @__PURE__ */
|
|
1483
|
+
}), /* @__PURE__ */ React2.createElement("path", {
|
|
1484
1484
|
d: "m6 6 12 12"
|
|
1485
1485
|
})), "XIcon");
|
|
1486
1486
|
var Safety = /* @__PURE__ */ __name(() => {
|
|
@@ -1535,70 +1535,70 @@ var Safety = /* @__PURE__ */ __name(() => {
|
|
|
1535
1535
|
if (!showBadge) return null;
|
|
1536
1536
|
if (!visible) return null;
|
|
1537
1537
|
if (isMobile2) {
|
|
1538
|
-
return /* @__PURE__ */
|
|
1538
|
+
return /* @__PURE__ */ React2.createElement(DialogPrimitive.Root, {
|
|
1539
1539
|
open,
|
|
1540
1540
|
onOpenChange: setOpen
|
|
1541
|
-
}, /* @__PURE__ */
|
|
1541
|
+
}, /* @__PURE__ */ React2.createElement(DialogPrimitive.Trigger, {
|
|
1542
1542
|
asChild: true
|
|
1543
|
-
}, /* @__PURE__ */
|
|
1543
|
+
}, /* @__PURE__ */ React2.createElement("div", {
|
|
1544
1544
|
style: badgeMobile,
|
|
1545
1545
|
onClick: /* @__PURE__ */ __name(() => setOpen(true), "onClick")
|
|
1546
|
-
}, /* @__PURE__ */
|
|
1546
|
+
}, /* @__PURE__ */ React2.createElement("img", {
|
|
1547
1547
|
src: LOGO_URL,
|
|
1548
1548
|
style: logoStyle
|
|
1549
|
-
}), /* @__PURE__ */
|
|
1549
|
+
}), /* @__PURE__ */ React2.createElement("p", {
|
|
1550
1550
|
style: {
|
|
1551
1551
|
...badgeTextStyle,
|
|
1552
1552
|
minWidth: 28
|
|
1553
1553
|
}
|
|
1554
|
-
}, t("safety.badge.label")))), /* @__PURE__ */
|
|
1554
|
+
}, t("safety.badge.label")))), /* @__PURE__ */ React2.createElement(DialogPrimitive.Portal, null, /* @__PURE__ */ React2.createElement(DialogPrimitive.Overlay, {
|
|
1555
1555
|
style: overlayStyle
|
|
1556
|
-
}), /* @__PURE__ */
|
|
1556
|
+
}), /* @__PURE__ */ React2.createElement(DialogPrimitive.Content, {
|
|
1557
1557
|
style: sheetContent,
|
|
1558
1558
|
"aria-describedby": void 0
|
|
1559
|
-
}, /* @__PURE__ */
|
|
1559
|
+
}, /* @__PURE__ */ React2.createElement(DialogPrimitive.Title, {
|
|
1560
1560
|
style: {
|
|
1561
1561
|
position: "absolute",
|
|
1562
1562
|
clip: "rect(0 0 0 0)"
|
|
1563
1563
|
}
|
|
1564
|
-
}, t("safety.badge.builtWith")), /* @__PURE__ */
|
|
1564
|
+
}, t("safety.badge.builtWith")), /* @__PURE__ */ React2.createElement("div", {
|
|
1565
1565
|
style: sheetInner
|
|
1566
|
-
}, /* @__PURE__ */
|
|
1566
|
+
}, /* @__PURE__ */ React2.createElement(XIcon, {
|
|
1567
1567
|
style: sheetCloseBtn,
|
|
1568
1568
|
onClick: /* @__PURE__ */ __name(() => setOpen(false), "onClick")
|
|
1569
|
-
}), /* @__PURE__ */
|
|
1569
|
+
}), /* @__PURE__ */ React2.createElement("img", {
|
|
1570
1570
|
src: getCoverMobileUrl(),
|
|
1571
1571
|
alt: "",
|
|
1572
1572
|
style: sheetCover,
|
|
1573
1573
|
onClick: /* @__PURE__ */ __name(() => window.open(LANDING_URL, "_blank"), "onClick")
|
|
1574
|
-
}), /* @__PURE__ */
|
|
1574
|
+
}), /* @__PURE__ */ React2.createElement("div", {
|
|
1575
1575
|
style: sheetBody
|
|
1576
|
-
}, /* @__PURE__ */
|
|
1576
|
+
}, /* @__PURE__ */ React2.createElement("div", {
|
|
1577
1577
|
style: {
|
|
1578
1578
|
display: "flex",
|
|
1579
1579
|
flexDirection: "column",
|
|
1580
1580
|
gap: 4,
|
|
1581
1581
|
alignSelf: "stretch"
|
|
1582
1582
|
}
|
|
1583
|
-
}, isInternetVisible && /* @__PURE__ */
|
|
1583
|
+
}, isInternetVisible && /* @__PURE__ */ React2.createElement("div", {
|
|
1584
1584
|
style: infoRow
|
|
1585
|
-
}, /* @__PURE__ */
|
|
1585
|
+
}, /* @__PURE__ */ React2.createElement("img", {
|
|
1586
1586
|
src: ICON_COMPANY_URL,
|
|
1587
1587
|
style: infoIconMobile
|
|
1588
|
-
}), /* @__PURE__ */
|
|
1588
|
+
}), /* @__PURE__ */ React2.createElement("p", {
|
|
1589
1589
|
style: sheetInfoText
|
|
1590
1590
|
}, t("safety.tenant.operated", {
|
|
1591
1591
|
name: userinfo?.name ?? ""
|
|
1592
|
-
}))), /* @__PURE__ */
|
|
1592
|
+
}))), /* @__PURE__ */ React2.createElement("div", {
|
|
1593
1593
|
style: infoRow
|
|
1594
|
-
}, /* @__PURE__ */
|
|
1594
|
+
}, /* @__PURE__ */ React2.createElement("img", {
|
|
1595
1595
|
src: ICON_AI_URL,
|
|
1596
1596
|
style: infoIconMobile
|
|
1597
|
-
}), /* @__PURE__ */
|
|
1597
|
+
}), /* @__PURE__ */ React2.createElement("p", {
|
|
1598
1598
|
style: sheetInfoText
|
|
1599
|
-
}, t("safety.ai.disclaimer")))), /* @__PURE__ */
|
|
1599
|
+
}, t("safety.ai.disclaimer")))), /* @__PURE__ */ React2.createElement("div", {
|
|
1600
1600
|
style: mobileBtnRow
|
|
1601
|
-
}, /* @__PURE__ */
|
|
1601
|
+
}, /* @__PURE__ */ React2.createElement("div", {
|
|
1602
1602
|
style: mobileBtnOutline,
|
|
1603
1603
|
onClick: /* @__PURE__ */ __name((e) => {
|
|
1604
1604
|
e.stopPropagation();
|
|
@@ -1607,17 +1607,17 @@ var Safety = /* @__PURE__ */ __name(() => {
|
|
|
1607
1607
|
setTimeout(() => setVisible(false), 200);
|
|
1608
1608
|
window.localStorage?.setItem(HasClosedKey, "true");
|
|
1609
1609
|
}, "onClick")
|
|
1610
|
-
}, t("safety.button.dontShowAgain")), /* @__PURE__ */
|
|
1610
|
+
}, t("safety.button.dontShowAgain")), /* @__PURE__ */ React2.createElement("div", {
|
|
1611
1611
|
style: mobileBtnFilled,
|
|
1612
1612
|
onClick: /* @__PURE__ */ __name(() => window.open(LANDING_URL, "_blank"), "onClick")
|
|
1613
1613
|
}, t("safety.button.learnMore"))))))));
|
|
1614
1614
|
}
|
|
1615
|
-
return /* @__PURE__ */
|
|
1615
|
+
return /* @__PURE__ */ React2.createElement(PopoverPrimitive.Root, {
|
|
1616
1616
|
open,
|
|
1617
1617
|
onOpenChange: setOpen
|
|
1618
|
-
}, /* @__PURE__ */
|
|
1618
|
+
}, /* @__PURE__ */ React2.createElement(PopoverPrimitive.Trigger, {
|
|
1619
1619
|
asChild: true
|
|
1620
|
-
}, /* @__PURE__ */
|
|
1620
|
+
}, /* @__PURE__ */ React2.createElement("div", {
|
|
1621
1621
|
style: badgeDesktop,
|
|
1622
1622
|
onMouseEnter: /* @__PURE__ */ __name(() => {
|
|
1623
1623
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
@@ -1626,15 +1626,15 @@ var Safety = /* @__PURE__ */ __name(() => {
|
|
|
1626
1626
|
onMouseLeave: /* @__PURE__ */ __name(() => {
|
|
1627
1627
|
timeoutRef.current = setTimeout(() => setOpen(false), 100);
|
|
1628
1628
|
}, "onMouseLeave")
|
|
1629
|
-
}, /* @__PURE__ */
|
|
1629
|
+
}, /* @__PURE__ */ React2.createElement("img", {
|
|
1630
1630
|
src: LOGO_URL,
|
|
1631
1631
|
style: logoStyle
|
|
1632
|
-
}), /* @__PURE__ */
|
|
1632
|
+
}), /* @__PURE__ */ React2.createElement("p", {
|
|
1633
1633
|
style: {
|
|
1634
1634
|
...badgeTextStyle,
|
|
1635
1635
|
minWidth: 60
|
|
1636
1636
|
}
|
|
1637
|
-
}, t("safety.badge.builtWith")))), /* @__PURE__ */
|
|
1637
|
+
}, t("safety.badge.builtWith")))), /* @__PURE__ */ React2.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ React2.createElement(PopoverPrimitive.Content, {
|
|
1638
1638
|
style: popoverContent,
|
|
1639
1639
|
side: "top",
|
|
1640
1640
|
align: "end",
|
|
@@ -1646,41 +1646,41 @@ var Safety = /* @__PURE__ */ __name(() => {
|
|
|
1646
1646
|
onMouseLeave: /* @__PURE__ */ __name(() => {
|
|
1647
1647
|
timeoutRef.current = setTimeout(() => setOpen(false), 100);
|
|
1648
1648
|
}, "onMouseLeave")
|
|
1649
|
-
}, /* @__PURE__ */
|
|
1649
|
+
}, /* @__PURE__ */ React2.createElement("div", {
|
|
1650
1650
|
style: popoverInner
|
|
1651
|
-
}, /* @__PURE__ */
|
|
1651
|
+
}, /* @__PURE__ */ React2.createElement("img", {
|
|
1652
1652
|
src: getCoverUrl(),
|
|
1653
1653
|
alt: "",
|
|
1654
1654
|
style: popoverCover,
|
|
1655
1655
|
onClick: /* @__PURE__ */ __name(() => window.open(LANDING_URL, "_blank"), "onClick")
|
|
1656
|
-
}), /* @__PURE__ */
|
|
1656
|
+
}), /* @__PURE__ */ React2.createElement("div", {
|
|
1657
1657
|
style: popoverBody
|
|
1658
|
-
}, /* @__PURE__ */
|
|
1658
|
+
}, /* @__PURE__ */ React2.createElement("div", {
|
|
1659
1659
|
style: {
|
|
1660
1660
|
display: "flex",
|
|
1661
1661
|
flexDirection: "column",
|
|
1662
1662
|
gap: 4,
|
|
1663
1663
|
alignSelf: "stretch"
|
|
1664
1664
|
}
|
|
1665
|
-
}, isInternetVisible && /* @__PURE__ */
|
|
1665
|
+
}, isInternetVisible && /* @__PURE__ */ React2.createElement("div", {
|
|
1666
1666
|
style: infoRow
|
|
1667
|
-
}, /* @__PURE__ */
|
|
1667
|
+
}, /* @__PURE__ */ React2.createElement("img", {
|
|
1668
1668
|
src: ICON_COMPANY_URL,
|
|
1669
1669
|
style: infoIcon
|
|
1670
|
-
}), /* @__PURE__ */
|
|
1670
|
+
}), /* @__PURE__ */ React2.createElement("p", {
|
|
1671
1671
|
style: infoText
|
|
1672
1672
|
}, t("safety.tenant.operated", {
|
|
1673
1673
|
name: userinfo?.name ?? ""
|
|
1674
|
-
}))), /* @__PURE__ */
|
|
1674
|
+
}))), /* @__PURE__ */ React2.createElement("div", {
|
|
1675
1675
|
style: infoRow
|
|
1676
|
-
}, /* @__PURE__ */
|
|
1676
|
+
}, /* @__PURE__ */ React2.createElement("img", {
|
|
1677
1677
|
src: ICON_AI_URL,
|
|
1678
1678
|
style: infoIcon
|
|
1679
|
-
}), /* @__PURE__ */
|
|
1679
|
+
}), /* @__PURE__ */ React2.createElement("p", {
|
|
1680
1680
|
style: infoText
|
|
1681
|
-
}, t("safety.ai.disclaimer")))), /* @__PURE__ */
|
|
1681
|
+
}, t("safety.ai.disclaimer")))), /* @__PURE__ */ React2.createElement("div", {
|
|
1682
1682
|
style: btnRow
|
|
1683
|
-
}, /* @__PURE__ */
|
|
1683
|
+
}, /* @__PURE__ */ React2.createElement(HoverButton, {
|
|
1684
1684
|
style: btnBase,
|
|
1685
1685
|
"data-custom-element": "safety-close",
|
|
1686
1686
|
onClick: /* @__PURE__ */ __name((e) => {
|
|
@@ -1689,7 +1689,7 @@ var Safety = /* @__PURE__ */ __name(() => {
|
|
|
1689
1689
|
setVisible(false);
|
|
1690
1690
|
window.localStorage?.setItem(HasClosedKey, "true");
|
|
1691
1691
|
}, "onClick")
|
|
1692
|
-
}, t("safety.button.dontShowAgain")), /* @__PURE__ */
|
|
1692
|
+
}, t("safety.button.dontShowAgain")), /* @__PURE__ */ React2.createElement(HoverButton, {
|
|
1693
1693
|
style: btnBase,
|
|
1694
1694
|
"data-custom-element": "safety-more",
|
|
1695
1695
|
onClick: /* @__PURE__ */ __name(() => window.open(LANDING_URL, "_blank"), "onClick")
|
|
@@ -1698,7 +1698,7 @@ var Safety = /* @__PURE__ */ __name(() => {
|
|
|
1698
1698
|
var safety_default = Safety;
|
|
1699
1699
|
|
|
1700
1700
|
// src/components/QueryProvider/index.tsx
|
|
1701
|
-
import
|
|
1701
|
+
import React3 from "react";
|
|
1702
1702
|
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
1703
1703
|
var defaultQueryClient = null;
|
|
1704
1704
|
var getDefaultQueryClient = /* @__PURE__ */ __name(() => {
|
|
@@ -1719,14 +1719,14 @@ var getDefaultQueryClient = /* @__PURE__ */ __name(() => {
|
|
|
1719
1719
|
}, "getDefaultQueryClient");
|
|
1720
1720
|
var QueryProvider = /* @__PURE__ */ __name(({ children, client }) => {
|
|
1721
1721
|
const qc = client ?? getDefaultQueryClient();
|
|
1722
|
-
return /* @__PURE__ */
|
|
1722
|
+
return /* @__PURE__ */ React3.createElement(QueryClientProvider, {
|
|
1723
1723
|
client: qc
|
|
1724
1724
|
}, children);
|
|
1725
1725
|
}, "QueryProvider");
|
|
1726
1726
|
var QueryProvider_default = QueryProvider;
|
|
1727
1727
|
|
|
1728
1728
|
// src/components/AppContainer/IframeBridge.tsx
|
|
1729
|
-
import { useEffect as useEffect4, useCallback, useRef as useRef3, useMemo } from "react";
|
|
1729
|
+
import { useEffect as useEffect4, useCallback, useRef as useRef3, useMemo, createElement } from "react";
|
|
1730
1730
|
import { useLocation, useNavigate } from "react-router-dom";
|
|
1731
1731
|
|
|
1732
1732
|
// src/hooks/useUpdatingRef.ts
|
|
@@ -1803,7 +1803,7 @@ function IframeBridge() {
|
|
|
1803
1803
|
}, [
|
|
1804
1804
|
handleMessage
|
|
1805
1805
|
]);
|
|
1806
|
-
return /* @__PURE__ */
|
|
1806
|
+
return /* @__PURE__ */ createElement("div", {
|
|
1807
1807
|
style: {
|
|
1808
1808
|
display: "none"
|
|
1809
1809
|
}
|
|
@@ -1971,14 +1971,14 @@ var AppContainer = /* @__PURE__ */ __name(({ children }) => {
|
|
|
1971
1971
|
});
|
|
1972
1972
|
}
|
|
1973
1973
|
}, []);
|
|
1974
|
-
return /* @__PURE__ */
|
|
1974
|
+
return /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement(safety_default, null), process.env.NODE_ENV !== "production" && /* @__PURE__ */ React4.createElement(MiaodaInspector, null), process.env.NODE_ENV !== "production" && /* @__PURE__ */ React4.createElement(IframeBridge, null), /* @__PURE__ */ React4.createElement(QueryProvider_default, null, children));
|
|
1975
1975
|
}, "AppContainer");
|
|
1976
1976
|
var AppContainer_default = AppContainer;
|
|
1977
1977
|
|
|
1978
1978
|
// src/components/Welcome/index.tsx
|
|
1979
|
-
import
|
|
1979
|
+
import React5 from "react";
|
|
1980
1980
|
var Welcome = /* @__PURE__ */ __name(({ title = "\u9875\u9762\u5F85\u5F00\u53D1", description = "\u9875\u9762\u6682\u672A\u5F00\u53D1\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85..." }) => {
|
|
1981
|
-
return /* @__PURE__ */
|
|
1981
|
+
return /* @__PURE__ */ React5.createElement("div", {
|
|
1982
1982
|
style: {
|
|
1983
1983
|
display: "flex",
|
|
1984
1984
|
flexDirection: "column",
|
|
@@ -1989,7 +1989,7 @@ var Welcome = /* @__PURE__ */ __name(({ title = "\u9875\u9762\u5F85\u5F00\u53D1"
|
|
|
1989
1989
|
padding: "0 24px",
|
|
1990
1990
|
textAlign: "center"
|
|
1991
1991
|
}
|
|
1992
|
-
}, /* @__PURE__ */
|
|
1992
|
+
}, /* @__PURE__ */ React5.createElement("img", {
|
|
1993
1993
|
style: {
|
|
1994
1994
|
borderRadius: 6,
|
|
1995
1995
|
marginBottom: 24
|
|
@@ -1998,7 +1998,7 @@ var Welcome = /* @__PURE__ */ __name(({ title = "\u9875\u9762\u5F85\u5F00\u53D1"
|
|
|
1998
1998
|
height: "200",
|
|
1999
1999
|
src: "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/miao/welcome.svg",
|
|
2000
2000
|
alt: "Welcome"
|
|
2001
|
-
}), /* @__PURE__ */
|
|
2001
|
+
}), /* @__PURE__ */ React5.createElement("div", {
|
|
2002
2002
|
style: {
|
|
2003
2003
|
fontSize: 16,
|
|
2004
2004
|
fontWeight: 500,
|
|
@@ -2006,7 +2006,7 @@ var Welcome = /* @__PURE__ */ __name(({ title = "\u9875\u9762\u5F85\u5F00\u53D1"
|
|
|
2006
2006
|
marginBottom: 4,
|
|
2007
2007
|
color: "#1f2329"
|
|
2008
2008
|
}
|
|
2009
|
-
}, title), /* @__PURE__ */
|
|
2009
|
+
}, title), /* @__PURE__ */ React5.createElement("div", {
|
|
2010
2010
|
style: {
|
|
2011
2011
|
fontSize: 16,
|
|
2012
2012
|
lineHeight: "24px",
|
|
@@ -2018,9 +2018,9 @@ var Welcome = /* @__PURE__ */ __name(({ title = "\u9875\u9762\u5F85\u5F00\u53D1"
|
|
|
2018
2018
|
var Welcome_default = Welcome;
|
|
2019
2019
|
|
|
2020
2020
|
// src/components/PagePlaceholder/index.tsx
|
|
2021
|
-
import
|
|
2021
|
+
import React6 from "react";
|
|
2022
2022
|
var PagePlaceholder = /* @__PURE__ */ __name(({ title = "\u9875\u9762\u5F85\u5F00\u53D1", description = "\u9875\u9762\u6682\u672A\u5F00\u53D1\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85..." }) => {
|
|
2023
|
-
return /* @__PURE__ */
|
|
2023
|
+
return /* @__PURE__ */ React6.createElement("div", {
|
|
2024
2024
|
style: {
|
|
2025
2025
|
display: "flex",
|
|
2026
2026
|
flexDirection: "column",
|
|
@@ -2031,7 +2031,7 @@ var PagePlaceholder = /* @__PURE__ */ __name(({ title = "\u9875\u9762\u5F85\u5F0
|
|
|
2031
2031
|
height: "calc(100vh - 64px)",
|
|
2032
2032
|
textAlign: "center"
|
|
2033
2033
|
}
|
|
2034
|
-
}, /* @__PURE__ */
|
|
2034
|
+
}, /* @__PURE__ */ React6.createElement("img", {
|
|
2035
2035
|
style: {
|
|
2036
2036
|
borderRadius: "6px",
|
|
2037
2037
|
marginBottom: "24px"
|
|
@@ -2040,14 +2040,14 @@ var PagePlaceholder = /* @__PURE__ */ __name(({ title = "\u9875\u9762\u5F85\u5F0
|
|
|
2040
2040
|
height: "200",
|
|
2041
2041
|
src: "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/miao/welcome.svg",
|
|
2042
2042
|
alt: "Welcome"
|
|
2043
|
-
}), /* @__PURE__ */
|
|
2043
|
+
}), /* @__PURE__ */ React6.createElement("div", {
|
|
2044
2044
|
style: {
|
|
2045
2045
|
fontSize: "16px",
|
|
2046
2046
|
fontWeight: 500,
|
|
2047
2047
|
marginBottom: "4px",
|
|
2048
2048
|
lineHeight: "24px"
|
|
2049
2049
|
}
|
|
2050
|
-
}, title), /* @__PURE__ */
|
|
2050
|
+
}, title), /* @__PURE__ */ React6.createElement("div", {
|
|
2051
2051
|
style: {
|
|
2052
2052
|
color: "#6b7280",
|
|
2053
2053
|
fontSize: "16px",
|
|
@@ -2063,7 +2063,7 @@ var PagePlaceholder = /* @__PURE__ */ __name(({ title = "\u9875\u9762\u5F85\u5F0
|
|
|
2063
2063
|
var PagePlaceholder_default = PagePlaceholder;
|
|
2064
2064
|
|
|
2065
2065
|
// src/components/ErrorRender/index.tsx
|
|
2066
|
-
import
|
|
2066
|
+
import React7, { useEffect as useEffect6 } from "react";
|
|
2067
2067
|
var ErrorRender = /* @__PURE__ */ __name((props) => {
|
|
2068
2068
|
const { error, resetErrorBoundary } = props;
|
|
2069
2069
|
useEffect6(() => {
|
|
@@ -2097,22 +2097,22 @@ var ErrorRender = /* @__PURE__ */ __name((props) => {
|
|
|
2097
2097
|
}, [
|
|
2098
2098
|
resetErrorBoundary
|
|
2099
2099
|
]);
|
|
2100
|
-
return /* @__PURE__ */
|
|
2100
|
+
return /* @__PURE__ */ React7.createElement("div", {
|
|
2101
2101
|
className: "min-h-screen flex items-center justify-center bg-white"
|
|
2102
|
-
}, /* @__PURE__ */
|
|
2102
|
+
}, /* @__PURE__ */ React7.createElement("div", {
|
|
2103
2103
|
className: "flex flex-col justify-center items-center text-center"
|
|
2104
|
-
}, /* @__PURE__ */
|
|
2104
|
+
}, /* @__PURE__ */ React7.createElement("img", {
|
|
2105
2105
|
src: "https://lf3-static.bytednsdoc.com/obj/eden-cn/ylcylz_fsph_ryhs/ljhwZthlaukjlkulzlp/feisuda/template/illustration_empty_negative_error.svg",
|
|
2106
2106
|
alt: "render error",
|
|
2107
2107
|
className: "mb-3 w-[100px]"
|
|
2108
|
-
}), /* @__PURE__ */
|
|
2108
|
+
}), /* @__PURE__ */ React7.createElement("p", {
|
|
2109
2109
|
className: "text-l/[22px] text-[14px] text-[#1F2329] font-medium"
|
|
2110
2110
|
}, "\u9875\u9762\u51FA\u9519\u4E86")));
|
|
2111
2111
|
}, "ErrorRender");
|
|
2112
2112
|
var ErrorRender_default = ErrorRender;
|
|
2113
2113
|
|
|
2114
2114
|
// src/route-components/ActiveLink.tsx
|
|
2115
|
-
import
|
|
2115
|
+
import React8, { forwardRef, useEffect as useEffect7, useState as useState5 } from "react";
|
|
2116
2116
|
import { NavLink } from "react-router-dom";
|
|
2117
2117
|
var ActiveLink = /* @__PURE__ */ forwardRef(({ to, onClick, className, style, children, ...rest }, ref) => {
|
|
2118
2118
|
const [currentHash, setCurrentHash] = useState5(() => typeof window !== "undefined" ? window.location.hash : "");
|
|
@@ -2129,7 +2129,7 @@ var ActiveLink = /* @__PURE__ */ forwardRef(({ to, onClick, className, style, ch
|
|
|
2129
2129
|
]);
|
|
2130
2130
|
const isActive = isHashRoute && currentHash === to;
|
|
2131
2131
|
if (!isHashRoute) {
|
|
2132
|
-
return /* @__PURE__ */
|
|
2132
|
+
return /* @__PURE__ */ React8.createElement(NavLink, {
|
|
2133
2133
|
ref,
|
|
2134
2134
|
to,
|
|
2135
2135
|
onClick,
|
|
@@ -2170,7 +2170,7 @@ var ActiveLink = /* @__PURE__ */ forwardRef(({ to, onClick, className, style, ch
|
|
|
2170
2170
|
isPending: false,
|
|
2171
2171
|
isTransitioning: false
|
|
2172
2172
|
}) : children;
|
|
2173
|
-
return /* @__PURE__ */
|
|
2173
|
+
return /* @__PURE__ */ React8.createElement("a", {
|
|
2174
2174
|
ref,
|
|
2175
2175
|
href: to,
|
|
2176
2176
|
onClick: handleHashClick,
|
|
@@ -2182,9 +2182,9 @@ var ActiveLink = /* @__PURE__ */ forwardRef(({ to, onClick, className, style, ch
|
|
|
2182
2182
|
ActiveLink.displayName = "ActiveLink";
|
|
2183
2183
|
|
|
2184
2184
|
// src/route-components/NavLink.tsx
|
|
2185
|
-
import * as
|
|
2185
|
+
import * as React9 from "react";
|
|
2186
2186
|
import { NavLink as OriginalNavLink, useLocation as useLocation2, useNavigate as useNavigate2 } from "react-router-dom";
|
|
2187
|
-
var NavLink2 = /* @__PURE__ */
|
|
2187
|
+
var NavLink2 = /* @__PURE__ */ React9.forwardRef(({ to, children, className, style, ...props }, ref) => {
|
|
2188
2188
|
const isHashLink = typeof to === "string" && to.startsWith("#");
|
|
2189
2189
|
const location = useLocation2();
|
|
2190
2190
|
const navigate = useNavigate2();
|
|
@@ -2208,7 +2208,7 @@ var NavLink2 = /* @__PURE__ */ React10.forwardRef(({ to, children, className, st
|
|
|
2208
2208
|
const resolvedClassName = typeof className === "function" ? className(renderProps) : className;
|
|
2209
2209
|
const resolvedStyle = typeof style === "function" ? style(renderProps) : style;
|
|
2210
2210
|
const { caseSensitive, end, replace, state, preventScrollReset, relative, viewTransition, ...restProps } = props;
|
|
2211
|
-
return /* @__PURE__ */
|
|
2211
|
+
return /* @__PURE__ */ React9.createElement("a", {
|
|
2212
2212
|
href: to,
|
|
2213
2213
|
onClick: handleClick,
|
|
2214
2214
|
ref,
|
|
@@ -2217,7 +2217,7 @@ var NavLink2 = /* @__PURE__ */ React10.forwardRef(({ to, children, className, st
|
|
|
2217
2217
|
...restProps
|
|
2218
2218
|
}, typeof children === "function" ? children(renderProps) : children);
|
|
2219
2219
|
}
|
|
2220
|
-
return /* @__PURE__ */
|
|
2220
|
+
return /* @__PURE__ */ React9.createElement(OriginalNavLink, {
|
|
2221
2221
|
to,
|
|
2222
2222
|
ref,
|
|
2223
2223
|
className,
|
|
@@ -2232,7 +2232,7 @@ var NavLink2 = /* @__PURE__ */ React10.forwardRef(({ to, children, className, st
|
|
|
2232
2232
|
NavLink2.displayName = "NavLink";
|
|
2233
2233
|
|
|
2234
2234
|
// src/route-components/UniversalLink.tsx
|
|
2235
|
-
import
|
|
2235
|
+
import React10 from "react";
|
|
2236
2236
|
import { Link as RouterLink } from "react-router-dom";
|
|
2237
2237
|
function isInternalRoute(to) {
|
|
2238
2238
|
return !to.startsWith("#") && !to.startsWith("http://") && !to.startsWith("https://") && !to.startsWith("//");
|
|
@@ -2242,15 +2242,15 @@ function isExternalLink(to) {
|
|
|
2242
2242
|
return to.startsWith("http://") || to.startsWith("https://") || to.startsWith("//");
|
|
2243
2243
|
}
|
|
2244
2244
|
__name(isExternalLink, "isExternalLink");
|
|
2245
|
-
var UniversalLink = /* @__PURE__ */
|
|
2245
|
+
var UniversalLink = /* @__PURE__ */ React10.forwardRef(/* @__PURE__ */ __name(function UniversalLink2({ to, ...props }, ref) {
|
|
2246
2246
|
if (isInternalRoute(to)) {
|
|
2247
|
-
return /* @__PURE__ */
|
|
2247
|
+
return /* @__PURE__ */ React10.createElement(RouterLink, {
|
|
2248
2248
|
to,
|
|
2249
2249
|
ref,
|
|
2250
2250
|
...props
|
|
2251
2251
|
});
|
|
2252
2252
|
}
|
|
2253
|
-
return /* @__PURE__ */
|
|
2253
|
+
return /* @__PURE__ */ React10.createElement("a", {
|
|
2254
2254
|
href: to,
|
|
2255
2255
|
ref,
|
|
2256
2256
|
...props,
|