@saasquatch/mint-components 2.3.0-11 → 2.3.0-13

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 (85) hide show
  1. package/dist/cjs/{usePortalRegistrationForm-23ee2d62.js → AsYouType-d15caac8.js} +265 -223
  2. package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +46 -27
  3. package/dist/cjs/sqm-big-stat_47.cjs.entry.js +17 -13
  4. package/dist/cjs/sqm-portal-forgot-password_6.cjs.entry.js +3 -2
  5. package/dist/cjs/sqm-stencilbook.cjs.entry.js +59 -2
  6. package/dist/cjs/{sqm-user-info-form-view-8f7186b8.js → sqm-user-info-form-view-60e09262.js} +1004 -8
  7. package/dist/cjs/subregions-3542b0b8.js +1068 -0
  8. package/dist/cjs/{useIndirectTaxForm-112914a0.js → useIndirectTaxForm-c439eb81.js} +6 -2
  9. package/dist/cjs/usePortalRegistrationForm-8a3a14ac.js +215 -0
  10. package/dist/collection/components/tax-and-cash/TaxForm.stories.js +3 -0
  11. package/dist/collection/components/tax-and-cash/phoneExtensions.js +12 -0
  12. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form-view.js +8 -0
  13. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form.js +2 -1
  14. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +5 -1
  15. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.js +12 -9
  16. package/dist/collection/components/tax-and-cash/sqm-user-info-form/UserInfoFormView.stories.js +52 -0
  17. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +18 -5
  18. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.js +3 -1
  19. package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +31 -27
  20. package/dist/collection/components/tax-and-cash/utils.js +30 -27
  21. package/dist/esm/{usePortalRegistrationForm-3a1f36a2.js → AsYouType-2d56519e.js} +248 -223
  22. package/dist/esm/sqm-banking-info-form_10.entry.js +46 -27
  23. package/dist/esm/sqm-big-stat_47.entry.js +16 -12
  24. package/dist/esm/sqm-portal-forgot-password_6.entry.js +2 -1
  25. package/dist/esm/sqm-stencilbook.entry.js +59 -2
  26. package/dist/esm/{sqm-user-info-form-view-599a6922.js → sqm-user-info-form-view-647a2bd5.js} +1002 -6
  27. package/dist/esm/subregions-7c5112e8.js +1055 -0
  28. package/dist/esm/{useIndirectTaxForm-a6ac7e7e.js → useIndirectTaxForm-38cd984e.js} +6 -2
  29. package/dist/esm/usePortalRegistrationForm-78fdfd93.js +213 -0
  30. package/dist/esm-es5/AsYouType-2d56519e.js +1 -0
  31. package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
  32. package/dist/esm-es5/sqm-big-stat_47.entry.js +1 -1
  33. package/dist/esm-es5/sqm-portal-forgot-password_6.entry.js +1 -1
  34. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  35. package/dist/esm-es5/sqm-user-info-form-view-647a2bd5.js +1 -0
  36. package/dist/esm-es5/subregions-7c5112e8.js +1 -0
  37. package/dist/esm-es5/{useIndirectTaxForm-a6ac7e7e.js → useIndirectTaxForm-38cd984e.js} +2 -2
  38. package/dist/esm-es5/usePortalRegistrationForm-78fdfd93.js +1 -0
  39. package/dist/mint-components/mint-components.esm.js +1 -1
  40. package/dist/mint-components/p-1f387c7b.system.js +1 -1
  41. package/dist/mint-components/p-34179541.system.js +1 -0
  42. package/dist/mint-components/p-4065ae93.entry.js +9 -0
  43. package/dist/mint-components/p-5c3bff99.entry.js +1 -0
  44. package/dist/mint-components/p-6fd8981d.system.entry.js +1 -0
  45. package/dist/mint-components/p-769166a5.system.js +1 -0
  46. package/dist/mint-components/p-7c72eeb5.js +1 -0
  47. package/dist/mint-components/p-8d30945a.js +1 -0
  48. package/dist/mint-components/p-8dcd72fe.system.entry.js +1 -0
  49. package/dist/mint-components/p-a08157c4.js +1 -0
  50. package/dist/mint-components/p-a779e577.js +13 -0
  51. package/dist/mint-components/{p-2d4132fb.js → p-aa2c6585.js} +7 -5
  52. package/dist/mint-components/{p-6ef373ed.system.js → p-aab8a207.system.js} +2 -2
  53. package/dist/mint-components/p-af8b8c06.system.entry.js +1 -0
  54. package/dist/mint-components/{p-86231add.entry.js → p-b3f25c0e.entry.js} +8 -8
  55. package/dist/mint-components/p-c31966e3.system.entry.js +1 -0
  56. package/dist/mint-components/p-d463fa82.system.js +1 -0
  57. package/dist/mint-components/{p-339ce676.entry.js → p-dd5c1db9.entry.js} +11 -11
  58. package/dist/mint-components/p-ee91aeac.system.js +1 -0
  59. package/dist/types/components/tax-and-cash/phoneExtensions.d.ts +12 -0
  60. package/dist/types/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form-view.d.ts +1 -0
  61. package/dist/types/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.d.ts +1 -0
  62. package/dist/types/components/tax-and-cash/sqm-user-info-form/UserInfoFormView.stories.d.ts +1 -0
  63. package/dist/types/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.d.ts +2 -0
  64. package/dist/types/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.d.ts +2 -0
  65. package/dist/types/components/tax-and-cash/utils.d.ts +8 -2
  66. package/docs/docs.docx +0 -0
  67. package/grapesjs/grapesjs.js +1 -1
  68. package/package.json +1 -1
  69. package/dist/cjs/subregions-984e30d7.js +0 -1505
  70. package/dist/esm/subregions-7c9778d0.js +0 -1492
  71. package/dist/esm-es5/sqm-user-info-form-view-599a6922.js +0 -1
  72. package/dist/esm-es5/subregions-7c9778d0.js +0 -1
  73. package/dist/esm-es5/usePortalRegistrationForm-3a1f36a2.js +0 -1
  74. package/dist/mint-components/p-26a4ebfd.js +0 -1
  75. package/dist/mint-components/p-335a5736.entry.js +0 -1
  76. package/dist/mint-components/p-3a41b39c.js +0 -13
  77. package/dist/mint-components/p-40894343.entry.js +0 -9
  78. package/dist/mint-components/p-5fdf0286.system.js +0 -1
  79. package/dist/mint-components/p-7f29622d.js +0 -1
  80. package/dist/mint-components/p-81270b9f.system.js +0 -1
  81. package/dist/mint-components/p-b62d8b95.system.entry.js +0 -1
  82. package/dist/mint-components/p-bd03efe0.system.js +0 -1
  83. package/dist/mint-components/p-c9d2ccfc.system.entry.js +0 -1
  84. package/dist/mint-components/p-db6bf7cf.system.entry.js +0 -1
  85. package/dist/mint-components/p-f0ef09a0.system.entry.js +0 -1
@@ -11,17 +11,18 @@ const cjs = require('./cjs-1066ec21.js');
11
11
  const utils = require('./utils-6847bc06.js');
12
12
  const JSS = require('./JSS-8503a151.js');
13
13
  require('./mixins-4761d472.js');
14
+ require('./AsYouType-d15caac8.js');
15
+ const subregions = require('./subregions-3542b0b8.js');
14
16
  const GenericTableView = require('./GenericTableView-be5648e4.js');
15
17
  const reRender = require('./re-render-72a0ef45.js');
16
18
  const useChildElements = require('./useChildElements-041127d7.js');
17
19
  const luxon = require('./luxon-c1ad356a.js');
18
20
  const useReferralTable = require('./useReferralTable-6e9de0d5.js');
19
- const sqmUserInfoFormView = require('./sqm-user-info-form-view-8f7186b8.js');
20
- const subregions = require('./subregions-984e30d7.js');
21
+ const sqmUserInfoFormView = require('./sqm-user-info-form-view-60e09262.js');
21
22
  const data = require('./data-89ac73dd.js');
22
23
  const keys = require('./keys-5a2c9ed2.js');
23
24
  const eventKeys = require('./eventKeys-7af4df4d.js');
24
- const useIndirectTaxForm = require('./useIndirectTaxForm-112914a0.js');
25
+ const useIndirectTaxForm = require('./useIndirectTaxForm-c439eb81.js');
25
26
 
26
27
  function getFormMap({ props, getValidationErrorMessage, bankCountry, }) {
27
28
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76;
@@ -2839,6 +2840,14 @@ const IndirectTaxFormView = (props) => {
2839
2840
  }, {
2840
2841
  supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
2841
2842
  }))),
2843
+ states.isPartnerLegacy && (index.h("sqm-form-message", { loading: states.loading, type: "info" },
2844
+ index.h("p", { part: "alert-title" }, text.isPartnerAlertHeader),
2845
+ global.intl.formatMessage({
2846
+ id: "isPartnerAlertDescription",
2847
+ defaultMessage: text.isPartnerAlertDescription,
2848
+ }, {
2849
+ supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
2850
+ }))),
2842
2851
  index.h("div", null,
2843
2852
  index.h("h4", null, text.indirectTaxDetails))),
2844
2853
  states.loading ? (index.h("sl-spinner", { style: { fontSize: "50px", margin: "40px" } })) : (index.h("div", null,
@@ -3078,6 +3087,7 @@ function useDemoIndirectTaxForm(props) {
3078
3087
  disabled: false,
3079
3088
  loading: false,
3080
3089
  isPartner: false,
3090
+ isPartnerLegacy: false,
3081
3091
  loadingError: false,
3082
3092
  errors: {},
3083
3093
  formState: {
@@ -4435,7 +4445,7 @@ const GET_INDIRECT_TAX_COUNTRY_CODE = index_module.dist.gql `
4435
4445
  }
4436
4446
  `;
4437
4447
  function useUserInfoForm(props) {
4438
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
4448
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
4439
4449
  const currencyRef = domContextHooks_module.useRef(undefined);
4440
4450
  const phoneCountryRef = domContextHooks_module.useRef(undefined);
4441
4451
  const formRef = domContextHooks_module.useRef(null);
@@ -4555,7 +4565,7 @@ function useUserInfoForm(props) {
4555
4565
  }
4556
4566
  }, [currencySearch, currencies]);
4557
4567
  async function connectPartner(formData) {
4558
- var _a, _b, _c, _d;
4568
+ var _a, _b, _c, _d, _e, _f;
4559
4569
  const vars = {
4560
4570
  user: {
4561
4571
  id: user.id,
@@ -4569,36 +4579,34 @@ function useUserInfoForm(props) {
4569
4579
  city: formData.city,
4570
4580
  state: formData.state,
4571
4581
  postalCode: formData.postalCode,
4572
- phoneNumber: formData.phoneNumber,
4582
+ phoneNumber: subregions.toDomesticNumber(formData.phoneNumberCountryCode, formData.phoneNumber),
4573
4583
  phoneNumberCountryCode: formData.phoneNumberCountryCode,
4574
4584
  };
4585
+ // if user went through early partner creation, connectionStatus === "STARTED"
4586
+ // otherwise trigger legacy partner creation
4587
+ const userData = data$1 === null || data$1 === void 0 ? void 0 : data$1.user;
4575
4588
  let result = null;
4576
4589
  let connectionResult;
4577
- result = await completeImpactPartner({
4578
- vars,
4579
- });
4580
- connectionResult = (_a = result) === null || _a === void 0 ? void 0 : _a.completeImpactConnection;
4581
- // if (userData?.impactConnection?.connectionStatus === "STARTED") {
4582
- // result = await completeImpactPartner({
4583
- // vars,
4584
- // });
4585
- // connectionResult = (result as CompletePartnerResult)
4586
- // ?.completeImpactConnection;
4587
- // } else {
4588
- // result = await connectImpactPartner({
4589
- // vars,
4590
- // });
4591
- // connectionResult = (result as ConnectPartnerResult)
4592
- // ?.createImpactConnection;
4593
- // }
4594
- if (!result || ((_b = result) === null || _b === void 0 ? void 0 : _b.message))
4590
+ if (((_a = userData === null || userData === void 0 ? void 0 : userData.impactConnection) === null || _a === void 0 ? void 0 : _a.connectionStatus) === "STARTED") {
4591
+ result = await completeImpactPartner({
4592
+ vars,
4593
+ });
4594
+ connectionResult = (_b = result) === null || _b === void 0 ? void 0 : _b.completeImpactConnection;
4595
+ }
4596
+ else {
4597
+ result = await connectImpactPartner({
4598
+ vars,
4599
+ });
4600
+ connectionResult = (_c = result) === null || _c === void 0 ? void 0 : _c.createImpactConnection;
4601
+ }
4602
+ if (!result || ((_d = result) === null || _d === void 0 ? void 0 : _d.message))
4595
4603
  throw new Error();
4596
4604
  if (!(connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.success)) {
4597
4605
  console.error("Failed to create Impact connection: ", connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.validationErrors);
4598
4606
  throw new Error();
4599
4607
  }
4600
4608
  await refetch();
4601
- const resultPublisher = (_d = (_c = connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.user) === null || _c === void 0 ? void 0 : _c.impactConnection) === null || _d === void 0 ? void 0 : _d.publisher;
4609
+ const resultPublisher = (_f = (_e = connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.user) === null || _e === void 0 ? void 0 : _e.impactConnection) === null || _f === void 0 ? void 0 : _f.publisher;
4602
4610
  const hasValidCurrentDocument = subregions.validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
4603
4611
  // Fire form change event
4604
4612
  window.dispatchEvent(new Event(eventKeys.TAX_FORM_UPDATED_EVENT_KEY));
@@ -4636,12 +4644,13 @@ function useUserInfoForm(props) {
4636
4644
  return;
4637
4645
  }
4638
4646
  const { allowBankingCollection, ...userData } = formData;
4647
+ const normalizedPhoneNumber = subregions.toDomesticNumber(userData.phoneNumberCountryCode, userData.phoneNumber);
4639
4648
  setUserFormContext({
4640
4649
  ...userFormContext,
4641
4650
  firstName: userData.firstName,
4642
4651
  lastName: userData.lastName,
4643
4652
  phoneNumberCountryCode: userData.phoneNumberCountryCode,
4644
- phoneNumber: userData.phoneNumber,
4653
+ phoneNumber: normalizedPhoneNumber,
4645
4654
  countryCode: userData.countryCode,
4646
4655
  address: userData.address,
4647
4656
  city: userData.city,
@@ -4652,7 +4661,10 @@ function useUserInfoForm(props) {
4652
4661
  const skipNextStep = getSkipNextStep(userData);
4653
4662
  if (skipNextStep) {
4654
4663
  try {
4655
- const { resultPublisher, hasValidCurrentDocument } = await connectPartner(formData);
4664
+ const { resultPublisher, hasValidCurrentDocument } = await connectPartner({
4665
+ ...formData,
4666
+ phoneNumber: normalizedPhoneNumber,
4667
+ });
4656
4668
  if ((resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) &&
4657
4669
  !hasValidCurrentDocument) {
4658
4670
  // Go to docusign form
@@ -4728,6 +4740,11 @@ function useUserInfoForm(props) {
4728
4740
  loading: loading || connectLoading || completeLoading,
4729
4741
  isPartner: !!((_g = (_f = data$1 === null || data$1 === void 0 ? void 0 : data$1.user) === null || _f === void 0 ? void 0 : _f.impactConnection) === null || _g === void 0 ? void 0 : _g.publisher),
4730
4742
  isUser: !!((_j = (_h = data$1 === null || data$1 === void 0 ? void 0 : data$1.user) === null || _h === void 0 ? void 0 : _h.impactConnection) === null || _j === void 0 ? void 0 : _j.user),
4743
+ // Show banner when pre-existing partner is created with legacy mutation createImpactConnection
4744
+ isUserLegacy: !!((_l = (_k = data$1 === null || data$1 === void 0 ? void 0 : data$1.user) === null || _k === void 0 ? void 0 : _k.impactConnection) === null || _l === void 0 ? void 0 : _l.user) &&
4745
+ ((_o = (_m = data$1 === null || data$1 === void 0 ? void 0 : data$1.user) === null || _m === void 0 ? void 0 : _m.impactConnection) === null || _o === void 0 ? void 0 : _o.connectionStatus) !== "STARTED",
4746
+ isPartnerLegacy: !!((_q = (_p = data$1 === null || data$1 === void 0 ? void 0 : data$1.user) === null || _p === void 0 ? void 0 : _p.impactConnection) === null || _q === void 0 ? void 0 : _q.publisher) &&
4747
+ ((_s = (_r = data$1 === null || data$1 === void 0 ? void 0 : data$1.user) === null || _r === void 0 ? void 0 : _r.impactConnection) === null || _s === void 0 ? void 0 : _s.connectionStatus) !== "STARTED",
4731
4748
  formState: {
4732
4749
  ...userFormContext,
4733
4750
  errors: formErrors,
@@ -4945,6 +4962,8 @@ function useDemoUserInfoForm(props) {
4945
4962
  loading: false,
4946
4963
  isPartner: false,
4947
4964
  isUser: false,
4965
+ isPartnerLegacy: false,
4966
+ isUserLegacy: false,
4948
4967
  loadingError: false,
4949
4968
  formState: {
4950
4969
  errors: {
@@ -14,9 +14,11 @@ require('./useReferralCodes-0f7948af.js');
14
14
  require('./mixins-4761d472.js');
15
15
  const copyTextView = require('./copy-text-view-bb2c0ea7.js');
16
16
  require('./sqm-text-span-view-b9e10f5d.js');
17
- const usePortalRegistrationForm = require('./usePortalRegistrationForm-23ee2d62.js');
17
+ const AsYouType = require('./AsYouType-d15caac8.js');
18
+ const subregions = require('./subregions-3542b0b8.js');
18
19
  const useRegistrationFormState = require('./useRegistrationFormState-4fe5b770.js');
19
20
  const sqmPortalRegistrationFormView = require('./sqm-portal-registration-form-view-a45f7a52.js');
21
+ const usePortalRegistrationForm = require('./usePortalRegistrationForm-8a3a14ac.js');
20
22
  const reRender = require('./re-render-72a0ef45.js');
21
23
  const useChildElements = require('./useChildElements-041127d7.js');
22
24
  const luxon = require('./luxon-c1ad356a.js');
@@ -29,11 +31,10 @@ const utilities = require('./utilities-fcdb9504.js');
29
31
  const ErrorView = require('./ErrorView-ee7b0f36.js');
30
32
  const ShadowViewAddon = require('./ShadowViewAddon-3b477e58.js');
31
33
  require('./sqm-portal-container-view-757f921b.js');
32
- const subregions = require('./subregions-984e30d7.js');
33
34
  const data = require('./data-89ac73dd.js');
34
35
  const keys = require('./keys-5a2c9ed2.js');
35
36
  require('./eventKeys-7af4df4d.js');
36
- const useIndirectTaxForm = require('./useIndirectTaxForm-112914a0.js');
37
+ const useIndirectTaxForm = require('./useIndirectTaxForm-c439eb81.js');
37
38
  const parseStates = require('./parseStates-d1effc19.js');
38
39
 
39
40
  /**
@@ -2145,7 +2146,7 @@ function useLeadForm(props) {
2145
2146
  const name = (_b = (_a = e.target) === null || _a === void 0 ? void 0 : _a.type) === null || _b === void 0 ? void 0 : _b.toLowerCase();
2146
2147
  if (name !== "tel")
2147
2148
  return;
2148
- const asYouType = new usePortalRegistrationForm.AsYouType("US");
2149
+ const asYouType = new AsYouType.AsYouType("US");
2149
2150
  e.target.value = asYouType.input(e.target.value);
2150
2151
  }, []);
2151
2152
  function resetForm() {
@@ -6662,15 +6663,18 @@ function getCurrentStep(user) {
6662
6663
  return "/1";
6663
6664
  }
6664
6665
  const { requiredTaxDocumentType, currentTaxDocument, withdrawalSettings, brandedSignup, payoutsAccount, billingAddress, billingCity, billingCountryCode, billingPostalCode, phoneNumber, phoneNumberCountryCode, } = user.impactConnection.publisher;
6665
- const hasBillingInfo = billingAddress &&
6666
- billingCity &&
6667
- billingCountryCode &&
6668
- billingPostalCode &&
6669
- phoneNumberCountryCode &&
6670
- phoneNumber &&
6671
- subregions.isValidI18nPhoneNumber(phoneNumberCountryCode, phoneNumber);
6672
- if (!hasBillingInfo) {
6673
- return "/1";
6666
+ const isCompleted = user.impactConnection.connectionStatus === "COMPLETED";
6667
+ if (!isCompleted) {
6668
+ const hasBillingInfo = billingAddress &&
6669
+ billingCity &&
6670
+ billingCountryCode &&
6671
+ billingPostalCode &&
6672
+ phoneNumberCountryCode &&
6673
+ phoneNumber &&
6674
+ subregions.isValidI18nPhoneNumber(phoneNumberCountryCode, phoneNumber);
6675
+ if (!hasBillingInfo) {
6676
+ return "/1";
6677
+ }
6674
6678
  }
6675
6679
  // If they do have a required document, look at current document
6676
6680
  if (requiredTaxDocumentType && !currentTaxDocument) {
@@ -12,9 +12,10 @@ const JSS = require('./JSS-8503a151.js');
12
12
  require('./mixins-4761d472.js');
13
13
  require('./sqm-text-span-view-b9e10f5d.js');
14
14
  const sqmPortalVerifyEmailView = require('./sqm-portal-verify-email-view-717d0633.js');
15
- const usePortalRegistrationForm = require('./usePortalRegistrationForm-23ee2d62.js');
15
+ const AsYouType = require('./AsYouType-d15caac8.js');
16
16
  const useRegistrationFormState = require('./useRegistrationFormState-4fe5b770.js');
17
17
  const sqmPortalRegistrationFormView = require('./sqm-portal-registration-form-view-a45f7a52.js');
18
+ const usePortalRegistrationForm = require('./usePortalRegistrationForm-8a3a14ac.js');
18
19
 
19
20
  function usePortalForgotPassword(props) {
20
21
  var _a, _b, _c, _d, _e, _f, _g;
@@ -534,7 +535,7 @@ function usePortalRegister(props) {
534
535
  const name = (_b = (_a = e.target) === null || _a === void 0 ? void 0 : _a.type) === null || _b === void 0 ? void 0 : _b.toLowerCase();
535
536
  if (name !== "tel")
536
537
  return;
537
- const asYouType = new usePortalRegistrationForm.AsYouType("US");
538
+ const asYouType = new AsYouType.AsYouType("US");
538
539
  e.target.value = asYouType.input(e.target.value);
539
540
  }, []);
540
541
  let errorMessage = "";
@@ -14,6 +14,8 @@ require('./mixins-4761d472.js');
14
14
  const copyTextView = require('./copy-text-view-bb2c0ea7.js');
15
15
  require('./sqm-text-span-view-b9e10f5d.js');
16
16
  const sqmPortalVerifyEmailView = require('./sqm-portal-verify-email-view-717d0633.js');
17
+ require('./AsYouType-d15caac8.js');
18
+ const subregions = require('./subregions-3542b0b8.js');
17
19
  const sqmPortalRegistrationFormView = require('./sqm-portal-registration-form-view-a45f7a52.js');
18
20
  const GenericTableView = require('./GenericTableView-be5648e4.js');
19
21
  require('./useChildElements-041127d7.js');
@@ -35,8 +37,7 @@ require('./ErrorView-ee7b0f36.js');
35
37
  const sqmQrCodeView = require('./sqm-qr-code-view-1f2daa76.js');
36
38
  const ShadowViewAddon = require('./ShadowViewAddon-3b477e58.js');
37
39
  const sqmPortalContainerView = require('./sqm-portal-container-view-757f921b.js');
38
- const sqmUserInfoFormView = require('./sqm-user-info-form-view-8f7186b8.js');
39
- const subregions = require('./subregions-984e30d7.js');
40
+ const sqmUserInfoFormView = require('./sqm-user-info-form-view-60e09262.js');
40
41
  const sqmLeadInputFieldView = require('./sqm-lead-input-field-view-0cd7ebdb.js');
41
42
  require('./data-89ac73dd.js');
42
43
  const sqmPartnerInfoModalView = require('./sqm-partner-info-modal-view-2b6fee0f.js');
@@ -16702,6 +16703,8 @@ const stepOneProps = {
16702
16703
  disabled: false,
16703
16704
  isPartner: false,
16704
16705
  isUser: false,
16706
+ isPartnerLegacy: false,
16707
+ isUserLegacy: false,
16705
16708
  loadingError: false,
16706
16709
  formState: {
16707
16710
  firstName: "Bob",
@@ -16822,6 +16825,7 @@ const stepTwoProps = {
16822
16825
  disabled: false,
16823
16826
  loading: false,
16824
16827
  isPartner: false,
16828
+ isPartnerLegacy: false,
16825
16829
  loadingError: false,
16826
16830
  formState: {
16827
16831
  checked: undefined,
@@ -18883,6 +18887,11 @@ const mockCountries = [
18883
18887
  { countryCode: "DE", displayName: "Germany" },
18884
18888
  { countryCode: "FR", displayName: "France" },
18885
18889
  { countryCode: "ES", displayName: "Spain" },
18890
+ // Show handling of long country names
18891
+ {
18892
+ countryCode: "CD",
18893
+ displayName: "Congo, The Democratic Republic of the Congo",
18894
+ },
18886
18895
  ];
18887
18896
  const mockCurrencies = [
18888
18897
  { currencyCode: "USD", displayName: "US Dollar" },
@@ -18973,6 +18982,8 @@ const baseProps = {
18973
18982
  loading: false,
18974
18983
  isPartner: false,
18975
18984
  isUser: false,
18985
+ isPartnerLegacy: false,
18986
+ isUserLegacy: false,
18976
18987
  formState: {
18977
18988
  firstName: "",
18978
18989
  lastName: "",
@@ -19085,6 +19096,7 @@ const PartnerAccount = () => {
19085
19096
  return (index.h(sqmUserInfoFormView.UserInfoFormView, Object.assign({}, baseProps, { states: {
19086
19097
  ...baseProps.states,
19087
19098
  isPartner: true,
19099
+ isPartnerLegacy: true,
19088
19100
  formState: {
19089
19101
  ...baseProps.states.formState,
19090
19102
  firstName: "Jane",
@@ -19104,10 +19116,53 @@ const PartnerAccount = () => {
19104
19116
  partnerData: mockPartnerData,
19105
19117
  } })));
19106
19118
  };
19119
+ // Early partner created via <sqm-partner-info-modal>: connectionStatus is "STARTED",
19120
+ // publisher has only countryCode + currency populated. Banner must NOT show; only
19121
+ // country + currency disabled; firstName/lastName disabled via userData; everything
19122
+ // else (phone, address, city, state, postalCode) stays editable.
19123
+ const EarlyPartnerFromModal = () => {
19124
+ return (index.h(sqmUserInfoFormView.UserInfoFormView, Object.assign({}, baseProps, { states: {
19125
+ ...baseProps.states,
19126
+ isPartner: true,
19127
+ isUser: true,
19128
+ isPartnerLegacy: false,
19129
+ isUserLegacy: false,
19130
+ formState: {
19131
+ ...baseProps.states.formState,
19132
+ firstName: "Jane",
19133
+ lastName: "Smith",
19134
+ email: "jane.smith@example.com",
19135
+ countryCode: "US",
19136
+ currency: "USD",
19137
+ phoneNumberCountryCode: undefined,
19138
+ phoneNumber: undefined,
19139
+ address: undefined,
19140
+ city: undefined,
19141
+ state: undefined,
19142
+ postalCode: undefined,
19143
+ },
19144
+ }, data: {
19145
+ ...baseProps.data,
19146
+ partnerData: {
19147
+ ...mockPartnerData,
19148
+ billingAddress: undefined,
19149
+ billingCity: undefined,
19150
+ billingState: undefined,
19151
+ billingPostalCode: undefined,
19152
+ phoneNumber: undefined,
19153
+ phoneNumberCountryCode: undefined,
19154
+ },
19155
+ userData: {
19156
+ firstName: "Jane",
19157
+ lastName: "Smith",
19158
+ },
19159
+ } })));
19160
+ };
19107
19161
  const UserAccount = () => {
19108
19162
  return (index.h(sqmUserInfoFormView.UserInfoFormView, Object.assign({}, baseProps, { states: {
19109
19163
  ...baseProps.states,
19110
19164
  isUser: true,
19165
+ isUserLegacy: true,
19111
19166
  formState: {
19112
19167
  ...baseProps.states.formState,
19113
19168
  firstName: "Bob",
@@ -19126,6 +19181,7 @@ const UserAccountMissingLastName = () => {
19126
19181
  return (index.h(sqmUserInfoFormView.UserInfoFormView, Object.assign({}, baseProps, { states: {
19127
19182
  ...baseProps.states,
19128
19183
  isUser: true,
19184
+ isUserLegacy: true,
19129
19185
  formState: {
19130
19186
  ...baseProps.states.formState,
19131
19187
  firstName: "Bob",
@@ -19205,6 +19261,7 @@ const UserInfoFormView = /*#__PURE__*/Object.freeze({
19205
19261
  WithValidationErrors: WithValidationErrors,
19206
19262
  WithGeneralError: WithGeneralError,
19207
19263
  PartnerAccount: PartnerAccount,
19264
+ EarlyPartnerFromModal: EarlyPartnerFromModal,
19208
19265
  UserAccount: UserAccount,
19209
19266
  UserAccountMissingLastName: UserAccountMissingLastName,
19210
19267
  CanadianAddress: CanadianAddress,