@descope/user-profile-widget 0.0.2 → 0.0.4
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/esm/index.js +1 -1
- package/dist/index.d.ts +32 -32
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/**
|
|
3
|
-
* @descope/user-profile-widget v0.0.
|
|
3
|
+
* @descope/user-profile-widget v0.0.4
|
|
4
4
|
*/
|
|
5
5
|
import{createSingletonMixin as t,compose as e,createTemplate as i,kebabCase as s,withMemCache as o}from"@descope/sdk-helpers";import{__awaiter as r,__classPrivateFieldGet as n,__classPrivateFieldSet as a}from"tslib";import{projectIdMixin as d,observeAttributesMixin as l,loggerMixin as h,createValidateAttributesMixin as c,createStateManagementMixin as u,initLifecycleMixin as f,staticResourcesMixin as g,descopeUiMixin as p,initElementMixin as v,modalMixin as m,debuggerMixin as w,themeMixin as b}from"@descope/sdk-mixins";import{FlowDriver as y,AvatarDriver as R,UserAttributeDriver as W,UserAuthMethodDriver as k,ButtonDriver as M}from"@descope/sdk-component-drivers";import{createSelector as U}from"reselect";import{createAsyncThunk as j}from"@reduxjs/toolkit";import I from"@descope/web-js-sdk";import"@descope/core-js-sdk";import"@descope/web-component";const S=t=>t.me.data,A=U(S,(t=>t.picture)),C=U(S,(t=>t.email)),x=U(S,(t=>t.verifiedEmail)),q=U(S,(t=>t.name)),O=U(S,(t=>t.phone)),E=U(S,(t=>t.verifiedPhone)),P=U(S,(t=>t.webauthn));U(S,(t=>t.password));const F=t=>(...e)=>i=>{i.addCase(t.pending,((t,i)=>{e.forEach((({onPending:e})=>{null==e||e(t,i)}))})),i.addCase(t.fulfilled,((t,i)=>{e.forEach((({onFulfilled:e})=>{null==e||e(t,i)}))})),i.addCase(t.rejected,((t,i)=>{e.forEach((({onRejected:e})=>{null==e||e(t,i)}))}))},D=j("users/me",((t,{extra:{api:e}})=>e.user.me())),T=F(D)({onFulfilled:(t,e)=>{t.me.data=e.payload}},(N=t=>t.me,{onFulfilled:t=>{N(t).loading=!1},onPending:t=>{N(t).loading=!0,N(t).error=null},onRejected:(t,e)=>{N(t).loading=!1,N(t).error=e.error}}));var N;const $={action:D,reducer:T},L=j("users/logout",((t,{extra:{api:e}})=>e.user.logout())),H={action:L,reducer:F(L)({onFulfilled:t=>{t.me.data={}}})},B={me:{loading:!1,error:null,data:{}}},K={me:"/v1/auth/me"},J=()=>r(void 0,void 0,void 0,(function*(){return new Promise((t=>{t({loginIds:["user@company.com"],externalIds:["user@company.com"],userId:"user-1",name:"Test User",email:"user@company.com",roleNames:["Role"],phone:"+1-202-555-010",verifiedEmail:!0,verifiedPhone:!0,userTenants:[],status:"enabled",editable:!0,createdTime:(new Date).getTime(),customAttributes:{},familyName:"",givenName:"",middleName:"",picture:"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSzmudcbKkbOue75DaM9HDDrt0W39SJLBH-3HPK3s-K1w&s",password:!0,SAML:!1,test:!1,TOTP:!1,webauthn:!0})}))})),V=({httpClient:t,mock:e})=>({me:()=>r(void 0,void 0,void 0,(function*(){if(e)return J();const i=yield t.get(K.me);return yield(t=>r(void 0,void 0,void 0,(function*(){const e=yield t.text(),i=JSON.parse(e);if(!t.ok){const e=`${i.errorDescription}${i.errorMessage?`: ${i.errorMessage}`:""}`;throw Error(e||`${t.status} ${t.statusText}`)}t.json=()=>Promise.resolve(i),t.text=()=>Promise.resolve(e)})))(i),i.json()}))}),z=t((t=>{var i,s,o,u;const f=e(d,l,h,c({tenant:c.missingAttrValidator}))(t);return u=class extends f{constructor(){super(...arguments),i.add(this),s.set(this,void 0)}get baseUrl(){return this.getAttribute("base-url")}get tenant(){return this.getAttribute("tenant")}get mock(){return this.getAttribute("mock")}get api(){return n(this,s,"f")||n(this,i,"m",o).call(this),n(this,s,"f")}init(){const t=Object.create(null,{init:{get:()=>super.init}});var e;return r(this,void 0,void 0,(function*(){yield null===(e=t.init)||void 0===e?void 0:e.call(this),this.observeAttributes(["project-id","base-url","tenant"],(()=>{n(this,s,"f")&&n(this,i,"m",o).call(this)}))}))}},s=new WeakMap,i=new WeakSet,o=function(){this.logger.debug("creating an sdk instance"),a(this,s,((t,e,i)=>{const s=I(Object.assign(Object.assign({},t),{persistTokens:!0}));return{user:Object.assign(Object.assign({},V({httpClient:s.httpClient,tenant:e,mock:i})),{logout:s.logout})}})({projectId:this.projectId,baseUrl:this.baseUrl},this.tenant,"true"===this.mock),"f")},u})),G=t((t=>{const i=e(u({name:"widget",initialState:B,reducers:{},extraReducers:t=>{$.reducer(t),H.reducer(t)},asyncActions:{getMe:$.action,logout:H.action}}),f,h,z)(t);return class extends i{constructor(...t){super(...t),this.state=B,this.subscribe((t=>{this.logger.debug("State update:",t),this.state=t}))}}})),Q=t((t=>{const i=e(g,c({"widget-id":c.missingAttrValidator}))(t);return class extends i{get widgetId(){return this.getAttribute("widget-id")}fetchWidgetPage(t){return r(this,void 0,void 0,(function*(){return(yield this.fetchStaticResource(`user-profile-widget/${this.widgetId}/${t}`,"text")).body}))}}})),X=t((t=>{var s,o,a;return a=class extends(e(h,f,p,v,Q,G)(t)){constructor(){super(...arguments),s.add(this)}onWidgetRootReady(){return r(this,void 0,void 0,(function*(){}))}init(){const t=Object.create(null,{init:{get:()=>super.init}});var e;return r(this,void 0,void 0,(function*(){yield null===(e=t.init)||void 0===e?void 0:e.call(this),yield Promise.all([this.actions.getMe(),n(this,s,"m",o).call(this)]),this.onWidgetRootReady()}))}},s=new WeakSet,o=function(){return r(this,void 0,void 0,(function*(){const t=i(yield this.fetchWidgetPage("root.html"));yield this.loadDescopeUiComponents(t),this.contentRootElement.append(t.content.cloneNode(!0))}))},a})),Y=(t={})=>{const e=i("<descope-wc></descope-wc>");return Object.entries(t).forEach((([t,i])=>{e.content.querySelector("descope-wc").setAttribute(s(t),i)})),e},Z=t((t=>{var i,s,d,l,c,u,f,g,p;return p=class extends(e(G,h,X,m)(t)){constructor(){super(...arguments),i.add(this),s.set(this,void 0),d.set(this,void 0),f.set(this,o((t=>{this.avatar.image=t}))),g.set(this,o((t=>{this.avatar.displayName=t})))}onWidgetRootReady(){const t=Object.create(null,{onWidgetRootReady:{get:()=>super.onWidgetRootReady}});var e;return r(this,void 0,void 0,(function*(){yield null===(e=t.onWidgetRootReady)||void 0===e?void 0:e.call(this),n(this,i,"m",u).call(this),n(this,i,"m",l).call(this),n(this,f,"f").call(this,A(this.state)),n(this,g,"f").call(this,q(this.state)),this.subscribe(n(this,f,"f").bind(this),A),this.subscribe(n(this,g,"f").bind(this),q)}))}},s=new WeakMap,d=new WeakMap,f=new WeakMap,g=new WeakMap,i=new WeakSet,l=function(){a(this,s,this.createModal({"data-id":"update-pic"}),"f"),a(this,d,new y((()=>{var t;return null===(t=n(this,s,"f").ele)||void 0===t?void 0:t.querySelector("descope-wc")}),{logger:this.logger}),"f"),n(this,s,"f").afterClose=n(this,i,"m",c).bind(this),n(this,i,"m",c).call(this)},c=function(){n(this,s,"f").setContent(Y({projectId:this.projectId,flowId:this.avatar.flowId,baseUrl:this.baseUrl})),n(this,d,"f").onSuccess((()=>{n(this,s,"f").close(),this.actions.getMe()}))},u=function(){this.avatar=new R((()=>{var t;return null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector("descope-avatar")}),{logger:this.logger}),this.avatar.onClick((()=>{n(this,s,"f").open()}))},p})),_=t((t=>{var i,s,d,l,c,u,f,g,p,v,w,b,R;return R=class extends(e(G,h,X,m)(t)){constructor(){super(...arguments),i.add(this),s.set(this,void 0),d.set(this,void 0),l.set(this,void 0),c.set(this,void 0),w.set(this,o((t=>{this.emailUserAttr.value=t}))),b.set(this,o((t=>{this.emailUserAttr.badgeLabel=t?"":"Unverified"})))}onWidgetRootReady(){const t=Object.create(null,{onWidgetRootReady:{get:()=>super.onWidgetRootReady}});var e;return r(this,void 0,void 0,(function*(){yield null===(e=t.onWidgetRootReady)||void 0===e?void 0:e.call(this),n(this,i,"m",v).call(this),n(this,i,"m",u).call(this),n(this,i,"m",g).call(this),n(this,w,"f").call(this,C(this.state)),n(this,b,"f").call(this,x(this.state)),this.subscribe(n(this,w,"f").bind(this),C),this.subscribe(n(this,b,"f").bind(this),x)}))}},s=new WeakMap,d=new WeakMap,l=new WeakMap,c=new WeakMap,w=new WeakMap,b=new WeakMap,i=new WeakSet,u=function(){a(this,s,this.createModal({"data-id":"edit-email"}),"f"),a(this,d,new y((()=>{var t;return null===(t=n(this,s,"f").ele)||void 0===t?void 0:t.querySelector("descope-wc")}),{logger:this.logger}),"f"),n(this,s,"f").afterClose=n(this,i,"m",f).bind(this),n(this,i,"m",f).call(this)},f=function(){n(this,s,"f").setContent(Y({projectId:this.projectId,flowId:this.emailUserAttr.editFlowId,baseUrl:this.baseUrl})),n(this,d,"f").onSuccess((()=>{n(this,s,"f").close(),this.actions.getMe()}))},g=function(){a(this,l,this.createModal({"data-id":"delete-email"}),"f"),a(this,c,new y((()=>{var t;return null===(t=n(this,l,"f").ele)||void 0===t?void 0:t.querySelector("descope-wc")}),{logger:this.logger}),"f"),n(this,l,"f").afterClose=n(this,i,"m",p).bind(this),n(this,i,"m",p).call(this)},p=function(){n(this,l,"f").setContent(Y({projectId:this.projectId,flowId:this.emailUserAttr.deleteFlowId,baseUrl:this.baseUrl})),n(this,c,"f").onSuccess((()=>{n(this,l,"f").close(),this.actions.getMe()}))},v=function(){this.emailUserAttr=new W((()=>{var t;return null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector('descope-user-attribute[data-id="email"]')}),{logger:this.logger}),this.emailUserAttr.onEditClick((()=>{n(this,s,"f").open()})),this.emailUserAttr.onDeleteClick((()=>{n(this,l,"f").open()}))},R})),tt=t((t=>{var i,s,d,l,c,u,f,g,p,v,w,b;return b=class extends(e(G,h,X,m)(t)){constructor(){super(...arguments),i.add(this),s.set(this,void 0),d.set(this,void 0),l.set(this,void 0),c.set(this,void 0),w.set(this,o((t=>{this.nameUserAttr.value=t})))}onWidgetRootReady(){const t=Object.create(null,{onWidgetRootReady:{get:()=>super.onWidgetRootReady}});var e;return r(this,void 0,void 0,(function*(){yield null===(e=t.onWidgetRootReady)||void 0===e?void 0:e.call(this),n(this,i,"m",v).call(this),n(this,i,"m",u).call(this),n(this,i,"m",g).call(this),n(this,w,"f").call(this,q(this.state)),this.subscribe(n(this,w,"f").bind(this),q)}))}},s=new WeakMap,d=new WeakMap,l=new WeakMap,c=new WeakMap,w=new WeakMap,i=new WeakSet,u=function(){a(this,s,this.createModal({"data-id":"edit-name"}),"f"),a(this,d,new y((()=>{var t;return null===(t=n(this,s,"f").ele)||void 0===t?void 0:t.querySelector("descope-wc")}),{logger:this.logger}),"f"),n(this,s,"f").afterClose=n(this,i,"m",f).bind(this),n(this,i,"m",f).call(this)},f=function(){n(this,s,"f").setContent(Y({projectId:this.projectId,flowId:this.nameUserAttr.editFlowId,baseUrl:this.baseUrl})),n(this,d,"f").onSuccess((()=>{n(this,s,"f").close(),this.actions.getMe()}))},g=function(){a(this,l,this.createModal({"data-id":"delete-name"}),"f"),a(this,c,new y((()=>{var t;return null===(t=n(this,l,"f").ele)||void 0===t?void 0:t.querySelector("descope-wc")}),{logger:this.logger}),"f"),n(this,l,"f").afterClose=n(this,i,"m",p).bind(this),n(this,i,"m",p).call(this)},p=function(){n(this,l,"f").setContent(Y({projectId:this.projectId,flowId:this.nameUserAttr.deleteFlowId,baseUrl:this.baseUrl})),n(this,c,"f").onSuccess((()=>{n(this,l,"f").close(),this.actions.getMe()}))},v=function(){this.nameUserAttr=new W((()=>{var t;return null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector('descope-user-attribute[data-id="name"]')}),{logger:this.logger}),this.nameUserAttr.onEditClick((()=>{n(this,s,"f").open()})),this.nameUserAttr.onDeleteClick((()=>{n(this,l,"f").open()}))},b})),et=t((t=>{var i,s,d,l,c,u,f,g,p,v,w,b,R;return R=class extends(e(G,h,X,m)(t)){constructor(){super(...arguments),i.add(this),s.set(this,void 0),d.set(this,void 0),l.set(this,void 0),c.set(this,void 0),w.set(this,o((t=>{this.phoneUserAttr.value=t}))),b.set(this,o((t=>{this.phoneUserAttr.badgeLabel=t?"":"Unverified"})))}onWidgetRootReady(){const t=Object.create(null,{onWidgetRootReady:{get:()=>super.onWidgetRootReady}});var e;return r(this,void 0,void 0,(function*(){yield null===(e=t.onWidgetRootReady)||void 0===e?void 0:e.call(this),n(this,i,"m",v).call(this),n(this,i,"m",u).call(this),n(this,i,"m",g).call(this),n(this,w,"f").call(this,O(this.state)),n(this,b,"f").call(this,E(this.state)),this.subscribe(n(this,w,"f").bind(this),O),this.subscribe(n(this,b,"f").bind(this),E)}))}},s=new WeakMap,d=new WeakMap,l=new WeakMap,c=new WeakMap,w=new WeakMap,b=new WeakMap,i=new WeakSet,u=function(){a(this,s,this.createModal({"data-id":"edit-phone"}),"f"),a(this,d,new y((()=>{var t;return null===(t=n(this,s,"f").ele)||void 0===t?void 0:t.querySelector("descope-wc")}),{logger:this.logger}),"f"),n(this,s,"f").afterClose=n(this,i,"m",f).bind(this),n(this,i,"m",f).call(this)},f=function(){n(this,s,"f").setContent(Y({projectId:this.projectId,flowId:this.phoneUserAttr.editFlowId,baseUrl:this.baseUrl})),n(this,d,"f").onSuccess((()=>{n(this,s,"f").close(),this.actions.getMe()}))},g=function(){a(this,l,this.createModal({"data-id":"delete-phone"}),"f"),a(this,c,new y((()=>{var t;return null===(t=n(this,l,"f").ele)||void 0===t?void 0:t.querySelector("descope-wc")}),{logger:this.logger}),"f"),n(this,l,"f").afterClose=n(this,i,"m",p).bind(this),n(this,i,"m",p).call(this)},p=function(){n(this,l,"f").setContent(Y({projectId:this.projectId,flowId:this.phoneUserAttr.deleteFlowId,baseUrl:this.baseUrl})),n(this,c,"f").onSuccess((()=>{n(this,l,"f").close(),this.actions.getMe()}))},v=function(){this.phoneUserAttr=new W((()=>{var t;return null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector('descope-user-attribute[data-id="phone"]')}),{logger:this.logger}),this.phoneUserAttr.onEditClick((()=>{n(this,s,"f").open()})),this.phoneUserAttr.onDeleteClick((()=>{n(this,l,"f").open()}))},R})),it=t((t=>{var i,s,d,l,c,u,f,g;return g=class extends(e(G,h,X,m)(t)){constructor(){super(...arguments),i.add(this),s.set(this,void 0),d.set(this,void 0),f.set(this,o((t=>{this.passkeyUserAuthMethod.fulfilled=t})))}onWidgetRootReady(){const t=Object.create(null,{onWidgetRootReady:{get:()=>super.onWidgetRootReady}});var e;return r(this,void 0,void 0,(function*(){yield null===(e=t.onWidgetRootReady)||void 0===e?void 0:e.call(this),n(this,i,"m",u).call(this),n(this,i,"m",l).call(this),n(this,f,"f").call(this,P(this.state)),this.subscribe(n(this,f,"f").bind(this),P)}))}},s=new WeakMap,d=new WeakMap,f=new WeakMap,i=new WeakSet,l=function(){a(this,s,this.createModal({"data-id":"passkey"}),"f"),a(this,d,new y((()=>{var t;return null===(t=n(this,s,"f").ele)||void 0===t?void 0:t.querySelector("descope-wc")}),{logger:this.logger}),"f"),n(this,s,"f").afterClose=n(this,i,"m",c).bind(this),n(this,i,"m",c).call(this)},c=function(){n(this,s,"f").setContent(Y({projectId:this.projectId,flowId:this.passkeyUserAuthMethod.flowId,baseUrl:this.baseUrl})),n(this,d,"f").onSuccess((()=>{n(this,s,"f").close(),this.actions.getMe()}))},u=function(){this.passkeyUserAuthMethod=new k((()=>{var t;return null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector('descope-user-auth-method[data-id="passkey"]')}),{logger:this.logger}),this.passkeyUserAuthMethod.onButtonClick((()=>{n(this,s,"f").open()}))},g})),st=t((t=>{var i,s,o,d,l,c,u;return u=class extends(e(G,h,X,m)(t)){constructor(){super(...arguments),i.add(this),s.set(this,void 0),o.set(this,void 0)}onWidgetRootReady(){const t=Object.create(null,{onWidgetRootReady:{get:()=>super.onWidgetRootReady}});var e;return r(this,void 0,void 0,(function*(){yield null===(e=t.onWidgetRootReady)||void 0===e?void 0:e.call(this),n(this,i,"m",c).call(this),n(this,i,"m",d).call(this)}))}},s=new WeakMap,o=new WeakMap,i=new WeakSet,d=function(){a(this,s,this.createModal({"data-id":"password"}),"f"),a(this,o,new y((()=>{var t;return null===(t=n(this,s,"f").ele)||void 0===t?void 0:t.querySelector("descope-wc")}),{logger:this.logger}),"f"),n(this,s,"f").afterClose=n(this,i,"m",l).bind(this),n(this,i,"m",l).call(this)},l=function(){n(this,s,"f").setContent(Y({projectId:this.projectId,flowId:this.passwordUserAuthMethod.flowId,baseUrl:this.baseUrl})),n(this,o,"f").onSuccess((()=>{n(this,s,"f").close()}))},c=function(){this.passwordUserAuthMethod=new k((()=>{var t;return null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector('descope-user-auth-method[data-id="password"]')}),{logger:this.logger}),this.passwordUserAuthMethod.onButtonClick((()=>{n(this,s,"f").open()}))},u})),ot=t((t=>{var i,s,o;return o=class extends(e(G,h,X,m)(t)){constructor(){super(...arguments),i.add(this)}onWidgetRootReady(){const t=Object.create(null,{onWidgetRootReady:{get:()=>super.onWidgetRootReady}});var e;return r(this,void 0,void 0,(function*(){yield null===(e=t.onWidgetRootReady)||void 0===e?void 0:e.call(this),n(this,i,"m",s).call(this)}))}},i=new WeakSet,s=function(){this.logout=new M((()=>{var t;return null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector('descope-button[data-id="logout"]')}),{logger:this.logger}),this.logout.onClick((()=>r(this,void 0,void 0,(function*(){yield this.actions.logout(),this.dispatchEvent(new CustomEvent("logout"))}))))},o})),rt=t((t=>class extends(e(w,b,Z,_,tt,et,it,st,ot)(t)){init(){const t=Object.create(null,{init:{get:()=>super.init}});var e;return r(this,void 0,void 0,(function*(){yield null===(e=t.init)||void 0===e?void 0:e.call(this)}))}})),nt=e((t=>class extends(rt(t)){}))(HTMLElement);customElements.define("descope-user-profile-widget",nt);export{nt as default};
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ declare const UserProfileWidget: {
|
|
|
18
18
|
logout: _descope_sdk_component_drivers.ButtonDriver;
|
|
19
19
|
"__#13@#initLogout"(): void;
|
|
20
20
|
onWidgetRootReady: (() => Promise<void>) & (() => Promise<void>) & (() => Promise<void>) & (() => Promise<void>) & (() => Promise<void>) & (() => Promise<void>) & (() => Promise<void>);
|
|
21
|
-
"__#
|
|
21
|
+
"__#12030@#ModalDriverWrapper": new (refOrRefFn: Element | (() => HTMLElement), config: {
|
|
22
22
|
logger: {
|
|
23
23
|
error(...data: any[]): void;
|
|
24
24
|
warn(...data: any[]): void;
|
|
@@ -27,7 +27,7 @@ declare const UserProfileWidget: {
|
|
|
27
27
|
};
|
|
28
28
|
}) => {
|
|
29
29
|
setContent(template: HTMLTemplateElement): void;
|
|
30
|
-
"__#
|
|
30
|
+
"__#12029@#private": any;
|
|
31
31
|
beforeOpen: () => void | Promise<void>;
|
|
32
32
|
afterClose: () => void;
|
|
33
33
|
nodeName: string;
|
|
@@ -35,7 +35,7 @@ declare const UserProfileWidget: {
|
|
|
35
35
|
open(): Promise<void>;
|
|
36
36
|
reset(): void;
|
|
37
37
|
remove(): void;
|
|
38
|
-
"__#
|
|
38
|
+
"__#12027@#private": any;
|
|
39
39
|
logger: {
|
|
40
40
|
error(...data: any[]): void;
|
|
41
41
|
warn(...data: any[]): void;
|
|
@@ -46,21 +46,21 @@ declare const UserProfileWidget: {
|
|
|
46
46
|
readonly ele: Element;
|
|
47
47
|
};
|
|
48
48
|
createModal(config?: Record<string, string>): _descope_sdk_component_drivers.ModalDriver;
|
|
49
|
-
"__#
|
|
50
|
-
"__#
|
|
51
|
-
"__#
|
|
52
|
-
"__#
|
|
53
|
-
"__#
|
|
54
|
-
"__#
|
|
55
|
-
"__#
|
|
56
|
-
"__#
|
|
49
|
+
"__#12026@#errorCbsSym": symbol;
|
|
50
|
+
"__#12026@#loadCbsSym": symbol;
|
|
51
|
+
"__#12026@#getComponentsVersion": (() => Promise<any>) & (() => Promise<any>) & (() => Promise<any>);
|
|
52
|
+
"__#12026@#exposeAlternateEvents": ((scriptEle: HTMLScriptElement) => void) & ((scriptEle: HTMLScriptElement) => void) & ((scriptEle: HTMLScriptElement) => void);
|
|
53
|
+
"__#12026@#handleFallbackScript": ((errorCbs: ((error: string) => void)[], loadCbs: (() => void)[]) => Promise<void>) & ((errorCbs: ((error: string) => void)[], loadCbs: (() => void)[]) => Promise<void>) & ((errorCbs: ((error: string) => void)[], loadCbs: (() => void)[]) => Promise<void>);
|
|
54
|
+
"__#12026@#registerEvents": ((scriptEle: HTMLScriptElement) => void) & ((scriptEle: HTMLScriptElement) => void) & ((scriptEle: HTMLScriptElement) => void);
|
|
55
|
+
"__#12026@#getDescopeUiLoadingScript": (() => Promise<HTMLElement>) & (() => Promise<HTMLElement>) & (() => Promise<HTMLElement>);
|
|
56
|
+
"__#12026@#descopeUi": Promise<any>;
|
|
57
57
|
readonly descopeUi: Promise<any>;
|
|
58
|
-
"__#
|
|
58
|
+
"__#12026@#loadDescopeUiComponent": ((componentName: string) => Promise<any>) & ((componentName: string) => Promise<any>) & ((componentName: string) => Promise<any>);
|
|
59
59
|
loadDescopeUiComponents: ((templateOrComponentNames: string[] | HTMLTemplateElement) => Promise<any[]>) & ((templateOrComponentNames: string[] | HTMLTemplateElement) => Promise<any[]>) & ((templateOrComponentNames: string[] | HTMLTemplateElement) => Promise<any[]>);
|
|
60
|
-
"__#
|
|
60
|
+
"__#12026@#getDescopeUi": (() => Promise<unknown>) & (() => Promise<unknown>) & (() => Promise<unknown>);
|
|
61
61
|
readonly config: any;
|
|
62
|
-
"__#
|
|
63
|
-
"__#
|
|
62
|
+
"__#12023@#_configResource": any;
|
|
63
|
+
"__#12023@#fetchConfig": (() => Promise<{
|
|
64
64
|
projectConfig: _descope_sdk_mixins.ProjectConfiguration;
|
|
65
65
|
executionContext: {
|
|
66
66
|
geo: string;
|
|
@@ -101,11 +101,11 @@ declare const UserProfileWidget: {
|
|
|
101
101
|
headers: Record<string, string>;
|
|
102
102
|
}>);
|
|
103
103
|
readonly projectId: string;
|
|
104
|
-
"__#
|
|
105
|
-
"__#
|
|
104
|
+
"__#12022@#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) & ((attrName: string, newValue: string) => void) & ((attrName: string, newValue: string) => void);
|
|
105
|
+
"__#12021@#observeMappings": {};
|
|
106
106
|
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) & ((attrName: string, onAttrChange: (attrName: string, value: string) => void) => () => any);
|
|
107
107
|
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) & ((attrs: string[], cb: (attrName: string, value: string) => void) => () => void);
|
|
108
|
-
"__#
|
|
108
|
+
"__#12020@#isInit": boolean;
|
|
109
109
|
connectedCallback: (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & {
|
|
110
110
|
(): void;
|
|
111
111
|
(): void;
|
|
@@ -862,13 +862,13 @@ declare const UserProfileWidget: {
|
|
|
862
862
|
tabIndex: number;
|
|
863
863
|
blur: (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void);
|
|
864
864
|
focus: ((options?: FocusOptions) => void) & ((options?: FocusOptions) => void) & ((options?: FocusOptions) => void) & ((options?: FocusOptions) => void) & ((options?: FocusOptions) => void) & ((options?: FocusOptions) => void) & ((options?: FocusOptions) => void) & ((options?: FocusOptions) => void) & ((options?: FocusOptions) => void) & ((options?: FocusOptions) => void) & ((options?: FocusOptions) => void) & ((options?: FocusOptions) => void) & ((options?: FocusOptions) => void);
|
|
865
|
-
"__#
|
|
865
|
+
"__#12019@#logger": {
|
|
866
866
|
error(...data: any[]): void;
|
|
867
867
|
warn(...data: any[]): void;
|
|
868
868
|
info(...data: any[]): void;
|
|
869
869
|
debug(...data: any[]): void;
|
|
870
870
|
};
|
|
871
|
-
"__#
|
|
871
|
+
"__#12019@#wrapLogger": ((logger: Partial<{
|
|
872
872
|
error(...data: any[]): void;
|
|
873
873
|
warn(...data: any[]): void;
|
|
874
874
|
info(...data: any[]): void;
|
|
@@ -1767,14 +1767,14 @@ declare const UserProfileWidget: {
|
|
|
1767
1767
|
"__#7@#onPictureUpdate": (picture: any) => void;
|
|
1768
1768
|
"__#7@#onNameUpdate": (name: any) => void;
|
|
1769
1769
|
readonly theme: _descope_sdk_mixins.ThemeOptions;
|
|
1770
|
-
"__#
|
|
1771
|
-
"__#
|
|
1772
|
-
readonly "__#
|
|
1773
|
-
"__#
|
|
1774
|
-
"__#
|
|
1775
|
-
"__#
|
|
1776
|
-
"__#
|
|
1777
|
-
"__#
|
|
1770
|
+
"__#12032@#_themeResource": Promise<void | Record<string, any>>;
|
|
1771
|
+
"__#12032@#fetchTheme"(): Promise<Record<string, any>>;
|
|
1772
|
+
readonly "__#12032@#themeResource": Promise<void | Record<string, any>>;
|
|
1773
|
+
"__#12032@#loadGlobalStyle"(): Promise<void>;
|
|
1774
|
+
"__#12032@#loadComponentsStyle"(): Promise<void>;
|
|
1775
|
+
"__#12032@#loadFonts"(): Promise<void>;
|
|
1776
|
+
"__#12032@#applyTheme"(): Promise<void>;
|
|
1777
|
+
"__#12025@#debuggerEle": HTMLElement & {
|
|
1778
1778
|
updateData: (data: {
|
|
1779
1779
|
title: string;
|
|
1780
1780
|
description?: string;
|
|
@@ -1783,11 +1783,11 @@ declare const UserProfileWidget: {
|
|
|
1783
1783
|
description?: string;
|
|
1784
1784
|
}[]) => void;
|
|
1785
1785
|
};
|
|
1786
|
-
"__#
|
|
1787
|
-
"__#
|
|
1786
|
+
"__#12025@#disableDebugger"(): void;
|
|
1787
|
+
"__#12025@#enableDebugger"(): Promise<void>;
|
|
1788
1788
|
readonly debug: boolean;
|
|
1789
|
-
"__#
|
|
1790
|
-
"__#
|
|
1789
|
+
"__#12025@#handleDebugMode"(): void;
|
|
1790
|
+
"__#12025@#updateDebuggerMessages"(title: string, description: string): void;
|
|
1791
1791
|
};
|
|
1792
1792
|
};
|
|
1793
1793
|
|