@descope/react-sdk 2.28.11 → 2.29.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.
- package/README.md +6 -0
- package/dist/cjs/components/AccessKeyManagement.js +1 -1
- package/dist/cjs/components/AccessKeyManagement.js.map +1 -1
- package/dist/cjs/components/ApplicationsPortal.js +1 -1
- package/dist/cjs/components/ApplicationsPortal.js.map +1 -1
- package/dist/cjs/components/AuditManagement.js +1 -1
- package/dist/cjs/components/AuditManagement.js.map +1 -1
- package/dist/cjs/components/OutboundApplications.js +1 -1
- package/dist/cjs/components/OutboundApplications.js.map +1 -1
- package/dist/cjs/components/RoleManagement.js +1 -1
- package/dist/cjs/components/RoleManagement.js.map +1 -1
- package/dist/cjs/components/TenantProfile.js +1 -1
- package/dist/cjs/components/TenantProfile.js.map +1 -1
- package/dist/cjs/components/UserManagement.js +1 -1
- package/dist/cjs/components/UserManagement.js.map +1 -1
- package/dist/cjs/components/UserProfile.js +1 -1
- package/dist/cjs/components/UserProfile.js.map +1 -1
- package/dist/cjs/constants.js +1 -1
- package/dist/esm/components/AccessKeyManagement.js +1 -1
- package/dist/esm/components/AccessKeyManagement.js.map +1 -1
- package/dist/esm/components/ApplicationsPortal.js +1 -1
- package/dist/esm/components/ApplicationsPortal.js.map +1 -1
- package/dist/esm/components/AuditManagement.js +1 -1
- package/dist/esm/components/AuditManagement.js.map +1 -1
- package/dist/esm/components/OutboundApplications.js +1 -1
- package/dist/esm/components/OutboundApplications.js.map +1 -1
- package/dist/esm/components/RoleManagement.js +1 -1
- package/dist/esm/components/RoleManagement.js.map +1 -1
- package/dist/esm/components/TenantProfile.js +1 -1
- package/dist/esm/components/TenantProfile.js.map +1 -1
- package/dist/esm/components/UserManagement.js +1 -1
- package/dist/esm/components/UserManagement.js.map +1 -1
- package/dist/esm/components/UserProfile.js +1 -1
- package/dist/esm/components/UserProfile.js.map +1 -1
- package/dist/esm/constants.js +1 -1
- package/dist/esm/constants.js.map +1 -1
- package/dist/index.d.ts +9 -0
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/dist/types/components/AccessKeyManagement.d.ts +1 -0
- package/dist/types/components/ApplicationsPortal.d.ts +1 -0
- package/dist/types/components/AuditManagement.d.ts +1 -0
- package/dist/types/components/OutboundApplications.d.ts +1 -0
- package/dist/types/components/RoleManagement.d.ts +1 -0
- package/dist/types/components/TenantProfile.d.ts +1 -0
- package/dist/types/components/UserManagement.d.ts +1 -0
- package/dist/types/components/UserProfile.d.ts +1 -0
- package/dist/types/types.d.ts +1 -0
- package/package.json +12 -12
package/README.md
CHANGED
|
@@ -615,6 +615,12 @@ Important Note:
|
|
|
615
615
|
|
|
616
616
|
- For the user to be able to use the widget, they need to be assigned the `Tenant Admin` Role.
|
|
617
617
|
|
|
618
|
+
All widget components accept an optional `locale` prop. It can be any supported locale the widget's screens are translated to; if not provided, the locale is taken from the browser's locale.
|
|
619
|
+
|
|
620
|
+
```jsx
|
|
621
|
+
<UserManagement widgetId="user-management-widget" tenant="tenant-id" locale="en" />
|
|
622
|
+
```
|
|
623
|
+
|
|
618
624
|
#### User Management
|
|
619
625
|
|
|
620
626
|
The `UserManagement` widget lets you embed a user table in your site to view and take action.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("../hooks/Context.js"),a=require("./withPropsMapping/index.js");function r(e){return e&&e.__esModule?e:{default:e}}var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("../hooks/Context.js"),a=require("./withPropsMapping/index.js");function r(e){return e&&e.__esModule?e:{default:e}}var l=r(e);const s=e.lazy((async()=>(await import("@descope/access-key-management-widget"),{default:a.default(l.default.forwardRef(((e,t)=>l.default.createElement("descope-access-key-management-widget",Object.assign({ref:t},e)))))}))),n=l.default.forwardRef((({logger:a,tenant:r,theme:n,locale:d,debug:o,widgetId:u,styleId:c,onReady:f},i)=>{const[p,g]=e.useState(null);e.useImperativeHandle(i,(()=>p));const{projectId:m,baseUrl:b,baseStaticUrl:y,baseCdnUrl:w,refreshCookieName:v}=l.default.useContext(t.default);return e.useEffect((()=>{const e=p;return f&&(null==e||e.addEventListener("ready",f)),()=>{f&&(null==e||e.removeEventListener("ready",f))}}),[p,f]),l.default.createElement(e.Suspense,{fallback:null},l.default.createElement(s,{ref:g,projectId:m,widgetId:u,tenant:r,baseUrl:b,baseStaticUrl:y,baseCdnUrl:w,"theme.attr":n,"locale.attr":d,"debug.attr":o,"styleId.attr":c,"refreshCookieName.attr":v,"logger.prop":a}))}));exports.default=n;
|
|
2
2
|
//# sourceMappingURL=AccessKeyManagement.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccessKeyManagement.js","sources":["../../../src/components/AccessKeyManagement.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useImperativeHandle,\n useState,\n useEffect,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { AccessKeyManagementProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\n// web-component code uses browser API, but can be used in SSR apps, hence the lazy loading\nconst AccessKeyManagementWC = lazy(async () => {\n await import('@descope/access-key-management-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n
|
|
1
|
+
{"version":3,"file":"AccessKeyManagement.js","sources":["../../../src/components/AccessKeyManagement.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useImperativeHandle,\n useState,\n useEffect,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { AccessKeyManagementProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\n// web-component code uses browser API, but can be used in SSR apps, hence the lazy loading\nconst AccessKeyManagementWC = lazy(async () => {\n await import('@descope/access-key-management-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n <descope-access-key-management-widget ref={ref} {...props} />\n )),\n ),\n };\n});\n\nconst AccessKeyManagement = React.forwardRef<\n HTMLElement,\n AccessKeyManagementProps\n>(\n (\n { logger, tenant, theme, locale, debug, widgetId, styleId, onReady },\n ref,\n ) => {\n const [innerRef, setInnerRef] = useState(null);\n\n useImperativeHandle(ref, () => innerRef);\n\n const { projectId, baseUrl, baseStaticUrl, baseCdnUrl, refreshCookieName } =\n React.useContext(Context);\n\n useEffect(() => {\n const ele = innerRef;\n if (onReady) ele?.addEventListener('ready', onReady);\n\n return () => {\n if (onReady) ele?.removeEventListener('ready', onReady);\n };\n }, [innerRef, onReady]);\n\n return (\n <Suspense fallback={null}>\n <AccessKeyManagementWC\n ref={setInnerRef}\n projectId={projectId}\n widgetId={widgetId}\n tenant={tenant}\n baseUrl={baseUrl}\n baseStaticUrl={baseStaticUrl}\n baseCdnUrl={baseCdnUrl}\n {...{\n // attributes\n 'theme.attr': theme,\n 'locale.attr': locale,\n 'debug.attr': debug,\n 'styleId.attr': styleId,\n 'refreshCookieName.attr': refreshCookieName,\n // props\n 'logger.prop': logger,\n }}\n />\n </Suspense>\n );\n },\n);\n\nexport default AccessKeyManagement;\n"],"names":["AccessKeyManagementWC","lazy","async","import","default","withPropsMapping","React","forwardRef","props","ref","createElement","Object","assign","AccessKeyManagement","logger","tenant","theme","locale","debug","widgetId","styleId","onReady","innerRef","setInnerRef","useState","useImperativeHandle","projectId","baseUrl","baseStaticUrl","baseCdnUrl","refreshCookieName","useContext","Context","useEffect","ele","addEventListener","removeEventListener","Suspense","fallback"],"mappings":"mOAYA,MAAMA,EAAwBC,EAAIA,MAACC,gBAC3BC,OAAO,yCAEN,CACLC,QAASC,EAAgBD,QACvBE,UAAMC,YAAwB,CAACC,EAAOC,IACpCH,EAAAA,QAAsCI,cAAA,uCAAAC,OAAAC,OAAA,CAAAH,IAAKA,GAASD,WAMtDK,EAAsBP,EAAAA,QAAMC,YAIhC,EACIO,SAAQC,SAAQC,QAAOC,SAAQC,QAAOC,WAAUC,UAASC,WAC3DZ,KAEA,MAAOa,EAAUC,GAAeC,EAAQA,SAAC,MAEzCC,sBAAoBhB,GAAK,IAAMa,IAE/B,MAAMI,UAAEA,EAASC,QAAEA,EAAOC,cAAEA,EAAaC,WAAEA,EAAUC,kBAAEA,GACrDxB,EAAKF,QAAC2B,WAAWC,EAAAA,SAWnB,OATAC,EAAAA,WAAU,KACR,MAAMC,EAAMZ,EAGZ,OAFID,IAASa,SAAAA,EAAKC,iBAAiB,QAASd,IAErC,KACDA,IAASa,SAAAA,EAAKE,oBAAoB,QAASf,GAAQ,CACxD,GACA,CAACC,EAAUD,IAGZf,EAACF,QAAAM,cAAA2B,EAAQA,SAAC,CAAAC,SAAU,MAClBhC,EAAAF,QAAAM,cAACV,EAAqB,CACpBS,IAAKc,EACLG,UAAWA,EACXP,SAAUA,EACVJ,OAAQA,EACRY,QAASA,EACTC,cAAeA,EACfC,WAAYA,EAGV,aAAcb,EACd,cAAeC,EACf,aAAcC,EACd,eAAgBE,EAChB,yBAA0BU,EAE1B,cAAehB,IAIrB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("../hooks/Context.js"),r=require("./withPropsMapping/index.js");function a(e){return e&&e.__esModule?e:{default:e}}var l=a(e);const d=e.lazy((async()=>(await import("@descope/applications-portal-widget"),{default:r.default(l.default.forwardRef(((e,t)=>l.default.createElement("descope-applications-portal-widget",Object.assign({ref:t},e)))))}))),s=l.default.forwardRef((({logger:r,theme:a,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("../hooks/Context.js"),r=require("./withPropsMapping/index.js");function a(e){return e&&e.__esModule?e:{default:e}}var l=a(e);const d=e.lazy((async()=>(await import("@descope/applications-portal-widget"),{default:r.default(l.default.forwardRef(((e,t)=>l.default.createElement("descope-applications-portal-widget",Object.assign({ref:t},e)))))}))),s=l.default.forwardRef((({logger:r,theme:a,locale:s,debug:o,widgetId:n,styleId:u,onReady:i},c)=>{const[f,p]=e.useState(null);e.useImperativeHandle(c,(()=>f));const{projectId:g,baseUrl:b,baseStaticUrl:m,baseCdnUrl:w,refreshCookieName:y}=l.default.useContext(t.default);return e.useEffect((()=>{const e=f;return i&&(null==e||e.addEventListener("ready",i)),()=>{i&&(null==e||e.removeEventListener("ready",i))}}),[f,i]),l.default.createElement(e.Suspense,{fallback:null},l.default.createElement(d,{ref:p,projectId:g,widgetId:n,baseUrl:b,baseStaticUrl:m,baseCdnUrl:w,"theme.attr":a,"locale.attr":s,"debug.attr":o,"styleId.attr":u,"refreshCookieName.attr":y,"logger.prop":r}))}));exports.default=s;
|
|
2
2
|
//# sourceMappingURL=ApplicationsPortal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationsPortal.js","sources":["../../../src/components/ApplicationsPortal.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useImperativeHandle,\n useState,\n useEffect,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { ApplicationsPortalProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\n// web-component code uses browser API, but can be used in SSR apps, hence the lazy loading\nconst ApplicationsPortalWC = lazy(async () => {\n await import('@descope/applications-portal-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n\t<descope-applications-portal-widget ref={ref} {...props} />\n )),\n ),\n };\n});\n\nconst ApplicationsPortal = React.forwardRef<\n HTMLElement,\n ApplicationsPortalProps\n>(({ logger, theme, debug, widgetId, styleId, onReady }, ref) => {\n const [innerRef, setInnerRef] = useState(null);\n\n useImperativeHandle(ref, () => innerRef);\n\n const { projectId, baseUrl, baseStaticUrl, baseCdnUrl, refreshCookieName } =\n React.useContext(Context);\n\n useEffect(() => {\n const ele = innerRef;\n if (onReady) ele?.addEventListener('ready', onReady);\n\n return () => {\n if (onReady) ele?.removeEventListener('ready', onReady);\n };\n }, [innerRef, onReady]);\n\n return (\n\t<Suspense fallback={null}>\n\t\t<ApplicationsPortalWC\n ref={setInnerRef}\n projectId={projectId}\n widgetId={widgetId}\n baseUrl={baseUrl}\n baseStaticUrl={baseStaticUrl}\n baseCdnUrl={baseCdnUrl}\n {...{\n // attributes\n 'theme.attr': theme,\n 'debug.attr': debug,\n 'styleId.attr': styleId,\n 'refreshCookieName.attr': refreshCookieName,\n // props\n 'logger.prop': logger,\n }}\n />\n\t</Suspense>\n );\n});\n\nexport default ApplicationsPortal;\n"],"names":["ApplicationsPortalWC","lazy","async","import","default","withPropsMapping","React","forwardRef","props","ref","createElement","Object","assign","ApplicationsPortal","logger","theme","debug","widgetId","styleId","onReady","innerRef","setInnerRef","useState","useImperativeHandle","projectId","baseUrl","baseStaticUrl","baseCdnUrl","refreshCookieName","useContext","Context","useEffect","ele","addEventListener","removeEventListener","Suspense","fallback"],"mappings":"mOAYA,MAAMA,EAAuBC,EAAIA,MAACC,gBAC1BC,OAAO,uCAEN,CACLC,QAASC,EAAgBD,QACvBE,UAAMC,YAAwB,CAACC,EAAOC,IAC3CH,EAAAA,QAAoCI,cAAA,qCAAAC,OAAAC,OAAA,CAAAH,IAAKA,GAASD,WAM7CK,EAAqBP,
|
|
1
|
+
{"version":3,"file":"ApplicationsPortal.js","sources":["../../../src/components/ApplicationsPortal.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useImperativeHandle,\n useState,\n useEffect,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { ApplicationsPortalProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\n// web-component code uses browser API, but can be used in SSR apps, hence the lazy loading\nconst ApplicationsPortalWC = lazy(async () => {\n await import('@descope/applications-portal-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n\t<descope-applications-portal-widget ref={ref} {...props} />\n )),\n ),\n };\n});\n\nconst ApplicationsPortal = React.forwardRef<\n HTMLElement,\n ApplicationsPortalProps\n>(({ logger, theme, locale, debug, widgetId, styleId, onReady }, ref) => {\n const [innerRef, setInnerRef] = useState(null);\n\n useImperativeHandle(ref, () => innerRef);\n\n const { projectId, baseUrl, baseStaticUrl, baseCdnUrl, refreshCookieName } =\n React.useContext(Context);\n\n useEffect(() => {\n const ele = innerRef;\n if (onReady) ele?.addEventListener('ready', onReady);\n\n return () => {\n if (onReady) ele?.removeEventListener('ready', onReady);\n };\n }, [innerRef, onReady]);\n\n return (\n\t<Suspense fallback={null}>\n\t\t<ApplicationsPortalWC\n ref={setInnerRef}\n projectId={projectId}\n widgetId={widgetId}\n baseUrl={baseUrl}\n baseStaticUrl={baseStaticUrl}\n baseCdnUrl={baseCdnUrl}\n {...{\n // attributes\n 'theme.attr': theme,\n 'locale.attr': locale,\n 'debug.attr': debug,\n 'styleId.attr': styleId,\n 'refreshCookieName.attr': refreshCookieName,\n // props\n 'logger.prop': logger,\n }}\n />\n\t</Suspense>\n );\n});\n\nexport default ApplicationsPortal;\n"],"names":["ApplicationsPortalWC","lazy","async","import","default","withPropsMapping","React","forwardRef","props","ref","createElement","Object","assign","ApplicationsPortal","logger","theme","locale","debug","widgetId","styleId","onReady","innerRef","setInnerRef","useState","useImperativeHandle","projectId","baseUrl","baseStaticUrl","baseCdnUrl","refreshCookieName","useContext","Context","useEffect","ele","addEventListener","removeEventListener","Suspense","fallback"],"mappings":"mOAYA,MAAMA,EAAuBC,EAAIA,MAACC,gBAC1BC,OAAO,uCAEN,CACLC,QAASC,EAAgBD,QACvBE,UAAMC,YAAwB,CAACC,EAAOC,IAC3CH,EAAAA,QAAoCI,cAAA,qCAAAC,OAAAC,OAAA,CAAAH,IAAKA,GAASD,WAM7CK,EAAqBP,EAAAA,QAAMC,YAG/B,EAAGO,SAAQC,QAAOC,SAAQC,QAAOC,WAAUC,UAASC,WAAWX,KAC/D,MAAOY,EAAUC,GAAeC,EAAQA,SAAC,MAEzCC,sBAAoBf,GAAK,IAAMY,IAE/B,MAAMI,UAAEA,EAASC,QAAEA,EAAOC,cAAEA,EAAaC,WAAEA,EAAUC,kBAAEA,GACrDvB,EAAKF,QAAC0B,WAAWC,EAAAA,SAWnB,OATAC,EAAAA,WAAU,KACR,MAAMC,EAAMZ,EAGZ,OAFID,IAASa,SAAAA,EAAKC,iBAAiB,QAASd,IAErC,KACDA,IAASa,SAAAA,EAAKE,oBAAoB,QAASf,GAAQ,CACxD,GACA,CAACC,EAAUD,IAGfd,EAACF,QAAAM,cAAA0B,EAAQA,SAAC,CAAAC,SAAU,MACnB/B,EAACF,QAAAM,cAAAV,EACK,CAAAS,IAAKa,EACLG,UAAWA,EACXP,SAAUA,EACVQ,QAASA,EACTC,cAAeA,EACfC,WAAYA,EAGV,aAAcb,EACd,cAAeC,EACf,aAAcC,EACd,eAAgBE,EAChB,yBAA0BU,EAE1B,cAAef,IAIrB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("../hooks/Context.js"),a=require("./withPropsMapping/index.js");function r(e){return e&&e.__esModule?e:{default:e}}var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("../hooks/Context.js"),a=require("./withPropsMapping/index.js");function r(e){return e&&e.__esModule?e:{default:e}}var l=r(e);const d=e.lazy((async()=>(await import("@descope/audit-management-widget"),{default:a.default(l.default.forwardRef(((e,t)=>l.default.createElement("descope-audit-management-widget",Object.assign({ref:t},e)))))}))),n=l.default.forwardRef((({logger:a,tenant:r,theme:n,locale:s,debug:u,widgetId:o,styleId:i,onReady:f},c)=>{const[p,g]=e.useState(null);e.useImperativeHandle(c,(()=>p));const{projectId:m,baseUrl:b,baseStaticUrl:w,baseCdnUrl:y,refreshCookieName:v}=l.default.useContext(t.default);return e.useEffect((()=>{const e=p;return f&&(null==e||e.addEventListener("ready",f)),()=>{f&&(null==e||e.removeEventListener("ready",f))}}),[p,f]),l.default.createElement(e.Suspense,{fallback:null},l.default.createElement(d,{ref:g,projectId:m,widgetId:o,tenant:r,baseUrl:b,baseStaticUrl:w,baseCdnUrl:y,"theme.attr":n,"locale.attr":s,"debug.attr":u,"styleId.attr":i,"refreshCookieName.attr":v,"logger.prop":a}))}));exports.default=n;
|
|
2
2
|
//# sourceMappingURL=AuditManagement.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuditManagement.js","sources":["../../../src/components/AuditManagement.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useImperativeHandle,\n useState,\n useEffect,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { AuditManagementProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\n// web-component code uses browser API, but can be used in SSR apps, hence the lazy loading\nconst AuditManagementWC = lazy(async () => {\n await import('@descope/audit-management-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n\t<descope-audit-management-widget ref={ref} {...props} />\n )),\n ),\n };\n});\n\nconst AuditManagement = React.forwardRef<HTMLElement, AuditManagementProps>(\n ({ logger, tenant, theme, debug, widgetId, styleId, onReady }
|
|
1
|
+
{"version":3,"file":"AuditManagement.js","sources":["../../../src/components/AuditManagement.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useImperativeHandle,\n useState,\n useEffect,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { AuditManagementProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\n// web-component code uses browser API, but can be used in SSR apps, hence the lazy loading\nconst AuditManagementWC = lazy(async () => {\n await import('@descope/audit-management-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n\t<descope-audit-management-widget ref={ref} {...props} />\n )),\n ),\n };\n});\n\nconst AuditManagement = React.forwardRef<HTMLElement, AuditManagementProps>(\n (\n { logger, tenant, theme, locale, debug, widgetId, styleId, onReady },\n ref,\n ) => {\n const [innerRef, setInnerRef] = useState(null);\n\n useImperativeHandle(ref, () => innerRef);\n\n const { projectId, baseUrl, baseStaticUrl, baseCdnUrl, refreshCookieName } =\n React.useContext(Context);\n\n useEffect(() => {\n const ele = innerRef;\n if (onReady) ele?.addEventListener('ready', onReady);\n\n return () => {\n if (onReady) ele?.removeEventListener('ready', onReady);\n };\n }, [innerRef, onReady]);\n\n return (\n\t<Suspense fallback={null}>\n\t\t<AuditManagementWC\n ref={setInnerRef}\n projectId={projectId}\n widgetId={widgetId}\n tenant={tenant}\n baseUrl={baseUrl}\n baseStaticUrl={baseStaticUrl}\n baseCdnUrl={baseCdnUrl}\n {...{\n // attributes\n 'theme.attr': theme,\n 'locale.attr': locale,\n 'debug.attr': debug,\n 'styleId.attr': styleId,\n 'refreshCookieName.attr': refreshCookieName,\n // props\n 'logger.prop': logger,\n }}\n />\n\t</Suspense>\n );\n },\n);\n\nexport default AuditManagement;\n"],"names":["AuditManagementWC","lazy","async","import","default","withPropsMapping","React","forwardRef","props","ref","createElement","Object","assign","AuditManagement","logger","tenant","theme","locale","debug","widgetId","styleId","onReady","innerRef","setInnerRef","useState","useImperativeHandle","projectId","baseUrl","baseStaticUrl","baseCdnUrl","refreshCookieName","useContext","Context","useEffect","ele","addEventListener","removeEventListener","Suspense","fallback"],"mappings":"mOAYA,MAAMA,EAAoBC,EAAIA,MAACC,gBACvBC,OAAO,oCAEN,CACLC,QAASC,EAAgBD,QACvBE,UAAMC,YAAwB,CAACC,EAAOC,IAC3CH,EAAAA,QAAiCI,cAAA,kCAAAC,OAAAC,OAAA,CAAAH,IAAKA,GAASD,WAM1CK,EAAkBP,EAAAA,QAAMC,YAC5B,EACIO,SAAQC,SAAQC,QAAOC,SAAQC,QAAOC,WAAUC,UAASC,WAC3DZ,KAEA,MAAOa,EAAUC,GAAeC,EAAQA,SAAC,MAEzCC,sBAAoBhB,GAAK,IAAMa,IAE/B,MAAMI,UAAEA,EAASC,QAAEA,EAAOC,cAAEA,EAAaC,WAAEA,EAAUC,kBAAEA,GACrDxB,EAAKF,QAAC2B,WAAWC,EAAAA,SAWnB,OATAC,EAAAA,WAAU,KACR,MAAMC,EAAMZ,EAGZ,OAFID,IAASa,SAAAA,EAAKC,iBAAiB,QAASd,IAErC,KACDA,IAASa,SAAAA,EAAKE,oBAAoB,QAASf,GAAQ,CACxD,GACA,CAACC,EAAUD,IAGjBf,EAACF,QAAAM,cAAA2B,EAAQA,SAAC,CAAAC,SAAU,MACnBhC,EAAAF,QAAAM,cAACV,EAAiB,CACVS,IAAKc,EACLG,UAAWA,EACXP,SAAUA,EACVJ,OAAQA,EACRY,QAASA,EACTC,cAAeA,EACfC,WAAYA,EAGV,aAAcb,EACd,cAAeC,EACf,aAAcC,EACd,eAAgBE,EAChB,yBAA0BU,EAE1B,cAAehB,IAIrB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("../hooks/Context.js"),r=require("./withPropsMapping/index.js");function a(e){return e&&e.__esModule?e:{default:e}}var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("../hooks/Context.js"),r=require("./withPropsMapping/index.js");function a(e){return e&&e.__esModule?e:{default:e}}var l=a(e);const d=e.lazy((async()=>(await import("@descope/outbound-applications-widget"),{default:r.default(l.default.forwardRef(((e,t)=>l.default.createElement("descope-outbound-applications-widget",Object.assign({ref:t},e)))))}))),o=l.default.forwardRef((({logger:r,theme:a,locale:o,debug:s,widgetId:u,styleId:n,onReady:i},c)=>{const[f,p]=e.useState(null);e.useImperativeHandle(c,(()=>f));const{projectId:b,baseUrl:g,baseStaticUrl:m,baseCdnUrl:w,refreshCookieName:y}=l.default.useContext(t.default);return e.useEffect((()=>{const e=f;return i&&(null==e||e.addEventListener("ready",i)),()=>{i&&(null==e||e.removeEventListener("ready",i))}}),[f,i]),l.default.createElement(e.Suspense,{fallback:null},l.default.createElement(d,{ref:p,projectId:b,widgetId:u,baseUrl:g,baseStaticUrl:m,baseCdnUrl:w,"theme.attr":a,"locale.attr":o,"debug.attr":s,"styleId.attr":n,"refreshCookieName.attr":y,"logger.prop":r}))}));exports.default=o;
|
|
2
2
|
//# sourceMappingURL=OutboundApplications.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OutboundApplications.js","sources":["../../../src/components/OutboundApplications.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useImperativeHandle,\n useState,\n useEffect,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { OutboundApplicationsProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\n// web-component code uses browser API, but can be used in SSR apps, hence the lazy loading\nconst OutboundApplicationsWC = lazy(async () => {\n await import('@descope/outbound-applications-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n
|
|
1
|
+
{"version":3,"file":"OutboundApplications.js","sources":["../../../src/components/OutboundApplications.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useImperativeHandle,\n useState,\n useEffect,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { OutboundApplicationsProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\n// web-component code uses browser API, but can be used in SSR apps, hence the lazy loading\nconst OutboundApplicationsWC = lazy(async () => {\n await import('@descope/outbound-applications-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n\t<descope-outbound-applications-widget ref={ref} {...props} />\n )),\n ),\n };\n});\n\nconst OutboundApplications = React.forwardRef<\n HTMLElement,\n OutboundApplicationsProps\n>(({ logger, theme, locale, debug, widgetId, styleId, onReady }, ref) => {\n const [innerRef, setInnerRef] = useState(null);\n\n useImperativeHandle(ref, () => innerRef);\n\n const { projectId, baseUrl, baseStaticUrl, baseCdnUrl, refreshCookieName } =\n React.useContext(Context);\n\n useEffect(() => {\n const ele = innerRef;\n if (onReady) ele?.addEventListener('ready', onReady);\n\n return () => {\n if (onReady) ele?.removeEventListener('ready', onReady);\n };\n }, [innerRef, onReady]);\n\n return (\n\t<Suspense fallback={null}>\n\t\t<OutboundApplicationsWC\n ref={setInnerRef}\n projectId={projectId}\n widgetId={widgetId}\n baseUrl={baseUrl}\n baseStaticUrl={baseStaticUrl}\n baseCdnUrl={baseCdnUrl}\n {...{\n // attributes\n 'theme.attr': theme,\n 'locale.attr': locale,\n 'debug.attr': debug,\n 'styleId.attr': styleId,\n 'refreshCookieName.attr': refreshCookieName,\n // props\n 'logger.prop': logger,\n }}\n />\n\t</Suspense>\n );\n});\n\nexport default OutboundApplications;\n"],"names":["OutboundApplicationsWC","lazy","async","import","default","withPropsMapping","React","forwardRef","props","ref","createElement","Object","assign","OutboundApplications","logger","theme","locale","debug","widgetId","styleId","onReady","innerRef","setInnerRef","useState","useImperativeHandle","projectId","baseUrl","baseStaticUrl","baseCdnUrl","refreshCookieName","useContext","Context","useEffect","ele","addEventListener","removeEventListener","Suspense","fallback"],"mappings":"mOAYA,MAAMA,EAAyBC,EAAIA,MAACC,gBAC5BC,OAAO,yCAEN,CACLC,QAASC,EAAgBD,QACvBE,UAAMC,YAAwB,CAACC,EAAOC,IAC3CH,EAAAA,QAAsCI,cAAA,uCAAAC,OAAAC,OAAA,CAAAH,IAAKA,GAASD,WAM/CK,EAAuBP,EAAAA,QAAMC,YAGjC,EAAGO,SAAQC,QAAOC,SAAQC,QAAOC,WAAUC,UAASC,WAAWX,KAC/D,MAAOY,EAAUC,GAAeC,EAAQA,SAAC,MAEzCC,sBAAoBf,GAAK,IAAMY,IAE/B,MAAMI,UAAEA,EAASC,QAAEA,EAAOC,cAAEA,EAAaC,WAAEA,EAAUC,kBAAEA,GACrDvB,EAAKF,QAAC0B,WAAWC,EAAAA,SAWnB,OATAC,EAAAA,WAAU,KACR,MAAMC,EAAMZ,EAGZ,OAFID,IAASa,SAAAA,EAAKC,iBAAiB,QAASd,IAErC,KACDA,IAASa,SAAAA,EAAKE,oBAAoB,QAASf,GAAQ,CACxD,GACA,CAACC,EAAUD,IAGfd,EAACF,QAAAM,cAAA0B,EAAQA,SAAC,CAAAC,SAAU,MACnB/B,EAACF,QAAAM,cAAAV,EACK,CAAAS,IAAKa,EACLG,UAAWA,EACXP,SAAUA,EACVQ,QAASA,EACTC,cAAeA,EACfC,WAAYA,EAGV,aAAcb,EACd,cAAeC,EACf,aAAcC,EACd,eAAgBE,EAChB,yBAA0BU,EAE1B,cAAef,IAIrB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("../hooks/Context.js"),r=require("./withPropsMapping/index.js");function a(e){return e&&e.__esModule?e:{default:e}}var l=a(e);const n=e.lazy((async()=>(await import("@descope/role-management-widget"),{default:r.default(l.default.forwardRef(((e,t)=>l.default.createElement("descope-role-management-widget",Object.assign({ref:t},e)))))}))),d=l.default.forwardRef((({logger:r,tenant:a,theme:d,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("../hooks/Context.js"),r=require("./withPropsMapping/index.js");function a(e){return e&&e.__esModule?e:{default:e}}var l=a(e);const n=e.lazy((async()=>(await import("@descope/role-management-widget"),{default:r.default(l.default.forwardRef(((e,t)=>l.default.createElement("descope-role-management-widget",Object.assign({ref:t},e)))))}))),d=l.default.forwardRef((({logger:r,tenant:a,theme:d,locale:s,debug:o,widgetId:u,styleId:f,onReady:c},i)=>{const[p,g]=e.useState(null);e.useImperativeHandle(i,(()=>p));const{projectId:m,baseUrl:b,baseStaticUrl:w,baseCdnUrl:y,refreshCookieName:v}=l.default.useContext(t.default);return e.useEffect((()=>{const e=p;return c&&(null==e||e.addEventListener("ready",c)),()=>{c&&(null==e||e.removeEventListener("ready",c))}}),[p,c]),l.default.createElement(e.Suspense,{fallback:null},l.default.createElement(n,{ref:g,projectId:m,widgetId:u,tenant:a,baseUrl:b,baseStaticUrl:w,baseCdnUrl:y,"theme.attr":d,"locale.attr":s,"debug.attr":o,"styleId.attr":f,"refreshCookieName.attr":v,"logger.prop":r}))}));exports.default=d;
|
|
2
2
|
//# sourceMappingURL=RoleManagement.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RoleManagement.js","sources":["../../../src/components/RoleManagement.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useImperativeHandle,\n useState,\n useEffect,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { RoleManagementProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\n// web-component code uses browser API, but can be used in SSR apps, hence the lazy loading\nconst RoleManagementWC = lazy(async () => {\n await import('@descope/role-management-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n\t<descope-role-management-widget ref={ref} {...props} />\n )),\n ),\n };\n});\n\nconst RoleManagement = React.forwardRef<HTMLElement, RoleManagementProps>(\n ({ logger, tenant, theme, debug, widgetId, styleId, onReady }
|
|
1
|
+
{"version":3,"file":"RoleManagement.js","sources":["../../../src/components/RoleManagement.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useImperativeHandle,\n useState,\n useEffect,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { RoleManagementProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\n// web-component code uses browser API, but can be used in SSR apps, hence the lazy loading\nconst RoleManagementWC = lazy(async () => {\n await import('@descope/role-management-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n\t<descope-role-management-widget ref={ref} {...props} />\n )),\n ),\n };\n});\n\nconst RoleManagement = React.forwardRef<HTMLElement, RoleManagementProps>(\n (\n { logger, tenant, theme, locale, debug, widgetId, styleId, onReady },\n ref,\n ) => {\n const [innerRef, setInnerRef] = useState(null);\n\n useImperativeHandle(ref, () => innerRef);\n\n const { projectId, baseUrl, baseStaticUrl, baseCdnUrl, refreshCookieName } =\n React.useContext(Context);\n\n useEffect(() => {\n const ele = innerRef;\n if (onReady) ele?.addEventListener('ready', onReady);\n\n return () => {\n if (onReady) ele?.removeEventListener('ready', onReady);\n };\n }, [innerRef, onReady]);\n\n return (\n\t<Suspense fallback={null}>\n\t\t<RoleManagementWC\n ref={setInnerRef}\n projectId={projectId}\n widgetId={widgetId}\n tenant={tenant}\n baseUrl={baseUrl}\n baseStaticUrl={baseStaticUrl}\n baseCdnUrl={baseCdnUrl}\n {...{\n // attributes\n 'theme.attr': theme,\n 'locale.attr': locale,\n 'debug.attr': debug,\n 'styleId.attr': styleId,\n 'refreshCookieName.attr': refreshCookieName,\n // props\n 'logger.prop': logger,\n }}\n />\n\t</Suspense>\n );\n },\n);\n\nexport default RoleManagement;\n"],"names":["RoleManagementWC","lazy","async","import","default","withPropsMapping","React","forwardRef","props","ref","createElement","Object","assign","RoleManagement","logger","tenant","theme","locale","debug","widgetId","styleId","onReady","innerRef","setInnerRef","useState","useImperativeHandle","projectId","baseUrl","baseStaticUrl","baseCdnUrl","refreshCookieName","useContext","Context","useEffect","ele","addEventListener","removeEventListener","Suspense","fallback"],"mappings":"mOAYA,MAAMA,EAAmBC,EAAIA,MAACC,gBACtBC,OAAO,mCAEN,CACLC,QAASC,EAAgBD,QACvBE,UAAMC,YAAwB,CAACC,EAAOC,IAC3CH,EAAAA,QAAgCI,cAAA,iCAAAC,OAAAC,OAAA,CAAAH,IAAKA,GAASD,WAMzCK,EAAiBP,EAAAA,QAAMC,YAC3B,EACIO,SAAQC,SAAQC,QAAOC,SAAQC,QAAOC,WAAUC,UAASC,WAC3DZ,KAEA,MAAOa,EAAUC,GAAeC,EAAQA,SAAC,MAEzCC,sBAAoBhB,GAAK,IAAMa,IAE/B,MAAMI,UAAEA,EAASC,QAAEA,EAAOC,cAAEA,EAAaC,WAAEA,EAAUC,kBAAEA,GACrDxB,EAAKF,QAAC2B,WAAWC,EAAAA,SAWnB,OATAC,EAAAA,WAAU,KACR,MAAMC,EAAMZ,EAGZ,OAFID,IAASa,SAAAA,EAAKC,iBAAiB,QAASd,IAErC,KACDA,IAASa,SAAAA,EAAKE,oBAAoB,QAASf,GAAQ,CACxD,GACA,CAACC,EAAUD,IAGjBf,EAACF,QAAAM,cAAA2B,EAAQA,SAAC,CAAAC,SAAU,MACnBhC,EAAAF,QAAAM,cAACV,EAAgB,CACTS,IAAKc,EACLG,UAAWA,EACXP,SAAUA,EACVJ,OAAQA,EACRY,QAASA,EACTC,cAAeA,EACfC,WAAYA,EAGV,aAAcb,EACd,cAAeC,EACf,aAAcC,EACd,eAAgBE,EAChB,yBAA0BU,EAE1B,cAAehB,IAIrB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("../hooks/Context.js"),r=require("./withPropsMapping/index.js");function a(e){return e&&e.__esModule?e:{default:e}}var l=a(e);const n=e.lazy((async()=>(await import("@descope/tenant-profile-widget"),{default:r.default(l.default.forwardRef(((e,t)=>l.default.createElement("descope-tenant-profile-widget",Object.assign({ref:t},e)))))}))),d=l.default.forwardRef((({logger:r,theme:a,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("../hooks/Context.js"),r=require("./withPropsMapping/index.js");function a(e){return e&&e.__esModule?e:{default:e}}var l=a(e);const n=e.lazy((async()=>(await import("@descope/tenant-profile-widget"),{default:r.default(l.default.forwardRef(((e,t)=>l.default.createElement("descope-tenant-profile-widget",Object.assign({ref:t},e)))))}))),d=l.default.forwardRef((({logger:r,theme:a,locale:d,debug:s,widgetId:o,styleId:u,tenant:f,onReady:i},c)=>{const[p,g]=e.useState(null);e.useImperativeHandle(c,(()=>p));const{projectId:b,baseUrl:m,baseStaticUrl:y,baseCdnUrl:w,refreshCookieName:I}=l.default.useContext(t.default);return e.useEffect((()=>{const e=p;return i&&(null==e||e.addEventListener("ready",i)),()=>{i&&(null==e||e.removeEventListener("ready",i))}}),[p,i]),l.default.createElement(e.Suspense,{fallback:null},l.default.createElement(n,{projectId:b,widgetId:o,baseUrl:m,baseStaticUrl:y,baseCdnUrl:w,styleId:u,tenant:f,ref:g,"theme.attr":a,"locale.attr":d,"debug.attr":s,"styleId.attr":u,"tenant.attr":f,"refreshCookieName.attr":I,"logger.prop":r}))}));exports.default=d;
|
|
2
2
|
//# sourceMappingURL=TenantProfile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TenantProfile.js","sources":["../../../src/components/TenantProfile.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useImperativeHandle,\n useState,\n useEffect,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { TenantProfileProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\nconst TenantProfileWC = lazy(async () => {\n await import('@descope/tenant-profile-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n\t<descope-tenant-profile-widget ref={ref} {...props} />\n )),\n ),\n };\n});\n\nconst TenantProfile = React.forwardRef<HTMLElement, TenantProfileProps>(\n ({ logger, theme, debug, widgetId, styleId, tenant, onReady }
|
|
1
|
+
{"version":3,"file":"TenantProfile.js","sources":["../../../src/components/TenantProfile.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useImperativeHandle,\n useState,\n useEffect,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { TenantProfileProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\nconst TenantProfileWC = lazy(async () => {\n await import('@descope/tenant-profile-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n\t<descope-tenant-profile-widget ref={ref} {...props} />\n )),\n ),\n };\n});\n\nconst TenantProfile = React.forwardRef<HTMLElement, TenantProfileProps>(\n (\n { logger, theme, locale, debug, widgetId, styleId, tenant, onReady },\n ref,\n ) => {\n const [innerRef, setInnerRef] = useState(null);\n\n useImperativeHandle(ref, () => innerRef);\n\n const { projectId, baseUrl, baseStaticUrl, baseCdnUrl, refreshCookieName } =\n React.useContext(Context);\n\n useEffect(() => {\n const ele = innerRef;\n if (onReady) ele?.addEventListener('ready', onReady);\n\n return () => {\n if (onReady) ele?.removeEventListener('ready', onReady);\n };\n }, [innerRef, onReady]);\n\n return (\n\t<Suspense fallback={null}>\n\t\t<TenantProfileWC\n projectId={projectId}\n widgetId={widgetId}\n baseUrl={baseUrl}\n baseStaticUrl={baseStaticUrl}\n baseCdnUrl={baseCdnUrl}\n styleId={styleId}\n tenant={tenant}\n ref={setInnerRef}\n {...{\n 'theme.attr': theme,\n 'locale.attr': locale,\n 'debug.attr': debug,\n 'styleId.attr': styleId,\n 'tenant.attr': tenant,\n 'refreshCookieName.attr': refreshCookieName,\n 'logger.prop': logger,\n }}\n />\n\t</Suspense>\n );\n },\n);\n\nexport default TenantProfile;\n"],"names":["TenantProfileWC","lazy","async","import","default","withPropsMapping","React","forwardRef","props","ref","createElement","Object","assign","TenantProfile","logger","theme","locale","debug","widgetId","styleId","tenant","onReady","innerRef","setInnerRef","useState","useImperativeHandle","projectId","baseUrl","baseStaticUrl","baseCdnUrl","refreshCookieName","useContext","Context","useEffect","ele","addEventListener","removeEventListener","Suspense","fallback"],"mappings":"mOAWA,MAAMA,EAAkBC,EAAIA,MAACC,gBACrBC,OAAO,kCAEN,CACLC,QAASC,EAAgBD,QACvBE,UAAMC,YAAwB,CAACC,EAAOC,IAC3CH,EAAAA,QAA+BI,cAAA,gCAAAC,OAAAC,OAAA,CAAAH,IAAKA,GAASD,WAMxCK,EAAgBP,EAAAA,QAAMC,YAC1B,EACIO,SAAQC,QAAOC,SAAQC,QAAOC,WAAUC,UAASC,SAAQC,WAC3DZ,KAEA,MAAOa,EAAUC,GAAeC,EAAQA,SAAC,MAEzCC,sBAAoBhB,GAAK,IAAMa,IAE/B,MAAMI,UAAEA,EAASC,QAAEA,EAAOC,cAAEA,EAAaC,WAAEA,EAAUC,kBAAEA,GACrDxB,EAAKF,QAAC2B,WAAWC,EAAAA,SAWnB,OATAC,EAAAA,WAAU,KACR,MAAMC,EAAMZ,EAGZ,OAFID,IAASa,SAAAA,EAAKC,iBAAiB,QAASd,IAErC,KACDA,IAASa,SAAAA,EAAKE,oBAAoB,QAASf,GAAQ,CACxD,GACA,CAACC,EAAUD,IAGjBf,EAACF,QAAAM,cAAA2B,EAAQA,SAAC,CAAAC,SAAU,MACnBhC,UAAAI,cAACV,EACO,CAAA0B,UAAWA,EACXR,SAAUA,EACVS,QAASA,EACTC,cAAeA,EACfC,WAAYA,EACZV,QAASA,EACTC,OAAQA,EACRX,IAAKc,EAEH,aAAcR,EACd,cAAeC,EACf,aAAcC,EACd,eAAgBE,EAChB,cAAeC,EACf,yBAA0BU,EAC1B,cAAehB,IAIrB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("../hooks/Context.js"),r=require("./withPropsMapping/index.js");function a(e){return e&&e.__esModule?e:{default:e}}var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("../hooks/Context.js"),r=require("./withPropsMapping/index.js");function a(e){return e&&e.__esModule?e:{default:e}}var l=a(e);const n=e.lazy((async()=>(await import("@descope/user-management-widget"),{default:r.default(l.default.forwardRef(((e,t)=>l.default.createElement("descope-user-management-widget",Object.assign({ref:t},e)))))}))),d=l.default.forwardRef((({logger:r,tenant:a,theme:d,locale:s,debug:u,widgetId:o,styleId:f,onReady:c},i)=>{const[p,g]=e.useState(null);e.useImperativeHandle(i,(()=>p));const{projectId:m,baseUrl:b,baseStaticUrl:w,baseCdnUrl:y,refreshCookieName:v}=l.default.useContext(t.default);return e.useEffect((()=>{const e=p;return c&&(null==e||e.addEventListener("ready",c)),()=>{c&&(null==e||e.removeEventListener("ready",c))}}),[p,c]),l.default.createElement(e.Suspense,{fallback:null},l.default.createElement(n,{projectId:m,widgetId:o,tenant:a,baseUrl:b,baseStaticUrl:w,baseCdnUrl:y,ref:g,"theme.attr":d,"locale.attr":s,"debug.attr":u,"styleId.attr":f,"refreshCookieName.attr":v,"logger.prop":r}))}));exports.default=d;
|
|
2
2
|
//# sourceMappingURL=UserManagement.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserManagement.js","sources":["../../../src/components/UserManagement.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useImperativeHandle,\n useState,\n useEffect,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { UserManagementProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\n// web-component code uses browser API, but can be used in SSR apps, hence the lazy loading\nconst UserManagementWC = lazy(async () => {\n await import('@descope/user-management-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n\t<descope-user-management-widget ref={ref} {...props} />\n )),\n ),\n };\n});\n\nconst UserManagement = React.forwardRef<HTMLElement, UserManagementProps>(\n ({ logger, tenant, theme, debug, widgetId, styleId, onReady }
|
|
1
|
+
{"version":3,"file":"UserManagement.js","sources":["../../../src/components/UserManagement.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useImperativeHandle,\n useState,\n useEffect,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { UserManagementProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\n// web-component code uses browser API, but can be used in SSR apps, hence the lazy loading\nconst UserManagementWC = lazy(async () => {\n await import('@descope/user-management-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n\t<descope-user-management-widget ref={ref} {...props} />\n )),\n ),\n };\n});\n\nconst UserManagement = React.forwardRef<HTMLElement, UserManagementProps>(\n (\n { logger, tenant, theme, locale, debug, widgetId, styleId, onReady },\n ref,\n ) => {\n const [innerRef, setInnerRef] = useState(null);\n\n useImperativeHandle(ref, () => innerRef);\n\n const { projectId, baseUrl, baseStaticUrl, baseCdnUrl, refreshCookieName } =\n React.useContext(Context);\n\n useEffect(() => {\n const ele = innerRef;\n if (onReady) ele?.addEventListener('ready', onReady);\n\n return () => {\n if (onReady) ele?.removeEventListener('ready', onReady);\n };\n }, [innerRef, onReady]);\n\n return (\n\t<Suspense fallback={null}>\n\t\t<UserManagementWC\n projectId={projectId}\n widgetId={widgetId}\n tenant={tenant}\n baseUrl={baseUrl}\n baseStaticUrl={baseStaticUrl}\n baseCdnUrl={baseCdnUrl}\n ref={setInnerRef}\n {...{\n // attributes\n 'theme.attr': theme,\n 'locale.attr': locale,\n 'debug.attr': debug,\n 'styleId.attr': styleId,\n 'refreshCookieName.attr': refreshCookieName,\n // props\n 'logger.prop': logger,\n }}\n />\n\t</Suspense>\n );\n },\n);\n\nexport default UserManagement;\n"],"names":["UserManagementWC","lazy","async","import","default","withPropsMapping","React","forwardRef","props","ref","createElement","Object","assign","UserManagement","logger","tenant","theme","locale","debug","widgetId","styleId","onReady","innerRef","setInnerRef","useState","useImperativeHandle","projectId","baseUrl","baseStaticUrl","baseCdnUrl","refreshCookieName","useContext","Context","useEffect","ele","addEventListener","removeEventListener","Suspense","fallback"],"mappings":"mOAYA,MAAMA,EAAmBC,EAAIA,MAACC,gBACtBC,OAAO,mCAEN,CACLC,QAASC,EAAgBD,QACvBE,UAAMC,YAAwB,CAACC,EAAOC,IAC3CH,EAAAA,QAAgCI,cAAA,iCAAAC,OAAAC,OAAA,CAAAH,IAAKA,GAASD,WAMzCK,EAAiBP,EAAAA,QAAMC,YAC3B,EACIO,SAAQC,SAAQC,QAAOC,SAAQC,QAAOC,WAAUC,UAASC,WAC3DZ,KAEA,MAAOa,EAAUC,GAAeC,EAAQA,SAAC,MAEzCC,sBAAoBhB,GAAK,IAAMa,IAE/B,MAAMI,UAAEA,EAASC,QAAEA,EAAOC,cAAEA,EAAaC,WAAEA,EAAUC,kBAAEA,GACrDxB,EAAKF,QAAC2B,WAAWC,EAAAA,SAWnB,OATAC,EAAAA,WAAU,KACR,MAAMC,EAAMZ,EAGZ,OAFID,IAASa,SAAAA,EAAKC,iBAAiB,QAASd,IAErC,KACDA,IAASa,SAAAA,EAAKE,oBAAoB,QAASf,GAAQ,CACxD,GACA,CAACC,EAAUD,IAGjBf,EAACF,QAAAM,cAAA2B,EAAQA,SAAC,CAAAC,SAAU,MACnBhC,EAAAF,QAAAM,cAACV,EAAgB,CACT0B,UAAWA,EACXP,SAAUA,EACVJ,OAAQA,EACRY,QAASA,EACTC,cAAeA,EACfC,WAAYA,EACZpB,IAAKc,EAGH,aAAcP,EACd,cAAeC,EACf,aAAcC,EACd,eAAgBE,EAChB,yBAA0BU,EAE1B,cAAehB,IAIrB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("../hooks/Context.js"),r=require("./withPropsMapping/index.js");function a(e){return e&&e.__esModule?e:{default:e}}var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("../hooks/Context.js"),r=require("./withPropsMapping/index.js");function a(e){return e&&e.__esModule?e:{default:e}}var l=a(e);const s=e.lazy((async()=>(await import("@descope/user-profile-widget"),{default:r.default(l.default.forwardRef(((e,t)=>l.default.createElement("descope-user-profile-widget",Object.assign({ref:t},e)))))}))),o=l.default.forwardRef((({logger:r,theme:a,locale:o,debug:d,widgetId:u,onLogout:n,styleId:i,onReady:f},c)=>{const[p,g]=e.useState(null);e.useImperativeHandle(c,(()=>p));const{projectId:b,baseUrl:m,baseStaticUrl:v,baseCdnUrl:y,refreshCookieName:E,setSession:I,setUser:w,setIsAuthenticated:h}=l.default.useContext(t.default),C=e.useCallback((e=>{n&&n(e),h(!1),I(""),w(null)}),[n,I,h,w]);return e.useEffect((()=>{if(p)return p.addEventListener("logout",C),()=>p.removeEventListener("logout",C)}),[p,C]),e.useEffect((()=>{const e=p;return f&&(null==e||e.addEventListener("ready",f)),()=>{f&&(null==e||e.removeEventListener("ready",f))}}),[p,f]),l.default.createElement(e.Suspense,{fallback:null},l.default.createElement(s,{projectId:b,widgetId:u,baseUrl:m,baseStaticUrl:v,baseCdnUrl:y,styleId:i,ref:g,"theme.attr":a,"locale.attr":o,"debug.attr":d,"styleId.attr":i,"refreshCookieName.attr":E,"logger.prop":r}))}));exports.default=o;
|
|
2
2
|
//# sourceMappingURL=UserProfile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserProfile.js","sources":["../../../src/components/UserProfile.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useCallback,\n useEffect,\n useImperativeHandle,\n useState,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { UserProfileProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\n// web-component code uses browser API, but can be used in SSR apps, hence the lazy loading\nconst UserProfileWC = lazy(async () => {\n await import('@descope/user-profile-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n\t<descope-user-profile-widget ref={ref} {...props} />\n )),\n ),\n };\n});\n\nconst UserProfile = React.forwardRef<HTMLElement, UserProfileProps>(\n ({ logger, theme, debug, widgetId, onLogout, styleId, onReady }
|
|
1
|
+
{"version":3,"file":"UserProfile.js","sources":["../../../src/components/UserProfile.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useCallback,\n useEffect,\n useImperativeHandle,\n useState,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { UserProfileProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\n// web-component code uses browser API, but can be used in SSR apps, hence the lazy loading\nconst UserProfileWC = lazy(async () => {\n await import('@descope/user-profile-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n\t<descope-user-profile-widget ref={ref} {...props} />\n )),\n ),\n };\n});\n\nconst UserProfile = React.forwardRef<HTMLElement, UserProfileProps>(\n (\n { logger, theme, locale, debug, widgetId, onLogout, styleId, onReady },\n ref,\n ) => {\n const [innerRef, setInnerRef] = useState(null);\n\n useImperativeHandle(ref, () => innerRef);\n\n const {\n projectId,\n baseUrl,\n baseStaticUrl,\n baseCdnUrl,\n refreshCookieName,\n setSession,\n setUser,\n setIsAuthenticated,\n } = React.useContext(Context);\n\n const handleLogout = useCallback(\n (e: CustomEvent) => {\n if (onLogout) {\n onLogout(e);\n }\n // we want to clear the session and user when the logout event is triggered\n setIsAuthenticated(false);\n setSession('');\n setUser(null);\n },\n [onLogout, setSession, setIsAuthenticated, setUser],\n );\n\n useEffect(() => {\n if (innerRef) {\n innerRef.addEventListener('logout', handleLogout);\n return () => innerRef.removeEventListener('logout', handleLogout);\n }\n return undefined;\n }, [innerRef, handleLogout]);\n\n useEffect(() => {\n const ele = innerRef;\n if (onReady) ele?.addEventListener('ready', onReady);\n\n return () => {\n if (onReady) ele?.removeEventListener('ready', onReady);\n };\n }, [innerRef, onReady]);\n\n return (\n\t<Suspense fallback={null}>\n\t\t<UserProfileWC\n projectId={projectId}\n widgetId={widgetId}\n baseUrl={baseUrl}\n baseStaticUrl={baseStaticUrl}\n baseCdnUrl={baseCdnUrl}\n styleId={styleId}\n ref={setInnerRef}\n {...{\n // attributes\n 'theme.attr': theme,\n 'locale.attr': locale,\n 'debug.attr': debug,\n 'styleId.attr': styleId,\n 'refreshCookieName.attr': refreshCookieName,\n // props\n 'logger.prop': logger,\n }}\n />\n\t</Suspense>\n );\n },\n);\n\nexport default UserProfile;\n"],"names":["UserProfileWC","lazy","async","import","default","withPropsMapping","React","forwardRef","props","ref","createElement","Object","assign","UserProfile","logger","theme","locale","debug","widgetId","onLogout","styleId","onReady","innerRef","setInnerRef","useState","useImperativeHandle","projectId","baseUrl","baseStaticUrl","baseCdnUrl","refreshCookieName","setSession","setUser","setIsAuthenticated","useContext","Context","handleLogout","useCallback","e","useEffect","addEventListener","removeEventListener","ele","Suspense","fallback"],"mappings":"mOAaA,MAAMA,EAAgBC,EAAIA,MAACC,gBACnBC,OAAO,gCAEN,CACLC,QAASC,EAAgBD,QACvBE,UAAMC,YAAwB,CAACC,EAAOC,IAC3CH,EAAAA,QAA6BI,cAAA,8BAAAC,OAAAC,OAAA,CAAAH,IAAKA,GAASD,WAMtCK,EAAcP,EAAAA,QAAMC,YACxB,EACIO,SAAQC,QAAOC,SAAQC,QAAOC,WAAUC,WAAUC,UAASC,WAC7DZ,KAEA,MAAOa,EAAUC,GAAeC,EAAQA,SAAC,MAEzCC,sBAAoBhB,GAAK,IAAMa,IAE/B,MAAMI,UACJA,EAASC,QACTA,EAAOC,cACPA,EAAaC,WACbA,EAAUC,kBACVA,EAAiBC,WACjBA,EAAUC,QACVA,EAAOC,mBACPA,GACE3B,EAAKF,QAAC8B,WAAWC,EAAO/B,SAEtBgC,EAAeC,eAClBC,IACKnB,GACFA,EAASmB,GAGXL,GAAmB,GACnBF,EAAW,IACXC,EAAQ,KAAK,GAEf,CAACb,EAAUY,EAAYE,EAAoBD,IAoB7C,OAjBAO,EAAAA,WAAU,KACR,GAAIjB,EAEF,OADAA,EAASkB,iBAAiB,SAAUJ,GAC7B,IAAMd,EAASmB,oBAAoB,SAAUL,EAEtC,GACf,CAACd,EAAUc,IAEdG,EAAAA,WAAU,KACR,MAAMG,EAAMpB,EAGZ,OAFID,IAASqB,SAAAA,EAAKF,iBAAiB,QAASnB,IAErC,KACDA,IAASqB,SAAAA,EAAKD,oBAAoB,QAASpB,GAAQ,CACxD,GACA,CAACC,EAAUD,IAGjBf,EAACF,QAAAM,cAAAiC,EAAQA,SAAC,CAAAC,SAAU,MACnBtC,EAAAF,QAAAM,cAACV,EAAa,CACN0B,UAAWA,EACXR,SAAUA,EACVS,QAASA,EACTC,cAAeA,EACfC,WAAYA,EACZT,QAASA,EACTX,IAAKc,EAGH,aAAcR,EACd,cAAeC,EACf,aAAcC,EACd,eAAgBG,EAChB,yBAA0BU,EAE1B,cAAehB,IAIrB"}
|
package/dist/cjs/constants.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e="undefined"!=typeof window;exports.IS_BROWSER=e,exports.baseHeaders={"x-descope-sdk-name":"react","x-descope-sdk-version":"2.
|
|
1
|
+
"use strict";const e="undefined"!=typeof window;exports.IS_BROWSER=e,exports.baseHeaders={"x-descope-sdk-name":"react","x-descope-sdk-version":"2.29.0"};
|
|
2
2
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e,{lazy as t,useState as r,useImperativeHandle as a,useEffect as n,Suspense as o}from"react";import s from"../hooks/Context.js";import
|
|
1
|
+
import e,{lazy as t,useState as r,useImperativeHandle as a,useEffect as n,Suspense as o}from"react";import s from"../hooks/Context.js";import l from"./withPropsMapping/index.js";const d=t((async()=>(await import("@descope/access-key-management-widget"),{default:l(e.forwardRef(((t,r)=>e.createElement("descope-access-key-management-widget",Object.assign({ref:r},t)))))}))),c=e.forwardRef((({logger:t,tenant:l,theme:c,locale:i,debug:m,widgetId:f,styleId:g,onReady:p},u)=>{const[b,w]=r(null);a(u,(()=>b));const{projectId:y,baseUrl:h,baseStaticUrl:k,baseCdnUrl:C,refreshCookieName:I}=e.useContext(s);return n((()=>{const e=b;return p&&(null==e||e.addEventListener("ready",p)),()=>{p&&(null==e||e.removeEventListener("ready",p))}}),[b,p]),e.createElement(o,{fallback:null},e.createElement(d,{ref:w,projectId:y,widgetId:f,tenant:l,baseUrl:h,baseStaticUrl:k,baseCdnUrl:C,"theme.attr":c,"locale.attr":i,"debug.attr":m,"styleId.attr":g,"refreshCookieName.attr":I,"logger.prop":t}))}));export{c as default};
|
|
2
2
|
//# sourceMappingURL=AccessKeyManagement.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccessKeyManagement.js","sources":["../../../src/components/AccessKeyManagement.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useImperativeHandle,\n useState,\n useEffect,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { AccessKeyManagementProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\n// web-component code uses browser API, but can be used in SSR apps, hence the lazy loading\nconst AccessKeyManagementWC = lazy(async () => {\n await import('@descope/access-key-management-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n
|
|
1
|
+
{"version":3,"file":"AccessKeyManagement.js","sources":["../../../src/components/AccessKeyManagement.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useImperativeHandle,\n useState,\n useEffect,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { AccessKeyManagementProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\n// web-component code uses browser API, but can be used in SSR apps, hence the lazy loading\nconst AccessKeyManagementWC = lazy(async () => {\n await import('@descope/access-key-management-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n <descope-access-key-management-widget ref={ref} {...props} />\n )),\n ),\n };\n});\n\nconst AccessKeyManagement = React.forwardRef<\n HTMLElement,\n AccessKeyManagementProps\n>(\n (\n { logger, tenant, theme, locale, debug, widgetId, styleId, onReady },\n ref,\n ) => {\n const [innerRef, setInnerRef] = useState(null);\n\n useImperativeHandle(ref, () => innerRef);\n\n const { projectId, baseUrl, baseStaticUrl, baseCdnUrl, refreshCookieName } =\n React.useContext(Context);\n\n useEffect(() => {\n const ele = innerRef;\n if (onReady) ele?.addEventListener('ready', onReady);\n\n return () => {\n if (onReady) ele?.removeEventListener('ready', onReady);\n };\n }, [innerRef, onReady]);\n\n return (\n <Suspense fallback={null}>\n <AccessKeyManagementWC\n ref={setInnerRef}\n projectId={projectId}\n widgetId={widgetId}\n tenant={tenant}\n baseUrl={baseUrl}\n baseStaticUrl={baseStaticUrl}\n baseCdnUrl={baseCdnUrl}\n {...{\n // attributes\n 'theme.attr': theme,\n 'locale.attr': locale,\n 'debug.attr': debug,\n 'styleId.attr': styleId,\n 'refreshCookieName.attr': refreshCookieName,\n // props\n 'logger.prop': logger,\n }}\n />\n </Suspense>\n );\n },\n);\n\nexport default AccessKeyManagement;\n"],"names":["AccessKeyManagementWC","lazy","async","import","default","withPropsMapping","React","forwardRef","props","ref","createElement","Object","assign","AccessKeyManagement","logger","tenant","theme","locale","debug","widgetId","styleId","onReady","innerRef","setInnerRef","useState","useImperativeHandle","projectId","baseUrl","baseStaticUrl","baseCdnUrl","refreshCookieName","useContext","Context","useEffect","ele","addEventListener","removeEventListener","Suspense","fallback"],"mappings":"kLAYA,MAAMA,EAAwBC,GAAKC,gBAC3BC,OAAO,yCAEN,CACLC,QAASC,EACPC,EAAMC,YAAwB,CAACC,EAAOC,IACpCH,EAAsCI,cAAA,uCAAAC,OAAAC,OAAA,CAAAH,IAAKA,GAASD,WAMtDK,EAAsBP,EAAMC,YAIhC,EACIO,SAAQC,SAAQC,QAAOC,SAAQC,QAAOC,WAAUC,UAASC,WAC3DZ,KAEA,MAAOa,EAAUC,GAAeC,EAAS,MAEzCC,EAAoBhB,GAAK,IAAMa,IAE/B,MAAMI,UAAEA,EAASC,QAAEA,EAAOC,cAAEA,EAAaC,WAAEA,EAAUC,kBAAEA,GACrDxB,EAAMyB,WAAWC,GAWnB,OATAC,GAAU,KACR,MAAMC,EAAMZ,EAGZ,OAFID,IAASa,SAAAA,EAAKC,iBAAiB,QAASd,IAErC,KACDA,IAASa,SAAAA,EAAKE,oBAAoB,QAASf,GAAQ,CACxD,GACA,CAACC,EAAUD,IAGZf,EAACI,cAAA2B,EAAS,CAAAC,SAAU,MAClBhC,EAAAI,cAACV,EAAqB,CACpBS,IAAKc,EACLG,UAAWA,EACXP,SAAUA,EACVJ,OAAQA,EACRY,QAASA,EACTC,cAAeA,EACfC,WAAYA,EAGV,aAAcb,EACd,cAAeC,EACf,aAAcC,EACd,eAAgBE,EAChB,yBAA0BU,EAE1B,cAAehB,IAIrB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e,{lazy as t,useState as r,useImperativeHandle as a,useEffect as o,Suspense as l}from"react";import s from"../hooks/Context.js";import n from"./withPropsMapping/index.js";const d=t((async()=>(await import("@descope/applications-portal-widget"),{default:n(e.forwardRef(((t,r)=>e.createElement("descope-applications-portal-widget",Object.assign({ref:r},t)))))}))),i=e.forwardRef((({logger:t,theme:n,
|
|
1
|
+
import e,{lazy as t,useState as r,useImperativeHandle as a,useEffect as o,Suspense as l}from"react";import s from"../hooks/Context.js";import n from"./withPropsMapping/index.js";const d=t((async()=>(await import("@descope/applications-portal-widget"),{default:n(e.forwardRef(((t,r)=>e.createElement("descope-applications-portal-widget",Object.assign({ref:r},t)))))}))),i=e.forwardRef((({logger:t,theme:n,locale:i,debug:c,widgetId:p,styleId:m,onReady:f},g)=>{const[u,b]=r(null);a(g,(()=>u));const{projectId:w,baseUrl:h,baseStaticUrl:y,baseCdnUrl:C,refreshCookieName:I}=e.useContext(s);return o((()=>{const e=u;return f&&(null==e||e.addEventListener("ready",f)),()=>{f&&(null==e||e.removeEventListener("ready",f))}}),[u,f]),e.createElement(l,{fallback:null},e.createElement(d,{ref:b,projectId:w,widgetId:p,baseUrl:h,baseStaticUrl:y,baseCdnUrl:C,"theme.attr":n,"locale.attr":i,"debug.attr":c,"styleId.attr":m,"refreshCookieName.attr":I,"logger.prop":t}))}));export{i as default};
|
|
2
2
|
//# sourceMappingURL=ApplicationsPortal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationsPortal.js","sources":["../../../src/components/ApplicationsPortal.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useImperativeHandle,\n useState,\n useEffect,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { ApplicationsPortalProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\n// web-component code uses browser API, but can be used in SSR apps, hence the lazy loading\nconst ApplicationsPortalWC = lazy(async () => {\n await import('@descope/applications-portal-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n\t<descope-applications-portal-widget ref={ref} {...props} />\n )),\n ),\n };\n});\n\nconst ApplicationsPortal = React.forwardRef<\n HTMLElement,\n ApplicationsPortalProps\n>(({ logger, theme, debug, widgetId, styleId, onReady }, ref) => {\n const [innerRef, setInnerRef] = useState(null);\n\n useImperativeHandle(ref, () => innerRef);\n\n const { projectId, baseUrl, baseStaticUrl, baseCdnUrl, refreshCookieName } =\n React.useContext(Context);\n\n useEffect(() => {\n const ele = innerRef;\n if (onReady) ele?.addEventListener('ready', onReady);\n\n return () => {\n if (onReady) ele?.removeEventListener('ready', onReady);\n };\n }, [innerRef, onReady]);\n\n return (\n\t<Suspense fallback={null}>\n\t\t<ApplicationsPortalWC\n ref={setInnerRef}\n projectId={projectId}\n widgetId={widgetId}\n baseUrl={baseUrl}\n baseStaticUrl={baseStaticUrl}\n baseCdnUrl={baseCdnUrl}\n {...{\n // attributes\n 'theme.attr': theme,\n 'debug.attr': debug,\n 'styleId.attr': styleId,\n 'refreshCookieName.attr': refreshCookieName,\n // props\n 'logger.prop': logger,\n }}\n />\n\t</Suspense>\n );\n});\n\nexport default ApplicationsPortal;\n"],"names":["ApplicationsPortalWC","lazy","async","import","default","withPropsMapping","React","forwardRef","props","ref","createElement","Object","assign","ApplicationsPortal","logger","theme","debug","widgetId","styleId","onReady","innerRef","setInnerRef","useState","useImperativeHandle","projectId","baseUrl","baseStaticUrl","baseCdnUrl","refreshCookieName","useContext","Context","useEffect","ele","addEventListener","removeEventListener","Suspense","fallback"],"mappings":"kLAYA,MAAMA,EAAuBC,GAAKC,gBAC1BC,OAAO,uCAEN,CACLC,QAASC,EACPC,EAAMC,YAAwB,CAACC,EAAOC,IAC3CH,EAAoCI,cAAA,qCAAAC,OAAAC,OAAA,CAAAH,IAAKA,GAASD,WAM7CK,EAAqBP,EAAMC,YAG/B,EAAGO,SAAQC,QAAOC,QAAOC,WAAUC,UAASC,
|
|
1
|
+
{"version":3,"file":"ApplicationsPortal.js","sources":["../../../src/components/ApplicationsPortal.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useImperativeHandle,\n useState,\n useEffect,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { ApplicationsPortalProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\n// web-component code uses browser API, but can be used in SSR apps, hence the lazy loading\nconst ApplicationsPortalWC = lazy(async () => {\n await import('@descope/applications-portal-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n\t<descope-applications-portal-widget ref={ref} {...props} />\n )),\n ),\n };\n});\n\nconst ApplicationsPortal = React.forwardRef<\n HTMLElement,\n ApplicationsPortalProps\n>(({ logger, theme, locale, debug, widgetId, styleId, onReady }, ref) => {\n const [innerRef, setInnerRef] = useState(null);\n\n useImperativeHandle(ref, () => innerRef);\n\n const { projectId, baseUrl, baseStaticUrl, baseCdnUrl, refreshCookieName } =\n React.useContext(Context);\n\n useEffect(() => {\n const ele = innerRef;\n if (onReady) ele?.addEventListener('ready', onReady);\n\n return () => {\n if (onReady) ele?.removeEventListener('ready', onReady);\n };\n }, [innerRef, onReady]);\n\n return (\n\t<Suspense fallback={null}>\n\t\t<ApplicationsPortalWC\n ref={setInnerRef}\n projectId={projectId}\n widgetId={widgetId}\n baseUrl={baseUrl}\n baseStaticUrl={baseStaticUrl}\n baseCdnUrl={baseCdnUrl}\n {...{\n // attributes\n 'theme.attr': theme,\n 'locale.attr': locale,\n 'debug.attr': debug,\n 'styleId.attr': styleId,\n 'refreshCookieName.attr': refreshCookieName,\n // props\n 'logger.prop': logger,\n }}\n />\n\t</Suspense>\n );\n});\n\nexport default ApplicationsPortal;\n"],"names":["ApplicationsPortalWC","lazy","async","import","default","withPropsMapping","React","forwardRef","props","ref","createElement","Object","assign","ApplicationsPortal","logger","theme","locale","debug","widgetId","styleId","onReady","innerRef","setInnerRef","useState","useImperativeHandle","projectId","baseUrl","baseStaticUrl","baseCdnUrl","refreshCookieName","useContext","Context","useEffect","ele","addEventListener","removeEventListener","Suspense","fallback"],"mappings":"kLAYA,MAAMA,EAAuBC,GAAKC,gBAC1BC,OAAO,uCAEN,CACLC,QAASC,EACPC,EAAMC,YAAwB,CAACC,EAAOC,IAC3CH,EAAoCI,cAAA,qCAAAC,OAAAC,OAAA,CAAAH,IAAKA,GAASD,WAM7CK,EAAqBP,EAAMC,YAG/B,EAAGO,SAAQC,QAAOC,SAAQC,QAAOC,WAAUC,UAASC,WAAWX,KAC/D,MAAOY,EAAUC,GAAeC,EAAS,MAEzCC,EAAoBf,GAAK,IAAMY,IAE/B,MAAMI,UAAEA,EAASC,QAAEA,EAAOC,cAAEA,EAAaC,WAAEA,EAAUC,kBAAEA,GACrDvB,EAAMwB,WAAWC,GAWnB,OATAC,GAAU,KACR,MAAMC,EAAMZ,EAGZ,OAFID,IAASa,SAAAA,EAAKC,iBAAiB,QAASd,IAErC,KACDA,IAASa,SAAAA,EAAKE,oBAAoB,QAASf,GAAQ,CACxD,GACA,CAACC,EAAUD,IAGfd,EAACI,cAAA0B,EAAS,CAAAC,SAAU,MACnB/B,EAACI,cAAAV,EACK,CAAAS,IAAKa,EACLG,UAAWA,EACXP,SAAUA,EACVQ,QAASA,EACTC,cAAeA,EACfC,WAAYA,EAGV,aAAcb,EACd,cAAeC,EACf,aAAcC,EACd,eAAgBE,EAChB,yBAA0BU,EAE1B,cAAef,IAIrB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e,{lazy as t,useState as r,useImperativeHandle as a,useEffect as n,Suspense as o}from"react";import
|
|
1
|
+
import e,{lazy as t,useState as r,useImperativeHandle as a,useEffect as n,Suspense as o}from"react";import l from"../hooks/Context.js";import d from"./withPropsMapping/index.js";const s=t((async()=>(await import("@descope/audit-management-widget"),{default:d(e.forwardRef(((t,r)=>e.createElement("descope-audit-management-widget",Object.assign({ref:r},t)))))}))),i=e.forwardRef((({logger:t,tenant:d,theme:i,locale:c,debug:m,widgetId:f,styleId:g,onReady:p},u)=>{const[b,w]=r(null);a(u,(()=>b));const{projectId:h,baseUrl:y,baseStaticUrl:C,baseCdnUrl:I,refreshCookieName:U}=e.useContext(l);return n((()=>{const e=b;return p&&(null==e||e.addEventListener("ready",p)),()=>{p&&(null==e||e.removeEventListener("ready",p))}}),[b,p]),e.createElement(o,{fallback:null},e.createElement(s,{ref:w,projectId:h,widgetId:f,tenant:d,baseUrl:y,baseStaticUrl:C,baseCdnUrl:I,"theme.attr":i,"locale.attr":c,"debug.attr":m,"styleId.attr":g,"refreshCookieName.attr":U,"logger.prop":t}))}));export{i as default};
|
|
2
2
|
//# sourceMappingURL=AuditManagement.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuditManagement.js","sources":["../../../src/components/AuditManagement.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useImperativeHandle,\n useState,\n useEffect,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { AuditManagementProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\n// web-component code uses browser API, but can be used in SSR apps, hence the lazy loading\nconst AuditManagementWC = lazy(async () => {\n await import('@descope/audit-management-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n\t<descope-audit-management-widget ref={ref} {...props} />\n )),\n ),\n };\n});\n\nconst AuditManagement = React.forwardRef<HTMLElement, AuditManagementProps>(\n ({ logger, tenant, theme, debug, widgetId, styleId, onReady }
|
|
1
|
+
{"version":3,"file":"AuditManagement.js","sources":["../../../src/components/AuditManagement.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useImperativeHandle,\n useState,\n useEffect,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { AuditManagementProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\n// web-component code uses browser API, but can be used in SSR apps, hence the lazy loading\nconst AuditManagementWC = lazy(async () => {\n await import('@descope/audit-management-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n\t<descope-audit-management-widget ref={ref} {...props} />\n )),\n ),\n };\n});\n\nconst AuditManagement = React.forwardRef<HTMLElement, AuditManagementProps>(\n (\n { logger, tenant, theme, locale, debug, widgetId, styleId, onReady },\n ref,\n ) => {\n const [innerRef, setInnerRef] = useState(null);\n\n useImperativeHandle(ref, () => innerRef);\n\n const { projectId, baseUrl, baseStaticUrl, baseCdnUrl, refreshCookieName } =\n React.useContext(Context);\n\n useEffect(() => {\n const ele = innerRef;\n if (onReady) ele?.addEventListener('ready', onReady);\n\n return () => {\n if (onReady) ele?.removeEventListener('ready', onReady);\n };\n }, [innerRef, onReady]);\n\n return (\n\t<Suspense fallback={null}>\n\t\t<AuditManagementWC\n ref={setInnerRef}\n projectId={projectId}\n widgetId={widgetId}\n tenant={tenant}\n baseUrl={baseUrl}\n baseStaticUrl={baseStaticUrl}\n baseCdnUrl={baseCdnUrl}\n {...{\n // attributes\n 'theme.attr': theme,\n 'locale.attr': locale,\n 'debug.attr': debug,\n 'styleId.attr': styleId,\n 'refreshCookieName.attr': refreshCookieName,\n // props\n 'logger.prop': logger,\n }}\n />\n\t</Suspense>\n );\n },\n);\n\nexport default AuditManagement;\n"],"names":["AuditManagementWC","lazy","async","import","default","withPropsMapping","React","forwardRef","props","ref","createElement","Object","assign","AuditManagement","logger","tenant","theme","locale","debug","widgetId","styleId","onReady","innerRef","setInnerRef","useState","useImperativeHandle","projectId","baseUrl","baseStaticUrl","baseCdnUrl","refreshCookieName","useContext","Context","useEffect","ele","addEventListener","removeEventListener","Suspense","fallback"],"mappings":"kLAYA,MAAMA,EAAoBC,GAAKC,gBACvBC,OAAO,oCAEN,CACLC,QAASC,EACPC,EAAMC,YAAwB,CAACC,EAAOC,IAC3CH,EAAiCI,cAAA,kCAAAC,OAAAC,OAAA,CAAAH,IAAKA,GAASD,WAM1CK,EAAkBP,EAAMC,YAC5B,EACIO,SAAQC,SAAQC,QAAOC,SAAQC,QAAOC,WAAUC,UAASC,WAC3DZ,KAEA,MAAOa,EAAUC,GAAeC,EAAS,MAEzCC,EAAoBhB,GAAK,IAAMa,IAE/B,MAAMI,UAAEA,EAASC,QAAEA,EAAOC,cAAEA,EAAaC,WAAEA,EAAUC,kBAAEA,GACrDxB,EAAMyB,WAAWC,GAWnB,OATAC,GAAU,KACR,MAAMC,EAAMZ,EAGZ,OAFID,IAASa,SAAAA,EAAKC,iBAAiB,QAASd,IAErC,KACDA,IAASa,SAAAA,EAAKE,oBAAoB,QAASf,GAAQ,CACxD,GACA,CAACC,EAAUD,IAGjBf,EAACI,cAAA2B,EAAS,CAAAC,SAAU,MACnBhC,EAAAI,cAACV,EAAiB,CACVS,IAAKc,EACLG,UAAWA,EACXP,SAAUA,EACVJ,OAAQA,EACRY,QAASA,EACTC,cAAeA,EACfC,WAAYA,EAGV,aAAcb,EACd,cAAeC,EACf,aAAcC,EACd,eAAgBE,EAChB,yBAA0BU,EAE1B,cAAehB,IAIrB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e,{lazy as t,useState as r,useImperativeHandle as a,useEffect as o,Suspense as
|
|
1
|
+
import e,{lazy as t,useState as r,useImperativeHandle as a,useEffect as o,Suspense as l}from"react";import n from"../hooks/Context.js";import s from"./withPropsMapping/index.js";const d=t((async()=>(await import("@descope/outbound-applications-widget"),{default:s(e.forwardRef(((t,r)=>e.createElement("descope-outbound-applications-widget",Object.assign({ref:r},t)))))}))),i=e.forwardRef((({logger:t,theme:s,locale:i,debug:c,widgetId:p,styleId:m,onReady:u},f)=>{const[b,g]=r(null);a(f,(()=>b));const{projectId:w,baseUrl:h,baseStaticUrl:y,baseCdnUrl:C,refreshCookieName:I}=e.useContext(n);return o((()=>{const e=b;return u&&(null==e||e.addEventListener("ready",u)),()=>{u&&(null==e||e.removeEventListener("ready",u))}}),[b,u]),e.createElement(l,{fallback:null},e.createElement(d,{ref:g,projectId:w,widgetId:p,baseUrl:h,baseStaticUrl:y,baseCdnUrl:C,"theme.attr":s,"locale.attr":i,"debug.attr":c,"styleId.attr":m,"refreshCookieName.attr":I,"logger.prop":t}))}));export{i as default};
|
|
2
2
|
//# sourceMappingURL=OutboundApplications.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OutboundApplications.js","sources":["../../../src/components/OutboundApplications.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useImperativeHandle,\n useState,\n useEffect,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { OutboundApplicationsProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\n// web-component code uses browser API, but can be used in SSR apps, hence the lazy loading\nconst OutboundApplicationsWC = lazy(async () => {\n await import('@descope/outbound-applications-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n
|
|
1
|
+
{"version":3,"file":"OutboundApplications.js","sources":["../../../src/components/OutboundApplications.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useImperativeHandle,\n useState,\n useEffect,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { OutboundApplicationsProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\n// web-component code uses browser API, but can be used in SSR apps, hence the lazy loading\nconst OutboundApplicationsWC = lazy(async () => {\n await import('@descope/outbound-applications-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n\t<descope-outbound-applications-widget ref={ref} {...props} />\n )),\n ),\n };\n});\n\nconst OutboundApplications = React.forwardRef<\n HTMLElement,\n OutboundApplicationsProps\n>(({ logger, theme, locale, debug, widgetId, styleId, onReady }, ref) => {\n const [innerRef, setInnerRef] = useState(null);\n\n useImperativeHandle(ref, () => innerRef);\n\n const { projectId, baseUrl, baseStaticUrl, baseCdnUrl, refreshCookieName } =\n React.useContext(Context);\n\n useEffect(() => {\n const ele = innerRef;\n if (onReady) ele?.addEventListener('ready', onReady);\n\n return () => {\n if (onReady) ele?.removeEventListener('ready', onReady);\n };\n }, [innerRef, onReady]);\n\n return (\n\t<Suspense fallback={null}>\n\t\t<OutboundApplicationsWC\n ref={setInnerRef}\n projectId={projectId}\n widgetId={widgetId}\n baseUrl={baseUrl}\n baseStaticUrl={baseStaticUrl}\n baseCdnUrl={baseCdnUrl}\n {...{\n // attributes\n 'theme.attr': theme,\n 'locale.attr': locale,\n 'debug.attr': debug,\n 'styleId.attr': styleId,\n 'refreshCookieName.attr': refreshCookieName,\n // props\n 'logger.prop': logger,\n }}\n />\n\t</Suspense>\n );\n});\n\nexport default OutboundApplications;\n"],"names":["OutboundApplicationsWC","lazy","async","import","default","withPropsMapping","React","forwardRef","props","ref","createElement","Object","assign","OutboundApplications","logger","theme","locale","debug","widgetId","styleId","onReady","innerRef","setInnerRef","useState","useImperativeHandle","projectId","baseUrl","baseStaticUrl","baseCdnUrl","refreshCookieName","useContext","Context","useEffect","ele","addEventListener","removeEventListener","Suspense","fallback"],"mappings":"kLAYA,MAAMA,EAAyBC,GAAKC,gBAC5BC,OAAO,yCAEN,CACLC,QAASC,EACPC,EAAMC,YAAwB,CAACC,EAAOC,IAC3CH,EAAsCI,cAAA,uCAAAC,OAAAC,OAAA,CAAAH,IAAKA,GAASD,WAM/CK,EAAuBP,EAAMC,YAGjC,EAAGO,SAAQC,QAAOC,SAAQC,QAAOC,WAAUC,UAASC,WAAWX,KAC/D,MAAOY,EAAUC,GAAeC,EAAS,MAEzCC,EAAoBf,GAAK,IAAMY,IAE/B,MAAMI,UAAEA,EAASC,QAAEA,EAAOC,cAAEA,EAAaC,WAAEA,EAAUC,kBAAEA,GACrDvB,EAAMwB,WAAWC,GAWnB,OATAC,GAAU,KACR,MAAMC,EAAMZ,EAGZ,OAFID,IAASa,SAAAA,EAAKC,iBAAiB,QAASd,IAErC,KACDA,IAASa,SAAAA,EAAKE,oBAAoB,QAASf,GAAQ,CACxD,GACA,CAACC,EAAUD,IAGfd,EAACI,cAAA0B,EAAS,CAAAC,SAAU,MACnB/B,EAACI,cAAAV,EACK,CAAAS,IAAKa,EACLG,UAAWA,EACXP,SAAUA,EACVQ,QAASA,EACTC,cAAeA,EACfC,WAAYA,EAGV,aAAcb,EACd,cAAeC,EACf,aAAcC,EACd,eAAgBE,EAChB,yBAA0BU,EAE1B,cAAef,IAIrB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e,{lazy as t,useState as r,useImperativeHandle as a,useEffect as
|
|
1
|
+
import e,{lazy as t,useState as r,useImperativeHandle as a,useEffect as o,Suspense as n}from"react";import l from"../hooks/Context.js";import s from"./withPropsMapping/index.js";const d=t((async()=>(await import("@descope/role-management-widget"),{default:s(e.forwardRef(((t,r)=>e.createElement("descope-role-management-widget",Object.assign({ref:r},t)))))}))),c=e.forwardRef((({logger:t,tenant:s,theme:c,locale:i,debug:m,widgetId:f,styleId:g,onReady:p},u)=>{const[b,w]=r(null);a(u,(()=>b));const{projectId:h,baseUrl:y,baseStaticUrl:C,baseCdnUrl:I,refreshCookieName:U}=e.useContext(l);return o((()=>{const e=b;return p&&(null==e||e.addEventListener("ready",p)),()=>{p&&(null==e||e.removeEventListener("ready",p))}}),[b,p]),e.createElement(n,{fallback:null},e.createElement(d,{ref:w,projectId:h,widgetId:f,tenant:s,baseUrl:y,baseStaticUrl:C,baseCdnUrl:I,"theme.attr":c,"locale.attr":i,"debug.attr":m,"styleId.attr":g,"refreshCookieName.attr":U,"logger.prop":t}))}));export{c as default};
|
|
2
2
|
//# sourceMappingURL=RoleManagement.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RoleManagement.js","sources":["../../../src/components/RoleManagement.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useImperativeHandle,\n useState,\n useEffect,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { RoleManagementProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\n// web-component code uses browser API, but can be used in SSR apps, hence the lazy loading\nconst RoleManagementWC = lazy(async () => {\n await import('@descope/role-management-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n\t<descope-role-management-widget ref={ref} {...props} />\n )),\n ),\n };\n});\n\nconst RoleManagement = React.forwardRef<HTMLElement, RoleManagementProps>(\n ({ logger, tenant, theme, debug, widgetId, styleId, onReady }
|
|
1
|
+
{"version":3,"file":"RoleManagement.js","sources":["../../../src/components/RoleManagement.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useImperativeHandle,\n useState,\n useEffect,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { RoleManagementProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\n// web-component code uses browser API, but can be used in SSR apps, hence the lazy loading\nconst RoleManagementWC = lazy(async () => {\n await import('@descope/role-management-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n\t<descope-role-management-widget ref={ref} {...props} />\n )),\n ),\n };\n});\n\nconst RoleManagement = React.forwardRef<HTMLElement, RoleManagementProps>(\n (\n { logger, tenant, theme, locale, debug, widgetId, styleId, onReady },\n ref,\n ) => {\n const [innerRef, setInnerRef] = useState(null);\n\n useImperativeHandle(ref, () => innerRef);\n\n const { projectId, baseUrl, baseStaticUrl, baseCdnUrl, refreshCookieName } =\n React.useContext(Context);\n\n useEffect(() => {\n const ele = innerRef;\n if (onReady) ele?.addEventListener('ready', onReady);\n\n return () => {\n if (onReady) ele?.removeEventListener('ready', onReady);\n };\n }, [innerRef, onReady]);\n\n return (\n\t<Suspense fallback={null}>\n\t\t<RoleManagementWC\n ref={setInnerRef}\n projectId={projectId}\n widgetId={widgetId}\n tenant={tenant}\n baseUrl={baseUrl}\n baseStaticUrl={baseStaticUrl}\n baseCdnUrl={baseCdnUrl}\n {...{\n // attributes\n 'theme.attr': theme,\n 'locale.attr': locale,\n 'debug.attr': debug,\n 'styleId.attr': styleId,\n 'refreshCookieName.attr': refreshCookieName,\n // props\n 'logger.prop': logger,\n }}\n />\n\t</Suspense>\n );\n },\n);\n\nexport default RoleManagement;\n"],"names":["RoleManagementWC","lazy","async","import","default","withPropsMapping","React","forwardRef","props","ref","createElement","Object","assign","RoleManagement","logger","tenant","theme","locale","debug","widgetId","styleId","onReady","innerRef","setInnerRef","useState","useImperativeHandle","projectId","baseUrl","baseStaticUrl","baseCdnUrl","refreshCookieName","useContext","Context","useEffect","ele","addEventListener","removeEventListener","Suspense","fallback"],"mappings":"kLAYA,MAAMA,EAAmBC,GAAKC,gBACtBC,OAAO,mCAEN,CACLC,QAASC,EACPC,EAAMC,YAAwB,CAACC,EAAOC,IAC3CH,EAAgCI,cAAA,iCAAAC,OAAAC,OAAA,CAAAH,IAAKA,GAASD,WAMzCK,EAAiBP,EAAMC,YAC3B,EACIO,SAAQC,SAAQC,QAAOC,SAAQC,QAAOC,WAAUC,UAASC,WAC3DZ,KAEA,MAAOa,EAAUC,GAAeC,EAAS,MAEzCC,EAAoBhB,GAAK,IAAMa,IAE/B,MAAMI,UAAEA,EAASC,QAAEA,EAAOC,cAAEA,EAAaC,WAAEA,EAAUC,kBAAEA,GACrDxB,EAAMyB,WAAWC,GAWnB,OATAC,GAAU,KACR,MAAMC,EAAMZ,EAGZ,OAFID,IAASa,SAAAA,EAAKC,iBAAiB,QAASd,IAErC,KACDA,IAASa,SAAAA,EAAKE,oBAAoB,QAASf,GAAQ,CACxD,GACA,CAACC,EAAUD,IAGjBf,EAACI,cAAA2B,EAAS,CAAAC,SAAU,MACnBhC,EAAAI,cAACV,EAAgB,CACTS,IAAKc,EACLG,UAAWA,EACXP,SAAUA,EACVJ,OAAQA,EACRY,QAASA,EACTC,cAAeA,EACfC,WAAYA,EAGV,aAAcb,EACd,cAAeC,EACf,aAAcC,EACd,eAAgBE,EAChB,yBAA0BU,EAE1B,cAAehB,IAIrB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e,{lazy as t,useState as r,useImperativeHandle as a,useEffect as n,Suspense as o}from"react";import l from"../hooks/Context.js";import s from"./withPropsMapping/index.js";const d=t((async()=>(await import("@descope/tenant-profile-widget"),{default:s(e.forwardRef(((t,r)=>e.createElement("descope-tenant-profile-widget",Object.assign({ref:r},t)))))}))),i=e.forwardRef((({logger:t,theme:s,
|
|
1
|
+
import e,{lazy as t,useState as r,useImperativeHandle as a,useEffect as n,Suspense as o}from"react";import l from"../hooks/Context.js";import s from"./withPropsMapping/index.js";const d=t((async()=>(await import("@descope/tenant-profile-widget"),{default:s(e.forwardRef(((t,r)=>e.createElement("descope-tenant-profile-widget",Object.assign({ref:r},t)))))}))),i=e.forwardRef((({logger:t,theme:s,locale:i,debug:c,widgetId:f,styleId:p,tenant:m,onReady:g},u)=>{const[b,w]=r(null);a(u,(()=>b));const{projectId:y,baseUrl:I,baseStaticUrl:h,baseCdnUrl:C,refreshCookieName:U}=e.useContext(l);return n((()=>{const e=b;return g&&(null==e||e.addEventListener("ready",g)),()=>{g&&(null==e||e.removeEventListener("ready",g))}}),[b,g]),e.createElement(o,{fallback:null},e.createElement(d,{projectId:y,widgetId:f,baseUrl:I,baseStaticUrl:h,baseCdnUrl:C,styleId:p,tenant:m,ref:w,"theme.attr":s,"locale.attr":i,"debug.attr":c,"styleId.attr":p,"tenant.attr":m,"refreshCookieName.attr":U,"logger.prop":t}))}));export{i as default};
|
|
2
2
|
//# sourceMappingURL=TenantProfile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TenantProfile.js","sources":["../../../src/components/TenantProfile.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useImperativeHandle,\n useState,\n useEffect,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { TenantProfileProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\nconst TenantProfileWC = lazy(async () => {\n await import('@descope/tenant-profile-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n\t<descope-tenant-profile-widget ref={ref} {...props} />\n )),\n ),\n };\n});\n\nconst TenantProfile = React.forwardRef<HTMLElement, TenantProfileProps>(\n ({ logger, theme, debug, widgetId, styleId, tenant, onReady }
|
|
1
|
+
{"version":3,"file":"TenantProfile.js","sources":["../../../src/components/TenantProfile.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useImperativeHandle,\n useState,\n useEffect,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { TenantProfileProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\nconst TenantProfileWC = lazy(async () => {\n await import('@descope/tenant-profile-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n\t<descope-tenant-profile-widget ref={ref} {...props} />\n )),\n ),\n };\n});\n\nconst TenantProfile = React.forwardRef<HTMLElement, TenantProfileProps>(\n (\n { logger, theme, locale, debug, widgetId, styleId, tenant, onReady },\n ref,\n ) => {\n const [innerRef, setInnerRef] = useState(null);\n\n useImperativeHandle(ref, () => innerRef);\n\n const { projectId, baseUrl, baseStaticUrl, baseCdnUrl, refreshCookieName } =\n React.useContext(Context);\n\n useEffect(() => {\n const ele = innerRef;\n if (onReady) ele?.addEventListener('ready', onReady);\n\n return () => {\n if (onReady) ele?.removeEventListener('ready', onReady);\n };\n }, [innerRef, onReady]);\n\n return (\n\t<Suspense fallback={null}>\n\t\t<TenantProfileWC\n projectId={projectId}\n widgetId={widgetId}\n baseUrl={baseUrl}\n baseStaticUrl={baseStaticUrl}\n baseCdnUrl={baseCdnUrl}\n styleId={styleId}\n tenant={tenant}\n ref={setInnerRef}\n {...{\n 'theme.attr': theme,\n 'locale.attr': locale,\n 'debug.attr': debug,\n 'styleId.attr': styleId,\n 'tenant.attr': tenant,\n 'refreshCookieName.attr': refreshCookieName,\n 'logger.prop': logger,\n }}\n />\n\t</Suspense>\n );\n },\n);\n\nexport default TenantProfile;\n"],"names":["TenantProfileWC","lazy","async","import","default","withPropsMapping","React","forwardRef","props","ref","createElement","Object","assign","TenantProfile","logger","theme","locale","debug","widgetId","styleId","tenant","onReady","innerRef","setInnerRef","useState","useImperativeHandle","projectId","baseUrl","baseStaticUrl","baseCdnUrl","refreshCookieName","useContext","Context","useEffect","ele","addEventListener","removeEventListener","Suspense","fallback"],"mappings":"kLAWA,MAAMA,EAAkBC,GAAKC,gBACrBC,OAAO,kCAEN,CACLC,QAASC,EACPC,EAAMC,YAAwB,CAACC,EAAOC,IAC3CH,EAA+BI,cAAA,gCAAAC,OAAAC,OAAA,CAAAH,IAAKA,GAASD,WAMxCK,EAAgBP,EAAMC,YAC1B,EACIO,SAAQC,QAAOC,SAAQC,QAAOC,WAAUC,UAASC,SAAQC,WAC3DZ,KAEA,MAAOa,EAAUC,GAAeC,EAAS,MAEzCC,EAAoBhB,GAAK,IAAMa,IAE/B,MAAMI,UAAEA,EAASC,QAAEA,EAAOC,cAAEA,EAAaC,WAAEA,EAAUC,kBAAEA,GACrDxB,EAAMyB,WAAWC,GAWnB,OATAC,GAAU,KACR,MAAMC,EAAMZ,EAGZ,OAFID,IAASa,SAAAA,EAAKC,iBAAiB,QAASd,IAErC,KACDA,IAASa,SAAAA,EAAKE,oBAAoB,QAASf,GAAQ,CACxD,GACA,CAACC,EAAUD,IAGjBf,EAACI,cAAA2B,EAAS,CAAAC,SAAU,MACnBhC,EAAAI,cAACV,EACO,CAAA0B,UAAWA,EACXR,SAAUA,EACVS,QAASA,EACTC,cAAeA,EACfC,WAAYA,EACZV,QAASA,EACTC,OAAQA,EACRX,IAAKc,EAEH,aAAcR,EACd,cAAeC,EACf,aAAcC,EACd,eAAgBE,EAChB,cAAeC,EACf,yBAA0BU,EAC1B,cAAehB,IAIrB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e,{lazy as t,useState as r,useImperativeHandle as a,useEffect as n,Suspense as o}from"react";import
|
|
1
|
+
import e,{lazy as t,useState as r,useImperativeHandle as a,useEffect as n,Suspense as o}from"react";import l from"../hooks/Context.js";import s from"./withPropsMapping/index.js";const d=t((async()=>(await import("@descope/user-management-widget"),{default:s(e.forwardRef(((t,r)=>e.createElement("descope-user-management-widget",Object.assign({ref:r},t)))))}))),c=e.forwardRef((({logger:t,tenant:s,theme:c,locale:i,debug:m,widgetId:f,styleId:g,onReady:p},u)=>{const[b,w]=r(null);a(u,(()=>b));const{projectId:h,baseUrl:y,baseStaticUrl:C,baseCdnUrl:I,refreshCookieName:U}=e.useContext(l);return n((()=>{const e=b;return p&&(null==e||e.addEventListener("ready",p)),()=>{p&&(null==e||e.removeEventListener("ready",p))}}),[b,p]),e.createElement(o,{fallback:null},e.createElement(d,{projectId:h,widgetId:f,tenant:s,baseUrl:y,baseStaticUrl:C,baseCdnUrl:I,ref:w,"theme.attr":c,"locale.attr":i,"debug.attr":m,"styleId.attr":g,"refreshCookieName.attr":U,"logger.prop":t}))}));export{c as default};
|
|
2
2
|
//# sourceMappingURL=UserManagement.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserManagement.js","sources":["../../../src/components/UserManagement.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useImperativeHandle,\n useState,\n useEffect,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { UserManagementProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\n// web-component code uses browser API, but can be used in SSR apps, hence the lazy loading\nconst UserManagementWC = lazy(async () => {\n await import('@descope/user-management-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n\t<descope-user-management-widget ref={ref} {...props} />\n )),\n ),\n };\n});\n\nconst UserManagement = React.forwardRef<HTMLElement, UserManagementProps>(\n ({ logger, tenant, theme, debug, widgetId, styleId, onReady }
|
|
1
|
+
{"version":3,"file":"UserManagement.js","sources":["../../../src/components/UserManagement.tsx"],"sourcesContent":["import React, {\n lazy,\n Suspense,\n useImperativeHandle,\n useState,\n useEffect,\n} from 'react';\nimport Context from '../hooks/Context';\nimport { UserManagementProps } from '../types';\nimport withPropsMapping from './withPropsMapping';\n\n// web-component code uses browser API, but can be used in SSR apps, hence the lazy loading\nconst UserManagementWC = lazy(async () => {\n await import('@descope/user-management-widget');\n\n return {\n default: withPropsMapping(\n React.forwardRef<HTMLElement>((props, ref) => (\n\t<descope-user-management-widget ref={ref} {...props} />\n )),\n ),\n };\n});\n\nconst UserManagement = React.forwardRef<HTMLElement, UserManagementProps>(\n (\n { logger, tenant, theme, locale, debug, widgetId, styleId, onReady },\n ref,\n ) => {\n const [innerRef, setInnerRef] = useState(null);\n\n useImperativeHandle(ref, () => innerRef);\n\n const { projectId, baseUrl, baseStaticUrl, baseCdnUrl, refreshCookieName } =\n React.useContext(Context);\n\n useEffect(() => {\n const ele = innerRef;\n if (onReady) ele?.addEventListener('ready', onReady);\n\n return () => {\n if (onReady) ele?.removeEventListener('ready', onReady);\n };\n }, [innerRef, onReady]);\n\n return (\n\t<Suspense fallback={null}>\n\t\t<UserManagementWC\n projectId={projectId}\n widgetId={widgetId}\n tenant={tenant}\n baseUrl={baseUrl}\n baseStaticUrl={baseStaticUrl}\n baseCdnUrl={baseCdnUrl}\n ref={setInnerRef}\n {...{\n // attributes\n 'theme.attr': theme,\n 'locale.attr': locale,\n 'debug.attr': debug,\n 'styleId.attr': styleId,\n 'refreshCookieName.attr': refreshCookieName,\n // props\n 'logger.prop': logger,\n }}\n />\n\t</Suspense>\n );\n },\n);\n\nexport default UserManagement;\n"],"names":["UserManagementWC","lazy","async","import","default","withPropsMapping","React","forwardRef","props","ref","createElement","Object","assign","UserManagement","logger","tenant","theme","locale","debug","widgetId","styleId","onReady","innerRef","setInnerRef","useState","useImperativeHandle","projectId","baseUrl","baseStaticUrl","baseCdnUrl","refreshCookieName","useContext","Context","useEffect","ele","addEventListener","removeEventListener","Suspense","fallback"],"mappings":"kLAYA,MAAMA,EAAmBC,GAAKC,gBACtBC,OAAO,mCAEN,CACLC,QAASC,EACPC,EAAMC,YAAwB,CAACC,EAAOC,IAC3CH,EAAgCI,cAAA,iCAAAC,OAAAC,OAAA,CAAAH,IAAKA,GAASD,WAMzCK,EAAiBP,EAAMC,YAC3B,EACIO,SAAQC,SAAQC,QAAOC,SAAQC,QAAOC,WAAUC,UAASC,WAC3DZ,KAEA,MAAOa,EAAUC,GAAeC,EAAS,MAEzCC,EAAoBhB,GAAK,IAAMa,IAE/B,MAAMI,UAAEA,EAASC,QAAEA,EAAOC,cAAEA,EAAaC,WAAEA,EAAUC,kBAAEA,GACrDxB,EAAMyB,WAAWC,GAWnB,OATAC,GAAU,KACR,MAAMC,EAAMZ,EAGZ,OAFID,IAASa,SAAAA,EAAKC,iBAAiB,QAASd,IAErC,KACDA,IAASa,SAAAA,EAAKE,oBAAoB,QAASf,GAAQ,CACxD,GACA,CAACC,EAAUD,IAGjBf,EAACI,cAAA2B,EAAS,CAAAC,SAAU,MACnBhC,EAAAI,cAACV,EAAgB,CACT0B,UAAWA,EACXP,SAAUA,EACVJ,OAAQA,EACRY,QAASA,EACTC,cAAeA,EACfC,WAAYA,EACZpB,IAAKc,EAGH,aAAcP,EACd,cAAeC,EACf,aAAcC,EACd,eAAgBE,EAChB,yBAA0BU,EAE1B,cAAehB,IAIrB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e,{lazy as t,useState as r,useImperativeHandle as o,useCallback as
|
|
1
|
+
import e,{lazy as t,useState as r,useImperativeHandle as o,useCallback as a,useEffect as s,Suspense as l}from"react";import n from"../hooks/Context.js";import d from"./withPropsMapping/index.js";const i=t((async()=>(await import("@descope/user-profile-widget"),{default:d(e.forwardRef(((t,r)=>e.createElement("descope-user-profile-widget",Object.assign({ref:r},t)))))}))),c=e.forwardRef((({logger:t,theme:d,locale:c,debug:u,widgetId:f,onLogout:m,styleId:p,onReady:g},b)=>{const[w,I]=r(null);o(b,(()=>w));const{projectId:h,baseUrl:y,baseStaticUrl:E,baseCdnUrl:U,refreshCookieName:v,setSession:C,setUser:j,setIsAuthenticated:L}=e.useContext(n),k=a((e=>{m&&m(e),L(!1),C(""),j(null)}),[m,C,L,j]);return s((()=>{if(w)return w.addEventListener("logout",k),()=>w.removeEventListener("logout",k)}),[w,k]),s((()=>{const e=w;return g&&(null==e||e.addEventListener("ready",g)),()=>{g&&(null==e||e.removeEventListener("ready",g))}}),[w,g]),e.createElement(l,{fallback:null},e.createElement(i,{projectId:h,widgetId:f,baseUrl:y,baseStaticUrl:E,baseCdnUrl:U,styleId:p,ref:I,"theme.attr":d,"locale.attr":c,"debug.attr":u,"styleId.attr":p,"refreshCookieName.attr":v,"logger.prop":t}))}));export{c as default};
|
|
2
2
|
//# sourceMappingURL=UserProfile.js.map
|