@trackunit/react-core-hooks 1.29.6 → 1.29.8-alpha-275bba7d3e1.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/index.cjs.js
CHANGED
|
@@ -9,11 +9,17 @@ var zod = require('zod');
|
|
|
9
9
|
/**
|
|
10
10
|
* This is a hook to use the FeatureFlagContext.
|
|
11
11
|
*
|
|
12
|
+
* This is an internal hook that is used to access the feature flags,
|
|
13
|
+
* not meant to be used by external consumers. External consumers should
|
|
14
|
+
* use useHostFeatureFlag instead.
|
|
15
|
+
*
|
|
16
|
+
* @internal
|
|
12
17
|
* @requires FeatureFlagContext
|
|
13
18
|
* @example
|
|
14
|
-
* import { useFeatureFlags } from "
|
|
19
|
+
* import { useFeatureFlags } from "./useFeatureFlags";
|
|
15
20
|
* const { flags } = useFeatureFlags();
|
|
16
21
|
* // use flags to control visibility/access ...
|
|
22
|
+
* @see useHostFeatureFlag
|
|
17
23
|
* @see (@link FeatureFlagContext)
|
|
18
24
|
*/
|
|
19
25
|
const useFeatureFlags = () => {
|
|
@@ -409,7 +415,6 @@ const useExportDataContext = () => {
|
|
|
409
415
|
* @example
|
|
410
416
|
* import { useHostFeatureFlag } from "@trackunit/react-core-hooks";
|
|
411
417
|
* const isEnabled = useHostFeatureFlag("my_flag", { defaultValueWhenMissing: true });
|
|
412
|
-
* @see useFeatureFlags
|
|
413
418
|
*/
|
|
414
419
|
const useHostFeatureFlag = (flag, options) => {
|
|
415
420
|
const { flags } = useFeatureFlags();
|
package/index.esm.js
CHANGED
|
@@ -7,11 +7,17 @@ import { z } from 'zod';
|
|
|
7
7
|
/**
|
|
8
8
|
* This is a hook to use the FeatureFlagContext.
|
|
9
9
|
*
|
|
10
|
+
* This is an internal hook that is used to access the feature flags,
|
|
11
|
+
* not meant to be used by external consumers. External consumers should
|
|
12
|
+
* use useHostFeatureFlag instead.
|
|
13
|
+
*
|
|
14
|
+
* @internal
|
|
10
15
|
* @requires FeatureFlagContext
|
|
11
16
|
* @example
|
|
12
|
-
* import { useFeatureFlags } from "
|
|
17
|
+
* import { useFeatureFlags } from "./useFeatureFlags";
|
|
13
18
|
* const { flags } = useFeatureFlags();
|
|
14
19
|
* // use flags to control visibility/access ...
|
|
20
|
+
* @see useHostFeatureFlag
|
|
15
21
|
* @see (@link FeatureFlagContext)
|
|
16
22
|
*/
|
|
17
23
|
const useFeatureFlags = () => {
|
|
@@ -407,7 +413,6 @@ const useExportDataContext = () => {
|
|
|
407
413
|
* @example
|
|
408
414
|
* import { useHostFeatureFlag } from "@trackunit/react-core-hooks";
|
|
409
415
|
* const isEnabled = useHostFeatureFlag("my_flag", { defaultValueWhenMissing: true });
|
|
410
|
-
* @see useFeatureFlags
|
|
411
416
|
*/
|
|
412
417
|
const useHostFeatureFlag = (flag, options) => {
|
|
413
418
|
const { flags } = useFeatureFlags();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-core-hooks",
|
|
3
|
-
"version": "1.29.
|
|
3
|
+
"version": "1.29.8-alpha-275bba7d3e1.0",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"es-toolkit": "^1.52.0",
|
|
11
|
-
"@trackunit/iris-app-runtime-core": "1.26.
|
|
12
|
-
"@trackunit/iris-app-runtime-core-api": "1.25.
|
|
13
|
-
"@trackunit/react-core-contexts-api": "1.26.
|
|
11
|
+
"@trackunit/iris-app-runtime-core": "1.26.8-alpha-275bba7d3e1.0",
|
|
12
|
+
"@trackunit/iris-app-runtime-core-api": "1.25.8-alpha-275bba7d3e1.0",
|
|
13
|
+
"@trackunit/react-core-contexts-api": "1.26.8-alpha-275bba7d3e1.0",
|
|
14
14
|
"zod": "^3.25.76"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This is a hook to use the FeatureFlagContext.
|
|
3
3
|
*
|
|
4
|
+
* This is an internal hook that is used to access the feature flags,
|
|
5
|
+
* not meant to be used by external consumers. External consumers should
|
|
6
|
+
* use useHostFeatureFlag instead.
|
|
7
|
+
*
|
|
8
|
+
* @internal
|
|
4
9
|
* @requires FeatureFlagContext
|
|
5
10
|
* @example
|
|
6
|
-
* import { useFeatureFlags } from "
|
|
11
|
+
* import { useFeatureFlags } from "./useFeatureFlags";
|
|
7
12
|
* const { flags } = useFeatureFlags();
|
|
8
13
|
* // use flags to control visibility/access ...
|
|
14
|
+
* @see useHostFeatureFlag
|
|
9
15
|
* @see (@link FeatureFlagContext)
|
|
10
16
|
*/
|
|
11
17
|
export declare const useFeatureFlags: () => import("@trackunit/iris-app-runtime-core-api").FeatureFlagState;
|
|
@@ -29,6 +29,5 @@ export interface UseHostFeatureFlagOptions {
|
|
|
29
29
|
* @example
|
|
30
30
|
* import { useHostFeatureFlag } from "@trackunit/react-core-hooks";
|
|
31
31
|
* const isEnabled = useHostFeatureFlag("my_flag", { defaultValueWhenMissing: true });
|
|
32
|
-
* @see useFeatureFlags
|
|
33
32
|
*/
|
|
34
33
|
export declare const useHostFeatureFlag: <TFlag extends string = string>(flag: TFlag, options: UseHostFeatureFlagOptions) => boolean | null;
|