@saasquatch/mint-components 2.3.0 → 2.3.1-3
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-05c6968d.js → ShadowViewAddon-331ac9e4.js} +5 -3
- package/dist/cjs/sqm-big-stat_47.cjs.entry.js +3 -3
- package/dist/cjs/sqm-email-verification_2.cjs.entry.js +19 -6
- package/dist/cjs/{sqm-partner-info-modal-view-243aad7b.js → sqm-partner-info-modal-view-46e07ba0.js} +10 -3
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +33 -5
- package/dist/collection/components/sqm-partner-info-modal/PartnerInfoModal.stories.js +26 -0
- package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal-view.js +11 -4
- package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal.js +1 -1
- package/dist/collection/components/sqm-partner-info-modal/usePartnerInfoModal.js +18 -5
- package/dist/collection/components/sqm-share-link/ShareLink.stories.js +2 -2
- package/dist/collection/components/sqm-share-link/sqm-share-link-view.js +4 -2
- package/dist/collection/components/sqm-share-link/sqm-share-link.js +2 -2
- package/dist/collection/components/sqm-share-link/useShareLink.js +1 -1
- package/dist/esm/{ShadowViewAddon-543f0fef.js → ShadowViewAddon-ae0cd8b9.js} +5 -3
- package/dist/esm/sqm-big-stat_47.entry.js +3 -3
- package/dist/esm/sqm-email-verification_2.entry.js +19 -6
- package/dist/esm/{sqm-partner-info-modal-view-8f141a4f.js → sqm-partner-info-modal-view-8a5ab2d0.js} +11 -4
- package/dist/esm/sqm-stencilbook.entry.js +33 -5
- package/dist/esm-es5/{ShadowViewAddon-543f0fef.js → ShadowViewAddon-ae0cd8b9.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-8a5ab2d0.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-55847fc2.system.entry.js → p-1c739233.system.entry.js} +1 -1
- package/dist/mint-components/{p-92e81c72.js → p-3d2fe16b.js} +2 -2
- package/dist/mint-components/{p-3e7fb8a7.system.js → p-87f119f0.system.js} +1 -1
- package/dist/mint-components/{p-fa477f5f.system.entry.js → p-88893099.system.entry.js} +1 -1
- package/dist/mint-components/{p-61f7bf8a.entry.js → p-8e89c429.entry.js} +4 -4
- package/dist/mint-components/{p-b1536972.entry.js → p-b1dcabb0.entry.js} +2 -2
- package/dist/mint-components/p-bfb00685.system.js +1 -1
- package/dist/mint-components/p-c4da3ac1.system.js +1 -0
- package/dist/mint-components/{p-76ad156b.entry.js → p-caa173f4.entry.js} +2 -2
- package/dist/mint-components/p-e636975c.js +1 -0
- package/dist/mint-components/{p-b0d49a64.system.entry.js → p-ede41e5e.system.entry.js} +1 -1
- package/dist/types/components/sqm-partner-info-modal/PartnerInfoModal.stories.d.ts +2 -0
- package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal-view.d.ts +4 -0
- package/docs/docs.docx +0 -0
- package/package.json +1 -1
- package/dist/esm-es5/sqm-partner-info-modal-view-8f141a4f.js +0 -1
- package/dist/mint-components/p-a094da68.js +0 -1
- package/dist/mint-components/p-e7f45f18.system.js +0 -1
|
@@ -4292,6 +4292,8 @@ function ShareLinkView(props) {
|
|
|
4292
4292
|
lineHeight: "var(--sl-input-height-medium)",
|
|
4293
4293
|
},
|
|
4294
4294
|
EditInput: {
|
|
4295
|
+
maxWidth: "260px",
|
|
4296
|
+
width: "100%",
|
|
4295
4297
|
"&::part(base)": {
|
|
4296
4298
|
border: "none",
|
|
4297
4299
|
borderRadius: "0",
|
|
@@ -4358,7 +4360,7 @@ function ShareLinkView(props) {
|
|
|
4358
4360
|
const sheet = JSS.createStyleSheet(style);
|
|
4359
4361
|
const styleString = sheet.toString();
|
|
4360
4362
|
const errorMessageType = (validationError === null || validationError === void 0 ? void 0 : validationError.code) === "EXISTING_CODE_CONFLICT" ? "info" : "warning";
|
|
4361
|
-
const showCharactersRemaining = charactersRemaining <=
|
|
4363
|
+
const showCharactersRemaining = charactersRemaining <= 29;
|
|
4362
4364
|
const editLimitMessage = global.intl.formatMessage({
|
|
4363
4365
|
id: "editLimitText",
|
|
4364
4366
|
defaultMessage: editLimitText,
|
|
@@ -4379,7 +4381,7 @@ function ShareLinkView(props) {
|
|
|
4379
4381
|
index.h("p", { class: sheet.classes.HelperText },
|
|
4380
4382
|
editLimitMessage,
|
|
4381
4383
|
" ",
|
|
4382
|
-
charactersRemaining >
|
|
4384
|
+
charactersRemaining > 27 && minCharactersText,
|
|
4383
4385
|
showCharactersRemaining &&
|
|
4384
4386
|
` ${global.intl.formatMessage({
|
|
4385
4387
|
id: "charactersRemainingText",
|
|
@@ -4418,7 +4420,7 @@ function ShareLinkView(props) {
|
|
|
4418
4420
|
}
|
|
4419
4421
|
|
|
4420
4422
|
const MAX_EDITS = 5;
|
|
4421
|
-
const CHARACTER_LIMIT =
|
|
4423
|
+
const CHARACTER_LIMIT = 30;
|
|
4422
4424
|
const MIN_CHARACTERS = 3;
|
|
4423
4425
|
const MessageLinkQuery$1 = index_module.dist.gql `
|
|
4424
4426
|
query ($programId: ID) {
|
|
@@ -29,7 +29,7 @@ const useInstantAccessRegistration = require('./useInstantAccessRegistration-239
|
|
|
29
29
|
const useLeadFormState = require('./useLeadFormState-bf49984b.js');
|
|
30
30
|
const utilities = require('./utilities-fcdb9504.js');
|
|
31
31
|
const ErrorView = require('./ErrorView-ee7b0f36.js');
|
|
32
|
-
const ShadowViewAddon = require('./ShadowViewAddon-
|
|
32
|
+
const ShadowViewAddon = require('./ShadowViewAddon-331ac9e4.js');
|
|
33
33
|
require('./sqm-portal-container-view-757f921b.js');
|
|
34
34
|
const data = require('./data-89ac73dd.js');
|
|
35
35
|
const keys = require('./keys-5a2c9ed2.js');
|
|
@@ -6369,9 +6369,9 @@ function useDemoShareLink(props) {
|
|
|
6369
6369
|
validationError: null,
|
|
6370
6370
|
isValidating: false,
|
|
6371
6371
|
isSaving: false,
|
|
6372
|
-
characterLimit:
|
|
6372
|
+
characterLimit: 30,
|
|
6373
6373
|
minCharacters: 3,
|
|
6374
|
-
charactersRemaining:
|
|
6374
|
+
charactersRemaining: 30 - editValue.length,
|
|
6375
6375
|
editLimitText: props.editLimitText,
|
|
6376
6376
|
editLimitReachedText: props.editLimitReachedText,
|
|
6377
6377
|
supportLinkText: props.supportLinkText,
|
|
@@ -11,7 +11,7 @@ const utils = require('./utils-6847bc06.js');
|
|
|
11
11
|
const JSS = require('./JSS-8503a151.js');
|
|
12
12
|
const sqmTextSpanView = require('./sqm-text-span-view-b9e10f5d.js');
|
|
13
13
|
const data = require('./data-89ac73dd.js');
|
|
14
|
-
const sqmPartnerInfoModalView = require('./sqm-partner-info-modal-view-
|
|
14
|
+
const sqmPartnerInfoModalView = require('./sqm-partner-info-modal-view-46e07ba0.js');
|
|
15
15
|
const keys = require('./keys-5a2c9ed2.js');
|
|
16
16
|
const eventKeys = require('./eventKeys-7af4df4d.js');
|
|
17
17
|
const parseStates = require('./parseStates-d1effc19.js');
|
|
@@ -505,9 +505,10 @@ function usePartnerInfoModal(props) {
|
|
|
505
505
|
const user = userData === null || userData === void 0 ? void 0 : userData.user;
|
|
506
506
|
const { data: currenciesData, loading: currenciesLoading } = index_module.wn(GET_CURRENCIES, { variables: { locale } });
|
|
507
507
|
const { data: countriesData, loading: countriesLoading } = index_module.wn(GET_COUNTRIES, {});
|
|
508
|
+
const [firstName, setFirstName] = domContextHooks_module.useState((user === null || user === void 0 ? void 0 : user.firstName) || "");
|
|
509
|
+
const [lastName, setLastName] = domContextHooks_module.useState((user === null || user === void 0 ? void 0 : user.lastName) || "");
|
|
508
510
|
// No pre-filled country, use locale to determine countryCode instead
|
|
509
|
-
const [countryCode, setCountryCode] = domContextHooks_module.useState(((_b = (_a = user === null || user === void 0 ? void 0 : user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) === null || _b === void 0 ? void 0 : _b.countryCode) ||
|
|
510
|
-
locale.replace(/^.*_/, ""));
|
|
511
|
+
const [countryCode, setCountryCode] = domContextHooks_module.useState(((_b = (_a = user === null || user === void 0 ? void 0 : user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) === null || _b === void 0 ? void 0 : _b.countryCode) || locale.replace(/^.*_/, ""));
|
|
511
512
|
const [currency, setCurrency] = domContextHooks_module.useState(((_d = (_c = user === null || user === void 0 ? void 0 : user.impactConnection) === null || _c === void 0 ? void 0 : _c.publisher) === null || _d === void 0 ? void 0 : _d.currency) || "");
|
|
512
513
|
const { data: financeNetworkData } = index_module.wn(data.GET_FINANCE_NETWORK_SETTINGS, {
|
|
513
514
|
variables: { filter: countryCode ? { countryCode_eq: countryCode } : {} },
|
|
@@ -583,6 +584,14 @@ function usePartnerInfoModal(props) {
|
|
|
583
584
|
}
|
|
584
585
|
}, [currencySearch, currencies]);
|
|
585
586
|
const impactConnection = user === null || user === void 0 ? void 0 : user.impactConnection;
|
|
587
|
+
function onFirstNameChange(e) {
|
|
588
|
+
const value = e.target.value;
|
|
589
|
+
setFirstName(value);
|
|
590
|
+
}
|
|
591
|
+
function onLastNameChange(e) {
|
|
592
|
+
const value = e.target.value;
|
|
593
|
+
setLastName(value);
|
|
594
|
+
}
|
|
586
595
|
function onCountryChange(e) {
|
|
587
596
|
var _a, _b;
|
|
588
597
|
const value = (_b = (_a = e.detail) === null || _a === void 0 ? void 0 : _a.item) === null || _b === void 0 ? void 0 : _b.__value;
|
|
@@ -606,7 +615,7 @@ function usePartnerInfoModal(props) {
|
|
|
606
615
|
}
|
|
607
616
|
async function onSubmit() {
|
|
608
617
|
var _a, _b;
|
|
609
|
-
if (!allowBankingCollection || !countryCode || !currency) {
|
|
618
|
+
if (!allowBankingCollection || !countryCode || !currency || !firstName || !lastName) {
|
|
610
619
|
setError(props.missingFieldsErrorText);
|
|
611
620
|
return;
|
|
612
621
|
}
|
|
@@ -621,8 +630,8 @@ function usePartnerInfoModal(props) {
|
|
|
621
630
|
id: user.id,
|
|
622
631
|
accountId: user.accountId,
|
|
623
632
|
},
|
|
624
|
-
firstName
|
|
625
|
-
lastName
|
|
633
|
+
firstName,
|
|
634
|
+
lastName,
|
|
626
635
|
countryCode,
|
|
627
636
|
currency,
|
|
628
637
|
};
|
|
@@ -658,6 +667,8 @@ function usePartnerInfoModal(props) {
|
|
|
658
667
|
loading: userLoading || countriesLoading || currenciesLoading,
|
|
659
668
|
submitting: connectLoading,
|
|
660
669
|
isExistingPartner,
|
|
670
|
+
firstName,
|
|
671
|
+
lastName,
|
|
661
672
|
countryCode,
|
|
662
673
|
currency,
|
|
663
674
|
error,
|
|
@@ -668,6 +679,8 @@ function usePartnerInfoModal(props) {
|
|
|
668
679
|
disabled: userLoading || connectLoading,
|
|
669
680
|
},
|
|
670
681
|
callbacks: {
|
|
682
|
+
onFirstNameChange,
|
|
683
|
+
onLastNameChange,
|
|
671
684
|
onCountryChange,
|
|
672
685
|
onCurrencyChange,
|
|
673
686
|
onCheckboxChange,
|
package/dist/cjs/{sqm-partner-info-modal-view-243aad7b.js → sqm-partner-info-modal-view-46e07ba0.js}
RENAMED
|
@@ -30,6 +30,12 @@ const style = {
|
|
|
30
30
|
gap: "var(--sl-spacing-medium)",
|
|
31
31
|
marginTop: "var(--sl-spacing-large)",
|
|
32
32
|
},
|
|
33
|
+
NameInput: {
|
|
34
|
+
"&::part(label)": {
|
|
35
|
+
fontWeight: "var(--sl-font-weight-normal)",
|
|
36
|
+
fontSize: "var(--sl-input-label-font-size-medium)",
|
|
37
|
+
},
|
|
38
|
+
},
|
|
33
39
|
ErrorMessage: {
|
|
34
40
|
marginTop: "var(--sl-spacing-x-small)",
|
|
35
41
|
},
|
|
@@ -97,11 +103,12 @@ function PartnerInfoModalContentView(props) {
|
|
|
97
103
|
termsAndConditionsLink: (index.h("a", { href: text.termsAndConditionsLink, target: "_blank" }, text.termsAndConditionsLabel)),
|
|
98
104
|
});
|
|
99
105
|
return (index.h("div", null,
|
|
100
|
-
index.h("style", { type: "text/css" },
|
|
101
|
-
" ",
|
|
102
|
-
styleString),
|
|
106
|
+
index.h("style", { type: "text/css" }, styleString),
|
|
103
107
|
index.h("div", { class: sheet.classes.FormFields },
|
|
104
108
|
description,
|
|
109
|
+
(!states.firstName || !states.lastName) && (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 }))),
|
|
105
112
|
index.h("sl-select", { exportparts: "label: input-label, base: input-base, menu: select-menu", label: text.countryLabel, value: states.countryCode, disabled: states.submitting ||
|
|
106
113
|
(!!states.countryCode && states.isExistingPartner), required: true, hoist: true, "onSl-select": callbacks.onCountryChange },
|
|
107
114
|
index.h("sl-input", { class: sheet.classes.SearchInput, placeholder: text.searchCountryPlaceholder, onKeyDown: (e) => e.stopPropagation(), "onSl-input": (e) => {
|
|
@@ -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-331ac9e4.js');
|
|
39
39
|
const sqmPortalContainerView = require('./sqm-portal-container-view-757f921b.js');
|
|
40
40
|
const sqmUserInfoFormView = require('./sqm-user-info-form-view-c5f9b79b.js');
|
|
41
41
|
const sqmLeadInputFieldView = require('./sqm-lead-input-field-view-88de1b78.js');
|
|
42
42
|
require('./data-89ac73dd.js');
|
|
43
|
-
const sqmPartnerInfoModalView = require('./sqm-partner-info-modal-view-
|
|
43
|
+
const sqmPartnerInfoModalView = require('./sqm-partner-info-modal-view-46e07ba0.js');
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
46
|
* lodash (Custom Build) <https://lodash.com/>
|
|
@@ -14291,9 +14291,9 @@ const defaultCustomizeProps = {
|
|
|
14291
14291
|
validationError: null,
|
|
14292
14292
|
isValidating: false,
|
|
14293
14293
|
isSaving: false,
|
|
14294
|
-
characterLimit:
|
|
14294
|
+
characterLimit: 30,
|
|
14295
14295
|
minCharacters: 3,
|
|
14296
|
-
charactersRemaining:
|
|
14296
|
+
charactersRemaining: 30,
|
|
14297
14297
|
editLimitText: "You can edit your link up to 5 times.",
|
|
14298
14298
|
editLimitReachedText: "5 edit limit reached. To make more changes, please contact {supportLink}.",
|
|
14299
14299
|
supportLinkText: "Support",
|
|
@@ -19290,6 +19290,8 @@ const demoCurrencies = [
|
|
|
19290
19290
|
{ currencyCode: "AUD", displayName: "Australian Dollar" },
|
|
19291
19291
|
];
|
|
19292
19292
|
const noopCallbacks = {
|
|
19293
|
+
onFirstNameChange: (e) => console.log("First name changed:", e),
|
|
19294
|
+
onLastNameChange: (e) => console.log("Last name changed:", e),
|
|
19293
19295
|
onCountryChange: (e) => console.log("Country changed:", e),
|
|
19294
19296
|
onCurrencyChange: (e) => console.log("Currency changed:", e),
|
|
19295
19297
|
onCheckboxChange: (e) => console.log("Checkbox changed:", e),
|
|
@@ -19322,6 +19324,8 @@ const defaultProps$y = {
|
|
|
19322
19324
|
loading: false,
|
|
19323
19325
|
submitting: false,
|
|
19324
19326
|
isExistingPartner: false,
|
|
19327
|
+
firstName: "",
|
|
19328
|
+
lastName: "",
|
|
19325
19329
|
countryCode: "",
|
|
19326
19330
|
currency: "",
|
|
19327
19331
|
error: "",
|
|
@@ -19439,6 +19443,28 @@ const SQMComponentNewPartner = () => {
|
|
|
19439
19443
|
states: { open: true, isExistingPartner: false },
|
|
19440
19444
|
} }));
|
|
19441
19445
|
};
|
|
19446
|
+
const PartnerHasFirstAndLastName = () => {
|
|
19447
|
+
const props = {
|
|
19448
|
+
...defaultProps$y,
|
|
19449
|
+
states: {
|
|
19450
|
+
...defaultProps$y.states,
|
|
19451
|
+
firstName: "John",
|
|
19452
|
+
lastName: "Doe",
|
|
19453
|
+
},
|
|
19454
|
+
};
|
|
19455
|
+
return index.h(sqmPartnerInfoModalView.PartnerInfoModalView, Object.assign({}, props));
|
|
19456
|
+
};
|
|
19457
|
+
const PartnerHasFirstNameOnly = () => {
|
|
19458
|
+
const props = {
|
|
19459
|
+
...defaultProps$y,
|
|
19460
|
+
states: {
|
|
19461
|
+
...defaultProps$y.states,
|
|
19462
|
+
firstName: "John",
|
|
19463
|
+
lastName: "",
|
|
19464
|
+
},
|
|
19465
|
+
};
|
|
19466
|
+
return index.h(sqmPartnerInfoModalView.PartnerInfoModalView, Object.assign({}, props));
|
|
19467
|
+
};
|
|
19442
19468
|
|
|
19443
19469
|
const PartnerInfoModal = /*#__PURE__*/Object.freeze({
|
|
19444
19470
|
__proto__: null,
|
|
@@ -19453,7 +19479,9 @@ const PartnerInfoModal = /*#__PURE__*/Object.freeze({
|
|
|
19453
19479
|
ValidationError: ValidationError$1,
|
|
19454
19480
|
Closed: Closed,
|
|
19455
19481
|
SQMComponentExistingPartner: SQMComponentExistingPartner,
|
|
19456
|
-
SQMComponentNewPartner: SQMComponentNewPartner
|
|
19482
|
+
SQMComponentNewPartner: SQMComponentNewPartner,
|
|
19483
|
+
PartnerHasFirstAndLastName: PartnerHasFirstAndLastName,
|
|
19484
|
+
PartnerHasFirstNameOnly: PartnerHasFirstNameOnly
|
|
19457
19485
|
});
|
|
19458
19486
|
|
|
19459
19487
|
const WidgetVerification_stories = {
|
|
@@ -20,6 +20,8 @@ const demoCurrencies = [
|
|
|
20
20
|
{ currencyCode: "AUD", displayName: "Australian Dollar" },
|
|
21
21
|
];
|
|
22
22
|
const noopCallbacks = {
|
|
23
|
+
onFirstNameChange: (e) => console.log("First name changed:", e),
|
|
24
|
+
onLastNameChange: (e) => console.log("Last name changed:", e),
|
|
23
25
|
onCountryChange: (e) => console.log("Country changed:", e),
|
|
24
26
|
onCurrencyChange: (e) => console.log("Currency changed:", e),
|
|
25
27
|
onCheckboxChange: (e) => console.log("Checkbox changed:", e),
|
|
@@ -52,6 +54,8 @@ const defaultProps = {
|
|
|
52
54
|
loading: false,
|
|
53
55
|
submitting: false,
|
|
54
56
|
isExistingPartner: false,
|
|
57
|
+
firstName: "",
|
|
58
|
+
lastName: "",
|
|
55
59
|
countryCode: "",
|
|
56
60
|
currency: "",
|
|
57
61
|
error: "",
|
|
@@ -169,3 +173,25 @@ export const SQMComponentNewPartner = () => {
|
|
|
169
173
|
states: { open: true, isExistingPartner: false },
|
|
170
174
|
} }));
|
|
171
175
|
};
|
|
176
|
+
export const PartnerHasFirstAndLastName = () => {
|
|
177
|
+
const props = {
|
|
178
|
+
...defaultProps,
|
|
179
|
+
states: {
|
|
180
|
+
...defaultProps.states,
|
|
181
|
+
firstName: "John",
|
|
182
|
+
lastName: "Doe",
|
|
183
|
+
},
|
|
184
|
+
};
|
|
185
|
+
return h(PartnerInfoModalView, Object.assign({}, props));
|
|
186
|
+
};
|
|
187
|
+
export const PartnerHasFirstNameOnly = () => {
|
|
188
|
+
const props = {
|
|
189
|
+
...defaultProps,
|
|
190
|
+
states: {
|
|
191
|
+
...defaultProps.states,
|
|
192
|
+
firstName: "John",
|
|
193
|
+
lastName: "",
|
|
194
|
+
},
|
|
195
|
+
};
|
|
196
|
+
return h(PartnerInfoModalView, Object.assign({}, props));
|
|
197
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h } from "@stencil/core";
|
|
1
|
+
import { Fragment, h } from "@stencil/core";
|
|
2
2
|
import { createStyleSheet } from "../../styling/JSS";
|
|
3
3
|
import { intl } from "../../global/global";
|
|
4
4
|
const style = {
|
|
@@ -27,6 +27,12 @@ const style = {
|
|
|
27
27
|
gap: "var(--sl-spacing-medium)",
|
|
28
28
|
marginTop: "var(--sl-spacing-large)",
|
|
29
29
|
},
|
|
30
|
+
NameInput: {
|
|
31
|
+
"&::part(label)": {
|
|
32
|
+
fontWeight: "var(--sl-font-weight-normal)",
|
|
33
|
+
fontSize: "var(--sl-input-label-font-size-medium)",
|
|
34
|
+
},
|
|
35
|
+
},
|
|
30
36
|
ErrorMessage: {
|
|
31
37
|
marginTop: "var(--sl-spacing-x-small)",
|
|
32
38
|
},
|
|
@@ -94,11 +100,12 @@ export function PartnerInfoModalContentView(props) {
|
|
|
94
100
|
termsAndConditionsLink: (h("a", { href: text.termsAndConditionsLink, target: "_blank" }, text.termsAndConditionsLabel)),
|
|
95
101
|
});
|
|
96
102
|
return (h("div", null,
|
|
97
|
-
h("style", { type: "text/css" },
|
|
98
|
-
" ",
|
|
99
|
-
styleString),
|
|
103
|
+
h("style", { type: "text/css" }, styleString),
|
|
100
104
|
h("div", { class: sheet.classes.FormFields },
|
|
101
105
|
description,
|
|
106
|
+
(!states.firstName || !states.lastName) && (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 }))),
|
|
102
109
|
h("sl-select", { exportparts: "label: input-label, base: input-base, menu: select-menu", label: text.countryLabel, value: states.countryCode, disabled: states.submitting ||
|
|
103
110
|
(!!states.countryCode && states.isExistingPartner), required: true, hoist: true, "onSl-select": callbacks.onCountryChange },
|
|
104
111
|
h("sl-input", { class: sheet.classes.SearchInput, placeholder: text.searchCountryPlaceholder, onKeyDown: (e) => e.stopPropagation(), "onSl-input": (e) => {
|
|
@@ -573,7 +573,7 @@ export class PartnerInfoModal {
|
|
|
573
573
|
"mutable": false,
|
|
574
574
|
"complexType": {
|
|
575
575
|
"original": "DemoData<PartnerInfoModalResult>",
|
|
576
|
-
"resolved": "{ states?: { open: boolean; loading: boolean; submitting: boolean; isExistingPartner: boolean; countryCode: string; currency: string; error: string; success: boolean; filteredCountries: { countryCode: string; displayName: string; }[]; filteredCurrencies: { currencyCode: string; displayName: string; }[]; allowBankingCollection: boolean; disabled: boolean; }; }",
|
|
576
|
+
"resolved": "{ states?: { open: boolean; loading: boolean; submitting: boolean; isExistingPartner: 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; }; }",
|
|
577
577
|
"references": {
|
|
578
578
|
"DemoData": {
|
|
579
579
|
"location": "import",
|
|
@@ -82,9 +82,10 @@ export function usePartnerInfoModal(props) {
|
|
|
82
82
|
const user = userData === null || userData === void 0 ? void 0 : userData.user;
|
|
83
83
|
const { data: currenciesData, loading: currenciesLoading } = useQuery(GET_CURRENCIES, { variables: { locale } });
|
|
84
84
|
const { data: countriesData, loading: countriesLoading } = useQuery(GET_COUNTRIES, {});
|
|
85
|
+
const [firstName, setFirstName] = useState((user === null || user === void 0 ? void 0 : user.firstName) || "");
|
|
86
|
+
const [lastName, setLastName] = useState((user === null || user === void 0 ? void 0 : user.lastName) || "");
|
|
85
87
|
// No pre-filled country, use locale to determine countryCode instead
|
|
86
|
-
const [countryCode, setCountryCode] = useState(((_b = (_a = user === null || user === void 0 ? void 0 : user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) === null || _b === void 0 ? void 0 : _b.countryCode) ||
|
|
87
|
-
locale.replace(/^.*_/, ""));
|
|
88
|
+
const [countryCode, setCountryCode] = useState(((_b = (_a = user === null || user === void 0 ? void 0 : user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) === null || _b === void 0 ? void 0 : _b.countryCode) || locale.replace(/^.*_/, ""));
|
|
88
89
|
const [currency, setCurrency] = useState(((_d = (_c = user === null || user === void 0 ? void 0 : user.impactConnection) === null || _c === void 0 ? void 0 : _c.publisher) === null || _d === void 0 ? void 0 : _d.currency) || "");
|
|
89
90
|
const { data: financeNetworkData } = useQuery(GET_FINANCE_NETWORK_SETTINGS, {
|
|
90
91
|
variables: { filter: countryCode ? { countryCode_eq: countryCode } : {} },
|
|
@@ -160,6 +161,14 @@ export function usePartnerInfoModal(props) {
|
|
|
160
161
|
}
|
|
161
162
|
}, [currencySearch, currencies]);
|
|
162
163
|
const impactConnection = user === null || user === void 0 ? void 0 : user.impactConnection;
|
|
164
|
+
function onFirstNameChange(e) {
|
|
165
|
+
const value = e.target.value;
|
|
166
|
+
setFirstName(value);
|
|
167
|
+
}
|
|
168
|
+
function onLastNameChange(e) {
|
|
169
|
+
const value = e.target.value;
|
|
170
|
+
setLastName(value);
|
|
171
|
+
}
|
|
163
172
|
function onCountryChange(e) {
|
|
164
173
|
var _a, _b;
|
|
165
174
|
const value = (_b = (_a = e.detail) === null || _a === void 0 ? void 0 : _a.item) === null || _b === void 0 ? void 0 : _b.__value;
|
|
@@ -183,7 +192,7 @@ export function usePartnerInfoModal(props) {
|
|
|
183
192
|
}
|
|
184
193
|
async function onSubmit() {
|
|
185
194
|
var _a, _b;
|
|
186
|
-
if (!allowBankingCollection || !countryCode || !currency) {
|
|
195
|
+
if (!allowBankingCollection || !countryCode || !currency || !firstName || !lastName) {
|
|
187
196
|
setError(props.missingFieldsErrorText);
|
|
188
197
|
return;
|
|
189
198
|
}
|
|
@@ -198,8 +207,8 @@ export function usePartnerInfoModal(props) {
|
|
|
198
207
|
id: user.id,
|
|
199
208
|
accountId: user.accountId,
|
|
200
209
|
},
|
|
201
|
-
firstName
|
|
202
|
-
lastName
|
|
210
|
+
firstName,
|
|
211
|
+
lastName,
|
|
203
212
|
countryCode,
|
|
204
213
|
currency,
|
|
205
214
|
};
|
|
@@ -235,6 +244,8 @@ export function usePartnerInfoModal(props) {
|
|
|
235
244
|
loading: userLoading || countriesLoading || currenciesLoading,
|
|
236
245
|
submitting: connectLoading,
|
|
237
246
|
isExistingPartner,
|
|
247
|
+
firstName,
|
|
248
|
+
lastName,
|
|
238
249
|
countryCode,
|
|
239
250
|
currency,
|
|
240
251
|
error,
|
|
@@ -245,6 +256,8 @@ export function usePartnerInfoModal(props) {
|
|
|
245
256
|
disabled: userLoading || connectLoading,
|
|
246
257
|
},
|
|
247
258
|
callbacks: {
|
|
259
|
+
onFirstNameChange,
|
|
260
|
+
onLastNameChange,
|
|
248
261
|
onCountryChange,
|
|
249
262
|
onCurrencyChange,
|
|
250
263
|
onCheckboxChange,
|
|
@@ -119,9 +119,9 @@ const defaultCustomizeProps = {
|
|
|
119
119
|
validationError: null,
|
|
120
120
|
isValidating: false,
|
|
121
121
|
isSaving: false,
|
|
122
|
-
characterLimit:
|
|
122
|
+
characterLimit: 30,
|
|
123
123
|
minCharacters: 3,
|
|
124
|
-
charactersRemaining:
|
|
124
|
+
charactersRemaining: 30,
|
|
125
125
|
editLimitText: "You can edit your link up to 5 times.",
|
|
126
126
|
editLimitReachedText: "5 edit limit reached. To make more changes, please contact {supportLink}.",
|
|
127
127
|
supportLinkText: "Support",
|
|
@@ -66,6 +66,8 @@ export function ShareLinkView(props) {
|
|
|
66
66
|
lineHeight: "var(--sl-input-height-medium)",
|
|
67
67
|
},
|
|
68
68
|
EditInput: {
|
|
69
|
+
maxWidth: "260px",
|
|
70
|
+
width: "100%",
|
|
69
71
|
"&::part(base)": {
|
|
70
72
|
border: "none",
|
|
71
73
|
borderRadius: "0",
|
|
@@ -132,7 +134,7 @@ export function ShareLinkView(props) {
|
|
|
132
134
|
const sheet = createStyleSheet(style);
|
|
133
135
|
const styleString = sheet.toString();
|
|
134
136
|
const errorMessageType = (validationError === null || validationError === void 0 ? void 0 : validationError.code) === "EXISTING_CODE_CONFLICT" ? "info" : "warning";
|
|
135
|
-
const showCharactersRemaining = charactersRemaining <=
|
|
137
|
+
const showCharactersRemaining = charactersRemaining <= 29;
|
|
136
138
|
const editLimitMessage = intl.formatMessage({
|
|
137
139
|
id: "editLimitText",
|
|
138
140
|
defaultMessage: editLimitText,
|
|
@@ -153,7 +155,7 @@ export function ShareLinkView(props) {
|
|
|
153
155
|
h("p", { class: sheet.classes.HelperText },
|
|
154
156
|
editLimitMessage,
|
|
155
157
|
" ",
|
|
156
|
-
charactersRemaining >
|
|
158
|
+
charactersRemaining > 27 && minCharactersText,
|
|
157
159
|
showCharactersRemaining &&
|
|
158
160
|
` ${intl.formatMessage({
|
|
159
161
|
id: "charactersRemainingText",
|
|
@@ -1285,9 +1285,9 @@ function useDemoShareLink(props) {
|
|
|
1285
1285
|
validationError: null,
|
|
1286
1286
|
isValidating: false,
|
|
1287
1287
|
isSaving: false,
|
|
1288
|
-
characterLimit:
|
|
1288
|
+
characterLimit: 30,
|
|
1289
1289
|
minCharacters: 3,
|
|
1290
|
-
charactersRemaining:
|
|
1290
|
+
charactersRemaining: 30 - editValue.length,
|
|
1291
1291
|
editLimitText: props.editLimitText,
|
|
1292
1292
|
editLimitReachedText: props.editLimitReachedText,
|
|
1293
1293
|
supportLinkText: props.supportLinkText,
|
|
@@ -3,7 +3,7 @@ import { useRef, useState } from "@saasquatch/universal-hooks";
|
|
|
3
3
|
import { gql } from "graphql-request";
|
|
4
4
|
import { REFERRAL_CODES_NAMESPACE, SET_CODE_COPIED, } from "../sqm-referral-codes/useReferralCodes";
|
|
5
5
|
const MAX_EDITS = 5;
|
|
6
|
-
const CHARACTER_LIMIT =
|
|
6
|
+
const CHARACTER_LIMIT = 30;
|
|
7
7
|
const MIN_CHARACTERS = 3;
|
|
8
8
|
const MessageLinkQuery = gql `
|
|
9
9
|
query ($programId: ID) {
|
|
@@ -4290,6 +4290,8 @@ function ShareLinkView(props) {
|
|
|
4290
4290
|
lineHeight: "var(--sl-input-height-medium)",
|
|
4291
4291
|
},
|
|
4292
4292
|
EditInput: {
|
|
4293
|
+
maxWidth: "260px",
|
|
4294
|
+
width: "100%",
|
|
4293
4295
|
"&::part(base)": {
|
|
4294
4296
|
border: "none",
|
|
4295
4297
|
borderRadius: "0",
|
|
@@ -4356,7 +4358,7 @@ function ShareLinkView(props) {
|
|
|
4356
4358
|
const sheet = createStyleSheet(style);
|
|
4357
4359
|
const styleString = sheet.toString();
|
|
4358
4360
|
const errorMessageType = (validationError === null || validationError === void 0 ? void 0 : validationError.code) === "EXISTING_CODE_CONFLICT" ? "info" : "warning";
|
|
4359
|
-
const showCharactersRemaining = charactersRemaining <=
|
|
4361
|
+
const showCharactersRemaining = charactersRemaining <= 29;
|
|
4360
4362
|
const editLimitMessage = intl.formatMessage({
|
|
4361
4363
|
id: "editLimitText",
|
|
4362
4364
|
defaultMessage: editLimitText,
|
|
@@ -4377,7 +4379,7 @@ function ShareLinkView(props) {
|
|
|
4377
4379
|
h("p", { class: sheet.classes.HelperText },
|
|
4378
4380
|
editLimitMessage,
|
|
4379
4381
|
" ",
|
|
4380
|
-
charactersRemaining >
|
|
4382
|
+
charactersRemaining > 27 && minCharactersText,
|
|
4381
4383
|
showCharactersRemaining &&
|
|
4382
4384
|
` ${intl.formatMessage({
|
|
4383
4385
|
id: "charactersRemainingText",
|
|
@@ -4416,7 +4418,7 @@ function ShareLinkView(props) {
|
|
|
4416
4418
|
}
|
|
4417
4419
|
|
|
4418
4420
|
const MAX_EDITS = 5;
|
|
4419
|
-
const CHARACTER_LIMIT =
|
|
4421
|
+
const CHARACTER_LIMIT = 30;
|
|
4420
4422
|
const MIN_CHARACTERS = 3;
|
|
4421
4423
|
const MessageLinkQuery$1 = dist.gql `
|
|
4422
4424
|
query ($programId: ID) {
|
|
@@ -25,7 +25,7 @@ import { u as useInstantAccessRegistration } from './useInstantAccessRegistratio
|
|
|
25
25
|
import { R as RequiredPropsError, L as LEAD_FORM_STATE_CONTEXT, u as useLeadFormState } from './useLeadFormState-6214b2d9.js';
|
|
26
26
|
import { i as isEmpty } from './utilities-cbd8f2eb.js';
|
|
27
27
|
import { E as ErrorView } from './ErrorView-74cb3af8.js';
|
|
28
|
-
import { u as useDemoBigStat, W as useBigStat, B as BigStatView, C as CardFeedView, d as CheckboxFieldView, e as CouponCodeView, D as DropdownFieldView, E as EditProfileView, H as HeroView, I as InputFieldView, U as LeadDropdownFieldView, Q as LeadFormView, X as withShadowView, L as LeaderboardView, N as NameFieldsView, f as ChangeMarktingView, P as PortalChangePasswordView, g as PortalFooterView, h as PortalFrameView, c as BaseRegistrationFormView, R as ReferralIframeView, i as RewardExchangeView, Y as demoRewardExchange, G as useShareButton, a as ShareButtonView, K as useShareLink, J as ShareLinkView, S as StatContainerView, T as TaskCardView } from './ShadowViewAddon-
|
|
28
|
+
import { u as useDemoBigStat, W as useBigStat, B as BigStatView, C as CardFeedView, d as CheckboxFieldView, e as CouponCodeView, D as DropdownFieldView, E as EditProfileView, H as HeroView, I as InputFieldView, U as LeadDropdownFieldView, Q as LeadFormView, X as withShadowView, L as LeaderboardView, N as NameFieldsView, f as ChangeMarktingView, P as PortalChangePasswordView, g as PortalFooterView, h as PortalFrameView, c as BaseRegistrationFormView, R as ReferralIframeView, i as RewardExchangeView, Y as demoRewardExchange, G as useShareButton, a as ShareButtonView, K as useShareLink, J as ShareLinkView, S as StatContainerView, T as TaskCardView } from './ShadowViewAddon-ae0cd8b9.js';
|
|
29
29
|
import './sqm-portal-container-view-200c9df8.js';
|
|
30
30
|
import { T as TAX_CONTEXT_NAMESPACE, a as TAX_FORM_CONTEXT_NAMESPACE, U as USER_FORM_CONTEXT_NAMESPACE, C as CURRENCIES_NAMESPACE, b as COUNTRIES_NAMESPACE, S as SORTED_COUNTRIES_NAMESPACE, c as USER_QUERY_NAMESPACE, G as GET_USER$2, d as COUNTRIES_QUERY_NAMESPACE, e as GET_COUNTRIES, f as FINANCE_NETWORK_SETTINGS_NAMESPACE, g as GET_FINANCE_NETWORK_SETTINGS, h as CURRENCIES_QUERY_NAMESPACE, i as GET_CURRENCIES } from './data-8698cbc6.js';
|
|
31
31
|
import { S as SHOW_CODE_NAMESPACE, a as VERIFICATION_EMAIL_NAMESPACE, b as SHOW_PARTNER_MODAL_NAMESPACE, P as PARTNER_CREATED_NAMESPACE, V as VERIFICATION_PARENT_NAMESPACE } from './keys-1054056a.js';
|
|
@@ -6365,9 +6365,9 @@ function useDemoShareLink(props) {
|
|
|
6365
6365
|
validationError: null,
|
|
6366
6366
|
isValidating: false,
|
|
6367
6367
|
isSaving: false,
|
|
6368
|
-
characterLimit:
|
|
6368
|
+
characterLimit: 30,
|
|
6369
6369
|
minCharacters: 3,
|
|
6370
|
-
charactersRemaining:
|
|
6370
|
+
charactersRemaining: 30 - editValue.length,
|
|
6371
6371
|
editLimitText: props.editLimitText,
|
|
6372
6372
|
editLimitReachedText: props.editLimitReachedText,
|
|
6373
6373
|
supportLinkText: props.supportLinkText,
|
|
@@ -7,7 +7,7 @@ import { g as getProps } from './utils-334c1e34.js';
|
|
|
7
7
|
import { c as createStyleSheet } from './JSS-67b5cff8.js';
|
|
8
8
|
import { T as TextSpanView } from './sqm-text-span-view-72f43dff.js';
|
|
9
9
|
import { g as GET_FINANCE_NETWORK_SETTINGS } from './data-8698cbc6.js';
|
|
10
|
-
import { a as PartnerInfoModalContentView, P as PartnerInfoModalView } from './sqm-partner-info-modal-view-
|
|
10
|
+
import { a as PartnerInfoModalContentView, P as PartnerInfoModalView } from './sqm-partner-info-modal-view-8a5ab2d0.js';
|
|
11
11
|
import { S as SHOW_CODE_NAMESPACE, a as VERIFICATION_EMAIL_NAMESPACE, P as PARTNER_CREATED_NAMESPACE } from './keys-1054056a.js';
|
|
12
12
|
import { T as TAX_FORM_UPDATED_EVENT_KEY } from './eventKeys-f76b6a03.js';
|
|
13
13
|
import { p as parseStates } from './parseStates-ed75e224.js';
|
|
@@ -501,9 +501,10 @@ function usePartnerInfoModal(props) {
|
|
|
501
501
|
const user = userData === null || userData === void 0 ? void 0 : userData.user;
|
|
502
502
|
const { data: currenciesData, loading: currenciesLoading } = wn(GET_CURRENCIES, { variables: { locale } });
|
|
503
503
|
const { data: countriesData, loading: countriesLoading } = wn(GET_COUNTRIES, {});
|
|
504
|
+
const [firstName, setFirstName] = useState((user === null || user === void 0 ? void 0 : user.firstName) || "");
|
|
505
|
+
const [lastName, setLastName] = useState((user === null || user === void 0 ? void 0 : user.lastName) || "");
|
|
504
506
|
// No pre-filled country, use locale to determine countryCode instead
|
|
505
|
-
const [countryCode, setCountryCode] = useState(((_b = (_a = user === null || user === void 0 ? void 0 : user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) === null || _b === void 0 ? void 0 : _b.countryCode) ||
|
|
506
|
-
locale.replace(/^.*_/, ""));
|
|
507
|
+
const [countryCode, setCountryCode] = useState(((_b = (_a = user === null || user === void 0 ? void 0 : user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) === null || _b === void 0 ? void 0 : _b.countryCode) || locale.replace(/^.*_/, ""));
|
|
507
508
|
const [currency, setCurrency] = useState(((_d = (_c = user === null || user === void 0 ? void 0 : user.impactConnection) === null || _c === void 0 ? void 0 : _c.publisher) === null || _d === void 0 ? void 0 : _d.currency) || "");
|
|
508
509
|
const { data: financeNetworkData } = wn(GET_FINANCE_NETWORK_SETTINGS, {
|
|
509
510
|
variables: { filter: countryCode ? { countryCode_eq: countryCode } : {} },
|
|
@@ -579,6 +580,14 @@ function usePartnerInfoModal(props) {
|
|
|
579
580
|
}
|
|
580
581
|
}, [currencySearch, currencies]);
|
|
581
582
|
const impactConnection = user === null || user === void 0 ? void 0 : user.impactConnection;
|
|
583
|
+
function onFirstNameChange(e) {
|
|
584
|
+
const value = e.target.value;
|
|
585
|
+
setFirstName(value);
|
|
586
|
+
}
|
|
587
|
+
function onLastNameChange(e) {
|
|
588
|
+
const value = e.target.value;
|
|
589
|
+
setLastName(value);
|
|
590
|
+
}
|
|
582
591
|
function onCountryChange(e) {
|
|
583
592
|
var _a, _b;
|
|
584
593
|
const value = (_b = (_a = e.detail) === null || _a === void 0 ? void 0 : _a.item) === null || _b === void 0 ? void 0 : _b.__value;
|
|
@@ -602,7 +611,7 @@ function usePartnerInfoModal(props) {
|
|
|
602
611
|
}
|
|
603
612
|
async function onSubmit() {
|
|
604
613
|
var _a, _b;
|
|
605
|
-
if (!allowBankingCollection || !countryCode || !currency) {
|
|
614
|
+
if (!allowBankingCollection || !countryCode || !currency || !firstName || !lastName) {
|
|
606
615
|
setError(props.missingFieldsErrorText);
|
|
607
616
|
return;
|
|
608
617
|
}
|
|
@@ -617,8 +626,8 @@ function usePartnerInfoModal(props) {
|
|
|
617
626
|
id: user.id,
|
|
618
627
|
accountId: user.accountId,
|
|
619
628
|
},
|
|
620
|
-
firstName
|
|
621
|
-
lastName
|
|
629
|
+
firstName,
|
|
630
|
+
lastName,
|
|
622
631
|
countryCode,
|
|
623
632
|
currency,
|
|
624
633
|
};
|
|
@@ -654,6 +663,8 @@ function usePartnerInfoModal(props) {
|
|
|
654
663
|
loading: userLoading || countriesLoading || currenciesLoading,
|
|
655
664
|
submitting: connectLoading,
|
|
656
665
|
isExistingPartner,
|
|
666
|
+
firstName,
|
|
667
|
+
lastName,
|
|
657
668
|
countryCode,
|
|
658
669
|
currency,
|
|
659
670
|
error,
|
|
@@ -664,6 +675,8 @@ function usePartnerInfoModal(props) {
|
|
|
664
675
|
disabled: userLoading || connectLoading,
|
|
665
676
|
},
|
|
666
677
|
callbacks: {
|
|
678
|
+
onFirstNameChange,
|
|
679
|
+
onLastNameChange,
|
|
667
680
|
onCountryChange,
|
|
668
681
|
onCurrencyChange,
|
|
669
682
|
onCheckboxChange,
|
package/dist/esm/{sqm-partner-info-modal-view-8f141a4f.js → sqm-partner-info-modal-view-8a5ab2d0.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h } from './index-38ad4957.js';
|
|
1
|
+
import { h, F as Fragment } from './index-38ad4957.js';
|
|
2
2
|
import { i as intl } from './global-32d00a6e.js';
|
|
3
3
|
import { c as createStyleSheet } from './JSS-67b5cff8.js';
|
|
4
4
|
|
|
@@ -28,6 +28,12 @@ const style = {
|
|
|
28
28
|
gap: "var(--sl-spacing-medium)",
|
|
29
29
|
marginTop: "var(--sl-spacing-large)",
|
|
30
30
|
},
|
|
31
|
+
NameInput: {
|
|
32
|
+
"&::part(label)": {
|
|
33
|
+
fontWeight: "var(--sl-font-weight-normal)",
|
|
34
|
+
fontSize: "var(--sl-input-label-font-size-medium)",
|
|
35
|
+
},
|
|
36
|
+
},
|
|
31
37
|
ErrorMessage: {
|
|
32
38
|
marginTop: "var(--sl-spacing-x-small)",
|
|
33
39
|
},
|
|
@@ -95,11 +101,12 @@ function PartnerInfoModalContentView(props) {
|
|
|
95
101
|
termsAndConditionsLink: (h("a", { href: text.termsAndConditionsLink, target: "_blank" }, text.termsAndConditionsLabel)),
|
|
96
102
|
});
|
|
97
103
|
return (h("div", null,
|
|
98
|
-
h("style", { type: "text/css" },
|
|
99
|
-
" ",
|
|
100
|
-
styleString),
|
|
104
|
+
h("style", { type: "text/css" }, styleString),
|
|
101
105
|
h("div", { class: sheet.classes.FormFields },
|
|
102
106
|
description,
|
|
107
|
+
(!states.firstName || !states.lastName) && (h(Fragment, null,
|
|
108
|
+
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 }),
|
|
109
|
+
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 }))),
|
|
103
110
|
h("sl-select", { exportparts: "label: input-label, base: input-base, menu: select-menu", label: text.countryLabel, value: states.countryCode, disabled: states.submitting ||
|
|
104
111
|
(!!states.countryCode && states.isExistingPartner), required: true, hoist: true, "onSl-select": callbacks.onCountryChange },
|
|
105
112
|
h("sl-input", { class: sheet.classes.SearchInput, placeholder: text.searchCountryPlaceholder, onKeyDown: (e) => e.stopPropagation(), "onSl-input": (e) => {
|