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

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 (31) hide show
  1. package/dist/cjs/sqm-big-stat_46.cjs.entry.js +34 -33
  2. package/dist/cjs/sqm-email-verification_2.cjs.entry.js +5 -2
  3. package/dist/cjs/{sqm-partner-info-modal-view-0821eea3.js → sqm-partner-info-modal-view-ac5e3e60.js} +2 -2
  4. package/dist/cjs/sqm-stencilbook.cjs.entry.js +1 -1
  5. package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal-view.js +2 -2
  6. package/dist/collection/components/sqm-partner-info-modal/usePartnerInfoModal.js +4 -1
  7. package/dist/collection/components/sqm-widget-verification/sqm-widget-verification.js +28 -28
  8. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.js +4 -3
  9. package/dist/esm/sqm-big-stat_46.entry.js +34 -33
  10. package/dist/esm/sqm-email-verification_2.entry.js +5 -2
  11. package/dist/esm/{sqm-partner-info-modal-view-78d2bc6e.js → sqm-partner-info-modal-view-68479829.js} +2 -2
  12. package/dist/esm/sqm-stencilbook.entry.js +1 -1
  13. package/dist/esm-es5/sqm-big-stat_46.entry.js +1 -1
  14. package/dist/esm-es5/sqm-email-verification_2.entry.js +1 -1
  15. package/dist/esm-es5/sqm-partner-info-modal-view-68479829.js +1 -0
  16. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  17. package/dist/mint-components/mint-components.esm.js +1 -1
  18. package/dist/mint-components/{p-5d40ccd0.system.entry.js → p-1bb8ab0e.system.entry.js} +1 -1
  19. package/dist/mint-components/p-1c413a06.system.js +1 -1
  20. package/dist/mint-components/p-22a4b4a6.system.js +1 -0
  21. package/dist/mint-components/{p-134df0e0.entry.js → p-4015a90b.entry.js} +4 -4
  22. package/dist/mint-components/{p-d4446e58.system.entry.js → p-79e4ec63.system.entry.js} +1 -1
  23. package/dist/mint-components/{p-527cb9c6.entry.js → p-860541f2.entry.js} +1 -1
  24. package/dist/mint-components/{p-8ccc3449.entry.js → p-de793f38.entry.js} +2 -2
  25. package/dist/mint-components/p-f686a911.js +1 -0
  26. package/dist/mint-components/{p-9d89bd75.system.entry.js → p-ff91e6fd.system.entry.js} +1 -1
  27. package/docs/docs.docx +0 -0
  28. package/package.json +1 -1
  29. package/dist/esm-es5/sqm-partner-info-modal-view-78d2bc6e.js +0 -1
  30. package/dist/mint-components/p-80c3ec2a.system.js +0 -1
  31. package/dist/mint-components/p-af5cd4cf.js +0 -1
@@ -6418,13 +6418,14 @@ function getCurrentStep(user) {
6418
6418
  if (!((_a = user.impactConnection) === null || _a === void 0 ? void 0 : _a.connected) || !((_b = user.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher)) {
6419
6419
  return "/1";
6420
6420
  }
6421
- const { requiredTaxDocumentType, currentTaxDocument, withdrawalSettings, brandedSignup, payoutsAccount, billingAddress, phoneNumber, billingCity, billingPostalCode, billingState, } = user.impactConnection.publisher;
6422
- console.log(phoneNumber, "phone number in getCurrentStep");
6421
+ const { requiredTaxDocumentType, currentTaxDocument, withdrawalSettings, brandedSignup, payoutsAccount, billingAddress, phoneNumber, billingCity, billingPostalCode, billingState, countryCode, } = user.impactConnection.publisher;
6422
+ console.log(user.impactConnection.publisher, "publisher data in useTaxAndCash to determine step");
6423
6423
  // Early partner creation does not collect these fields
6424
+ const stateRequired = ["ES", "AU", "US", "CA"].includes(countryCode);
6424
6425
  if (!billingAddress ||
6425
6426
  !billingCity ||
6426
6427
  !billingPostalCode ||
6427
- !billingState ||
6428
+ (stateRequired && !billingState) ||
6428
6429
  !phoneNumber) {
6429
6430
  return "/1";
6430
6431
  }
@@ -8031,6 +8032,34 @@ function useWidgetVerification() {
8031
8032
  return { showCode, showPartnerModal, onVerification, onPartnerModalComplete, loading };
8032
8033
  }
8033
8034
 
8035
+ const style$3 = {
8036
+ Dialog: {
8037
+ "&::part(panel)": {
8038
+ maxWidth: "480px",
8039
+ },
8040
+ "&::part(body)": {
8041
+ padding: "0 var(--sl-spacing-x-large)",
8042
+ fontSize: "var(--sl-font-size-small)",
8043
+ overflow: "visible",
8044
+ },
8045
+ "&::part(footer)": {
8046
+ display: "flex",
8047
+ flexDirection: "column",
8048
+ gap: "var(--sl-spacing-small)",
8049
+ },
8050
+ "&::part(overlay)": {
8051
+ background: "rgba(0, 0, 0, 0.5)",
8052
+ },
8053
+ },
8054
+ DialogTitle: {
8055
+ fontSize: "var(--sl-font-size-x-large)",
8056
+ fontWeight: "600",
8057
+ padding: "var(--sl-spacing-x-large) 0 0 0",
8058
+ margin: "0",
8059
+ },
8060
+ };
8061
+ const sheet$3 = JSS.createStyleSheet(style$3);
8062
+ const styleString$3 = sheet$3.toString();
8034
8063
  const WidgetVerification = class {
8035
8064
  constructor(hostRef) {
8036
8065
  index.registerInstance(this, hostRef);
@@ -8237,34 +8266,6 @@ const WidgetVerification = class {
8237
8266
  if (props.showPartnerModal && ((_a = partnerState === null || partnerState === void 0 ? void 0 : partnerState.states) === null || _a === void 0 ? void 0 : _a.open) === false) {
8238
8267
  return index.h("div", null);
8239
8268
  }
8240
- const style = {
8241
- Dialog: {
8242
- "&::part(panel)": {
8243
- maxWidth: "480px",
8244
- },
8245
- "&::part(body)": {
8246
- padding: "0 var(--sl-spacing-x-large)",
8247
- fontSize: "var(--sl-font-size-small)",
8248
- overflow: "visible",
8249
- },
8250
- "&::part(footer)": {
8251
- display: "flex",
8252
- flexDirection: "column",
8253
- gap: "var(--sl-spacing-small)",
8254
- },
8255
- "&::part(overlay)": {
8256
- background: "rgba(0, 0, 0, 0.5)",
8257
- },
8258
- },
8259
- DialogTitle: {
8260
- fontSize: "var(--sl-font-size-x-large)",
8261
- fontWeight: "600",
8262
- padding: "var(--sl-spacing-x-large) 0 0 0",
8263
- margin: "0",
8264
- },
8265
- };
8266
- const sheet = JSS.createStyleSheet(style);
8267
- const styleString = sheet.toString();
8268
8269
  // const generalText = this.getStepTextProps("general_");
8269
8270
  const partnerText = this.getStepTextProps("createPartnerStep_");
8270
8271
  const dialogLabel = this.general_widgetHeaderWithPartnerCreation;
@@ -8277,14 +8278,14 @@ const WidgetVerification = class {
8277
8278
  }
8278
8279
  return (index.h("sqm-email-verification", Object.assign({}, this.getStepTextProps("emailStep_"), extractProps(props, "sqm-email-verification_"))));
8279
8280
  };
8280
- return (index.h("div", null, index.h("style", { type: "text/css" }, styleString), index.h("sl-dialog", { class: sheet.classes.Dialog, noHeader: true, open: true, label: dialogLabel, "onSl-request-close": (e) => {
8281
+ return (index.h("div", null, index.h("style", { type: "text/css" }, styleString$3), index.h("sl-dialog", { class: sheet$3.classes.Dialog, noHeader: true, open: true, label: dialogLabel, "onSl-request-close": (e) => {
8281
8282
  e.preventDefault();
8282
8283
  }, "onSl-hide": (e) => {
8283
8284
  var _a;
8284
8285
  if (((_a = e.target) === null || _a === void 0 ? void 0 : _a.tagName) === "SL-DIALOG") {
8285
8286
  e.preventDefault();
8286
8287
  }
8287
- } }, index.h("h2", { class: sheet.classes.DialogTitle }, dialogLabel), renderStepContent())));
8288
+ } }, index.h("h2", { class: sheet$3.classes.DialogTitle }, dialogLabel), renderStepContent())));
8288
8289
  }
8289
8290
  };
8290
8291
  function useDemoWidgetVerificationInternal(props) {
@@ -11,7 +11,7 @@ const utils = require('./utils-6847bc06.js');
11
11
  const JSS = require('./JSS-8503a151.js');
12
12
  const sqmTextSpanView = require('./sqm-text-span-view-f274fdf2.js');
13
13
  const data = require('./data-34bc7549.js');
14
- const sqmPartnerInfoModalView = require('./sqm-partner-info-modal-view-0821eea3.js');
14
+ const sqmPartnerInfoModalView = require('./sqm-partner-info-modal-view-ac5e3e60.js');
15
15
  const keys = require('./keys-cff24974.js');
16
16
  const eventKeys = require('./eventKeys-7af4df4d.js');
17
17
  const parseStates = require('./parseStates-d1effc19.js');
@@ -517,7 +517,9 @@ function usePartnerInfoModal(props) {
517
517
  variables: { filter: {} },
518
518
  });
519
519
  const [connectImpactPartner, { loading: connectLoading, errors: connectErrors },] = index_module.$e(CONNECT_PARTNER);
520
- const [countryCode, setCountryCode] = domContextHooks_module.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");
520
+ // No pre-filled country, use locale to determine countryCode instead
521
+ const [countryCode, setCountryCode] = domContextHooks_module.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) ||
522
+ locale.replace(/^.*_/, ""));
521
523
  const [currency, setCurrency] = domContextHooks_module.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) || "");
522
524
  const countries = ((_e = countriesData === null || countriesData === void 0 ? void 0 : countriesData.impactPayoutCountries) === null || _e === void 0 ? void 0 : _e.data) || [];
523
525
  // copied from useTaxAndCash for displaying currencies based on country - could be in helper?
@@ -541,6 +543,7 @@ function usePartnerInfoModal(props) {
541
543
  const [currencySearch, setCurrencySearch] = domContextHooks_module.useState("");
542
544
  const [filteredCountries, setFilteredCountries] = domContextHooks_module.useState(((_f = countriesData === null || countriesData === void 0 ? void 0 : countriesData.impactPayoutCountries) === null || _f === void 0 ? void 0 : _f.data) || []);
543
545
  const [filteredCurrencies, setFilteredCurrencies] = domContextHooks_module.useState(currencies || []);
546
+ console.log(userData, "userData partner info modal");
544
547
  const [error, setError] = domContextHooks_module.useState("");
545
548
  const [success, setSuccess] = domContextHooks_module.useState(false);
546
549
  domContextHooks_module.useEffect(() => {
@@ -72,13 +72,13 @@ function PartnerInfoModalContentView(props) {
72
72
  styleString),
73
73
  index.h("div", { class: sheet.classes.FormFields },
74
74
  description,
75
- index.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 },
75
+ index.h("sl-select", { 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 },
76
76
  index.h("sl-input", { class: sheet.classes.SearchInput, placeholder: text.searchCountryPlaceholder, onKeyDown: (e) => e.stopPropagation(), "onSl-input": (e) => {
77
77
  var _a;
78
78
  callbacks.setCountrySearch((_a = e.target) === null || _a === void 0 ? void 0 : _a.value);
79
79
  } }), (_a = states.filteredCountries) === null || _a === void 0 ? void 0 :
80
80
  _a.map((c) => (index.h("sl-menu-item", { value: c.countryCode }, c.displayName)))),
81
- index.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 },
81
+ index.h("sl-select", { 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 },
82
82
  index.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 :
83
83
  _b.map((c) => (index.h("sl-menu-item", { value: c.currencyCode },
84
84
  c.currencyCode,
@@ -39,7 +39,7 @@ const sqmUserInfoFormView = require('./sqm-user-info-form-view-d89bdc04.js');
39
39
  const utils = require('./utils-a8e0bd9b.js');
40
40
  const sqmLeadInputFieldView = require('./sqm-lead-input-field-view-818d9e9a.js');
41
41
  require('./data-34bc7549.js');
42
- const sqmPartnerInfoModalView = require('./sqm-partner-info-modal-view-0821eea3.js');
42
+ const sqmPartnerInfoModalView = require('./sqm-partner-info-modal-view-ac5e3e60.js');
43
43
 
44
44
  /**
45
45
  * lodash (Custom Build) <https://lodash.com/>
@@ -69,13 +69,13 @@ export function PartnerInfoModalContentView(props) {
69
69
  styleString),
70
70
  h("div", { class: sheet.classes.FormFields },
71
71
  description,
72
- 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 },
72
+ h("sl-select", { 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 },
73
73
  h("sl-input", { class: sheet.classes.SearchInput, placeholder: text.searchCountryPlaceholder, onKeyDown: (e) => e.stopPropagation(), "onSl-input": (e) => {
74
74
  var _a;
75
75
  callbacks.setCountrySearch((_a = e.target) === null || _a === void 0 ? void 0 : _a.value);
76
76
  } }), (_a = states.filteredCountries) === null || _a === void 0 ? void 0 :
77
77
  _a.map((c) => (h("sl-menu-item", { value: c.countryCode }, c.displayName)))),
78
- 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 },
78
+ h("sl-select", { 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 },
79
79
  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 :
80
80
  _b.map((c) => (h("sl-menu-item", { value: c.currencyCode },
81
81
  c.currencyCode,
@@ -104,7 +104,9 @@ export function usePartnerInfoModal(props) {
104
104
  variables: { filter: {} },
105
105
  });
106
106
  const [connectImpactPartner, { loading: connectLoading, errors: connectErrors },] = useMutation(CONNECT_PARTNER);
107
- 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");
107
+ // No pre-filled country, use locale to determine countryCode instead
108
+ 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) ||
109
+ locale.replace(/^.*_/, ""));
108
110
  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) || "");
109
111
  const countries = ((_e = countriesData === null || countriesData === void 0 ? void 0 : countriesData.impactPayoutCountries) === null || _e === void 0 ? void 0 : _e.data) || [];
110
112
  // copied from useTaxAndCash for displaying currencies based on country - could be in helper?
@@ -128,6 +130,7 @@ export function usePartnerInfoModal(props) {
128
130
  const [currencySearch, setCurrencySearch] = useState("");
129
131
  const [filteredCountries, setFilteredCountries] = useState(((_f = countriesData === null || countriesData === void 0 ? void 0 : countriesData.impactPayoutCountries) === null || _f === void 0 ? void 0 : _f.data) || []);
130
132
  const [filteredCurrencies, setFilteredCurrencies] = useState(currencies || []);
133
+ console.log(userData, "userData partner info modal");
131
134
  const [error, setError] = useState("");
132
135
  const [success, setSuccess] = useState(false);
133
136
  useEffect(() => {
@@ -8,6 +8,34 @@ import { extractProps } from "../tax-and-cash/sqm-tax-and-cash/extractProps";
8
8
  import { SHOW_CODE_NAMESPACE, VERIFICATION_EMAIL_NAMESPACE, VERIFICATION_PARENT_NAMESPACE, } from "./keys";
9
9
  import { useWidgetVerification } from "./useWidgetVerification";
10
10
  import { createStyleSheet } from "../../styling/JSS";
11
+ const style = {
12
+ Dialog: {
13
+ "&::part(panel)": {
14
+ maxWidth: "480px",
15
+ },
16
+ "&::part(body)": {
17
+ padding: "0 var(--sl-spacing-x-large)",
18
+ fontSize: "var(--sl-font-size-small)",
19
+ overflow: "visible",
20
+ },
21
+ "&::part(footer)": {
22
+ display: "flex",
23
+ flexDirection: "column",
24
+ gap: "var(--sl-spacing-small)",
25
+ },
26
+ "&::part(overlay)": {
27
+ background: "rgba(0, 0, 0, 0.5)",
28
+ },
29
+ },
30
+ DialogTitle: {
31
+ fontSize: "var(--sl-font-size-x-large)",
32
+ fontWeight: "600",
33
+ padding: "var(--sl-spacing-x-large) 0 0 0",
34
+ margin: "0",
35
+ },
36
+ };
37
+ const sheet = createStyleSheet(style);
38
+ const styleString = sheet.toString();
11
39
  /**
12
40
  * @uiName Widget Verification Flow
13
41
  * @exampleGroup Widget Verification
@@ -218,34 +246,6 @@ export class WidgetVerification {
218
246
  if (props.showPartnerModal && ((_a = partnerState === null || partnerState === void 0 ? void 0 : partnerState.states) === null || _a === void 0 ? void 0 : _a.open) === false) {
219
247
  return h("div", null);
220
248
  }
221
- const style = {
222
- Dialog: {
223
- "&::part(panel)": {
224
- maxWidth: "480px",
225
- },
226
- "&::part(body)": {
227
- padding: "0 var(--sl-spacing-x-large)",
228
- fontSize: "var(--sl-font-size-small)",
229
- overflow: "visible",
230
- },
231
- "&::part(footer)": {
232
- display: "flex",
233
- flexDirection: "column",
234
- gap: "var(--sl-spacing-small)",
235
- },
236
- "&::part(overlay)": {
237
- background: "rgba(0, 0, 0, 0.5)",
238
- },
239
- },
240
- DialogTitle: {
241
- fontSize: "var(--sl-font-size-x-large)",
242
- fontWeight: "600",
243
- padding: "var(--sl-spacing-x-large) 0 0 0",
244
- margin: "0",
245
- },
246
- };
247
- const sheet = createStyleSheet(style);
248
- const styleString = sheet.toString();
249
249
  // const generalText = this.getStepTextProps("general_");
250
250
  const partnerText = this.getStepTextProps("createPartnerStep_");
251
251
  const dialogLabel = this.general_widgetHeaderWithPartnerCreation;
@@ -7,13 +7,14 @@ function getCurrentStep(user) {
7
7
  if (!((_a = user.impactConnection) === null || _a === void 0 ? void 0 : _a.connected) || !((_b = user.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher)) {
8
8
  return "/1";
9
9
  }
10
- const { requiredTaxDocumentType, currentTaxDocument, withdrawalSettings, brandedSignup, payoutsAccount, billingAddress, phoneNumber, billingCity, billingPostalCode, billingState, } = user.impactConnection.publisher;
11
- console.log(phoneNumber, "phone number in getCurrentStep");
10
+ const { requiredTaxDocumentType, currentTaxDocument, withdrawalSettings, brandedSignup, payoutsAccount, billingAddress, phoneNumber, billingCity, billingPostalCode, billingState, countryCode, } = user.impactConnection.publisher;
11
+ console.log(user.impactConnection.publisher, "publisher data in useTaxAndCash to determine step");
12
12
  // Early partner creation does not collect these fields
13
+ const stateRequired = ["ES", "AU", "US", "CA"].includes(countryCode);
13
14
  if (!billingAddress ||
14
15
  !billingCity ||
15
16
  !billingPostalCode ||
16
- !billingState ||
17
+ (stateRequired && !billingState) ||
17
18
  !phoneNumber) {
18
19
  return "/1";
19
20
  }
@@ -6414,13 +6414,14 @@ function getCurrentStep(user) {
6414
6414
  if (!((_a = user.impactConnection) === null || _a === void 0 ? void 0 : _a.connected) || !((_b = user.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher)) {
6415
6415
  return "/1";
6416
6416
  }
6417
- const { requiredTaxDocumentType, currentTaxDocument, withdrawalSettings, brandedSignup, payoutsAccount, billingAddress, phoneNumber, billingCity, billingPostalCode, billingState, } = user.impactConnection.publisher;
6418
- console.log(phoneNumber, "phone number in getCurrentStep");
6417
+ const { requiredTaxDocumentType, currentTaxDocument, withdrawalSettings, brandedSignup, payoutsAccount, billingAddress, phoneNumber, billingCity, billingPostalCode, billingState, countryCode, } = user.impactConnection.publisher;
6418
+ console.log(user.impactConnection.publisher, "publisher data in useTaxAndCash to determine step");
6419
6419
  // Early partner creation does not collect these fields
6420
+ const stateRequired = ["ES", "AU", "US", "CA"].includes(countryCode);
6420
6421
  if (!billingAddress ||
6421
6422
  !billingCity ||
6422
6423
  !billingPostalCode ||
6423
- !billingState ||
6424
+ (stateRequired && !billingState) ||
6424
6425
  !phoneNumber) {
6425
6426
  return "/1";
6426
6427
  }
@@ -8027,6 +8028,34 @@ function useWidgetVerification() {
8027
8028
  return { showCode, showPartnerModal, onVerification, onPartnerModalComplete, loading };
8028
8029
  }
8029
8030
 
8031
+ const style$3 = {
8032
+ Dialog: {
8033
+ "&::part(panel)": {
8034
+ maxWidth: "480px",
8035
+ },
8036
+ "&::part(body)": {
8037
+ padding: "0 var(--sl-spacing-x-large)",
8038
+ fontSize: "var(--sl-font-size-small)",
8039
+ overflow: "visible",
8040
+ },
8041
+ "&::part(footer)": {
8042
+ display: "flex",
8043
+ flexDirection: "column",
8044
+ gap: "var(--sl-spacing-small)",
8045
+ },
8046
+ "&::part(overlay)": {
8047
+ background: "rgba(0, 0, 0, 0.5)",
8048
+ },
8049
+ },
8050
+ DialogTitle: {
8051
+ fontSize: "var(--sl-font-size-x-large)",
8052
+ fontWeight: "600",
8053
+ padding: "var(--sl-spacing-x-large) 0 0 0",
8054
+ margin: "0",
8055
+ },
8056
+ };
8057
+ const sheet$3 = createStyleSheet(style$3);
8058
+ const styleString$3 = sheet$3.toString();
8030
8059
  const WidgetVerification = class {
8031
8060
  constructor(hostRef) {
8032
8061
  registerInstance(this, hostRef);
@@ -8233,34 +8262,6 @@ const WidgetVerification = class {
8233
8262
  if (props.showPartnerModal && ((_a = partnerState === null || partnerState === void 0 ? void 0 : partnerState.states) === null || _a === void 0 ? void 0 : _a.open) === false) {
8234
8263
  return h$1("div", null);
8235
8264
  }
8236
- const style = {
8237
- Dialog: {
8238
- "&::part(panel)": {
8239
- maxWidth: "480px",
8240
- },
8241
- "&::part(body)": {
8242
- padding: "0 var(--sl-spacing-x-large)",
8243
- fontSize: "var(--sl-font-size-small)",
8244
- overflow: "visible",
8245
- },
8246
- "&::part(footer)": {
8247
- display: "flex",
8248
- flexDirection: "column",
8249
- gap: "var(--sl-spacing-small)",
8250
- },
8251
- "&::part(overlay)": {
8252
- background: "rgba(0, 0, 0, 0.5)",
8253
- },
8254
- },
8255
- DialogTitle: {
8256
- fontSize: "var(--sl-font-size-x-large)",
8257
- fontWeight: "600",
8258
- padding: "var(--sl-spacing-x-large) 0 0 0",
8259
- margin: "0",
8260
- },
8261
- };
8262
- const sheet = createStyleSheet(style);
8263
- const styleString = sheet.toString();
8264
8265
  // const generalText = this.getStepTextProps("general_");
8265
8266
  const partnerText = this.getStepTextProps("createPartnerStep_");
8266
8267
  const dialogLabel = this.general_widgetHeaderWithPartnerCreation;
@@ -8273,14 +8274,14 @@ const WidgetVerification = class {
8273
8274
  }
8274
8275
  return (h$1("sqm-email-verification", Object.assign({}, this.getStepTextProps("emailStep_"), extractProps(props, "sqm-email-verification_"))));
8275
8276
  };
8276
- return (h$1("div", null, h$1("style", { type: "text/css" }, styleString), h$1("sl-dialog", { class: sheet.classes.Dialog, noHeader: true, open: true, label: dialogLabel, "onSl-request-close": (e) => {
8277
+ return (h$1("div", null, h$1("style", { type: "text/css" }, styleString$3), h$1("sl-dialog", { class: sheet$3.classes.Dialog, noHeader: true, open: true, label: dialogLabel, "onSl-request-close": (e) => {
8277
8278
  e.preventDefault();
8278
8279
  }, "onSl-hide": (e) => {
8279
8280
  var _a;
8280
8281
  if (((_a = e.target) === null || _a === void 0 ? void 0 : _a.tagName) === "SL-DIALOG") {
8281
8282
  e.preventDefault();
8282
8283
  }
8283
- } }, h$1("h2", { class: sheet.classes.DialogTitle }, dialogLabel), renderStepContent())));
8284
+ } }, h$1("h2", { class: sheet$3.classes.DialogTitle }, dialogLabel), renderStepContent())));
8284
8285
  }
8285
8286
  };
8286
8287
  function useDemoWidgetVerificationInternal(props) {
@@ -7,7 +7,7 @@ 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
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
+ import { a as PartnerInfoModalContentView, P as PartnerInfoModalView } from './sqm-partner-info-modal-view-68479829.js';
11
11
  import { S as SHOW_CODE_NAMESPACE, a as VERIFICATION_EMAIL_NAMESPACE, V as VERIFICATION_PARENT_NAMESPACE } from './keys-db1897ae.js';
12
12
  import { T as TAX_FORM_UPDATED_EVENT_KEY } from './eventKeys-f76b6a03.js';
13
13
  import { p as parseStates } from './parseStates-ed75e224.js';
@@ -513,7 +513,9 @@ function usePartnerInfoModal(props) {
513
513
  variables: { filter: {} },
514
514
  });
515
515
  const [connectImpactPartner, { loading: connectLoading, errors: connectErrors },] = $e(CONNECT_PARTNER);
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");
516
+ // No pre-filled country, use locale to determine countryCode instead
517
+ 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) ||
518
+ locale.replace(/^.*_/, ""));
517
519
  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
520
  const countries = ((_e = countriesData === null || countriesData === void 0 ? void 0 : countriesData.impactPayoutCountries) === null || _e === void 0 ? void 0 : _e.data) || [];
519
521
  // copied from useTaxAndCash for displaying currencies based on country - could be in helper?
@@ -537,6 +539,7 @@ function usePartnerInfoModal(props) {
537
539
  const [currencySearch, setCurrencySearch] = useState("");
538
540
  const [filteredCountries, setFilteredCountries] = useState(((_f = countriesData === null || countriesData === void 0 ? void 0 : countriesData.impactPayoutCountries) === null || _f === void 0 ? void 0 : _f.data) || []);
539
541
  const [filteredCurrencies, setFilteredCurrencies] = useState(currencies || []);
542
+ console.log(userData, "userData partner info modal");
540
543
  const [error, setError] = useState("");
541
544
  const [success, setSuccess] = useState(false);
542
545
  useEffect(() => {
@@ -70,13 +70,13 @@ function PartnerInfoModalContentView(props) {
70
70
  styleString),
71
71
  h("div", { class: sheet.classes.FormFields },
72
72
  description,
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 },
73
+ h("sl-select", { 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 },
74
74
  h("sl-input", { class: sheet.classes.SearchInput, placeholder: text.searchCountryPlaceholder, onKeyDown: (e) => e.stopPropagation(), "onSl-input": (e) => {
75
75
  var _a;
76
76
  callbacks.setCountrySearch((_a = e.target) === null || _a === void 0 ? void 0 : _a.value);
77
77
  } }), (_a = states.filteredCountries) === null || _a === void 0 ? void 0 :
78
78
  _a.map((c) => (h("sl-menu-item", { value: c.countryCode }, c.displayName)))),
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 },
79
+ h("sl-select", { 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 },
80
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 :
81
81
  _b.map((c) => (h("sl-menu-item", { value: c.currencyCode },
82
82
  c.currencyCode,
@@ -35,7 +35,7 @@ import { I as InvoiceTableView, a as INDIRECT_TAX_SPAIN_REGIONS, b as INDIRECT_T
35
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
37
  import './data-2380309a.js';
38
- import { P as PartnerInfoModalView } from './sqm-partner-info-modal-view-78d2bc6e.js';
38
+ import { P as PartnerInfoModalView } from './sqm-partner-info-modal-view-68479829.js';
39
39
 
40
40
  /**
41
41
  * lodash (Custom Build) <https://lodash.com/>