@trackunit/react-core-hooks 0.2.267 → 0.2.269
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.js
CHANGED
|
@@ -369,9 +369,9 @@ const useIrisAppImage = () => {
|
|
|
369
369
|
};
|
|
370
370
|
};
|
|
371
371
|
|
|
372
|
-
const
|
|
372
|
+
const OEMBrandingService = React.createContext(null);
|
|
373
373
|
/**
|
|
374
|
-
* This is a hook to use the
|
|
374
|
+
* This is a hook to use the OemBrandingContext.
|
|
375
375
|
*
|
|
376
376
|
* @requires OemBrandingContextProvider
|
|
377
377
|
* @example
|
|
@@ -379,20 +379,20 @@ const OemBrandingContext = React.createContext(null);
|
|
|
379
379
|
* const { getOemBranding, getImageByBrand } = useOemBrandingContext();
|
|
380
380
|
* // use oem branding
|
|
381
381
|
* const branding = getOemBranding("some brand")
|
|
382
|
-
* @see {@link
|
|
382
|
+
* @see {@link OemBrandingContext}
|
|
383
383
|
*/
|
|
384
384
|
const useOemBrandingContext = () => {
|
|
385
|
-
const context = React.useContext(
|
|
385
|
+
const context = React.useContext(OEMBrandingService);
|
|
386
386
|
if (!context) {
|
|
387
387
|
throw new Error("useOemBranding must be used within an OemBrandingContextProvider");
|
|
388
388
|
}
|
|
389
389
|
return context;
|
|
390
390
|
};
|
|
391
391
|
/**
|
|
392
|
-
* This is a provider for the
|
|
392
|
+
* This is a provider for the OemBrandingContext.
|
|
393
393
|
*/
|
|
394
394
|
const OemBrandingContextProvider = (props) => {
|
|
395
|
-
return jsxRuntime.jsx(
|
|
395
|
+
return jsxRuntime.jsx(OEMBrandingService.Provider, { ...props });
|
|
396
396
|
};
|
|
397
397
|
|
|
398
398
|
const ModalDialogContext = React__namespace.createContext(null);
|
package/index.esm.js
CHANGED
|
@@ -349,9 +349,9 @@ const useIrisAppImage = () => {
|
|
|
349
349
|
};
|
|
350
350
|
};
|
|
351
351
|
|
|
352
|
-
const
|
|
352
|
+
const OEMBrandingService = createContext(null);
|
|
353
353
|
/**
|
|
354
|
-
* This is a hook to use the
|
|
354
|
+
* This is a hook to use the OemBrandingContext.
|
|
355
355
|
*
|
|
356
356
|
* @requires OemBrandingContextProvider
|
|
357
357
|
* @example
|
|
@@ -359,20 +359,20 @@ const OemBrandingContext = createContext(null);
|
|
|
359
359
|
* const { getOemBranding, getImageByBrand } = useOemBrandingContext();
|
|
360
360
|
* // use oem branding
|
|
361
361
|
* const branding = getOemBranding("some brand")
|
|
362
|
-
* @see {@link
|
|
362
|
+
* @see {@link OemBrandingContext}
|
|
363
363
|
*/
|
|
364
364
|
const useOemBrandingContext = () => {
|
|
365
|
-
const context = useContext(
|
|
365
|
+
const context = useContext(OEMBrandingService);
|
|
366
366
|
if (!context) {
|
|
367
367
|
throw new Error("useOemBranding must be used within an OemBrandingContextProvider");
|
|
368
368
|
}
|
|
369
369
|
return context;
|
|
370
370
|
};
|
|
371
371
|
/**
|
|
372
|
-
* This is a provider for the
|
|
372
|
+
* This is a provider for the OemBrandingContext.
|
|
373
373
|
*/
|
|
374
374
|
const OemBrandingContextProvider = (props) => {
|
|
375
|
-
return jsx(
|
|
375
|
+
return jsx(OEMBrandingService.Provider, { ...props });
|
|
376
376
|
};
|
|
377
377
|
|
|
378
378
|
const ModalDialogContext = React.createContext(null);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OemBrandingContext } from "@trackunit/react-core-contexts-api";
|
|
2
2
|
/**
|
|
3
|
-
* This is a hook to use the
|
|
3
|
+
* This is a hook to use the OemBrandingContext.
|
|
4
4
|
*
|
|
5
5
|
* @requires OemBrandingContextProvider
|
|
6
6
|
* @example
|
|
@@ -8,15 +8,15 @@ import { IOemBrandingContext } from "@trackunit/react-core-contexts-api";
|
|
|
8
8
|
* const { getOemBranding, getImageByBrand } = useOemBrandingContext();
|
|
9
9
|
* // use oem branding
|
|
10
10
|
* const branding = getOemBranding("some brand")
|
|
11
|
-
* @see {@link
|
|
11
|
+
* @see {@link OemBrandingContext}
|
|
12
12
|
*/
|
|
13
|
-
export declare const useOemBrandingContext: () =>
|
|
14
|
-
interface
|
|
15
|
-
value:
|
|
13
|
+
export declare const useOemBrandingContext: () => OemBrandingContext;
|
|
14
|
+
interface OemBrandingContextProviderProps {
|
|
15
|
+
value: OemBrandingContext;
|
|
16
16
|
children?: React.ReactNode;
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
|
-
* This is a provider for the
|
|
19
|
+
* This is a provider for the OemBrandingContext.
|
|
20
20
|
*/
|
|
21
|
-
export declare const OemBrandingContextProvider: (props:
|
|
21
|
+
export declare const OemBrandingContextProvider: (props: OemBrandingContextProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
22
|
export {};
|