@saasquatch/mint-components 1.8.0-100 → 1.8.0-102

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/cjs/sqm-banking-info-form_16.cjs.entry.js +52 -47
  2. package/dist/cjs/sqm-stencilbook.cjs.entry.js +8 -1
  3. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +4 -14
  4. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +19 -20
  5. package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form-view.js +4 -0
  6. package/dist/collection/components/tax-and-cash/sqm-docusign-form/useDocusignForm.js +2 -18
  7. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form.js +2 -2
  8. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +6 -6
  9. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.js +7 -7
  10. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js +7 -7
  11. package/dist/collection/stories/PortalTemplates.stories.js +5 -0
  12. package/dist/esm/sqm-banking-info-form_16.entry.js +52 -47
  13. package/dist/esm/sqm-stencilbook.entry.js +8 -1
  14. package/dist/esm-es5/sqm-banking-info-form_16.entry.js +1 -1
  15. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  16. package/dist/mint-components/mint-components.esm.js +1 -1
  17. package/dist/mint-components/p-1d321e05.system.entry.js +1 -0
  18. package/dist/mint-components/{p-18b77c5f.entry.js → p-55460d09.entry.js} +2 -2
  19. package/dist/mint-components/p-576c9eed.entry.js +148 -0
  20. package/dist/mint-components/{p-4220a501.system.entry.js → p-64b56cdd.system.entry.js} +1 -1
  21. package/dist/mint-components/p-d5364cae.system.js +1 -1
  22. package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.d.ts +1 -0
  23. package/dist/types/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.d.ts +2 -1
  24. package/dist/types/stories/PortalTemplates.stories.d.ts +6 -0
  25. package/docs/docs.docx +0 -0
  26. package/docs/raisins.json +1 -1
  27. package/package.json +1 -1
  28. package/dist/mint-components/p-b09a4429.entry.js +0 -148
  29. package/dist/mint-components/p-e4b434d2.system.entry.js +0 -1
@@ -1205,10 +1205,9 @@ const paypalFeeMap = {
1205
1205
  const ACH_PAYMENT_METHOD = 3;
1206
1206
  const WIRE_PAYMENT_METHOD = 5;
1207
1207
  const PAYPAL_PAYMENT_METHOD = 7;
1208
- function getFormMap({ props, getValidationErrorMessage, }) {
1208
+ function getFormMap({ props, getValidationErrorMessage, bankCountry, }) {
1209
1209
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32;
1210
1210
  const { errors, ...formState } = props.states.formState;
1211
- const country = props.states.bankCountry;
1212
1211
  return {
1213
1212
  0: {
1214
1213
  input: (index.h("sl-input", Object.assign({ required: true, label: props.text.beneficiaryAccountNameLabel, name: "/beneficiaryAccountName", id: "beneficiaryAccountName", key: "beneficiaryAccountName", type: "text" }, (((_a = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _a === void 0 ? void 0 : _a.beneficiaryAccountName) && {
@@ -1262,7 +1261,7 @@ function getFormMap({ props, getValidationErrorMessage, }) {
1262
1261
  id: "routingCodeText",
1263
1262
  defaultMessage: props.text.routingCodeLabel,
1264
1263
  }, {
1265
- country,
1264
+ bankCountry,
1266
1265
  }), name: "/routingCode", id: "routingCode", key: "routingCode", type: "text" }, (((_r = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _r === void 0 ? void 0 : _r.routingCode) && {
1267
1266
  class: "error-input",
1268
1267
  helpText: getValidationErrorMessage({
@@ -1271,7 +1270,7 @@ function getFormMap({ props, getValidationErrorMessage, }) {
1271
1270
  id: "routingCodeErrorText",
1272
1271
  defaultMessage: props.text.routingCodeLabel,
1273
1272
  }, {
1274
- country,
1273
+ bankCountry,
1275
1274
  }),
1276
1275
  }),
1277
1276
  })))),
@@ -1301,7 +1300,7 @@ function getFormMap({ props, getValidationErrorMessage, }) {
1301
1300
  id: "fxWireText",
1302
1301
  defaultMessage: props.text.taxPayerIdLabel,
1303
1302
  }, {
1304
- country,
1303
+ bankCountry,
1305
1304
  }), type: "text", name: "/taxPayerId", id: "taxPayerId", key: "taxPayerId" }, (((_0 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _0 === void 0 ? void 0 : _0.taxPayerId) && {
1306
1305
  class: "error-input",
1307
1306
  helpText: getValidationErrorMessage({
@@ -1447,7 +1446,7 @@ function parseImpactThreshold(threshold) {
1447
1446
  return parsed.toString();
1448
1447
  }
1449
1448
  function useBankingInfoForm(props) {
1450
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
1449
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1451
1450
  const locale = index_module.N();
1452
1451
  const user = index_module.H();
1453
1452
  const formRef = stencilHooks_module.useRef(null);
@@ -1489,17 +1488,16 @@ function useBankingInfoForm(props) {
1489
1488
  name,
1490
1489
  };
1491
1490
  };
1492
- const topCountries = (_f = (_e = ["CA", "GB", "US"]) === null || _e === void 0 ? void 0 : _e.filter((value) => Array.from(availableCountries).includes(value))) === null || _f === void 0 ? void 0 : _f.map((country) => {
1493
- return getCountryObj(country);
1494
- });
1495
- // build list of country codes and names
1496
- const countries = [
1497
- ...new Set(topCountries.concat((_g = Array.from(availableCountries)) === null || _g === void 0 ? void 0 : _g.map((country) => {
1498
- return getCountryObj(country);
1499
- }).sort((a, b) => {
1500
- return a.name < b.name ? -1 : 1;
1501
- }))),
1502
- ];
1491
+ const sortByName = (a, b) => a.name < b.name ? -1 : 1;
1492
+ const _topCountries = ["CA", "GB", "US"];
1493
+ const countries = Array.from(availableCountries)
1494
+ .map((c) => getCountryObj(c))
1495
+ .sort(sortByName)
1496
+ .reduce((prev, countryObj) => {
1497
+ if (_topCountries.includes(countryObj.code))
1498
+ return [countryObj, ...prev];
1499
+ return [...prev, countryObj];
1500
+ }, []);
1503
1501
  const hasPayPal = !!(paymentOptions === null || paymentOptions === void 0 ? void 0 : paymentOptions.find((option) => option.defaultFinancePaymentMethodId === PAYPAL_PAYMENT_METHOD));
1504
1502
  const paymentMethodChecked = !hasPayPal
1505
1503
  ? "toBankAccount"
@@ -1541,7 +1539,7 @@ function useBankingInfoForm(props) {
1541
1539
  return true;
1542
1540
  return false;
1543
1541
  });
1544
- setFormState((p) => ({ bankCountry, ...p }));
1542
+ setFormState((p) => ({ ...p, bankCountry }));
1545
1543
  setCurrentPaymentOption(currentPaymentOption);
1546
1544
  };
1547
1545
  const onSubmit = async (event) => {
@@ -1640,7 +1638,7 @@ function useBankingInfoForm(props) {
1640
1638
  hideSteps: !!context.hideSteps,
1641
1639
  saveDisabled: !paymentMethodChecked || !paymentScheduleChecked,
1642
1640
  locale,
1643
- isPartner: !!((_k = (_j = (_h = userData === null || userData === void 0 ? void 0 : userData.user) === null || _h === void 0 ? void 0 : _h.impactConnection) === null || _j === void 0 ? void 0 : _j.publisher) === null || _k === void 0 ? void 0 : _k.withdrawalSettings),
1641
+ 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
1642
  feeCap,
1645
1643
  paymentMethodFeeLabel,
1646
1644
  disabled: loading,
@@ -1659,9 +1657,10 @@ function useBankingInfoForm(props) {
1659
1657
  currentPaymentOption,
1660
1658
  bitset: (currentPaymentOption === null || currentPaymentOption === void 0 ? void 0 : currentPaymentOption.withdrawalSettingId) || 0,
1661
1659
  currency,
1662
- thresholds: ((_l = currentPaymentOption === null || currentPaymentOption === void 0 ? void 0 : currentPaymentOption.thresholdOptions) === null || _l === void 0 ? void 0 : _l.split(",")) || [],
1660
+ thresholds: ((_h = currentPaymentOption === null || currentPaymentOption === void 0 ? void 0 : currentPaymentOption.thresholdOptions) === null || _h === void 0 ? void 0 : _h.split(",")) || [],
1663
1661
  countries,
1664
1662
  hasPayPal,
1663
+ bankCountry: formState.bankCountry,
1665
1664
  },
1666
1665
  refs: {
1667
1666
  formRef,
@@ -1792,7 +1791,7 @@ const BankingInfoForm = class {
1792
1791
  * Label text for the routing code input field
1793
1792
  * @uiName Routing code input label
1794
1793
  */
1795
- this.routingCodeLabel = "{country, select, AU {BSB number} CA {Routing number} CZ {Bank code} HK {Clearing code} SG {Clearing code} US {ABA routing number} NZ {BSB number} ZA {Bank/Branch cumber} IN {IFSC} CNY {CNAPS} other {Routing code} }";
1794
+ this.routingCodeLabel = "{bankCountry, select, AU {BSB number} CA {Routing number} CZ {Bank code} HK {Clearing code} SG {Clearing code} US {ABA routing number} NZ {BSB number} ZA {Bank/Branch number} IN {IFSC} CNY {CNAPS} other {Routing code} }";
1796
1795
  /**
1797
1796
  * Label text for the bank name input field
1798
1797
  * @uiName Bank name input label
@@ -1976,15 +1975,12 @@ const BankingInfoForm = class {
1976
1975
  const formMap = getFormMap({
1977
1976
  props,
1978
1977
  getValidationErrorMessage,
1978
+ bankCountry: props.states.bankCountry,
1979
1979
  });
1980
1980
  const inputFields = getFormInputs({
1981
1981
  bitset: props.states.bitset,
1982
1982
  formMap,
1983
1983
  });
1984
- console.log({
1985
- formState: props.states.formState,
1986
- thresholds: props.states.thresholds,
1987
- });
1988
1984
  return (index.h(index.Host, null, index.h(BankingInfoFormView, { callbacks: props.callbacks, text: props.text, states: props.states, refs: props.refs, slots: {
1989
1985
  formInputsSlot: inputFields === null || inputFields === void 0 ? void 0 : inputFields.map(({ input }) => input),
1990
1986
  countryInputSlot: (index.h("sl-select", Object.assign({ label: props.text.bankLocationLabel, required: true, name: "/bankCountry", id: "bankCountry", value: props.states.formState.bankCountry, "onSl-select": (e) => { var _a, _b; return props.callbacks.setBankCountry((_b = (_a = e.detail) === null || _a === void 0 ? void 0 : _a.item) === null || _b === void 0 ? void 0 : _b.value); } }, (((_a = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _a === void 0 ? void 0 : _a.bankCountry) && {
@@ -2039,13 +2035,6 @@ function useDemoBankingInfoForm(props) {
2039
2035
  });
2040
2036
  const bitset = (currentPaymentOption === null || currentPaymentOption === void 0 ? void 0 : currentPaymentOption.withdrawalSettingId) || ((_p = (_o = props.demoData) === null || _o === void 0 ? void 0 : _o.states) === null || _p === void 0 ? void 0 : _p.bitset) ||
2041
2037
  0;
2042
- console.log("demo hook", {
2043
- demoData: props.demoData,
2044
- currentPaymentOption,
2045
- currency,
2046
- bankCountry,
2047
- bitset,
2048
- });
2049
2038
  stencilHooks_module.useEffect(() => {
2050
2039
  if (defaultPaymentMethodChecked !== paymentMethodChecked)
2051
2040
  setPaymentMethodChecked(defaultPaymentMethodChecked);
@@ -2203,15 +2192,27 @@ function useDocusignForm(props) {
2203
2192
  fetchDocument();
2204
2193
  }, [user, publisher, participantType]);
2205
2194
  stencilHooks_module.useEffect(() => {
2206
- console.log({ DOCUSIGN_SUCCESS_STATES, docusignStatus });
2195
+ const onSubmit = async () => {
2196
+ try {
2197
+ setLoading(true);
2198
+ await refetch();
2199
+ // Skip banking info form if it already is saved
2200
+ setStep(context.overrideNextStep || !!(publisher === null || publisher === void 0 ? void 0 : publisher.withdrawalSettings)
2201
+ ? "/dashboard"
2202
+ : "/4");
2203
+ }
2204
+ catch (e) {
2205
+ setErrors({ general: true });
2206
+ }
2207
+ finally {
2208
+ setLoading(false);
2209
+ }
2210
+ };
2207
2211
  // Handled in view
2208
2212
  if (DOCUSIGN_ERROR_STATES.includes(docusignStatus))
2209
2213
  return;
2210
2214
  if (DOCUSIGN_SUCCESS_STATES.includes(docusignStatus)) {
2211
- // handles if the user refreshes and loses the override in context
2212
- setStep(context.overrideNextStep || !!(publisher === null || publisher === void 0 ? void 0 : publisher.withdrawalSettings)
2213
- ? "/dashboard"
2214
- : "/4");
2215
+ onSubmit();
2215
2216
  }
2216
2217
  }, [docusignStatus, refetch]);
2217
2218
  const onBack = () => {
@@ -2503,10 +2504,14 @@ const DocusignFormView = (props) => {
2503
2504
  index.h("p", { class: classes.BoldText }, text.participantType),
2504
2505
  states.loading ? (index.h("sl-spinner", { style: { fontSize: "50px", margin: "40px" } })) : (index.h("div", { style: { display: "flex", flexDirection: "column" } },
2505
2506
  index.h("sl-radio", { exportparts: "base: radio-base", value: "individualParticipant", name: "/participantType", checked: formState.participantType === "individualParticipant", disabled: states.disabled || states.participantTypeDisabled, onClick: () => {
2507
+ if (states.disabled || states.participantTypeDisabled)
2508
+ return;
2506
2509
  callbacks.setParticipantType("individualParticipant");
2507
2510
  } },
2508
2511
  index.h("span", { class: classes.RadioText }, text.individualParticipant)),
2509
2512
  index.h("sl-radio", { exportparts: "base: radio-base", value: "businessEntity", name: "/participantType", checked: formState.participantType === "businessEntity", disabled: states.disabled || states.participantTypeDisabled, onClick: () => {
2513
+ if (states.disabled || states.participantTypeDisabled)
2514
+ return;
2510
2515
  callbacks.setParticipantType("businessEntity");
2511
2516
  } },
2512
2517
  index.h("span", { class: classes.RadioText }, text.businessEntity)))),
@@ -3157,7 +3162,7 @@ const IndirectTaxForm = class {
3157
3162
  * Subtext for the option indicating registration for indirect tax in a different region
3158
3163
  * @uiName Registered for indirect tax in a different region option sub-text
3159
3164
  */
3160
- this.otherRegionSubtext = "If you represent a business based outside of the US may be registered. Not sure? Contact our Support team to find out more.";
3165
+ 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
3166
  /**
3162
3167
  * Text for the option indicating not being registered for indirect tax
3163
3168
  * @uiName Not registered for indirect tax option text
@@ -4396,7 +4401,7 @@ const TaxAndCashMonolith = class {
4396
4401
  * @uiName Registered for indirect tax in a different region option sub-text
4397
4402
  * @uiGroup Step 2 Properties
4398
4403
  */
4399
- this.step2_otherRegionSubtext = "If you represent a business based outside of the US may be registered. Not sure? Contact our Support team to find out more.";
4404
+ 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
4405
  /**
4401
4406
  * Label text for the not registered radio button
4402
4407
  * @uiName Not registered radio button label
@@ -4678,7 +4683,7 @@ const TaxAndCashMonolith = class {
4678
4683
  * @uiName Beneficiary account name input label
4679
4684
  * @uiGroup Step 4 Properties
4680
4685
  */
4681
- this.step4_beneficiaryAccountNameLabel = "Beneficiary Account Name";
4686
+ this.step4_beneficiaryAccountNameLabel = "Beneficiary account name";
4682
4687
  /**
4683
4688
  * Label text for the bank account type input field
4684
4689
  * @uiName Bank account type input label
@@ -4720,7 +4725,7 @@ const TaxAndCashMonolith = class {
4720
4725
  * @uiName Routing code input label
4721
4726
  * @uiGroup Step 4 Properties
4722
4727
  */
4723
- this.step4_routingCodeLabel = "Routing code";
4728
+ this.step4_routingCodeLabel = "{bankCountry, select, AU {BSB number} CA {Routing number} CZ {Bank code} HK {Clearing code} SG {Clearing code} US {ABA routing number} NZ {BSB number} ZA {Bank/Branch number} IN {IFSC} CNY {CNAPS} other {Routing code} }";
4724
4729
  /**
4725
4730
  * Label text for the bank name input field
4726
4731
  * @uiName Bank name input label
@@ -5512,13 +5517,13 @@ function getCountryName(countryCode, locale) {
5512
5517
  }).of([countryCode]);
5513
5518
  }
5514
5519
  function getSubRegionName(regionCode) {
5515
- var _a, _b;
5516
- // Impact adds an underscore to CANARYISLANDS, so requires a hardcoded check
5517
- if (regionCode === "CANARY_ISLANDS") {
5518
- return (_a = sqmInvoiceTableView.INDIRECT_TAX_SPAIN_REGIONS.find((r) => r.regionCode === "CANARYISLANDS")) === null || _a === void 0 ? void 0 : _a.displayName;
5519
- }
5520
+ var _a;
5521
+ if (!regionCode)
5522
+ return "";
5523
+ // Impact adds an underscore to some regions
5524
+ const standardCode = regionCode.replace("_", "");
5520
5525
  const regions = [...sqmInvoiceTableView.INDIRECT_TAX_PROVINCES, ...sqmInvoiceTableView.INDIRECT_TAX_SPAIN_REGIONS];
5521
- return (_b = regions.find((r) => r.regionCode === regionCode)) === null || _b === void 0 ? void 0 : _b.displayName;
5526
+ return (_a = regions.find((r) => r.regionCode === standardCode)) === null || _a === void 0 ? void 0 : _a.displayName;
5522
5527
  }
5523
5528
  function getIndirectTaxType(taxInformation) {
5524
5529
  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 = {
@@ -137,7 +137,7 @@ export class BankingInfoForm {
137
137
  * Label text for the routing code input field
138
138
  * @uiName Routing code input label
139
139
  */
140
- this.routingCodeLabel = "{country, select, AU {BSB number} CA {Routing number} CZ {Bank code} HK {Clearing code} SG {Clearing code} US {ABA routing number} NZ {BSB number} ZA {Bank/Branch cumber} IN {IFSC} CNY {CNAPS} other {Routing code} }";
140
+ this.routingCodeLabel = "{bankCountry, select, AU {BSB number} CA {Routing number} CZ {Bank code} HK {Clearing code} SG {Clearing code} US {ABA routing number} NZ {BSB number} ZA {Bank/Branch number} IN {IFSC} CNY {CNAPS} other {Routing code} }";
141
141
  /**
142
142
  * Label text for the bank name input field
143
143
  * @uiName Bank name input label
@@ -321,15 +321,12 @@ export class BankingInfoForm {
321
321
  const formMap = getFormMap({
322
322
  props,
323
323
  getValidationErrorMessage,
324
+ bankCountry: props.states.bankCountry,
324
325
  });
325
326
  const inputFields = getFormInputs({
326
327
  bitset: props.states.bitset,
327
328
  formMap,
328
329
  });
329
- console.log({
330
- formState: props.states.formState,
331
- thresholds: props.states.thresholds,
332
- });
333
330
  return (h(Host, null,
334
331
  h(BankingInfoFormView, { callbacks: props.callbacks, text: props.text, states: props.states, refs: props.refs, slots: {
335
332
  formInputsSlot: inputFields === null || inputFields === void 0 ? void 0 : inputFields.map(({ input }) => input),
@@ -872,7 +869,7 @@ export class BankingInfoForm {
872
869
  },
873
870
  "attribute": "routing-code-label",
874
871
  "reflect": false,
875
- "defaultValue": "\"{country, select, AU {BSB number} CA {Routing number} CZ {Bank code} HK {Clearing code} SG {Clearing code} US {ABA routing number} NZ {BSB number} ZA {Bank/Branch cumber} IN {IFSC} CNY {CNAPS} other {Routing code} }\""
872
+ "defaultValue": "\"{bankCountry, select, AU {BSB number} CA {Routing number} CZ {Bank code} HK {Clearing code} SG {Clearing code} US {ABA routing number} NZ {BSB number} ZA {Bank/Branch number} IN {IFSC} CNY {CNAPS} other {Routing code} }\""
876
873
  },
877
874
  "bankNameLabel": {
878
875
  "type": "string",
@@ -1467,7 +1464,7 @@ export class BankingInfoForm {
1467
1464
  "mutable": false,
1468
1465
  "complexType": {
1469
1466
  "original": "DemoData<BankingInfoFormViewProps>",
1470
- "resolved": "{ states?: { step?: string; locale?: string; loading: boolean; saveLoading?: boolean; disabled: boolean; saveDisabled: boolean; hideSteps?: boolean; hasPayPal: boolean; hideBanking?: boolean; hidePayPal?: boolean; hideBalanceThreshold?: boolean; hideFixedDay?: boolean; hideBackButton: boolean; feeCap?: string; isPartner: boolean; paymentMethodFeeLabel?: string; loadingError: boolean; formState: BankingInfoFormData & { paymentMethodChecked?: \"toBankAccount\" | \"toPayPalAccount\"; paymentScheduleChecked?: \"BALANCE_THRESHOLD\" | \"FIXED_DAY\"; errors?: { general?: boolean; inputErrors?: { [field: string]: { type: \"required\" | \"invalid\"; }; }; }; }; bitset?: number; currency?: string; thresholds: string[]; countries?: { code: string; name: string; }[]; currentPaymentOption?: any; showInputs?: boolean; }; slots?: { formInputsSlot?: VNode[]; countryInputSlot?: VNode; paymentMethodSlot?: VNode; paymentThresholdSelectSlot?: VNode; paymentFixedDaySelectSlot?: VNode; paypalInputSlot?: VNode; }; refs?: { formRef: any; }; }",
1467
+ "resolved": "{ states?: { step?: string; locale?: string; loading: boolean; saveLoading?: boolean; disabled: boolean; saveDisabled: boolean; hideSteps?: boolean; hasPayPal: boolean; hideBanking?: boolean; hidePayPal?: boolean; hideBalanceThreshold?: boolean; hideFixedDay?: boolean; hideBackButton: boolean; feeCap?: string; isPartner: boolean; paymentMethodFeeLabel?: string; loadingError: boolean; formState: BankingInfoFormData & { paymentMethodChecked?: \"toBankAccount\" | \"toPayPalAccount\"; paymentScheduleChecked?: \"BALANCE_THRESHOLD\" | \"FIXED_DAY\"; errors?: { general?: boolean; inputErrors?: { [field: string]: { type: \"required\" | \"invalid\"; }; }; }; }; bitset?: number; currency?: string; thresholds: string[]; countries?: { code: string; name: string; }[]; currentPaymentOption?: any; showInputs?: boolean; bankCountry?: string; }; slots?: { formInputsSlot?: VNode[]; countryInputSlot?: VNode; paymentMethodSlot?: VNode; paymentThresholdSelectSlot?: VNode; paymentFixedDaySelectSlot?: VNode; paypalInputSlot?: VNode; }; refs?: { formRef: any; }; }",
1471
1468
  "references": {
1472
1469
  "DemoData": {
1473
1470
  "location": "import",
@@ -1515,13 +1512,6 @@ function useDemoBankingInfoForm(props) {
1515
1512
  });
1516
1513
  const bitset = (currentPaymentOption === null || currentPaymentOption === void 0 ? void 0 : currentPaymentOption.withdrawalSettingId) || ((_p = (_o = props.demoData) === null || _o === void 0 ? void 0 : _o.states) === null || _p === void 0 ? void 0 : _p.bitset) ||
1517
1514
  0;
1518
- console.log("demo hook", {
1519
- demoData: props.demoData,
1520
- currentPaymentOption,
1521
- currency,
1522
- bankCountry,
1523
- bitset,
1524
- });
1525
1515
  useEffect(() => {
1526
1516
  if (defaultPaymentMethodChecked !== paymentMethodChecked)
1527
1517
  setPaymentMethodChecked(defaultPaymentMethodChecked);
@@ -26,10 +26,9 @@ export const paypalFeeMap = {
26
26
  const ACH_PAYMENT_METHOD = 3;
27
27
  const WIRE_PAYMENT_METHOD = 5;
28
28
  const PAYPAL_PAYMENT_METHOD = 7;
29
- export function getFormMap({ props, getValidationErrorMessage, }) {
29
+ export function getFormMap({ props, getValidationErrorMessage, bankCountry, }) {
30
30
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32;
31
31
  const { errors, ...formState } = props.states.formState;
32
- const country = props.states.bankCountry;
33
32
  return {
34
33
  0: {
35
34
  input: (h("sl-input", Object.assign({ required: true, label: props.text.beneficiaryAccountNameLabel, name: "/beneficiaryAccountName", id: "beneficiaryAccountName", key: "beneficiaryAccountName", type: "text" }, (((_a = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _a === void 0 ? void 0 : _a.beneficiaryAccountName) && {
@@ -83,7 +82,7 @@ export function getFormMap({ props, getValidationErrorMessage, }) {
83
82
  id: "routingCodeText",
84
83
  defaultMessage: props.text.routingCodeLabel,
85
84
  }, {
86
- country,
85
+ bankCountry,
87
86
  }), name: "/routingCode", id: "routingCode", key: "routingCode", type: "text" }, (((_r = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _r === void 0 ? void 0 : _r.routingCode) && {
88
87
  class: "error-input",
89
88
  helpText: getValidationErrorMessage({
@@ -92,7 +91,7 @@ export function getFormMap({ props, getValidationErrorMessage, }) {
92
91
  id: "routingCodeErrorText",
93
92
  defaultMessage: props.text.routingCodeLabel,
94
93
  }, {
95
- country,
94
+ bankCountry,
96
95
  }),
97
96
  }),
98
97
  })))),
@@ -122,7 +121,7 @@ export function getFormMap({ props, getValidationErrorMessage, }) {
122
121
  id: "fxWireText",
123
122
  defaultMessage: props.text.taxPayerIdLabel,
124
123
  }, {
125
- country,
124
+ bankCountry,
126
125
  }), type: "text", name: "/taxPayerId", id: "taxPayerId", key: "taxPayerId" }, (((_0 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _0 === void 0 ? void 0 : _0.taxPayerId) && {
127
126
  class: "error-input",
128
127
  helpText: getValidationErrorMessage({
@@ -268,7 +267,7 @@ function parseImpactThreshold(threshold) {
268
267
  return parsed.toString();
269
268
  }
270
269
  export function useBankingInfoForm(props) {
271
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
270
+ var _a, _b, _c, _d, _e, _f, _g, _h;
272
271
  const locale = useLocale();
273
272
  const user = useUserIdentity();
274
273
  const formRef = useRef(null);
@@ -310,17 +309,16 @@ export function useBankingInfoForm(props) {
310
309
  name,
311
310
  };
312
311
  };
313
- const topCountries = (_f = (_e = ["CA", "GB", "US"]) === null || _e === void 0 ? void 0 : _e.filter((value) => Array.from(availableCountries).includes(value))) === null || _f === void 0 ? void 0 : _f.map((country) => {
314
- return getCountryObj(country);
315
- });
316
- // build list of country codes and names
317
- const countries = [
318
- ...new Set(topCountries.concat((_g = Array.from(availableCountries)) === null || _g === void 0 ? void 0 : _g.map((country) => {
319
- return getCountryObj(country);
320
- }).sort((a, b) => {
321
- return a.name < b.name ? -1 : 1;
322
- }))),
323
- ];
312
+ const sortByName = (a, b) => a.name < b.name ? -1 : 1;
313
+ const _topCountries = ["CA", "GB", "US"];
314
+ const countries = Array.from(availableCountries)
315
+ .map((c) => getCountryObj(c))
316
+ .sort(sortByName)
317
+ .reduce((prev, countryObj) => {
318
+ if (_topCountries.includes(countryObj.code))
319
+ return [countryObj, ...prev];
320
+ return [...prev, countryObj];
321
+ }, []);
324
322
  const hasPayPal = !!(paymentOptions === null || paymentOptions === void 0 ? void 0 : paymentOptions.find((option) => option.defaultFinancePaymentMethodId === PAYPAL_PAYMENT_METHOD));
325
323
  const paymentMethodChecked = !hasPayPal
326
324
  ? "toBankAccount"
@@ -362,7 +360,7 @@ export function useBankingInfoForm(props) {
362
360
  return true;
363
361
  return false;
364
362
  });
365
- setFormState((p) => ({ bankCountry, ...p }));
363
+ setFormState((p) => ({ ...p, bankCountry }));
366
364
  setCurrentPaymentOption(currentPaymentOption);
367
365
  };
368
366
  const onSubmit = async (event) => {
@@ -461,7 +459,7 @@ export function useBankingInfoForm(props) {
461
459
  hideSteps: !!context.hideSteps,
462
460
  saveDisabled: !paymentMethodChecked || !paymentScheduleChecked,
463
461
  locale,
464
- isPartner: !!((_k = (_j = (_h = userData === null || userData === void 0 ? void 0 : userData.user) === null || _h === void 0 ? void 0 : _h.impactConnection) === null || _j === void 0 ? void 0 : _j.publisher) === null || _k === void 0 ? void 0 : _k.withdrawalSettings),
462
+ 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
463
  feeCap,
466
464
  paymentMethodFeeLabel,
467
465
  disabled: loading,
@@ -480,9 +478,10 @@ export function useBankingInfoForm(props) {
480
478
  currentPaymentOption,
481
479
  bitset: (currentPaymentOption === null || currentPaymentOption === void 0 ? void 0 : currentPaymentOption.withdrawalSettingId) || 0,
482
480
  currency,
483
- thresholds: ((_l = currentPaymentOption === null || currentPaymentOption === void 0 ? void 0 : currentPaymentOption.thresholdOptions) === null || _l === void 0 ? void 0 : _l.split(",")) || [],
481
+ thresholds: ((_h = currentPaymentOption === null || currentPaymentOption === void 0 ? void 0 : currentPaymentOption.thresholdOptions) === null || _h === void 0 ? void 0 : _h.split(",")) || [],
484
482
  countries,
485
483
  hasPayPal,
484
+ bankCountry: formState.bankCountry,
486
485
  },
487
486
  refs: {
488
487
  formRef,
@@ -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
- const result = await refetch();
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
- // handles if the user refreshes and loses the override in context
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 = () => {
@@ -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. Not sure? Contact our Support team to find out more.";
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. Not sure? Contact our Support team to find out more.\""
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",