@saasquatch/mint-components 2.2.0-5 → 2.2.0-7

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.
@@ -113,4 +113,4 @@ import{h as r,r as t}from"./p-083180bf.js";import{i as o}from"./p-13d8ecad.js";i
113
113
  }
114
114
  }
115
115
  }
116
- `),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 select both a country and currency.",this.inModal=!1,this.stateController="{}",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:()=>{}},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,u;const p=v(),b=m(w),{data:f,loading:h,refetch:y}=c(D,{}),q=null==f?void 0:f.user,{data:x,loading:C}=c(N,{variables:{locale:p}}),{data:k,loading:S}=c(_,{}),[P,T]=n((null===(o=null===(t=null==q?void 0:q.impactConnection)||void 0===t?void 0:t.publisher)||void 0===o?void 0:o.countryCode)||p.replace(/^.*_/,"")),[E,j]=n((null===(s=null===(a=null==q?void 0:q.impactConnection)||void 0===a?void 0:a.publisher)||void 0===s?void 0:s.currency)||""),{data:L}=c(g,{variables:{filter:P?{countryCode_eq:P}:{}}}),[$,{loading:z}]=d(U),[A,B]=n(!1),O=(null===(l=null==k?void 0:k.impactPayoutCountries)||void 0===l?void 0:l.data)||[],W=i((()=>{var r,t;return(null===(t=null===(r=null==L?void 0:L.impactFinanceNetworkSettings)||void 0===r?void 0:r.data)||void 0===t?void 0:t.reduce(((r,t)=>{var o,n;const e=null===(n=null===(o=null==x?void 0:x.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}),[]))||[]}),[L,x]),F=i((()=>[...W].sort(((r,t)=>r.displayName.localeCompare(t.displayName)))),[W]),[M,R]=n(""),[H,Z]=n(""),[G,J]=n((null===(u=null==k?void 0:k.impactPayoutCountries)||void 0===u?void 0:u.data)||[]),[K,Q]=n(F||[]),[V,X]=n(""),[Y,rr]=n(!1);e((()=>{var r;const t=null===(r=null==q?void 0:q.impactConnection)||void 0===r?void 0:r.publisher;f&&t&&(T(t.countryCode),j(t.currency))}),[f,q]),e((()=>{(null==O?void 0:O.length)&&(""===M.trim()?J(O||[]):J(O.filter((r=>r.displayName.toLowerCase().includes(M.toLowerCase())))||[]))}),[M,O]),e((()=>{(null==F?void 0:F.length)&&(""===H.trim()?Q(F||[]):Q(F.filter((r=>r.currencyCode.toLowerCase().includes(H.toLowerCase())))||[]))}),[H,F]);const tr=null==q?void 0:q.impactConnection;return{states:{open:!Y&&!h&&"NOT_STARTED"===(null==tr?void 0:tr.connectionStatus),loading:h||S||C,submitting:z,isExistingPartner:!!(null==tr?void 0:tr.publisher),countryCode:P,currency:E,error:V,success:Y,filteredCountries:G||[],filteredCurrencies:K||[],allowBankingCollection:A,disabled:h||z},callbacks:{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&&(T(n),j(""),X(""))},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&&(j(n),X(""))},onCheckboxChange:function(r){B(r.target.checked)},setCurrencySearch:Z,setCountrySearch:R,onSubmit:async function(){var t,o;if(A)if(P&&E)if(X(""),q)try{const n={user:{id:q.id,accountId:q.accountId},firstName:q.firstName,lastName:q.lastName,countryCode:P,currency:E},e=await $({vars:n});if(!e||(null===(t=e)||void 0===t?void 0:t.message))return void X(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 X(t||r.networkErrorText),void console.error("Failed to create Impact connection:",null==a?void 0:a.validationErrors)}window.dispatchEvent(new Event(I)),await y(),null==b||b(!0),rr(!0)}catch(t){console.error("Partner creation error:",t),X(r.networkErrorText)}else X(r.networkErrorText);else X(r.missingFieldsErrorText);else X(r.missingFieldsErrorText)},onClose:()=>rr(!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}
116
+ `),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 select both a country and currency.",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:()=>{}},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,u;const p=v(),b=m(w),{data:f,loading:h,refetch:y}=c(D,{}),q=null==f?void 0:f.user,{data:x,loading:C}=c(N,{variables:{locale:p}}),{data:k,loading:S}=c(_,{}),[P,T]=n((null===(o=null===(t=null==q?void 0:q.impactConnection)||void 0===t?void 0:t.publisher)||void 0===o?void 0:o.countryCode)||p.replace(/^.*_/,"")),[E,j]=n((null===(s=null===(a=null==q?void 0:q.impactConnection)||void 0===a?void 0:a.publisher)||void 0===s?void 0:s.currency)||""),{data:L}=c(g,{variables:{filter:P?{countryCode_eq:P}:{}}}),[$,{loading:z}]=d(U),[A,B]=n(!1),O=(null===(l=null==k?void 0:k.impactPayoutCountries)||void 0===l?void 0:l.data)||[],W=i((()=>{var r,t;return(null===(t=null===(r=null==L?void 0:L.impactFinanceNetworkSettings)||void 0===r?void 0:r.data)||void 0===t?void 0:t.reduce(((r,t)=>{var o,n;const e=null===(n=null===(o=null==x?void 0:x.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}),[]))||[]}),[L,x]),F=i((()=>[...W].sort(((r,t)=>r.displayName.localeCompare(t.displayName)))),[W]),[M,R]=n(""),[H,Z]=n(""),[G,J]=n((null===(u=null==k?void 0:k.impactPayoutCountries)||void 0===u?void 0:u.data)||[]),[K,Q]=n(F||[]),[V,X]=n(""),[Y,rr]=n(!1);e((()=>{var r;const t=null===(r=null==q?void 0:q.impactConnection)||void 0===r?void 0:r.publisher;f&&t&&(T(t.countryCode),j(t.currency))}),[f,q]),e((()=>{(null==O?void 0:O.length)&&(""===M.trim()?J(O||[]):J(O.filter((r=>r.displayName.toLowerCase().includes(M.toLowerCase())))||[]))}),[M,O]),e((()=>{(null==F?void 0:F.length)&&(""===H.trim()?Q(F||[]):Q(F.filter((r=>r.currencyCode.toLowerCase().includes(H.toLowerCase())))||[]))}),[H,F]);const tr=null==q?void 0:q.impactConnection;return{states:{open:!Y&&!h&&"NOT_STARTED"===(null==tr?void 0:tr.connectionStatus),loading:h||S||C,submitting:z,isExistingPartner:!!(null==tr?void 0:tr.publisher),countryCode:P,currency:E,error:V,success:Y,filteredCountries:G||[],filteredCurrencies:K||[],allowBankingCollection:A,disabled:h||z},callbacks:{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&&(T(n),j(""),X(""))},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&&(j(n),X(""))},onCheckboxChange:function(r){B(r.target.checked)},setCurrencySearch:Z,setCountrySearch:R,onSubmit:async function(){var t,o;if(A)if(P&&E)if(X(""),q)try{const n={user:{id:q.id,accountId:q.accountId},firstName:q.firstName,lastName:q.lastName,countryCode:P,currency:E},e=await $({vars:n});if(!e||(null===(t=e)||void 0===t?void 0:t.message))return void X(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 X(t||r.networkErrorText),void console.error("Failed to create Impact connection:",null==a?void 0:a.validationErrors)}window.dispatchEvent(new Event(I)),await y(),null==b||b(!0),rr(!0)}catch(t){console.error("Partner creation error:",t),X(r.networkErrorText)}else X(r.networkErrorText);else X(r.missingFieldsErrorText);else X(r.missingFieldsErrorText)},onClose:()=>rr(!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}
@@ -105,9 +105,9 @@ export declare class PartnerInfoModal {
105
105
  inModal: boolean;
106
106
  /**
107
107
  * @undocumented
108
+ * @componentState { "title": "Connected (hidden)", "default": true, "props": { "states": { "open": false } } }
108
109
  * @componentState { "title": "New partner", "props": { "states": { "open": true, "isExistingPartner": false } } }
109
110
  * @componentState { "title": "Existing partner", "props": { "states": { "open": true, "isExistingPartner": true, "countryCode": "US", "currency": "USD" } } }
110
- * @componentState { "title": "Connected (hidden)", "default": true, "props": { "states": { "open": false } } }
111
111
  */
112
112
  stateController: string;
113
113
  /**
@@ -2383,9 +2383,9 @@ export namespace Components {
2383
2383
  "searchCurrencyPlaceholder": string;
2384
2384
  /**
2385
2385
  * @undocumented
2386
+ * @componentState { "title": "Connected (hidden)", "default": true, "props": { "states": { "open": false } } }
2386
2387
  * @componentState { "title": "New partner", "props": { "states": { "open": true, "isExistingPartner": false } } }
2387
2388
  * @componentState { "title": "Existing partner", "props": { "states": { "open": true, "isExistingPartner": true, "countryCode": "US", "currency": "USD" } } }
2388
- * @componentState { "title": "Connected (hidden)", "default": true, "props": { "states": { "open": false } } }
2389
2389
  */
2390
2390
  "stateController": string;
2391
2391
  /**
@@ -10590,9 +10590,9 @@ declare namespace LocalJSX {
10590
10590
  "searchCurrencyPlaceholder"?: string;
10591
10591
  /**
10592
10592
  * @undocumented
10593
+ * @componentState { "title": "Connected (hidden)", "default": true, "props": { "states": { "open": false } } }
10593
10594
  * @componentState { "title": "New partner", "props": { "states": { "open": true, "isExistingPartner": false } } }
10594
10595
  * @componentState { "title": "Existing partner", "props": { "states": { "open": true, "isExistingPartner": true, "countryCode": "US", "currency": "USD" } } }
10595
- * @componentState { "title": "Connected (hidden)", "default": true, "props": { "states": { "open": false } } }
10596
10596
  */
10597
10597
  "stateController"?: string;
10598
10598
  /**
package/docs/docs.docx CHANGED
Binary file