@saasquatch/mint-components 2.2.0-2 → 2.2.0-4

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 (63) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/mint-components.cjs.js +1 -1
  3. package/dist/cjs/sqm-big-stat_46.cjs.entry.js +10 -0
  4. package/dist/cjs/sqm-email-verification_2.cjs.entry.js +37 -12
  5. package/dist/cjs/{sqm-partner-info-modal-view-431ff976.js → sqm-partner-info-modal-view-2a3438e5.js} +7 -1
  6. package/dist/cjs/sqm-stencilbook.cjs.entry.js +17 -4
  7. package/dist/collection/components/sqm-partner-info-modal/PartnerInfoModal.stories.js +11 -0
  8. package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal-view.js +7 -1
  9. package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal.js +30 -2
  10. package/dist/collection/components/sqm-widget-verification/sqm-email-verification/useEmailVerification.js +29 -11
  11. package/dist/collection/components/sqm-widget-verification/useWidgetVerification.js +11 -1
  12. package/dist/esm/{keys-d7c5c851.js → keys-1054056a.js} +1 -1
  13. package/dist/esm/loader.js +1 -1
  14. package/dist/esm/mint-components.js +1 -1
  15. package/dist/esm/sqm-banking-info-form_10.entry.js +1 -1
  16. package/dist/esm/sqm-big-stat_46.entry.js +11 -1
  17. package/dist/esm/sqm-code-verification.entry.js +1 -1
  18. package/dist/esm/sqm-email-verification_2.entry.js +39 -14
  19. package/dist/esm/{sqm-partner-info-modal-view-b3c33bc3.js → sqm-partner-info-modal-view-bd8ff1c1.js} +7 -1
  20. package/dist/esm/sqm-stencilbook.entry.js +17 -4
  21. package/dist/esm/sqm-widget-verification-controller.entry.js +1 -1
  22. package/dist/esm-es5/{keys-d7c5c851.js → keys-1054056a.js} +1 -1
  23. package/dist/esm-es5/loader.js +1 -1
  24. package/dist/esm-es5/mint-components.js +1 -1
  25. package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
  26. package/dist/esm-es5/sqm-big-stat_46.entry.js +1 -1
  27. package/dist/esm-es5/sqm-code-verification.entry.js +1 -1
  28. package/dist/esm-es5/sqm-email-verification_2.entry.js +1 -1
  29. package/dist/esm-es5/sqm-partner-info-modal-view-bd8ff1c1.js +1 -0
  30. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  31. package/dist/esm-es5/sqm-widget-verification-controller.entry.js +1 -1
  32. package/dist/mint-components/mint-components.esm.js +1 -1
  33. package/dist/mint-components/{p-fe944f94.system.entry.js → p-121119ac.system.entry.js} +1 -1
  34. package/dist/mint-components/{p-63102c04.entry.js → p-155963e0.entry.js} +7 -7
  35. package/dist/mint-components/p-1c413a06.system.js +1 -1
  36. package/dist/mint-components/{p-e83d08d7.system.entry.js → p-1d49d43e.system.entry.js} +1 -1
  37. package/dist/mint-components/p-321f334a.js +1 -0
  38. package/dist/mint-components/p-39d9a60a.system.entry.js +1 -0
  39. package/dist/mint-components/p-43107d85.system.js +1 -0
  40. package/dist/mint-components/p-4691e9d5.system.js +1 -0
  41. package/dist/mint-components/{p-1bff74c0.js → p-4f9dc974.js} +1 -1
  42. package/dist/mint-components/{p-440d3788.entry.js → p-608de854.entry.js} +1 -1
  43. package/dist/mint-components/{p-ecdbe09b.system.entry.js → p-747b3040.system.entry.js} +1 -1
  44. package/dist/mint-components/p-78241a3a.entry.js +9 -0
  45. package/dist/mint-components/{p-6d15ce09.system.entry.js → p-81e622bd.system.entry.js} +1 -1
  46. package/dist/mint-components/{p-d43c728e.entry.js → p-8e66e608.entry.js} +2 -2
  47. package/dist/mint-components/{p-70a90ad8.system.entry.js → p-c0cf8d32.system.entry.js} +1 -1
  48. package/dist/mint-components/{p-a67f2ccf.entry.js → p-c945c366.entry.js} +1 -1
  49. package/dist/mint-components/{p-36b91873.entry.js → p-fe5a6bbe.entry.js} +2 -2
  50. package/dist/types/components/sqm-partner-info-modal/PartnerInfoModal.stories.d.ts +2 -0
  51. package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal-view.d.ts +1 -0
  52. package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal.d.ts +6 -0
  53. package/dist/types/components.d.ts +10 -0
  54. package/docs/docs.docx +0 -0
  55. package/docs/raisins.json +1 -1
  56. package/grapesjs/grapesjs.js +1 -1
  57. package/package.json +1 -1
  58. package/dist/esm-es5/sqm-partner-info-modal-view-b3c33bc3.js +0 -1
  59. package/dist/mint-components/p-16416781.system.entry.js +0 -1
  60. package/dist/mint-components/p-1f76371b.entry.js +0 -9
  61. package/dist/mint-components/p-4c47beb0.system.js +0 -1
  62. package/dist/mint-components/p-837c4cf8.js +0 -1
  63. package/dist/mint-components/p-987a54e2.system.js +0 -1
@@ -39,7 +39,7 @@ const sqmUserInfoFormView = require('./sqm-user-info-form-view-f1127a60.js');
39
39
  const utils = require('./utils-a8e0bd9b.js');
40
40
  const sqmLeadInputFieldView = require('./sqm-lead-input-field-view-818d9e9a.js');
41
41
  require('./data-6b5095f8.js');
42
- const sqmPartnerInfoModalView = require('./sqm-partner-info-modal-view-431ff976.js');
42
+ const sqmPartnerInfoModalView = require('./sqm-partner-info-modal-view-2a3438e5.js');
43
43
 
44
44
  /**
45
45
  * lodash (Custom Build) <https://lodash.com/>
@@ -10729,7 +10729,7 @@ const column = "@author:noah\n@owner:noah\nFeature: Referral Table User Column\n
10729
10729
 
10730
10730
  const date = "@author:noah\n@owner:noah\nFeature: Referral Table Date Column\n\n Shows the date of each referral\n\n Background:\n Given the date column is included in the referral table\n\n @motivating\n @ui\n Scenario Outline: The title of the date column is configurable\n Given the \"column-title\" prop is set to <value>\n Then the date column is shown with <columTitle>\n Examples:\n | value | columnTitle |\n | | Date Converted |\n | My column title | My column title |\n\n @motivating\n Scenario Outline: A configurable date associated with the referral is shown for each referral\n Given the \"date-shown\" prop is set to <dateType>\n And referrals exist\n Then for each referral the <referralDate> is shown in the table\n And the date is localized to the users locale\n Examples:\n | dateType | referralDate |\n | dateReferralStarted | date referral started |\n | dateReferralPaid | date referral paid |\n | dateReferralEnded | date referral ended |\n | dateModerated | date moderated |\n | dateUserModified | date user modified |\n | dateConverted | date converted |\n | dateModified | date modified |\n | | date converted |";
10731
10731
 
10732
- const rewards = "@author:noah @owner:noah\nFeature: Referral Table Reward Column\n Shows the reward associated with each referral\n\n Background: \n Given the status column is included in the referral table\n And at least one referral exists\n\n\n\n @motivating @ui\n Scenario Outline: The referral reward and its status are shown for each referral\n Then for each referral reward there exists a reward cell\n And the reward type and value is displayed in the cell\n And the status of each reward is displayed as a pill in the cell\n And rewards of <status> have a <pillColour> pill with the text <statusText>\n\n Examples: \n | status | pillColour | statusText |\n | Available | success | Available |\n | Pending | warning | Pending |\n | Pending Fraud Review | warning | Pending |\n | Pending Tax Review | warning | Pending |\n | Pending New Tax Form | warning | Pending |\n | Pending Tax Submission | warning | Pending |\n | Pending Partner Creation | warning | Pending |\n | Cancelled | danger | Cancelled |\n | Payout Overdue | danger | Payout Failed |\n | Payout Reversed | danger | Payout Cancelled |\n | Expired | danger | Expired |\n | Denied | danger | Denied |\n | Redeemed | primary | Redeemed |\n | Payout Transferred | primary | Payout Approved |\n | Payout Not Yet Due | primary | Payout Approved |\n | Payout Processing | primary | Payment Processing |\n\n @motivating\n Scenario: The pending period of a referral reward is shown inside the pill if scheduled\n Given a reward that is pending\n And the reward has a scheduled date in the future\n Then the status pill of the reward will contain the text \"Pending for <relativeTime>\"\n And the date is localized to the user's locale\n\n Examples: \n | relativeTime |\n | 2 days |\n | 1 week |\n | 3 months |\n\n @motivating\n Scenario: The expiry date of a reward is shown in a secondary pill\n Given a reward that is available\n And the reward has a set expiry date\n Then an additional info pill will appear next to the status pill with the text \"Expiring in <relativeTime>\"\n And the date is localized to the user's locale\n\n Examples: \n | relativeTime |\n | 2 days |\n | 1 week |\n\n @motivating @ui\n Scenario Outline: Expanding the reward cell shows specific detailed status messages\n When a reward cell is clicked\n Then it expands to show the detail view\n And if the reward status is <status>\n Then the detail text displays <detailMessage>\n\n Examples: Payout States\n | status | detailMessage |\n | Payout Approved | Processing until {date}. Payout is then scheduled based on your settings. |\n | Payout Failed | Payout failed due to a fulfillment issue and is currently being retried. |\n | Payout Cancelled | If you think this is a mistake, contact our Support team. |\n | Processing | Processing until {date}. Payout is then scheduled based on your settings. |\n\n Examples: Tax Compliance States\n | status | detailMessage |\n | Pending Tax Review | Awaiting tax form review |\n | Pending New Tax Form | Invalid tax form. Submit a new form to receive your rewards. |\n | Pending Tax Submission | Submit your tax documents to receive your rewards |\n | Pending Partner Creation | Complete your tax and cash payout setup to receive your rewards |\n\n Examples: Standard States\n | status | detailMessage |\n | Available | Reward expiring on |\n | Cancelled | Reward cancelled on |\n | Pending | Available on |\n | Pending Review | Pending since |\n | Denied | Denied on |\n | Expired | Reward expired on |\n | Redeemed | Redeemed |\n\n @motivating\n Scenario: Fuel Tank codes are displayed in the expanded view\n Given a reward has a Fuel Tank code\n When the reward cell is clicked\n Then the expanded details display the text \"Your code is\"\n And the code <fuelTankCode> is displayed in bold\n\n @motivating\n Scenario: Fraud denial help text is displayed\n Given a reward has been denied due to fraud\n And the component has \"deniedHelpText\" configured\n When the reward cell is clicked\n Then the expanded details display the denied help text next to the denial date\n\n @minutia\n Scenario: Payout-related reward statuses are determined by the state of the Paid Funds Transfer\n Given a reward exists\n And the reward has a connected Paid Funds Transfer (PFT)\n When the PFT is in <pftState>\n Then the reward's status is <status>\n And the status text displays <text>\n And the status is displayed in a <pillColour> pill\n\n Examples:\n | pftState | status | text | pillColour |\n | transfer date is in the future | PROCESSING | Payment Processing | primary |\n | successfully transferred to payment provider | PAYOUT_TRANSFERRED | Payout Approved | primary |\n | approved but payout scheduled date not yet arrived | PAYOUT_NOT_YET_DUE | Payout Approved | primary |\n | failed due to fulfillment issue and retrying | PAYOUT_OVERDUE | Payout Failed | danger |\n | reversed or cancelled after being processed | PAYOUT_REVERSED | Payout Cancelled | danger |\n";
10732
+ const rewards = "@author:noah @owner:noah\nFeature: Referral Table Reward Column\n Shows the reward associated with each referral\n\n Background:\n Given the status column is included in the referral table\n And at least one referral exists\n\n @motivating\n Scenario Outline: State precedence ladder\n Given a reward, its referral's fraud state, and the user's tax connection\n Then <rule> is produced\n And the <resultingState>, <resultingBadgeText>, and <resultingDescriptionBody> is determined in the following <order>:\n\n Examples:\n | order | rule | resultingState | resultingBadgeText | resultingDescriptionBody |\n | 1 | referral.fraudData.moderationStatus is \"DENIED\" | DENIED | Denied | Denied on Jan 1, 2026. Contact support. |\n | 2 | referral.fraudData.moderationStatus is \"PENDING\" | PENDING_REVIEW | Pending | Pending since Jan 1, 2026 |\n | 3 | reward.rewardedCash is true AND impactConnection is NOT connected | PENDING_PARTNER_CREATION | Pending | Complete your tax and cash payout setup to receive your rewards |\n | 4 | reward.rewardedCash is true AND impactConnection is connected AND publisher.withdrawalSettings is missing | PENDING_PARTNER_CREATION | Pending | Complete your tax and cash payout setup to receive your rewards |\n | 5 | partnerFundsTransfer.status is \"REVERSED\" | PAYOUT_CANCELLED | Payout Cancelled | If you think this is a mistake, contact our Support team. |\n | 6 | partnerFundsTransfer.status is \"OVERDUE\" | PAYOUT_FAILED | Payout Failed | Payout failed due to a fulfillment issue and is currently being retried. |\n | 7 | partnerFundsTransfer.dateScheduled is in the future | PROCESSING | Payment Processing | Processing until Jan 1, 2026. Payout is then scheduled based on your settings. |\n | 8 | partnerFundsTransfer.status is \"TRANSFERRED\" / \"NOT_YET_DUE\", or dateScheduled has passed without REVERSED/OVERDUE | PAYOUT_APPROVED | Payout Approved | Processing until Jan 1, 2026. Payout is then scheduled based on your settings. |\n | 9 | reward.pendingReasons includes \"US_TAX\" AND impactConnection.taxHandlingEnabled is false | PENDING | Pending | Available on Jan 1, 2026 (if dateScheduledFor set; else no body line) |\n | 10 | reward.pendingReasons includes \"US_TAX\" AND impactConnection.connected is false | PENDING_PARTNER_CREATION | Pending | Complete your tax and cash payout setup to receive your rewards |\n | 11 | reward.pendingReasons includes \"US_TAX\" AND publisher.requiredTaxDocumentType is set AND publisher.currentTaxDocument is missing | PENDING_TAX_SUBMISSION | Pending | Submit your tax documents to receive your rewards |\n | 12 | reward.pendingReasons includes \"US_TAX\" AND publisher.currentTaxDocument.status is \"INACTIVE\" / \"INVALID_W9_ELECTRONIC_DOCUMENT\" / \"INVALID_W9_ELECTRONIC_DOCUMENT_CHECK_INTERNAL\" | PENDING_NEW_TAX_FORM | Pending | Invalid tax form. Submit a new form to receive your rewards. |\n | 13 | reward.pendingReasons includes \"US_TAX\" AND publisher.currentTaxDocument.status is \"NOT_VERIFIED\" | PENDING_TAX_REVIEW | Pending | Awaiting tax form review |\n | 14 | reward.pendingReasons includes \"US_TAX\" AND publisher.currentTaxDocument.status is \"ACTIVE\" AND publisher.withdrawalSettings missing | PENDING_PARTNER_CREATION | Pending | Complete your tax and cash payout setup to receive your rewards |\n | 15 | reward.pendingReasons includes \"MISSING_PAYOUT_CONFIGURATION\" | PENDING_PARTNER_CREATION | Pending | Complete your tax and cash payout setup to receive your rewards |\n | 16 | statuses includes \"REDEEMED\" | REDEEMED | Redeemed | (no state-specific body line) |\n | 17 | statuses includes \"CANCELLED\" | CANCELLED | Cancelled | Reward cancelled on Jan 1, 2026 |\n | 18 | statuses includes \"EXPIRED\" | EXPIRED | Expired | Reward expired on Jan 1, 2026 |\n | 19 | statuses includes \"PENDING\" | PENDING | Pending (or \"Pending for {date}\" overlay if dateScheduledFor set) | Available on Jan 1, 2026 (if dateScheduledFor set; else no body line) |\n | 20 | statuses includes \"AVAILABLE\" | AVAILABLE | Available (plus info pill \"{expiringText} {relative}\" if dateExpires set) | Reward expiring on Jan 1, 2026 |\n\n @motivating @ui\n Scenario Outline: The referral reward and its status are shown for each referral\n Then for each referral reward there exists a reward cell\n And the reward type and value is displayed in the cell\n And the status of each reward is displayed as a pill in the cell\n And rewards of <status> have a <pillColour> pill with the text <statusText>\n\n Examples:\n | status | pillColour | statusText |\n | Available | success | Available |\n | Pending | warning | Pending |\n | Pending Fraud Review | warning | Pending |\n | Pending Tax Review | warning | Pending |\n | Pending New Tax Form | warning | Pending |\n | Pending Tax Submission | warning | Pending |\n | Pending Partner Creation | warning | Pending |\n | Cancelled | danger | Cancelled |\n | Payout Overdue | danger | Payout Failed |\n | Payout Reversed | danger | Payout Cancelled |\n | Expired | danger | Expired |\n | Denied | danger | Denied |\n | Redeemed | primary | Redeemed |\n | Payout Transferred | primary | Payout Approved |\n | Payout Not Yet Due | primary | Payout Approved |\n | Payout Processing | primary | Payment Processing |\n\n @motivating\n Scenario: The pending period of a referral reward is shown inside the pill if scheduled\n Given a reward that is pending\n And the reward has a scheduled date in the future\n Then the status pill of the reward will contain the text \"Pending for <relativeTime>\"\n And the date is localized to the user's locale\n\n Examples:\n | relativeTime |\n | 2 days |\n | 1 week |\n | 3 months |\n\n @motivating\n Scenario: The expiry date of a reward is shown in a secondary pill\n Given a reward that is available\n And the reward has a set expiry date\n Then an additional info pill will appear next to the status pill with the text \"Expiring in <relativeTime>\"\n And the date is localized to the user's locale\n\n Examples:\n | relativeTime |\n | 2 days |\n | 1 week |\n\n @motivating @ui\n Scenario Outline: Expanding the reward cell shows specific detailed status messages\n When a reward cell is clicked\n Then it expands to show the detail view\n And if the reward status is <status>\n Then the detail text displays <detailMessage>\n\n Examples: Payout States\n | status | detailMessage |\n | Payout Approved | Processing until {date}. Payout is then scheduled based on your settings. |\n | Payout Failed | Payout failed due to a fulfillment issue and is currently being retried. |\n | Payout Cancelled | If you think this is a mistake, contact our Support team. |\n | Processing | Processing until {date}. Payout is then scheduled based on your settings. |\n\n Examples: Tax Compliance States\n | status | detailMessage |\n | Pending Tax Review | Awaiting tax form review |\n | Pending New Tax Form | Invalid tax form. Submit a new form to receive your rewards. |\n | Pending Tax Submission | Submit your tax documents to receive your rewards |\n | Pending Partner Creation | Complete your tax and cash payout setup to receive your rewards |\n\n Examples: Standard States\n | status | detailMessage |\n | Available | Reward expiring on |\n | Cancelled | Reward cancelled on |\n | Pending | Available on |\n | Pending Review | Pending since |\n | Denied | Denied on |\n | Expired | Reward expired on |\n | Redeemed | Redeemed |\n\n @motivating\n Scenario: Fuel Tank codes are displayed in the expanded view\n Given a reward has a Fuel Tank code\n When the reward cell is clicked\n Then the expanded details display the text \"Your code is\"\n And the code <fuelTankCode> is displayed in bold\n\n @motivating\n Scenario: Fraud denial help text is displayed\n Given a reward has been denied due to fraud\n And the component has \"deniedHelpText\" configured\n When the reward cell is clicked\n Then the expanded details display the denied help text next to the denial date\n\n @minutia\n Scenario: Payout-related reward statuses are determined by the state of the Paid Funds Transfer\n Given a reward exists\n And the reward has a connected Paid Funds Transfer (PFT)\n When the PFT is in <pftState>\n Then the reward's status is <status>\n And the status text displays <text>\n And the status is displayed in a <pillColour> pill\n\n Examples:\n | pftState | status | text | pillColour |\n | transfer date is in the future | PROCESSING | Payment Processing | primary |\n | successfully transferred to payment provider | PAYOUT_TRANSFERRED | Payout Approved | primary |\n | approved but payout scheduled date not yet arrived | PAYOUT_NOT_YET_DUE | Payout Approved | primary |\n | failed due to fulfillment issue and retrying | PAYOUT_OVERDUE | Payout Failed | danger |\n | reversed or cancelled after being processed | PAYOUT_REVERSED | Payout Cancelled | danger |\n";
10733
10733
 
10734
10734
  const status = "@author:noah\n@owner:noah\nFeature: Referral Table Status Column\n\n Shows the status of each referral\n\n Background:\n Given the status column is included in the referral table\n\n @motivating\n @ui\n Scenario: The title of the date column is configurable\n Given the \"column-title\" prop is set to \"My column title\"\n Then the date column is shown with \"My column title\"\n\n @motivating\n Scenario: The status column's fraudStatus maps to the fraud status of the referral\n Given at least one referral\n Then the referral cell fraud status is set to `moderationStatus` of the referral\n\n @motivating\n Scenario Outline: The status column displays the status of each referral\n Given referrals exist\n Then the status of each referral is displayed\n And the status <status> is displayed as text from <statusTextProp> in a <pillColour> pill\n\n Examples:\n | status | statusTextProp | pillColour |\n | In Progress | inProgressStatusText | Orange |\n | Converted | convertedStatusText | Green |\n | Pending | pendingReviewStatusText | Orange |\n | Denied | deniedStatusText | Red |\n";
10735
10735
 
@@ -12511,7 +12511,7 @@ const scenario2 = "@author:derek\n@owner:derek\nFeature: Reward Table reward Col
12511
12511
 
12512
12512
  const scenario4 = "@author:derek @owner:derek\nFeature: Reward Table Source Column\n Shows the source of each reward\n\n @motivating @ui\n Scenario Outline: The title of the source column is configurable\n Given the \"column-title\" prop is set to <value>\n Then the source column is shown with <columnTitle>\n\n Examples:\n | value | columnTitle |\n | Source | |\n | My column title | My column title |\n\n @motivating @ui\n Scenario: The source column displays manual if the reward is caused by a manual action\n Given a user with a \"MANUAL\" reward\n When they view the rewards table\n Then the source of their reward is displayed as \"Manual\"\n\n @motivating @ui\n Scenario: The source column displays the program name if the reward is caused automatically by a program\n Given a user with a \"AUTOMATED\" program reward\n And the program has name \"Loyalty Program\"\n When they view the rewards table\n Then the source of their reward is displayed as \"Loyalty Program\"\n\n @motivating @ui\n Scenario Outline: The source column displays customizable reward exchange text with amount if the reward is caused by reward exchange\n Given the \"reward-exchange-text\" prop is <propValue>\n And a user with a \"MANUAL\" reward\n But it was created by a reward exchange\n Then they view the rewards table\n Then the source displays <exchangeText>\n And under it displays the following\n | prettyRedeemedCredit → prettyValue |\n\n Examples:\n | propValue | exchangeText |\n | | Reward Exchange |\n | Exchanged | Exchanged |\n\n @motivating @ui\n Scenario Outline: The source column displays customizable referral information if the reward is from a referral\n Given the \"reward-source-text\" prop is <propValue>\n And a user with a referral reward\n And that reward has <rewardSource>\n When they view the rewards table\n Then then source displays <referralText>\n And under it displays the full name of the <referralUser>\n\n Examples:\n | propValue | rewardSource | referralText | referralUser |\n | | REFERRED | Referred by | referrer user |\n | | FRIEND_SIGNUP | Referral to | referred user |\n | {rewardSource, select, FRIEND_SIGNUP {You Referred} REFERRED {Referred you} other {}} | REFERRED | Referred you | referrer user |\n | {rewardSource, select, FRIEND_SIGNUP {You Referred} REFERRED {Referred you} other {}} | FRIEND_SIGNUP | You Referred | referred user |\n\n @motivating @ui\n Scenario Outline: The source column displays the existing name for a referral if either the first name or last name does not exist\n Given a user with a referral reward\n And referral user exists\n And referral user has <name>\n But referral user has no <otherName>\n When they view the rewards table\n Then referral user's name is displayed as <name>\n\n Examples:\n | name | otherName |\n | first.name | last.name |\n | last.name | first.name |\n\n @motivating @ui\n Scenario Outline: The source column displays referral as \"Your Friend\" if the referral user has no names\n Given a user with a referral reward\n And that reward has <rewardSource>\n And the <referralUser> has no first name\n And the <referralUser> has no last name\n When they view the rewards table\n Then then source displays <sourceText>\n And under it displays \"Your Friend\"\n\n Examples:\n | rewardSource | referralUser | sourceText |\n | FRIEND_SIGNUP | referrer | Referral to |\n | REFERRED | referred user | Referred by |\n\n @motivating @ui\n Scenario Outline: The source column displays referral as \"Deleted User\" if the referral user is deleted in the system\n Given a user with a referral reward\n And that reward has <rewardSource>\n But <referral> user was deleted\n When they view the rewards table\n Then the source displays <sourceText>\n And under it displays \"Deleted User\"\n\n Examples:\n | rewardSource | referral | sourceText |\n | \"FRIEND_SIGNUP\" | referrer | Referral to |\n | \"REFERRED\" | referred | Referred by |\n\n @motivating @ui\n Scenario Outline: The source column displays referral as \"Deleted referral\" if the referral user is deleted in the system\n Given a user with a referral reward\n And that reward has <rewardSource>\n But <referral> user was deleted\n When they view the rewards table\n Then the source displays <sourceText>\n And under it displays \"Deleted referral\"\n\n Examples:\n | rewardSource | referral | sourceText |\n | \"FRIEND_SIGNUP\" | referrer | Referral to |\n | \"REFERRED\" | referred | Referred by |\n\n @minutia @ui\n Scenario Outline: Name fallbacks for referral users without names are customizable\n Given <prop> with <value>\n And a user with a referral reward\n But the referral user <hadAction>\n When they view the rewards table\n Then the source displays <value> as the referral user\n\n Examples:\n | prop | value | hadAction |\n | deleted-user | Former Customer | was deleted |\n | anonymous-user | Nameless User | had first and last name deleted |\n\n @motivating\n Scenario Outline: Source text can be customized\n Given the \"reward-source-text\" prop is \"{rewardSource, select, MANUAL {Support} AUTOMATED {Loyalty Program} other {}}\"\n And a user with a <rewardSource> reward\n When they view the rewards table\n Then the source is <sourceText>\n\n Examples:\n | rewardSource | sourceText |\n | MANUAL | Support |\n | AUTOMATED | Loyalty Program |\n";
12513
12513
 
12514
- const scenario3 = "@author:derek @owner:derek\nFeature: Reward Table Status Column\n Shows the status of each reward\n\n Background:\n Given the status column is included in the reward table\n\n @motivating @ui\n Scenario Outline: The title of the status column is configurable\n Given the \"column-title\" prop is set to <value>\n Then the status column is shown with <columnTitle>\n\n Examples:\n | value | columnTitle |\n | Status | |\n | My column title | My column title |\n\n @motivating @ui\n Scenario Outline: The status column displays the status of each reward\n Given a user\n And they have a <status> reward\n When they view the reward table\n Then the status of their reward is displayed in <pillColour> pill with <text>\n\n Examples:\n | status | text | pillColour |\n | AVAILABLE | Available | success |\n | CANCELLED | Cancelled | danger |\n | PENDING | Pending | warning |\n | EXPIRED | Expired | danger |\n | REDEEMED | Redeemed | primary |\n | PENDING_REVIEW | Pending | warning |\n | PAYOUT_TRANSFERRED | Payout Approved | primary |\n | PAYOUT_NOT_YET_DUE | Payout Approved | primary |\n | PAYOUT_OVERDUE | Payout Failed | danger |\n | PAYOUT_REVERSED | Payout Cancelled | danger |\n | PROCESSING | Processing | warning |\n | PENDING_TAX_REVIEW | Pending | warning |\n | PENDING_NEW_TAX_FORM | Pending | warning |\n | PENDING_TAX_SUBMISSION | Pending | warning |\n | PENDING_PARTNER_CREATION | Pending | warning |\n | DENIED | Denied | danger |\n\n @motivating\n Scenario Outline: Reward status related information is displayed under status pills\n Given a user\n And they have a <reward>\n And their program is\n When they view the reward table\n Then they see their reward\n And under the pill is <text>\n And the date is localized to the users locale\n\n Examples: Standard Rewards\n | reward | text |\n | available reward with an expiry date | Expires <localized date> |\n | redeemed reward | <localized date> |\n | expired reward | <localized date> |\n | cancelled reward | <localized date> |\n | pending reward with a scheduled date | Until <localized date> |\n\n Examples: Tax & Payout Rewards\n | reward | text |\n | pending reward due to W9 | W-9 required |\n | pending reward due to fulfillment error | Fulfillment error |\n | reward pending review of referral | Awaiting review |\n | pending reward due to no connected Impact partner | Complete your tax and cash payout setup to receive your rewards. |\n | pending reward due to an invalid tax document | Invalid tax form. Submit a new form to receive your rewards. |\n | pending reward due to user required to submit a tax document | Submit your tax documents to receive your rewards. |\n | pending reward due to tax document being in review | Awaiting tax form review. |\n | reward whose payout is processing | Processing until <localized date>. Payout is then scheduled based on your settings. |\n | reward whose payout failed | Payout failed due to a fulfillment issue and is currently being retried. |\n | reward whose payout was approved | Payout approved and scheduled for payment based on your settings. |\n | reward whose payout was cancelled | If you think this is a mistake, contact our Support team. |\n | cancelled reward from denied referral | Detected self-referral |\n\n @minutia\n Scenario Outline: Tax-related reward statuses are based on the user's Impact tax connection\n Given a user\n And they are in a program that has Impact tax handling enabled\n And they have at least one pending reward\n And the reward's pending reasons include \"MISSING_PAYOUT_CONFIGURATION\"\n Then the status description will be\n \"\"\"\n Complete your tax and cash payout setup to receive your rewards.\n \"\"\"\n\n @motivating\n Scenario Outline: Statuses can be customized via ICU format\n Given the \"status-text\" prop is \"{status, select, AVAILABLE {Redeem me!} CANCELLED {Unavailable} PENDING {Coming soon!} EXPIRED {Past due} REDEEMED {Spent} PENDING_REVIEW {Pending Review!} PAYOUT_SENT {Payout Sent!} PAYOUT_FAILED {Payout Failed!} PENDING_TAX_REVIEW {Pending Tax Review!} PENDING_NEW_TAX_FORM {Pending new tax form!} PENDING_TAX_SUBMISSION {Pending tax submission!} PENDING_PARTNER_CREATION {Pending partner creation!} DENIED {Unlucky!}}\"\n And a user\n And they have a <status> reward\n When they view the reward table\n Then the status of their reward is displayed in <pillColour> pill with <text>\n\n Examples:\n | status | text | pillColour |\n | AVAILABLE | Redeem me! | success |\n | CANCELLED | Unavailable | danger |\n | PENDING | Coming soon! | warning |\n | EXPIRED | Past due | danger |\n | REDEEMED | Spent | primary |\n | PENDING_REVIEW | Pending Review! | warning |\n | PAYOUT_TRANSFERRED | Payout Approved! | primary |\n | PAYOUT_NOT_YET_DUE | Payout Approved! | primary |\n | PAYOUT_OVERDUE | Payout Failed! | danger |\n | PAYOUT_REVERSED | Payout Cancelled! | danger |\n | DENIED | Unlucky! | danger |\n\n @minutia @ui\n Scenario Outline: Expiry status date text can be configured\n Given the \"expiry-text\" prop has <value>\n And a user with an available reward with an expiry date\n When they view the reward table\n Then they see <text> under the Available Status pill\n\n Examples:\n | value | text |\n | Expires | Expires <localized date> |\n | Redeem before | Redeem before <localized date> |\n\n @motivating\n Scenario: Payout-related reward statuses are determined by the state of the Paid Funds Transfer\n Given a user has a reward with a connected Paid Funds Transfer (PFT)\n When the PFT is in <pftState>\n Then the reward's status is <status>\n And the status is displayed in a <pillColour> pill with <text>\n And under the pill is <description>\n\n Examples:\n | pftState | status | text | pillColour | description |\n | transfer date is in the future | PROCESSING | Processing | warning | Processing until <localized date>. Payout is then scheduled based on your settings. |\n | successfully transferred to payment provider | PAYOUT_TRANSFERRED | Payout Approved | primary | Payout approved and scheduled for payment based on your settings. |\n | approved but payout scheduled date not yet arrived | PAYOUT_NOT_YET_DUE | Payout Approved | primary | Payout approved and scheduled for payment based on your settings. |\n | failed due to fulfillment issue and retrying | PAYOUT_OVERDUE | Payout Failed | danger | Payout failed due to a fulfillment issue and is currently being retried. |\n | reversed or cancelled after being processed | PAYOUT_REVERSED | Payout Cancelled | danger | If you think this is a mistake, contact our Support team. |\n";
12514
+ const scenario3 = "@author:derek @owner:derek\nFeature: Reward Table Status Column\n Shows the status of each reward\n\n Background:\n Given the status column is included in the reward table\n\n @motivating @ui\n Scenario Outline: The title of the status column is configurable\n Given the \"column-title\" prop is set to <value>\n Then the status column is shown with <columnTitle>\n\n Examples:\n | value | columnTitle |\n | Status | |\n | My column title | My column title |\n\n @motivating @ui\n Scenario Outline: The status column displays the status of each reward\n Given a user\n And they have a <status> reward\n When they view the reward table\n Then the status of their reward is displayed in <pillColour> pill with <text>\n\n Examples:\n | status | text | pillColour |\n | AVAILABLE | Available | success |\n | CANCELLED | Cancelled | danger |\n | PENDING | Pending | warning |\n | EXPIRED | Expired | danger |\n | REDEEMED | Redeemed | primary |\n | PENDING_REVIEW | Pending | warning |\n | PAYOUT_TRANSFERRED | Payout Approved | primary |\n | PAYOUT_NOT_YET_DUE | Payout Approved | primary |\n | PAYOUT_OVERDUE | Payout Failed | danger |\n | PAYOUT_REVERSED | Payout Cancelled | danger |\n | PROCESSING | Processing | warning |\n | PENDING_TAX_REVIEW | Pending | warning |\n | PENDING_NEW_TAX_FORM | Pending | warning |\n | PENDING_TAX_SUBMISSION | Pending | warning |\n | PENDING_PARTNER_CREATION | Pending | warning |\n | DENIED | Denied | danger |\n\n @motivating\n Scenario Outline: Status precedence ladder\n Given a reward, its referral fraud state, the user's Impact tax connection\n Then <rule> is produced\n And the <resultingStatus>, <resultingBadgeText>, and <resultingDescription> is determined in the following <order>:\n\n Examples:\n | order | rule | resultingStatus | resultingBadgeText | resultingDescription |\n | 1 | referral.fraudData.moderationStatus is \"DENIED\" | DENIED | Denied | Detected self-referral |\n | 2 | referral.fraudData.moderationStatus is \"PENDING\" | PENDING_REVIEW | Pending | Awaiting review |\n | 3 | reward.rewardedCash is true AND impactConnection is NOT connected | PENDING | Pending | Complete your cash payout setup to receive your rewards. |\n | 4 | reward.rewardedCash is true AND impactConnection is connected AND publisher.withdrawalSettings is missing | PENDING | Pending | Complete your cash payout setup to receive your rewards. |\n | 5 | partnerFundsTransfer.status is \"REVERSED\" | PAYOUT_CANCELLED | Payout Cancelled | If you think this is a mistake, contact our Support team. |\n | 6 | partnerFundsTransfer.status is \"OVERDUE\" | PAYOUT_FAILED | Payout Failed | Payout failed due to a fulfillment issue and is currently being retried. |\n | 7 | reward.pendingReasons includes \"MISSING_PAYOUT_CONFIGURATION\" AND publisher.withdrawalSettings is missing | PENDING | Pending | Complete your cash payout setup to receive your rewards. |\n | 8 | partnerFundsTransfer.dateScheduled is in the future | PROCESSING | Payment Processing | Processing until Jan 1, 2026. Payout is then scheduled based on your settings. |\n | 9 | partnerFundsTransfer.status is \"TRANSFERRED\" / \"NOT_YET_DUE\", or dateScheduled has passed without REVERSED/OVERDUE | PAYOUT_APPROVED | Payout Approved | Payout approved and scheduled for payment based on your settings. |\n | 10 | reward.dateCancelled is set | CANCELLED | Cancelled | Jan 1, 2026 |\n | 11 | reward.statuses includes \"EXPIRED\" | EXPIRED | Expired | Jan 1, 2026 |\n | 12 | reward.statuses includes \"PENDING\" | PENDING | Pending | Until Jan 1, 2026 |\n | 13 | statuses includes \"REDEEMED\" | REDEEMED | Redeemed | Jan 1, 2026 |\n | 14 | statuses includes \"AVAILABLE\" | AVAILABLE | Available | Expires Jan 1, 2026 |\n | 15 | statuses includes \"CANCELLED\" | CANCELLED | Cancelled | Jan 1, 2026 |\n# This spec should probably be inserted in to the above spec after rule 9 because it gets invoked when the reward state is pending\n# and does not hit the rules that output pending from above\n\n @motivating\n Scenario Outline: PENDING description precedence ladder\n Given a PENDING reward, its pendingReasons, and the user's Impact tax connection\n Then <rule> is produced\n And the <resultingStatus>, <resultingBadgeText>, and <resultingDescription> is determined in the following order:\n\n Examples:\n | order | rule | resultingStatus | resultingBadgeText | resultingDescription |\n | 1 | pendingReasons includes \"US_TAX\" AND impactConnection.taxHandlingEnabled is false | PENDING | Pending | W-9 required |\n | 2 | pendingReasons includes \"US_TAX\" AND impactConnection is NOT connected | PENDING | Pending | Complete your tax and cash payout setup to receive your rewards. |\n | 3 | pendingReasons includes \"US_TAX\" AND publisher.requiredTaxDocumentType is set AND publisher.currentTaxDocument is missing | PENDING | Pending | Submit your tax documents to receive your rewards. |\n | 4 | pendingReasons includes \"US_TAX\" AND publisher.requiredTaxDocumentType is set AND publisher.currentTaxDocument.status is \"INACTIVE\" | PENDING | Pending | Invalid tax form. Submit a new form to receive your rewards. |\n | 5 | pendingReasons includes \"US_TAX\" AND publisher.requiredTaxDocumentType is set AND publisher.currentTaxDocument.status is \"NOT_VERIFIED\" | PENDING | Pending | Awaiting tax form review. |\n | 6 | pendingReasons includes \"US_TAX\" AND publisher.withdrawalSettings is missing | PENDING | Pending | Complete your tax and cash payout setup to receive your rewards. |\n | 7 | pendingReasons includes \"MISSING_PAYOUT_CONFIGURATION\" | PENDING | Pending | Complete your tax and cash payout setup to receive your rewards. |\n | 8 | reward.rewardedCash is true AND impactConnection is NOT connected (fallback when no pendingReason returned) | PENDING | Pending | Complete your tax and cash payout setup to receive your rewards. |\n | 9 | reward.rewardedCash is true AND impactConnection is connected AND publisher.withdrawalSettings is missing (fallback) | PENDING | Pending | Complete your tax and cash payout setup to receive your rewards. |\n\n @motivating\n Scenario Outline: Reward status related information is displayed under status pills\n Given a user\n And they have a <reward>\n And their program is\n When they view the reward table\n Then they see their reward\n And under the pill is <text>\n And the date is localized to the users locale\n\n Examples: Standard Rewards\n | reward | text |\n | available reward with an expiry date | Expires <localized date> |\n | redeemed reward | <localized date> |\n | expired reward | <localized date> |\n | cancelled reward | <localized date> |\n | pending reward with a scheduled date | Until <localized date> |\n\n Examples: Tax & Payout Rewards\n | reward | text |\n | pending reward due to W9 | W-9 required |\n | pending reward due to fulfillment error | Fulfillment error |\n | reward pending review of referral | Awaiting review |\n | pending reward due to no connected Impact partner | Complete your tax and cash payout setup to receive your rewards. |\n | pending reward due to an invalid tax document | Invalid tax form. Submit a new form to receive your rewards. |\n | pending reward due to user required to submit a tax document | Submit your tax documents to receive your rewards. |\n | pending reward due to tax document being in review | Awaiting tax form review. |\n | reward whose payout is processing | Processing until <localized date>. Payout is then scheduled based on your settings. |\n | reward whose payout failed | Payout failed due to a fulfillment issue and is currently being retried. |\n | reward whose payout was approved | Payout approved and scheduled for payment based on your settings. |\n | reward whose payout was cancelled | If you think this is a mistake, contact our Support team. |\n | cancelled reward from denied referral | Detected self-referral |\n\n @minutia\n Scenario Outline: Tax-related reward statuses are based on the user's Impact tax connection\n Given a user\n And they are in a program that has Impact tax handling enabled\n And they have at least one pending reward\n And the reward's pending reasons include \"MISSING_PAYOUT_CONFIGURATION\"\n Then the status description will be\n \"\"\"\n Complete your tax and cash payout setup to receive your rewards.\n \"\"\"\n\n @motivating\n Scenario Outline: Statuses can be customized via ICU format\n Given the \"status-text\" prop is \"{status, select, AVAILABLE {Redeem me!} CANCELLED {Unavailable} PENDING {Coming soon!} EXPIRED {Past due} REDEEMED {Spent} PENDING_REVIEW {Pending Review!} PAYOUT_SENT {Payout Sent!} PAYOUT_FAILED {Payout Failed!} PENDING_TAX_REVIEW {Pending Tax Review!} PENDING_NEW_TAX_FORM {Pending new tax form!} PENDING_TAX_SUBMISSION {Pending tax submission!} PENDING_PARTNER_CREATION {Pending partner creation!} DENIED {Unlucky!}}\"\n And a user\n And they have a <status> reward\n When they view the reward table\n Then the status of their reward is displayed in <pillColour> pill with <text>\n\n Examples:\n | status | text | pillColour |\n | AVAILABLE | Redeem me! | success |\n | CANCELLED | Unavailable | danger |\n | PENDING | Coming soon! | warning |\n | EXPIRED | Past due | danger |\n | REDEEMED | Spent | primary |\n | PENDING_REVIEW | Pending Review! | warning |\n | PAYOUT_TRANSFERRED | Payout Approved! | primary |\n | PAYOUT_NOT_YET_DUE | Payout Approved! | primary |\n | PAYOUT_OVERDUE | Payout Failed! | danger |\n | PAYOUT_REVERSED | Payout Cancelled! | danger |\n | DENIED | Unlucky! | danger |\n\n @minutia @ui\n Scenario Outline: Expiry status date text can be configured\n Given the \"expiry-text\" prop has <value>\n And a user with an available reward with an expiry date\n When they view the reward table\n Then they see <text> under the Available Status pill\n\n Examples:\n | value | text |\n | Expires | Expires <localized date> |\n | Redeem before | Redeem before <localized date> |\n\n @motivating\n Scenario: Payout-related reward statuses are determined by the state of the Paid Funds Transfer\n Given a user has a reward with a connected Paid Funds Transfer (PFT)\n When the PFT is in <pftState>\n Then the reward's status is <status>\n And the status is displayed in a <pillColour> pill with <text>\n And under the pill is <description>\n\n Examples:\n | pftState | status | text | pillColour | description |\n | transfer date is in the future | PROCESSING | Processing | warning | Processing until <localized date>. Payout is then scheduled based on your settings. |\n | successfully transferred to payment provider | PAYOUT_TRANSFERRED | Payout Approved | primary | Payout approved and scheduled for payment based on your settings. |\n | approved but payout scheduled date not yet arrived | PAYOUT_NOT_YET_DUE | Payout Approved | primary | Payout approved and scheduled for payment based on your settings. |\n | failed due to fulfillment issue and retrying | PAYOUT_OVERDUE | Payout Failed | danger | Payout failed due to a fulfillment issue and is currently being retried. |\n | reversed or cancelled after being processed | PAYOUT_REVERSED | Payout Cancelled | danger | If you think this is a mistake, contact our Support team. |\n";
12515
12515
 
12516
12516
  const scenario$x = scenario1 + scenario2 + scenario3 + scenario4;
12517
12517
  const RewardsTableCell_stories = {
@@ -18927,6 +18927,7 @@ const defaultText$1 = {
18927
18927
  descriptionNewPartner: "Confirm your country and currency now to get your future rewards faster.",
18928
18928
  descriptionExistingPartner: "We noticed you are already an Impact.com partner, please confirm your information.",
18929
18929
  supportDescriptionExistingPartner: "If this is a mistake, please contact Support or sign up for this referral program with a different email.",
18930
+ supportLink: "Support",
18930
18931
  countryLabel: "Country",
18931
18932
  currencyLabel: "Currency",
18932
18933
  submitButtonLabel: "Submit",
@@ -19051,6 +19052,16 @@ const Closed = () => {
19051
19052
  };
19052
19053
  return index.h(sqmPartnerInfoModalView.PartnerInfoModalView, Object.assign({}, props));
19053
19054
  };
19055
+ const SQMComponentExistingPartner = () => {
19056
+ return (index.h("sqm-partner-info-modal", { "support-link": "Support", "support-description-existing-partner": "If this is a mistake, please contact {supportLink} or sign up for this referral program with a different email.", "allow-banking-collection": "I have read the {termsAndConditionsLink} and allow impact.com to collect my tax and banking information", "terms-and-conditions-label": "terms and conditions", "terms-and-conditions-link": "https://terms.advocate.impact.com/PayoutTermsAndConditions.html", demoData: {
19057
+ states: { open: true, isExistingPartner: true },
19058
+ } }));
19059
+ };
19060
+ const SQMComponentNewPartner = () => {
19061
+ return (index.h("sqm-partner-info-modal", { demoData: {
19062
+ states: { open: true, isExistingPartner: false },
19063
+ } }));
19064
+ };
19054
19065
 
19055
19066
  const PartnerInfoModal = /*#__PURE__*/Object.freeze({
19056
19067
  __proto__: null,
@@ -19063,7 +19074,9 @@ const PartnerInfoModal = /*#__PURE__*/Object.freeze({
19063
19074
  Submitting: Submitting,
19064
19075
  WithError: WithError$3,
19065
19076
  ValidationError: ValidationError$1,
19066
- Closed: Closed
19077
+ Closed: Closed,
19078
+ SQMComponentExistingPartner: SQMComponentExistingPartner,
19079
+ SQMComponentNewPartner: SQMComponentNewPartner
19067
19080
  });
19068
19081
 
19069
19082
  const WidgetVerification_stories = {
@@ -34,6 +34,7 @@ const defaultText = {
34
34
  descriptionNewPartner: "Confirm your country and currency now to get your future rewards faster.",
35
35
  descriptionExistingPartner: "We noticed you are already an Impact.com partner, please confirm your information.",
36
36
  supportDescriptionExistingPartner: "If this is a mistake, please contact Support or sign up for this referral program with a different email.",
37
+ supportLink: "Support",
37
38
  countryLabel: "Country",
38
39
  currencyLabel: "Currency",
39
40
  submitButtonLabel: "Submit",
@@ -158,3 +159,13 @@ export const Closed = () => {
158
159
  };
159
160
  return h(PartnerInfoModalView, Object.assign({}, props));
160
161
  };
162
+ export const SQMComponentExistingPartner = () => {
163
+ return (h("sqm-partner-info-modal", { "support-link": "Support", "support-description-existing-partner": "If this is a mistake, please contact {supportLink} or sign up for this referral program with a different email.", "allow-banking-collection": "I have read the {termsAndConditionsLink} and allow impact.com to collect my tax and banking information", "terms-and-conditions-label": "terms and conditions", "terms-and-conditions-link": "https://terms.advocate.impact.com/PayoutTermsAndConditions.html", demoData: {
164
+ states: { open: true, isExistingPartner: true },
165
+ } }));
166
+ };
167
+ export const SQMComponentNewPartner = () => {
168
+ return (h("sqm-partner-info-modal", { demoData: {
169
+ states: { open: true, isExistingPartner: false },
170
+ } }));
171
+ };
@@ -69,9 +69,15 @@ export function PartnerInfoModalContentView(props) {
69
69
  const { states, callbacks, text } = props;
70
70
  const sheet = createStyleSheet(style);
71
71
  const styleString = sheet.toString();
72
+ const supportMessage = intl.formatMessage({
73
+ id: "supportDescriptionExistingPartner",
74
+ defaultMessage: text.supportDescriptionExistingPartner,
75
+ }, {
76
+ supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
77
+ });
72
78
  const description = states.isExistingPartner ? (h("span", { class: sheet.classes.DescriptionContainer },
73
79
  h("p", null, text.descriptionExistingPartner),
74
- h("p", null, text.supportDescriptionExistingPartner))) : (h("p", { class: sheet.classes.DescriptionContainer }, text.descriptionNewPartner));
80
+ h("p", null, supportMessage))) : (h("p", { class: sheet.classes.DescriptionContainer }, text.descriptionNewPartner));
75
81
  const buttonLabel = states.isExistingPartner
76
82
  ? text.confirmButtonLabel
77
83
  : text.submitButtonLabel;
@@ -48,7 +48,13 @@ export class PartnerInfoModal {
48
48
  * @uiName Existing partner support description
49
49
  * @uiWidget textArea
50
50
  */
51
- this.supportDescriptionExistingPartner = "If this is a mistake, please contact Support or sign up for this referral program with a different email.";
51
+ this.supportDescriptionExistingPartner = "If this is a mistake, please contact {supportLink} or sign up for this referral program with a different email.";
52
+ /**
53
+ * Support description for existing partner confirmation
54
+ *
55
+ * @uiName Existing partner support description
56
+ */
57
+ this.supportLink = "Support";
52
58
  /**
53
59
  * Edit the property called terms and conditions text to change what's displayed for {termsAndConditionsLink}.
54
60
  * @uiName Terms and conditions checkbox
@@ -247,7 +253,28 @@ export class PartnerInfoModal {
247
253
  },
248
254
  "attribute": "support-description-existing-partner",
249
255
  "reflect": false,
250
- "defaultValue": "\"If this is a mistake, please contact Support or sign up for this referral program with a different email.\""
256
+ "defaultValue": "\"If this is a mistake, please contact {supportLink} or sign up for this referral program with a different email.\""
257
+ },
258
+ "supportLink": {
259
+ "type": "string",
260
+ "mutable": false,
261
+ "complexType": {
262
+ "original": "string",
263
+ "resolved": "string",
264
+ "references": {}
265
+ },
266
+ "required": false,
267
+ "optional": false,
268
+ "docs": {
269
+ "tags": [{
270
+ "text": "Existing partner support description",
271
+ "name": "uiName"
272
+ }],
273
+ "text": "Support description for existing partner confirmation"
274
+ },
275
+ "attribute": "support-link",
276
+ "reflect": false,
277
+ "defaultValue": "\"Support\""
251
278
  },
252
279
  "allowBankingCollection": {
253
280
  "type": "string",
@@ -635,6 +662,7 @@ function useDemoPartnerInfoModal(props) {
635
662
  searchCountryPlaceholder: props.searchCountryPlaceholder,
636
663
  searchCurrencyPlaceholder: props.searchCurrencyPlaceholder,
637
664
  supportDescriptionExistingPartner: props.supportDescriptionExistingPartner,
665
+ supportLink: props.supportLink,
638
666
  modalHeaderExistingPartner: props.modalHeaderExistingPartner,
639
667
  },
640
668
  }, props.demoData || stateOverride, { arrayMerge: (_, a) => a });
@@ -1,4 +1,4 @@
1
- import { useMutation, useParent, useQuery, useUserIdentity, } from "@saasquatch/component-boilerplate";
1
+ import { useMutation, useQuery, useSetParent, useUserIdentity, } from "@saasquatch/component-boilerplate";
2
2
  import { useEffect, useState } from "@saasquatch/universal-hooks";
3
3
  import { gql } from "graphql-request";
4
4
  import { SHOW_CODE_NAMESPACE, VERIFICATION_EMAIL_NAMESPACE } from "../keys";
@@ -60,8 +60,12 @@ export function useUpsertUserEmail() {
60
60
  ];
61
61
  }
62
62
  export function useWidgetEmailVerification(props) {
63
- const [_, setShowCode] = useParent(SHOW_CODE_NAMESPACE);
64
- const [email, setEmail] = useParent(VERIFICATION_EMAIL_NAMESPACE);
63
+ // NOTE: useSetParent (not useParent) so that calling these setters is a
64
+ // no-op fallback instead of throwing TypeError when the parent provider
65
+ // hasn't connected yet (e.g. inside <sl-dialog> on first paint). Throwing
66
+ // here would skip setLoading(false) and leave the button stuck spinning.
67
+ const setShowCode = useSetParent(SHOW_CODE_NAMESPACE);
68
+ const setEmail = useSetParent(VERIFICATION_EMAIL_NAMESPACE);
65
69
  const [emailExists, setEmailExists] = useState(false);
66
70
  const [error, setError] = useState(false);
67
71
  const [mutationError, setMutationError] = useState(false);
@@ -80,29 +84,43 @@ export function useWidgetEmailVerification(props) {
80
84
  setLoading(false);
81
85
  }, [initialized]);
82
86
  const submitEmail = async (e) => {
87
+ var _a, _b, _c, _d;
83
88
  e.preventDefault();
84
89
  if (!(data === null || data === void 0 ? void 0 : data.viewer))
85
90
  return;
86
91
  setLoading(true);
87
- const toAddress = data.viewer.email;
92
+ setMutationError(false);
93
+ setError(false);
94
+ // Resolve the address we'll actually verify. If the user already has an
95
+ // email on record, use it; otherwise pull the typed value from the form
96
+ // and upsert it. We capture this AFTER the upsert so the value we hand
97
+ // off to the code-verification step is never null.
98
+ let toAddress = data.viewer.email;
88
99
  if (!toAddress) {
89
- // If no email on the user, set one
90
- const formData = e.detail.formData;
91
- const newEmail = formData.get("email").toString();
100
+ const formData = (_a = e.detail) === null || _a === void 0 ? void 0 : _a.formData;
101
+ const newEmail = (_c = (_b = formData === null || formData === void 0 ? void 0 : formData.get("email")) === null || _b === void 0 ? void 0 : _b.toString()) !== null && _c !== void 0 ? _c : "";
92
102
  if (!emailRegex.test(newEmail)) {
93
103
  setError(true);
104
+ setLoading(false);
94
105
  return;
95
106
  }
96
- const result = await upsertUserEmail(newEmail);
97
- if (!result || !result.user.email)
107
+ const upsertResult = await upsertUserEmail(newEmail);
108
+ if (!upsertResult || !((_d = upsertResult.upsertUser) === null || _d === void 0 ? void 0 : _d.email)) {
98
109
  setError(true);
110
+ setLoading(false);
111
+ return;
112
+ }
113
+ toAddress = upsertResult.upsertUser.email;
99
114
  }
100
115
  // UI should not allow this call til initialisation is done
101
- if (!initialized)
116
+ if (!initialized) {
117
+ setLoading(false);
102
118
  return;
119
+ }
103
120
  const result = await sendEmail();
104
- if (!result || !result.success)
121
+ if (!result || !result.success) {
105
122
  setMutationError(true);
123
+ }
106
124
  else {
107
125
  // This is used to let the code verification widget know an email was already sent
108
126
  setEmail(toAddress);
@@ -2,7 +2,7 @@ import { useLazyQuery, useParentState, useSetParent, } from "@saasquatch/compone
2
2
  import { useState } from "@saasquatch/stencil-hooks";
3
3
  import { useEffect } from "@saasquatch/universal-hooks";
4
4
  import { gql } from "graphql-request";
5
- import { PARTNER_CREATED_NAMESPACE, SHOW_CODE_NAMESPACE, SHOW_PARTNER_MODAL_NAMESPACE, VERIFICATION_PARENT_NAMESPACE, } from "./keys";
5
+ import { PARTNER_CREATED_NAMESPACE, SHOW_CODE_NAMESPACE, SHOW_PARTNER_MODAL_NAMESPACE, VERIFICATION_EMAIL_NAMESPACE, VERIFICATION_PARENT_NAMESPACE, } from "./keys";
6
6
  const USER_LOOKUP = gql `
7
7
  query checkUserVerification {
8
8
  viewer {
@@ -27,6 +27,16 @@ export function useWidgetVerification() {
27
27
  namespace: SHOW_CODE_NAMESPACE,
28
28
  initialValue: false,
29
29
  });
30
+ // Register the verification-email namespace at the widget-verification
31
+ // host so that <sqm-email-verification> (writer) and <sqm-code-verification>
32
+ // (reader) can communicate. This registration was accidentally removed in
33
+ // commit cfbfad9 ("a bunch of review and cleanup of unused code"), which
34
+ // caused setEmail() in the email step to throw TypeError and aborted the
35
+ // rest of submitEmail before it could call setShowCode(true).
36
+ useParentState({
37
+ namespace: VERIFICATION_EMAIL_NAMESPACE,
38
+ initialValue: undefined,
39
+ });
30
40
  const setContext = useSetParent(VERIFICATION_PARENT_NAMESPACE);
31
41
  const [loading, setLoading] = useState(true);
32
42
  const [showPartnerModal, setShowPartnerModal] = useParentState({
@@ -5,4 +5,4 @@ const VERIFICATION_EMAIL_NAMESPACE = "sq:verification-email";
5
5
  const VERIFICATION_PARENT_NAMESPACE = "sq:verification-context";
6
6
  const VERIFICATION_EVENT_KEY = "sq:code-verified";
7
7
 
8
- export { PARTNER_CREATED_NAMESPACE as P, SHOW_CODE_NAMESPACE as S, VERIFICATION_PARENT_NAMESPACE as V, SHOW_PARTNER_MODAL_NAMESPACE as a, VERIFICATION_EMAIL_NAMESPACE as b, VERIFICATION_EVENT_KEY as c };
8
+ export { PARTNER_CREATED_NAMESPACE as P, SHOW_CODE_NAMESPACE as S, VERIFICATION_PARENT_NAMESPACE as V, VERIFICATION_EMAIL_NAMESPACE as a, SHOW_PARTNER_MODAL_NAMESPACE as b, VERIFICATION_EVENT_KEY as c };