@saasquatch/mint-components 2.0.0-34 → 2.0.0-36

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.
@@ -167,7 +167,7 @@ import{r as e,h as t,c as r}from"./p-c7c11325.js";import{b as o,i as n}from"./p-
167
167
  }
168
168
  }
169
169
  }
170
- `,jt=class{constructor(t){e(this,t),this.payoutButtonText="Payouts & Tax Settings",this.payoutButtonDescription="Check your payout settings to see when you’ll get paid out next",this.ignored=!0,a(this)}disconnectedCallback(){}getTextProps(){return N(this)}render(){const e=m()?function(e){return T({states:{payoutSettingsComplete:!1},text:e.getTextProps()},e.demoData||{},{arrayMerge:(e,t)=>t})}(this):function(e){var t,r,o;const{data:n,refetch:a}=x(Bt,{});return s((()=>{const e=()=>a();return window.addEventListener("sqm:tax-form-updated",e),()=>window.removeEventListener("sqm:tax-form-updated",e)}),[]),{states:{payoutSettingsComplete:!!(null===(o=null===(r=null===(t=null==n?void 0:n.user)||void 0===t?void 0:t.impactConnection)||void 0===r?void 0:r.publisher)||void 0===o?void 0:o.payoutsAccount)},text:e.getTextProps()}}(this);return t(Lt,Object.assign({},e))}},Pt=D({SkeletonOne:{width:"50%",height:"16px"},AlertDescriptionText:{margin:"0",marginBottom:"var(--sl-spacing-small)"},Dialog:{"&::part(panel)":{height:"600px"},"&::part(close-button)":{marginBottom:"var(--sl-spacing-xx-large)"},"&::part(title)":{display:"none"},"&::part(header)":{},"&::part(body)":{padding:"0"},"&::part(footer)":{}}}),Ot=Pt.toString();function zt(e){const{text:r,states:o,data:a,callbacks:s}=e;if(o.loading)return t("sl-skeleton",{class:Pt.classes.SkeletonOne});const i=function(e){if(o.error)return{header:r.errorHeader,description:r.errorDescription,buttonText:null,alertType:"error"};switch(e){case"INFORMATION_REQUIRED":return{header:r.informationRequiredHeader,description:r.informationRequiredDescription,buttonText:r.informationRequiredButtonText,alertType:"info"};case"VERIFICATION:REQUIRED":return{header:r.verificationRequiredHeader,description:n.formatMessage({id:"verificationRequiredDescription",defaultMessage:r.verificationRequiredDescription},{supportLink:t("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},r.supportLink)}),buttonText:r.verificationRequiredButtonText,alertType:"warning"};case"VERIFICATION:INTERNAL":return{header:r.verificationRequiredInternalHeader,description:n.formatMessage({id:"verificationRequiredInternalDescription",defaultMessage:r.verificationRequiredInternalDescription},{supportLink:t("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},r.supportLink)}),alertType:"warning"};case"VERIFICATION:REVIEW":return{header:r.verificationReviewInternalHeader,description:n.formatMessage({id:"verificationReviewInternalDescription",defaultMessage:r.verificationReviewInternalDescription},{supportLink:t("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},r.supportLink)}),alertType:"warning"};case"VERIFICATION:FAILED":return{header:r.verificationFailedInternalHeader,description:n.formatMessage({id:"verificationFailedInternalDescription",defaultMessage:r.verificationFailedInternalDescription},{supportLink:t("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},r.supportLink)}),alertType:"error"};case"OVER_W9_THRESHOLD":return"CASH_ONLY_DEFER_W9"===o.enforceUsTaxComplianceOption?{header:r.w9RequiredHeader,description:n.formatMessage({id:"w9RequiredDescription",defaultMessage:r.w9RequiredDescription},{termsAndConditions:t("a",{target:"_blank",href:"https://terms.advocate.impact.com/PayoutTermsAndConditions.html"},r.termsAndConditions)}),buttonText:r.w9RequiredButtonText,alertType:"warning",icon:"exclamation-triangle"}:{header:r.holdHeader,description:n.formatMessage({id:"holdDescription",defaultMessage:r.holdDescription},{supportLink:t("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},r.supportLink)}),buttonText:null,alertType:"warning",icon:"exclamation-triangle"};case"ACCOUNT_REVIEW":return{header:r.accountReviewHeader,description:n.formatMessage({id:"accountReviewDescription",defaultMessage:r.accountReviewDescription},{supportLink:t("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},r.supportLink)}),buttonText:null,alertType:"warning",icon:"exclamation-triangle"};case"HOLD":return{header:r.holdHeader,description:n.formatMessage({id:"holdDescription",defaultMessage:r.holdDescription},{supportLink:t("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},r.supportLink)}),buttonText:null,alertType:"warning"};default:return}}(o.status);return"DONE"!==o.status&&i?t("div",{part:"sqm-base"},t("style",{type:"text/css"},Ot),t("style",{type:"text/css"},"\n a {\n color: inherit;\n text-decoration: underline;\n cursor: pointer;\n }\n"),t("sqm-form-message",{type:i.alertType},t("p",{part:"alert-title"},i.header),t("p",{part:"alert-description"},i.description),function(e){switch(e){case"OVER_W9_THRESHOLD":if("CASH_ONLY"===o.enforceUsTaxComplianceOption)return;return"SquatchJS2"===a.type?t("sqm-scroll",{"scroll-tag-name":"sqm-tabs","button-text":r.w9RequiredButtonText,"scroll-animation":"smooth"}):t("sl-button","SquatchPortal"===a.type?{type:"default",onClick:s.onTermsClick}:{type:"default"},r.w9RequiredButtonText);case"INFORMATION_REQUIRED":return t("div",{style:{paddingTop:"10px"}},"SquatchJS2"===a.type?t("sqm-scroll",{"scroll-tag-name":"sqm-tabs","button-text":r.informationRequiredButtonText,"scroll-animation":"smooth"}):t("sl-button","SquatchPortal"===a.type?{type:"secondary",exportparts:"base: secondarybutton-base",onClick:s.onTermsClick}:{type:"secondary",exportparts:"base: secondarybutton-base"},r.informationRequiredButtonText));case"VERIFICATION:REQUIRED":return t("div",{style:{paddingTop:"10px"}},t("sl-button",{type:"secondary",exportparts:"base: secondarybutton-base",loading:o.veriffLoading,onClick:s.onClick},r.verificationRequiredButtonText));default:return}}(o.status))):t("div",null)}const $t=class{constructor(t){e(this,t),this.informationRequiredHeader="Payout and tax information required",this.informationRequiredDescription="Submit your banking details and tax documents to receive your rewards.",this.informationRequiredButtonText="Payouts & Tax Settings",this.verificationRequiredHeader="Verify your identity",this.verificationRequiredDescription="It should only take a few minutes verify. If you run in to an issue verifying your identity contact our {supportLink}.",this.verificationRequiredButtonText="Start Verification",this.verificationRequiredInternalHeader="Identity Verification in Progress",this.verificationRequiredInternalDescription="Identity verification submission has been received. Our system is currently performing additional checks and analyzing the results. You will be updated shortly. If you don't hear from us contact our {supportLink}.",this.verificationReviewInternalHeader="Identity Verification Under Review",this.verificationReviewInternalDescription="Identity verification requires further review due to a potential error. Our team is reviewing the information and will update you shortly. If you don't hear from us contact our {supportLink}.",this.verificationFailedInternalHeader="Identity Verification Unsuccessful",this.verificationFailedInternalDescription="Identity verification has failed. Our team is reviewing the report and will contact you with further information. If you don't hear from us contact our {supportLink}.",this.accountReviewHeader="Your account is under review",this.accountReviewDescription="This process takes 48 hours, payouts are on hold until it's completed. You will receive an email from our referral provider, Impact.com, if any issues arise. It contains details on how to resolve this issue. If you need further assistance, please reach out to our {supportLink}.",this.w9RequiredHeader="Your next payout is on hold",this.w9RequiredDescription="You have surpassed the $600 threshold requiring a W-9 form or have multiple accounts with impact.com. To remove the hold, please submit your W-9 form.",this.w9RequiredButtonText="Submit W-9",this.holdHeader="Your payouts and account are on hold",this.holdDescription="Please check your inbox for an email from our referral provider, impact.com. It contains details on how to resolve this issue. If you need further assistance, feel free to reach out to our {supportLink}.",this.cashPayoutsPageUrl="/taxAndCash",this.supportLink="support team",this.termsAndConditions="Terms and Conditions",this.errorHeader="Could not determine payout status.",this.errorDescription="There was an error with determining your payout status.",this.stateController="{}",a(this)}disconnectedCallback(){}getTextProps(){return N(this)}render(){const e=m()?function(e){const t=Fe(e.stateController),r=Object.keys(t).reduce(((e,r)=>"sqm-payout-status-alert"===r?{...e,...t[r]}:{...e,[`${r}_stateController`]:t[r]}),{});return T({states:{error:!1,status:"INFORMATION_REQUIRED",loading:!1,veriffLoading:!1},data:{type:"SquatchAdmin"},text:e.getTextProps(),callbacks:{onTermsClick:()=>{},onClick:()=>console.log("show")}},r||e.demoData||{},{arrayMerge:(e,t)=>t})}(this):Ie(this);return t(zt,Object.assign({},e))}},Vt=g.gql`
170
+ `,jt=class{constructor(t){e(this,t),this.payoutButtonText="Payouts & Tax Settings",this.payoutButtonDescription="Check your payout settings to see when you’ll get paid out next",this.ignored=!0,a(this)}disconnectedCallback(){}getTextProps(){return N(this)}render(){const e=m()?function(e){return T({states:{payoutSettingsComplete:!1},text:e.getTextProps()},e.demoData||{},{arrayMerge:(e,t)=>t})}(this):function(e){var t,r,o;const{data:n,refetch:a}=x(Bt,{});return s((()=>{const e=()=>a();return window.addEventListener("sqm:tax-form-updated",e),()=>window.removeEventListener("sqm:tax-form-updated",e)}),[]),{states:{payoutSettingsComplete:!!(null===(o=null===(r=null===(t=null==n?void 0:n.user)||void 0===t?void 0:t.impactConnection)||void 0===r?void 0:r.publisher)||void 0===o?void 0:o.payoutsAccount)},text:e.getTextProps()}}(this);return t(Lt,Object.assign({},e))}},Pt=D({SkeletonOne:{width:"50%",height:"16px"},AlertDescriptionText:{margin:"0",marginBottom:"var(--sl-spacing-small)"},Dialog:{"&::part(panel)":{height:"600px"},"&::part(close-button)":{marginBottom:"var(--sl-spacing-xx-large)"},"&::part(title)":{display:"none"},"&::part(header)":{},"&::part(body)":{padding:"0"},"&::part(footer)":{}}}),Ot=Pt.toString();function zt(e){const{text:r,states:o,data:a,callbacks:s}=e;if(o.loading)return t("sl-skeleton",{class:Pt.classes.SkeletonOne});const i=function(e){if(o.error)return{header:r.errorHeader,description:r.errorDescription,buttonText:null,alertType:"error"};switch(e){case"INFORMATION_REQUIRED":return{header:r.informationRequiredHeader,description:r.informationRequiredDescription,buttonText:r.informationRequiredButtonText,alertType:"info"};case"VERIFICATION:REQUIRED":return{header:r.verificationRequiredHeader,description:n.formatMessage({id:"verificationRequiredDescription",defaultMessage:r.verificationRequiredDescription},{supportLink:t("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},r.supportLink)}),buttonText:r.verificationRequiredButtonText,alertType:"warning"};case"VERIFICATION:INTERNAL":return{header:r.verificationRequiredInternalHeader,description:n.formatMessage({id:"verificationRequiredInternalDescription",defaultMessage:r.verificationRequiredInternalDescription},{supportLink:t("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},r.supportLink)}),alertType:"warning"};case"VERIFICATION:REVIEW":return{header:r.verificationReviewInternalHeader,description:n.formatMessage({id:"verificationReviewInternalDescription",defaultMessage:r.verificationReviewInternalDescription},{supportLink:t("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},r.supportLink)}),alertType:"warning"};case"VERIFICATION:FAILED":return{header:r.verificationFailedInternalHeader,description:n.formatMessage({id:"verificationFailedInternalDescription",defaultMessage:r.verificationFailedInternalDescription},{supportLink:t("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},r.supportLink)}),alertType:"error"};case"OVER_W9_THRESHOLD":return"CASH_ONLY_DEFER_W9"===o.enforceUsTaxComplianceOption?{header:r.w9RequiredHeader,description:n.formatMessage({id:"w9RequiredDescription",defaultMessage:r.w9RequiredDescription},{termsAndConditions:t("a",{target:"_blank",href:"https://terms.advocate.impact.com/PayoutTermsAndConditions.html"},r.termsAndConditions)}),buttonText:r.w9RequiredButtonText,alertType:"warning",icon:"exclamation-triangle"}:{header:r.holdHeader,description:n.formatMessage({id:"holdDescription",defaultMessage:r.holdDescription},{supportLink:t("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},r.supportLink)}),buttonText:null,alertType:"warning",icon:"exclamation-triangle"};case"ACCOUNT_REVIEW":return{header:r.accountReviewHeader,description:n.formatMessage({id:"accountReviewDescription",defaultMessage:r.accountReviewDescription},{supportLink:t("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},r.supportLink)}),buttonText:null,alertType:"warning",icon:"exclamation-triangle"};case"HOLD":return{header:r.holdHeader,description:n.formatMessage({id:"holdDescription",defaultMessage:r.holdDescription},{supportLink:t("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},r.supportLink)}),buttonText:null,alertType:"warning"};default:return}}(o.status);return"DONE"!==o.status&&i?t("div",{part:"sqm-base"},t("style",{type:"text/css"},Ot),t("style",{type:"text/css"},"\n a {\n color: inherit;\n text-decoration: underline;\n cursor: pointer;\n }\n"),t("sqm-form-message",{type:i.alertType},t("p",{part:"alert-title"},i.header),t("p",{part:"alert-description"},i.description),function(e){switch(e){case"OVER_W9_THRESHOLD":if("CASH_ONLY"===o.enforceUsTaxComplianceOption)return;return"SquatchJS2"===a.type?t("sqm-scroll",{"scroll-tag-name":"sqm-tabs","button-text":r.w9RequiredButtonText,"scroll-animation":"smooth"}):t("sl-button","SquatchPortal"===a.type?{type:"default",onClick:s.onTermsClick}:{type:"default"},r.w9RequiredButtonText);case"INFORMATION_REQUIRED":return t("div",{style:{paddingTop:"10px"}},"SquatchJS2"===a.type?t("sqm-scroll",{"scroll-tag-name":"sqm-tabs","button-text":r.informationRequiredButtonText,"scroll-animation":"smooth"}):t("sl-button","SquatchPortal"===a.type?{type:"secondary",exportparts:"base: secondarybutton-base",onClick:s.onTermsClick}:{type:"secondary",exportparts:"base: secondarybutton-base"},r.informationRequiredButtonText));case"VERIFICATION:REQUIRED":return t("div",{style:{paddingTop:"10px"}},t("sl-button",{type:"secondary",exportparts:"base: secondarybutton-base",loading:o.veriffLoading,onClick:s.onClick},r.verificationRequiredButtonText));default:return}}(o.status))):t("div",null)}const $t=class{constructor(t){e(this,t),this.informationRequiredHeader="Payout and tax information required",this.informationRequiredDescription="Submit your banking details and tax documents to receive your rewards.",this.informationRequiredButtonText="Payouts & Tax Settings",this.verificationRequiredHeader="Verify your identity",this.verificationRequiredDescription="It should only take a few minutes verify. If you run in to an issue verifying your identity contact our {supportLink}.",this.verificationRequiredButtonText="Start Verification",this.verificationRequiredInternalHeader="Identity Verification in Progress",this.verificationRequiredInternalDescription="Identity verification submission has been received. Our system is currently performing additional checks and analyzing the results. You will be updated shortly. If you don't hear from us contact our {supportLink}.",this.verificationReviewInternalHeader="Identity Verification Under Review",this.verificationReviewInternalDescription="Identity verification requires further review due to a potential error. Our team is reviewing the information and will update you shortly. If you don't hear from us contact our {supportLink}.",this.verificationFailedInternalHeader="Identity Verification Unsuccessful",this.verificationFailedInternalDescription="Identity verification has failed. Our team is reviewing the report and will contact you with further information. If you don't hear from us contact our {supportLink}.",this.accountReviewHeader="Your account is under review",this.accountReviewDescription="This process takes 48 hours, payouts are on hold until it's completed. You will receive an email from our referral provider, Impact.com, if any issues arise. It contains details on how to resolve this issue. If you need further assistance, please reach out to our {supportLink}.",this.w9RequiredHeader="Your next payout is on hold",this.w9RequiredDescription="You have surpassed the $600 threshold requiring a W-9 form or have multiple accounts with impact.com. To remove the hold, please submit your W-9 form.",this.w9RequiredButtonText="Submit W-9",this.holdHeader="Your payouts and account are on hold",this.holdDescription="Please check your inbox for an email from our referral provider, impact.com. It contains details on how to resolve this issue. If you need further assistance, feel free to reach out to our {supportLink}.",this.cashPayoutsPageUrl="/taxAndCash",this.supportLink="support team",this.termsAndConditions="Terms and Conditions",this.errorHeader="Could not determine payout status.",this.errorDescription="There was an error with determining your payout status.",this.stateController="{}",a(this)}disconnectedCallback(){}getTextProps(){return N(this)}render(){const e=m()?function(e){console.log(e.stateController,"stateController in sqm-payout-status-alert");const t=Fe(e.stateController),r=Object.keys(t).reduce(((e,r)=>"sqm-payout-status-alert"===r?{...e,...t[r]}:{...e,[`${r}_stateController`]:t[r]}),{});return T({states:{error:!1,status:"INFORMATION_REQUIRED",loading:!1,veriffLoading:!1},data:{type:"SquatchAdmin"},text:e.getTextProps(),callbacks:{onTermsClick:()=>{},onClick:()=>console.log("show")}},r||e.demoData||{},{arrayMerge:(e,t)=>t})}(this):Ie(this);return t(zt,Object.assign({},e))}},Vt=g.gql`
171
171
  query {
172
172
  viewer {
173
173
  ... on User {