@saasquatch/mint-components 2.1.9-16 → 2.1.9-18

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 (65) hide show
  1. package/dist/cjs/{data-e83f8a41.js → data-34bc7549.js} +0 -90
  2. package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +85 -33
  3. package/dist/cjs/sqm-big-stat_46.cjs.entry.js +5 -4
  4. package/dist/cjs/sqm-email-verification_2.cjs.entry.js +28 -10
  5. package/dist/cjs/{sqm-partner-info-modal-view-2d6e89a4.js → sqm-partner-info-modal-view-0821eea3.js} +33 -32
  6. package/dist/cjs/sqm-stencilbook.cjs.entry.js +38 -37
  7. package/dist/cjs/{sqm-user-info-form-view-923ff8d9.js → sqm-user-info-form-view-d89bdc04.js} +24 -23
  8. package/dist/cjs/utils-a8e0bd9b.js +93 -0
  9. package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal-view.js +33 -32
  10. package/dist/collection/components/sqm-partner-info-modal/usePartnerInfoModal.js +28 -10
  11. package/dist/collection/components/sqm-widget-verification/sqm-widget-verification.js +1 -1
  12. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +49 -11
  13. package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +27 -14
  14. package/dist/{mint-components/p-a5912b2f.js → esm/data-2380309a.js} +23 -5
  15. package/dist/esm/sqm-banking-info-form_10.entry.js +78 -26
  16. package/dist/esm/sqm-big-stat_46.entry.js +3 -2
  17. package/dist/esm/sqm-email-verification_2.entry.js +29 -11
  18. package/dist/esm/{sqm-partner-info-modal-view-f85b5a08.js → sqm-partner-info-modal-view-78d2bc6e.js} +33 -32
  19. package/dist/esm/sqm-stencilbook.entry.js +4 -3
  20. package/dist/esm/{sqm-user-info-form-view-f9026468.js → sqm-user-info-form-view-ff8e47ad.js} +2 -1
  21. package/dist/esm/utils-8267d3d8.js +85 -0
  22. package/dist/esm-es5/data-2380309a.js +1 -0
  23. package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
  24. package/dist/esm-es5/sqm-big-stat_46.entry.js +1 -1
  25. package/dist/esm-es5/sqm-email-verification_2.entry.js +1 -1
  26. package/dist/esm-es5/sqm-partner-info-modal-view-78d2bc6e.js +1 -0
  27. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  28. package/dist/esm-es5/sqm-user-info-form-view-ff8e47ad.js +1 -0
  29. package/dist/esm-es5/utils-8267d3d8.js +1 -0
  30. package/dist/mint-components/mint-components.esm.js +1 -1
  31. package/dist/mint-components/p-0152122e.js +115 -0
  32. package/dist/mint-components/{p-1b2fcd7f.entry.js → p-0305331c.entry.js} +32 -7
  33. package/dist/mint-components/p-0e05ab3b.system.js +1 -0
  34. package/dist/mint-components/{p-3b2b83d9.entry.js → p-134df0e0.entry.js} +8 -8
  35. package/dist/mint-components/p-1c413a06.system.js +1 -1
  36. package/dist/mint-components/p-37541f60.js +1 -0
  37. package/dist/mint-components/p-527cb9c6.entry.js +9 -0
  38. package/dist/mint-components/p-5d40ccd0.system.entry.js +1 -0
  39. package/dist/mint-components/p-80c3ec2a.system.js +1 -0
  40. package/dist/mint-components/{p-e5c554da.entry.js → p-8ccc3449.entry.js} +2 -2
  41. package/dist/mint-components/p-8ebd2081.system.js +1 -0
  42. package/dist/mint-components/p-9d89bd75.system.entry.js +1 -0
  43. package/dist/mint-components/p-a8891ebd.js +1 -0
  44. package/dist/mint-components/p-a9ff6601.system.entry.js +1 -0
  45. package/dist/mint-components/p-af5cd4cf.js +1 -0
  46. package/dist/mint-components/p-d4446e58.system.entry.js +1 -0
  47. package/dist/mint-components/p-ee0f1cf1.system.js +1 -0
  48. package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal-view.d.ts +1 -1
  49. package/dist/types/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.d.ts +4 -0
  50. package/docs/docs.docx +0 -0
  51. package/package.json +1 -1
  52. package/dist/esm/data-2b0feb3f.js +0 -216
  53. package/dist/esm-es5/data-2b0feb3f.js +0 -1
  54. package/dist/esm-es5/sqm-partner-info-modal-view-f85b5a08.js +0 -1
  55. package/dist/esm-es5/sqm-user-info-form-view-f9026468.js +0 -1
  56. package/dist/mint-components/p-014977d7.js +0 -1
  57. package/dist/mint-components/p-54bf015a.system.js +0 -1
  58. package/dist/mint-components/p-5a71d63c.js +0 -1
  59. package/dist/mint-components/p-64b56141.system.entry.js +0 -1
  60. package/dist/mint-components/p-65e4ba6f.system.entry.js +0 -1
  61. package/dist/mint-components/p-67792584.system.js +0 -1
  62. package/dist/mint-components/p-a06ee2a3.system.entry.js +0 -1
  63. package/dist/mint-components/p-ae0a0031.system.entry.js +0 -1
  64. package/dist/mint-components/p-d111584d.entry.js +0 -9
  65. package/dist/mint-components/p-eaf5d0af.system.js +0 -1
@@ -25,7 +25,8 @@ import { i as isEmpty } from './utilities-c9e730ed.js';
25
25
  import { E as ErrorView } from './ErrorView-74cb3af8.js';
26
26
  import { u as useDemoBigStat, V as useBigStat, B as BigStatView, C as CardFeedView, d as CheckboxFieldView, e as CouponCodeView, D as DropdownFieldView, E as EditProfileView, H as HeroView, I as InputFieldView, Q as LeadDropdownFieldView, O as LeadFormView, W as withShadowView, L as LeaderboardView, N as NameFieldsView, f as ChangeMarktingView, P as PortalChangePasswordView, g as PortalFooterView, h as PortalFrameView, c as BaseRegistrationFormView, R as ReferralIframeView, i as RewardExchangeView, X as demoRewardExchange, G as useShareButton, a as ShareButtonView, J as useShareLink, S as StatContainerView, T as TaskCardView } from './ShadowViewAddon-657d18f0.js';
27
27
  import './sqm-portal-container-view-a8c708cd.js';
28
- import { T as TAX_CONTEXT_NAMESPACE, a as TAX_FORM_CONTEXT_NAMESPACE, U as USER_FORM_CONTEXT_NAMESPACE, C as CURRENCIES_NAMESPACE, b as COUNTRIES_NAMESPACE, S as SORTED_COUNTRIES_NAMESPACE, g as getCountryObj, c as USER_QUERY_NAMESPACE, G as GET_USER$2, d as COUNTRIES_QUERY_NAMESPACE, e as GET_COUNTRIES, h as FINANCE_NETWORK_SETTINGS_NAMESPACE, i as GET_FINANCE_NETWORK_SETTINGS, j as CURRENCIES_QUERY_NAMESPACE, k as GET_CURRENCIES, L as LoadingView } from './data-2b0feb3f.js';
28
+ import { g as getCountryObj, L as LoadingView } from './utils-8267d3d8.js';
29
+ import { T as TAX_CONTEXT_NAMESPACE, a as TAX_FORM_CONTEXT_NAMESPACE, U as USER_FORM_CONTEXT_NAMESPACE, C as CURRENCIES_NAMESPACE, b as COUNTRIES_NAMESPACE, S as SORTED_COUNTRIES_NAMESPACE, c as USER_QUERY_NAMESPACE, G as GET_USER$2, d as COUNTRIES_QUERY_NAMESPACE, e as GET_COUNTRIES, f as FINANCE_NETWORK_SETTINGS_NAMESPACE, g as GET_FINANCE_NETWORK_SETTINGS, h as CURRENCIES_QUERY_NAMESPACE, i as GET_CURRENCIES } from './data-2380309a.js';
29
30
  import { S as SHOW_CODE_NAMESPACE, a as VERIFICATION_EMAIL_NAMESPACE, V as VERIFICATION_PARENT_NAMESPACE } from './keys-db1897ae.js';
30
31
  import './eventKeys-f76b6a03.js';
31
32
  import { u as usePayoutStatus } from './usePayoutStatus-fa504d49.js';
@@ -8225,7 +8226,7 @@ const WidgetVerification = class {
8225
8226
  : useWidgetVerification();
8226
8227
  if (props.loading)
8227
8228
  return h$1("sl-spinner", null);
8228
- // Check if partner modal state indicates verification is complete (open: false)
8229
+ // for handling state previews in content editor
8229
8230
  const partnerState = typeof props["sqm-partner-info-modal_stateController"] === "string"
8230
8231
  ? parseStates(props["sqm-partner-info-modal_stateController"])
8231
8232
  : props["sqm-partner-info-modal_stateController"];
@@ -1,12 +1,13 @@
1
1
  import { h, r as registerInstance } from './index-38ad4957.js';
2
2
  import { i as intl } from './global-39f55ec2.js';
3
- import { k as useState, f as useEffect, n as h$1 } from './dom-context-hooks.module-50442785.js';
3
+ import { k as useState, f as useEffect, n as h$1, u as useMemo } from './dom-context-hooks.module-50442785.js';
4
4
  import { d as dist, t as Pn, w as wn, J, $ as $e, i as isDemo, r as En, L } from './index.module-cede12c6.js';
5
5
  import { c as cjs } from './cjs-bdfb4486.js';
6
6
  import { g as getProps } from './utils-334c1e34.js';
7
7
  import { c as createStyleSheet } from './JSS-67b5cff8.js';
8
8
  import { T as TextSpanView } from './sqm-text-span-view-738acfb3.js';
9
- import { a as PartnerInfoModalContentView, P as PartnerInfoModalView } from './sqm-partner-info-modal-view-f85b5a08.js';
9
+ import { g as GET_FINANCE_NETWORK_SETTINGS } from './data-2380309a.js';
10
+ import { a as PartnerInfoModalContentView, P as PartnerInfoModalView } from './sqm-partner-info-modal-view-78d2bc6e.js';
10
11
  import { S as SHOW_CODE_NAMESPACE, a as VERIFICATION_EMAIL_NAMESPACE, V as VERIFICATION_PARENT_NAMESPACE } from './keys-db1897ae.js';
11
12
  import { T as TAX_FORM_UPDATED_EVENT_KEY } from './eventKeys-f76b6a03.js';
12
13
  import { p as parseStates } from './parseStates-ed75e224.js';
@@ -500,7 +501,7 @@ const GET_BRAND_NAME = dist.gql `
500
501
  }
501
502
  `;
502
503
  function usePartnerInfoModal(props) {
503
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
504
+ var _a, _b, _c, _d, _e, _f, _g;
504
505
  const locale = L();
505
506
  const setVerificationContext = En(VERIFICATION_PARENT_NAMESPACE);
506
507
  const { data: userData, loading: userLoading, refetch, } = wn(GET_USER_PARTNER_INFO, {});
@@ -508,19 +509,36 @@ function usePartnerInfoModal(props) {
508
509
  const { data: currenciesData, loading: currenciesLoading } = wn(GET_CURRENCIES, { variables: { locale } });
509
510
  const { data: countriesData, loading: countriesLoading } = wn(GET_COUNTRIES, {});
510
511
  const { data: tenantSettingsData } = wn(GET_BRAND_NAME, {});
512
+ const { data: financeNetworkData } = wn(GET_FINANCE_NETWORK_SETTINGS, {
513
+ variables: { filter: {} },
514
+ });
511
515
  const [connectImpactPartner, { loading: connectLoading, errors: connectErrors },] = $e(CONNECT_PARTNER);
512
- const [countryCode, setCountryCode] = useState(((_b = (_a = user === null || user === void 0 ? void 0 : user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) === null || _b === void 0 ? void 0 : _b.countryCode) || "");
516
+ const [countryCode, setCountryCode] = useState(((_b = (_a = user === null || user === void 0 ? void 0 : user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) === null || _b === void 0 ? void 0 : _b.countryCode) || "US");
513
517
  const [currency, setCurrency] = useState(((_d = (_c = user === null || user === void 0 ? void 0 : user.impactConnection) === null || _c === void 0 ? void 0 : _c.publisher) === null || _d === void 0 ? void 0 : _d.currency) || "");
518
+ const countries = ((_e = countriesData === null || countriesData === void 0 ? void 0 : countriesData.impactPayoutCountries) === null || _e === void 0 ? void 0 : _e.data) || [];
519
+ // copied from useTaxAndCash for displaying currencies based on country - could be in helper?
520
+ const currencies = useMemo(() => {
521
+ var _a, _b;
522
+ const allValidCurrencies = (_b = (_a = financeNetworkData === null || financeNetworkData === void 0 ? void 0 : financeNetworkData.impactFinanceNetworkSettings) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.reduce((agg, settings) => {
523
+ var _a, _b;
524
+ const currency = (_b = (_a = currenciesData === null || currenciesData === void 0 ? void 0 : currenciesData.currencies) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.find((c) => c.currencyCode === settings.currency);
525
+ if (!currency)
526
+ return agg;
527
+ if (agg.find((c) => c.currencyCode === settings.currency))
528
+ return agg;
529
+ if (countryCode && settings.countryCode !== countryCode)
530
+ return agg;
531
+ return [...agg, currency];
532
+ }, []);
533
+ return (allValidCurrencies || []).sort((a, b) => a.displayName.localeCompare(b.displayName));
534
+ }, [financeNetworkData, currenciesData, countryCode]);
514
535
  console.log(countryCode, currency, "initial country and currency state"); // TEMP
515
536
  const [countrySearch, setCountrySearch] = useState("");
516
537
  const [currencySearch, setCurrencySearch] = useState("");
517
- const [filteredCountries, setFilteredCountries] = useState(((_e = countriesData === null || countriesData === void 0 ? void 0 : countriesData.impactPayoutCountries) === null || _e === void 0 ? void 0 : _e.data) || []);
518
- const [filteredCurrencies, setFilteredCurrencies] = useState(((_f = currenciesData === null || currenciesData === void 0 ? void 0 : currenciesData.currencies) === null || _f === void 0 ? void 0 : _f.data) || []);
538
+ const [filteredCountries, setFilteredCountries] = useState(((_f = countriesData === null || countriesData === void 0 ? void 0 : countriesData.impactPayoutCountries) === null || _f === void 0 ? void 0 : _f.data) || []);
539
+ const [filteredCurrencies, setFilteredCurrencies] = useState(currencies || []);
519
540
  const [error, setError] = useState("");
520
541
  const [success, setSuccess] = useState(false);
521
- const countries = ((_g = countriesData === null || countriesData === void 0 ? void 0 : countriesData.impactPayoutCountries) === null || _g === void 0 ? void 0 : _g.data) || [];
522
- const currencies = ((_h = currenciesData === null || currenciesData === void 0 ? void 0 : currenciesData.currencies) === null || _h === void 0 ? void 0 : _h.data) || [];
523
- console.log(user, "user data from partner info query"); // TEMP
524
542
  useEffect(() => {
525
543
  var _a;
526
544
  if (userData && ((_a = user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher)) {
@@ -610,11 +628,11 @@ function usePartnerInfoModal(props) {
610
628
  setError(props.networkErrorText);
611
629
  }
612
630
  }
613
- console.log(success, "success state in partner info modal");
614
631
  const showModal = !success &&
615
632
  !userLoading &&
616
633
  (!(impactConnection === null || impactConnection === void 0 ? void 0 : impactConnection.connected) || !(impactConnection === null || impactConnection === void 0 ? void 0 : impactConnection.publisher));
617
634
  console.log(showModal, "showModal condition in partner info modal"); // TEMP
635
+ console.log(filteredCurrencies, "filtered curricneis");
618
636
  return {
619
637
  states: {
620
638
  open: showModal,
@@ -625,7 +643,7 @@ function usePartnerInfoModal(props) {
625
643
  currency,
626
644
  error,
627
645
  success,
628
- brandName: ((_j = tenantSettingsData === null || tenantSettingsData === void 0 ? void 0 : tenantSettingsData.tenantSettings) === null || _j === void 0 ? void 0 : _j.companyName) || "",
646
+ brandName: ((_g = tenantSettingsData === null || tenantSettingsData === void 0 ? void 0 : tenantSettingsData.tenantSettings) === null || _g === void 0 ? void 0 : _g.companyName) || "",
629
647
  filteredCountries: filteredCountries || [],
630
648
  filteredCurrencies: filteredCurrencies || [],
631
649
  },
@@ -11,29 +11,21 @@ const style = {
11
11
  fontSize: "var(--sl-font-size-small)",
12
12
  overflow: "visible",
13
13
  },
14
- "&::part(footer)": {
15
- display: "flex",
16
- flexDirection: "column",
17
- padding: "0 var(--sl-spacing-large) var(--sl-spacing-large) var(--sl-spacing-large)",
18
- },
19
14
  "&::part(overlay)": {
20
- background: "rgba(0, 0, 0, 0.5)",
15
+ background: "var(--sl-overlay-background-color)",
21
16
  },
22
17
  },
23
18
  DialogTitle: {
24
19
  fontSize: "var(--sl-font-size-x-large)",
25
20
  fontWeight: "600",
26
- padding: "var(--sl-spacing-x-large) 0 0 0",
21
+ padding: "var(--sl-spacing-large) 0 0 0",
27
22
  margin: "0",
28
23
  },
29
24
  FormFields: {
30
25
  display: "flex",
31
26
  flexDirection: "column",
32
27
  gap: "var(--sl-spacing-medium)",
33
- marginTop: "var(--sl-spacing-medium)",
34
- "& > *": {
35
- flex: 1,
36
- },
28
+ marginTop: "var(--sl-spacing-large)",
37
29
  },
38
30
  ErrorMessage: {
39
31
  color: "var(--sqm-danger-color-text, #d32f2f)",
@@ -58,7 +50,7 @@ const style = {
58
50
  },
59
51
  SubmitButton: {
60
52
  width: "100%",
61
- marginTop: "var(--sl-spacing-small)",
53
+ marginTop: "var(--sl-spacing-large)",
62
54
  },
63
55
  };
64
56
  function PartnerInfoModalContentView(props) {
@@ -72,10 +64,12 @@ function PartnerInfoModalContentView(props) {
72
64
  const buttonLabel = states.isExistingPartner
73
65
  ? text.confirmButtonLabel
74
66
  : text.submitButtonLabel;
75
- return [
76
- h("style", { type: "text/css" }, styleString),
77
- description,
67
+ return (h("div", null,
68
+ h("style", { type: "text/css" },
69
+ " ",
70
+ styleString),
78
71
  h("div", { class: sheet.classes.FormFields },
72
+ description,
79
73
  h("sl-select", { key: `country-${states.countryCode}`, exportparts: "label: input-label, base: input-base", label: text.countryLabel, value: states.countryCode, disabled: states.submitting || !!states.isExistingPartner, required: true, hoist: true, "onSl-select": callbacks.onCountryChange },
80
74
  h("sl-input", { class: sheet.classes.SearchInput, placeholder: text.searchCountryPlaceholder, onKeyDown: (e) => e.stopPropagation(), "onSl-input": (e) => {
81
75
  var _a;
@@ -84,31 +78,38 @@ function PartnerInfoModalContentView(props) {
84
78
  _a.map((c) => (h("sl-menu-item", { value: c.countryCode }, c.displayName)))),
85
79
  h("sl-select", { key: `currency-${states.currency}`, exportparts: "label: input-label, base: input-base", label: text.currencyLabel, value: states.currency, disabled: states.submitting || !!states.isExistingPartner, required: true, hoist: true, "onSl-select": callbacks.onCurrencyChange },
86
80
  h("sl-input", { class: sheet.classes.SearchInput, placeholder: text.searchCurrencyPlaceholder, onKeyDown: (e) => e.stopPropagation(), "onSl-input": (e) => { var _a; return callbacks.setCurrencySearch((_a = e.target) === null || _a === void 0 ? void 0 : _a.value); } }), (_b = states.filteredCurrencies) === null || _b === void 0 ? void 0 :
87
- _b.map((c) => (h("sl-menu-item", { value: c.currencyCode }, c.currencyCode))))),
81
+ _b.map((c) => (h("sl-menu-item", { value: c.currencyCode },
82
+ c.currencyCode,
83
+ " - ",
84
+ c.displayName))))),
88
85
  states.error && h("p", { class: sheet.classes.ErrorMessage }, states.error),
89
- h("sl-button", { slot: "footer", type: "primary", loading: states.submitting, disabled: states.submitting || !states.countryCode || !states.currency, onClick: callbacks.onSubmit, class: sheet.classes.SubmitButton, exportparts: "base: primarybutton-base" }, buttonLabel),
90
- ];
86
+ h("sl-button", { slot: "footer", type: "primary", loading: states.submitting, disabled: states.submitting || !states.countryCode || !states.currency, onClick: callbacks.onSubmit, class: sheet.classes.SubmitButton, exportparts: "base: primarybutton-base" }, buttonLabel)));
91
87
  }
92
88
  function PartnerInfoModalView(props) {
93
- const { states, text } = props;
89
+ const { states, text, callbacks } = props;
94
90
  const sheet = createStyleSheet(style);
91
+ const styleString = sheet.toString();
95
92
  console.log(states, "partner info modal states"); // TEMP
96
93
  if (!states.open)
97
94
  return h("div", null);
98
- return (h("sl-dialog", { class: sheet.classes.Dialog, open: states.open, noHeader: true, label: states.isExistingPartner
99
- ? text.modalHeaderExistingPartner
100
- : text.modalHeader, "onSl-request-close": (e) => {
101
- e.preventDefault();
102
- }, "onSl-hide": (e) => {
103
- var _a;
104
- if (((_a = e.target) === null || _a === void 0 ? void 0 : _a.tagName) === "SL-DIALOG") {
95
+ return (h("div", null,
96
+ h("style", { type: "text/css" },
97
+ " ",
98
+ styleString),
99
+ h("sl-dialog", { class: sheet.classes.Dialog, open: states.open, noHeader: true, label: states.isExistingPartner
100
+ ? text.modalHeaderExistingPartner
101
+ : text.modalHeader, "onSl-request-close": (e) => {
105
102
  e.preventDefault();
106
- }
107
- } },
108
- h("h2", { class: sheet.classes.DialogTitle }, states.isExistingPartner
109
- ? text.modalHeaderExistingPartner
110
- : text.modalHeader),
111
- h(PartnerInfoModalContentView, Object.assign({}, props))));
103
+ }, "onSl-hide": (e) => {
104
+ var _a;
105
+ if (((_a = e.target) === null || _a === void 0 ? void 0 : _a.tagName) === "SL-DIALOG") {
106
+ e.preventDefault();
107
+ }
108
+ } },
109
+ h("h2", { class: sheet.classes.DialogTitle }, states.isExistingPartner
110
+ ? text.modalHeaderExistingPartner
111
+ : text.modalHeader),
112
+ h(PartnerInfoModalContentView, Object.assign({}, props)))));
112
113
  }
113
114
 
114
115
  export { PartnerInfoModalView as P, PartnerInfoModalContentView as a };
@@ -31,10 +31,11 @@ import './ErrorView-74cb3af8.js';
31
31
  import { Q as QrCodeView } from './sqm-qr-code-view-ce476721.js';
32
32
  import { S as StatContainerView, B as BigStatView, a as ShareButtonView, P as PortalChangePasswordView, b as PoweredByImg$1, c as BaseRegistrationFormView, u as useDemoBigStat, T as TaskCardView, C as CardFeedView, d as CheckboxFieldView, e as CouponCodeView, D as DropdownFieldView, E as EditProfileView, L as LeaderboardView, H as HeroView, I as InputFieldView, N as NameFieldsView, f as ChangeMarktingView, g as PortalFooterView, h as PortalFrameView, R as ReferralIframeView, i as RewardExchangeView, r as rewardExchangeCustomErrorMsg, j as rewardExchangeLongText, k as rewardExchangeSelected, l as chooseAmountFixed, m as chooseAmountFixedNoDescription, n as chooseAmountVariable, o as chooseAmountVariableNoDescription, p as chooseAmountVariableDisabled, q as chooseAmountVariableUnavailable, s as confirmFixed, t as confirmVariable, v as redemptionError, w as queryError, x as success, y as successVariable, z as loading, A as empty$1, F as rewardExchange, G as useShareButton, J as useShareLink, K as ProgressBarView, M as ProgressBar$2, O as LeadFormView, Q as LeadDropdownFieldView, U as ShadowViewAddon } from './ShadowViewAddon-657d18f0.js';
33
33
  import { P as PortalContainerView, a as PortalSectionView } from './sqm-portal-container-view-a8c708cd.js';
34
- import { I as InvoiceTableView, a as INDIRECT_TAX_SPAIN_REGIONS, b as INDIRECT_TAX_PROVINCES, O as OtherRegionSlotView, U as UserInfoFormView$1 } from './sqm-user-info-form-view-f9026468.js';
35
- import { t as taxTypeToName, L as LoadingView } from './data-2b0feb3f.js';
34
+ import { I as InvoiceTableView, a as INDIRECT_TAX_SPAIN_REGIONS, b as INDIRECT_TAX_PROVINCES, O as OtherRegionSlotView, U as UserInfoFormView$1 } from './sqm-user-info-form-view-ff8e47ad.js';
35
+ import { t as taxTypeToName, L as LoadingView } from './utils-8267d3d8.js';
36
36
  import { L as LeadInputFieldView } from './sqm-lead-input-field-view-11a4f9a9.js';
37
- import { P as PartnerInfoModalView } from './sqm-partner-info-modal-view-f85b5a08.js';
37
+ import './data-2380309a.js';
38
+ import { P as PartnerInfoModalView } from './sqm-partner-info-modal-view-78d2bc6e.js';
38
39
 
39
40
  /**
40
41
  * lodash (Custom Build) <https://lodash.com/>
@@ -1,7 +1,8 @@
1
1
  import { h } from './index-38ad4957.js';
2
2
  import { i as intl } from './global-39f55ec2.js';
3
3
  import { c as createStyleSheet } from './JSS-67b5cff8.js';
4
- import { f as formatErrorMessage, L as LoadingView, F as FORM_STEPS, v as validateBillingField } from './data-2b0feb3f.js';
4
+ import { f as formatErrorMessage, L as LoadingView, v as validateBillingField } from './utils-8267d3d8.js';
5
+ import { F as FORM_STEPS } from './data-2380309a.js';
5
6
 
6
7
  const style = {
7
8
  Description: {
@@ -0,0 +1,85 @@
1
+ import { h } from './index-38ad4957.js';
2
+ import { i as intl } from './global-39f55ec2.js';
3
+ import { c as createStyleSheet } from './JSS-67b5cff8.js';
4
+
5
+ const style = {
6
+ Container: {
7
+ display: "flex",
8
+ flexDirection: "column",
9
+ gap: "35px",
10
+ },
11
+ HeaderContainer: {
12
+ display: "flex",
13
+ flexDirection: "column",
14
+ gap: "10px",
15
+ },
16
+ };
17
+ const sheet = createStyleSheet(style);
18
+ const styleString = sheet.toString();
19
+ const LoadingView = () => {
20
+ return (h("div", { class: sheet.classes.Container },
21
+ h("style", { type: "text/css" }, styleString),
22
+ h("sqm-skeleton", { width: "45%", height: "40px !important" }),
23
+ h("div", { class: sheet.classes.HeaderContainer },
24
+ h("sqm-skeleton", { width: "15%" }),
25
+ h("sqm-skeleton", { width: "25%", height: "30px !important" })),
26
+ h("sqm-skeleton", { width: "75%", height: "35px" }),
27
+ h("sqm-skeleton", { width: "75%", height: "35px" }),
28
+ h("sqm-skeleton", { width: "75%", height: "35px" }),
29
+ h("sqm-skeleton", { width: "75%", height: "35px" }),
30
+ h("sqm-skeleton", { width: "75%", height: "35px" }),
31
+ h("sqm-skeleton", { width: "75%", height: "35px" }),
32
+ h("sqm-skeleton", { width: "75%", height: "35px" }),
33
+ h("sqm-skeleton", { width: "75%", height: "35px" }),
34
+ h("sqm-skeleton", { width: "75%", height: "35px" }),
35
+ h("sqm-skeleton", { width: "75%", height: "35px" }),
36
+ h("sqm-skeleton", { width: "75%", height: "35px" }),
37
+ h("sqm-skeleton", { width: "15%" }),
38
+ h("sqm-skeleton", { width: "80px", height: "30px !important" })));
39
+ };
40
+
41
+ function validTaxDocument(requiredType) {
42
+ const validTypes = ["W9", "W8BENE", "W8BEN"];
43
+ if (validTypes.includes(requiredType))
44
+ return true;
45
+ return false;
46
+ }
47
+ const objectIsFull = (obj) => {
48
+ return !Object.keys(obj).find((k) => obj[k] == undefined);
49
+ };
50
+ const taxTypeToName = (taxType) => {
51
+ switch (taxType) {
52
+ case "W9":
53
+ return "W-9";
54
+ case "W8BEN":
55
+ case "W8BENE":
56
+ return "W-8";
57
+ default:
58
+ return "";
59
+ }
60
+ };
61
+ function validateBillingField(regex, value) {
62
+ const trimmed = value.trim();
63
+ const idx = trimmed.search(regex);
64
+ return idx > -1;
65
+ }
66
+ const formatErrorMessage = (fieldName, errorMessage) => {
67
+ return intl.formatMessage({
68
+ id: fieldName,
69
+ defaultMessage: errorMessage,
70
+ }, {
71
+ fieldName,
72
+ });
73
+ };
74
+ function getCountryObj({ countryCode, locale, }) {
75
+ // @ts-ignore DisplayNames not in Intl type
76
+ const displayName = new Intl.DisplayNames([locale], {
77
+ type: "region",
78
+ }).of(countryCode);
79
+ return {
80
+ countryCode,
81
+ displayName,
82
+ };
83
+ }
84
+
85
+ export { LoadingView as L, validTaxDocument as a, formatErrorMessage as f, getCountryObj as g, objectIsFull as o, taxTypeToName as t, validateBillingField as v };
@@ -0,0 +1 @@
1
+ var __makeTemplateObject=this&&this.__makeTemplateObject||function(n,e){if(Object.defineProperty){Object.defineProperty(n,"raw",{value:e})}else{n.raw=e}return n};import{d as dist}from"./index.module-cede12c6.js";var TAX_CONTEXT_NAMESPACE="sq:tax-and-cash";var TAX_FORM_CONTEXT_NAMESPACE="sq:tax-form-context";var USER_QUERY_NAMESPACE="sq:user-info-query";var USER_FORM_CONTEXT_NAMESPACE="sq:user-form-context";var FINANCE_NETWORK_SETTINGS_NAMESPACE="sq:finance-network-settings";var COUNTRIES_NAMESPACE="sq:countries:list";var SORTED_COUNTRIES_NAMESPACE="sq:countries:sorted";var COUNTRIES_QUERY_NAMESPACE="sq:countries:query";var CURRENCIES_NAMESPACE="sq:currencies:list";var CURRENCIES_QUERY_NAMESPACE="sq:currencies:query";var GET_USER=dist.gql(templateObject_1||(templateObject_1=__makeTemplateObject(["\n query getUserTaxInfo {\n user: viewer {\n ... on User {\n id\n firstName\n lastName\n email\n countryCode\n customFields\n rewards(limit: 1000) {\n data {\n statuses\n partnerFundsTransfer {\n id\n status\n dateScheduled\n dateCreated\n dateTransferred\n }\n }\n }\n managedIdentity {\n uid\n email\n emailVerified\n }\n impactConnection {\n connected\n user {\n firstName\n lastName\n }\n publisher {\n id\n brandedSignup\n countryCode\n currency\n billingAddress\n billingCity\n billingState\n billingCountryCode\n billingPostalCode\n phoneNumberCountryCode\n phoneNumber\n taxInformation {\n indirectTaxId\n indirectTaxCountryCode\n indirectTaxRegion\n additionalTaxId\n withholdingTaxId\n withholdingTaxCountryCode\n }\n requiredTaxDocumentType\n currentTaxDocument {\n status\n type\n dateCreated\n }\n withdrawalSettings {\n paymentMethod\n paypalEmailAddress\n bankCountry\n bankAccountNumber\n paymentSchedulingType\n paymentThreshold\n paymentDay\n }\n payoutsAccount {\n hold\n holdReasons\n balance\n }\n }\n }\n }\n }\n }\n"],["\n query getUserTaxInfo {\n user: viewer {\n ... on User {\n id\n firstName\n lastName\n email\n countryCode\n customFields\n rewards(limit: 1000) {\n data {\n statuses\n partnerFundsTransfer {\n id\n status\n dateScheduled\n dateCreated\n dateTransferred\n }\n }\n }\n managedIdentity {\n uid\n email\n emailVerified\n }\n impactConnection {\n connected\n user {\n firstName\n lastName\n }\n publisher {\n id\n brandedSignup\n countryCode\n currency\n billingAddress\n billingCity\n billingState\n billingCountryCode\n billingPostalCode\n phoneNumberCountryCode\n phoneNumber\n taxInformation {\n indirectTaxId\n indirectTaxCountryCode\n indirectTaxRegion\n additionalTaxId\n withholdingTaxId\n withholdingTaxCountryCode\n }\n requiredTaxDocumentType\n currentTaxDocument {\n status\n type\n dateCreated\n }\n withdrawalSettings {\n paymentMethod\n paypalEmailAddress\n bankCountry\n bankAccountNumber\n paymentSchedulingType\n paymentThreshold\n paymentDay\n }\n payoutsAccount {\n hold\n holdReasons\n balance\n }\n }\n }\n }\n }\n }\n"])));var GET_COUNTRIES=dist.gql(templateObject_2||(templateObject_2=__makeTemplateObject(["\n query getCountries {\n impactPayoutCountries(limit: 1000) {\n data {\n countryCode\n displayName\n }\n }\n }\n"],["\n query getCountries {\n impactPayoutCountries(limit: 1000) {\n data {\n countryCode\n displayName\n }\n }\n }\n"])));var GET_CURRENCIES=dist.gql(templateObject_3||(templateObject_3=__makeTemplateObject(["\n query currencies($locale: RSLocale) {\n currencies(limit: 300) {\n data {\n displayName(locale: $locale)\n currencyCode\n }\n }\n }\n"],["\n query currencies($locale: RSLocale) {\n currencies(limit: 300) {\n data {\n displayName(locale: $locale)\n currencyCode\n }\n }\n }\n"])));var GET_FINANCE_NETWORK_SETTINGS=dist.gql(templateObject_4||(templateObject_4=__makeTemplateObject(["\n query impactFinanceNetworkSettings(\n $filter: ImpactFinanceNetworkSettingsFilterInput\n ) {\n impactFinanceNetworkSettings(filter: $filter, limit: 1000) {\n data {\n countryCode\n currency\n defaultFinancePaymentMethodId\n thresholdOptions\n withdrawalSettingId\n internationalEftFee\n foreignFxFee\n defaultFxFee\n }\n totalCount\n }\n }\n"],["\n query impactFinanceNetworkSettings(\n $filter: ImpactFinanceNetworkSettingsFilterInput\n ) {\n impactFinanceNetworkSettings(filter: $filter, limit: 1000) {\n data {\n countryCode\n currency\n defaultFinancePaymentMethodId\n thresholdOptions\n withdrawalSettingId\n internationalEftFee\n foreignFxFee\n defaultFxFee\n }\n totalCount\n }\n }\n"])));var FORM_STEPS=4;export{CURRENCIES_NAMESPACE as C,FORM_STEPS as F,GET_USER as G,SORTED_COUNTRIES_NAMESPACE as S,TAX_CONTEXT_NAMESPACE as T,USER_FORM_CONTEXT_NAMESPACE as U,TAX_FORM_CONTEXT_NAMESPACE as a,COUNTRIES_NAMESPACE as b,USER_QUERY_NAMESPACE as c,COUNTRIES_QUERY_NAMESPACE as d,GET_COUNTRIES as e,FINANCE_NETWORK_SETTINGS_NAMESPACE as f,GET_FINANCE_NETWORK_SETTINGS as g,CURRENCIES_QUERY_NAMESPACE as h,GET_CURRENCIES as i};var templateObject_1,templateObject_2,templateObject_3,templateObject_4;