@saasquatch/mint-components 1.15.3-0 → 1.15.3-2

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 (38) hide show
  1. package/dist/cjs/sqm-banking-info-form_17.cjs.entry.js +17 -35
  2. package/dist/cjs/{sqm-invoice-table-view-3f60fba9.js → sqm-invoice-table-view-5c74607f.js} +0 -1
  3. package/dist/cjs/sqm-portal-google-registration-form.cjs.entry.js +2 -2
  4. package/dist/cjs/sqm-stencilbook.cjs.entry.js +1 -1
  5. package/dist/collection/components/sqm-portal-google-registration-form/sqm-portal-google-registration-form.js +8 -3
  6. package/dist/collection/components/tax-and-cash/TaxForm.stories.js +0 -1
  7. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +12 -23
  8. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.js +1 -1
  9. package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +4 -18
  10. package/dist/esm/sqm-banking-info-form_17.entry.js +17 -35
  11. package/dist/esm/{sqm-invoice-table-view-01453fa3.js → sqm-invoice-table-view-3491dd80.js} +0 -1
  12. package/dist/esm/sqm-portal-google-registration-form.entry.js +2 -2
  13. package/dist/esm/sqm-stencilbook.entry.js +1 -1
  14. package/dist/esm-es5/sqm-banking-info-form_17.entry.js +1 -1
  15. package/dist/esm-es5/sqm-invoice-table-view-3491dd80.js +1 -0
  16. package/dist/esm-es5/sqm-portal-google-registration-form.entry.js +1 -1
  17. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  18. package/dist/mint-components/mint-components.esm.js +1 -1
  19. package/dist/mint-components/{p-7f80a9d7.entry.js → p-042a6569.entry.js} +1 -1
  20. package/dist/mint-components/{p-92cebad6.system.entry.js → p-25ae959c.system.entry.js} +1 -1
  21. package/dist/mint-components/p-37996351.system.js +1 -1
  22. package/dist/mint-components/{p-6f6cd994.entry.js → p-3d73cd84.entry.js} +2 -2
  23. package/dist/mint-components/p-49932f12.system.js +1 -0
  24. package/dist/mint-components/{p-1f1ce7ab.entry.js → p-5868dc11.entry.js} +1 -1
  25. package/dist/mint-components/{p-9bfd9bed.system.entry.js → p-c71edfa4.system.entry.js} +1 -1
  26. package/dist/mint-components/{p-2ba713d6.system.entry.js → p-e64e8354.system.entry.js} +1 -1
  27. package/dist/mint-components/p-e8e48982.js +1 -0
  28. package/dist/types/components/sqm-portal-google-registration-form/sqm-portal-google-registration-form.d.ts +6 -1
  29. package/dist/types/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.d.ts +0 -2
  30. package/dist/types/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.d.ts +0 -1
  31. package/dist/types/components.d.ts +2 -2
  32. package/docs/docs.docx +0 -0
  33. package/docs/raisins.json +1 -1
  34. package/grapesjs/grapesjs.js +1 -1
  35. package/package.json +1 -1
  36. package/dist/esm-es5/sqm-invoice-table-view-01453fa3.js +0 -1
  37. package/dist/mint-components/p-35701119.js +0 -1
  38. package/dist/mint-components/p-86a5db85.system.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-3f60fba9.js');
21
+ const sqmInvoiceTableView = require('./sqm-invoice-table-view-5c74607f.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,12 +7751,6 @@ 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
- }
7760
7754
  return (index.h("sl-form", { class: classes.FormWrapper, "onSl-submit": callbacks.onSubmit, ref: (el) => (refs.formRef.current = el), novalidate: true },
7761
7755
  index.h("style", { type: "text/css" },
7762
7756
  styleString$6,
@@ -7804,22 +7798,18 @@ const UserInfoFormView = (props) => {
7804
7798
  }))),
7805
7799
  index.h("div", null,
7806
7800
  index.h("div", { class: classes.InputContainer },
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) ? {
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) ? {
7810
7802
  class: classes.ErrorInput,
7811
7803
  helpText: sqmInvoiceTableView.formatErrorMessage(text.firstName, formState.errors.firstName),
7812
7804
  }
7813
7805
  : {}), { id: "firstName", name: "/firstName", required: true })),
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) ? {
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) ? {
7817
7807
  class: classes.ErrorInput,
7818
7808
  helpText: sqmInvoiceTableView.formatErrorMessage(text.lastName, formState.errors.lastName),
7819
7809
  }
7820
7810
  : {}), { id: "lastName", name: "/lastName", required: true })),
7821
7811
  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 }),
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) ? {
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) ? {
7823
7813
  class: classes.ErrorInput,
7824
7814
  helpText: sqmInvoiceTableView.formatErrorMessage(text.country, formState.errors.countryCode),
7825
7815
  }
@@ -7835,8 +7825,7 @@ const UserInfoFormView = (props) => {
7835
7825
  index.h("div", { class: classes.PhoneInputsSection },
7836
7826
  index.h("p", null, text.phoneNumber),
7837
7827
  index.h("div", { class: classes.PhoneInputsContainer },
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) ? {
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) ? {
7840
7829
  class: classes.ErrorInput,
7841
7830
  }
7842
7831
  : {}), { required: true, "onSl-select": (e) => callbacks.onFormChange("phoneCountry", e) }),
@@ -7862,7 +7851,7 @@ const UserInfoFormView = (props) => {
7862
7851
  // Naive phone number validation
7863
7852
  sqmInvoiceTableView.validateBillingField(/[a-zA-Z]+/, value) &&
7864
7853
  sqmInvoiceTableView.formatErrorMessage(text.phoneNumber, text.error.fieldInvalidError);
7865
- }, disabled: states.disabled || isDisabledInput("phoneNumber") }, (((_k = formState.errors) === null || _k === void 0 ? void 0 : _k.phoneNumber) ? {
7854
+ }, disabled: states.disabled || states.isPartner }, (((_k = formState.errors) === null || _k === void 0 ? void 0 : _k.phoneNumber) ? {
7866
7855
  class: classes.ErrorInput,
7867
7856
  helpText: sqmInvoiceTableView.formatErrorMessage(text.phoneNumber, formState.errors.phoneNumber),
7868
7857
  }
@@ -7870,7 +7859,7 @@ const UserInfoFormView = (props) => {
7870
7859
  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 }) =>
7871
7860
  // Checks for non-ASCII characters
7872
7861
  !sqmInvoiceTableView.validateBillingField(/^[\x20-\xFF]+$/, value) &&
7873
- sqmInvoiceTableView.formatErrorMessage(text.address, text.error.invalidCharacterError), disabled: states.disabled || isDisabledInput("address") }, (((_l = formState.errors) === null || _l === void 0 ? void 0 : _l.address) ? {
7862
+ sqmInvoiceTableView.formatErrorMessage(text.address, text.error.invalidCharacterError), disabled: states.disabled || states.isPartner }, (((_l = formState.errors) === null || _l === void 0 ? void 0 : _l.address) ? {
7874
7863
  class: classes.ErrorInput,
7875
7864
  helpText: sqmInvoiceTableView.formatErrorMessage(text.address, formState.errors.address),
7876
7865
  }
@@ -7878,22 +7867,22 @@ const UserInfoFormView = (props) => {
7878
7867
  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 }) =>
7879
7868
  // Checks for non-ASCII characters
7880
7869
  !sqmInvoiceTableView.validateBillingField(/^[\x20-\xFF]+$/, value) &&
7881
- sqmInvoiceTableView.formatErrorMessage(text.city, text.error.invalidCharacterError), disabled: states.disabled || isDisabledInput("city") }, (((_m = formState.errors) === null || _m === void 0 ? void 0 : _m.city) ? {
7870
+ sqmInvoiceTableView.formatErrorMessage(text.city, text.error.invalidCharacterError), disabled: states.disabled || states.isPartner }, (((_m = formState.errors) === null || _m === void 0 ? void 0 : _m.city) ? {
7882
7871
  class: classes.ErrorInput,
7883
7872
  helpText: sqmInvoiceTableView.formatErrorMessage(text.city, formState.errors.city),
7884
7873
  }
7885
7874
  : {}), { required: true })),
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) ? {
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) ? {
7887
7876
  class: classes.ErrorInput,
7888
7877
  helpText: sqmInvoiceTableView.formatErrorMessage(text.state, formState.errors.state),
7889
7878
  }
7890
7879
  : {}), { required: true }), (_p = data.regions) === null || _p === void 0 ? void 0 : _p.map((r) => (index.h("sl-menu-item", { value: r.value }, r.label))))),
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) ? {
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) ? {
7892
7881
  class: classes.ErrorInput,
7893
7882
  helpText: sqmInvoiceTableView.formatErrorMessage(text.postalCode, formState.errors.postalCode),
7894
7883
  }
7895
7884
  : {}), { required: true })),
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) ? {
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) ? {
7897
7886
  class: classes.ErrorInput,
7898
7887
  helpText: sqmInvoiceTableView.formatErrorMessage(text.currency, formState.errors.currency),
7899
7888
  }
@@ -7915,13 +7904,13 @@ const UserInfoFormView = (props) => {
7915
7904
  index.h("div", { class: classes.CheckboxWrapper },
7916
7905
  index.h("sl-checkbox", { exportparts: "label: input-label, base: input-base", checked: formState.allowBankingCollection === true, "onSl-change": (e) => {
7917
7906
  e.target.value = e.target.checked;
7918
- }, disabled: states.disabled, required: true, value: formState.allowBankingCollection, id: "allowBankingCollection", name: "/allowBankingCollection" }, bankingCollectionText),
7907
+ }, disabled: states.isPartner ? false : states.disabled, required: true, value: formState.allowBankingCollection, id: "allowBankingCollection", name: "/allowBankingCollection" }, bankingCollectionText),
7919
7908
  ((_u = formState.errors) === null || _u === void 0 ? void 0 : _u.allowBankingCollection) && (index.h("p", { class: classes.ErrorText }, sqmInvoiceTableView.formatErrorMessage(text.termsAndConditionsLabel, formState.errors.allowBankingCollection))))),
7920
- index.h("sl-button", { type: "primary", disabled: states.disabled, submit: true, exportparts: "base: primarybutton-base" }, text.continueButton))))));
7909
+ index.h("sl-button", { type: "primary", disabled: states.isPartner ? false : states.disabled, submit: true, exportparts: "base: primarybutton-base" }, text.continueButton))))));
7921
7910
  };
7922
7911
 
7923
7912
  function useUserInfoForm(props) {
7924
- var _a, _b, _c, _d, _e, _f;
7913
+ var _a, _b, _c, _d;
7925
7914
  const currencyRef = stencilHooks_module.useRef(undefined);
7926
7915
  const phoneCountryRef = stencilHooks_module.useRef(undefined);
7927
7916
  const formRef = stencilHooks_module.useRef(null);
@@ -8073,15 +8062,9 @@ function useUserInfoForm(props) {
8073
8062
  postalCode: userData.postalCode,
8074
8063
  currency: userData.currency,
8075
8064
  });
8076
- const skipNextStep = getSkipNextStep(userData);
8077
- const nextStep = context.overrideNextStep || skipNextStep ? "/3" : "/2";
8065
+ const nextStep = context.overrideNextStep || "/2";
8078
8066
  setStep(nextStep);
8079
8067
  }
8080
- function getSkipNextStep(userData) {
8081
- if (userData.countryCode === "US")
8082
- return true;
8083
- return true;
8084
- }
8085
8068
  const hasStates = ["ES", "AU", "US", "CA"].includes(userFormContext.countryCode);
8086
8069
  const regionObj = hasStates
8087
8070
  ? sqmInvoiceTableView.ADDRESS_REGIONS[userFormContext === null || userFormContext === void 0 ? void 0 : userFormContext.countryCode]
@@ -8109,7 +8092,6 @@ function useUserInfoForm(props) {
8109
8092
  allCountries: countries,
8110
8093
  regionLabelEnum: regionObj === null || regionObj === void 0 ? void 0 : regionObj.labelEnum,
8111
8094
  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,
8113
8095
  },
8114
8096
  states: {
8115
8097
  step: step === null || step === void 0 ? void 0 : step.replace("/", ""),
@@ -8118,8 +8100,8 @@ function useUserInfoForm(props) {
8118
8100
  disabled: loading,
8119
8101
  loadingError: !!(userError === null || userError === void 0 ? void 0 : userError.message),
8120
8102
  loading: loading,
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),
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),
8123
8105
  formState: {
8124
8106
  ...userFormContext,
8125
8107
  errors: formErrors,
@@ -508,7 +508,6 @@ const stepOneProps = {
508
508
  },
509
509
  },
510
510
  data: {
511
- partnerData: {},
512
511
  regionLabelEnum: "STATE",
513
512
  regions: [],
514
513
  phoneCountries: [
@@ -148,7 +148,7 @@ const PortalGoogleRegistrationForm = class {
148
148
  index.registerInstance(this, hostRef);
149
149
  this.ignored = true;
150
150
  /**
151
- * Redirect participants to this page after they successfully register.
151
+ * Redirect participants to this  page after they successfully register.
152
152
  *
153
153
  * @uiName Registration redirect
154
154
  * @uiWidget pageSelect
@@ -363,7 +363,7 @@ function useGoogleDemo(props) {
363
363
  mode: "base",
364
364
  });
365
365
  return cjs.cjs({
366
- emailValidationError: true,
366
+ emailValidationError: false,
367
367
  handleEmailSubmit: () => setShowRegistrationForm({ mode: "manual" }),
368
368
  showRegistrationForm,
369
369
  handleGoogleInit: () => setShowRegistrationForm({ mode: "google" }),
@@ -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-3f60fba9.js');
41
+ const sqmInvoiceTableView = require('./sqm-invoice-table-view-5c74607f.js');
42
42
  const sqmLeadInputFieldView = require('./sqm-lead-input-field-view-89308aab.js');
43
43
 
44
44
  /**
@@ -7,11 +7,16 @@ import { PortalRegistrationFormView, } from "../sqm-portal-registration-form/sqm
7
7
  import { usePortalRegistrationForm } from "../sqm-portal-registration-form/usePortalRegistrationForm";
8
8
  import { usePortalGoogleRegistrationForm } from "./usePortalGoogleRegistrationForm";
9
9
  import { createStyleSheet } from "../../styling/JSS";
10
+ /**
11
+ * @uiName Google Registration
12
+ * @canvasRenderer always-replace
13
+ * @slots [{"name":"formData","title":"Additional Fields"},{"name":"terms","title":"Terms And Conditions Fields"}]
14
+ */
10
15
  export class PortalGoogleRegistrationForm {
11
16
  constructor() {
12
17
  this.ignored = true;
13
18
  /**
14
- * Redirect participants to this page after they successfully register.
19
+ * Redirect participants to this  page after they successfully register.
15
20
  *
16
21
  * @uiName Registration redirect
17
22
  * @uiWidget pageSelect
@@ -219,7 +224,7 @@ export class PortalGoogleRegistrationForm {
219
224
  "text": "pageSelect",
220
225
  "name": "uiWidget"
221
226
  }],
222
- "text": "Redirect participants to this page after they successfully register."
227
+ "text": "Redirect participants to this \u00A0page after they successfully register."
223
228
  },
224
229
  "attribute": "next-page",
225
230
  "reflect": false,
@@ -871,7 +876,7 @@ function useGoogleDemo(props) {
871
876
  mode: "base",
872
877
  });
873
878
  return deepmerge({
874
- emailValidationError: true,
879
+ emailValidationError: false,
875
880
  handleEmailSubmit: () => setShowRegistrationForm({ mode: "manual" }),
876
881
  showRegistrationForm,
877
882
  handleGoogleInit: () => setShowRegistrationForm({ mode: "google" }),
@@ -32,7 +32,6 @@ const stepOneProps = {
32
32
  },
33
33
  },
34
34
  data: {
35
- partnerData: {},
36
35
  regionLabelEnum: "STATE",
37
36
  regions: [],
38
37
  phoneCountries: [
@@ -154,12 +154,6 @@ 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
- }
163
157
  return (h("sl-form", { class: classes.FormWrapper, "onSl-submit": callbacks.onSubmit, ref: (el) => (refs.formRef.current = el), novalidate: true },
164
158
  h("style", { type: "text/css" },
165
159
  styleString,
@@ -207,22 +201,18 @@ export const UserInfoFormView = (props) => {
207
201
  }))),
208
202
  h("div", null,
209
203
  h("div", { class: classes.InputContainer },
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) ? {
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) ? {
213
205
  class: classes.ErrorInput,
214
206
  helpText: formatErrorMessage(text.firstName, formState.errors.firstName),
215
207
  }
216
208
  : {}), { id: "firstName", name: "/firstName", required: true })),
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) ? {
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) ? {
220
210
  class: classes.ErrorInput,
221
211
  helpText: formatErrorMessage(text.lastName, formState.errors.lastName),
222
212
  }
223
213
  : {}), { id: "lastName", name: "/lastName", required: true })),
224
214
  h("sl-input", { exportparts: "label: input-label, base: input-base", value: formState.email, label: text.email, disabled: true, id: "email", name: "/email", required: true }),
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) ? {
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) ? {
226
216
  class: classes.ErrorInput,
227
217
  helpText: formatErrorMessage(text.country, formState.errors.countryCode),
228
218
  }
@@ -238,8 +228,7 @@ export const UserInfoFormView = (props) => {
238
228
  h("div", { class: classes.PhoneInputsSection },
239
229
  h("p", null, text.phoneNumber),
240
230
  h("div", { class: classes.PhoneInputsContainer },
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) ? {
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) ? {
243
232
  class: classes.ErrorInput,
244
233
  }
245
234
  : {}), { required: true, "onSl-select": (e) => callbacks.onFormChange("phoneCountry", e) }),
@@ -265,7 +254,7 @@ export const UserInfoFormView = (props) => {
265
254
  // Naive phone number validation
266
255
  validateBillingField(/[a-zA-Z]+/, value) &&
267
256
  formatErrorMessage(text.phoneNumber, text.error.fieldInvalidError);
268
- }, disabled: states.disabled || isDisabledInput("phoneNumber") }, (((_k = formState.errors) === null || _k === void 0 ? void 0 : _k.phoneNumber) ? {
257
+ }, disabled: states.disabled || states.isPartner }, (((_k = formState.errors) === null || _k === void 0 ? void 0 : _k.phoneNumber) ? {
269
258
  class: classes.ErrorInput,
270
259
  helpText: formatErrorMessage(text.phoneNumber, formState.errors.phoneNumber),
271
260
  }
@@ -273,7 +262,7 @@ export const UserInfoFormView = (props) => {
273
262
  h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.address, id: "address", name: "/address", value: formState.address, validationError: ({ value }) =>
274
263
  // Checks for non-ASCII characters
275
264
  !validateBillingField(/^[\x20-\xFF]+$/, value) &&
276
- formatErrorMessage(text.address, text.error.invalidCharacterError), disabled: states.disabled || isDisabledInput("address") }, (((_l = formState.errors) === null || _l === void 0 ? void 0 : _l.address) ? {
265
+ formatErrorMessage(text.address, text.error.invalidCharacterError), disabled: states.disabled || states.isPartner }, (((_l = formState.errors) === null || _l === void 0 ? void 0 : _l.address) ? {
277
266
  class: classes.ErrorInput,
278
267
  helpText: formatErrorMessage(text.address, formState.errors.address),
279
268
  }
@@ -281,22 +270,22 @@ export const UserInfoFormView = (props) => {
281
270
  h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.city, id: "city", name: "/city", value: formState.city, validationError: ({ value }) =>
282
271
  // Checks for non-ASCII characters
283
272
  !validateBillingField(/^[\x20-\xFF]+$/, value) &&
284
- formatErrorMessage(text.city, text.error.invalidCharacterError), disabled: states.disabled || isDisabledInput("city") }, (((_m = formState.errors) === null || _m === void 0 ? void 0 : _m.city) ? {
273
+ formatErrorMessage(text.city, text.error.invalidCharacterError), disabled: states.disabled || states.isPartner }, (((_m = formState.errors) === null || _m === void 0 ? void 0 : _m.city) ? {
285
274
  class: classes.ErrorInput,
286
275
  helpText: formatErrorMessage(text.city, formState.errors.city),
287
276
  }
288
277
  : {}), { required: true })),
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) ? {
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) ? {
290
279
  class: classes.ErrorInput,
291
280
  helpText: formatErrorMessage(text.state, formState.errors.state),
292
281
  }
293
282
  : {}), { required: true }), (_p = data.regions) === null || _p === void 0 ? void 0 : _p.map((r) => (h("sl-menu-item", { value: r.value }, r.label))))),
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) ? {
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) ? {
295
284
  class: classes.ErrorInput,
296
285
  helpText: formatErrorMessage(text.postalCode, formState.errors.postalCode),
297
286
  }
298
287
  : {}), { required: true })),
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) ? {
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) ? {
300
289
  class: classes.ErrorInput,
301
290
  helpText: formatErrorMessage(text.currency, formState.errors.currency),
302
291
  }
@@ -318,7 +307,7 @@ export const UserInfoFormView = (props) => {
318
307
  h("div", { class: classes.CheckboxWrapper },
319
308
  h("sl-checkbox", { exportparts: "label: input-label, base: input-base", checked: formState.allowBankingCollection === true, "onSl-change": (e) => {
320
309
  e.target.value = e.target.checked;
321
- }, disabled: states.disabled, required: true, value: formState.allowBankingCollection, id: "allowBankingCollection", name: "/allowBankingCollection" }, bankingCollectionText),
310
+ }, disabled: states.isPartner ? false : states.disabled, required: true, value: formState.allowBankingCollection, id: "allowBankingCollection", name: "/allowBankingCollection" }, bankingCollectionText),
322
311
  ((_u = formState.errors) === null || _u === void 0 ? void 0 : _u.allowBankingCollection) && (h("p", { class: classes.ErrorText }, formatErrorMessage(text.termsAndConditionsLabel, formState.errors.allowBankingCollection))))),
323
- h("sl-button", { type: "primary", disabled: states.disabled, submit: true, exportparts: "base: primarybutton-base" }, text.continueButton))))));
312
+ h("sl-button", { type: "primary", disabled: states.isPartner ? false : states.disabled, submit: true, exportparts: "base: primarybutton-base" }, text.continueButton))))));
324
313
  };
@@ -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; }[]; partnerData: ImpactPublisher; }; 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; }[]; }; 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, _e, _f;
8
+ var _a, _b, _c, _d;
9
9
  const currencyRef = useRef(undefined);
10
10
  const phoneCountryRef = useRef(undefined);
11
11
  const formRef = useRef(null);
@@ -157,22 +157,9 @@ export function useUserInfoForm(props) {
157
157
  postalCode: userData.postalCode,
158
158
  currency: userData.currency,
159
159
  });
160
- const skipNextStep = getSkipNextStep(userData);
161
- const nextStep = context.overrideNextStep || skipNextStep ? "/3" : "/2";
160
+ const nextStep = context.overrideNextStep || "/2";
162
161
  setStep(nextStep);
163
162
  }
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
- }
176
163
  const hasStates = ["ES", "AU", "US", "CA"].includes(userFormContext.countryCode);
177
164
  const regionObj = hasStates
178
165
  ? ADDRESS_REGIONS[userFormContext === null || userFormContext === void 0 ? void 0 : userFormContext.countryCode]
@@ -200,7 +187,6 @@ export function useUserInfoForm(props) {
200
187
  allCountries: countries,
201
188
  regionLabelEnum: regionObj === null || regionObj === void 0 ? void 0 : regionObj.labelEnum,
202
189
  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,
204
190
  },
205
191
  states: {
206
192
  step: step === null || step === void 0 ? void 0 : step.replace("/", ""),
@@ -209,8 +195,8 @@ export function useUserInfoForm(props) {
209
195
  disabled: loading,
210
196
  loadingError: !!(userError === null || userError === void 0 ? void 0 : userError.message),
211
197
  loading: loading,
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),
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),
214
200
  formState: {
215
201
  ...userFormContext,
216
202
  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-01453fa3.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';
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,12 +7747,6 @@ 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
- }
7756
7750
  return (h("sl-form", { class: classes.FormWrapper, "onSl-submit": callbacks.onSubmit, ref: (el) => (refs.formRef.current = el), novalidate: true },
7757
7751
  h("style", { type: "text/css" },
7758
7752
  styleString$6,
@@ -7800,22 +7794,18 @@ const UserInfoFormView = (props) => {
7800
7794
  }))),
7801
7795
  h("div", null,
7802
7796
  h("div", { class: classes.InputContainer },
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) ? {
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) ? {
7806
7798
  class: classes.ErrorInput,
7807
7799
  helpText: formatErrorMessage(text.firstName, formState.errors.firstName),
7808
7800
  }
7809
7801
  : {}), { id: "firstName", name: "/firstName", required: true })),
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) ? {
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) ? {
7813
7803
  class: classes.ErrorInput,
7814
7804
  helpText: formatErrorMessage(text.lastName, formState.errors.lastName),
7815
7805
  }
7816
7806
  : {}), { id: "lastName", name: "/lastName", required: true })),
7817
7807
  h("sl-input", { exportparts: "label: input-label, base: input-base", value: formState.email, label: text.email, disabled: true, id: "email", name: "/email", required: true }),
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) ? {
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) ? {
7819
7809
  class: classes.ErrorInput,
7820
7810
  helpText: formatErrorMessage(text.country, formState.errors.countryCode),
7821
7811
  }
@@ -7831,8 +7821,7 @@ const UserInfoFormView = (props) => {
7831
7821
  h("div", { class: classes.PhoneInputsSection },
7832
7822
  h("p", null, text.phoneNumber),
7833
7823
  h("div", { class: classes.PhoneInputsContainer },
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) ? {
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) ? {
7836
7825
  class: classes.ErrorInput,
7837
7826
  }
7838
7827
  : {}), { required: true, "onSl-select": (e) => callbacks.onFormChange("phoneCountry", e) }),
@@ -7858,7 +7847,7 @@ const UserInfoFormView = (props) => {
7858
7847
  // Naive phone number validation
7859
7848
  validateBillingField(/[a-zA-Z]+/, value) &&
7860
7849
  formatErrorMessage(text.phoneNumber, text.error.fieldInvalidError);
7861
- }, disabled: states.disabled || isDisabledInput("phoneNumber") }, (((_k = formState.errors) === null || _k === void 0 ? void 0 : _k.phoneNumber) ? {
7850
+ }, disabled: states.disabled || states.isPartner }, (((_k = formState.errors) === null || _k === void 0 ? void 0 : _k.phoneNumber) ? {
7862
7851
  class: classes.ErrorInput,
7863
7852
  helpText: formatErrorMessage(text.phoneNumber, formState.errors.phoneNumber),
7864
7853
  }
@@ -7866,7 +7855,7 @@ const UserInfoFormView = (props) => {
7866
7855
  h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.address, id: "address", name: "/address", value: formState.address, validationError: ({ value }) =>
7867
7856
  // Checks for non-ASCII characters
7868
7857
  !validateBillingField(/^[\x20-\xFF]+$/, value) &&
7869
- formatErrorMessage(text.address, text.error.invalidCharacterError), disabled: states.disabled || isDisabledInput("address") }, (((_l = formState.errors) === null || _l === void 0 ? void 0 : _l.address) ? {
7858
+ formatErrorMessage(text.address, text.error.invalidCharacterError), disabled: states.disabled || states.isPartner }, (((_l = formState.errors) === null || _l === void 0 ? void 0 : _l.address) ? {
7870
7859
  class: classes.ErrorInput,
7871
7860
  helpText: formatErrorMessage(text.address, formState.errors.address),
7872
7861
  }
@@ -7874,22 +7863,22 @@ const UserInfoFormView = (props) => {
7874
7863
  h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.city, id: "city", name: "/city", value: formState.city, validationError: ({ value }) =>
7875
7864
  // Checks for non-ASCII characters
7876
7865
  !validateBillingField(/^[\x20-\xFF]+$/, value) &&
7877
- formatErrorMessage(text.city, text.error.invalidCharacterError), disabled: states.disabled || isDisabledInput("city") }, (((_m = formState.errors) === null || _m === void 0 ? void 0 : _m.city) ? {
7866
+ formatErrorMessage(text.city, text.error.invalidCharacterError), disabled: states.disabled || states.isPartner }, (((_m = formState.errors) === null || _m === void 0 ? void 0 : _m.city) ? {
7878
7867
  class: classes.ErrorInput,
7879
7868
  helpText: formatErrorMessage(text.city, formState.errors.city),
7880
7869
  }
7881
7870
  : {}), { required: true })),
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) ? {
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) ? {
7883
7872
  class: classes.ErrorInput,
7884
7873
  helpText: formatErrorMessage(text.state, formState.errors.state),
7885
7874
  }
7886
7875
  : {}), { required: true }), (_p = data.regions) === null || _p === void 0 ? void 0 : _p.map((r) => (h("sl-menu-item", { value: r.value }, r.label))))),
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) ? {
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) ? {
7888
7877
  class: classes.ErrorInput,
7889
7878
  helpText: formatErrorMessage(text.postalCode, formState.errors.postalCode),
7890
7879
  }
7891
7880
  : {}), { required: true })),
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) ? {
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) ? {
7893
7882
  class: classes.ErrorInput,
7894
7883
  helpText: formatErrorMessage(text.currency, formState.errors.currency),
7895
7884
  }
@@ -7911,13 +7900,13 @@ const UserInfoFormView = (props) => {
7911
7900
  h("div", { class: classes.CheckboxWrapper },
7912
7901
  h("sl-checkbox", { exportparts: "label: input-label, base: input-base", checked: formState.allowBankingCollection === true, "onSl-change": (e) => {
7913
7902
  e.target.value = e.target.checked;
7914
- }, disabled: states.disabled, required: true, value: formState.allowBankingCollection, id: "allowBankingCollection", name: "/allowBankingCollection" }, bankingCollectionText),
7903
+ }, disabled: states.isPartner ? false : states.disabled, required: true, value: formState.allowBankingCollection, id: "allowBankingCollection", name: "/allowBankingCollection" }, bankingCollectionText),
7915
7904
  ((_u = formState.errors) === null || _u === void 0 ? void 0 : _u.allowBankingCollection) && (h("p", { class: classes.ErrorText }, formatErrorMessage(text.termsAndConditionsLabel, formState.errors.allowBankingCollection))))),
7916
- h("sl-button", { type: "primary", disabled: states.disabled, submit: true, exportparts: "base: primarybutton-base" }, text.continueButton))))));
7905
+ h("sl-button", { type: "primary", disabled: states.isPartner ? false : states.disabled, submit: true, exportparts: "base: primarybutton-base" }, text.continueButton))))));
7917
7906
  };
7918
7907
 
7919
7908
  function useUserInfoForm(props) {
7920
- var _a, _b, _c, _d, _e, _f;
7909
+ var _a, _b, _c, _d;
7921
7910
  const currencyRef = useRef(undefined);
7922
7911
  const phoneCountryRef = useRef(undefined);
7923
7912
  const formRef = useRef(null);
@@ -8069,15 +8058,9 @@ function useUserInfoForm(props) {
8069
8058
  postalCode: userData.postalCode,
8070
8059
  currency: userData.currency,
8071
8060
  });
8072
- const skipNextStep = getSkipNextStep(userData);
8073
- const nextStep = context.overrideNextStep || skipNextStep ? "/3" : "/2";
8061
+ const nextStep = context.overrideNextStep || "/2";
8074
8062
  setStep(nextStep);
8075
8063
  }
8076
- function getSkipNextStep(userData) {
8077
- if (userData.countryCode === "US")
8078
- return true;
8079
- return true;
8080
- }
8081
8064
  const hasStates = ["ES", "AU", "US", "CA"].includes(userFormContext.countryCode);
8082
8065
  const regionObj = hasStates
8083
8066
  ? ADDRESS_REGIONS[userFormContext === null || userFormContext === void 0 ? void 0 : userFormContext.countryCode]
@@ -8105,7 +8088,6 @@ function useUserInfoForm(props) {
8105
8088
  allCountries: countries,
8106
8089
  regionLabelEnum: regionObj === null || regionObj === void 0 ? void 0 : regionObj.labelEnum,
8107
8090
  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,
8109
8091
  },
8110
8092
  states: {
8111
8093
  step: step === null || step === void 0 ? void 0 : step.replace("/", ""),
@@ -8114,8 +8096,8 @@ function useUserInfoForm(props) {
8114
8096
  disabled: loading,
8115
8097
  loadingError: !!(userError === null || userError === void 0 ? void 0 : userError.message),
8116
8098
  loading: loading,
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),
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),
8119
8101
  formState: {
8120
8102
  ...userFormContext,
8121
8103
  errors: formErrors,
@@ -506,7 +506,6 @@ const stepOneProps = {
506
506
  },
507
507
  },
508
508
  data: {
509
- partnerData: {},
510
509
  regionLabelEnum: "STATE",
511
510
  regions: [],
512
511
  phoneCountries: [
@@ -144,7 +144,7 @@ const PortalGoogleRegistrationForm = class {
144
144
  registerInstance(this, hostRef);
145
145
  this.ignored = true;
146
146
  /**
147
- * Redirect participants to this page after they successfully register.
147
+ * Redirect participants to this  page after they successfully register.
148
148
  *
149
149
  * @uiName Registration redirect
150
150
  * @uiWidget pageSelect
@@ -359,7 +359,7 @@ function useGoogleDemo(props) {
359
359
  mode: "base",
360
360
  });
361
361
  return cjs({
362
- emailValidationError: true,
362
+ emailValidationError: false,
363
363
  handleEmailSubmit: () => setShowRegistrationForm({ mode: "manual" }),
364
364
  showRegistrationForm,
365
365
  handleGoogleInit: () => setShowRegistrationForm({ mode: "google" }),