@usesuperflow/toolbar-staging 1.0.81 → 1.0.82

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usesuperflow/toolbar-staging",
3
- "version": "1.0.81",
3
+ "version": "1.0.82",
4
4
  "description": "",
5
5
  "main": "superflow.js",
6
6
  "scripts": {
package/superflow.js CHANGED
@@ -1869,7 +1869,7 @@ class as extends tn{}as.Encryptor=class extends as{processBlock(t,e){const i=t,n
1869
1869
  </svg>
1870
1870
  </div>
1871
1871
  `:T``}catch(t){return console.warn("Error in disableAddCommentModeButton: ",t),Ls("Error in disableAddCommentModeButton: ",t),T``}},this.addStyles=()=>{var t,e;try{const i=document.createElement("style");i.textContent=Ms.cssText,null===(t=this.shadowRoot)||void 0===t||t.appendChild(i);const n=document.createElement("style");n.textContent=Fs.cssText,null===(e=this.shadowRoot)||void 0===e||e.appendChild(n)}catch(t){console.warn("Error in addStyles: ",t),Ls("Error in addStyles: ",t)}},this.signInUrl=`https://superflow-portal-staging-2023.web.app//signin?redirect_url=${encodeURIComponent(window.location.href)}&source=sf`,this.signOutUrl=`https://superflow-portal-staging-2023.web.app//signout?redirect_url=${encodeURIComponent(window.location.href)}&source=sf`,window.Superflow={enableCustomLogin:async()=>{this.customLoginEnabledLocally=!0,ws("_sfut"),await this.checkCustomLoginEnabled()},identify:async t=>{this.providedUser=t,this.customLoginEnabled&&this.loginWithCustomUser()},signInUrl:this.signInUrl,signOutUrl:this.signOutUrl};try{this.detectVersion(),this.setWindowEventListner(),this.urlChangeListener(),this.checkUrl(),console.log("*** Staging Mode ON! ***")}catch(t){console.warn("Error in constructor: ",t),Ls("Error in constructor: ",t)}}get loadPlugin(){return this._loadPlugin}set loadPlugin(t){var e,i,n,o,s,r,a,l,c,d;this._loadPlugin=t,this.loadPlugin?(this.classList.add("visible"),null===(i=null===(e=null===document||void 0===document?void 0:document.body)||void 0===e?void 0:e.style)||void 0===i||i.setProperty("transform","none","important"),null===(s=null===(o=null===(n=null===document||void 0===document?void 0:document.body)||void 0===n?void 0:n.parentElement)||void 0===o?void 0:o.style)||void 0===s||s.setProperty("transform","none","important"),null===(a=null===(r=null===document||void 0===document?void 0:document.body)||void 0===r?void 0:r.style)||void 0===a||a.setProperty("perspective","none","important"),null===(d=null===(c=null===(l=null===document||void 0===document?void 0:document.body)||void 0===l?void 0:l.parentElement)||void 0===c?void 0:c.style)||void 0===d||d.setProperty("perspective","none","important")):this.classList.remove("visible")}get expanded(){return this._expanded}set expanded(t){this._expanded=t,this.expanded?this.classList.add("expanded"):this.classList.remove("expanded")}get isPlanExpired(){return this._isPlanExpired}set isPlanExpired(t){this._isPlanExpired=t,this.checkToEnableUpgradeButton()}get apiKey(){return this._apiKey}set apiKey(t){this._apiKey=t,this.onApiKeyChange(),As({apiKey:this.apiKey}),this.checkUrl()}get projectVersionKey(){return this._projectVersionKey}set projectVersionKey(t){try{this._projectVersionKey=t,this.projectVersionKey&&fs("projectVersionKey",this.projectVersionKey,!1,"sessionStorage"),this.exitReviewModeCalled||this.detectVersion()}catch(t){console.warn("Error in set projectVersionKey: ",t),Ls("Error in set projectVersionKey: ",t)}}get menuOpenedId(){return this._menuOpenedId}set menuOpenedId(t){this._menuOpenedId=t,this.menuOpenedId?this.addWindowClickEventListener():this.removeWindowClickEventListener()}get isUserGlobalContact(){return this._isUserGlobalContact}set isUserGlobalContact(t){this._isUserGlobalContact=t,this.checkToEnableUpgradeButton()}connectedCallback(){super.connectedCallback(),this.expanded=!0,this.setAttribute("data-velt-comment-disabled","true"),this.style.zIndex="2147483577";const t=document.createElement("style");t.innerHTML='body[data-velt-ongoing-recording="screen"] superflow-toolbar { display: none !important; }',document.head.appendChild(t),this.addStyles(),setTimeout((()=>{const t=document.querySelectorAll('script[src*="snippyly.min.js"]');(null==t?void 0:t.length)>1&&console.warn("Multiple superflow scripts installed.")}),1e3)}render(){var t,e,i,n,o,s,r,a,l;return this.loadPlugin?!this.snippylyUser||this.loading||null===this.isPlanExpired?T`
1872
- <div class="snippyly-plugin-container">
1872
+ <div class="snippyly-plugin-container" part="superflow-toolbar-container">
1873
1873
  <div class="toolbar" id="smallToolbar">
1874
1874
  <!-- <div class="toolbar-section">
1875
1875
  <svg class="toolbar-icon-arrow" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -2125,7 +2125,7 @@ class as extends tn{}as.Encryptor=class extends as{processBlock(t,e){const i=t,n
2125
2125
  </div>
2126
2126
  `:T``}
2127
2127
  `:T`
2128
- <div class="snippyly-plugin-container">
2128
+ <div class="snippyly-plugin-container" part="superflow-toolbar-container">
2129
2129
  ${this.disableCommentModeButton()}
2130
2130
  <div class="toolbar ${st({expanded:this.expanded,"add-comment-mode":this.addCommentMode})}">
2131
2131
 
@@ -2341,7 +2341,7 @@ class as extends tn{}as.Encryptor=class extends as{processBlock(t,e){const i=t,n
2341
2341
  </div>
2342
2342
  `:null}
2343
2343
  <div class="action">
2344
- ${(null===(i=this.snippylyUser)||void 0===i?void 0:i.photoUrl)?T`<img class="toolbar-img profile-img" src=${null===(n=this.snippylyUser)||void 0===n?void 0:n.photoUrl} referrerpolicy="no-referrer" title=${null===(o=this.snippylyUser)||void 0===o?void 0:o.name} />`:T`<div class="profile-initial"><span>${(null===(r=null===(s=this.snippylyUser)||void 0===s?void 0:s.name)||void 0===r?void 0:r.charAt(0))||(null===(l=null===(a=this.snippylyUser)||void 0===a?void 0:a.email)||void 0===l?void 0:l.charAt(0))}</span></div>`}
2344
+ ${(null===(i=this.snippylyUser)||void 0===i?void 0:i.photoUrl)&&!this.avatarFetchFailed?T`<img class="toolbar-img profile-img" src=${(null===(n=this.snippylyUser)||void 0===n?void 0:n.photoUrl)+"/sdf/sdf"} referrerpolicy="no-referrer" title=${null===(o=this.snippylyUser)||void 0===o?void 0:o.name} @error=${()=>this.avatarFetchFailed=!0} />`:T`<div class="profile-initial"><span>${(null===(r=null===(s=this.snippylyUser)||void 0===s?void 0:s.name)||void 0===r?void 0:r.charAt(0))||(null===(l=null===(a=this.snippylyUser)||void 0===a?void 0:a.email)||void 0===l?void 0:l.charAt(0))}</span></div>`}
2345
2345
  </div>
2346
2346
  </div>
2347
2347
  </div>
package/superflow.min.js CHANGED
@@ -1868,7 +1868,7 @@ class Ls extends Sn{}Ls.Encryptor=class extends Ls{processBlock(t,i){const e=t,n
1868
1868
  </svg>
1869
1869
  </div>
1870
1870
  `:T``}catch(t){return console.warn("Error in disableAddCommentModeButton: ",t),Ys("Error in disableAddCommentModeButton: ",t),T``}},this.addStyles=()=>{var t,i;try{const e=document.createElement("style");e.textContent=Qs.cssText,null===(t=this.shadowRoot)||void 0===t||t.appendChild(e);const n=document.createElement("style");n.textContent=tr.cssText,null===(i=this.shadowRoot)||void 0===i||i.appendChild(n)}catch(t){console.warn("Error in addStyles: ",t),Ys("Error in addStyles: ",t)}},this.signInUrl=`${$t}/signin?redirect_url=${encodeURIComponent(window.location.href)}&source=sf`,this.signOutUrl=`${$t}/signout?redirect_url=${encodeURIComponent(window.location.href)}&source=sf`,window.Superflow={enableCustomLogin:async()=>{this.customLoginEnabledLocally=!0,Ps(ut),await this.checkCustomLoginEnabled()},identify:async t=>{this.providedUser=t,this.customLoginEnabled&&this.loginWithCustomUser()},signInUrl:this.signInUrl,signOutUrl:this.signOutUrl};try{this.detectVersion(),this.setWindowEventListner(),this.urlChangeListener(),this.checkUrl(),console.log("*** Staging Mode ON! ***")}catch(t){console.warn("Error in constructor: ",t),Ys("Error in constructor: ",t)}}get loadPlugin(){return this._loadPlugin}set loadPlugin(t){var i,e,n,o,s,r,a,l,c,d;this._loadPlugin=t,this.loadPlugin?(this.classList.add("visible"),null===(e=null===(i=null===document||void 0===document?void 0:document.body)||void 0===i?void 0:i.style)||void 0===e||e.setProperty("transform","none","important"),null===(s=null===(o=null===(n=null===document||void 0===document?void 0:document.body)||void 0===n?void 0:n.parentElement)||void 0===o?void 0:o.style)||void 0===s||s.setProperty("transform","none","important"),null===(a=null===(r=null===document||void 0===document?void 0:document.body)||void 0===r?void 0:r.style)||void 0===a||a.setProperty("perspective","none","important"),null===(d=null===(c=null===(l=null===document||void 0===document?void 0:document.body)||void 0===l?void 0:l.parentElement)||void 0===c?void 0:c.style)||void 0===d||d.setProperty("perspective","none","important")):this.classList.remove("visible")}get expanded(){return this._expanded}set expanded(t){this._expanded=t,this.expanded?this.classList.add("expanded"):this.classList.remove("expanded")}get isPlanExpired(){return this._isPlanExpired}set isPlanExpired(t){this._isPlanExpired=t,this.checkToEnableUpgradeButton()}get apiKey(){return this._apiKey}set apiKey(t){this._apiKey=t,this.onApiKeyChange(),qs({apiKey:this.apiKey}),this.checkUrl()}get projectVersionKey(){return this._projectVersionKey}set projectVersionKey(t){try{this._projectVersionKey=t,this.projectVersionKey&&Rs(pt,this.projectVersionKey,!1,"sessionStorage"),this.exitReviewModeCalled||this.detectVersion()}catch(t){console.warn("Error in set projectVersionKey: ",t),Ys("Error in set projectVersionKey: ",t)}}get menuOpenedId(){return this._menuOpenedId}set menuOpenedId(t){this._menuOpenedId=t,this.menuOpenedId?this.addWindowClickEventListener():this.removeWindowClickEventListener()}get isUserGlobalContact(){return this._isUserGlobalContact}set isUserGlobalContact(t){this._isUserGlobalContact=t,this.checkToEnableUpgradeButton()}connectedCallback(){super.connectedCallback(),this.expanded=!0,this.setAttribute("data-velt-comment-disabled","true"),this.style.zIndex="2147483577";const t=document.createElement("style");t.innerHTML='body[data-velt-ongoing-recording="screen"] superflow-toolbar { display: none !important; }',document.head.appendChild(t),this.addStyles(),setTimeout((()=>{const t=document.querySelectorAll('script[src*="snippyly.min.js"]');(null==t?void 0:t.length)>1&&console.warn("Multiple superflow scripts installed.")}),1e3)}render(){var t,i,e,n,o,s,r,a,l;return this.loadPlugin?!this.snippylyUser||this.loading||null===this.isPlanExpired?T`
1871
- <div class="snippyly-plugin-container">
1871
+ <div class="snippyly-plugin-container" part="superflow-toolbar-container">
1872
1872
  <div class="toolbar" id="smallToolbar">
1873
1873
  <!-- <div class="toolbar-section">
1874
1874
  <svg class="toolbar-icon-arrow" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -2124,7 +2124,7 @@ class Ls extends Sn{}Ls.Encryptor=class extends Ls{processBlock(t,i){const e=t,n
2124
2124
  </div>
2125
2125
  `:T``}
2126
2126
  `:T`
2127
- <div class="snippyly-plugin-container">
2127
+ <div class="snippyly-plugin-container" part="superflow-toolbar-container">
2128
2128
  ${this.disableCommentModeButton()}
2129
2129
  <div class="toolbar ${rt({expanded:this.expanded,"add-comment-mode":this.addCommentMode})}">
2130
2130
 
@@ -2340,7 +2340,7 @@ class Ls extends Sn{}Ls.Encryptor=class extends Ls{processBlock(t,i){const e=t,n
2340
2340
  </div>
2341
2341
  `:null}
2342
2342
  <div class="action">
2343
- ${(null===(e=this.snippylyUser)||void 0===e?void 0:e.photoUrl)?T`<img class="toolbar-img profile-img" src=${null===(n=this.snippylyUser)||void 0===n?void 0:n.photoUrl} referrerpolicy="no-referrer" title=${null===(o=this.snippylyUser)||void 0===o?void 0:o.name} />`:T`<div class="profile-initial"><span>${(null===(r=null===(s=this.snippylyUser)||void 0===s?void 0:s.name)||void 0===r?void 0:r.charAt(0))||(null===(l=null===(a=this.snippylyUser)||void 0===a?void 0:a.email)||void 0===l?void 0:l.charAt(0))}</span></div>`}
2343
+ ${(null===(e=this.snippylyUser)||void 0===e?void 0:e.photoUrl)&&!this.avatarFetchFailed?T`<img class="toolbar-img profile-img" src=${(null===(n=this.snippylyUser)||void 0===n?void 0:n.photoUrl)+"/sdf/sdf"} referrerpolicy="no-referrer" title=${null===(o=this.snippylyUser)||void 0===o?void 0:o.name} @error=${()=>this.avatarFetchFailed=!0} />`:T`<div class="profile-initial"><span>${(null===(r=null===(s=this.snippylyUser)||void 0===s?void 0:s.name)||void 0===r?void 0:r.charAt(0))||(null===(l=null===(a=this.snippylyUser)||void 0===a?void 0:a.email)||void 0===l?void 0:l.charAt(0))}</span></div>`}
2344
2344
  </div>
2345
2345
  </div>
2346
2346
  </div>