@camunda/camunda-composite-components 0.2.7-rc.1 → 0.2.10-rc1
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/esm/components/c3-navigation/c3-navigation.d.ts +1 -1
- package/lib/esm/components/c3-navigation/c3-navigation.js +2 -2
- package/lib/esm/components/c3-navigation/c3-navigation.types.d.ts +1 -1
- package/lib/esm/components/c3-user-configuration/c3-profile-provider/c3-profile-provider.js +3 -2
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { C3NavigationProps } from "./c3-navigation.types";
|
|
3
|
-
export declare const C3Navigation: ({ app, appBar, forwardRef, navbar, orgSideBar, infoSideBar, infoButton, helpCenter, actionButtons, userSideBar, notificationSideBar, clusterUuid,
|
|
3
|
+
export declare const C3Navigation: ({ app, appBar, forwardRef, navbar, orgSideBar, infoSideBar, infoButton, helpCenter, actionButtons, userSideBar, notificationSideBar, clusterUuid, options, }: C3NavigationProps) => React.JSX.Element;
|
|
@@ -37,7 +37,7 @@ const ClusterTagWrapper = styled.div `
|
|
|
37
37
|
padding: 0 1rem;
|
|
38
38
|
}
|
|
39
39
|
`;
|
|
40
|
-
export const C3Navigation = ({ app, appBar, forwardRef, navbar, orgSideBar, infoSideBar, infoButton, helpCenter, actionButtons, userSideBar, notificationSideBar, clusterUuid,
|
|
40
|
+
export const C3Navigation = ({ app, appBar, forwardRef, navbar, orgSideBar, infoSideBar, infoButton, helpCenter, actionButtons, userSideBar, notificationSideBar, clusterUuid, options, }) => {
|
|
41
41
|
const isLargeScreen = useMediaQuery(`(min-width: ${BREAKPOINT_LG_WIDTH}`);
|
|
42
42
|
const appBarElementsLength = appBar.elements?.length ?? 0;
|
|
43
43
|
const displayAppBar = appBarElementsLength > 0 || (!isLargeScreen && navbar.elements.length > 0);
|
|
@@ -88,7 +88,7 @@ export const C3Navigation = ({ app, appBar, forwardRef, navbar, orgSideBar, info
|
|
|
88
88
|
}, type: tag.color }, tag.label));
|
|
89
89
|
}),
|
|
90
90
|
clusterUuid && (React.createElement(ClusterTagWrapper, null,
|
|
91
|
-
React.createElement(C3ClusterTag, { clusterUuid: clusterUuid, conditionalRendering:
|
|
91
|
+
React.createElement(C3ClusterTag, { clusterUuid: clusterUuid, conditionalRendering: options?.conditionalTagRendering }))),
|
|
92
92
|
navbar.orgName && (React.createElement("div", { className: "bodyText", style: {
|
|
93
93
|
fontSize: "14px",
|
|
94
94
|
lineHeight: "3rem",
|
|
@@ -66,7 +66,7 @@ export interface C3NavigationProps {
|
|
|
66
66
|
navbar: C3NavigationNavBarProps;
|
|
67
67
|
forwardRef?: React.ForwardRefExoticComponent<any>;
|
|
68
68
|
clusterUuid?: string;
|
|
69
|
-
|
|
69
|
+
options?: {
|
|
70
70
|
conditionalTagRendering?: (stage: CamundaClusterStage) => boolean;
|
|
71
71
|
};
|
|
72
72
|
}
|
|
@@ -18,8 +18,9 @@ export const C3ProfileProvider = ({ children }) => {
|
|
|
18
18
|
const [resolvedTheme, setResolvedTheme] = useState(defaultTheme);
|
|
19
19
|
const [clusters, setClusters] = useState(null);
|
|
20
20
|
useEffect(() => {
|
|
21
|
-
if (!decodedToken)
|
|
21
|
+
if (!decodedToken) {
|
|
22
22
|
return;
|
|
23
|
+
}
|
|
23
24
|
const { audience } = decodedToken;
|
|
24
25
|
const decodedAudience = typeof audience === "string" ? audience : audience?.[0];
|
|
25
26
|
if (decodedAudience) {
|
|
@@ -27,7 +28,7 @@ export const C3ProfileProvider = ({ children }) => {
|
|
|
27
28
|
setClusters(res);
|
|
28
29
|
});
|
|
29
30
|
}
|
|
30
|
-
}, [config?.userToken, config?.activeOrganizationId]);
|
|
31
|
+
}, [config?.userToken, config?.activeOrganizationId, decodedToken]);
|
|
31
32
|
useEffect(() => {
|
|
32
33
|
const updateSystemTheme = ({ matches }) => {
|
|
33
34
|
if (themeRef.current === "system")
|