@saasquatch/mint-components 2.3.1-5 → 2.3.1-6

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.
Files changed (21) hide show
  1. package/dist/cjs/sqm-email-verification_2.cjs.entry.js +13 -8
  2. package/dist/cjs/{sqm-partner-info-modal-view-bfce1f94.js → sqm-partner-info-modal-view-431100ad.js} +2 -2
  3. package/dist/cjs/sqm-stencilbook.cjs.entry.js +1 -1
  4. package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal-view.js +2 -2
  5. package/dist/collection/components/sqm-partner-info-modal/usePartnerInfoModal.js +12 -7
  6. package/dist/esm/sqm-email-verification_2.entry.js +13 -8
  7. package/dist/esm/{sqm-partner-info-modal-view-15af4679.js → sqm-partner-info-modal-view-34d4be5b.js} +2 -2
  8. package/dist/esm/sqm-stencilbook.entry.js +1 -1
  9. package/dist/esm-es5/sqm-email-verification_2.entry.js +1 -1
  10. package/dist/esm-es5/{sqm-partner-info-modal-view-15af4679.js → sqm-partner-info-modal-view-34d4be5b.js} +1 -1
  11. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  12. package/dist/mint-components/mint-components.esm.js +1 -1
  13. package/dist/mint-components/{p-78429015.system.entry.js → p-3681465f.system.entry.js} +1 -1
  14. package/dist/mint-components/{p-86ce7237.entry.js → p-41c3c51f.entry.js} +1 -1
  15. package/dist/mint-components/{p-0cb82d48.entry.js → p-5e588a88.entry.js} +2 -2
  16. package/dist/mint-components/{p-013b0bc2.system.entry.js → p-8f5de9cd.system.entry.js} +1 -1
  17. package/dist/mint-components/{p-4d2d123a.system.js → p-ad90628d.system.js} +1 -1
  18. package/dist/mint-components/p-bfb00685.system.js +1 -1
  19. package/dist/mint-components/{p-9478a5f3.js → p-c36fedea.js} +1 -1
  20. package/docs/docs.docx +0 -0
  21. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import{h as r,r as t}from"./p-083180bf.js";import{i as o}from"./p-6f8a3436.js";import{k as n,f as e,n as a,u as i}from"./p-a7fc1e02.js";import{d as s,q as l,w as c,J as u,$ as d,i as p,p as m,L as v}from"./p-8a6531d2.js";import{c as b}from"./p-c1086930.js";import{g as f}from"./p-9ec99ced.js";import{c as h}from"./p-cef45012.js";import{T as y}from"./p-c813ec64.js";import{g}from"./p-5c52100b.js";import{a as q,P as x}from"./p-9478a5f3.js";import{S as k,a as w,P as C}from"./p-4f9dc974.js";import{T as I}from"./p-28ed2ae9.js";import{p as S}from"./p-13f3a647.js";import{u as P}from"./p-eae44b42.js";const j=s.gql`
1
+ import{h as r,r as t}from"./p-083180bf.js";import{i as o}from"./p-6f8a3436.js";import{k as n,f as e,n as a,u as i}from"./p-a7fc1e02.js";import{d as s,q as l,w as c,J as u,$ as d,i as p,p as m,L as v}from"./p-8a6531d2.js";import{c as b}from"./p-c1086930.js";import{g as f}from"./p-9ec99ced.js";import{c as h}from"./p-cef45012.js";import{T as y}from"./p-c813ec64.js";import{g}from"./p-5c52100b.js";import{a as q,P as x}from"./p-c36fedea.js";import{S as k,a as w,P as C}from"./p-4f9dc974.js";import{T as I}from"./p-28ed2ae9.js";import{p as S}from"./p-13f3a647.js";import{u as P}from"./p-eae44b42.js";const j=s.gql`
2
2
  mutation upsertUser($userInput: UserInput!) {
3
3
  upsertUser(userInput: $userInput) {
4
4
  id
@@ -88,4 +88,4 @@ import{h as r,r as t}from"./p-083180bf.js";import{i as o}from"./p-6f8a3436.js";i
88
88
  }
89
89
  }
90
90
  }
91
- `,A=class{constructor(r){t(this,r),this.modalHeader="Let's get you ready for rewards",this.modalHeaderExistingPartner="We found an existing account",this.descriptionNewPartner="Confirm your country and currency now to get your future rewards faster.",this.descriptionExistingPartner="We found an account with this email on our referral program provider, impact.com. Please confirm your country and currency now to get your future rewards faster.",this.supportDescriptionExistingPartner="If this is a mistake, please contact {supportLink} or sign up for this referral program with a different email.",this.supportLink="Support",this.allowBankingCollection="I have read the {termsAndConditionsLink} and allow impact.com to collect my tax and banking information.",this.termsAndConditionsLabel="terms and conditions",this.termsAndConditionsLink="https://terms.advocate.impact.com/PayoutTermsAndConditions.html",this.countryLabel="Country",this.currencyLabel="Currency",this.submitButtonLabel="Submit",this.confirmButtonLabel="Confirm",this.searchCountryPlaceholder="Search for a country",this.searchCurrencyPlaceholder="Search for a currency",this.networkErrorText="An error occurred. Please try again.",this.missingFieldsErrorText="Please fill out all fields.",this.inModal=!1,this.stateController='{"sqm-partner-info-modal":{"states":{"open":false}}}',a(this)}disconnectedCallback(){}getTextProps(){return f(this)}render(){const t=p()?function(r){const[t,o]=n("US"),[e,a]=n(""),[i,s]=n(""),[l,c]=n(!1),u=S(r.stateController);return b({states:{open:!1,loading:!1,submitting:!1,isExistingPartner:!1,countryCode:t,currency:e,error:i,success:!1,filteredCountries:[],filteredCurrencies:[],allowBankingCollection:l,disabled:!1},callbacks:{onCountryChange:r=>{var t,n;const e=null===(n=null===(t=null==r?void 0:r.detail)||void 0===t?void 0:t.item)||void 0===n?void 0:n.__value;e&&(o(e),a(""))},onCurrencyChange:r=>{var t,o;const n=null===(o=null===(t=null==r?void 0:r.detail)||void 0===t?void 0:t.item)||void 0===o?void 0:o.__value;n&&a(n)},onCheckboxChange:r=>{c(r.target.checked)},setCountrySearch:()=>{},setCurrencySearch:()=>{},onSubmit:()=>{s(t&&e?"":r.missingFieldsErrorText)},onClose:()=>{},onInitialFocus:r=>r.preventDefault()},text:{modalHeader:r.modalHeader,descriptionNewPartner:r.descriptionNewPartner,descriptionExistingPartner:r.descriptionExistingPartner,countryLabel:r.countryLabel,currencyLabel:r.currencyLabel,submitButtonLabel:r.submitButtonLabel,confirmButtonLabel:r.confirmButtonLabel,searchCountryPlaceholder:r.searchCountryPlaceholder,searchCurrencyPlaceholder:r.searchCurrencyPlaceholder,supportDescriptionExistingPartner:r.supportDescriptionExistingPartner,supportLink:r.supportLink,modalHeaderExistingPartner:r.modalHeaderExistingPartner}},r.demoData||((null==u?void 0:u["sqm-partner-info-modal"])||u||{}),{arrayMerge:(r,t)=>t})}(this):function(r){var t,o,a,s,l;const u=v(),p=m(C),{data:b,loading:f,refetch:h}=c(U,{}),y=null==b?void 0:b.user,{data:q,loading:x}=c(D,{variables:{locale:u}}),{data:k,loading:w}=c(_,{}),[S,P]=n(null);e((()=>{null===S&&y&&P(!y.firstName||!y.lastName)}),[y,S]);const[j,E]=n((null==y?void 0:y.firstName)||""),[T,L]=n((null==y?void 0:y.lastName)||""),[N,z]=n((null===(o=null===(t=null==y?void 0:y.impactConnection)||void 0===t?void 0:t.publisher)||void 0===o?void 0:o.countryCode)||u.replace(/^.*_/,"")),[A,F]=n((null===(s=null===(a=null==y?void 0:y.impactConnection)||void 0===a?void 0:a.publisher)||void 0===s?void 0:s.currency)||""),{data:B}=c(g,{variables:{filter:N?{countryCode_eq:N}:{}}}),[O,{loading:W}]=d($),[M,R]=n(!1),H=i((()=>{var r;const t=null===(r=null==k?void 0:k.impactPayoutCountries)||void 0===r?void 0:r.data;return t?[...t].sort(((r,t)=>"US"===r.countryCode?-1:"US"===t.countryCode?1:r.displayName.localeCompare(t.displayName))):[]}),[k]),Z=!!(null===(l=null==y?void 0:y.impactConnection)||void 0===l?void 0:l.publisher),G=i((()=>{var r,t,o;return Z?(null===(r=null==q?void 0:q.currencies)||void 0===r?void 0:r.data)||[]:(null===(o=null===(t=null==B?void 0:B.impactFinanceNetworkSettings)||void 0===t?void 0:t.data)||void 0===o?void 0:o.reduce(((r,t)=>{var o,n;if(N&&t.countryCode!==N)return r;const e=null===(n=null===(o=null==q?void 0:q.currencies)||void 0===o?void 0:o.data)||void 0===n?void 0:n.find((r=>r.currencyCode===t.currency));return e?r.find((r=>r.currencyCode===t.currency))?r:[...r,e]:r}),[]))||[]}),[B,q,N,Z]),J=i((()=>[...G].sort(((r,t)=>r.displayName.localeCompare(t.displayName)))),[G]),[K,Q]=n(""),[V,X]=n(""),[Y,rr]=n(H||[]),[tr,or]=n(J||[]),[nr,er]=n(""),[ar,ir]=n(!1);e((()=>{var r;const t=null===(r=null==y?void 0:y.impactConnection)||void 0===r?void 0:r.publisher;b&&t&&(z(t.countryCode),F(t.currency))}),[b,y]),e((()=>{(null==H?void 0:H.length)&&(""===K.trim()?rr(H||[]):rr(H.filter((r=>r.displayName.toLowerCase().includes(K.toLowerCase())))||[]))}),[K,H]),e((()=>{(null==J?void 0:J.length)&&(""===V.trim()?or(J||[]):or(J.filter((r=>r.currencyCode.toLowerCase().includes(V.toLowerCase())))||[]))}),[V,J]);const sr=null==y?void 0:y.impactConnection;return{states:{open:!ar&&!f&&"NOT_STARTED"===(null==sr?void 0:sr.connectionStatus),loading:f||w||x,submitting:W,shouldDisplayNameFields:S,isExistingPartner:Z,firstName:j,lastName:T,countryCode:N,currency:A,error:nr,success:ar,filteredCountries:Y||[],filteredCurrencies:tr||[],allowBankingCollection:M,disabled:f||W},callbacks:{onFirstNameChange:function(r){E(r.target.value)},onLastNameChange:function(r){L(r.target.value)},onCountryChange:function(r){var t,o;const n=null===(o=null===(t=r.detail)||void 0===t?void 0:t.item)||void 0===o?void 0:o.__value;n&&(z(n),F(""),er(""))},onCurrencyChange:function(r){var t,o;const n=null===(o=null===(t=r.detail)||void 0===t?void 0:t.item)||void 0===o?void 0:o.__value;n&&(F(n),er(""))},onCheckboxChange:function(r){R(r.target.checked)},setCurrencySearch:X,setCountrySearch:Q,onSubmit:async function(){var t,o;if(M&&N&&A&&j&&T)if(er(""),y)try{const n={user:{id:y.id,accountId:y.accountId},firstName:j,lastName:T,countryCode:N,currency:A},e=await O({vars:n});if(!e||(null===(t=e)||void 0===t?void 0:t.message))return void er(r.networkErrorText);const a=e.startImpactConnection;if(!(null==a?void 0:a.success)){const t=null===(o=null==a?void 0:a.validationErrors)||void 0===o?void 0:o.map((r=>r.message)).join(". ");return er(t||r.networkErrorText),void console.error("Failed to create Impact connection:",null==a?void 0:a.validationErrors)}window.dispatchEvent(new Event(I)),await h(),null==p||p(!0),ir(!0)}catch(t){console.error("Partner creation error:",t),er(r.networkErrorText)}else er(r.networkErrorText);else er(r.missingFieldsErrorText)},onClose:()=>ir(!0)},text:r.getTextProps()}}(this);return r(this.inModal?q:x,Object.assign({},t))}};export{z as sqm_email_verification,A as sqm_partner_info_modal}
91
+ `,A=class{constructor(r){t(this,r),this.modalHeader="Let's get you ready for rewards",this.modalHeaderExistingPartner="We found an existing account",this.descriptionNewPartner="Confirm your country and currency now to get your future rewards faster.",this.descriptionExistingPartner="We found an account with this email on our referral program provider, impact.com. Please confirm your country and currency now to get your future rewards faster.",this.supportDescriptionExistingPartner="If this is a mistake, please contact {supportLink} or sign up for this referral program with a different email.",this.supportLink="Support",this.allowBankingCollection="I have read the {termsAndConditionsLink} and allow impact.com to collect my tax and banking information.",this.termsAndConditionsLabel="terms and conditions",this.termsAndConditionsLink="https://terms.advocate.impact.com/PayoutTermsAndConditions.html",this.countryLabel="Country",this.currencyLabel="Currency",this.submitButtonLabel="Submit",this.confirmButtonLabel="Confirm",this.searchCountryPlaceholder="Search for a country",this.searchCurrencyPlaceholder="Search for a currency",this.networkErrorText="An error occurred. Please try again.",this.missingFieldsErrorText="Please fill out all fields.",this.inModal=!1,this.stateController='{"sqm-partner-info-modal":{"states":{"open":false}}}',a(this)}disconnectedCallback(){}getTextProps(){return f(this)}render(){const t=p()?function(r){const[t,o]=n("US"),[e,a]=n(""),[i,s]=n(""),[l,c]=n(!1),u=S(r.stateController);return b({states:{open:!1,loading:!1,submitting:!1,isExistingPartner:!1,countryCode:t,currency:e,error:i,success:!1,filteredCountries:[],filteredCurrencies:[],allowBankingCollection:l,disabled:!1},callbacks:{onCountryChange:r=>{var t,n;const e=null===(n=null===(t=null==r?void 0:r.detail)||void 0===t?void 0:t.item)||void 0===n?void 0:n.__value;e&&(o(e),a(""))},onCurrencyChange:r=>{var t,o;const n=null===(o=null===(t=null==r?void 0:r.detail)||void 0===t?void 0:t.item)||void 0===o?void 0:o.__value;n&&a(n)},onCheckboxChange:r=>{c(r.target.checked)},setCountrySearch:()=>{},setCurrencySearch:()=>{},onSubmit:()=>{s(t&&e?"":r.missingFieldsErrorText)},onClose:()=>{},onInitialFocus:r=>r.preventDefault()},text:{modalHeader:r.modalHeader,descriptionNewPartner:r.descriptionNewPartner,descriptionExistingPartner:r.descriptionExistingPartner,countryLabel:r.countryLabel,currencyLabel:r.currencyLabel,submitButtonLabel:r.submitButtonLabel,confirmButtonLabel:r.confirmButtonLabel,searchCountryPlaceholder:r.searchCountryPlaceholder,searchCurrencyPlaceholder:r.searchCurrencyPlaceholder,supportDescriptionExistingPartner:r.supportDescriptionExistingPartner,supportLink:r.supportLink,modalHeaderExistingPartner:r.modalHeaderExistingPartner}},r.demoData||((null==u?void 0:u["sqm-partner-info-modal"])||u||{}),{arrayMerge:(r,t)=>t})}(this):function(r){var t,o,a,s,l;const u=v(),p=m(C),{data:b,loading:f,refetch:h}=c(U,{}),y=null==b?void 0:b.user,{data:q,loading:x}=c(D,{variables:{locale:u}}),{data:k,loading:w}=c(_,{}),[S,P]=n(null);e((()=>{null===S&&y&&P(!y.firstName||!y.lastName)}),[y,S]);const[j,E]=n((null==y?void 0:y.firstName)||""),[T,L]=n((null==y?void 0:y.lastName)||""),[N,z]=n((null===(o=null===(t=null==y?void 0:y.impactConnection)||void 0===t?void 0:t.publisher)||void 0===o?void 0:o.countryCode)||u.replace(/^.*_/,"")),[A,F]=n((null===(s=null===(a=null==y?void 0:y.impactConnection)||void 0===a?void 0:a.publisher)||void 0===s?void 0:s.currency)||""),{data:B}=c(g,{variables:{filter:N?{countryCode_eq:N}:{}}}),[O,{loading:W}]=d($),[M,R]=n(!1),H=i((()=>{var r;const t=null===(r=null==k?void 0:k.impactPayoutCountries)||void 0===r?void 0:r.data;return t?[...t].sort(((r,t)=>"US"===r.countryCode?-1:"US"===t.countryCode?1:r.displayName.localeCompare(t.displayName))):[]}),[k]),Z=!!(null===(l=null==y?void 0:y.impactConnection)||void 0===l?void 0:l.publisher),G=i((()=>{var r,t,o;return Z?(null===(r=null==q?void 0:q.currencies)||void 0===r?void 0:r.data)||[]:(null===(o=null===(t=null==B?void 0:B.impactFinanceNetworkSettings)||void 0===t?void 0:t.data)||void 0===o?void 0:o.reduce(((r,t)=>{var o,n;if(N&&t.countryCode!==N)return r;const e=null===(n=null===(o=null==q?void 0:q.currencies)||void 0===o?void 0:o.data)||void 0===n?void 0:n.find((r=>r.currencyCode===t.currency));return e?r.find((r=>r.currencyCode===t.currency))?r:[...r,e]:r}),[]))||[]}),[B,q,N,Z]),J=i((()=>[...G].sort(((r,t)=>r.displayName.localeCompare(t.displayName)))),[G]),[K,Q]=n(""),[V,X]=n(""),[Y,rr]=n(H||[]),[tr,or]=n(J||[]),[nr,er]=n(""),[ar,ir]=n(!1),[sr,lr]=n(!1);e((()=>{var r;if(sr||!b)return;E((null==y?void 0:y.firstName)||""),L((null==y?void 0:y.lastName)||"");const t=null===(r=null==y?void 0:y.impactConnection)||void 0===r?void 0:r.publisher;t&&(z(t.countryCode),F(t.currency)),lr(!0)}),[b,y,sr]),e((()=>{(null==H?void 0:H.length)&&(""===K.trim()?rr(H||[]):rr(H.filter((r=>r.displayName.toLowerCase().includes(K.toLowerCase())))||[]))}),[K,H]),e((()=>{(null==J?void 0:J.length)&&(""===V.trim()?or(J||[]):or(J.filter((r=>r.currencyCode.toLowerCase().includes(V.toLowerCase())))||[]))}),[V,J]);const cr=null==y?void 0:y.impactConnection;return{states:{open:!ar&&!f&&"NOT_STARTED"===(null==cr?void 0:cr.connectionStatus),loading:f||w||x,submitting:W,shouldDisplayNameFields:S,isExistingPartner:Z,firstName:j,lastName:T,countryCode:N,currency:A,error:nr,success:ar,filteredCountries:Y||[],filteredCurrencies:tr||[],allowBankingCollection:M,disabled:f||W},callbacks:{onFirstNameChange:function(r){E(r.target.value)},onLastNameChange:function(r){L(r.target.value)},onCountryChange:function(r){var t,o;const n=null===(o=null===(t=r.detail)||void 0===t?void 0:t.item)||void 0===o?void 0:o.__value;n&&(z(n),F(""),er(""))},onCurrencyChange:function(r){var t,o;const n=null===(o=null===(t=r.detail)||void 0===t?void 0:t.item)||void 0===o?void 0:o.__value;n&&(F(n),er(""))},onCheckboxChange:function(r){R(r.target.checked)},setCurrencySearch:X,setCountrySearch:Q,onSubmit:async function(){var t,o;if(M&&N&&A&&(!S||j&&T))if(er(""),y)try{const n={user:{id:y.id,accountId:y.accountId},firstName:j,lastName:T,countryCode:N,currency:A},e=await O({vars:n});if(!e||(null===(t=e)||void 0===t?void 0:t.message))return void er(r.networkErrorText);const a=e.startImpactConnection;if(!(null==a?void 0:a.success)){const t=null===(o=null==a?void 0:a.validationErrors)||void 0===o?void 0:o.map((r=>r.message)).join(". ");return er(t||r.networkErrorText),void console.error("Failed to create Impact connection:",null==a?void 0:a.validationErrors)}window.dispatchEvent(new Event(I)),await h(),null==p||p(!0),ir(!0)}catch(t){console.error("Partner creation error:",t),er(r.networkErrorText)}else er(r.networkErrorText);else er(r.missingFieldsErrorText)},onClose:()=>ir(!0)},text:r.getTextProps()}}(this);return r(this.inModal?q:x,Object.assign({},t))}};export{z as sqm_email_verification,A as sqm_partner_info_modal}