@camunda/camunda-composite-components 0.3.1-rc.6 → 0.3.1-rc.7
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.
|
@@ -18,6 +18,7 @@ export const C3HelpCenterProvider = ({ children }) => {
|
|
|
18
18
|
const openHelpCenter = (showTabId) => {
|
|
19
19
|
if (!isHelpCenterOpen) {
|
|
20
20
|
setIsHelpCenterOpen(true);
|
|
21
|
+
setShowHint(false);
|
|
21
22
|
}
|
|
22
23
|
if (showTabId)
|
|
23
24
|
setActiveTabId(showTabId);
|
|
@@ -26,11 +27,13 @@ export const C3HelpCenterProvider = ({ children }) => {
|
|
|
26
27
|
if (!isHelpCenterOpen) {
|
|
27
28
|
setActiveTabId(null);
|
|
28
29
|
if (showHintOnClose) {
|
|
30
|
+
console.log("showing hint and hiding after");
|
|
29
31
|
setShowHint(true);
|
|
30
32
|
setShowHintOnClose(false);
|
|
31
33
|
}
|
|
32
34
|
}
|
|
33
35
|
}, [isHelpCenterOpen]);
|
|
36
|
+
console.log("showHintOnClose", showHintOnClose);
|
|
34
37
|
return (React.createElement(C3HelpCenterContext.Provider, { value: {
|
|
35
38
|
openHelpCenter,
|
|
36
39
|
setIsHelpCenterOpen,
|
|
@@ -4,7 +4,7 @@ import { useC3HelpCenter } from "./c3-help-center-provider";
|
|
|
4
4
|
export const HelpCenterHint = ({ children }) => {
|
|
5
5
|
const { showHint, setShowHint, hintType } = useC3HelpCenter();
|
|
6
6
|
console.log("showHint", showHint);
|
|
7
|
-
return
|
|
7
|
+
return (React.createElement(Toggletip, { defaultOpen: showHint,
|
|
8
8
|
// eslint-disable-next-line
|
|
9
9
|
// @ts-ignore
|
|
10
10
|
align: "bottom-right" },
|
|
@@ -14,5 +14,5 @@ export const HelpCenterHint = ({ children }) => {
|
|
|
14
14
|
? "Access the help center at any time to see your recommendations, discover guides, tutorials, or to share feedback."
|
|
15
15
|
: "Access the onboarding survey to get personalized next steps and educational content"),
|
|
16
16
|
React.createElement(ToggletipActions, null,
|
|
17
|
-
React.createElement(Button, { size: "sm", onClick: () => setShowHint(false) }, "Got it")))))
|
|
17
|
+
React.createElement(Button, { size: "sm", onClick: () => setShowHint(false) }, "Got it")))));
|
|
18
18
|
};
|
|
@@ -41,7 +41,7 @@ const ClusterTagWrapper = styled.div `
|
|
|
41
41
|
}
|
|
42
42
|
`;
|
|
43
43
|
export const C3Navigation = ({ app, appBar, forwardRef, navbar, orgSideBar, infoSideBar, infoButton, helpCenter, actionButtons, userSideBar, notificationSideBar, clusterUuid, options, }) => {
|
|
44
|
-
const {
|
|
44
|
+
const { openHelpCenter } = useC3HelpCenter();
|
|
45
45
|
const { activeOrg } = useC3Profile();
|
|
46
46
|
const isLargeScreen = useMediaQuery(`(min-width: ${BREAKPOINT_LG_WIDTH}`);
|
|
47
47
|
const appBarElementsLength = appBar.elements?.length ?? 0;
|
|
@@ -112,9 +112,7 @@ export const C3Navigation = ({ app, appBar, forwardRef, navbar, orgSideBar, info
|
|
|
112
112
|
type: "org",
|
|
113
113
|
} })),
|
|
114
114
|
infoButton || helpCenter ? (React.createElement(HelpCenterHint, null,
|
|
115
|
-
React.createElement(InfoButton, { onClick: infoButton
|
|
116
|
-
? infoButton.onClick
|
|
117
|
-
: () => setIsHelpCenterOpen(!isHelpCenterOpen) }))) : (infoSideBar && (React.createElement(C3InfoSidebar, { sideBar: { ...infoSideBar, type: "info" } }))),
|
|
115
|
+
React.createElement(InfoButton, { onClick: infoButton ? infoButton.onClick : openHelpCenter }))) : (infoSideBar && (React.createElement(C3InfoSidebar, { sideBar: { ...infoSideBar, type: "info" } }))),
|
|
118
116
|
userSideBar && (React.createElement(C3UserSidebar, { sideBar: {
|
|
119
117
|
...userSideBar,
|
|
120
118
|
type: "user",
|