New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@descope/applications-portal-widget

Package Overview
Dependencies
Maintainers
0
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@descope/applications-portal-widget - npm Package Compare versions

Comparing version 0.2.20 to 0.2.21

4

dist/esm/index.js
/**
* @descope/applications-portal-widget v0.2.20
* @descope/applications-portal-widget v0.2.21
*/
import{createSingletonMixin as t,compose as e,createTemplate as i}from"@descope/sdk-helpers";import{__awaiter as s,__classPrivateFieldGet as o,__classPrivateFieldSet as n}from"tslib";import{projectIdMixin as d,observeAttributesMixin as r,loggerMixin as a,baseUrlMixin as l,createStateManagementMixin as c,initLifecycleMixin as p,staticResourcesMixin as u,createValidateAttributesMixin as h,descopeUiMixin as g,initElementMixin as v,debuggerMixin as m,themeMixin as f}from"@descope/sdk-mixins";import{AppsListDriver as y}from"@descope/sdk-component-drivers";import{createSelector as b}from"reselect";import{createAsyncThunk as w}from"@reduxjs/toolkit";import A from"@descope/web-js-sdk";var x;!function(t){t.oidc="oidc",t.saml="saml"}(x||(x={}));const R=b((t=>t.ssoAppsList.data),(t=>{var e;return null===(e=null==t?void 0:t.filter)||void 0===e?void 0:e.call(t,(t=>t.appType===x.saml))})),k=b(R,(t=>t.map((t=>({name:t.name,icon:t.logo,url:t.samlSettings.idpInitiatedUrl}))))),S=w("ssoApps/load",((t,{extra:{api:e}})=>e.ssoApps.load())),j=(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)}))}))})(S)({onFulfilled:(t,e)=>{var i;t.ssoAppsList.data=null===(i=e.payload)||void 0===i?void 0:i.apps}},(W=t=>t.ssoAppsList,{onFulfilled:t=>{W(t).loading=!1},onPending:t=>{W(t).loading=!0,W(t).error=null},onRejected:(t,e)=>{W(t).loading=!1,W(t).error=e.error}}));var W;const I={action:S,reducer:j},O={ssoAppsList:{data:[],loading:!1,error:null}},T={load:"/v1/mgmt/sso/idp/apps/load"},L=()=>s(void 0,void 0,void 0,(function*(){return new Promise((t=>{t({apps:[{id:"ssoapp1",name:"App 1",description:"This is the first SAML app",enabled:!0,appType:x.saml,logo:"logo1",samlSettings:{idpInitiatedUrl:""}},{id:"ssoapp2",name:"App 2",description:"This is the first OIDC app",enabled:!0,appType:x.oidc,logo:"logo2"},{id:"ssoapp3",name:"App 3",description:"This is the second SAML app",enabled:!0,appType:x.saml,logo:"logo3",samlSettings:{idpInitiatedUrl:""}}]})}))})),C=({httpClient:t,mock:e})=>({load:()=>s(void 0,void 0,void 0,(function*(){if(e)return L();const i=yield t.get(T.load);return yield(t=>s(void 0,void 0,void 0,(function*(){const e=yield t.text(),i=JSON.parse(e);if(!t.ok){const e=`${i.errorDescription}${i.errorMessage?`: ${i.errorMessage}`:""}`;throw Error(e||`${t.status} ${t.statusText}`)}t.json=()=>Promise.resolve(i),t.text=()=>Promise.resolve(e)})))(i),i.json()}))}),P=t((t=>{var i,c,p,u;const h=e(d,r,a,l)(t);return u=class extends h{constructor(){super(...arguments),i.add(this),c.set(this,void 0)}get widgetId(){return this.getAttribute("widget-id")}get mock(){return this.getAttribute("mock")}get api(){return o(this,c,"f")||o(this,i,"m",p).call(this),o(this,c,"f")}init(){const t=Object.create(null,{init:{get:()=>super.init}});return s(this,void 0,void 0,(function*(){var e;yield null===(e=t.init)||void 0===e?void 0:e.call(this),this.observeAttributes(["project-id","base-url"],(()=>{o(this,c,"f")&&o(this,i,"m",p).call(this)}))}))}},c=new WeakMap,i=new WeakSet,p=function(){this.logger.debug("creating an sdk instance"),n(this,c,((t,e,i)=>{const s=A(Object.assign(Object.assign({},t),{persistTokens:!0,baseHeaders:{"x-descope-widget-type":"applications-portal-widget","x-descope-widget-id":i,"x-descope-widget-version":"0.2.20"}}));return{ssoApps:C({httpClient:s.httpClient,mock:e})}})({projectId:this.projectId,baseUrl:this.baseUrl},"true"===this.mock,this.widgetId),"f")},u})),E=t((t=>{const i=e(c({name:"widget",initialState:O,reducers:{},extraReducers:t=>{I.reducer(t)},asyncActions:{loadSSOApps:I.action}}),p,a,P)(t);return class extends i{constructor(...t){super(...t),this.state=O,this.subscribe((t=>{this.logger.debug("State update:",t),this.state=t}))}}})),$=t((t=>{const i=e(u,h({"widget-id":h.missingAttrValidator}))(t);return class extends i{get widgetId(){return this.getAttribute("widget-id")}fetchWidgetPage(t){return s(this,void 0,void 0,(function*(){return(yield this.fetchStaticResource(`applications-portal-widget/${this.widgetId}/${t}`,"text")).body}))}}})),M=t((t=>{var n,d,r,l;return l=class extends(e(a,p,g,v,$,E)(t)){constructor(){super(...arguments),n.add(this)}onWidgetRootReady(){return s(this,void 0,void 0,(function*(){}))}init(){const t=Object.create(null,{init:{get:()=>super.init}});return s(this,void 0,void 0,(function*(){var e;yield null===(e=t.init)||void 0===e?void 0:e.call(this);const[i]=yield Promise.all([o(this,n,"m",d).call(this),this.actions.loadSSOApps()]);o(this,n,"m",r).call(this,i),this.onWidgetRootReady()}))}},n=new WeakSet,d=function(){return s(this,void 0,void 0,(function*(){const t=i(yield this.fetchWidgetPage("root.html"));return yield this.loadDescopeUiComponents(t),t}))},r=function(t){this.contentRootElement.append(t.content.cloneNode(!0))},l})),U=t((t=>{var i,n,d;return d=class extends(e(E,a,M)(t)){constructor(){super(...arguments),i.add(this)}onWidgetRootReady(){const t=Object.create(null,{onWidgetRootReady:{get:()=>super.onWidgetRootReady}});return s(this,void 0,void 0,(function*(){var e;yield null===(e=t.onWidgetRootReady)||void 0===e?void 0:e.call(this),o(this,i,"m",n).call(this,k(this.state))}))}},i=new WeakSet,n=function(t){this.appsList=new y((()=>{var t;return null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector("descope-apps-list")}),{logger:this.logger}),this.appsList.data=t},d})),D=t((t=>class extends(e(m,f,U)(t)){init(){const t=Object.create(null,{init:{get:()=>super.init}});return s(this,void 0,void 0,(function*(){var e;yield null===(e=t.init)||void 0===e?void 0:e.call(this)}))}})),F=e((t=>class extends(D(t)){}))(HTMLElement);customElements.define("descope-applications-portal-widget",F);export{F as default};
import{createSingletonMixin as t,compose as e,createTemplate as i}from"@descope/sdk-helpers";import{__awaiter as s,__classPrivateFieldGet as o,__classPrivateFieldSet as n}from"tslib";import{projectIdMixin as d,observeAttributesMixin as r,loggerMixin as a,baseUrlMixin as l,createStateManagementMixin as c,initLifecycleMixin as p,staticResourcesMixin as u,createValidateAttributesMixin as h,descopeUiMixin as g,initElementMixin as v,debuggerMixin as m,themeMixin as f}from"@descope/sdk-mixins";import{AppsListDriver as y}from"@descope/sdk-component-drivers";import{createSelector as b}from"reselect";import{createAsyncThunk as w}from"@reduxjs/toolkit";import A from"@descope/web-js-sdk";var x;!function(t){t.oidc="oidc",t.saml="saml"}(x||(x={}));const R=b((t=>t.ssoAppsList.data),(t=>{var e;return null===(e=null==t?void 0:t.filter)||void 0===e?void 0:e.call(t,(t=>t.appType===x.saml))})),k=b(R,(t=>t.map((t=>({name:t.name,icon:t.logo,url:t.samlSettings.idpInitiatedUrl}))))),S=w("ssoApps/load",((t,{extra:{api:e}})=>e.ssoApps.load())),j=(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)}))}))})(S)({onFulfilled:(t,e)=>{var i;t.ssoAppsList.data=null===(i=e.payload)||void 0===i?void 0:i.apps}},(W=t=>t.ssoAppsList,{onFulfilled:t=>{W(t).loading=!1},onPending:t=>{W(t).loading=!0,W(t).error=null},onRejected:(t,e)=>{W(t).loading=!1,W(t).error=e.error}}));var W;const I={action:S,reducer:j},O={ssoAppsList:{data:[],loading:!1,error:null}},T={load:"/v1/mgmt/sso/idp/apps/load"},L=()=>s(void 0,void 0,void 0,(function*(){return new Promise((t=>{t({apps:[{id:"ssoapp1",name:"App 1",description:"This is the first SAML app",enabled:!0,appType:x.saml,logo:"logo1",samlSettings:{idpInitiatedUrl:""}},{id:"ssoapp2",name:"App 2",description:"This is the first OIDC app",enabled:!0,appType:x.oidc,logo:"logo2"},{id:"ssoapp3",name:"App 3",description:"This is the second SAML app",enabled:!0,appType:x.saml,logo:"logo3",samlSettings:{idpInitiatedUrl:""}}]})}))})),C=({httpClient:t,mock:e})=>({load:()=>s(void 0,void 0,void 0,(function*(){if(e)return L();const i=yield t.get(T.load);return yield(t=>s(void 0,void 0,void 0,(function*(){const e=yield t.text(),i=JSON.parse(e);if(!t.ok){const e=`${i.errorDescription}${i.errorMessage?`: ${i.errorMessage}`:""}`;throw Error(e||`${t.status} ${t.statusText}`)}t.json=()=>Promise.resolve(i),t.text=()=>Promise.resolve(e)})))(i),i.json()}))}),P=t((t=>{var i,c,p,u;const h=e(d,r,a,l)(t);return u=class extends h{constructor(){super(...arguments),i.add(this),c.set(this,void 0)}get widgetId(){return this.getAttribute("widget-id")}get mock(){return this.getAttribute("mock")}get api(){return o(this,c,"f")||o(this,i,"m",p).call(this),o(this,c,"f")}init(){const t=Object.create(null,{init:{get:()=>super.init}});return s(this,void 0,void 0,(function*(){var e;yield null===(e=t.init)||void 0===e?void 0:e.call(this),this.observeAttributes(["project-id","base-url"],(()=>{o(this,c,"f")&&o(this,i,"m",p).call(this)}))}))}},c=new WeakMap,i=new WeakSet,p=function(){this.logger.debug("creating an sdk instance"),n(this,c,((t,e,i)=>{const s=A(Object.assign(Object.assign({},t),{persistTokens:!0,baseHeaders:{"x-descope-widget-type":"applications-portal-widget","x-descope-widget-id":i,"x-descope-widget-version":"0.2.21"}}));return{ssoApps:C({httpClient:s.httpClient,mock:e})}})({projectId:this.projectId,baseUrl:this.baseUrl},"true"===this.mock,this.widgetId),"f")},u})),E=t((t=>{const i=e(c({name:"widget",initialState:O,reducers:{},extraReducers:t=>{I.reducer(t)},asyncActions:{loadSSOApps:I.action}}),p,a,P)(t);return class extends i{constructor(...t){super(...t),this.state=O,this.subscribe((t=>{this.logger.debug("State update:",t),this.state=t}))}}})),$=t((t=>{const i=e(u,h({"widget-id":h.missingAttrValidator}))(t);return class extends i{get widgetId(){return this.getAttribute("widget-id")}fetchWidgetPage(t){return s(this,void 0,void 0,(function*(){return(yield this.fetchStaticResource(`applications-portal-widget/${this.widgetId}/${t}`,"text")).body}))}}})),M=t((t=>{var n,d,r,l;return l=class extends(e(a,p,g,v,$,E)(t)){constructor(){super(...arguments),n.add(this)}onWidgetRootReady(){return s(this,void 0,void 0,(function*(){}))}init(){const t=Object.create(null,{init:{get:()=>super.init}});return s(this,void 0,void 0,(function*(){var e;yield null===(e=t.init)||void 0===e?void 0:e.call(this);const[i]=yield Promise.all([o(this,n,"m",d).call(this),this.actions.loadSSOApps()]);o(this,n,"m",r).call(this,i),this.onWidgetRootReady()}))}},n=new WeakSet,d=function(){return s(this,void 0,void 0,(function*(){const t=i(yield this.fetchWidgetPage("root.html"));return yield this.loadDescopeUiComponents(t),t}))},r=function(t){this.contentRootElement.append(t.content.cloneNode(!0))},l})),U=t((t=>{var i,n,d;return d=class extends(e(E,a,M)(t)){constructor(){super(...arguments),i.add(this)}onWidgetRootReady(){const t=Object.create(null,{onWidgetRootReady:{get:()=>super.onWidgetRootReady}});return s(this,void 0,void 0,(function*(){var e;yield null===(e=t.onWidgetRootReady)||void 0===e?void 0:e.call(this),o(this,i,"m",n).call(this,k(this.state))}))}},i=new WeakSet,n=function(t){this.appsList=new y((()=>{var t;return null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector("descope-apps-list")}),{logger:this.logger}),this.appsList.data=t},d})),D=t((t=>class extends(e(m,f,U)(t)){init(){const t=Object.create(null,{init:{get:()=>super.init}});return s(this,void 0,void 0,(function*(){var e;yield null===(e=t.init)||void 0===e?void 0:e.call(this)}))}})),F=e((t=>class extends(D(t)){}))(HTMLElement);customElements.define("descope-applications-portal-widget",F);export{F as default};
//# sourceMappingURL=index.js.map
{
"name": "@descope/applications-portal-widget",
"version": "0.2.20",
"version": "0.2.21",
"author": "Descope Team <info@descope.com>",

@@ -26,3 +26,3 @@ "homepage": "https://github.com/descope/descope-js",

"@playwright/test": "1.47.0",
"@rollup/plugin-commonjs": "^27.0.0",
"@rollup/plugin-commonjs": "^28.0.0",
"@rollup/plugin-node-resolve": "^15.0.0",

@@ -32,3 +32,3 @@ "@rollup/plugin-replace": "^5.0.0",

"@testing-library/dom": "^10.0.0",
"@testing-library/jest-dom": "6.4.6",
"@testing-library/jest-dom": "6.6.3",
"@types/jest": "^29.0.0",

@@ -81,6 +81,6 @@ "@types/node": "20.17.13",

"immer": "^10.0.3",
"@descope/sdk-helpers": "0.1.67",
"@descope/web-js-sdk": "1.23.9",
"@descope/sdk-mixins": "0.6.8",
"@descope/sdk-component-drivers": "0.2.50"
"@descope/web-js-sdk": "1.23.10",
"@descope/sdk-mixins": "0.8.0",
"@descope/sdk-component-drivers": "0.2.51",
"@descope/sdk-helpers": "0.2.0"
},

@@ -87,0 +87,0 @@ "overrides": {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc