@saasquatch/mint-components 1.15.2 → 1.15.3-0

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 (28) hide show
  1. package/dist/cjs/sqm-banking-info-form_17.cjs.entry.js +35 -17
  2. package/dist/cjs/{sqm-invoice-table-view-5c74607f.js → sqm-invoice-table-view-3f60fba9.js} +1 -0
  3. package/dist/cjs/sqm-stencilbook.cjs.entry.js +1 -1
  4. package/dist/collection/components/tax-and-cash/TaxForm.stories.js +1 -0
  5. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +23 -12
  6. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.js +1 -1
  7. package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +18 -4
  8. package/dist/esm/sqm-banking-info-form_17.entry.js +35 -17
  9. package/dist/esm/{sqm-invoice-table-view-3491dd80.js → sqm-invoice-table-view-01453fa3.js} +1 -0
  10. package/dist/esm/sqm-stencilbook.entry.js +1 -1
  11. package/dist/esm-es5/sqm-banking-info-form_17.entry.js +1 -1
  12. package/dist/esm-es5/sqm-invoice-table-view-01453fa3.js +1 -0
  13. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  14. package/dist/mint-components/mint-components.esm.js +1 -1
  15. package/dist/mint-components/{p-5868dc11.entry.js → p-1f1ce7ab.entry.js} +1 -1
  16. package/dist/mint-components/{p-e64e8354.system.entry.js → p-2ba713d6.system.entry.js} +1 -1
  17. package/dist/mint-components/p-35701119.js +1 -0
  18. package/dist/mint-components/p-37996351.system.js +1 -1
  19. package/dist/mint-components/{p-3d73cd84.entry.js → p-6f6cd994.entry.js} +2 -2
  20. package/dist/mint-components/p-86a5db85.system.js +1 -0
  21. package/dist/mint-components/{p-25ae959c.system.entry.js → p-92cebad6.system.entry.js} +1 -1
  22. package/dist/types/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.d.ts +2 -0
  23. package/dist/types/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.d.ts +1 -0
  24. package/docs/docs.docx +0 -0
  25. package/package.json +1 -1
  26. package/dist/esm-es5/sqm-invoice-table-view-3491dd80.js +0 -1
  27. package/dist/mint-components/p-49932f12.system.js +0 -1
  28. package/dist/mint-components/p-e8e48982.js +0 -1
@@ -18,7 +18,7 @@ const luxon = require('./luxon-2926d85f.js');
18
18
  const useReferralTable = require('./useReferralTable-7c3f9600.js');
19
19
  const sqmTextSpanView = require('./sqm-text-span-view-0aa82125.js');
20
20
  const ErrorView = require('./ErrorView-b2fcf954.js');
21
- const sqmInvoiceTableView = require('./sqm-invoice-table-view-5c74607f.js');
21
+ const sqmInvoiceTableView = require('./sqm-invoice-table-view-3f60fba9.js');
22
22
  const extractProps = require('./extractProps-fd93ba62.js');
23
23
  const keys = require('./keys-cff24974.js');
24
24
  const usePayoutStatus = require('./usePayoutStatus-733ef29a.js');
@@ -7751,6 +7751,12 @@ const UserInfoFormView = (props) => {
7751
7751
  default:
7752
7752
  regionLabel = text.state;
7753
7753
  }
7754
+ function isDisabledInput(field) {
7755
+ var _a;
7756
+ if (states.isPartner && !!((_a = data.partnerData) === null || _a === void 0 ? void 0 : _a[field]))
7757
+ return true;
7758
+ return false;
7759
+ }
7754
7760
  return (index.h("sl-form", { class: classes.FormWrapper, "onSl-submit": callbacks.onSubmit, ref: (el) => (refs.formRef.current = el), novalidate: true },
7755
7761
  index.h("style", { type: "text/css" },
7756
7762
  styleString$6,
@@ -7798,18 +7804,22 @@ const UserInfoFormView = (props) => {
7798
7804
  }))),
7799
7805
  index.h("div", null,
7800
7806
  index.h("div", { class: classes.InputContainer },
7801
- index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: formState.firstName, label: text.firstName, disabled: states.disabled || states.isUser || states.isPartner }, (((_b = formState.errors) === null || _b === void 0 ? void 0 : _b.firstName) ? {
7807
+ index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: formState.firstName, label: text.firstName, disabled: states.disabled ||
7808
+ states.isUser ||
7809
+ isDisabledInput("firstName") }, (((_b = formState.errors) === null || _b === void 0 ? void 0 : _b.firstName) ? {
7802
7810
  class: classes.ErrorInput,
7803
7811
  helpText: sqmInvoiceTableView.formatErrorMessage(text.firstName, formState.errors.firstName),
7804
7812
  }
7805
7813
  : {}), { id: "firstName", name: "/firstName", required: true })),
7806
- index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: formState.lastName, label: text.lastName, disabled: states.disabled || states.isUser || states.isPartner }, (((_c = formState.errors) === null || _c === void 0 ? void 0 : _c.lastName) ? {
7814
+ index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: formState.lastName, label: text.lastName, disabled: states.disabled ||
7815
+ states.isUser ||
7816
+ isDisabledInput("lastName") }, (((_c = formState.errors) === null || _c === void 0 ? void 0 : _c.lastName) ? {
7807
7817
  class: classes.ErrorInput,
7808
7818
  helpText: sqmInvoiceTableView.formatErrorMessage(text.lastName, formState.errors.lastName),
7809
7819
  }
7810
7820
  : {}), { id: "lastName", name: "/lastName", required: true })),
7811
7821
  index.h("sl-input", { exportparts: "label: input-label, base: input-base", value: formState.email, label: text.email, disabled: true, id: "email", name: "/email", required: true }),
7812
- index.h("sl-select", Object.assign({ id: "countryCode", exportparts: "label: input-label, base: input-base", name: "/countryCode", label: text.country, value: formState.countryCode, disabled: states.disabled || states.isPartner }, (((_d = formState.errors) === null || _d === void 0 ? void 0 : _d.countryCode) ? {
7822
+ index.h("sl-select", Object.assign({ id: "countryCode", exportparts: "label: input-label, base: input-base", name: "/countryCode", label: text.country, value: formState.countryCode, disabled: states.disabled || isDisabledInput("countryCode") }, (((_d = formState.errors) === null || _d === void 0 ? void 0 : _d.countryCode) ? {
7813
7823
  class: classes.ErrorInput,
7814
7824
  helpText: sqmInvoiceTableView.formatErrorMessage(text.country, formState.errors.countryCode),
7815
7825
  }
@@ -7825,7 +7835,8 @@ const UserInfoFormView = (props) => {
7825
7835
  index.h("div", { class: classes.PhoneInputsSection },
7826
7836
  index.h("p", null, text.phoneNumber),
7827
7837
  index.h("div", { class: classes.PhoneInputsContainer },
7828
- index.h("sl-select", Object.assign({ id: "phoneNumberCountryCode", exportparts: "label: input-label, base: input-base", name: "/phoneNumberCountryCode", value: formState.phoneNumberCountryCode, disabled: states.disabled || states.isPartner, ref: (el) => (refs.phoneCountryRef.current = el) }, (((_g = formState.errors) === null || _g === void 0 ? void 0 : _g.phoneNumberCountryCode) ? {
7838
+ index.h("sl-select", Object.assign({ id: "phoneNumberCountryCode", exportparts: "label: input-label, base: input-base", name: "/phoneNumberCountryCode", value: formState.phoneNumberCountryCode, disabled: states.disabled ||
7839
+ isDisabledInput("phoneNumberCountryCode"), ref: (el) => (refs.phoneCountryRef.current = el) }, (((_g = formState.errors) === null || _g === void 0 ? void 0 : _g.phoneNumberCountryCode) ? {
7829
7840
  class: classes.ErrorInput,
7830
7841
  }
7831
7842
  : {}), { required: true, "onSl-select": (e) => callbacks.onFormChange("phoneCountry", e) }),
@@ -7851,7 +7862,7 @@ const UserInfoFormView = (props) => {
7851
7862
  // Naive phone number validation
7852
7863
  sqmInvoiceTableView.validateBillingField(/[a-zA-Z]+/, value) &&
7853
7864
  sqmInvoiceTableView.formatErrorMessage(text.phoneNumber, text.error.fieldInvalidError);
7854
- }, disabled: states.disabled || states.isPartner }, (((_k = formState.errors) === null || _k === void 0 ? void 0 : _k.phoneNumber) ? {
7865
+ }, disabled: states.disabled || isDisabledInput("phoneNumber") }, (((_k = formState.errors) === null || _k === void 0 ? void 0 : _k.phoneNumber) ? {
7855
7866
  class: classes.ErrorInput,
7856
7867
  helpText: sqmInvoiceTableView.formatErrorMessage(text.phoneNumber, formState.errors.phoneNumber),
7857
7868
  }
@@ -7859,7 +7870,7 @@ const UserInfoFormView = (props) => {
7859
7870
  index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.address, id: "address", name: "/address", value: formState.address, validationError: ({ value }) =>
7860
7871
  // Checks for non-ASCII characters
7861
7872
  !sqmInvoiceTableView.validateBillingField(/^[\x20-\xFF]+$/, value) &&
7862
- sqmInvoiceTableView.formatErrorMessage(text.address, text.error.invalidCharacterError), disabled: states.disabled || states.isPartner }, (((_l = formState.errors) === null || _l === void 0 ? void 0 : _l.address) ? {
7873
+ sqmInvoiceTableView.formatErrorMessage(text.address, text.error.invalidCharacterError), disabled: states.disabled || isDisabledInput("address") }, (((_l = formState.errors) === null || _l === void 0 ? void 0 : _l.address) ? {
7863
7874
  class: classes.ErrorInput,
7864
7875
  helpText: sqmInvoiceTableView.formatErrorMessage(text.address, formState.errors.address),
7865
7876
  }
@@ -7867,22 +7878,22 @@ const UserInfoFormView = (props) => {
7867
7878
  index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.city, id: "city", name: "/city", value: formState.city, validationError: ({ value }) =>
7868
7879
  // Checks for non-ASCII characters
7869
7880
  !sqmInvoiceTableView.validateBillingField(/^[\x20-\xFF]+$/, value) &&
7870
- sqmInvoiceTableView.formatErrorMessage(text.city, text.error.invalidCharacterError), disabled: states.disabled || states.isPartner }, (((_m = formState.errors) === null || _m === void 0 ? void 0 : _m.city) ? {
7881
+ sqmInvoiceTableView.formatErrorMessage(text.city, text.error.invalidCharacterError), disabled: states.disabled || isDisabledInput("city") }, (((_m = formState.errors) === null || _m === void 0 ? void 0 : _m.city) ? {
7871
7882
  class: classes.ErrorInput,
7872
7883
  helpText: sqmInvoiceTableView.formatErrorMessage(text.city, formState.errors.city),
7873
7884
  }
7874
7885
  : {}), { required: true })),
7875
- !states.hideState && (index.h("sl-select", Object.assign({ label: regionLabel, exportparts: "label: input-label, base: input-base", id: "state", name: "/state", value: formState.state, disabled: states.disabled || states.isPartner }, (((_o = formState.errors) === null || _o === void 0 ? void 0 : _o.state) ? {
7886
+ !states.hideState && (index.h("sl-select", Object.assign({ label: regionLabel, exportparts: "label: input-label, base: input-base", id: "state", name: "/state", value: formState.state, disabled: states.disabled || isDisabledInput("state") }, (((_o = formState.errors) === null || _o === void 0 ? void 0 : _o.state) ? {
7876
7887
  class: classes.ErrorInput,
7877
7888
  helpText: sqmInvoiceTableView.formatErrorMessage(text.state, formState.errors.state),
7878
7889
  }
7879
7890
  : {}), { required: true }), (_p = data.regions) === null || _p === void 0 ? void 0 : _p.map((r) => (index.h("sl-menu-item", { value: r.value }, r.label))))),
7880
- index.h("sl-input", Object.assign({ label: text.postalCode, exportparts: "label: input-label, base: input-base", id: "postalCode", name: "/postalCode", value: formState.postalCode, disabled: states.disabled || states.isPartner }, (((_q = formState.errors) === null || _q === void 0 ? void 0 : _q.postalCode) ? {
7891
+ index.h("sl-input", Object.assign({ label: text.postalCode, exportparts: "label: input-label, base: input-base", id: "postalCode", name: "/postalCode", value: formState.postalCode, disabled: states.disabled || isDisabledInput("postalCode") }, (((_q = formState.errors) === null || _q === void 0 ? void 0 : _q.postalCode) ? {
7881
7892
  class: classes.ErrorInput,
7882
7893
  helpText: sqmInvoiceTableView.formatErrorMessage(text.postalCode, formState.errors.postalCode),
7883
7894
  }
7884
7895
  : {}), { required: true })),
7885
- index.h("sl-select", Object.assign({ id: "currency", exportparts: "label: input-label, base: input-base", name: "/currency", label: text.currency, menu: true, value: formState.currency, disabled: states.disabled || states.isPartner, helpText: text.currencyHelpText }, (((_r = formState.errors) === null || _r === void 0 ? void 0 : _r.currency) ? {
7896
+ index.h("sl-select", Object.assign({ id: "currency", exportparts: "label: input-label, base: input-base", name: "/currency", label: text.currency, menu: true, value: formState.currency, disabled: states.disabled || isDisabledInput("currency"), helpText: text.currencyHelpText }, (((_r = formState.errors) === null || _r === void 0 ? void 0 : _r.currency) ? {
7886
7897
  class: classes.ErrorInput,
7887
7898
  helpText: sqmInvoiceTableView.formatErrorMessage(text.currency, formState.errors.currency),
7888
7899
  }
@@ -7904,13 +7915,13 @@ const UserInfoFormView = (props) => {
7904
7915
  index.h("div", { class: classes.CheckboxWrapper },
7905
7916
  index.h("sl-checkbox", { exportparts: "label: input-label, base: input-base", checked: formState.allowBankingCollection === true, "onSl-change": (e) => {
7906
7917
  e.target.value = e.target.checked;
7907
- }, disabled: states.isPartner ? false : states.disabled, required: true, value: formState.allowBankingCollection, id: "allowBankingCollection", name: "/allowBankingCollection" }, bankingCollectionText),
7918
+ }, disabled: states.disabled, required: true, value: formState.allowBankingCollection, id: "allowBankingCollection", name: "/allowBankingCollection" }, bankingCollectionText),
7908
7919
  ((_u = formState.errors) === null || _u === void 0 ? void 0 : _u.allowBankingCollection) && (index.h("p", { class: classes.ErrorText }, sqmInvoiceTableView.formatErrorMessage(text.termsAndConditionsLabel, formState.errors.allowBankingCollection))))),
7909
- index.h("sl-button", { type: "primary", disabled: states.isPartner ? false : states.disabled, submit: true, exportparts: "base: primarybutton-base" }, text.continueButton))))));
7920
+ index.h("sl-button", { type: "primary", disabled: states.disabled, submit: true, exportparts: "base: primarybutton-base" }, text.continueButton))))));
7910
7921
  };
7911
7922
 
7912
7923
  function useUserInfoForm(props) {
7913
- var _a, _b, _c, _d;
7924
+ var _a, _b, _c, _d, _e, _f;
7914
7925
  const currencyRef = stencilHooks_module.useRef(undefined);
7915
7926
  const phoneCountryRef = stencilHooks_module.useRef(undefined);
7916
7927
  const formRef = stencilHooks_module.useRef(null);
@@ -8062,9 +8073,15 @@ function useUserInfoForm(props) {
8062
8073
  postalCode: userData.postalCode,
8063
8074
  currency: userData.currency,
8064
8075
  });
8065
- const nextStep = context.overrideNextStep || "/2";
8076
+ const skipNextStep = getSkipNextStep(userData);
8077
+ const nextStep = context.overrideNextStep || skipNextStep ? "/3" : "/2";
8066
8078
  setStep(nextStep);
8067
8079
  }
8080
+ function getSkipNextStep(userData) {
8081
+ if (userData.countryCode === "US")
8082
+ return true;
8083
+ return true;
8084
+ }
8068
8085
  const hasStates = ["ES", "AU", "US", "CA"].includes(userFormContext.countryCode);
8069
8086
  const regionObj = hasStates
8070
8087
  ? sqmInvoiceTableView.ADDRESS_REGIONS[userFormContext === null || userFormContext === void 0 ? void 0 : userFormContext.countryCode]
@@ -8092,6 +8109,7 @@ function useUserInfoForm(props) {
8092
8109
  allCountries: countries,
8093
8110
  regionLabelEnum: regionObj === null || regionObj === void 0 ? void 0 : regionObj.labelEnum,
8094
8111
  regions: (regionObj === null || regionObj === void 0 ? void 0 : regionObj.regions) || [],
8112
+ partnerData: (_b = (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher,
8095
8113
  },
8096
8114
  states: {
8097
8115
  step: step === null || step === void 0 ? void 0 : step.replace("/", ""),
@@ -8100,8 +8118,8 @@ function useUserInfoForm(props) {
8100
8118
  disabled: loading,
8101
8119
  loadingError: !!(userError === null || userError === void 0 ? void 0 : userError.message),
8102
8120
  loading: loading,
8103
- isPartner: !!((_b = (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher),
8104
- isUser: !!((_d = (_c = data === null || data === void 0 ? void 0 : data.user) === null || _c === void 0 ? void 0 : _c.impactConnection) === null || _d === void 0 ? void 0 : _d.user),
8121
+ isPartner: !!((_d = (_c = data === null || data === void 0 ? void 0 : data.user) === null || _c === void 0 ? void 0 : _c.impactConnection) === null || _d === void 0 ? void 0 : _d.publisher),
8122
+ isUser: !!((_f = (_e = data === null || data === void 0 ? void 0 : data.user) === null || _e === void 0 ? void 0 : _e.impactConnection) === null || _f === void 0 ? void 0 : _f.user),
8105
8123
  formState: {
8106
8124
  ...userFormContext,
8107
8125
  errors: formErrors,
@@ -508,6 +508,7 @@ const stepOneProps = {
508
508
  },
509
509
  },
510
510
  data: {
511
+ partnerData: {},
511
512
  regionLabelEnum: "STATE",
512
513
  regions: [],
513
514
  phoneCountries: [
@@ -38,7 +38,7 @@ require('./ErrorView-b2fcf954.js');
38
38
  const sqmQrCodeView = require('./sqm-qr-code-view-15dfc0b6.js');
39
39
  const ShadowViewAddon = require('./ShadowViewAddon-28865623.js');
40
40
  const sqmPortalContainerView = require('./sqm-portal-container-view-4f15143a.js');
41
- const sqmInvoiceTableView = require('./sqm-invoice-table-view-5c74607f.js');
41
+ const sqmInvoiceTableView = require('./sqm-invoice-table-view-3f60fba9.js');
42
42
  const sqmLeadInputFieldView = require('./sqm-lead-input-field-view-89308aab.js');
43
43
 
44
44
  /**
@@ -32,6 +32,7 @@ const stepOneProps = {
32
32
  },
33
33
  },
34
34
  data: {
35
+ partnerData: {},
35
36
  regionLabelEnum: "STATE",
36
37
  regions: [],
37
38
  phoneCountries: [
@@ -154,6 +154,12 @@ export const UserInfoFormView = (props) => {
154
154
  default:
155
155
  regionLabel = text.state;
156
156
  }
157
+ function isDisabledInput(field) {
158
+ var _a;
159
+ if (states.isPartner && !!((_a = data.partnerData) === null || _a === void 0 ? void 0 : _a[field]))
160
+ return true;
161
+ return false;
162
+ }
157
163
  return (h("sl-form", { class: classes.FormWrapper, "onSl-submit": callbacks.onSubmit, ref: (el) => (refs.formRef.current = el), novalidate: true },
158
164
  h("style", { type: "text/css" },
159
165
  styleString,
@@ -201,18 +207,22 @@ export const UserInfoFormView = (props) => {
201
207
  }))),
202
208
  h("div", null,
203
209
  h("div", { class: classes.InputContainer },
204
- h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: formState.firstName, label: text.firstName, disabled: states.disabled || states.isUser || states.isPartner }, (((_b = formState.errors) === null || _b === void 0 ? void 0 : _b.firstName) ? {
210
+ h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: formState.firstName, label: text.firstName, disabled: states.disabled ||
211
+ states.isUser ||
212
+ isDisabledInput("firstName") }, (((_b = formState.errors) === null || _b === void 0 ? void 0 : _b.firstName) ? {
205
213
  class: classes.ErrorInput,
206
214
  helpText: formatErrorMessage(text.firstName, formState.errors.firstName),
207
215
  }
208
216
  : {}), { id: "firstName", name: "/firstName", required: true })),
209
- h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: formState.lastName, label: text.lastName, disabled: states.disabled || states.isUser || states.isPartner }, (((_c = formState.errors) === null || _c === void 0 ? void 0 : _c.lastName) ? {
217
+ h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: formState.lastName, label: text.lastName, disabled: states.disabled ||
218
+ states.isUser ||
219
+ isDisabledInput("lastName") }, (((_c = formState.errors) === null || _c === void 0 ? void 0 : _c.lastName) ? {
210
220
  class: classes.ErrorInput,
211
221
  helpText: formatErrorMessage(text.lastName, formState.errors.lastName),
212
222
  }
213
223
  : {}), { id: "lastName", name: "/lastName", required: true })),
214
224
  h("sl-input", { exportparts: "label: input-label, base: input-base", value: formState.email, label: text.email, disabled: true, id: "email", name: "/email", required: true }),
215
- h("sl-select", Object.assign({ id: "countryCode", exportparts: "label: input-label, base: input-base", name: "/countryCode", label: text.country, value: formState.countryCode, disabled: states.disabled || states.isPartner }, (((_d = formState.errors) === null || _d === void 0 ? void 0 : _d.countryCode) ? {
225
+ h("sl-select", Object.assign({ id: "countryCode", exportparts: "label: input-label, base: input-base", name: "/countryCode", label: text.country, value: formState.countryCode, disabled: states.disabled || isDisabledInput("countryCode") }, (((_d = formState.errors) === null || _d === void 0 ? void 0 : _d.countryCode) ? {
216
226
  class: classes.ErrorInput,
217
227
  helpText: formatErrorMessage(text.country, formState.errors.countryCode),
218
228
  }
@@ -228,7 +238,8 @@ export const UserInfoFormView = (props) => {
228
238
  h("div", { class: classes.PhoneInputsSection },
229
239
  h("p", null, text.phoneNumber),
230
240
  h("div", { class: classes.PhoneInputsContainer },
231
- h("sl-select", Object.assign({ id: "phoneNumberCountryCode", exportparts: "label: input-label, base: input-base", name: "/phoneNumberCountryCode", value: formState.phoneNumberCountryCode, disabled: states.disabled || states.isPartner, ref: (el) => (refs.phoneCountryRef.current = el) }, (((_g = formState.errors) === null || _g === void 0 ? void 0 : _g.phoneNumberCountryCode) ? {
241
+ h("sl-select", Object.assign({ id: "phoneNumberCountryCode", exportparts: "label: input-label, base: input-base", name: "/phoneNumberCountryCode", value: formState.phoneNumberCountryCode, disabled: states.disabled ||
242
+ isDisabledInput("phoneNumberCountryCode"), ref: (el) => (refs.phoneCountryRef.current = el) }, (((_g = formState.errors) === null || _g === void 0 ? void 0 : _g.phoneNumberCountryCode) ? {
232
243
  class: classes.ErrorInput,
233
244
  }
234
245
  : {}), { required: true, "onSl-select": (e) => callbacks.onFormChange("phoneCountry", e) }),
@@ -254,7 +265,7 @@ export const UserInfoFormView = (props) => {
254
265
  // Naive phone number validation
255
266
  validateBillingField(/[a-zA-Z]+/, value) &&
256
267
  formatErrorMessage(text.phoneNumber, text.error.fieldInvalidError);
257
- }, disabled: states.disabled || states.isPartner }, (((_k = formState.errors) === null || _k === void 0 ? void 0 : _k.phoneNumber) ? {
268
+ }, disabled: states.disabled || isDisabledInput("phoneNumber") }, (((_k = formState.errors) === null || _k === void 0 ? void 0 : _k.phoneNumber) ? {
258
269
  class: classes.ErrorInput,
259
270
  helpText: formatErrorMessage(text.phoneNumber, formState.errors.phoneNumber),
260
271
  }
@@ -262,7 +273,7 @@ export const UserInfoFormView = (props) => {
262
273
  h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.address, id: "address", name: "/address", value: formState.address, validationError: ({ value }) =>
263
274
  // Checks for non-ASCII characters
264
275
  !validateBillingField(/^[\x20-\xFF]+$/, value) &&
265
- formatErrorMessage(text.address, text.error.invalidCharacterError), disabled: states.disabled || states.isPartner }, (((_l = formState.errors) === null || _l === void 0 ? void 0 : _l.address) ? {
276
+ formatErrorMessage(text.address, text.error.invalidCharacterError), disabled: states.disabled || isDisabledInput("address") }, (((_l = formState.errors) === null || _l === void 0 ? void 0 : _l.address) ? {
266
277
  class: classes.ErrorInput,
267
278
  helpText: formatErrorMessage(text.address, formState.errors.address),
268
279
  }
@@ -270,22 +281,22 @@ export const UserInfoFormView = (props) => {
270
281
  h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.city, id: "city", name: "/city", value: formState.city, validationError: ({ value }) =>
271
282
  // Checks for non-ASCII characters
272
283
  !validateBillingField(/^[\x20-\xFF]+$/, value) &&
273
- formatErrorMessage(text.city, text.error.invalidCharacterError), disabled: states.disabled || states.isPartner }, (((_m = formState.errors) === null || _m === void 0 ? void 0 : _m.city) ? {
284
+ formatErrorMessage(text.city, text.error.invalidCharacterError), disabled: states.disabled || isDisabledInput("city") }, (((_m = formState.errors) === null || _m === void 0 ? void 0 : _m.city) ? {
274
285
  class: classes.ErrorInput,
275
286
  helpText: formatErrorMessage(text.city, formState.errors.city),
276
287
  }
277
288
  : {}), { required: true })),
278
- !states.hideState && (h("sl-select", Object.assign({ label: regionLabel, exportparts: "label: input-label, base: input-base", id: "state", name: "/state", value: formState.state, disabled: states.disabled || states.isPartner }, (((_o = formState.errors) === null || _o === void 0 ? void 0 : _o.state) ? {
289
+ !states.hideState && (h("sl-select", Object.assign({ label: regionLabel, exportparts: "label: input-label, base: input-base", id: "state", name: "/state", value: formState.state, disabled: states.disabled || isDisabledInput("state") }, (((_o = formState.errors) === null || _o === void 0 ? void 0 : _o.state) ? {
279
290
  class: classes.ErrorInput,
280
291
  helpText: formatErrorMessage(text.state, formState.errors.state),
281
292
  }
282
293
  : {}), { required: true }), (_p = data.regions) === null || _p === void 0 ? void 0 : _p.map((r) => (h("sl-menu-item", { value: r.value }, r.label))))),
283
- h("sl-input", Object.assign({ label: text.postalCode, exportparts: "label: input-label, base: input-base", id: "postalCode", name: "/postalCode", value: formState.postalCode, disabled: states.disabled || states.isPartner }, (((_q = formState.errors) === null || _q === void 0 ? void 0 : _q.postalCode) ? {
294
+ h("sl-input", Object.assign({ label: text.postalCode, exportparts: "label: input-label, base: input-base", id: "postalCode", name: "/postalCode", value: formState.postalCode, disabled: states.disabled || isDisabledInput("postalCode") }, (((_q = formState.errors) === null || _q === void 0 ? void 0 : _q.postalCode) ? {
284
295
  class: classes.ErrorInput,
285
296
  helpText: formatErrorMessage(text.postalCode, formState.errors.postalCode),
286
297
  }
287
298
  : {}), { required: true })),
288
- h("sl-select", Object.assign({ id: "currency", exportparts: "label: input-label, base: input-base", name: "/currency", label: text.currency, menu: true, value: formState.currency, disabled: states.disabled || states.isPartner, helpText: text.currencyHelpText }, (((_r = formState.errors) === null || _r === void 0 ? void 0 : _r.currency) ? {
299
+ h("sl-select", Object.assign({ id: "currency", exportparts: "label: input-label, base: input-base", name: "/currency", label: text.currency, menu: true, value: formState.currency, disabled: states.disabled || isDisabledInput("currency"), helpText: text.currencyHelpText }, (((_r = formState.errors) === null || _r === void 0 ? void 0 : _r.currency) ? {
289
300
  class: classes.ErrorInput,
290
301
  helpText: formatErrorMessage(text.currency, formState.errors.currency),
291
302
  }
@@ -307,7 +318,7 @@ export const UserInfoFormView = (props) => {
307
318
  h("div", { class: classes.CheckboxWrapper },
308
319
  h("sl-checkbox", { exportparts: "label: input-label, base: input-base", checked: formState.allowBankingCollection === true, "onSl-change": (e) => {
309
320
  e.target.value = e.target.checked;
310
- }, disabled: states.isPartner ? false : states.disabled, required: true, value: formState.allowBankingCollection, id: "allowBankingCollection", name: "/allowBankingCollection" }, bankingCollectionText),
321
+ }, disabled: states.disabled, required: true, value: formState.allowBankingCollection, id: "allowBankingCollection", name: "/allowBankingCollection" }, bankingCollectionText),
311
322
  ((_u = formState.errors) === null || _u === void 0 ? void 0 : _u.allowBankingCollection) && (h("p", { class: classes.ErrorText }, formatErrorMessage(text.termsAndConditionsLabel, formState.errors.allowBankingCollection))))),
312
- h("sl-button", { type: "primary", disabled: states.isPartner ? false : states.disabled, submit: true, exportparts: "base: primarybutton-base" }, text.continueButton))))));
323
+ h("sl-button", { type: "primary", disabled: states.disabled, submit: true, exportparts: "base: primarybutton-base" }, text.continueButton))))));
313
324
  };
@@ -892,7 +892,7 @@ export class TaxForm {
892
892
  "mutable": false,
893
893
  "complexType": {
894
894
  "original": "DemoData<UseUserInfoFormResult>",
895
- "resolved": "{ states?: { step: string; hideState: boolean; hideSteps: boolean; disabled: boolean; loadingError: boolean; loading: boolean; isPartner: boolean; isUser: boolean; formState: { errors: {}; firstName: string; lastName: string; email: string; phoneNumberCountryCode: string; phoneNumber: string; countryCode: string; currency: string; address: string; city: string; state: string; postalCode: string; }; }; refs?: { formRef: Ref<HTMLFormElement>; currencyRef: Ref<HTMLSelectElement>; phoneCountryRef: Ref<HTMLSelectElement>; }; data?: { currencies: { displayName: string; currencyCode: string; }[]; countries: TaxCountry[]; phoneCountries: TaxCountry[]; allCurrencies: { displayName: string; currencyCode: string; }[]; allCountries: TaxCountry[]; regionLabelEnum: \"STATE\" | \"PROVINCE\" | \"REGION\"; regions: { label: string; value: string; }[]; }; setStep?: (value: string) => void; onSubmit?: (event: any) => Promise<void>; }",
895
+ "resolved": "{ states?: { step: string; hideState: boolean; hideSteps: boolean; disabled: boolean; loadingError: boolean; loading: boolean; isPartner: boolean; isUser: boolean; formState: { errors: {}; firstName: string; lastName: string; email: string; phoneNumberCountryCode: string; phoneNumber: string; countryCode: string; currency: string; address: string; city: string; state: string; postalCode: string; }; }; refs?: { formRef: Ref<HTMLFormElement>; currencyRef: Ref<HTMLSelectElement>; phoneCountryRef: Ref<HTMLSelectElement>; }; data?: { currencies: { displayName: string; currencyCode: string; }[]; countries: TaxCountry[]; phoneCountries: TaxCountry[]; allCurrencies: { displayName: string; currencyCode: string; }[]; allCountries: TaxCountry[]; regionLabelEnum: \"STATE\" | \"PROVINCE\" | \"REGION\"; regions: { label: string; value: string; }[]; partnerData: ImpactPublisher; }; setStep?: (value: string) => void; onSubmit?: (event: any) => Promise<void>; }",
896
896
  "references": {
897
897
  "DemoData": {
898
898
  "location": "import",
@@ -5,7 +5,7 @@ import { objectIsFull } from "../utils";
5
5
  import { useParent, useParentQueryValue, useParentValue, } from "@saasquatch/component-boilerplate";
6
6
  import { ADDRESS_REGIONS } from "../subregions";
7
7
  export function useUserInfoForm(props) {
8
- var _a, _b, _c, _d;
8
+ var _a, _b, _c, _d, _e, _f;
9
9
  const currencyRef = useRef(undefined);
10
10
  const phoneCountryRef = useRef(undefined);
11
11
  const formRef = useRef(null);
@@ -157,9 +157,22 @@ export function useUserInfoForm(props) {
157
157
  postalCode: userData.postalCode,
158
158
  currency: userData.currency,
159
159
  });
160
- const nextStep = context.overrideNextStep || "/2";
160
+ const skipNextStep = getSkipNextStep(userData);
161
+ const nextStep = context.overrideNextStep || skipNextStep ? "/3" : "/2";
161
162
  setStep(nextStep);
162
163
  }
164
+ // TODO: get from backend
165
+ const hasIndirectTax = false;
166
+ const brandCountry = "";
167
+ function getSkipNextStep(userData) {
168
+ if (userData.countryCode === "US")
169
+ return true;
170
+ if (!hasIndirectTax)
171
+ return true;
172
+ if (hasIndirectTax && userData.countryCode !== brandCountry)
173
+ return true;
174
+ return false;
175
+ }
163
176
  const hasStates = ["ES", "AU", "US", "CA"].includes(userFormContext.countryCode);
164
177
  const regionObj = hasStates
165
178
  ? ADDRESS_REGIONS[userFormContext === null || userFormContext === void 0 ? void 0 : userFormContext.countryCode]
@@ -187,6 +200,7 @@ export function useUserInfoForm(props) {
187
200
  allCountries: countries,
188
201
  regionLabelEnum: regionObj === null || regionObj === void 0 ? void 0 : regionObj.labelEnum,
189
202
  regions: (regionObj === null || regionObj === void 0 ? void 0 : regionObj.regions) || [],
203
+ partnerData: (_b = (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher,
190
204
  },
191
205
  states: {
192
206
  step: step === null || step === void 0 ? void 0 : step.replace("/", ""),
@@ -195,8 +209,8 @@ export function useUserInfoForm(props) {
195
209
  disabled: loading,
196
210
  loadingError: !!(userError === null || userError === void 0 ? void 0 : userError.message),
197
211
  loading: loading,
198
- isPartner: !!((_b = (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher),
199
- isUser: !!((_d = (_c = data === null || data === void 0 ? void 0 : data.user) === null || _c === void 0 ? void 0 : _c.impactConnection) === null || _d === void 0 ? void 0 : _d.user),
212
+ isPartner: !!((_d = (_c = data === null || data === void 0 ? void 0 : data.user) === null || _c === void 0 ? void 0 : _c.impactConnection) === null || _d === void 0 ? void 0 : _d.publisher),
213
+ isUser: !!((_f = (_e = data === null || data === void 0 ? void 0 : data.user) === null || _e === void 0 ? void 0 : _e.impactConnection) === null || _f === void 0 ? void 0 : _f.user),
200
214
  formState: {
201
215
  ...userFormContext,
202
216
  errors: formErrors,
@@ -14,7 +14,7 @@ import { l as luxon } from './luxon-8d51c92b.js';
14
14
  import { g as generateUserError } from './useReferralTable-b3876ed6.js';
15
15
  import { T as TextSpanView } from './sqm-text-span-view-ca32495e.js';
16
16
  import { E as ErrorView } from './ErrorView-48e2b969.js';
17
- import { t as taxTypeToName, v as validTaxDocument, a as INDIRECT_TAX_SPAIN_REGIONS, b as INDIRECT_TAX_PROVINCES, g as getCountryObj, O as OtherRegionSlotView, I as InvoiceTableView, L as LoadingView, c as vatLabels, G as GeneralLoadingView, f as formatErrorMessage, d as validateBillingField, o as objectIsFull, A as ADDRESS_REGIONS } from './sqm-invoice-table-view-3491dd80.js';
17
+ import { t as taxTypeToName, v as validTaxDocument, a as INDIRECT_TAX_SPAIN_REGIONS, b as INDIRECT_TAX_PROVINCES, g as getCountryObj, O as OtherRegionSlotView, I as InvoiceTableView, L as LoadingView, c as vatLabels, G as GeneralLoadingView, f as formatErrorMessage, d as validateBillingField, o as objectIsFull, A as ADDRESS_REGIONS } from './sqm-invoice-table-view-01453fa3.js';
18
18
  import { e as extractProps } from './extractProps-ae1afbb3.js';
19
19
  import { b as VERIFICATION_EVENT_KEY, V as VERIFICATION_EMAIL_NAMESPACE, S as SHOW_CODE_NAMESPACE, a as VERIFICATION_PARENT_NAMESPACE } from './keys-406491dc.js';
20
20
  import { T as TAX_FORM_UPDATED_EVENT_KEY, a as useVeriffApp, g as getStatus, V as VERIFF_COMPLETE_EVENT_KEY } from './usePayoutStatus-b89e8c49.js';
@@ -7747,6 +7747,12 @@ const UserInfoFormView = (props) => {
7747
7747
  default:
7748
7748
  regionLabel = text.state;
7749
7749
  }
7750
+ function isDisabledInput(field) {
7751
+ var _a;
7752
+ if (states.isPartner && !!((_a = data.partnerData) === null || _a === void 0 ? void 0 : _a[field]))
7753
+ return true;
7754
+ return false;
7755
+ }
7750
7756
  return (h("sl-form", { class: classes.FormWrapper, "onSl-submit": callbacks.onSubmit, ref: (el) => (refs.formRef.current = el), novalidate: true },
7751
7757
  h("style", { type: "text/css" },
7752
7758
  styleString$6,
@@ -7794,18 +7800,22 @@ const UserInfoFormView = (props) => {
7794
7800
  }))),
7795
7801
  h("div", null,
7796
7802
  h("div", { class: classes.InputContainer },
7797
- h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: formState.firstName, label: text.firstName, disabled: states.disabled || states.isUser || states.isPartner }, (((_b = formState.errors) === null || _b === void 0 ? void 0 : _b.firstName) ? {
7803
+ h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: formState.firstName, label: text.firstName, disabled: states.disabled ||
7804
+ states.isUser ||
7805
+ isDisabledInput("firstName") }, (((_b = formState.errors) === null || _b === void 0 ? void 0 : _b.firstName) ? {
7798
7806
  class: classes.ErrorInput,
7799
7807
  helpText: formatErrorMessage(text.firstName, formState.errors.firstName),
7800
7808
  }
7801
7809
  : {}), { id: "firstName", name: "/firstName", required: true })),
7802
- h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: formState.lastName, label: text.lastName, disabled: states.disabled || states.isUser || states.isPartner }, (((_c = formState.errors) === null || _c === void 0 ? void 0 : _c.lastName) ? {
7810
+ h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: formState.lastName, label: text.lastName, disabled: states.disabled ||
7811
+ states.isUser ||
7812
+ isDisabledInput("lastName") }, (((_c = formState.errors) === null || _c === void 0 ? void 0 : _c.lastName) ? {
7803
7813
  class: classes.ErrorInput,
7804
7814
  helpText: formatErrorMessage(text.lastName, formState.errors.lastName),
7805
7815
  }
7806
7816
  : {}), { id: "lastName", name: "/lastName", required: true })),
7807
7817
  h("sl-input", { exportparts: "label: input-label, base: input-base", value: formState.email, label: text.email, disabled: true, id: "email", name: "/email", required: true }),
7808
- h("sl-select", Object.assign({ id: "countryCode", exportparts: "label: input-label, base: input-base", name: "/countryCode", label: text.country, value: formState.countryCode, disabled: states.disabled || states.isPartner }, (((_d = formState.errors) === null || _d === void 0 ? void 0 : _d.countryCode) ? {
7818
+ h("sl-select", Object.assign({ id: "countryCode", exportparts: "label: input-label, base: input-base", name: "/countryCode", label: text.country, value: formState.countryCode, disabled: states.disabled || isDisabledInput("countryCode") }, (((_d = formState.errors) === null || _d === void 0 ? void 0 : _d.countryCode) ? {
7809
7819
  class: classes.ErrorInput,
7810
7820
  helpText: formatErrorMessage(text.country, formState.errors.countryCode),
7811
7821
  }
@@ -7821,7 +7831,8 @@ const UserInfoFormView = (props) => {
7821
7831
  h("div", { class: classes.PhoneInputsSection },
7822
7832
  h("p", null, text.phoneNumber),
7823
7833
  h("div", { class: classes.PhoneInputsContainer },
7824
- h("sl-select", Object.assign({ id: "phoneNumberCountryCode", exportparts: "label: input-label, base: input-base", name: "/phoneNumberCountryCode", value: formState.phoneNumberCountryCode, disabled: states.disabled || states.isPartner, ref: (el) => (refs.phoneCountryRef.current = el) }, (((_g = formState.errors) === null || _g === void 0 ? void 0 : _g.phoneNumberCountryCode) ? {
7834
+ h("sl-select", Object.assign({ id: "phoneNumberCountryCode", exportparts: "label: input-label, base: input-base", name: "/phoneNumberCountryCode", value: formState.phoneNumberCountryCode, disabled: states.disabled ||
7835
+ isDisabledInput("phoneNumberCountryCode"), ref: (el) => (refs.phoneCountryRef.current = el) }, (((_g = formState.errors) === null || _g === void 0 ? void 0 : _g.phoneNumberCountryCode) ? {
7825
7836
  class: classes.ErrorInput,
7826
7837
  }
7827
7838
  : {}), { required: true, "onSl-select": (e) => callbacks.onFormChange("phoneCountry", e) }),
@@ -7847,7 +7858,7 @@ const UserInfoFormView = (props) => {
7847
7858
  // Naive phone number validation
7848
7859
  validateBillingField(/[a-zA-Z]+/, value) &&
7849
7860
  formatErrorMessage(text.phoneNumber, text.error.fieldInvalidError);
7850
- }, disabled: states.disabled || states.isPartner }, (((_k = formState.errors) === null || _k === void 0 ? void 0 : _k.phoneNumber) ? {
7861
+ }, disabled: states.disabled || isDisabledInput("phoneNumber") }, (((_k = formState.errors) === null || _k === void 0 ? void 0 : _k.phoneNumber) ? {
7851
7862
  class: classes.ErrorInput,
7852
7863
  helpText: formatErrorMessage(text.phoneNumber, formState.errors.phoneNumber),
7853
7864
  }
@@ -7855,7 +7866,7 @@ const UserInfoFormView = (props) => {
7855
7866
  h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.address, id: "address", name: "/address", value: formState.address, validationError: ({ value }) =>
7856
7867
  // Checks for non-ASCII characters
7857
7868
  !validateBillingField(/^[\x20-\xFF]+$/, value) &&
7858
- formatErrorMessage(text.address, text.error.invalidCharacterError), disabled: states.disabled || states.isPartner }, (((_l = formState.errors) === null || _l === void 0 ? void 0 : _l.address) ? {
7869
+ formatErrorMessage(text.address, text.error.invalidCharacterError), disabled: states.disabled || isDisabledInput("address") }, (((_l = formState.errors) === null || _l === void 0 ? void 0 : _l.address) ? {
7859
7870
  class: classes.ErrorInput,
7860
7871
  helpText: formatErrorMessage(text.address, formState.errors.address),
7861
7872
  }
@@ -7863,22 +7874,22 @@ const UserInfoFormView = (props) => {
7863
7874
  h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.city, id: "city", name: "/city", value: formState.city, validationError: ({ value }) =>
7864
7875
  // Checks for non-ASCII characters
7865
7876
  !validateBillingField(/^[\x20-\xFF]+$/, value) &&
7866
- formatErrorMessage(text.city, text.error.invalidCharacterError), disabled: states.disabled || states.isPartner }, (((_m = formState.errors) === null || _m === void 0 ? void 0 : _m.city) ? {
7877
+ formatErrorMessage(text.city, text.error.invalidCharacterError), disabled: states.disabled || isDisabledInput("city") }, (((_m = formState.errors) === null || _m === void 0 ? void 0 : _m.city) ? {
7867
7878
  class: classes.ErrorInput,
7868
7879
  helpText: formatErrorMessage(text.city, formState.errors.city),
7869
7880
  }
7870
7881
  : {}), { required: true })),
7871
- !states.hideState && (h("sl-select", Object.assign({ label: regionLabel, exportparts: "label: input-label, base: input-base", id: "state", name: "/state", value: formState.state, disabled: states.disabled || states.isPartner }, (((_o = formState.errors) === null || _o === void 0 ? void 0 : _o.state) ? {
7882
+ !states.hideState && (h("sl-select", Object.assign({ label: regionLabel, exportparts: "label: input-label, base: input-base", id: "state", name: "/state", value: formState.state, disabled: states.disabled || isDisabledInput("state") }, (((_o = formState.errors) === null || _o === void 0 ? void 0 : _o.state) ? {
7872
7883
  class: classes.ErrorInput,
7873
7884
  helpText: formatErrorMessage(text.state, formState.errors.state),
7874
7885
  }
7875
7886
  : {}), { required: true }), (_p = data.regions) === null || _p === void 0 ? void 0 : _p.map((r) => (h("sl-menu-item", { value: r.value }, r.label))))),
7876
- h("sl-input", Object.assign({ label: text.postalCode, exportparts: "label: input-label, base: input-base", id: "postalCode", name: "/postalCode", value: formState.postalCode, disabled: states.disabled || states.isPartner }, (((_q = formState.errors) === null || _q === void 0 ? void 0 : _q.postalCode) ? {
7887
+ h("sl-input", Object.assign({ label: text.postalCode, exportparts: "label: input-label, base: input-base", id: "postalCode", name: "/postalCode", value: formState.postalCode, disabled: states.disabled || isDisabledInput("postalCode") }, (((_q = formState.errors) === null || _q === void 0 ? void 0 : _q.postalCode) ? {
7877
7888
  class: classes.ErrorInput,
7878
7889
  helpText: formatErrorMessage(text.postalCode, formState.errors.postalCode),
7879
7890
  }
7880
7891
  : {}), { required: true })),
7881
- h("sl-select", Object.assign({ id: "currency", exportparts: "label: input-label, base: input-base", name: "/currency", label: text.currency, menu: true, value: formState.currency, disabled: states.disabled || states.isPartner, helpText: text.currencyHelpText }, (((_r = formState.errors) === null || _r === void 0 ? void 0 : _r.currency) ? {
7892
+ h("sl-select", Object.assign({ id: "currency", exportparts: "label: input-label, base: input-base", name: "/currency", label: text.currency, menu: true, value: formState.currency, disabled: states.disabled || isDisabledInput("currency"), helpText: text.currencyHelpText }, (((_r = formState.errors) === null || _r === void 0 ? void 0 : _r.currency) ? {
7882
7893
  class: classes.ErrorInput,
7883
7894
  helpText: formatErrorMessage(text.currency, formState.errors.currency),
7884
7895
  }
@@ -7900,13 +7911,13 @@ const UserInfoFormView = (props) => {
7900
7911
  h("div", { class: classes.CheckboxWrapper },
7901
7912
  h("sl-checkbox", { exportparts: "label: input-label, base: input-base", checked: formState.allowBankingCollection === true, "onSl-change": (e) => {
7902
7913
  e.target.value = e.target.checked;
7903
- }, disabled: states.isPartner ? false : states.disabled, required: true, value: formState.allowBankingCollection, id: "allowBankingCollection", name: "/allowBankingCollection" }, bankingCollectionText),
7914
+ }, disabled: states.disabled, required: true, value: formState.allowBankingCollection, id: "allowBankingCollection", name: "/allowBankingCollection" }, bankingCollectionText),
7904
7915
  ((_u = formState.errors) === null || _u === void 0 ? void 0 : _u.allowBankingCollection) && (h("p", { class: classes.ErrorText }, formatErrorMessage(text.termsAndConditionsLabel, formState.errors.allowBankingCollection))))),
7905
- h("sl-button", { type: "primary", disabled: states.isPartner ? false : states.disabled, submit: true, exportparts: "base: primarybutton-base" }, text.continueButton))))));
7916
+ h("sl-button", { type: "primary", disabled: states.disabled, submit: true, exportparts: "base: primarybutton-base" }, text.continueButton))))));
7906
7917
  };
7907
7918
 
7908
7919
  function useUserInfoForm(props) {
7909
- var _a, _b, _c, _d;
7920
+ var _a, _b, _c, _d, _e, _f;
7910
7921
  const currencyRef = useRef(undefined);
7911
7922
  const phoneCountryRef = useRef(undefined);
7912
7923
  const formRef = useRef(null);
@@ -8058,9 +8069,15 @@ function useUserInfoForm(props) {
8058
8069
  postalCode: userData.postalCode,
8059
8070
  currency: userData.currency,
8060
8071
  });
8061
- const nextStep = context.overrideNextStep || "/2";
8072
+ const skipNextStep = getSkipNextStep(userData);
8073
+ const nextStep = context.overrideNextStep || skipNextStep ? "/3" : "/2";
8062
8074
  setStep(nextStep);
8063
8075
  }
8076
+ function getSkipNextStep(userData) {
8077
+ if (userData.countryCode === "US")
8078
+ return true;
8079
+ return true;
8080
+ }
8064
8081
  const hasStates = ["ES", "AU", "US", "CA"].includes(userFormContext.countryCode);
8065
8082
  const regionObj = hasStates
8066
8083
  ? ADDRESS_REGIONS[userFormContext === null || userFormContext === void 0 ? void 0 : userFormContext.countryCode]
@@ -8088,6 +8105,7 @@ function useUserInfoForm(props) {
8088
8105
  allCountries: countries,
8089
8106
  regionLabelEnum: regionObj === null || regionObj === void 0 ? void 0 : regionObj.labelEnum,
8090
8107
  regions: (regionObj === null || regionObj === void 0 ? void 0 : regionObj.regions) || [],
8108
+ partnerData: (_b = (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher,
8091
8109
  },
8092
8110
  states: {
8093
8111
  step: step === null || step === void 0 ? void 0 : step.replace("/", ""),
@@ -8096,8 +8114,8 @@ function useUserInfoForm(props) {
8096
8114
  disabled: loading,
8097
8115
  loadingError: !!(userError === null || userError === void 0 ? void 0 : userError.message),
8098
8116
  loading: loading,
8099
- isPartner: !!((_b = (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher),
8100
- isUser: !!((_d = (_c = data === null || data === void 0 ? void 0 : data.user) === null || _c === void 0 ? void 0 : _c.impactConnection) === null || _d === void 0 ? void 0 : _d.user),
8117
+ isPartner: !!((_d = (_c = data === null || data === void 0 ? void 0 : data.user) === null || _c === void 0 ? void 0 : _c.impactConnection) === null || _d === void 0 ? void 0 : _d.publisher),
8118
+ isUser: !!((_f = (_e = data === null || data === void 0 ? void 0 : data.user) === null || _e === void 0 ? void 0 : _e.impactConnection) === null || _f === void 0 ? void 0 : _f.user),
8101
8119
  formState: {
8102
8120
  ...userFormContext,
8103
8121
  errors: formErrors,
@@ -506,6 +506,7 @@ const stepOneProps = {
506
506
  },
507
507
  },
508
508
  data: {
509
+ partnerData: {},
509
510
  regionLabelEnum: "STATE",
510
511
  regions: [],
511
512
  phoneCountries: [
@@ -34,7 +34,7 @@ import './ErrorView-48e2b969.js';
34
34
  import { Q as QrCodeView } from './sqm-qr-code-view-f1d0763b.js';
35
35
  import { S as ShareButtonView, L as LeaderboardView, B as BigStatView, P as PortalFrameView, E as EditProfileView, u as useShareLink, a as useShareButton, b as useDemoBigStat, c as StatContainerView, d as PortalChangePasswordView, e as PortalRegisterView, C as ChangeMarktingView, T as TaskCardView, f as ProgressBarView, g as PoweredByImg$1, h as PortalFooterView, H as HeroView, R as ReferralIframeView, N as NameFieldsView, i as CheckboxFieldView, D as DropdownFieldView, I as InputFieldView, j as RewardExchangeView, r as rewardExchangeCustomErrorMsg, k as rewardExchangeLongText, l as rewardExchangeSelected, m as chooseAmountFixed, n as chooseAmountFixedNoDescription, o as chooseAmountVariable, p as chooseAmountVariableNoDescription, q as chooseAmountVariableDisabled, s as chooseAmountVariableUnavailable, t as confirmFixed, v as confirmVariable, w as redemptionError, x as queryError, y as success, z as successVariable, A as loading, F as empty$1, G as rewardExchange, J as CardFeedView, K as CouponCodeView, M as ProgressBar$2, O as LeadFormView, Q as LeadDropdownFieldView, U as autoColorScaleCss, V as ShadowViewAddon } from './ShadowViewAddon-f2176779.js';
36
36
  import { P as PortalContainerView, a as PortalSectionView } from './sqm-portal-container-view-1683ae32.js';
37
- import { O as OtherRegionSlotView, I as InvoiceTableView, T as TaxForm } from './sqm-invoice-table-view-3491dd80.js';
37
+ import { O as OtherRegionSlotView, I as InvoiceTableView, T as TaxForm } from './sqm-invoice-table-view-01453fa3.js';
38
38
  import { L as LeadInputFieldView } from './sqm-lead-input-field-view-4ede5d7f.js';
39
39
 
40
40
  /**