@camunda/camunda-composite-components 0.6.1 → 0.6.3-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/package.json +36 -34
- package/lib/esm/src/api/help-center.d.ts +1 -4
- package/lib/esm/src/api/help-center.js +2 -10
- package/lib/esm/src/components/c3-help-center/help-center.js +22 -5
- package/lib/esm/src/components/c3-navigation/c3-navigation-appbar/c3-navigation-appbar.js +1 -1
- package/lib/esm/src/components/c3-navigation/c3-navigation-sidebar/c3-navigation-sidebar-element.d.ts +1 -1
- package/lib/esm/src/components/c3-navigation/stories/story-templates.d.ts +2 -2
- package/lib/esm/src/components/c3-onboarding-survey/defaultOnboardingConfig.d.ts +4 -0
- package/lib/esm/src/components/c3-onboarding-survey/onboardingModal.d.ts +9 -9
- package/lib/esm/src/components/c3-onboarding-survey/onboardingPage.d.ts +9 -9
- package/lib/esm/src/components/c3-onboarding-survey/onboardingSurvey.js +12 -3
- package/lib/esm/src/components/c3-user-configuration/c3-profile-provider/c3-profile-provider.js +2 -1
- package/lib/esm/src/components/c3-user-configuration/c3-user-configuration-provider.js +1 -1
- package/lib/esm/src/components/test-utils.js +2 -2
- package/package.json +36 -34
package/lib/esm/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.6.
|
|
7
|
+
"version": "0.6.2",
|
|
8
8
|
"scripts": {
|
|
9
9
|
"clean": "rimraf lib/",
|
|
10
10
|
"build": "yarn clean && tsc",
|
|
@@ -30,64 +30,66 @@
|
|
|
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.
|
|
35
|
-
"@babel/preset-react": "7.
|
|
36
|
-
"@babel/preset-typescript": "7.
|
|
37
|
-
"@carbon/react": "1.
|
|
33
|
+
"@babel/core": "7.24.4",
|
|
34
|
+
"@babel/preset-env": "7.24.4",
|
|
35
|
+
"@babel/preset-react": "7.24.1",
|
|
36
|
+
"@babel/preset-typescript": "7.24.1",
|
|
37
|
+
"@carbon/react": "1.54.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": "
|
|
43
|
-
"@storybook/addon-actions": "
|
|
44
|
-
"@storybook/addon-docs": "
|
|
45
|
-
"@storybook/addon-essentials": "
|
|
46
|
-
"@storybook/addon-interactions": "
|
|
47
|
-
"@storybook/addon-links": "
|
|
48
|
-
"@storybook/
|
|
42
|
+
"@storybook/addon-a11y": "8.0.8",
|
|
43
|
+
"@storybook/addon-actions": "8.0.8",
|
|
44
|
+
"@storybook/addon-docs": "8.0.8",
|
|
45
|
+
"@storybook/addon-essentials": "8.0.8",
|
|
46
|
+
"@storybook/addon-interactions": "8.0.8",
|
|
47
|
+
"@storybook/addon-links": "8.0.8",
|
|
48
|
+
"@storybook/addon-mdx-gfm": "8.0.8",
|
|
49
|
+
"@storybook/addon-webpack5-compiler-babel": "3.0.3",
|
|
50
|
+
"@storybook/blocks": "8.0.8",
|
|
49
51
|
"@storybook/preset-scss": "1.0.3",
|
|
50
|
-
"@storybook/react": "
|
|
51
|
-
"@storybook/react-webpack5": "
|
|
52
|
+
"@storybook/react": "8.0.8",
|
|
53
|
+
"@storybook/react-webpack5": "8.0.8",
|
|
54
|
+
"@storybook/test": "8.0.8",
|
|
52
55
|
"@storybook/test-runner": "0.17.0",
|
|
53
|
-
"@storybook/testing-library": "0.2.2",
|
|
54
56
|
"@types/carbon-components-react": "7.55.10",
|
|
55
57
|
"@types/event-source-polyfill": "1.0.5",
|
|
56
58
|
"@types/mixpanel-browser": "2.49.0",
|
|
57
|
-
"@types/node": "20.
|
|
58
|
-
"@types/react": "18.2.
|
|
59
|
-
"@types/react-dom": "18.2.
|
|
59
|
+
"@types/node": "20.12.4",
|
|
60
|
+
"@types/react": "18.2.74",
|
|
61
|
+
"@types/react-dom": "18.2.24",
|
|
60
62
|
"@types/styled-components": "5.1.34",
|
|
61
|
-
"@typescript-eslint/eslint-plugin": "
|
|
62
|
-
"@typescript-eslint/parser": "
|
|
63
|
-
"axe-playwright": "
|
|
63
|
+
"@typescript-eslint/eslint-plugin": "7.4.0",
|
|
64
|
+
"@typescript-eslint/parser": "7.4.0",
|
|
65
|
+
"axe-playwright": "2.0.1",
|
|
64
66
|
"babel-loader": "9.1.3",
|
|
65
67
|
"conventional-changelog-conventionalcommits": "7.0.2",
|
|
66
68
|
"copyfiles": "2.4.1",
|
|
67
|
-
"css-loader": "
|
|
68
|
-
"eslint": "8.
|
|
69
|
+
"css-loader": "7.1.0",
|
|
70
|
+
"eslint": "8.57.0",
|
|
69
71
|
"eslint-config-prettier": "9.1.0",
|
|
70
72
|
"eslint-import-resolver-typescript": "3.6.1",
|
|
71
73
|
"eslint-plugin-import": "2.29.1",
|
|
72
74
|
"eslint-plugin-prettier": "5.1.3",
|
|
73
|
-
"eslint-plugin-react": "7.
|
|
75
|
+
"eslint-plugin-react": "7.34.1",
|
|
74
76
|
"eslint-plugin-react-hooks": "4.6.0",
|
|
75
77
|
"eslint-plugin-storybook": "0.8.0",
|
|
76
78
|
"event-source-polyfill": "1.0.31",
|
|
77
|
-
"husky": "9.0.
|
|
79
|
+
"husky": "9.0.11",
|
|
78
80
|
"mixpanel-browser": "2.49.0",
|
|
79
|
-
"prettier": "3.2.
|
|
81
|
+
"prettier": "3.2.5",
|
|
80
82
|
"react": "18.2.0",
|
|
81
83
|
"react-dom": "18.2.0",
|
|
82
84
|
"rimraf": "5.0.5",
|
|
83
|
-
"sass": "1.
|
|
84
|
-
"sass-loader": "
|
|
85
|
-
"semantic-release": "23.0.
|
|
85
|
+
"sass": "1.74.1",
|
|
86
|
+
"sass-loader": "14.1.1",
|
|
87
|
+
"semantic-release": "23.0.7",
|
|
86
88
|
"serve": "14.2.1",
|
|
87
|
-
"storybook": "
|
|
88
|
-
"style-loader": "
|
|
89
|
+
"storybook": "8.0.8",
|
|
90
|
+
"style-loader": "4.0.0",
|
|
89
91
|
"styled-components": "6.1.8",
|
|
90
|
-
"typescript": "5.4.
|
|
92
|
+
"typescript": "5.4.4",
|
|
91
93
|
"wait-on": "7.2.0",
|
|
92
94
|
"webpack": "5.91.0"
|
|
93
95
|
},
|
|
@@ -110,5 +112,5 @@
|
|
|
110
112
|
],
|
|
111
113
|
"author": "Camunda",
|
|
112
114
|
"license": "Apache-2.0",
|
|
113
|
-
"packageManager": "yarn@4.
|
|
115
|
+
"packageManager": "yarn@4.1.1"
|
|
114
116
|
}
|
|
@@ -3,17 +3,14 @@ import { Persona, TileConfig, WpCardType } from "../components/c3-help-center/c3
|
|
|
3
3
|
import { OnboardingConfig } from "../components/c3-onboarding-survey/defaultOnboardingConfig";
|
|
4
4
|
import { RequestPayload } from "./api";
|
|
5
5
|
export declare const getConfig: (accessToken: string, audience: string, orgId: string) => Promise<HelpCenterConfig | null>;
|
|
6
|
-
export declare const getTiles: ({ accessToken, tileConfig, salesPlanType, clusterIds,
|
|
6
|
+
export declare const getTiles: ({ accessToken, tileConfig, salesPlanType, clusterIds, persona, flags, cloudAudience, }: {
|
|
7
7
|
accessToken: string;
|
|
8
8
|
tileConfig: TileConfig[];
|
|
9
9
|
cloudAudience: string;
|
|
10
|
-
domain: string;
|
|
11
10
|
persona: {
|
|
12
11
|
[id: string]: unknown;
|
|
13
12
|
};
|
|
14
13
|
clusterIds: string[];
|
|
15
|
-
email: string;
|
|
16
|
-
currentOrgId: string;
|
|
17
14
|
salesPlanType: string;
|
|
18
15
|
flags: string[];
|
|
19
16
|
}) => Promise<WpCardType[]>;
|
|
@@ -8,21 +8,13 @@ export const getConfig = async (accessToken, audience, orgId) => {
|
|
|
8
8
|
},
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
export const getTiles = async ({ accessToken, tileConfig, salesPlanType, clusterIds,
|
|
11
|
+
export const getTiles = async ({ accessToken, tileConfig, salesPlanType, clusterIds, persona, flags, cloudAudience, }) => {
|
|
12
12
|
const availableTileTypes = recommendations(persona, flags, tileConfig, salesPlanType, clusterIds?.length > 0);
|
|
13
|
-
|
|
13
|
+
return await request({
|
|
14
14
|
url: `https://helpcenter.${cloudAudience}/cards?card_id=${availableTileTypes.join(",")}`,
|
|
15
15
|
responseType: "json",
|
|
16
16
|
camundaAuth: { token: accessToken },
|
|
17
17
|
});
|
|
18
|
-
cards = cards.map((card) => {
|
|
19
|
-
card.link = card.link?.replaceAll("{cloudAudience}", domain);
|
|
20
|
-
card.link = card.link?.replaceAll("{currentOrgId}", currentOrgId);
|
|
21
|
-
card.link = card.link?.replaceAll("{clusterId}", clusterIds[0]);
|
|
22
|
-
card.link = card.link?.replaceAll("{email}", email);
|
|
23
|
-
return card;
|
|
24
|
-
});
|
|
25
|
-
return cards;
|
|
26
18
|
};
|
|
27
19
|
export const getOnboardingConfig = ({ camundaAuth, audience, orgId, }) => request({
|
|
28
20
|
url: `https://helpcenter.${audience}/survey/config/${orgId}`,
|
|
@@ -14,8 +14,10 @@ export const HelpCenter = ({ configuration, persona, email, audience, flags = []
|
|
|
14
14
|
const firstTab = tabs[0].id;
|
|
15
15
|
const { userToken: token, activeOrganizationId, domain, } = useC3UserConfiguration();
|
|
16
16
|
const { activeOrg: organization, clusters } = useC3Profile();
|
|
17
|
+
const clusterIds = (clusters || []).map((cluster) => cluster.uuid);
|
|
17
18
|
const { showTabId } = useC3HelpCenter();
|
|
18
19
|
const [activeTab, setActiveTab] = useState(firstTab);
|
|
20
|
+
const [rawTabTiles, setRawTabTiles] = useState({});
|
|
19
21
|
const [tabTiles, setTabTiles] = useState({});
|
|
20
22
|
const [isLoadingTiles, setIsLoadingTiles] = useState(false);
|
|
21
23
|
let header = "";
|
|
@@ -30,11 +32,8 @@ export const HelpCenter = ({ configuration, persona, email, audience, flags = []
|
|
|
30
32
|
tiles[singleTab.id] = await getTiles({
|
|
31
33
|
tileConfig: singleTab.tiles,
|
|
32
34
|
cloudAudience: audience,
|
|
33
|
-
domain: domain || "",
|
|
34
35
|
persona,
|
|
35
|
-
clusterIds
|
|
36
|
-
email,
|
|
37
|
-
currentOrgId: activeOrganizationId ?? "",
|
|
36
|
+
clusterIds,
|
|
38
37
|
salesPlanType: organization?.salesPlan?.type ?? "",
|
|
39
38
|
flags,
|
|
40
39
|
accessToken: token,
|
|
@@ -42,7 +41,7 @@ export const HelpCenter = ({ configuration, persona, email, audience, flags = []
|
|
|
42
41
|
}
|
|
43
42
|
}
|
|
44
43
|
setIsLoadingTiles(false);
|
|
45
|
-
|
|
44
|
+
setRawTabTiles(tiles);
|
|
46
45
|
})();
|
|
47
46
|
}, [
|
|
48
47
|
token,
|
|
@@ -52,6 +51,24 @@ export const HelpCenter = ({ configuration, persona, email, audience, flags = []
|
|
|
52
51
|
JSON.stringify(clusters),
|
|
53
52
|
JSON.stringify(tabs),
|
|
54
53
|
]);
|
|
54
|
+
useEffect(() => {
|
|
55
|
+
if (!tabs || !rawTabTiles)
|
|
56
|
+
return;
|
|
57
|
+
const tiles = {};
|
|
58
|
+
for (const tab of tabs) {
|
|
59
|
+
if (rawTabTiles[tab.id])
|
|
60
|
+
tiles[tab.id] =
|
|
61
|
+
rawTabTiles[tab.id]?.map((card) => {
|
|
62
|
+
if (domain)
|
|
63
|
+
card.link = card.link?.replaceAll("{cloudAudience}", domain);
|
|
64
|
+
card.link = card.link?.replaceAll("{currentOrgId}", activeOrganizationId);
|
|
65
|
+
card.link = card.link?.replaceAll("{clusterId}", clusterIds[0]);
|
|
66
|
+
card.link = card.link?.replaceAll("{email}", email);
|
|
67
|
+
return card;
|
|
68
|
+
}) || [];
|
|
69
|
+
}
|
|
70
|
+
setTabTiles(tiles);
|
|
71
|
+
}, [JSON.stringify(rawTabTiles), email, domain]);
|
|
55
72
|
useEffect(() => {
|
|
56
73
|
setActiveTab(initialTab ?? firstTab);
|
|
57
74
|
}, [initialTab]);
|
|
@@ -76,7 +76,7 @@ export const C3NavigationAppBar = ({ app: appProps, appBar, forwardRef, navbar,
|
|
|
76
76
|
defaultElements.push(element);
|
|
77
77
|
});
|
|
78
78
|
setAppElements(defaultElements);
|
|
79
|
-
}, [JSON.stringify(clusters), currentApp]);
|
|
79
|
+
}, [JSON.stringify(clusters), currentApp, domain]);
|
|
80
80
|
const appBarElements = appBar.elements || (clusters ? appElements : null);
|
|
81
81
|
return (React.createElement(React.Fragment, null,
|
|
82
82
|
React.createElement(HeaderGlobalAction, { ref: iconRef, "aria-label": "Camunda components", isActive: appBarOpen, onClick: () => {
|
|
@@ -4,7 +4,7 @@ import React from "react";
|
|
|
4
4
|
declare const C3NavigationSidebarElement: (props: {
|
|
5
5
|
element: C3NavigationElementProps;
|
|
6
6
|
index: number;
|
|
7
|
-
itemTabIndex?: number
|
|
7
|
+
itemTabIndex?: number;
|
|
8
8
|
sideBar: C3NavigationSideBarProps;
|
|
9
9
|
setSideBarOpen: (open: boolean) => void;
|
|
10
10
|
}) => React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FC } from "react";
|
|
2
2
|
import { C3Navigation } from "../c3-navigation";
|
|
3
|
-
import {
|
|
4
|
-
export declare const DefaultTemplate:
|
|
3
|
+
import { StoryFn } from "@storybook/react";
|
|
4
|
+
export declare const DefaultTemplate: StoryFn<typeof C3Navigation>;
|
|
5
5
|
export declare const SuperUserToggle: FC<{
|
|
6
6
|
isActive?: boolean;
|
|
7
7
|
onChange?: (newValue: boolean) => void;
|
|
@@ -5,21 +5,21 @@ export declare const StyledModalBody: FC<ModalBodyProps>;
|
|
|
5
5
|
export declare const OnboardingModal: ({ isDoingAsyncWork, heading, headingLabel, primaryButtonText, primaryButtonDisabled, secondaryButtonText, tertiaryButtonText, loadingText, error, danger, theme, onRequestClose, onSecondary, onPrimary, onTertiary, children, }: {
|
|
6
6
|
isDoingAsyncWork: boolean;
|
|
7
7
|
heading: string;
|
|
8
|
-
headingLabel?: string
|
|
8
|
+
headingLabel?: string;
|
|
9
9
|
primaryButtonText: string;
|
|
10
|
-
primaryButtonDisabled?: boolean
|
|
11
|
-
secondaryButtonText?: string
|
|
12
|
-
tertiaryButtonText?: string
|
|
10
|
+
primaryButtonDisabled?: boolean;
|
|
11
|
+
secondaryButtonText?: string;
|
|
12
|
+
tertiaryButtonText?: string;
|
|
13
13
|
loadingText: string;
|
|
14
14
|
error?: {
|
|
15
15
|
title: string;
|
|
16
16
|
description: string;
|
|
17
|
-
}
|
|
18
|
-
danger?: boolean
|
|
17
|
+
};
|
|
18
|
+
danger?: boolean;
|
|
19
19
|
theme: string;
|
|
20
20
|
onRequestClose: (skip: boolean) => void;
|
|
21
|
-
onSecondary?: (
|
|
22
|
-
onPrimary?: (
|
|
23
|
-
onTertiary?: (
|
|
21
|
+
onSecondary?: () => void;
|
|
22
|
+
onPrimary?: () => void;
|
|
23
|
+
onTertiary?: () => void;
|
|
24
24
|
children?: React.ReactNode;
|
|
25
25
|
}) => JSX.Element;
|
|
@@ -2,19 +2,19 @@ import React from "react";
|
|
|
2
2
|
export declare const OnboardingPage: ({ isDoingAsyncWork, heading, headingLabel, primaryButtonText, primaryButtonDisabled, secondaryButtonText, tertiaryButtonText, loadingText, error, danger, onSecondary, onPrimary, onTertiary, children, }: {
|
|
3
3
|
isDoingAsyncWork: boolean;
|
|
4
4
|
heading: string;
|
|
5
|
-
headingLabel?: string
|
|
5
|
+
headingLabel?: string;
|
|
6
6
|
primaryButtonText: string;
|
|
7
|
-
primaryButtonDisabled?: boolean
|
|
8
|
-
secondaryButtonText?: string
|
|
9
|
-
tertiaryButtonText?: string
|
|
7
|
+
primaryButtonDisabled?: boolean;
|
|
8
|
+
secondaryButtonText?: string;
|
|
9
|
+
tertiaryButtonText?: string;
|
|
10
10
|
loadingText: string;
|
|
11
11
|
error?: {
|
|
12
12
|
title: string;
|
|
13
13
|
description: string;
|
|
14
|
-
}
|
|
15
|
-
danger?: boolean
|
|
16
|
-
onSecondary?: (
|
|
17
|
-
onPrimary?: (
|
|
18
|
-
onTertiary?: (
|
|
14
|
+
};
|
|
15
|
+
danger?: boolean;
|
|
16
|
+
onSecondary?: () => void;
|
|
17
|
+
onPrimary?: () => void;
|
|
18
|
+
onTertiary?: () => void;
|
|
19
19
|
children?: React.ReactNode;
|
|
20
20
|
}) => JSX.Element;
|
|
@@ -120,15 +120,24 @@ export const OnboardingSurvey = ({ appTheme, persona, userFirstName, syncPersona
|
|
|
120
120
|
theme = "dark";
|
|
121
121
|
}
|
|
122
122
|
const content = (React.createElement(React.Fragment, null,
|
|
123
|
-
React.createElement(Body01, null,
|
|
123
|
+
React.createElement(Body01, null, isLoadingConfig
|
|
124
|
+
? ""
|
|
125
|
+
: onboardingConfiguration?.header?.description ||
|
|
126
|
+
"Get personalized next steps and educational content by answering this 1-minute survey."),
|
|
124
127
|
React.createElement(Stack, { gap: 8 },
|
|
125
128
|
React.createElement(ProgressIndicator, { currentIndex: step, spaceEqually: true, onChange: tryStepTo }, isLoadingConfig ? (React.createElement(Loading, null)) : (onboardingConfiguration.steps.map((currentStep, index) => (React.createElement(ProgressStep, { label: `Step ${index + 1}`, secondaryLabel: currentStep.title, key: `onboarding-step-${index}`, disabled: step !== index }))))),
|
|
126
129
|
React.createElement(OnboardingStep, { theme: theme, generic: generic, setGeneric: setGeneric, config: onboardingConfiguration.steps[step] }))));
|
|
127
130
|
if (modal) {
|
|
128
|
-
return (React.createElement(OnboardingModal, { isDoingAsyncWork: isDoingAsyncWork, heading:
|
|
131
|
+
return (React.createElement(OnboardingModal, { isDoingAsyncWork: isDoingAsyncWork, heading: isLoadingConfig
|
|
132
|
+
? ""
|
|
133
|
+
: onboardingConfiguration.header?.title ||
|
|
134
|
+
`Welcome to Camunda, ${userFirstName}!`, headingLabel: "", primaryButtonText: "Next", primaryButtonDisabled: !nextEnabled(step), secondaryButtonText: step === 0 ? undefined : "Previous", tertiaryButtonText: step === 0 ? "Skip customization" : undefined, loadingText: "Loading", theme: theme, onPrimary: stepForward, onRequestClose: onRequestClose, onSecondary: secondaryButtonAction, onTertiary: step === 0 ? secondaryButtonAction : undefined }, content));
|
|
129
135
|
}
|
|
130
136
|
else {
|
|
131
137
|
return (React.createElement(React.Fragment, null,
|
|
132
|
-
React.createElement(OnboardingPage, { isDoingAsyncWork: isDoingAsyncWork, heading:
|
|
138
|
+
React.createElement(OnboardingPage, { isDoingAsyncWork: isDoingAsyncWork, heading: isLoadingConfig
|
|
139
|
+
? ""
|
|
140
|
+
: onboardingConfiguration?.header?.title ||
|
|
141
|
+
`Welcome to Camunda, ${userFirstName}!`, headingLabel: "", primaryButtonText: "Next", primaryButtonDisabled: !nextEnabled(step), secondaryButtonText: step === 0 ? undefined : "Previous", tertiaryButtonText: step === 0 ? "Skip customization" : undefined, loadingText: "Loading", onPrimary: stepForward, onSecondary: secondaryButtonAction, onTertiary: step === 0 ? secondaryButtonAction : undefined }, content)));
|
|
133
142
|
}
|
|
134
143
|
};
|
package/lib/esm/src/components/c3-user-configuration/c3-profile-provider/c3-profile-provider.js
CHANGED
|
@@ -15,7 +15,7 @@ export const C3ProfileContext = createContext({
|
|
|
15
15
|
onThemeChange: () => undefined,
|
|
16
16
|
});
|
|
17
17
|
export const C3ProfileProvider = ({ children }) => {
|
|
18
|
-
const { decodedToken, decodedAudience, ...config } = useContext(C3UserConfigurationContext);
|
|
18
|
+
const { decodedToken, decodedAudience, analyticsTrack, ...config } = useContext(C3UserConfigurationContext);
|
|
19
19
|
const isEnabled = !!config;
|
|
20
20
|
const themeRef = useRef(getUserTheme(config.userToken) || defaultTheme);
|
|
21
21
|
const [resolvedTheme, setResolvedTheme] = useState(defaultTheme);
|
|
@@ -85,6 +85,7 @@ export const C3ProfileProvider = ({ children }) => {
|
|
|
85
85
|
themeRef.current = newTheme;
|
|
86
86
|
setResolvedTheme(resolveTheme(newTheme));
|
|
87
87
|
updateTheme({ ...config, theme: newTheme });
|
|
88
|
+
analyticsTrack?.("theme:update", { value: newTheme });
|
|
88
89
|
}
|
|
89
90
|
};
|
|
90
91
|
if (!isEnabled)
|
|
@@ -35,7 +35,7 @@ const C3UserConfigurationProvider = ({ children, activeOrganizationId, ...config
|
|
|
35
35
|
setDomain(config.noCloudInUrl
|
|
36
36
|
? decodedAudience.replace("cloud.", "")
|
|
37
37
|
: decodedAudience);
|
|
38
|
-
}, [decodedAudience]);
|
|
38
|
+
}, [decodedAudience, config.noCloudInUrl]);
|
|
39
39
|
return (React.createElement(C3UserConfigurationContext.Provider, { value: {
|
|
40
40
|
...config,
|
|
41
41
|
activeOrganizationId: activeOrgId,
|
|
@@ -4,13 +4,13 @@ const STORYBOOK_DIR = path.resolve(__dirname, "../../storybook-static/");
|
|
|
4
4
|
/** Load Storybook story for Playwright testing */
|
|
5
5
|
export async function getStory(page, storyID) {
|
|
6
6
|
// Load stories.json
|
|
7
|
-
const storiesManifestPath = path.resolve(STORYBOOK_DIR, "
|
|
7
|
+
const storiesManifestPath = path.resolve(STORYBOOK_DIR, "index.json");
|
|
8
8
|
if (!fs.existsSync(storiesManifestPath)) {
|
|
9
9
|
throw new Error("Could not find storybook-static/stories.json. Try rebuilding with `yarn build:storybook`");
|
|
10
10
|
}
|
|
11
11
|
const storiesManifest = JSON.parse(fs.readFileSync(storiesManifestPath, "utf8"));
|
|
12
12
|
// Find the specified story
|
|
13
|
-
const story = storiesManifest.
|
|
13
|
+
const story = storiesManifest.entries[storyID];
|
|
14
14
|
if (!story) {
|
|
15
15
|
throw new Error(`Could not find story ID "${storyID}".`);
|
|
16
16
|
}
|
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.6.
|
|
7
|
+
"version": "0.6.3-rc.0",
|
|
8
8
|
"scripts": {
|
|
9
9
|
"clean": "rimraf lib/",
|
|
10
10
|
"build": "yarn clean && tsc",
|
|
@@ -30,64 +30,66 @@
|
|
|
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.
|
|
35
|
-
"@babel/preset-react": "7.
|
|
36
|
-
"@babel/preset-typescript": "7.
|
|
37
|
-
"@carbon/react": "1.
|
|
33
|
+
"@babel/core": "7.24.4",
|
|
34
|
+
"@babel/preset-env": "7.24.4",
|
|
35
|
+
"@babel/preset-react": "7.24.1",
|
|
36
|
+
"@babel/preset-typescript": "7.24.1",
|
|
37
|
+
"@carbon/react": "1.54.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": "
|
|
43
|
-
"@storybook/addon-actions": "
|
|
44
|
-
"@storybook/addon-docs": "
|
|
45
|
-
"@storybook/addon-essentials": "
|
|
46
|
-
"@storybook/addon-interactions": "
|
|
47
|
-
"@storybook/addon-links": "
|
|
48
|
-
"@storybook/
|
|
42
|
+
"@storybook/addon-a11y": "8.0.8",
|
|
43
|
+
"@storybook/addon-actions": "8.0.8",
|
|
44
|
+
"@storybook/addon-docs": "8.0.8",
|
|
45
|
+
"@storybook/addon-essentials": "8.0.8",
|
|
46
|
+
"@storybook/addon-interactions": "8.0.8",
|
|
47
|
+
"@storybook/addon-links": "8.0.8",
|
|
48
|
+
"@storybook/addon-mdx-gfm": "8.0.8",
|
|
49
|
+
"@storybook/addon-webpack5-compiler-babel": "3.0.3",
|
|
50
|
+
"@storybook/blocks": "8.0.8",
|
|
49
51
|
"@storybook/preset-scss": "1.0.3",
|
|
50
|
-
"@storybook/react": "
|
|
51
|
-
"@storybook/react-webpack5": "
|
|
52
|
+
"@storybook/react": "8.0.8",
|
|
53
|
+
"@storybook/react-webpack5": "8.0.8",
|
|
54
|
+
"@storybook/test": "8.0.8",
|
|
52
55
|
"@storybook/test-runner": "0.17.0",
|
|
53
|
-
"@storybook/testing-library": "0.2.2",
|
|
54
56
|
"@types/carbon-components-react": "7.55.10",
|
|
55
57
|
"@types/event-source-polyfill": "1.0.5",
|
|
56
58
|
"@types/mixpanel-browser": "2.49.0",
|
|
57
|
-
"@types/node": "20.
|
|
58
|
-
"@types/react": "18.2.
|
|
59
|
-
"@types/react-dom": "18.2.
|
|
59
|
+
"@types/node": "20.12.4",
|
|
60
|
+
"@types/react": "18.2.74",
|
|
61
|
+
"@types/react-dom": "18.2.24",
|
|
60
62
|
"@types/styled-components": "5.1.34",
|
|
61
|
-
"@typescript-eslint/eslint-plugin": "
|
|
62
|
-
"@typescript-eslint/parser": "
|
|
63
|
-
"axe-playwright": "
|
|
63
|
+
"@typescript-eslint/eslint-plugin": "7.4.0",
|
|
64
|
+
"@typescript-eslint/parser": "7.4.0",
|
|
65
|
+
"axe-playwright": "2.0.1",
|
|
64
66
|
"babel-loader": "9.1.3",
|
|
65
67
|
"conventional-changelog-conventionalcommits": "7.0.2",
|
|
66
68
|
"copyfiles": "2.4.1",
|
|
67
|
-
"css-loader": "
|
|
68
|
-
"eslint": "8.
|
|
69
|
+
"css-loader": "7.1.0",
|
|
70
|
+
"eslint": "8.57.0",
|
|
69
71
|
"eslint-config-prettier": "9.1.0",
|
|
70
72
|
"eslint-import-resolver-typescript": "3.6.1",
|
|
71
73
|
"eslint-plugin-import": "2.29.1",
|
|
72
74
|
"eslint-plugin-prettier": "5.1.3",
|
|
73
|
-
"eslint-plugin-react": "7.
|
|
75
|
+
"eslint-plugin-react": "7.34.1",
|
|
74
76
|
"eslint-plugin-react-hooks": "4.6.0",
|
|
75
77
|
"eslint-plugin-storybook": "0.8.0",
|
|
76
78
|
"event-source-polyfill": "1.0.31",
|
|
77
|
-
"husky": "9.0.
|
|
79
|
+
"husky": "9.0.11",
|
|
78
80
|
"mixpanel-browser": "2.49.0",
|
|
79
|
-
"prettier": "3.2.
|
|
81
|
+
"prettier": "3.2.5",
|
|
80
82
|
"react": "18.2.0",
|
|
81
83
|
"react-dom": "18.2.0",
|
|
82
84
|
"rimraf": "5.0.5",
|
|
83
|
-
"sass": "1.
|
|
84
|
-
"sass-loader": "
|
|
85
|
-
"semantic-release": "23.0.
|
|
85
|
+
"sass": "1.74.1",
|
|
86
|
+
"sass-loader": "14.1.1",
|
|
87
|
+
"semantic-release": "23.0.7",
|
|
86
88
|
"serve": "14.2.1",
|
|
87
|
-
"storybook": "
|
|
88
|
-
"style-loader": "
|
|
89
|
+
"storybook": "8.0.8",
|
|
90
|
+
"style-loader": "4.0.0",
|
|
89
91
|
"styled-components": "6.1.8",
|
|
90
|
-
"typescript": "5.4.
|
|
92
|
+
"typescript": "5.4.4",
|
|
91
93
|
"wait-on": "7.2.0",
|
|
92
94
|
"webpack": "5.91.0"
|
|
93
95
|
},
|
|
@@ -110,5 +112,5 @@
|
|
|
110
112
|
],
|
|
111
113
|
"author": "Camunda",
|
|
112
114
|
"license": "Apache-2.0",
|
|
113
|
-
"packageManager": "yarn@4.
|
|
115
|
+
"packageManager": "yarn@4.1.1"
|
|
114
116
|
}
|