@saasquatch/mint-components 2.3.1-1 → 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.
Files changed (40) hide show
  1. package/dist/cjs/{ShadowViewAddon-e7267a6c.js → ShadowViewAddon-331ac9e4.js} +1 -1
  2. package/dist/cjs/sqm-big-stat_47.cjs.entry.js +1 -1
  3. package/dist/cjs/sqm-email-verification_2.cjs.entry.js +19 -6
  4. package/dist/cjs/{sqm-partner-info-modal-view-243aad7b.js → sqm-partner-info-modal-view-46e07ba0.js} +10 -3
  5. package/dist/cjs/sqm-stencilbook.cjs.entry.js +32 -4
  6. package/dist/collection/components/sqm-partner-info-modal/PartnerInfoModal.stories.js +26 -0
  7. package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal-view.js +11 -4
  8. package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal.js +1 -1
  9. package/dist/collection/components/sqm-partner-info-modal/usePartnerInfoModal.js +18 -5
  10. package/dist/collection/components/sqm-share-link/ShareLink.stories.js +1 -1
  11. package/dist/collection/components/sqm-share-link/sqm-share-link-view.js +1 -1
  12. package/dist/esm/{ShadowViewAddon-86e90a47.js → ShadowViewAddon-ae0cd8b9.js} +1 -1
  13. package/dist/esm/sqm-big-stat_47.entry.js +1 -1
  14. package/dist/esm/sqm-email-verification_2.entry.js +19 -6
  15. package/dist/esm/{sqm-partner-info-modal-view-8f141a4f.js → sqm-partner-info-modal-view-8a5ab2d0.js} +11 -4
  16. package/dist/esm/sqm-stencilbook.entry.js +32 -4
  17. package/dist/esm-es5/{ShadowViewAddon-86e90a47.js → ShadowViewAddon-ae0cd8b9.js} +1 -1
  18. package/dist/esm-es5/sqm-big-stat_47.entry.js +1 -1
  19. package/dist/esm-es5/sqm-email-verification_2.entry.js +1 -1
  20. package/dist/esm-es5/sqm-partner-info-modal-view-8a5ab2d0.js +1 -0
  21. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  22. package/dist/mint-components/mint-components.esm.js +1 -1
  23. package/dist/mint-components/{p-55847fc2.system.entry.js → p-1c739233.system.entry.js} +1 -1
  24. package/dist/mint-components/{p-70fafcf2.js → p-3d2fe16b.js} +1 -1
  25. package/dist/mint-components/{p-167fe178.system.js → p-87f119f0.system.js} +1 -1
  26. package/dist/mint-components/{p-1c540c01.system.entry.js → p-88893099.system.entry.js} +1 -1
  27. package/dist/mint-components/{p-61f7bf8a.entry.js → p-8e89c429.entry.js} +4 -4
  28. package/dist/mint-components/{p-23c94ea7.entry.js → p-b1dcabb0.entry.js} +1 -1
  29. package/dist/mint-components/p-bfb00685.system.js +1 -1
  30. package/dist/mint-components/p-c4da3ac1.system.js +1 -0
  31. package/dist/mint-components/{p-10fed7ad.entry.js → p-caa173f4.entry.js} +2 -2
  32. package/dist/mint-components/p-e636975c.js +1 -0
  33. package/dist/mint-components/{p-285f6aa2.system.entry.js → p-ede41e5e.system.entry.js} +1 -1
  34. package/dist/types/components/sqm-partner-info-modal/PartnerInfoModal.stories.d.ts +2 -0
  35. package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal-view.d.ts +4 -0
  36. package/docs/docs.docx +0 -0
  37. package/package.json +1 -1
  38. package/dist/esm-es5/sqm-partner-info-modal-view-8f141a4f.js +0 -1
  39. package/dist/mint-components/p-a094da68.js +0 -1
  40. package/dist/mint-components/p-e7f45f18.system.js +0 -1
@@ -4292,7 +4292,7 @@ function ShareLinkView(props) {
4292
4292
  lineHeight: "var(--sl-input-height-medium)",
4293
4293
  },
4294
4294
  EditInput: {
4295
- maxWidth: "248px",
4295
+ maxWidth: "260px",
4296
4296
  width: "100%",
4297
4297
  "&::part(base)": {
4298
4298
  border: "none",
@@ -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-e7267a6c.js');
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');
@@ -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-243aad7b.js');
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: user.firstName,
625
- lastName: user.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,
@@ -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-e7267a6c.js');
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-243aad7b.js');
43
+ const sqmPartnerInfoModalView = require('./sqm-partner-info-modal-view-46e07ba0.js');
44
44
 
45
45
  /**
46
46
  * lodash (Custom Build) <https://lodash.com/>
@@ -14293,7 +14293,7 @@ const defaultCustomizeProps = {
14293
14293
  isSaving: false,
14294
14294
  characterLimit: 30,
14295
14295
  minCharacters: 3,
14296
- charactersRemaining: 15,
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: user.firstName,
202
- lastName: user.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,
@@ -121,7 +121,7 @@ const defaultCustomizeProps = {
121
121
  isSaving: false,
122
122
  characterLimit: 30,
123
123
  minCharacters: 3,
124
- charactersRemaining: 15,
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,7 +66,7 @@ export function ShareLinkView(props) {
66
66
  lineHeight: "var(--sl-input-height-medium)",
67
67
  },
68
68
  EditInput: {
69
- maxWidth: "248px",
69
+ maxWidth: "260px",
70
70
  width: "100%",
71
71
  "&::part(base)": {
72
72
  border: "none",
@@ -4290,7 +4290,7 @@ function ShareLinkView(props) {
4290
4290
  lineHeight: "var(--sl-input-height-medium)",
4291
4291
  },
4292
4292
  EditInput: {
4293
- maxWidth: "248px",
4293
+ maxWidth: "260px",
4294
4294
  width: "100%",
4295
4295
  "&::part(base)": {
4296
4296
  border: "none",
@@ -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-86e90a47.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-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';
@@ -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-8f141a4f.js';
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: user.firstName,
621
- lastName: user.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,
@@ -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) => {
@@ -31,12 +31,12 @@ import './utilities-cbd8f2eb.js';
31
31
  import { P as PortalResetPasswordView } from './sqm-portal-reset-password-view-f84c04cf.js';
32
32
  import './ErrorView-74cb3af8.js';
33
33
  import { Q as QrCodeView } from './sqm-qr-code-view-ce476721.js';
34
- import { S as StatContainerView, B as BigStatView, a as ShareButtonView, P as PortalChangePasswordView, b as PoweredByImg$1, c as BaseRegistrationFormView, u as useDemoBigStat, T as TaskCardView, C as CardFeedView, d as CheckboxFieldView, e as CouponCodeView, D as DropdownFieldView, E as EditProfileView, L as LeaderboardView, H as HeroView, I as InputFieldView, N as NameFieldsView, f as ChangeMarktingView, g as PortalFooterView, h as PortalFrameView, R as ReferralIframeView, i as RewardExchangeView, r as rewardExchangeCustomErrorMsg, j as rewardExchangeLongText, k as rewardExchangeSelected, l as chooseAmountFixed, m as chooseAmountFixedNoDescription, n as chooseAmountVariable, o as chooseAmountVariableNoDescription, p as chooseAmountVariableDisabled, q as chooseAmountVariableUnavailable, s as confirmFixed, t as confirmVariable, v as redemptionError, w as queryError, x as success, y as successVariable, z as loading, A as empty$1, F as rewardExchange, G as useShareButton, J as ShareLinkView, K as useShareLink, M as ProgressBarView, O as ProgressBar$2, Q as LeadFormView, U as LeadDropdownFieldView, V as ShadowViewAddon } from './ShadowViewAddon-86e90a47.js';
34
+ import { S as StatContainerView, B as BigStatView, a as ShareButtonView, P as PortalChangePasswordView, b as PoweredByImg$1, c as BaseRegistrationFormView, u as useDemoBigStat, T as TaskCardView, C as CardFeedView, d as CheckboxFieldView, e as CouponCodeView, D as DropdownFieldView, E as EditProfileView, L as LeaderboardView, H as HeroView, I as InputFieldView, N as NameFieldsView, f as ChangeMarktingView, g as PortalFooterView, h as PortalFrameView, R as ReferralIframeView, i as RewardExchangeView, r as rewardExchangeCustomErrorMsg, j as rewardExchangeLongText, k as rewardExchangeSelected, l as chooseAmountFixed, m as chooseAmountFixedNoDescription, n as chooseAmountVariable, o as chooseAmountVariableNoDescription, p as chooseAmountVariableDisabled, q as chooseAmountVariableUnavailable, s as confirmFixed, t as confirmVariable, v as redemptionError, w as queryError, x as success, y as successVariable, z as loading, A as empty$1, F as rewardExchange, G as useShareButton, J as ShareLinkView, K as useShareLink, M as ProgressBarView, O as ProgressBar$2, Q as LeadFormView, U as LeadDropdownFieldView, V as ShadowViewAddon } from './ShadowViewAddon-ae0cd8b9.js';
35
35
  import { P as PortalContainerView, a as PortalSectionView } from './sqm-portal-container-view-200c9df8.js';
36
36
  import { I as InvoiceTableView, T as TaxAndCashDashboardView$1, O as OtherRegionSlotView, U as UserInfoFormView$1 } from './sqm-user-info-form-view-ceb3917a.js';
37
37
  import { L as LeadInputFieldView } from './sqm-lead-input-field-view-671ff96f.js';
38
38
  import './data-8698cbc6.js';
39
- import { P as PartnerInfoModalView } from './sqm-partner-info-modal-view-8f141a4f.js';
39
+ import { P as PartnerInfoModalView } from './sqm-partner-info-modal-view-8a5ab2d0.js';
40
40
 
41
41
  /**
42
42
  * lodash (Custom Build) <https://lodash.com/>
@@ -14289,7 +14289,7 @@ const defaultCustomizeProps = {
14289
14289
  isSaving: false,
14290
14290
  characterLimit: 30,
14291
14291
  minCharacters: 3,
14292
- charactersRemaining: 15,
14292
+ charactersRemaining: 30,
14293
14293
  editLimitText: "You can edit your link up to 5 times.",
14294
14294
  editLimitReachedText: "5 edit limit reached. To make more changes, please contact {supportLink}.",
14295
14295
  supportLinkText: "Support",
@@ -19286,6 +19286,8 @@ const demoCurrencies = [
19286
19286
  { currencyCode: "AUD", displayName: "Australian Dollar" },
19287
19287
  ];
19288
19288
  const noopCallbacks = {
19289
+ onFirstNameChange: (e) => console.log("First name changed:", e),
19290
+ onLastNameChange: (e) => console.log("Last name changed:", e),
19289
19291
  onCountryChange: (e) => console.log("Country changed:", e),
19290
19292
  onCurrencyChange: (e) => console.log("Currency changed:", e),
19291
19293
  onCheckboxChange: (e) => console.log("Checkbox changed:", e),
@@ -19318,6 +19320,8 @@ const defaultProps$y = {
19318
19320
  loading: false,
19319
19321
  submitting: false,
19320
19322
  isExistingPartner: false,
19323
+ firstName: "",
19324
+ lastName: "",
19321
19325
  countryCode: "",
19322
19326
  currency: "",
19323
19327
  error: "",
@@ -19435,6 +19439,28 @@ const SQMComponentNewPartner = () => {
19435
19439
  states: { open: true, isExistingPartner: false },
19436
19440
  } }));
19437
19441
  };
19442
+ const PartnerHasFirstAndLastName = () => {
19443
+ const props = {
19444
+ ...defaultProps$y,
19445
+ states: {
19446
+ ...defaultProps$y.states,
19447
+ firstName: "John",
19448
+ lastName: "Doe",
19449
+ },
19450
+ };
19451
+ return h(PartnerInfoModalView, Object.assign({}, props));
19452
+ };
19453
+ const PartnerHasFirstNameOnly = () => {
19454
+ const props = {
19455
+ ...defaultProps$y,
19456
+ states: {
19457
+ ...defaultProps$y.states,
19458
+ firstName: "John",
19459
+ lastName: "",
19460
+ },
19461
+ };
19462
+ return h(PartnerInfoModalView, Object.assign({}, props));
19463
+ };
19438
19464
 
19439
19465
  const PartnerInfoModal = /*#__PURE__*/Object.freeze({
19440
19466
  __proto__: null,
@@ -19449,7 +19475,9 @@ const PartnerInfoModal = /*#__PURE__*/Object.freeze({
19449
19475
  ValidationError: ValidationError$1,
19450
19476
  Closed: Closed,
19451
19477
  SQMComponentExistingPartner: SQMComponentExistingPartner,
19452
- SQMComponentNewPartner: SQMComponentNewPartner
19478
+ SQMComponentNewPartner: SQMComponentNewPartner,
19479
+ PartnerHasFirstAndLastName: PartnerHasFirstAndLastName,
19480
+ PartnerHasFirstNameOnly: PartnerHasFirstNameOnly
19453
19481
  });
19454
19482
 
19455
19483
  const WidgetVerification_stories = {