@frontegg/nextjs 9.2.3-alpha.14762912593 → 9.2.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/CHANGELOG.md +15 -0
- package/common/index.d.ts +0 -1
- package/common/index.js +0 -12
- package/common/index.js.map +1 -1
- package/index.d.ts +0 -1
- package/index.js +1 -13
- package/index.js.map +1 -1
- package/no-ssr/FronteggProviderNoSSR.js +7 -6
- package/no-ssr/FronteggProviderNoSSR.js.map +1 -1
- package/no-ssr/NoSSRStoreHolder.d.ts +8 -0
- package/no-ssr/NoSSRStoreHolder.js +22 -0
- package/no-ssr/NoSSRStoreHolder.js.map +1 -0
- package/package.json +3 -3
- package/sdkVersion.js +1 -1
- package/sdkVersion.js.map +1 -1
- package/common/cmc/base.d.ts +0 -9
- package/common/cmc/base.js +0 -46
- package/common/cmc/base.js.map +0 -1
- package/common/cmc/components.d.ts +0 -7
- package/common/cmc/components.js +0 -37
- package/common/cmc/components.js.map +0 -1
- package/common/cmc/hooks.d.ts +0 -3
- package/common/cmc/hooks.js +0 -51
- package/common/cmc/hooks.js.map +0 -1
- package/common/cmc/index.d.ts +0 -2
- package/common/cmc/index.js +0 -28
- package/common/cmc/index.js.map +0 -1
- package/common/cmc/package.json +0 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
## [9.2.3](https://github.com/frontegg/frontegg-nextjs/compare/v9.2.2...v9.2.3) (2025-5-6)
|
|
4
|
+
|
|
5
|
+
- FR-18986 - Added tooltip functionality for individual chips in GroupsChipsList component
|
|
6
|
+
- FR-20385 - Fixed user impersonation with identifiers
|
|
7
|
+
- FR-20254 - Added localizations for activate with social logins
|
|
8
|
+
- FR-20280 - Added support for signup with phone number
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### NextJS Wrapper 9.2.3:
|
|
12
|
+
- FR-20225 - Add support for StrictMode when using SSG export
|
|
13
|
+
- Update README.md
|
|
14
|
+
- FR-20225 - Fix SSG env variable check and add strict mode support
|
|
15
|
+
- FR-19751 - Trigger release
|
|
1
16
|
# Change Log
|
|
2
17
|
|
|
3
18
|
## [9.2.2](https://github.com/frontegg/frontegg-nextjs/compare/v9.2.2...v9.2.2) (2025-4-9)
|
package/common/index.d.ts
CHANGED
package/common/index.js
CHANGED
|
@@ -54,16 +54,4 @@ Object.keys(_hooks).forEach(function (key) {
|
|
|
54
54
|
var _AppContext = _interopRequireDefault(require("./AppContext"));
|
|
55
55
|
var _FronteggBaseProvider = require("./FronteggBaseProvider");
|
|
56
56
|
var _AuthorizedContent = _interopRequireDefault(require("./AuthorizedContent"));
|
|
57
|
-
var _cmc = require("./cmc");
|
|
58
|
-
Object.keys(_cmc).forEach(function (key) {
|
|
59
|
-
if (key === "default" || key === "__esModule") return;
|
|
60
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
61
|
-
if (key in exports && exports[key] === _cmc[key]) return;
|
|
62
|
-
Object.defineProperty(exports, key, {
|
|
63
|
-
enumerable: true,
|
|
64
|
-
get: function () {
|
|
65
|
-
return _cmc[key];
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
});
|
|
69
57
|
//# sourceMappingURL=index.js.map
|
package/common/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_helpers","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_hooks","_AppContext","_interopRequireDefault","_FronteggBaseProvider","_AuthorizedContent"
|
|
1
|
+
{"version":3,"file":"index.js","names":["_helpers","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_hooks","_AppContext","_interopRequireDefault","_FronteggBaseProvider","_AuthorizedContent"],"sources":["../../../../packages/nextjs/src/common/index.ts"],"sourcesContent":["export * from './helpers';\nexport * from './hooks';\nexport { default as AppContext } from './AppContext';\nexport { FronteggBaseProvider } from './FronteggBaseProvider';\nexport { default as AuthorizedContent } from './AuthorizedContent';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,QAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAL,QAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAb,QAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,MAAA,GAAAb,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAW,MAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAS,MAAA,CAAAT,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,MAAA,CAAAT,GAAA;IAAA;EAAA;AAAA;AACA,IAAAU,WAAA,GAAAC,sBAAA,CAAAf,OAAA;AACA,IAAAgB,qBAAA,GAAAhB,OAAA;AACA,IAAAiB,kBAAA,GAAAF,sBAAA,CAAAf,OAAA","ignoreList":[]}
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license Frontegg v9.2.3
|
|
1
|
+
/** @license Frontegg v9.2.3
|
|
2
2
|
*
|
|
3
3
|
* This source code is licensed under the MIT license found in the
|
|
4
4
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -92,16 +92,4 @@ Object.keys(_types2).forEach(function (key) {
|
|
|
92
92
|
}
|
|
93
93
|
});
|
|
94
94
|
});
|
|
95
|
-
var _noSsr = require("./no-ssr");
|
|
96
|
-
Object.keys(_noSsr).forEach(function (key) {
|
|
97
|
-
if (key === "default" || key === "__esModule") return;
|
|
98
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
99
|
-
if (key in exports && exports[key] === _noSsr[key]) return;
|
|
100
|
-
Object.defineProperty(exports, key, {
|
|
101
|
-
enumerable: true,
|
|
102
|
-
get: function () {
|
|
103
|
-
return _noSsr[key];
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
});
|
|
107
95
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_common","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_config","_types","_js","_reactHooks","_types2"
|
|
1
|
+
{"version":3,"file":"index.js","names":["_common","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_config","_types","_js","_reactHooks","_types2"],"sources":["../../../packages/nextjs/src/index.ts"],"sourcesContent":["export * from './common';\nexport * from './config';\nexport * from './types';\n\nexport { AdminPortal, AppHolder, HostedLogin } from '@frontegg/js';\nexport * from '@frontegg/react-hooks';\nexport * from '@frontegg/types';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,OAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA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AhB,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAc,WAAA,EAAAb,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAY,WAAA,CAAAZ,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAI,WAAA,CAAAZ,GAAA;IAAA;EAAA;AAAA;AACA,IAAAa,OAAA,GAAAjB,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAe,OAAA,EAAAd,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAa,OAAA,CAAAb,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAK,OAAA,CAAAb,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -17,13 +17,14 @@ var _AppContext = _interopRequireDefault(require("../common/AppContext"));
|
|
|
17
17
|
var _useOnRedirectTo = _interopRequireDefault(require("../utils/useOnRedirectTo"));
|
|
18
18
|
var _ExpireInListener2 = _interopRequireDefault(require("./ExpireInListener"));
|
|
19
19
|
var _reduxStore = require("@frontegg/redux-store");
|
|
20
|
+
var _NoSSRStoreHolder = _interopRequireDefault(require("./NoSSRStoreHolder"));
|
|
20
21
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
22
|
var _ExpireInListener;
|
|
22
23
|
const _excluded = ["router", "appName", "hostedLoginBox", "customLoginBox"];
|
|
23
24
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
24
25
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
25
26
|
const Connector = _props => {
|
|
26
|
-
var _props$basename, _props$authOptions;
|
|
27
|
+
var _props$basename, _props$authOptions, _NoSSRStoreHolder$get;
|
|
27
28
|
const {
|
|
28
29
|
router,
|
|
29
30
|
appName,
|
|
@@ -36,7 +37,7 @@ const Connector = _props => {
|
|
|
36
37
|
const contextOptions = (0, _extends2.default)({
|
|
37
38
|
requestCredentials: 'include'
|
|
38
39
|
}, props.contextOptions);
|
|
39
|
-
const storeHolder = storeHolderRef.current;
|
|
40
|
+
const storeHolder = (_NoSSRStoreHolder$get = _NoSSRStoreHolder.default.getInstance()) != null ? _NoSSRStoreHolder$get : storeHolderRef.current;
|
|
40
41
|
let sharedStore = storeHolder.store;
|
|
41
42
|
if (!sharedStore) {
|
|
42
43
|
sharedStore = (0, _reduxStore.createStore)({
|
|
@@ -53,6 +54,7 @@ const Connector = _props => {
|
|
|
53
54
|
}
|
|
54
55
|
});
|
|
55
56
|
storeHolder.store = sharedStore;
|
|
57
|
+
storeHolderRef.current.store = sharedStore;
|
|
56
58
|
}
|
|
57
59
|
let app;
|
|
58
60
|
try {
|
|
@@ -61,6 +63,7 @@ const Connector = _props => {
|
|
|
61
63
|
} catch (e) {
|
|
62
64
|
var _props$basename2;
|
|
63
65
|
app = (0, _js.initialize)((0, _extends2.default)({}, props, {
|
|
66
|
+
store: sharedStore,
|
|
64
67
|
hostedLoginBox: hostedLoginBox != null ? hostedLoginBox : false,
|
|
65
68
|
basename: (_props$basename2 = props.basename) != null ? _props$basename2 : baseName,
|
|
66
69
|
authOptions: (0, _extends2.default)({}, props.authOptions, {
|
|
@@ -69,14 +72,12 @@ const Connector = _props => {
|
|
|
69
72
|
contextOptions,
|
|
70
73
|
onRedirectTo
|
|
71
74
|
}), appName != null ? appName : 'default');
|
|
72
|
-
}
|
|
73
|
-
_restApi.ContextHolder.for(appName != null ? appName : 'default').setOnRedirectTo(onRedirectTo);
|
|
74
|
-
(0, _react.useEffect)(() => {
|
|
75
75
|
app.store.dispatch({
|
|
76
76
|
type: 'auth/requestAuthorize',
|
|
77
77
|
payload: true
|
|
78
78
|
});
|
|
79
|
-
}
|
|
79
|
+
}
|
|
80
|
+
_restApi.ContextHolder.for(appName != null ? appName : 'default').setOnRedirectTo(onRedirectTo);
|
|
80
81
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_AppContext.default.Provider, {
|
|
81
82
|
value: app,
|
|
82
83
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactHooks.FronteggStoreProvider, (0, _extends2.default)({}, (0, _extends2.default)({}, props, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FronteggProviderNoSSR.js","names":["_interopRequireDefault","require","Object","defineProperty","exports","value","FronteggProviderNoSSR","_extends2","_objectWithoutPropertiesLoose2","_js","_reactHooks","_restApi","_router","_react","_interopRequireWildcard","_AppContext","_useOnRedirectTo","_ExpireInListener2","_reduxStore","_jsxRuntime","_ExpireInListener","_excluded","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","Connector","_props","_props$basename","_props$authOptions","router","appName","hostedLoginBox","props","baseName","basename","basePath","storeHolderRef","useRef","onRedirectTo","useOnRedirectTo","authOptions","routes","contextOptions","requestCredentials","storeHolder","current","sharedStore","store","createStore","context","previewMode","name","urlStrategy","builderMode","initialState","auth","app","AppHolder","
|
|
1
|
+
{"version":3,"file":"FronteggProviderNoSSR.js","names":["_interopRequireDefault","require","Object","defineProperty","exports","value","FronteggProviderNoSSR","_extends2","_objectWithoutPropertiesLoose2","_js","_reactHooks","_restApi","_router","_react","_interopRequireWildcard","_AppContext","_useOnRedirectTo","_ExpireInListener2","_reduxStore","_NoSSRStoreHolder","_jsxRuntime","_ExpireInListener","_excluded","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","Connector","_props","_props$basename","_props$authOptions","_NoSSRStoreHolder$get","router","appName","hostedLoginBox","props","baseName","basename","basePath","storeHolderRef","useRef","onRedirectTo","useOnRedirectTo","authOptions","routes","contextOptions","requestCredentials","storeHolder","NoSSRStoreHolder","getInstance","current","sharedStore","store","createStore","context","previewMode","name","urlStrategy","builderMode","initialState","auth","app","AppHolder","_props$basename2","initialize","dispatch","type","payload","ContextHolder","for","setOnRedirectTo","jsx","Provider","children","FronteggStoreProvider","FronteggNextJSProvider","useRouter","jsxs","framework"],"sources":["../../../../packages/nextjs/src/no-ssr/FronteggProviderNoSSR.tsx"],"sourcesContent":["'use client';\n\nimport { AppHolder, FronteggApp, initialize } from '@frontegg/js';\nimport { FronteggStoreProvider } from '@frontegg/react-hooks';\nimport { ContextHolder, ContextOptions } from '@frontegg/rest-api';\nimport { FronteggAppOptions } from '@frontegg/types';\nimport { NextRouter, useRouter } from 'next/router';\nimport React, { FC, PropsWithChildren, ReactNode, useEffect, useRef } from 'react';\nimport AppContext from '../common/AppContext';\nimport useOnRedirectTo from '../utils/useOnRedirectTo';\nimport ExpireInListener from './ExpireInListener';\nimport { createStore, FronteggStore } from '@frontegg/redux-store';\nimport NoSSRStoreHolder from './NoSSRStoreHolder';\n\nexport type FronteggProviderNoSSRProps = PropsWithChildren<FronteggAppOptions>;\n\ntype ConnectorProps = PropsWithChildren<FronteggAppOptions> & {\n alwaysVisibleChildren?: ReactNode;\n router: NextRouter;\n appName?: string;\n};\n\nconst Connector: FC<ConnectorProps> = (_props) => {\n const { router, appName, hostedLoginBox, customLoginBox, ...props } = _props;\n const baseName = props.basename ?? router.basePath;\n const storeHolderRef = useRef<{ store?: FronteggStore }>({});\n const onRedirectTo = useOnRedirectTo(baseName, router, props.authOptions?.routes);\n\n const contextOptions: ContextOptions = {\n requestCredentials: 'include',\n ...props.contextOptions,\n };\n\n const storeHolder = NoSSRStoreHolder.getInstance() ?? storeHolderRef.current;\n let sharedStore = storeHolder.store;\n if (!sharedStore) {\n sharedStore = createStore({\n context: contextOptions,\n storeHolder,\n previewMode: props.previewMode,\n name: appName ?? 'default',\n urlStrategy: props.urlStrategy,\n builderMode: false,\n initialState: {\n auth: {\n ...props.authOptions,\n onRedirectTo,\n },\n },\n });\n storeHolder.store = sharedStore;\n storeHolderRef.current.store = sharedStore;\n }\n\n let app: FronteggApp;\n try {\n app = AppHolder.getInstance(appName ?? 'default');\n app.store = sharedStore;\n } catch (e) {\n app = initialize(\n {\n ...props,\n store: sharedStore,\n hostedLoginBox: hostedLoginBox ?? false,\n basename: props.basename ?? baseName,\n authOptions: {\n ...props.authOptions,\n onRedirectTo,\n },\n contextOptions,\n onRedirectTo,\n },\n appName ?? 'default'\n );\n app.store.dispatch({ type: 'auth/requestAuthorize', payload: true });\n }\n\n ContextHolder.for(appName ?? 'default').setOnRedirectTo(onRedirectTo);\n\n return (\n <AppContext.Provider value={app}>\n <FronteggStoreProvider {...({ ...props, app } as any)}>{props.children}</FronteggStoreProvider>\n </AppContext.Provider>\n );\n};\n\nconst FronteggNextJSProvider: FC<FronteggProviderNoSSRProps> = (props) => {\n const router = useRouter();\n\n return (\n <Connector {...props} router={router}>\n <ExpireInListener />\n {props.children}\n </Connector>\n );\n};\n\nexport const FronteggProviderNoSSR: FC<FronteggProviderNoSSRProps> = (props) => {\n return (\n <FronteggNextJSProvider {...props} framework={'nextjs'}>\n {props.children}\n </FronteggNextJSProvider>\n );\n};\n"],"mappings":";AAAA,YAAY;;AAAC,IAAAA,sBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,KAAA;AAAA;AAAAD,OAAA,CAAAE,qBAAA;AAAA,IAAAC,SAAA,GAAAP,sBAAA,CAAAC,OAAA;AAAA,IAAAO,8BAAA,GAAAR,sBAAA,CAAAC,OAAA;AAEb,IAAAQ,GAAA,GAAAR,OAAA;AACA,IAAAS,WAAA,GAAAT,OAAA;AACA,IAAAU,QAAA,GAAAV,OAAA;AAEA,IAAAW,OAAA,GAAAX,OAAA;AACA,IAAAY,MAAA,GAAAC,uBAAA,CAAAb,OAAA;AACA,IAAAc,WAAA,GAAAf,sBAAA,CAAAC,OAAA;AACA,IAAAe,gBAAA,GAAAhB,sBAAA,CAAAC,OAAA;AACA,IAAAgB,kBAAA,GAAAjB,sBAAA,CAAAC,OAAA;AACA,IAAAiB,WAAA,GAAAjB,OAAA;AACA,IAAAkB,iBAAA,GAAAnB,sBAAA,CAAAC,OAAA;AAAkD,IAAAmB,WAAA,GAAAnB,OAAA;AAAA,IAAAoB,iBAAA;AAAA,MAAAC,SAAA;AAAA,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAV,wBAAAU,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAA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AAlF,SAAA,CAAAsB,OAAA,MAAKoB,KAAK;IAAE2C,SAAS,EAAE,QAAS;IAAAL,QAAA,EACpDtC,KAAK,CAACsC;EAAQ,EACO,CAAC;AAE7B,CAAC;AAACnF,OAAA,CAAAE,qBAAA,GAAAA,qBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _NoSSRStoreHolder;
|
|
8
|
+
class NoSSRStoreHolder {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.store = void 0;
|
|
11
|
+
}
|
|
12
|
+
static getInstance() {
|
|
13
|
+
if (NoSSRStoreHolder.instance === null) {
|
|
14
|
+
NoSSRStoreHolder.instance = new NoSSRStoreHolder();
|
|
15
|
+
}
|
|
16
|
+
return NoSSRStoreHolder.instance;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
_NoSSRStoreHolder = NoSSRStoreHolder;
|
|
20
|
+
NoSSRStoreHolder.instance = null;
|
|
21
|
+
var _default = exports.default = NoSSRStoreHolder;
|
|
22
|
+
//# sourceMappingURL=NoSSRStoreHolder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NoSSRStoreHolder.js","names":["NoSSRStoreHolder","constructor","store","getInstance","instance","_NoSSRStoreHolder","_default","exports","default"],"sources":["../../../../packages/nextjs/src/no-ssr/NoSSRStoreHolder.ts"],"sourcesContent":["import { FronteggStore } from '@frontegg/redux-store';\n\nclass NoSSRStoreHolder {\n private static instance: NoSSRStoreHolder | null = null;\n store?: FronteggStore;\n\n private constructor() {}\n\n public static getInstance(): NoSSRStoreHolder {\n if (NoSSRStoreHolder.instance === null) {\n NoSSRStoreHolder.instance = new NoSSRStoreHolder();\n }\n return NoSSRStoreHolder.instance;\n }\n}\n\nexport default NoSSRStoreHolder;\n"],"mappings":";;;;;;;AAEA,MAAMA,gBAAgB,CAAC;EAIbC,WAAWA,CAAA,EAAG;IAAA,KAFtBC,KAAK;EAEkB;EAEvB,OAAcC,WAAWA,CAAA,EAAqB;IAC5C,IAAIH,gBAAgB,CAACI,QAAQ,KAAK,IAAI,EAAE;MACtCJ,gBAAgB,CAACI,QAAQ,GAAG,IAAIJ,gBAAgB,CAAC,CAAC;IACpD;IACA,OAAOA,gBAAgB,CAACI,QAAQ;EAClC;AACF;AAACC,iBAAA,GAZKL,gBAAgB;AAAhBA,gBAAgB,CACLI,QAAQ,GAA4B,IAAI;AAAA,IAAAE,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAa1CR,gBAAgB","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontegg/nextjs",
|
|
3
3
|
"libName": "FronteggNextJs",
|
|
4
|
-
"version": "9.2.3
|
|
4
|
+
"version": "9.2.3",
|
|
5
5
|
"author": "Frontegg LTD",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"lint-json": "eslint -c .eslintrc.json -o ./lint-report.json --format json --no-color ./src/**/*.{ts,tsx}"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@frontegg/js": "7.
|
|
31
|
-
"@frontegg/react-hooks": "7.
|
|
30
|
+
"@frontegg/js": "7.67.0",
|
|
31
|
+
"@frontegg/react-hooks": "7.67.0",
|
|
32
32
|
"http-proxy": "^1.18.1",
|
|
33
33
|
"iron-session": "^6.3.1",
|
|
34
34
|
"jose": "^4.12.2"
|
package/sdkVersion.js
CHANGED
package/sdkVersion.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdkVersion.js","names":["version"],"sources":["../../../packages/nextjs/src/sdkVersion.ts"],"sourcesContent":["export default { version: '9.2.3
|
|
1
|
+
{"version":3,"file":"sdkVersion.js","names":["version"],"sources":["../../../packages/nextjs/src/sdkVersion.ts"],"sourcesContent":["export default { version: '9.2.3' };\n"],"mappings":";;;;;;iCAAe;EAAEA,OAAO,EAAE;AAAQ,CAAC","ignoreList":[]}
|
package/common/cmc/base.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { FronteggApp } from '@frontegg/js';
|
|
2
|
-
import { CMCComponentProps } from '@frontegg/types';
|
|
3
|
-
import { FC } from 'react';
|
|
4
|
-
export type RenderableFronteggComponent = keyof Pick<FronteggApp, 'renderChangePasswordForm' | 'renderInviteUserDialog' | 'renderProfilePage' | 'renderUsersTable'>;
|
|
5
|
-
export type AvailableFronteggHooks = keyof Pick<FronteggApp, 'getUsersTableStore' | 'getInviteUserDialogStore'>;
|
|
6
|
-
export type FronteggCMCComponentProps<K extends CMCComponentProps> = Pick<K, 'themeOptions' | 'props' | 'localizations' | 'hostStyle'>;
|
|
7
|
-
export declare const CMCComponent: FC<FronteggCMCComponentProps<CMCComponentProps> & {
|
|
8
|
-
renderComponent: RenderableFronteggComponent;
|
|
9
|
-
}>;
|
package/common/cmc/base.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.CMCComponent = void 0;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _ = require("../..");
|
|
11
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
13
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
|
-
const CMCComponent = exports.CMCComponent = /*#__PURE__*/(0, _react.memo)(({
|
|
15
|
-
themeOptions,
|
|
16
|
-
props,
|
|
17
|
-
localizations,
|
|
18
|
-
hostStyle,
|
|
19
|
-
renderComponent
|
|
20
|
-
}) => {
|
|
21
|
-
const ref = _react.default.useRef(null);
|
|
22
|
-
const app = (0, _react.useContext)(_.AppContext);
|
|
23
|
-
_react.default.useLayoutEffect(() => {
|
|
24
|
-
if (!ref.current) {
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
let rootRendered = {
|
|
28
|
-
unmount: () => {}
|
|
29
|
-
};
|
|
30
|
-
console.log({
|
|
31
|
-
app
|
|
32
|
-
});
|
|
33
|
-
if (!app[renderComponent]) {
|
|
34
|
-
throw new Error(`Component ${renderComponent} is not supported`);
|
|
35
|
-
}
|
|
36
|
-
app[renderComponent](ref.current, props, {
|
|
37
|
-
themeOptions,
|
|
38
|
-
localizations
|
|
39
|
-
}).then(root => rootRendered = root);
|
|
40
|
-
}, []);
|
|
41
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
42
|
-
style: (0, _extends2.default)({}, hostStyle),
|
|
43
|
-
ref: ref
|
|
44
|
-
});
|
|
45
|
-
}, () => true);
|
|
46
|
-
//# sourceMappingURL=base.js.map
|
package/common/cmc/base.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base.js","names":["_react","_interopRequireWildcard","require","_","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","CMCComponent","exports","memo","themeOptions","props","localizations","hostStyle","renderComponent","ref","React","useRef","app","useContext","AppContext","useLayoutEffect","current","rootRendered","unmount","console","log","Error","then","root","jsx","style","_extends2"],"sources":["../../../../../packages/nextjs/src/common/cmc/base.tsx"],"sourcesContent":["import { FronteggApp } from '@frontegg/js';\nimport React, { memo } from 'react';\nimport { useContext } from 'react';\nimport { CMCComponentProps } from '@frontegg/types';\nimport { FC } from 'react';\nimport { AppContext } from '../..';\n\n\nexport type RenderableFronteggComponent = keyof Pick<FronteggApp, 'renderChangePasswordForm' | 'renderInviteUserDialog' | 'renderProfilePage' | 'renderUsersTable'>;\nexport type AvailableFronteggHooks = keyof Pick<FronteggApp, 'getUsersTableStore' | 'getInviteUserDialogStore'>;\nexport type FronteggCMCComponentProps<K extends CMCComponentProps> = Pick<K, 'themeOptions' | 'props' | 'localizations' | 'hostStyle'>\n\nexport const CMCComponent: FC<FronteggCMCComponentProps<CMCComponentProps> & { renderComponent: RenderableFronteggComponent }> = memo(\n ({ themeOptions, props, localizations, hostStyle, renderComponent }) => {\n const ref = React.useRef<HTMLDivElement>(null);\n const app = useContext(AppContext)!;\n React.useLayoutEffect(() => {\n if (!ref.current) {\n return;\n }\n let rootRendered: { unmount: () => void } = {\n unmount: () => { },\n };\n\n console.log({ app });\n if (!app[renderComponent]) {\n throw new Error(`Component ${renderComponent} is not supported`);\n }\n\n app[renderComponent](ref.current, props, {\n themeOptions,\n localizations,\n })\n .then((root) => (rootRendered = root));\n\n }, []);\n\n return <div style={{ ...hostStyle }} ref={ref} />;\n },\n () => true\n);\n\n\n\n\n\n"],"mappings":";;;;;;;;AACA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAIA,IAAAC,CAAA,GAAAD,OAAA;AAAmC,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAA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AMC,GAAG,GAAGC,cAAK,CAACC,MAAM,CAAiB,IAAI,CAAC;EAC9C,MAAMC,GAAG,GAAG,IAAAC,iBAAU,EAACC,YAAU,CAAE;EACnCJ,cAAK,CAACK,eAAe,CAAC,MAAM;IACxB,IAAI,CAACN,GAAG,CAACO,OAAO,EAAE;MACd;IACJ;IACA,IAAIC,YAAqC,GAAG;MACxCC,OAAO,EAAEA,CAAA,KAAM,CAAE;IACrB,CAAC;IAEDC,OAAO,CAACC,GAAG,CAAC;MAAER;IAAI,CAAC,CAAC;IACpB,IAAI,CAACA,GAAG,CAACJ,eAAe,CAAC,EAAE;MACvB,MAAM,IAAIa,KAAK,CAAC,aAAab,eAAe,mBAAmB,CAAC;IACpE;IAEAI,GAAG,CAACJ,eAAe,CAAC,CAACC,GAAG,CAACO,OAAO,EAAEX,KAAK,EAAE;MACrCD,YAAY;MACZE;IACJ,CAAC,CAAC,CACGgB,IAAI,CAAEC,IAAI,IAAMN,YAAY,GAAGM,IAAK,CAAC;EAE9C,CAAC,EAAE,EAAE,CAAC;EAEN,oBAAO,IAAA3C,WAAA,CAAA4C,GAAA;IAAKC,KAAK,MAAAC,SAAA,CAAAvC,OAAA,MAAOoB,SAAS,CAAG;IAACE,GAAG,EAAEA;EAAI,CAAE,CAAC;AACrD,CAAC,EACD,MAAM,IACV,CAAC","ignoreList":[]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ChangePasswordFormProps, InviteUserDialogProps, ProfilePageProps, UsersTableProps } from '@frontegg/types';
|
|
2
|
-
import { FC } from 'react';
|
|
3
|
-
import { FronteggCMCComponentProps } from './base';
|
|
4
|
-
export declare const UsersTable: FC<FronteggCMCComponentProps<UsersTableProps>>;
|
|
5
|
-
export declare const InviteUserDialog: FC<FronteggCMCComponentProps<InviteUserDialogProps>>;
|
|
6
|
-
export declare const ChangePasswordForm: FC<FronteggCMCComponentProps<ChangePasswordFormProps>>;
|
|
7
|
-
export declare const ProfilePage: FC<FronteggCMCComponentProps<ProfilePageProps>>;
|
package/common/cmc/components.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
'use client';
|
|
3
|
-
|
|
4
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.UsersTable = exports.ProfilePage = exports.InviteUserDialog = exports.ChangePasswordForm = void 0;
|
|
9
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
var _base = require("./base");
|
|
12
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
-
const UsersTable = props => {
|
|
14
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_base.CMCComponent, (0, _extends2.default)({
|
|
15
|
-
renderComponent: "renderUsersTable"
|
|
16
|
-
}, props));
|
|
17
|
-
};
|
|
18
|
-
exports.UsersTable = UsersTable;
|
|
19
|
-
const InviteUserDialog = props => {
|
|
20
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_base.CMCComponent, (0, _extends2.default)({
|
|
21
|
-
renderComponent: "renderInviteUserDialog"
|
|
22
|
-
}, props));
|
|
23
|
-
};
|
|
24
|
-
exports.InviteUserDialog = InviteUserDialog;
|
|
25
|
-
const ChangePasswordForm = props => {
|
|
26
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_base.CMCComponent, (0, _extends2.default)({
|
|
27
|
-
renderComponent: "renderChangePasswordForm"
|
|
28
|
-
}, props));
|
|
29
|
-
};
|
|
30
|
-
exports.ChangePasswordForm = ChangePasswordForm;
|
|
31
|
-
const ProfilePage = props => {
|
|
32
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_base.CMCComponent, (0, _extends2.default)({
|
|
33
|
-
renderComponent: "renderProfilePage"
|
|
34
|
-
}, props));
|
|
35
|
-
};
|
|
36
|
-
exports.ProfilePage = ProfilePage;
|
|
37
|
-
//# sourceMappingURL=components.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"components.js","names":["_interopRequireDefault","require","Object","defineProperty","exports","value","UsersTable","ProfilePage","InviteUserDialog","ChangePasswordForm","_extends2","_react","_base","_jsxRuntime","props","jsx","CMCComponent","default","renderComponent"],"sources":["../../../../../packages/nextjs/src/common/cmc/components.tsx"],"sourcesContent":["'use client';\n\nimport { ChangePasswordFormProps, InviteUserDialogProps, ProfilePageProps, UsersTableProps } from '@frontegg/types';\nimport React, { FC } from 'react';\nimport { CMCComponent, FronteggCMCComponentProps } from './base';\n\nexport const UsersTable: FC<FronteggCMCComponentProps<UsersTableProps>> = (props) => {\n return <CMCComponent renderComponent=\"renderUsersTable\" {...props} />\n}\n\nexport const InviteUserDialog: FC<FronteggCMCComponentProps<InviteUserDialogProps>> = (props) => {\n return <CMCComponent renderComponent=\"renderInviteUserDialog\" {...props} />\n}\n\nexport const ChangePasswordForm: FC<FronteggCMCComponentProps<ChangePasswordFormProps>> = (props) => {\n return <CMCComponent renderComponent=\"renderChangePasswordForm\" {...props} />\n}\n\nexport const ProfilePage: FC<FronteggCMCComponentProps<ProfilePageProps>> = (props) => {\n return <CMCComponent renderComponent=\"renderProfilePage\" {...props} />\n}\n"],"mappings":";AAAA,YAAY;;AAAC,IAAAA,sBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,KAAA;AAAA;AAAAD,OAAA,CAAAE,UAAA,GAAAF,OAAA,CAAAG,WAAA,GAAAH,OAAA,CAAAI,gBAAA,GAAAJ,OAAA,CAAAK,kBAAA;AAAA,IAAAC,SAAA,GAAAV,sBAAA,CAAAC,OAAA;AAGb,IAAAU,MAAA,GAAAX,sBAAA,CAAAC,OAAA;AACA,IAAAW,KAAA,GAAAX,OAAA;AAAiE,IAAAY,WAAA,GAAAZ,OAAA;AAE1D,MAAMK,UAA0D,GAAIQ,KAAK,IAAK;EACjF,oBAAO,IAAAD,WAAA,CAAAE,GAAA,EAACH,KAAA,CAAAI,YAAY,MAAAN,SAAA,CAAAO,OAAA;IAACC,eAAe,EAAC;EAAkB,GAAKJ,KAAK,CAAG,CAAC;AACzE,CAAC;AAAAV,OAAA,CAAAE,UAAA,GAAAA,UAAA;AAEM,MAAME,gBAAsE,GAAIM,KAAK,IAAK;EAC7F,oBAAO,IAAAD,WAAA,CAAAE,GAAA,EAACH,KAAA,CAAAI,YAAY,MAAAN,SAAA,CAAAO,OAAA;IAACC,eAAe,EAAC;EAAwB,GAAKJ,KAAK,CAAG,CAAC;AAC/E,CAAC;AAAAV,OAAA,CAAAI,gBAAA,GAAAA,gBAAA;AAEM,MAAMC,kBAA0E,GAAIK,KAAK,IAAK;EACjG,oBAAO,IAAAD,WAAA,CAAAE,GAAA,EAACH,KAAA,CAAAI,YAAY,MAAAN,SAAA,CAAAO,OAAA;IAACC,eAAe,EAAC;EAA0B,GAAKJ,KAAK,CAAG,CAAC;AACjF,CAAC;AAAAV,OAAA,CAAAK,kBAAA,GAAAA,kBAAA;AAEM,MAAMF,WAA4D,GAAIO,KAAK,IAAK;EACnF,oBAAO,IAAAD,WAAA,CAAAE,GAAA,EAACH,KAAA,CAAAI,YAAY,MAAAN,SAAA,CAAAO,OAAA;IAACC,eAAe,EAAC;EAAmB,GAAKJ,KAAK,CAAG,CAAC;AAC1E,CAAC;AAAAV,OAAA,CAAAG,WAAA,GAAAA,WAAA","ignoreList":[]}
|
package/common/cmc/hooks.d.ts
DELETED
package/common/cmc/hooks.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
'use client';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.useUsersTable = exports.useInviteUserDialog = void 0;
|
|
8
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _ = require("../..");
|
|
10
|
-
var _reduxStore = require("@frontegg/redux-store");
|
|
11
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
12
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
13
|
-
const useUsersTable = id => {
|
|
14
|
-
const app = (0, _react.useContext)(_.AppContext);
|
|
15
|
-
const [store, setStore] = (0, _react.useState)((0, _reduxStore.createProxy)({
|
|
16
|
-
onSearch: () => {},
|
|
17
|
-
searchQuery: '',
|
|
18
|
-
searching: false
|
|
19
|
-
}));
|
|
20
|
-
_react.default.useLayoutEffect(() => {
|
|
21
|
-
app.getUsersTableStore({
|
|
22
|
-
id
|
|
23
|
-
}).then(store => {
|
|
24
|
-
setStore(store);
|
|
25
|
-
}).catch(err => {
|
|
26
|
-
console.error('Error getting users table store', err);
|
|
27
|
-
});
|
|
28
|
-
}, []);
|
|
29
|
-
return (0, _.useSnapshot)(store);
|
|
30
|
-
};
|
|
31
|
-
exports.useUsersTable = useUsersTable;
|
|
32
|
-
const useInviteUserDialog = id => {
|
|
33
|
-
const app = (0, _react.useContext)(_.AppContext);
|
|
34
|
-
const [store, setStore] = (0, _react.useState)((0, _reduxStore.createProxy)({
|
|
35
|
-
openDialog: () => {},
|
|
36
|
-
closeDialog: () => {},
|
|
37
|
-
dialogOpen: false
|
|
38
|
-
}));
|
|
39
|
-
_react.default.useLayoutEffect(() => {
|
|
40
|
-
app.getInviteUserDialogStore({
|
|
41
|
-
id
|
|
42
|
-
}).then(store => {
|
|
43
|
-
setStore(store);
|
|
44
|
-
}).catch(err => {
|
|
45
|
-
console.error('Error getting invite user dialog store', err);
|
|
46
|
-
});
|
|
47
|
-
}, []);
|
|
48
|
-
return (0, _.useSnapshot)(store);
|
|
49
|
-
};
|
|
50
|
-
exports.useInviteUserDialog = useInviteUserDialog;
|
|
51
|
-
//# sourceMappingURL=hooks.js.map
|
package/common/cmc/hooks.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.js","names":["Object","defineProperty","exports","value","useUsersTable","useInviteUserDialog","_react","_interopRequireWildcard","require","_","_reduxStore","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","id","app","useContext","AppContext","store","setStore","useState","createProxy","onSearch","searchQuery","searching","React","useLayoutEffect","getUsersTableStore","then","catch","err","console","error","useSnapshot","openDialog","closeDialog","dialogOpen","getInviteUserDialogStore"],"sources":["../../../../../packages/nextjs/src/common/cmc/hooks.tsx"],"sourcesContent":["'use client';\n\nimport { InviteUserDialogContextData, UsersTableContextData } from '@frontegg/types';\nimport React, { useContext, useState } from 'react';\nimport { AppContext, useSnapshot } from '../..';\nimport { createProxy } from '@frontegg/redux-store';\nexport const useUsersTable = (id?: string): UsersTableContextData => {\n const app = useContext(AppContext)!;\n const [store, setStore] = useState<UsersTableContextData>(createProxy({\n onSearch: () => { },\n searchQuery: '',\n searching: false,\n }));\n\n React.useLayoutEffect(() => {\n app\n .getUsersTableStore({ id })\n .then((store) => {\n setStore(store as UsersTableContextData);\n })\n .catch((err) => {\n console.error('Error getting users table store', err);\n });\n }, []);\n\n return useSnapshot(store);\n};\n\nexport const useInviteUserDialog = (id?: string): InviteUserDialogContextData => {\n const app = useContext(AppContext)!;\n const [store, setStore] = useState<InviteUserDialogContextData>(createProxy({\n openDialog: () => { },\n closeDialog: () => { },\n dialogOpen: false,\n }));\n\n React.useLayoutEffect(() => {\n app\n .getInviteUserDialogStore({ id })\n .then((store) => {\n setStore(store as InviteUserDialogContextData);\n })\n .catch((err) => {\n console.error('Error getting invite user dialog store', err);\n });\n }, []);\n\n\n return useSnapshot(store);\n};\n"],"mappings":";AAAA,YAAY;;AAACA,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,KAAA;AAAA;AAAAD,OAAA,CAAAE,aAAA,GAAAF,OAAA,CAAAG,mBAAA;AAGb,IAAAC,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,CAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAAoD,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAL,wBAAAK,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAtB,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAuB,wBAAA,WAAAC,CAAA,IAAAZ,CAAA,oBAAAY,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAd,CAAA,EAAAY,CAAA,SAAAG,CAAA,GAAAL,CAAA,GAAAtB,MAAA,CAAAuB,wBAAA,CAAAX,CAAA,EAAAY,CAAA,UAAAG,CAAA,KAAAA,CAA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AA,KAAM,CAAE,CAAC;IACrBC,WAAW,EAAEA,CAAA,KAAM,CAAE,CAAC;IACtBC,UAAU,EAAE;EACd,CAAC,CAAC,CAAC;EAEHX,cAAK,CAACC,eAAe,CAAC,MAAM;IAC1BX,GAAG,CACAsB,wBAAwB,CAAC;MAAEvB;IAAG,CAAC,CAAC,CAChCc,IAAI,CAAEV,KAAK,IAAK;MACfC,QAAQ,CAACD,KAAoC,CAAC;IAChD,CAAC,CAAC,CACDW,KAAK,CAAEC,GAAG,IAAK;MACdC,OAAO,CAACC,KAAK,CAAC,wCAAwC,EAAEF,GAAG,CAAC;IAC9D,CAAC,CAAC;EACN,CAAC,EAAE,EAAE,CAAC;EAGN,OAAO,IAAAG,aAAW,EAACf,KAAK,CAAC;AAC3B,CAAC;AAAC/B,OAAA,CAAAG,mBAAA,GAAAA,mBAAA","ignoreList":[]}
|
package/common/cmc/index.d.ts
DELETED
package/common/cmc/index.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _components = require("./components");
|
|
7
|
-
Object.keys(_components).forEach(function (key) {
|
|
8
|
-
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _components[key]) return;
|
|
10
|
-
Object.defineProperty(exports, key, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function () {
|
|
13
|
-
return _components[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
var _hooks = require("./hooks");
|
|
18
|
-
Object.keys(_hooks).forEach(function (key) {
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _hooks[key]) return;
|
|
21
|
-
Object.defineProperty(exports, key, {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function () {
|
|
24
|
-
return _hooks[key];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
//# sourceMappingURL=index.js.map
|
package/common/cmc/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_components","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_hooks"],"sources":["../../../../../packages/nextjs/src/common/cmc/index.ts"],"sourcesContent":["export * from './components';\nexport * from './hooks';"],"mappings":";;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,WAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,WAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,WAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,MAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,MAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,MAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,MAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|