@camunda/camunda-composite-components 0.2.11-rc.1 → 0.2.11-rc.2
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/components/c3-help-center/c3-help-center-provider.d.ts +1 -2
- package/lib/esm/components/c3-help-center/c3-help-center-provider.js +0 -6
- package/lib/esm/components/c3-navigation/index.js +1 -2
- package/lib/esm/components/c3-user-configuration/c3-user-configuration-provider.js +3 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { FC, PropsWithChildren } from "react";
|
|
2
2
|
export type C3HelpCenterContextValue = {
|
|
3
3
|
openHelpCenter: () => void;
|
|
4
4
|
setIsHelpCenterOpen: (isOpen: boolean) => void;
|
|
@@ -6,5 +6,4 @@ export type C3HelpCenterContextValue = {
|
|
|
6
6
|
};
|
|
7
7
|
export declare const C3HelpCenterContext: React.Context<C3HelpCenterContextValue>;
|
|
8
8
|
export declare const C3HelpCenterProvider: FC<PropsWithChildren>;
|
|
9
|
-
export declare function withHelpCenter<P>(Component: ComponentType<P>): ComponentType<P>;
|
|
10
9
|
export declare const useC3HelpCenter: () => C3HelpCenterContextValue;
|
|
@@ -16,10 +16,4 @@ export const C3HelpCenterProvider = ({ children }) => {
|
|
|
16
16
|
isHelpCenterOpen,
|
|
17
17
|
} }, children));
|
|
18
18
|
};
|
|
19
|
-
export function withHelpCenter(Component) {
|
|
20
|
-
return function WithNamespace(props) {
|
|
21
|
-
return (React.createElement(C3HelpCenterProvider, null,
|
|
22
|
-
React.createElement(Component, { ...props })));
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
19
|
export const useC3HelpCenter = () => React.useContext(C3HelpCenterContext);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { C3Navigation } from "./c3-navigation";
|
|
2
2
|
import { withNotifications } from "./c3-notification-provider/c3-notification-provider";
|
|
3
|
-
|
|
4
|
-
export default withNotifications(withHelpCenter(C3Navigation));
|
|
3
|
+
export default withNotifications(C3Navigation);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useContext, useEffect, useState } from "react";
|
|
2
2
|
import { C3ProfileProvider } from "./c3-profile-provider/c3-profile-provider";
|
|
3
3
|
import { decodeJWT } from "./authToken";
|
|
4
|
+
import { C3HelpCenterProvider } from "../c3-help-center/c3-help-center-provider";
|
|
4
5
|
export const C3UserConfigurationContext = React.createContext({
|
|
5
6
|
stage: "dev",
|
|
6
7
|
activeOrganizationId: "",
|
|
@@ -15,7 +16,8 @@ const C3UserConfigurationProvider = ({ children, ...config }) => {
|
|
|
15
16
|
setDecodedToken(decodeJWT(config.userToken));
|
|
16
17
|
}, [config.userToken]);
|
|
17
18
|
return (React.createElement(C3UserConfigurationContext.Provider, { value: { ...config, decodedToken } },
|
|
18
|
-
React.createElement(C3ProfileProvider, null,
|
|
19
|
+
React.createElement(C3ProfileProvider, null,
|
|
20
|
+
React.createElement(C3HelpCenterProvider, null, children))));
|
|
19
21
|
};
|
|
20
22
|
export const useC3UserConfiguration = () => useContext(C3UserConfigurationContext);
|
|
21
23
|
export default C3UserConfigurationProvider;
|