@frontegg/react-hooks
Advanced tools
Comparing version 2.1.1-alpha.775775142 to 2.1.1-alpha.781999836
@@ -1,10 +0,12 @@ | ||
import '../tslib.es6-e3c82a74.js'; | ||
import '../index-0b118318.js'; | ||
import 'react'; | ||
import '@frontegg/redux-store/toolkit'; | ||
import 'react-redux'; | ||
import '@frontegg/redux-store'; | ||
import '@frontegg/rest-api'; | ||
import 'prop-types'; | ||
import 'hoist-non-react-statics'; | ||
import 'react-is'; | ||
import 'react-dom'; | ||
import '@frontegg/redux-store/auth'; | ||
import '@frontegg/redux-store/audits'; | ||
export { c as useAuditLogsActions, b as useAuditLogsState, a as useAuditsActions, e as useAuditsMetadataActions, d as useAuditsMetadataState, u as useAuditsState } from '../auditsMetadata-8a99c0b5.js'; | ||
import '@frontegg/redux-store'; | ||
export { c as useAuditLogsActions, b as useAuditLogsState, a as useAuditsActions, e as useAuditsMetadataActions, d as useAuditsMetadataState, u as useAuditsState } from '../auditsMetadata-035fb1dc.js'; | ||
//# sourceMappingURL=index.js.map |
@@ -1,9 +0,10 @@ | ||
import '../tslib.es6-e3c82a74.js'; | ||
import '../index-0b118318.js'; | ||
import 'react'; | ||
import '@frontegg/redux-store/toolkit'; | ||
import 'react-redux'; | ||
import '@frontegg/redux-store'; | ||
import '@frontegg/rest-api'; | ||
import 'prop-types'; | ||
import 'hoist-non-react-statics'; | ||
import 'react-is'; | ||
import 'react-dom'; | ||
import '@frontegg/redux-store/auth'; | ||
export { s as reloadProfileIfNeeded, h as useAcceptInvitationActions, g as useAcceptInvitationState, j as useActivateAccountActions, i as useActivateAccountState, l as useApiTokensActions, k as useApiTokensState, u as useAuth, a as useAuthActions, c as useAuthRoutes, B as useAuthTeamActions, A as useAuthTeamState, e as useAuthUser, f as useAuthUserOrNull, n as useForgotPasswordActions, m as useForgotPasswordState, d as useIsAuthenticated, p as useLoginActions, o as useLoginState, r as useMfaActions, q as useMfaState, b as useOnRedirectTo, v as useProfileActions, t as useProfileState, J as useRolesActions, I as useRolesState, D as useSSOActions, C as useSSOState, F as useSecurityPolicyActions, E as useSecurityPolicyState, x as useSignUpActions, w as useSignUpState, z as useSocialLoginActions, y as useSocialLoginState, H as useTenantsActions, G as useTenantsState } from '../roles-6446f670.js'; | ||
export { s as reloadProfileIfNeeded, h as useAcceptInvitationActions, g as useAcceptInvitationState, j as useActivateAccountActions, i as useActivateAccountState, l as useApiTokensActions, k as useApiTokensState, u as useAuth, a as useAuthActions, c as useAuthRoutes, B as useAuthTeamActions, A as useAuthTeamState, e as useAuthUser, f as useAuthUserOrNull, n as useForgotPasswordActions, m as useForgotPasswordState, d as useIsAuthenticated, p as useLoginActions, o as useLoginState, r as useMfaActions, q as useMfaState, b as useOnRedirectTo, v as useProfileActions, t as useProfileState, J as useRolesActions, I as useRolesState, D as useSSOActions, C as useSSOState, F as useSecurityPolicyActions, E as useSecurityPolicyState, x as useSignUpActions, w as useSignUpState, z as useSocialLoginActions, y as useSocialLoginState, H as useTenantsActions, G as useTenantsState } from '../roles-e06cd64b.js'; | ||
//# sourceMappingURL=index.js.map |
921
index.js
@@ -1,14 +0,915 @@ | ||
import './tslib.es6-e3c82a74.js'; | ||
import React, { useMemo, useRef, useState, useEffect } from 'react'; | ||
import '@frontegg/redux-store/toolkit'; | ||
import { Provider } from 'react-redux'; | ||
export { Provider, connect, shallowEqual, useDispatch, useSelector } from 'react-redux'; | ||
import { createFronteggStore } from '@frontegg/redux-store'; | ||
import { S as Subscription, c as useIsomorphicLayoutEffect, R as ReactReduxContext, s as shallowEqual, P as Provider } from './index-0b118318.js'; | ||
export { P as Provider, s as shallowEqual, a as useDispatch, u as useSelector } from './index-0b118318.js'; | ||
import React, { useMemo, useContext, useReducer, useRef, useState, useEffect } from 'react'; | ||
import { ContextHolder } from '@frontegg/rest-api'; | ||
import 'prop-types'; | ||
import hoistStatics from 'hoist-non-react-statics'; | ||
import { isValidElementType, isContextConsumer } from 'react-is'; | ||
import 'react-dom'; | ||
import '@frontegg/redux-store/auth'; | ||
import { u as useAuth, c as useAuthRoutes } from './roles-6446f670.js'; | ||
export { s as reloadProfileIfNeeded, h as useAcceptInvitationActions, g as useAcceptInvitationState, j as useActivateAccountActions, i as useActivateAccountState, l as useApiTokensActions, k as useApiTokensState, u as useAuth, a as useAuthActions, c as useAuthRoutes, B as useAuthTeamActions, A as useAuthTeamState, e as useAuthUser, f as useAuthUserOrNull, n as useForgotPasswordActions, m as useForgotPasswordState, d as useIsAuthenticated, p as useLoginActions, o as useLoginState, r as useMfaActions, q as useMfaState, b as useOnRedirectTo, v as useProfileActions, t as useProfileState, J as useRolesActions, I as useRolesState, D as useSSOActions, C as useSSOState, F as useSecurityPolicyActions, E as useSecurityPolicyState, x as useSignUpActions, w as useSignUpState, z as useSocialLoginActions, y as useSocialLoginState, H as useTenantsActions, G as useTenantsState } from './roles-6446f670.js'; | ||
import { u as useAuth, c as useAuthRoutes } from './roles-e06cd64b.js'; | ||
export { s as reloadProfileIfNeeded, h as useAcceptInvitationActions, g as useAcceptInvitationState, j as useActivateAccountActions, i as useActivateAccountState, l as useApiTokensActions, k as useApiTokensState, u as useAuth, a as useAuthActions, c as useAuthRoutes, B as useAuthTeamActions, A as useAuthTeamState, e as useAuthUser, f as useAuthUserOrNull, n as useForgotPasswordActions, m as useForgotPasswordState, d as useIsAuthenticated, p as useLoginActions, o as useLoginState, r as useMfaActions, q as useMfaState, b as useOnRedirectTo, v as useProfileActions, t as useProfileState, J as useRolesActions, I as useRolesState, D as useSSOActions, C as useSSOState, F as useSecurityPolicyActions, E as useSecurityPolicyState, x as useSignUpActions, w as useSignUpState, z as useSocialLoginActions, y as useSocialLoginState, H as useTenantsActions, G as useTenantsState } from './roles-e06cd64b.js'; | ||
import '@frontegg/redux-store/audits'; | ||
export { c as useAuditLogsActions, b as useAuditLogsState, a as useAuditsActions, e as useAuditsMetadataActions, d as useAuditsMetadataState, u as useAuditsState } from './auditsMetadata-8a99c0b5.js'; | ||
import { createFronteggStore } from '@frontegg/redux-store'; | ||
export { c as useAuditLogsActions, b as useAuditLogsState, a as useAuditsActions, e as useAuditsMetadataActions, d as useAuditsMetadataState, u as useAuditsState } from './auditsMetadata-035fb1dc.js'; | ||
function _extends() { | ||
_extends = Object.assign || function (target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i]; | ||
for (var key in source) { | ||
if (Object.prototype.hasOwnProperty.call(source, key)) { | ||
target[key] = source[key]; | ||
} | ||
} | ||
} | ||
return target; | ||
}; | ||
return _extends.apply(this, arguments); | ||
} | ||
function _objectWithoutPropertiesLoose(source, excluded) { | ||
if (source == null) return {}; | ||
var target = {}; | ||
var sourceKeys = Object.keys(source); | ||
var key, i; | ||
for (i = 0; i < sourceKeys.length; i++) { | ||
key = sourceKeys[i]; | ||
if (excluded.indexOf(key) >= 0) continue; | ||
target[key] = source[key]; | ||
} | ||
return target; | ||
} | ||
var EMPTY_ARRAY = []; | ||
var NO_SUBSCRIPTION_ARRAY = [null, null]; | ||
var stringifyComponent = function stringifyComponent(Comp) { | ||
try { | ||
return JSON.stringify(Comp); | ||
} catch (err) { | ||
return String(Comp); | ||
} | ||
}; | ||
function storeStateUpdatesReducer(state, action) { | ||
var updateCount = state[1]; | ||
return [action.payload, updateCount + 1]; | ||
} | ||
function useIsomorphicLayoutEffectWithArgs(effectFunc, effectArgs, dependencies) { | ||
useIsomorphicLayoutEffect(function () { | ||
return effectFunc.apply(void 0, effectArgs); | ||
}, dependencies); | ||
} | ||
function captureWrapperProps(lastWrapperProps, lastChildProps, renderIsScheduled, wrapperProps, actualChildProps, childPropsFromStoreUpdate, notifyNestedSubs) { | ||
// We want to capture the wrapper props and child props we used for later comparisons | ||
lastWrapperProps.current = wrapperProps; | ||
lastChildProps.current = actualChildProps; | ||
renderIsScheduled.current = false; // If the render was from a store update, clear out that reference and cascade the subscriber update | ||
if (childPropsFromStoreUpdate.current) { | ||
childPropsFromStoreUpdate.current = null; | ||
notifyNestedSubs(); | ||
} | ||
} | ||
function subscribeUpdates(shouldHandleStateChanges, store, subscription, childPropsSelector, lastWrapperProps, lastChildProps, renderIsScheduled, childPropsFromStoreUpdate, notifyNestedSubs, forceComponentUpdateDispatch) { | ||
// If we're not subscribed to the store, nothing to do here | ||
if (!shouldHandleStateChanges) return; // Capture values for checking if and when this component unmounts | ||
var didUnsubscribe = false; | ||
var lastThrownError = null; // We'll run this callback every time a store subscription update propagates to this component | ||
var checkForUpdates = function checkForUpdates() { | ||
if (didUnsubscribe) { | ||
// Don't run stale listeners. | ||
// Redux doesn't guarantee unsubscriptions happen until next dispatch. | ||
return; | ||
} | ||
var latestStoreState = store.getState(); | ||
var newChildProps, error; | ||
try { | ||
// Actually run the selector with the most recent store state and wrapper props | ||
// to determine what the child props should be | ||
newChildProps = childPropsSelector(latestStoreState, lastWrapperProps.current); | ||
} catch (e) { | ||
error = e; | ||
lastThrownError = e; | ||
} | ||
if (!error) { | ||
lastThrownError = null; | ||
} // If the child props haven't changed, nothing to do here - cascade the subscription update | ||
if (newChildProps === lastChildProps.current) { | ||
if (!renderIsScheduled.current) { | ||
notifyNestedSubs(); | ||
} | ||
} else { | ||
// Save references to the new child props. Note that we track the "child props from store update" | ||
// as a ref instead of a useState/useReducer because we need a way to determine if that value has | ||
// been processed. If this went into useState/useReducer, we couldn't clear out the value without | ||
// forcing another re-render, which we don't want. | ||
lastChildProps.current = newChildProps; | ||
childPropsFromStoreUpdate.current = newChildProps; | ||
renderIsScheduled.current = true; // If the child props _did_ change (or we caught an error), this wrapper component needs to re-render | ||
forceComponentUpdateDispatch({ | ||
type: 'STORE_UPDATED', | ||
payload: { | ||
error: error | ||
} | ||
}); | ||
} | ||
}; // Actually subscribe to the nearest connected ancestor (or store) | ||
subscription.onStateChange = checkForUpdates; | ||
subscription.trySubscribe(); // Pull data from the store after first render in case the store has | ||
// changed since we began. | ||
checkForUpdates(); | ||
var unsubscribeWrapper = function unsubscribeWrapper() { | ||
didUnsubscribe = true; | ||
subscription.tryUnsubscribe(); | ||
subscription.onStateChange = null; | ||
if (lastThrownError) { | ||
// It's possible that we caught an error due to a bad mapState function, but the | ||
// parent re-rendered without this component and we're about to unmount. | ||
// This shouldn't happen as long as we do top-down subscriptions correctly, but | ||
// if we ever do those wrong, this throw will surface the error in our tests. | ||
// In that case, throw the error from here so it doesn't get lost. | ||
throw lastThrownError; | ||
} | ||
}; | ||
return unsubscribeWrapper; | ||
} | ||
var initStateUpdates = function initStateUpdates() { | ||
return [null, 0]; | ||
}; | ||
function connectAdvanced( | ||
/* | ||
selectorFactory is a func that is responsible for returning the selector function used to | ||
compute new props from state, props, and dispatch. For example: | ||
export default connectAdvanced((dispatch, options) => (state, props) => ({ | ||
thing: state.things[props.thingId], | ||
saveThing: fields => dispatch(actionCreators.saveThing(props.thingId, fields)), | ||
}))(YourComponent) | ||
Access to dispatch is provided to the factory so selectorFactories can bind actionCreators | ||
outside of their selector as an optimization. Options passed to connectAdvanced are passed to | ||
the selectorFactory, along with displayName and WrappedComponent, as the second argument. | ||
Note that selectorFactory is responsible for all caching/memoization of inbound and outbound | ||
props. Do not use connectAdvanced directly without memoizing results between calls to your | ||
selector, otherwise the Connect component will re-render on every state or props change. | ||
*/ | ||
selectorFactory, // options object: | ||
_ref) { | ||
if (_ref === void 0) { | ||
_ref = {}; | ||
} | ||
var _ref2 = _ref, | ||
_ref2$getDisplayName = _ref2.getDisplayName, | ||
getDisplayName = _ref2$getDisplayName === void 0 ? function (name) { | ||
return "ConnectAdvanced(" + name + ")"; | ||
} : _ref2$getDisplayName, | ||
_ref2$methodName = _ref2.methodName, | ||
methodName = _ref2$methodName === void 0 ? 'connectAdvanced' : _ref2$methodName, | ||
_ref2$renderCountProp = _ref2.renderCountProp, | ||
renderCountProp = _ref2$renderCountProp === void 0 ? undefined : _ref2$renderCountProp, | ||
_ref2$shouldHandleSta = _ref2.shouldHandleStateChanges, | ||
shouldHandleStateChanges = _ref2$shouldHandleSta === void 0 ? true : _ref2$shouldHandleSta, | ||
_ref2$storeKey = _ref2.storeKey, | ||
storeKey = _ref2$storeKey === void 0 ? 'store' : _ref2$storeKey, | ||
_ref2$withRef = _ref2.withRef, | ||
withRef = _ref2$withRef === void 0 ? false : _ref2$withRef, | ||
_ref2$forwardRef = _ref2.forwardRef, | ||
forwardRef = _ref2$forwardRef === void 0 ? false : _ref2$forwardRef, | ||
_ref2$context = _ref2.context, | ||
context = _ref2$context === void 0 ? ReactReduxContext : _ref2$context, | ||
connectOptions = _objectWithoutPropertiesLoose(_ref2, ["getDisplayName", "methodName", "renderCountProp", "shouldHandleStateChanges", "storeKey", "withRef", "forwardRef", "context"]); | ||
if (process.env.NODE_ENV !== 'production') { | ||
if (renderCountProp !== undefined) { | ||
throw new Error("renderCountProp is removed. render counting is built into the latest React Dev Tools profiling extension"); | ||
} | ||
if (withRef) { | ||
throw new Error('withRef is removed. To access the wrapped instance, use a ref on the connected component'); | ||
} | ||
var customStoreWarningMessage = 'To use a custom Redux store for specific components, create a custom React context with ' + "React.createContext(), and pass the context object to React Redux's Provider and specific components" + ' like: <Provider context={MyContext}><ConnectedComponent context={MyContext} /></Provider>. ' + 'You may also pass a {context : MyContext} option to connect'; | ||
if (storeKey !== 'store') { | ||
throw new Error('storeKey has been removed and does not do anything. ' + customStoreWarningMessage); | ||
} | ||
} | ||
var Context = context; | ||
return function wrapWithConnect(WrappedComponent) { | ||
if (process.env.NODE_ENV !== 'production' && !isValidElementType(WrappedComponent)) { | ||
throw new Error("You must pass a component to the function returned by " + (methodName + ". Instead received " + stringifyComponent(WrappedComponent))); | ||
} | ||
var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component'; | ||
var displayName = getDisplayName(wrappedComponentName); | ||
var selectorFactoryOptions = _extends({}, connectOptions, { | ||
getDisplayName: getDisplayName, | ||
methodName: methodName, | ||
renderCountProp: renderCountProp, | ||
shouldHandleStateChanges: shouldHandleStateChanges, | ||
storeKey: storeKey, | ||
displayName: displayName, | ||
wrappedComponentName: wrappedComponentName, | ||
WrappedComponent: WrappedComponent | ||
}); | ||
var pure = connectOptions.pure; | ||
function createChildSelector(store) { | ||
return selectorFactory(store.dispatch, selectorFactoryOptions); | ||
} // If we aren't running in "pure" mode, we don't want to memoize values. | ||
// To avoid conditionally calling hooks, we fall back to a tiny wrapper | ||
// that just executes the given callback immediately. | ||
var usePureOnlyMemo = pure ? useMemo : function (callback) { | ||
return callback(); | ||
}; | ||
function ConnectFunction(props) { | ||
var _useMemo = useMemo(function () { | ||
// Distinguish between actual "data" props that were passed to the wrapper component, | ||
// and values needed to control behavior (forwarded refs, alternate context instances). | ||
// To maintain the wrapperProps object reference, memoize this destructuring. | ||
var reactReduxForwardedRef = props.reactReduxForwardedRef, | ||
wrapperProps = _objectWithoutPropertiesLoose(props, ["reactReduxForwardedRef"]); | ||
return [props.context, reactReduxForwardedRef, wrapperProps]; | ||
}, [props]), | ||
propsContext = _useMemo[0], | ||
reactReduxForwardedRef = _useMemo[1], | ||
wrapperProps = _useMemo[2]; | ||
var ContextToUse = useMemo(function () { | ||
// Users may optionally pass in a custom context instance to use instead of our ReactReduxContext. | ||
// Memoize the check that determines which context instance we should use. | ||
return propsContext && propsContext.Consumer && isContextConsumer( /*#__PURE__*/React.createElement(propsContext.Consumer, null)) ? propsContext : Context; | ||
}, [propsContext, Context]); // Retrieve the store and ancestor subscription via context, if available | ||
var contextValue = useContext(ContextToUse); // The store _must_ exist as either a prop or in context. | ||
// We'll check to see if it _looks_ like a Redux store first. | ||
// This allows us to pass through a `store` prop that is just a plain value. | ||
var didStoreComeFromProps = Boolean(props.store) && Boolean(props.store.getState) && Boolean(props.store.dispatch); | ||
var didStoreComeFromContext = Boolean(contextValue) && Boolean(contextValue.store); | ||
if (process.env.NODE_ENV !== 'production' && !didStoreComeFromProps && !didStoreComeFromContext) { | ||
throw new Error("Could not find \"store\" in the context of " + ("\"" + displayName + "\". Either wrap the root component in a <Provider>, ") + "or pass a custom React context provider to <Provider> and the corresponding " + ("React context consumer to " + displayName + " in connect options.")); | ||
} // Based on the previous check, one of these must be true | ||
var store = didStoreComeFromProps ? props.store : contextValue.store; | ||
var childPropsSelector = useMemo(function () { | ||
// The child props selector needs the store reference as an input. | ||
// Re-create this selector whenever the store changes. | ||
return createChildSelector(store); | ||
}, [store]); | ||
var _useMemo2 = useMemo(function () { | ||
if (!shouldHandleStateChanges) return NO_SUBSCRIPTION_ARRAY; // This Subscription's source should match where store came from: props vs. context. A component | ||
// connected to the store via props shouldn't use subscription from context, or vice versa. | ||
var subscription = new Subscription(store, didStoreComeFromProps ? null : contextValue.subscription); // `notifyNestedSubs` is duplicated to handle the case where the component is unmounted in | ||
// the middle of the notification loop, where `subscription` will then be null. This can | ||
// probably be avoided if Subscription's listeners logic is changed to not call listeners | ||
// that have been unsubscribed in the middle of the notification loop. | ||
var notifyNestedSubs = subscription.notifyNestedSubs.bind(subscription); | ||
return [subscription, notifyNestedSubs]; | ||
}, [store, didStoreComeFromProps, contextValue]), | ||
subscription = _useMemo2[0], | ||
notifyNestedSubs = _useMemo2[1]; // Determine what {store, subscription} value should be put into nested context, if necessary, | ||
// and memoize that value to avoid unnecessary context updates. | ||
var overriddenContextValue = useMemo(function () { | ||
if (didStoreComeFromProps) { | ||
// This component is directly subscribed to a store from props. | ||
// We don't want descendants reading from this store - pass down whatever | ||
// the existing context value is from the nearest connected ancestor. | ||
return contextValue; | ||
} // Otherwise, put this component's subscription instance into context, so that | ||
// connected descendants won't update until after this component is done | ||
return _extends({}, contextValue, { | ||
subscription: subscription | ||
}); | ||
}, [didStoreComeFromProps, contextValue, subscription]); // We need to force this wrapper component to re-render whenever a Redux store update | ||
// causes a change to the calculated child component props (or we caught an error in mapState) | ||
var _useReducer = useReducer(storeStateUpdatesReducer, EMPTY_ARRAY, initStateUpdates), | ||
_useReducer$ = _useReducer[0], | ||
previousStateUpdateResult = _useReducer$[0], | ||
forceComponentUpdateDispatch = _useReducer[1]; // Propagate any mapState/mapDispatch errors upwards | ||
if (previousStateUpdateResult && previousStateUpdateResult.error) { | ||
throw previousStateUpdateResult.error; | ||
} // Set up refs to coordinate values between the subscription effect and the render logic | ||
var lastChildProps = useRef(); | ||
var lastWrapperProps = useRef(wrapperProps); | ||
var childPropsFromStoreUpdate = useRef(); | ||
var renderIsScheduled = useRef(false); | ||
var actualChildProps = usePureOnlyMemo(function () { | ||
// Tricky logic here: | ||
// - This render may have been triggered by a Redux store update that produced new child props | ||
// - However, we may have gotten new wrapper props after that | ||
// If we have new child props, and the same wrapper props, we know we should use the new child props as-is. | ||
// But, if we have new wrapper props, those might change the child props, so we have to recalculate things. | ||
// So, we'll use the child props from store update only if the wrapper props are the same as last time. | ||
if (childPropsFromStoreUpdate.current && wrapperProps === lastWrapperProps.current) { | ||
return childPropsFromStoreUpdate.current; | ||
} // TODO We're reading the store directly in render() here. Bad idea? | ||
// This will likely cause Bad Things (TM) to happen in Concurrent Mode. | ||
// Note that we do this because on renders _not_ caused by store updates, we need the latest store state | ||
// to determine what the child props should be. | ||
return childPropsSelector(store.getState(), wrapperProps); | ||
}, [store, previousStateUpdateResult, wrapperProps]); // We need this to execute synchronously every time we re-render. However, React warns | ||
// about useLayoutEffect in SSR, so we try to detect environment and fall back to | ||
// just useEffect instead to avoid the warning, since neither will run anyway. | ||
useIsomorphicLayoutEffectWithArgs(captureWrapperProps, [lastWrapperProps, lastChildProps, renderIsScheduled, wrapperProps, actualChildProps, childPropsFromStoreUpdate, notifyNestedSubs]); // Our re-subscribe logic only runs when the store/subscription setup changes | ||
useIsomorphicLayoutEffectWithArgs(subscribeUpdates, [shouldHandleStateChanges, store, subscription, childPropsSelector, lastWrapperProps, lastChildProps, renderIsScheduled, childPropsFromStoreUpdate, notifyNestedSubs, forceComponentUpdateDispatch], [store, subscription, childPropsSelector]); // Now that all that's done, we can finally try to actually render the child component. | ||
// We memoize the elements for the rendered child component as an optimization. | ||
var renderedWrappedComponent = useMemo(function () { | ||
return /*#__PURE__*/React.createElement(WrappedComponent, _extends({}, actualChildProps, { | ||
ref: reactReduxForwardedRef | ||
})); | ||
}, [reactReduxForwardedRef, WrappedComponent, actualChildProps]); // If React sees the exact same element reference as last time, it bails out of re-rendering | ||
// that child, same as if it was wrapped in React.memo() or returned false from shouldComponentUpdate. | ||
var renderedChild = useMemo(function () { | ||
if (shouldHandleStateChanges) { | ||
// If this component is subscribed to store updates, we need to pass its own | ||
// subscription instance down to our descendants. That means rendering the same | ||
// Context instance, and putting a different value into the context. | ||
return /*#__PURE__*/React.createElement(ContextToUse.Provider, { | ||
value: overriddenContextValue | ||
}, renderedWrappedComponent); | ||
} | ||
return renderedWrappedComponent; | ||
}, [ContextToUse, renderedWrappedComponent, overriddenContextValue]); | ||
return renderedChild; | ||
} // If we're in "pure" mode, ensure our wrapper component only re-renders when incoming props have changed. | ||
var Connect = pure ? React.memo(ConnectFunction) : ConnectFunction; | ||
Connect.WrappedComponent = WrappedComponent; | ||
Connect.displayName = displayName; | ||
if (forwardRef) { | ||
var forwarded = React.forwardRef(function forwardConnectRef(props, ref) { | ||
return /*#__PURE__*/React.createElement(Connect, _extends({}, props, { | ||
reactReduxForwardedRef: ref | ||
})); | ||
}); | ||
forwarded.displayName = displayName; | ||
forwarded.WrappedComponent = WrappedComponent; | ||
return hoistStatics(forwarded, WrappedComponent); | ||
} | ||
return hoistStatics(Connect, WrappedComponent); | ||
}; | ||
} | ||
function symbolObservablePonyfill(root) { | ||
var result; | ||
var Symbol = root.Symbol; | ||
if (typeof Symbol === 'function') { | ||
if (Symbol.observable) { | ||
result = Symbol.observable; | ||
} else { | ||
result = Symbol('observable'); | ||
Symbol.observable = result; | ||
} | ||
} else { | ||
result = '@@observable'; | ||
} | ||
return result; | ||
} | ||
/* global window */ | ||
var root; | ||
if (typeof self !== 'undefined') { | ||
root = self; | ||
} else if (typeof window !== 'undefined') { | ||
root = window; | ||
} else if (typeof global !== 'undefined') { | ||
root = global; | ||
} else if (typeof module !== 'undefined') { | ||
root = module; | ||
} else { | ||
root = Function('return this')(); | ||
} | ||
var result = symbolObservablePonyfill(root); | ||
/** | ||
* These are private action types reserved by Redux. | ||
* For any unknown actions, you must return the current state. | ||
* If the current state is undefined, you must return the initial state. | ||
* Do not reference these action types directly in your code. | ||
*/ | ||
var randomString = function randomString() { | ||
return Math.random().toString(36).substring(7).split('').join('.'); | ||
}; | ||
var ActionTypes = { | ||
INIT: "@@redux/INIT" + randomString(), | ||
REPLACE: "@@redux/REPLACE" + randomString(), | ||
PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() { | ||
return "@@redux/PROBE_UNKNOWN_ACTION" + randomString(); | ||
} | ||
}; | ||
/** | ||
* Prints a warning in the console if it exists. | ||
* | ||
* @param {String} message The warning message. | ||
* @returns {void} | ||
*/ | ||
function warning(message) { | ||
/* eslint-disable no-console */ | ||
if (typeof console !== 'undefined' && typeof console.error === 'function') { | ||
console.error(message); | ||
} | ||
/* eslint-enable no-console */ | ||
try { | ||
// This error was thrown as a convenience so that if you enable | ||
// "break on all exceptions" in your console, | ||
// it would pause the execution at this line. | ||
throw new Error(message); | ||
} catch (e) {} // eslint-disable-line no-empty | ||
} | ||
function bindActionCreator(actionCreator, dispatch) { | ||
return function () { | ||
return dispatch(actionCreator.apply(this, arguments)); | ||
}; | ||
} | ||
/** | ||
* Turns an object whose values are action creators, into an object with the | ||
* same keys, but with every function wrapped into a `dispatch` call so they | ||
* may be invoked directly. This is just a convenience method, as you can call | ||
* `store.dispatch(MyActionCreators.doSomething())` yourself just fine. | ||
* | ||
* For convenience, you can also pass an action creator as the first argument, | ||
* and get a dispatch wrapped function in return. | ||
* | ||
* @param {Function|Object} actionCreators An object whose values are action | ||
* creator functions. One handy way to obtain it is to use ES6 `import * as` | ||
* syntax. You may also pass a single function. | ||
* | ||
* @param {Function} dispatch The `dispatch` function available on your Redux | ||
* store. | ||
* | ||
* @returns {Function|Object} The object mimicking the original object, but with | ||
* every action creator wrapped into the `dispatch` call. If you passed a | ||
* function as `actionCreators`, the return value will also be a single | ||
* function. | ||
*/ | ||
function bindActionCreators(actionCreators, dispatch) { | ||
if (typeof actionCreators === 'function') { | ||
return bindActionCreator(actionCreators, dispatch); | ||
} | ||
if (typeof actionCreators !== 'object' || actionCreators === null) { | ||
throw new Error("bindActionCreators expected an object or a function, instead received " + (actionCreators === null ? 'null' : typeof actionCreators) + ". " + "Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?"); | ||
} | ||
var boundActionCreators = {}; | ||
for (var key in actionCreators) { | ||
var actionCreator = actionCreators[key]; | ||
if (typeof actionCreator === 'function') { | ||
boundActionCreators[key] = bindActionCreator(actionCreator, dispatch); | ||
} | ||
} | ||
return boundActionCreators; | ||
} | ||
/* | ||
* This is a dummy function to check if the function name has been altered by minification. | ||
* If the function has been minified and NODE_ENV !== 'production', warn the user. | ||
*/ | ||
function isCrushed() {} | ||
if (process.env.NODE_ENV !== 'production' && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') { | ||
warning('You are currently using minified code outside of NODE_ENV === "production". ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or setting mode to production in webpack (https://webpack.js.org/concepts/mode/) ' + 'to ensure you have the correct code for your production build.'); | ||
} | ||
/** | ||
* @param {any} obj The object to inspect. | ||
* @returns {boolean} True if the argument appears to be a plain object. | ||
*/ | ||
function isPlainObject(obj) { | ||
if (typeof obj !== 'object' || obj === null) return false; | ||
var proto = Object.getPrototypeOf(obj); | ||
if (proto === null) return true; | ||
var baseProto = proto; | ||
while (Object.getPrototypeOf(baseProto) !== null) { | ||
baseProto = Object.getPrototypeOf(baseProto); | ||
} | ||
return proto === baseProto; | ||
} | ||
/** | ||
* Prints a warning in the console if it exists. | ||
* | ||
* @param {String} message The warning message. | ||
* @returns {void} | ||
*/ | ||
function warning$1(message) { | ||
/* eslint-disable no-console */ | ||
if (typeof console !== 'undefined' && typeof console.error === 'function') { | ||
console.error(message); | ||
} | ||
/* eslint-enable no-console */ | ||
try { | ||
// This error was thrown as a convenience so that if you enable | ||
// "break on all exceptions" in your console, | ||
// it would pause the execution at this line. | ||
throw new Error(message); | ||
/* eslint-disable no-empty */ | ||
} catch (e) {} | ||
/* eslint-enable no-empty */ | ||
} | ||
function verifyPlainObject(value, displayName, methodName) { | ||
if (!isPlainObject(value)) { | ||
warning$1(methodName + "() in " + displayName + " must return a plain object. Instead received " + value + "."); | ||
} | ||
} | ||
function wrapMapToPropsConstant(getConstant) { | ||
return function initConstantSelector(dispatch, options) { | ||
var constant = getConstant(dispatch, options); | ||
function constantSelector() { | ||
return constant; | ||
} | ||
constantSelector.dependsOnOwnProps = false; | ||
return constantSelector; | ||
}; | ||
} // dependsOnOwnProps is used by createMapToPropsProxy to determine whether to pass props as args | ||
// to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine | ||
// whether mapToProps needs to be invoked when props have changed. | ||
// | ||
// A length of one signals that mapToProps does not depend on props from the parent component. | ||
// A length of zero is assumed to mean mapToProps is getting args via arguments or ...args and | ||
// therefore not reporting its length accurately.. | ||
function getDependsOnOwnProps(mapToProps) { | ||
return mapToProps.dependsOnOwnProps !== null && mapToProps.dependsOnOwnProps !== undefined ? Boolean(mapToProps.dependsOnOwnProps) : mapToProps.length !== 1; | ||
} // Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction, | ||
// this function wraps mapToProps in a proxy function which does several things: | ||
// | ||
// * Detects whether the mapToProps function being called depends on props, which | ||
// is used by selectorFactory to decide if it should reinvoke on props changes. | ||
// | ||
// * On first call, handles mapToProps if returns another function, and treats that | ||
// new function as the true mapToProps for subsequent calls. | ||
// | ||
// * On first call, verifies the first result is a plain object, in order to warn | ||
// the developer that their mapToProps function is not returning a valid result. | ||
// | ||
function wrapMapToPropsFunc(mapToProps, methodName) { | ||
return function initProxySelector(dispatch, _ref) { | ||
var displayName = _ref.displayName; | ||
var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) { | ||
return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch); | ||
}; // allow detectFactoryAndVerify to get ownProps | ||
proxy.dependsOnOwnProps = true; | ||
proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) { | ||
proxy.mapToProps = mapToProps; | ||
proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps); | ||
var props = proxy(stateOrDispatch, ownProps); | ||
if (typeof props === 'function') { | ||
proxy.mapToProps = props; | ||
proxy.dependsOnOwnProps = getDependsOnOwnProps(props); | ||
props = proxy(stateOrDispatch, ownProps); | ||
} | ||
if (process.env.NODE_ENV !== 'production') verifyPlainObject(props, displayName, methodName); | ||
return props; | ||
}; | ||
return proxy; | ||
}; | ||
} | ||
function whenMapDispatchToPropsIsFunction(mapDispatchToProps) { | ||
return typeof mapDispatchToProps === 'function' ? wrapMapToPropsFunc(mapDispatchToProps, 'mapDispatchToProps') : undefined; | ||
} | ||
function whenMapDispatchToPropsIsMissing(mapDispatchToProps) { | ||
return !mapDispatchToProps ? wrapMapToPropsConstant(function (dispatch) { | ||
return { | ||
dispatch: dispatch | ||
}; | ||
}) : undefined; | ||
} | ||
function whenMapDispatchToPropsIsObject(mapDispatchToProps) { | ||
return mapDispatchToProps && typeof mapDispatchToProps === 'object' ? wrapMapToPropsConstant(function (dispatch) { | ||
return bindActionCreators(mapDispatchToProps, dispatch); | ||
}) : undefined; | ||
} | ||
var defaultMapDispatchToPropsFactories = [whenMapDispatchToPropsIsFunction, whenMapDispatchToPropsIsMissing, whenMapDispatchToPropsIsObject]; | ||
function whenMapStateToPropsIsFunction(mapStateToProps) { | ||
return typeof mapStateToProps === 'function' ? wrapMapToPropsFunc(mapStateToProps, 'mapStateToProps') : undefined; | ||
} | ||
function whenMapStateToPropsIsMissing(mapStateToProps) { | ||
return !mapStateToProps ? wrapMapToPropsConstant(function () { | ||
return {}; | ||
}) : undefined; | ||
} | ||
var defaultMapStateToPropsFactories = [whenMapStateToPropsIsFunction, whenMapStateToPropsIsMissing]; | ||
function defaultMergeProps(stateProps, dispatchProps, ownProps) { | ||
return _extends({}, ownProps, stateProps, dispatchProps); | ||
} | ||
function wrapMergePropsFunc(mergeProps) { | ||
return function initMergePropsProxy(dispatch, _ref) { | ||
var displayName = _ref.displayName, | ||
pure = _ref.pure, | ||
areMergedPropsEqual = _ref.areMergedPropsEqual; | ||
var hasRunOnce = false; | ||
var mergedProps; | ||
return function mergePropsProxy(stateProps, dispatchProps, ownProps) { | ||
var nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps); | ||
if (hasRunOnce) { | ||
if (!pure || !areMergedPropsEqual(nextMergedProps, mergedProps)) mergedProps = nextMergedProps; | ||
} else { | ||
hasRunOnce = true; | ||
mergedProps = nextMergedProps; | ||
if (process.env.NODE_ENV !== 'production') verifyPlainObject(mergedProps, displayName, 'mergeProps'); | ||
} | ||
return mergedProps; | ||
}; | ||
}; | ||
} | ||
function whenMergePropsIsFunction(mergeProps) { | ||
return typeof mergeProps === 'function' ? wrapMergePropsFunc(mergeProps) : undefined; | ||
} | ||
function whenMergePropsIsOmitted(mergeProps) { | ||
return !mergeProps ? function () { | ||
return defaultMergeProps; | ||
} : undefined; | ||
} | ||
var defaultMergePropsFactories = [whenMergePropsIsFunction, whenMergePropsIsOmitted]; | ||
function verify(selector, methodName, displayName) { | ||
if (!selector) { | ||
throw new Error("Unexpected value for " + methodName + " in " + displayName + "."); | ||
} else if (methodName === 'mapStateToProps' || methodName === 'mapDispatchToProps') { | ||
if (!Object.prototype.hasOwnProperty.call(selector, 'dependsOnOwnProps')) { | ||
warning$1("The selector for " + methodName + " of " + displayName + " did not specify a value for dependsOnOwnProps."); | ||
} | ||
} | ||
} | ||
function verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, displayName) { | ||
verify(mapStateToProps, 'mapStateToProps', displayName); | ||
verify(mapDispatchToProps, 'mapDispatchToProps', displayName); | ||
verify(mergeProps, 'mergeProps', displayName); | ||
} | ||
function impureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch) { | ||
return function impureFinalPropsSelector(state, ownProps) { | ||
return mergeProps(mapStateToProps(state, ownProps), mapDispatchToProps(dispatch, ownProps), ownProps); | ||
}; | ||
} | ||
function pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, _ref) { | ||
var areStatesEqual = _ref.areStatesEqual, | ||
areOwnPropsEqual = _ref.areOwnPropsEqual, | ||
areStatePropsEqual = _ref.areStatePropsEqual; | ||
var hasRunAtLeastOnce = false; | ||
var state; | ||
var ownProps; | ||
var stateProps; | ||
var dispatchProps; | ||
var mergedProps; | ||
function handleFirstCall(firstState, firstOwnProps) { | ||
state = firstState; | ||
ownProps = firstOwnProps; | ||
stateProps = mapStateToProps(state, ownProps); | ||
dispatchProps = mapDispatchToProps(dispatch, ownProps); | ||
mergedProps = mergeProps(stateProps, dispatchProps, ownProps); | ||
hasRunAtLeastOnce = true; | ||
return mergedProps; | ||
} | ||
function handleNewPropsAndNewState() { | ||
stateProps = mapStateToProps(state, ownProps); | ||
if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps); | ||
mergedProps = mergeProps(stateProps, dispatchProps, ownProps); | ||
return mergedProps; | ||
} | ||
function handleNewProps() { | ||
if (mapStateToProps.dependsOnOwnProps) stateProps = mapStateToProps(state, ownProps); | ||
if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps); | ||
mergedProps = mergeProps(stateProps, dispatchProps, ownProps); | ||
return mergedProps; | ||
} | ||
function handleNewState() { | ||
var nextStateProps = mapStateToProps(state, ownProps); | ||
var statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps); | ||
stateProps = nextStateProps; | ||
if (statePropsChanged) mergedProps = mergeProps(stateProps, dispatchProps, ownProps); | ||
return mergedProps; | ||
} | ||
function handleSubsequentCalls(nextState, nextOwnProps) { | ||
var propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps); | ||
var stateChanged = !areStatesEqual(nextState, state); | ||
state = nextState; | ||
ownProps = nextOwnProps; | ||
if (propsChanged && stateChanged) return handleNewPropsAndNewState(); | ||
if (propsChanged) return handleNewProps(); | ||
if (stateChanged) return handleNewState(); | ||
return mergedProps; | ||
} | ||
return function pureFinalPropsSelector(nextState, nextOwnProps) { | ||
return hasRunAtLeastOnce ? handleSubsequentCalls(nextState, nextOwnProps) : handleFirstCall(nextState, nextOwnProps); | ||
}; | ||
} // TODO: Add more comments | ||
// If pure is true, the selector returned by selectorFactory will memoize its results, | ||
// allowing connectAdvanced's shouldComponentUpdate to return false if final | ||
// props have not changed. If false, the selector will always return a new | ||
// object and shouldComponentUpdate will always return true. | ||
function finalPropsSelectorFactory(dispatch, _ref2) { | ||
var initMapStateToProps = _ref2.initMapStateToProps, | ||
initMapDispatchToProps = _ref2.initMapDispatchToProps, | ||
initMergeProps = _ref2.initMergeProps, | ||
options = _objectWithoutPropertiesLoose(_ref2, ["initMapStateToProps", "initMapDispatchToProps", "initMergeProps"]); | ||
var mapStateToProps = initMapStateToProps(dispatch, options); | ||
var mapDispatchToProps = initMapDispatchToProps(dispatch, options); | ||
var mergeProps = initMergeProps(dispatch, options); | ||
if (process.env.NODE_ENV !== 'production') { | ||
verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName); | ||
} | ||
var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory; | ||
return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options); | ||
} | ||
/* | ||
connect is a facade over connectAdvanced. It turns its args into a compatible | ||
selectorFactory, which has the signature: | ||
(dispatch, options) => (nextState, nextOwnProps) => nextFinalProps | ||
connect passes its args to connectAdvanced as options, which will in turn pass them to | ||
selectorFactory each time a Connect component instance is instantiated or hot reloaded. | ||
selectorFactory returns a final props selector from its mapStateToProps, | ||
mapStateToPropsFactories, mapDispatchToProps, mapDispatchToPropsFactories, mergeProps, | ||
mergePropsFactories, and pure args. | ||
The resulting final props selector is called by the Connect component instance whenever | ||
it receives new props or store state. | ||
*/ | ||
function match(arg, factories, name) { | ||
for (var i = factories.length - 1; i >= 0; i--) { | ||
var result = factories[i](arg); | ||
if (result) return result; | ||
} | ||
return function (dispatch, options) { | ||
throw new Error("Invalid value of type " + typeof arg + " for " + name + " argument when connecting component " + options.wrappedComponentName + "."); | ||
}; | ||
} | ||
function strictEqual(a, b) { | ||
return a === b; | ||
} // createConnect with default args builds the 'official' connect behavior. Calling it with | ||
// different options opens up some testing and extensibility scenarios | ||
function createConnect(_temp) { | ||
var _ref = _temp === void 0 ? {} : _temp, | ||
_ref$connectHOC = _ref.connectHOC, | ||
connectHOC = _ref$connectHOC === void 0 ? connectAdvanced : _ref$connectHOC, | ||
_ref$mapStateToPropsF = _ref.mapStateToPropsFactories, | ||
mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? defaultMapStateToPropsFactories : _ref$mapStateToPropsF, | ||
_ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories, | ||
mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? defaultMapDispatchToPropsFactories : _ref$mapDispatchToPro, | ||
_ref$mergePropsFactor = _ref.mergePropsFactories, | ||
mergePropsFactories = _ref$mergePropsFactor === void 0 ? defaultMergePropsFactories : _ref$mergePropsFactor, | ||
_ref$selectorFactory = _ref.selectorFactory, | ||
selectorFactory = _ref$selectorFactory === void 0 ? finalPropsSelectorFactory : _ref$selectorFactory; | ||
return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) { | ||
if (_ref2 === void 0) { | ||
_ref2 = {}; | ||
} | ||
var _ref3 = _ref2, | ||
_ref3$pure = _ref3.pure, | ||
pure = _ref3$pure === void 0 ? true : _ref3$pure, | ||
_ref3$areStatesEqual = _ref3.areStatesEqual, | ||
areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual, | ||
_ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual, | ||
areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? shallowEqual : _ref3$areOwnPropsEqua, | ||
_ref3$areStatePropsEq = _ref3.areStatePropsEqual, | ||
areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? shallowEqual : _ref3$areStatePropsEq, | ||
_ref3$areMergedPropsE = _ref3.areMergedPropsEqual, | ||
areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? shallowEqual : _ref3$areMergedPropsE, | ||
extraOptions = _objectWithoutPropertiesLoose(_ref3, ["pure", "areStatesEqual", "areOwnPropsEqual", "areStatePropsEqual", "areMergedPropsEqual"]); | ||
var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps'); | ||
var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps'); | ||
var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps'); | ||
return connectHOC(selectorFactory, _extends({ | ||
// used in error messages | ||
methodName: 'connect', | ||
// used to compute Connect's displayName from the wrapped component's displayName. | ||
getDisplayName: function getDisplayName(name) { | ||
return "Connect(" + name + ")"; | ||
}, | ||
// if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes | ||
shouldHandleStateChanges: Boolean(mapStateToProps), | ||
// passed through to selectorFactory | ||
initMapStateToProps: initMapStateToProps, | ||
initMapDispatchToProps: initMapDispatchToProps, | ||
initMergeProps: initMergeProps, | ||
pure: pure, | ||
areStatesEqual: areStatesEqual, | ||
areOwnPropsEqual: areOwnPropsEqual, | ||
areStatePropsEqual: areStatePropsEqual, | ||
areMergedPropsEqual: areMergedPropsEqual | ||
}, extraOptions)); | ||
}; | ||
} | ||
var connect = /*#__PURE__*/createConnect(); | ||
var setLoading = function (loading) { | ||
@@ -91,3 +992,3 @@ var isSSR = typeof document === 'undefined' || typeof window === 'undefined'; | ||
export { FronteggProvider }; | ||
export { FronteggProvider, connect }; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@frontegg/react-hooks", | ||
"libName": "FronteggReactHooks", | ||
"version": "2.1.1-alpha.775775142", | ||
"version": "2.1.1-alpha.781999836", | ||
"author": "Frontegg LTD", | ||
@@ -9,5 +9,5 @@ "module": "index.esm.js", | ||
"dependencies": { | ||
"@frontegg/redux-store": "2.1.1-alpha.775775142" | ||
"@frontegg/redux-store": "2.1.1-alpha.781999836" | ||
}, | ||
"gitHead": "611407a75dbe69ffddcf1891b4bae4f378225c94", | ||
"gitHead": "42500eacfc8a76ced757d0769f4be91d34a31569", | ||
"main": "index.js", | ||
@@ -14,0 +14,0 @@ "es2015": "index.es.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
1536540
9435
99
5
+ Added@frontegg/redux-store@2.1.1-alpha.781999836(transitive)
+ Added@frontegg/rest-api@2.1.1-alpha.781999836(transitive)
- Removed@frontegg/redux-store@2.1.1-alpha.775775142(transitive)
- Removed@frontegg/rest-api@2.1.1-alpha.775775142(transitive)