@camunda/camunda-composite-components 0.2.18-rc.3 → 0.2.18-rc.5
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.
|
@@ -10,7 +10,7 @@ import { resolveTheme, } from "../c3-user-configuration/c3-profile-provider/carb
|
|
|
10
10
|
import { useC3HelpCenter } from "./c3-help-center-provider";
|
|
11
11
|
export const C3HelpCenter = ({ autoStartSurvey, origin, flags, onRequestClose, mixpanelTrack: customMixpanelTrack, onRequestOpen, theme, onPersonaChange, activeTab, }) => {
|
|
12
12
|
const { isHelpCenterOpen: isOpen, setIsHelpCenterOpen } = useC3HelpCenter();
|
|
13
|
-
const { userToken, decodedToken, activeOrganizationId, handleTheme, decodedAudience,
|
|
13
|
+
const { userToken, decodedToken, activeOrganizationId, handleTheme, decodedAudience, analyticsTrack, } = useC3UserConfiguration() || {};
|
|
14
14
|
const { theme: themeConfig, isEnabled, reloadClusters } = useC3Profile();
|
|
15
15
|
const themeHandlingEnabled = isEnabled && !!handleTheme && !!themeConfig;
|
|
16
16
|
const themeRef = useRef();
|
|
@@ -24,8 +24,8 @@ export const C3HelpCenter = ({ autoStartSurvey, origin, flags, onRequestClose, m
|
|
|
24
24
|
if (customMixpanelTrack) {
|
|
25
25
|
customMixpanelTrack(event, data);
|
|
26
26
|
}
|
|
27
|
-
else if (
|
|
28
|
-
|
|
27
|
+
else if (analyticsTrack) {
|
|
28
|
+
analyticsTrack(event, data);
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
useEffect(() => {
|
|
@@ -9,12 +9,12 @@ import { useC3UserConfiguration } from "../../c3-user-configuration/c3-user-conf
|
|
|
9
9
|
const C3OrgSidebar = ({ sideBar }) => {
|
|
10
10
|
const { customElements, switchToOrg, elements, ...sideBarProps } = sideBar;
|
|
11
11
|
const { isOpen, setIsOpen } = useOrgSidebarState();
|
|
12
|
-
const { decodedAudience, setActiveOrgId,
|
|
12
|
+
const { decodedAudience, setActiveOrgId, analyticsTrack } = useC3UserConfiguration();
|
|
13
13
|
const { activeOrg, orgs } = useC3Profile();
|
|
14
14
|
const isCustomized = Boolean(customElements?.activeOrganization);
|
|
15
15
|
const onManageOrg = () => {
|
|
16
16
|
if (!isCustomized) {
|
|
17
|
-
|
|
17
|
+
analyticsTrack?.("navBar:orgSettings:click", { orgId: activeOrg?.uuid });
|
|
18
18
|
}
|
|
19
19
|
if (sideBar.closeOnClick !== false)
|
|
20
20
|
setIsOpen(false);
|
|
@@ -30,11 +30,13 @@ const C3OrgSidebar = ({ sideBar }) => {
|
|
|
30
30
|
};
|
|
31
31
|
const switchOrg = (orgId) => {
|
|
32
32
|
setActiveOrgId(orgId);
|
|
33
|
-
|
|
33
|
+
analyticsTrack?.("navBar:orgSwitch:click", { orgId });
|
|
34
34
|
switchToOrg?.(orgId);
|
|
35
35
|
setIsOpen(false);
|
|
36
36
|
};
|
|
37
|
-
const orgElements = orgs
|
|
37
|
+
const orgElements = orgs
|
|
38
|
+
?.filter(({ uuid }) => uuid !== activeOrg?.uuid)
|
|
39
|
+
.map((org) => ({
|
|
38
40
|
key: org.uuid,
|
|
39
41
|
label: org.name,
|
|
40
42
|
onClick: () => switchOrg(org.uuid),
|
|
@@ -7,7 +7,7 @@ type C3UserConfigurationBase = {
|
|
|
7
7
|
activeOrganizationId: string;
|
|
8
8
|
userToken: string;
|
|
9
9
|
getNewUserToken: () => Promise<string>;
|
|
10
|
-
|
|
10
|
+
analyticsTrack?: MixPanelTrack;
|
|
11
11
|
};
|
|
12
12
|
type C3UserConfigurationWithEndpoints = C3UserConfigurationBase & {
|
|
13
13
|
endpoints: Endpoints;
|
|
@@ -22,7 +22,7 @@ export type C3UserConfigurationContextValue = C3UserConfiguration & {
|
|
|
22
22
|
decodedToken: DecodedToken | null;
|
|
23
23
|
decodedAudience: string | null;
|
|
24
24
|
setActiveOrgId: (newOrg: string) => void;
|
|
25
|
-
|
|
25
|
+
analyticsTrack?: MixPanelTrack;
|
|
26
26
|
};
|
|
27
27
|
export declare const C3UserConfigurationContext: React.Context<C3UserConfigurationContextValue>;
|
|
28
28
|
declare const C3UserConfigurationProvider: FC<C3UserConfiguration & {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camunda/camunda-composite-components",
|
|
3
|
-
"version": "0.2.18-rc.
|
|
3
|
+
"version": "0.2.18-rc.5",
|
|
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.23.
|
|
30
|
-
"@babel/preset-env": "7.
|
|
29
|
+
"@babel/core": "7.23.2",
|
|
30
|
+
"@babel/preset-env": "7.23.2",
|
|
31
31
|
"@babel/preset-react": "7.22.15",
|
|
32
|
-
"@babel/preset-typescript": "7.23.
|
|
32
|
+
"@babel/preset-typescript": "7.23.2",
|
|
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.
|
|
37
|
-
"@storybook/addon-actions": "7.
|
|
38
|
-
"@storybook/addon-docs": "7.
|
|
39
|
-
"@storybook/addon-essentials": "7.
|
|
40
|
-
"@storybook/addon-interactions": "7.
|
|
41
|
-
"@storybook/addon-links": "7.
|
|
42
|
-
"@storybook/blocks": "7.
|
|
36
|
+
"@storybook/addon-a11y": "7.5.1",
|
|
37
|
+
"@storybook/addon-actions": "7.5.1",
|
|
38
|
+
"@storybook/addon-docs": "7.5.1",
|
|
39
|
+
"@storybook/addon-essentials": "7.5.1",
|
|
40
|
+
"@storybook/addon-interactions": "7.5.1",
|
|
41
|
+
"@storybook/addon-links": "7.5.1",
|
|
42
|
+
"@storybook/blocks": "7.5.1",
|
|
43
43
|
"@storybook/preset-scss": "1.0.3",
|
|
44
|
-
"@storybook/react": "7.
|
|
45
|
-
"@storybook/react-webpack5": "7.
|
|
44
|
+
"@storybook/react": "7.5.1",
|
|
45
|
+
"@storybook/react-webpack5": "7.5.1",
|
|
46
46
|
"@storybook/test-runner": "0.13.0",
|
|
47
47
|
"@storybook/testing-library": "0.2.2",
|
|
48
48
|
"@types/carbon-components-react": "7.55.3",
|
|
@@ -52,20 +52,20 @@
|
|
|
52
52
|
"@types/react": "18.2.21",
|
|
53
53
|
"@types/react-dom": "18.2.7",
|
|
54
54
|
"@types/styled-components": "5.1.27",
|
|
55
|
-
"@typescript-eslint/eslint-plugin": "6.
|
|
56
|
-
"@typescript-eslint/parser": "6.
|
|
55
|
+
"@typescript-eslint/eslint-plugin": "6.9.0",
|
|
56
|
+
"@typescript-eslint/parser": "6.9.0",
|
|
57
57
|
"axe-playwright": "1.2.3",
|
|
58
58
|
"babel-loader": "9.1.3",
|
|
59
59
|
"copyfiles": "2.4.1",
|
|
60
60
|
"css-loader": "6.8.1",
|
|
61
|
-
"eslint": "8.
|
|
61
|
+
"eslint": "8.52.0",
|
|
62
62
|
"eslint-config-prettier": "9.0.0",
|
|
63
63
|
"eslint-import-resolver-typescript": "3.6.1",
|
|
64
|
-
"eslint-plugin-import": "2.
|
|
64
|
+
"eslint-plugin-import": "2.29.0",
|
|
65
65
|
"eslint-plugin-prettier": "5.0.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.15",
|
|
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.
|
|
79
|
+
"storybook": "7.5.1",
|
|
80
80
|
"style-loader": "3.3.3",
|
|
81
81
|
"styled-components": "6.0.7",
|
|
82
82
|
"typescript": "5.2.2",
|