@descope/outbound-applications-widget 0.1.21 → 0.1.23
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 +38 -37
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/**
|
|
3
|
-
* @descope/outbound-applications-widget v0.1.
|
|
3
|
+
* @descope/outbound-applications-widget v0.1.23
|
|
4
4
|
*/
|
|
5
|
-
import{__awaiter as t,__classPrivateFieldGet as e,__classPrivateFieldSet as i}from"tslib";import{createTemplate as s,kebabCase as o,createSingletonMixin as n,compose as d,withMemCache as r}from"@descope/sdk-helpers";import{projectIdMixin as a,observeAttributesMixin as l,loggerMixin as c,cookieConfigMixin as u,baseUrlMixin as p,createStateManagementMixin as h,initLifecycleMixin as f,modalMixin as v,themeMixin as g,staticResourcesMixin as m,createValidateAttributesMixin as b,descopeUiMixin as w,initElementMixin as A,debuggerMixin as y}from"@descope/sdk-mixins";import{FlowDriver as C,OutboundAppsListDriver as I}from"@descope/sdk-component-drivers";import{createAsyncThunk as k}from"@reduxjs/toolkit";import O from"@descope/web-js-sdk";import{createSelector as S}from"reselect";const j=(t={})=>{const e=s("<descope-wc></descope-wc>");return Object.entries(t).forEach((([t,i])=>{e.content.querySelector("descope-wc").setAttribute(o(t),i)})),e};function x(t){return new URLSearchParams(window.location.search).get(t)}const U=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)}))}))},R=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}}),W=k("outboundApps/load",((t,{extra:{api:e}})=>e.outboundApps.getAllOutboundApps())),M=U(W)({onFulfilled:(t,e)=>{var i;t.outboundAppsList.data=null===(i=e.payload)||void 0===i?void 0:i.apps}},R((t=>t.outboundAppsList))),E={action:W,reducer:M},P=k("outboundApps/getConnectedOutboundApps",((t,{extra:{api:e}})=>e.outboundApps.getConnectedOutboundApps(t))),L=U(P)({onFulfilled:(t,e)=>{var i;t.connectedOutboundAppsIds.data=null===(i=e.payload)||void 0===i?void 0:i.appIds}},R((t=>t.connectedOutboundAppsIds))),F={action:P,reducer:L},N={outboundAppsList:{data:[],loading:!1,error:null},connectedOutboundAppsIds:{data:[],loading:!1,error:null},allowedAppsIds:{data:void 0},me:{loading:!1,error:null,data:{}}},q={allOutboundApps:"/v1/mgmt/outbound/apps",connectedOutboundApps:"/v1/mgmt/outbound/apps-with-user-token"},$={me:"/v1/auth/me"},D=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)})),T=()=>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 T();const t=yield e.get(q.allOutboundApps);return yield D(t),t.json()})),getConnectedOutboundApps:s=>t(void 0,[s],void 0,(function*({userId:t}){if(i)return H();const s=yield e.get(q.connectedOutboundApps,{queryParams:{userId:t}});return yield D(s),s.json()}))}),V=({httpClient:e,mock:i})=>({me:()=>t(void 0,void 0,void 0,(function*(){if(i)return B();const t=yield e.get($.me);return yield D(t),t.json()}))}),z=n((s=>{var o,n,r,h;const f=d(a,l,c,u,p)(s);return h=class extends f{constructor(){super(...arguments),o.add(this),n.set(this,void 0)}get widgetId(){return this.getAttribute("widget-id")}get mock(){return this.getAttribute("mock")}get api(){return e(this,n,"f")||e(this,o,"m",r).call(this),e(this,n,"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,n,"f")&&e(this,o,"m",r).call(this)}))}))}},n=new WeakMap,o=new WeakSet,r=function(){this.logger.debug("creating an sdk instance"),i(this,n,((t,e,i)=>{const s=O(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.1.21"}}));return{outboundApps:J({httpClient:s.httpClient,mock:e}),user:Object.assign({},V({httpClient:s.httpClient,mock:e}))}})({projectId:this.projectId,baseUrl:this.baseUrl,refreshCookieName:this.refreshCookieName},"true"===this.mock,this.widgetId),"f")},h})),G=k("users/me",((t,{extra:{api:e}})=>e.user.me())),K={action:G,reducer:U(G)({onFulfilled:(t,e)=>{t.me.data=e.payload}},R((t=>t.me)))},Q=n((t=>{const e=d(h({name:"widget",initialState:N,reducers:{setAllowedAppsIds:(t,{payload:e})=>{t.allowedAppsIds.data=e}},extraReducers:t=>{K.reducer(t),F.reducer(t),E.reducer(t)},asyncActions:{getMe:K.action,getOutboundApps:E.action,getConnectedOutboundApps:F.action}}),f,c,z)(t);return class extends e{constructor(...t){super(...t),this.state=N,this.subscribe((t=>{this.logger.debug("State update:",t),this.state=t}))}}})),X="widget-flow",Y=n((i=>{var s,o,n;return n=class extends(d(f,v,Q,u,c,g)(i)){constructor(){super(...arguments),s.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 n=x(X);n&&(!function(t){if(window.history.replaceState&&x(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,s,"m",o).call(this,n))}))}},s=new WeakSet,o=function(t){const e=this.createModal({"data-id":"redirect-flow"});e.setContent(j({projectId:this.projectId,flowId:t,baseUrl:this.baseUrl,baseStaticUrl:this.baseStaticUrl,baseCdnUrl:this.baseCdnUrl,refreshCookieName:this.refreshCookieName,theme:this.theme}));new C((()=>{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()},n})),Z=S((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))))),_=S((t=>t.me.data),(t=>t.userId)),tt=n((e=>{const i=d(m,b({"widget-id":b.missingAttrValidator}))(e);return class extends i{get widgetId(){return this.getAttribute("widget-id")}fetchWidgetPage(e){return t(this,void 0,void 0,(function*(){return(yield this.fetchStaticResource(`outbound-applications-widget/${this.widgetId}/${e}`,"text")).body}))}}})),et=n((i=>{var o,n,r,a,l;return l=class extends(d(c,f,w,A,tt,Q)(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)})]);const s=yield e(this,o,"m",n).call(this);e(this,o,"m",r).call(this,s),yield this.onWidgetRootReady(),this.dispatchEvent(new CustomEvent("ready"))}))}},o=new WeakSet,n=function(){return t(this,void 0,void 0,(function*(){const t=s(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):[]},l})),it=n((t=>class extends(d(g,l)(t)){syncFlowTheme(t){t.theme=this.theme,this.observeAttributes(["theme"],(()=>{t.theme=this.theme}))}})),st=n((s=>{var o,n,a,l,u,p,h,f,g,m,b,w,A,y,k,O,S;return S=class extends(d(it,Q,c,et,v)(s)){constructor(){super(...arguments),o.add(this),n.set(this,void 0),a.set(this,void 0),l.set(this,void 0),u.set(this,void 0),p.set(this,void 0),h.set(this,null),f.set(this,null),O.set(this,r((t=>{e(this,n,"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,o,"m",k).call(this,Z(this.state)),e(this,o,"m",g).call(this),e(this,o,"m",w).call(this),this.subscribe(e(this,O,"f").bind(this),Z)}))}},n=new WeakMap,a=new WeakMap,l=new WeakMap,u=new WeakMap,p=new WeakMap,h=new WeakMap,f=new WeakMap,O=new WeakMap,o=new WeakSet,g=function(){e(this,n,"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 s=null===(t=e(this,a,"f").ele)||void 0===t?void 0:t.querySelector("descope-wc");null==s||s.removeEventListener("page-updated",e(this,h,"f")),i(this,h,null,"f")}},i(this,u,new C((()=>{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")))},m=function(t,e,i){t.open(),e.removeEventListener("page-updated",i)},b=function(t,i){var s;const n=null===(s=t.ele)||void 0===s?void 0:s.querySelector("descope-wc"),d=()=>e(this,o,"m",m).call(this,t,n,d);i=d,null==n||n.addEventListener("page-updated",i)},w=function(){i(this,l,this.createModal({"data-id":"outbound-apps-disconnect"}),"f"),i(this,p,new C((()=>{var t;return null===(t=e(this,l,"f").ele)||void 0===t?void 0:t.querySelector("descope-wc")}),{logger:this.logger}),"f"),e(this,l,"f").afterClose=()=>{var t;if(e(this,f,"f")){const s=null===(t=e(this,l,"f").ele)||void 0===t?void 0:t.querySelector("descope-wc");null==s||s.removeEventListener("page-updated",e(this,f,"f")),i(this,f,null,"f")}},this.syncFlowTheme(e(this,p,"f"))},A=function(t){e(this,a,"f").setContent(j({projectId:this.projectId,flowId:e(this,n,"f").connectFlowId,baseUrl:this.baseUrl,baseStaticUrl:this.baseStaticUrl,baseCdnUrl:this.baseCdnUrl,refreshCookieName:this.refreshCookieName,theme:this.theme,outboundAppId:t})),e(this,o,"m",b).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)})}))},y=function(t){e(this,l,"f").setContent(j({projectId:this.projectId,flowId:e(this,n,"f").disconnectFlowId,baseUrl:this.baseUrl,baseStaticUrl:this.baseStaticUrl,baseCdnUrl:this.baseCdnUrl,refreshCookieName:this.refreshCookieName,theme:this.theme,outboundAppId:t})),e(this,o,"m",b).call(this,e(this,l,"f"),e(this,f,"f")),e(this,p,"f").onSuccess((()=>{e(this,l,"f").close(),this.actions.getConnectedOutboundApps({userId:_(this.state)})}))},k=function(t){i(this,n,new I((()=>{var t;return null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector("descope-outbound-apps")}),{logger:this.logger}),"f"),e(this,n,"f").onConnectClick((({id:t})=>{e(this,o,"m",A).call(this,t)})),e(this,n,"f").onDisconnectClick((({id:t})=>{e(this,o,"m",y).call(this,t)})),e(this,n,"f").data=t},S})),ot=n((e=>class extends(d(y,g,Y,st)(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)}))}})),nt=d((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.1.21"}}}))}}))(HTMLElement);customElements.define("descope-outbound-applications-widget",nt);export{nt as default};
|
|
5
|
+
import{__awaiter as t,__classPrivateFieldGet as e,__classPrivateFieldSet as i}from"tslib";import{createTemplate as s,kebabCase as o,createSingletonMixin as n,compose as d,withMemCache as r}from"@descope/sdk-helpers";import{projectIdMixin as a,observeAttributesMixin as l,loggerMixin as c,cookieConfigMixin as u,baseUrlMixin as p,createStateManagementMixin as h,initLifecycleMixin as f,modalMixin as v,themeMixin as g,staticResourcesMixin as m,createValidateAttributesMixin as b,descopeUiMixin as w,initElementMixin as A,debuggerMixin as y}from"@descope/sdk-mixins";import{FlowDriver as C,OutboundAppsListDriver as I}from"@descope/sdk-component-drivers";import{createAsyncThunk as k}from"@reduxjs/toolkit";import O from"@descope/web-js-sdk";import{createSelector as S}from"reselect";const j=(t={})=>{const e=s("<descope-wc></descope-wc>");return Object.entries(t).forEach((([t,i])=>{e.content.querySelector("descope-wc").setAttribute(o(t),i)})),e};function x(t){return new URLSearchParams(window.location.search).get(t)}const U=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)}))}))},R=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}}),W=k("outboundApps/load",((t,{extra:{api:e}})=>e.outboundApps.getAllOutboundApps())),M=U(W)({onFulfilled:(t,e)=>{var i;t.outboundAppsList.data=null===(i=e.payload)||void 0===i?void 0:i.apps}},R((t=>t.outboundAppsList))),E={action:W,reducer:M},P=k("outboundApps/getConnectedOutboundApps",((t,{extra:{api:e}})=>e.outboundApps.getConnectedOutboundApps(t))),L=U(P)({onFulfilled:(t,e)=>{var i;t.connectedOutboundAppsIds.data=null===(i=e.payload)||void 0===i?void 0:i.appIds}},R((t=>t.connectedOutboundAppsIds))),F={action:P,reducer:L},N={outboundAppsList:{data:[],loading:!1,error:null},connectedOutboundAppsIds:{data:[],loading:!1,error:null},allowedAppsIds:{data:void 0},me:{loading:!1,error:null,data:{}}},q={allOutboundApps:"/v1/mgmt/outbound/apps",connectedOutboundApps:"/v1/mgmt/outbound/apps-with-user-token"},$={me:"/v1/auth/me"},D=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)})),T=()=>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 T();const t=yield e.get(q.allOutboundApps);return yield D(t),t.json()})),getConnectedOutboundApps:s=>t(void 0,[s],void 0,(function*({userId:t}){if(i)return H();const s=yield e.get(q.connectedOutboundApps,{queryParams:{userId:t}});return yield D(s),s.json()}))}),V=({httpClient:e,mock:i})=>({me:()=>t(void 0,void 0,void 0,(function*(){if(i)return B();const t=yield e.get($.me);return yield D(t),t.json()}))}),z=n((s=>{var o,n,r,h;const f=d(a,l,c,u,p)(s);return h=class extends f{constructor(){super(...arguments),o.add(this),n.set(this,void 0)}get widgetId(){return this.getAttribute("widget-id")}get mock(){return this.getAttribute("mock")}get api(){return e(this,n,"f")||e(this,o,"m",r).call(this),e(this,n,"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,n,"f")&&e(this,o,"m",r).call(this)}))}))}},n=new WeakMap,o=new WeakSet,r=function(){this.logger.debug("creating an sdk instance"),i(this,n,((t,e,i)=>{const s=O(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.1.23"}}));return{outboundApps:J({httpClient:s.httpClient,mock:e}),user:Object.assign({},V({httpClient:s.httpClient,mock:e}))}})({projectId:this.projectId,baseUrl:this.baseUrl,refreshCookieName:this.refreshCookieName},"true"===this.mock,this.widgetId),"f")},h})),G=k("users/me",((t,{extra:{api:e}})=>e.user.me())),K={action:G,reducer:U(G)({onFulfilled:(t,e)=>{t.me.data=e.payload}},R((t=>t.me)))},Q=n((t=>{const e=d(h({name:"widget",initialState:N,reducers:{setAllowedAppsIds:(t,{payload:e})=>{t.allowedAppsIds.data=e}},extraReducers:t=>{K.reducer(t),F.reducer(t),E.reducer(t)},asyncActions:{getMe:K.action,getOutboundApps:E.action,getConnectedOutboundApps:F.action}}),f,c,z)(t);return class extends e{constructor(...t){super(...t),this.state=N,this.subscribe((t=>{this.logger.debug("State update:",t),this.state=t}))}}})),X="widget-flow",Y=n((i=>{var s,o,n;return n=class extends(d(f,v,Q,u,c,g)(i)){constructor(){super(...arguments),s.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 n=x(X);n&&(!function(t){if(window.history.replaceState&&x(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,s,"m",o).call(this,n))}))}},s=new WeakSet,o=function(t){const e=this.createModal({"data-id":"redirect-flow"});e.setContent(j({projectId:this.projectId,flowId:t,baseUrl:this.baseUrl,baseStaticUrl:this.baseStaticUrl,baseCdnUrl:this.baseCdnUrl,refreshCookieName:this.refreshCookieName,theme:this.theme}));new C((()=>{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()},n})),Z=S((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))))),_=S((t=>t.me.data),(t=>t.userId)),tt=n((e=>{const i=d(m,b({"widget-id":b.missingAttrValidator}))(e);return class extends i{get widgetId(){return this.getAttribute("widget-id")}fetchWidgetPage(e){return t(this,void 0,void 0,(function*(){return(yield this.fetchStaticResource(`outbound-applications-widget/${this.widgetId}/${e}`,"text")).body}))}}})),et=n((i=>{var o,n,r,a,l;return l=class extends(d(c,f,w,A,tt,Q)(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)})]);const s=yield e(this,o,"m",n).call(this);e(this,o,"m",r).call(this,s),yield this.onWidgetRootReady(),this.dispatchEvent(new CustomEvent("ready"))}))}},o=new WeakSet,n=function(){return t(this,void 0,void 0,(function*(){const t=s(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):[]},l})),it=n((t=>class extends(d(g,l)(t)){syncFlowTheme(t){t.theme=this.theme,this.observeAttributes(["theme"],(()=>{t.theme=this.theme}))}})),st=n((s=>{var o,n,a,l,u,p,h,f,g,m,b,w,A,y,k,O,S;return S=class extends(d(it,Q,c,et,v)(s)){constructor(){super(...arguments),o.add(this),n.set(this,void 0),a.set(this,void 0),l.set(this,void 0),u.set(this,void 0),p.set(this,void 0),h.set(this,null),f.set(this,null),O.set(this,r((t=>{e(this,n,"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,o,"m",k).call(this,Z(this.state)),e(this,o,"m",g).call(this),e(this,o,"m",w).call(this),this.subscribe(e(this,O,"f").bind(this),Z)}))}},n=new WeakMap,a=new WeakMap,l=new WeakMap,u=new WeakMap,p=new WeakMap,h=new WeakMap,f=new WeakMap,O=new WeakMap,o=new WeakSet,g=function(){e(this,n,"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 s=null===(t=e(this,a,"f").ele)||void 0===t?void 0:t.querySelector("descope-wc");null==s||s.removeEventListener("page-updated",e(this,h,"f")),i(this,h,null,"f")}},i(this,u,new C((()=>{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")))},m=function(t,e,i){t.open(),e.removeEventListener("page-updated",i)},b=function(t,i){var s;const n=null===(s=t.ele)||void 0===s?void 0:s.querySelector("descope-wc"),d=()=>e(this,o,"m",m).call(this,t,n,d);i=d,null==n||n.addEventListener("page-updated",i)},w=function(){i(this,l,this.createModal({"data-id":"outbound-apps-disconnect"}),"f"),i(this,p,new C((()=>{var t;return null===(t=e(this,l,"f").ele)||void 0===t?void 0:t.querySelector("descope-wc")}),{logger:this.logger}),"f"),e(this,l,"f").afterClose=()=>{var t;if(e(this,f,"f")){const s=null===(t=e(this,l,"f").ele)||void 0===t?void 0:t.querySelector("descope-wc");null==s||s.removeEventListener("page-updated",e(this,f,"f")),i(this,f,null,"f")}},this.syncFlowTheme(e(this,p,"f"))},A=function(t){e(this,a,"f").setContent(j({projectId:this.projectId,flowId:e(this,n,"f").connectFlowId,baseUrl:this.baseUrl,baseStaticUrl:this.baseStaticUrl,baseCdnUrl:this.baseCdnUrl,refreshCookieName:this.refreshCookieName,theme:this.theme,outboundAppId:t})),e(this,o,"m",b).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)})}))},y=function(t){e(this,l,"f").setContent(j({projectId:this.projectId,flowId:e(this,n,"f").disconnectFlowId,baseUrl:this.baseUrl,baseStaticUrl:this.baseStaticUrl,baseCdnUrl:this.baseCdnUrl,refreshCookieName:this.refreshCookieName,theme:this.theme,outboundAppId:t})),e(this,o,"m",b).call(this,e(this,l,"f"),e(this,f,"f")),e(this,p,"f").onSuccess((()=>{e(this,l,"f").close(),this.actions.getConnectedOutboundApps({userId:_(this.state)})}))},k=function(t){i(this,n,new I((()=>{var t;return null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector("descope-outbound-apps")}),{logger:this.logger}),"f"),e(this,n,"f").onConnectClick((({id:t})=>{e(this,o,"m",A).call(this,t)})),e(this,n,"f").onDisconnectClick((({id:t})=>{e(this,o,"m",y).call(this,t)})),e(this,n,"f").data=t},S})),ot=n((e=>class extends(d(y,g,Y,st)(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)}))}})),nt=d((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.1.23"}}}))}}))(HTMLElement);customElements.define("descope-outbound-applications-widget",nt);export{nt as default};
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -116,7 +116,7 @@ declare const ApplicationsPortalWidget: {
|
|
|
116
116
|
"__#8@#initAppsList"(appsList: ReturnType<typeof getAppsList>): void;
|
|
117
117
|
"__#8@#onConnectedAppsUpdate": (data: any) => void;
|
|
118
118
|
onWidgetRootReady(): Promise<void>;
|
|
119
|
-
"__#
|
|
119
|
+
"__#29691@#ModalDriverWrapper": {
|
|
120
120
|
new (refOrRefFn: Element | (() => HTMLElement), config: {
|
|
121
121
|
logger: {
|
|
122
122
|
error(...data: any[]): void;
|
|
@@ -126,7 +126,7 @@ declare const ApplicationsPortalWidget: {
|
|
|
126
126
|
};
|
|
127
127
|
}): {
|
|
128
128
|
setContent(template: HTMLTemplateElement): void;
|
|
129
|
-
"__#
|
|
129
|
+
"__#29690@#private": any;
|
|
130
130
|
beforeOpen: () => void | Promise<void>;
|
|
131
131
|
afterClose: () => void;
|
|
132
132
|
nodeName: string;
|
|
@@ -134,7 +134,7 @@ declare const ApplicationsPortalWidget: {
|
|
|
134
134
|
open(): Promise<void>;
|
|
135
135
|
reset(): void;
|
|
136
136
|
remove(): void;
|
|
137
|
-
"__#
|
|
137
|
+
"__#29688@#private": any;
|
|
138
138
|
logger: {
|
|
139
139
|
error(...data: any[]): void;
|
|
140
140
|
warn(...data: any[]): void;
|
|
@@ -143,14 +143,15 @@ declare const ApplicationsPortalWidget: {
|
|
|
143
143
|
};
|
|
144
144
|
readonly asyncEle: Promise<Element>;
|
|
145
145
|
readonly ele: Element;
|
|
146
|
+
readonly isExists: boolean;
|
|
146
147
|
};
|
|
147
148
|
};
|
|
148
149
|
createModal(config?: Record<string, string>): _descope_sdk_component_drivers.ModalDriver;
|
|
149
|
-
"__#
|
|
150
|
-
"__#
|
|
150
|
+
"__#29687@#getComponentsVersion": (() => Promise<string>) & (() => Promise<string>) & (() => Promise<string>);
|
|
151
|
+
"__#29687@#descopeUi": Promise<any>;
|
|
151
152
|
readonly descopeUi: Promise<any>;
|
|
152
|
-
"__#
|
|
153
|
-
"__#
|
|
153
|
+
"__#29687@#loadDescopeUiComponent": ((componentName: string) => Promise<any>) & ((componentName: string) => Promise<any>) & ((componentName: string) => Promise<any>);
|
|
154
|
+
"__#29687@#getDescopeUi": (() => Promise<any>) & (() => Promise<any>) & (() => Promise<any>);
|
|
154
155
|
loadDescopeUiComponents: ((templateOrComponentNames: HTMLTemplateElement | string[]) => Promise<any[]>) & ((templateOrComponentNames: HTMLTemplateElement | string[]) => Promise<any[]>) & ((templateOrComponentNames: HTMLTemplateElement | string[]) => Promise<any[]>);
|
|
155
156
|
readonly baseCdnUrl: string;
|
|
156
157
|
injectNpmLib: ((libName: string, version: string, filePath?: string, overrides?: string[]) => Promise<{
|
|
@@ -163,8 +164,8 @@ declare const ApplicationsPortalWidget: {
|
|
|
163
164
|
id: string;
|
|
164
165
|
url: URL;
|
|
165
166
|
}>);
|
|
166
|
-
"__#
|
|
167
|
-
"__#
|
|
167
|
+
"__#29677@#logger": _descope_sdk_mixins.Logger;
|
|
168
|
+
"__#29677@#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);
|
|
168
169
|
logger: _descope_sdk_mixins.Logger;
|
|
169
170
|
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: _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: _descope_sdk_mixins.LogLevel, args: any[]) => void);
|
|
170
171
|
accessKey: string;
|
|
@@ -1116,20 +1117,20 @@ declare const ApplicationsPortalWidget: {
|
|
|
1116
1117
|
blur: (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void);
|
|
1117
1118
|
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);
|
|
1118
1119
|
readonly config: Promise<_descope_sdk_mixins.Config>;
|
|
1119
|
-
"__#
|
|
1120
|
-
"__#
|
|
1121
|
-
"__#
|
|
1122
|
-
"__#
|
|
1123
|
-
"__#
|
|
1120
|
+
"__#29683@#configCacheClear": (() => void) & (() => void) & (() => void) & (() => void);
|
|
1121
|
+
"__#29683@#_configResource": Promise<_descope_sdk_mixins.Config>;
|
|
1122
|
+
"__#29683@#fetchConfig": (() => Promise<_descope_sdk_mixins.Config>) & (() => Promise<_descope_sdk_mixins.Config>) & (() => Promise<_descope_sdk_mixins.Config>) & (() => Promise<_descope_sdk_mixins.Config>);
|
|
1123
|
+
"__#29678@#isInit": boolean;
|
|
1124
|
+
"__#29682@#callbacks": Map<string, () => void> & Map<string, () => void> & Map<string, () => void> & Map<string, () => void>;
|
|
1124
1125
|
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);
|
|
1125
1126
|
reset: ((...sectionIds: string[]) => Promise<void>) & ((...sectionIds: string[]) => Promise<void>) & ((...sectionIds: string[]) => Promise<void>) & ((...sectionIds: string[]) => Promise<void>);
|
|
1126
|
-
"__#
|
|
1127
|
-
"__#
|
|
1127
|
+
"__#29680@#handleError": ((attrName: string, newValue: string) => void) & ((attrName: string, newValue: string) => void) & ((attrName: string, newValue: string) => void) & ((attrName: string, newValue: string | null) => 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);
|
|
1128
|
+
"__#29679@#observeMappings": {} & {} & {};
|
|
1128
1129
|
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 | 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);
|
|
1129
1130
|
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 | 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);
|
|
1130
|
-
"__#
|
|
1131
|
-
"__#
|
|
1132
|
-
"__#
|
|
1131
|
+
"__#29681@#lastBaseUrl"?: string;
|
|
1132
|
+
"__#29681@#workingBaseUrl"?: string;
|
|
1133
|
+
"__#29681@#getResourceUrls": ((filename: string) => (URL & {
|
|
1133
1134
|
baseUrl: string;
|
|
1134
1135
|
}) | (URL & {
|
|
1135
1136
|
baseUrl: string;
|
|
@@ -1207,7 +1208,7 @@ declare const ApplicationsPortalWidget: {
|
|
|
1207
1208
|
replaceSync(cssString: string): void;
|
|
1208
1209
|
readonly cssRules: CSSRuleList;
|
|
1209
1210
|
} | CSSStyleSheet);
|
|
1210
|
-
"__#
|
|
1211
|
+
"__#29684@#setNonce": (() => void) & (() => void) & (() => void) & (() => void);
|
|
1211
1212
|
"__#7@#initWidgetRoot"(): Promise<HTMLTemplateElement>;
|
|
1212
1213
|
"__#7@#renderTemplate"(template: HTMLTemplateElement): void;
|
|
1213
1214
|
readonly "__#7@#allowedIds": string[];
|
|
@@ -1470,24 +1471,24 @@ declare const ApplicationsPortalWidget: {
|
|
|
1470
1471
|
}) => SelectorR) => redux.Unsubscribe;
|
|
1471
1472
|
fetchWidgetPage(filename: string): Promise<string>;
|
|
1472
1473
|
syncFlowTheme(flowDriver: _descope_sdk_component_drivers.FlowDriver): void;
|
|
1473
|
-
"__#
|
|
1474
|
+
"__#29693@#globalStyle": _descope_sdk_mixins.InjectedStyle;
|
|
1474
1475
|
readonly theme: _descope_sdk_mixins.ThemeOptions;
|
|
1475
1476
|
readonly styleId: string;
|
|
1476
|
-
"__#
|
|
1477
|
-
"__#
|
|
1478
|
-
readonly "__#
|
|
1479
|
-
"__#
|
|
1480
|
-
"__#
|
|
1481
|
-
"__#
|
|
1477
|
+
"__#29693@#_themeResource": Promise<void | Record<string, any>>;
|
|
1478
|
+
"__#29693@#fetchTheme"(): Promise<Record<string, any>>;
|
|
1479
|
+
readonly "__#29693@#themeResource": Promise<void | Record<string, any>>;
|
|
1480
|
+
"__#29693@#loadGlobalStyle"(): Promise<void>;
|
|
1481
|
+
"__#29693@#loadComponentsStyle"(): Promise<void>;
|
|
1482
|
+
"__#29693@#getFontsConfig"(): Promise<Record<string, {
|
|
1482
1483
|
url?: string;
|
|
1483
1484
|
}>>;
|
|
1484
|
-
"__#
|
|
1485
|
-
"__#
|
|
1486
|
-
"__#
|
|
1487
|
-
"__#
|
|
1488
|
-
"__#
|
|
1485
|
+
"__#29693@#loadFonts"(): Promise<void>;
|
|
1486
|
+
"__#29693@#applyTheme"(): Promise<void>;
|
|
1487
|
+
"__#29693@#onThemeChange": () => void;
|
|
1488
|
+
"__#29693@#loadTheme"(): void;
|
|
1489
|
+
"__#29693@#toggleOsThemeChangeListener": (listen: boolean) => void;
|
|
1489
1490
|
"__#6@#createFlowRedirectModal"(widgetFlow: string): void;
|
|
1490
|
-
"__#
|
|
1491
|
+
"__#29686@#debuggerEle": (HTMLElement & {
|
|
1491
1492
|
updateData: (data: {
|
|
1492
1493
|
title: string;
|
|
1493
1494
|
description?: string;
|
|
@@ -1496,11 +1497,11 @@ declare const ApplicationsPortalWidget: {
|
|
|
1496
1497
|
description?: string;
|
|
1497
1498
|
}[]) => void;
|
|
1498
1499
|
}) | null;
|
|
1499
|
-
"__#
|
|
1500
|
-
"__#
|
|
1500
|
+
"__#29686@#disableDebugger"(): void;
|
|
1501
|
+
"__#29686@#enableDebugger"(): Promise<void>;
|
|
1501
1502
|
readonly debug: boolean;
|
|
1502
|
-
"__#
|
|
1503
|
-
"__#
|
|
1503
|
+
"__#29686@#handleDebugMode"(): void;
|
|
1504
|
+
"__#29686@#updateDebuggerMessages"(title: string, description: string): void;
|
|
1504
1505
|
};
|
|
1505
1506
|
readonly observedAttributes: string[];
|
|
1506
1507
|
};
|