@descope/web-component 4.6.2 → 4.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/descope-wc/BaseDescopeWc.js +1 -1
- package/dist/esm/descope-wc/BaseDescopeWc.js +1 -1
- package/dist/index.d.ts +117 -117
- package/dist/index.js +1 -1
- package/package.json +3 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var t=require("tslib"),e=require("@descope/sdk-helpers"),i=require("@descope/sdk-mixins/static-resources-mixin"),s=require("@descope/sdk-mixins/theme-mixin"),r=require("@descope/sdk-mixins/inject-style-mixin"),n=require("@descope/sdk-mixins/telemetry-mixin"),o=require("@descope/web-js-sdk"),a=require("../constants/index.js"),l=require("../helpers/helpers.js"),d=require("../helpers/state.js");require("@descope/escape-markdown"),require("../helpers/webauthn.js");var u,c,h,g,f,p,v,_,m,b,w,k,C,P,x,F,y,A,E,S,I,j,G,M,O,q,U=require("../helpers/storage.js"),L=require("../helpers/flowInputs.js"),R=require("../mixins/formMountMixin.js"),T=require("../mixins/componentConditionsMixin.js"),W=require("../mixins/duplicateFlowWarningMixin.js"),N=require("../mixins/passwordManagerMixin.js"),D=require("../mixins/validationTrackingMixin.js"),K=require("../constants/content.js"),V=require("../constants/general.js");function z(t){return Object.freeze({__proto__:null,default:t})}const H=e.compose(s.themeMixin,i.staticResourcesMixin,R.formMountMixin,T.componentConditionsMixin,W.duplicateFlowWarningMixin,N.passwordManagerMixin,r.injectStyleMixin,n.telemetryMixin,D.validationTrackingMixin)(HTMLElement);class J extends H{static get observedAttributes(){return["project-id","flow-id","base-url","tenant","locale","debug","storage-prefix","preview","redirect-url","auto-focus","store-last-authenticated-user","refresh-cookie-name","keep-last-authenticated-user-after-logout","validate-on-blur","send-session-token","style-id"]}constructor(e){super(),u.add(this),this.sdkVersion="4.6.2",h.set(this,!1),g.set(this,void 0),this.flowStatus="initial",this.loggerWrapper={error:(e,i="")=>{this.logger.error(e,i,new Error),t.__classPrivateFieldGet(this,u,"m",q).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)}},f.set(this,new d),p.set(this,new d),v.set(this,{}),this.getComponentsContext=()=>t.__classPrivateFieldGet(this,v,"f"),this.nextRequestStatus=new d({isLoading:!1}),_.set(this,void 0),m.set(this,{popstate:t.__classPrivateFieldGet(this,u,"m",P).bind(this),componentsContext:t.__classPrivateFieldGet(this,u,"m",S).bind(this)}),b.set(this,void 0),this.getConfig=()=>t.__awaiter(this,void 0,void 0,(function*(){return(yield this.config)||{isMissingConfig:!0}})),I.set(this,void 0),j.set(this,void 0),t.__classPrivateFieldSet(this,b,e,"f"),t.__classPrivateFieldGet(this,u,"m",k).call(this)}get client(){try{return JSON.parse(this.getAttribute("client"))||{}}catch(t){return{}}}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 refreshCookieName(){return this.getAttribute("refresh-cookie-name")||""}get keepLastAuthenticatedUserAfterLogout(){return"true"===this.getAttribute("keep-last-authenticated-user-after-logout")}get storagePrefix(){return this.getAttribute("storage-prefix")||""}get sendSessionToken(){return"true"===this.getAttribute("send-session-token")}get preview(){return!!this.getAttribute("preview")}get formConfig(){return L.transformFlowInputFormData(this.form)}get form(){return this.getAttribute("form")}get formConfigValues(){return L.extractNestedAttribute(this.formConfig,"value")}get outboundAppId(){return this.getAttribute("outbound-app-id")}get outboundAppScopes(){try{const t=JSON.parse(this.getAttribute("outbound-app-scopes"));return t||null}catch(t){return null}}get popupOrigin(){return this.getAttribute("popup-origin")}get customStorage(){return t.__classPrivateFieldGet(this,g,"f")}set customStorage(e){if(e&&"function"!=typeof e.getItem)throw new Error("Custom storage must have a getItem method");if(e&&"function"!=typeof e.setItem)throw new Error("Custom storage must have a setItem method");if(e&&"function"!=typeof e.removeItem)throw new Error("Custom storage must have a removeItem method");t.__classPrivateFieldSet(this,g,e,"f"),U.setCustomStorage(e)}get lazyStart(){return"true"===this.getAttribute("lazy-start")}start(){var e;null===(e=t.__classPrivateFieldGet(this,j,"f"))||void 0===e||e.call(this),t.__classPrivateFieldSet(this,I,Promise.resolve(),"f")}get isRestartOnError(){return"true"===this.getAttribute("restart-on-error")}getExecutionContext(){return t.__awaiter(this,void 0,void 0,(function*(){const t=yield this.getConfig();return"executionContext"in t?t.executionContext:void 0}))}getProjectConfig(){return t.__awaiter(this,void 0,void 0,(function*(){const t=yield this.getConfig();return"projectConfig"in t?t.projectConfig:void 0}))}getFlowConfig(){return t.__awaiter(this,void 0,void 0,(function*(){var t,e;const i=yield this.getProjectConfig(),s=(null===(t=null==i?void 0:i.flows)||void 0===t?void 0:t[this.flowId])||{};return null!==(e=s.version)&&void 0!==e||(s.version=0),s}))}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()))}))}handleKeyPress(){this.logger.debug("Enable key press handler"),this.rootElement.onkeydown=t=>{var e,i,s;const r=!!(null===(e=this.shadowRoot.activeElement)||void 0===e?void 0:e.getAttribute("href")),n=a.ELEMENTS_TO_IGNORE_ENTER_KEY_ON.includes(null!==(s=null===(i=this.shadowRoot.activeElement)||void 0===i?void 0:i.localName)&&void 0!==s?s:"");if("Enter"!==t.key||r||n)return;t.preventDefault();const o=this.rootElement.querySelectorAll("descope-button");if(1===o.length&&"false"!==o[0].getAttribute("auto-submit"))return void o[0].click();const l=Array.from(o).filter((t=>"true"===t.getAttribute("auto-submit")));if(1===l.length)return void l[0].click();const d=Array.from(o).filter((t=>"button"===t.getAttribute("data-type")));if(1===d.length)"false"!==d[0].getAttribute("auto-submit")&&d[0].click();else if(0===d.length){const t=Array.from(o).filter((t=>"sso"===t.getAttribute("data-type")));1===t.length&&"false"!==t[0].getAttribute("auto-submit")&&t[0].click()}}}disableKeyPressHandler(){this.logger.debug("Disable key press handler"),this.rootElement.onkeydown=null}getComponentsVersion(){return t.__awaiter(this,void 0,void 0,(function*(){var t;const e=yield this.getConfig(),i="projectConfig"in e?null===(t=e.projectConfig)||void 0===t?void 0:t.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,p,"f").subscribe(t.__classPrivateFieldGet(this,u,"m",O).bind(this)),t.__classPrivateFieldGet(this,p,"f").update({isDebug:this.debug}),t.__classPrivateFieldGet(this,u,"m",C).call(this),yield t.__classPrivateFieldGet(this,u,"m",A).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");const s=yield this.getConfig();if("isMissingConfig"in s&&s.isMissingConfig)return void this.loggerWrapper.error("Cannot get config file","Make sure that your projectId & flowId are correct");const{executionId:r,stepId:n,token:o,code:a,isPopup:d,exchangeError:c,redirectAuthCallbackUrl:g,redirectAuthBackupCallbackUri:v,redirectAuthCodeChallenge:_,redirectAuthInitiator:b,ssoQueryParams:w}=l.handleUrlParams(this.flowId,this.projectId,this.loggerWrapper);window.addEventListener("popstate",t.__classPrivateFieldGet(this,m,"f").popstate),window.addEventListener("components-context",t.__classPrivateFieldGet(this,m,"f").componentsContext),t.__classPrivateFieldGet(this,f,"f").subscribe(t.__classPrivateFieldGet(this,u,"m",y).bind(this)),t.__classPrivateFieldGet(this,f,"f").update(Object.assign({projectId:this.projectId,flowId:this.flowId,baseUrl:this.baseUrl,tenant:this.tenantId,redirectUrl:this.redirectUrl,locale:this.locale,stepId:n,executionId:r,token:o,code:a,isPopup:d,exchangeError:c,redirectAuthCallbackUrl:g,redirectAuthBackupCallbackUri:v,redirectAuthCodeChallenge:_,redirectAuthInitiator:b},w)),t.__classPrivateFieldSet(this,h,!0,"f")}))}disconnectedCallback(){var e;t.__classPrivateFieldGet(this,f,"f").unsubscribeAll(),t.__classPrivateFieldGet(this,p,"f").unsubscribeAll(),t.__classPrivateFieldGet(this,u,"m",M).call(this),window.removeEventListener("popstate",t.__classPrivateFieldGet(this,m,"f").popstate),window.removeEventListener("components-context",t.__classPrivateFieldGet(this,m,"f").componentsContext),null===(e=super.disconnectedCallback)||void 0===e||e.call(this)}attributeChangedCallback(e,i,s){var r;if(null===(r=super.attributeChangedCallback)||void 0===r||r.call(this,e,i,s),this.shadowRoot.isConnected&&t.__classPrivateFieldGet(this,h,"f")&&i!==s&&c.observedAttributes.includes(e)){t.__classPrivateFieldGet(this,u,"m",C).call(this);const r=null===i;t.__classPrivateFieldGet(this,f,"f").update((({stepId:t,executionId:i})=>{let n=t,o=i;return r||(o=null,n=null,l.clearRunIdsFromUrl()),{[l.camelCase(e)]:s,stepId:n,executionId:o}})),t.__classPrivateFieldGet(this,p,"f").update({isDebug:this.debug})}}}c=J,h=new WeakMap,g=new WeakMap,f=new WeakMap,p=new WeakMap,v=new WeakMap,_=new WeakMap,m=new WeakMap,b=new WeakMap,I=new WeakMap,j=new WeakMap,u=new WeakSet,w=function(){this.injectStyle("\n :host {\n\t\t\twidth: 100%;\n display: block;\n\t\t}\n\n\t\t#root {\n\t\t\theight: 100%;\n display: flex;\n flex-direction: column;\n\t\t}\n\n #content-root {\n all: initial;\n transition: opacity 200ms ease-in-out;\n }\n\n\t\t#root[data-theme] {\n\t\t\tbackground-color: transparent;\n\t\t}\n\n\t\t.fade-out {\n\t\t\topacity: 0.1!important;\n\t\t}\n\n .hidden {\n display: none;\n }\n ")},k=function(){t.__classPrivateFieldGet(this,u,"m",w).call(this),this.slotElement=document.createElement("slot"),this.slotElement.classList.add("hidden"),this.rootElement.appendChild(this.slotElement)},C=function(){const t=["base-url","tenant","locale","debug","redirect-url","auto-focus","store-last-authenticated-user","refresh-cookie-name","keep-last-authenticated-user-after-logout","preview","storage-prefix","form","client","validate-on-blur","send-session-token","style-id","outbound-app-id","outbound-app-scopes","theme-override"];c.observedAttributes.forEach((e=>{if(!t.includes(e)&&!this[l.camelCase(e)])throw Error(`${e} cannot be empty`)}))},P=function(){const{stepId:e,executionId:i}=l.getRunIdsFromUrl(this.flowId);t.__classPrivateFieldGet(this,f,"f").update({stepId:e,executionId:i})},x=function(e,i){o.createSdk&&"function"==typeof o.createSdk||this.logger.error("SDK was not loaded properly",o.createSdk,JSON.stringify(o.createSdk));const s=Object.assign(Object.assign({persistTokens:!0,preview:this.preview,storagePrefix:this.storagePrefix,storeLastAuthenticatedUser:this.storeLastAuthenticatedUser,keepLastAuthenticatedUserAfterLogout:this.keepLastAuthenticatedUserAfterLogout,refreshCookieName:this.refreshCookieName},c.sdkConfigOverrides),{projectId:e,baseUrl:i});t.__classPrivateFieldGet(this,g,"f")&&(s.customStorage=t.__classPrivateFieldGet(this,g,"f")),this.sdk=o.createSdk(s);const r={start:1,next:7};["start","next"].forEach((e=>{const i=this.sdk.flow[e],s=l.withRetry(i,1e3,3);this.sdk.flow[e]=(...i)=>t.__awaiter(this,void 0,void 0,(function*(){const n=[...i],o=r[e],a=t.__classPrivateFieldGet(this,u,"m",F).call(this,n[o]);void 0!==a&&(n[o]=a);try{return yield s(...n)}catch(t){return this.logger.error(`Error in sdk flow ${e} function`,t),{error:{errorCode:V.FETCH_EXCEPTION_ERROR_CODE,errorDescription:t.toString()}}}}))}));const n=this.sdk.flow.start;this.sdk.flow.start=(...e)=>t.__awaiter(this,void 0,void 0,(function*(){return yield t.__classPrivateFieldGet(this,u,"m",G).call(this),n.apply(this.sdk.flow,e)}))},F=function(t){if(!this.sendSessionToken)return t;const e=null===o.getSessionToken||void 0===o.getSessionToken?void 0:o.getSessionToken(this.storagePrefix);return e?Object.assign(Object.assign({},null!=t?t:{}),{sessionJwt:e}):t},y=function(e,i,s){return t.__awaiter(this,void 0,void 0,(function*(){const{projectId:i,baseUrl:r}=e;if(s("projectId")||s("baseUrl")){if(!i)return;t.__classPrivateFieldGet(this,u,"m",x).call(this,i,r)}t.__classPrivateFieldGet(this,b,"f").call(this,e)}))},A=function(){return t.__awaiter(this,void 0,void 0,(function*(){const e=yield this.getConfig();return"isMissingConfig"in e&&e.isMissingConfig&&(yield t.__classPrivateFieldGet(this,u,"m",E).call(this))}))},E=function(){return t.__awaiter(this,void 0,void 0,(function*(){const t=l.getContentUrl({projectId:this.projectId,filename:K.CONFIG_FILENAME,assetsFolder:K.PREV_VER_ASSETS_FOLDER,baseUrl:this.baseStaticUrl});try{return yield l.fetchContent(t,"json"),!0}catch(t){return!1}}))},S=function(e){t.__classPrivateFieldSet(this,v,Object.assign(Object.assign({},t.__classPrivateFieldGet(this,v,"f")),e.detail),"f")},G=function(){return this.lazyStart?(t.__classPrivateFieldGet(this,I,"f")||t.__classPrivateFieldSet(this,I,new Promise((e=>{t.__classPrivateFieldSet(this,j,e,"f")})),"f"),t.__classPrivateFieldGet(this,I,"f")):Promise.resolve()},M=function(){var e;null===(e=t.__classPrivateFieldGet(this,_,"f"))||void 0===e||e.remove(),t.__classPrivateFieldSet(this,_,null,"f")},O=function(e){return t.__awaiter(this,arguments,void 0,(function*({isDebug:e}){e?(t.__classPrivateFieldSet(this,_,document.createElement("descope-debugger"),"f"),Object.assign(t.__classPrivateFieldGet(this,_,"f").style,{position:"fixed",top:"0",right:"0",height:"100vh",width:"100vw",pointerEvents:"none",zIndex:99999}),yield Promise.resolve().then((function(){return z(require("../debugger-wc.js"))})),document.body.appendChild(t.__classPrivateFieldGet(this,_,"f"))):t.__classPrivateFieldGet(this,u,"m",M).call(this)}))},q=function(e,i){var s;e&&this.debug&&(null===(s=t.__classPrivateFieldGet(this,_,"f"))||void 0===s||s.updateData({title:e,description:i}))},J.sdkConfigOverrides={baseHeaders:{"x-descope-sdk-name":"web-component","x-descope-sdk-version":"4.6.2"}},module.exports=J;
|
|
1
|
+
"use strict";var t=require("tslib"),e=require("@descope/sdk-helpers"),i=require("@descope/sdk-mixins/static-resources-mixin"),s=require("@descope/sdk-mixins/theme-mixin"),r=require("@descope/sdk-mixins/inject-style-mixin"),n=require("@descope/sdk-mixins/telemetry-mixin"),o=require("@descope/web-js-sdk"),a=require("../constants/index.js"),l=require("../helpers/helpers.js"),d=require("../helpers/state.js");require("@descope/escape-markdown"),require("../helpers/webauthn.js");var u,c,h,g,f,p,v,_,m,b,w,k,C,P,x,F,y,A,E,S,I,j,G,M,O,q,U=require("../helpers/storage.js"),L=require("../helpers/flowInputs.js"),R=require("../mixins/formMountMixin.js"),T=require("../mixins/componentConditionsMixin.js"),W=require("../mixins/duplicateFlowWarningMixin.js"),N=require("../mixins/passwordManagerMixin.js"),D=require("../mixins/validationTrackingMixin.js"),K=require("../constants/content.js"),V=require("../constants/general.js");function z(t){return Object.freeze({__proto__:null,default:t})}const H=e.compose(s.themeMixin,i.staticResourcesMixin,R.formMountMixin,T.componentConditionsMixin,W.duplicateFlowWarningMixin,N.passwordManagerMixin,r.injectStyleMixin,n.telemetryMixin,D.validationTrackingMixin)(HTMLElement);class J extends H{static get observedAttributes(){return["project-id","flow-id","base-url","tenant","locale","debug","storage-prefix","preview","redirect-url","auto-focus","store-last-authenticated-user","refresh-cookie-name","keep-last-authenticated-user-after-logout","validate-on-blur","send-session-token","style-id"]}constructor(e){super(),u.add(this),this.sdkVersion="4.6.3",h.set(this,!1),g.set(this,void 0),this.flowStatus="initial",this.loggerWrapper={error:(e,i="")=>{this.logger.error(e,i,new Error),t.__classPrivateFieldGet(this,u,"m",q).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)}},f.set(this,new d),p.set(this,new d),v.set(this,{}),this.getComponentsContext=()=>t.__classPrivateFieldGet(this,v,"f"),this.nextRequestStatus=new d({isLoading:!1}),_.set(this,void 0),m.set(this,{popstate:t.__classPrivateFieldGet(this,u,"m",P).bind(this),componentsContext:t.__classPrivateFieldGet(this,u,"m",S).bind(this)}),b.set(this,void 0),this.getConfig=()=>t.__awaiter(this,void 0,void 0,(function*(){return(yield this.config)||{isMissingConfig:!0}})),I.set(this,void 0),j.set(this,void 0),t.__classPrivateFieldSet(this,b,e,"f"),t.__classPrivateFieldGet(this,u,"m",k).call(this)}get client(){try{return JSON.parse(this.getAttribute("client"))||{}}catch(t){return{}}}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 refreshCookieName(){return this.getAttribute("refresh-cookie-name")||""}get keepLastAuthenticatedUserAfterLogout(){return"true"===this.getAttribute("keep-last-authenticated-user-after-logout")}get storagePrefix(){return this.getAttribute("storage-prefix")||""}get sendSessionToken(){return"true"===this.getAttribute("send-session-token")}get preview(){return!!this.getAttribute("preview")}get formConfig(){return L.transformFlowInputFormData(this.form)}get form(){return this.getAttribute("form")}get formConfigValues(){return L.extractNestedAttribute(this.formConfig,"value")}get outboundAppId(){return this.getAttribute("outbound-app-id")}get outboundAppScopes(){try{const t=JSON.parse(this.getAttribute("outbound-app-scopes"));return t||null}catch(t){return null}}get popupOrigin(){return this.getAttribute("popup-origin")}get customStorage(){return t.__classPrivateFieldGet(this,g,"f")}set customStorage(e){if(e&&"function"!=typeof e.getItem)throw new Error("Custom storage must have a getItem method");if(e&&"function"!=typeof e.setItem)throw new Error("Custom storage must have a setItem method");if(e&&"function"!=typeof e.removeItem)throw new Error("Custom storage must have a removeItem method");t.__classPrivateFieldSet(this,g,e,"f"),U.setCustomStorage(e)}get lazyStart(){return"true"===this.getAttribute("lazy-start")}start(){var e;null===(e=t.__classPrivateFieldGet(this,j,"f"))||void 0===e||e.call(this),t.__classPrivateFieldSet(this,I,Promise.resolve(),"f")}get isRestartOnError(){return"true"===this.getAttribute("restart-on-error")}getExecutionContext(){return t.__awaiter(this,void 0,void 0,(function*(){const t=yield this.getConfig();return"executionContext"in t?t.executionContext:void 0}))}getProjectConfig(){return t.__awaiter(this,void 0,void 0,(function*(){const t=yield this.getConfig();return"projectConfig"in t?t.projectConfig:void 0}))}getFlowConfig(){return t.__awaiter(this,void 0,void 0,(function*(){var t,e;const i=yield this.getProjectConfig(),s=(null===(t=null==i?void 0:i.flows)||void 0===t?void 0:t[this.flowId])||{};return null!==(e=s.version)&&void 0!==e||(s.version=0),s}))}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()))}))}handleKeyPress(){this.logger.debug("Enable key press handler"),this.rootElement.onkeydown=t=>{var e,i,s;const r=!!(null===(e=this.shadowRoot.activeElement)||void 0===e?void 0:e.getAttribute("href")),n=a.ELEMENTS_TO_IGNORE_ENTER_KEY_ON.includes(null!==(s=null===(i=this.shadowRoot.activeElement)||void 0===i?void 0:i.localName)&&void 0!==s?s:"");if("Enter"!==t.key||r||n)return;t.preventDefault();const o=this.rootElement.querySelectorAll("descope-button");if(1===o.length&&"false"!==o[0].getAttribute("auto-submit"))return void o[0].click();const l=Array.from(o).filter((t=>"true"===t.getAttribute("auto-submit")));if(1===l.length)return void l[0].click();const d=Array.from(o).filter((t=>"button"===t.getAttribute("data-type")));if(1===d.length)"false"!==d[0].getAttribute("auto-submit")&&d[0].click();else if(0===d.length){const t=Array.from(o).filter((t=>"sso"===t.getAttribute("data-type")));1===t.length&&"false"!==t[0].getAttribute("auto-submit")&&t[0].click()}}}disableKeyPressHandler(){this.logger.debug("Disable key press handler"),this.rootElement.onkeydown=null}getComponentsVersion(){return t.__awaiter(this,void 0,void 0,(function*(){var t;const e=yield this.getConfig(),i="projectConfig"in e?null===(t=e.projectConfig)||void 0===t?void 0:t.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,p,"f").subscribe(t.__classPrivateFieldGet(this,u,"m",O).bind(this)),t.__classPrivateFieldGet(this,p,"f").update({isDebug:this.debug}),t.__classPrivateFieldGet(this,u,"m",C).call(this),yield t.__classPrivateFieldGet(this,u,"m",A).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");const s=yield this.getConfig();if("isMissingConfig"in s&&s.isMissingConfig)return void this.loggerWrapper.error("Cannot get config file","Make sure that your projectId & flowId are correct");const{executionId:r,stepId:n,token:o,code:a,isPopup:d,exchangeError:c,redirectAuthCallbackUrl:g,redirectAuthBackupCallbackUri:v,redirectAuthCodeChallenge:_,redirectAuthInitiator:b,ssoQueryParams:w}=l.handleUrlParams(this.flowId,this.projectId,this.loggerWrapper);window.addEventListener("popstate",t.__classPrivateFieldGet(this,m,"f").popstate),window.addEventListener("components-context",t.__classPrivateFieldGet(this,m,"f").componentsContext),t.__classPrivateFieldGet(this,f,"f").subscribe(t.__classPrivateFieldGet(this,u,"m",y).bind(this)),t.__classPrivateFieldGet(this,f,"f").update(Object.assign({projectId:this.projectId,flowId:this.flowId,baseUrl:this.baseUrl,tenant:this.tenantId,redirectUrl:this.redirectUrl,locale:this.locale,stepId:n,executionId:r,token:o,code:a,isPopup:d,exchangeError:c,redirectAuthCallbackUrl:g,redirectAuthBackupCallbackUri:v,redirectAuthCodeChallenge:_,redirectAuthInitiator:b},w)),t.__classPrivateFieldSet(this,h,!0,"f")}))}disconnectedCallback(){var e;t.__classPrivateFieldGet(this,f,"f").unsubscribeAll(),t.__classPrivateFieldGet(this,p,"f").unsubscribeAll(),t.__classPrivateFieldGet(this,u,"m",M).call(this),window.removeEventListener("popstate",t.__classPrivateFieldGet(this,m,"f").popstate),window.removeEventListener("components-context",t.__classPrivateFieldGet(this,m,"f").componentsContext),null===(e=super.disconnectedCallback)||void 0===e||e.call(this)}attributeChangedCallback(e,i,s){var r;if(null===(r=super.attributeChangedCallback)||void 0===r||r.call(this,e,i,s),this.shadowRoot.isConnected&&t.__classPrivateFieldGet(this,h,"f")&&i!==s&&c.observedAttributes.includes(e)){t.__classPrivateFieldGet(this,u,"m",C).call(this);const r=null===i;t.__classPrivateFieldGet(this,f,"f").update((({stepId:t,executionId:i})=>{let n=t,o=i;return r||(o=null,n=null,l.clearRunIdsFromUrl()),{[l.camelCase(e)]:s,stepId:n,executionId:o}})),t.__classPrivateFieldGet(this,p,"f").update({isDebug:this.debug})}}}c=J,h=new WeakMap,g=new WeakMap,f=new WeakMap,p=new WeakMap,v=new WeakMap,_=new WeakMap,m=new WeakMap,b=new WeakMap,I=new WeakMap,j=new WeakMap,u=new WeakSet,w=function(){this.injectStyle("\n :host {\n\t\t\twidth: 100%;\n display: block;\n\t\t}\n\n\t\t#root {\n\t\t\theight: 100%;\n display: flex;\n flex-direction: column;\n\t\t}\n\n #content-root {\n all: initial;\n transition: opacity 200ms ease-in-out;\n }\n\n\t\t#root[data-theme] {\n\t\t\tbackground-color: transparent;\n\t\t}\n\n\t\t.fade-out {\n\t\t\topacity: 0.1!important;\n\t\t}\n\n .hidden {\n display: none;\n }\n ")},k=function(){t.__classPrivateFieldGet(this,u,"m",w).call(this),this.slotElement=document.createElement("slot"),this.slotElement.classList.add("hidden"),this.rootElement.appendChild(this.slotElement)},C=function(){const t=["base-url","tenant","locale","debug","redirect-url","auto-focus","store-last-authenticated-user","refresh-cookie-name","keep-last-authenticated-user-after-logout","preview","storage-prefix","form","client","validate-on-blur","send-session-token","style-id","outbound-app-id","outbound-app-scopes","theme-override"];c.observedAttributes.forEach((e=>{if(!t.includes(e)&&!this[l.camelCase(e)])throw Error(`${e} cannot be empty`)}))},P=function(){const{stepId:e,executionId:i}=l.getRunIdsFromUrl(this.flowId);t.__classPrivateFieldGet(this,f,"f").update({stepId:e,executionId:i})},x=function(e,i){o.createSdk&&"function"==typeof o.createSdk||this.logger.error("SDK was not loaded properly",o.createSdk,JSON.stringify(o.createSdk));const s=Object.assign(Object.assign({persistTokens:!0,preview:this.preview,storagePrefix:this.storagePrefix,storeLastAuthenticatedUser:this.storeLastAuthenticatedUser,keepLastAuthenticatedUserAfterLogout:this.keepLastAuthenticatedUserAfterLogout,refreshCookieName:this.refreshCookieName},c.sdkConfigOverrides),{projectId:e,baseUrl:i});t.__classPrivateFieldGet(this,g,"f")&&(s.customStorage=t.__classPrivateFieldGet(this,g,"f")),this.sdk=o.createSdk(s);const r={start:1,next:7};["start","next"].forEach((e=>{const i=this.sdk.flow[e],s=l.withRetry(i,1e3,3);this.sdk.flow[e]=(...i)=>t.__awaiter(this,void 0,void 0,(function*(){const n=[...i],o=r[e],a=t.__classPrivateFieldGet(this,u,"m",F).call(this,n[o]);void 0!==a&&(n[o]=a);try{return yield s(...n)}catch(t){return this.logger.error(`Error in sdk flow ${e} function`,t),{error:{errorCode:V.FETCH_EXCEPTION_ERROR_CODE,errorDescription:t.toString()}}}}))}));const n=this.sdk.flow.start;this.sdk.flow.start=(...e)=>t.__awaiter(this,void 0,void 0,(function*(){return yield t.__classPrivateFieldGet(this,u,"m",G).call(this),n.apply(this.sdk.flow,e)}))},F=function(t){if(!this.sendSessionToken)return t;const e=null===o.getSessionToken||void 0===o.getSessionToken?void 0:o.getSessionToken(this.storagePrefix);return e?Object.assign(Object.assign({},null!=t?t:{}),{sessionJwt:e}):t},y=function(e,i,s){return t.__awaiter(this,void 0,void 0,(function*(){const{projectId:i,baseUrl:r}=e;if(s("projectId")||s("baseUrl")){if(!i)return;t.__classPrivateFieldGet(this,u,"m",x).call(this,i,r)}t.__classPrivateFieldGet(this,b,"f").call(this,e)}))},A=function(){return t.__awaiter(this,void 0,void 0,(function*(){const e=yield this.getConfig();return"isMissingConfig"in e&&e.isMissingConfig&&(yield t.__classPrivateFieldGet(this,u,"m",E).call(this))}))},E=function(){return t.__awaiter(this,void 0,void 0,(function*(){const t=l.getContentUrl({projectId:this.projectId,filename:K.CONFIG_FILENAME,assetsFolder:K.PREV_VER_ASSETS_FOLDER,baseUrl:this.baseStaticUrl});try{return yield l.fetchContent(t,"json"),!0}catch(t){return!1}}))},S=function(e){t.__classPrivateFieldSet(this,v,Object.assign(Object.assign({},t.__classPrivateFieldGet(this,v,"f")),e.detail),"f")},G=function(){return this.lazyStart?(t.__classPrivateFieldGet(this,I,"f")||t.__classPrivateFieldSet(this,I,new Promise((e=>{t.__classPrivateFieldSet(this,j,e,"f")})),"f"),t.__classPrivateFieldGet(this,I,"f")):Promise.resolve()},M=function(){var e;null===(e=t.__classPrivateFieldGet(this,_,"f"))||void 0===e||e.remove(),t.__classPrivateFieldSet(this,_,null,"f")},O=function(e){return t.__awaiter(this,arguments,void 0,(function*({isDebug:e}){e?(t.__classPrivateFieldSet(this,_,document.createElement("descope-debugger"),"f"),Object.assign(t.__classPrivateFieldGet(this,_,"f").style,{position:"fixed",top:"0",right:"0",height:"100vh",width:"100vw",pointerEvents:"none",zIndex:99999}),yield Promise.resolve().then((function(){return z(require("../debugger-wc.js"))})),document.body.appendChild(t.__classPrivateFieldGet(this,_,"f"))):t.__classPrivateFieldGet(this,u,"m",M).call(this)}))},q=function(e,i){var s;e&&this.debug&&(null===(s=t.__classPrivateFieldGet(this,_,"f"))||void 0===s||s.updateData({title:e,description:i}))},J.sdkConfigOverrides={baseHeaders:{"x-descope-sdk-name":"web-component","x-descope-sdk-version":"4.6.3"}},module.exports=J;
|
|
2
2
|
//# sourceMappingURL=BaseDescopeWc.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__classPrivateFieldGet as t,__awaiter as e,__classPrivateFieldSet as i}from"tslib";import{compose as s}from"@descope/sdk-helpers";import{staticResourcesMixin as r}from"@descope/sdk-mixins/static-resources-mixin";import{themeMixin as o}from"@descope/sdk-mixins/theme-mixin";import{injectStyleMixin as n}from"@descope/sdk-mixins/inject-style-mixin";import{telemetryMixin as a}from"@descope/sdk-mixins/telemetry-mixin";import{createSdk as u,getSessionToken as l}from"@descope/web-js-sdk";import{ELEMENTS_TO_IGNORE_ENTER_KEY_ON as d}from"../constants/index.js";import{handleUrlParams as h,clearRunIdsFromUrl as c,camelCase as f,getRunIdsFromUrl as g,getContentUrl as p,fetchContent as m,withRetry as v}from"../helpers/helpers.js";import b from"../helpers/state.js";import"@descope/escape-markdown";import"../helpers/webauthn.js";import{setCustomStorage as w}from"../helpers/storage.js";import{transformFlowInputFormData as k,extractNestedAttribute as y}from"../helpers/flowInputs.js";import{formMountMixin as C}from"../mixins/formMountMixin.js";import{componentConditionsMixin as x}from"../mixins/componentConditionsMixin.js";import{duplicateFlowWarningMixin as A}from"../mixins/duplicateFlowWarningMixin.js";import{passwordManagerMixin as j}from"../mixins/passwordManagerMixin.js";import{validationTrackingMixin as I}from"../mixins/validationTrackingMixin.js";import{CONFIG_FILENAME as E,PREV_VER_ASSETS_FOLDER as M}from"../constants/content.js";import{FETCH_EXCEPTION_ERROR_CODE as S}from"../constants/general.js";var L,U,O,W,P,D,N,T,F,K,R,z,J,V,B,H,q,$,Q,G,X,Y,Z,_,tt,et;const it=s(o,r,C,x,A,j,n,a,I)(HTMLElement);class st extends it{static get observedAttributes(){return["project-id","flow-id","base-url","tenant","locale","debug","storage-prefix","preview","redirect-url","auto-focus","store-last-authenticated-user","refresh-cookie-name","keep-last-authenticated-user-after-logout","validate-on-blur","send-session-token","style-id"]}constructor(s){super(),L.add(this),this.sdkVersion="4.6.2",O.set(this,!1),W.set(this,void 0),this.flowStatus="initial",this.loggerWrapper={error:(e,i="")=>{this.logger.error(e,i,new Error),t(this,L,"m",et).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)}},P.set(this,new b),D.set(this,new b),N.set(this,{}),this.getComponentsContext=()=>t(this,N,"f"),this.nextRequestStatus=new b({isLoading:!1}),T.set(this,void 0),F.set(this,{popstate:t(this,L,"m",V).bind(this),componentsContext:t(this,L,"m",G).bind(this)}),K.set(this,void 0),this.getConfig=()=>e(this,void 0,void 0,(function*(){return(yield this.config)||{isMissingConfig:!0}})),X.set(this,void 0),Y.set(this,void 0),i(this,K,s,"f"),t(this,L,"m",z).call(this)}get client(){try{return JSON.parse(this.getAttribute("client"))||{}}catch(t){return{}}}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 refreshCookieName(){return this.getAttribute("refresh-cookie-name")||""}get keepLastAuthenticatedUserAfterLogout(){return"true"===this.getAttribute("keep-last-authenticated-user-after-logout")}get storagePrefix(){return this.getAttribute("storage-prefix")||""}get sendSessionToken(){return"true"===this.getAttribute("send-session-token")}get preview(){return!!this.getAttribute("preview")}get formConfig(){return k(this.form)}get form(){return this.getAttribute("form")}get formConfigValues(){return y(this.formConfig,"value")}get outboundAppId(){return this.getAttribute("outbound-app-id")}get outboundAppScopes(){try{const t=JSON.parse(this.getAttribute("outbound-app-scopes"));return t||null}catch(t){return null}}get popupOrigin(){return this.getAttribute("popup-origin")}get customStorage(){return t(this,W,"f")}set customStorage(t){if(t&&"function"!=typeof t.getItem)throw new Error("Custom storage must have a getItem method");if(t&&"function"!=typeof t.setItem)throw new Error("Custom storage must have a setItem method");if(t&&"function"!=typeof t.removeItem)throw new Error("Custom storage must have a removeItem method");i(this,W,t,"f"),w(t)}get lazyStart(){return"true"===this.getAttribute("lazy-start")}start(){var e;null===(e=t(this,Y,"f"))||void 0===e||e.call(this),i(this,X,Promise.resolve(),"f")}get isRestartOnError(){return"true"===this.getAttribute("restart-on-error")}getExecutionContext(){return e(this,void 0,void 0,(function*(){const t=yield this.getConfig();return"executionContext"in t?t.executionContext:void 0}))}getProjectConfig(){return e(this,void 0,void 0,(function*(){const t=yield this.getConfig();return"projectConfig"in t?t.projectConfig:void 0}))}getFlowConfig(){return e(this,void 0,void 0,(function*(){var t,e;const i=yield this.getProjectConfig(),s=(null===(t=null==i?void 0:i.flows)||void 0===t?void 0:t[this.flowId])||{};return null!==(e=s.version)&&void 0!==e||(s.version=0),s}))}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()))}))}handleKeyPress(){this.logger.debug("Enable key press handler"),this.rootElement.onkeydown=t=>{var e,i,s;const r=!!(null===(e=this.shadowRoot.activeElement)||void 0===e?void 0:e.getAttribute("href")),o=d.includes(null!==(s=null===(i=this.shadowRoot.activeElement)||void 0===i?void 0:i.localName)&&void 0!==s?s:"");if("Enter"!==t.key||r||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 u=Array.from(n).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(n).filter((t=>"sso"===t.getAttribute("data-type")));1===t.length&&"false"!==t[0].getAttribute("auto-submit")&&t[0].click()}}}disableKeyPressHandler(){this.logger.debug("Disable key press handler"),this.rootElement.onkeydown=null}getComponentsVersion(){return e(this,void 0,void 0,(function*(){var t;const e=yield this.getConfig(),i="projectConfig"in e?null===(t=e.projectConfig)||void 0===t?void 0:t.componentsVersion:{};return i||(this.logger.error("Did not get components version, using latest version"),"latest")}))}init(){const s=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=s.init)||void 0===e?void 0:e.call(this),t(this,D,"f").subscribe(t(this,L,"m",tt).bind(this)),t(this,D,"f").update({isDebug:this.debug}),t(this,L,"m",J).call(this),yield t(this,L,"m",$).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");const r=yield this.getConfig();if("isMissingConfig"in r&&r.isMissingConfig)return void this.loggerWrapper.error("Cannot get config file","Make sure that your projectId & flowId are correct");const{executionId:o,stepId:n,token:a,code:u,isPopup:l,exchangeError:d,redirectAuthCallbackUrl:c,redirectAuthBackupCallbackUri:f,redirectAuthCodeChallenge:g,redirectAuthInitiator:p,ssoQueryParams:m}=h(this.flowId,this.projectId,this.loggerWrapper);window.addEventListener("popstate",t(this,F,"f").popstate),window.addEventListener("components-context",t(this,F,"f").componentsContext),t(this,P,"f").subscribe(t(this,L,"m",q).bind(this)),t(this,P,"f").update(Object.assign({projectId:this.projectId,flowId:this.flowId,baseUrl:this.baseUrl,tenant:this.tenantId,redirectUrl:this.redirectUrl,locale:this.locale,stepId:n,executionId:o,token:a,code:u,isPopup:l,exchangeError:d,redirectAuthCallbackUrl:c,redirectAuthBackupCallbackUri:f,redirectAuthCodeChallenge:g,redirectAuthInitiator:p},m)),i(this,O,!0,"f")}))}disconnectedCallback(){var e;t(this,P,"f").unsubscribeAll(),t(this,D,"f").unsubscribeAll(),t(this,L,"m",_).call(this),window.removeEventListener("popstate",t(this,F,"f").popstate),window.removeEventListener("components-context",t(this,F,"f").componentsContext),null===(e=super.disconnectedCallback)||void 0===e||e.call(this)}attributeChangedCallback(e,i,s){var r;if(null===(r=super.attributeChangedCallback)||void 0===r||r.call(this,e,i,s),this.shadowRoot.isConnected&&t(this,O,"f")&&i!==s&&U.observedAttributes.includes(e)){t(this,L,"m",J).call(this);const r=null===i;t(this,P,"f").update((({stepId:t,executionId:i})=>{let o=t,n=i;return r||(n=null,o=null,c()),{[f(e)]:s,stepId:o,executionId:n}})),t(this,D,"f").update({isDebug:this.debug})}}}U=st,O=new WeakMap,W=new WeakMap,P=new WeakMap,D=new WeakMap,N=new WeakMap,T=new WeakMap,F=new WeakMap,K=new WeakMap,X=new WeakMap,Y=new WeakMap,L=new WeakSet,R=function(){this.injectStyle("\n :host {\n\t\t\twidth: 100%;\n display: block;\n\t\t}\n\n\t\t#root {\n\t\t\theight: 100%;\n display: flex;\n flex-direction: column;\n\t\t}\n\n #content-root {\n all: initial;\n transition: opacity 200ms ease-in-out;\n }\n\n\t\t#root[data-theme] {\n\t\t\tbackground-color: transparent;\n\t\t}\n\n\t\t.fade-out {\n\t\t\topacity: 0.1!important;\n\t\t}\n\n .hidden {\n display: none;\n }\n ")},z=function(){t(this,L,"m",R).call(this),this.slotElement=document.createElement("slot"),this.slotElement.classList.add("hidden"),this.rootElement.appendChild(this.slotElement)},J=function(){const t=["base-url","tenant","locale","debug","redirect-url","auto-focus","store-last-authenticated-user","refresh-cookie-name","keep-last-authenticated-user-after-logout","preview","storage-prefix","form","client","validate-on-blur","send-session-token","style-id","outbound-app-id","outbound-app-scopes","theme-override"];U.observedAttributes.forEach((e=>{if(!t.includes(e)&&!this[f(e)])throw Error(`${e} cannot be empty`)}))},V=function(){const{stepId:e,executionId:i}=g(this.flowId);t(this,P,"f").update({stepId:e,executionId:i})},B=function(i,s){u&&"function"==typeof u||this.logger.error("SDK was not loaded properly",u,JSON.stringify(u));const r=Object.assign(Object.assign({persistTokens:!0,preview:this.preview,storagePrefix:this.storagePrefix,storeLastAuthenticatedUser:this.storeLastAuthenticatedUser,keepLastAuthenticatedUserAfterLogout:this.keepLastAuthenticatedUserAfterLogout,refreshCookieName:this.refreshCookieName},U.sdkConfigOverrides),{projectId:i,baseUrl:s});t(this,W,"f")&&(r.customStorage=t(this,W,"f")),this.sdk=u(r);const o={start:1,next:7};["start","next"].forEach((i=>{const s=this.sdk.flow[i],r=v(s,1e3,3);this.sdk.flow[i]=(...s)=>e(this,void 0,void 0,(function*(){const e=[...s],n=o[i],a=t(this,L,"m",H).call(this,e[n]);void 0!==a&&(e[n]=a);try{return yield r(...e)}catch(t){return this.logger.error(`Error in sdk flow ${i} function`,t),{error:{errorCode:S,errorDescription:t.toString()}}}}))}));const n=this.sdk.flow.start;this.sdk.flow.start=(...i)=>e(this,void 0,void 0,(function*(){return yield t(this,L,"m",Z).call(this),n.apply(this.sdk.flow,i)}))},H=function(t){if(!this.sendSessionToken)return t;const e=null==l?void 0:l(this.storagePrefix);return e?Object.assign(Object.assign({},null!=t?t:{}),{sessionJwt:e}):t},q=function(i,s,r){return e(this,void 0,void 0,(function*(){const{projectId:e,baseUrl:s}=i;if(r("projectId")||r("baseUrl")){if(!e)return;t(this,L,"m",B).call(this,e,s)}t(this,K,"f").call(this,i)}))},$=function(){return e(this,void 0,void 0,(function*(){const e=yield this.getConfig();return"isMissingConfig"in e&&e.isMissingConfig&&(yield t(this,L,"m",Q).call(this))}))},Q=function(){return e(this,void 0,void 0,(function*(){const t=p({projectId:this.projectId,filename:E,assetsFolder:M,baseUrl:this.baseStaticUrl});try{return yield m(t,"json"),!0}catch(t){return!1}}))},G=function(e){i(this,N,Object.assign(Object.assign({},t(this,N,"f")),e.detail),"f")},Z=function(){return this.lazyStart?(t(this,X,"f")||i(this,X,new Promise((t=>{i(this,Y,t,"f")})),"f"),t(this,X,"f")):Promise.resolve()},_=function(){var e;null===(e=t(this,T,"f"))||void 0===e||e.remove(),i(this,T,null,"f")},tt=function(s){return e(this,arguments,void 0,(function*({isDebug:e}){e?(i(this,T,document.createElement("descope-debugger"),"f"),Object.assign(t(this,T,"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,T,"f"))):t(this,L,"m",_).call(this)}))},et=function(e,i){var s;e&&this.debug&&(null===(s=t(this,T,"f"))||void 0===s||s.updateData({title:e,description:i}))},st.sdkConfigOverrides={baseHeaders:{"x-descope-sdk-name":"web-component","x-descope-sdk-version":"4.6.2"}};export{st as default};
|
|
1
|
+
import{__classPrivateFieldGet as t,__awaiter as e,__classPrivateFieldSet as i}from"tslib";import{compose as s}from"@descope/sdk-helpers";import{staticResourcesMixin as r}from"@descope/sdk-mixins/static-resources-mixin";import{themeMixin as o}from"@descope/sdk-mixins/theme-mixin";import{injectStyleMixin as n}from"@descope/sdk-mixins/inject-style-mixin";import{telemetryMixin as a}from"@descope/sdk-mixins/telemetry-mixin";import{createSdk as u,getSessionToken as l}from"@descope/web-js-sdk";import{ELEMENTS_TO_IGNORE_ENTER_KEY_ON as d}from"../constants/index.js";import{handleUrlParams as h,clearRunIdsFromUrl as c,camelCase as f,getRunIdsFromUrl as g,getContentUrl as p,fetchContent as m,withRetry as v}from"../helpers/helpers.js";import b from"../helpers/state.js";import"@descope/escape-markdown";import"../helpers/webauthn.js";import{setCustomStorage as w}from"../helpers/storage.js";import{transformFlowInputFormData as k,extractNestedAttribute as y}from"../helpers/flowInputs.js";import{formMountMixin as C}from"../mixins/formMountMixin.js";import{componentConditionsMixin as x}from"../mixins/componentConditionsMixin.js";import{duplicateFlowWarningMixin as A}from"../mixins/duplicateFlowWarningMixin.js";import{passwordManagerMixin as j}from"../mixins/passwordManagerMixin.js";import{validationTrackingMixin as I}from"../mixins/validationTrackingMixin.js";import{CONFIG_FILENAME as E,PREV_VER_ASSETS_FOLDER as M}from"../constants/content.js";import{FETCH_EXCEPTION_ERROR_CODE as S}from"../constants/general.js";var L,U,O,W,P,D,N,T,F,K,R,z,J,V,B,H,q,$,Q,G,X,Y,Z,_,tt,et;const it=s(o,r,C,x,A,j,n,a,I)(HTMLElement);class st extends it{static get observedAttributes(){return["project-id","flow-id","base-url","tenant","locale","debug","storage-prefix","preview","redirect-url","auto-focus","store-last-authenticated-user","refresh-cookie-name","keep-last-authenticated-user-after-logout","validate-on-blur","send-session-token","style-id"]}constructor(s){super(),L.add(this),this.sdkVersion="4.6.3",O.set(this,!1),W.set(this,void 0),this.flowStatus="initial",this.loggerWrapper={error:(e,i="")=>{this.logger.error(e,i,new Error),t(this,L,"m",et).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)}},P.set(this,new b),D.set(this,new b),N.set(this,{}),this.getComponentsContext=()=>t(this,N,"f"),this.nextRequestStatus=new b({isLoading:!1}),T.set(this,void 0),F.set(this,{popstate:t(this,L,"m",V).bind(this),componentsContext:t(this,L,"m",G).bind(this)}),K.set(this,void 0),this.getConfig=()=>e(this,void 0,void 0,(function*(){return(yield this.config)||{isMissingConfig:!0}})),X.set(this,void 0),Y.set(this,void 0),i(this,K,s,"f"),t(this,L,"m",z).call(this)}get client(){try{return JSON.parse(this.getAttribute("client"))||{}}catch(t){return{}}}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 refreshCookieName(){return this.getAttribute("refresh-cookie-name")||""}get keepLastAuthenticatedUserAfterLogout(){return"true"===this.getAttribute("keep-last-authenticated-user-after-logout")}get storagePrefix(){return this.getAttribute("storage-prefix")||""}get sendSessionToken(){return"true"===this.getAttribute("send-session-token")}get preview(){return!!this.getAttribute("preview")}get formConfig(){return k(this.form)}get form(){return this.getAttribute("form")}get formConfigValues(){return y(this.formConfig,"value")}get outboundAppId(){return this.getAttribute("outbound-app-id")}get outboundAppScopes(){try{const t=JSON.parse(this.getAttribute("outbound-app-scopes"));return t||null}catch(t){return null}}get popupOrigin(){return this.getAttribute("popup-origin")}get customStorage(){return t(this,W,"f")}set customStorage(t){if(t&&"function"!=typeof t.getItem)throw new Error("Custom storage must have a getItem method");if(t&&"function"!=typeof t.setItem)throw new Error("Custom storage must have a setItem method");if(t&&"function"!=typeof t.removeItem)throw new Error("Custom storage must have a removeItem method");i(this,W,t,"f"),w(t)}get lazyStart(){return"true"===this.getAttribute("lazy-start")}start(){var e;null===(e=t(this,Y,"f"))||void 0===e||e.call(this),i(this,X,Promise.resolve(),"f")}get isRestartOnError(){return"true"===this.getAttribute("restart-on-error")}getExecutionContext(){return e(this,void 0,void 0,(function*(){const t=yield this.getConfig();return"executionContext"in t?t.executionContext:void 0}))}getProjectConfig(){return e(this,void 0,void 0,(function*(){const t=yield this.getConfig();return"projectConfig"in t?t.projectConfig:void 0}))}getFlowConfig(){return e(this,void 0,void 0,(function*(){var t,e;const i=yield this.getProjectConfig(),s=(null===(t=null==i?void 0:i.flows)||void 0===t?void 0:t[this.flowId])||{};return null!==(e=s.version)&&void 0!==e||(s.version=0),s}))}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()))}))}handleKeyPress(){this.logger.debug("Enable key press handler"),this.rootElement.onkeydown=t=>{var e,i,s;const r=!!(null===(e=this.shadowRoot.activeElement)||void 0===e?void 0:e.getAttribute("href")),o=d.includes(null!==(s=null===(i=this.shadowRoot.activeElement)||void 0===i?void 0:i.localName)&&void 0!==s?s:"");if("Enter"!==t.key||r||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 u=Array.from(n).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(n).filter((t=>"sso"===t.getAttribute("data-type")));1===t.length&&"false"!==t[0].getAttribute("auto-submit")&&t[0].click()}}}disableKeyPressHandler(){this.logger.debug("Disable key press handler"),this.rootElement.onkeydown=null}getComponentsVersion(){return e(this,void 0,void 0,(function*(){var t;const e=yield this.getConfig(),i="projectConfig"in e?null===(t=e.projectConfig)||void 0===t?void 0:t.componentsVersion:{};return i||(this.logger.error("Did not get components version, using latest version"),"latest")}))}init(){const s=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=s.init)||void 0===e?void 0:e.call(this),t(this,D,"f").subscribe(t(this,L,"m",tt).bind(this)),t(this,D,"f").update({isDebug:this.debug}),t(this,L,"m",J).call(this),yield t(this,L,"m",$).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");const r=yield this.getConfig();if("isMissingConfig"in r&&r.isMissingConfig)return void this.loggerWrapper.error("Cannot get config file","Make sure that your projectId & flowId are correct");const{executionId:o,stepId:n,token:a,code:u,isPopup:l,exchangeError:d,redirectAuthCallbackUrl:c,redirectAuthBackupCallbackUri:f,redirectAuthCodeChallenge:g,redirectAuthInitiator:p,ssoQueryParams:m}=h(this.flowId,this.projectId,this.loggerWrapper);window.addEventListener("popstate",t(this,F,"f").popstate),window.addEventListener("components-context",t(this,F,"f").componentsContext),t(this,P,"f").subscribe(t(this,L,"m",q).bind(this)),t(this,P,"f").update(Object.assign({projectId:this.projectId,flowId:this.flowId,baseUrl:this.baseUrl,tenant:this.tenantId,redirectUrl:this.redirectUrl,locale:this.locale,stepId:n,executionId:o,token:a,code:u,isPopup:l,exchangeError:d,redirectAuthCallbackUrl:c,redirectAuthBackupCallbackUri:f,redirectAuthCodeChallenge:g,redirectAuthInitiator:p},m)),i(this,O,!0,"f")}))}disconnectedCallback(){var e;t(this,P,"f").unsubscribeAll(),t(this,D,"f").unsubscribeAll(),t(this,L,"m",_).call(this),window.removeEventListener("popstate",t(this,F,"f").popstate),window.removeEventListener("components-context",t(this,F,"f").componentsContext),null===(e=super.disconnectedCallback)||void 0===e||e.call(this)}attributeChangedCallback(e,i,s){var r;if(null===(r=super.attributeChangedCallback)||void 0===r||r.call(this,e,i,s),this.shadowRoot.isConnected&&t(this,O,"f")&&i!==s&&U.observedAttributes.includes(e)){t(this,L,"m",J).call(this);const r=null===i;t(this,P,"f").update((({stepId:t,executionId:i})=>{let o=t,n=i;return r||(n=null,o=null,c()),{[f(e)]:s,stepId:o,executionId:n}})),t(this,D,"f").update({isDebug:this.debug})}}}U=st,O=new WeakMap,W=new WeakMap,P=new WeakMap,D=new WeakMap,N=new WeakMap,T=new WeakMap,F=new WeakMap,K=new WeakMap,X=new WeakMap,Y=new WeakMap,L=new WeakSet,R=function(){this.injectStyle("\n :host {\n\t\t\twidth: 100%;\n display: block;\n\t\t}\n\n\t\t#root {\n\t\t\theight: 100%;\n display: flex;\n flex-direction: column;\n\t\t}\n\n #content-root {\n all: initial;\n transition: opacity 200ms ease-in-out;\n }\n\n\t\t#root[data-theme] {\n\t\t\tbackground-color: transparent;\n\t\t}\n\n\t\t.fade-out {\n\t\t\topacity: 0.1!important;\n\t\t}\n\n .hidden {\n display: none;\n }\n ")},z=function(){t(this,L,"m",R).call(this),this.slotElement=document.createElement("slot"),this.slotElement.classList.add("hidden"),this.rootElement.appendChild(this.slotElement)},J=function(){const t=["base-url","tenant","locale","debug","redirect-url","auto-focus","store-last-authenticated-user","refresh-cookie-name","keep-last-authenticated-user-after-logout","preview","storage-prefix","form","client","validate-on-blur","send-session-token","style-id","outbound-app-id","outbound-app-scopes","theme-override"];U.observedAttributes.forEach((e=>{if(!t.includes(e)&&!this[f(e)])throw Error(`${e} cannot be empty`)}))},V=function(){const{stepId:e,executionId:i}=g(this.flowId);t(this,P,"f").update({stepId:e,executionId:i})},B=function(i,s){u&&"function"==typeof u||this.logger.error("SDK was not loaded properly",u,JSON.stringify(u));const r=Object.assign(Object.assign({persistTokens:!0,preview:this.preview,storagePrefix:this.storagePrefix,storeLastAuthenticatedUser:this.storeLastAuthenticatedUser,keepLastAuthenticatedUserAfterLogout:this.keepLastAuthenticatedUserAfterLogout,refreshCookieName:this.refreshCookieName},U.sdkConfigOverrides),{projectId:i,baseUrl:s});t(this,W,"f")&&(r.customStorage=t(this,W,"f")),this.sdk=u(r);const o={start:1,next:7};["start","next"].forEach((i=>{const s=this.sdk.flow[i],r=v(s,1e3,3);this.sdk.flow[i]=(...s)=>e(this,void 0,void 0,(function*(){const e=[...s],n=o[i],a=t(this,L,"m",H).call(this,e[n]);void 0!==a&&(e[n]=a);try{return yield r(...e)}catch(t){return this.logger.error(`Error in sdk flow ${i} function`,t),{error:{errorCode:S,errorDescription:t.toString()}}}}))}));const n=this.sdk.flow.start;this.sdk.flow.start=(...i)=>e(this,void 0,void 0,(function*(){return yield t(this,L,"m",Z).call(this),n.apply(this.sdk.flow,i)}))},H=function(t){if(!this.sendSessionToken)return t;const e=null==l?void 0:l(this.storagePrefix);return e?Object.assign(Object.assign({},null!=t?t:{}),{sessionJwt:e}):t},q=function(i,s,r){return e(this,void 0,void 0,(function*(){const{projectId:e,baseUrl:s}=i;if(r("projectId")||r("baseUrl")){if(!e)return;t(this,L,"m",B).call(this,e,s)}t(this,K,"f").call(this,i)}))},$=function(){return e(this,void 0,void 0,(function*(){const e=yield this.getConfig();return"isMissingConfig"in e&&e.isMissingConfig&&(yield t(this,L,"m",Q).call(this))}))},Q=function(){return e(this,void 0,void 0,(function*(){const t=p({projectId:this.projectId,filename:E,assetsFolder:M,baseUrl:this.baseStaticUrl});try{return yield m(t,"json"),!0}catch(t){return!1}}))},G=function(e){i(this,N,Object.assign(Object.assign({},t(this,N,"f")),e.detail),"f")},Z=function(){return this.lazyStart?(t(this,X,"f")||i(this,X,new Promise((t=>{i(this,Y,t,"f")})),"f"),t(this,X,"f")):Promise.resolve()},_=function(){var e;null===(e=t(this,T,"f"))||void 0===e||e.remove(),i(this,T,null,"f")},tt=function(s){return e(this,arguments,void 0,(function*({isDebug:e}){e?(i(this,T,document.createElement("descope-debugger"),"f"),Object.assign(t(this,T,"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,T,"f"))):t(this,L,"m",_).call(this)}))},et=function(e,i){var s;e&&this.debug&&(null===(s=t(this,T,"f"))||void 0===s||s.updateData({title:e,description:i}))},st.sdkConfigOverrides={baseHeaders:{"x-descope-sdk-name":"web-component","x-descope-sdk-version":"4.6.3"}};export{st as default};
|
|
2
2
|
//# sourceMappingURL=BaseDescopeWc.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -464,17 +464,17 @@ type ValidationErrorEvent = {
|
|
|
464
464
|
|
|
465
465
|
declare const BaseClass: {
|
|
466
466
|
new (...params: any[]): {
|
|
467
|
-
"__#
|
|
468
|
-
"__#
|
|
469
|
-
"__#
|
|
470
|
-
"__#
|
|
471
|
-
"__#
|
|
472
|
-
"__#
|
|
473
|
-
"__#
|
|
474
|
-
"__#
|
|
475
|
-
"__#
|
|
476
|
-
"__#
|
|
477
|
-
"__#
|
|
467
|
+
"__#13@#buffer": ValidationErrorEvent[];
|
|
468
|
+
"__#13@#bufferExecutionId"?: string;
|
|
469
|
+
"__#13@#flushTimer"?: NodeJS.Timeout;
|
|
470
|
+
"__#13@#retryTimers": Set<NodeJS.Timeout>;
|
|
471
|
+
"__#13@#listenersAttached": boolean;
|
|
472
|
+
"__#13@#generation": number;
|
|
473
|
+
"__#13@#send"?: ValidationSender;
|
|
474
|
+
"__#13@#enabled": boolean;
|
|
475
|
+
"__#13@#boundFlushOnEnd": () => void;
|
|
476
|
+
"__#13@#boundFlushOnHide": () => void;
|
|
477
|
+
"__#13@#boundFlushOnPageHide": () => void;
|
|
478
478
|
setValidationTrackingEnabled(enabled: boolean): void;
|
|
479
479
|
setValidationTrackingSender(send: ValidationSender): void;
|
|
480
480
|
setValidationTrackingExecution(executionId: string): void;
|
|
@@ -483,20 +483,20 @@ declare const BaseClass: {
|
|
|
483
483
|
screenId?: string;
|
|
484
484
|
screenName?: string;
|
|
485
485
|
}): void;
|
|
486
|
-
"__#
|
|
486
|
+
"__#13@#collect"(inputs: HTMLInputElement[], context: {
|
|
487
487
|
executionId?: string;
|
|
488
488
|
screenId?: string;
|
|
489
489
|
screenName?: string;
|
|
490
490
|
}): void;
|
|
491
|
-
"__#
|
|
492
|
-
"__#
|
|
493
|
-
"__#
|
|
494
|
-
"__#
|
|
495
|
-
"__#
|
|
496
|
-
"__#
|
|
491
|
+
"__#13@#scheduleFlush"(): void;
|
|
492
|
+
"__#13@#discard"(): void;
|
|
493
|
+
"__#13@#flush"(isUnload: boolean): void;
|
|
494
|
+
"__#13@#sendWithRetry"(batch: ValidationBatch, retriesLeft: number, generation: number): void;
|
|
495
|
+
"__#13@#scheduleRetry"(batch: ValidationBatch, retriesLeft: number, generation: number): void;
|
|
496
|
+
"__#13@#attachListeners"(): void;
|
|
497
497
|
teardownValidationTracking(): void;
|
|
498
|
-
"__#
|
|
499
|
-
"__#
|
|
498
|
+
"__#43302@#logger": _descope_sdk_mixins_static_resources_mixin.Logger;
|
|
499
|
+
"__#43302@#wrapLogger"(logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>): _descope_sdk_mixins_static_resources_mixin.Logger;
|
|
500
500
|
get logger(): _descope_sdk_mixins_static_resources_mixin.Logger;
|
|
501
501
|
set logger(logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>);
|
|
502
502
|
onLogEvent(logLevel: "error" | "warn" | "info" | "debug", data: any[]): void;
|
|
@@ -892,18 +892,18 @@ declare const BaseClass: {
|
|
|
892
892
|
focus: ((options?: FocusOptions) => void) & ((options?: FocusOptions) => void);
|
|
893
893
|
};
|
|
894
894
|
} & (new (...args: any) => {
|
|
895
|
-
"__#
|
|
896
|
-
"__#
|
|
897
|
-
"__#
|
|
898
|
-
"__#
|
|
895
|
+
"__#43322@#telemetryManager": any;
|
|
896
|
+
"__#43322@#telemetryInitialized": boolean;
|
|
897
|
+
"__#43322@#expirationTimeoutId": NodeJS.Timeout;
|
|
898
|
+
"__#43322@#initializeTelemetry"(config: _descope_sdk_mixins_static_resources_mixin.TelemetryConfig, context: {
|
|
899
899
|
projectId: string;
|
|
900
900
|
flowId?: string;
|
|
901
901
|
sdkVersion?: string;
|
|
902
902
|
}): Promise<void>;
|
|
903
|
-
"__#
|
|
904
|
-
"__#
|
|
903
|
+
"__#43322@#scheduleExpirationShutdown"(expirationMs: number): void;
|
|
904
|
+
"__#43322@#shutdownTelemetry"(): void;
|
|
905
905
|
readonly telemetryManager: any;
|
|
906
|
-
"__#
|
|
906
|
+
"__#43322@#isRumConfigComplete"(rumConfig?: {
|
|
907
907
|
sessionSampleRate: number;
|
|
908
908
|
applicationId: string;
|
|
909
909
|
identityPoolId: string;
|
|
@@ -911,8 +911,8 @@ declare const BaseClass: {
|
|
|
911
911
|
region: string;
|
|
912
912
|
endpoint?: string;
|
|
913
913
|
}): boolean;
|
|
914
|
-
"__#
|
|
915
|
-
"__#
|
|
914
|
+
"__#43322@#getTelemetryConfig"(): Promise<_descope_sdk_mixins_static_resources_mixin.TelemetryConfig>;
|
|
915
|
+
"__#43322@#resolveCapture"(beCapture: {
|
|
916
916
|
console?: boolean | {
|
|
917
917
|
levels?: ("error" | "warn" | "info" | "debug" | "log")[];
|
|
918
918
|
};
|
|
@@ -938,16 +938,16 @@ declare const BaseClass: {
|
|
|
938
938
|
};
|
|
939
939
|
};
|
|
940
940
|
updateTelemetryContext(context: Record<string, any>): void;
|
|
941
|
-
"__#
|
|
941
|
+
"__#43322@#telemetryReady": Promise<void>;
|
|
942
942
|
init(): Promise<void>;
|
|
943
943
|
readonly telemetryReady: Promise<void>;
|
|
944
944
|
disconnectedCallback(): void;
|
|
945
945
|
readonly flowId: string;
|
|
946
|
-
"__#
|
|
947
|
-
"__#
|
|
946
|
+
"__#43305@#handleError": ((attrName: string, newValue: string) => void) & ((attrName: string, newValue: string) => void) & ((attrName: string, newValue: string) => void) & ((attrName: string, newValue: string) => void);
|
|
947
|
+
"__#43304@#observeMappings": {};
|
|
948
948
|
observeAttribute: ((attrName: string, onAttrChange: (attrName: string, value: string) => void) => () => any) & ((attrName: string, onAttrChange: (attrName: string, value: string) => void) => () => any) & ((attrName: string, onAttrChange: (attrName: string, value: string) => void) => () => any) & ((attrName: string, onAttrChange: (attrName: string, value: string) => void) => () => any);
|
|
949
949
|
observeAttributes: ((attrs: string[], cb: (attrName: string, value: string) => void) => () => void) & ((attrs: string[], cb: (attrName: string, value: string) => void) => () => void) & ((attrs: string[], cb: (attrName: string, value: string) => void) => () => void) & ((attrs: string[], cb: (attrName: string, value: string) => void) => () => void);
|
|
950
|
-
"__#
|
|
950
|
+
"__#43303@#isInit": boolean;
|
|
951
951
|
connectedCallback: (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void);
|
|
952
952
|
accessKey: string;
|
|
953
953
|
readonly accessKeyLabel: string;
|
|
@@ -1274,28 +1274,28 @@ declare const BaseClass: {
|
|
|
1274
1274
|
tabIndex: number;
|
|
1275
1275
|
blur(): void;
|
|
1276
1276
|
focus(options?: FocusOptions): void;
|
|
1277
|
-
"__#
|
|
1278
|
-
"__#
|
|
1277
|
+
"__#43302@#logger": _descope_sdk_mixins_static_resources_mixin.Logger;
|
|
1278
|
+
"__#43302@#wrapLogger": ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger);
|
|
1279
1279
|
get logger(): _descope_sdk_mixins_static_resources_mixin.Logger;
|
|
1280
1280
|
set logger(logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>);
|
|
1281
1281
|
onLogEvent: ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void);
|
|
1282
1282
|
readonly projectId: string;
|
|
1283
1283
|
readonly config: Promise<_descope_sdk_mixins_static_resources_mixin.Config>;
|
|
1284
|
-
"__#
|
|
1285
|
-
"__#
|
|
1286
|
-
"__#
|
|
1287
|
-
"__#
|
|
1284
|
+
"__#43308@#configCacheClear"(): void;
|
|
1285
|
+
"__#43308@#_configResource": Promise<_descope_sdk_mixins_static_resources_mixin.Config>;
|
|
1286
|
+
"__#43308@#fetchConfig": () => Promise<_descope_sdk_mixins_static_resources_mixin.Config>;
|
|
1287
|
+
"__#43307@#callbacks": Map<string, () => void>;
|
|
1288
1288
|
onReset(sectionId: string, callback: () => void | Promise<void>): () => void;
|
|
1289
1289
|
reset(...sectionIds: string[]): Promise<void>;
|
|
1290
|
-
"__#
|
|
1291
|
-
"__#
|
|
1292
|
-
"__#
|
|
1293
|
-
"__#
|
|
1290
|
+
"__#43306@#lastBaseUrl"?: string;
|
|
1291
|
+
"__#43306@#workingBaseUrl"?: string;
|
|
1292
|
+
"__#43306@#failedUrls": Set<string>;
|
|
1293
|
+
"__#43306@#getResourceUrls"(filename: string): (URL & {
|
|
1294
1294
|
baseUrl: string;
|
|
1295
1295
|
}) | (URL & {
|
|
1296
1296
|
baseUrl: string;
|
|
1297
1297
|
})[];
|
|
1298
|
-
"__#
|
|
1298
|
+
"__#43306@#createResourceUrl"(filename: string, baseUrl: string): URL & {
|
|
1299
1299
|
baseUrl: string;
|
|
1300
1300
|
};
|
|
1301
1301
|
fetchStaticResource<F extends "text" | "json">(filename: string, format: F): Promise<{
|
|
@@ -1320,12 +1320,12 @@ declare const BaseClass: {
|
|
|
1320
1320
|
readonly cssRules: CSSRuleList;
|
|
1321
1321
|
} | CSSStyleSheet;
|
|
1322
1322
|
nonce: string;
|
|
1323
|
-
"__#
|
|
1323
|
+
"__#43309@#setNonce"(): void;
|
|
1324
1324
|
init(): Promise<void>;
|
|
1325
|
-
"__#
|
|
1325
|
+
"__#43304@#observeMappings": {};
|
|
1326
1326
|
observeAttribute(attrName: string, onAttrChange: (attrName: string, value: string) => void): () => any;
|
|
1327
1327
|
observeAttributes(attrs: string[], cb: (attrName: string, value: string) => void): () => void;
|
|
1328
|
-
"__#
|
|
1328
|
+
"__#43303@#isInit": boolean;
|
|
1329
1329
|
connectedCallback: (() => void) & (() => void) & (() => void);
|
|
1330
1330
|
accessKey: string;
|
|
1331
1331
|
readonly accessKeyLabel: string;
|
|
@@ -1652,22 +1652,22 @@ declare const BaseClass: {
|
|
|
1652
1652
|
tabIndex: number;
|
|
1653
1653
|
blur(): void;
|
|
1654
1654
|
focus(options?: FocusOptions): void;
|
|
1655
|
-
"__#
|
|
1656
|
-
"__#
|
|
1655
|
+
"__#43302@#logger": _descope_sdk_mixins_static_resources_mixin.Logger;
|
|
1656
|
+
"__#43302@#wrapLogger"(logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>): _descope_sdk_mixins_static_resources_mixin.Logger;
|
|
1657
1657
|
get logger(): _descope_sdk_mixins_static_resources_mixin.Logger;
|
|
1658
1658
|
set logger(logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>);
|
|
1659
1659
|
onLogEvent(logLevel: "error" | "warn" | "info" | "debug", data: any[]): void;
|
|
1660
1660
|
}) & {
|
|
1661
1661
|
new (...params: any[]): {
|
|
1662
|
-
"__#
|
|
1663
|
-
readonly "__#
|
|
1664
|
-
readonly "__#
|
|
1662
|
+
"__#12@#screenUser"?: ScreenStateUser;
|
|
1663
|
+
readonly "__#12@#host": PasswordManagerHost;
|
|
1664
|
+
readonly "__#12@#executionId": string;
|
|
1665
1665
|
updateScreenUser(stateUser?: ScreenStateUser): void;
|
|
1666
1666
|
updateUsernameAnchor(): void;
|
|
1667
1667
|
captureLastSubmittedLoginId(formData?: {}, responseExecutionId?: string): void;
|
|
1668
1668
|
storeCredentials(formData?: {}): void;
|
|
1669
|
-
"__#
|
|
1670
|
-
"__#
|
|
1669
|
+
"__#43302@#logger": _descope_sdk_mixins_static_resources_mixin.Logger;
|
|
1670
|
+
"__#43302@#wrapLogger"(logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>): _descope_sdk_mixins_static_resources_mixin.Logger;
|
|
1671
1671
|
get logger(): _descope_sdk_mixins_static_resources_mixin.Logger;
|
|
1672
1672
|
set logger(logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>);
|
|
1673
1673
|
onLogEvent(logLevel: "error" | "warn" | "info" | "debug", data: any[]): void;
|
|
@@ -2064,12 +2064,12 @@ declare const BaseClass: {
|
|
|
2064
2064
|
};
|
|
2065
2065
|
} & {
|
|
2066
2066
|
new (...params: any[]): {
|
|
2067
|
-
"__#
|
|
2068
|
-
"__#
|
|
2067
|
+
"__#11@#warnedForKey"?: string;
|
|
2068
|
+
"__#11@#scheduleDuplicateFlowCheck"(): void;
|
|
2069
2069
|
connectedCallback(): void;
|
|
2070
2070
|
attributeChangedCallback(attrName: string, oldValue: string, newValue: string): void;
|
|
2071
|
-
"__#
|
|
2072
|
-
"__#
|
|
2071
|
+
"__#43302@#logger": _descope_sdk_mixins_static_resources_mixin.Logger;
|
|
2072
|
+
"__#43302@#wrapLogger"(logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>): _descope_sdk_mixins_static_resources_mixin.Logger;
|
|
2073
2073
|
get logger(): _descope_sdk_mixins_static_resources_mixin.Logger;
|
|
2074
2074
|
set logger(logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>);
|
|
2075
2075
|
onLogEvent(logLevel: "error" | "warn" | "info" | "debug", data: any[]): void;
|
|
@@ -2464,15 +2464,15 @@ declare const BaseClass: {
|
|
|
2464
2464
|
};
|
|
2465
2465
|
} & {
|
|
2466
2466
|
new (...params: any[]): {
|
|
2467
|
-
"__#
|
|
2467
|
+
"__#10@#rtRuntime": RealtimeRuntime;
|
|
2468
2468
|
applyComponentsState(root: ParentNode, componentsState: Record<string, string>): void;
|
|
2469
2469
|
initRealtimeConditions(rootElement: HTMLElement, screenState: ScreenState): void;
|
|
2470
|
-
"__#
|
|
2471
|
-
"__#
|
|
2470
|
+
"__#10@#handleRealtimeInput"(e: InputEvent): void;
|
|
2471
|
+
"__#10@#reEvaluateRealtime"(): void;
|
|
2472
2472
|
disconnectedCallback(): void;
|
|
2473
|
-
"__#
|
|
2474
|
-
"__#
|
|
2475
|
-
"__#
|
|
2473
|
+
"__#10@#teardownRealtimeRuntime"(): void;
|
|
2474
|
+
"__#43302@#logger": _descope_sdk_mixins_static_resources_mixin.Logger;
|
|
2475
|
+
"__#43302@#wrapLogger"(logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>): _descope_sdk_mixins_static_resources_mixin.Logger;
|
|
2476
2476
|
get logger(): _descope_sdk_mixins_static_resources_mixin.Logger;
|
|
2477
2477
|
set logger(logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>);
|
|
2478
2478
|
onLogEvent(logLevel: "error" | "warn" | "info" | "debug", data: any[]): void;
|
|
@@ -2868,8 +2868,8 @@ declare const BaseClass: {
|
|
|
2868
2868
|
};
|
|
2869
2869
|
} & {
|
|
2870
2870
|
new (...params: any[]): {
|
|
2871
|
-
"__#
|
|
2872
|
-
"__#
|
|
2871
|
+
"__#9@#shouldMountInFormEle"(): boolean;
|
|
2872
|
+
"__#9@#handleOuterForm"(): void;
|
|
2873
2873
|
connectedCallback(): void;
|
|
2874
2874
|
accessKey: string;
|
|
2875
2875
|
readonly accessKeyLabel: string;
|
|
@@ -3199,15 +3199,15 @@ declare const BaseClass: {
|
|
|
3199
3199
|
focus(options?: FocusOptions): void;
|
|
3200
3200
|
};
|
|
3201
3201
|
} & (new (...params: any[]) => {
|
|
3202
|
-
"__#
|
|
3203
|
-
"__#
|
|
3204
|
-
"__#
|
|
3205
|
-
"__#
|
|
3202
|
+
"__#43306@#lastBaseUrl"?: string;
|
|
3203
|
+
"__#43306@#workingBaseUrl"?: string;
|
|
3204
|
+
"__#43306@#failedUrls": Set<string>;
|
|
3205
|
+
"__#43306@#getResourceUrls"(filename: string): (URL & {
|
|
3206
3206
|
baseUrl: string;
|
|
3207
3207
|
}) | (URL & {
|
|
3208
3208
|
baseUrl: string;
|
|
3209
3209
|
})[];
|
|
3210
|
-
"__#
|
|
3210
|
+
"__#43306@#createResourceUrl"(filename: string, baseUrl: string): URL & {
|
|
3211
3211
|
baseUrl: string;
|
|
3212
3212
|
};
|
|
3213
3213
|
fetchStaticResource<F_1 extends "text" | "json">(filename: string, format: F_1): Promise<{
|
|
@@ -3544,44 +3544,44 @@ declare const BaseClass: {
|
|
|
3544
3544
|
blur(): void;
|
|
3545
3545
|
focus(options?: FocusOptions): void;
|
|
3546
3546
|
readonly projectId: string;
|
|
3547
|
-
"__#
|
|
3547
|
+
"__#43305@#handleError"(attrName: string, newValue: string): void;
|
|
3548
3548
|
init(): Promise<void>;
|
|
3549
|
-
"__#
|
|
3549
|
+
"__#43304@#observeMappings": {};
|
|
3550
3550
|
observeAttribute(attrName: string, onAttrChange: (attrName: string, value: string) => void): () => any;
|
|
3551
3551
|
observeAttributes(attrs: string[], cb: (attrName: string, value: string) => void): () => void;
|
|
3552
|
-
"__#
|
|
3553
|
-
"__#
|
|
3554
|
-
"__#
|
|
3552
|
+
"__#43303@#isInit": boolean;
|
|
3553
|
+
"__#43302@#logger": _descope_sdk_mixins_static_resources_mixin.Logger;
|
|
3554
|
+
"__#43302@#wrapLogger": ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger);
|
|
3555
3555
|
get logger(): _descope_sdk_mixins_static_resources_mixin.Logger;
|
|
3556
3556
|
set logger(logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>);
|
|
3557
3557
|
onLogEvent: ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void);
|
|
3558
3558
|
}) & (new (...params: any[]) => {
|
|
3559
|
-
"__#
|
|
3560
|
-
"__#
|
|
3561
|
-
"__#
|
|
3559
|
+
"__#43320@#globalStyle": _descope_sdk_mixins_static_resources_mixin.InjectedStyle;
|
|
3560
|
+
"__#43320@#tenantStyle": _descope_sdk_mixins_static_resources_mixin.InjectedStyle;
|
|
3561
|
+
"__#43320@#customStyle": _descope_sdk_mixins_static_resources_mixin.InjectedStyle;
|
|
3562
3562
|
readonly theme: _descope_sdk_mixins_static_resources_mixin.ThemeOptions;
|
|
3563
3563
|
readonly styleId: string;
|
|
3564
3564
|
readonly themeOverride: Record<string, any>;
|
|
3565
|
-
"__#
|
|
3566
|
-
"__#
|
|
3567
|
-
"__#
|
|
3568
|
-
"__#
|
|
3569
|
-
readonly "__#
|
|
3570
|
-
"__#
|
|
3571
|
-
"__#
|
|
3572
|
-
readonly "__#
|
|
3573
|
-
"__#
|
|
3574
|
-
"__#
|
|
3575
|
-
"__#
|
|
3576
|
-
"__#
|
|
3565
|
+
"__#43320@#getThemeOverrideString"(): string;
|
|
3566
|
+
"__#43320@#_themeResource": Promise<void | Record<string, any>>;
|
|
3567
|
+
"__#43320@#_tenantThemeResource": Promise<Record<string, any>>;
|
|
3568
|
+
"__#43320@#fetchTheme"(): Promise<Record<string, any>>;
|
|
3569
|
+
readonly "__#43320@#themeResource": Promise<void | Record<string, any>>;
|
|
3570
|
+
"__#43320@#loadGlobalStyle"(): Promise<void>;
|
|
3571
|
+
"__#43320@#fetchTenantTheme"(): Promise<Record<string, any>>;
|
|
3572
|
+
readonly "__#43320@#tenantThemeResource": Promise<Record<string, any>>;
|
|
3573
|
+
"__#43320@#loadTenantStyle"(): Promise<void>;
|
|
3574
|
+
"__#43320@#loadCustomStyle"(): Promise<void>;
|
|
3575
|
+
"__#43320@#loadComponentsStyle"(): Promise<void>;
|
|
3576
|
+
"__#43320@#getFontsConfig"(): Promise<Record<string, {
|
|
3577
3577
|
url?: string;
|
|
3578
3578
|
}>>;
|
|
3579
|
-
"__#
|
|
3580
|
-
"__#
|
|
3581
|
-
"__#
|
|
3582
|
-
"__#
|
|
3583
|
-
"__#
|
|
3584
|
-
"__#
|
|
3579
|
+
"__#43320@#loadFonts"(): Promise<void>;
|
|
3580
|
+
"__#43320@#loadTenantFonts"(): Promise<void>;
|
|
3581
|
+
"__#43320@#applyTheme"(): Promise<void>;
|
|
3582
|
+
"__#43320@#onThemeChange": () => void;
|
|
3583
|
+
"__#43320@#loadTheme"(): void;
|
|
3584
|
+
"__#43320@#toggleOsThemeChangeListener": (listen: boolean) => void;
|
|
3585
3585
|
init(): Promise<void>;
|
|
3586
3586
|
injectStyle: ((cssString: string, { prepend }?: {
|
|
3587
3587
|
prepend?: boolean;
|
|
@@ -3599,11 +3599,11 @@ declare const BaseClass: {
|
|
|
3599
3599
|
readonly cssRules: CSSRuleList;
|
|
3600
3600
|
});
|
|
3601
3601
|
nonce: string;
|
|
3602
|
-
"__#
|
|
3603
|
-
"__#
|
|
3602
|
+
"__#43309@#setNonce": (() => void) & (() => void);
|
|
3603
|
+
"__#43304@#observeMappings": {};
|
|
3604
3604
|
observeAttribute: ((attrName: string, onAttrChange: (attrName: string, value: string) => void) => () => any) & ((attrName: string, onAttrChange: (attrName: string, value: string) => void) => () => any) & ((attrName: string, onAttrChange: (attrName: string, value: string) => void) => () => any) & ((attrName: string, onAttrChange: (attrName: string, value: string) => void) => () => any) & ((attrName: string, onAttrChange: (attrName: string, value: string) => void) => () => any) & ((attrName: string, onAttrChange: (attrName: string, value: string) => void) => () => any) & ((attrName: string, onAttrChange: (attrName: string, value: string) => void) => () => any) & ((attrName: string, onAttrChange: (attrName: string, value: string) => void) => () => any) & ((attrName: string, onAttrChange: (attrName: string, value: string) => void) => () => any) & ((attrName: string, onAttrChange: (attrName: string, value: string) => void) => () => any);
|
|
3605
3605
|
observeAttributes: ((attrs: string[], cb: (attrName: string, value: string) => void) => () => void) & ((attrs: string[], cb: (attrName: string, value: string) => void) => () => void) & ((attrs: string[], cb: (attrName: string, value: string) => void) => () => void) & ((attrs: string[], cb: (attrName: string, value: string) => void) => () => void) & ((attrs: string[], cb: (attrName: string, value: string) => void) => () => void) & ((attrs: string[], cb: (attrName: string, value: string) => void) => () => void) & ((attrs: string[], cb: (attrName: string, value: string) => void) => () => void) & ((attrs: string[], cb: (attrName: string, value: string) => void) => () => void) & ((attrs: string[], cb: (attrName: string, value: string) => void) => () => void) & ((attrs: string[], cb: (attrName: string, value: string) => void) => () => void);
|
|
3606
|
-
"__#
|
|
3606
|
+
"__#43303@#isInit": boolean;
|
|
3607
3607
|
connectedCallback: (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void);
|
|
3608
3608
|
accessKey: string;
|
|
3609
3609
|
readonly accessKeyLabel: string;
|
|
@@ -3930,25 +3930,25 @@ declare const BaseClass: {
|
|
|
3930
3930
|
tabIndex: number;
|
|
3931
3931
|
blur(): void;
|
|
3932
3932
|
focus(options?: FocusOptions): void;
|
|
3933
|
-
"__#
|
|
3934
|
-
"__#
|
|
3933
|
+
"__#43302@#logger": _descope_sdk_mixins_static_resources_mixin.Logger;
|
|
3934
|
+
"__#43302@#wrapLogger": ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger) & ((logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>) => _descope_sdk_mixins_static_resources_mixin.Logger);
|
|
3935
3935
|
get logger(): _descope_sdk_mixins_static_resources_mixin.Logger;
|
|
3936
3936
|
set logger(logger: Partial<_descope_sdk_mixins_static_resources_mixin.Logger>);
|
|
3937
3937
|
onLogEvent: ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void) & ((logLevel: "error" | "warn" | "info" | "debug", data: any[]) => void);
|
|
3938
3938
|
contentRootElement: HTMLElement;
|
|
3939
3939
|
rootElement: HTMLElement;
|
|
3940
3940
|
readonly config: Promise<_descope_sdk_mixins_static_resources_mixin.Config>;
|
|
3941
|
-
"__#
|
|
3942
|
-
"__#
|
|
3943
|
-
"__#
|
|
3944
|
-
"__#
|
|
3941
|
+
"__#43308@#configCacheClear": (() => void) & (() => void);
|
|
3942
|
+
"__#43308@#_configResource": Promise<_descope_sdk_mixins_static_resources_mixin.Config>;
|
|
3943
|
+
"__#43308@#fetchConfig": (() => Promise<_descope_sdk_mixins_static_resources_mixin.Config>) & (() => Promise<_descope_sdk_mixins_static_resources_mixin.Config>);
|
|
3944
|
+
"__#43307@#callbacks": Map<string, () => void> & Map<string, () => void>;
|
|
3945
3945
|
onReset: ((sectionId: string, callback: () => void | Promise<void>) => () => void) & ((sectionId: string, callback: () => void | Promise<void>) => () => void);
|
|
3946
3946
|
reset: ((...sectionIds: string[]) => Promise<void>) & ((...sectionIds: string[]) => Promise<void>);
|
|
3947
|
-
"__#
|
|
3948
|
-
"__#
|
|
3949
|
-
"__#
|
|
3950
|
-
"__#
|
|
3951
|
-
"__#
|
|
3947
|
+
"__#43305@#handleError": ((attrName: string, newValue: string) => void) & ((attrName: string, newValue: string) => void) & ((attrName: string, newValue: string) => void) & ((attrName: string, newValue: string) => void) & ((attrName: string, newValue: string) => void) & ((attrName: string, newValue: string) => void) & ((attrName: string, newValue: string) => void);
|
|
3948
|
+
"__#43306@#lastBaseUrl"?: string;
|
|
3949
|
+
"__#43306@#workingBaseUrl"?: string;
|
|
3950
|
+
"__#43306@#failedUrls": Set<string>;
|
|
3951
|
+
"__#43306@#getResourceUrls": ((filename: string) => (URL & {
|
|
3952
3952
|
baseUrl: string;
|
|
3953
3953
|
}) | (URL & {
|
|
3954
3954
|
baseUrl: string;
|
|
@@ -3961,7 +3961,7 @@ declare const BaseClass: {
|
|
|
3961
3961
|
}) | (URL & {
|
|
3962
3962
|
baseUrl: string;
|
|
3963
3963
|
})[]);
|
|
3964
|
-
"__#
|
|
3964
|
+
"__#43306@#createResourceUrl": ((filename: string, baseUrl: string) => URL & {
|
|
3965
3965
|
baseUrl: string;
|
|
3966
3966
|
}) & ((filename: string, baseUrl: string) => URL & {
|
|
3967
3967
|
baseUrl: string;
|
|
@@ -3981,12 +3981,12 @@ declare const BaseClass: {
|
|
|
3981
3981
|
readonly baseStaticUrl: string;
|
|
3982
3982
|
readonly baseUrl: string;
|
|
3983
3983
|
readonly projectId: string;
|
|
3984
|
-
"__#
|
|
3985
|
-
"__#
|
|
3986
|
-
"__#
|
|
3984
|
+
"__#43312@#getComponentsVersion"(): Promise<string>;
|
|
3985
|
+
"__#43312@#getComponentsVersionSri"(): Promise<string>;
|
|
3986
|
+
"__#43312@#descopeUi": Promise<any>;
|
|
3987
3987
|
readonly descopeUi: Promise<any>;
|
|
3988
|
-
"__#
|
|
3989
|
-
"__#
|
|
3988
|
+
"__#43312@#loadDescopeUiComponent"(componentName: string): Promise<any>;
|
|
3989
|
+
"__#43312@#getDescopeUi"(): Promise<any>;
|
|
3990
3990
|
loadDescopeUiComponents(templateOrComponentNames: string[] | HTMLTemplateElement): Promise<any[]>;
|
|
3991
3991
|
readonly baseCdnUrl: string;
|
|
3992
3992
|
injectNpmLib(libName: string, version: string, filePath?: string, overrides?: string[], integrity?: string): Promise<{
|