@saasquatch/mint-components 2.4.6 → 2.4.7-1

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 (39) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/mint-components.cjs.js +1 -1
  3. package/dist/cjs/sqm-email-verification_2.cjs.entry.js +17 -4
  4. package/dist/cjs/{sqm-partner-info-modal-view-d9b61d54.js → sqm-partner-info-modal-view-a352d3ae.js} +19 -4
  5. package/dist/cjs/sqm-stencilbook.cjs.entry.js +17 -1
  6. package/dist/collection/components/sqm-partner-info-modal/PartnerInfoModal.stories.js +15 -0
  7. package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal-view.js +19 -4
  8. package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal.js +57 -1
  9. package/dist/collection/components/sqm-partner-info-modal/usePartnerInfoModal.js +5 -3
  10. package/dist/esm/loader.js +1 -1
  11. package/dist/esm/mint-components.js +1 -1
  12. package/dist/esm/sqm-email-verification_2.entry.js +17 -4
  13. package/dist/esm/{sqm-partner-info-modal-view-b921fed1.js → sqm-partner-info-modal-view-506d7d50.js} +19 -4
  14. package/dist/esm/sqm-stencilbook.entry.js +17 -1
  15. package/dist/esm-es5/loader.js +1 -1
  16. package/dist/esm-es5/mint-components.js +1 -1
  17. package/dist/esm-es5/sqm-email-verification_2.entry.js +1 -1
  18. package/dist/esm-es5/sqm-partner-info-modal-view-506d7d50.js +1 -0
  19. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  20. package/dist/mint-components/mint-components.esm.js +1 -1
  21. package/dist/mint-components/p-a492f5de.system.entry.js +1 -0
  22. package/dist/mint-components/p-bfb00685.system.js +1 -1
  23. package/dist/mint-components/{p-3de1b8a7.system.entry.js → p-c4c65992.system.entry.js} +1 -1
  24. package/dist/mint-components/{p-654cdee8.entry.js → p-c9f5def4.entry.js} +5 -3
  25. package/dist/mint-components/{p-fb2d9545.entry.js → p-cc320bac.entry.js} +2 -2
  26. package/dist/mint-components/p-e359de22.system.js +1 -0
  27. package/dist/mint-components/p-ef3ffaa9.js +1 -0
  28. package/dist/types/components/sqm-partner-info-modal/PartnerInfoModal.stories.d.ts +1 -0
  29. package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal-view.d.ts +3 -0
  30. package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal.d.ts +9 -0
  31. package/dist/types/components.d.ts +18 -0
  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-partner-info-modal-view-b921fed1.js +0 -1
  37. package/dist/mint-components/p-288249ae.system.entry.js +0 -1
  38. package/dist/mint-components/p-db73312a.system.js +0 -1
  39. package/dist/mint-components/p-f75ead20.js +0 -1
@@ -84,6 +84,14 @@ function PartnerInfoModalContentView(props) {
84
84
  const { states, callbacks, text } = props;
85
85
  const sheet = JSS.createStyleSheet(style);
86
86
  const styleString = sheet.toString();
87
+ const emailVerificationMessage = global.intl.formatMessage({
88
+ id: "emailVerificationErrorText",
89
+ defaultMessage: text.emailVerificationErrorText,
90
+ }, {
91
+ loginLinkText: (index.h("a", {
92
+ //AL: TODO
93
+ target: "_blank", href: `https://app.impact.com/login.user` }, text.loginLinkText)),
94
+ });
87
95
  const supportMessage = global.intl.formatMessage({
88
96
  id: "supportDescriptionExistingPartner",
89
97
  defaultMessage: text.supportDescriptionExistingPartner,
@@ -107,27 +115,34 @@ function PartnerInfoModalContentView(props) {
107
115
  index.h("div", { class: sheet.classes.FormFields },
108
116
  description,
109
117
  states.shouldDisplayNameFields && (index.h(index.Fragment, null,
110
- index.h("sl-input", { exportparts: "label: input-label, base: input-base", class: sheet.classes.NameInput, label: "First Name", value: states.firstName, "onSl-input": callbacks.onFirstNameChange, disabled: states.submitting, required: true }),
111
- index.h("sl-input", { exportparts: "label: input-label, base: input-base", class: sheet.classes.NameInput, label: "Last Name", value: states.lastName, "onSl-input": callbacks.onLastNameChange, disabled: states.submitting, required: true }))),
118
+ index.h("sl-input", { exportparts: "label: input-label, base: input-base", class: sheet.classes.NameInput, label: "First Name", value: states.firstName, "onSl-input": callbacks.onFirstNameChange, disabled: states.submitting || !states.emailCanBeUsed, required: true }),
119
+ index.h("sl-input", { exportparts: "label: input-label, base: input-base", class: sheet.classes.NameInput, label: "Last Name", value: states.lastName, "onSl-input": callbacks.onLastNameChange, disabled: states.submitting || !states.emailCanBeUsed, required: true }))),
112
120
  index.h("sl-select", { exportparts: "label: input-label, base: input-base, menu: select-menu", label: text.countryLabel, value: states.countryCode, disabled: states.submitting ||
121
+ !states.emailCanBeUsed ||
113
122
  (!!states.countryCode && states.isExistingPartner), required: true, hoist: true, "onSl-select": callbacks.onCountryChange },
114
123
  index.h("sl-input", { class: sheet.classes.SearchInput, placeholder: text.searchCountryPlaceholder, onKeyDown: (e) => e.stopPropagation(), "onSl-input": (e) => {
115
124
  var _a;
116
125
  callbacks.setCountrySearch((_a = e.target) === null || _a === void 0 ? void 0 : _a.value);
117
126
  } }),
118
127
  index.h("div", { class: sheet.classes.SelectMenu }, (_a = states.filteredCountries) === null || _a === void 0 ? void 0 : _a.map((c) => (index.h("sl-menu-item", { value: c.countryCode }, c.displayName))))),
119
- index.h("sl-select", { exportparts: "label: input-label, base: input-base", label: text.currencyLabel, value: states.currency, disabled: states.submitting || (!!states.currency && states.isExistingPartner), required: true, hoist: true, "onSl-select": callbacks.onCurrencyChange },
128
+ index.h("sl-select", { exportparts: "label: input-label, base: input-base", label: text.currencyLabel, value: states.currency, disabled: states.submitting ||
129
+ !states.emailCanBeUsed ||
130
+ (!!states.currency && states.isExistingPartner), required: true, hoist: true, "onSl-select": callbacks.onCurrencyChange },
120
131
  index.h("sl-input", { class: sheet.classes.SearchInput, placeholder: text.searchCurrencyPlaceholder, onKeyDown: (e) => e.stopPropagation(), "onSl-input": (e) => { var _a; return callbacks.setCurrencySearch((_a = e.target) === null || _a === void 0 ? void 0 : _a.value); } }),
121
132
  index.h("div", { class: sheet.classes.SelectMenu }, (_b = states.filteredCurrencies) === null || _b === void 0 ? void 0 : _b.map((c) => (index.h("sl-menu-item", { value: c.currencyCode },
122
133
  c.currencyCode,
123
134
  " - ",
124
135
  c.displayName))))),
125
136
  index.h("div", { class: sheet.classes.CheckboxWrapper },
126
- index.h("sl-checkbox", { class: sheet.classes.Checkbox, checked: states.allowBankingCollection === true, "onSl-change": callbacks.onCheckboxChange, disabled: states.submitting, required: true, value: states.allowBankingCollection, id: "allowBankingCollection", name: "/allowBankingCollection" }, bankingCollectionText))),
137
+ index.h("sl-checkbox", { class: sheet.classes.Checkbox, checked: states.allowBankingCollection === true, "onSl-change": callbacks.onCheckboxChange, disabled: states.submitting || !states.emailCanBeUsed, required: true, value: states.allowBankingCollection, id: "allowBankingCollection", name: "/allowBankingCollection" }, bankingCollectionText))),
127
138
  states.error && (index.h("div", { class: sheet.classes.ErrorMessage },
128
139
  index.h("sqm-form-message", { class: sheet.classes.ErrorMessage, type: "error" },
129
140
  index.h("p", { part: "alert-description" }, states.error)))),
141
+ !states.emailCanBeUsed && (index.h("div", { class: sheet.classes.ErrorMessage },
142
+ index.h("sqm-form-message", { type: "error" },
143
+ index.h("p", { part: "alert-description" }, emailVerificationMessage)))),
130
144
  index.h("sl-button", { slot: "footer", type: "primary", loading: states.submitting, disabled: states.submitting ||
145
+ !states.emailCanBeUsed ||
131
146
  !states.countryCode ||
132
147
  !states.currency ||
133
148
  !states.allowBankingCollection ||
@@ -40,7 +40,7 @@ const sqmPortalContainerView = require('./sqm-portal-container-view-757f921b.js'
40
40
  const sqmUserInfoFormView = require('./sqm-user-info-form-view-9745956d.js');
41
41
  const sqmLeadInputFieldView = require('./sqm-lead-input-field-view-88de1b78.js');
42
42
  require('./data-04ef5511.js');
43
- const sqmPartnerInfoModalView = require('./sqm-partner-info-modal-view-d9b61d54.js');
43
+ const sqmPartnerInfoModalView = require('./sqm-partner-info-modal-view-a352d3ae.js');
44
44
 
45
45
  /**
46
46
  * lodash (Custom Build) <https://lodash.com/>
@@ -19393,6 +19393,8 @@ const defaultText$2 = {
19393
19393
  allowBankingCollection: "I have read the {termsAndConditionsLink} and allow impact.com to collect my tax and banking information",
19394
19394
  termsAndConditionsLabel: "terms and conditions",
19395
19395
  termsAndConditionsLink: "https://terms.advocate.impact.com/PayoutTermsAndConditions.html",
19396
+ emailVerificationErrorText: "We couldn't verify your email. Please {loginLinkText} to continue.",
19397
+ loginLinkText: "log in to your Impact account",
19396
19398
  };
19397
19399
  const defaultProps$y = {
19398
19400
  states: {
@@ -19406,6 +19408,7 @@ const defaultProps$y = {
19406
19408
  countryCode: "",
19407
19409
  currency: "",
19408
19410
  error: "",
19411
+ emailCanBeUsed: true,
19409
19412
  success: false,
19410
19413
  filteredCountries: demoCountries,
19411
19414
  filteredCurrencies: demoCurrencies,
@@ -19500,6 +19503,18 @@ const ValidationError$1 = () => {
19500
19503
  };
19501
19504
  return index.h(sqmPartnerInfoModalView.PartnerInfoModalView, Object.assign({}, props));
19502
19505
  };
19506
+ const EmailVerificationRequired = () => {
19507
+ const props = {
19508
+ ...defaultProps$y,
19509
+ states: {
19510
+ ...defaultProps$y.states,
19511
+ countryCode: "US",
19512
+ currency: "USD",
19513
+ emailCanBeUsed: false,
19514
+ },
19515
+ };
19516
+ return index.h(sqmPartnerInfoModalView.PartnerInfoModalView, Object.assign({}, props));
19517
+ };
19503
19518
  const Closed = () => {
19504
19519
  const props = {
19505
19520
  ...defaultProps$y,
@@ -19565,6 +19580,7 @@ const PartnerInfoModal = /*#__PURE__*/Object.freeze({
19565
19580
  Submitting: Submitting,
19566
19581
  WithError: WithError$3,
19567
19582
  ValidationError: ValidationError$1,
19583
+ EmailVerificationRequired: EmailVerificationRequired,
19568
19584
  Closed: Closed,
19569
19585
  SQMComponentExistingPartner: SQMComponentExistingPartner,
19570
19586
  SQMComponentNewPartner: SQMComponentNewPartner,
@@ -47,6 +47,8 @@ const defaultText = {
47
47
  allowBankingCollection: "I have read the {termsAndConditionsLink} and allow impact.com to collect my tax and banking information",
48
48
  termsAndConditionsLabel: "terms and conditions",
49
49
  termsAndConditionsLink: "https://terms.advocate.impact.com/PayoutTermsAndConditions.html",
50
+ emailVerificationErrorText: "We couldn't verify your email. Please {loginLinkText} to continue.",
51
+ loginLinkText: "log in to your Impact account",
50
52
  };
51
53
  const defaultProps = {
52
54
  states: {
@@ -60,6 +62,7 @@ const defaultProps = {
60
62
  countryCode: "",
61
63
  currency: "",
62
64
  error: "",
65
+ emailCanBeUsed: true,
63
66
  success: false,
64
67
  filteredCountries: demoCountries,
65
68
  filteredCurrencies: demoCurrencies,
@@ -154,6 +157,18 @@ export const ValidationError = () => {
154
157
  };
155
158
  return h(PartnerInfoModalView, Object.assign({}, props));
156
159
  };
160
+ export const EmailVerificationRequired = () => {
161
+ const props = {
162
+ ...defaultProps,
163
+ states: {
164
+ ...defaultProps.states,
165
+ countryCode: "US",
166
+ currency: "USD",
167
+ emailCanBeUsed: false,
168
+ },
169
+ };
170
+ return h(PartnerInfoModalView, Object.assign({}, props));
171
+ };
157
172
  export const Closed = () => {
158
173
  const props = {
159
174
  ...defaultProps,
@@ -81,6 +81,14 @@ export function PartnerInfoModalContentView(props) {
81
81
  const { states, callbacks, text } = props;
82
82
  const sheet = createStyleSheet(style);
83
83
  const styleString = sheet.toString();
84
+ const emailVerificationMessage = intl.formatMessage({
85
+ id: "emailVerificationErrorText",
86
+ defaultMessage: text.emailVerificationErrorText,
87
+ }, {
88
+ loginLinkText: (h("a", {
89
+ //AL: TODO
90
+ target: "_blank", href: `https://app.impact.com/login.user` }, text.loginLinkText)),
91
+ });
84
92
  const supportMessage = intl.formatMessage({
85
93
  id: "supportDescriptionExistingPartner",
86
94
  defaultMessage: text.supportDescriptionExistingPartner,
@@ -104,27 +112,34 @@ export function PartnerInfoModalContentView(props) {
104
112
  h("div", { class: sheet.classes.FormFields },
105
113
  description,
106
114
  states.shouldDisplayNameFields && (h(Fragment, null,
107
- h("sl-input", { exportparts: "label: input-label, base: input-base", class: sheet.classes.NameInput, label: "First Name", value: states.firstName, "onSl-input": callbacks.onFirstNameChange, disabled: states.submitting, required: true }),
108
- h("sl-input", { exportparts: "label: input-label, base: input-base", class: sheet.classes.NameInput, label: "Last Name", value: states.lastName, "onSl-input": callbacks.onLastNameChange, disabled: states.submitting, required: true }))),
115
+ h("sl-input", { exportparts: "label: input-label, base: input-base", class: sheet.classes.NameInput, label: "First Name", value: states.firstName, "onSl-input": callbacks.onFirstNameChange, disabled: states.submitting || !states.emailCanBeUsed, required: true }),
116
+ h("sl-input", { exportparts: "label: input-label, base: input-base", class: sheet.classes.NameInput, label: "Last Name", value: states.lastName, "onSl-input": callbacks.onLastNameChange, disabled: states.submitting || !states.emailCanBeUsed, required: true }))),
109
117
  h("sl-select", { exportparts: "label: input-label, base: input-base, menu: select-menu", label: text.countryLabel, value: states.countryCode, disabled: states.submitting ||
118
+ !states.emailCanBeUsed ||
110
119
  (!!states.countryCode && states.isExistingPartner), required: true, hoist: true, "onSl-select": callbacks.onCountryChange },
111
120
  h("sl-input", { class: sheet.classes.SearchInput, placeholder: text.searchCountryPlaceholder, onKeyDown: (e) => e.stopPropagation(), "onSl-input": (e) => {
112
121
  var _a;
113
122
  callbacks.setCountrySearch((_a = e.target) === null || _a === void 0 ? void 0 : _a.value);
114
123
  } }),
115
124
  h("div", { class: sheet.classes.SelectMenu }, (_a = states.filteredCountries) === null || _a === void 0 ? void 0 : _a.map((c) => (h("sl-menu-item", { value: c.countryCode }, c.displayName))))),
116
- h("sl-select", { exportparts: "label: input-label, base: input-base", label: text.currencyLabel, value: states.currency, disabled: states.submitting || (!!states.currency && states.isExistingPartner), required: true, hoist: true, "onSl-select": callbacks.onCurrencyChange },
125
+ h("sl-select", { exportparts: "label: input-label, base: input-base", label: text.currencyLabel, value: states.currency, disabled: states.submitting ||
126
+ !states.emailCanBeUsed ||
127
+ (!!states.currency && states.isExistingPartner), required: true, hoist: true, "onSl-select": callbacks.onCurrencyChange },
117
128
  h("sl-input", { class: sheet.classes.SearchInput, placeholder: text.searchCurrencyPlaceholder, onKeyDown: (e) => e.stopPropagation(), "onSl-input": (e) => { var _a; return callbacks.setCurrencySearch((_a = e.target) === null || _a === void 0 ? void 0 : _a.value); } }),
118
129
  h("div", { class: sheet.classes.SelectMenu }, (_b = states.filteredCurrencies) === null || _b === void 0 ? void 0 : _b.map((c) => (h("sl-menu-item", { value: c.currencyCode },
119
130
  c.currencyCode,
120
131
  " - ",
121
132
  c.displayName))))),
122
133
  h("div", { class: sheet.classes.CheckboxWrapper },
123
- h("sl-checkbox", { class: sheet.classes.Checkbox, checked: states.allowBankingCollection === true, "onSl-change": callbacks.onCheckboxChange, disabled: states.submitting, required: true, value: states.allowBankingCollection, id: "allowBankingCollection", name: "/allowBankingCollection" }, bankingCollectionText))),
134
+ h("sl-checkbox", { class: sheet.classes.Checkbox, checked: states.allowBankingCollection === true, "onSl-change": callbacks.onCheckboxChange, disabled: states.submitting || !states.emailCanBeUsed, required: true, value: states.allowBankingCollection, id: "allowBankingCollection", name: "/allowBankingCollection" }, bankingCollectionText))),
124
135
  states.error && (h("div", { class: sheet.classes.ErrorMessage },
125
136
  h("sqm-form-message", { class: sheet.classes.ErrorMessage, type: "error" },
126
137
  h("p", { part: "alert-description" }, states.error)))),
138
+ !states.emailCanBeUsed && (h("div", { class: sheet.classes.ErrorMessage },
139
+ h("sqm-form-message", { type: "error" },
140
+ h("p", { part: "alert-description" }, emailVerificationMessage)))),
127
141
  h("sl-button", { slot: "footer", type: "primary", loading: states.submitting, disabled: states.submitting ||
142
+ !states.emailCanBeUsed ||
128
143
  !states.countryCode ||
129
144
  !states.currency ||
130
145
  !states.allowBankingCollection ||
@@ -101,6 +101,15 @@ export class PartnerInfoModal {
101
101
  * @uiWidget textArea
102
102
  */
103
103
  this.networkErrorText = "An error occurred. Please try again.";
104
+ /**
105
+ * @uiName Email verification error text
106
+ * @uiWidget textArea
107
+ */
108
+ this.emailVerificationErrorText = "An account with this email already exists. Please log in to {loginLinkText} to verify your email.";
109
+ /**
110
+ * @uiName login link text
111
+ */
112
+ this.loginLinkText = "impact.com";
104
113
  /**
105
114
  * @uiName Missing fields error text
106
115
  * @uiWidget textArea
@@ -493,6 +502,51 @@ export class PartnerInfoModal {
493
502
  "reflect": false,
494
503
  "defaultValue": "\"An error occurred. Please try again.\""
495
504
  },
505
+ "emailVerificationErrorText": {
506
+ "type": "string",
507
+ "mutable": false,
508
+ "complexType": {
509
+ "original": "string",
510
+ "resolved": "string",
511
+ "references": {}
512
+ },
513
+ "required": false,
514
+ "optional": false,
515
+ "docs": {
516
+ "tags": [{
517
+ "text": "Email verification error text",
518
+ "name": "uiName"
519
+ }, {
520
+ "text": "textArea",
521
+ "name": "uiWidget"
522
+ }],
523
+ "text": ""
524
+ },
525
+ "attribute": "email-verification-error-text",
526
+ "reflect": false,
527
+ "defaultValue": "\"An account with this email already exists. Please log in to {loginLinkText} to verify your email.\""
528
+ },
529
+ "loginLinkText": {
530
+ "type": "string",
531
+ "mutable": false,
532
+ "complexType": {
533
+ "original": "string",
534
+ "resolved": "string",
535
+ "references": {}
536
+ },
537
+ "required": false,
538
+ "optional": false,
539
+ "docs": {
540
+ "tags": [{
541
+ "text": "login link text",
542
+ "name": "uiName"
543
+ }],
544
+ "text": ""
545
+ },
546
+ "attribute": "login-link-text",
547
+ "reflect": false,
548
+ "defaultValue": "\"impact.com\""
549
+ },
496
550
  "missingFieldsErrorText": {
497
551
  "type": "string",
498
552
  "mutable": false,
@@ -573,7 +627,7 @@ export class PartnerInfoModal {
573
627
  "mutable": false,
574
628
  "complexType": {
575
629
  "original": "DemoData<PartnerInfoModalResult>",
576
- "resolved": "{ states?: { open: boolean; loading: boolean; submitting: boolean; isExistingPartner: boolean; shouldDisplayNameFields: boolean; firstName: string; lastName: string; countryCode: string; currency: string; error: string; success: boolean; filteredCountries: { countryCode: string; displayName: string; }[]; filteredCurrencies: { currencyCode: string; displayName: string; }[]; allowBankingCollection: boolean; disabled: boolean; }; }",
630
+ "resolved": "{ states?: { open: boolean; loading: boolean; submitting: boolean; isExistingPartner: boolean; shouldDisplayNameFields: boolean; firstName: string; lastName: string; countryCode: string; currency: string; error: string; emailCanBeUsed: boolean; success: boolean; filteredCountries: { countryCode: string; displayName: string; }[]; filteredCurrencies: { currencyCode: string; displayName: string; }[]; allowBankingCollection: boolean; disabled: boolean; }; }",
577
631
  "references": {
578
632
  "DemoData": {
579
633
  "location": "import",
@@ -666,6 +720,8 @@ function useDemoPartnerInfoModal(props) {
666
720
  supportDescriptionExistingPartner: props.supportDescriptionExistingPartner,
667
721
  supportLink: props.supportLink,
668
722
  modalHeaderExistingPartner: props.modalHeaderExistingPartner,
723
+ emailVerificationErrorText: props.emailVerificationErrorText,
724
+ loginLinkText: props.loginLinkText,
669
725
  },
670
726
  }, props.demoData || stateOverride, { arrayMerge: (_, a) => a });
671
727
  }
@@ -18,6 +18,7 @@ export const GET_USER_PARTNER_INFO = gql `
18
18
  impactConnection {
19
19
  connected
20
20
  connectionStatus
21
+ emailCanBeUsed
21
22
  publisher {
22
23
  id
23
24
  countryCode
@@ -52,6 +53,7 @@ const START_IMPACT_CONNECTION = gql `
52
53
  mutation startImpactConnection($vars: ImpactConnectionInput!) {
53
54
  startImpactConnection(impactConnectionInput: $vars) {
54
55
  success
56
+ errorCode
55
57
  validationErrors {
56
58
  field
57
59
  message
@@ -184,7 +186,6 @@ export function usePartnerInfoModal(props) {
184
186
  return;
185
187
  setCountryCode(value);
186
188
  setCurrency("");
187
- setError("");
188
189
  }
189
190
  function onCurrencyChange(e) {
190
191
  var _a, _b;
@@ -192,7 +193,6 @@ export function usePartnerInfoModal(props) {
192
193
  if (!value)
193
194
  return;
194
195
  setCurrency(value);
195
- setError("");
196
196
  }
197
197
  function onCheckboxChange(e) {
198
198
  const checked = e.target.checked;
@@ -249,6 +249,7 @@ export function usePartnerInfoModal(props) {
249
249
  const showModal = !success &&
250
250
  !userLoading &&
251
251
  (impactConnection === null || impactConnection === void 0 ? void 0 : impactConnection.connectionStatus) === "NOT_STARTED";
252
+ const emailCanBeUsed = (impactConnection === null || impactConnection === void 0 ? void 0 : impactConnection.emailCanBeUsed) !== false;
252
253
  return {
253
254
  states: {
254
255
  open: showModal,
@@ -261,11 +262,12 @@ export function usePartnerInfoModal(props) {
261
262
  countryCode,
262
263
  currency,
263
264
  error,
265
+ emailCanBeUsed,
264
266
  success,
265
267
  filteredCountries: filteredCountries || [],
266
268
  filteredCurrencies: filteredCurrencies || [],
267
269
  allowBankingCollection,
268
- disabled: userLoading || connectLoading,
270
+ disabled: userLoading || connectLoading || !emailCanBeUsed,
269
271
  },
270
272
  callbacks: {
271
273
  onFirstNameChange,