@camunda/camunda-composite-components 0.2.16 → 0.2.17-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.
|
@@ -20,6 +20,7 @@ export const C3HelpCenter = ({ autoStartSurvey, origin, flags, onRequestClose, m
|
|
|
20
20
|
const [helpCenterConfig, setHelpCenterConfig] = useState(defaultHelpCenterConfig);
|
|
21
21
|
const [email, setEmail] = useState("");
|
|
22
22
|
const [showSurvey, setShowSurvey] = useState(autoStartSurvey);
|
|
23
|
+
const shouldOpen = autoStartSurvey && persona && !persona.wasShown;
|
|
23
24
|
const shouldShowSurvey = showSurvey || !persona?.wasShown;
|
|
24
25
|
useEffect(() => {
|
|
25
26
|
const updateResolvedTheme = ({ matches }) => {
|
|
@@ -64,8 +65,9 @@ export const C3HelpCenter = ({ autoStartSurvey, origin, flags, onRequestClose, m
|
|
|
64
65
|
setEmail(meta.email);
|
|
65
66
|
if (userId)
|
|
66
67
|
setUserId(userId);
|
|
67
|
-
if (
|
|
68
|
-
|
|
68
|
+
if (shouldOpen) {
|
|
69
|
+
if (shouldShowSurvey)
|
|
70
|
+
setShowSurvey(true);
|
|
69
71
|
setIsHelpCenterOpen(true);
|
|
70
72
|
onRequestOpen?.();
|
|
71
73
|
}
|
|
@@ -25,4 +25,4 @@ export declare function createUserSideBarProps(options: {
|
|
|
25
25
|
export declare function createNotificationSideBarProps(options: {
|
|
26
26
|
isOpen: boolean;
|
|
27
27
|
}): C3NavigationProps["notificationSideBar"];
|
|
28
|
-
export declare const createHelpCenterProps: (options?: C3HelpCenterProps) => C3NavigationProps["helpCenter"];
|
|
28
|
+
export declare const createHelpCenterProps: (options?: Partial<C3HelpCenterProps>) => C3NavigationProps["helpCenter"];
|
|
@@ -215,5 +215,6 @@ export function createNotificationSideBarProps(options) {
|
|
|
215
215
|
export const createHelpCenterProps = (options) => ({
|
|
216
216
|
origin: options?.origin || "console",
|
|
217
217
|
theme: options?.theme,
|
|
218
|
+
autoStartSurvey: options?.autoStartSurvey,
|
|
218
219
|
mixpanelTrack: (event, data) => console.log(`Mixpanel event ${event} tracked: ${data}`),
|
|
219
220
|
});
|