@coasys/ad4m-connect 0.12.1-dev → 0.13.0-test-1

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/types.d.ts CHANGED
@@ -19,6 +19,7 @@ export type Ad4mConnectOptions = {
19
19
  userPassword?: string;
20
20
  allowedOrigins?: string[];
21
21
  hostIndexUrl?: string;
22
+ lowCreditThreshold?: number;
22
23
  };
23
24
  export type ConfigStates = "port" | "url" | "token";
24
25
  export type AuthStates = "authenticated" | "locked" | "unauthenticated";
package/dist/utils.js CHANGED
@@ -1 +1 @@
1
- var l=(e,t,o)=>new Promise((c,r)=>{var n=s=>{try{i(o.next(s))}catch(u){r(u)}},p=s=>{try{i(o.throw(s))}catch(u){r(u)}},i=s=>s.done?c(s.value):Promise.resolve(s.value).then(n,p);i((o=o.apply(e,t)).next())});var a="0.12.1-dev";function f(){return typeof window!="undefined"&&window.self!==window.top}function d(){try{localStorage.setItem("test",""),localStorage.removeItem("test")}catch(e){return!1}return!0}function w(e,t){d()&&localStorage.setItem(`${a}/${e}`,t)}function k(e){return d()?localStorage.getItem(`${a}/${e}`):null}function y(e){d()&&localStorage.removeItem(`${a}/${e}`)}function v(e,t=1e4){return l(this,null,function*(){return Promise.race([new Promise((o,c)=>{let r;try{r=new WebSocket(e,"graphql-transport-ws"),r.onopen=()=>{r.close(),o(r)},r.onerror=n=>{c(n)},r.onclose=n=>{n.code!==1e3&&c(new Error(`WebSocket closed with code ${n.code}: ${n.reason}`))}}catch(n){r&&r.close(),c(n)}}),new Promise((o,c)=>{setTimeout(()=>{c(new Error("WebSocket connection timed out"))},t)})])})}function x(e){let t=e.trim();if(!t)return"";let o=t.split(/\s+/);return o.length>=2?(o[0][0]+o[1][0]).toUpperCase():t.slice(0,2).toUpperCase()}function S(e){let t=0;for(let o=0;o<e.length;o++)t=e.charCodeAt(o)+((t<<5)-t);return(t%360+360)%360}export{v as connectWebSocket,S as getHue,x as getInitials,k as getLocal,f as isEmbedded,y as removeLocal,w as setLocal};
1
+ var l=(e,t,o)=>new Promise((c,r)=>{var n=s=>{try{i(o.next(s))}catch(u){r(u)}},p=s=>{try{i(o.throw(s))}catch(u){r(u)}},i=s=>s.done?c(s.value):Promise.resolve(s.value).then(n,p);i((o=o.apply(e,t)).next())});var a="0.13.0-test-1";function f(){return typeof window!="undefined"&&window.self!==window.top}function d(){try{localStorage.setItem("test",""),localStorage.removeItem("test")}catch(e){return!1}return!0}function w(e,t){d()&&localStorage.setItem(`${a}/${e}`,t)}function k(e){return d()?localStorage.getItem(`${a}/${e}`):null}function y(e){d()&&localStorage.removeItem(`${a}/${e}`)}function v(e,t=1e4){return l(this,null,function*(){return Promise.race([new Promise((o,c)=>{let r;try{r=new WebSocket(e,"graphql-transport-ws"),r.onopen=()=>{r.close(),o(r)},r.onerror=n=>{c(n)},r.onclose=n=>{n.code!==1e3&&c(new Error(`WebSocket closed with code ${n.code}: ${n.reason}`))}}catch(n){r&&r.close(),c(n)}}),new Promise((o,c)=>{setTimeout(()=>{c(new Error("WebSocket connection timed out"))},t)})])})}function x(e){let t=e.trim();if(!t)return"";let o=t.split(/\s+/);return o.length>=2?(o[0][0]+o[1][0]).toUpperCase():t.slice(0,2).toUpperCase()}function S(e){let t=0;for(let o=0;o<e.length;o++)t=e.charCodeAt(o)+((t<<5)-t);return(t%360+360)%360}export{v as connectWebSocket,S as getHue,x as getInitials,k as getLocal,f as isEmbedded,y as removeLocal,w as setLocal};
package/dist/web.d.ts CHANGED
@@ -43,6 +43,9 @@ export declare class Ad4mConnectElement extends LitElement {
43
43
  private passwordLogin;
44
44
  private createAccount;
45
45
  private disconnect;
46
+ private get backTarget();
47
+ private handleBack;
48
+ private resetRemoteAuthState;
46
49
  renderViews(): import("lit").TemplateResult<1>;
47
50
  render(): import("lit").TemplateResult<1>;
48
51
  }