@frontegg/react-hooks 6.69.0 → 6.70.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.
Files changed (72) hide show
  1. package/FronteggProvider/index.js +2 -18
  2. package/FronteggStoreContext/index.js +2 -2
  3. package/audits/auditLogs.js +0 -2
  4. package/audits/auditsMetadata.js +0 -2
  5. package/audits/hooks.js +1 -2
  6. package/auth/acceptInvitation.js +1 -2
  7. package/auth/activateAccount.js +0 -2
  8. package/auth/apiTokens.js +0 -2
  9. package/auth/forgotPassword.js +0 -2
  10. package/auth/hooks.js +4 -8
  11. package/auth/impersonate.js +0 -2
  12. package/auth/login.js +0 -2
  13. package/auth/mfa.js +0 -2
  14. package/auth/profile.js +0 -2
  15. package/auth/provisioning.js +0 -2
  16. package/auth/resetPhoneNumber.js +0 -2
  17. package/auth/restrictions.js +4 -4
  18. package/auth/roles.js +0 -2
  19. package/auth/securityPolicy.js +4 -4
  20. package/auth/sessions.js +0 -2
  21. package/auth/sessionsPolicy.js +0 -2
  22. package/auth/signup.js +0 -2
  23. package/auth/socialLogin.js +0 -2
  24. package/auth/sso.js +0 -2
  25. package/auth/team.js +0 -2
  26. package/auth/tenants.js +0 -2
  27. package/common/index.d.ts +1 -1
  28. package/common/index.js +8 -10
  29. package/connectivity/hooks.js +0 -2
  30. package/flags/useFeatureFlags.js +0 -1
  31. package/index.js +1 -1
  32. package/node/FronteggProvider/index.js +2 -32
  33. package/node/FronteggStoreContext/index.js +2 -8
  34. package/node/audits/auditLogs.js +0 -6
  35. package/node/audits/auditsMetadata.js +0 -6
  36. package/node/audits/hooks.js +1 -18
  37. package/node/audits/index.js +0 -5
  38. package/node/auth/acceptInvitation.js +1 -6
  39. package/node/auth/activateAccount.js +0 -6
  40. package/node/auth/apiTokens.js +0 -6
  41. package/node/auth/forgotPassword.js +0 -6
  42. package/node/auth/hooks.js +4 -38
  43. package/node/auth/impersonate.js +0 -6
  44. package/node/auth/index.js +0 -41
  45. package/node/auth/login.js +0 -6
  46. package/node/auth/mfa.js +0 -6
  47. package/node/auth/profile.js +0 -9
  48. package/node/auth/provisioning.js +0 -6
  49. package/node/auth/resetPhoneNumber.js +0 -6
  50. package/node/auth/restrictions.js +4 -13
  51. package/node/auth/roles.js +0 -6
  52. package/node/auth/securityPolicy.js +4 -13
  53. package/node/auth/sessions.js +0 -6
  54. package/node/auth/sessionsPolicy.js +0 -6
  55. package/node/auth/signup.js +0 -6
  56. package/node/auth/socialLogin.js +0 -6
  57. package/node/auth/sso.js +0 -6
  58. package/node/auth/team.js +0 -6
  59. package/node/auth/tenants.js +0 -6
  60. package/node/common/index.js +8 -19
  61. package/node/connectivity/hooks.js +0 -8
  62. package/node/connectivity/index.js +0 -1
  63. package/node/flags/index.js +0 -2
  64. package/node/flags/useFeatureFlags.js +0 -4
  65. package/node/index.js +1 -19
  66. package/node/subscriptions/hooks.js +0 -46
  67. package/node/subscriptions/index.js +0 -2
  68. package/node/vendor/hooks.js +0 -8
  69. package/node/vendor/index.js +0 -1
  70. package/package.json +3 -3
  71. package/subscriptions/hooks.js +0 -4
  72. package/vendor/hooks.js +0 -2
@@ -61,11 +61,8 @@ Object.defineProperty(exports, "useOnRedirectTo", {
61
61
  return _hooks.useOnRedirectTo;
62
62
  }
63
63
  });
64
-
65
64
  var _hooks = require("./hooks");
66
-
67
65
  var _acceptInvitation = require("./acceptInvitation");
68
-
69
66
  Object.keys(_acceptInvitation).forEach(function (key) {
70
67
  if (key === "default" || key === "__esModule") return;
71
68
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -77,9 +74,7 @@ Object.keys(_acceptInvitation).forEach(function (key) {
77
74
  }
78
75
  });
79
76
  });
80
-
81
77
  var _activateAccount = require("./activateAccount");
82
-
83
78
  Object.keys(_activateAccount).forEach(function (key) {
84
79
  if (key === "default" || key === "__esModule") return;
85
80
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -91,9 +86,7 @@ Object.keys(_activateAccount).forEach(function (key) {
91
86
  }
92
87
  });
93
88
  });
94
-
95
89
  var _apiTokens = require("./apiTokens");
96
-
97
90
  Object.keys(_apiTokens).forEach(function (key) {
98
91
  if (key === "default" || key === "__esModule") return;
99
92
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -105,9 +98,7 @@ Object.keys(_apiTokens).forEach(function (key) {
105
98
  }
106
99
  });
107
100
  });
108
-
109
101
  var _forgotPassword = require("./forgotPassword");
110
-
111
102
  Object.keys(_forgotPassword).forEach(function (key) {
112
103
  if (key === "default" || key === "__esModule") return;
113
104
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -119,9 +110,7 @@ Object.keys(_forgotPassword).forEach(function (key) {
119
110
  }
120
111
  });
121
112
  });
122
-
123
113
  var _resetPhoneNumber = require("./resetPhoneNumber");
124
-
125
114
  Object.keys(_resetPhoneNumber).forEach(function (key) {
126
115
  if (key === "default" || key === "__esModule") return;
127
116
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -133,9 +122,7 @@ Object.keys(_resetPhoneNumber).forEach(function (key) {
133
122
  }
134
123
  });
135
124
  });
136
-
137
125
  var _login = require("./login");
138
-
139
126
  Object.keys(_login).forEach(function (key) {
140
127
  if (key === "default" || key === "__esModule") return;
141
128
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -147,9 +134,7 @@ Object.keys(_login).forEach(function (key) {
147
134
  }
148
135
  });
149
136
  });
150
-
151
137
  var _mfa = require("./mfa");
152
-
153
138
  Object.keys(_mfa).forEach(function (key) {
154
139
  if (key === "default" || key === "__esModule") return;
155
140
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -161,9 +146,7 @@ Object.keys(_mfa).forEach(function (key) {
161
146
  }
162
147
  });
163
148
  });
164
-
165
149
  var _profile = require("./profile");
166
-
167
150
  Object.keys(_profile).forEach(function (key) {
168
151
  if (key === "default" || key === "__esModule") return;
169
152
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -175,9 +158,7 @@ Object.keys(_profile).forEach(function (key) {
175
158
  }
176
159
  });
177
160
  });
178
-
179
161
  var _signup = require("./signup");
180
-
181
162
  Object.keys(_signup).forEach(function (key) {
182
163
  if (key === "default" || key === "__esModule") return;
183
164
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -189,9 +170,7 @@ Object.keys(_signup).forEach(function (key) {
189
170
  }
190
171
  });
191
172
  });
192
-
193
173
  var _socialLogin = require("./socialLogin");
194
-
195
174
  Object.keys(_socialLogin).forEach(function (key) {
196
175
  if (key === "default" || key === "__esModule") return;
197
176
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -203,9 +182,7 @@ Object.keys(_socialLogin).forEach(function (key) {
203
182
  }
204
183
  });
205
184
  });
206
-
207
185
  var _team = require("./team");
208
-
209
186
  Object.keys(_team).forEach(function (key) {
210
187
  if (key === "default" || key === "__esModule") return;
211
188
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -217,9 +194,7 @@ Object.keys(_team).forEach(function (key) {
217
194
  }
218
195
  });
219
196
  });
220
-
221
197
  var _sso = require("./sso");
222
-
223
198
  Object.keys(_sso).forEach(function (key) {
224
199
  if (key === "default" || key === "__esModule") return;
225
200
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -231,9 +206,7 @@ Object.keys(_sso).forEach(function (key) {
231
206
  }
232
207
  });
233
208
  });
234
-
235
209
  var _securityPolicy = require("./securityPolicy");
236
-
237
210
  Object.keys(_securityPolicy).forEach(function (key) {
238
211
  if (key === "default" || key === "__esModule") return;
239
212
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -245,9 +218,7 @@ Object.keys(_securityPolicy).forEach(function (key) {
245
218
  }
246
219
  });
247
220
  });
248
-
249
221
  var _tenants = require("./tenants");
250
-
251
222
  Object.keys(_tenants).forEach(function (key) {
252
223
  if (key === "default" || key === "__esModule") return;
253
224
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -259,9 +230,7 @@ Object.keys(_tenants).forEach(function (key) {
259
230
  }
260
231
  });
261
232
  });
262
-
263
233
  var _roles = require("./roles");
264
-
265
234
  Object.keys(_roles).forEach(function (key) {
266
235
  if (key === "default" || key === "__esModule") return;
267
236
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -273,9 +242,7 @@ Object.keys(_roles).forEach(function (key) {
273
242
  }
274
243
  });
275
244
  });
276
-
277
245
  var _sessions = require("./sessions");
278
-
279
246
  Object.keys(_sessions).forEach(function (key) {
280
247
  if (key === "default" || key === "__esModule") return;
281
248
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -287,9 +254,7 @@ Object.keys(_sessions).forEach(function (key) {
287
254
  }
288
255
  });
289
256
  });
290
-
291
257
  var _sessionsPolicy = require("./sessionsPolicy");
292
-
293
258
  Object.keys(_sessionsPolicy).forEach(function (key) {
294
259
  if (key === "default" || key === "__esModule") return;
295
260
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -301,9 +266,7 @@ Object.keys(_sessionsPolicy).forEach(function (key) {
301
266
  }
302
267
  });
303
268
  });
304
-
305
269
  var _restrictions = require("./restrictions");
306
-
307
270
  Object.keys(_restrictions).forEach(function (key) {
308
271
  if (key === "default" || key === "__esModule") return;
309
272
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -315,9 +278,7 @@ Object.keys(_restrictions).forEach(function (key) {
315
278
  }
316
279
  });
317
280
  });
318
-
319
281
  var _provisioning = require("./provisioning");
320
-
321
282
  Object.keys(_provisioning).forEach(function (key) {
322
283
  if (key === "default" || key === "__esModule") return;
323
284
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -329,9 +290,7 @@ Object.keys(_provisioning).forEach(function (key) {
329
290
  }
330
291
  });
331
292
  });
332
-
333
293
  var _impersonate = require("./impersonate");
334
-
335
294
  Object.keys(_impersonate).forEach(function (key) {
336
295
  if (key === "default" || key === "__esModule") return;
337
296
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -5,17 +5,11 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.useLoginActions = void 0;
7
7
  exports.useLoginState = useLoginState;
8
-
9
8
  var _reduxStore = require("@frontegg/redux-store");
10
-
11
9
  var _hooks = require("./hooks");
12
-
13
10
  const defaultMapper = state => state;
14
-
15
11
  function useLoginState(stateMapper = defaultMapper) {
16
12
  return (0, _hooks.stateHookGenerator)(stateMapper, 'loginState');
17
13
  }
18
-
19
14
  const useLoginActions = () => (0, _hooks.reducerActionsGenerator)(_reduxStore.loginActions, _reduxStore.loginReducers);
20
-
21
15
  exports.useLoginActions = useLoginActions;
package/node/auth/mfa.js CHANGED
@@ -5,17 +5,11 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.useMfaActions = void 0;
7
7
  exports.useMfaState = useMfaState;
8
-
9
8
  var _reduxStore = require("@frontegg/redux-store");
10
-
11
9
  var _hooks = require("./hooks");
12
-
13
10
  const defaultMapper = state => state;
14
-
15
11
  function useMfaState(stateMapper = defaultMapper) {
16
12
  return (0, _hooks.stateHookGenerator)(stateMapper, 'mfaState');
17
13
  }
18
-
19
14
  const useMfaActions = () => (0, _hooks.reducerActionsGenerator)(_reduxStore.mfaActions, _reduxStore.mfaReducers);
20
-
21
15
  exports.useMfaActions = useMfaActions;
@@ -5,13 +5,9 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.useProfileActions = exports.reloadProfileIfNeeded = void 0;
7
7
  exports.useProfileState = useProfileState;
8
-
9
8
  var _react = require("react");
10
-
11
9
  var _reduxStore = require("@frontegg/redux-store");
12
-
13
10
  var _hooks = require("./hooks");
14
-
15
11
  const reloadProfileIfNeeded = () => {
16
12
  const {
17
13
  loading
@@ -23,15 +19,10 @@ const reloadProfileIfNeeded = () => {
23
19
  !loading && loadProfile();
24
20
  }, []);
25
21
  };
26
-
27
22
  exports.reloadProfileIfNeeded = reloadProfileIfNeeded;
28
-
29
23
  const defaultMapper = state => state;
30
-
31
24
  function useProfileState(stateMapper = defaultMapper) {
32
25
  return (0, _hooks.stateHookGenerator)(stateMapper, 'profileState');
33
26
  }
34
-
35
27
  const useProfileActions = () => (0, _hooks.reducerActionsGenerator)(_reduxStore.profileActions, _reduxStore.profileReducers);
36
-
37
28
  exports.useProfileActions = useProfileActions;
@@ -5,17 +5,11 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.useProvisioningActions = void 0;
7
7
  exports.useProvisioningState = useProvisioningState;
8
-
9
8
  var _reduxStore = require("@frontegg/redux-store");
10
-
11
9
  var _hooks = require("./hooks");
12
-
13
10
  const defaultMapper = state => state;
14
-
15
11
  function useProvisioningState(stateMapper = defaultMapper) {
16
12
  return (0, _hooks.stateHookGenerator)(stateMapper, 'provisioningState');
17
13
  }
18
-
19
14
  const useProvisioningActions = () => (0, _hooks.reducerActionsGenerator)(_reduxStore.provisioningActions, _reduxStore.provisioningReducers);
20
-
21
15
  exports.useProvisioningActions = useProvisioningActions;
@@ -5,17 +5,11 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.useResetPhoneNumberActions = void 0;
7
7
  exports.useResetPhoneNumberState = useResetPhoneNumberState;
8
-
9
8
  var _reduxStore = require("@frontegg/redux-store");
10
-
11
9
  var _hooks = require("./hooks");
12
-
13
10
  const defaultMapper = state => state;
14
-
15
11
  function useResetPhoneNumberState(stateMapper = defaultMapper) {
16
12
  return (0, _hooks.stateHookGenerator)(stateMapper, 'resetPhoneNumberState');
17
13
  }
18
-
19
14
  const useResetPhoneNumberActions = () => (0, _hooks.reducerActionsGenerator)(_reduxStore.resetPhoneNumberActions, _reduxStore.resetPhoneNumberReducers);
20
-
21
15
  exports.useResetPhoneNumberActions = useResetPhoneNumberActions;
@@ -5,23 +5,15 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.useRestrictionsActions = exports.useIpRestrictions = exports.useEmailDomainRestrictions = void 0;
7
7
  exports.useRestrictionsState = useRestrictionsState;
8
-
9
8
  var _reduxStore = require("@frontegg/redux-store");
10
-
11
9
  var _react = require("react");
12
-
13
10
  var _hooks = require("./hooks");
14
-
15
11
  const defaultMapper = state => state;
16
-
17
12
  function useRestrictionsState(stateMapper = defaultMapper) {
18
13
  return (0, _hooks.stateHookGenerator)(stateMapper, 'restrictionsState');
19
14
  }
20
-
21
15
  const useRestrictionsActions = () => (0, _hooks.reducerActionsGenerator)(_reduxStore.restrictionsActions, _reduxStore.restrictionsReducers);
22
-
23
16
  exports.useRestrictionsActions = useRestrictionsActions;
24
-
25
17
  const useIpRestrictions = (loadOnMount = false) => {
26
18
  const {
27
19
  loading,
@@ -36,7 +28,8 @@ const useIpRestrictions = (loadOnMount = false) => {
36
28
  loadIpRestrictions
37
29
  } = useRestrictionsActions();
38
30
  (0, _react.useEffect)(() => {
39
- (loadOnMount || !data) && loadIpRestrictions(); // eslint-disable-next-line react-hooks/exhaustive-deps
31
+ (loadOnMount || !data) && loadIpRestrictions();
32
+ // eslint-disable-next-line react-hooks/exhaustive-deps
40
33
  }, [loadOnMount, loadIpRestrictions]);
41
34
  return {
42
35
  loading,
@@ -48,9 +41,7 @@ const useIpRestrictions = (loadOnMount = false) => {
48
41
  userIpValid
49
42
  };
50
43
  };
51
-
52
44
  exports.useIpRestrictions = useIpRestrictions;
53
-
54
45
  const useEmailDomainRestrictions = (loadOnMount = false) => {
55
46
  const {
56
47
  loading,
@@ -62,7 +53,8 @@ const useEmailDomainRestrictions = (loadOnMount = false) => {
62
53
  loadEmailDomainRestrictions
63
54
  } = useRestrictionsActions();
64
55
  (0, _react.useEffect)(() => {
65
- (loadOnMount || !data) && loadEmailDomainRestrictions(); // eslint-disable-next-line react-hooks/exhaustive-deps
56
+ (loadOnMount || !data) && loadEmailDomainRestrictions();
57
+ // eslint-disable-next-line react-hooks/exhaustive-deps
66
58
  }, [loadOnMount, loadEmailDomainRestrictions]);
67
59
  return {
68
60
  loading,
@@ -71,5 +63,4 @@ const useEmailDomainRestrictions = (loadOnMount = false) => {
71
63
  data
72
64
  };
73
65
  };
74
-
75
66
  exports.useEmailDomainRestrictions = useEmailDomainRestrictions;
@@ -5,17 +5,11 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.useRolesActions = void 0;
7
7
  exports.useRolesState = useRolesState;
8
-
9
8
  var _reduxStore = require("@frontegg/redux-store");
10
-
11
9
  var _hooks = require("./hooks");
12
-
13
10
  const defaultMapper = state => state;
14
-
15
11
  function useRolesState(stateMapper = defaultMapper) {
16
12
  return (0, _hooks.stateHookGenerator)(stateMapper, 'rolesState');
17
13
  }
18
-
19
14
  const useRolesActions = () => (0, _hooks.reducerActionsGenerator)(_reduxStore.rolesActions, _reduxStore.rolesReducers);
20
-
21
15
  exports.useRolesActions = useRolesActions;
@@ -5,23 +5,15 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.useSecurityPolicyActions = exports.usePublicPolicySettings = exports.usePublicAuthStrategiesPolicySettings = void 0;
7
7
  exports.useSecurityPolicyState = useSecurityPolicyState;
8
-
9
8
  var _reduxStore = require("@frontegg/redux-store");
10
-
11
9
  var _hooks = require("./hooks");
12
-
13
10
  var _react = require("react");
14
-
15
11
  const defaultMapper = state => state;
16
-
17
12
  function useSecurityPolicyState(stateMapper = defaultMapper) {
18
13
  return (0, _hooks.stateHookGenerator)(stateMapper, 'securityPolicyState');
19
14
  }
20
-
21
15
  const useSecurityPolicyActions = () => (0, _hooks.reducerActionsGenerator)(_reduxStore.securityPolicyActions, _reduxStore.securityPolicyReducers);
22
-
23
16
  exports.useSecurityPolicyActions = useSecurityPolicyActions;
24
-
25
17
  const usePublicPolicySettings = (loadOnMount = false) => {
26
18
  const {
27
19
  loading,
@@ -33,7 +25,8 @@ const usePublicPolicySettings = (loadOnMount = false) => {
33
25
  loadPublicSecurityPolicy
34
26
  } = useSecurityPolicyActions();
35
27
  (0, _react.useEffect)(() => {
36
- (loadOnMount || !policy) && loadPublicSecurityPolicy(); // eslint-disable-next-line react-hooks/exhaustive-deps
28
+ (loadOnMount || !policy) && loadPublicSecurityPolicy();
29
+ // eslint-disable-next-line react-hooks/exhaustive-deps
37
30
  }, [loadOnMount, loadPublicSecurityPolicy]);
38
31
  return {
39
32
  loading,
@@ -42,9 +35,7 @@ const usePublicPolicySettings = (loadOnMount = false) => {
42
35
  policy
43
36
  };
44
37
  };
45
-
46
38
  exports.usePublicPolicySettings = usePublicPolicySettings;
47
-
48
39
  const usePublicAuthStrategiesPolicySettings = (loadOnMount = false) => {
49
40
  const {
50
41
  loading,
@@ -56,7 +47,8 @@ const usePublicAuthStrategiesPolicySettings = (loadOnMount = false) => {
56
47
  loadPublicAuthStrategiesPolicy
57
48
  } = useSecurityPolicyActions();
58
49
  (0, _react.useEffect)(() => {
59
- (loadOnMount || !policy) && loadPublicAuthStrategiesPolicy(); // eslint-disable-next-line react-hooks/exhaustive-deps
50
+ (loadOnMount || !policy) && loadPublicAuthStrategiesPolicy();
51
+ // eslint-disable-next-line react-hooks/exhaustive-deps
60
52
  }, [loadOnMount, loadPublicAuthStrategiesPolicy]);
61
53
  return {
62
54
  loading,
@@ -65,5 +57,4 @@ const usePublicAuthStrategiesPolicySettings = (loadOnMount = false) => {
65
57
  policy
66
58
  };
67
59
  };
68
-
69
60
  exports.usePublicAuthStrategiesPolicySettings = usePublicAuthStrategiesPolicySettings;
@@ -5,17 +5,11 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.useSessionsActions = void 0;
7
7
  exports.useSessionsState = useSessionsState;
8
-
9
8
  var _reduxStore = require("@frontegg/redux-store");
10
-
11
9
  var _hooks = require("./hooks");
12
-
13
10
  const defaultMapper = state => state;
14
-
15
11
  function useSessionsState(stateMapper = defaultMapper) {
16
12
  return (0, _hooks.stateHookGenerator)(stateMapper, 'sessionsState');
17
13
  }
18
-
19
14
  const useSessionsActions = () => (0, _hooks.reducerActionsGenerator)(_reduxStore.sessionsActions, _reduxStore.sessionsReducers);
20
-
21
15
  exports.useSessionsActions = useSessionsActions;
@@ -5,17 +5,11 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.useSessionsPolicyActions = void 0;
7
7
  exports.useSessionsPolicyState = useSessionsPolicyState;
8
-
9
8
  var _reduxStore = require("@frontegg/redux-store");
10
-
11
9
  var _hooks = require("./hooks");
12
-
13
10
  const defaultMapper = state => state;
14
-
15
11
  function useSessionsPolicyState(stateMapper = defaultMapper) {
16
12
  return (0, _hooks.stateHookGenerator)(stateMapper, 'sessionsPolicyState');
17
13
  }
18
-
19
14
  const useSessionsPolicyActions = () => (0, _hooks.reducerActionsGenerator)(_reduxStore.sessionsPolicyActions, _reduxStore.sessionsPolicyReducers);
20
-
21
15
  exports.useSessionsPolicyActions = useSessionsPolicyActions;
@@ -5,17 +5,11 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.useSignUpActions = void 0;
7
7
  exports.useSignUpState = useSignUpState;
8
-
9
8
  var _reduxStore = require("@frontegg/redux-store");
10
-
11
9
  var _hooks = require("./hooks");
12
-
13
10
  const defaultMapper = state => state;
14
-
15
11
  function useSignUpState(stateMapper = defaultMapper) {
16
12
  return (0, _hooks.stateHookGenerator)(stateMapper, 'signUpState');
17
13
  }
18
-
19
14
  const useSignUpActions = () => (0, _hooks.reducerActionsGenerator)(_reduxStore.signUpActions, _reduxStore.signUpReducers);
20
-
21
15
  exports.useSignUpActions = useSignUpActions;
@@ -5,17 +5,11 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.useSocialLoginActions = void 0;
7
7
  exports.useSocialLoginState = useSocialLoginState;
8
-
9
8
  var _reduxStore = require("@frontegg/redux-store");
10
-
11
9
  var _hooks = require("./hooks");
12
-
13
10
  const defaultMapper = state => state;
14
-
15
11
  function useSocialLoginState(stateMapper = defaultMapper) {
16
12
  return (0, _hooks.stateHookGenerator)(stateMapper, 'socialLoginState');
17
13
  }
18
-
19
14
  const useSocialLoginActions = () => (0, _hooks.reducerActionsGenerator)(_reduxStore.socialLoginsActions, _reduxStore.socialLoginsReducer);
20
-
21
15
  exports.useSocialLoginActions = useSocialLoginActions;
package/node/auth/sso.js CHANGED
@@ -5,17 +5,11 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.useSSOActions = void 0;
7
7
  exports.useSSOState = useSSOState;
8
-
9
8
  var _reduxStore = require("@frontegg/redux-store");
10
-
11
9
  var _hooks = require("./hooks");
12
-
13
10
  const defaultMapper = state => state;
14
-
15
11
  function useSSOState(stateMapper = defaultMapper) {
16
12
  return (0, _hooks.stateHookGenerator)(stateMapper, 'ssoState');
17
13
  }
18
-
19
14
  const useSSOActions = () => (0, _hooks.reducerActionsGenerator)(_reduxStore.ssoActions, _reduxStore.ssoReducers);
20
-
21
15
  exports.useSSOActions = useSSOActions;
package/node/auth/team.js CHANGED
@@ -5,17 +5,11 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.useAuthTeamActions = void 0;
7
7
  exports.useAuthTeamState = useAuthTeamState;
8
-
9
8
  var _reduxStore = require("@frontegg/redux-store");
10
-
11
9
  var _hooks = require("./hooks");
12
-
13
10
  const defaultMapper = state => state;
14
-
15
11
  function useAuthTeamState(stateMapper = defaultMapper) {
16
12
  return (0, _hooks.stateHookGenerator)(stateMapper, 'teamState');
17
13
  }
18
-
19
14
  const useAuthTeamActions = () => (0, _hooks.reducerActionsGenerator)(_reduxStore.teamActions, _reduxStore.teamReducers);
20
-
21
15
  exports.useAuthTeamActions = useAuthTeamActions;
@@ -5,17 +5,11 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.useTenantsActions = void 0;
7
7
  exports.useTenantsState = useTenantsState;
8
-
9
8
  var _reduxStore = require("@frontegg/redux-store");
10
-
11
9
  var _hooks = require("./hooks");
12
-
13
10
  const defaultMapper = state => state;
14
-
15
11
  function useTenantsState(stateMapper = defaultMapper) {
16
12
  return (0, _hooks.stateHookGenerator)(stateMapper, 'tenantsState');
17
13
  }
18
-
19
14
  const useTenantsActions = () => (0, _hooks.reducerActionsGenerator)(_reduxStore.tenantsActions, _reduxStore.tenantsReducers);
20
-
21
15
  exports.useTenantsActions = useTenantsActions;
@@ -1,37 +1,29 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.useShadowDom = exports.useRootState = exports.ShadowDomContext = void 0;
9
-
10
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
-
12
9
  var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
13
-
14
10
  var _react = require("react");
15
-
16
11
  var _FronteggStoreContext = require("../FronteggStoreContext");
17
-
18
12
  var _reactRedux = require("react-redux");
19
-
20
13
  const _excluded = ["urlStrategy", "onRedirectTo", "renderByRoute", "customLoader", "customStyles", "contextOptions"];
21
14
  const ShadowDomContext = /*#__PURE__*/(0, _react.createContext)({});
22
15
  exports.ShadowDomContext = ShadowDomContext;
23
-
24
16
  const useShadowDom = () => {
25
17
  const context = (0, _react.useContext)(ShadowDomContext);
26
18
  const {
27
- urlStrategy = 'path',
28
- onRedirectTo = urlStrategy === 'path' ? path => window.history.pushState(null, '', path) : path => window.history.pushState(null, '', `#${path}`),
29
- renderByRoute = false,
30
- customLoader = false,
31
- customStyles,
32
- contextOptions
33
- } = context,
34
- rest = (0, _objectWithoutPropertiesLoose2.default)(context, _excluded);
19
+ urlStrategy = 'path',
20
+ onRedirectTo = urlStrategy === 'path' ? path => window.history.pushState(null, '', path) : path => window.history.pushState(null, '', `#${path}`),
21
+ renderByRoute = false,
22
+ customLoader = false,
23
+ customStyles,
24
+ contextOptions
25
+ } = context,
26
+ rest = (0, _objectWithoutPropertiesLoose2.default)(context, _excluded);
35
27
  return (0, _extends2.default)({
36
28
  isShadowDom: true,
37
29
  onRedirectTo,
@@ -44,11 +36,8 @@ const useShadowDom = () => {
44
36
  }, contextOptions)
45
37
  }, rest);
46
38
  };
47
-
48
39
  exports.useShadowDom = useShadowDom;
49
-
50
40
  const useRootState = () => {
51
41
  return (0, _FronteggStoreContext.useSelector)(state => state.root, _reactRedux.shallowEqual);
52
42
  };
53
-
54
43
  exports.useRootState = useRootState;
@@ -5,24 +5,16 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.useConnectivityActions = void 0;
7
7
  exports.useConnectivityState = useConnectivityState;
8
-
9
8
  var _react = require("react");
10
-
11
9
  var _reactRedux = require("react-redux");
12
-
13
10
  var _FronteggStoreContext = require("../FronteggStoreContext");
14
-
15
11
  var _reduxStore = require("@frontegg/redux-store");
16
-
17
12
  const defaultMapper = state => state;
18
-
19
13
  function useConnectivityState(stateMapper = defaultMapper) {
20
14
  return (0, _FronteggStoreContext.useSelector)(state => stateMapper(state[_reduxStore.connectivityStoreName]), _reactRedux.shallowEqual);
21
15
  }
22
-
23
16
  const useConnectivityActions = () => {
24
17
  const dispatch = (0, _FronteggStoreContext.useDispatch)();
25
18
  return (0, _react.useMemo)(() => (0, _reduxStore.bindActionCreators)(_reduxStore.connectivityActions, dispatch), [_reduxStore.connectivityActions]);
26
19
  };
27
-
28
20
  exports.useConnectivityActions = useConnectivityActions;
@@ -15,5 +15,4 @@ Object.defineProperty(exports, "useConnectivityState", {
15
15
  return _hooks.useConnectivityState;
16
16
  }
17
17
  });
18
-
19
18
  var _hooks = require("./hooks");
@@ -3,9 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
-
7
6
  var _useFeatureFlags = require("./useFeatureFlags");
8
-
9
7
  Object.keys(_useFeatureFlags).forEach(function (key) {
10
8
  if (key === "default" || key === "__esModule") return;
11
9
  if (key in exports && exports[key] === _useFeatureFlags[key]) return;