@saasquatch/mint-components 1.8.0-100 → 1.8.0-101
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/sqm-banking-info-form_16.cjs.entry.js +40 -27
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +8 -1
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +13 -14
- package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form-view.js +4 -0
- package/dist/collection/components/tax-and-cash/sqm-docusign-form/useDocusignForm.js +2 -18
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form.js +2 -2
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +2 -2
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.js +7 -7
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js +5 -7
- package/dist/collection/stories/PortalTemplates.stories.js +5 -0
- package/dist/esm/sqm-banking-info-form_16.entry.js +40 -27
- package/dist/esm/sqm-stencilbook.entry.js +8 -1
- package/dist/esm-es5/sqm-banking-info-form_16.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/p-321a6f30.entry.js +148 -0
- package/dist/mint-components/p-3b0c7a5e.system.entry.js +1 -0
- package/dist/mint-components/{p-18b77c5f.entry.js → p-55460d09.entry.js} +2 -2
- package/dist/mint-components/{p-4220a501.system.entry.js → p-64b56cdd.system.entry.js} +1 -1
- package/dist/mint-components/p-d5364cae.system.js +1 -1
- package/dist/types/stories/PortalTemplates.stories.d.ts +6 -0
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/package.json +1 -1
- package/dist/mint-components/p-b09a4429.entry.js +0 -148
- package/dist/mint-components/p-e4b434d2.system.entry.js +0 -1
|
@@ -1447,7 +1447,7 @@ function parseImpactThreshold(threshold) {
|
|
|
1447
1447
|
return parsed.toString();
|
|
1448
1448
|
}
|
|
1449
1449
|
function useBankingInfoForm(props) {
|
|
1450
|
-
var _a, _b, _c, _d, _e, _f, _g, _h
|
|
1450
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
1451
1451
|
const locale = index_module.N();
|
|
1452
1452
|
const user = index_module.H();
|
|
1453
1453
|
const formRef = stencilHooks_module.useRef(null);
|
|
@@ -1489,17 +1489,16 @@ function useBankingInfoForm(props) {
|
|
|
1489
1489
|
name,
|
|
1490
1490
|
};
|
|
1491
1491
|
};
|
|
1492
|
-
const
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
];
|
|
1492
|
+
const sortByName = (a, b) => a.name < b.name ? -1 : 1;
|
|
1493
|
+
const _topCountries = ["CA", "GB", "US"];
|
|
1494
|
+
const countries = Array.from(availableCountries)
|
|
1495
|
+
.map((c) => getCountryObj(c))
|
|
1496
|
+
.sort(sortByName)
|
|
1497
|
+
.reduce((prev, countryObj) => {
|
|
1498
|
+
if (_topCountries.includes(countryObj.code))
|
|
1499
|
+
return [countryObj, ...prev];
|
|
1500
|
+
return [...prev, countryObj];
|
|
1501
|
+
}, []);
|
|
1503
1502
|
const hasPayPal = !!(paymentOptions === null || paymentOptions === void 0 ? void 0 : paymentOptions.find((option) => option.defaultFinancePaymentMethodId === PAYPAL_PAYMENT_METHOD));
|
|
1504
1503
|
const paymentMethodChecked = !hasPayPal
|
|
1505
1504
|
? "toBankAccount"
|
|
@@ -1640,7 +1639,7 @@ function useBankingInfoForm(props) {
|
|
|
1640
1639
|
hideSteps: !!context.hideSteps,
|
|
1641
1640
|
saveDisabled: !paymentMethodChecked || !paymentScheduleChecked,
|
|
1642
1641
|
locale,
|
|
1643
|
-
isPartner: !!((
|
|
1642
|
+
isPartner: !!((_g = (_f = (_e = userData === null || userData === void 0 ? void 0 : userData.user) === null || _e === void 0 ? void 0 : _e.impactConnection) === null || _f === void 0 ? void 0 : _f.publisher) === null || _g === void 0 ? void 0 : _g.withdrawalSettings),
|
|
1644
1643
|
feeCap,
|
|
1645
1644
|
paymentMethodFeeLabel,
|
|
1646
1645
|
disabled: loading,
|
|
@@ -1659,7 +1658,7 @@ function useBankingInfoForm(props) {
|
|
|
1659
1658
|
currentPaymentOption,
|
|
1660
1659
|
bitset: (currentPaymentOption === null || currentPaymentOption === void 0 ? void 0 : currentPaymentOption.withdrawalSettingId) || 0,
|
|
1661
1660
|
currency,
|
|
1662
|
-
thresholds: ((
|
|
1661
|
+
thresholds: ((_h = currentPaymentOption === null || currentPaymentOption === void 0 ? void 0 : currentPaymentOption.thresholdOptions) === null || _h === void 0 ? void 0 : _h.split(",")) || [],
|
|
1663
1662
|
countries,
|
|
1664
1663
|
hasPayPal,
|
|
1665
1664
|
},
|
|
@@ -2203,15 +2202,27 @@ function useDocusignForm(props) {
|
|
|
2203
2202
|
fetchDocument();
|
|
2204
2203
|
}, [user, publisher, participantType]);
|
|
2205
2204
|
stencilHooks_module.useEffect(() => {
|
|
2206
|
-
|
|
2205
|
+
const onSubmit = async () => {
|
|
2206
|
+
try {
|
|
2207
|
+
setLoading(true);
|
|
2208
|
+
await refetch();
|
|
2209
|
+
// Skip banking info form if it already is saved
|
|
2210
|
+
setStep(context.overrideNextStep || !!(publisher === null || publisher === void 0 ? void 0 : publisher.withdrawalSettings)
|
|
2211
|
+
? "/dashboard"
|
|
2212
|
+
: "/4");
|
|
2213
|
+
}
|
|
2214
|
+
catch (e) {
|
|
2215
|
+
setErrors({ general: true });
|
|
2216
|
+
}
|
|
2217
|
+
finally {
|
|
2218
|
+
setLoading(false);
|
|
2219
|
+
}
|
|
2220
|
+
};
|
|
2207
2221
|
// Handled in view
|
|
2208
2222
|
if (DOCUSIGN_ERROR_STATES.includes(docusignStatus))
|
|
2209
2223
|
return;
|
|
2210
2224
|
if (DOCUSIGN_SUCCESS_STATES.includes(docusignStatus)) {
|
|
2211
|
-
|
|
2212
|
-
setStep(context.overrideNextStep || !!(publisher === null || publisher === void 0 ? void 0 : publisher.withdrawalSettings)
|
|
2213
|
-
? "/dashboard"
|
|
2214
|
-
: "/4");
|
|
2225
|
+
onSubmit();
|
|
2215
2226
|
}
|
|
2216
2227
|
}, [docusignStatus, refetch]);
|
|
2217
2228
|
const onBack = () => {
|
|
@@ -2503,10 +2514,14 @@ const DocusignFormView = (props) => {
|
|
|
2503
2514
|
index.h("p", { class: classes.BoldText }, text.participantType),
|
|
2504
2515
|
states.loading ? (index.h("sl-spinner", { style: { fontSize: "50px", margin: "40px" } })) : (index.h("div", { style: { display: "flex", flexDirection: "column" } },
|
|
2505
2516
|
index.h("sl-radio", { exportparts: "base: radio-base", value: "individualParticipant", name: "/participantType", checked: formState.participantType === "individualParticipant", disabled: states.disabled || states.participantTypeDisabled, onClick: () => {
|
|
2517
|
+
if (states.disabled || states.participantTypeDisabled)
|
|
2518
|
+
return;
|
|
2506
2519
|
callbacks.setParticipantType("individualParticipant");
|
|
2507
2520
|
} },
|
|
2508
2521
|
index.h("span", { class: classes.RadioText }, text.individualParticipant)),
|
|
2509
2522
|
index.h("sl-radio", { exportparts: "base: radio-base", value: "businessEntity", name: "/participantType", checked: formState.participantType === "businessEntity", disabled: states.disabled || states.participantTypeDisabled, onClick: () => {
|
|
2523
|
+
if (states.disabled || states.participantTypeDisabled)
|
|
2524
|
+
return;
|
|
2510
2525
|
callbacks.setParticipantType("businessEntity");
|
|
2511
2526
|
} },
|
|
2512
2527
|
index.h("span", { class: classes.RadioText }, text.businessEntity)))),
|
|
@@ -3157,7 +3172,7 @@ const IndirectTaxForm = class {
|
|
|
3157
3172
|
* Subtext for the option indicating registration for indirect tax in a different region
|
|
3158
3173
|
* @uiName Registered for indirect tax in a different region option sub-text
|
|
3159
3174
|
*/
|
|
3160
|
-
this.otherRegionSubtext = "If you represent a business based outside of the US may be registered.
|
|
3175
|
+
this.otherRegionSubtext = "If you represent a business based outside of the US you may be registered. If you’re not sure, contact our Support team to find out more.";
|
|
3161
3176
|
/**
|
|
3162
3177
|
* Text for the option indicating not being registered for indirect tax
|
|
3163
3178
|
* @uiName Not registered for indirect tax option text
|
|
@@ -4396,7 +4411,7 @@ const TaxAndCashMonolith = class {
|
|
|
4396
4411
|
* @uiName Registered for indirect tax in a different region option sub-text
|
|
4397
4412
|
* @uiGroup Step 2 Properties
|
|
4398
4413
|
*/
|
|
4399
|
-
this.step2_otherRegionSubtext = "If you represent a business based outside of the US may be registered.
|
|
4414
|
+
this.step2_otherRegionSubtext = "If you represent a business based outside of the US you may be registered. If you’re not sure, contact our Support team to find out more.";
|
|
4400
4415
|
/**
|
|
4401
4416
|
* Label text for the not registered radio button
|
|
4402
4417
|
* @uiName Not registered radio button label
|
|
@@ -5512,13 +5527,11 @@ function getCountryName(countryCode, locale) {
|
|
|
5512
5527
|
}).of([countryCode]);
|
|
5513
5528
|
}
|
|
5514
5529
|
function getSubRegionName(regionCode) {
|
|
5515
|
-
var _a
|
|
5516
|
-
// Impact adds an underscore to
|
|
5517
|
-
|
|
5518
|
-
return (_a = sqmInvoiceTableView.INDIRECT_TAX_SPAIN_REGIONS.find((r) => r.regionCode === "CANARYISLANDS")) === null || _a === void 0 ? void 0 : _a.displayName;
|
|
5519
|
-
}
|
|
5530
|
+
var _a;
|
|
5531
|
+
// Impact adds an underscore to some regions
|
|
5532
|
+
const standardCode = regionCode.replace("_", "");
|
|
5520
5533
|
const regions = [...sqmInvoiceTableView.INDIRECT_TAX_PROVINCES, ...sqmInvoiceTableView.INDIRECT_TAX_SPAIN_REGIONS];
|
|
5521
|
-
return (
|
|
5534
|
+
return (_a = regions.find((r) => r.regionCode === standardCode)) === null || _a === void 0 ? void 0 : _a.displayName;
|
|
5522
5535
|
}
|
|
5523
5536
|
function getIndirectTaxType(taxInformation) {
|
|
5524
5537
|
var _a;
|
|
@@ -9927,6 +9927,8 @@ const resetPasswordEmailTemplate = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.
|
|
|
9927
9927
|
|
|
9928
9928
|
const verifyEmailTemplate = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional //EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\n<html\n xmlns=\"http://www.w3.org/1999/xhtml\"\n xmlns:o=\"urn:schemas-microsoft-com:office:office\"\n xmlns:v=\"urn:schemas-microsoft-com:vml\"\n>\n <head>\n <!--[if gte mso 9\n ]><xml\n ><o:OfficeDocumentSettings\n ><o:AllowPNG /><o:PixelsPerInch\n >96</o:PixelsPerInch\n ></o:OfficeDocumentSettings\n ></xml\n ><!\n [endif]-->\n <meta content=\"text/html; charset=utf-8\" http-equiv=\"Content-Type\" />\n <meta content=\"width=device-width\" name=\"viewport\" />\n <!--[if !mso]><!-->\n <meta content=\"IE=edge\" http-equiv=\"X-UA-Compatible\" />\n <!--<![endif]-->\n <title></title>\n <!--[if !mso]><!-->\n <!--<![endif]-->\n <style type=\"text/css\">\n body {\n margin: 0;\n padding: 0;\n }\n\n table,\n td,\n tr {\n vertical-align: top;\n border-collapse: collapse;\n }\n\n * {\n line-height: inherit;\n }\n\n a[x-apple-data-detectors=\"true\"] {\n color: inherit !important;\n text-decoration: none !important;\n }\n </style>\n <style id=\"media-query\" type=\"text/css\">\n @media (max-width: 520px) {\n .block-grid,\n .col {\n min-width: 320px !important;\n max-width: 100% !important;\n display: block !important;\n }\n\n .block-grid {\n width: 100% !important;\n }\n\n .col {\n width: 100% !important;\n }\n\n .col_cont {\n margin: 0 auto;\n }\n\n img.fullwidth,\n img.fullwidthOnMobile {\n max-width: 100% !important;\n }\n\n .no-stack .col {\n min-width: 0 !important;\n display: table-cell !important;\n }\n\n .no-stack.two-up .col {\n width: 50% !important;\n }\n\n .no-stack .col.num2 {\n width: 16.6% !important;\n }\n\n .no-stack .col.num3 {\n width: 25% !important;\n }\n\n .no-stack .col.num4 {\n width: 33% !important;\n }\n\n .no-stack .col.num5 {\n width: 41.6% !important;\n }\n\n .no-stack .col.num6 {\n width: 50% !important;\n }\n\n .no-stack .col.num7 {\n width: 58.3% !important;\n }\n\n .no-stack .col.num8 {\n width: 66.6% !important;\n }\n\n .no-stack .col.num9 {\n width: 75% !important;\n }\n\n .no-stack .col.num10 {\n width: 83.3% !important;\n }\n\n .video-block {\n max-width: none !important;\n }\n\n .mobile_hide {\n min-height: 0px;\n max-height: 0px;\n max-width: 0px;\n display: none;\n overflow: hidden;\n font-size: 0px;\n }\n\n .desktop_hide {\n display: block !important;\n max-height: none !important;\n }\n }\n </style>\n <style id=\"icon-media-query\" type=\"text/css\">\n @media (max-width: 520px) {\n .icons-inner {\n text-align: center;\n }\n\n .icons-inner td {\n margin: 0 auto;\n }\n }\n </style>\n </head>\n <body\n class=\"clean-body\"\n style=\"\n margin: 0;\n padding: 0;\n -webkit-text-size-adjust: 100%;\n background-color: #ffffff;\n \"\n >\n <!--[if IE]><div class=\"ie-browser\"><![endif]-->\n <table\n bgcolor=\"#FFFFFF\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n class=\"nl-container\"\n role=\"presentation\"\n style=\"\n table-layout: fixed;\n vertical-align: top;\n min-width: 320px;\n border-spacing: 0;\n border-collapse: collapse;\n mso-table-lspace: 0pt;\n mso-table-rspace: 0pt;\n background-color: #ffffff;\n width: 100%;\n \"\n valign=\"top\"\n width=\"100%\"\n >\n <tbody>\n <tr style=\"vertical-align: top\" valign=\"top\">\n <td style=\"word-break: break-word; vertical-align: top\" valign=\"top\">\n <!--[if (mso)|(IE)]><table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td align=\"center\" style=\"background-color:#FFFFFF\"><![endif]-->\n <div style=\"background-color: transparent\">\n <div\n class=\"block-grid\"\n style=\"\n min-width: 320px;\n max-width: 500px;\n overflow-wrap: break-word;\n word-wrap: break-word;\n word-break: break-word;\n margin: 0 auto;\n background-color: transparent;\n \"\n >\n <div\n style=\"\n border-collapse: collapse;\n display: table;\n width: 100%;\n background-color: transparent;\n \"\n >\n <!--[if (mso)|(IE)]><table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"background-color:transparent;\"><tr><td align=\"center\"><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"width:500px\"><tr class=\"layout-full-width\" style=\"background-color:transparent\"><![endif]-->\n <!--[if (mso)|(IE)]><td align=\"center\" width=\"500\" style=\"background-color:transparent;width:500px; border-top: 0px solid transparent; border-left: 0px solid transparent; border-bottom: 0px solid transparent; border-right: 0px solid transparent;\" valign=\"top\"><table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td style=\"padding-right: 0px; padding-left: 0px; padding-top:5px; padding-bottom:5px;\"><![endif]-->\n <div\n class=\"col num12\"\n style=\"\n min-width: 320px;\n max-width: 500px;\n display: table-cell;\n vertical-align: top;\n width: 500px;\n \"\n >\n <div class=\"col_cont\" style=\"width: 100% !important\">\n <!--[if (!mso)&(!IE)]><!-->\n <div\n style=\"\n border-top: 0px solid transparent;\n border-left: 0px solid transparent;\n border-bottom: 0px solid transparent;\n border-right: 0px solid transparent;\n padding-top: 5px;\n padding-bottom: 5px;\n padding-right: 0px;\n padding-left: 0px;\n \"\n >\n <!--<![endif]-->\n <table\n cellpadding=\"0\"\n cellspacing=\"0\"\n role=\"presentation\"\n style=\"\n table-layout: fixed;\n vertical-align: top;\n border-spacing: 0;\n border-collapse: collapse;\n mso-table-lspace: 0pt;\n mso-table-rspace: 0pt;\n \"\n valign=\"top\"\n width=\"100%\"\n >\n <tr style=\"vertical-align: top\" valign=\"top\">\n <td\n align=\"center\"\n style=\"\n word-break: break-word;\n vertical-align: top;\n padding-bottom: 20px;\n padding-left: 10px;\n padding-right: 10px;\n padding-top: 10px;\n text-align: center;\n width: 100%;\n \"\n valign=\"top\"\n width=\"100%\"\n >\n <h1\n style=\"\n color: #444445;\n direction: ltr;\n font-family: 'Helvetica Neue', Helvetica,\n Arial, sans-serif;\n font-size: 20px;\n font-weight: normal;\n letter-spacing: normal;\n line-height: 120%;\n text-align: left;\n margin-top: 0;\n margin-bottom: 0;\n \"\n >\n <strong>Verify your email address</strong>\n </h1>\n </td>\n </tr>\n </table>\n <!--[if mso]><table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td style=\"padding-right: 10px; padding-left: 10px; padding-top: 10px; padding-bottom: 10px; font-family: Arial, sans-serif\"><![endif]-->\n <div\n style=\"\n color: #444445;\n font-family: Arial, Helvetica Neue, Helvetica,\n sans-serif;\n line-height: 1.8;\n padding-top: 10px;\n padding-right: 10px;\n padding-bottom: 10px;\n padding-left: 10px;\n \"\n >\n <div\n class=\"txtTinyMce-wrapper\"\n style=\"\n font-size: 14px;\n line-height: 1.8;\n color: #444445;\n font-family: Arial, Helvetica Neue, Helvetica,\n sans-serif;\n mso-line-height-alt: 25px;\n \"\n >\n <p\n style=\"\n margin: 0;\n font-size: 14px;\n line-height: 1.8;\n word-break: break-word;\n mso-line-height-alt: 25px;\n margin-top: 0;\n margin-bottom: 0;\n \"\n >\n <span style=\"font-size: 14px\"\n >Thank you for signing up! Please click the button below\n to verify your email address.</span\n >\n </p>\n </div>\n </div>\n <!--[if mso]></td></tr></table><![endif]-->\n <div\n align=\"center\"\n class=\"button-container\"\n style=\"\n padding-top: 10px;\n padding-right: 10px;\n padding-bottom: 10px;\n padding-left: 10px;\n \"\n >\n <!--[if mso]><table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border-spacing: 0; border-collapse: collapse; mso-table-lspace:0pt; mso-table-rspace:0pt;\"><tr><td style=\"padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px\" align=\"center\"><v:roundrect xmlns:v=\"urn:schemas-microsoft-com:vml\" xmlns:w=\"urn:schemas-microsoft-com:office:word\" target=\"_blank\" href={{validationLink}} style=\"height:31.5pt;width:390pt;v-text-anchor:middle;\" arcsize=\"12%\" stroke=\"false\" fillcolor=\"#2270ee\"><w:anchorlock/><v:textbox inset=\"0,0,0,0\"><center style=\"color:#ffffff; font-family:Arial, sans-serif; font-size:14px\"><!\n [endif]--><a\n href={{validationLink}}\n\t\t\t\t\t\t\ttarget=\"_blank\"\n style=\"\n -webkit-text-size-adjust: none;\n text-decoration: none;\n display: block;\n color: #ffffff;\n background-color: #2270ee;\n border-radius: 5px;\n -webkit-border-radius: 5px;\n -moz-border-radius: 5px;\n width: 100%;\n width: calc(100% - 2px);\n border-top: 1px solid #2270ee;\n border-right: 1px solid #2270ee;\n border-bottom: 1px solid #2270ee;\n border-left: 1px solid #2270ee;\n padding-top: 5px;\n padding-bottom: 5px;\n font-family: 'Helvetica Neue', Helvetica, Arial,\n sans-serif;\n text-align: center;\n mso-border-alt: none;\n word-break: keep-all;\n \"\n target=\"_blank\"\n ><span\n style=\"\n padding-left: 20px;\n padding-right: 20px;\n font-size: 14px;\n display: inline-block;\n letter-spacing: undefined;\n \"\n ><span\n style=\"\n font-size: 16px;\n line-height: 2;\n word-break: break-word;\n mso-line-height-alt: 32px;\n \"\n ><span\n style=\"font-size: 14px; line-height: 28px\"\n >Verify Email</span\n ></span\n ></span\n ></a\n >\n <!--[if mso]></center></v:textbox></v:roundrect></td></tr></table><![endif]-->\n </div>\n <!--<![endif]-->\n </div>\n </div>\n <!--[if (mso)|(IE)]></td></tr></table><![endif]-->\n <!--[if (mso)|(IE)]></td></tr></table></td></tr></table><![endif]-->\n </div>\n </div>\n </div>\n <!--[if (mso)|(IE)]></td></tr></table><![endif]-->\n </td>\n </tr>\n </tbody>\n </table>\n <!--[if (IE)]></div><![endif]-->\n </body>\n</html>";
|
|
9929
9929
|
|
|
9930
|
+
const taxPayoutReminderEmailTemplate = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional //EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\n<html\n xmlns=\"http://www.w3.org/1999/xhtml\"\n xmlns:o=\"urn:schemas-microsoft-com:office:office\"\n xmlns:v=\"urn:schemas-microsoft-com:vml\"\n>\n <head>\n <!--[if gte mso 9\n ]><xml\n ><o:OfficeDocumentSettings\n ><o:AllowPNG /><o:PixelsPerInch\n >96</o:PixelsPerInch\n ></o:OfficeDocumentSettings\n ></xml\n ><!\n [endif]-->\n <meta content=\"text/html; charset=utf-8\" http-equiv=\"Content-Type\" />\n <meta content=\"width=device-width\" name=\"viewport\" />\n <!--[if !mso]><!-->\n <meta content=\"IE=edge\" http-equiv=\"X-UA-Compatible\" />\n <!--<![endif]-->\n <title></title>\n <!--[if !mso]><!-->\n <!--<![endif]-->\n <style type=\"text/css\">\n body {\n margin: 0;\n padding: 0;\n }\n\n table,\n td,\n tr {\n vertical-align: top;\n border-collapse: collapse;\n }\n\n * {\n line-height: inherit;\n }\n\n a[x-apple-data-detectors=\"true\"] {\n color: inherit !important;\n text-decoration: none !important;\n }\n </style>\n <style id=\"media-query\" type=\"text/css\">\n @media (max-width: 520px) {\n .block-grid,\n .col {\n min-width: 320px !important;\n max-width: 100% !important;\n display: block !important;\n }\n\n .block-grid {\n width: 100% !important;\n }\n\n .col {\n width: 100% !important;\n }\n\n .col_cont {\n margin: 0 auto;\n }\n\n img.fullwidth,\n img.fullwidthOnMobile {\n max-width: 100% !important;\n }\n\n .no-stack .col {\n min-width: 0 !important;\n display: table-cell !important;\n }\n\n .no-stack.two-up .col {\n width: 50% !important;\n }\n\n .no-stack .col.num2 {\n width: 16.6% !important;\n }\n\n .no-stack .col.num3 {\n width: 25% !important;\n }\n\n .no-stack .col.num4 {\n width: 33% !important;\n }\n\n .no-stack .col.num5 {\n width: 41.6% !important;\n }\n\n .no-stack .col.num6 {\n width: 50% !important;\n }\n\n .no-stack .col.num7 {\n width: 58.3% !important;\n }\n\n .no-stack .col.num8 {\n width: 66.6% !important;\n }\n\n .no-stack .col.num9 {\n width: 75% !important;\n }\n\n .no-stack .col.num10 {\n width: 83.3% !important;\n }\n\n .video-block {\n max-width: none !important;\n }\n\n .mobile_hide {\n min-height: 0px;\n max-height: 0px;\n max-width: 0px;\n display: none;\n overflow: hidden;\n font-size: 0px;\n }\n\n .desktop_hide {\n display: block !important;\n max-height: none !important;\n }\n }\n </style>\n <style id=\"icon-media-query\" type=\"text/css\">\n @media (max-width: 520px) {\n .icons-inner {\n text-align: center;\n }\n\n .icons-inner td {\n margin: 0 auto;\n }\n }\n </style>\n </head>\n <body\n class=\"clean-body\"\n style=\"\n margin: 0;\n padding: 0;\n -webkit-text-size-adjust: 100%;\n background-color: #ffffff;\n \"\n >\n <!--[if IE]><div class=\"ie-browser\"><![endif]-->\n <table\n bgcolor=\"#FFFFFF\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n class=\"nl-container\"\n role=\"presentation\"\n style=\"\n table-layout: fixed;\n vertical-align: top;\n min-width: 320px;\n border-spacing: 0;\n border-collapse: collapse;\n mso-table-lspace: 0pt;\n mso-table-rspace: 0pt;\n background-color: #ffffff;\n width: 100%;\n \"\n valign=\"top\"\n width=\"100%\"\n >\n <tbody>\n <tr style=\"vertical-align: top\" valign=\"top\">\n <td style=\"word-break: break-word; vertical-align: top\" valign=\"top\">\n <!--[if (mso)|(IE)]><table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td align=\"center\" style=\"background-color:#FFFFFF\"><![endif]-->\n <div style=\"background-color: transparent\">\n <div\n class=\"block-grid\"\n style=\"\n min-width: 320px;\n max-width: 500px;\n overflow-wrap: break-word;\n word-wrap: break-word;\n word-break: break-word;\n margin: 0 auto;\n background-color: transparent;\n \"\n >\n <div\n style=\"\n border-collapse: collapse;\n display: table;\n width: 100%;\n background-color: transparent;\n \"\n >\n <!--[if (mso)|(IE)]><table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"background-color:transparent;\"><tr><td align=\"center\"><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"width:500px\"><tr class=\"layout-full-width\" style=\"background-color:transparent\"><![endif]-->\n <!--[if (mso)|(IE)]><td align=\"center\" width=\"500\" style=\"background-color:transparent;width:500px; border-top: 0px solid transparent; border-left: 0px solid transparent; border-bottom: 0px solid transparent; border-right: 0px solid transparent;\" valign=\"top\"><table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td style=\"padding-right: 0px; padding-left: 0px; padding-top:5px; padding-bottom:5px;\"><![endif]-->\n <div\n class=\"col num12\"\n style=\"\n min-width: 320px;\n max-width: 500px;\n display: table-cell;\n vertical-align: top;\n width: 500px;\n \"\n >\n <div class=\"col_cont\" style=\"width: 100% !important\">\n <!--[if (!mso)&(!IE)]><!-->\n <div\n style=\"\n border-top: 0px solid transparent;\n border-left: 0px solid transparent;\n border-bottom: 0px solid transparent;\n border-right: 0px solid transparent;\n padding-top: 5px;\n padding-bottom: 5px;\n padding-right: 0px;\n padding-left: 0px;\n \"\n >\n <!--<![endif]-->\n <table\n cellpadding=\"0\"\n cellspacing=\"0\"\n role=\"presentation\"\n style=\"\n table-layout: fixed;\n vertical-align: top;\n border-spacing: 0;\n border-collapse: collapse;\n mso-table-lspace: 0pt;\n mso-table-rspace: 0pt;\n \"\n valign=\"top\"\n width=\"100%\"\n >\n <tr style=\"vertical-align: top\" valign=\"top\">\n <td\n align=\"center\"\n style=\"\n word-break: break-word;\n vertical-align: top;\n padding-bottom: 20px;\n padding-left: 10px;\n padding-right: 10px;\n padding-top: 10px;\n text-align: center;\n width: 100%;\n \"\n valign=\"top\"\n width=\"100%\"\n >\n <h1\n style=\"\n color: #444445;\n direction: ltr;\n font-family: 'Helvetica Neue', Helvetica,\n Arial, sans-serif;\n font-size: 20px;\n font-weight: normal;\n letter-spacing: normal;\n line-height: 120%;\n text-align: left;\n margin-top: 0;\n margin-bottom: 0;\n \"\n >\n <strong>Submit your tax and payout info to receive your rewards</strong>\n </h1>\n </td>\n </tr>\n </table>\n <!--[if mso]><table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td style=\"padding-right: 10px; padding-left: 10px; padding-top: 10px; padding-bottom: 10px; font-family: Arial, sans-serif\"><![endif]-->\n <div\n style=\"\n color: #444445;\n font-family: Arial, Helvetica Neue, Helvetica,\n sans-serif;\n line-height: 1.8;\n padding-top: 10px;\n padding-right: 10px;\n padding-bottom: 10px;\n padding-left: 10px;\n \"\n >\n <div\n class=\"txtTinyMce-wrapper\"\n style=\"\n font-size: 14px;\n line-height: 1.8;\n color: #444445;\n font-family: Arial, Helvetica Neue, Helvetica,\n sans-serif;\n mso-line-height-alt: 25px;\n \"\n >\n <p\n style=\"\n margin: 0;\n font-size: 14px;\n line-height: 1.8;\n word-break: break-word;\n mso-line-height-alt: 25px;\n margin-top: 0;\n margin-bottom: 0;\n \"\n >\n <span style=\"font-size: 14px\"\n >Congratulations! You earned a cash reward in our {{programName}}. To\n receive your reward payment, log in to your account and submit your\n tax and payout information.</span\n >\n </p>\n </div>\n </div>\n <!--[if mso]></td></tr></table><![endif]-->\n <div\n align=\"center\"\n class=\"button-container\"\n style=\"\n padding-top: 10px;\n padding-right: 10px;\n padding-bottom: 10px;\n padding-left: 10px;\n \"\n >\n <!--[if mso]><table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border-spacing: 0; border-collapse: collapse; mso-table-lspace:0pt; mso-table-rspace:0pt;\"><tr><td style=\"padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px\" align=\"center\"><v:roundrect xmlns:v=\"urn:schemas-microsoft-com:vml\" xmlns:w=\"urn:schemas-microsoft-com:office:word\" target=\"_blank\" href={{validationLink}} style=\"height:31.5pt;width:390pt;v-text-anchor:middle;\" arcsize=\"12%\" stroke=\"false\" fillcolor=\"#2270ee\"><w:anchorlock/><v:textbox inset=\"0,0,0,0\"><center style=\"color:#ffffff; font-family:Arial, sans-serif; font-size:14px\"><!\n [endif]--><a\n href={{loginLink}}\n\t\t\t\t\t\t\ttarget=\"_blank\"\n style=\"\n -webkit-text-size-adjust: none;\n text-decoration: none;\n display: block;\n color: #ffffff;\n background-color: #2270ee;\n border-radius: 5px;\n -webkit-border-radius: 5px;\n -moz-border-radius: 5px;\n width: 100%;\n width: calc(100% - 2px);\n border-top: 1px solid #2270ee;\n border-right: 1px solid #2270ee;\n border-bottom: 1px solid #2270ee;\n border-left: 1px solid #2270ee;\n padding-top: 5px;\n padding-bottom: 5px;\n font-family: 'Helvetica Neue', Helvetica, Arial,\n sans-serif;\n text-align: center;\n mso-border-alt: none;\n word-break: keep-all;\n \"\n target=\"_blank\"\n ><span\n style=\"\n padding-left: 20px;\n padding-right: 20px;\n font-size: 14px;\n display: inline-block;\n letter-spacing: undefined;\n \"\n ><span\n style=\"\n font-size: 16px;\n line-height: 2;\n word-break: break-word;\n mso-line-height-alt: 32px;\n \"\n ><span\n style=\"font-size: 14px; line-height: 28px\"\n >Log In</span\n ></span\n ></span\n ></a\n >\n <!--[if mso]></center></v:textbox></v:roundrect></td></tr></table><![endif]-->\n </div>\n <!--<![endif]-->\n </div>\n </div>\n <!--[if (mso)|(IE)]></td></tr></table><![endif]-->\n <!--[if (mso)|(IE)]></td></tr></table></td></tr></table><![endif]-->\n </div>\n </div>\n </div>\n <!--[if (mso)|(IE)]></td></tr></table><![endif]-->\n </td>\n </tr>\n </tbody>\n </table>\n <!--[if (IE)]></div><![endif]-->\n </body>\n</html>";
|
|
9931
|
+
|
|
9930
9932
|
const loginTemplate = "<sqm-hero background=\"https://images.unsplash.com/photo-1599676821464-3555954838dc?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=1939&q=80\">\n <sqm-portal-login></sqm-portal-login>\n</sqm-hero>\n";
|
|
9931
9933
|
|
|
9932
9934
|
const registerTemplate = "<sqm-hero\n background=\"https://images.unsplash.com/photo-1599676821464-3555954838dc?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=1939&q=80\"\n>\n <sqm-portal-register>\n <sqm-name-fields slot=\"formData\"></sqm-name-fields>\n </sqm-portal-register>\n</sqm-hero>\n";
|
|
@@ -10037,6 +10039,10 @@ const VerifyEmail = createHookStory(() => {
|
|
|
10037
10039
|
const { states, callbacks } = useTemplate$2(verifyEmailTemplate);
|
|
10038
10040
|
return index.h(TemplateView$1, { states: states, callbacks: callbacks });
|
|
10039
10041
|
});
|
|
10042
|
+
const taxPayoutReminderEmail = createHookStory(() => {
|
|
10043
|
+
const { states, callbacks } = useTemplate$2(taxPayoutReminderEmailTemplate);
|
|
10044
|
+
return index.h(TemplateView$1, { states: states, callbacks: callbacks });
|
|
10045
|
+
});
|
|
10040
10046
|
|
|
10041
10047
|
const PortalTemplates = /*#__PURE__*/Object.freeze({
|
|
10042
10048
|
__proto__: null,
|
|
@@ -10057,7 +10063,8 @@ const PortalTemplates = /*#__PURE__*/Object.freeze({
|
|
|
10057
10063
|
EmailVerified: EmailVerified,
|
|
10058
10064
|
Widget: Widget$1,
|
|
10059
10065
|
ResetPasswordEmail: ResetPasswordEmail,
|
|
10060
|
-
VerifyEmail: VerifyEmail
|
|
10066
|
+
VerifyEmail: VerifyEmail,
|
|
10067
|
+
taxPayoutReminderEmail: taxPayoutReminderEmail
|
|
10061
10068
|
});
|
|
10062
10069
|
|
|
10063
10070
|
const ProgramMenu_stories = {
|
|
@@ -268,7 +268,7 @@ function parseImpactThreshold(threshold) {
|
|
|
268
268
|
return parsed.toString();
|
|
269
269
|
}
|
|
270
270
|
export function useBankingInfoForm(props) {
|
|
271
|
-
var _a, _b, _c, _d, _e, _f, _g, _h
|
|
271
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
272
272
|
const locale = useLocale();
|
|
273
273
|
const user = useUserIdentity();
|
|
274
274
|
const formRef = useRef(null);
|
|
@@ -310,17 +310,16 @@ export function useBankingInfoForm(props) {
|
|
|
310
310
|
name,
|
|
311
311
|
};
|
|
312
312
|
};
|
|
313
|
-
const
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
];
|
|
313
|
+
const sortByName = (a, b) => a.name < b.name ? -1 : 1;
|
|
314
|
+
const _topCountries = ["CA", "GB", "US"];
|
|
315
|
+
const countries = Array.from(availableCountries)
|
|
316
|
+
.map((c) => getCountryObj(c))
|
|
317
|
+
.sort(sortByName)
|
|
318
|
+
.reduce((prev, countryObj) => {
|
|
319
|
+
if (_topCountries.includes(countryObj.code))
|
|
320
|
+
return [countryObj, ...prev];
|
|
321
|
+
return [...prev, countryObj];
|
|
322
|
+
}, []);
|
|
324
323
|
const hasPayPal = !!(paymentOptions === null || paymentOptions === void 0 ? void 0 : paymentOptions.find((option) => option.defaultFinancePaymentMethodId === PAYPAL_PAYMENT_METHOD));
|
|
325
324
|
const paymentMethodChecked = !hasPayPal
|
|
326
325
|
? "toBankAccount"
|
|
@@ -461,7 +460,7 @@ export function useBankingInfoForm(props) {
|
|
|
461
460
|
hideSteps: !!context.hideSteps,
|
|
462
461
|
saveDisabled: !paymentMethodChecked || !paymentScheduleChecked,
|
|
463
462
|
locale,
|
|
464
|
-
isPartner: !!((
|
|
463
|
+
isPartner: !!((_g = (_f = (_e = userData === null || userData === void 0 ? void 0 : userData.user) === null || _e === void 0 ? void 0 : _e.impactConnection) === null || _f === void 0 ? void 0 : _f.publisher) === null || _g === void 0 ? void 0 : _g.withdrawalSettings),
|
|
465
464
|
feeCap,
|
|
466
465
|
paymentMethodFeeLabel,
|
|
467
466
|
disabled: loading,
|
|
@@ -480,7 +479,7 @@ export function useBankingInfoForm(props) {
|
|
|
480
479
|
currentPaymentOption,
|
|
481
480
|
bitset: (currentPaymentOption === null || currentPaymentOption === void 0 ? void 0 : currentPaymentOption.withdrawalSettingId) || 0,
|
|
482
481
|
currency,
|
|
483
|
-
thresholds: ((
|
|
482
|
+
thresholds: ((_h = currentPaymentOption === null || currentPaymentOption === void 0 ? void 0 : currentPaymentOption.thresholdOptions) === null || _h === void 0 ? void 0 : _h.split(",")) || [],
|
|
484
483
|
countries,
|
|
485
484
|
hasPayPal,
|
|
486
485
|
},
|
|
@@ -165,10 +165,14 @@ export const DocusignFormView = (props) => {
|
|
|
165
165
|
h("p", { class: classes.BoldText }, text.participantType),
|
|
166
166
|
states.loading ? (h("sl-spinner", { style: { fontSize: "50px", margin: "40px" } })) : (h("div", { style: { display: "flex", flexDirection: "column" } },
|
|
167
167
|
h("sl-radio", { exportparts: "base: radio-base", value: "individualParticipant", name: "/participantType", checked: formState.participantType === "individualParticipant", disabled: states.disabled || states.participantTypeDisabled, onClick: () => {
|
|
168
|
+
if (states.disabled || states.participantTypeDisabled)
|
|
169
|
+
return;
|
|
168
170
|
callbacks.setParticipantType("individualParticipant");
|
|
169
171
|
} },
|
|
170
172
|
h("span", { class: classes.RadioText }, text.individualParticipant)),
|
|
171
173
|
h("sl-radio", { exportparts: "base: radio-base", value: "businessEntity", name: "/participantType", checked: formState.participantType === "businessEntity", disabled: states.disabled || states.participantTypeDisabled, onClick: () => {
|
|
174
|
+
if (states.disabled || states.participantTypeDisabled)
|
|
175
|
+
return;
|
|
172
176
|
callbacks.setParticipantType("businessEntity");
|
|
173
177
|
} },
|
|
174
178
|
h("span", { class: classes.RadioText }, text.businessEntity)))),
|
|
@@ -84,22 +84,10 @@ export function useDocusignForm(props) {
|
|
|
84
84
|
fetchDocument();
|
|
85
85
|
}, [user, publisher, participantType]);
|
|
86
86
|
useEffect(() => {
|
|
87
|
-
// TODO: Determine if check is required
|
|
88
87
|
const onSubmit = async () => {
|
|
89
|
-
var _a, _b, _c, _d, _e;
|
|
90
88
|
try {
|
|
91
89
|
setLoading(true);
|
|
92
|
-
|
|
93
|
-
if ((_a = result) === null || _a === void 0 ? void 0 : _a.message)
|
|
94
|
-
throw new Error();
|
|
95
|
-
const publisher = (_d = (_c = (_b = result) === null || _b === void 0 ? void 0 : _b.user) === null || _c === void 0 ? void 0 : _c.impactConnection) === null || _d === void 0 ? void 0 : _d.publisher;
|
|
96
|
-
const status = (_e = publisher === null || publisher === void 0 ? void 0 : publisher.currentTaxDocument) === null || _e === void 0 ? void 0 : _e.status;
|
|
97
|
-
// Throw an error if submission didn't actually save a tax document.
|
|
98
|
-
if (!status)
|
|
99
|
-
throw new Error();
|
|
100
|
-
if (status === "NOT_VERIFIED" || status === "ACTIVE") {
|
|
101
|
-
console.debug("Document has been registered as submitted");
|
|
102
|
-
}
|
|
90
|
+
await refetch();
|
|
103
91
|
// Skip banking info form if it already is saved
|
|
104
92
|
setStep(context.overrideNextStep || !!(publisher === null || publisher === void 0 ? void 0 : publisher.withdrawalSettings)
|
|
105
93
|
? "/dashboard"
|
|
@@ -112,15 +100,11 @@ export function useDocusignForm(props) {
|
|
|
112
100
|
setLoading(false);
|
|
113
101
|
}
|
|
114
102
|
};
|
|
115
|
-
console.log({ DOCUSIGN_SUCCESS_STATES, docusignStatus });
|
|
116
103
|
// Handled in view
|
|
117
104
|
if (DOCUSIGN_ERROR_STATES.includes(docusignStatus))
|
|
118
105
|
return;
|
|
119
106
|
if (DOCUSIGN_SUCCESS_STATES.includes(docusignStatus)) {
|
|
120
|
-
|
|
121
|
-
setStep(context.overrideNextStep || !!(publisher === null || publisher === void 0 ? void 0 : publisher.withdrawalSettings)
|
|
122
|
-
? "/dashboard"
|
|
123
|
-
: "/4");
|
|
107
|
+
onSubmit();
|
|
124
108
|
}
|
|
125
109
|
}, [docusignStatus, refetch]);
|
|
126
110
|
const onBack = () => {
|
package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form.js
CHANGED
|
@@ -50,7 +50,7 @@ export class IndirectTaxForm {
|
|
|
50
50
|
* Subtext for the option indicating registration for indirect tax in a different region
|
|
51
51
|
* @uiName Registered for indirect tax in a different region option sub-text
|
|
52
52
|
*/
|
|
53
|
-
this.otherRegionSubtext = "If you represent a business based outside of the US may be registered.
|
|
53
|
+
this.otherRegionSubtext = "If you represent a business based outside of the US you may be registered. If you’re not sure, contact our Support team to find out more.";
|
|
54
54
|
/**
|
|
55
55
|
* Text for the option indicating not being registered for indirect tax
|
|
56
56
|
* @uiName Not registered for indirect tax option text
|
|
@@ -360,7 +360,7 @@ export class IndirectTaxForm {
|
|
|
360
360
|
},
|
|
361
361
|
"attribute": "other-region-subtext",
|
|
362
362
|
"reflect": false,
|
|
363
|
-
"defaultValue": "\"If you represent a business based outside of the US may be registered.
|
|
363
|
+
"defaultValue": "\"If you represent a business based outside of the US you may be registered. If you\u2019re not sure, contact our Support team to find out more.\""
|
|
364
364
|
},
|
|
365
365
|
"notRegistered": {
|
|
366
366
|
"type": "string",
|
|
@@ -124,7 +124,7 @@ export class TaxAndCashMonolith {
|
|
|
124
124
|
* @uiName Registered for indirect tax in a different region option sub-text
|
|
125
125
|
* @uiGroup Step 2 Properties
|
|
126
126
|
*/
|
|
127
|
-
this.step2_otherRegionSubtext = "If you represent a business based outside of the US may be registered.
|
|
127
|
+
this.step2_otherRegionSubtext = "If you represent a business based outside of the US you may be registered. If you’re not sure, contact our Support team to find out more.";
|
|
128
128
|
/**
|
|
129
129
|
* Label text for the not registered radio button
|
|
130
130
|
* @uiName Not registered radio button label
|
|
@@ -1346,7 +1346,7 @@ export class TaxAndCashMonolith {
|
|
|
1346
1346
|
},
|
|
1347
1347
|
"attribute": "step-2_other-region-subtext",
|
|
1348
1348
|
"reflect": false,
|
|
1349
|
-
"defaultValue": "\"If you represent a business based outside of the US may be registered.
|
|
1349
|
+
"defaultValue": "\"If you represent a business based outside of the US you may be registered. If you\u2019re not sure, contact our Support team to find out more.\""
|
|
1350
1350
|
},
|
|
1351
1351
|
"step2_notRegistered": {
|
|
1352
1352
|
"type": "string",
|
|
@@ -22,8 +22,8 @@ export function useTaxAndCash() {
|
|
|
22
22
|
const host = useHost();
|
|
23
23
|
function setupDemo() {
|
|
24
24
|
// coleton
|
|
25
|
-
const id = "
|
|
26
|
-
const accountId = "
|
|
25
|
+
const id = "bd5a0bc8f8c82faa4f37f882ca5839910d6e4524597f3c3398d41d920bed8fc9";
|
|
26
|
+
const accountId = "bd5a0bc8f8c82faa4f37f882ca5839910d6e4524597f3c3398d41d920bed8fc9";
|
|
27
27
|
// andy3
|
|
28
28
|
// const id =
|
|
29
29
|
// "e061ee21b45eff8ada22845d441c6a2cd7190af1718a55452ad2d44b020915a7";
|
|
@@ -42,12 +42,12 @@ export function useTaxAndCash() {
|
|
|
42
42
|
// "3e0fab4f3e7c7cd3ee971b0c0e9a4ece4061349c837f24c71582330842fc8462";
|
|
43
43
|
// const accountId =
|
|
44
44
|
// "3e0fab4f3e7c7cd3ee971b0c0e9a4ece4061349c837f24c71582330842fc8462";
|
|
45
|
-
const programId = "22514";
|
|
46
|
-
|
|
45
|
+
// const programId = "22514";
|
|
46
|
+
const programId = "22999";
|
|
47
47
|
//@ts-ignore
|
|
48
48
|
window.widgetIdent = {
|
|
49
|
-
tenantAlias: "aprh0cfq6y8tk",
|
|
50
|
-
|
|
49
|
+
// tenantAlias: "aprh0cfq6y8tk",
|
|
50
|
+
tenantAlias: "aswi7zpxl6rjp",
|
|
51
51
|
appDomain: "https://staging.referralsaasquatch.com",
|
|
52
52
|
programId,
|
|
53
53
|
};
|
|
@@ -56,7 +56,7 @@ export function useTaxAndCash() {
|
|
|
56
56
|
setUserIdentity({
|
|
57
57
|
accountId,
|
|
58
58
|
id,
|
|
59
|
-
jwt: "
|
|
59
|
+
jwt: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IklSZkFUVEdOZXRqUDUwNzYxMDNERjVub0d0TDRnQ0hjYjEifQ.eyJ1c2VyIjp7ImlkIjoiYmQ1YTBiYzhmOGM4MmZhYTRmMzdmODgyY2E1ODM5OTEwZDZlNDUyNDU5N2YzYzMzOThkNDFkOTIwYmVkOGZjOSIsImFjY291bnRJZCI6ImJkNWEwYmM4ZjhjODJmYWE0ZjM3Zjg4MmNhNTgzOTkxMGQ2ZTQ1MjQ1OTdmM2MzMzk4ZDQxZDkyMGJlZDhmYzkiLCJlbWFpbCI6ImNvbGV0b24uYW5uZXR0K3Rlc3RwYXlvdXRAaW1wYWN0LmNvbSJ9fQ.pUJqd22SSowAvOLFF_2U13qsMGW3eOGxKmohWh0Bs4I",
|
|
60
60
|
});
|
|
61
61
|
}, []);
|
|
62
62
|
// andy3
|
package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js
CHANGED
|
@@ -3,10 +3,10 @@ import { useEffect } from "@saasquatch/universal-hooks";
|
|
|
3
3
|
import { DateTime } from "luxon";
|
|
4
4
|
import { useParentQueryValue } from "../../../utils/useParentQuery";
|
|
5
5
|
import { useSetParent } from "../../../utils/useParentState";
|
|
6
|
+
import { vatLabels } from "../countries";
|
|
6
7
|
import { TAX_CONTEXT_NAMESPACE, TAX_FORM_CONTEXT_NAMESPACE, USER_QUERY_NAMESPACE, } from "../sqm-tax-and-cash/data";
|
|
7
8
|
import { INDIRECT_TAX_PROVINCES, INDIRECT_TAX_SPAIN_REGIONS, } from "../subregions";
|
|
8
9
|
import { taxTypeToName } from "../utils";
|
|
9
|
-
import { vatLabels } from "../countries";
|
|
10
10
|
function getExpiresSoon(submissionDate, expiryDate) {
|
|
11
11
|
var _a;
|
|
12
12
|
if (!submissionDate || !expiryDate)
|
|
@@ -22,13 +22,11 @@ function getCountryName(countryCode, locale) {
|
|
|
22
22
|
}).of([countryCode]);
|
|
23
23
|
}
|
|
24
24
|
function getSubRegionName(regionCode) {
|
|
25
|
-
var _a
|
|
26
|
-
// Impact adds an underscore to
|
|
27
|
-
|
|
28
|
-
return (_a = INDIRECT_TAX_SPAIN_REGIONS.find((r) => r.regionCode === "CANARYISLANDS")) === null || _a === void 0 ? void 0 : _a.displayName;
|
|
29
|
-
}
|
|
25
|
+
var _a;
|
|
26
|
+
// Impact adds an underscore to some regions
|
|
27
|
+
const standardCode = regionCode.replace("_", "");
|
|
30
28
|
const regions = [...INDIRECT_TAX_PROVINCES, ...INDIRECT_TAX_SPAIN_REGIONS];
|
|
31
|
-
return (
|
|
29
|
+
return (_a = regions.find((r) => r.regionCode === standardCode)) === null || _a === void 0 ? void 0 : _a.displayName;
|
|
32
30
|
}
|
|
33
31
|
function getIndirectTaxType(taxInformation) {
|
|
34
32
|
var _a;
|
|
@@ -14,6 +14,7 @@ import editProfileTemplate from "../templates/EditProfile.html";
|
|
|
14
14
|
import activityTemplate from "../templates/Activity.html";
|
|
15
15
|
import resetPasswordEmailTemplate from "../templates/ResetPasswordEmail.html";
|
|
16
16
|
import verifyEmailTemplate from "../templates/VerifyEmail.html";
|
|
17
|
+
import taxPayoutReminderEmailTemplate from "../templates/taxPayoutReminderEmail.html";
|
|
17
18
|
import loginTemplate from "../templates/Login.html";
|
|
18
19
|
import registerTemplate from "../templates/Register.html";
|
|
19
20
|
import forgotPasswordTemplate from "../templates/ForgotPassword.html";
|
|
@@ -112,3 +113,7 @@ export const VerifyEmail = createHookStory(() => {
|
|
|
112
113
|
const { states, callbacks } = useTemplate(verifyEmailTemplate);
|
|
113
114
|
return h(TemplateView, { states: states, callbacks: callbacks });
|
|
114
115
|
});
|
|
116
|
+
export const taxPayoutReminderEmail = createHookStory(() => {
|
|
117
|
+
const { states, callbacks } = useTemplate(taxPayoutReminderEmailTemplate);
|
|
118
|
+
return h(TemplateView, { states: states, callbacks: callbacks });
|
|
119
|
+
});
|
|
@@ -1443,7 +1443,7 @@ function parseImpactThreshold(threshold) {
|
|
|
1443
1443
|
return parsed.toString();
|
|
1444
1444
|
}
|
|
1445
1445
|
function useBankingInfoForm(props) {
|
|
1446
|
-
var _a, _b, _c, _d, _e, _f, _g, _h
|
|
1446
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
1447
1447
|
const locale = N();
|
|
1448
1448
|
const user = H();
|
|
1449
1449
|
const formRef = useRef(null);
|
|
@@ -1485,17 +1485,16 @@ function useBankingInfoForm(props) {
|
|
|
1485
1485
|
name,
|
|
1486
1486
|
};
|
|
1487
1487
|
};
|
|
1488
|
-
const
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
];
|
|
1488
|
+
const sortByName = (a, b) => a.name < b.name ? -1 : 1;
|
|
1489
|
+
const _topCountries = ["CA", "GB", "US"];
|
|
1490
|
+
const countries = Array.from(availableCountries)
|
|
1491
|
+
.map((c) => getCountryObj(c))
|
|
1492
|
+
.sort(sortByName)
|
|
1493
|
+
.reduce((prev, countryObj) => {
|
|
1494
|
+
if (_topCountries.includes(countryObj.code))
|
|
1495
|
+
return [countryObj, ...prev];
|
|
1496
|
+
return [...prev, countryObj];
|
|
1497
|
+
}, []);
|
|
1499
1498
|
const hasPayPal = !!(paymentOptions === null || paymentOptions === void 0 ? void 0 : paymentOptions.find((option) => option.defaultFinancePaymentMethodId === PAYPAL_PAYMENT_METHOD));
|
|
1500
1499
|
const paymentMethodChecked = !hasPayPal
|
|
1501
1500
|
? "toBankAccount"
|
|
@@ -1636,7 +1635,7 @@ function useBankingInfoForm(props) {
|
|
|
1636
1635
|
hideSteps: !!context.hideSteps,
|
|
1637
1636
|
saveDisabled: !paymentMethodChecked || !paymentScheduleChecked,
|
|
1638
1637
|
locale,
|
|
1639
|
-
isPartner: !!((
|
|
1638
|
+
isPartner: !!((_g = (_f = (_e = userData === null || userData === void 0 ? void 0 : userData.user) === null || _e === void 0 ? void 0 : _e.impactConnection) === null || _f === void 0 ? void 0 : _f.publisher) === null || _g === void 0 ? void 0 : _g.withdrawalSettings),
|
|
1640
1639
|
feeCap,
|
|
1641
1640
|
paymentMethodFeeLabel,
|
|
1642
1641
|
disabled: loading,
|
|
@@ -1655,7 +1654,7 @@ function useBankingInfoForm(props) {
|
|
|
1655
1654
|
currentPaymentOption,
|
|
1656
1655
|
bitset: (currentPaymentOption === null || currentPaymentOption === void 0 ? void 0 : currentPaymentOption.withdrawalSettingId) || 0,
|
|
1657
1656
|
currency,
|
|
1658
|
-
thresholds: ((
|
|
1657
|
+
thresholds: ((_h = currentPaymentOption === null || currentPaymentOption === void 0 ? void 0 : currentPaymentOption.thresholdOptions) === null || _h === void 0 ? void 0 : _h.split(",")) || [],
|
|
1659
1658
|
countries,
|
|
1660
1659
|
hasPayPal,
|
|
1661
1660
|
},
|
|
@@ -2199,15 +2198,27 @@ function useDocusignForm(props) {
|
|
|
2199
2198
|
fetchDocument();
|
|
2200
2199
|
}, [user, publisher, participantType]);
|
|
2201
2200
|
useEffect(() => {
|
|
2202
|
-
|
|
2201
|
+
const onSubmit = async () => {
|
|
2202
|
+
try {
|
|
2203
|
+
setLoading(true);
|
|
2204
|
+
await refetch();
|
|
2205
|
+
// Skip banking info form if it already is saved
|
|
2206
|
+
setStep(context.overrideNextStep || !!(publisher === null || publisher === void 0 ? void 0 : publisher.withdrawalSettings)
|
|
2207
|
+
? "/dashboard"
|
|
2208
|
+
: "/4");
|
|
2209
|
+
}
|
|
2210
|
+
catch (e) {
|
|
2211
|
+
setErrors({ general: true });
|
|
2212
|
+
}
|
|
2213
|
+
finally {
|
|
2214
|
+
setLoading(false);
|
|
2215
|
+
}
|
|
2216
|
+
};
|
|
2203
2217
|
// Handled in view
|
|
2204
2218
|
if (DOCUSIGN_ERROR_STATES.includes(docusignStatus))
|
|
2205
2219
|
return;
|
|
2206
2220
|
if (DOCUSIGN_SUCCESS_STATES.includes(docusignStatus)) {
|
|
2207
|
-
|
|
2208
|
-
setStep(context.overrideNextStep || !!(publisher === null || publisher === void 0 ? void 0 : publisher.withdrawalSettings)
|
|
2209
|
-
? "/dashboard"
|
|
2210
|
-
: "/4");
|
|
2221
|
+
onSubmit();
|
|
2211
2222
|
}
|
|
2212
2223
|
}, [docusignStatus, refetch]);
|
|
2213
2224
|
const onBack = () => {
|
|
@@ -2499,10 +2510,14 @@ const DocusignFormView = (props) => {
|
|
|
2499
2510
|
h("p", { class: classes.BoldText }, text.participantType),
|
|
2500
2511
|
states.loading ? (h("sl-spinner", { style: { fontSize: "50px", margin: "40px" } })) : (h("div", { style: { display: "flex", flexDirection: "column" } },
|
|
2501
2512
|
h("sl-radio", { exportparts: "base: radio-base", value: "individualParticipant", name: "/participantType", checked: formState.participantType === "individualParticipant", disabled: states.disabled || states.participantTypeDisabled, onClick: () => {
|
|
2513
|
+
if (states.disabled || states.participantTypeDisabled)
|
|
2514
|
+
return;
|
|
2502
2515
|
callbacks.setParticipantType("individualParticipant");
|
|
2503
2516
|
} },
|
|
2504
2517
|
h("span", { class: classes.RadioText }, text.individualParticipant)),
|
|
2505
2518
|
h("sl-radio", { exportparts: "base: radio-base", value: "businessEntity", name: "/participantType", checked: formState.participantType === "businessEntity", disabled: states.disabled || states.participantTypeDisabled, onClick: () => {
|
|
2519
|
+
if (states.disabled || states.participantTypeDisabled)
|
|
2520
|
+
return;
|
|
2506
2521
|
callbacks.setParticipantType("businessEntity");
|
|
2507
2522
|
} },
|
|
2508
2523
|
h("span", { class: classes.RadioText }, text.businessEntity)))),
|
|
@@ -3153,7 +3168,7 @@ const IndirectTaxForm = class {
|
|
|
3153
3168
|
* Subtext for the option indicating registration for indirect tax in a different region
|
|
3154
3169
|
* @uiName Registered for indirect tax in a different region option sub-text
|
|
3155
3170
|
*/
|
|
3156
|
-
this.otherRegionSubtext = "If you represent a business based outside of the US may be registered.
|
|
3171
|
+
this.otherRegionSubtext = "If you represent a business based outside of the US you may be registered. If you’re not sure, contact our Support team to find out more.";
|
|
3157
3172
|
/**
|
|
3158
3173
|
* Text for the option indicating not being registered for indirect tax
|
|
3159
3174
|
* @uiName Not registered for indirect tax option text
|
|
@@ -4392,7 +4407,7 @@ const TaxAndCashMonolith = class {
|
|
|
4392
4407
|
* @uiName Registered for indirect tax in a different region option sub-text
|
|
4393
4408
|
* @uiGroup Step 2 Properties
|
|
4394
4409
|
*/
|
|
4395
|
-
this.step2_otherRegionSubtext = "If you represent a business based outside of the US may be registered.
|
|
4410
|
+
this.step2_otherRegionSubtext = "If you represent a business based outside of the US you may be registered. If you’re not sure, contact our Support team to find out more.";
|
|
4396
4411
|
/**
|
|
4397
4412
|
* Label text for the not registered radio button
|
|
4398
4413
|
* @uiName Not registered radio button label
|
|
@@ -5508,13 +5523,11 @@ function getCountryName(countryCode, locale) {
|
|
|
5508
5523
|
}).of([countryCode]);
|
|
5509
5524
|
}
|
|
5510
5525
|
function getSubRegionName(regionCode) {
|
|
5511
|
-
var _a
|
|
5512
|
-
// Impact adds an underscore to
|
|
5513
|
-
|
|
5514
|
-
return (_a = INDIRECT_TAX_SPAIN_REGIONS.find((r) => r.regionCode === "CANARYISLANDS")) === null || _a === void 0 ? void 0 : _a.displayName;
|
|
5515
|
-
}
|
|
5526
|
+
var _a;
|
|
5527
|
+
// Impact adds an underscore to some regions
|
|
5528
|
+
const standardCode = regionCode.replace("_", "");
|
|
5516
5529
|
const regions = [...INDIRECT_TAX_PROVINCES, ...INDIRECT_TAX_SPAIN_REGIONS];
|
|
5517
|
-
return (
|
|
5530
|
+
return (_a = regions.find((r) => r.regionCode === standardCode)) === null || _a === void 0 ? void 0 : _a.displayName;
|
|
5518
5531
|
}
|
|
5519
5532
|
function getIndirectTaxType(taxInformation) {
|
|
5520
5533
|
var _a;
|