@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.
- package/dist/cjs/sqm-referral-table_11.cjs.entry.js +27 -9
- package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +30 -9
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +470 -303
- package/dist/collection/components/sqm-referral-table/ReferralTable.stories.js +1 -0
- package/dist/collection/components/sqm-referral-table/ReferralTableRewardsCell.stories.js +1 -0
- package/dist/collection/components/sqm-referral-table/TaxAndCashReferralTableRewardsCell.stories.js +209 -157
- package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.js +30 -10
- package/dist/collection/components/sqm-rewards-table/RewardsTableCell.stories.js +1 -0
- package/dist/collection/components/sqm-rewards-table/TaxAndCashRewardsTableCell.stories.js +223 -148
- package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-status-cell.js +30 -10
- package/dist/collection/components/sqm-rewards-table/useRewardsTable.js +1 -0
- package/dist/esm/sqm-referral-table_11.entry.js +27 -9
- package/dist/esm/sqm-rewards-table_9.entry.js +30 -9
- package/dist/esm/sqm-stencilbook.entry.js +470 -303
- package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/p-162da001.system.entry.js +1 -0
- package/dist/mint-components/p-1c413a06.system.js +1 -1
- package/dist/mint-components/p-1f76371b.entry.js +9 -0
- package/dist/mint-components/p-bdf858c3.entry.js +1 -0
- package/dist/mint-components/{p-9e43f1eb.entry.js → p-be5ecf62.entry.js} +3 -2
- package/dist/mint-components/p-d3ac8246.system.entry.js +1 -0
- package/dist/mint-components/{p-0b2a428f.system.entry.js → p-e83d08d7.system.entry.js} +1 -1
- package/dist/types/components/sqm-referral-table/TaxAndCashReferralTableRewardsCell.stories.d.ts +16 -0
- package/dist/types/components/sqm-rewards-table/TaxAndCashRewardsTableCell.stories.d.ts +18 -7
- package/dist/types/saasquatch.d.ts +1 -0
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/package.json +1 -1
- package/dist/mint-components/p-55627a5c.entry.js +0 -1
- package/dist/mint-components/p-7a744cb2.entry.js +0 -9
- package/dist/mint-components/p-d01949f7.system.entry.js +0 -1
- 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
|
-
|
|
11811
|
-
|
|
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:
|
|
11823
|
-
dateExpires:
|
|
11824
|
-
dateCancelled:
|
|
11825
|
-
dateRedeemed:
|
|
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: [
|
|
11829
|
+
statuses: [],
|
|
11831
11830
|
globalRewardKey: "Key",
|
|
11832
11831
|
rewardRedemptionTransactions: null,
|
|
11833
11832
|
partnerFundsTransfer: null,
|
|
11833
|
+
rewardedCash: true,
|
|
11834
11834
|
};
|
|
11835
|
-
|
|
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:
|
|
11860
|
+
dateCreated: PAST,
|
|
11846
11861
|
},
|
|
11862
|
+
withdrawalSettings: null,
|
|
11863
|
+
payoutsAccount: null,
|
|
11847
11864
|
},
|
|
11848
11865
|
};
|
|
11849
|
-
const
|
|
11850
|
-
|
|
11851
|
-
|
|
11852
|
-
|
|
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
|
|
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
|
-
|
|
11868
|
-
|
|
11869
|
-
|
|
11870
|
-
|
|
11871
|
-
|
|
11872
|
-
|
|
11873
|
-
|
|
11874
|
-
|
|
11875
|
-
|
|
11876
|
-
|
|
11877
|
-
|
|
11878
|
-
|
|
11879
|
-
|
|
11880
|
-
|
|
11881
|
-
|
|
11882
|
-
|
|
11883
|
-
|
|
11884
|
-
|
|
11885
|
-
|
|
11886
|
-
|
|
11887
|
-
|
|
11888
|
-
|
|
11889
|
-
|
|
11890
|
-
|
|
11891
|
-
|
|
11892
|
-
|
|
11893
|
-
|
|
11894
|
-
|
|
11895
|
-
|
|
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
|
-
|
|
11944
|
-
|
|
11945
|
-
|
|
11946
|
-
|
|
11947
|
-
|
|
11948
|
-
|
|
11949
|
-
|
|
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
|
-
}
|
|
11953
|
-
};
|
|
11954
|
-
|
|
11955
|
-
|
|
11956
|
-
|
|
11957
|
-
|
|
11958
|
-
|
|
11959
|
-
|
|
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
|
-
|
|
11962
|
-
|
|
11963
|
-
|
|
11964
|
-
|
|
11965
|
-
|
|
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
|
-
}
|
|
11968
|
-
};
|
|
11969
|
-
|
|
11970
|
-
|
|
11971
|
-
|
|
11972
|
-
|
|
11973
|
-
|
|
11974
|
-
|
|
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
|
-
|
|
11977
|
-
|
|
11978
|
-
|
|
11979
|
-
|
|
11980
|
-
|
|
11981
|
-
|
|
11982
|
-
|
|
11983
|
-
|
|
11984
|
-
|
|
11985
|
-
|
|
11986
|
-
|
|
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
|
-
|
|
11989
|
-
|
|
11990
|
-
|
|
11991
|
-
|
|
11992
|
-
|
|
11993
|
-
|
|
11994
|
-
|
|
11995
|
-
|
|
11996
|
-
|
|
11997
|
-
|
|
11998
|
-
|
|
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
|
-
|
|
12001
|
-
|
|
12002
|
-
|
|
12003
|
-
|
|
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
|
|
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:
|
|
12987
|
-
dateScheduledFor:
|
|
12988
|
-
dateGiven:
|
|
13060
|
+
dateCreated: PAST$1,
|
|
13061
|
+
dateScheduledFor: null,
|
|
13062
|
+
dateGiven: PAST$1,
|
|
12989
13063
|
dateExpires: null,
|
|
12990
13064
|
dateCancelled: null,
|
|
12991
|
-
dateRedeemed:
|
|
12992
|
-
dateModified:
|
|
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: [
|
|
13099
|
+
statuses: [],
|
|
13026
13100
|
rewardRedemptionTransactions: {
|
|
13027
13101
|
data: null,
|
|
13028
13102
|
},
|
|
13029
13103
|
exchangedRewardRedemptionTransaction: null,
|
|
13030
13104
|
pendingReasons: [],
|
|
13105
|
+
rewardedCash: true,
|
|
13031
13106
|
};
|
|
13032
|
-
|
|
13033
|
-
|
|
13034
|
-
|
|
13035
|
-
const
|
|
13036
|
-
|
|
13037
|
-
|
|
13038
|
-
|
|
13039
|
-
|
|
13040
|
-
|
|
13041
|
-
|
|
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
|
|
13125
|
+
const connectedNoWithdrawalSettings$1 = {
|
|
13045
13126
|
connected: true,
|
|
13046
13127
|
taxHandlingEnabled: true,
|
|
13047
|
-
connectionStatus: "
|
|
13128
|
+
connectionStatus: "COMPLETED",
|
|
13048
13129
|
publisher: {
|
|
13049
|
-
requiredTaxDocumentType: "
|
|
13130
|
+
requiredTaxDocumentType: "W9",
|
|
13050
13131
|
currentTaxDocument: {
|
|
13051
|
-
status: "
|
|
13052
|
-
type: "
|
|
13053
|
-
dateCreated:
|
|
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
|
|
13062
|
-
|
|
13063
|
-
|
|
13064
|
-
|
|
13065
|
-
|
|
13066
|
-
|
|
13067
|
-
|
|
13068
|
-
|
|
13069
|
-
|
|
13070
|
-
|
|
13071
|
-
|
|
13072
|
-
|
|
13073
|
-
|
|
13074
|
-
|
|
13075
|
-
|
|
13076
|
-
const
|
|
13077
|
-
|
|
13078
|
-
|
|
13079
|
-
|
|
13080
|
-
|
|
13081
|
-
|
|
13082
|
-
|
|
13083
|
-
|
|
13084
|
-
|
|
13085
|
-
|
|
13086
|
-
|
|
13087
|
-
|
|
13088
|
-
|
|
13089
|
-
|
|
13090
|
-
|
|
13091
|
-
|
|
13092
|
-
|
|
13093
|
-
|
|
13094
|
-
|
|
13095
|
-
|
|
13096
|
-
|
|
13097
|
-
|
|
13098
|
-
|
|
13099
|
-
|
|
13100
|
-
|
|
13101
|
-
|
|
13102
|
-
|
|
13103
|
-
|
|
13104
|
-
|
|
13105
|
-
|
|
13106
|
-
|
|
13107
|
-
|
|
13108
|
-
const StatusCellPartnerCreatedSetupStartedButIncomplete = () => {
|
|
13109
|
-
|
|
13110
|
-
|
|
13111
|
-
|
|
13112
|
-
|
|
13113
|
-
|
|
13114
|
-
|
|
13115
|
-
|
|
13116
|
-
}
|
|
13117
|
-
};
|
|
13118
|
-
|
|
13119
|
-
|
|
13120
|
-
|
|
13121
|
-
|
|
13122
|
-
|
|
13123
|
-
|
|
13124
|
-
|
|
13125
|
-
|
|
13126
|
-
|
|
13127
|
-
|
|
13128
|
-
|
|
13129
|
-
|
|
13130
|
-
|
|
13131
|
-
|
|
13132
|
-
|
|
13133
|
-
|
|
13134
|
-
|
|
13135
|
-
|
|
13136
|
-
|
|
13137
|
-
|
|
13138
|
-
|
|
13139
|
-
|
|
13140
|
-
|
|
13141
|
-
|
|
13142
|
-
|
|
13143
|
-
|
|
13144
|
-
|
|
13145
|
-
|
|
13146
|
-
|
|
13147
|
-
|
|
13148
|
-
|
|
13149
|
-
|
|
13150
|
-
|
|
13151
|
-
|
|
13152
|
-
|
|
13153
|
-
|
|
13154
|
-
|
|
13155
|
-
|
|
13156
|
-
|
|
13157
|
-
|
|
13158
|
-
|
|
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
|
-
|
|
13163
|
-
|
|
13164
|
-
|
|
13165
|
-
|
|
13166
|
-
|
|
13167
|
-
|
|
13168
|
-
|
|
13169
|
-
|
|
13170
|
-
|
|
13171
|
-
|
|
13172
|
-
|
|
13173
|
-
|
|
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
|
-
|
|
13183
|
-
|
|
13184
|
-
|
|
13338
|
+
StatusCellFraudDenied: StatusCellFraudDenied,
|
|
13339
|
+
StatusCellFraudPendingReview: StatusCellFraudPendingReview,
|
|
13340
|
+
StatusCellPayoutCancelled: StatusCellPayoutCancelled,
|
|
13341
|
+
StatusCellPayoutFailed: StatusCellPayoutFailed,
|
|
13185
13342
|
StatusCellPartnerCreatedSetupStartedButIncomplete: StatusCellPartnerCreatedSetupStartedButIncomplete,
|
|
13186
13343
|
StatusCellPartnerNotCreatedSetupNotStarted: StatusCellPartnerNotCreatedSetupNotStarted,
|
|
13187
|
-
|
|
13188
|
-
StatusCellPayoutSent: StatusCellPayoutSent,
|
|
13189
|
-
StatusCellPayoutFailed: StatusCellPayoutFailed,
|
|
13344
|
+
StatusCellMissingPayoutConfiguration: StatusCellMissingPayoutConfiguration,
|
|
13190
13345
|
StatusCellPayoutProcessing: StatusCellPayoutProcessing,
|
|
13191
|
-
|
|
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 = {
|