@saasquatch/mint-components 1.15.0-3 → 1.15.0-4
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/{ShadowViewAddon-787391f7.js → ShadowViewAddon-9e7916d8.js} +16 -17
- package/dist/cjs/{global-e31dc4f5.js → global-0cf6d295.js} +4 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mint-components.cjs.js +1 -1
- package/dist/cjs/sqm-banking-info-form_17.cjs.entry.js +2 -2
- package/dist/cjs/sqm-big-stat_41.cjs.entry.js +10 -8
- package/dist/cjs/sqm-email-verification.cjs.entry.js +1 -1
- package/dist/cjs/sqm-empty_4.cjs.entry.js +9 -8
- package/dist/cjs/{sqm-invoice-table-view-16ac73d0.js → sqm-invoice-table-view-dbf7a907.js} +1 -1
- package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +1 -1
- package/dist/cjs/sqm-pagination_3.cjs.entry.js +2 -2
- package/dist/cjs/{sqm-portal-email-verification-view-7ebb426a.js → sqm-portal-email-verification-view-ab0fb983.js} +1 -1
- package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +2 -2
- package/dist/cjs/{sqm-portal-profile-view-33164798.js → sqm-portal-profile-view-e3026b53.js} +1 -1
- package/dist/cjs/sqm-portal-profile.cjs.entry.js +2 -2
- package/dist/cjs/sqm-referral-table_11.cjs.entry.js +1 -1
- package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +1 -1
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +5 -5
- package/dist/collection/components/sqm-big-stat/sqm-big-stat-view.js +1 -2
- package/dist/collection/components/sqm-coupon-code/sqm-coupon-code-view.js +1 -1
- package/dist/collection/components/sqm-empty/sqm-empty-view.js +1 -1
- package/dist/collection/components/sqm-hero-image/sqm-hero-image-view.js +2 -2
- package/dist/collection/components/sqm-leaderboard/sqm-leaderboard-view.js +2 -2
- package/dist/collection/components/sqm-program-explainer/sqm-program-explainer-view.js +1 -1
- package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step-view.js +3 -1
- package/dist/collection/components/sqm-referral-card/sqm-referral-card-view.js +1 -1
- package/dist/collection/components/sqm-referral-codes/sqm-referral-codes-view.js +1 -1
- package/dist/collection/components/sqm-task-card/sqm-task-card-view.js +11 -11
- package/dist/collection/components/sqm-text/sqm-text.js +7 -6
- package/dist/collection/components/sqm-timeline/sqm-timeline-entry-view.js +1 -1
- package/dist/collection/global/styles.js +4 -3
- package/dist/collection/global/styles.ts +4 -3
- package/dist/esm/{ShadowViewAddon-cf230f50.js → ShadowViewAddon-e350d540.js} +16 -17
- package/dist/esm/{global-be1f9992.js → global-1d207c9e.js} +4 -3
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mint-components.js +1 -1
- package/dist/esm/sqm-banking-info-form_17.entry.js +2 -2
- package/dist/esm/sqm-big-stat_41.entry.js +10 -8
- package/dist/esm/sqm-email-verification.entry.js +1 -1
- package/dist/esm/sqm-empty_4.entry.js +9 -8
- package/dist/esm/{sqm-invoice-table-view-2c726568.js → sqm-invoice-table-view-e0c9772a.js} +1 -1
- package/dist/esm/sqm-leaderboard-rank.entry.js +1 -1
- package/dist/esm/sqm-pagination_3.entry.js +2 -2
- package/dist/esm/{sqm-portal-email-verification-view-35b4353b.js → sqm-portal-email-verification-view-6c8bad0b.js} +1 -1
- package/dist/esm/sqm-portal-email-verification.entry.js +2 -2
- package/dist/esm/{sqm-portal-profile-view-93003974.js → sqm-portal-profile-view-cbdeec1f.js} +1 -1
- package/dist/esm/sqm-portal-profile.entry.js +2 -2
- package/dist/esm/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm/sqm-rewards-table_9.entry.js +1 -1
- package/dist/esm/sqm-stencilbook.entry.js +5 -5
- package/dist/esm-es5/ShadowViewAddon-e350d540.js +1 -0
- package/dist/esm-es5/{global-be1f9992.js → global-1d207c9e.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/sqm-banking-info-form_17.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_41.entry.js +1 -1
- package/dist/esm-es5/sqm-email-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-empty_4.entry.js +1 -1
- package/dist/esm-es5/{sqm-invoice-table-view-2c726568.js → sqm-invoice-table-view-e0c9772a.js} +1 -1
- package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
- package/dist/esm-es5/sqm-pagination_3.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-email-verification-view-35b4353b.js → sqm-portal-email-verification-view-6c8bad0b.js} +1 -1
- package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-profile-view-93003974.js → sqm-portal-profile-view-cbdeec1f.js} +1 -1
- package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
- package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/mint-components/global/styles.ts +4 -3
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/mint-components.js +1 -1
- package/dist/mint-components/p-091e7ca2.system.entry.js +1 -0
- package/dist/mint-components/{p-cbbfac66.entry.js → p-15d77d0b.entry.js} +2 -2
- package/dist/mint-components/{p-b82e1935.system.entry.js → p-1673fae9.system.entry.js} +1 -1
- package/dist/mint-components/{p-693942df.entry.js → p-23379b5b.entry.js} +1 -1
- package/dist/mint-components/p-2bcd406c.system.js +1 -0
- package/dist/mint-components/{p-de8e9981.system.entry.js → p-342bc70c.system.entry.js} +1 -1
- package/dist/mint-components/{p-7846937e.entry.js → p-3a31cc83.entry.js} +2 -2
- package/dist/mint-components/{p-37996351.system.js → p-3ba1ab43.system.js} +1 -1
- package/dist/mint-components/{p-5cb7f9fc.system.entry.js → p-441b60ac.system.entry.js} +1 -1
- package/dist/mint-components/{p-bdb7d451.system.js → p-475245d1.system.js} +1 -1
- package/dist/mint-components/p-5bdafc7e.system.entry.js +1 -0
- package/dist/mint-components/{p-653f963f.entry.js → p-6a97b51d.entry.js} +2 -2
- package/dist/mint-components/{p-65069b66.js → p-6d4a313f.js} +1 -1
- package/dist/mint-components/{p-50c902ca.system.entry.js → p-6df88590.system.entry.js} +1 -1
- package/dist/mint-components/{p-b287833c.system.entry.js → p-709e1799.system.entry.js} +1 -1
- package/dist/mint-components/{p-fe2e2f4a.entry.js → p-716d0275.entry.js} +1 -1
- package/dist/mint-components/{p-5d7e308c.system.entry.js → p-904ebcf6.system.entry.js} +1 -1
- package/dist/mint-components/{p-10d17989.entry.js → p-9b894557.entry.js} +1 -1
- package/dist/mint-components/{p-21620f81.system.entry.js → p-9cb06082.system.entry.js} +1 -1
- package/dist/mint-components/{p-0d182dc1.system.js → p-9d3d4098.system.js} +1 -1
- package/dist/mint-components/p-9db71c84.entry.js +1 -0
- package/dist/mint-components/{p-ef6381d4.entry.js → p-b2bf509e.entry.js} +1 -1
- package/dist/mint-components/{p-a7746488.system.js → p-b33b7eb5.system.js} +1 -1
- package/dist/mint-components/{p-4e773bb1.system.entry.js → p-babcdb1f.system.entry.js} +1 -1
- package/dist/mint-components/{p-116baa69.entry.js → p-c3bfb9c3.entry.js} +11 -11
- package/dist/mint-components/{p-3f067fd5.js → p-c8147def.js} +1 -1
- package/dist/mint-components/{p-cd569259.system.js → p-d929b9d5.system.js} +1 -1
- package/dist/mint-components/{p-63a75798.js → p-e41aac34.js} +1 -1
- package/dist/mint-components/p-f1e72435.entry.js +33 -0
- package/dist/mint-components/p-f3e2098c.js +394 -0
- package/dist/mint-components/{p-1f089c3f.system.entry.js → p-f71ae358.system.entry.js} +1 -1
- package/dist/mint-components/{p-57eef0af.entry.js → p-f87ae19e.entry.js} +1 -1
- package/dist/mint-components/{p-bbcd824a.js → p-fbac722b.js} +1 -1
- package/dist/types/global/styles.d.ts +1 -1
- package/docs/docs.docx +0 -0
- package/package.json +1 -1
- package/dist/esm-es5/ShadowViewAddon-cf230f50.js +0 -1
- package/dist/mint-components/p-562428ef.system.js +0 -1
- package/dist/mint-components/p-6cc141b9.js +0 -394
- package/dist/mint-components/p-cb7bdbe4.entry.js +0 -1
- package/dist/mint-components/p-daee25f9.system.entry.js +0 -1
- package/dist/mint-components/p-e5a5ae7f.system.entry.js +0 -1
- package/dist/mint-components/p-ff8b8067.entry.js +0 -33
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e}from"./p-f708da7b.js";import{i as a}from"./p-65069b66.js";import{c as t}from"./p-cef45012.js";import{E as o}from"./p-9acb5038.js";const r=[{regionCode:"ALBERTA",taxType:"GST",displayName:"Alberta"},{regionCode:"BRITISHCOLUMBIA",taxType:"HST",displayName:"British Columbia"},{regionCode:"MANITOBA",taxType:"HST",displayName:"Manitoba"},{regionCode:"NEWBRUNSWICK",taxType:"HST",displayName:"New Brunswick"},{regionCode:"NEWFOUNDLANDLABRADOR",taxType:"HST",displayName:"Newfoundland"},{regionCode:"NORTHWESTTERRITORIES",taxType:"GST",displayName:"North West Territories"},{regionCode:"NOVASCOTIA",taxType:"HST",displayName:"Nova Scotia"},{regionCode:"NUNAVUT",taxType:"HST",displayName:"Nunavut"},{regionCode:"ONTARIO",taxType:"HST",displayName:"Ontario"},{regionCode:"PRINCEEDWARDISLAND",taxType:"HST",displayName:"Prince Edward Island"},{regionCode:"QUEBEC",taxType:"GST",displayName:"Quebec"},{regionCode:"SASKATCHEWAN",taxType:"HST",displayName:"Saskatchewan"},{regionCode:"YUKON",taxType:"GST",displayName:"Yukon"}],s=[{regionCode:"SPAINPROPER",taxType:"VAT",displayName:"Spain Proper"},{regionCode:"CANARYISLANDS",taxType:"VAT",displayName:"Canary Islands"}],n={CA:{labelEnum:"PROVINCE",regions:[{label:"Alberta",value:"ALBERTA"},{label:"British Columbia",value:"BRITISHCOLUMBIA"},{label:"Manitoba",value:"MANITOBA"},{label:"New Brunswick",value:"NEWBRUNSWICK"},{label:"Newfoundland & Labrador",value:"NEWFOUNDLANDANDLABRADOR"},{label:"Northwest Territories",value:"NORTHWESTTERRITORIES"},{label:"Nova Scotia",value:"NOVASCOTIA"},{label:"Nunavut",value:"NUNAVUT"},{label:"Ontario",value:"ONTARIO"},{label:"Prince Edward Island",value:"PRINCEEDWARDISLAND"},{label:"Quebec",value:"QUEBEC"},{label:"Saskatchewan",value:"SASKATCHEWAN"},{label:"Yukon",value:"YUKON"}]},ES:{labelEnum:"REGION",regions:[{label:"Canary Islands",value:"CANARYISLANDS"},{label:"Spain Proper",value:"SPAINPROPER"}]},AU:{labelEnum:"STATE",regions:[{label:"Australian Capital Territory",value:"CAPITALTERRITORY"},{label:"New South Wales",value:"NEWSOUTHWALES"},{label:"Northern Territory",value:"NORTHERNTERRITORY"},{label:"Queensland",value:"QUEENSLAND"},{label:"South Australia",value:"SOUTHAUSTRALIA"},{label:"Tasmania",value:"TASMANIA"},{label:"Victoria",value:"VICTORIA"},{label:"Western Australia",value:"WESTERNAUSTRALIA"}]},US:{labelEnum:"STATE",regions:[{label:"Alabama",value:"ALABAMA"},{label:"Alaska",value:"ALASKA"},{label:"Arizona",value:"ARIZONA"},{label:"Arkansas",value:"ARKANSAS"},{label:"California",value:"CALIFORNIA"},{label:"Colorado",value:"COLORADO"},{label:"Connecticut",value:"CONNECTICUT"},{label:"Delaware",value:"DELAWARE"},{label:"District of Columbia",value:"DISTRICTOFCOLUMBIA"},{label:"Florida",value:"FLORIDA"},{label:"Georgia",value:"GEORGIA"},{label:"Hawaii",value:"HAWAII"},{label:"Idaho",value:"IDAHO"},{label:"Illinois",value:"ILLINOIS"},{label:"Indiana",value:"INDIANA"},{label:"Iowa",value:"IOWA"},{label:"Kansas",value:"KANSAS"},{label:"Kentucky",value:"KENTUCKY"},{label:"Louisiana",value:"LOUISIANA"},{label:"Maine",value:"MAINE"},{label:"Maryland",value:"MARYLAND"},{label:"Massachusetts",value:"MASSACHUSETTS"},{label:"Michigan",value:"MICHIGAN"},{label:"Minnesota",value:"MINNESOTA"},{label:"Mississippi",value:"MISSISSIPPI"},{label:"Missouri",value:"MISSOURI"},{label:"Montana",value:"MONTANA"},{label:"Nebraska",value:"NEBRASKA"},{label:"Nevada",value:"NEVADA"},{label:"New Hampshire",value:"NEWHAMPSHIRE"},{label:"New Jersey",value:"NEWJERSEY"},{label:"New Mexico",value:"NEWMEXICO"},{label:"New York",value:"NEWYORK"},{label:"North Carolina",value:"NORTHCAROLINA"},{label:"North Dakota",value:"NORTHDAKOTA"},{label:"Ohio",value:"OHIO"},{label:"Oklahoma",value:"OKLAHOMA"},{label:"Oregon",value:"OREGON"},{label:"Pennsylvania",value:"PENNSYLVANIA"},{label:"Rhode Island",value:"RHODEISLAND"},{label:"South Carolina",value:"SOUTHCAROLINA"},{label:"South Dakota",value:"SOUTHDAKOTA"},{label:"Tennessee",value:"TENNESSEE"},{label:"Texas",value:"TEXAS"},{label:"Utah",value:"UTAH"},{label:"Vermont",value:"VERMONT"},{label:"Virgin Islands",value:"VIRGINISLANDS"},{label:"Virginia",value:"VIRGINIA"},{label:"Washington",value:"WASHINGTON"},{label:"West Virginia",value:"WESTVIRGINIA"},{label:"Wisconsin",value:"WISCONSIN"},{label:"Wyoming",value:"WYOMING"},{label:"Americas Forces",value:"AAMILITARY"},{label:"Europe, Middle East, Canada, Africa and Canada Forces",value:"AEMILITARY"},{label:"Pacific Forces",value:"APMILITARY"},{label:"Other",value:"OTHER"}]}},i=t({Container:{display:"flex",flexDirection:"column",gap:"24px"},HeaderContainer:{display:"flex",flexDirection:"column",gap:"10px"},TitleSkeleton:{width:"45%",height:"40px !important"},StepSkeleton:{width:"15%"},HeaderSkeleton:{width:"25%",height:"30px !important"},InputSkeleton:{width:"75%"},ButtonSkeleton:{width:"80px",height:"30px !important"}}),d=i.toString(),l=()=>e("div",{class:i.classes.Container},e("style",{type:"text/css"},d),e("sl-skeleton",{class:i.classes.TitleSkeleton}),e("div",{class:i.classes.HeaderContainer},e("sl-skeleton",{class:i.classes.StepSkeleton}),e("sl-skeleton",{class:i.classes.HeaderSkeleton})),e("sl-skeleton",{class:i.classes.InputSkeleton}),e("sl-skeleton",{class:i.classes.InputSkeleton}),e("sl-skeleton",{class:i.classes.InputSkeleton}),e("sl-skeleton",{class:i.classes.InputSkeleton}),e("sl-skeleton",{class:i.classes.InputSkeleton}),e("sl-skeleton",{class:i.classes.StepSkeleton}),e("sl-skeleton",{class:i.classes.ButtonSkeleton}));function u(e){return!!["W9","W8BENE","W8BEN"].includes(e)}const m=e=>!Object.keys(e).find((a=>null==e[a])),c=e=>{switch(e){case"W9":return"W-9";case"W8BEN":case"W8BENE":return"W-8";default:return""}};function T(e,a){return a.trim().search(e)>-1}const p=(e,t)=>a.formatMessage({id:e,defaultMessage:t},{fieldName:e});function b({countryCode:e,locale:a}){return{countryCode:e,displayName:new Intl.DisplayNames([a],{type:"region"}).of(e)}}const h={states:{step:"1",hideSteps:!1,hideState:!1,loading:!1,disabled:!1,isPartner:!1,isUser:!1,loadingError:!1,formState:{firstName:"Bob",lastName:"Testerson",email:"bobtesterson@example.com",phoneNumberCountryCode:"US",phoneNumber:"555 555 5555",countryCode:"US",currency:"CAD",address:"2/1337 Johnson Street",city:"Vancouver",state:"BC",postalCode:"555 555",errors:{}}},data:{regionLabelEnum:"STATE",regions:[],phoneCountries:[{countryCode:"CA",displayName:"Canada"}],countries:[{countryCode:"CA",displayName:"Canada"},{countryCode:"ES",displayName:"Spain"},{countryCode:"UK",displayName:"United Kingdom"},{countryCode:"US",displayName:"United States"},{countryCode:"AR",displayName:"Argentina"},{countryCode:"AU",displayName:"Australia"},{countryCode:"ZW",displayName:"Zimbabwe"}],currencies:[{currencyCode:"CAD",displayName:"CAD"},{currencyCode:"GBP",displayName:"GBP"},{currencyCode:"USD",displayName:"USD"}],allCountries:[{countryCode:"CA",displayName:"Canada"},{countryCode:"ES",displayName:"Spain"},{countryCode:"UK",displayName:"United Kingdom"},{countryCode:"US",displayName:"United States"}],allCurrencies:[{currencyCode:"CAD",displayName:"CAD"},{currencyCode:"GBP",displayName:"GBP"},{currencyCode:"USD",displayName:"USD"}]},refs:{formRef:{current:null},currencyRef:{current:null},phoneCountryRef:{current:null}}},S={step:"2",hideSteps:!1,disabled:!1,loading:!1,isPartner:!1,loadingError:!1,formState:{checked:void 0,errors:{}}},N={states:{showVerification:!1,step:"4",hideSteps:!1,disabled:!1,loading:!1,hasPayPal:!1,isPartner:!1,hideBackButton:!1,saveDisabled:!1,thresholds:[],loadingError:!1,email:"test@example.com",formState:{paymentMethodChecked:"toBankAccount"}},callbacks:{onVerificationHide:()=>{},onVerification:()=>{},onSubmit:async()=>console.log("Submit"),setPaymentMethodChecked:()=>{},setPaymentScheduleChecked:()=>{},onBack:async()=>console.log("back"),setCountrySearch:()=>{}},refs:{formRef:{current:null}}},A={showExitButton:!0,step:"3",urlLoading:!1,docusignStatus:void 0,hideSteps:!1,documentType:"W9",documentTypeString:"W9",loading:!1,disabled:!1,participantTypeDisabled:!1,loadingError:!1,formState:{participantType:"individualParticipant",errors:{},taxFormExpired:!1}},g={states:{veriffLoading:!1,payoutStatus:"DONE",canEditPayoutInfo:!0,disabled:!1,status:"ACTIVE",documentType:"W9",documentTypeString:c("W9"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,country:"United Kingdom",indirectTaxNumber:"123456",indirectTaxType:"VAT",showNewFormDialog:!1,hasHold:!1},slots:{payoutDetailsCardSlot:e("sqm-payout-details-card",{demoData:{states:{badgeStatus:"nextPayout"}}})}},E=()=>e(l,null),y=Object.freeze({__proto__:null,default:{title:"Components/Tax Form"},GeneralLoadingView:E,GeneralErrorView:()=>e(o,{loadingErrorAlertHeader:"There was a problem loading your form",loadingErrorAlertDescription:"Please refresh the page and try again. If this problem continues, contact our support team."}),StepOne:()=>e("sqm-user-info-form",{demoData:h}),StepOneLoading:()=>e("sqm-user-info-form",{demoData:{states:{...h.states,loading:!0}}}),StepOneDisabled:()=>e("sqm-user-info-form",{demoData:{states:{...h.states,disabled:!0}}}),StepOneIsUser:()=>e("sqm-user-info-form",{demoData:{states:{...h.states,isUser:!0}}}),StepOneIsPartner:()=>e("sqm-user-info-form",{demoData:{states:{...h.states,disabled:!0,isPartner:!0}}}),StepOneWithErrors:()=>e("sqm-user-info-form",{demoData:{states:{...h.states,formState:{...h.states.formState,errors:{firstName:!0,lastName:!0,email:!0,countryCode:!0,currency:!0,participantType:!0,allowBankingCollection:!0}}}}}),StepOneWithGeneralError:()=>e("sqm-user-info-form",{demoData:{states:{...h.states,formState:{...h.states.formState,errors:{general:!0}}}}}),StepOneWithLoadingError:()=>e("sqm-user-info-form",{demoData:{states:{...h.states,loadingError:!0,loading:!0,formState:{...h.states.formState}}}}),StepTwoLoading:()=>e("sqm-indirect-tax-form",{demoData:{states:{...S,loading:!0}}}),StepTwoLoadingError:()=>e("sqm-indirect-tax-form",{demoData:{states:{...S,loading:!0,loadingError:!0}}}),StepTwoDisabled:()=>e("sqm-indirect-tax-form",{demoData:{states:{...S,disabled:!0}}}),StepTwoIsPartner:()=>e("sqm-indirect-tax-form",{demoData:{states:{...S,isPartner:!0}}}),StepTwoWithGeneralError:()=>e("sqm-indirect-tax-form",{demoData:{states:{...S,formState:{...S.formState,errors:{general:!0}}}}}),StepTwoOtherRegionChecked:()=>e("sqm-indirect-tax-form",{demoData:{states:{...S,formState:{...S.formState,checked:"otherRegion"}},slotProps:{formState:{selectedRegion:"UK",indirectTaxNumber:"123456",errors:{}}}}}),StepTwoOtherRegionCheckedCanada:()=>e("sqm-indirect-tax-form",{demoData:{states:{...S,formState:{...S.formState,checked:"otherRegion"}},slotProps:{formState:{selectedRegion:"CA",province:"BRITISHCOLUMBIA",indirectTaxNumber:"123456",errors:{}}}}}),StepTwoOtherRegionCheckedCanadaGST:()=>e("sqm-indirect-tax-form",{demoData:{states:{...S,formState:{...S.formState,checked:"otherRegion"}},slotProps:{formState:{selectedRegion:"CA",province:"QUEBEC",indirectTaxNumber:"123456",errors:{}}}}}),StepTwoOtherRegionCheckedCanadaGSTAndQST:()=>e("sqm-indirect-tax-form",{demoData:{states:{...S,formState:{...S.formState,checked:"otherRegion"}},slotProps:{formState:{selectedRegion:"CA",province:"QUEBEC",qstNumber:"654321",hasQst:!0,errors:{}}}}}),StepTwoOtherRegionCheckedOtherCountrySubRegion:()=>e("sqm-indirect-tax-form",{demoData:{states:{...S,formState:{...S.formState,checked:"otherRegion"}},slotProps:{formState:{selectedRegion:"ES",subRegion:"CANARYISLANDS",errors:{}}}}}),StepTwoOtherRegionCheckedOtherCountrySubRegionIncomeTax:()=>e("sqm-indirect-tax-form",{demoData:{states:{...S,formState:{...S.formState,checked:"otherRegion"}},slotProps:{formState:{selectedRegion:"ES",subRegion:"CANARYISLANDS",hasSubRegionTaxNumber:!0,subRegionTaxNumber:"654321",errors:{}}}}}),StepTwoOtherRegionCheckedWithInputErrors:()=>e("sqm-indirect-tax-form",{demoData:{states:{...S,formState:{checked:"otherRegion",errors:{}}},slotProps:{formState:{province:"",selectedRegion:"GB",errors:{selectedRegion:!0,indirectTaxNumber:!0}}}}}),StepTwoOtherRegionCheckedCanadaWithProvinceError:()=>e("sqm-indirect-tax-form",{demoData:{states:{...S,formState:{...S.formState,checked:"otherRegion"}},slotProps:{formState:{selectedRegion:"CA",province:"BC",errors:{province:!0,indirectTaxNumber:!0}}}}}),StepTwoOtherRegionCheckedCanadaGSTAndQSTError:()=>e("sqm-indirect-tax-form",{demoData:{states:{...S,formState:{...S.formState,checked:"otherRegion"}},slotProps:{formState:{selectedRegion:"CA",province:"QUEBEC",hasQst:!0,errors:{province:!0,indirectTaxNumber:!0,qstNumber:!0}}}}}),StepTwoOtherRegionCheckedOtherCountrySubRegionErrors:()=>e("sqm-indirect-tax-form",{demoData:{states:{...S,formState:{...S.formState,checked:"otherRegion"}},slotProps:{formState:{selectedRegion:"ES",hasSubRegionTaxNumber:!0,errors:{indirectTaxNumber:!0,subRegionTaxNumberError:!0,subRegion:!0}}}}}),StepTwoNotRegisteredChecked:()=>e("sqm-indirect-tax-form",{demoData:{states:{...S,formState:{...S.formState,checked:"notRegistered"}}}}),StepThreeWithDocusign:()=>e("sqm-docusign-form",{demoData:{states:{documentType:"W9",documentTypeString:c("W9"),...A}}}),StepThreeWithDocusignW8BEN:()=>e("sqm-docusign-form",{demoData:{states:{...A,documentType:"W8BEN",documentTypeString:c("W8BEN")}}}),StepThreeWithDocusignW8BENE:()=>e("sqm-docusign-form",{demoData:{states:{...A,documentType:"W8BENE",documentTypeString:c("W8BENE"),formState:{taxFormExpired:!1,participantType:"businessEntity",errors:{participantType:"",general:!1}}}}}),StepThreeWithDocusignExpired:()=>e("sqm-docusign-form",{demoData:{states:{...A,docusignStatus:"ttl_expired",formState:{participantType:"individualParticipant",taxFormExpired:!0,errors:{}}}}}),StepThreeWithDocusignCompleted:()=>e("sqm-docusign-form",{demoData:{states:{...A,docusignStatus:"signing_complete",formState:{participantType:"individualParticipant",taxFormExpired:!1,errors:{}}}}}),StepThreeDocusignWithError:()=>e("sqm-docusign-form",{demoData:{states:{...A,docusignStatus:"exception",formState:{...A.formState,errors:{formSubmission:!0}}}}}),StepThreeDocusignWithGeneralError:()=>e("sqm-docusign-form",{demoData:{states:{...A,formState:{...A.formState,errors:{general:!0}}}}}),StepThreeDocusignWithLoadingError:()=>e("sqm-docusign-form",{demoData:{states:{...A,loadingError:!0,formState:{...A.formState}}}}),StepThreeDocusignLoading:()=>e("sqm-docusign-form",{demoData:{states:{...A,loading:!0}}}),StepThreeDocusignDisabled:()=>e("sqm-docusign-form",{demoData:{states:{...A,disabled:!0}}}),StepFourDefault:()=>e("sqm-banking-info-form",null),StepFourIsPartner:()=>e("sqm-banking-info-form",{demoData:{...N,states:{...N.states,isPartner:!0,formState:{...N.states.formState}}}}),StepFourDirectToBankChecked:()=>e("sqm-banking-info-form",{demoData:{...N,states:{...N.states,formState:{...N.states.formState}}}}),StepFourToPaypalChecked:()=>e("sqm-banking-info-form",{demoData:{...N,states:{...N.states,formState:{...N.states.formState,paymentMethodChecked:"toPayPalAccount"}}}}),StepFourReVerifyEmail:()=>e("sqm-banking-info-form",{demoData:{...N,states:{...N.states,showVerification:!0,isPartner:!0,formState:{...N.states.formState,paymentMethodChecked:"toPayPalAccount"}}}}),TaxAndCashDashboardActiveW9Form:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g}}),TaxAndCashDashboardActiveW8BENForm:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"DONE",veriffLoading:!1,noFormNeeded:!1,canEditPayoutInfo:!0,documentType:"W8BEN",documentTypeString:c("W8BEN"),country:"United Kingdom",indirectTaxType:"VAT",indirectTaxNumber:"123456",showNewFormDialog:!1,hasHold:!1}}}),TaxAndCashDashboardActiveW8BENEForm:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"DONE",veriffLoading:!1,noFormNeeded:!1,canEditPayoutInfo:!0,documentType:"W8BENE",documentTypeString:c("W8BENE"),country:"United Kingdom",indirectTaxType:"VAT",indirectTaxNumber:"123456",showNewFormDialog:!1,hasHold:!1}}}),TaxAndCashDashboardNotActiveW9Form:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"DONE",veriffLoading:!1,noFormNeeded:!1,canEditPayoutInfo:!0,status:"INACTIVE",documentType:"W9",documentTypeString:c("W9"),country:"United Kingdom",indirectTaxType:"VAT",indirectTaxNumber:"123456",showNewFormDialog:!1,hasHold:!1}}}),TaxAndCashDashboardNotVerifiedW9Form:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"DONE",canEditPayoutInfo:!0,disabled:!1,status:"NOT_VERIFIED",documentType:"W9",documentTypeString:c("W9"),noFormNeeded:!1,country:"United States",indirectTaxType:"VAT",indirectTaxNumber:"123456",showNewFormDialog:!1,hasHold:!1,veriffLoading:!1}}}),TaxAndCashDashboardNotVerifiedW8BENForm:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"DONE",veriffLoading:!1,canEditPayoutInfo:!0,disabled:!1,status:"NOT_VERIFIED",documentType:"W8BEN",documentTypeString:c("W8BEN"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,country:"United Kingdom",indirectTaxType:"VAT",indirectTaxNumber:"123456",showNewFormDialog:!1,hasHold:!1}}}),TaxAndCashDashboardNotVerifiedW8BENEForm:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"DONE",veriffLoading:!1,canEditPayoutInfo:!0,disabled:!1,status:"NOT_VERIFIED",documentType:"W8BENE",documentTypeString:c("W8BENE"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,country:"United Kingdom",indirectTaxType:"VAT",indirectTaxNumber:"123456",showNewFormDialog:!1,hasHold:!1}}}),TaxAndCashDashboardNotActiveW8BENEForm:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"DONE",veriffLoading:!1,canEditPayoutInfo:!0,disabled:!1,status:"NOT_ACTIVE",documentType:"W8BENE",documentTypeString:c("W8BENE"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,indirectTaxNumber:"123456",indirectTaxType:"VAT",country:"United Kingdom",showNewFormDialog:!1,hasHold:!1}}}),TaxAndCashDashboardNoFormNeeded:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"DONE",veriffLoading:!1,canEditPayoutInfo:!0,disabled:!1,documentType:"W9",documentTypeString:c("W9"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!0,province:"Ontario",country:"Canada",indirectTaxNumber:"123456",indirectTaxType:"GST",showNewFormDialog:!1,hasHold:!1}}}),TaxAndCashDashboardIndirectTaxCanada:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"DONE",veriffLoading:!1,canEditPayoutInfo:!0,status:"ACTIVE",disabled:!1,documentType:"W8BENE",documentTypeString:c("W8BENE"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,province:"Ontario",country:"Canada",indirectTaxType:"GST",indirectTaxNumber:"123456",showNewFormDialog:!1,hasHold:!1}}}),TaxAndCashDashboardIndirectTaxCanadaQuebec:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"DONE",veriffLoading:!1,canEditPayoutInfo:!0,status:"ACTIVE",disabled:!1,documentType:"W8BENE",documentTypeString:c("W8BENE"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,province:"Quebec",country:"Canada",indirectTaxType:"GST",indirectTaxNumber:"123456",qstNumber:"44212",showNewFormDialog:!1,hasHold:!1}}}),TaxAndCashDashboardIndirectTaxSpain:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"DONE",veriffLoading:!1,canEditPayoutInfo:!0,status:"ACTIVE",disabled:!1,documentType:"W8BENE",documentTypeString:c("W8BENE"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,country:"Spain",subRegion:"Spain Proper",indirectTaxType:"VAT",indirectTaxNumber:"123456",subRegionTaxNumber:"44212",showNewFormDialog:!1,hasHold:!1}}}),TaxAndCashDashboardIndirectTaxNotRegistered:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"DONE",veriffLoading:!1,canEditPayoutInfo:!0,status:"ACTIVE",documentType:"W8BEN",documentTypeString:c("W8BEN"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,notRegistered:!0,showNewFormDialog:!1,hasHold:!1}}}),TaxAndCashDashboardIdentityVerifcationRequired:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"VERIFICATION:REQUIRED",veriffLoading:!1,canEditPayoutInfo:!0,status:"ACTIVE",documentType:"W8BEN",documentTypeString:c("W8BEN"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,notRegistered:!0,showNewFormDialog:!1,hasHold:!1}}}),TaxAndCashDashboardIdentityVerifcationRequiredInternal:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"VERIFICATION:INTERNAL",veriffLoading:!1,canEditPayoutInfo:!0,status:"ACTIVE",documentType:"W8BEN",documentTypeString:c("W8BEN"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,notRegistered:!0,showNewFormDialog:!1,hasHold:!1}}}),TaxAndCashDashboardIdentityVerifcationReviewInternal:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"VERIFICATION:REVIEW",veriffLoading:!1,canEditPayoutInfo:!0,status:"ACTIVE",documentType:"W8BEN",documentTypeString:c("W8BEN"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,notRegistered:!0,showNewFormDialog:!1,hasHold:!1}}}),TaxAndCashDashboardIdentityVerifcationFailedInternal:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"VERIFICATION:FAILED",veriffLoading:!1,canEditPayoutInfo:!0,status:"ACTIVE",documentType:"W8BEN",documentTypeString:c("W8BEN"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,notRegistered:!0,showNewFormDialog:!1,hasHold:!1}}}),TaxAndCashDashboardNewTaxForm:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"DONE",veriffLoading:!1,canEditPayoutInfo:!0,status:"ACTIVE",documentType:"W8BEN",documentTypeString:c("W8BEN"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,notRegistered:!0,showNewFormDialog:!0,hasHold:!1}}}),TaxAndCashDashboardPayoutsOnHold:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"DONE",veriffLoading:!1,canEditPayoutInfo:!0,disabled:!0,status:"ACTIVE",documentType:"W8BEN",documentTypeString:c("W8BEN"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,indirectTaxNumber:"123456",country:"Slovania",showNewFormDialog:!1,hasHold:!0}}}),TaxAndCashDashboardLoading:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"DONE",veriffLoading:!1,canEditPayoutInfo:!0,disabled:!1,status:"ACTIVE",documentType:"W9",documentTypeString:c("W9"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,loading:!0,showNewFormDialog:!1,hasHold:!1}}}),TaxAndCashDashboardWithLoadingError:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"DONE",veriffLoading:!1,disabled:!1,canEditPayoutInfo:!0,status:"ACTIVE",documentType:"W9",documentTypeString:c("W9"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,loading:!0,loadingError:!0,showNewFormDialog:!1,hasHold:!1}}}),TaxAndCashDashboardWithGeneralError:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"DONE",veriffLoading:!1,canEditPayoutInfo:!0,disabled:!1,status:"ACTIVE",documentType:"W9",documentTypeString:c("W9"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,indirectTaxNumber:"123456",indirectTaxType:"VAT",country:"Slovania",showNewFormDialog:!1,hasHold:!1,errors:{general:!0}}}}),TaxAndCashDashboardDisabled:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"DONE",veriffLoading:!1,canEditPayoutInfo:!0,disabled:!0,status:"ACTIVE",documentType:"W8BEN",documentTypeString:c("W8BEN"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,indirectTaxNumber:"123456",country:"Slovania",showNewFormDialog:!1,hasHold:!1}}}),TaxAndCashTextProps:()=>e("sqm-tax-and-cash",{demoData:{showTextProps:!0}})}),f={GB:"VAT",AU:"GST",NZ:"GST",CA:"HST",AT:"VAT",BE:"VAT",BG:"VAT",HR:"VAT",CY:"VAT",CZ:"VAT",DK:"VAT",EE:"VAT",FI:"VAT",FR:"VAT",DE:"VAT",GR:"VAT",HU:"VAT",IE:"VAT",IT:"VAT",LV:"VAT",LT:"VAT",LU:"VAT",MT:"VAT",NL:"VAT",PL:"VAT",PT:"VAT",RO:"VAT",SK:"VAT",SI:"VAT",ES:"VAT",SE:"VAT",IS:"VAT",IN:"GST",IL:"VAT",JP:"CT",MX:"VAT",NO:"VAT",SG:"GST",ZA:"VAT",KR:"VAT",CH:"VAT",TW:"VAT",TH:"VAT",PH:"VAT",MY:"SST",AE:"VAT",TR:"VAT",RU:"VAT"},x=t({Container:{width:"100%"},InputContainer:{width:"100%",display:"flex",justifyContent:"flex-start",flexDirection:"column",gap:"16px",padding:"16px",maxWidth:"450px"},ConditionalInputsContainer:{width:"100%",display:"flex",justifyContent:"flex-start",flexDirection:"column",gap:"16px"},HR:{border:"1px solid #E0E0E0",margin:"10px 0"},Input:{maxWidth:"500px"},Checkbox:{"&::part(control)":{borderRadius:"0 !important"}},SearchInput:{padding:"var(--sl-spacing-x-small)"},ErrorInput:{maxWidth:"500px","&::part(base)":{border:"1px solid var(--sl-color-danger-500)",borderRadius:"var(--sl-input-border-radius-medium)"},"&::part(help-text)":{color:"var(--sl-color-danger-500)"}}}),C=x.toString(),D=t=>{var o,s,n;const{states:i,states:{formState:d},callbacks:l,text:u}=t,{classes:m}=x,c=e=>a.formatMessage({id:`tax-field-label${e}`,defaultMessage:u.indirectTaxNumber},{taxType:e}),T=e=>a.formatMessage({id:`tax-field-label${e}`,defaultMessage:u.error.indirectTaxNumber},{taxType:e}),b=({label:a,error:t,name:o})=>{var r;return e("sl-input",Object.assign({required:!0,exportparts:"label: input-label, base: input-base",class:m.Input,label:a,disabled:i.loading||i.disabled,value:d[o]},(null===(r=d.errors)||void 0===r?void 0:r[o])&&{class:m.ErrorInput,helpText:t},{id:o,name:`/${o}`}))},h=()=>{var a,o;return e("div",{class:m.ConditionalInputsContainer},e("sl-select",Object.assign({required:!0,exportparts:"label: input-label, base: input-base",class:m.Input,value:d.subRegion,label:u.subRegion,disabled:i.loading||i.disabled},(null===(a=d.errors)||void 0===a?void 0:a.indirectTaxNumber)&&{class:m.ErrorInput,helpText:p(u.subRegion,u.error.fieldRequiredError)},{id:"subRegion",name:"/subRegion"}),t.data.esRegions.map((a=>e("sl-menu-item",{value:a.regionCode},a.displayName)))),e(b,{name:"indirectTaxNumber",label:c("VAT"),error:T("VAT")}),e("sl-checkbox",{class:m.Checkbox,exportparts:"label: input-label, base: input-base",checked:d.hasSubRegionTaxNumber,"onSl-change":l.onSpainToggle,disabled:i.disabled||i.isPartner},u.isRegisteredSubRegionIncomeTax),d.hasSubRegionTaxNumber&&e("sl-input",Object.assign({required:!0,exportparts:"label: input-label, base: input-base",class:m.Input,label:u.subRegionTaxNumberLabel,disabled:i.loading||i.disabled,value:d.subRegionTaxNumber},(null===(o=d.errors)||void 0===o?void 0:o.subRegionTaxNumber)&&{class:m.ErrorInput,helpText:p(u.subRegionTaxNumberLabel,u.error.fieldRequiredError)},{id:"subRegionTaxNumber",name:"/subRegionTaxNumber"})))},S=()=>{var a,o;const{classes:s}=x,n=null===(a=null==r?void 0:r.find((e=>e.regionCode===d.province)))||void 0===a?void 0:a.taxType;return e("div",{class:s.ConditionalInputsContainer},e("sl-select",Object.assign({required:!0,value:d.province,exportparts:"label: input-label, base: input-base",class:s.Input,label:u.province,disabled:i.loading||i.disabled,"onSl-select":e=>l.onFormChange("province",e)},(null===(o=d.errors)||void 0===o?void 0:o.province)&&{class:s.ErrorInput,helpText:p(u.province,u.error.fieldRequiredError)},{id:"province",name:"/province"}),t.data.provinces.map((a=>e("sl-menu-item",{value:a.regionCode},a.displayName)))),"GST"===n&&e(b,{label:c("GST"),error:T("GST"),name:"indirectTaxNumber"}),"HST"===n&&e(b,{label:c("HST"),error:T("HST"),name:"indirectTaxNumber"}),"QUEBEC"===d.province&&e("div",{class:s.ConditionalInputsContainer},e("sl-checkbox",{class:s.Checkbox,exportparts:"label: input-label, base: input-base","onSl-change":l.onQstToggle,checked:d.hasQst,disabled:i.isPartner||i.disabled},u.isRegisteredQST),d.hasQst&&e(b,{name:"qstNumber",label:u.qstNumber,error:p(u.qstNumber,u.error.fieldRequiredError)})))},N=(a=>{var t;switch(a){case"CA":return e(S,null);case"ES":return e(h,null);default:return e("sl-input",Object.assign({required:!0,exportparts:"label: input-label, base: input-base",class:m.Input,value:d.indirectTaxNumber,label:c(f[a]||"GENERAL"),disabled:i.loading||i.disabled},(null===(t=d.errors)||void 0===t?void 0:t.indirectTaxNumber)&&{class:m.ErrorInput,helpText:T(f[a]||"GENERAL")},{id:"indirectTaxNumber",name:"/indirectTaxNumber"}))}})(d.selectedRegion);return e("div",{style:i.hide?{display:"none"}:{}},e("form",{class:m.Container},e("style",{type:"text/css"},C,"\n :host{\n display: block; \n }\n * {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n }\n "),e("hr",{class:m.HR}),e("div",{class:m.InputContainer},e("sl-select",Object.assign({required:!0,class:m.Input,value:d.selectedRegion,exportparts:"label: input-label, base: input-base",label:u.selectedRegion,disabled:i.loading||i.disabled,"onSl-select":e=>l.onFormChange("selectedRegion",e)},(null===(o=d.errors)||void 0===o?void 0:o.selectedRegion)&&{class:m.ErrorInput,helpText:p(u.selectedRegion,u.error.fieldRequiredError)},{id:"selectedRegion",name:"/selectedRegion"}),e("sl-input",{class:m.SearchInput,placeholder:u.searchForCountryText,onKeyDown:e=>{e.stopPropagation()},"onSl-input":e=>{l.setCountrySearch(e.target.value)}}),null===(s=t.data.countries)||void 0===s?void 0:s.map((a=>e("sl-menu-item",{value:a.countryCode},a.displayName))),null===(n=t.data.allCountries)||void 0===n?void 0:n.map((a=>e("sl-menu-item",{value:a.countryCode,style:{display:"none"}},a.displayName)))),N),e("hr",{class:m.HR})))},I={Description:{fontSize:"var(--sl-font-size-small)",marginTop:"var(--sl-spacing-small)",margin:"0 0 var(--sl-spacing-large)",color:"var(--sl-color-gray-500)"},Header:{fontSize:"var(--sl-font-size-large)",fontWeight:"var(-sl-font-weight-semibold)",margin:"0 0 var(--sl-spacing-xxx-small)"},Container:{},InvoiceTableContaier:{"& sl-details::part(base)":{border:"none"},"& sl-details::part(content)":{padding:0},"& sl-details::part(header)":{fontSize:"var(--sl-font-size-medium)",padding:"0px"},"& sl-details::part(summary)":{fontWeight:"var(-sl-font-weight-semibold)"},"& sl-details::part(summary-icon)":{marginRight:"100%",marginLeft:"var(--sl-spacing-x-small)",transform:"rotate(90deg)"},"& sl-details[open]::part(summary-icon)":{transform:"rotate(270deg)"}}};function v(a,o){const r=t(I),s=r.toString();return e("div",{class:r.classes.Container},e("style",{type:"text/css"},"\n :host{\n display: block;\n }",s),e("div",{class:r.classes.InvoiceTableContaier},e("sl-details",{summary:a.header},e("p",{class:r.classes.Description},a.description),o)))}export{n as A,E as G,v as I,l as L,D as O,y as T,s as a,r as b,f as c,T as d,p as f,b as g,m as o,c as t,u as v}
|
|
1
|
+
import{h as e}from"./p-f708da7b.js";import{i as a}from"./p-6d4a313f.js";import{c as t}from"./p-cef45012.js";import{E as o}from"./p-9acb5038.js";const r=[{regionCode:"ALBERTA",taxType:"GST",displayName:"Alberta"},{regionCode:"BRITISHCOLUMBIA",taxType:"HST",displayName:"British Columbia"},{regionCode:"MANITOBA",taxType:"HST",displayName:"Manitoba"},{regionCode:"NEWBRUNSWICK",taxType:"HST",displayName:"New Brunswick"},{regionCode:"NEWFOUNDLANDLABRADOR",taxType:"HST",displayName:"Newfoundland"},{regionCode:"NORTHWESTTERRITORIES",taxType:"GST",displayName:"North West Territories"},{regionCode:"NOVASCOTIA",taxType:"HST",displayName:"Nova Scotia"},{regionCode:"NUNAVUT",taxType:"HST",displayName:"Nunavut"},{regionCode:"ONTARIO",taxType:"HST",displayName:"Ontario"},{regionCode:"PRINCEEDWARDISLAND",taxType:"HST",displayName:"Prince Edward Island"},{regionCode:"QUEBEC",taxType:"GST",displayName:"Quebec"},{regionCode:"SASKATCHEWAN",taxType:"HST",displayName:"Saskatchewan"},{regionCode:"YUKON",taxType:"GST",displayName:"Yukon"}],s=[{regionCode:"SPAINPROPER",taxType:"VAT",displayName:"Spain Proper"},{regionCode:"CANARYISLANDS",taxType:"VAT",displayName:"Canary Islands"}],n={CA:{labelEnum:"PROVINCE",regions:[{label:"Alberta",value:"ALBERTA"},{label:"British Columbia",value:"BRITISHCOLUMBIA"},{label:"Manitoba",value:"MANITOBA"},{label:"New Brunswick",value:"NEWBRUNSWICK"},{label:"Newfoundland & Labrador",value:"NEWFOUNDLANDANDLABRADOR"},{label:"Northwest Territories",value:"NORTHWESTTERRITORIES"},{label:"Nova Scotia",value:"NOVASCOTIA"},{label:"Nunavut",value:"NUNAVUT"},{label:"Ontario",value:"ONTARIO"},{label:"Prince Edward Island",value:"PRINCEEDWARDISLAND"},{label:"Quebec",value:"QUEBEC"},{label:"Saskatchewan",value:"SASKATCHEWAN"},{label:"Yukon",value:"YUKON"}]},ES:{labelEnum:"REGION",regions:[{label:"Canary Islands",value:"CANARYISLANDS"},{label:"Spain Proper",value:"SPAINPROPER"}]},AU:{labelEnum:"STATE",regions:[{label:"Australian Capital Territory",value:"CAPITALTERRITORY"},{label:"New South Wales",value:"NEWSOUTHWALES"},{label:"Northern Territory",value:"NORTHERNTERRITORY"},{label:"Queensland",value:"QUEENSLAND"},{label:"South Australia",value:"SOUTHAUSTRALIA"},{label:"Tasmania",value:"TASMANIA"},{label:"Victoria",value:"VICTORIA"},{label:"Western Australia",value:"WESTERNAUSTRALIA"}]},US:{labelEnum:"STATE",regions:[{label:"Alabama",value:"ALABAMA"},{label:"Alaska",value:"ALASKA"},{label:"Arizona",value:"ARIZONA"},{label:"Arkansas",value:"ARKANSAS"},{label:"California",value:"CALIFORNIA"},{label:"Colorado",value:"COLORADO"},{label:"Connecticut",value:"CONNECTICUT"},{label:"Delaware",value:"DELAWARE"},{label:"District of Columbia",value:"DISTRICTOFCOLUMBIA"},{label:"Florida",value:"FLORIDA"},{label:"Georgia",value:"GEORGIA"},{label:"Hawaii",value:"HAWAII"},{label:"Idaho",value:"IDAHO"},{label:"Illinois",value:"ILLINOIS"},{label:"Indiana",value:"INDIANA"},{label:"Iowa",value:"IOWA"},{label:"Kansas",value:"KANSAS"},{label:"Kentucky",value:"KENTUCKY"},{label:"Louisiana",value:"LOUISIANA"},{label:"Maine",value:"MAINE"},{label:"Maryland",value:"MARYLAND"},{label:"Massachusetts",value:"MASSACHUSETTS"},{label:"Michigan",value:"MICHIGAN"},{label:"Minnesota",value:"MINNESOTA"},{label:"Mississippi",value:"MISSISSIPPI"},{label:"Missouri",value:"MISSOURI"},{label:"Montana",value:"MONTANA"},{label:"Nebraska",value:"NEBRASKA"},{label:"Nevada",value:"NEVADA"},{label:"New Hampshire",value:"NEWHAMPSHIRE"},{label:"New Jersey",value:"NEWJERSEY"},{label:"New Mexico",value:"NEWMEXICO"},{label:"New York",value:"NEWYORK"},{label:"North Carolina",value:"NORTHCAROLINA"},{label:"North Dakota",value:"NORTHDAKOTA"},{label:"Ohio",value:"OHIO"},{label:"Oklahoma",value:"OKLAHOMA"},{label:"Oregon",value:"OREGON"},{label:"Pennsylvania",value:"PENNSYLVANIA"},{label:"Rhode Island",value:"RHODEISLAND"},{label:"South Carolina",value:"SOUTHCAROLINA"},{label:"South Dakota",value:"SOUTHDAKOTA"},{label:"Tennessee",value:"TENNESSEE"},{label:"Texas",value:"TEXAS"},{label:"Utah",value:"UTAH"},{label:"Vermont",value:"VERMONT"},{label:"Virgin Islands",value:"VIRGINISLANDS"},{label:"Virginia",value:"VIRGINIA"},{label:"Washington",value:"WASHINGTON"},{label:"West Virginia",value:"WESTVIRGINIA"},{label:"Wisconsin",value:"WISCONSIN"},{label:"Wyoming",value:"WYOMING"},{label:"Americas Forces",value:"AAMILITARY"},{label:"Europe, Middle East, Canada, Africa and Canada Forces",value:"AEMILITARY"},{label:"Pacific Forces",value:"APMILITARY"},{label:"Other",value:"OTHER"}]}},i=t({Container:{display:"flex",flexDirection:"column",gap:"24px"},HeaderContainer:{display:"flex",flexDirection:"column",gap:"10px"},TitleSkeleton:{width:"45%",height:"40px !important"},StepSkeleton:{width:"15%"},HeaderSkeleton:{width:"25%",height:"30px !important"},InputSkeleton:{width:"75%"},ButtonSkeleton:{width:"80px",height:"30px !important"}}),d=i.toString(),l=()=>e("div",{class:i.classes.Container},e("style",{type:"text/css"},d),e("sl-skeleton",{class:i.classes.TitleSkeleton}),e("div",{class:i.classes.HeaderContainer},e("sl-skeleton",{class:i.classes.StepSkeleton}),e("sl-skeleton",{class:i.classes.HeaderSkeleton})),e("sl-skeleton",{class:i.classes.InputSkeleton}),e("sl-skeleton",{class:i.classes.InputSkeleton}),e("sl-skeleton",{class:i.classes.InputSkeleton}),e("sl-skeleton",{class:i.classes.InputSkeleton}),e("sl-skeleton",{class:i.classes.InputSkeleton}),e("sl-skeleton",{class:i.classes.StepSkeleton}),e("sl-skeleton",{class:i.classes.ButtonSkeleton}));function u(e){return!!["W9","W8BENE","W8BEN"].includes(e)}const m=e=>!Object.keys(e).find((a=>null==e[a])),c=e=>{switch(e){case"W9":return"W-9";case"W8BEN":case"W8BENE":return"W-8";default:return""}};function T(e,a){return a.trim().search(e)>-1}const p=(e,t)=>a.formatMessage({id:e,defaultMessage:t},{fieldName:e});function b({countryCode:e,locale:a}){return{countryCode:e,displayName:new Intl.DisplayNames([a],{type:"region"}).of(e)}}const h={states:{step:"1",hideSteps:!1,hideState:!1,loading:!1,disabled:!1,isPartner:!1,isUser:!1,loadingError:!1,formState:{firstName:"Bob",lastName:"Testerson",email:"bobtesterson@example.com",phoneNumberCountryCode:"US",phoneNumber:"555 555 5555",countryCode:"US",currency:"CAD",address:"2/1337 Johnson Street",city:"Vancouver",state:"BC",postalCode:"555 555",errors:{}}},data:{regionLabelEnum:"STATE",regions:[],phoneCountries:[{countryCode:"CA",displayName:"Canada"}],countries:[{countryCode:"CA",displayName:"Canada"},{countryCode:"ES",displayName:"Spain"},{countryCode:"UK",displayName:"United Kingdom"},{countryCode:"US",displayName:"United States"},{countryCode:"AR",displayName:"Argentina"},{countryCode:"AU",displayName:"Australia"},{countryCode:"ZW",displayName:"Zimbabwe"}],currencies:[{currencyCode:"CAD",displayName:"CAD"},{currencyCode:"GBP",displayName:"GBP"},{currencyCode:"USD",displayName:"USD"}],allCountries:[{countryCode:"CA",displayName:"Canada"},{countryCode:"ES",displayName:"Spain"},{countryCode:"UK",displayName:"United Kingdom"},{countryCode:"US",displayName:"United States"}],allCurrencies:[{currencyCode:"CAD",displayName:"CAD"},{currencyCode:"GBP",displayName:"GBP"},{currencyCode:"USD",displayName:"USD"}]},refs:{formRef:{current:null},currencyRef:{current:null},phoneCountryRef:{current:null}}},S={step:"2",hideSteps:!1,disabled:!1,loading:!1,isPartner:!1,loadingError:!1,formState:{checked:void 0,errors:{}}},N={states:{showVerification:!1,step:"4",hideSteps:!1,disabled:!1,loading:!1,hasPayPal:!1,isPartner:!1,hideBackButton:!1,saveDisabled:!1,thresholds:[],loadingError:!1,email:"test@example.com",formState:{paymentMethodChecked:"toBankAccount"}},callbacks:{onVerificationHide:()=>{},onVerification:()=>{},onSubmit:async()=>console.log("Submit"),setPaymentMethodChecked:()=>{},setPaymentScheduleChecked:()=>{},onBack:async()=>console.log("back"),setCountrySearch:()=>{}},refs:{formRef:{current:null}}},A={showExitButton:!0,step:"3",urlLoading:!1,docusignStatus:void 0,hideSteps:!1,documentType:"W9",documentTypeString:"W9",loading:!1,disabled:!1,participantTypeDisabled:!1,loadingError:!1,formState:{participantType:"individualParticipant",errors:{},taxFormExpired:!1}},g={states:{veriffLoading:!1,payoutStatus:"DONE",canEditPayoutInfo:!0,disabled:!1,status:"ACTIVE",documentType:"W9",documentTypeString:c("W9"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,country:"United Kingdom",indirectTaxNumber:"123456",indirectTaxType:"VAT",showNewFormDialog:!1,hasHold:!1},slots:{payoutDetailsCardSlot:e("sqm-payout-details-card",{demoData:{states:{badgeStatus:"nextPayout"}}})}},E=()=>e(l,null),y=Object.freeze({__proto__:null,default:{title:"Components/Tax Form"},GeneralLoadingView:E,GeneralErrorView:()=>e(o,{loadingErrorAlertHeader:"There was a problem loading your form",loadingErrorAlertDescription:"Please refresh the page and try again. If this problem continues, contact our support team."}),StepOne:()=>e("sqm-user-info-form",{demoData:h}),StepOneLoading:()=>e("sqm-user-info-form",{demoData:{states:{...h.states,loading:!0}}}),StepOneDisabled:()=>e("sqm-user-info-form",{demoData:{states:{...h.states,disabled:!0}}}),StepOneIsUser:()=>e("sqm-user-info-form",{demoData:{states:{...h.states,isUser:!0}}}),StepOneIsPartner:()=>e("sqm-user-info-form",{demoData:{states:{...h.states,disabled:!0,isPartner:!0}}}),StepOneWithErrors:()=>e("sqm-user-info-form",{demoData:{states:{...h.states,formState:{...h.states.formState,errors:{firstName:!0,lastName:!0,email:!0,countryCode:!0,currency:!0,participantType:!0,allowBankingCollection:!0}}}}}),StepOneWithGeneralError:()=>e("sqm-user-info-form",{demoData:{states:{...h.states,formState:{...h.states.formState,errors:{general:!0}}}}}),StepOneWithLoadingError:()=>e("sqm-user-info-form",{demoData:{states:{...h.states,loadingError:!0,loading:!0,formState:{...h.states.formState}}}}),StepTwoLoading:()=>e("sqm-indirect-tax-form",{demoData:{states:{...S,loading:!0}}}),StepTwoLoadingError:()=>e("sqm-indirect-tax-form",{demoData:{states:{...S,loading:!0,loadingError:!0}}}),StepTwoDisabled:()=>e("sqm-indirect-tax-form",{demoData:{states:{...S,disabled:!0}}}),StepTwoIsPartner:()=>e("sqm-indirect-tax-form",{demoData:{states:{...S,isPartner:!0}}}),StepTwoWithGeneralError:()=>e("sqm-indirect-tax-form",{demoData:{states:{...S,formState:{...S.formState,errors:{general:!0}}}}}),StepTwoOtherRegionChecked:()=>e("sqm-indirect-tax-form",{demoData:{states:{...S,formState:{...S.formState,checked:"otherRegion"}},slotProps:{formState:{selectedRegion:"UK",indirectTaxNumber:"123456",errors:{}}}}}),StepTwoOtherRegionCheckedCanada:()=>e("sqm-indirect-tax-form",{demoData:{states:{...S,formState:{...S.formState,checked:"otherRegion"}},slotProps:{formState:{selectedRegion:"CA",province:"BRITISHCOLUMBIA",indirectTaxNumber:"123456",errors:{}}}}}),StepTwoOtherRegionCheckedCanadaGST:()=>e("sqm-indirect-tax-form",{demoData:{states:{...S,formState:{...S.formState,checked:"otherRegion"}},slotProps:{formState:{selectedRegion:"CA",province:"QUEBEC",indirectTaxNumber:"123456",errors:{}}}}}),StepTwoOtherRegionCheckedCanadaGSTAndQST:()=>e("sqm-indirect-tax-form",{demoData:{states:{...S,formState:{...S.formState,checked:"otherRegion"}},slotProps:{formState:{selectedRegion:"CA",province:"QUEBEC",qstNumber:"654321",hasQst:!0,errors:{}}}}}),StepTwoOtherRegionCheckedOtherCountrySubRegion:()=>e("sqm-indirect-tax-form",{demoData:{states:{...S,formState:{...S.formState,checked:"otherRegion"}},slotProps:{formState:{selectedRegion:"ES",subRegion:"CANARYISLANDS",errors:{}}}}}),StepTwoOtherRegionCheckedOtherCountrySubRegionIncomeTax:()=>e("sqm-indirect-tax-form",{demoData:{states:{...S,formState:{...S.formState,checked:"otherRegion"}},slotProps:{formState:{selectedRegion:"ES",subRegion:"CANARYISLANDS",hasSubRegionTaxNumber:!0,subRegionTaxNumber:"654321",errors:{}}}}}),StepTwoOtherRegionCheckedWithInputErrors:()=>e("sqm-indirect-tax-form",{demoData:{states:{...S,formState:{checked:"otherRegion",errors:{}}},slotProps:{formState:{province:"",selectedRegion:"GB",errors:{selectedRegion:!0,indirectTaxNumber:!0}}}}}),StepTwoOtherRegionCheckedCanadaWithProvinceError:()=>e("sqm-indirect-tax-form",{demoData:{states:{...S,formState:{...S.formState,checked:"otherRegion"}},slotProps:{formState:{selectedRegion:"CA",province:"BC",errors:{province:!0,indirectTaxNumber:!0}}}}}),StepTwoOtherRegionCheckedCanadaGSTAndQSTError:()=>e("sqm-indirect-tax-form",{demoData:{states:{...S,formState:{...S.formState,checked:"otherRegion"}},slotProps:{formState:{selectedRegion:"CA",province:"QUEBEC",hasQst:!0,errors:{province:!0,indirectTaxNumber:!0,qstNumber:!0}}}}}),StepTwoOtherRegionCheckedOtherCountrySubRegionErrors:()=>e("sqm-indirect-tax-form",{demoData:{states:{...S,formState:{...S.formState,checked:"otherRegion"}},slotProps:{formState:{selectedRegion:"ES",hasSubRegionTaxNumber:!0,errors:{indirectTaxNumber:!0,subRegionTaxNumberError:!0,subRegion:!0}}}}}),StepTwoNotRegisteredChecked:()=>e("sqm-indirect-tax-form",{demoData:{states:{...S,formState:{...S.formState,checked:"notRegistered"}}}}),StepThreeWithDocusign:()=>e("sqm-docusign-form",{demoData:{states:{documentType:"W9",documentTypeString:c("W9"),...A}}}),StepThreeWithDocusignW8BEN:()=>e("sqm-docusign-form",{demoData:{states:{...A,documentType:"W8BEN",documentTypeString:c("W8BEN")}}}),StepThreeWithDocusignW8BENE:()=>e("sqm-docusign-form",{demoData:{states:{...A,documentType:"W8BENE",documentTypeString:c("W8BENE"),formState:{taxFormExpired:!1,participantType:"businessEntity",errors:{participantType:"",general:!1}}}}}),StepThreeWithDocusignExpired:()=>e("sqm-docusign-form",{demoData:{states:{...A,docusignStatus:"ttl_expired",formState:{participantType:"individualParticipant",taxFormExpired:!0,errors:{}}}}}),StepThreeWithDocusignCompleted:()=>e("sqm-docusign-form",{demoData:{states:{...A,docusignStatus:"signing_complete",formState:{participantType:"individualParticipant",taxFormExpired:!1,errors:{}}}}}),StepThreeDocusignWithError:()=>e("sqm-docusign-form",{demoData:{states:{...A,docusignStatus:"exception",formState:{...A.formState,errors:{formSubmission:!0}}}}}),StepThreeDocusignWithGeneralError:()=>e("sqm-docusign-form",{demoData:{states:{...A,formState:{...A.formState,errors:{general:!0}}}}}),StepThreeDocusignWithLoadingError:()=>e("sqm-docusign-form",{demoData:{states:{...A,loadingError:!0,formState:{...A.formState}}}}),StepThreeDocusignLoading:()=>e("sqm-docusign-form",{demoData:{states:{...A,loading:!0}}}),StepThreeDocusignDisabled:()=>e("sqm-docusign-form",{demoData:{states:{...A,disabled:!0}}}),StepFourDefault:()=>e("sqm-banking-info-form",null),StepFourIsPartner:()=>e("sqm-banking-info-form",{demoData:{...N,states:{...N.states,isPartner:!0,formState:{...N.states.formState}}}}),StepFourDirectToBankChecked:()=>e("sqm-banking-info-form",{demoData:{...N,states:{...N.states,formState:{...N.states.formState}}}}),StepFourToPaypalChecked:()=>e("sqm-banking-info-form",{demoData:{...N,states:{...N.states,formState:{...N.states.formState,paymentMethodChecked:"toPayPalAccount"}}}}),StepFourReVerifyEmail:()=>e("sqm-banking-info-form",{demoData:{...N,states:{...N.states,showVerification:!0,isPartner:!0,formState:{...N.states.formState,paymentMethodChecked:"toPayPalAccount"}}}}),TaxAndCashDashboardActiveW9Form:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g}}),TaxAndCashDashboardActiveW8BENForm:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"DONE",veriffLoading:!1,noFormNeeded:!1,canEditPayoutInfo:!0,documentType:"W8BEN",documentTypeString:c("W8BEN"),country:"United Kingdom",indirectTaxType:"VAT",indirectTaxNumber:"123456",showNewFormDialog:!1,hasHold:!1}}}),TaxAndCashDashboardActiveW8BENEForm:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"DONE",veriffLoading:!1,noFormNeeded:!1,canEditPayoutInfo:!0,documentType:"W8BENE",documentTypeString:c("W8BENE"),country:"United Kingdom",indirectTaxType:"VAT",indirectTaxNumber:"123456",showNewFormDialog:!1,hasHold:!1}}}),TaxAndCashDashboardNotActiveW9Form:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"DONE",veriffLoading:!1,noFormNeeded:!1,canEditPayoutInfo:!0,status:"INACTIVE",documentType:"W9",documentTypeString:c("W9"),country:"United Kingdom",indirectTaxType:"VAT",indirectTaxNumber:"123456",showNewFormDialog:!1,hasHold:!1}}}),TaxAndCashDashboardNotVerifiedW9Form:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"DONE",canEditPayoutInfo:!0,disabled:!1,status:"NOT_VERIFIED",documentType:"W9",documentTypeString:c("W9"),noFormNeeded:!1,country:"United States",indirectTaxType:"VAT",indirectTaxNumber:"123456",showNewFormDialog:!1,hasHold:!1,veriffLoading:!1}}}),TaxAndCashDashboardNotVerifiedW8BENForm:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"DONE",veriffLoading:!1,canEditPayoutInfo:!0,disabled:!1,status:"NOT_VERIFIED",documentType:"W8BEN",documentTypeString:c("W8BEN"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,country:"United Kingdom",indirectTaxType:"VAT",indirectTaxNumber:"123456",showNewFormDialog:!1,hasHold:!1}}}),TaxAndCashDashboardNotVerifiedW8BENEForm:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"DONE",veriffLoading:!1,canEditPayoutInfo:!0,disabled:!1,status:"NOT_VERIFIED",documentType:"W8BENE",documentTypeString:c("W8BENE"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,country:"United Kingdom",indirectTaxType:"VAT",indirectTaxNumber:"123456",showNewFormDialog:!1,hasHold:!1}}}),TaxAndCashDashboardNotActiveW8BENEForm:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"DONE",veriffLoading:!1,canEditPayoutInfo:!0,disabled:!1,status:"NOT_ACTIVE",documentType:"W8BENE",documentTypeString:c("W8BENE"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,indirectTaxNumber:"123456",indirectTaxType:"VAT",country:"United Kingdom",showNewFormDialog:!1,hasHold:!1}}}),TaxAndCashDashboardNoFormNeeded:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"DONE",veriffLoading:!1,canEditPayoutInfo:!0,disabled:!1,documentType:"W9",documentTypeString:c("W9"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!0,province:"Ontario",country:"Canada",indirectTaxNumber:"123456",indirectTaxType:"GST",showNewFormDialog:!1,hasHold:!1}}}),TaxAndCashDashboardIndirectTaxCanada:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"DONE",veriffLoading:!1,canEditPayoutInfo:!0,status:"ACTIVE",disabled:!1,documentType:"W8BENE",documentTypeString:c("W8BENE"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,province:"Ontario",country:"Canada",indirectTaxType:"GST",indirectTaxNumber:"123456",showNewFormDialog:!1,hasHold:!1}}}),TaxAndCashDashboardIndirectTaxCanadaQuebec:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"DONE",veriffLoading:!1,canEditPayoutInfo:!0,status:"ACTIVE",disabled:!1,documentType:"W8BENE",documentTypeString:c("W8BENE"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,province:"Quebec",country:"Canada",indirectTaxType:"GST",indirectTaxNumber:"123456",qstNumber:"44212",showNewFormDialog:!1,hasHold:!1}}}),TaxAndCashDashboardIndirectTaxSpain:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"DONE",veriffLoading:!1,canEditPayoutInfo:!0,status:"ACTIVE",disabled:!1,documentType:"W8BENE",documentTypeString:c("W8BENE"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,country:"Spain",subRegion:"Spain Proper",indirectTaxType:"VAT",indirectTaxNumber:"123456",subRegionTaxNumber:"44212",showNewFormDialog:!1,hasHold:!1}}}),TaxAndCashDashboardIndirectTaxNotRegistered:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"DONE",veriffLoading:!1,canEditPayoutInfo:!0,status:"ACTIVE",documentType:"W8BEN",documentTypeString:c("W8BEN"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,notRegistered:!0,showNewFormDialog:!1,hasHold:!1}}}),TaxAndCashDashboardIdentityVerifcationRequired:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"VERIFICATION:REQUIRED",veriffLoading:!1,canEditPayoutInfo:!0,status:"ACTIVE",documentType:"W8BEN",documentTypeString:c("W8BEN"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,notRegistered:!0,showNewFormDialog:!1,hasHold:!1}}}),TaxAndCashDashboardIdentityVerifcationRequiredInternal:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"VERIFICATION:INTERNAL",veriffLoading:!1,canEditPayoutInfo:!0,status:"ACTIVE",documentType:"W8BEN",documentTypeString:c("W8BEN"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,notRegistered:!0,showNewFormDialog:!1,hasHold:!1}}}),TaxAndCashDashboardIdentityVerifcationReviewInternal:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"VERIFICATION:REVIEW",veriffLoading:!1,canEditPayoutInfo:!0,status:"ACTIVE",documentType:"W8BEN",documentTypeString:c("W8BEN"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,notRegistered:!0,showNewFormDialog:!1,hasHold:!1}}}),TaxAndCashDashboardIdentityVerifcationFailedInternal:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"VERIFICATION:FAILED",veriffLoading:!1,canEditPayoutInfo:!0,status:"ACTIVE",documentType:"W8BEN",documentTypeString:c("W8BEN"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,notRegistered:!0,showNewFormDialog:!1,hasHold:!1}}}),TaxAndCashDashboardNewTaxForm:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"DONE",veriffLoading:!1,canEditPayoutInfo:!0,status:"ACTIVE",documentType:"W8BEN",documentTypeString:c("W8BEN"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,notRegistered:!0,showNewFormDialog:!0,hasHold:!1}}}),TaxAndCashDashboardPayoutsOnHold:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"DONE",veriffLoading:!1,canEditPayoutInfo:!0,disabled:!0,status:"ACTIVE",documentType:"W8BEN",documentTypeString:c("W8BEN"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,indirectTaxNumber:"123456",country:"Slovania",showNewFormDialog:!1,hasHold:!0}}}),TaxAndCashDashboardLoading:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"DONE",veriffLoading:!1,canEditPayoutInfo:!0,disabled:!1,status:"ACTIVE",documentType:"W9",documentTypeString:c("W9"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,loading:!0,showNewFormDialog:!1,hasHold:!1}}}),TaxAndCashDashboardWithLoadingError:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"DONE",veriffLoading:!1,disabled:!1,canEditPayoutInfo:!0,status:"ACTIVE",documentType:"W9",documentTypeString:c("W9"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,loading:!0,loadingError:!0,showNewFormDialog:!1,hasHold:!1}}}),TaxAndCashDashboardWithGeneralError:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"DONE",veriffLoading:!1,canEditPayoutInfo:!0,disabled:!1,status:"ACTIVE",documentType:"W9",documentTypeString:c("W9"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,indirectTaxNumber:"123456",indirectTaxType:"VAT",country:"Slovania",showNewFormDialog:!1,hasHold:!1,errors:{general:!0}}}}),TaxAndCashDashboardDisabled:()=>e("sqm-tax-and-cash-dashboard",{demoData:{...g,states:{payoutStatus:"DONE",veriffLoading:!1,canEditPayoutInfo:!0,disabled:!0,status:"ACTIVE",documentType:"W8BEN",documentTypeString:c("W8BEN"),dateSubmitted:"Jan 18th, 2025",noFormNeeded:!1,indirectTaxNumber:"123456",country:"Slovania",showNewFormDialog:!1,hasHold:!1}}}),TaxAndCashTextProps:()=>e("sqm-tax-and-cash",{demoData:{showTextProps:!0}})}),f={GB:"VAT",AU:"GST",NZ:"GST",CA:"HST",AT:"VAT",BE:"VAT",BG:"VAT",HR:"VAT",CY:"VAT",CZ:"VAT",DK:"VAT",EE:"VAT",FI:"VAT",FR:"VAT",DE:"VAT",GR:"VAT",HU:"VAT",IE:"VAT",IT:"VAT",LV:"VAT",LT:"VAT",LU:"VAT",MT:"VAT",NL:"VAT",PL:"VAT",PT:"VAT",RO:"VAT",SK:"VAT",SI:"VAT",ES:"VAT",SE:"VAT",IS:"VAT",IN:"GST",IL:"VAT",JP:"CT",MX:"VAT",NO:"VAT",SG:"GST",ZA:"VAT",KR:"VAT",CH:"VAT",TW:"VAT",TH:"VAT",PH:"VAT",MY:"SST",AE:"VAT",TR:"VAT",RU:"VAT"},x=t({Container:{width:"100%"},InputContainer:{width:"100%",display:"flex",justifyContent:"flex-start",flexDirection:"column",gap:"16px",padding:"16px",maxWidth:"450px"},ConditionalInputsContainer:{width:"100%",display:"flex",justifyContent:"flex-start",flexDirection:"column",gap:"16px"},HR:{border:"1px solid #E0E0E0",margin:"10px 0"},Input:{maxWidth:"500px"},Checkbox:{"&::part(control)":{borderRadius:"0 !important"}},SearchInput:{padding:"var(--sl-spacing-x-small)"},ErrorInput:{maxWidth:"500px","&::part(base)":{border:"1px solid var(--sl-color-danger-500)",borderRadius:"var(--sl-input-border-radius-medium)"},"&::part(help-text)":{color:"var(--sl-color-danger-500)"}}}),C=x.toString(),D=t=>{var o,s,n;const{states:i,states:{formState:d},callbacks:l,text:u}=t,{classes:m}=x,c=e=>a.formatMessage({id:`tax-field-label${e}`,defaultMessage:u.indirectTaxNumber},{taxType:e}),T=e=>a.formatMessage({id:`tax-field-label${e}`,defaultMessage:u.error.indirectTaxNumber},{taxType:e}),b=({label:a,error:t,name:o})=>{var r;return e("sl-input",Object.assign({required:!0,exportparts:"label: input-label, base: input-base",class:m.Input,label:a,disabled:i.loading||i.disabled,value:d[o]},(null===(r=d.errors)||void 0===r?void 0:r[o])&&{class:m.ErrorInput,helpText:t},{id:o,name:`/${o}`}))},h=()=>{var a,o;return e("div",{class:m.ConditionalInputsContainer},e("sl-select",Object.assign({required:!0,exportparts:"label: input-label, base: input-base",class:m.Input,value:d.subRegion,label:u.subRegion,disabled:i.loading||i.disabled},(null===(a=d.errors)||void 0===a?void 0:a.indirectTaxNumber)&&{class:m.ErrorInput,helpText:p(u.subRegion,u.error.fieldRequiredError)},{id:"subRegion",name:"/subRegion"}),t.data.esRegions.map((a=>e("sl-menu-item",{value:a.regionCode},a.displayName)))),e(b,{name:"indirectTaxNumber",label:c("VAT"),error:T("VAT")}),e("sl-checkbox",{class:m.Checkbox,exportparts:"label: input-label, base: input-base",checked:d.hasSubRegionTaxNumber,"onSl-change":l.onSpainToggle,disabled:i.disabled||i.isPartner},u.isRegisteredSubRegionIncomeTax),d.hasSubRegionTaxNumber&&e("sl-input",Object.assign({required:!0,exportparts:"label: input-label, base: input-base",class:m.Input,label:u.subRegionTaxNumberLabel,disabled:i.loading||i.disabled,value:d.subRegionTaxNumber},(null===(o=d.errors)||void 0===o?void 0:o.subRegionTaxNumber)&&{class:m.ErrorInput,helpText:p(u.subRegionTaxNumberLabel,u.error.fieldRequiredError)},{id:"subRegionTaxNumber",name:"/subRegionTaxNumber"})))},S=()=>{var a,o;const{classes:s}=x,n=null===(a=null==r?void 0:r.find((e=>e.regionCode===d.province)))||void 0===a?void 0:a.taxType;return e("div",{class:s.ConditionalInputsContainer},e("sl-select",Object.assign({required:!0,value:d.province,exportparts:"label: input-label, base: input-base",class:s.Input,label:u.province,disabled:i.loading||i.disabled,"onSl-select":e=>l.onFormChange("province",e)},(null===(o=d.errors)||void 0===o?void 0:o.province)&&{class:s.ErrorInput,helpText:p(u.province,u.error.fieldRequiredError)},{id:"province",name:"/province"}),t.data.provinces.map((a=>e("sl-menu-item",{value:a.regionCode},a.displayName)))),"GST"===n&&e(b,{label:c("GST"),error:T("GST"),name:"indirectTaxNumber"}),"HST"===n&&e(b,{label:c("HST"),error:T("HST"),name:"indirectTaxNumber"}),"QUEBEC"===d.province&&e("div",{class:s.ConditionalInputsContainer},e("sl-checkbox",{class:s.Checkbox,exportparts:"label: input-label, base: input-base","onSl-change":l.onQstToggle,checked:d.hasQst,disabled:i.isPartner||i.disabled},u.isRegisteredQST),d.hasQst&&e(b,{name:"qstNumber",label:u.qstNumber,error:p(u.qstNumber,u.error.fieldRequiredError)})))},N=(a=>{var t;switch(a){case"CA":return e(S,null);case"ES":return e(h,null);default:return e("sl-input",Object.assign({required:!0,exportparts:"label: input-label, base: input-base",class:m.Input,value:d.indirectTaxNumber,label:c(f[a]||"GENERAL"),disabled:i.loading||i.disabled},(null===(t=d.errors)||void 0===t?void 0:t.indirectTaxNumber)&&{class:m.ErrorInput,helpText:T(f[a]||"GENERAL")},{id:"indirectTaxNumber",name:"/indirectTaxNumber"}))}})(d.selectedRegion);return e("div",{style:i.hide?{display:"none"}:{}},e("form",{class:m.Container},e("style",{type:"text/css"},C,"\n :host{\n display: block; \n }\n * {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n }\n "),e("hr",{class:m.HR}),e("div",{class:m.InputContainer},e("sl-select",Object.assign({required:!0,class:m.Input,value:d.selectedRegion,exportparts:"label: input-label, base: input-base",label:u.selectedRegion,disabled:i.loading||i.disabled,"onSl-select":e=>l.onFormChange("selectedRegion",e)},(null===(o=d.errors)||void 0===o?void 0:o.selectedRegion)&&{class:m.ErrorInput,helpText:p(u.selectedRegion,u.error.fieldRequiredError)},{id:"selectedRegion",name:"/selectedRegion"}),e("sl-input",{class:m.SearchInput,placeholder:u.searchForCountryText,onKeyDown:e=>{e.stopPropagation()},"onSl-input":e=>{l.setCountrySearch(e.target.value)}}),null===(s=t.data.countries)||void 0===s?void 0:s.map((a=>e("sl-menu-item",{value:a.countryCode},a.displayName))),null===(n=t.data.allCountries)||void 0===n?void 0:n.map((a=>e("sl-menu-item",{value:a.countryCode,style:{display:"none"}},a.displayName)))),N),e("hr",{class:m.HR})))},I={Description:{fontSize:"var(--sl-font-size-small)",marginTop:"var(--sl-spacing-small)",margin:"0 0 var(--sl-spacing-large)",color:"var(--sl-color-gray-500)"},Header:{fontSize:"var(--sl-font-size-large)",fontWeight:"var(-sl-font-weight-semibold)",margin:"0 0 var(--sl-spacing-xxx-small)"},Container:{},InvoiceTableContaier:{"& sl-details::part(base)":{border:"none"},"& sl-details::part(content)":{padding:0},"& sl-details::part(header)":{fontSize:"var(--sl-font-size-medium)",padding:"0px"},"& sl-details::part(summary)":{fontWeight:"var(-sl-font-weight-semibold)"},"& sl-details::part(summary-icon)":{marginRight:"100%",marginLeft:"var(--sl-spacing-x-small)",transform:"rotate(90deg)"},"& sl-details[open]::part(summary-icon)":{transform:"rotate(270deg)"}}};function v(a,o){const r=t(I),s=r.toString();return e("div",{class:r.classes.Container},e("style",{type:"text/css"},"\n :host{\n display: block;\n }",s),e("div",{class:r.classes.InvoiceTableContaier},e("sl-details",{summary:a.header},e("p",{class:r.classes.Description},a.description),o)))}export{n as A,E as G,v as I,l as L,D as O,y as T,s as a,r as b,f as c,T as d,p as f,b as g,m as o,c as t,u as v}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-f26aedcd.system.js","./p-
|
|
1
|
+
System.register(["./p-f26aedcd.system.js","./p-475245d1.system.js","./p-1a673057.system.js","./p-e07bc6c4.system.js"],(function(e){"use strict";var s,t,a,i;return{setters:[function(e){s=e.h},function(e){t=e.i},function(e){a=e.c},function(e){i=e.T}],execute:function(){e("P",l);function l(e){var l,r,n,o,d;var u=e.states,m=e.callbacks;var c=u.text,p=u.formState;var v=p.errors,b=p.error;var x={Container:{display:"flex",flexDirection:"column",gap:"var(--sl-spacing-xxx-large)",padding:"var(--sl-spacing-xxx-large)"},FormStyle:{width:"100%",minWidth:"700px","& >*:not(:last-child)":{"margin-bottom":"32px"},"@media screen and (max-width: 1100px)":{minWidth:"100%"}},Error:{"&::part(erroralert-base)":{"margin-bottom":"32px"}},Success:{"&::part(successalert-base)":{"margin-bottom":"32px"}},NameInputStyle:{width:"50%","@media screen and (max-width: 860px)":{width:"100%","margin-right":"0"}},NameInputContainer:{display:"flex",gap:"32px",width:"100%","@media screen and (max-width: 860px)":{flexDirection:"column"}}};var f=a(x);var g=f.toString();var y=((l=u.user)===null||l===void 0?void 0:l.countryCode)?t.formatDisplayName((r=u.user)===null||r===void 0?void 0:r.countryCode,{type:"region"}):"";return s("div",{class:f.classes.Container,part:"sqm-base"},s("style",{type:"text/css"},g),s(i,Object.assign({},{type:"h1"}),c.editProfileHeader),s(i,Object.assign({},{type:"h2"}),c.editProfileSubHeader),s("form",{class:f.classes.FormStyle,onSubmit:m.onSubmit},u.success&&s("sqm-form-message",{class:f.classes.Success,exportparts:"success-icon"},s("div",{part:"successalert-text"},c.submissionSuccessText)),b&&s("sqm-form-message",{class:f.classes.Error,type:"error",exportparts:"erroralert-icon"},s("div",{part:"erroralert-text"},b)),s("div",{class:f.classes.NameInputContainer},s("sl-input",Object.assign({class:f.classes.NameInputStyle,exportparts:"label: input-label, base: input-base",value:(n=u.user)===null||n===void 0?void 0:n.firstName,onInput:m.onChange,label:c.firstnametext,disabled:u.loading},(v===null||v===void 0?void 0:v.firstName)&&(v===null||v===void 0?void 0:v.firstName.status)!=="valid"?{class:"ErrorStyles",helpText:c.fieldEmptyText}:[],{id:"firstName",name:"firstName",error:(v===null||v===void 0?void 0:v.firstName)&&(v===null||v===void 0?void 0:v.firstName.status)!=="valid"?v===null||v===void 0?void 0:v.firstName.message:undefined})),s("sl-input",Object.assign({class:f.classes.NameInputStyle,exportparts:"label: input-label, base: input-base",value:(o=u.user)===null||o===void 0?void 0:o.lastName,onInput:m.onChange,label:c.lastnametext,disabled:u.loading,id:"lastName",name:"lastName"},(v===null||v===void 0?void 0:v.lastName)&&(v===null||v===void 0?void 0:v.lastName.status)!=="valid"?{class:"ErrorStyles",helpText:c.fieldEmptyText}:[],{error:(v===null||v===void 0?void 0:v.lastName)&&(v===null||v===void 0?void 0:v.lastName.status)!=="valid"?v===null||v===void 0?void 0:v.lastName.message:undefined}))),s("sl-input",{label:c.emailtext,value:(d=u.user)===null||d===void 0?void 0:d.email,exportparts:"label: input-label, base: input-base",disabled:true}),u.showCountry&&s("sl-input",{label:c.countrytext,value:y,exportparts:"label: input-label, base: input-base",disabled:true}),s("sl-button",{type:"primary",loading:u.loading,disabled:u.submitDisabled,onClick:function(e){m.onSubmit(e)},submit:true},c.submitChangeButtonText)))}}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e}from"./p-f708da7b.js";import{i as
|
|
1
|
+
import{h as e}from"./p-f708da7b.js";import{i as a}from"./p-6d4a313f.js";import{c as l}from"./p-cef45012.js";import{T as t}from"./p-c9f1dde7.js";function i(i){var s,r,o,n,d;const{states:p,callbacks:m}=i,{text:u,formState:c}=p,{errors:b,error:v}=c,x=l({Container:{display:"flex",flexDirection:"column",gap:"var(--sl-spacing-xxx-large)",padding:"var(--sl-spacing-xxx-large)"},FormStyle:{width:"100%",minWidth:"700px","& >*:not(:last-child)":{"margin-bottom":"32px"},"@media screen and (max-width: 1100px)":{minWidth:"100%"}},Error:{"&::part(erroralert-base)":{"margin-bottom":"32px"}},Success:{"&::part(successalert-base)":{"margin-bottom":"32px"}},NameInputStyle:{width:"50%","@media screen and (max-width: 860px)":{width:"100%","margin-right":"0"}},NameInputContainer:{display:"flex",gap:"32px",width:"100%","@media screen and (max-width: 860px)":{flexDirection:"column"}}}),f=x.toString(),g=(null===(s=p.user)||void 0===s?void 0:s.countryCode)?a.formatDisplayName(null===(r=p.user)||void 0===r?void 0:r.countryCode,{type:"region"}):"";return e("div",{class:x.classes.Container,part:"sqm-base"},e("style",{type:"text/css"},f),e(t,Object.assign({},{type:"h1"}),u.editProfileHeader),e(t,Object.assign({},{type:"h2"}),u.editProfileSubHeader),e("form",{class:x.classes.FormStyle,onSubmit:m.onSubmit},p.success&&e("sqm-form-message",{class:x.classes.Success,exportparts:"success-icon"},e("div",{part:"successalert-text"},u.submissionSuccessText)),v&&e("sqm-form-message",{class:x.classes.Error,type:"error",exportparts:"erroralert-icon"},e("div",{part:"erroralert-text"},v)),e("div",{class:x.classes.NameInputContainer},e("sl-input",Object.assign({class:x.classes.NameInputStyle,exportparts:"label: input-label, base: input-base",value:null===(o=p.user)||void 0===o?void 0:o.firstName,onInput:m.onChange,label:u.firstnametext,disabled:p.loading},(null==b?void 0:b.firstName)&&"valid"!==(null==b?void 0:b.firstName.status)?{class:"ErrorStyles",helpText:u.fieldEmptyText}:[],{id:"firstName",name:"firstName",error:(null==b?void 0:b.firstName)&&"valid"!==(null==b?void 0:b.firstName.status)?null==b?void 0:b.firstName.message:void 0})),e("sl-input",Object.assign({class:x.classes.NameInputStyle,exportparts:"label: input-label, base: input-base",value:null===(n=p.user)||void 0===n?void 0:n.lastName,onInput:m.onChange,label:u.lastnametext,disabled:p.loading,id:"lastName",name:"lastName"},(null==b?void 0:b.lastName)&&"valid"!==(null==b?void 0:b.lastName.status)?{class:"ErrorStyles",helpText:u.fieldEmptyText}:[],{error:(null==b?void 0:b.lastName)&&"valid"!==(null==b?void 0:b.lastName.status)?null==b?void 0:b.lastName.message:void 0}))),e("sl-input",{label:u.emailtext,value:null===(d=p.user)||void 0===d?void 0:d.email,exportparts:"label: input-label, base: input-base",disabled:!0}),p.showCountry&&e("sl-input",{label:u.countrytext,value:g,exportparts:"label: input-label, base: input-base",disabled:!0}),e("sl-button",{type:"primary",loading:p.loading,disabled:p.submitDisabled,onClick:e=>{m.onSubmit(e)},submit:!0},u.submitChangeButtonText)))}export{i as P}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import{r as e,h as t}from"./p-f708da7b.js";import{k as r,f as i,n as o}from"./p-cd651f81.js";import"./p-6d4a313f.js";import{d as s,J as a,w as l,$ as n,i as d}from"./p-94a876b9.js";import{c as u}from"./p-c1086930.js";import{g as m}from"./p-9ec99ced.js";import"./p-cef45012.js";import"./p-c9f1dde7.js";import{P as c}from"./p-e41aac34.js";import{i as f}from"./p-8c23d1b8.js";const v=s.gql`
|
|
2
|
+
query {
|
|
3
|
+
viewer {
|
|
4
|
+
... on User {
|
|
5
|
+
id
|
|
6
|
+
accountId
|
|
7
|
+
firstName
|
|
8
|
+
lastName
|
|
9
|
+
email
|
|
10
|
+
countryCode
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
`,h=s.gql`
|
|
15
|
+
mutation (
|
|
16
|
+
$id: String!
|
|
17
|
+
$accountId: String!
|
|
18
|
+
$firstName: String!
|
|
19
|
+
$lastName: String!
|
|
20
|
+
) {
|
|
21
|
+
upsertUser(
|
|
22
|
+
userInput: {
|
|
23
|
+
id: $id
|
|
24
|
+
accountId: $accountId
|
|
25
|
+
firstName: $firstName
|
|
26
|
+
lastName: $lastName
|
|
27
|
+
}
|
|
28
|
+
) {
|
|
29
|
+
firstName
|
|
30
|
+
lastName
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
`,p={country:"",email:"",firstName:"",lastName:"",errors:{},error:""},b=class{constructor(t){e(this,t),this.ignored=!0,this.firstnametext="First Name",this.lastnametext="Last Name",this.emailtext="Email",this.countrytext="Country",this.editProfileHeader="Edit your profile",this.editProfileSubHeader="Personal Information",this.submitChangeButtonText="Submit Changes",this.hideCountry=!1,this.networkRequestMessage="An error occurred while loading this page. Please refresh the page.",this.fieldEmptyText="Field is required",this.formErrorText="Please correct the errors below to update your profile.",this.submissionSuccessText="Your profile has been successfully updated.",o(this)}disconnectedCallback(){}render(){const e=d()?function(e){return u({states:{success:!1,loading:!1,submitDisabled:!1,showCountry:!e.hideCountry,user:{id:"01",accountId:"111100000",firstName:"Joe",lastName:"Smith",email:"jsmith@gmail.com",countryCode:"CA"},text:{firstnametext:e.firstnametext,lastnametext:e.lastnametext,emailtext:e.emailtext,countrytext:e.countrytext,editProfileHeader:e.editProfileHeader,editProfileSubHeader:e.editProfileSubHeader,submitChangeButtonText:e.submitChangeButtonText,submissionSuccessText:e.submissionSuccessText,fieldEmptyText:e.fieldEmptyText},formState:{country:"Canada",firstName:"Joe",lastName:"Smith",errors:null,error:""}},callbacks:{onSubmit:e=>console.log(e),onChange:e=>console.log(e)}},e.demoData||{},{arrayMerge:(e,t)=>t})}(m(this)):function(e){const t=a(),[o,s]=r(!1),[d,u]=r(void 0),[m,c]=r(p),b=l(v,{},!(null==t?void 0:t.jwt)),[N,g]=n(h);return i((()=>{(null==g?void 0:g.loading)||((null==g?void 0:g.errors)?c((e=>{var t,r,i;return{...e,error:null===(i=null===(r=null===(t=null==g?void 0:g.errors)||void 0===t?void 0:t.response)||void 0===r?void 0:r.errors)||void 0===i?void 0:i[0].message}})):(u((e=>{var t;return{...e,...null===(t=null==g?void 0:g.data)||void 0===t?void 0:t.upsertUser}})),(null==g?void 0:g.data)&&s(!0)))}),[null==g?void 0:g.loading]),i((()=>{var e,t;u((e=>{var t;return{...e,...null===(t=null==b?void 0:b.data)||void 0===t?void 0:t.viewer}})),c({...p,...null===(e=b.data)||void 0===e?void 0:e.viewer,...null===(t=g.data)||void 0===t?void 0:t.upsertUser})}),[null==b?void 0:b.data]),i((()=>{var t,r;(null===(t=null==g?void 0:g.errors)||void 0===t?void 0:t.message)&&c({...null===(r=b.data)||void 0===r?void 0:r.viewer,error:e.networkRequestMessage})}),[null==g?void 0:g.errors]),{states:{success:o,loading:(null==b?void 0:b.loading)||g.loading,submitDisabled:!1,showCountry:!e.hideCountry,formState:m,user:d,text:{firstnametext:e.firstnametext,lastnametext:e.lastnametext,countrytext:e.countrytext,emailtext:e.emailtext,editProfileHeader:e.editProfileHeader,editProfileSubHeader:e.editProfileSubHeader,submitChangeButtonText:e.submitChangeButtonText}},callbacks:{onSubmit:()=>{if(s(!1),m.firstName&&m.lastName)return N({id:null==t?void 0:t.id,accountId:null==t?void 0:t.accountId,firstName:m.firstName,lastName:m.lastName}),void c((e=>({...e,errors:{},error:""})));const r={};m.firstName||(r.firstName={message:e.fieldEmptyText}),m.lastName||(r.lastName={message:e.fieldEmptyText}),f(r)||c((t=>({...t,error:e.formErrorText}))),c((e=>({...e,errors:r})))},onChange:e=>{const{name:t,value:r}=e.target;c((e=>({...e,[t]:r})))}}}}(m(this));return t(c,Object.assign({},e))}};export{b as sqm_portal_profile}
|