@descope/web-component
Advanced tools
Comparing version 3.32.5 to 3.32.6
@@ -1,1 +0,1 @@ | ||
"use strict";var t=require("tslib"),e=require("@descope/sdk-helpers"),i=require("@descope/sdk-mixins/static-resources-mixin"),r=require("@descope/sdk-mixins/theme-mixin"),s=require("@descope/web-js-sdk"),o=require("../constants/index.js"),n=require("../helpers/helpers.js"),a=require("../helpers/state.js");require("@descope/escape-markdown"),require("../helpers/webauthn.js");var l,u,d,c,h,g,f,v,p,_,b,m,w,C,F,A,P,x,k,E,I,y=require("../helpers/flowInputs.js"),G=require("../mixins/formMountMixin.js"),j=require("./initTemplate.js"),L=require("../constants/content.js"),S=require("../constants/general.js");function U(t){return Object.freeze({__proto__:null,default:t})}const M=e.compose(r.themeMixin,i.staticResourcesMixin,G.formMountMixin)(HTMLElement);class O extends M{static get observedAttributes(){return["project-id","flow-id","base-url","tenant","locale","debug","storage-prefix","preview","redirect-url","auto-focus","store-last-authenticated-user","keep-last-authenticated-user-after-logout","validate-on-blur","style-id"]}constructor(e){super(),l.add(this),d.set(this,!1),this.flowStatus="initial",this.loggerWrapper={error:(e,i="")=>{this.logger.error(e,i,new Error),t.__classPrivateFieldGet(this,l,"m",E).call(this,e,i)},warn:(t,e="")=>{this.logger.warn(t,e)},info:(t,e="",i={})=>{this.logger.info(t,e,i)},debug:(t,e="")=>{this.logger.debug(t,e)}},c.set(this,new a),h.set(this,new a),g.set(this,{}),this.getComponentsContext=()=>t.__classPrivateFieldGet(this,g,"f"),this.nextRequestStatus=new a({isLoading:!1}),f.set(this,void 0),v.set(this,{popstate:t.__classPrivateFieldGet(this,l,"m",m).bind(this),componentsContext:t.__classPrivateFieldGet(this,l,"m",P).bind(this)}),p.set(this,void 0),this.getConfig=n.withMemCache((()=>t.__awaiter(this,void 0,void 0,(function*(){try{const{body:t,headers:e}=yield this.fetchStaticResource(L.CONFIG_FILENAME,"json");return{projectConfig:t,executionContext:{geo:e["x-geo"]}}}catch(t){return{isMissingConfig:!0}}})))),t.__classPrivateFieldSet(this,p,e,"f"),t.__classPrivateFieldGet(this,l,"m",_).call(this)}get flowId(){return this.getAttribute("flow-id")}get client(){try{return JSON.parse(this.getAttribute("client"))||{}}catch(t){return{}}}get tenantId(){return this.getAttribute("tenant")||void 0}get redirectUrl(){return this.getAttribute("redirect-url")||void 0}get debug(){return"true"===this.getAttribute("debug")}get locale(){return this.getAttribute("locale")||void 0}get autoFocus(){var t;const e=null!==(t=this.getAttribute("auto-focus"))&&void 0!==t?t:"true";return"skipFirstScreen"===e?e:"true"===e}get validateOnBlur(){return"true"===this.getAttribute("validate-on-blur")}get storeLastAuthenticatedUser(){var t;return"true"===(null!==(t=this.getAttribute("store-last-authenticated-user"))&&void 0!==t?t:"true")}get keepLastAuthenticatedUserAfterLogout(){return"true"===this.getAttribute("keep-last-authenticated-user-after-logout")}get storagePrefix(){return this.getAttribute("storage-prefix")||""}get preview(){return!!this.getAttribute("preview")}get formConfig(){return y.transformFlowInputFormData(this.form)}get form(){return this.getAttribute("form")}get formConfigValues(){return y.extractNestedAttribute(this.formConfig,"value")}get isRestartOnError(){return"true"===this.getAttribute("restart-on-error")}getExecutionContext(){return t.__awaiter(this,void 0,void 0,(function*(){const{executionContext:t}=yield this.getConfig();return t}))}getProjectConfig(){return t.__awaiter(this,void 0,void 0,(function*(){const{projectConfig:t}=yield this.getConfig();return t}))}getFlowConfig(){return t.__awaiter(this,void 0,void 0,(function*(){var t,e;const i=yield this.getProjectConfig(),r=(null===(t=null==i?void 0:i.flows)||void 0===t?void 0:t[this.flowId])||{};return null!==(e=r.version)&&void 0!==e||(r.version=0),r}))}getTargetLocales(){return t.__awaiter(this,void 0,void 0,(function*(){const t=yield this.getFlowConfig();return((null==t?void 0:t.targetLocales)||[]).map((t=>t.toLowerCase()))}))}getComponentsVersion(){return t.__awaiter(this,void 0,void 0,(function*(){var t,e;const i=null===(e=null===(t=yield this.getConfig())||void 0===t?void 0:t.projectConfig)||void 0===e?void 0:e.componentsVersion;return i||(this.logger.error("Did not get components version, using latest version"),"latest")}))}init(){const e=Object.create(null,{init:{get:()=>super.init}});return t.__awaiter(this,void 0,void 0,(function*(){var i;if(this.flowStatus="loading",["ready","error","success"].forEach((t=>this.addEventListener(t,(()=>{this.flowStatus=t})))),yield null===(i=e.init)||void 0===i?void 0:i.call(this),t.__classPrivateFieldGet(this,h,"f").subscribe(t.__classPrivateFieldGet(this,l,"m",k).bind(this)),t.__classPrivateFieldGet(this,h,"f").update({isDebug:this.debug}),t.__classPrivateFieldGet(this,l,"m",b).call(this),yield t.__classPrivateFieldGet(this,l,"m",F).call(this))return void this.loggerWrapper.error("This SDK version does not support your flows version","Make sure to upgrade your flows to the latest version or use an older SDK version");if((yield this.getConfig()).isMissingConfig)return void this.loggerWrapper.error("Cannot get config file","Make sure that your projectId & flowId are correct");t.__classPrivateFieldGet(this,l,"m",I).call(this);const{executionId:r,stepId:s,token:o,code:a,exchangeError:u,redirectAuthCallbackUrl:g,redirectAuthBackupCallbackUri:f,redirectAuthCodeChallenge:p,redirectAuthInitiator:_,ssoQueryParams:m}=n.handleUrlParams(this.flowId,this.loggerWrapper);window.addEventListener("popstate",t.__classPrivateFieldGet(this,v,"f").popstate),window.addEventListener("components-context",t.__classPrivateFieldGet(this,v,"f").componentsContext),t.__classPrivateFieldGet(this,c,"f").subscribe(t.__classPrivateFieldGet(this,l,"m",C).bind(this)),t.__classPrivateFieldGet(this,c,"f").update(Object.assign({projectId:this.projectId,flowId:this.flowId,baseUrl:this.baseUrl,tenant:this.tenantId,redirectUrl:this.redirectUrl,locale:this.locale,stepId:s,executionId:r,token:o,code:a,exchangeError:u,redirectAuthCallbackUrl:g,redirectAuthBackupCallbackUri:f,redirectAuthCodeChallenge:p,redirectAuthInitiator:_},m)),t.__classPrivateFieldSet(this,d,!0,"f")}))}disconnectedCallback(){t.__classPrivateFieldGet(this,c,"f").unsubscribeAll(),t.__classPrivateFieldGet(this,h,"f").unsubscribeAll(),t.__classPrivateFieldGet(this,l,"m",x).call(this),window.removeEventListener("popstate",t.__classPrivateFieldGet(this,v,"f").popstate),window.removeEventListener("components-context",t.__classPrivateFieldGet(this,v,"f").componentsContext)}attributeChangedCallback(e,i,r){if(this.shadowRoot.isConnected&&t.__classPrivateFieldGet(this,d,"f")&&i!==r&&u.observedAttributes.includes(e)){t.__classPrivateFieldGet(this,l,"m",b).call(this);const s=null===i;t.__classPrivateFieldGet(this,c,"f").update((({stepId:t,executionId:i})=>{let o=t,a=i;return s||(a=null,o=null,n.clearRunIdsFromUrl()),{[n.camelCase(e)]:r,stepId:o,executionId:a}})),t.__classPrivateFieldGet(this,h,"f").update({isDebug:this.debug})}}}u=O,d=new WeakMap,c=new WeakMap,h=new WeakMap,g=new WeakMap,f=new WeakMap,v=new WeakMap,p=new WeakMap,l=new WeakSet,_=function(){this.shadowRoot.appendChild(j.content.cloneNode(!0)),this.rootElement=this.shadowRoot.querySelector("#root")},b=function(){const t=["base-url","tenant","locale","debug","redirect-url","auto-focus","store-last-authenticated-user","keep-last-authenticated-user-after-logout","preview","storage-prefix","form","client","validate-on-blur","style-id"];u.observedAttributes.forEach((e=>{if(!t.includes(e)&&!this[n.camelCase(e)])throw Error(`${e} cannot be empty`)}))},m=function(){const{stepId:e,executionId:i}=n.getRunIdsFromUrl(this.flowId);t.__classPrivateFieldGet(this,c,"f").update({stepId:e,executionId:i})},w=function(e,i){this.sdk=s(Object.assign(Object.assign({persistTokens:!0,preview:this.preview,storagePrefix:this.storagePrefix,storeLastAuthenticatedUser:this.storeLastAuthenticatedUser,keepLastAuthenticatedUserAfterLogout:this.keepLastAuthenticatedUserAfterLogout},u.sdkConfigOverrides),{projectId:e,baseUrl:i})),["start","next"].forEach((e=>{const i=this.sdk.flow[e];this.sdk.flow[e]=(...e)=>t.__awaiter(this,void 0,void 0,(function*(){this.nextRequestStatus.update({isLoading:!0});try{return yield i(...e)}catch(t){return{error:{errorCode:S.FETCH_EXCEPTION_ERROR_CODE,errorDescription:t.toString()}}}finally{this.nextRequestStatus.update({isLoading:!1})}}))}))},C=function(e,i,r){return t.__awaiter(this,void 0,void 0,(function*(){const{projectId:i,baseUrl:s}=e;if(r("projectId")||r("baseUrl")){if(!i)return;t.__classPrivateFieldGet(this,l,"m",w).call(this,i,s)}t.__classPrivateFieldGet(this,p,"f").call(this,e)}))},F=function(){return t.__awaiter(this,void 0,void 0,(function*(){return(yield this.getConfig()).isMissingConfig&&(yield t.__classPrivateFieldGet(this,l,"m",A).call(this))}))},A=function(){return t.__awaiter(this,void 0,void 0,(function*(){const t=n.getContentUrl({projectId:this.projectId,filename:L.CONFIG_FILENAME,assetsFolder:L.PREV_VER_ASSETS_FOLDER,baseUrl:this.baseStaticUrl});try{return yield n.fetchContent(t,"json"),!0}catch(t){return!1}}))},P=function(e){t.__classPrivateFieldSet(this,g,Object.assign(Object.assign({},t.__classPrivateFieldGet(this,g,"f")),e.detail),"f")},x=function(){var e;null===(e=t.__classPrivateFieldGet(this,f,"f"))||void 0===e||e.remove(),t.__classPrivateFieldSet(this,f,null,"f")},k=function(e){return t.__awaiter(this,arguments,void 0,(function*({isDebug:e}){e?(t.__classPrivateFieldSet(this,f,document.createElement("descope-debugger"),"f"),Object.assign(t.__classPrivateFieldGet(this,f,"f").style,{position:"fixed",top:"0",right:"0",height:"100vh",width:"100vw",pointerEvents:"none",zIndex:99999}),yield Promise.resolve().then((function(){return U(require("../debugger-wc.js"))})),document.body.appendChild(t.__classPrivateFieldGet(this,f,"f"))):t.__classPrivateFieldGet(this,l,"m",x).call(this)}))},E=function(e,i){var r;e&&this.debug&&(null===(r=t.__classPrivateFieldGet(this,f,"f"))||void 0===r||r.updateData({title:e,description:i}))},I=function(){this.rootElement.onkeydown=t=>{var e,i,r;const s=!!(null===(e=this.shadowRoot.activeElement)||void 0===e?void 0:e.getAttribute("href")),n=o.ELEMENTS_TO_IGNORE_ENTER_KEY_ON.includes(null!==(r=null===(i=this.shadowRoot.activeElement)||void 0===i?void 0:i.localName)&&void 0!==r?r:"");if("Enter"!==t.key||s||n)return;t.preventDefault();const a=this.rootElement.querySelectorAll("descope-button");if(1===a.length&&"false"!==a[0].getAttribute("auto-submit"))return void a[0].click();const l=Array.from(a).filter((t=>"true"===t.getAttribute("auto-submit")));if(1===l.length)return void l[0].click();const u=Array.from(a).filter((t=>"button"===t.getAttribute("data-type")));if(1===u.length)"false"!==u[0].getAttribute("auto-submit")&&u[0].click();else if(0===u.length){const t=Array.from(a).filter((t=>"sso"===t.getAttribute("data-type")));1===t.length&&"false"!==t[0].getAttribute("auto-submit")&&t[0].click()}}},O.sdkConfigOverrides={baseHeaders:{"x-descope-sdk-name":"web-component","x-descope-sdk-version":"3.32.5"}},module.exports=O; | ||
"use strict";var t=require("tslib"),e=require("@descope/sdk-helpers"),i=require("@descope/sdk-mixins/static-resources-mixin"),r=require("@descope/sdk-mixins/theme-mixin"),s=require("@descope/web-js-sdk"),o=require("../constants/index.js"),n=require("../helpers/helpers.js"),a=require("../helpers/state.js");require("@descope/escape-markdown"),require("../helpers/webauthn.js");var l,u,d,c,h,g,f,v,p,_,b,m,w,C,F,A,P,x,k,E,I,y=require("../helpers/flowInputs.js"),G=require("../mixins/formMountMixin.js"),j=require("./initTemplate.js"),L=require("../constants/content.js"),S=require("../constants/general.js");function U(t){return Object.freeze({__proto__:null,default:t})}const M=e.compose(r.themeMixin,i.staticResourcesMixin,G.formMountMixin)(HTMLElement);class O extends M{static get observedAttributes(){return["project-id","flow-id","base-url","tenant","locale","debug","storage-prefix","preview","redirect-url","auto-focus","store-last-authenticated-user","keep-last-authenticated-user-after-logout","validate-on-blur","style-id"]}constructor(e){super(),l.add(this),d.set(this,!1),this.flowStatus="initial",this.loggerWrapper={error:(e,i="")=>{this.logger.error(e,i,new Error),t.__classPrivateFieldGet(this,l,"m",E).call(this,e,i)},warn:(t,e="")=>{this.logger.warn(t,e)},info:(t,e="",i={})=>{this.logger.info(t,e,i)},debug:(t,e="")=>{this.logger.debug(t,e)}},c.set(this,new a),h.set(this,new a),g.set(this,{}),this.getComponentsContext=()=>t.__classPrivateFieldGet(this,g,"f"),this.nextRequestStatus=new a({isLoading:!1}),f.set(this,void 0),v.set(this,{popstate:t.__classPrivateFieldGet(this,l,"m",m).bind(this),componentsContext:t.__classPrivateFieldGet(this,l,"m",P).bind(this)}),p.set(this,void 0),this.getConfig=n.withMemCache((()=>t.__awaiter(this,void 0,void 0,(function*(){try{const{body:t,headers:e}=yield this.fetchStaticResource(L.CONFIG_FILENAME,"json");return{projectConfig:t,executionContext:{geo:e["x-geo"]}}}catch(t){return{isMissingConfig:!0}}})))),t.__classPrivateFieldSet(this,p,e,"f"),t.__classPrivateFieldGet(this,l,"m",_).call(this)}get flowId(){return this.getAttribute("flow-id")}get client(){try{return JSON.parse(this.getAttribute("client"))||{}}catch(t){return{}}}get tenantId(){return this.getAttribute("tenant")||void 0}get redirectUrl(){return this.getAttribute("redirect-url")||void 0}get debug(){return"true"===this.getAttribute("debug")}get locale(){return this.getAttribute("locale")||void 0}get autoFocus(){var t;const e=null!==(t=this.getAttribute("auto-focus"))&&void 0!==t?t:"true";return"skipFirstScreen"===e?e:"true"===e}get validateOnBlur(){return"true"===this.getAttribute("validate-on-blur")}get storeLastAuthenticatedUser(){var t;return"true"===(null!==(t=this.getAttribute("store-last-authenticated-user"))&&void 0!==t?t:"true")}get keepLastAuthenticatedUserAfterLogout(){return"true"===this.getAttribute("keep-last-authenticated-user-after-logout")}get storagePrefix(){return this.getAttribute("storage-prefix")||""}get preview(){return!!this.getAttribute("preview")}get formConfig(){return y.transformFlowInputFormData(this.form)}get form(){return this.getAttribute("form")}get formConfigValues(){return y.extractNestedAttribute(this.formConfig,"value")}get isRestartOnError(){return"true"===this.getAttribute("restart-on-error")}getExecutionContext(){return t.__awaiter(this,void 0,void 0,(function*(){const{executionContext:t}=yield this.getConfig();return t}))}getProjectConfig(){return t.__awaiter(this,void 0,void 0,(function*(){const{projectConfig:t}=yield this.getConfig();return t}))}getFlowConfig(){return t.__awaiter(this,void 0,void 0,(function*(){var t,e;const i=yield this.getProjectConfig(),r=(null===(t=null==i?void 0:i.flows)||void 0===t?void 0:t[this.flowId])||{};return null!==(e=r.version)&&void 0!==e||(r.version=0),r}))}getTargetLocales(){return t.__awaiter(this,void 0,void 0,(function*(){const t=yield this.getFlowConfig();return((null==t?void 0:t.targetLocales)||[]).map((t=>t.toLowerCase()))}))}getComponentsVersion(){return t.__awaiter(this,void 0,void 0,(function*(){var t,e;const i=null===(e=null===(t=yield this.getConfig())||void 0===t?void 0:t.projectConfig)||void 0===e?void 0:e.componentsVersion;return i||(this.logger.error("Did not get components version, using latest version"),"latest")}))}init(){const e=Object.create(null,{init:{get:()=>super.init}});return t.__awaiter(this,void 0,void 0,(function*(){var i;if(this.flowStatus="loading",["ready","error","success"].forEach((t=>this.addEventListener(t,(()=>{this.flowStatus=t})))),yield null===(i=e.init)||void 0===i?void 0:i.call(this),t.__classPrivateFieldGet(this,h,"f").subscribe(t.__classPrivateFieldGet(this,l,"m",k).bind(this)),t.__classPrivateFieldGet(this,h,"f").update({isDebug:this.debug}),t.__classPrivateFieldGet(this,l,"m",b).call(this),yield t.__classPrivateFieldGet(this,l,"m",F).call(this))return void this.loggerWrapper.error("This SDK version does not support your flows version","Make sure to upgrade your flows to the latest version or use an older SDK version");if((yield this.getConfig()).isMissingConfig)return void this.loggerWrapper.error("Cannot get config file","Make sure that your projectId & flowId are correct");t.__classPrivateFieldGet(this,l,"m",I).call(this);const{executionId:r,stepId:s,token:o,code:a,exchangeError:u,redirectAuthCallbackUrl:g,redirectAuthBackupCallbackUri:f,redirectAuthCodeChallenge:p,redirectAuthInitiator:_,ssoQueryParams:m}=n.handleUrlParams(this.flowId,this.loggerWrapper);window.addEventListener("popstate",t.__classPrivateFieldGet(this,v,"f").popstate),window.addEventListener("components-context",t.__classPrivateFieldGet(this,v,"f").componentsContext),t.__classPrivateFieldGet(this,c,"f").subscribe(t.__classPrivateFieldGet(this,l,"m",C).bind(this)),t.__classPrivateFieldGet(this,c,"f").update(Object.assign({projectId:this.projectId,flowId:this.flowId,baseUrl:this.baseUrl,tenant:this.tenantId,redirectUrl:this.redirectUrl,locale:this.locale,stepId:s,executionId:r,token:o,code:a,exchangeError:u,redirectAuthCallbackUrl:g,redirectAuthBackupCallbackUri:f,redirectAuthCodeChallenge:p,redirectAuthInitiator:_},m)),t.__classPrivateFieldSet(this,d,!0,"f")}))}disconnectedCallback(){t.__classPrivateFieldGet(this,c,"f").unsubscribeAll(),t.__classPrivateFieldGet(this,h,"f").unsubscribeAll(),t.__classPrivateFieldGet(this,l,"m",x).call(this),window.removeEventListener("popstate",t.__classPrivateFieldGet(this,v,"f").popstate),window.removeEventListener("components-context",t.__classPrivateFieldGet(this,v,"f").componentsContext)}attributeChangedCallback(e,i,r){if(this.shadowRoot.isConnected&&t.__classPrivateFieldGet(this,d,"f")&&i!==r&&u.observedAttributes.includes(e)){t.__classPrivateFieldGet(this,l,"m",b).call(this);const s=null===i;t.__classPrivateFieldGet(this,c,"f").update((({stepId:t,executionId:i})=>{let o=t,a=i;return s||(a=null,o=null,n.clearRunIdsFromUrl()),{[n.camelCase(e)]:r,stepId:o,executionId:a}})),t.__classPrivateFieldGet(this,h,"f").update({isDebug:this.debug})}}}u=O,d=new WeakMap,c=new WeakMap,h=new WeakMap,g=new WeakMap,f=new WeakMap,v=new WeakMap,p=new WeakMap,l=new WeakSet,_=function(){this.shadowRoot.appendChild(j.content.cloneNode(!0)),this.rootElement=this.shadowRoot.querySelector("#root")},b=function(){const t=["base-url","tenant","locale","debug","redirect-url","auto-focus","store-last-authenticated-user","keep-last-authenticated-user-after-logout","preview","storage-prefix","form","client","validate-on-blur","style-id"];u.observedAttributes.forEach((e=>{if(!t.includes(e)&&!this[n.camelCase(e)])throw Error(`${e} cannot be empty`)}))},m=function(){const{stepId:e,executionId:i}=n.getRunIdsFromUrl(this.flowId);t.__classPrivateFieldGet(this,c,"f").update({stepId:e,executionId:i})},w=function(e,i){this.sdk=s(Object.assign(Object.assign({persistTokens:!0,preview:this.preview,storagePrefix:this.storagePrefix,storeLastAuthenticatedUser:this.storeLastAuthenticatedUser,keepLastAuthenticatedUserAfterLogout:this.keepLastAuthenticatedUserAfterLogout},u.sdkConfigOverrides),{projectId:e,baseUrl:i})),["start","next"].forEach((e=>{const i=this.sdk.flow[e];this.sdk.flow[e]=(...e)=>t.__awaiter(this,void 0,void 0,(function*(){this.nextRequestStatus.update({isLoading:!0});try{return yield i(...e)}catch(t){return{error:{errorCode:S.FETCH_EXCEPTION_ERROR_CODE,errorDescription:t.toString()}}}finally{this.nextRequestStatus.update({isLoading:!1})}}))}))},C=function(e,i,r){return t.__awaiter(this,void 0,void 0,(function*(){const{projectId:i,baseUrl:s}=e;if(r("projectId")||r("baseUrl")){if(!i)return;t.__classPrivateFieldGet(this,l,"m",w).call(this,i,s)}t.__classPrivateFieldGet(this,p,"f").call(this,e)}))},F=function(){return t.__awaiter(this,void 0,void 0,(function*(){return(yield this.getConfig()).isMissingConfig&&(yield t.__classPrivateFieldGet(this,l,"m",A).call(this))}))},A=function(){return t.__awaiter(this,void 0,void 0,(function*(){const t=n.getContentUrl({projectId:this.projectId,filename:L.CONFIG_FILENAME,assetsFolder:L.PREV_VER_ASSETS_FOLDER,baseUrl:this.baseStaticUrl});try{return yield n.fetchContent(t,"json"),!0}catch(t){return!1}}))},P=function(e){t.__classPrivateFieldSet(this,g,Object.assign(Object.assign({},t.__classPrivateFieldGet(this,g,"f")),e.detail),"f")},x=function(){var e;null===(e=t.__classPrivateFieldGet(this,f,"f"))||void 0===e||e.remove(),t.__classPrivateFieldSet(this,f,null,"f")},k=function(e){return t.__awaiter(this,arguments,void 0,(function*({isDebug:e}){e?(t.__classPrivateFieldSet(this,f,document.createElement("descope-debugger"),"f"),Object.assign(t.__classPrivateFieldGet(this,f,"f").style,{position:"fixed",top:"0",right:"0",height:"100vh",width:"100vw",pointerEvents:"none",zIndex:99999}),yield Promise.resolve().then((function(){return U(require("../debugger-wc.js"))})),document.body.appendChild(t.__classPrivateFieldGet(this,f,"f"))):t.__classPrivateFieldGet(this,l,"m",x).call(this)}))},E=function(e,i){var r;e&&this.debug&&(null===(r=t.__classPrivateFieldGet(this,f,"f"))||void 0===r||r.updateData({title:e,description:i}))},I=function(){this.rootElement.onkeydown=t=>{var e,i,r;const s=!!(null===(e=this.shadowRoot.activeElement)||void 0===e?void 0:e.getAttribute("href")),n=o.ELEMENTS_TO_IGNORE_ENTER_KEY_ON.includes(null!==(r=null===(i=this.shadowRoot.activeElement)||void 0===i?void 0:i.localName)&&void 0!==r?r:"");if("Enter"!==t.key||s||n)return;t.preventDefault();const a=this.rootElement.querySelectorAll("descope-button");if(1===a.length&&"false"!==a[0].getAttribute("auto-submit"))return void a[0].click();const l=Array.from(a).filter((t=>"true"===t.getAttribute("auto-submit")));if(1===l.length)return void l[0].click();const u=Array.from(a).filter((t=>"button"===t.getAttribute("data-type")));if(1===u.length)"false"!==u[0].getAttribute("auto-submit")&&u[0].click();else if(0===u.length){const t=Array.from(a).filter((t=>"sso"===t.getAttribute("data-type")));1===t.length&&"false"!==t[0].getAttribute("auto-submit")&&t[0].click()}}},O.sdkConfigOverrides={baseHeaders:{"x-descope-sdk-name":"web-component","x-descope-sdk-version":"3.32.6"}},module.exports=O; |
@@ -1,1 +0,1 @@ | ||
import{__classPrivateFieldGet as t,__awaiter as e,__classPrivateFieldSet as i}from"tslib";import{compose as r}from"@descope/sdk-helpers";import{staticResourcesMixin as s}from"@descope/sdk-mixins/static-resources-mixin";import{themeMixin as o}from"@descope/sdk-mixins/theme-mixin";import n from"@descope/web-js-sdk";import{ELEMENTS_TO_IGNORE_ENTER_KEY_ON as u}from"../constants/index.js";import{withMemCache as a,handleUrlParams as l,clearRunIdsFromUrl as d,camelCase as c,getRunIdsFromUrl as h,getContentUrl as f,fetchContent as g}from"../helpers/helpers.js";import p from"../helpers/state.js";import"@descope/escape-markdown";import"../helpers/webauthn.js";import{transformFlowInputFormData as v,extractNestedAttribute as m}from"../helpers/flowInputs.js";import{formMountMixin as b}from"../mixins/formMountMixin.js";import w from"./initTemplate.js";import{CONFIG_FILENAME as A,PREV_VER_ASSETS_FOLDER as C}from"../constants/content.js";import{FETCH_EXCEPTION_ERROR_CODE as k}from"../constants/general.js";var x,y,j,I,E,L,U,S,M,O,W,R,D,P,q,F,T,B,N,V,H;const K=r(o,s,b)(HTMLElement);class z extends K{static get observedAttributes(){return["project-id","flow-id","base-url","tenant","locale","debug","storage-prefix","preview","redirect-url","auto-focus","store-last-authenticated-user","keep-last-authenticated-user-after-logout","validate-on-blur","style-id"]}constructor(r){super(),x.add(this),j.set(this,!1),this.flowStatus="initial",this.loggerWrapper={error:(e,i="")=>{this.logger.error(e,i,new Error),t(this,x,"m",V).call(this,e,i)},warn:(t,e="")=>{this.logger.warn(t,e)},info:(t,e="",i={})=>{this.logger.info(t,e,i)},debug:(t,e="")=>{this.logger.debug(t,e)}},I.set(this,new p),E.set(this,new p),L.set(this,{}),this.getComponentsContext=()=>t(this,L,"f"),this.nextRequestStatus=new p({isLoading:!1}),U.set(this,void 0),S.set(this,{popstate:t(this,x,"m",R).bind(this),componentsContext:t(this,x,"m",T).bind(this)}),M.set(this,void 0),this.getConfig=a((()=>e(this,void 0,void 0,(function*(){try{const{body:t,headers:e}=yield this.fetchStaticResource(A,"json");return{projectConfig:t,executionContext:{geo:e["x-geo"]}}}catch(t){return{isMissingConfig:!0}}})))),i(this,M,r,"f"),t(this,x,"m",O).call(this)}get flowId(){return this.getAttribute("flow-id")}get client(){try{return JSON.parse(this.getAttribute("client"))||{}}catch(t){return{}}}get tenantId(){return this.getAttribute("tenant")||void 0}get redirectUrl(){return this.getAttribute("redirect-url")||void 0}get debug(){return"true"===this.getAttribute("debug")}get locale(){return this.getAttribute("locale")||void 0}get autoFocus(){var t;const e=null!==(t=this.getAttribute("auto-focus"))&&void 0!==t?t:"true";return"skipFirstScreen"===e?e:"true"===e}get validateOnBlur(){return"true"===this.getAttribute("validate-on-blur")}get storeLastAuthenticatedUser(){var t;return"true"===(null!==(t=this.getAttribute("store-last-authenticated-user"))&&void 0!==t?t:"true")}get keepLastAuthenticatedUserAfterLogout(){return"true"===this.getAttribute("keep-last-authenticated-user-after-logout")}get storagePrefix(){return this.getAttribute("storage-prefix")||""}get preview(){return!!this.getAttribute("preview")}get formConfig(){return v(this.form)}get form(){return this.getAttribute("form")}get formConfigValues(){return m(this.formConfig,"value")}get isRestartOnError(){return"true"===this.getAttribute("restart-on-error")}getExecutionContext(){return e(this,void 0,void 0,(function*(){const{executionContext:t}=yield this.getConfig();return t}))}getProjectConfig(){return e(this,void 0,void 0,(function*(){const{projectConfig:t}=yield this.getConfig();return t}))}getFlowConfig(){return e(this,void 0,void 0,(function*(){var t,e;const i=yield this.getProjectConfig(),r=(null===(t=null==i?void 0:i.flows)||void 0===t?void 0:t[this.flowId])||{};return null!==(e=r.version)&&void 0!==e||(r.version=0),r}))}getTargetLocales(){return e(this,void 0,void 0,(function*(){const t=yield this.getFlowConfig();return((null==t?void 0:t.targetLocales)||[]).map((t=>t.toLowerCase()))}))}getComponentsVersion(){return e(this,void 0,void 0,(function*(){var t,e;const i=null===(e=null===(t=yield this.getConfig())||void 0===t?void 0:t.projectConfig)||void 0===e?void 0:e.componentsVersion;return i||(this.logger.error("Did not get components version, using latest version"),"latest")}))}init(){const r=Object.create(null,{init:{get:()=>super.init}});return e(this,void 0,void 0,(function*(){var e;if(this.flowStatus="loading",["ready","error","success"].forEach((t=>this.addEventListener(t,(()=>{this.flowStatus=t})))),yield null===(e=r.init)||void 0===e?void 0:e.call(this),t(this,E,"f").subscribe(t(this,x,"m",N).bind(this)),t(this,E,"f").update({isDebug:this.debug}),t(this,x,"m",W).call(this),yield t(this,x,"m",q).call(this))return void this.loggerWrapper.error("This SDK version does not support your flows version","Make sure to upgrade your flows to the latest version or use an older SDK version");if((yield this.getConfig()).isMissingConfig)return void this.loggerWrapper.error("Cannot get config file","Make sure that your projectId & flowId are correct");t(this,x,"m",H).call(this);const{executionId:s,stepId:o,token:n,code:u,exchangeError:a,redirectAuthCallbackUrl:d,redirectAuthBackupCallbackUri:c,redirectAuthCodeChallenge:h,redirectAuthInitiator:f,ssoQueryParams:g}=l(this.flowId,this.loggerWrapper);window.addEventListener("popstate",t(this,S,"f").popstate),window.addEventListener("components-context",t(this,S,"f").componentsContext),t(this,I,"f").subscribe(t(this,x,"m",P).bind(this)),t(this,I,"f").update(Object.assign({projectId:this.projectId,flowId:this.flowId,baseUrl:this.baseUrl,tenant:this.tenantId,redirectUrl:this.redirectUrl,locale:this.locale,stepId:o,executionId:s,token:n,code:u,exchangeError:a,redirectAuthCallbackUrl:d,redirectAuthBackupCallbackUri:c,redirectAuthCodeChallenge:h,redirectAuthInitiator:f},g)),i(this,j,!0,"f")}))}disconnectedCallback(){t(this,I,"f").unsubscribeAll(),t(this,E,"f").unsubscribeAll(),t(this,x,"m",B).call(this),window.removeEventListener("popstate",t(this,S,"f").popstate),window.removeEventListener("components-context",t(this,S,"f").componentsContext)}attributeChangedCallback(e,i,r){if(this.shadowRoot.isConnected&&t(this,j,"f")&&i!==r&&y.observedAttributes.includes(e)){t(this,x,"m",W).call(this);const s=null===i;t(this,I,"f").update((({stepId:t,executionId:i})=>{let o=t,n=i;return s||(n=null,o=null,d()),{[c(e)]:r,stepId:o,executionId:n}})),t(this,E,"f").update({isDebug:this.debug})}}}y=z,j=new WeakMap,I=new WeakMap,E=new WeakMap,L=new WeakMap,U=new WeakMap,S=new WeakMap,M=new WeakMap,x=new WeakSet,O=function(){this.shadowRoot.appendChild(w.content.cloneNode(!0)),this.rootElement=this.shadowRoot.querySelector("#root")},W=function(){const t=["base-url","tenant","locale","debug","redirect-url","auto-focus","store-last-authenticated-user","keep-last-authenticated-user-after-logout","preview","storage-prefix","form","client","validate-on-blur","style-id"];y.observedAttributes.forEach((e=>{if(!t.includes(e)&&!this[c(e)])throw Error(`${e} cannot be empty`)}))},R=function(){const{stepId:e,executionId:i}=h(this.flowId);t(this,I,"f").update({stepId:e,executionId:i})},D=function(t,i){this.sdk=n(Object.assign(Object.assign({persistTokens:!0,preview:this.preview,storagePrefix:this.storagePrefix,storeLastAuthenticatedUser:this.storeLastAuthenticatedUser,keepLastAuthenticatedUserAfterLogout:this.keepLastAuthenticatedUserAfterLogout},y.sdkConfigOverrides),{projectId:t,baseUrl:i})),["start","next"].forEach((t=>{const i=this.sdk.flow[t];this.sdk.flow[t]=(...t)=>e(this,void 0,void 0,(function*(){this.nextRequestStatus.update({isLoading:!0});try{return yield i(...t)}catch(t){return{error:{errorCode:k,errorDescription:t.toString()}}}finally{this.nextRequestStatus.update({isLoading:!1})}}))}))},P=function(i,r,s){return e(this,void 0,void 0,(function*(){const{projectId:e,baseUrl:r}=i;if(s("projectId")||s("baseUrl")){if(!e)return;t(this,x,"m",D).call(this,e,r)}t(this,M,"f").call(this,i)}))},q=function(){return e(this,void 0,void 0,(function*(){return(yield this.getConfig()).isMissingConfig&&(yield t(this,x,"m",F).call(this))}))},F=function(){return e(this,void 0,void 0,(function*(){const t=f({projectId:this.projectId,filename:A,assetsFolder:C,baseUrl:this.baseStaticUrl});try{return yield g(t,"json"),!0}catch(t){return!1}}))},T=function(e){i(this,L,Object.assign(Object.assign({},t(this,L,"f")),e.detail),"f")},B=function(){var e;null===(e=t(this,U,"f"))||void 0===e||e.remove(),i(this,U,null,"f")},N=function(r){return e(this,arguments,void 0,(function*({isDebug:e}){e?(i(this,U,document.createElement("descope-debugger"),"f"),Object.assign(t(this,U,"f").style,{position:"fixed",top:"0",right:"0",height:"100vh",width:"100vw",pointerEvents:"none",zIndex:99999}),yield import("../debugger-wc.js"),document.body.appendChild(t(this,U,"f"))):t(this,x,"m",B).call(this)}))},V=function(e,i){var r;e&&this.debug&&(null===(r=t(this,U,"f"))||void 0===r||r.updateData({title:e,description:i}))},H=function(){this.rootElement.onkeydown=t=>{var e,i,r;const s=!!(null===(e=this.shadowRoot.activeElement)||void 0===e?void 0:e.getAttribute("href")),o=u.includes(null!==(r=null===(i=this.shadowRoot.activeElement)||void 0===i?void 0:i.localName)&&void 0!==r?r:"");if("Enter"!==t.key||s||o)return;t.preventDefault();const n=this.rootElement.querySelectorAll("descope-button");if(1===n.length&&"false"!==n[0].getAttribute("auto-submit"))return void n[0].click();const a=Array.from(n).filter((t=>"true"===t.getAttribute("auto-submit")));if(1===a.length)return void a[0].click();const l=Array.from(n).filter((t=>"button"===t.getAttribute("data-type")));if(1===l.length)"false"!==l[0].getAttribute("auto-submit")&&l[0].click();else if(0===l.length){const t=Array.from(n).filter((t=>"sso"===t.getAttribute("data-type")));1===t.length&&"false"!==t[0].getAttribute("auto-submit")&&t[0].click()}}},z.sdkConfigOverrides={baseHeaders:{"x-descope-sdk-name":"web-component","x-descope-sdk-version":"3.32.5"}};export{z as default}; | ||
import{__classPrivateFieldGet as t,__awaiter as e,__classPrivateFieldSet as i}from"tslib";import{compose as r}from"@descope/sdk-helpers";import{staticResourcesMixin as s}from"@descope/sdk-mixins/static-resources-mixin";import{themeMixin as o}from"@descope/sdk-mixins/theme-mixin";import n from"@descope/web-js-sdk";import{ELEMENTS_TO_IGNORE_ENTER_KEY_ON as u}from"../constants/index.js";import{withMemCache as a,handleUrlParams as l,clearRunIdsFromUrl as d,camelCase as c,getRunIdsFromUrl as h,getContentUrl as f,fetchContent as g}from"../helpers/helpers.js";import p from"../helpers/state.js";import"@descope/escape-markdown";import"../helpers/webauthn.js";import{transformFlowInputFormData as v,extractNestedAttribute as m}from"../helpers/flowInputs.js";import{formMountMixin as b}from"../mixins/formMountMixin.js";import w from"./initTemplate.js";import{CONFIG_FILENAME as A,PREV_VER_ASSETS_FOLDER as C}from"../constants/content.js";import{FETCH_EXCEPTION_ERROR_CODE as k}from"../constants/general.js";var x,y,j,I,E,L,U,S,M,O,W,R,D,P,q,F,T,B,N,V,H;const K=r(o,s,b)(HTMLElement);class z extends K{static get observedAttributes(){return["project-id","flow-id","base-url","tenant","locale","debug","storage-prefix","preview","redirect-url","auto-focus","store-last-authenticated-user","keep-last-authenticated-user-after-logout","validate-on-blur","style-id"]}constructor(r){super(),x.add(this),j.set(this,!1),this.flowStatus="initial",this.loggerWrapper={error:(e,i="")=>{this.logger.error(e,i,new Error),t(this,x,"m",V).call(this,e,i)},warn:(t,e="")=>{this.logger.warn(t,e)},info:(t,e="",i={})=>{this.logger.info(t,e,i)},debug:(t,e="")=>{this.logger.debug(t,e)}},I.set(this,new p),E.set(this,new p),L.set(this,{}),this.getComponentsContext=()=>t(this,L,"f"),this.nextRequestStatus=new p({isLoading:!1}),U.set(this,void 0),S.set(this,{popstate:t(this,x,"m",R).bind(this),componentsContext:t(this,x,"m",T).bind(this)}),M.set(this,void 0),this.getConfig=a((()=>e(this,void 0,void 0,(function*(){try{const{body:t,headers:e}=yield this.fetchStaticResource(A,"json");return{projectConfig:t,executionContext:{geo:e["x-geo"]}}}catch(t){return{isMissingConfig:!0}}})))),i(this,M,r,"f"),t(this,x,"m",O).call(this)}get flowId(){return this.getAttribute("flow-id")}get client(){try{return JSON.parse(this.getAttribute("client"))||{}}catch(t){return{}}}get tenantId(){return this.getAttribute("tenant")||void 0}get redirectUrl(){return this.getAttribute("redirect-url")||void 0}get debug(){return"true"===this.getAttribute("debug")}get locale(){return this.getAttribute("locale")||void 0}get autoFocus(){var t;const e=null!==(t=this.getAttribute("auto-focus"))&&void 0!==t?t:"true";return"skipFirstScreen"===e?e:"true"===e}get validateOnBlur(){return"true"===this.getAttribute("validate-on-blur")}get storeLastAuthenticatedUser(){var t;return"true"===(null!==(t=this.getAttribute("store-last-authenticated-user"))&&void 0!==t?t:"true")}get keepLastAuthenticatedUserAfterLogout(){return"true"===this.getAttribute("keep-last-authenticated-user-after-logout")}get storagePrefix(){return this.getAttribute("storage-prefix")||""}get preview(){return!!this.getAttribute("preview")}get formConfig(){return v(this.form)}get form(){return this.getAttribute("form")}get formConfigValues(){return m(this.formConfig,"value")}get isRestartOnError(){return"true"===this.getAttribute("restart-on-error")}getExecutionContext(){return e(this,void 0,void 0,(function*(){const{executionContext:t}=yield this.getConfig();return t}))}getProjectConfig(){return e(this,void 0,void 0,(function*(){const{projectConfig:t}=yield this.getConfig();return t}))}getFlowConfig(){return e(this,void 0,void 0,(function*(){var t,e;const i=yield this.getProjectConfig(),r=(null===(t=null==i?void 0:i.flows)||void 0===t?void 0:t[this.flowId])||{};return null!==(e=r.version)&&void 0!==e||(r.version=0),r}))}getTargetLocales(){return e(this,void 0,void 0,(function*(){const t=yield this.getFlowConfig();return((null==t?void 0:t.targetLocales)||[]).map((t=>t.toLowerCase()))}))}getComponentsVersion(){return e(this,void 0,void 0,(function*(){var t,e;const i=null===(e=null===(t=yield this.getConfig())||void 0===t?void 0:t.projectConfig)||void 0===e?void 0:e.componentsVersion;return i||(this.logger.error("Did not get components version, using latest version"),"latest")}))}init(){const r=Object.create(null,{init:{get:()=>super.init}});return e(this,void 0,void 0,(function*(){var e;if(this.flowStatus="loading",["ready","error","success"].forEach((t=>this.addEventListener(t,(()=>{this.flowStatus=t})))),yield null===(e=r.init)||void 0===e?void 0:e.call(this),t(this,E,"f").subscribe(t(this,x,"m",N).bind(this)),t(this,E,"f").update({isDebug:this.debug}),t(this,x,"m",W).call(this),yield t(this,x,"m",q).call(this))return void this.loggerWrapper.error("This SDK version does not support your flows version","Make sure to upgrade your flows to the latest version or use an older SDK version");if((yield this.getConfig()).isMissingConfig)return void this.loggerWrapper.error("Cannot get config file","Make sure that your projectId & flowId are correct");t(this,x,"m",H).call(this);const{executionId:s,stepId:o,token:n,code:u,exchangeError:a,redirectAuthCallbackUrl:d,redirectAuthBackupCallbackUri:c,redirectAuthCodeChallenge:h,redirectAuthInitiator:f,ssoQueryParams:g}=l(this.flowId,this.loggerWrapper);window.addEventListener("popstate",t(this,S,"f").popstate),window.addEventListener("components-context",t(this,S,"f").componentsContext),t(this,I,"f").subscribe(t(this,x,"m",P).bind(this)),t(this,I,"f").update(Object.assign({projectId:this.projectId,flowId:this.flowId,baseUrl:this.baseUrl,tenant:this.tenantId,redirectUrl:this.redirectUrl,locale:this.locale,stepId:o,executionId:s,token:n,code:u,exchangeError:a,redirectAuthCallbackUrl:d,redirectAuthBackupCallbackUri:c,redirectAuthCodeChallenge:h,redirectAuthInitiator:f},g)),i(this,j,!0,"f")}))}disconnectedCallback(){t(this,I,"f").unsubscribeAll(),t(this,E,"f").unsubscribeAll(),t(this,x,"m",B).call(this),window.removeEventListener("popstate",t(this,S,"f").popstate),window.removeEventListener("components-context",t(this,S,"f").componentsContext)}attributeChangedCallback(e,i,r){if(this.shadowRoot.isConnected&&t(this,j,"f")&&i!==r&&y.observedAttributes.includes(e)){t(this,x,"m",W).call(this);const s=null===i;t(this,I,"f").update((({stepId:t,executionId:i})=>{let o=t,n=i;return s||(n=null,o=null,d()),{[c(e)]:r,stepId:o,executionId:n}})),t(this,E,"f").update({isDebug:this.debug})}}}y=z,j=new WeakMap,I=new WeakMap,E=new WeakMap,L=new WeakMap,U=new WeakMap,S=new WeakMap,M=new WeakMap,x=new WeakSet,O=function(){this.shadowRoot.appendChild(w.content.cloneNode(!0)),this.rootElement=this.shadowRoot.querySelector("#root")},W=function(){const t=["base-url","tenant","locale","debug","redirect-url","auto-focus","store-last-authenticated-user","keep-last-authenticated-user-after-logout","preview","storage-prefix","form","client","validate-on-blur","style-id"];y.observedAttributes.forEach((e=>{if(!t.includes(e)&&!this[c(e)])throw Error(`${e} cannot be empty`)}))},R=function(){const{stepId:e,executionId:i}=h(this.flowId);t(this,I,"f").update({stepId:e,executionId:i})},D=function(t,i){this.sdk=n(Object.assign(Object.assign({persistTokens:!0,preview:this.preview,storagePrefix:this.storagePrefix,storeLastAuthenticatedUser:this.storeLastAuthenticatedUser,keepLastAuthenticatedUserAfterLogout:this.keepLastAuthenticatedUserAfterLogout},y.sdkConfigOverrides),{projectId:t,baseUrl:i})),["start","next"].forEach((t=>{const i=this.sdk.flow[t];this.sdk.flow[t]=(...t)=>e(this,void 0,void 0,(function*(){this.nextRequestStatus.update({isLoading:!0});try{return yield i(...t)}catch(t){return{error:{errorCode:k,errorDescription:t.toString()}}}finally{this.nextRequestStatus.update({isLoading:!1})}}))}))},P=function(i,r,s){return e(this,void 0,void 0,(function*(){const{projectId:e,baseUrl:r}=i;if(s("projectId")||s("baseUrl")){if(!e)return;t(this,x,"m",D).call(this,e,r)}t(this,M,"f").call(this,i)}))},q=function(){return e(this,void 0,void 0,(function*(){return(yield this.getConfig()).isMissingConfig&&(yield t(this,x,"m",F).call(this))}))},F=function(){return e(this,void 0,void 0,(function*(){const t=f({projectId:this.projectId,filename:A,assetsFolder:C,baseUrl:this.baseStaticUrl});try{return yield g(t,"json"),!0}catch(t){return!1}}))},T=function(e){i(this,L,Object.assign(Object.assign({},t(this,L,"f")),e.detail),"f")},B=function(){var e;null===(e=t(this,U,"f"))||void 0===e||e.remove(),i(this,U,null,"f")},N=function(r){return e(this,arguments,void 0,(function*({isDebug:e}){e?(i(this,U,document.createElement("descope-debugger"),"f"),Object.assign(t(this,U,"f").style,{position:"fixed",top:"0",right:"0",height:"100vh",width:"100vw",pointerEvents:"none",zIndex:99999}),yield import("../debugger-wc.js"),document.body.appendChild(t(this,U,"f"))):t(this,x,"m",B).call(this)}))},V=function(e,i){var r;e&&this.debug&&(null===(r=t(this,U,"f"))||void 0===r||r.updateData({title:e,description:i}))},H=function(){this.rootElement.onkeydown=t=>{var e,i,r;const s=!!(null===(e=this.shadowRoot.activeElement)||void 0===e?void 0:e.getAttribute("href")),o=u.includes(null!==(r=null===(i=this.shadowRoot.activeElement)||void 0===i?void 0:i.localName)&&void 0!==r?r:"");if("Enter"!==t.key||s||o)return;t.preventDefault();const n=this.rootElement.querySelectorAll("descope-button");if(1===n.length&&"false"!==n[0].getAttribute("auto-submit"))return void n[0].click();const a=Array.from(n).filter((t=>"true"===t.getAttribute("auto-submit")));if(1===a.length)return void a[0].click();const l=Array.from(n).filter((t=>"button"===t.getAttribute("data-type")));if(1===l.length)"false"!==l[0].getAttribute("auto-submit")&&l[0].click();else if(0===l.length){const t=Array.from(n).filter((t=>"sso"===t.getAttribute("data-type")));1===t.length&&"false"!==t[0].getAttribute("auto-submit")&&t[0].click()}}},z.sdkConfigOverrides={baseHeaders:{"x-descope-sdk-name":"web-component","x-descope-sdk-version":"3.32.6"}};export{z as default}; |
{ | ||
"name": "@descope/web-component", | ||
"version": "3.32.5", | ||
"version": "3.32.6", | ||
"author": "Descope Team <info@descope.com>", | ||
@@ -40,3 +40,3 @@ "homepage": "https://github.com/descope/descope-js", | ||
"eslint-import-resolver-typescript": "3.6.1", | ||
"eslint-plugin-import": "2.29.1", | ||
"eslint-plugin-import": "2.31.0", | ||
"eslint-plugin-jest": "28.6.0", | ||
@@ -71,6 +71,6 @@ "eslint-plugin-jest-dom": "5.4.0", | ||
"@fingerprintjs/fingerprintjs-pro": "3.11.6", | ||
"@descope/sdk-helpers": "0.1.61", | ||
"@descope/web-js-sdk": "1.23.3", | ||
"@descope/sdk-mixins": "0.6.2", | ||
"@descope/escape-markdown": "0.1.1" | ||
"@descope/sdk-mixins": "0.6.3", | ||
"@descope/escape-markdown": "0.1.2", | ||
"@descope/sdk-helpers": "0.1.62", | ||
"@descope/web-js-sdk": "1.23.4" | ||
}, | ||
@@ -77,0 +77,0 @@ "overrides": { |
Sorry, the diff of this file is too big to display
+ Added@descope/core-js-sdk@2.33.1(transitive)
+ Added@descope/escape-markdown@0.1.2(transitive)
+ Added@descope/sdk-component-drivers@0.2.45(transitive)
+ Added@descope/sdk-helpers@0.1.62(transitive)
+ Added@descope/sdk-mixins@0.6.3(transitive)
+ Added@descope/web-js-sdk@1.23.4(transitive)
- Removed@descope/core-js-sdk@2.33.0(transitive)
- Removed@descope/escape-markdown@0.1.1(transitive)
- Removed@descope/sdk-component-drivers@0.2.44(transitive)
- Removed@descope/sdk-helpers@0.1.61(transitive)
- Removed@descope/sdk-mixins@0.6.2(transitive)
- Removed@descope/web-js-sdk@1.23.3(transitive)
Updated@descope/sdk-helpers@0.1.62
Updated@descope/sdk-mixins@0.6.3
Updated@descope/web-js-sdk@1.23.4