@descope/react-sdk 0.0.0-next-79d63636-20260624 → 0.0.0-next-94de8ba2-20260626
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/dist/cjs/components/OutboundApplications.js +1 -1
- package/dist/cjs/components/OutboundApplications.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/OutboundApplications.js +1 -1
- package/dist/esm/components/OutboundApplications.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/index.d.ts +18 -0
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/dist/types/components/AccessKeyManagement.d.ts +2 -0
- package/dist/types/components/ApplicationsPortal.d.ts +2 -0
- package/dist/types/components/AuditManagement.d.ts +2 -0
- package/dist/types/components/OutboundApplications.d.ts +2 -0
- package/dist/types/components/RoleManagement.d.ts +2 -0
- package/dist/types/components/TenantProfile.d.ts +2 -0
- package/dist/types/components/UserManagement.d.ts +2 -0
- package/dist/types/components/UserProfile.d.ts +2 -0
- package/dist/types/types.d.ts +2 -0
- package/package.json +13 -13
|
@@ -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/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:
|
|
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:n,styleId:u,onReady:i,client:c,form:f},p)=>{const[b,g]=e.useState(null);e.useImperativeHandle(p,(()=>b));const{projectId:m,baseUrl:w,baseStaticUrl:y,baseCdnUrl:v,refreshCookieName:I}=l.default.useContext(t.default);return e.useEffect((()=>{const e=b;return i&&(null==e||e.addEventListener("ready",i)),()=>{i&&(null==e||e.removeEventListener("ready",i))}}),[b,i]),l.default.createElement(e.Suspense,{fallback:null},l.default.createElement(d,{ref:g,projectId:m,widgetId:n,baseUrl:w,baseStaticUrl:y,baseCdnUrl:v,"theme.attr":a,"locale.attr":o,"debug.attr":s,"styleId.attr":u,"refreshCookieName.attr":I,"client.attr":c,"form.attr":f,"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\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
|
|
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>(\n (\n { logger, theme, locale, debug, widgetId, styleId, onReady, client, form },\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<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 'client.attr': client,\n 'form.attr': form,\n // props\n 'logger.prop': logger,\n }}\n />\n\t</Suspense>\n );\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","client","form","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,EAAKF,QAACG,YAIjC,EACIO,SAAQC,QAAOC,SAAQC,QAAOC,WAAUC,UAASC,UAASC,SAAQC,QACpEb,KAEA,MAAOc,EAAUC,GAAeC,EAAQA,SAAC,MAEzCC,sBAAoBjB,GAAK,IAAMc,IAE/B,MAAMI,UAAEA,EAASC,QAAEA,EAAOC,cAAEA,EAAaC,WAAEA,EAAUC,kBAAEA,GACrDzB,EAAKF,QAAC4B,WAAWC,EAAAA,SAWnB,OATAC,EAAAA,WAAU,KACR,MAAMC,EAAMZ,EAGZ,OAFIH,IAASe,SAAAA,EAAKC,iBAAiB,QAAShB,IAErC,KACDA,IAASe,SAAAA,EAAKE,oBAAoB,QAASjB,GAAQ,CACxD,GACA,CAACG,EAAUH,IAGjBd,EAACF,QAAAM,cAAA4B,EAAQA,SAAC,CAAAC,SAAU,MACnBjC,EAACF,QAAAM,cAAAV,EACO,CAAAS,IAAKe,EACLG,UAAWA,EACXT,SAAUA,EACVU,QAASA,EACTC,cAAeA,EACfC,WAAYA,EAGV,aAAcf,EACd,cAAeC,EACf,aAAcC,EACd,eAAgBE,EAChB,yBAA0BY,EAC1B,cAAeV,EACf,YAAaC,EAEb,cAAeR,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,locale:d,debug:s,widgetId:o,styleId:u,tenant:f,onReady:i},
|
|
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,client:c,form:p},g)=>{const[m,b]=e.useState(null);e.useImperativeHandle(g,(()=>m));const{projectId:y,baseUrl:w,baseStaticUrl:I,baseCdnUrl:v,refreshCookieName:h}=l.default.useContext(t.default);return e.useEffect((()=>{const e=m;return i&&(null==e||e.addEventListener("ready",i)),()=>{i&&(null==e||e.removeEventListener("ready",i))}}),[m,i]),l.default.createElement(e.Suspense,{fallback:null},l.default.createElement(n,{projectId:y,widgetId:o,baseUrl:w,baseStaticUrl:I,baseCdnUrl:v,styleId:u,tenant:f,ref:b,"theme.attr":a,"locale.attr":d,"debug.attr":s,"styleId.attr":u,"tenant.attr":f,"refreshCookieName.attr":h,"client.attr":c,"form.attr":p,"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 (\n {
|
|
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 {\n logger,\n theme,\n locale,\n debug,\n widgetId,\n styleId,\n tenant,\n onReady,\n client,\n form,\n },\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 'client.attr': client,\n 'form.attr': form,\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","client","form","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,EAAKF,QAACG,YAC1B,EAEIO,SACAC,QACAC,SACAC,QACAC,WACAC,UACAC,SACAC,UACAC,SACAC,QAEFd,KAEA,MAAOe,EAAUC,GAAeC,EAAQA,SAAC,MAEzCC,sBAAoBlB,GAAK,IAAMe,IAE/B,MAAMI,UAAEA,EAASC,QAAEA,EAAOC,cAAEA,EAAaC,WAAEA,EAAUC,kBAAEA,GACrD1B,EAAKF,QAAC6B,WAAWC,EAAAA,SAWnB,OATAC,EAAAA,WAAU,KACR,MAAMC,EAAMZ,EAGZ,OAFIH,IAASe,SAAAA,EAAKC,iBAAiB,QAAShB,IAErC,KACDA,IAASe,SAAAA,EAAKE,oBAAoB,QAASjB,GAAQ,CACxD,GACA,CAACG,EAAUH,IAGjBf,EAACF,QAAAM,cAAA6B,EAAQA,SAAC,CAAAC,SAAU,MACnBlC,UAAAI,cAACV,EACO,CAAA4B,UAAWA,EACXV,SAAUA,EACVW,QAASA,EACTC,cAAeA,EACfC,WAAYA,EACZZ,QAASA,EACTC,OAAQA,EACRX,IAAKgB,EAEH,aAAcV,EACd,cAAeC,EACf,aAAcC,EACd,eAAgBE,EAChB,cAAeC,EACf,yBAA0BY,EAC1B,cAAeV,EACf,YAAaC,EACb,cAAeT,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/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:
|
|
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:o,widgetId:u,styleId:f,onReady:c,client:i,form:m},p)=>{const[g,b]=e.useState(null);e.useImperativeHandle(p,(()=>g));const{projectId:w,baseUrl:y,baseStaticUrl:v,baseCdnUrl:I,refreshCookieName:h}=l.default.useContext(t.default);return e.useEffect((()=>{const e=g;return c&&(null==e||e.addEventListener("ready",c)),()=>{c&&(null==e||e.removeEventListener("ready",c))}}),[g,c]),l.default.createElement(e.Suspense,{fallback:null},l.default.createElement(n,{projectId:w,widgetId:u,tenant:a,baseUrl:y,baseStaticUrl:v,baseCdnUrl:I,ref:b,"theme.attr":d,"locale.attr":s,"debug.attr":o,"styleId.attr":f,"refreshCookieName.attr":h,"client.attr":i,"form.attr":m,"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 (\n {
|
|
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 {\n logger,\n tenant,\n theme,\n locale,\n debug,\n widgetId,\n styleId,\n onReady,\n client,\n form,\n },\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 'client.attr': client,\n 'form.attr': form,\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","client","form","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,EAAKF,QAACG,YAC3B,EAEIO,SACAC,SACAC,QACAC,SACAC,QACAC,WACAC,UACAC,UACAC,SACAC,QAEFd,KAEA,MAAOe,EAAUC,GAAeC,EAAQA,SAAC,MAEzCC,sBAAoBlB,GAAK,IAAMe,IAE/B,MAAMI,UAAEA,EAASC,QAAEA,EAAOC,cAAEA,EAAaC,WAAEA,EAAUC,kBAAEA,GACrD1B,EAAKF,QAAC6B,WAAWC,EAAAA,SAWnB,OATAC,EAAAA,WAAU,KACR,MAAMC,EAAMZ,EAGZ,OAFIH,IAASe,SAAAA,EAAKC,iBAAiB,QAAShB,IAErC,KACDA,IAASe,SAAAA,EAAKE,oBAAoB,QAASjB,GAAQ,CACxD,GACA,CAACG,EAAUH,IAGjBf,EAACF,QAAAM,cAAA6B,EAAQA,SAAC,CAAAC,SAAU,MACnBlC,EAAAF,QAAAM,cAACV,EAAgB,CACT4B,UAAWA,EACXT,SAAUA,EACVJ,OAAQA,EACRc,QAASA,EACTC,cAAeA,EACfC,WAAYA,EACZtB,IAAKgB,EAGH,aAAcT,EACd,cAAeC,EACf,aAAcC,EACd,eAAgBE,EAChB,yBAA0BY,EAC1B,cAAeV,EACf,YAAaC,EAEb,cAAeT,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 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:
|
|
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:n,onLogout:u,styleId:i,onReady:f,client:c,form:p},g)=>{const[m,b]=e.useState(null);e.useImperativeHandle(g,(()=>m));const{projectId:v,baseUrl:y,baseStaticUrl:E,baseCdnUrl:I,refreshCookieName:w,setSession:h,setUser:C,setIsAuthenticated:U}=l.default.useContext(t.default),j=e.useCallback((e=>{u&&u(e),U(!1),h(""),C(null)}),[u,h,U,C]);return e.useEffect((()=>{if(m)return m.addEventListener("logout",j),()=>m.removeEventListener("logout",j)}),[m,j]),e.useEffect((()=>{const e=m;return f&&(null==e||e.addEventListener("ready",f)),()=>{f&&(null==e||e.removeEventListener("ready",f))}}),[m,f]),l.default.createElement(e.Suspense,{fallback:null},l.default.createElement(s,{projectId:v,widgetId:n,baseUrl:y,baseStaticUrl:E,baseCdnUrl:I,styleId:i,ref:b,"theme.attr":a,"locale.attr":o,"debug.attr":d,"styleId.attr":i,"refreshCookieName.attr":w,"client.attr":c,"form.attr":p,"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 (\n {
|
|
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 {\n logger,\n theme,\n locale,\n debug,\n widgetId,\n onLogout,\n styleId,\n onReady,\n client,\n form,\n },\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 'client.attr': client,\n 'form.attr': form,\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","client","form","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,EAAKF,QAACG,YACxB,EAEIO,SACAC,QACAC,SACAC,QACAC,WACAC,WACAC,UACAC,UACAC,SACAC,QAEFd,KAEA,MAAOe,EAAUC,GAAeC,EAAQA,SAAC,MAEzCC,sBAAoBlB,GAAK,IAAMe,IAE/B,MAAMI,UACJA,EAASC,QACTA,EAAOC,cACPA,EAAaC,WACbA,EAAUC,kBACVA,EAAiBC,WACjBA,EAAUC,QACVA,EAAOC,mBACPA,GACE7B,EAAKF,QAACgC,WAAWC,EAAOjC,SAEtBkC,EAAeC,eAClBC,IACKrB,GACFA,EAASqB,GAGXL,GAAmB,GACnBF,EAAW,IACXC,EAAQ,KAAK,GAEf,CAACf,EAAUc,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,OAFIH,IAASuB,SAAAA,EAAKF,iBAAiB,QAASrB,IAErC,KACDA,IAASuB,SAAAA,EAAKD,oBAAoB,QAAStB,GAAQ,CACxD,GACA,CAACG,EAAUH,IAGjBf,EAACF,QAAAM,cAAAmC,EAAQA,SAAC,CAAAC,SAAU,MACnBxC,EAAAF,QAAAM,cAACV,EAAa,CACN4B,UAAWA,EACXV,SAAUA,EACVW,QAASA,EACTC,cAAeA,EACfC,WAAYA,EACZX,QAASA,EACTX,IAAKgB,EAGH,aAAcV,EACd,cAAeC,EACf,aAAcC,EACd,eAAgBG,EAChB,yBAA0BY,EAC1B,cAAeV,EACf,YAAaC,EAEb,cAAeT,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":"0.0.0-next-
|
|
1
|
+
"use strict";const e="undefined"!=typeof window;exports.IS_BROWSER=e,exports.baseHeaders={"x-descope-sdk-name":"react","x-descope-sdk-version":"0.0.0-next-94de8ba2-20260626"};
|
|
2
2
|
//# sourceMappingURL=constants.js.map
|
|
@@ -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 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},
|
|
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:f,client:u,form:b},g)=>{const[w,h]=r(null);a(g,(()=>w));const{projectId:y,baseUrl:C,baseStaticUrl:I,baseCdnUrl:U,refreshCookieName:j}=e.useContext(n);return o((()=>{const e=w;return f&&(null==e||e.addEventListener("ready",f)),()=>{f&&(null==e||e.removeEventListener("ready",f))}}),[w,f]),e.createElement(l,{fallback:null},e.createElement(d,{ref:h,projectId:y,widgetId:p,baseUrl:C,baseStaticUrl:I,baseCdnUrl:U,"theme.attr":s,"locale.attr":i,"debug.attr":c,"styleId.attr":m,"refreshCookieName.attr":j,"client.attr":u,"form.attr":b,"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\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
|
|
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>(\n (\n { logger, theme, locale, debug, widgetId, styleId, onReady, client, form },\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<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 'client.attr': client,\n 'form.attr': form,\n // props\n 'logger.prop': logger,\n }}\n />\n\t</Suspense>\n );\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","client","form","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,YAIjC,EACIO,SAAQC,QAAOC,SAAQC,QAAOC,WAAUC,UAASC,UAASC,SAAQC,QACpEb,KAEA,MAAOc,EAAUC,GAAeC,EAAS,MAEzCC,EAAoBjB,GAAK,IAAMc,IAE/B,MAAMI,UAAEA,EAASC,QAAEA,EAAOC,cAAEA,EAAaC,WAAEA,EAAUC,kBAAEA,GACrDzB,EAAM0B,WAAWC,GAWnB,OATAC,GAAU,KACR,MAAMC,EAAMZ,EAGZ,OAFIH,IAASe,SAAAA,EAAKC,iBAAiB,QAAShB,IAErC,KACDA,IAASe,SAAAA,EAAKE,oBAAoB,QAASjB,GAAQ,CACxD,GACA,CAACG,EAAUH,IAGjBd,EAACI,cAAA4B,EAAS,CAAAC,SAAU,MACnBjC,EAACI,cAAAV,EACO,CAAAS,IAAKe,EACLG,UAAWA,EACXT,SAAUA,EACVU,QAASA,EACTC,cAAeA,EACfC,WAAYA,EAGV,aAAcf,EACd,cAAeC,EACf,aAAcC,EACd,eAAgBE,EAChB,yBAA0BY,EAC1B,cAAeV,EACf,YAAaC,EAEb,cAAeR,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,locale:i,debug:c,widgetId:f,styleId:
|
|
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:m,tenant:p,onReady:g,client:u,form:b},w)=>{const[y,I]=r(null);a(w,(()=>y));const{projectId:h,baseUrl:C,baseStaticUrl:U,baseCdnUrl:j,refreshCookieName:E}=e.useContext(l);return n((()=>{const e=y;return g&&(null==e||e.addEventListener("ready",g)),()=>{g&&(null==e||e.removeEventListener("ready",g))}}),[y,g]),e.createElement(o,{fallback:null},e.createElement(d,{projectId:h,widgetId:f,baseUrl:C,baseStaticUrl:U,baseCdnUrl:j,styleId:m,tenant:p,ref:I,"theme.attr":s,"locale.attr":i,"debug.attr":c,"styleId.attr":m,"tenant.attr":p,"refreshCookieName.attr":E,"client.attr":u,"form.attr":b,"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 (\n {
|
|
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 {\n logger,\n theme,\n locale,\n debug,\n widgetId,\n styleId,\n tenant,\n onReady,\n client,\n form,\n },\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 'client.attr': client,\n 'form.attr': form,\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","client","form","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,EAEIO,SACAC,QACAC,SACAC,QACAC,WACAC,UACAC,SACAC,UACAC,SACAC,QAEFd,KAEA,MAAOe,EAAUC,GAAeC,EAAS,MAEzCC,EAAoBlB,GAAK,IAAMe,IAE/B,MAAMI,UAAEA,EAASC,QAAEA,EAAOC,cAAEA,EAAaC,WAAEA,EAAUC,kBAAEA,GACrD1B,EAAM2B,WAAWC,GAWnB,OATAC,GAAU,KACR,MAAMC,EAAMZ,EAGZ,OAFIH,IAASe,SAAAA,EAAKC,iBAAiB,QAAShB,IAErC,KACDA,IAASe,SAAAA,EAAKE,oBAAoB,QAASjB,GAAQ,CACxD,GACA,CAACG,EAAUH,IAGjBf,EAACI,cAAA6B,EAAS,CAAAC,SAAU,MACnBlC,EAAAI,cAACV,EACO,CAAA4B,UAAWA,EACXV,SAAUA,EACVW,QAASA,EACTC,cAAeA,EACfC,WAAYA,EACZZ,QAASA,EACTC,OAAQA,EACRX,IAAKgB,EAEH,aAAcV,EACd,cAAeC,EACf,aAAcC,EACd,eAAgBE,EAChB,cAAeC,EACf,yBAA0BY,EAC1B,cAAeV,EACf,YAAaC,EACb,cAAeT,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/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},
|
|
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,client:u,form:b},w)=>{const[h,y]=r(null);a(w,(()=>h));const{projectId:C,baseUrl:I,baseStaticUrl:U,baseCdnUrl:j,refreshCookieName:E}=e.useContext(l);return n((()=>{const e=h;return p&&(null==e||e.addEventListener("ready",p)),()=>{p&&(null==e||e.removeEventListener("ready",p))}}),[h,p]),e.createElement(o,{fallback:null},e.createElement(d,{projectId:C,widgetId:f,tenant:s,baseUrl:I,baseStaticUrl:U,baseCdnUrl:j,ref:y,"theme.attr":c,"locale.attr":i,"debug.attr":m,"styleId.attr":g,"refreshCookieName.attr":E,"client.attr":u,"form.attr":b,"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 (\n {
|
|
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 {\n logger,\n tenant,\n theme,\n locale,\n debug,\n widgetId,\n styleId,\n onReady,\n client,\n form,\n },\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 'client.attr': client,\n 'form.attr': form,\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","client","form","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,EAEIO,SACAC,SACAC,QACAC,SACAC,QACAC,WACAC,UACAC,UACAC,SACAC,QAEFd,KAEA,MAAOe,EAAUC,GAAeC,EAAS,MAEzCC,EAAoBlB,GAAK,IAAMe,IAE/B,MAAMI,UAAEA,EAASC,QAAEA,EAAOC,cAAEA,EAAaC,WAAEA,EAAUC,kBAAEA,GACrD1B,EAAM2B,WAAWC,GAWnB,OATAC,GAAU,KACR,MAAMC,EAAMZ,EAGZ,OAFIH,IAASe,SAAAA,EAAKC,iBAAiB,QAAShB,IAErC,KACDA,IAASe,SAAAA,EAAKE,oBAAoB,QAASjB,GAAQ,CACxD,GACA,CAACG,EAAUH,IAGjBf,EAACI,cAAA6B,EAAS,CAAAC,SAAU,MACnBlC,EAAAI,cAACV,EAAgB,CACT4B,UAAWA,EACXT,SAAUA,EACVJ,OAAQA,EACRc,QAASA,EACTC,cAAeA,EACfC,WAAYA,EACZtB,IAAKgB,EAGH,aAAcT,EACd,cAAeC,EACf,aAAcC,EACd,eAAgBE,EAChB,yBAA0BY,EAC1B,cAAeV,EACf,YAAaC,EAEb,cAAeT,IAIrB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
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:
|
|
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:f,widgetId:u,onLogout:m,styleId:p,onReady:g,client:b,form:w},I)=>{const[h,y]=r(null);o(I,(()=>h));const{projectId:E,baseUrl:U,baseStaticUrl:v,baseCdnUrl:C,refreshCookieName:j,setSession:L,setUser:k,setIsAuthenticated:x}=e.useContext(n),R=a((e=>{m&&m(e),x(!1),L(""),k(null)}),[m,L,x,k]);return s((()=>{if(h)return h.addEventListener("logout",R),()=>h.removeEventListener("logout",R)}),[h,R]),s((()=>{const e=h;return g&&(null==e||e.addEventListener("ready",g)),()=>{g&&(null==e||e.removeEventListener("ready",g))}}),[h,g]),e.createElement(l,{fallback:null},e.createElement(i,{projectId:E,widgetId:u,baseUrl:U,baseStaticUrl:v,baseCdnUrl:C,styleId:p,ref:y,"theme.attr":d,"locale.attr":c,"debug.attr":f,"styleId.attr":p,"refreshCookieName.attr":j,"client.attr":b,"form.attr":w,"logger.prop":t}))}));export{c as default};
|
|
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 (\n {
|
|
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 {\n logger,\n theme,\n locale,\n debug,\n widgetId,\n onLogout,\n styleId,\n onReady,\n client,\n form,\n },\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 'client.attr': client,\n 'form.attr': form,\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","client","form","innerRef","setInnerRef","useState","useImperativeHandle","projectId","baseUrl","baseStaticUrl","baseCdnUrl","refreshCookieName","setSession","setUser","setIsAuthenticated","useContext","Context","handleLogout","useCallback","e","useEffect","addEventListener","removeEventListener","ele","Suspense","fallback"],"mappings":"mMAaA,MAAMA,EAAgBC,GAAKC,gBACnBC,OAAO,gCAEN,CACLC,QAASC,EACPC,EAAMC,YAAwB,CAACC,EAAOC,IAC3CH,EAA6BI,cAAA,8BAAAC,OAAAC,OAAA,CAAAH,IAAKA,GAASD,WAMtCK,EAAcP,EAAMC,YACxB,EAEIO,SACAC,QACAC,SACAC,QACAC,WACAC,WACAC,UACAC,UACAC,SACAC,QAEFd,KAEA,MAAOe,EAAUC,GAAeC,EAAS,MAEzCC,EAAoBlB,GAAK,IAAMe,IAE/B,MAAMI,UACJA,EAASC,QACTA,EAAOC,cACPA,EAAaC,WACbA,EAAUC,kBACVA,EAAiBC,WACjBA,EAAUC,QACVA,EAAOC,mBACPA,GACE7B,EAAM8B,WAAWC,GAEfC,EAAeC,GAClBC,IACKrB,GACFA,EAASqB,GAGXL,GAAmB,GACnBF,EAAW,IACXC,EAAQ,KAAK,GAEf,CAACf,EAAUc,EAAYE,EAAoBD,IAoB7C,OAjBAO,GAAU,KACR,GAAIjB,EAEF,OADAA,EAASkB,iBAAiB,SAAUJ,GAC7B,IAAMd,EAASmB,oBAAoB,SAAUL,EAEtC,GACf,CAACd,EAAUc,IAEdG,GAAU,KACR,MAAMG,EAAMpB,EAGZ,OAFIH,IAASuB,SAAAA,EAAKF,iBAAiB,QAASrB,IAErC,KACDA,IAASuB,SAAAA,EAAKD,oBAAoB,QAAStB,GAAQ,CACxD,GACA,CAACG,EAAUH,IAGjBf,EAACI,cAAAmC,EAAS,CAAAC,SAAU,MACnBxC,EAAAI,cAACV,EAAa,CACN4B,UAAWA,EACXV,SAAUA,EACVW,QAASA,EACTC,cAAeA,EACfC,WAAYA,EACZX,QAASA,EACTX,IAAKgB,EAGH,aAAcV,EACd,cAAeC,EACf,aAAcC,EACd,eAAgBG,EAChB,yBAA0BY,EAC1B,cAAeV,EACf,YAAaC,EAEb,cAAeT,IAIrB"}
|
package/dist/esm/constants.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e={"x-descope-sdk-name":"react","x-descope-sdk-version":"0.0.0-next-
|
|
1
|
+
const e={"x-descope-sdk-name":"react","x-descope-sdk-version":"0.0.0-next-94de8ba2-20260626"},d="undefined"!=typeof window;export{d as IS_BROWSER,e as baseHeaders};
|
|
2
2
|
//# sourceMappingURL=constants.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -2411,6 +2411,8 @@ type WidgetProps = {
|
|
|
2411
2411
|
debug?: boolean;
|
|
2412
2412
|
styleId?: string;
|
|
2413
2413
|
onReady?: CustomEventCb<{}>;
|
|
2414
|
+
form?: Record<string, any>;
|
|
2415
|
+
client?: Record<string, any>;
|
|
2414
2416
|
};
|
|
2415
2417
|
type FlowResponse = Awaited<ReturnType<Sdk['flow']['next']>>;
|
|
2416
2418
|
type ErrorResponse = Required<FlowResponse>['error'];
|
|
@@ -2510,6 +2512,8 @@ declare const AccessKeyManagement: React.ForwardRefExoticComponent<{
|
|
|
2510
2512
|
debug?: boolean;
|
|
2511
2513
|
styleId?: string;
|
|
2512
2514
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
2515
|
+
form?: Record<string, any>;
|
|
2516
|
+
client?: Record<string, any>;
|
|
2513
2517
|
} & React.RefAttributes<HTMLElement>>;
|
|
2514
2518
|
|
|
2515
2519
|
declare const ApplicationsPortal: React.ForwardRefExoticComponent<Omit<{
|
|
@@ -2521,6 +2525,8 @@ declare const ApplicationsPortal: React.ForwardRefExoticComponent<Omit<{
|
|
|
2521
2525
|
debug?: boolean;
|
|
2522
2526
|
styleId?: string;
|
|
2523
2527
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
2528
|
+
form?: Record<string, any>;
|
|
2529
|
+
client?: Record<string, any>;
|
|
2524
2530
|
}, "tenant"> & {
|
|
2525
2531
|
onLogout?: (e: CustomEvent<any>) => void;
|
|
2526
2532
|
} & React.RefAttributes<HTMLElement>>;
|
|
@@ -2534,6 +2540,8 @@ declare const AuditManagement: React.ForwardRefExoticComponent<{
|
|
|
2534
2540
|
debug?: boolean;
|
|
2535
2541
|
styleId?: string;
|
|
2536
2542
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
2543
|
+
form?: Record<string, any>;
|
|
2544
|
+
client?: Record<string, any>;
|
|
2537
2545
|
} & React.RefAttributes<HTMLElement>>;
|
|
2538
2546
|
|
|
2539
2547
|
declare const OutboundApplications: React.ForwardRefExoticComponent<{
|
|
@@ -2545,6 +2553,8 @@ declare const OutboundApplications: React.ForwardRefExoticComponent<{
|
|
|
2545
2553
|
debug?: boolean;
|
|
2546
2554
|
styleId?: string;
|
|
2547
2555
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
2556
|
+
form?: Record<string, any>;
|
|
2557
|
+
client?: Record<string, any>;
|
|
2548
2558
|
} & React.RefAttributes<HTMLElement>>;
|
|
2549
2559
|
|
|
2550
2560
|
declare const RoleManagement: React.ForwardRefExoticComponent<{
|
|
@@ -2556,6 +2566,8 @@ declare const RoleManagement: React.ForwardRefExoticComponent<{
|
|
|
2556
2566
|
debug?: boolean;
|
|
2557
2567
|
styleId?: string;
|
|
2558
2568
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
2569
|
+
form?: Record<string, any>;
|
|
2570
|
+
client?: Record<string, any>;
|
|
2559
2571
|
} & React.RefAttributes<HTMLElement>>;
|
|
2560
2572
|
|
|
2561
2573
|
declare const TenantProfile: React.ForwardRefExoticComponent<{
|
|
@@ -2567,6 +2579,8 @@ declare const TenantProfile: React.ForwardRefExoticComponent<{
|
|
|
2567
2579
|
debug?: boolean;
|
|
2568
2580
|
styleId?: string;
|
|
2569
2581
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
2582
|
+
form?: Record<string, any>;
|
|
2583
|
+
client?: Record<string, any>;
|
|
2570
2584
|
} & React.RefAttributes<HTMLElement>>;
|
|
2571
2585
|
|
|
2572
2586
|
declare const UserManagement: React.ForwardRefExoticComponent<{
|
|
@@ -2578,6 +2592,8 @@ declare const UserManagement: React.ForwardRefExoticComponent<{
|
|
|
2578
2592
|
debug?: boolean;
|
|
2579
2593
|
styleId?: string;
|
|
2580
2594
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
2595
|
+
form?: Record<string, any>;
|
|
2596
|
+
client?: Record<string, any>;
|
|
2581
2597
|
} & React.RefAttributes<HTMLElement>>;
|
|
2582
2598
|
|
|
2583
2599
|
declare const UserProfile: React.ForwardRefExoticComponent<Omit<{
|
|
@@ -2589,6 +2605,8 @@ declare const UserProfile: React.ForwardRefExoticComponent<Omit<{
|
|
|
2589
2605
|
debug?: boolean;
|
|
2590
2606
|
styleId?: string;
|
|
2591
2607
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
2608
|
+
form?: Record<string, any>;
|
|
2609
|
+
client?: Record<string, any>;
|
|
2592
2610
|
}, "tenant"> & {
|
|
2593
2611
|
onLogout?: (e: CustomEvent<any>) => void;
|
|
2594
2612
|
} & React.RefAttributes<HTMLElement>>;
|