@frontegg/react-hooks
Advanced tools
Comparing version 7.13.0 to 7.14.0-alpha.0
import { useAuthUserOrNull } from './hooks'; | ||
import { useMemo } from 'react'; | ||
import { useShadowDom } from '../common'; | ||
import { useRootState, useShadowDom } from '../common'; | ||
import { useFeatureFlags } from '../flags'; | ||
@@ -52,3 +52,6 @@ import { useStore } from '../FronteggStoreContext'; | ||
} = useEntitlementsQueryData(customAttributes); | ||
return getFeatureEntitlements(entitlements, key, attributes); | ||
const { | ||
appName | ||
} = useRootState(); | ||
return getFeatureEntitlements(entitlements, key, attributes, undefined, appName); | ||
}; | ||
@@ -66,3 +69,6 @@ | ||
} = useEntitlementsQueryData(customAttributes); | ||
return getPermissionEntitlements(entitlements, key, attributes); | ||
const { | ||
appName | ||
} = useRootState(); | ||
return getPermissionEntitlements(entitlements, key, attributes, undefined, appName); | ||
}; | ||
@@ -80,3 +86,6 @@ | ||
} = useEntitlementsQueryData(customAttributes); | ||
return getEntitlements(entitlements, options, attributes); | ||
const { | ||
appName | ||
} = useRootState(); | ||
return getEntitlements(entitlements, options, attributes, undefined, appName); | ||
}; | ||
@@ -92,2 +101,5 @@ | ||
const entitlements = useEntitlementsState(); | ||
const { | ||
appName | ||
} = useRootState(); | ||
return useMemo(() => ({ | ||
@@ -99,3 +111,3 @@ isEntitledTo: (options, customAttributes) => { | ||
}; | ||
return getEntitlements(entitlements, options, attributes); | ||
return getEntitlements(entitlements, options, attributes, undefined, appName); | ||
} | ||
@@ -102,0 +114,0 @@ }), [user, entitlements]); |
@@ -1,2 +0,2 @@ | ||
/** @license Frontegg v7.13.0 | ||
/** @license Frontegg v7.14.0-alpha.0 | ||
* | ||
@@ -3,0 +3,0 @@ * This source code is licensed under the MIT license found in the |
@@ -57,3 +57,6 @@ "use strict"; | ||
} = useEntitlementsQueryData(customAttributes); | ||
return (0, _reduxStore.getFeatureEntitlements)(entitlements, key, attributes); | ||
const { | ||
appName | ||
} = (0, _common.useRootState)(); | ||
return (0, _reduxStore.getFeatureEntitlements)(entitlements, key, attributes, undefined, appName); | ||
}; | ||
@@ -72,3 +75,6 @@ | ||
} = useEntitlementsQueryData(customAttributes); | ||
return (0, _reduxStore.getPermissionEntitlements)(entitlements, key, attributes); | ||
const { | ||
appName | ||
} = (0, _common.useRootState)(); | ||
return (0, _reduxStore.getPermissionEntitlements)(entitlements, key, attributes, undefined, appName); | ||
}; | ||
@@ -87,3 +93,6 @@ | ||
} = useEntitlementsQueryData(customAttributes); | ||
return (0, _reduxStore.getEntitlements)(entitlements, options, attributes); | ||
const { | ||
appName | ||
} = (0, _common.useRootState)(); | ||
return (0, _reduxStore.getEntitlements)(entitlements, options, attributes, undefined, appName); | ||
}; | ||
@@ -100,2 +109,5 @@ | ||
const entitlements = useEntitlementsState(); | ||
const { | ||
appName | ||
} = (0, _common.useRootState)(); | ||
return (0, _react.useMemo)(() => ({ | ||
@@ -107,3 +119,3 @@ isEntitledTo: (options, customAttributes) => { | ||
}; | ||
return (0, _reduxStore.getEntitlements)(entitlements, options, attributes); | ||
return (0, _reduxStore.getEntitlements)(entitlements, options, attributes, undefined, appName); | ||
} | ||
@@ -110,0 +122,0 @@ }), [user, entitlements]); |
@@ -1,2 +0,2 @@ | ||
/** @license Frontegg v7.13.0 | ||
/** @license Frontegg v7.14.0-alpha.0 | ||
* | ||
@@ -3,0 +3,0 @@ * This source code is licensed under the MIT license found in the |
{ | ||
"name": "@frontegg/react-hooks", | ||
"version": "7.13.0", | ||
"version": "7.14.0-alpha.0", | ||
"main": "./node/index.js", | ||
@@ -9,4 +9,4 @@ "license": "MIT", | ||
"@babel/runtime": "^7.18.6", | ||
"@frontegg/redux-store": "7.13.0", | ||
"@frontegg/types": "7.13.0", | ||
"@frontegg/redux-store": "7.14.0-alpha.0", | ||
"@frontegg/types": "7.14.0-alpha.0", | ||
"@types/react": "*", | ||
@@ -13,0 +13,0 @@ "@types/react-is": "^17.0.7", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
180022
4865
2
+ Added@frontegg/redux-store@7.14.0-alpha.0(transitive)
+ Added@frontegg/types@7.14.0-alpha.0(transitive)
- Removed@frontegg/redux-store@7.13.0(transitive)
- Removed@frontegg/types@7.13.0(transitive)