@saasquatch/mint-components 2.2.0-1 → 2.2.0-3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) 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-email-verification_2.cjs.entry.js +9 -2
  4. package/dist/cjs/{sqm-partner-info-modal-view-431ff976.js → sqm-partner-info-modal-view-2a3438e5.js} +7 -1
  5. package/dist/cjs/sqm-referral-table_11.cjs.entry.js +27 -9
  6. package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +30 -9
  7. package/dist/cjs/sqm-stencilbook.cjs.entry.js +486 -306
  8. package/dist/collection/components/sqm-partner-info-modal/PartnerInfoModal.stories.js +11 -0
  9. package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal-view.js +7 -1
  10. package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal.js +30 -2
  11. package/dist/collection/components/sqm-referral-table/ReferralTable.stories.js +1 -0
  12. package/dist/collection/components/sqm-referral-table/ReferralTableRewardsCell.stories.js +1 -0
  13. package/dist/collection/components/sqm-referral-table/TaxAndCashReferralTableRewardsCell.stories.js +209 -157
  14. package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.js +30 -10
  15. package/dist/collection/components/sqm-rewards-table/RewardsTableCell.stories.js +1 -0
  16. package/dist/collection/components/sqm-rewards-table/TaxAndCashRewardsTableCell.stories.js +223 -148
  17. package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-status-cell.js +30 -10
  18. package/dist/collection/components/sqm-rewards-table/useRewardsTable.js +1 -0
  19. package/dist/esm/loader.js +1 -1
  20. package/dist/esm/mint-components.js +1 -1
  21. package/dist/esm/sqm-email-verification_2.entry.js +9 -2
  22. package/dist/esm/{sqm-partner-info-modal-view-b3c33bc3.js → sqm-partner-info-modal-view-bd8ff1c1.js} +7 -1
  23. package/dist/esm/sqm-referral-table_11.entry.js +27 -9
  24. package/dist/esm/sqm-rewards-table_9.entry.js +30 -9
  25. package/dist/esm/sqm-stencilbook.entry.js +486 -306
  26. package/dist/esm-es5/loader.js +1 -1
  27. package/dist/esm-es5/mint-components.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-referral-table_11.entry.js +1 -1
  31. package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
  32. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  33. package/dist/mint-components/mint-components.esm.js +1 -1
  34. package/dist/mint-components/p-162da001.system.entry.js +1 -0
  35. package/dist/mint-components/p-1c413a06.system.js +1 -1
  36. package/dist/mint-components/{p-0b2a428f.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-43107d85.system.js +1 -0
  39. package/dist/mint-components/{p-63102c04.entry.js → p-45d7412b.entry.js} +3 -3
  40. package/dist/mint-components/{p-7a744cb2.entry.js → p-78241a3a.entry.js} +2 -2
  41. package/dist/mint-components/{p-16416781.system.entry.js → p-7caaeaf2.system.entry.js} +1 -1
  42. package/dist/mint-components/p-bdf858c3.entry.js +1 -0
  43. package/dist/mint-components/{p-9e43f1eb.entry.js → p-be5ecf62.entry.js} +3 -2
  44. package/dist/mint-components/p-d3ac8246.system.entry.js +1 -0
  45. package/dist/types/components/sqm-partner-info-modal/PartnerInfoModal.stories.d.ts +2 -0
  46. package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal-view.d.ts +1 -0
  47. package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal.d.ts +6 -0
  48. package/dist/types/components/sqm-referral-table/TaxAndCashReferralTableRewardsCell.stories.d.ts +16 -0
  49. package/dist/types/components/sqm-rewards-table/TaxAndCashRewardsTableCell.stories.d.ts +18 -7
  50. package/dist/types/components.d.ts +10 -0
  51. package/dist/types/saasquatch.d.ts +1 -0
  52. package/docs/docs.docx +0 -0
  53. package/docs/raisins.json +1 -1
  54. package/grapesjs/grapesjs.js +1 -1
  55. package/package.json +1 -1
  56. package/dist/esm-es5/sqm-partner-info-modal-view-b3c33bc3.js +0 -1
  57. package/dist/mint-components/p-55627a5c.entry.js +0 -1
  58. package/dist/mint-components/p-837c4cf8.js +0 -1
  59. package/dist/mint-components/p-987a54e2.system.js +0 -1
  60. package/dist/mint-components/p-d01949f7.system.entry.js +0 -1
  61. package/dist/mint-components/p-e9e05970.system.entry.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
 
@@ -10896,6 +10896,7 @@ const cashPayoutSentReward = {
10896
10896
  statuses: ["AVAILABLE"],
10897
10897
  globalRewardKey: "Key",
10898
10898
  rewardRedemptionTransactions: null,
10899
+ rewardedCash: true,
10899
10900
  };
10900
10901
  const nullExpiresIn = {
10901
10902
  dateExpires: null,
@@ -11257,6 +11258,7 @@ const baseReward$1 = {
11257
11258
  },
11258
11259
  ],
11259
11260
  },
11261
+ rewardedCash: false,
11260
11262
  };
11261
11263
  // Reward Status Cases
11262
11264
  const pendingReward$1 = {
@@ -11811,205 +11813,274 @@ const ReferralTable = /*#__PURE__*/Object.freeze({
11811
11813
  const TaxAndCashReferralTableRewardsCell_stories = {
11812
11814
  title: "Components/Tax And Cash Referral Table Rewards Cell",
11813
11815
  };
11814
- function getDays$1() {
11815
- return luxon.luxon.DateTime.now().toMillis() + 600000000;
11816
- }
11817
- function getMonths$1() {
11818
- return luxon.luxon.DateTime.now().toMillis() + 10000000000;
11819
- }
11816
+ // Reusable timestamps (current date is May 2026)
11817
+ const PAST = 1640995200000; // Jan 1, 2022
11818
+ const FUTURE = 2779257600000; // ~2058
11820
11819
  const cashReward = {
11821
11820
  id: "1234",
11822
11821
  type: "CREDIT",
11823
11822
  value: 50,
11824
11823
  unit: "USD",
11825
11824
  name: "test",
11826
- dateScheduledFor: getDays$1(),
11827
- dateExpires: getMonths$1(),
11828
- dateCancelled: 134400,
11829
- dateRedeemed: 0,
11825
+ dateScheduledFor: null,
11826
+ dateExpires: null,
11827
+ dateCancelled: null,
11828
+ dateRedeemed: null,
11830
11829
  fuelTankCode: null,
11831
11830
  fuelTankType: null,
11832
11831
  currency: "USD",
11833
11832
  prettyValue: "$50.00",
11834
- statuses: ["AVAILABLE"],
11833
+ statuses: [],
11835
11834
  globalRewardKey: "Key",
11836
11835
  rewardRedemptionTransactions: null,
11837
11836
  partnerFundsTransfer: null,
11837
+ rewardedCash: true,
11838
11838
  };
11839
- const taxConnection = {
11839
+ // ============================================================
11840
+ // Reusable tax connections
11841
+ // ============================================================
11842
+ const fullySetupTaxConnection = {
11840
11843
  connected: true,
11841
11844
  taxHandlingEnabled: true,
11842
11845
  publisher: {
11843
11846
  requiredTaxDocumentType: "W9",
11847
+ currentTaxDocument: {
11848
+ status: "ACTIVE",
11849
+ type: "W9",
11850
+ dateCreated: PAST,
11851
+ },
11844
11852
  withdrawalSettings: { paymentMethod: "BANK_TRANSFER" },
11845
11853
  payoutsAccount: null,
11854
+ },
11855
+ };
11856
+ const connectedNoWithdrawalSettings = {
11857
+ connected: true,
11858
+ taxHandlingEnabled: true,
11859
+ publisher: {
11860
+ requiredTaxDocumentType: "W9",
11846
11861
  currentTaxDocument: {
11847
11862
  status: "ACTIVE",
11848
11863
  type: "W9",
11849
- dateCreated: 1627427794891,
11864
+ dateCreated: PAST,
11850
11865
  },
11866
+ withdrawalSettings: null,
11867
+ payoutsAccount: null,
11851
11868
  },
11852
11869
  };
11853
- const defaultPFT = {
11854
- id: "ID1234",
11855
- status: null,
11856
- dateCreated: null,
11857
- dateScheduled: null,
11858
- dateTransferred: null,
11859
- };
11860
- const defaultTaxDocument = {
11861
- status: "NOT_VERIFIED",
11862
- type: "W9",
11863
- dateCreated: luxon.luxon.DateTime.now().toMillis() - 1000000,
11870
+ const notConnectedTaxConnection = {
11871
+ connected: false,
11872
+ taxHandlingEnabled: true,
11873
+ publisher: null,
11864
11874
  };
11865
11875
  const defaultProps$o = {
11866
11876
  statusText: "{status, select, AVAILABLE {Available} CANCELLED {Cancelled} PENDING {Pending} PENDING_REVIEW {Pending} PAYOUT_APPROVED {Payout Approved} PROCESSING {Payment Processing} PAYOUT_FAILED {Payout Failed} PAYOUT_CANCELLED {Payout Cancelled} PENDING_TAX_REVIEW {Pending} PENDING_NEW_TAX_FORM {Pending} PENDING_TAX_SUBMISSION {Pending} PENDING_PARTNER_CREATION {Pending} DENIED {Denied} EXPIRED {Expired} REDEEMED {Redeemed} other {Not available} }",
11867
- statusLongText: "{status, select, AVAILABLE {Reward expiring on} CANCELLED {Reward cancelled on} PENDING {Available on} PENDING_REVIEW {Pending since} PAYOUT_APPROVED {Processing until {scheduledPayoutDate}. Payout is then scheduled based on your settings.} PAYOUT_FAILED {Payout failed due to a fulfillment issue and is currently being retried.} PAYOUT_CANCELLED {If you think this is a mistake, contact our Support team.} PENDING_TAX_REVIEW {Awaiting tax form review} PENDING_NEW_TAX_FORM {Invalid tax form. Submit a new form to receive your rewards.} PROCESSING {Processing until {scheduledPayoutDate}. Payout is then scheduled based on your settings.} PENDING_TAX_SUBMISSION {Submit your tax documents to receive your rewards} PENDING_PARTNER_CREATION {Complete your tax and cash payout setup to receive your rewards} DENIED {Denied on} EXPIRED {Reward expired on} other {Not available} }",
11877
+ statusLongText: "{status, select, AVAILABLE {Reward expiring on} CANCELLED {Reward cancelled on} PENDING {Available on} PENDING_REVIEW {Pending since} PAYOUT_APPROVED {Processing until {scheduledPayoutDate}. Payout is then scheduled based on your settings.} PAYOUT_FAILED {Payout failed due to a fulfillment issue and is currently being retried.} PAYOUT_CANCELLED {If you think this is a mistake, contact our Support team.} PENDING_TAX_REVIEW {Awaiting tax form review} PENDING_NEW_TAX_FORM {Invalid tax form. Submit a new form to receive your rewards.} PROCESSING {Processing until {scheduledPayoutDate}. Payout is then scheduled based on your settings.} PENDING_TAX_SUBMISSION {Submit your tax documents to receive your rewards} PENDING_PARTNER_CREATION {Complete cash payout setup to receive your rewards} DENIED {Denied on} EXPIRED {Reward expired on} other {Not available} }",
11868
11878
  rewardReceivedText: "Reward received on",
11869
11879
  hideDetails: false,
11870
11880
  };
11871
- const CashReward = () => {
11872
- return (index.h("sqm-referral-table-rewards-cell", Object.assign({ rewards: [{ ...cashReward }], taxConnection: taxConnection }, defaultProps$o)));
11873
- };
11874
- const PayoutApproved = () => {
11875
- return (index.h("sqm-referral-table-rewards-cell", Object.assign({ rewards: [
11876
- {
11877
- ...cashReward,
11878
- partnerFundsTransfer: {
11879
- ...defaultPFT,
11880
- status: "TRANSFERRED",
11881
- dateScheduled: Date.now() - 600000000,
11882
- },
11883
- },
11884
- ], taxConnection: taxConnection }, defaultProps$o)));
11885
- };
11886
- const PayoutProcessing = () => {
11887
- return (index.h("sqm-referral-table-rewards-cell", Object.assign({ rewards: [
11888
- {
11889
- ...cashReward,
11890
- partnerFundsTransfer: {
11891
- ...defaultPFT,
11892
- dateCreated: 1355612521321,
11893
- dateScheduled: getDays$1(),
11894
- },
11895
- },
11896
- ], taxConnection: taxConnection }, defaultProps$o)));
11897
- };
11898
- const PayoutFailed$1 = () => {
11899
- return (index.h("sqm-referral-table-rewards-cell", Object.assign({ rewards: [
11900
- {
11901
- ...cashReward,
11902
- partnerFundsTransfer: {
11903
- ...defaultPFT,
11904
- status: "OVERDUE",
11905
- dateScheduled: Date.now() - 100000,
11906
- },
11907
- },
11908
- ], taxConnection: taxConnection }, defaultProps$o)));
11909
- };
11910
- const PayoutCancelled$1 = () => {
11911
- return (index.h("sqm-referral-table-rewards-cell", Object.assign({ rewards: [
11912
- {
11913
- ...cashReward,
11914
- partnerFundsTransfer: {
11915
- ...defaultPFT,
11916
- status: "REVERSED",
11917
- dateScheduled: Date.now() - 100000,
11918
- },
11919
- },
11920
- ], taxConnection: taxConnection }, defaultProps$o)));
11921
- };
11922
- const PendingTaxReview$1 = () => {
11923
- return (index.h("sqm-referral-table-rewards-cell", Object.assign({ rewards: [
11924
- {
11925
- ...cashReward,
11926
- statuses: ["PENDING"],
11927
- pendingReasons: ["US_TAX"],
11928
- },
11929
- ], taxConnection: {
11930
- ...taxConnection,
11931
- publisher: {
11932
- ...taxConnection.publisher,
11933
- currentTaxDocument: {
11934
- ...defaultTaxDocument,
11935
- status: "NOT_VERIFIED",
11936
- },
11937
- },
11938
- } }, defaultProps$o)));
11939
- };
11940
- const PendingNewTaxForm$1 = () => {
11941
- return (index.h("sqm-referral-table-rewards-cell", Object.assign({ rewards: [
11942
- {
11943
- ...cashReward,
11944
- statuses: ["PENDING"],
11945
- pendingReasons: ["US_TAX"],
11881
+ // ============================================================
11882
+ // STATE PRECEDENCE LADDER one story per rule
11883
+ // (See referral-table-rewards-column-new.feature § 2)
11884
+ // ============================================================
11885
+ // 1. Fraud check denied the referral state is DENIED
11886
+ const RewardsCellFraudDenied = () => (index.h("sqm-referral-table-rewards-cell", Object.assign({ rewards: [
11887
+ {
11888
+ ...cashReward,
11889
+ referral: { fraudData: { moderationStatus: "DENIED" } },
11890
+ },
11891
+ ], taxConnection: fullySetupTaxConnection }, defaultProps$o)));
11892
+ // 2. Fraud check is still pending review → state is PENDING_REVIEW
11893
+ const RewardsCellFraudPendingReview = () => (index.h("sqm-referral-table-rewards-cell", Object.assign({ rewards: [
11894
+ {
11895
+ ...cashReward,
11896
+ referral: { fraudData: { moderationStatus: "PENDING" } },
11897
+ },
11898
+ ], taxConnection: fullySetupTaxConnection }, defaultProps$o)));
11899
+ // 3a. Cash reward but the user has not connected an Impact partner → shows the partner-setup prompt
11900
+ const RewardsCellPartnerNotCreatedSetupNotStarted = () => (index.h("sqm-referral-table-rewards-cell", Object.assign({ rewards: [{ ...cashReward, statuses: ["AVAILABLE"] }], taxConnection: notConnectedTaxConnection }, defaultProps$o)));
11901
+ // 3b. Cash reward, partner is connected but withdrawal settings are missing → shows the partner-setup prompt
11902
+ const RewardsCellPartnerCreatedSetupStartedButIncomplete = () => (index.h("sqm-referral-table-rewards-cell", Object.assign({ rewards: [
11903
+ {
11904
+ ...cashReward,
11905
+ partnerFundsTransfer: {
11906
+ id: "pft-not-yet-due",
11907
+ status: "NOT_YET_DUE",
11908
+ dateCreated: PAST,
11909
+ dateScheduled: FUTURE,
11910
+ dateTransferred: null,
11946
11911
  },
11947
- ], taxConnection: {
11948
- ...taxConnection,
11949
- publisher: {
11950
- ...taxConnection.publisher,
11951
- currentTaxDocument: {
11952
- ...defaultTaxDocument,
11953
- status: "INACTIVE",
11954
- },
11912
+ },
11913
+ ], taxConnection: connectedNoWithdrawalSettings }, defaultProps$o)));
11914
+ // 4. Partner funds transfer was reversed → state is PAYOUT_CANCELLED
11915
+ const RewardsCellPayoutCancelled = () => (index.h("sqm-referral-table-rewards-cell", Object.assign({ rewards: [
11916
+ {
11917
+ ...cashReward,
11918
+ partnerFundsTransfer: {
11919
+ id: "pft-reversed",
11920
+ status: "REVERSED",
11921
+ dateCreated: PAST,
11922
+ dateScheduled: PAST,
11923
+ dateTransferred: null,
11955
11924
  },
11956
- } }, defaultProps$o)));
11957
- };
11958
- const PendingTaxSubmission$1 = () => {
11959
- return (index.h("sqm-referral-table-rewards-cell", Object.assign({ rewards: [
11960
- {
11961
- ...cashReward,
11962
- statuses: ["PENDING"],
11963
- pendingReasons: ["US_TAX"],
11925
+ },
11926
+ ], taxConnection: fullySetupTaxConnection }, defaultProps$o)));
11927
+ // 5. Partner funds transfer is overdue → state is PAYOUT_FAILED
11928
+ const RewardsCellPayoutFailed = () => (index.h("sqm-referral-table-rewards-cell", Object.assign({ rewards: [
11929
+ {
11930
+ ...cashReward,
11931
+ partnerFundsTransfer: {
11932
+ id: "pft-overdue",
11933
+ status: "OVERDUE",
11934
+ dateCreated: PAST,
11935
+ dateScheduled: PAST,
11936
+ dateTransferred: null,
11964
11937
  },
11965
- ], taxConnection: {
11966
- ...taxConnection,
11967
- publisher: {
11968
- ...taxConnection.publisher,
11969
- currentTaxDocument: null,
11938
+ },
11939
+ ], taxConnection: fullySetupTaxConnection }, defaultProps$o)));
11940
+ // 6. Partner funds transfer is scheduled for a future date → state is PROCESSING
11941
+ const RewardsCellPayoutProcessing = () => (index.h("sqm-referral-table-rewards-cell", Object.assign({ rewards: [
11942
+ {
11943
+ ...cashReward,
11944
+ partnerFundsTransfer: {
11945
+ id: "pft-processing",
11946
+ status: null,
11947
+ dateCreated: PAST,
11948
+ dateScheduled: FUTURE,
11949
+ dateTransferred: null,
11970
11950
  },
11971
- } }, defaultProps$o)));
11972
- };
11973
- const PartnerNotCreatedSetupNotStarted = () => {
11974
- return (index.h("sqm-referral-table-rewards-cell", Object.assign({ rewards: [
11975
- {
11976
- ...cashReward,
11977
- statuses: ["PENDING"],
11978
- pendingReasons: ["MISSING_PAYOUT_CONFIGURATION"],
11951
+ },
11952
+ ], taxConnection: fullySetupTaxConnection }, defaultProps$o)));
11953
+ // 7. Partner funds transfer has been transferred → state is PAYOUT_APPROVED
11954
+ const RewardsCellPayoutApproved = () => (index.h("sqm-referral-table-rewards-cell", Object.assign({ rewards: [
11955
+ {
11956
+ ...cashReward,
11957
+ partnerFundsTransfer: {
11958
+ id: "pft-transferred",
11959
+ status: "TRANSFERRED",
11960
+ dateCreated: PAST,
11961
+ dateScheduled: PAST,
11962
+ dateTransferred: PAST,
11979
11963
  },
11980
- ], taxConnection: {
11981
- ...taxConnection,
11982
- connected: false,
11983
- } }, defaultProps$o)));
11984
- };
11985
- const PartnerCreatedSetupStartedButIncomplete = () => {
11986
- return (index.h("sqm-referral-table-rewards-cell", Object.assign({ rewards: [
11987
- {
11988
- ...cashReward,
11989
- statuses: ["PENDING"],
11990
- pendingReasons: ["MISSING_PAYOUT_CONFIGURATION"],
11964
+ },
11965
+ ], taxConnection: fullySetupTaxConnection }, defaultProps$o)));
11966
+ // 8. Reward is pending US_TAX but tax handling is disabled → state is PENDING (W-9 required)
11967
+ const RewardsCellPendingW9Required = () => (index.h("sqm-referral-table-rewards-cell", Object.assign({ rewards: [
11968
+ {
11969
+ ...cashReward,
11970
+ statuses: ["PENDING"],
11971
+ pendingReasons: ["US_TAX"],
11972
+ },
11973
+ ], taxConnection: { ...fullySetupTaxConnection, taxHandlingEnabled: false } }, defaultProps$o)));
11974
+ // 9. Reward is pending US_TAX and the partner is not connected → shows the partner-setup prompt
11975
+ const RewardsCellUsTaxPartnerNotConnected = () => (index.h("sqm-referral-table-rewards-cell", Object.assign({ rewards: [
11976
+ {
11977
+ ...cashReward,
11978
+ statuses: ["PENDING"],
11979
+ pendingReasons: ["US_TAX"],
11980
+ },
11981
+ ], taxConnection: notConnectedTaxConnection }, defaultProps$o)));
11982
+ // 10. Partner is connected but has not submitted any tax documents → shows the submit-tax-docs prompt
11983
+ const RewardsCellPendingTaxSubmission = () => (index.h("sqm-referral-table-rewards-cell", Object.assign({ rewards: [
11984
+ {
11985
+ ...cashReward,
11986
+ statuses: ["PENDING"],
11987
+ pendingReasons: ["US_TAX"],
11988
+ },
11989
+ ], taxConnection: {
11990
+ ...fullySetupTaxConnection,
11991
+ publisher: {
11992
+ ...fullySetupTaxConnection.publisher,
11993
+ currentTaxDocument: null,
11994
+ },
11995
+ } }, defaultProps$o)));
11996
+ // 11. Partner's tax document is inactive (rejected) → shows the submit-a-new-form prompt
11997
+ const RewardsCellPendingNewTaxForm = () => (index.h("sqm-referral-table-rewards-cell", Object.assign({ rewards: [
11998
+ {
11999
+ ...cashReward,
12000
+ statuses: ["PENDING"],
12001
+ pendingReasons: ["US_TAX"],
12002
+ },
12003
+ ], taxConnection: {
12004
+ ...fullySetupTaxConnection,
12005
+ publisher: {
12006
+ ...fullySetupTaxConnection.publisher,
12007
+ currentTaxDocument: {
12008
+ status: "INACTIVE",
12009
+ type: "W9",
12010
+ dateCreated: PAST,
11991
12011
  },
11992
- ], taxConnection: {
11993
- ...taxConnection,
11994
- connected: false,
11995
- } }, defaultProps$o)));
11996
- };
11997
- const PendingW9 = () => {
11998
- return (index.h("sqm-referral-table-rewards-cell", Object.assign({ rewards: [
11999
- {
12000
- ...cashReward,
12001
- statuses: ["PENDING"],
12002
- pendingReasons: ["US_TAX"],
12012
+ },
12013
+ } }, defaultProps$o)));
12014
+ // 12. Partner's tax document is awaiting verification → shows the awaiting-review prompt
12015
+ const RewardsCellPendingTaxReview = () => (index.h("sqm-referral-table-rewards-cell", Object.assign({ rewards: [
12016
+ {
12017
+ ...cashReward,
12018
+ statuses: ["PENDING"],
12019
+ pendingReasons: ["US_TAX"],
12020
+ },
12021
+ ], taxConnection: {
12022
+ ...fullySetupTaxConnection,
12023
+ publisher: {
12024
+ ...fullySetupTaxConnection.publisher,
12025
+ currentTaxDocument: {
12026
+ status: "NOT_VERIFIED",
12027
+ type: "W9",
12028
+ dateCreated: PAST,
12003
12029
  },
12004
- ], taxConnection: {
12005
- ...taxConnection,
12006
- taxHandlingEnabled: false,
12007
- } }, defaultProps$o)));
12008
- };
12030
+ },
12031
+ } }, defaultProps$o)));
12032
+ // 13. Partner has an active tax form but has not configured withdrawal settings → shows the partner-setup prompt
12033
+ const RewardsCellExistingTaxFormNoWithdrawalSettings = () => (index.h("sqm-referral-table-rewards-cell", Object.assign({ rewards: [
12034
+ {
12035
+ ...cashReward,
12036
+ statuses: ["PENDING"],
12037
+ pendingReasons: ["US_TAX"],
12038
+ },
12039
+ ], taxConnection: connectedNoWithdrawalSettings }, defaultProps$o)));
12040
+ // 14. Reward has MISSING_PAYOUT_CONFIGURATION pending reason → shows the partner-setup prompt
12041
+ const RewardsCellMissingPayoutConfiguration = () => (index.h("sqm-referral-table-rewards-cell", Object.assign({ rewards: [
12042
+ {
12043
+ ...cashReward,
12044
+ statuses: ["PENDING"],
12045
+ pendingReasons: ["MISSING_PAYOUT_CONFIGURATION"],
12046
+ },
12047
+ ], taxConnection: connectedNoWithdrawalSettings }, defaultProps$o)));
12048
+ // 18. Reward does not match any precedence rule → state is undefined (Not available)
12049
+ const RewardsCellNoMatchingRule = () => (index.h("sqm-referral-table-rewards-cell", Object.assign({ rewards: [{ ...cashReward, statuses: [] }], taxConnection: fullySetupTaxConnection }, defaultProps$o)));
12050
+ // ============================================================
12051
+ // Aliases kept for backwards compatibility with existing references
12052
+ // ============================================================
12053
+ const CashReward = RewardsCellPayoutApproved;
12054
+ const PayoutApproved = RewardsCellPayoutApproved;
12055
+ const PayoutProcessing = RewardsCellPayoutProcessing;
12056
+ const PayoutFailed$1 = RewardsCellPayoutFailed;
12057
+ const PayoutCancelled$1 = RewardsCellPayoutCancelled;
12058
+ const PendingTaxReview$1 = RewardsCellPendingTaxReview;
12059
+ const PendingNewTaxForm$1 = RewardsCellPendingNewTaxForm;
12060
+ const PendingTaxSubmission$1 = RewardsCellPendingTaxSubmission;
12061
+ const PartnerNotCreatedSetupNotStarted = RewardsCellPartnerNotCreatedSetupNotStarted;
12062
+ const PartnerCreatedSetupStartedButIncomplete = RewardsCellPartnerCreatedSetupStartedButIncomplete;
12063
+ const PendingW9 = RewardsCellPendingW9Required;
12009
12064
 
12010
12065
  const TaxAndCashReferralTableRewardsCell = /*#__PURE__*/Object.freeze({
12011
12066
  __proto__: null,
12012
12067
  'default': TaxAndCashReferralTableRewardsCell_stories,
12068
+ RewardsCellFraudDenied: RewardsCellFraudDenied,
12069
+ RewardsCellFraudPendingReview: RewardsCellFraudPendingReview,
12070
+ RewardsCellPartnerNotCreatedSetupNotStarted: RewardsCellPartnerNotCreatedSetupNotStarted,
12071
+ RewardsCellPartnerCreatedSetupStartedButIncomplete: RewardsCellPartnerCreatedSetupStartedButIncomplete,
12072
+ RewardsCellPayoutCancelled: RewardsCellPayoutCancelled,
12073
+ RewardsCellPayoutFailed: RewardsCellPayoutFailed,
12074
+ RewardsCellPayoutProcessing: RewardsCellPayoutProcessing,
12075
+ RewardsCellPayoutApproved: RewardsCellPayoutApproved,
12076
+ RewardsCellPendingW9Required: RewardsCellPendingW9Required,
12077
+ RewardsCellUsTaxPartnerNotConnected: RewardsCellUsTaxPartnerNotConnected,
12078
+ RewardsCellPendingTaxSubmission: RewardsCellPendingTaxSubmission,
12079
+ RewardsCellPendingNewTaxForm: RewardsCellPendingNewTaxForm,
12080
+ RewardsCellPendingTaxReview: RewardsCellPendingTaxReview,
12081
+ RewardsCellExistingTaxFormNoWithdrawalSettings: RewardsCellExistingTaxFormNoWithdrawalSettings,
12082
+ RewardsCellMissingPayoutConfiguration: RewardsCellMissingPayoutConfiguration,
12083
+ RewardsCellNoMatchingRule: RewardsCellNoMatchingRule,
12013
12084
  CashReward: CashReward,
12014
12085
  PayoutApproved: PayoutApproved,
12015
12086
  PayoutProcessing: PayoutProcessing,
@@ -12440,7 +12511,7 @@ const scenario2 = "@author:derek\n@owner:derek\nFeature: Reward Table reward Col
12440
12511
 
12441
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";
12442
12513
 
12443
- 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. |";
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";
12444
12515
 
12445
12516
  const scenario$x = scenario1 + scenario2 + scenario3 + scenario4;
12446
12517
  const RewardsTableCell_stories = {
@@ -12968,6 +13039,9 @@ const RewardsTable$1 = /*#__PURE__*/Object.freeze({
12968
13039
  const TaxAndCashRewardsTableCell_stories = {
12969
13040
  title: "Components/Tax And Cash Rewards Table Cell",
12970
13041
  };
13042
+ // Reusable timestamps (current date is May 2026)
13043
+ const PAST$1 = 1640995200000; // Jan 1, 2022
13044
+ const FUTURE$1 = 2779257600000; // ~2058
12971
13045
  const cashReward$1 = {
12972
13046
  id: "68c34fd98a6cb4f5f8394084",
12973
13047
  type: "CREDIT",
@@ -12987,13 +13061,13 @@ const cashReward$1 = {
12987
13061
  name: "Cash",
12988
13062
  },
12989
13063
  name: null,
12990
- dateCreated: 1757630425085,
12991
- dateScheduledFor: 1757631025115,
12992
- dateGiven: 1757630737115,
13064
+ dateCreated: PAST$1,
13065
+ dateScheduledFor: null,
13066
+ dateGiven: PAST$1,
12993
13067
  dateExpires: null,
12994
13068
  dateCancelled: null,
12995
- dateRedeemed: 1757630737115,
12996
- dateModified: 1757630737115,
13069
+ dateRedeemed: null,
13070
+ dateModified: PAST$1,
12997
13071
  rewardSource: "MANUAL",
12998
13072
  fuelTankCode: null,
12999
13073
  fuelTankType: null,
@@ -13026,173 +13100,266 @@ const cashReward$1 = {
13026
13100
  },
13027
13101
  referral: null,
13028
13102
  description: null,
13029
- statuses: ["REDEEMED"],
13103
+ statuses: [],
13030
13104
  rewardRedemptionTransactions: {
13031
13105
  data: null,
13032
13106
  },
13033
13107
  exchangedRewardRedemptionTransaction: null,
13034
13108
  pendingReasons: [],
13109
+ rewardedCash: true,
13035
13110
  };
13036
- const pending$1 = {
13037
- statuses: ["PENDING"],
13038
- };
13039
- const processingPFT = {
13040
- partnerFundsTransfer: {
13041
- id: "123",
13042
- status: null,
13043
- dateCreated: 1355612521321,
13044
- dateScheduled: 2779257600000,
13045
- dateTransferred: null,
13111
+ // ============================================================
13112
+ // Reusable tax connections
13113
+ // ============================================================
13114
+ const fullySetupTaxConnection$1 = {
13115
+ connected: true,
13116
+ taxHandlingEnabled: true,
13117
+ connectionStatus: "COMPLETED",
13118
+ publisher: {
13119
+ requiredTaxDocumentType: "W9",
13120
+ currentTaxDocument: {
13121
+ status: "ACTIVE",
13122
+ type: "W9",
13123
+ dateCreated: PAST$1,
13124
+ },
13125
+ withdrawalSettings: { paymentMethod: "BANK_TRANSFER" },
13126
+ payoutsAccount: null,
13046
13127
  },
13047
13128
  };
13048
- const taxConnection$1 = {
13129
+ const connectedNoWithdrawalSettings$1 = {
13049
13130
  connected: true,
13050
13131
  taxHandlingEnabled: true,
13051
- connectionStatus: "NOT_STARTED",
13132
+ connectionStatus: "COMPLETED",
13052
13133
  publisher: {
13053
- requiredTaxDocumentType: "W8BEN",
13134
+ requiredTaxDocumentType: "W9",
13054
13135
  currentTaxDocument: {
13055
- status: "NOT_VERIFIED",
13056
- type: "W8BEN",
13057
- dateCreated: 321321487,
13058
- },
13059
- withdrawalSettings: {
13060
- paymentMethod: "BANK_TRANSFER",
13136
+ status: "ACTIVE",
13137
+ type: "W9",
13138
+ dateCreated: PAST$1,
13061
13139
  },
13140
+ withdrawalSettings: null,
13062
13141
  payoutsAccount: null,
13063
13142
  },
13064
13143
  };
13065
- const CashReward$1 = () => {
13066
- return (index.h("sqm-rewards-table-reward-cell", { reward: { ...cashReward$1 }, availableText: "{availableAmount} remaining" }));
13067
- };
13068
- const StatusCellPendingTaxReview = () => {
13069
- return (index.h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: { ...cashReward$1, ...pending$1, pendingReasons: ["US_TAX"] }, taxConnection: {
13070
- ...taxConnection$1,
13071
- publisher: {
13072
- requiredTaxDocumentType: "W8BEN",
13073
- currentTaxDocument: {
13074
- status: "",
13075
- },
13076
- ...taxConnection$1.publisher,
13077
- },
13078
- } }));
13079
- };
13080
- const StatusCellPendingNewTaxForm = () => {
13081
- return (index.h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: {
13082
- ...cashReward$1,
13083
- statuses: ["PENDING"],
13084
- pendingReasons: ["US_TAX"],
13085
- }, taxConnection: {
13086
- connected: true,
13087
- taxHandlingEnabled: true,
13088
- publisher: {
13089
- requiredTaxDocumentType: "W8BEN",
13090
- withdrawalSettings: {
13091
- paymentMethod: "BANK_TRANSFER",
13092
- },
13093
- payoutsAccount: null,
13094
- currentTaxDocument: {
13095
- status: "INACTIVE",
13096
- type: "W8BEN",
13097
- dateCreated: 321321487,
13098
- },
13099
- },
13100
- } }));
13101
- };
13102
- const StatusCellPendingTaxSubmission = () => {
13103
- return (index.h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: { ...cashReward$1, ...pending$1, pendingReasons: ["US_TAX"] }, taxConnection: {
13104
- ...taxConnection$1,
13105
- publisher: {
13106
- ...taxConnection$1.publisher,
13107
- requiredTaxDocumentType: "W8BEN",
13108
- currentTaxDocument: null,
13109
- },
13110
- } }));
13111
- };
13112
- const StatusCellPartnerCreatedSetupStartedButIncomplete = () => {
13113
- return (index.h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: {
13114
- ...cashReward$1,
13115
- ...pending$1,
13116
- pendingReasons: ["US_TAX"],
13117
- }, taxConnection: {
13118
- ...taxConnection$1,
13119
- connected: false,
13120
- } }));
13121
- };
13122
- const StatusCellPartnerNotCreatedSetupNotStarted = () => {
13123
- return (index.h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: {
13124
- ...cashReward$1,
13125
- ...pending$1,
13126
- pendingReasons: ["US_TAX"],
13127
- }, taxConnection: {
13128
- ...taxConnection$1,
13129
- connected: false,
13130
- } }));
13131
- };
13132
- const StatusCellPendingW9 = () => {
13133
- return (index.h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: {
13134
- ...cashReward$1,
13135
- ...pending$1,
13136
- pendingReasons: ["US_TAX"],
13137
- }, taxConnection: {
13138
- ...taxConnection$1,
13139
- taxHandlingEnabled: false,
13140
- } }));
13141
- };
13142
- const StatusCellPayoutSent = () => {
13143
- return (index.h("sqm-rewards-table-status-cell", { statusText: "Payout Sent", reward: {
13144
- ...cashReward$1,
13145
- partnerFundsTransfer: {
13146
- id: "transfer-123",
13147
- status: "TRANSFERRED",
13148
- dateScheduled: 1640995200000,
13149
- dateTransferred: 1640995200000,
13150
- dateCreated: 1640995200000,
13151
- },
13152
- }, taxConnection: taxConnection$1 }));
13153
- };
13154
- const StatusCellPayoutFailed = () => {
13155
- return (index.h("sqm-rewards-table-status-cell", { statusText: "Payout Failed", reward: {
13156
- ...cashReward$1,
13157
- partnerFundsTransfer: {
13158
- id: "transfer-failed",
13159
- status: "OVERDUE",
13160
- dateScheduled: 1640995200000,
13161
- dateTransferred: null,
13162
- dateCreated: 1640995200000,
13144
+ const notConnectedTaxConnection$1 = {
13145
+ connected: false,
13146
+ taxHandlingEnabled: true,
13147
+ connectionStatus: "NOT_STARTED",
13148
+ publisher: null,
13149
+ };
13150
+ // ============================================================
13151
+ // Reward Cell (kept from original)
13152
+ // ============================================================
13153
+ const CashReward$1 = () => (index.h("sqm-rewards-table-reward-cell", { reward: { ...cashReward$1, statuses: ["REDEEMED"], dateRedeemed: PAST$1 }, availableText: "{availableAmount} remaining" }));
13154
+ // ============================================================
13155
+ // STATUS PRECEDENCE LADDER — one story per rule
13156
+ // (See sqm-rewards-table-status-column-new.feature § 2)
13157
+ // ============================================================
13158
+ // 1. Fraud check denied the referral → status is Denied
13159
+ const StatusCellFraudDenied = () => (index.h("sqm-rewards-table-status-cell", { statusText: "Denied", reward: {
13160
+ ...cashReward$1,
13161
+ referral: { fraudData: { moderationStatus: "DENIED" } },
13162
+ }, taxConnection: fullySetupTaxConnection$1 }));
13163
+ // 2. Fraud check is still pending review → status is Pending Review
13164
+ const StatusCellFraudPendingReview = () => (index.h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: {
13165
+ ...cashReward$1,
13166
+ referral: { fraudData: { moderationStatus: "PENDING" } },
13167
+ }, taxConnection: fullySetupTaxConnection$1 }));
13168
+ // 3. Partner funds transfer was reversed → status is Payout Cancelled
13169
+ const StatusCellPayoutCancelled = () => (index.h("sqm-rewards-table-status-cell", { statusText: "Payout Cancelled", reward: {
13170
+ ...cashReward$1,
13171
+ partnerFundsTransfer: {
13172
+ id: "pft-reversed",
13173
+ status: "REVERSED",
13174
+ dateCreated: PAST$1,
13175
+ dateScheduled: PAST$1,
13176
+ dateTransferred: null,
13177
+ },
13178
+ }, taxConnection: fullySetupTaxConnection$1 }));
13179
+ // 4. Partner funds transfer is overdue → status is Payout Failed
13180
+ const StatusCellPayoutFailed = () => (index.h("sqm-rewards-table-status-cell", { statusText: "Payout Failed", reward: {
13181
+ ...cashReward$1,
13182
+ partnerFundsTransfer: {
13183
+ id: "pft-overdue",
13184
+ status: "OVERDUE",
13185
+ dateCreated: PAST$1,
13186
+ dateScheduled: PAST$1,
13187
+ dateTransferred: null,
13188
+ },
13189
+ }, taxConnection: fullySetupTaxConnection$1 }));
13190
+ // 5. Connected partner has not finished withdrawal settings setup → status is Pending
13191
+ const StatusCellPartnerCreatedSetupStartedButIncomplete = () => (index.h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: {
13192
+ ...cashReward$1,
13193
+ partnerFundsTransfer: {
13194
+ id: "pft-not-yet-due",
13195
+ status: "NOT_YET_DUE",
13196
+ dateCreated: PAST$1,
13197
+ dateScheduled: FUTURE$1,
13198
+ dateTransferred: null,
13199
+ },
13200
+ }, taxConnection: connectedNoWithdrawalSettings$1 }));
13201
+ // Reward is pending US_TAX and the partner has not been created yet → shows the partner-setup prompt
13202
+ const StatusCellPartnerNotCreatedSetupNotStarted = () => (index.h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: {
13203
+ ...cashReward$1,
13204
+ statuses: ["PENDING"],
13205
+ pendingReasons: ["US_TAX"],
13206
+ }, taxConnection: notConnectedTaxConnection$1 }));
13207
+ // 6. Reward has MISSING_PAYOUT_CONFIGURATION pending reason and no withdrawal settings → status is Pending
13208
+ const StatusCellMissingPayoutConfiguration = () => (index.h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: {
13209
+ ...cashReward$1,
13210
+ statuses: ["PENDING"],
13211
+ pendingReasons: ["MISSING_PAYOUT_CONFIGURATION"],
13212
+ }, taxConnection: connectedNoWithdrawalSettings$1 }));
13213
+ // 7. Partner funds transfer is scheduled for a future date → status is Processing
13214
+ const StatusCellPayoutProcessing = () => (index.h("sqm-rewards-table-status-cell", { statusText: "Processing", reward: {
13215
+ ...cashReward$1,
13216
+ partnerFundsTransfer: {
13217
+ id: "pft-processing",
13218
+ status: null,
13219
+ dateCreated: PAST$1,
13220
+ dateScheduled: FUTURE$1,
13221
+ dateTransferred: null,
13222
+ },
13223
+ }, taxConnection: fullySetupTaxConnection$1 }));
13224
+ // 8. Partner funds transfer has been transferred → status is Payout Approved
13225
+ const StatusCellPayoutApproved = () => (index.h("sqm-rewards-table-status-cell", { statusText: "Payout Approved", reward: {
13226
+ ...cashReward$1,
13227
+ partnerFundsTransfer: {
13228
+ id: "pft-transferred",
13229
+ status: "TRANSFERRED",
13230
+ dateCreated: PAST$1,
13231
+ dateScheduled: PAST$1,
13232
+ dateTransferred: PAST$1,
13233
+ },
13234
+ }, taxConnection: fullySetupTaxConnection$1 }));
13235
+ // 9. Reward has a cancellation date set → status is Cancelled
13236
+ const StatusCellRewardCancelled = () => (index.h("sqm-rewards-table-status-cell", { statusText: "Cancelled", reward: {
13237
+ ...cashReward$1,
13238
+ statuses: ["CANCELLED"],
13239
+ dateCancelled: PAST$1,
13240
+ }, taxConnection: fullySetupTaxConnection$1 }));
13241
+ // 10. Reward statuses include EXPIRED → status is Expired
13242
+ const StatusCellRewardExpired = () => (index.h("sqm-rewards-table-status-cell", { statusText: "Expired", reward: {
13243
+ ...cashReward$1,
13244
+ statuses: ["EXPIRED"],
13245
+ dateExpires: PAST$1,
13246
+ }, taxConnection: fullySetupTaxConnection$1 }));
13247
+ // 11. Reward is pending and scheduled for a future date → status is Pending with the scheduled date shown
13248
+ const StatusCellPendingScheduled$1 = () => (index.h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: {
13249
+ ...cashReward$1,
13250
+ statuses: ["PENDING"],
13251
+ pendingReasons: ["SCHEDULED"],
13252
+ dateScheduledFor: FUTURE$1,
13253
+ }, taxConnection: fullySetupTaxConnection$1 }));
13254
+ // 12. Reward does not match any precedence rule → no badge text, no description
13255
+ const StatusCellNoMatchingRule = () => (index.h("sqm-rewards-table-status-cell", { statusText: "", reward: {
13256
+ ...cashReward$1,
13257
+ statuses: [],
13258
+ }, taxConnection: fullySetupTaxConnection$1 }));
13259
+ // ============================================================
13260
+ // US_TAX getTaxPendingReasons branches (Pending Description Resolution § 5)
13261
+ // ============================================================
13262
+ // Reward is pending US_TAX but tax handling is disabled → shows "W-9 required"
13263
+ const StatusCellPendingW9Required = () => (index.h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: {
13264
+ ...cashReward$1,
13265
+ statuses: ["PENDING"],
13266
+ pendingReasons: ["US_TAX"],
13267
+ }, taxConnection: { ...fullySetupTaxConnection$1, taxHandlingEnabled: false } }));
13268
+ // Partner is connected but has not submitted any tax documents → shows the submit-tax-docs prompt
13269
+ const StatusCellPendingTaxSubmission = () => (index.h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: {
13270
+ ...cashReward$1,
13271
+ statuses: ["PENDING"],
13272
+ pendingReasons: ["US_TAX"],
13273
+ }, taxConnection: {
13274
+ ...fullySetupTaxConnection$1,
13275
+ publisher: {
13276
+ ...fullySetupTaxConnection$1.publisher,
13277
+ currentTaxDocument: null,
13278
+ },
13279
+ } }));
13280
+ // Partner's tax document is inactive (rejected) → shows the submit-a-new-form prompt
13281
+ const StatusCellPendingNewTaxForm = () => (index.h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: {
13282
+ ...cashReward$1,
13283
+ statuses: ["PENDING"],
13284
+ pendingReasons: ["US_TAX"],
13285
+ }, taxConnection: {
13286
+ ...fullySetupTaxConnection$1,
13287
+ publisher: {
13288
+ ...fullySetupTaxConnection$1.publisher,
13289
+ currentTaxDocument: {
13290
+ status: "INACTIVE",
13291
+ type: "W9",
13292
+ dateCreated: PAST$1,
13163
13293
  },
13164
- } }));
13165
- };
13166
- const StatusCellPayoutProcessing = () => {
13167
- return (index.h("sqm-rewards-table-status-cell", { statusText: "Payment Processing", reward: { ...cashReward$1, ...processingPFT } }));
13168
- };
13169
- const StatusCellPayoutCancelled = () => {
13170
- return (index.h("sqm-rewards-table-status-cell", { statusText: "Payout Cancelled", reward: {
13171
- ...cashReward$1,
13172
- partnerFundsTransfer: {
13173
- id: "transfer-reversed",
13174
- status: "REVERSED",
13175
- dateScheduled: 1640995200000,
13176
- dateTransferred: null,
13177
- dateCreated: 1640995200000,
13294
+ },
13295
+ } }));
13296
+ // Partner's tax document is awaiting verification → shows the awaiting-review prompt
13297
+ const StatusCellPendingTaxReview = () => (index.h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: {
13298
+ ...cashReward$1,
13299
+ statuses: ["PENDING"],
13300
+ pendingReasons: ["US_TAX"],
13301
+ }, taxConnection: {
13302
+ ...fullySetupTaxConnection$1,
13303
+ publisher: {
13304
+ ...fullySetupTaxConnection$1.publisher,
13305
+ currentTaxDocument: {
13306
+ status: "NOT_VERIFIED",
13307
+ type: "W9",
13308
+ dateCreated: PAST$1,
13178
13309
  },
13179
- } }));
13180
- };
13310
+ },
13311
+ } }));
13312
+ // Partner has an active tax form but has not configured withdrawal settings → shows the partner-setup prompt
13313
+ const StatusCellExistingTaxFormNoWithdrawalSettings = () => (index.h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: {
13314
+ ...cashReward$1,
13315
+ statuses: ["PENDING"],
13316
+ pendingReasons: ["US_TAX"],
13317
+ }, taxConnection: connectedNoWithdrawalSettings$1 }));
13318
+ // Partner is connected, no tax form is required, but withdrawal settings are not submitted → shows the partner-setup prompt
13319
+ const StatusCellConnectedNoTaxRequiredNoWithdrawalSettings = () => (index.h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: {
13320
+ ...cashReward$1,
13321
+ statuses: ["PENDING"],
13322
+ pendingReasons: [],
13323
+ }, taxConnection: {
13324
+ connected: true,
13325
+ taxHandlingEnabled: true,
13326
+ connectionStatus: "COMPLETED",
13327
+ publisher: {
13328
+ requiredTaxDocumentType: null,
13329
+ currentTaxDocument: null,
13330
+ withdrawalSettings: null,
13331
+ payoutsAccount: null,
13332
+ },
13333
+ } }));
13334
+ // Aliases kept for the table-level stories file
13335
+ const StatusCellPayoutSent = StatusCellPayoutApproved;
13336
+ const StatusCellPendingW9 = StatusCellPendingW9Required;
13181
13337
 
13182
13338
  const TaxAndCashRewardsTableCell = /*#__PURE__*/Object.freeze({
13183
13339
  __proto__: null,
13184
13340
  'default': TaxAndCashRewardsTableCell_stories,
13185
13341
  CashReward: CashReward$1,
13186
- StatusCellPendingTaxReview: StatusCellPendingTaxReview,
13187
- StatusCellPendingNewTaxForm: StatusCellPendingNewTaxForm,
13188
- StatusCellPendingTaxSubmission: StatusCellPendingTaxSubmission,
13342
+ StatusCellFraudDenied: StatusCellFraudDenied,
13343
+ StatusCellFraudPendingReview: StatusCellFraudPendingReview,
13344
+ StatusCellPayoutCancelled: StatusCellPayoutCancelled,
13345
+ StatusCellPayoutFailed: StatusCellPayoutFailed,
13189
13346
  StatusCellPartnerCreatedSetupStartedButIncomplete: StatusCellPartnerCreatedSetupStartedButIncomplete,
13190
13347
  StatusCellPartnerNotCreatedSetupNotStarted: StatusCellPartnerNotCreatedSetupNotStarted,
13191
- StatusCellPendingW9: StatusCellPendingW9,
13192
- StatusCellPayoutSent: StatusCellPayoutSent,
13193
- StatusCellPayoutFailed: StatusCellPayoutFailed,
13348
+ StatusCellMissingPayoutConfiguration: StatusCellMissingPayoutConfiguration,
13194
13349
  StatusCellPayoutProcessing: StatusCellPayoutProcessing,
13195
- StatusCellPayoutCancelled: StatusCellPayoutCancelled
13350
+ StatusCellPayoutApproved: StatusCellPayoutApproved,
13351
+ StatusCellRewardCancelled: StatusCellRewardCancelled,
13352
+ StatusCellRewardExpired: StatusCellRewardExpired,
13353
+ StatusCellPendingScheduled: StatusCellPendingScheduled$1,
13354
+ StatusCellNoMatchingRule: StatusCellNoMatchingRule,
13355
+ StatusCellPendingW9Required: StatusCellPendingW9Required,
13356
+ StatusCellPendingTaxSubmission: StatusCellPendingTaxSubmission,
13357
+ StatusCellPendingNewTaxForm: StatusCellPendingNewTaxForm,
13358
+ StatusCellPendingTaxReview: StatusCellPendingTaxReview,
13359
+ StatusCellExistingTaxFormNoWithdrawalSettings: StatusCellExistingTaxFormNoWithdrawalSettings,
13360
+ StatusCellConnectedNoTaxRequiredNoWithdrawalSettings: StatusCellConnectedNoTaxRequiredNoWithdrawalSettings,
13361
+ StatusCellPayoutSent: StatusCellPayoutSent,
13362
+ StatusCellPendingW9: StatusCellPendingW9
13196
13363
  });
13197
13364
 
13198
13365
  const TaxAndCashRewardsTable_stories = {
@@ -18760,6 +18927,7 @@ const defaultText$1 = {
18760
18927
  descriptionNewPartner: "Confirm your country and currency now to get your future rewards faster.",
18761
18928
  descriptionExistingPartner: "We noticed you are already an Impact.com partner, please confirm your information.",
18762
18929
  supportDescriptionExistingPartner: "If this is a mistake, please contact Support or sign up for this referral program with a different email.",
18930
+ supportLink: "Support",
18763
18931
  countryLabel: "Country",
18764
18932
  currencyLabel: "Currency",
18765
18933
  submitButtonLabel: "Submit",
@@ -18884,6 +19052,16 @@ const Closed = () => {
18884
19052
  };
18885
19053
  return index.h(sqmPartnerInfoModalView.PartnerInfoModalView, Object.assign({}, props));
18886
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
+ };
18887
19065
 
18888
19066
  const PartnerInfoModal = /*#__PURE__*/Object.freeze({
18889
19067
  __proto__: null,
@@ -18896,7 +19074,9 @@ const PartnerInfoModal = /*#__PURE__*/Object.freeze({
18896
19074
  Submitting: Submitting,
18897
19075
  WithError: WithError$3,
18898
19076
  ValidationError: ValidationError$1,
18899
- Closed: Closed
19077
+ Closed: Closed,
19078
+ SQMComponentExistingPartner: SQMComponentExistingPartner,
19079
+ SQMComponentNewPartner: SQMComponentNewPartner
18900
19080
  });
18901
19081
 
18902
19082
  const WidgetVerification_stories = {