@camunda/camunda-composite-components 0.6.4 → 0.7.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/package.json +17 -17
- package/lib/esm/src/api/api.d.ts +7 -1
- package/lib/esm/src/api/api.js +18 -14
- package/lib/esm/src/api/help-center.d.ts +7 -7
- package/lib/esm/src/api/notifications.d.ts +2 -1
- package/lib/esm/src/api/organizations.d.ts +7 -1
- package/lib/esm/src/api/organizations.js +5 -0
- package/lib/esm/src/api/profile.d.ts +3 -2
- package/lib/esm/src/components/c3-app-teaser/c3-app-teaser-page.js +3 -3
- package/lib/esm/src/components/c3-empty-state/c3-empty-state.js +1 -1
- package/lib/esm/src/components/c3-help-center/c3-help-center.js +1 -1
- package/lib/esm/src/components/c3-help-center/help-center.js +19 -12
- package/lib/esm/src/components/c3-help-center/styles.d.ts +0 -1
- package/lib/esm/src/components/c3-help-center/tabs/feedback.js +7 -9
- package/lib/esm/src/components/c3-navigation/c3-navigation-appbar/c3-navigation-appbar.js +8 -2
- package/lib/esm/src/components/c3-navigation/c3-navigation-sidebar/c3-navigation-sidebar-element.d.ts +1 -0
- package/lib/esm/src/components/c3-navigation/c3-navigation-sidebar/c3-navigation-sidebar-element.js +50 -22
- package/lib/esm/src/components/c3-navigation/c3-navigation-sidebar/c3-navigation-sidebar.js +37 -7
- package/lib/esm/src/components/c3-navigation/c3-navigation-sidebar/c3-navigation-sidebar.types.d.ts +1 -0
- package/lib/esm/src/components/c3-navigation/c3-navigation-sidebar/c3-notification-sidebar.js +2 -2
- package/lib/esm/src/components/c3-navigation/c3-navigation-sidebar/c3-sidebar-state-provider.d.ts +2 -0
- package/lib/esm/src/components/c3-navigation/c3-navigation-sidebar/c3-sidebar-state-provider.js +24 -3
- package/lib/esm/src/components/c3-navigation/c3-navigation-sidebar/components.d.ts +0 -1
- package/lib/esm/src/components/c3-navigation/c3-navigation-sidebar/components.js +1 -0
- package/lib/esm/src/components/c3-navigation/c3-navigation.js +37 -10
- package/lib/esm/src/components/c3-navigation/c3-navigation.types.d.ts +5 -2
- package/lib/esm/src/components/c3-navigation/c3-notification-provider/c3-notification-provider.js +8 -6
- package/lib/esm/src/components/c3-navigation/{c3-navigation-sidebar → c3-org-sidebar}/c3-org-sidebar.d.ts +1 -1
- package/lib/esm/src/components/c3-navigation/c3-org-sidebar/c3-org-sidebar.js +125 -0
- package/lib/esm/src/components/c3-navigation/c3-org-sidebar/components.d.ts +24 -0
- package/lib/esm/src/components/c3-navigation/c3-org-sidebar/components.js +64 -0
- package/lib/esm/src/components/c3-navigation/helpers.d.ts +7 -1
- package/lib/esm/src/components/c3-navigation/helpers.js +1 -1
- package/lib/esm/src/components/c3-navigation/stories/story-helpers.d.ts +3 -1
- package/lib/esm/src/components/c3-navigation/stories/story-helpers.js +8 -9
- package/lib/esm/src/components/c3-onboarding-survey/c3-onboarding-survey.js +3 -2
- package/lib/esm/src/components/c3-onboarding-survey/elements/radioGroupSingle.js +7 -5
- package/lib/esm/src/components/c3-onboarding-survey/onboardingModal.d.ts +0 -1
- package/lib/esm/src/components/c3-onboarding-survey/onboardingModal.js +4 -3
- package/lib/esm/src/components/c3-user-configuration/c3-profile-provider/c3-profile-provider.d.ts +1 -0
- package/lib/esm/src/components/c3-user-configuration/c3-profile-provider/c3-profile-provider.js +12 -4
- package/lib/esm/src/utils/camunda.types.d.ts +13 -8
- package/package.json +17 -17
- package/lib/esm/src/components/c3-navigation/c3-navigation-sidebar/c3-org-sidebar.js +0 -85
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
export type CamundaApp = "console" | "modeler" | "tasklist" | "operate" | "optimize";
|
|
2
|
+
type CrudOrgSettings = {
|
|
3
|
+
read: boolean;
|
|
4
|
+
create: boolean;
|
|
5
|
+
update: boolean;
|
|
6
|
+
delete: boolean;
|
|
7
|
+
};
|
|
2
8
|
export type Organization = {
|
|
3
9
|
uuid: string;
|
|
4
10
|
name: string;
|
|
@@ -13,15 +19,13 @@ export type Organization = {
|
|
|
13
19
|
};
|
|
14
20
|
};
|
|
15
21
|
org: {
|
|
16
|
-
billing:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
};
|
|
22
|
-
webide: {
|
|
23
|
-
read: boolean;
|
|
22
|
+
billing: CrudOrgSettings;
|
|
23
|
+
clusters: CrudOrgSettings;
|
|
24
|
+
webide: CrudOrgSettings;
|
|
25
|
+
users: {
|
|
26
|
+
owner: CrudOrgSettings;
|
|
24
27
|
};
|
|
28
|
+
settings: CrudOrgSettings;
|
|
25
29
|
};
|
|
26
30
|
};
|
|
27
31
|
organizationToSalesPlan?: {
|
|
@@ -42,3 +46,4 @@ export type Cluster = {
|
|
|
42
46
|
camunda: string[];
|
|
43
47
|
};
|
|
44
48
|
};
|
|
49
|
+
export {};
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"type": "git",
|
|
5
5
|
"url": "git+https://github.com/camunda-cloud/camunda-composite-components.git"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.7.0",
|
|
8
8
|
"scripts": {
|
|
9
9
|
"clean": "rimraf lib/",
|
|
10
10
|
"build": "yarn clean && tsc",
|
|
@@ -30,29 +30,29 @@
|
|
|
30
30
|
"test": "yarn test:ts && yarn test:storybook && yarn test:visual-regression:docker"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@babel/core": "7.24.
|
|
34
|
-
"@babel/preset-env": "7.24.
|
|
33
|
+
"@babel/core": "7.24.5",
|
|
34
|
+
"@babel/preset-env": "7.24.5",
|
|
35
35
|
"@babel/preset-react": "7.24.1",
|
|
36
36
|
"@babel/preset-typescript": "7.24.1",
|
|
37
|
-
"@carbon/react": "1.
|
|
37
|
+
"@carbon/react": "1.55.0",
|
|
38
38
|
"@mdx-js/react": "3.0.1",
|
|
39
39
|
"@playwright/test": "1.42.1",
|
|
40
40
|
"@semantic-release/changelog": "6.0.3",
|
|
41
41
|
"@semantic-release/git": "10.0.1",
|
|
42
|
-
"@storybook/addon-a11y": "8.0.
|
|
43
|
-
"@storybook/addon-actions": "8.0.
|
|
44
|
-
"@storybook/addon-docs": "8.0.
|
|
45
|
-
"@storybook/addon-essentials": "8.0.
|
|
46
|
-
"@storybook/addon-interactions": "8.0.
|
|
47
|
-
"@storybook/addon-links": "8.0.
|
|
48
|
-
"@storybook/addon-mdx-gfm": "8.0.
|
|
42
|
+
"@storybook/addon-a11y": "8.0.10",
|
|
43
|
+
"@storybook/addon-actions": "8.0.10",
|
|
44
|
+
"@storybook/addon-docs": "8.0.10",
|
|
45
|
+
"@storybook/addon-essentials": "8.0.10",
|
|
46
|
+
"@storybook/addon-interactions": "8.0.10",
|
|
47
|
+
"@storybook/addon-links": "8.0.10",
|
|
48
|
+
"@storybook/addon-mdx-gfm": "8.0.10",
|
|
49
49
|
"@storybook/addon-webpack5-compiler-babel": "3.0.3",
|
|
50
|
-
"@storybook/blocks": "8.0.
|
|
50
|
+
"@storybook/blocks": "8.0.10",
|
|
51
51
|
"@storybook/preset-scss": "1.0.3",
|
|
52
|
-
"@storybook/react": "8.0.
|
|
53
|
-
"@storybook/react-webpack5": "8.0.
|
|
54
|
-
"@storybook/test": "8.0.
|
|
55
|
-
"@storybook/test-runner": "0.
|
|
52
|
+
"@storybook/react": "8.0.10",
|
|
53
|
+
"@storybook/react-webpack5": "8.0.10",
|
|
54
|
+
"@storybook/test": "8.0.10",
|
|
55
|
+
"@storybook/test-runner": "0.18.0",
|
|
56
56
|
"@types/carbon-components-react": "7.55.10",
|
|
57
57
|
"@types/event-source-polyfill": "1.0.5",
|
|
58
58
|
"@types/mixpanel-browser": "2.49.0",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"sass-loader": "14.1.1",
|
|
87
87
|
"semantic-release": "23.0.7",
|
|
88
88
|
"serve": "14.2.1",
|
|
89
|
-
"storybook": "8.0.
|
|
89
|
+
"storybook": "8.0.10",
|
|
90
90
|
"style-loader": "4.0.0",
|
|
91
91
|
"styled-components": "6.1.8",
|
|
92
92
|
"typescript": "5.4.4",
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Button, FormLabel } from "@carbon/react";
|
|
3
|
-
import { Enterprise } from "@carbon/react/icons";
|
|
4
|
-
import C3NavigationSideBar from "./c3-navigation-sidebar";
|
|
5
|
-
import { SwitcherDivider } from "./components";
|
|
6
|
-
import { useOrgSidebarState } from "./c3-sidebar-state-provider";
|
|
7
|
-
import { useC3Profile } from "../../c3-user-configuration/c3-profile-provider/c3-profile-provider";
|
|
8
|
-
import { useC3UserConfiguration } from "../../c3-user-configuration/c3-user-configuration-provider";
|
|
9
|
-
const C3OrgSidebar = ({ sideBar }) => {
|
|
10
|
-
const { customElements, switchToOrg, elements, ...sideBarProps } = sideBar;
|
|
11
|
-
const { isOpen, setIsOpen } = useOrgSidebarState();
|
|
12
|
-
const { domain, analyticsTrack, setActiveOrgId } = useC3UserConfiguration();
|
|
13
|
-
const { activeOrg, orgs } = useC3Profile();
|
|
14
|
-
const isCustomized = Boolean(customElements?.activeOrganization);
|
|
15
|
-
const onManageOrg = () => {
|
|
16
|
-
if (!isCustomized) {
|
|
17
|
-
analyticsTrack?.("navBar:orgSettings:click", { orgId: activeOrg?.uuid });
|
|
18
|
-
}
|
|
19
|
-
if (sideBar.closeOnClick !== false)
|
|
20
|
-
setIsOpen(false);
|
|
21
|
-
};
|
|
22
|
-
const activeOrganization = customElements?.activeOrganization || {
|
|
23
|
-
activeLabel: "Active Organization",
|
|
24
|
-
orgName: activeOrg?.name || "",
|
|
25
|
-
action: {
|
|
26
|
-
onClick: onManageOrg,
|
|
27
|
-
label: "Manage",
|
|
28
|
-
},
|
|
29
|
-
otherLabel: "Other Organizations",
|
|
30
|
-
};
|
|
31
|
-
const switchOrg = (orgId) => {
|
|
32
|
-
setActiveOrgId(orgId);
|
|
33
|
-
analyticsTrack?.("navBar:orgSwitch:click", { orgId });
|
|
34
|
-
switchToOrg?.(orgId);
|
|
35
|
-
setIsOpen(false);
|
|
36
|
-
};
|
|
37
|
-
const orgElements = orgs
|
|
38
|
-
?.filter(({ uuid }) => uuid !== activeOrg?.uuid)
|
|
39
|
-
.map((org) => ({
|
|
40
|
-
key: org.uuid,
|
|
41
|
-
label: org.name,
|
|
42
|
-
onClick: () => switchOrg(org.uuid),
|
|
43
|
-
}));
|
|
44
|
-
const itemTabIndex = isOpen ? undefined : -1;
|
|
45
|
-
return (React.createElement(C3NavigationSideBar, { sideBar: {
|
|
46
|
-
...sideBarProps,
|
|
47
|
-
elements: elements || orgElements,
|
|
48
|
-
ariaLabel: sideBarProps.ariaLabel || "Organization Sidebars",
|
|
49
|
-
}, icon: React.createElement(Enterprise, { size: 20 }) }, (customElements?.activeOrganization || activeOrg) && (React.createElement(React.Fragment, null,
|
|
50
|
-
React.createElement("div", { style: {
|
|
51
|
-
padding: "1rem",
|
|
52
|
-
paddingTop: "1.5rem",
|
|
53
|
-
paddingBottom: ".5rem",
|
|
54
|
-
display: "grid",
|
|
55
|
-
gridAutoFlow: "column",
|
|
56
|
-
gap: ".25rem",
|
|
57
|
-
} },
|
|
58
|
-
React.createElement("div", { style: {
|
|
59
|
-
overflow: "hidden",
|
|
60
|
-
display: "grid",
|
|
61
|
-
gap: "4px",
|
|
62
|
-
} },
|
|
63
|
-
React.createElement(FormLabel, null, activeOrganization.activeLabel),
|
|
64
|
-
React.createElement("div", { className: "textPrimary", style: {
|
|
65
|
-
height: "20px", // Set minimum height to allow decenders to be rendered
|
|
66
|
-
lineHeight: "20px",
|
|
67
|
-
fontSize: "14px",
|
|
68
|
-
textOverflow: "ellipsis",
|
|
69
|
-
overflow: "hidden",
|
|
70
|
-
whiteSpace: "nowrap",
|
|
71
|
-
}, title: activeOrganization.orgName }, activeOrganization.orgName)),
|
|
72
|
-
isCustomized ? (React.createElement(Button, { size: "md", kind: "ghost", onClick: () => {
|
|
73
|
-
activeOrganization.action.onClick();
|
|
74
|
-
onManageOrg();
|
|
75
|
-
}, tabIndex: itemTabIndex }, activeOrganization.action?.label)) : (activeOrg?.uuid &&
|
|
76
|
-
domain && (React.createElement(Button, { as: "a", size: "md", kind: "ghost", key: "org-management", href: `https://console.${domain}/org/${activeOrg?.uuid}/management`, onClick: onManageOrg, tabIndex: itemTabIndex }, activeOrganization.action?.label)))),
|
|
77
|
-
sideBar.elements && sideBar.elements.length > 0 && (React.createElement(React.Fragment, null,
|
|
78
|
-
React.createElement(SwitcherDivider, null),
|
|
79
|
-
React.createElement(FormLabel, { style: {
|
|
80
|
-
paddingTop: ".5rem",
|
|
81
|
-
paddingLeft: "1rem",
|
|
82
|
-
paddingBottom: ".25rem",
|
|
83
|
-
} }, activeOrganization.otherLabel)))))));
|
|
84
|
-
};
|
|
85
|
-
export default C3OrgSidebar;
|