@saasquatch/mint-components 1.13.0-22 → 1.13.0-24
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/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mint-components.cjs.js +1 -1
- package/dist/cjs/sqm-google-sign-in.cjs.entry.js +28 -65
- package/dist/collection/components/sqm-google-sign-in/sqm-google-sign-in.js +25 -7
- package/dist/collection/components/sqm-google-sign-in/useGoogleSignIn.js +25 -24
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mint-components.js +1 -1
- package/dist/esm/sqm-google-sign-in.entry.js +31 -68
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/sqm-google-sign-in.entry.js +1 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/p-059368ba.entry.js +1 -0
- package/dist/mint-components/p-b3f4d355.system.entry.js +1 -0
- package/dist/mint-components/p-d671e44e.system.js +1 -1
- package/dist/types/components/sqm-google-sign-in/sqm-google-sign-in.d.ts +2 -0
- package/dist/types/components/sqm-google-sign-in/useGoogleSignIn.d.ts +1 -1
- package/dist/types/components.d.ts +2 -0
- package/docs/docs.docx +0 -0
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +1 -1
- package/dist/mint-components/p-d7dd66ab.system.entry.js +0 -1
- package/dist/mint-components/p-f9e5cc04.entry.js +0 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saasquatch/mint-components",
|
|
3
3
|
"title": "Mint Components",
|
|
4
|
-
"version": "1.13.0-
|
|
4
|
+
"version": "1.13.0-24",
|
|
5
5
|
"description": "A minimal design library with components for referral and loyalty experiences. Built with Shoelace components by Saasquatch.",
|
|
6
6
|
"icon": "https://res.cloudinary.com/saasquatch/image/upload/v1652219900/squatch-assets/For_Mint.svg",
|
|
7
7
|
"raisins": "docs/raisins.json",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-f26aedcd.system.js","./p-48135f99.system.js","./p-0e53c59e.system.js"],(function(t){"use strict";var e,n,i,o,r,c,u,l,a;return{setters:[function(t){e=t.r;n=t.e;i=t.h},function(t){o=t.k;r=t.m;c=t.f;u=t.n},function(t){l=t.g;a=t.i}],execute:function(){function s(t){var e=o(false),n=e[0],i=e[1];var u=o(null),a=u[0],s=u[1];var d=o(v()),f=d[0],g=d[1];var m=r(null);function v(){return Math.max(200,Math.min(400,window.innerWidth*.7-20))}c((function(){function t(){clearTimeout(m.current);m.current=setTimeout((function(){g(v())}),40)}window.addEventListener("resize",t);var e=document.querySelector("iframe[id^='gsi_']");if(e){e.id="google-signin-iframe"}return function(){window.removeEventListener("resize",t);if(m.current)clearTimeout(m.current)}}),[]);c((function(){var e=function(){window.onGoogleLibraryLoad=null;var e=l();if(e.type!=="SquatchPortal")return;var n=function(e){t.initComplete.emit(e)};google.accounts.id.initialize({client_id:e.env.googleOAuthId,callback:n});i(true)};if(window.google)e();window.onGoogleLibraryLoad=e}),[]);c((function(){if(!a||!n)return;google.accounts.id.renderButton(a,{theme:"outline",size:"large",text:t.text,height:40,width:f})}),[a,n,f]);return{setGoogleButtonDiv:s}}var d=t("sqm_google_sign_in",function(){function t(t){e(this,t);this.initComplete=n(this,"initComplete",7);u(this)}t.prototype.disconnectedCallback=function(){};t.prototype.connectedCallback=function(){var t="https://accounts.google.com/gsi/client";if(!document.head.querySelector('script[src="'+t+'"]')){var e=document.createElement("script");e.src="https://accounts.google.com/gsi/client";e.async=true;document.head.appendChild(e)}};t.prototype.render=function(){var t=(a()?f(this):s(this)).setGoogleButtonDiv;return i("div",null,i("div",{ref:t}))};return t}());function f(t){var e=o(false),n=e[0],i=e[1];var r=o(null),u=r[0],l=r[1];c((function(){var t=function(){window.onGoogleLibraryLoad=null;i(true)};if(window.google)t();window.onGoogleLibraryLoad=t}),[]);c((function(){if(!u||!n)return;var e=function(){t.initComplete.emit({credential:null})};google.accounts.id.initialize({client_id:"PLACEHOLDER",cb:function(){}});google.accounts.id.renderButton(u,{theme:"outline",size:"large",text:t.text,click_listener:e})}),[u,n]);return{setGoogleButtonDiv:l}}}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,e as o,h as e}from"./p-f708da7b.js";import{k as n,m as i,f as s,n as c}from"./p-cd651f81.js";import{g as l,i as r}from"./p-39b1a7fe.js";const u=class{constructor(e){t(this,e),this.initComplete=o(this,"initComplete",7),c(this)}disconnectedCallback(){}connectedCallback(){if(!document.head.querySelector('script[src="https://accounts.google.com/gsi/client"]')){const t=document.createElement("script");t.src="https://accounts.google.com/gsi/client",t.async=!0,document.head.appendChild(t)}}render(){const{setGoogleButtonDiv:t}=r()?function(t){const[o,e]=n(!1),[i,c]=n(null);return s((()=>{const t=()=>{window.onGoogleLibraryLoad=null,e(!0)};window.google&&t(),window.onGoogleLibraryLoad=t}),[]),s((()=>{if(!i||!o)return;google.accounts.id.initialize({client_id:"PLACEHOLDER",cb:()=>{}}),google.accounts.id.renderButton(i,{theme:"outline",size:"large",text:t.text,click_listener:()=>{t.initComplete.emit({credential:null})}})}),[i,o]),{setGoogleButtonDiv:c}}(this):function(t){const[o,e]=n(!1),[c,r]=n(null),[u,a]=n(d()),g=i(null);function d(){return Math.max(200,Math.min(400,.7*window.innerWidth-20))}return s((()=>{function t(){clearTimeout(g.current),g.current=setTimeout((()=>{a(d())}),40)}window.addEventListener("resize",t);const o=document.querySelector("iframe[id^='gsi_']");return o&&(o.id="google-signin-iframe"),()=>{window.removeEventListener("resize",t),g.current&&clearTimeout(g.current)}}),[]),s((()=>{const o=()=>{window.onGoogleLibraryLoad=null;const o=l();"SquatchPortal"===o.type&&(google.accounts.id.initialize({client_id:o.env.googleOAuthId,callback:o=>{t.initComplete.emit(o)}}),e(!0))};window.google&&o(),window.onGoogleLibraryLoad=o}),[]),s((()=>{c&&o&&google.accounts.id.renderButton(c,{theme:"outline",size:"large",text:t.text,height:40,width:u})}),[c,o,u]),{setGoogleButtonDiv:r}}(this);return e("div",null,e("div",{ref:t}))}};export{u as sqm_google_sign_in}
|