@descope/outbound-applications-widget 0.2.16 → 0.2.18
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 +39 -39
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/**
|
|
3
|
-
* @descope/outbound-applications-widget v0.2.
|
|
3
|
+
* @descope/outbound-applications-widget v0.2.18
|
|
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,DEFAULT_STYLE_ID as h,createStateManagementMixin as f,initLifecycleMixin as v,modalMixin as g,themeMixin as m,staticResourcesMixin as b,createValidateAttributesMixin as w,descopeUiMixin as y,initElementMixin as A,debuggerMixin as I}from"@descope/sdk-mixins";import{FlowDriver as C,OutboundAppsListDriver as k}from"@descope/sdk-component-drivers";import{createAsyncThunk as O}from"@reduxjs/toolkit";import S from"@descope/web-js-sdk";import{createSelector as j}from"reselect";const x=(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 U(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))),P={action:M,reducer:E},L=O("outboundApps/getConnectedOutboundApps",((t,{extra:{api:e}})=>e.outboundApps.getConnectedOutboundApps(t))),F=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))),N={action:L,reducer:F},q={outboundAppsList:{data:[],loading:!1,error:null},connectedOutboundAppsIds:{data:[],loading:!1,error:null},allowedAppsIds:{data:void 0},me:{loading:!1,error:null,data:{}}},$={allOutboundApps:"/v1/mgmt/outbound/apps",connectedOutboundApps:"/v1/mgmt/outbound/apps-with-user-token"},D={me:"/v1/auth/me"},T=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)})),H=()=>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"}]})}))})),B=()=>t(void 0,void 0,void 0,(function*(){return new Promise((t=>{t({apps:["outboundApp3"]})}))})),J=()=>t(void 0,void 0,void 0,(function*(){return new Promise((t=>{t({userId:"user-1"})}))})),V=({httpClient:e,mock:i})=>({getAllOutboundApps:()=>t(void 0,void 0,void 0,(function*(){if(i)return H();const t=yield e.get($.allOutboundApps);return yield T(t),t.json()})),getConnectedOutboundApps:s=>t(void 0,[s],void 0,(function*({userId:t,tenantId:s}){if(i)return B();const o=yield e.get($.connectedOutboundApps,{queryParams:s?{userId:t,tenant:s}:{userId:t}});return yield T(o),o.json()}))}),z=({httpClient:e,mock:i})=>({me:()=>t(void 0,void 0,void 0,(function*(){if(i)return J();const t=yield e.get(D.me);return yield T(t),t.json()}))}),G=n((s=>{var o,n,r,f;const v=d(a,l,c,u,p)(s);return f=class extends v{constructor(){super(...arguments),o.add(this),n.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")||h}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=S(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.2.16"}}));return{outboundApps:V({httpClient:s.httpClient,mock:e}),user:Object.assign({},z({httpClient:s.httpClient,mock:e}))}})({projectId:this.projectId,baseUrl:this.baseUrl,refreshCookieName:this.refreshCookieName},"true"===this.mock,this.widgetId),"f")},f})),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)))},X=n((t=>{const e=d(f({name:"widget",initialState:q,reducers:{setAllowedAppsIds:(t,{payload:e})=>{t.allowedAppsIds.data=e}},extraReducers:t=>{Q.reducer(t),N.reducer(t),P.reducer(t)},asyncActions:{getMe:Q.action,getOutboundApps:P.action,getConnectedOutboundApps:N.action}}),v,c,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}))}}})),Y="widget-flow",Z=n((i=>{var s,o,n;return n=class extends(d(v,g,X,u,c,m)(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=U(Y);n&&(!function(t){if(window.history.replaceState&&U(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())}}(Y),e(this,s,"m",o).call(this,n))}))}},s=new WeakSet,o=function(t){const e=this.createModal({"data-id":"redirect-flow"});e.setContent(x({projectId:this.projectId,flowId:t,baseUrl:this.baseUrl,baseStaticUrl:this.baseStaticUrl,baseCdnUrl:this.baseCdnUrl,refreshCookieName:this.refreshCookieName,theme:this.theme,"style-id":this.styleId}));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})),_=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))))),tt=j((t=>t.me.data),(t=>t.userId)),et=n((e=>{const i=d(b,w({"widget-id":w.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}))}}})),it=n((i=>{var o,n,r,a,l;return l=class extends(d(c,v,y,A,et,X)(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:tt(this.state),tenantId:this.tenantId})]);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})),st=n((t=>class extends(d(m,l)(t)){syncFlowTheme(t){t.theme=this.theme,this.observeAttributes(["theme"],(()=>{t.theme=this.theme}))}})),ot=n((s=>{var o,n,a,l,u,p,h,f,v,m,b,w,y,A,I,O,S;return S=class extends(d(st,X,c,it,g)(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",I).call(this,_(this.state)),e(this,o,"m",v).call(this),e(this,o,"m",w).call(this),this.subscribe(e(this,O,"f").bind(this),_)}))}},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,v=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"))},y=function(t){e(this,a,"f").setContent(x({projectId:this.projectId,flowId:e(this,n,"f").connectFlowId,baseUrl:this.baseUrl,baseStaticUrl:this.baseStaticUrl,baseCdnUrl:this.baseCdnUrl,refreshCookieName:this.refreshCookieName,theme:this.theme,"style-id":this.styleId,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:tt(this.state),tenantId:this.tenantId})}))},A=function(t){e(this,l,"f").setContent(x({projectId:this.projectId,flowId:e(this,n,"f").disconnectFlowId,baseUrl:this.baseUrl,baseStaticUrl:this.baseStaticUrl,baseCdnUrl:this.baseCdnUrl,refreshCookieName:this.refreshCookieName,theme:this.theme,"style-id":this.styleId,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:tt(this.state)})}))},I=function(t){i(this,n,new k((()=>{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",y).call(this,t)})),e(this,n,"f").onDisconnectClick((({id:t})=>{e(this,o,"m",A).call(this,t)})),e(this,n,"f").data=t},S})),nt=n((e=>class extends(d(I,m,Z,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)}))}})),dt=d((e=>class extends(nt(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.2.16"}}}))}}))(HTMLElement);customElements.define("descope-outbound-applications-widget",dt);export{dt 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,DEFAULT_STYLE_ID as h,createStateManagementMixin as f,initLifecycleMixin as v,modalMixin as g,themeMixin as m,staticResourcesMixin as b,createValidateAttributesMixin as w,descopeUiMixin as y,initElementMixin as A,debuggerMixin as I}from"@descope/sdk-mixins";import{FlowDriver as C,OutboundAppsListDriver as k}from"@descope/sdk-component-drivers";import{createAsyncThunk as O}from"@reduxjs/toolkit";import S from"@descope/web-js-sdk";import{createSelector as j}from"reselect";const x=(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 U(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))),P={action:M,reducer:E},L=O("outboundApps/getConnectedOutboundApps",((t,{extra:{api:e}})=>e.outboundApps.getConnectedOutboundApps(t))),F=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))),N={action:L,reducer:F},q={outboundAppsList:{data:[],loading:!1,error:null},connectedOutboundAppsIds:{data:[],loading:!1,error:null},allowedAppsIds:{data:void 0},me:{loading:!1,error:null,data:{}}},$={allOutboundApps:"/v1/mgmt/outbound/apps",connectedOutboundApps:"/v1/mgmt/outbound/apps-with-user-token"},D={me:"/v1/auth/me"},T=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)})),H=()=>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"}]})}))})),B=()=>t(void 0,void 0,void 0,(function*(){return new Promise((t=>{t({apps:["outboundApp3"]})}))})),J=()=>t(void 0,void 0,void 0,(function*(){return new Promise((t=>{t({userId:"user-1"})}))})),V=({httpClient:e,mock:i})=>({getAllOutboundApps:()=>t(void 0,void 0,void 0,(function*(){if(i)return H();const t=yield e.get($.allOutboundApps);return yield T(t),t.json()})),getConnectedOutboundApps:s=>t(void 0,[s],void 0,(function*({userId:t,tenantId:s}){if(i)return B();const o=yield e.get($.connectedOutboundApps,{queryParams:s?{userId:t,tenant:s}:{userId:t}});return yield T(o),o.json()}))}),z=({httpClient:e,mock:i})=>({me:()=>t(void 0,void 0,void 0,(function*(){if(i)return J();const t=yield e.get(D.me);return yield T(t),t.json()}))}),G=n((s=>{var o,n,r,f;const v=d(a,l,c,u,p)(s);return f=class extends v{constructor(){super(...arguments),o.add(this),n.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")||h}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=S(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.2.18"}}));return{outboundApps:V({httpClient:s.httpClient,mock:e}),user:Object.assign({},z({httpClient:s.httpClient,mock:e}))}})({projectId:this.projectId,baseUrl:this.baseUrl,refreshCookieName:this.refreshCookieName},"true"===this.mock,this.widgetId),"f")},f})),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)))},X=n((t=>{const e=d(f({name:"widget",initialState:q,reducers:{setAllowedAppsIds:(t,{payload:e})=>{t.allowedAppsIds.data=e}},extraReducers:t=>{Q.reducer(t),N.reducer(t),P.reducer(t)},asyncActions:{getMe:Q.action,getOutboundApps:P.action,getConnectedOutboundApps:N.action}}),v,c,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}))}}})),Y="widget-flow",Z=n((i=>{var s,o,n;return n=class extends(d(v,g,X,u,c,m)(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=U(Y);n&&(!function(t){if(window.history.replaceState&&U(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())}}(Y),e(this,s,"m",o).call(this,n))}))}},s=new WeakSet,o=function(t){const e=this.createModal({"data-id":"redirect-flow"});e.setContent(x({projectId:this.projectId,flowId:t,baseUrl:this.baseUrl,baseStaticUrl:this.baseStaticUrl,baseCdnUrl:this.baseCdnUrl,refreshCookieName:this.refreshCookieName,theme:this.theme,"style-id":this.styleId}));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})),_=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))))),tt=j((t=>t.me.data),(t=>t.userId)),et=n((e=>{const i=d(b,w({"widget-id":w.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}))}}})),it=n((i=>{var o,n,r,a,l;return l=class extends(d(c,v,y,A,et,X)(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:tt(this.state),tenantId:this.tenantId})]);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})),st=n((t=>class extends(d(m,l)(t)){syncFlowTheme(t){t.theme=this.theme,this.observeAttributes(["theme"],(()=>{t.theme=this.theme}))}})),ot=n((s=>{var o,n,a,l,u,p,h,f,v,m,b,w,y,A,I,O,S;return S=class extends(d(st,X,c,it,g)(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",I).call(this,_(this.state)),e(this,o,"m",v).call(this),e(this,o,"m",w).call(this),this.subscribe(e(this,O,"f").bind(this),_)}))}},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,v=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"))},y=function(t){e(this,a,"f").setContent(x({projectId:this.projectId,flowId:e(this,n,"f").connectFlowId,baseUrl:this.baseUrl,baseStaticUrl:this.baseStaticUrl,baseCdnUrl:this.baseCdnUrl,refreshCookieName:this.refreshCookieName,theme:this.theme,"style-id":this.styleId,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:tt(this.state),tenantId:this.tenantId})}))},A=function(t){e(this,l,"f").setContent(x({projectId:this.projectId,flowId:e(this,n,"f").disconnectFlowId,baseUrl:this.baseUrl,baseStaticUrl:this.baseStaticUrl,baseCdnUrl:this.baseCdnUrl,refreshCookieName:this.refreshCookieName,theme:this.theme,"style-id":this.styleId,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:tt(this.state)})}))},I=function(t){i(this,n,new k((()=>{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",y).call(this,t)})),e(this,n,"f").onDisconnectClick((({id:t})=>{e(this,o,"m",A).call(this,t)})),e(this,n,"f").data=t},S})),nt=n((e=>class extends(d(I,m,Z,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)}))}})),dt=d((e=>class extends(nt(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.2.18"}}}))}}))(HTMLElement);customElements.define("descope-outbound-applications-widget",dt);export{dt as default};
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -117,7 +117,7 @@ declare const ApplicationsPortalWidget: {
|
|
|
117
117
|
"__#8@#initAppsList"(appsList: ReturnType<typeof getAppsList>): void;
|
|
118
118
|
"__#8@#onConnectedAppsUpdate": (data: any) => void;
|
|
119
119
|
onWidgetRootReady(): Promise<void>;
|
|
120
|
-
"__#
|
|
120
|
+
"__#32132@#ModalDriverWrapper": {
|
|
121
121
|
new (refOrRefFn: Element | (() => HTMLElement), config: {
|
|
122
122
|
logger: {
|
|
123
123
|
error(...data: any[]): void;
|
|
@@ -127,7 +127,7 @@ declare const ApplicationsPortalWidget: {
|
|
|
127
127
|
};
|
|
128
128
|
}): {
|
|
129
129
|
setContent(template: HTMLTemplateElement): void;
|
|
130
|
-
"__#
|
|
130
|
+
"__#32131@#private": any;
|
|
131
131
|
beforeOpen: () => void | Promise<void>;
|
|
132
132
|
afterClose: () => void;
|
|
133
133
|
nodeName: string;
|
|
@@ -135,7 +135,7 @@ declare const ApplicationsPortalWidget: {
|
|
|
135
135
|
open(): Promise<void>;
|
|
136
136
|
reset(): void;
|
|
137
137
|
remove(): void;
|
|
138
|
-
"__#
|
|
138
|
+
"__#32129@#private": any;
|
|
139
139
|
logger: {
|
|
140
140
|
error(...data: any[]): void;
|
|
141
141
|
warn(...data: any[]): void;
|
|
@@ -148,11 +148,11 @@ declare const ApplicationsPortalWidget: {
|
|
|
148
148
|
};
|
|
149
149
|
};
|
|
150
150
|
createModal(config?: Record<string, string>): _descope_sdk_component_drivers.ModalDriver;
|
|
151
|
-
"__#
|
|
152
|
-
"__#
|
|
151
|
+
"__#32128@#getComponentsVersion": (() => Promise<string>) & (() => Promise<string>) & (() => Promise<string>);
|
|
152
|
+
"__#32128@#descopeUi": Promise<any>;
|
|
153
153
|
readonly descopeUi: Promise<any>;
|
|
154
|
-
"__#
|
|
155
|
-
"__#
|
|
154
|
+
"__#32128@#loadDescopeUiComponent": ((componentName: string) => Promise<any>) & ((componentName: string) => Promise<any>) & ((componentName: string) => Promise<any>);
|
|
155
|
+
"__#32128@#getDescopeUi": (() => Promise<any>) & (() => Promise<any>) & (() => Promise<any>);
|
|
156
156
|
loadDescopeUiComponents: ((templateOrComponentNames: HTMLTemplateElement | string[]) => Promise<any[]>) & ((templateOrComponentNames: HTMLTemplateElement | string[]) => Promise<any[]>) & ((templateOrComponentNames: HTMLTemplateElement | string[]) => Promise<any[]>);
|
|
157
157
|
readonly baseCdnUrl: string;
|
|
158
158
|
injectNpmLib: ((libName: string, version: string, filePath?: string, overrides?: string[]) => Promise<{
|
|
@@ -165,8 +165,8 @@ declare const ApplicationsPortalWidget: {
|
|
|
165
165
|
id: string;
|
|
166
166
|
url: URL;
|
|
167
167
|
}>);
|
|
168
|
-
"__#
|
|
169
|
-
"__#
|
|
168
|
+
"__#32118@#logger": _descope_sdk_mixins.Logger;
|
|
169
|
+
"__#32118@#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);
|
|
170
170
|
logger: _descope_sdk_mixins.Logger;
|
|
171
171
|
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);
|
|
172
172
|
accessKey: string;
|
|
@@ -1118,21 +1118,21 @@ declare const ApplicationsPortalWidget: {
|
|
|
1118
1118
|
blur: (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void) & (() => void);
|
|
1119
1119
|
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);
|
|
1120
1120
|
readonly config: Promise<_descope_sdk_mixins.Config>;
|
|
1121
|
-
"__#
|
|
1122
|
-
"__#
|
|
1123
|
-
"__#
|
|
1124
|
-
"__#
|
|
1125
|
-
"__#
|
|
1121
|
+
"__#32124@#configCacheClear": (() => void) & (() => void) & (() => void) & (() => void);
|
|
1122
|
+
"__#32124@#_configResource": Promise<_descope_sdk_mixins.Config>;
|
|
1123
|
+
"__#32124@#fetchConfig": (() => Promise<_descope_sdk_mixins.Config>) & (() => Promise<_descope_sdk_mixins.Config>) & (() => Promise<_descope_sdk_mixins.Config>) & (() => Promise<_descope_sdk_mixins.Config>);
|
|
1124
|
+
"__#32119@#isInit": boolean;
|
|
1125
|
+
"__#32123@#callbacks": Map<string, () => void> & Map<string, () => void> & Map<string, () => void> & Map<string, () => void>;
|
|
1126
1126
|
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);
|
|
1127
1127
|
reset: ((...sectionIds: string[]) => Promise<void>) & ((...sectionIds: string[]) => Promise<void>) & ((...sectionIds: string[]) => Promise<void>) & ((...sectionIds: string[]) => Promise<void>);
|
|
1128
|
-
"__#
|
|
1129
|
-
"__#
|
|
1128
|
+
"__#32121@#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);
|
|
1129
|
+
"__#32120@#observeMappings": {} & {} & {};
|
|
1130
1130
|
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);
|
|
1131
1131
|
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);
|
|
1132
|
-
"__#
|
|
1133
|
-
"__#
|
|
1134
|
-
"__#
|
|
1135
|
-
"__#
|
|
1132
|
+
"__#32122@#lastBaseUrl"?: string;
|
|
1133
|
+
"__#32122@#workingBaseUrl"?: string;
|
|
1134
|
+
"__#32122@#failedUrls": Set<string>;
|
|
1135
|
+
"__#32122@#getResourceUrls": ((filename: string) => (URL & {
|
|
1136
1136
|
baseUrl: string;
|
|
1137
1137
|
}) | (URL & {
|
|
1138
1138
|
baseUrl: string;
|
|
@@ -1157,7 +1157,7 @@ declare const ApplicationsPortalWidget: {
|
|
|
1157
1157
|
}) | (URL & {
|
|
1158
1158
|
baseUrl: string;
|
|
1159
1159
|
})[]);
|
|
1160
|
-
"__#
|
|
1160
|
+
"__#32122@#createResourceUrl": ((filename: string, baseUrl: string) => URL & {
|
|
1161
1161
|
baseUrl: string;
|
|
1162
1162
|
}) & ((filename: string, baseUrl: string) => URL & {
|
|
1163
1163
|
baseUrl: string;
|
|
@@ -1223,7 +1223,7 @@ declare const ApplicationsPortalWidget: {
|
|
|
1223
1223
|
replaceSync(cssString: string): void;
|
|
1224
1224
|
readonly cssRules: CSSRuleList;
|
|
1225
1225
|
} | CSSStyleSheet);
|
|
1226
|
-
"__#
|
|
1226
|
+
"__#32125@#setNonce": (() => void) & (() => void) & (() => void) & (() => void);
|
|
1227
1227
|
"__#7@#initWidgetRoot"(): Promise<HTMLTemplateElement>;
|
|
1228
1228
|
"__#7@#renderTemplate"(template: HTMLTemplateElement): void;
|
|
1229
1229
|
readonly "__#7@#allowedIds": string[];
|
|
@@ -1488,23 +1488,23 @@ declare const ApplicationsPortalWidget: {
|
|
|
1488
1488
|
}) => SelectorR) => redux.Unsubscribe;
|
|
1489
1489
|
fetchWidgetPage(filename: string): Promise<string>;
|
|
1490
1490
|
syncFlowTheme(flowDriver: _descope_sdk_component_drivers.FlowDriver): void;
|
|
1491
|
-
"__#
|
|
1491
|
+
"__#32134@#globalStyle": _descope_sdk_mixins.InjectedStyle;
|
|
1492
1492
|
readonly theme: _descope_sdk_mixins.ThemeOptions;
|
|
1493
|
-
"__#
|
|
1494
|
-
"__#
|
|
1495
|
-
readonly "__#
|
|
1496
|
-
"__#
|
|
1497
|
-
"__#
|
|
1498
|
-
"__#
|
|
1493
|
+
"__#32134@#_themeResource": Promise<void | Record<string, any>>;
|
|
1494
|
+
"__#32134@#fetchTheme"(): Promise<Record<string, any>>;
|
|
1495
|
+
readonly "__#32134@#themeResource": Promise<void | Record<string, any>>;
|
|
1496
|
+
"__#32134@#loadGlobalStyle"(): Promise<void>;
|
|
1497
|
+
"__#32134@#loadComponentsStyle"(): Promise<void>;
|
|
1498
|
+
"__#32134@#getFontsConfig"(): Promise<Record<string, {
|
|
1499
1499
|
url?: string;
|
|
1500
1500
|
}>>;
|
|
1501
|
-
"__#
|
|
1502
|
-
"__#
|
|
1503
|
-
"__#
|
|
1504
|
-
"__#
|
|
1505
|
-
"__#
|
|
1501
|
+
"__#32134@#loadFonts"(): Promise<void>;
|
|
1502
|
+
"__#32134@#applyTheme"(): Promise<void>;
|
|
1503
|
+
"__#32134@#onThemeChange": () => void;
|
|
1504
|
+
"__#32134@#loadTheme"(): void;
|
|
1505
|
+
"__#32134@#toggleOsThemeChangeListener": (listen: boolean) => void;
|
|
1506
1506
|
"__#6@#createFlowRedirectModal"(widgetFlow: string): void;
|
|
1507
|
-
"__#
|
|
1507
|
+
"__#32127@#debuggerEle": (HTMLElement & {
|
|
1508
1508
|
updateData: (data: {
|
|
1509
1509
|
title: string;
|
|
1510
1510
|
description?: string;
|
|
@@ -1513,11 +1513,11 @@ declare const ApplicationsPortalWidget: {
|
|
|
1513
1513
|
description?: string;
|
|
1514
1514
|
}[]) => void;
|
|
1515
1515
|
}) | null;
|
|
1516
|
-
"__#
|
|
1517
|
-
"__#
|
|
1516
|
+
"__#32127@#disableDebugger"(): void;
|
|
1517
|
+
"__#32127@#enableDebugger"(): Promise<void>;
|
|
1518
1518
|
readonly debug: boolean;
|
|
1519
|
-
"__#
|
|
1520
|
-
"__#
|
|
1519
|
+
"__#32127@#handleDebugMode"(): void;
|
|
1520
|
+
"__#32127@#updateDebuggerMessages"(title: string, description: string): void;
|
|
1521
1521
|
};
|
|
1522
1522
|
readonly observedAttributes: string[];
|
|
1523
1523
|
};
|