@saasquatch/mint-components 2.4.6 → 2.4.7-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 (46) 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-big-stat_47.cjs.entry.js +6 -0
  4. package/dist/cjs/sqm-email-verification_2.cjs.entry.js +18 -4
  5. package/dist/cjs/{sqm-partner-info-modal-view-d9b61d54.js → sqm-partner-info-modal-view-9a4a74b5.js} +19 -6
  6. package/dist/cjs/sqm-stencilbook.cjs.entry.js +18 -2
  7. package/dist/collection/components/sqm-partner-info-modal/PartnerInfoModal.stories.js +16 -1
  8. package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal-view.js +19 -6
  9. package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal.js +58 -1
  10. package/dist/collection/components/sqm-partner-info-modal/usePartnerInfoModal.js +5 -3
  11. package/dist/collection/components/sqm-widget-verification/sqm-widget-verification.js +33 -0
  12. package/dist/esm/loader.js +1 -1
  13. package/dist/esm/mint-components.js +1 -1
  14. package/dist/esm/sqm-big-stat_47.entry.js +6 -0
  15. package/dist/esm/sqm-email-verification_2.entry.js +18 -4
  16. package/dist/esm/{sqm-partner-info-modal-view-b921fed1.js → sqm-partner-info-modal-view-04db5df0.js} +19 -6
  17. package/dist/esm/sqm-stencilbook.entry.js +18 -2
  18. package/dist/esm-es5/loader.js +1 -1
  19. package/dist/esm-es5/mint-components.js +1 -1
  20. package/dist/esm-es5/sqm-big-stat_47.entry.js +1 -1
  21. package/dist/esm-es5/sqm-email-verification_2.entry.js +1 -1
  22. package/dist/esm-es5/sqm-partner-info-modal-view-04db5df0.js +1 -0
  23. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  24. package/dist/mint-components/mint-components.esm.js +1 -1
  25. package/dist/mint-components/{p-654cdee8.entry.js → p-00649428.entry.js} +7 -5
  26. package/dist/mint-components/p-1081b4fa.system.entry.js +1 -0
  27. package/dist/mint-components/p-7cfce5dd.system.js +1 -0
  28. package/dist/mint-components/{p-3de1b8a7.system.entry.js → p-81c0f5f8.system.entry.js} +1 -1
  29. package/dist/mint-components/p-8ba31535.js +1 -0
  30. package/dist/mint-components/p-bfb00685.system.js +1 -1
  31. package/dist/mint-components/{p-eae73594.entry.js → p-c4ef1d04.entry.js} +1 -1
  32. package/dist/mint-components/{p-ca6c2c4c.system.entry.js → p-dc3634cc.system.entry.js} +1 -1
  33. package/dist/mint-components/{p-fb2d9545.entry.js → p-fa0b5db3.entry.js} +2 -2
  34. package/dist/types/components/sqm-partner-info-modal/PartnerInfoModal.stories.d.ts +1 -0
  35. package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal-view.d.ts +3 -0
  36. package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal.d.ts +9 -0
  37. package/dist/types/components/sqm-widget-verification/sqm-widget-verification.d.ts +6 -0
  38. package/dist/types/components.d.ts +30 -0
  39. package/docs/docs.docx +0 -0
  40. package/docs/raisins.json +1 -1
  41. package/grapesjs/grapesjs.js +1 -1
  42. package/package.json +1 -1
  43. package/dist/esm-es5/sqm-partner-info-modal-view-b921fed1.js +0 -1
  44. package/dist/mint-components/p-288249ae.system.entry.js +0 -1
  45. package/dist/mint-components/p-db73312a.system.js +0 -1
  46. package/dist/mint-components/p-f75ead20.js +0 -1
@@ -84,13 +84,19 @@ 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", { target: "_blank", href: `https://app.impact.com/login.user` }, text.loginLinkText)),
92
+ });
87
93
  const supportMessage = global.intl.formatMessage({
88
94
  id: "supportDescriptionExistingPartner",
89
95
  defaultMessage: text.supportDescriptionExistingPartner,
90
96
  }, {
91
97
  supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-payment-support@impact.com` }, text.supportLink)),
92
98
  });
93
- const description = states.isExistingPartner ? (index.h("span", { class: sheet.classes.DescriptionContainer },
99
+ const description = states.isExistingPartner || !states.emailCanBeUsed ? (index.h("span", { class: sheet.classes.DescriptionContainer },
94
100
  index.h("p", null, text.descriptionExistingPartner),
95
101
  index.h("p", null, supportMessage))) : (index.h("p", { class: sheet.classes.DescriptionContainer }, text.descriptionNewPartner));
96
102
  const buttonLabel = states.isExistingPartner
@@ -107,27 +113,34 @@ function PartnerInfoModalContentView(props) {
107
113
  index.h("div", { class: sheet.classes.FormFields },
108
114
  description,
109
115
  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 }))),
116
+ 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 }),
117
+ 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
118
  index.h("sl-select", { exportparts: "label: input-label, base: input-base, menu: select-menu", label: text.countryLabel, value: states.countryCode, disabled: states.submitting ||
119
+ !states.emailCanBeUsed ||
113
120
  (!!states.countryCode && states.isExistingPartner), required: true, hoist: true, "onSl-select": callbacks.onCountryChange },
114
121
  index.h("sl-input", { class: sheet.classes.SearchInput, placeholder: text.searchCountryPlaceholder, onKeyDown: (e) => e.stopPropagation(), "onSl-input": (e) => {
115
122
  var _a;
116
123
  callbacks.setCountrySearch((_a = e.target) === null || _a === void 0 ? void 0 : _a.value);
117
124
  } }),
118
125
  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 },
126
+ index.h("sl-select", { exportparts: "label: input-label, base: input-base", label: text.currencyLabel, value: states.currency, disabled: states.submitting ||
127
+ !states.emailCanBeUsed ||
128
+ (!!states.currency && states.isExistingPartner), required: true, hoist: true, "onSl-select": callbacks.onCurrencyChange },
120
129
  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
130
  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
131
  c.currencyCode,
123
132
  " - ",
124
133
  c.displayName))))),
125
134
  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))),
135
+ 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
136
  states.error && (index.h("div", { class: sheet.classes.ErrorMessage },
128
137
  index.h("sqm-form-message", { class: sheet.classes.ErrorMessage, type: "error" },
129
138
  index.h("p", { part: "alert-description" }, states.error)))),
139
+ !states.emailCanBeUsed && (index.h("div", { class: sheet.classes.ErrorMessage },
140
+ index.h("sqm-form-message", { type: "error" },
141
+ index.h("p", { part: "alert-description" }, emailVerificationMessage)))),
130
142
  index.h("sl-button", { slot: "footer", type: "primary", loading: states.submitting, disabled: states.submitting ||
143
+ !states.emailCanBeUsed ||
131
144
  !states.countryCode ||
132
145
  !states.currency ||
133
146
  !states.allowBankingCollection ||
@@ -140,7 +153,7 @@ function PartnerInfoModalView(props) {
140
153
  const styleString = sheet.toString();
141
154
  if (!states.open)
142
155
  return index.h("div", null);
143
- const modalHeader = states.isExistingPartner
156
+ const modalHeader = states.isExistingPartner || !states.emailCanBeUsed
144
157
  ? text.modalHeaderExistingPartner
145
158
  : text.modalHeader;
146
159
  return (index.h("div", null,
@@ -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-9a4a74b5.js');
44
44
 
45
45
  /**
46
46
  * lodash (Custom Build) <https://lodash.com/>
@@ -19380,7 +19380,7 @@ const defaultText$2 = {
19380
19380
  modalHeader: "Let's get you ready for rewards",
19381
19381
  modalHeaderExistingPartner: "We found an existing account",
19382
19382
  descriptionNewPartner: "Confirm your country and currency now to get your future rewards faster.",
19383
- descriptionExistingPartner: "We noticed you are already an Impact.com partner, please confirm your information.",
19383
+ descriptionExistingPartner: "We found an account with this email on our referral program provider, impact.com. Please confirm your country and currency now to get your future rewards faster.",
19384
19384
  supportDescriptionExistingPartner: "If this is a mistake, please contact Support or sign up for this referral program with a different email.",
19385
19385
  supportLink: "Support",
19386
19386
  countryLabel: "Country",
@@ -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: "Please log in to {loginLinkText} to review your account status. You may need to complete email verification or other pending steps. Once resolved, refresh this page to proceed.",
19397
+ loginLinkText: "impact.com",
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,
@@ -34,7 +34,7 @@ const defaultText = {
34
34
  modalHeader: "Let's get you ready for rewards",
35
35
  modalHeaderExistingPartner: "We found an existing account",
36
36
  descriptionNewPartner: "Confirm your country and currency now to get your future rewards faster.",
37
- descriptionExistingPartner: "We noticed you are already an Impact.com partner, please confirm your information.",
37
+ descriptionExistingPartner: "We found an account with this email on our referral program provider, impact.com. Please confirm your country and currency now to get your future rewards faster.",
38
38
  supportDescriptionExistingPartner: "If this is a mistake, please contact Support or sign up for this referral program with a different email.",
39
39
  supportLink: "Support",
40
40
  countryLabel: "Country",
@@ -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: "Please log in to {loginLinkText} to review your account status. You may need to complete email verification or other pending steps. Once resolved, refresh this page to proceed.",
51
+ loginLinkText: "impact.com",
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,13 +81,19 @@ 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", { target: "_blank", href: `https://app.impact.com/login.user` }, text.loginLinkText)),
89
+ });
84
90
  const supportMessage = intl.formatMessage({
85
91
  id: "supportDescriptionExistingPartner",
86
92
  defaultMessage: text.supportDescriptionExistingPartner,
87
93
  }, {
88
94
  supportLink: (h("a", { target: "_blank", href: `mailto:advocate-payment-support@impact.com` }, text.supportLink)),
89
95
  });
90
- const description = states.isExistingPartner ? (h("span", { class: sheet.classes.DescriptionContainer },
96
+ const description = states.isExistingPartner || !states.emailCanBeUsed ? (h("span", { class: sheet.classes.DescriptionContainer },
91
97
  h("p", null, text.descriptionExistingPartner),
92
98
  h("p", null, supportMessage))) : (h("p", { class: sheet.classes.DescriptionContainer }, text.descriptionNewPartner));
93
99
  const buttonLabel = states.isExistingPartner
@@ -104,27 +110,34 @@ export function PartnerInfoModalContentView(props) {
104
110
  h("div", { class: sheet.classes.FormFields },
105
111
  description,
106
112
  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 }))),
113
+ 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 }),
114
+ 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
115
  h("sl-select", { exportparts: "label: input-label, base: input-base, menu: select-menu", label: text.countryLabel, value: states.countryCode, disabled: states.submitting ||
116
+ !states.emailCanBeUsed ||
110
117
  (!!states.countryCode && states.isExistingPartner), required: true, hoist: true, "onSl-select": callbacks.onCountryChange },
111
118
  h("sl-input", { class: sheet.classes.SearchInput, placeholder: text.searchCountryPlaceholder, onKeyDown: (e) => e.stopPropagation(), "onSl-input": (e) => {
112
119
  var _a;
113
120
  callbacks.setCountrySearch((_a = e.target) === null || _a === void 0 ? void 0 : _a.value);
114
121
  } }),
115
122
  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 },
123
+ h("sl-select", { exportparts: "label: input-label, base: input-base", label: text.currencyLabel, value: states.currency, disabled: states.submitting ||
124
+ !states.emailCanBeUsed ||
125
+ (!!states.currency && states.isExistingPartner), required: true, hoist: true, "onSl-select": callbacks.onCurrencyChange },
117
126
  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
127
  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
128
  c.currencyCode,
120
129
  " - ",
121
130
  c.displayName))))),
122
131
  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))),
132
+ 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
133
  states.error && (h("div", { class: sheet.classes.ErrorMessage },
125
134
  h("sqm-form-message", { class: sheet.classes.ErrorMessage, type: "error" },
126
135
  h("p", { part: "alert-description" }, states.error)))),
136
+ !states.emailCanBeUsed && (h("div", { class: sheet.classes.ErrorMessage },
137
+ h("sqm-form-message", { type: "error" },
138
+ h("p", { part: "alert-description" }, emailVerificationMessage)))),
127
139
  h("sl-button", { slot: "footer", type: "primary", loading: states.submitting, disabled: states.submitting ||
140
+ !states.emailCanBeUsed ||
128
141
  !states.countryCode ||
129
142
  !states.currency ||
130
143
  !states.allowBankingCollection ||
@@ -137,7 +150,7 @@ export function PartnerInfoModalView(props) {
137
150
  const styleString = sheet.toString();
138
151
  if (!states.open)
139
152
  return h("div", null);
140
- const modalHeader = states.isExistingPartner
153
+ const modalHeader = states.isExistingPartner || !states.emailCanBeUsed
141
154
  ? text.modalHeaderExistingPartner
142
155
  : text.modalHeader;
143
156
  return (h("div", null,
@@ -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 = "Please log in to {loginLinkText} to review your account status. You may need to complete email verification or other pending steps. Once resolved, refresh this page to proceed.";
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": "\"Please log in to {loginLinkText} to review your account status. You may need to complete email verification or other pending steps. Once resolved, refresh this page to proceed.\""
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",
@@ -621,6 +675,7 @@ function useDemoPartnerInfoModal(props) {
621
675
  filteredCountries: [],
622
676
  filteredCurrencies: [],
623
677
  allowBankingCollection,
678
+ emailCanBeUsed: true,
624
679
  disabled: false,
625
680
  },
626
681
  callbacks: {
@@ -666,6 +721,8 @@ function useDemoPartnerInfoModal(props) {
666
721
  supportDescriptionExistingPartner: props.supportDescriptionExistingPartner,
667
722
  supportLink: props.supportLink,
668
723
  modalHeaderExistingPartner: props.modalHeaderExistingPartner,
724
+ emailVerificationErrorText: props.emailVerificationErrorText,
725
+ loginLinkText: props.loginLinkText,
669
726
  },
670
727
  }, props.demoData || stateOverride, { arrayMerge: (_, a) => a });
671
728
  }
@@ -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,
@@ -202,6 +202,12 @@ export class WidgetVerification {
202
202
  * @uiWidget textArea
203
203
  */
204
204
  this.createPartnerStep_networkErrorText = "An error occurred. Please try again.";
205
+ /**
206
+ * @uiName Email verification error text
207
+ * @uiGroup Partner Creation Step
208
+ * @uiWidget textArea
209
+ */
210
+ this.createPartnerStep_emailVerificationErrorText = "Please log in to {loginLinkText} to review your account status. You may need to complete email verification or other pending steps. Once resolved, refresh this page to proceed.";
205
211
  /**
206
212
  * @uiName Missing fields error text
207
213
  * @uiGroup Partner Creation Step
@@ -929,6 +935,33 @@ export class WidgetVerification {
929
935
  "reflect": false,
930
936
  "defaultValue": "\"An error occurred. Please try again.\""
931
937
  },
938
+ "createPartnerStep_emailVerificationErrorText": {
939
+ "type": "string",
940
+ "mutable": false,
941
+ "complexType": {
942
+ "original": "string",
943
+ "resolved": "string",
944
+ "references": {}
945
+ },
946
+ "required": false,
947
+ "optional": false,
948
+ "docs": {
949
+ "tags": [{
950
+ "text": "Email verification error text",
951
+ "name": "uiName"
952
+ }, {
953
+ "text": "Partner Creation Step",
954
+ "name": "uiGroup"
955
+ }, {
956
+ "text": "textArea",
957
+ "name": "uiWidget"
958
+ }],
959
+ "text": ""
960
+ },
961
+ "attribute": "create-partner-step_email-verification-error-text",
962
+ "reflect": false,
963
+ "defaultValue": "\"Please log in to {loginLinkText} to review your account status. You may need to complete email verification or other pending steps. Once resolved, refresh this page to proceed.\""
964
+ },
932
965
  "createPartnerStep_missingFieldsErrorText": {
933
966
  "type": "string",
934
967
  "mutable": false,