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

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