@saasquatch/mint-components 2.3.0-6 → 2.3.0-7

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 (58) hide show
  1. package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +28 -721
  2. package/dist/cjs/sqm-big-stat_47.cjs.entry.js +4 -4
  3. package/dist/cjs/sqm-email-verification_2.cjs.entry.js +16 -31
  4. package/dist/cjs/sqm-stencilbook.cjs.entry.js +253 -76
  5. package/dist/cjs/{sqm-user-info-form-view-0e1ddbe4.js → sqm-user-info-form-view-42323dc5.js} +743 -38
  6. package/dist/cjs/{useIndirectTaxForm-c3c1ec56.js → useIndirectTaxForm-d1cd23f7.js} +5 -5
  7. package/dist/collection/components/sqm-partner-info-modal/usePartnerInfoModal.js +16 -31
  8. package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +2 -0
  9. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/PayoutDetailsCard.stories.js +6 -0
  10. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card-view.js +13 -2
  11. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/TaxAndCashDashboardView.stories.js +151 -0
  12. package/dist/esm/sqm-banking-info-form_10.entry.js +16 -709
  13. package/dist/esm/sqm-big-stat_47.entry.js +2 -2
  14. package/dist/esm/sqm-email-verification_2.entry.js +16 -31
  15. package/dist/esm/sqm-stencilbook.entry.js +217 -40
  16. package/dist/esm/{sqm-user-info-form-view-e1ba6009.js → sqm-user-info-form-view-dc473cb8.js} +721 -17
  17. package/dist/esm/{useIndirectTaxForm-b2888ea5.js → useIndirectTaxForm-27668ad4.js} +1 -1
  18. package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
  19. package/dist/esm-es5/sqm-big-stat_47.entry.js +1 -1
  20. package/dist/esm-es5/sqm-email-verification_2.entry.js +1 -1
  21. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  22. package/dist/esm-es5/sqm-user-info-form-view-dc473cb8.js +1 -0
  23. package/dist/esm-es5/subregions-24c1c137.js +1 -0
  24. package/dist/esm-es5/{useIndirectTaxForm-b2888ea5.js → useIndirectTaxForm-27668ad4.js} +1 -1
  25. package/dist/mint-components/mint-components.esm.js +1 -1
  26. package/dist/mint-components/p-1f387c7b.system.js +1 -1
  27. package/dist/mint-components/{p-abe9f5b1.js → p-2e462dd9.js} +5 -5
  28. package/dist/mint-components/{p-b419f9ac.entry.js → p-3c052d3d.entry.js} +1 -1
  29. package/dist/mint-components/p-3f68e4e3.js +1 -0
  30. package/dist/mint-components/{p-a38eece5.system.entry.js → p-4575f71b.system.entry.js} +1 -1
  31. package/dist/mint-components/{p-e7f09044.entry.js → p-459c4251.entry.js} +6 -31
  32. package/dist/mint-components/p-547f8243.system.entry.js +1 -0
  33. package/dist/mint-components/p-66cb8bec.system.js +1 -0
  34. package/dist/mint-components/p-b21c53cb.system.entry.js +1 -0
  35. package/dist/mint-components/p-c2903e7d.entry.js +83 -0
  36. package/dist/mint-components/p-cb58a2c6.js +1 -0
  37. package/dist/mint-components/p-d30c8cb3.entry.js +9 -0
  38. package/dist/mint-components/p-df74f653.system.entry.js +1 -0
  39. package/dist/mint-components/p-ec58628f.system.js +1 -0
  40. package/dist/mint-components/{p-58c24352.system.js → p-ed945efe.system.js} +1 -1
  41. package/dist/types/components/sqm-partner-info-modal/usePartnerInfoModal.d.ts +0 -1
  42. package/dist/types/components/tax-and-cash/sqm-payout-details-card/PayoutDetailsCard.stories.d.ts +1 -0
  43. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/TaxAndCashDashboardView.stories.d.ts +19 -0
  44. package/docs/docs.docx +0 -0
  45. package/package.json +1 -1
  46. package/dist/esm-es5/sqm-user-info-form-view-e1ba6009.js +0 -1
  47. package/dist/esm-es5/utils-4f5cd04c.js +0 -1
  48. package/dist/mint-components/p-12d11abc.system.entry.js +0 -1
  49. package/dist/mint-components/p-1e6a2945.js +0 -1
  50. package/dist/mint-components/p-88e427ac.system.entry.js +0 -1
  51. package/dist/mint-components/p-a0eb0331.entry.js +0 -9
  52. package/dist/mint-components/p-b222bace.system.entry.js +0 -1
  53. package/dist/mint-components/p-b96ed8eb.js +0 -1
  54. package/dist/mint-components/p-cdabd9de.system.js +0 -1
  55. package/dist/mint-components/p-ebc519bc.system.js +0 -1
  56. package/dist/mint-components/p-ffcebe78.entry.js +0 -83
  57. package/dist/cjs/{utils-a3b3d05b.js → subregions-e7273457.js} +44 -44
  58. package/dist/esm/{utils-4f5cd04c.js → subregions-24c1c137.js} +44 -44
@@ -29,11 +29,11 @@ const utilities = require('./utilities-fcdb9504.js');
29
29
  const ErrorView = require('./ErrorView-ee7b0f36.js');
30
30
  const ShadowViewAddon = require('./ShadowViewAddon-3b477e58.js');
31
31
  require('./sqm-portal-container-view-757f921b.js');
32
- const utils$1 = require('./utils-a3b3d05b.js');
32
+ const subregions = require('./subregions-e7273457.js');
33
33
  const data = require('./data-89ac73dd.js');
34
34
  const keys = require('./keys-5a2c9ed2.js');
35
35
  require('./eventKeys-7af4df4d.js');
36
- const useIndirectTaxForm = require('./useIndirectTaxForm-c3c1ec56.js');
36
+ const useIndirectTaxForm = require('./useIndirectTaxForm-d1cd23f7.js');
37
37
  const parseStates = require('./parseStates-d1effc19.js');
38
38
 
39
39
  /**
@@ -6780,7 +6780,7 @@ function useTaxAndCash() {
6780
6780
  const availableCountries = domContextHooks_module.useMemo(() => new Set(paymentOptions === null || paymentOptions === void 0 ? void 0 : paymentOptions.map((option) => option.countryCode).filter((value) => value)), [paymentOptions]);
6781
6781
  const _topCountries = ["CA", "GB", "US"];
6782
6782
  const sortedCountries = domContextHooks_module.useMemo(() => Array.from(availableCountries)
6783
- .map((countryCode) => utils$1.getCountryObj({ countryCode, locale: intlLocale }))
6783
+ .map((countryCode) => subregions.getCountryObj({ countryCode, locale: intlLocale }))
6784
6784
  .sort(sortByName)
6785
6785
  .reduce((prev, countryObj) => {
6786
6786
  if (_topCountries.includes(countryObj.countryCode))
@@ -8034,7 +8034,7 @@ const TaxAndCashMonolith = class {
8034
8034
  supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, this.supportLink)),
8035
8035
  }) }));
8036
8036
  }
8037
- return index.h(utils$1.LoadingView, null);
8037
+ return index.h(subregions.LoadingView, null);
8038
8038
  }
8039
8039
  };
8040
8040
  function useDemoTaxAndCash(props) {
@@ -471,32 +471,6 @@ const GET_CURRENCIES = index_module.dist.gql `
471
471
  }
472
472
  }
473
473
  `;
474
- const CONNECT_PARTNER = index_module.dist.gql `
475
- mutation createImpactConnection($vars: ImpactConnectionInput!) {
476
- createImpactConnection(impactConnectionInput: $vars) {
477
- success
478
- validationErrors {
479
- field
480
- message
481
- }
482
- user {
483
- id
484
- accountId
485
- impactConnection {
486
- connected
487
- publisher {
488
- brandedSignup
489
- requiredTaxDocumentType
490
- currentTaxDocument {
491
- type
492
- status
493
- }
494
- }
495
- }
496
- }
497
- }
498
- }
499
- `;
500
474
  const START_IMPACT_CONNECTION = index_module.dist.gql `
501
475
  mutation startImpactConnection($vars: ImpactConnectionInput!) {
502
476
  startImpactConnection(impactConnectionInput: $vars) {
@@ -524,7 +498,7 @@ const START_IMPACT_CONNECTION = index_module.dist.gql `
524
498
  }
525
499
  `;
526
500
  function usePartnerInfoModal(props) {
527
- var _a, _b, _c, _d, _e, _f, _g;
501
+ var _a, _b, _c, _d, _e;
528
502
  const locale = index_module.L();
529
503
  const setPartnerCreated = index_module.En(keys.PARTNER_CREATED_NAMESPACE);
530
504
  const { data: userData, loading: userLoading, refetch, } = index_module.wn(GET_USER_PARTNER_INFO, {});
@@ -539,8 +513,20 @@ function usePartnerInfoModal(props) {
539
513
  });
540
514
  const [startImpactConnection, { loading: connectLoading }] = index_module.$e(START_IMPACT_CONNECTION);
541
515
  const [allowBankingCollection, setAllowBankingCollection] = domContextHooks_module.useState(false);
542
- const countries = ((_e = countriesData === null || countriesData === void 0 ? void 0 : countriesData.impactPayoutCountries) === null || _e === void 0 ? void 0 : _e.data) || [];
543
- const isExistingPartner = !!((_f = user === null || user === void 0 ? void 0 : user.impactConnection) === null || _f === void 0 ? void 0 : _f.publisher);
516
+ const countries = domContextHooks_module.useMemo(() => {
517
+ var _a;
518
+ const data = (_a = countriesData === null || countriesData === void 0 ? void 0 : countriesData.impactPayoutCountries) === null || _a === void 0 ? void 0 : _a.data;
519
+ if (!data)
520
+ return [];
521
+ return [...data].sort((a, b) => {
522
+ if (a.countryCode === "US")
523
+ return -1;
524
+ if (b.countryCode === "US")
525
+ return 1;
526
+ return a.displayName.localeCompare(b.displayName);
527
+ });
528
+ }, [countriesData]);
529
+ const isExistingPartner = !!((_e = user === null || user === void 0 ? void 0 : user.impactConnection) === null || _e === void 0 ? void 0 : _e.publisher);
544
530
  const _currencies = domContextHooks_module.useMemo(() => {
545
531
  var _a, _b, _c;
546
532
  // if isExistingPartner, grab all currencies since select is disabled anyways
@@ -563,7 +549,7 @@ function usePartnerInfoModal(props) {
563
549
  const currencies = domContextHooks_module.useMemo(() => [..._currencies].sort((a, b) => a.displayName.localeCompare(b.displayName)), [_currencies]);
564
550
  const [countrySearch, setCountrySearch] = domContextHooks_module.useState("");
565
551
  const [currencySearch, setCurrencySearch] = domContextHooks_module.useState("");
566
- const [filteredCountries, setFilteredCountries] = domContextHooks_module.useState(((_g = countriesData === null || countriesData === void 0 ? void 0 : countriesData.impactPayoutCountries) === null || _g === void 0 ? void 0 : _g.data) || []);
552
+ const [filteredCountries, setFilteredCountries] = domContextHooks_module.useState(countries || []);
567
553
  const [filteredCurrencies, setFilteredCurrencies] = domContextHooks_module.useState(currencies || []);
568
554
  const [error, setError] = domContextHooks_module.useState("");
569
555
  const [success, setSuccess] = domContextHooks_module.useState(false);
@@ -666,7 +652,6 @@ function usePartnerInfoModal(props) {
666
652
  setError(props.networkErrorText);
667
653
  }
668
654
  }
669
- console.log(impactConnection, "impactConnection in partner modal");
670
655
  const showModal = !success &&
671
656
  !userLoading &&
672
657
  (impactConnection === null || impactConnection === void 0 ? void 0 : impactConnection.connectionStatus) === "NOT_STARTED";