@trackunit/react-core-hooks 0.2.53 → 0.2.55

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/index.cjs CHANGED
@@ -93,6 +93,24 @@ const useGlobalSelection = () => {
93
93
  */
94
94
  const GlobalSelectionProvider = (props) => jsxRuntime.jsx(GlobalSelectionContext.Provider, Object.assign({}, props));
95
95
 
96
+ const OemBrandingContext = React.createContext(null);
97
+ /**
98
+ * This is a hook to use the IOemBrandingContext.
99
+ */
100
+ const useOemBrandingContext = () => {
101
+ const context = React.useContext(OemBrandingContext);
102
+ if (!context) {
103
+ throw new Error("useOemBranding must be used within an IOemBrandingContext");
104
+ }
105
+ return context;
106
+ };
107
+ /**
108
+ * This is a provider for the IOemBrandingContext.
109
+ */
110
+ const OemBrandingContextProvider = (props) => {
111
+ return jsxRuntime.jsx(OemBrandingContext.Provider, Object.assign({}, props));
112
+ };
113
+
96
114
  /**
97
115
  * A react hook for notifying host about location changes
98
116
  */
@@ -307,6 +325,7 @@ exports.AssetSortingProvider = AssetSortingProvider;
307
325
  exports.CurrentUserProvider = CurrentUserProvider;
308
326
  exports.EnvironmentContextProvider = EnvironmentContextProvider;
309
327
  exports.GlobalSelectionProvider = GlobalSelectionProvider;
328
+ exports.OemBrandingContextProvider = OemBrandingContextProvider;
310
329
  exports.ToastProvider = ToastProvider;
311
330
  exports.TokenProvider = TokenProvider;
312
331
  exports.UserSubscriptionProvider = UserSubscriptionProvider;
@@ -319,6 +338,7 @@ exports.useCustomFieldRuntimeForEntity = useCustomFieldRuntimeForEntity;
319
338
  exports.useEnvironment = useEnvironment;
320
339
  exports.useGlobalSelection = useGlobalSelection;
321
340
  exports.useNavigationRuntime = useNavigationRuntime;
341
+ exports.useOemBrandingContext = useOemBrandingContext;
322
342
  exports.useRestRuntime = useRestRuntime;
323
343
  exports.useSiteRuntime = useSiteRuntime;
324
344
  exports.useToast = useToast;
package/index.js CHANGED
@@ -67,6 +67,24 @@ const useGlobalSelection = () => {
67
67
  */
68
68
  const GlobalSelectionProvider = (props) => jsx(GlobalSelectionContext.Provider, Object.assign({}, props));
69
69
 
70
+ const OemBrandingContext = createContext(null);
71
+ /**
72
+ * This is a hook to use the IOemBrandingContext.
73
+ */
74
+ const useOemBrandingContext = () => {
75
+ const context = useContext(OemBrandingContext);
76
+ if (!context) {
77
+ throw new Error("useOemBranding must be used within an IOemBrandingContext");
78
+ }
79
+ return context;
80
+ };
81
+ /**
82
+ * This is a provider for the IOemBrandingContext.
83
+ */
84
+ const OemBrandingContextProvider = (props) => {
85
+ return jsx(OemBrandingContext.Provider, Object.assign({}, props));
86
+ };
87
+
70
88
  /**
71
89
  * A react hook for notifying host about location changes
72
90
  */
@@ -275,4 +293,4 @@ const useCurrentUser = () => {
275
293
  return context;
276
294
  };
277
295
 
278
- export { AnalyticsContext, AnalyticsContextProvider, AssetSortingProvider, CurrentUserProvider, EnvironmentContextProvider, GlobalSelectionProvider, ToastProvider, TokenProvider, UserSubscriptionProvider, useAnalytics, useAssetRuntime, useAssetSorting, useCurrentUser, useCustomFieldRuntime, useCustomFieldRuntimeForEntity, useEnvironment, useGlobalSelection, useNavigationRuntime, useRestRuntime, useSiteRuntime, useToast, useToken, useURLSynchronization, useUserSubscription };
296
+ export { AnalyticsContext, AnalyticsContextProvider, AssetSortingProvider, CurrentUserProvider, EnvironmentContextProvider, GlobalSelectionProvider, OemBrandingContextProvider, ToastProvider, TokenProvider, UserSubscriptionProvider, useAnalytics, useAssetRuntime, useAssetSorting, useCurrentUser, useCustomFieldRuntime, useCustomFieldRuntimeForEntity, useEnvironment, useGlobalSelection, useNavigationRuntime, useOemBrandingContext, useRestRuntime, useSiteRuntime, useToast, useToken, useURLSynchronization, useUserSubscription };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-core-hooks",
3
- "version": "0.2.53",
3
+ "version": "0.2.55",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "module": "./index.js",
@@ -8,9 +8,9 @@
8
8
  "type": "module",
9
9
  "types": "./src/index.d.ts",
10
10
  "dependencies": {
11
- "@trackunit/iris-app-runtime-core": "0.3.40",
12
- "@trackunit/iris-app-runtime-core-api": "0.3.34",
13
- "@trackunit/react-core-contexts-api": "0.2.31",
11
+ "@trackunit/iris-app-runtime-core": "0.3.42",
12
+ "@trackunit/iris-app-runtime-core-api": "0.3.36",
13
+ "@trackunit/react-core-contexts-api": "0.2.33",
14
14
  "react": "18.2.0",
15
15
  "react-router-dom": "6.4.5"
16
16
  },
package/src/index.d.ts CHANGED
@@ -2,6 +2,7 @@ export * from "./analytics/AnalyticsProvider";
2
2
  export * from "./assetSorting/AssetSortingProvider";
3
3
  export * from "./environment/EnvironmentContextProvider";
4
4
  export * from "./global-selection/GlobalSelectionProvider";
5
+ export * from "./irisOemApp/IrisOemAppContextProvider";
5
6
  export * from "./runtimes/navigation";
6
7
  export * from "./runtimes/navigation/useNavigationRuntime";
7
8
  export * from "./runtimes/useAssetRuntime";
@@ -0,0 +1,15 @@
1
+ /// <reference types="react" />
2
+ import { IOemBrandingContext } from "@trackunit/react-core-contexts-api";
3
+ /**
4
+ * This is a hook to use the IOemBrandingContext.
5
+ */
6
+ export declare const useOemBrandingContext: () => IOemBrandingContext;
7
+ interface IProps {
8
+ value: IOemBrandingContext;
9
+ children?: React.ReactNode;
10
+ }
11
+ /**
12
+ * This is a provider for the IOemBrandingContext.
13
+ */
14
+ export declare const OemBrandingContextProvider: (props: IProps) => JSX.Element;
15
+ export {};