@lark-apaas/client-toolkit 1.0.18 → 1.0.20-alpha.placeholder.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/lib/apis/components/PlaceHolder.d.ts +1 -0
- package/lib/apis/components/PlaceHolder.js +2 -0
- package/lib/apis/components/Welcome.d.ts +1 -1
- package/lib/apis/components/Welcome.js +2 -2
- package/lib/components/AppContainer/safety.js +18 -6
- package/lib/components/PlaceHolder/index.d.ts +6 -0
- package/lib/components/PlaceHolder/index.js +26 -0
- package/package.json +1 -1
- package/lib/components/Welcome/index.d.ts +0 -4
- package/lib/components/Welcome/index.js +0 -18
- package/lib/components/Welcome/welcome.css +0 -12
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as PlaceHolder } from '../../components/PlaceHolder';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as Welcome } from '../../components/
|
|
1
|
+
export { default as Welcome } from '../../components/PlaceHolder';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
export { Welcome };
|
|
1
|
+
import PlaceHolder from "../../components/PlaceHolder/index.js";
|
|
2
|
+
export { PlaceHolder as Welcome };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect, useState } from "react";
|
|
2
|
+
import { useEffect, useRef, useState } from "react";
|
|
3
3
|
import { Popover, PopoverContent, PopoverTrigger } from "../ui/popover.js";
|
|
4
4
|
import { getCsrfToken } from "../../utils/getCsrfToken.js";
|
|
5
5
|
import { getAppId } from "../../utils/getAppId.js";
|
|
@@ -7,6 +7,7 @@ const Component = ()=>{
|
|
|
7
7
|
const [open, setOpen] = useState(false);
|
|
8
8
|
const [userinfo, setUserinfo] = useState(null);
|
|
9
9
|
const [isInternetVisible, setIsInternetVisible] = useState(false);
|
|
10
|
+
const timeoutRef = useRef(null);
|
|
10
11
|
useEffect(()=>{
|
|
11
12
|
fetch(`/spark/b/${getAppId(window.location.pathname)}/tenant_info`, {
|
|
12
13
|
headers: {
|
|
@@ -17,6 +18,7 @@ const Component = ()=>{
|
|
|
17
18
|
setIsInternetVisible(data?.data?.is_internet_visible);
|
|
18
19
|
});
|
|
19
20
|
}, []);
|
|
21
|
+
if ('production' !== process.env.NODE_ENV) return null;
|
|
20
22
|
if (!userinfo) return null;
|
|
21
23
|
return /*#__PURE__*/ jsxs(Popover, {
|
|
22
24
|
open: open,
|
|
@@ -25,9 +27,14 @@ const Component = ()=>{
|
|
|
25
27
|
/*#__PURE__*/ jsx(PopoverTrigger, {
|
|
26
28
|
asChild: true,
|
|
27
29
|
children: /*#__PURE__*/ jsxs("div", {
|
|
28
|
-
className: "fixed right-4 bottom-4 inline-flex items-center gap-x-[4px] px-[12px] py-[6px] bg-[#ffffffcc] shadow-[2px_4px_16px_0px_#00000024] rounded-[99px] text-[var(--token-text-title,#1f2329)] font-['PingFang_SC'] text-[14px] leading-[22px] tracking-[0px] cursor-pointer",
|
|
29
|
-
onMouseEnter: ()=>
|
|
30
|
-
|
|
30
|
+
className: "fixed right-4 bottom-4 inline-flex items-center gap-x-[4px] px-[12px] py-[6px] bg-[#ffffffcc] shadow-[2px_4px_16px_0px_#00000024] rounded-[99px] text-[var(--token-text-title,#1f2329)] font-['PingFang_SC'] text-[14px] leading-[22px] tracking-[0px] cursor-pointer z-[10000000]",
|
|
31
|
+
onMouseEnter: ()=>{
|
|
32
|
+
clearTimeout(timeoutRef.current);
|
|
33
|
+
setOpen(true);
|
|
34
|
+
},
|
|
35
|
+
onMouseLeave: ()=>{
|
|
36
|
+
timeoutRef.current = setTimeout(()=>setOpen(false), 100);
|
|
37
|
+
},
|
|
31
38
|
children: [
|
|
32
39
|
/*#__PURE__*/ jsx("img", {
|
|
33
40
|
src: "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/logo/miaodalogo.svg",
|
|
@@ -45,8 +52,13 @@ const Component = ()=>{
|
|
|
45
52
|
side: "top",
|
|
46
53
|
align: "end",
|
|
47
54
|
sideOffset: 8,
|
|
48
|
-
onMouseEnter: ()=>
|
|
49
|
-
|
|
55
|
+
onMouseEnter: ()=>{
|
|
56
|
+
clearTimeout(timeoutRef.current);
|
|
57
|
+
setOpen(true);
|
|
58
|
+
},
|
|
59
|
+
onMouseLeave: ()=>{
|
|
60
|
+
timeoutRef.current = setTimeout(()=>setOpen(false), 100);
|
|
61
|
+
},
|
|
50
62
|
children: [
|
|
51
63
|
/*#__PURE__*/ jsxs("div", {
|
|
52
64
|
className: "self-stretch px-2 pt-2 pb-1 flex flex-col justify-start items-start gap-1",
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
const PlaceHolder_PlaceHolder = ({ title = '页面待开发', description = '页面暂未开发,请耐心等待...' })=>/*#__PURE__*/ jsxs("center", {
|
|
4
|
+
className: "pt-10 md:pt-9 bg-background p-6 text-center",
|
|
5
|
+
children: [
|
|
6
|
+
/*#__PURE__*/ jsx("center", {
|
|
7
|
+
children: /*#__PURE__*/ jsx("img", {
|
|
8
|
+
className: "rounded-md",
|
|
9
|
+
width: "320",
|
|
10
|
+
height: "200",
|
|
11
|
+
src: "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/miao/welcome.svg",
|
|
12
|
+
alt: "Welcome"
|
|
13
|
+
})
|
|
14
|
+
}),
|
|
15
|
+
/*#__PURE__*/ jsx("div", {
|
|
16
|
+
className: "text-center text-foreground text-base font-medium mb-1 leading-6",
|
|
17
|
+
children: title
|
|
18
|
+
}),
|
|
19
|
+
/*#__PURE__*/ jsx("div", {
|
|
20
|
+
className: "text-center text-muted-foreground text-base leading-6",
|
|
21
|
+
children: description
|
|
22
|
+
})
|
|
23
|
+
]
|
|
24
|
+
});
|
|
25
|
+
const PlaceHolder = PlaceHolder_PlaceHolder;
|
|
26
|
+
export { PlaceHolder as default };
|
package/package.json
CHANGED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
|
-
import "./welcome.css";
|
|
4
|
-
const Welcome = ()=>/*#__PURE__*/ jsxs("div", {
|
|
5
|
-
className: "welcome-page flex flex-col items-center justify-center",
|
|
6
|
-
children: [
|
|
7
|
-
/*#__PURE__*/ jsx("div", {
|
|
8
|
-
className: "text-xl font-bold leading-8 mb-2",
|
|
9
|
-
children: "初始化应用"
|
|
10
|
-
}),
|
|
11
|
-
/*#__PURE__*/ jsx("div", {
|
|
12
|
-
className: "leading-5",
|
|
13
|
-
children: "通过对话搭建你的专属应用"
|
|
14
|
-
})
|
|
15
|
-
]
|
|
16
|
-
});
|
|
17
|
-
const components_Welcome = Welcome;
|
|
18
|
-
export { components_Welcome as default };
|