@descope/outbound-applications-widget 0.5.13 → 0.5.14
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 +2 -2
- package/dist/index.d.ts +51 -50
- 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/outbound-applications-widget v0.5.
|
|
3
|
+
* @descope/outbound-applications-widget v0.5.14
|
|
4
4
|
*/
|
|
5
|
-
import{__awaiter as t,__classPrivateFieldGet as e,__classPrivateFieldSet as i}from"tslib";import{createSingletonMixin as o,compose as s,createTemplate as n,withMemCache as d}from"@descope/sdk-helpers";import{projectIdMixin as r,observeAttributesMixin as a,loggerMixin as l,cookieConfigMixin as c,baseUrlMixin as u,DEFAULT_STYLE_ID as p,createStateManagementMixin as h,initLifecycleMixin as v,localeMixin as f,modalMixin as g,themeMixin as m,flowInputMixin as b,descopeUiMixin as w,initElementMixin as A,createFetchWidgetPagesMixin as y,debuggerMixin as I}from"@descope/sdk-mixins";import{FlowDriver as k,OutboundAppsListDriver as C}from"@descope/sdk-component-drivers";import{createAsyncThunk as O}from"@reduxjs/toolkit";import x from"@descope/web-js-sdk";import{createSelector as j}from"reselect";function S(t){return new URLSearchParams(window.location.search).get(t)}const R=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)}))}))},W=t=>({onFulfilled:e=>{t(e).loading=!1},onPending:e=>{t(e).loading=!0,t(e).error=null},onRejected:(e,i)=>{t(e).loading=!1,t(e).error=i.error}}),M=O("outboundApps/load",((t,{extra:{api:e}})=>e.outboundApps.getAllOutboundApps())),E=R(M)({onFulfilled:(t,e)=>{var i;t.outboundAppsList.data=null===(i=e.payload)||void 0===i?void 0:i.apps}},W((t=>t.outboundAppsList))),F={action:M,reducer:E},L=O("outboundApps/getConnectedOutboundApps",((t,{extra:{api:e}})=>e.outboundApps.getConnectedOutboundApps(t))),P=R(L)({onFulfilled:(t,e)=>{var i;t.connectedOutboundAppsIds.data=null===(i=e.payload)||void 0===i?void 0:i.appIds}},W((t=>t.connectedOutboundAppsIds))),T={action:L,reducer:P},q={outboundAppsList:{data:[],loading:!1,error:null},connectedOutboundAppsIds:{data:[],loading:!1,error:null},allowedAppsIds:{data:void 0},me:{loading:!1,error:null,data:{}}},D={allOutboundApps:"/v1/mgmt/outbound/apps",connectedOutboundApps:"/v1/mgmt/outbound/apps-with-user-token"},U={me:"/v1/auth/me"},$=e=>t(void 0,void 0,void 0,(function*(){const t=yield e.text(),i=JSON.parse(t);if(!e.ok){const t=`${i.errorDescription}${i.errorMessage?`: ${i.errorMessage}`:""}`;throw Error(t||`${e.status} ${e.statusText}`)}e.json=()=>Promise.resolve(i),e.text=()=>Promise.resolve(t)})),N=()=>t(void 0,void 0,void 0,(function*(){return new Promise((t=>{t({apps:[{id:"appId1",name:"Application 1",description:"Description"},{id:"appId2",name:"Application 2",description:"Description"},{id:"appId3",name:"Application 3",description:"Description"}]})}))})),H=()=>t(void 0,void 0,void 0,(function*(){return new Promise((t=>{t({apps:["outboundApp3"]})}))})),B=()=>t(void 0,void 0,void 0,(function*(){return new Promise((t=>{t({userId:"user-1"})}))})),J=({httpClient:e,mock:i})=>({getAllOutboundApps:()=>t(void 0,void 0,void 0,(function*(){if(i)return N();const t=yield e.get(D.allOutboundApps);return yield $(t),t.json()})),getConnectedOutboundApps:o=>t(void 0,[o],void 0,(function*({userId:t,tenantId:o}){if(i)return H();const s=yield e.get(D.connectedOutboundApps,{queryParams:o?{userId:t,tenantId:o}:{userId:t}});return yield $(s),s.json()}))}),z=({httpClient:e,mock:i})=>({me:()=>t(void 0,void 0,void 0,(function*(){if(i)return B();const t=yield e.get(U.me);return yield $(t),t.json()}))}),G=o((o=>{var n,d,h,v;const f=s(r,a,l,c,u)(o);return v=class extends f{constructor(){super(...arguments),n.add(this),d.set(this,void 0)}get tenantId(){return this.getAttribute("tenant")}get widgetId(){return this.getAttribute("widget-id")}get mock(){return this.getAttribute("mock")}get styleId(){return this.getAttribute("style-id")||p}get api(){return e(this,d,"f")||e(this,n,"m",h).call(this),e(this,d,"f")}init(){const i=Object.create(null,{init:{get:()=>super.init}});return t(this,void 0,void 0,(function*(){var t;yield null===(t=i.init)||void 0===t?void 0:t.call(this),this.observeAttributes(["project-id","base-url"],(()=>{e(this,d,"f")&&e(this,n,"m",h).call(this)}))}))}},d=new WeakMap,n=new WeakSet,h=function(){this.logger.debug("creating an sdk instance"),i(this,d,((t,e,i)=>{const o=x(Object.assign(Object.assign({},t),{persistTokens:!0,baseHeaders:{"x-descope-widget-type":"outbound-applications-widget","x-descope-widget-id":i,"x-descope-widget-version":"0.5.13"}}));return{outboundApps:J({httpClient:o.httpClient,mock:e}),user:Object.assign({},z({httpClient:o.httpClient,mock:e}))}})({projectId:this.projectId,baseUrl:this.baseUrl,refreshCookieName:this.refreshCookieName},"true"===this.mock,this.widgetId),"f")},v})),K=O("users/me",((t,{extra:{api:e}})=>e.user.me())),Q={action:K,reducer:R(K)({onFulfilled:(t,e)=>{t.me.data=e.payload}},W((t=>t.me)))},V=o((t=>{const e=s(h({name:"widget",initialState:q,reducers:{setAllowedAppsIds:(t,{payload:e})=>{t.allowedAppsIds.data=e}},extraReducers:t=>{Q.reducer(t),T.reducer(t),F.reducer(t)},asyncActions:{getMe:Q.action,getOutboundApps:F.action,getConnectedOutboundApps:T.action}}),v,l,G)(t);return class extends e{constructor(...t){super(...t),this.state=q,this.subscribe((t=>{this.logger.debug("State update:",t),this.state=t}))}}})),X="widget-flow",Y=o((i=>{var o,n,d;return d=class extends(s(f,v,g,V,c,l,m,b)(i)){constructor(){super(...arguments),o.add(this)}init(){const i=Object.create(null,{init:{get:()=>super.init}});return t(this,void 0,void 0,(function*(){var t;yield null===(t=i.init)||void 0===t?void 0:t.call(this);const s=S(X);s&&(!function(t){if(window.history.replaceState&&S(t)){const e=new URL(window.location.href),i=new URLSearchParams(e.search);i.delete(t),e.search=i.toString(),window.history.replaceState({},"",e.toString())}}(X),e(this,o,"m",n).call(this,s))}))}},o=new WeakSet,n=function(t){const e=this.createModal({"data-id":"redirect-flow"});e.setContent(this.createFlowTemplate({flowId:t}));new k((()=>{var t;return null===(t=e.ele)||void 0===t?void 0:t.querySelector("descope-wc")}),{logger:this.logger}).onSuccess((()=>{e.close(),this.actions.getMe()})),e.afterClose=()=>{e.remove()},e.open()},d})),Z=j((t=>t.outboundAppsList.data),(t=>t.connectedOutboundAppsIds.data),(t=>t.allowedAppsIds.data),((t,e,i)=>t.filter((t=>void 0===i||i.includes(t.id))).map((t=>{const i=(null==e?void 0:e.includes(t.id))||!1;return Object.assign(Object.assign({},t),{appId:t.id,isConnected:i})})).sort(((t,e)=>t.name.localeCompare(e.name))))),_=j((t=>t.me.data),(t=>t.userId)),tt=o((i=>{var o,d,r,a,c;return c=class extends(s(l,v,w,A,y("outbound-applications-widget"),V)(i)){constructor(){super(...arguments),o.add(this)}static get observedAttributes(){return["allowed-outbound-apps-ids"]}attributeChangedCallback(t,i,s){"allowed-outbound-apps-ids"===t&&i!==s&&this.actions.setAllowedAppsIds(e(this,o,"a",a))}onWidgetRootReady(){return t(this,void 0,void 0,(function*(){}))}init(){const i=Object.create(null,{init:{get:()=>super.init}});return t(this,void 0,void 0,(function*(){var t;yield null===(t=i.init)||void 0===t?void 0:t.call(this),yield this.actions.getMe(),yield this.actions.setAllowedAppsIds(e(this,o,"a",a)),yield Promise.all([this.actions.getOutboundApps(),this.actions.getConnectedOutboundApps({userId:_(this.state),tenantId:this.tenantId})]);const s=yield e(this,o,"m",d).call(this);e(this,o,"m",r).call(this,s),yield this.onWidgetRootReady(),this.dispatchEvent(new CustomEvent("ready"))}))}},o=new WeakSet,d=function(){return t(this,void 0,void 0,(function*(){const t=n(yield this.fetchWidgetPage("root.html"));return yield this.loadDescopeUiComponents(t),t}))},r=function(t){this.contentRootElement.append(t.content.cloneNode(!0))},a=function(){var t;if(!this.hasAttribute("allowed-outbound-apps-ids"))return;const e=null===(t=this.getAttribute("allowed-outbound-apps-ids"))||void 0===t?void 0:t.trim();return e?e.split(",").map((t=>t.trim())).filter(Boolean):[]},c})),et=o((t=>class extends(s(m,a)(t)){syncFlowTheme(t){t.theme=this.theme,this.observeAttributes(["theme"],(()=>{t.theme=this.theme}))}})),it=o((o=>{var n,r,a,c,u,p,h,v,m,w,A,y,I,O,x,j,S;return S=class extends(s(f,et,V,l,tt,g,b)(o)){constructor(){super(...arguments),n.add(this),r.set(this,void 0),a.set(this,void 0),c.set(this,void 0),u.set(this,void 0),p.set(this,void 0),h.set(this,null),v.set(this,null),j.set(this,d((t=>{e(this,r,"f").data=t})))}onWidgetRootReady(){const i=Object.create(null,{onWidgetRootReady:{get:()=>super.onWidgetRootReady}});return t(this,void 0,void 0,(function*(){var t;yield null===(t=i.onWidgetRootReady)||void 0===t?void 0:t.call(this),e(this,n,"m",x).call(this,Z(this.state)),e(this,n,"m",m).call(this),e(this,n,"m",y).call(this),this.subscribe(e(this,j,"f").bind(this),Z)}))}},r=new WeakMap,a=new WeakMap,c=new WeakMap,u=new WeakMap,p=new WeakMap,h=new WeakMap,v=new WeakMap,j=new WeakMap,n=new WeakSet,m=function(){e(this,r,"f").connectFlowId&&(i(this,a,this.createModal({"data-id":"outbound-apps-connect"}),"f"),e(this,a,"f").afterClose=()=>{var t;if(e(this,h,"f")){const o=null===(t=e(this,a,"f").ele)||void 0===t?void 0:t.querySelector("descope-wc");null==o||o.removeEventListener("page-updated",e(this,h,"f")),i(this,h,null,"f")}},i(this,u,new k((()=>{var t;return null===(t=e(this,a,"f").ele)||void 0===t?void 0:t.querySelector("descope-wc")}),{logger:this.logger}),"f"),this.syncFlowTheme(e(this,u,"f")))},w=function(t,e,i){t.open(),e.removeEventListener("page-updated",i)},A=function(t,i){var o;const s=null===(o=t.ele)||void 0===o?void 0:o.querySelector("descope-wc"),d=()=>e(this,n,"m",w).call(this,t,s,d);i=d,null==s||s.addEventListener("page-updated",i)},y=function(){i(this,c,this.createModal({"data-id":"outbound-apps-disconnect"}),"f"),i(this,p,new k((()=>{var t;return null===(t=e(this,c,"f").ele)||void 0===t?void 0:t.querySelector("descope-wc")}),{logger:this.logger}),"f"),e(this,c,"f").afterClose=()=>{var t;if(e(this,v,"f")){const o=null===(t=e(this,c,"f").ele)||void 0===t?void 0:t.querySelector("descope-wc");null==o||o.removeEventListener("page-updated",e(this,v,"f")),i(this,v,null,"f")}},this.syncFlowTheme(e(this,p,"f"))},I=function(t){e(this,a,"f").setContent(this.createFlowTemplate({flowId:e(this,r,"f").connectFlowId,outboundAppId:t})),e(this,n,"m",A).call(this,e(this,a,"f"),e(this,h,"f")),e(this,u,"f").onSuccess((()=>{e(this,a,"f").close(),this.actions.getConnectedOutboundApps({userId:_(this.state),tenantId:this.tenantId})}))},O=function(t){e(this,c,"f").setContent(this.createFlowTemplate({flowId:e(this,r,"f").disconnectFlowId,outboundAppId:t})),e(this,n,"m",A).call(this,e(this,c,"f"),e(this,v,"f")),e(this,p,"f").onSuccess((()=>{e(this,c,"f").close(),this.actions.getConnectedOutboundApps({userId:_(this.state)})}))},x=function(t){i(this,r,new C((()=>{var t;return null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector("descope-outbound-apps")}),{logger:this.logger}),"f"),e(this,r,"f").onConnectClick((({id:t})=>{e(this,n,"m",I).call(this,t)})),e(this,r,"f").onDisconnectClick((({id:t})=>{e(this,n,"m",O).call(this,t)})),e(this,r,"f").data=t},S})),ot=o((e=>class extends(s(I,m,Y,it)(e)){init(){const e=Object.create(null,{init:{get:()=>super.init}});return t(this,void 0,void 0,(function*(){var t;yield null===(t=e.init)||void 0===t?void 0:t.call(this)}))}})),st=s((e=>class extends(ot(e)){init(){const e=Object.create(null,{init:{get:()=>super.init}});return t(this,void 0,void 0,(function*(){var t;yield null===(t=e.init)||void 0===t?void 0:t.call(this);(customElements.get("descope-wc")||(yield import("@descope/web-component").then((t=>t.default)))).sdkConfigOverrides={baseHeaders:{"x-descope-widget-type":"outbound-applications-widget","x-descope-widget-id":this.getAttribute("widget-id"),"x-descope-widget-version":"0.5.13"}}}))}}))(HTMLElement);customElements.define("descope-outbound-applications-widget",st);export{st as default};
|
|
5
|
+
import{__awaiter as t,__classPrivateFieldGet as e,__classPrivateFieldSet as i}from"tslib";import{createSingletonMixin as o,compose as s,createTemplate as n,withMemCache as d}from"@descope/sdk-helpers";import{projectIdMixin as r,observeAttributesMixin as a,loggerMixin as l,cookieConfigMixin as c,baseUrlMixin as u,DEFAULT_STYLE_ID as p,createStateManagementMixin as h,initLifecycleMixin as v,localeMixin as f,modalMixin as g,themeMixin as m,flowInputMixin as b,descopeUiMixin as w,initElementMixin as A,createFetchWidgetPagesMixin as y,debuggerMixin as I}from"@descope/sdk-mixins";import{FlowDriver as k,OutboundAppsListDriver as C}from"@descope/sdk-component-drivers";import{createAsyncThunk as O}from"@reduxjs/toolkit";import x from"@descope/web-js-sdk";import{createSelector as j}from"reselect";function S(t){return new URLSearchParams(window.location.search).get(t)}const R=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)}))}))},W=t=>({onFulfilled:e=>{t(e).loading=!1},onPending:e=>{t(e).loading=!0,t(e).error=null},onRejected:(e,i)=>{t(e).loading=!1,t(e).error=i.error}}),M=O("outboundApps/load",((t,{extra:{api:e}})=>e.outboundApps.getAllOutboundApps())),E=R(M)({onFulfilled:(t,e)=>{var i;t.outboundAppsList.data=null===(i=e.payload)||void 0===i?void 0:i.apps}},W((t=>t.outboundAppsList))),F={action:M,reducer:E},L=O("outboundApps/getConnectedOutboundApps",((t,{extra:{api:e}})=>e.outboundApps.getConnectedOutboundApps(t))),P=R(L)({onFulfilled:(t,e)=>{var i;t.connectedOutboundAppsIds.data=null===(i=e.payload)||void 0===i?void 0:i.appIds}},W((t=>t.connectedOutboundAppsIds))),T={action:L,reducer:P},q={outboundAppsList:{data:[],loading:!1,error:null},connectedOutboundAppsIds:{data:[],loading:!1,error:null},allowedAppsIds:{data:void 0},me:{loading:!1,error:null,data:{}}},D={allOutboundApps:"/v1/mgmt/outbound/apps",connectedOutboundApps:"/v1/mgmt/outbound/apps-with-user-token"},U={me:"/v1/auth/me"},$=e=>t(void 0,void 0,void 0,(function*(){const t=yield e.text(),i=JSON.parse(t);if(!e.ok){const t=`${i.errorDescription}${i.errorMessage?`: ${i.errorMessage}`:""}`;throw Error(t||`${e.status} ${e.statusText}`)}e.json=()=>Promise.resolve(i),e.text=()=>Promise.resolve(t)})),N=()=>t(void 0,void 0,void 0,(function*(){return new Promise((t=>{t({apps:[{id:"appId1",name:"Application 1",description:"Description"},{id:"appId2",name:"Application 2",description:"Description"},{id:"appId3",name:"Application 3",description:"Description"}]})}))})),H=()=>t(void 0,void 0,void 0,(function*(){return new Promise((t=>{t({apps:["outboundApp3"]})}))})),B=()=>t(void 0,void 0,void 0,(function*(){return new Promise((t=>{t({userId:"user-1"})}))})),J=({httpClient:e,mock:i})=>({getAllOutboundApps:()=>t(void 0,void 0,void 0,(function*(){if(i)return N();const t=yield e.get(D.allOutboundApps);return yield $(t),t.json()})),getConnectedOutboundApps:o=>t(void 0,[o],void 0,(function*({userId:t,tenantId:o}){if(i)return H();const s=yield e.get(D.connectedOutboundApps,{queryParams:o?{userId:t,tenantId:o}:{userId:t}});return yield $(s),s.json()}))}),z=({httpClient:e,mock:i})=>({me:()=>t(void 0,void 0,void 0,(function*(){if(i)return B();const t=yield e.get(U.me);return yield $(t),t.json()}))}),G=o((o=>{var n,d,h,v;const f=s(r,a,l,c,u)(o);return v=class extends f{constructor(){super(...arguments),n.add(this),d.set(this,void 0)}get tenantId(){return this.getAttribute("tenant")}get widgetId(){return this.getAttribute("widget-id")}get mock(){return this.getAttribute("mock")}get styleId(){return this.getAttribute("style-id")||p}get api(){return e(this,d,"f")||e(this,n,"m",h).call(this),e(this,d,"f")}init(){const i=Object.create(null,{init:{get:()=>super.init}});return t(this,void 0,void 0,(function*(){var t;yield null===(t=i.init)||void 0===t?void 0:t.call(this),this.observeAttributes(["project-id","base-url"],(()=>{e(this,d,"f")&&e(this,n,"m",h).call(this)}))}))}},d=new WeakMap,n=new WeakSet,h=function(){this.logger.debug("creating an sdk instance"),i(this,d,((t,e,i)=>{const o=x(Object.assign(Object.assign({},t),{persistTokens:!0,baseHeaders:{"x-descope-widget-type":"outbound-applications-widget","x-descope-widget-id":i,"x-descope-widget-version":"0.5.14"}}));return{outboundApps:J({httpClient:o.httpClient,mock:e}),user:Object.assign({},z({httpClient:o.httpClient,mock:e}))}})({projectId:this.projectId,baseUrl:this.baseUrl,refreshCookieName:this.refreshCookieName},"true"===this.mock,this.widgetId),"f")},v})),K=O("users/me",((t,{extra:{api:e}})=>e.user.me())),Q={action:K,reducer:R(K)({onFulfilled:(t,e)=>{t.me.data=e.payload}},W((t=>t.me)))},V=o((t=>{const e=s(h({name:"widget",initialState:q,reducers:{setAllowedAppsIds:(t,{payload:e})=>{t.allowedAppsIds.data=e}},extraReducers:t=>{Q.reducer(t),T.reducer(t),F.reducer(t)},asyncActions:{getMe:Q.action,getOutboundApps:F.action,getConnectedOutboundApps:T.action}}),v,l,G)(t);return class extends e{constructor(...t){super(...t),this.state=q,this.subscribe((t=>{this.logger.debug("State update:",t),this.state=t}))}}})),X="widget-flow",Y=o((i=>{var o,n,d;return d=class extends(s(f,v,g,V,c,l,m,b)(i)){constructor(){super(...arguments),o.add(this)}init(){const i=Object.create(null,{init:{get:()=>super.init}});return t(this,void 0,void 0,(function*(){var t;yield null===(t=i.init)||void 0===t?void 0:t.call(this);const s=S(X);s&&(!function(t){if(window.history.replaceState&&S(t)){const e=new URL(window.location.href),i=new URLSearchParams(e.search);i.delete(t),e.search=i.toString(),window.history.replaceState({},"",e.toString())}}(X),e(this,o,"m",n).call(this,s))}))}},o=new WeakSet,n=function(t){const e=this.createModal({"data-id":"redirect-flow"});e.setContent(this.createFlowTemplate({flowId:t}));new k((()=>{var t;return null===(t=e.ele)||void 0===t?void 0:t.querySelector("descope-wc")}),{logger:this.logger}).onSuccess((()=>{e.close(),this.actions.getMe()})),e.afterClose=()=>{e.remove()},e.open()},d})),Z=j((t=>t.outboundAppsList.data),(t=>t.connectedOutboundAppsIds.data),(t=>t.allowedAppsIds.data),((t,e,i)=>t.filter((t=>void 0===i||i.includes(t.id))).map((t=>{const i=(null==e?void 0:e.includes(t.id))||!1;return Object.assign(Object.assign({},t),{appId:t.id,isConnected:i})})).sort(((t,e)=>t.name.localeCompare(e.name))))),_=j((t=>t.me.data),(t=>t.userId)),tt=o((i=>{var o,d,r,a,c;return c=class extends(s(l,v,w,A,y("outbound-applications-widget"),V)(i)){constructor(){super(...arguments),o.add(this)}static get observedAttributes(){return["allowed-outbound-apps-ids"]}attributeChangedCallback(t,i,s){"allowed-outbound-apps-ids"===t&&i!==s&&this.actions.setAllowedAppsIds(e(this,o,"a",a))}onWidgetRootReady(){return t(this,void 0,void 0,(function*(){}))}init(){const i=Object.create(null,{init:{get:()=>super.init}});return t(this,void 0,void 0,(function*(){var t;yield null===(t=i.init)||void 0===t?void 0:t.call(this),yield this.actions.getMe(),yield this.actions.setAllowedAppsIds(e(this,o,"a",a)),yield Promise.all([this.actions.getOutboundApps(),this.actions.getConnectedOutboundApps({userId:_(this.state),tenantId:this.tenantId})]);const s=yield e(this,o,"m",d).call(this);e(this,o,"m",r).call(this,s),yield this.onWidgetRootReady(),this.dispatchEvent(new CustomEvent("ready"))}))}},o=new WeakSet,d=function(){return t(this,void 0,void 0,(function*(){const t=n(yield this.fetchWidgetPage("root.html"));return yield this.loadDescopeUiComponents(t),t}))},r=function(t){this.contentRootElement.append(t.content.cloneNode(!0))},a=function(){var t;if(!this.hasAttribute("allowed-outbound-apps-ids"))return;const e=null===(t=this.getAttribute("allowed-outbound-apps-ids"))||void 0===t?void 0:t.trim();return e?e.split(",").map((t=>t.trim())).filter(Boolean):[]},c})),et=o((t=>class extends(s(m,a)(t)){syncFlowTheme(t){t.theme=this.theme,this.observeAttributes(["theme"],(()=>{t.theme=this.theme}))}})),it=o((o=>{var n,r,a,c,u,p,h,v,m,w,A,y,I,O,x,j,S;return S=class extends(s(f,et,V,l,tt,g,b)(o)){constructor(){super(...arguments),n.add(this),r.set(this,void 0),a.set(this,void 0),c.set(this,void 0),u.set(this,void 0),p.set(this,void 0),h.set(this,null),v.set(this,null),j.set(this,d((t=>{e(this,r,"f").data=t})))}onWidgetRootReady(){const i=Object.create(null,{onWidgetRootReady:{get:()=>super.onWidgetRootReady}});return t(this,void 0,void 0,(function*(){var t;yield null===(t=i.onWidgetRootReady)||void 0===t?void 0:t.call(this),e(this,n,"m",x).call(this,Z(this.state)),e(this,n,"m",m).call(this),e(this,n,"m",y).call(this),this.subscribe(e(this,j,"f").bind(this),Z)}))}},r=new WeakMap,a=new WeakMap,c=new WeakMap,u=new WeakMap,p=new WeakMap,h=new WeakMap,v=new WeakMap,j=new WeakMap,n=new WeakSet,m=function(){e(this,r,"f").connectFlowId&&(i(this,a,this.createModal({"data-id":"outbound-apps-connect"}),"f"),e(this,a,"f").afterClose=()=>{var t;if(e(this,h,"f")){const o=null===(t=e(this,a,"f").ele)||void 0===t?void 0:t.querySelector("descope-wc");null==o||o.removeEventListener("page-updated",e(this,h,"f")),i(this,h,null,"f")}},i(this,u,new k((()=>{var t;return null===(t=e(this,a,"f").ele)||void 0===t?void 0:t.querySelector("descope-wc")}),{logger:this.logger}),"f"),this.syncFlowTheme(e(this,u,"f")))},w=function(t,e,i){t.open(),e.removeEventListener("page-updated",i)},A=function(t,i){var o;const s=null===(o=t.ele)||void 0===o?void 0:o.querySelector("descope-wc"),d=()=>e(this,n,"m",w).call(this,t,s,d);i=d,null==s||s.addEventListener("page-updated",i)},y=function(){i(this,c,this.createModal({"data-id":"outbound-apps-disconnect"}),"f"),i(this,p,new k((()=>{var t;return null===(t=e(this,c,"f").ele)||void 0===t?void 0:t.querySelector("descope-wc")}),{logger:this.logger}),"f"),e(this,c,"f").afterClose=()=>{var t;if(e(this,v,"f")){const o=null===(t=e(this,c,"f").ele)||void 0===t?void 0:t.querySelector("descope-wc");null==o||o.removeEventListener("page-updated",e(this,v,"f")),i(this,v,null,"f")}},this.syncFlowTheme(e(this,p,"f"))},I=function(t){e(this,a,"f").setContent(this.createFlowTemplate({flowId:e(this,r,"f").connectFlowId,outboundAppId:t})),e(this,n,"m",A).call(this,e(this,a,"f"),e(this,h,"f")),e(this,u,"f").onSuccess((()=>{e(this,a,"f").close(),this.actions.getConnectedOutboundApps({userId:_(this.state),tenantId:this.tenantId})}))},O=function(t){e(this,c,"f").setContent(this.createFlowTemplate({flowId:e(this,r,"f").disconnectFlowId,outboundAppId:t})),e(this,n,"m",A).call(this,e(this,c,"f"),e(this,v,"f")),e(this,p,"f").onSuccess((()=>{e(this,c,"f").close(),this.actions.getConnectedOutboundApps({userId:_(this.state)})}))},x=function(t){i(this,r,new C((()=>{var t;return null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector("descope-outbound-apps")}),{logger:this.logger}),"f"),e(this,r,"f").onConnectClick((({id:t})=>{e(this,n,"m",I).call(this,t)})),e(this,r,"f").onDisconnectClick((({id:t})=>{e(this,n,"m",O).call(this,t)})),e(this,r,"f").data=t},S})),ot=o((e=>class extends(s(I,m,Y,it)(e)){init(){const e=Object.create(null,{init:{get:()=>super.init}});return t(this,void 0,void 0,(function*(){var t;yield null===(t=e.init)||void 0===t?void 0:t.call(this)}))}})),st=s((e=>class extends(ot(e)){init(){const e=Object.create(null,{init:{get:()=>super.init}});return t(this,void 0,void 0,(function*(){var t;yield null===(t=e.init)||void 0===t?void 0:t.call(this);(customElements.get("descope-wc")||(yield import("@descope/web-component").then((t=>t.default)))).sdkConfigOverrides={baseHeaders:{"x-descope-widget-type":"outbound-applications-widget","x-descope-widget-id":this.getAttribute("widget-id"),"x-descope-widget-version":"0.5.14"}}}))}}))(HTMLElement);customElements.define("descope-outbound-applications-widget",st);export{st as default};
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -119,7 +119,7 @@ declare const ApplicationsPortalWidget: {
|
|
|
119
119
|
onWidgetRootReady(): Promise<void>;
|
|
120
120
|
readonly clientInput: Record<string, any>;
|
|
121
121
|
readonly formInput: string;
|
|
122
|
-
"__#
|
|
122
|
+
"__#41291@#resolveForm"(form?: Record<string, any>): Record<string, any> | string | undefined;
|
|
123
123
|
createFlowTemplate({ flowId, client, form, ...overrides }: {
|
|
124
124
|
flowId: string;
|
|
125
125
|
client?: Record<string, any>;
|
|
@@ -127,33 +127,33 @@ declare const ApplicationsPortalWidget: {
|
|
|
127
127
|
tenant?: string;
|
|
128
128
|
outboundAppId?: string;
|
|
129
129
|
}): HTMLTemplateElement;
|
|
130
|
-
"__#
|
|
131
|
-
"__#
|
|
132
|
-
"__#
|
|
130
|
+
"__#41288@#globalStyle": _descope_sdk_mixins.InjectedStyle;
|
|
131
|
+
"__#41288@#tenantStyle": _descope_sdk_mixins.InjectedStyle;
|
|
132
|
+
"__#41288@#customStyle": _descope_sdk_mixins.InjectedStyle;
|
|
133
133
|
readonly theme: _descope_sdk_mixins.ThemeOptions;
|
|
134
134
|
readonly styleId: string;
|
|
135
135
|
readonly themeOverride: Record<string, any>;
|
|
136
|
-
"__#
|
|
137
|
-
"__#
|
|
138
|
-
"__#
|
|
139
|
-
"__#
|
|
140
|
-
readonly "__#
|
|
141
|
-
"__#
|
|
142
|
-
"__#
|
|
143
|
-
readonly "__#
|
|
144
|
-
"__#
|
|
145
|
-
"__#
|
|
146
|
-
"__#
|
|
147
|
-
"__#
|
|
136
|
+
"__#41288@#getThemeOverrideString": (() => string) & (() => string);
|
|
137
|
+
"__#41288@#_themeResource": Promise<void | Record<string, any>>;
|
|
138
|
+
"__#41288@#_tenantThemeResource": Promise<Record<string, any> | undefined>;
|
|
139
|
+
"__#41288@#fetchTheme": (() => Promise<Record<string, any>>) & (() => Promise<Record<string, any>>);
|
|
140
|
+
readonly "__#41288@#themeResource": Promise<void | Record<string, any>>;
|
|
141
|
+
"__#41288@#loadGlobalStyle": (() => Promise<void>) & (() => Promise<void>);
|
|
142
|
+
"__#41288@#fetchTenantTheme": (() => Promise<Record<string, any>>) & (() => Promise<Record<string, any>>);
|
|
143
|
+
readonly "__#41288@#tenantThemeResource": Promise<Record<string, any>>;
|
|
144
|
+
"__#41288@#loadTenantStyle": (() => Promise<void>) & (() => Promise<void>);
|
|
145
|
+
"__#41288@#loadCustomStyle": (() => Promise<void>) & (() => Promise<void>);
|
|
146
|
+
"__#41288@#loadComponentsStyle": (() => Promise<void>) & (() => Promise<void>);
|
|
147
|
+
"__#41288@#getFontsConfig": (() => Promise<Record<string, {
|
|
148
148
|
url?: string;
|
|
149
149
|
}>>) & (() => Promise<Record<string, {
|
|
150
150
|
url?: string;
|
|
151
151
|
}>>);
|
|
152
|
-
"__#
|
|
153
|
-
"__#
|
|
154
|
-
"__#
|
|
155
|
-
"__#
|
|
156
|
-
"__#
|
|
152
|
+
"__#41288@#loadFonts": (() => Promise<void>) & (() => Promise<void>);
|
|
153
|
+
"__#41288@#applyTheme": (() => Promise<void>) & (() => Promise<void>);
|
|
154
|
+
"__#41288@#onThemeChange": (() => void) & (() => void);
|
|
155
|
+
"__#41288@#loadTheme": (() => void) & (() => void);
|
|
156
|
+
"__#41288@#toggleOsThemeChangeListener": ((listen: boolean) => void) & ((listen: boolean) => void);
|
|
157
157
|
injectStyle: ((cssString: string, { prepend }?: {
|
|
158
158
|
prepend?: boolean;
|
|
159
159
|
}) => {
|
|
@@ -198,11 +198,11 @@ declare const ApplicationsPortalWidget: {
|
|
|
198
198
|
readonly cssRules: CSSRuleList;
|
|
199
199
|
} | CSSStyleSheet);
|
|
200
200
|
nonce: string;
|
|
201
|
-
"__#
|
|
202
|
-
"__#
|
|
201
|
+
"__#41278@#setNonce": (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void);
|
|
202
|
+
"__#41273@#observeMappings": {} & {} & {} & {} & {} & {} & {} & {} & {} & {};
|
|
203
203
|
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) & ((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 | null) => 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) & ((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);
|
|
204
204
|
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) & ((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 | null) => 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) & ((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);
|
|
205
|
-
"__#
|
|
205
|
+
"__#41272@#isInit": boolean;
|
|
206
206
|
connectedCallback: (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void);
|
|
207
207
|
accessKey: string;
|
|
208
208
|
readonly accessKeyLabel: string;
|
|
@@ -327,6 +327,7 @@ declare const ApplicationsPortalWidget: {
|
|
|
327
327
|
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
328
328
|
};
|
|
329
329
|
attributeChangedCallback: ((attrName: string, oldValue: string, newValue: string) => void) & ((attrName: string, oldValue: string, newValue: string) => void) & ((name: string, oldValue: string, newValue: string) => void) & ((attrName: string, oldValue: string, newValue: string) => void) & ((attrName: string, oldValue: string, newValue: string) => void) & ((attrName: string, oldValue: string, newValue: string) => void) & ((attrName: string, oldValue: string, newValue: string) => void) & ((attrName: string, oldValue: string, newValue: string) => void) & ((attrName: string, oldValue: string | null, newValue: string | null) => void) & ((attrName: string, oldValue: string, newValue: string) => void) & ((attrName: string, oldValue: string, newValue: string) => void) & ((attrName: string, oldValue: string, newValue: string) => void) & ((attrName: string, oldValue: string, newValue: string) => void) & ((attrName: string, oldValue: string | null, newValue: string | null) => void);
|
|
330
|
+
disconnectedCallback: (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void);
|
|
330
331
|
readonly attributes: NamedNodeMap;
|
|
331
332
|
readonly classList: DOMTokenList;
|
|
332
333
|
className: string;
|
|
@@ -1193,24 +1194,24 @@ declare const ApplicationsPortalWidget: {
|
|
|
1193
1194
|
tabIndex: number;
|
|
1194
1195
|
blur: (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void);
|
|
1195
1196
|
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) & ((options?: FocusOptions) => void) & ((options?: FocusOptions) => void) & ((options?: FocusOptions) => void);
|
|
1196
|
-
"__#
|
|
1197
|
-
"__#
|
|
1197
|
+
"__#41271@#logger": _descope_sdk_mixins.Logger;
|
|
1198
|
+
"__#41271@#wrapLogger": ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger) & ((logger: Partial<_descope_sdk_mixins.Logger>) => _descope_sdk_mixins.Logger);
|
|
1198
1199
|
logger: _descope_sdk_mixins.Logger;
|
|
1199
1200
|
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) & ((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: _descope_sdk_mixins.LogLevel, 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) & ((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) & ((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: _descope_sdk_mixins.LogLevel, args: any[]) => void);
|
|
1200
1201
|
contentRootElement: HTMLElement;
|
|
1201
1202
|
rootElement: HTMLElement;
|
|
1202
1203
|
readonly config: Promise<_descope_sdk_mixins.Config>;
|
|
1203
|
-
"__#
|
|
1204
|
-
"__#
|
|
1205
|
-
"__#
|
|
1206
|
-
"__#
|
|
1204
|
+
"__#41277@#configCacheClear": (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void);
|
|
1205
|
+
"__#41277@#_configResource": Promise<_descope_sdk_mixins.Config>;
|
|
1206
|
+
"__#41277@#fetchConfig": (() => Promise<_descope_sdk_mixins.Config>) & (() => Promise<_descope_sdk_mixins.Config>) & (() => Promise<_descope_sdk_mixins.Config>) & (() => Promise<_descope_sdk_mixins.Config>) & (() => Promise<_descope_sdk_mixins.Config>) & (() => Promise<_descope_sdk_mixins.Config>) & (() => Promise<_descope_sdk_mixins.Config>);
|
|
1207
|
+
"__#41276@#callbacks": Map<string, () => void> & Map<string, () => void> & Map<string, () => void> & Map<string, () => void> & Map<string, () => void> & Map<string, () => void> & Map<string, () => void>;
|
|
1207
1208
|
onReset: ((sectionId: string, callback: () => void | Promise<void>) => () => void) & ((sectionId: string, callback: () => void | Promise<void>) => () => void) & ((sectionId: string, callback: () => void | Promise<void>) => () => void) & ((sectionId: string, callback: () => void | Promise<void>) => () => void) & ((sectionId: string, callback: () => void | Promise<void>) => () => void) & ((sectionId: string, callback: () => void | Promise<void>) => () => void) & ((sectionId: string, callback: () => void | Promise<void>) => () => void);
|
|
1208
1209
|
reset: ((...sectionIds: string[]) => Promise<void>) & ((...sectionIds: string[]) => Promise<void>) & ((...sectionIds: string[]) => Promise<void>) & ((...sectionIds: string[]) => Promise<void>) & ((...sectionIds: string[]) => Promise<void>) & ((...sectionIds: string[]) => Promise<void>) & ((...sectionIds: string[]) => Promise<void>);
|
|
1209
|
-
"__#
|
|
1210
|
-
"__#
|
|
1211
|
-
"__#
|
|
1212
|
-
"__#
|
|
1213
|
-
"__#
|
|
1210
|
+
"__#41274@#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) & ((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) & ((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);
|
|
1211
|
+
"__#41275@#lastBaseUrl"?: string;
|
|
1212
|
+
"__#41275@#workingBaseUrl"?: string;
|
|
1213
|
+
"__#41275@#failedUrls": Set<string>;
|
|
1214
|
+
"__#41275@#getResourceUrls": ((filename: string) => (URL & {
|
|
1214
1215
|
baseUrl: string;
|
|
1215
1216
|
}) | (URL & {
|
|
1216
1217
|
baseUrl: string;
|
|
@@ -1251,7 +1252,7 @@ declare const ApplicationsPortalWidget: {
|
|
|
1251
1252
|
}) | (URL & {
|
|
1252
1253
|
baseUrl: string;
|
|
1253
1254
|
})[]);
|
|
1254
|
-
"__#
|
|
1255
|
+
"__#41275@#createResourceUrl": ((filename: string, baseUrl: string) => URL & {
|
|
1255
1256
|
baseUrl: string;
|
|
1256
1257
|
}) & ((filename: string, baseUrl: string) => URL & {
|
|
1257
1258
|
baseUrl: string;
|
|
@@ -1306,12 +1307,12 @@ declare const ApplicationsPortalWidget: {
|
|
|
1306
1307
|
readonly baseStaticUrl: string;
|
|
1307
1308
|
readonly baseUrl: string;
|
|
1308
1309
|
readonly projectId: string;
|
|
1309
|
-
"__#
|
|
1310
|
-
"__#
|
|
1311
|
-
"__#
|
|
1310
|
+
"__#41281@#getComponentsVersion": (() => Promise<string>) & (() => Promise<string>) & (() => Promise<string>) & (() => Promise<string>);
|
|
1311
|
+
"__#41281@#getComponentsVersionSri": (() => Promise<string>) & (() => Promise<string>) & (() => Promise<string>) & (() => Promise<string>);
|
|
1312
|
+
"__#41281@#descopeUi": Promise<any>;
|
|
1312
1313
|
readonly descopeUi: Promise<any>;
|
|
1313
|
-
"__#
|
|
1314
|
-
"__#
|
|
1314
|
+
"__#41281@#loadDescopeUiComponent": ((componentName: string) => Promise<any>) & ((componentName: string) => Promise<any>) & ((componentName: string) => Promise<any>) & ((componentName: string) => Promise<any>);
|
|
1315
|
+
"__#41281@#getDescopeUi": (() => Promise<any>) & (() => Promise<any>) & (() => Promise<any>) & (() => Promise<any>);
|
|
1315
1316
|
loadDescopeUiComponents: ((templateOrComponentNames: HTMLTemplateElement | string[]) => Promise<any[]>) & ((templateOrComponentNames: HTMLTemplateElement | string[]) => Promise<any[]>) & ((templateOrComponentNames: HTMLTemplateElement | string[]) => Promise<any[]>) & ((templateOrComponentNames: HTMLTemplateElement | string[]) => Promise<any[]>);
|
|
1316
1317
|
readonly baseCdnUrl: string;
|
|
1317
1318
|
injectNpmLib: ((libName: string, version: string, filePath?: string, overrides?: string[], integrity?: string) => Promise<{
|
|
@@ -1332,7 +1333,7 @@ declare const ApplicationsPortalWidget: {
|
|
|
1332
1333
|
integrity?: string;
|
|
1333
1334
|
}>);
|
|
1334
1335
|
readonly tenantId: string;
|
|
1335
|
-
"__#
|
|
1336
|
+
"__#41286@#ModalDriverWrapper": {
|
|
1336
1337
|
new (refOrRefFn: Element | (() => HTMLElement), config: {
|
|
1337
1338
|
logger: {
|
|
1338
1339
|
error(...data: any[]): void;
|
|
@@ -1342,7 +1343,7 @@ declare const ApplicationsPortalWidget: {
|
|
|
1342
1343
|
};
|
|
1343
1344
|
}): {
|
|
1344
1345
|
setContent(template: HTMLTemplateElement): void;
|
|
1345
|
-
"__#
|
|
1346
|
+
"__#41285@#private": any;
|
|
1346
1347
|
beforeOpen: () => void | Promise<void>;
|
|
1347
1348
|
afterClose: () => void;
|
|
1348
1349
|
nodeName: string;
|
|
@@ -1352,7 +1353,7 @@ declare const ApplicationsPortalWidget: {
|
|
|
1352
1353
|
open(): Promise<void>;
|
|
1353
1354
|
reset(): void;
|
|
1354
1355
|
remove(): void;
|
|
1355
|
-
"__#
|
|
1356
|
+
"__#41282@#private": any;
|
|
1356
1357
|
logger: {
|
|
1357
1358
|
error(...data: any[]): void;
|
|
1358
1359
|
warn(...data: any[]): void;
|
|
@@ -1626,14 +1627,14 @@ declare const ApplicationsPortalWidget: {
|
|
|
1626
1627
|
};
|
|
1627
1628
|
}) => SelectorR) => redux.Unsubscribe;
|
|
1628
1629
|
fetchWidgetPage(filename: string): Promise<string>;
|
|
1629
|
-
"__#
|
|
1630
|
+
"__#41289@#tryFetchLocalized"(filename: string): Promise<string | undefined>;
|
|
1630
1631
|
readonly locale: string;
|
|
1631
1632
|
readonly localeCandidates: string[];
|
|
1632
1633
|
firstAvailableLocale: ((availableLocales: string[]) => string) & ((availableLocales: string[]) => string);
|
|
1633
1634
|
getWidgetConfig(): Promise<_descope_sdk_mixins.WidgetConfig>;
|
|
1634
1635
|
syncFlowTheme(flowDriver: _descope_sdk_component_drivers.FlowDriver): void;
|
|
1635
1636
|
"__#7@#createFlowRedirectModal"(widgetFlow: string): void;
|
|
1636
|
-
"__#
|
|
1637
|
+
"__#41280@#debuggerEle": (HTMLElement & {
|
|
1637
1638
|
updateData: (data: {
|
|
1638
1639
|
title: string;
|
|
1639
1640
|
description?: string;
|
|
@@ -1642,11 +1643,11 @@ declare const ApplicationsPortalWidget: {
|
|
|
1642
1643
|
description?: string;
|
|
1643
1644
|
}[]) => void;
|
|
1644
1645
|
}) | null;
|
|
1645
|
-
"__#
|
|
1646
|
-
"__#
|
|
1646
|
+
"__#41280@#disableDebugger"(): void;
|
|
1647
|
+
"__#41280@#enableDebugger"(): Promise<void>;
|
|
1647
1648
|
readonly debug: boolean;
|
|
1648
|
-
"__#
|
|
1649
|
-
"__#
|
|
1649
|
+
"__#41280@#handleDebugMode"(): void;
|
|
1650
|
+
"__#41280@#updateDebuggerMessages"(title: string, description: string): void;
|
|
1650
1651
|
};
|
|
1651
1652
|
readonly observedAttributes: string[];
|
|
1652
1653
|
};
|