datastake-daf 0.6.243 → 0.6.244
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/components/index.js +759 -619
- package/dist/utils/index.js +525 -494
- package/package.json +1 -1
- package/src/@daf/core/components/Dashboard/Map/helper.js +1 -0
- package/src/@daf/core/components/Dashboard/Map/hook.js +1 -3
- package/src/@daf/core/components/Dashboard/Widget/SDGWidget/index.jsx +3 -3
- package/src/@daf/core/components/EditForm/components/Smart/index.js +93 -0
- package/src/@daf/core/components/EditForm/helper.js +3290 -2732
- package/src/@daf/core/components/EditForm/storyConfig.js +1 -1
- package/src/@daf/core/components/EditForm/storyConfig2.js +5 -58
- package/src/@daf/core/components/Icon/configs/Lightning.js +14 -0
- package/src/@daf/core/components/Icon/configs/index.js +3 -2
- package/src/@daf/core/components/ViewForm/components/input.js +3 -1
package/package.json
CHANGED
|
@@ -285,7 +285,6 @@ export const useMap = ({
|
|
|
285
285
|
if (mapRef) {
|
|
286
286
|
if (type === "chain") {
|
|
287
287
|
mapRef.on("zoomend", handleZoomChange);
|
|
288
|
-
mapRef.on("movestart", destroyAllPopovers);
|
|
289
288
|
}
|
|
290
289
|
}
|
|
291
290
|
|
|
@@ -293,11 +292,10 @@ export const useMap = ({
|
|
|
293
292
|
if (mapRef) {
|
|
294
293
|
if (type === "chain") {
|
|
295
294
|
mapRef.off("zoomend", handleZoomChange);
|
|
296
|
-
mapRef.off("movestart", destroyAllPopovers);
|
|
297
295
|
}
|
|
298
296
|
}
|
|
299
297
|
};
|
|
300
|
-
}, [mapRef, markerWithPopup]);
|
|
298
|
+
}, [mapRef, markerWithPopup, type]);
|
|
301
299
|
|
|
302
300
|
useEffect(() => {
|
|
303
301
|
if (mapRef) {
|
|
@@ -35,12 +35,12 @@ export default function SDGWidget({
|
|
|
35
35
|
|
|
36
36
|
const SDGContainer = styled.div`
|
|
37
37
|
display: grid;
|
|
38
|
-
grid-template-columns: repeat(auto-fit, minmax(
|
|
38
|
+
grid-template-columns: repeat(auto-fit, minmax(53px, 1fr));
|
|
39
39
|
gap: 8px;
|
|
40
40
|
|
|
41
41
|
.sdg-item {
|
|
42
|
-
height:
|
|
43
|
-
width:
|
|
42
|
+
height: 53px;
|
|
43
|
+
width: 53px;
|
|
44
44
|
border-radius: 8px;
|
|
45
45
|
background-size: cover;
|
|
46
46
|
background-position: center;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import CustomIcon from "../../../Icon/CustomIcon.jsx";
|
|
2
|
+
import { theme } from "antd";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import Widget from "../../../Dashboard/Widget/index.jsx";
|
|
5
|
+
const { useToken } = theme;
|
|
6
|
+
export default function Smart() {
|
|
7
|
+
const { token } = useToken();
|
|
8
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
9
|
+
return (
|
|
10
|
+
<div
|
|
11
|
+
style={{
|
|
12
|
+
border: "1px solid #E5E7EB",
|
|
13
|
+
width: "100%",
|
|
14
|
+
borderRadius: "4px",
|
|
15
|
+
boxShadow:
|
|
16
|
+
"0px 1px 2px 0px #00000008, 0px 1px 6px -1px #00000005, 0px 2px 4px 0px #00000005",
|
|
17
|
+
}}
|
|
18
|
+
>
|
|
19
|
+
<div
|
|
20
|
+
style={{
|
|
21
|
+
display: "flex",
|
|
22
|
+
alignItems: "center",
|
|
23
|
+
gap: "8px",
|
|
24
|
+
padding: "8px",
|
|
25
|
+
}}
|
|
26
|
+
onClick={() => setIsOpen(!isOpen)}
|
|
27
|
+
>
|
|
28
|
+
<CustomIcon name="Lightning" size={16} color={token.colorPrimary7} />
|
|
29
|
+
<span style={{ marginRight: "auto" }}>Smart Help</span>
|
|
30
|
+
<div>
|
|
31
|
+
<CustomIcon
|
|
32
|
+
name="ChevronRight"
|
|
33
|
+
size={12}
|
|
34
|
+
color={token.colorPrimary7}
|
|
35
|
+
style={{
|
|
36
|
+
transform: isOpen ? "rotate(90deg)" : "rotate(0deg)",
|
|
37
|
+
transition: "transform 0.3s ease-in-out",
|
|
38
|
+
}}
|
|
39
|
+
/>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
{isOpen && (
|
|
43
|
+
<div
|
|
44
|
+
style={{
|
|
45
|
+
padding: "8px",
|
|
46
|
+
display: "flex",
|
|
47
|
+
flexDirection: "column",
|
|
48
|
+
gap: "12px",
|
|
49
|
+
}}
|
|
50
|
+
>
|
|
51
|
+
<span
|
|
52
|
+
style={{
|
|
53
|
+
paddingLeft: "4px",
|
|
54
|
+
color: "#6C737F",
|
|
55
|
+
fontFamily: "SF UI Display",
|
|
56
|
+
fontWeight: "500",
|
|
57
|
+
fontStyle: "Medium",
|
|
58
|
+
fontSize: "14px",
|
|
59
|
+
leadingTrim: "NONE",
|
|
60
|
+
lineHeight: "20px",
|
|
61
|
+
letterSpacing: "0%",
|
|
62
|
+
}}
|
|
63
|
+
>
|
|
64
|
+
The information available here has been identified as matching the
|
|
65
|
+
requirements of this question.
|
|
66
|
+
</span>
|
|
67
|
+
<SmartWidget label="Operational Activities" icon="AimOutlined" link="Link" />
|
|
68
|
+
<SmartWidget label="Monitoring Activities" icon="Eye" link="Link" />
|
|
69
|
+
<SmartWidget label="Project Locations" icon="DashboardLocations" link="Link" />
|
|
70
|
+
<SmartWidget label="Documents & Media" icon="DashboardDocuments" link="Link" />
|
|
71
|
+
</div>
|
|
72
|
+
)}
|
|
73
|
+
</div>
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function SmartWidget({ label, icon, link }) {
|
|
78
|
+
const { token } = useToken();
|
|
79
|
+
return (
|
|
80
|
+
<Widget noTitle className={"no-p-body p-xs"}>
|
|
81
|
+
<div style={{ display: "flex", alignItems: "center", gap: "8px" }}>
|
|
82
|
+
<CustomIcon name={icon} size={16} color={"#384250"} />
|
|
83
|
+
<span style={{ marginRight: "auto" }}>{label}</span>
|
|
84
|
+
<CustomIcon
|
|
85
|
+
name={link}
|
|
86
|
+
size={16}
|
|
87
|
+
color={token.baseGray50}
|
|
88
|
+
style={{ cursor: "not-allowed" }}
|
|
89
|
+
/>
|
|
90
|
+
</div>
|
|
91
|
+
</Widget>
|
|
92
|
+
);
|
|
93
|
+
}
|