@frontegg/react-hooks 6.75.0-alpha.2 → 6.75.0-alpha.3
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/auth/index.d.ts +1 -0
- package/auth/index.js +1 -0
- package/auth/passkeys.d.ts +7 -0
- package/auth/passkeys.js +7 -0
- package/index.js +1 -1
- package/node/auth/index.js +12 -0
- package/node/auth/passkeys.js +15 -0
- package/node/index.js +1 -1
- package/package.json +3 -3
package/auth/index.d.ts
CHANGED
package/auth/index.js
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PasskeysState } from '@frontegg/redux-store';
|
|
2
|
+
import { PasskeysActions } from '@frontegg/redux-store';
|
|
3
|
+
declare type AuthPasskeysStateMapper<S> = (state: PasskeysState) => S;
|
|
4
|
+
export declare function usePasskeysState(): PasskeysState;
|
|
5
|
+
export declare function usePasskeysState<S>(stateMapper: AuthPasskeysStateMapper<S>): S;
|
|
6
|
+
export declare const usePasskeysActions: () => PasskeysActions;
|
|
7
|
+
export {};
|
package/auth/passkeys.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { passkeysActions, passkeysReducers } from '@frontegg/redux-store';
|
|
2
|
+
import { reducerActionsGenerator, stateHookGenerator } from './hooks';
|
|
3
|
+
const defaultMapper = state => state;
|
|
4
|
+
export function usePasskeysState(stateMapper = defaultMapper) {
|
|
5
|
+
return stateHookGenerator(stateMapper, 'passkeysState');
|
|
6
|
+
}
|
|
7
|
+
export const usePasskeysActions = () => reducerActionsGenerator(passkeysActions, passkeysReducers);
|
package/index.js
CHANGED
package/node/auth/index.js
CHANGED
|
@@ -302,6 +302,18 @@ Object.keys(_impersonate).forEach(function (key) {
|
|
|
302
302
|
}
|
|
303
303
|
});
|
|
304
304
|
});
|
|
305
|
+
var _passkeys = require("./passkeys");
|
|
306
|
+
Object.keys(_passkeys).forEach(function (key) {
|
|
307
|
+
if (key === "default" || key === "__esModule") return;
|
|
308
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
309
|
+
if (key in exports && exports[key] === _passkeys[key]) return;
|
|
310
|
+
Object.defineProperty(exports, key, {
|
|
311
|
+
enumerable: true,
|
|
312
|
+
get: function () {
|
|
313
|
+
return _passkeys[key];
|
|
314
|
+
}
|
|
315
|
+
});
|
|
316
|
+
});
|
|
305
317
|
var _groups = require("./groups");
|
|
306
318
|
Object.keys(_groups).forEach(function (key) {
|
|
307
319
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.usePasskeysActions = void 0;
|
|
7
|
+
exports.usePasskeysState = usePasskeysState;
|
|
8
|
+
var _reduxStore = require("@frontegg/redux-store");
|
|
9
|
+
var _hooks = require("./hooks");
|
|
10
|
+
const defaultMapper = state => state;
|
|
11
|
+
function usePasskeysState(stateMapper = defaultMapper) {
|
|
12
|
+
return (0, _hooks.stateHookGenerator)(stateMapper, 'passkeysState');
|
|
13
|
+
}
|
|
14
|
+
const usePasskeysActions = () => (0, _hooks.reducerActionsGenerator)(_reduxStore.passkeysActions, _reduxStore.passkeysReducers);
|
|
15
|
+
exports.usePasskeysActions = usePasskeysActions;
|
package/node/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontegg/react-hooks",
|
|
3
|
-
"version": "6.75.0-alpha.
|
|
3
|
+
"version": "6.75.0-alpha.3",
|
|
4
4
|
"main": "./node/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Frontegg LTD",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@babel/runtime": "^7.18.6",
|
|
9
|
-
"@frontegg/redux-store": "6.75.0-alpha.
|
|
10
|
-
"@frontegg/types": "6.75.0-alpha.
|
|
9
|
+
"@frontegg/redux-store": "6.75.0-alpha.3",
|
|
10
|
+
"@frontegg/types": "6.75.0-alpha.3",
|
|
11
11
|
"@types/react": "*",
|
|
12
12
|
"react-redux": "^7.x"
|
|
13
13
|
},
|