@saasquatch/mint-components 2.4.5 → 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.
- package/dist/cjs/{ShadowViewAddon-331ac9e4.js → ShadowViewAddon-ed5d27ef.js} +11 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mint-components.cjs.js +1 -1
- package/dist/cjs/sqm-big-stat_47.cjs.entry.js +1 -1
- package/dist/cjs/sqm-email-verification_2.cjs.entry.js +17 -4
- package/dist/cjs/{sqm-partner-info-modal-view-d9b61d54.js → sqm-partner-info-modal-view-a352d3ae.js} +19 -4
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +28 -3
- package/dist/collection/components/sqm-partner-info-modal/PartnerInfoModal.stories.js +15 -0
- package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal-view.js +19 -4
- package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal.js +57 -1
- package/dist/collection/components/sqm-partner-info-modal/usePartnerInfoModal.js +5 -3
- package/dist/collection/components/sqm-share-link/ShareLink.stories.js +8 -0
- package/dist/collection/components/sqm-share-link/sqm-share-link-view.js +11 -2
- package/dist/esm/{ShadowViewAddon-ae0cd8b9.js → ShadowViewAddon-4ee8cc57.js} +11 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mint-components.js +1 -1
- package/dist/esm/sqm-big-stat_47.entry.js +1 -1
- package/dist/esm/sqm-email-verification_2.entry.js +17 -4
- package/dist/esm/{sqm-partner-info-modal-view-b921fed1.js → sqm-partner-info-modal-view-506d7d50.js} +19 -4
- package/dist/esm/sqm-stencilbook.entry.js +28 -3
- package/dist/esm-es5/{ShadowViewAddon-ae0cd8b9.js → ShadowViewAddon-4ee8cc57.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/sqm-big-stat_47.entry.js +1 -1
- package/dist/esm-es5/sqm-email-verification_2.entry.js +1 -1
- package/dist/esm-es5/sqm-partner-info-modal-view-506d7d50.js +1 -0
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/{p-3d2fe16b.js → p-221d044f.js} +4 -4
- package/dist/mint-components/{p-87f119f0.system.js → p-4148d8d7.system.js} +1 -1
- package/dist/mint-components/p-a492f5de.system.entry.js +1 -0
- package/dist/mint-components/p-bfb00685.system.js +1 -1
- package/dist/mint-components/{p-cf12347b.system.entry.js → p-c4c65992.system.entry.js} +1 -1
- package/dist/mint-components/{p-654cdee8.entry.js → p-c9f5def4.entry.js} +5 -3
- package/dist/mint-components/{p-231926a3.system.entry.js → p-ca6c2c4c.system.entry.js} +1 -1
- package/dist/mint-components/{p-1e9c339f.entry.js → p-cc320bac.entry.js} +2 -2
- package/dist/mint-components/p-e359de22.system.js +1 -0
- package/dist/mint-components/{p-0d89ef44.entry.js → p-eae73594.entry.js} +1 -1
- package/dist/mint-components/p-ef3ffaa9.js +1 -0
- package/dist/types/components/sqm-partner-info-modal/PartnerInfoModal.stories.d.ts +1 -0
- package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal-view.d.ts +3 -0
- package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal.d.ts +9 -0
- package/dist/types/components/sqm-share-link/ShareLink.stories.d.ts +1 -0
- package/dist/types/components.d.ts +18 -0
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/sqm-partner-info-modal-view-b921fed1.js +0 -1
- package/dist/mint-components/p-288249ae.system.entry.js +0 -1
- package/dist/mint-components/p-db73312a.system.js +0 -1
- package/dist/mint-components/p-f75ead20.js +0 -1
package/dist/cjs/{sqm-partner-info-modal-view-d9b61d54.js → sqm-partner-info-modal-view-a352d3ae.js}
RENAMED
|
@@ -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 ||
|
|
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 ||
|
|
@@ -35,12 +35,12 @@ require('./utilities-fcdb9504.js');
|
|
|
35
35
|
const sqmPortalResetPasswordView = require('./sqm-portal-reset-password-view-a767b044.js');
|
|
36
36
|
require('./ErrorView-ee7b0f36.js');
|
|
37
37
|
const sqmQrCodeView = require('./sqm-qr-code-view-1f2daa76.js');
|
|
38
|
-
const ShadowViewAddon = require('./ShadowViewAddon-
|
|
38
|
+
const ShadowViewAddon = require('./ShadowViewAddon-ed5d27ef.js');
|
|
39
39
|
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-
|
|
43
|
+
const sqmPartnerInfoModalView = require('./sqm-partner-info-modal-view-a352d3ae.js');
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
46
|
* lodash (Custom Build) <https://lodash.com/>
|
|
@@ -14389,6 +14389,14 @@ const CustomizeUrlSaving = () => {
|
|
|
14389
14389
|
isSaving: true,
|
|
14390
14390
|
})));
|
|
14391
14391
|
};
|
|
14392
|
+
const CustomizeUrlEditingMobileNarrow = () => {
|
|
14393
|
+
return (index.h("div", { style: { width: "320px", border: "1px dashed red" } },
|
|
14394
|
+
index.h(ShadowViewAddon.ShareLinkView, Object.assign({}, {
|
|
14395
|
+
...defaultCustomizeProps,
|
|
14396
|
+
isEditing: true,
|
|
14397
|
+
domainPrefix: "https://referral-marketing.mybrandname.com/",
|
|
14398
|
+
}))));
|
|
14399
|
+
};
|
|
14392
14400
|
|
|
14393
14401
|
const ShareLink = /*#__PURE__*/Object.freeze({
|
|
14394
14402
|
__proto__: null,
|
|
@@ -14412,7 +14420,8 @@ const ShareLink = /*#__PURE__*/Object.freeze({
|
|
|
14412
14420
|
CustomizeUrlValidationError: CustomizeUrlValidationError,
|
|
14413
14421
|
CustomizeUrlInvalidCharacters: CustomizeUrlInvalidCharacters,
|
|
14414
14422
|
CustomizeUrlProfanity: CustomizeUrlProfanity,
|
|
14415
|
-
CustomizeUrlSaving: CustomizeUrlSaving
|
|
14423
|
+
CustomizeUrlSaving: CustomizeUrlSaving,
|
|
14424
|
+
CustomizeUrlEditingMobileNarrow: CustomizeUrlEditingMobileNarrow
|
|
14416
14425
|
});
|
|
14417
14426
|
|
|
14418
14427
|
const UseShareLink_stories = {
|
|
@@ -19384,6 +19393,8 @@ const defaultText$2 = {
|
|
|
19384
19393
|
allowBankingCollection: "I have read the {termsAndConditionsLink} and allow impact.com to collect my tax and banking information",
|
|
19385
19394
|
termsAndConditionsLabel: "terms and conditions",
|
|
19386
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",
|
|
19387
19398
|
};
|
|
19388
19399
|
const defaultProps$y = {
|
|
19389
19400
|
states: {
|
|
@@ -19397,6 +19408,7 @@ const defaultProps$y = {
|
|
|
19397
19408
|
countryCode: "",
|
|
19398
19409
|
currency: "",
|
|
19399
19410
|
error: "",
|
|
19411
|
+
emailCanBeUsed: true,
|
|
19400
19412
|
success: false,
|
|
19401
19413
|
filteredCountries: demoCountries,
|
|
19402
19414
|
filteredCurrencies: demoCurrencies,
|
|
@@ -19491,6 +19503,18 @@ const ValidationError$1 = () => {
|
|
|
19491
19503
|
};
|
|
19492
19504
|
return index.h(sqmPartnerInfoModalView.PartnerInfoModalView, Object.assign({}, props));
|
|
19493
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
|
+
};
|
|
19494
19518
|
const Closed = () => {
|
|
19495
19519
|
const props = {
|
|
19496
19520
|
...defaultProps$y,
|
|
@@ -19556,6 +19580,7 @@ const PartnerInfoModal = /*#__PURE__*/Object.freeze({
|
|
|
19556
19580
|
Submitting: Submitting,
|
|
19557
19581
|
WithError: WithError$3,
|
|
19558
19582
|
ValidationError: ValidationError$1,
|
|
19583
|
+
EmailVerificationRequired: EmailVerificationRequired,
|
|
19559
19584
|
Closed: Closed,
|
|
19560
19585
|
SQMComponentExistingPartner: SQMComponentExistingPartner,
|
|
19561
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 ||
|
|
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,
|
|
@@ -217,3 +217,11 @@ export const CustomizeUrlSaving = () => {
|
|
|
217
217
|
isSaving: true,
|
|
218
218
|
})));
|
|
219
219
|
};
|
|
220
|
+
export const CustomizeUrlEditingMobileNarrow = () => {
|
|
221
|
+
return (h("div", { style: { width: "320px", border: "1px dashed red" } },
|
|
222
|
+
h(ShareLinkView, Object.assign({}, {
|
|
223
|
+
...defaultCustomizeProps,
|
|
224
|
+
isEditing: true,
|
|
225
|
+
domainPrefix: "https://referral-marketing.mybrandname.com/",
|
|
226
|
+
}))));
|
|
227
|
+
};
|
|
@@ -64,10 +64,18 @@ export function ShareLinkView(props) {
|
|
|
64
64
|
whiteSpace: "nowrap",
|
|
65
65
|
userSelect: "none",
|
|
66
66
|
lineHeight: "var(--sl-input-height-medium)",
|
|
67
|
+
overflow: "hidden",
|
|
68
|
+
textOverflow: "ellipsis",
|
|
69
|
+
flexGrow: 0,
|
|
70
|
+
flexShrink: 1,
|
|
71
|
+
minWidth: 0,
|
|
72
|
+
direction: "rtl",
|
|
73
|
+
textAlign: "left",
|
|
67
74
|
},
|
|
68
75
|
EditInput: {
|
|
69
76
|
maxWidth: "260px",
|
|
70
|
-
|
|
77
|
+
flexShrink: 0,
|
|
78
|
+
flexGrow: 1,
|
|
71
79
|
"&::part(base)": {
|
|
72
80
|
border: "none",
|
|
73
81
|
borderRadius: "0",
|
|
@@ -147,7 +155,8 @@ export function ShareLinkView(props) {
|
|
|
147
155
|
vanillaStyle),
|
|
148
156
|
h("p", { class: sheet.classes.EditLabel }, editLabelText),
|
|
149
157
|
h("div", { class: sheet.classes.EditInputWrapper },
|
|
150
|
-
h("span", { class: sheet.classes.DomainPrefix
|
|
158
|
+
h("span", { class: sheet.classes.DomainPrefix, title: domainPrefix },
|
|
159
|
+
h("span", { dir: "ltr" }, domainPrefix)),
|
|
151
160
|
h("sl-input", { class: sheet.classes.EditInput, type: "text", value: editValue, onInput: (e) => onEditValueChange(e.target.value), onKeyDown: (e) => {
|
|
152
161
|
if (e.key === "/" || e.key === "@")
|
|
153
162
|
e.preventDefault();
|
|
@@ -4288,10 +4288,18 @@ function ShareLinkView(props) {
|
|
|
4288
4288
|
whiteSpace: "nowrap",
|
|
4289
4289
|
userSelect: "none",
|
|
4290
4290
|
lineHeight: "var(--sl-input-height-medium)",
|
|
4291
|
+
overflow: "hidden",
|
|
4292
|
+
textOverflow: "ellipsis",
|
|
4293
|
+
flexGrow: 0,
|
|
4294
|
+
flexShrink: 1,
|
|
4295
|
+
minWidth: 0,
|
|
4296
|
+
direction: "rtl",
|
|
4297
|
+
textAlign: "left",
|
|
4291
4298
|
},
|
|
4292
4299
|
EditInput: {
|
|
4293
4300
|
maxWidth: "260px",
|
|
4294
|
-
|
|
4301
|
+
flexShrink: 0,
|
|
4302
|
+
flexGrow: 1,
|
|
4295
4303
|
"&::part(base)": {
|
|
4296
4304
|
border: "none",
|
|
4297
4305
|
borderRadius: "0",
|
|
@@ -4371,7 +4379,8 @@ function ShareLinkView(props) {
|
|
|
4371
4379
|
vanillaStyle$6),
|
|
4372
4380
|
h("p", { class: sheet.classes.EditLabel }, editLabelText),
|
|
4373
4381
|
h("div", { class: sheet.classes.EditInputWrapper },
|
|
4374
|
-
h("span", { class: sheet.classes.DomainPrefix
|
|
4382
|
+
h("span", { class: sheet.classes.DomainPrefix, title: domainPrefix },
|
|
4383
|
+
h("span", { dir: "ltr" }, domainPrefix)),
|
|
4375
4384
|
h("sl-input", { class: sheet.classes.EditInput, type: "text", value: editValue, onInput: (e) => onEditValueChange(e.target.value), onKeyDown: (e) => {
|
|
4376
4385
|
if (e.key === "/" || e.key === "@")
|
|
4377
4386
|
e.preventDefault();
|