@camunda/camunda-composite-components 0.2.10-rc1 → 0.2.11-rc.0
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/api/help-center.js +2 -2
- package/lib/esm/components/c3-cluster-tag/c3-cluster-tag.js +2 -1
- package/lib/esm/components/c3-help-center/c3-help-center.types.d.ts +2 -4
- package/lib/esm/components/c3-help-center/help-center.js +3 -5
- package/lib/esm/components/c3-navigation/c3-navigation.js +7 -2
- package/lib/esm/components/c3-navigation/c3-navigation.types.d.ts +3 -1
- package/package.json +14 -14
|
@@ -5,7 +5,7 @@ export const getOrg = async (stage, accessToken, orgId) => {
|
|
|
5
5
|
headers.Authorization = `Bearer ${accessToken}`;
|
|
6
6
|
headers["Content-Type"] = "application/json";
|
|
7
7
|
try {
|
|
8
|
-
const response = await fetch(`https://accounts.${stage}/
|
|
8
|
+
const response = await fetch(`https://accounts.${stage}/external/organizations/my`, {
|
|
9
9
|
method: "GET",
|
|
10
10
|
headers,
|
|
11
11
|
});
|
|
@@ -22,7 +22,7 @@ export const getClusters = async (stage, accessToken, orgId) => {
|
|
|
22
22
|
headers.Authorization = `Bearer ${accessToken}`;
|
|
23
23
|
headers["Content-Type"] = "application/json";
|
|
24
24
|
try {
|
|
25
|
-
const response = await fetch(`https://console.${stage}/
|
|
25
|
+
const response = await fetch(`https://console.${stage}/external/organizations/${orgId}/clusters`, {
|
|
26
26
|
method: "GET",
|
|
27
27
|
headers,
|
|
28
28
|
});
|
|
@@ -11,7 +11,8 @@ export const C3ClusterTag = (props) => {
|
|
|
11
11
|
};
|
|
12
12
|
function generateFromInput(props) {
|
|
13
13
|
const foundCluster = props.allClusters?.find((cluster) => cluster.uuid === props.clusterUuid);
|
|
14
|
-
if (foundCluster?.labels?.camunda &&
|
|
14
|
+
if (foundCluster?.labels?.camunda &&
|
|
15
|
+
foundCluster?.labels?.camunda?.length > 0) {
|
|
15
16
|
const label = foundCluster.labels.camunda[0];
|
|
16
17
|
return getColorForStage(label) &&
|
|
17
18
|
props.conditionalRendering(label) ? (React.createElement(Tag, { type: getColorForStage(label) }, label)) : (React.createElement(React.Fragment, null));
|
|
@@ -42,8 +42,7 @@ export const HelpCenter = ({ configuration, organization, persona, email, audien
|
|
|
42
42
|
clusterIds: clusters.map((cluster) => cluster.uuid),
|
|
43
43
|
email,
|
|
44
44
|
currentOrgId: organization?.uuid ?? "",
|
|
45
|
-
salesPlanType: organization?.
|
|
46
|
-
"",
|
|
45
|
+
salesPlanType: organization?.salesPlan?.type ?? "",
|
|
47
46
|
flags,
|
|
48
47
|
accessToken: token,
|
|
49
48
|
});
|
|
@@ -60,7 +59,7 @@ export const HelpCenter = ({ configuration, organization, persona, email, audien
|
|
|
60
59
|
header = "Share your feedback";
|
|
61
60
|
content = (React.createElement(Feedback, { audience: audience, theme: theme, mixpanelTrack: mixpanelTrack, setHeader: (head) => {
|
|
62
61
|
header = head;
|
|
63
|
-
}, salesPlanType: organization?.
|
|
62
|
+
}, salesPlanType: organization?.salesPlan?.type ?? "" }));
|
|
64
63
|
}
|
|
65
64
|
else if (activeTab === "recommendations" &&
|
|
66
65
|
Object.keys(tabTiles).length === 0 &&
|
|
@@ -107,8 +106,7 @@ export const HelpCenter = ({ configuration, organization, persona, email, audien
|
|
|
107
106
|
else {
|
|
108
107
|
return undefined;
|
|
109
108
|
}
|
|
110
|
-
})(), origin: origin, type: tab?.tiletype || "grid", tiles: tabTiles[activeTab], mixpanelTrack: mixpanelTrack, salesPlanType: organization?.
|
|
111
|
-
"" }));
|
|
109
|
+
})(), origin: origin, type: tab?.tiletype || "grid", tiles: tabTiles[activeTab], mixpanelTrack: mixpanelTrack, salesPlanType: organization?.salesPlan?.type ?? "" }));
|
|
112
110
|
}
|
|
113
111
|
}
|
|
114
112
|
const tabBar = [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Header, HeaderContainer, HeaderGlobalBar, HeaderMenuItem, HeaderName, HeaderNavigation, SkipToContent, Tag, Toggletip, ToggletipButton, ToggletipContent, Stack as CarbonStack, } from "@carbon/react";
|
|
2
|
-
import React, { useState } from "react";
|
|
2
|
+
import React, { useEffect, useState } from "react";
|
|
3
3
|
import C3InfoSidebar from "./c3-navigation-sidebar/c3-info-sidebar";
|
|
4
4
|
import { C3NotificationSidebar } from "./c3-navigation-sidebar/c3-notification-sidebar";
|
|
5
5
|
import C3OrgSidebar from "./c3-navigation-sidebar/c3-org-sidebar";
|
|
@@ -43,7 +43,12 @@ export const C3Navigation = ({ app, appBar, forwardRef, navbar, orgSideBar, info
|
|
|
43
43
|
const displayAppBar = appBarElementsLength > 0 || (!isLargeScreen && navbar.elements.length > 0);
|
|
44
44
|
if (app.prefix)
|
|
45
45
|
console.warn("The `prefix` prop is deprecated and will be removed in a future release. It has been replaced with a Camunda icon.");
|
|
46
|
-
const [isHelpCenterOpen, setIsHelpCenterOpen] = useState(false);
|
|
46
|
+
const [isHelpCenterOpen, setIsHelpCenterOpen] = useState(helpCenter?.isOpen ?? false);
|
|
47
|
+
useEffect(() => {
|
|
48
|
+
if (helpCenter?.isOpen) {
|
|
49
|
+
setIsHelpCenterOpen(true);
|
|
50
|
+
}
|
|
51
|
+
}, [helpCenter?.isOpen]);
|
|
47
52
|
return (React.createElement(C3SidebarStateProvider, { isNotificationSidebarOpen: notificationSideBar?.isOpen, isOrgSidebarOpen: orgSideBar?.isOpen, isInfoSidebarOpen: infoSideBar?.isOpen, isUserSidebarOpen: userSideBar?.isOpen },
|
|
48
53
|
React.createElement(HeaderContainer, { render: () => {
|
|
49
54
|
return (React.createElement(Header, { "aria-label": app.ariaLabel },
|
|
@@ -59,7 +59,9 @@ export interface C3NavigationProps {
|
|
|
59
59
|
infoButton?: {
|
|
60
60
|
onClick: () => void;
|
|
61
61
|
};
|
|
62
|
-
helpCenter?: Omit<C3HelpCenterProps, "isOpen"
|
|
62
|
+
helpCenter?: Omit<C3HelpCenterProps, "isOpen"> & {
|
|
63
|
+
isOpen?: boolean;
|
|
64
|
+
};
|
|
63
65
|
actionButtons?: C3ActionButtonsProps;
|
|
64
66
|
userSideBar?: WithoutType<C3NavigationUserSideBarProps>;
|
|
65
67
|
notificationSideBar?: WithoutType<C3NavigationNotificationsSideBarProps>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camunda/camunda-composite-components",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.11-rc.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"clean": "rimraf lib/",
|
|
6
6
|
"build": "yarn clean && tsc",
|
|
@@ -26,23 +26,23 @@
|
|
|
26
26
|
"test": "yarn test:ts && yarn test:storybook && yarn test:visual-regression:docker"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@babel/core": "7.22.
|
|
30
|
-
"@babel/preset-env": "7.22.
|
|
29
|
+
"@babel/core": "7.22.20",
|
|
30
|
+
"@babel/preset-env": "7.22.20",
|
|
31
31
|
"@babel/preset-react": "7.22.15",
|
|
32
32
|
"@babel/preset-typescript": "7.22.15",
|
|
33
33
|
"@carbon/react": "1.37.0",
|
|
34
34
|
"@mdx-js/react": "2.3.0",
|
|
35
35
|
"@playwright/test": "1.37.1",
|
|
36
|
-
"@storybook/addon-a11y": "7.4.
|
|
37
|
-
"@storybook/addon-actions": "7.4.
|
|
38
|
-
"@storybook/addon-docs": "7.4.
|
|
39
|
-
"@storybook/addon-essentials": "7.4.
|
|
40
|
-
"@storybook/addon-interactions": "7.4.
|
|
41
|
-
"@storybook/addon-links": "7.4.
|
|
42
|
-
"@storybook/blocks": "7.4.
|
|
36
|
+
"@storybook/addon-a11y": "7.4.5",
|
|
37
|
+
"@storybook/addon-actions": "7.4.5",
|
|
38
|
+
"@storybook/addon-docs": "7.4.5",
|
|
39
|
+
"@storybook/addon-essentials": "7.4.5",
|
|
40
|
+
"@storybook/addon-interactions": "7.4.5",
|
|
41
|
+
"@storybook/addon-links": "7.4.5",
|
|
42
|
+
"@storybook/blocks": "7.4.5",
|
|
43
43
|
"@storybook/preset-scss": "1.0.3",
|
|
44
|
-
"@storybook/react": "7.4.
|
|
45
|
-
"@storybook/react-webpack5": "7.4.
|
|
44
|
+
"@storybook/react": "7.4.5",
|
|
45
|
+
"@storybook/react-webpack5": "7.4.5",
|
|
46
46
|
"@storybook/test-runner": "0.13.0",
|
|
47
47
|
"@storybook/testing-library": "0.2.1",
|
|
48
48
|
"@types/carbon-components-react": "7.55.3",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"eslint-plugin-prettier": "4.2.1",
|
|
66
66
|
"eslint-plugin-react": "7.33.2",
|
|
67
67
|
"eslint-plugin-react-hooks": "4.6.0",
|
|
68
|
-
"eslint-plugin-storybook": "0.6.
|
|
68
|
+
"eslint-plugin-storybook": "0.6.14",
|
|
69
69
|
"event-source-polyfill": "1.0.31",
|
|
70
70
|
"husky": "8.0.3",
|
|
71
71
|
"mixpanel-browser": "2.47.0",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"sass": "1.66.1",
|
|
77
77
|
"sass-loader": "13.3.2",
|
|
78
78
|
"serve": "14.2.1",
|
|
79
|
-
"storybook": "7.4.
|
|
79
|
+
"storybook": "7.4.5",
|
|
80
80
|
"style-loader": "3.3.3",
|
|
81
81
|
"styled-components": "6.0.7",
|
|
82
82
|
"typescript": "5.2.2",
|