@saasquatch/mint-components 2.0.10 → 2.0.11-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 (80) hide show
  1. package/dist/cjs/{data-24028727.js → data-62fc9ba5.js} +3 -0
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/mint-components.cjs.js +1 -1
  4. package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +3 -3
  5. package/dist/cjs/sqm-big-stat_49.cjs.entry.js +1 -1
  6. package/dist/cjs/sqm-referral-table_11.cjs.entry.js +23 -13
  7. package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +35 -10
  8. package/dist/cjs/sqm-stencilbook.cjs.entry.js +785 -270
  9. package/dist/cjs/{sqm-user-info-form-view-c14ba407.js → sqm-user-info-form-view-a61124db.js} +1 -1
  10. package/dist/cjs/{useReferralTable-90d4d6e9.js → useReferralTable-d0c7097e.js} +6 -0
  11. package/dist/collection/components/sqm-referral-table/TaxAndCashReferralTable.stories.js +97 -0
  12. package/dist/collection/components/sqm-referral-table/TaxAndCashReferralTableRewardsCell.stories.js +188 -0
  13. package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.js +28 -15
  14. package/dist/collection/components/sqm-referral-table/useReferralTable.js +6 -0
  15. package/dist/collection/components/sqm-rewards-table/RewardsTable.stories.js +1 -43
  16. package/dist/collection/components/sqm-rewards-table/RewardsTableCell.stories.js +91 -61
  17. package/dist/collection/components/sqm-rewards-table/TaxAndCashRewardsTable.stories.js +113 -0
  18. package/dist/collection/components/sqm-rewards-table/TaxAndCashRewardsTableCell.stories.js +213 -0
  19. package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-status-cell.js +49 -9
  20. package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-status-column.js +2 -2
  21. package/dist/collection/components/sqm-rewards-table/useRewardsTable.js +3 -0
  22. package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +9 -1
  23. package/dist/collection/components/tax-and-cash/data.js +3 -0
  24. package/dist/esm/{data-f2f77358.js → data-4a551ba6.js} +3 -0
  25. package/dist/esm/loader.js +1 -1
  26. package/dist/esm/mint-components.js +1 -1
  27. package/dist/esm/sqm-banking-info-form_10.entry.js +3 -3
  28. package/dist/esm/sqm-big-stat_49.entry.js +1 -1
  29. package/dist/esm/sqm-referral-table_11.entry.js +23 -13
  30. package/dist/esm/sqm-rewards-table_9.entry.js +35 -10
  31. package/dist/esm/sqm-stencilbook.entry.js +785 -270
  32. package/dist/esm/{sqm-user-info-form-view-0a8999d0.js → sqm-user-info-form-view-74dcb6d0.js} +1 -1
  33. package/dist/esm/{useReferralTable-8e0acee0.js → useReferralTable-8128f0b2.js} +6 -0
  34. package/dist/esm-es5/data-4a551ba6.js +1 -0
  35. package/dist/esm-es5/loader.js +1 -1
  36. package/dist/esm-es5/mint-components.js +1 -1
  37. package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
  38. package/dist/esm-es5/sqm-big-stat_49.entry.js +1 -1
  39. package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
  40. package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
  41. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  42. package/dist/esm-es5/{sqm-user-info-form-view-0a8999d0.js → sqm-user-info-form-view-74dcb6d0.js} +1 -1
  43. package/dist/esm-es5/useReferralTable-8128f0b2.js +1 -0
  44. package/dist/mint-components/mint-components.esm.js +1 -1
  45. package/dist/mint-components/p-1086ca86.system.entry.js +1 -0
  46. package/dist/mint-components/{p-4d60b275.entry.js → p-190769c2.entry.js} +2 -2
  47. package/dist/mint-components/{p-704c903b.system.entry.js → p-25474a76.system.entry.js} +1 -1
  48. package/dist/mint-components/{p-50eaba5b.system.entry.js → p-25703088.system.entry.js} +1 -1
  49. package/dist/mint-components/{p-10ad4cec.js → p-4df0492c.js} +7 -1
  50. package/dist/mint-components/p-517c454d.entry.js +147 -0
  51. package/dist/mint-components/{p-cbeab288.js → p-68be450f.js} +1 -1
  52. package/dist/mint-components/p-68e65602.system.js +1 -0
  53. package/dist/mint-components/p-9c116b6b.entry.js +1 -0
  54. package/dist/mint-components/p-af123d2b.system.js +1 -1
  55. package/dist/mint-components/p-c0f50724.system.entry.js +1 -0
  56. package/dist/mint-components/{p-fb8927aa.js → p-c2e5108e.js} +8 -5
  57. package/dist/mint-components/{p-d0a256b8.entry.js → p-d693782f.entry.js} +1 -1
  58. package/dist/mint-components/p-e599f3fb.system.js +1 -0
  59. package/dist/mint-components/{p-78fc0c3c.entry.js → p-e971050e.entry.js} +1 -1
  60. package/dist/mint-components/{p-55f1801e.system.entry.js → p-ef8b63cd.system.entry.js} +1 -1
  61. package/dist/mint-components/{p-33e1a29e.system.js → p-f61005ce.system.js} +1 -1
  62. package/dist/types/components/sqm-referral-table/TaxAndCashReferralTable.stories.d.ts +5 -0
  63. package/dist/types/components/sqm-referral-table/TaxAndCashReferralTableRewardsCell.stories.d.ts +14 -0
  64. package/dist/types/components/sqm-rewards-table/RewardsTableCell.stories.d.ts +0 -7
  65. package/dist/types/components/sqm-rewards-table/TaxAndCashRewardsTable.stories.d.ts +5 -0
  66. package/dist/types/components/sqm-rewards-table/TaxAndCashRewardsTableCell.stories.d.ts +14 -0
  67. package/dist/types/components/sqm-rewards-table/cells/sqm-rewards-table-status-cell.d.ts +1 -0
  68. package/dist/types/components.d.ts +2 -0
  69. package/docs/docs.docx +0 -0
  70. package/docs/raisins.json +1 -1
  71. package/grapesjs/grapesjs.js +1 -1
  72. package/package.json +1 -1
  73. package/dist/esm-es5/data-f2f77358.js +0 -1
  74. package/dist/esm-es5/useReferralTable-8e0acee0.js +0 -1
  75. package/dist/mint-components/p-342921b9.system.js +0 -1
  76. package/dist/mint-components/p-636a841f.entry.js +0 -1
  77. package/dist/mint-components/p-63a928e0.system.entry.js +0 -1
  78. package/dist/mint-components/p-98e0a022.system.js +0 -1
  79. package/dist/mint-components/p-9d19a0f7.system.entry.js +0 -1
  80. package/dist/mint-components/p-f08dd2a8.entry.js +0 -144
@@ -3,7 +3,7 @@
3
3
  const index = require('./index-a43a63b4.js');
4
4
  const global = require('./global-e862bfd4.js');
5
5
  const JSS = require('./JSS-8503a151.js');
6
- const data = require('./data-24028727.js');
6
+ const data = require('./data-62fc9ba5.js');
7
7
 
8
8
  const style = {
9
9
  Description: {
@@ -50,6 +50,9 @@ const GET_REFERRER_DATA = index_module.dist.gql `
50
50
  partnerFundsTransfer {
51
51
  id
52
52
  status
53
+ dateScheduled
54
+ dateCreated
55
+ dateTransferred
53
56
  }
54
57
  meta {
55
58
  status
@@ -157,6 +160,9 @@ const GET_REFERRAL_DATA = index_module.dist.gql `
157
160
  partnerFundsTransfer {
158
161
  id
159
162
  status
163
+ dateScheduled
164
+ dateCreated
165
+ dateTransferred
160
166
  }
161
167
  referral {
162
168
  dateModerated
@@ -0,0 +1,97 @@
1
+ import { h } from "@stencil/core";
2
+ import { GenericTableView } from "../../tables/GenericTableView";
3
+ import { Converted as ConvertedStatus, DateCell, } from "./ReferralTableCell.stories";
4
+ import { PayoutApproved, PayoutProcessing, PayoutFailed, PayoutCancelled, PendingTaxReview, PendingNewTaxForm, PendingTaxSubmission, PendingPartnerCreation, PendingW9, CashReward, } from "./TaxAndCashReferralTableRewardsCell.stories";
5
+ export default {
6
+ title: "Components/Tax And Cash Referral Table",
7
+ };
8
+ const taxAndCashTableProps = {
9
+ states: {
10
+ hasPrev: false,
11
+ hasNext: true,
12
+ show: "rows",
13
+ namespace: "sqm-referral-table",
14
+ },
15
+ data: {
16
+ textOverrides: {
17
+ showLabels: true,
18
+ prevLabel: "Prev",
19
+ moreLabel: "View More",
20
+ },
21
+ hiddenColumns: "",
22
+ mdBreakpoint: 799,
23
+ smBreakpoint: 599,
24
+ },
25
+ callbacks: {
26
+ prevPage: () => console.log("Prev"),
27
+ nextPage: () => console.log("Next"),
28
+ },
29
+ elements: {
30
+ columns: ["Customer", "Status", "Date converted", "Rewards"],
31
+ rows: [
32
+ [
33
+ h("sqm-referral-table-user-cell", { name: "Payout Approved User" }),
34
+ h(ConvertedStatus, null),
35
+ h(DateCell, null),
36
+ h(PayoutApproved, null),
37
+ ],
38
+ [
39
+ h("sqm-referral-table-user-cell", { name: "Payout Failed User" }),
40
+ h(ConvertedStatus, null),
41
+ h(DateCell, null),
42
+ h(PayoutFailed, null),
43
+ ],
44
+ [
45
+ h("sqm-referral-table-user-cell", { name: "Payout Cancelled User" }),
46
+ h(ConvertedStatus, null),
47
+ h(DateCell, null),
48
+ h(PayoutCancelled, null),
49
+ ],
50
+ [
51
+ h("sqm-referral-table-user-cell", { name: "Tax Review User" }),
52
+ h(ConvertedStatus, null),
53
+ h(DateCell, null),
54
+ h(PendingTaxReview, null),
55
+ ],
56
+ [
57
+ h("sqm-referral-table-user-cell", { name: "Payout Processing User" }),
58
+ h(ConvertedStatus, null),
59
+ h(DateCell, null),
60
+ h(PayoutProcessing, null),
61
+ ],
62
+ [
63
+ h("sqm-referral-table-user-cell", { name: "New Tax Form User" }),
64
+ h(ConvertedStatus, null),
65
+ h(DateCell, null),
66
+ h(PendingNewTaxForm, null),
67
+ ],
68
+ [
69
+ h("sqm-referral-table-user-cell", { name: "Tax Submission User" }),
70
+ h(ConvertedStatus, null),
71
+ h(DateCell, null),
72
+ h(PendingTaxSubmission, null),
73
+ ],
74
+ [
75
+ h("sqm-referral-table-user-cell", { name: "Partner Creation User" }),
76
+ h(ConvertedStatus, null),
77
+ h(DateCell, null),
78
+ h(PendingPartnerCreation, null),
79
+ ],
80
+ [
81
+ h("sqm-referral-table-user-cell", { name: "Missing W9 User" }),
82
+ h(ConvertedStatus, null),
83
+ h(DateCell, null),
84
+ h(PendingW9, null),
85
+ ],
86
+ [
87
+ h("sqm-referral-table-user-cell", { name: "Standard Cash User" }),
88
+ h(ConvertedStatus, null),
89
+ h(DateCell, null),
90
+ h(CashReward, null),
91
+ ],
92
+ ],
93
+ },
94
+ };
95
+ export const TaxAndCashReferralTable = () => {
96
+ return h(GenericTableView, Object.assign({}, taxAndCashTableProps));
97
+ };
@@ -0,0 +1,188 @@
1
+ import { h } from "@stencil/core";
2
+ import { DateTime } from "luxon";
3
+ export default {
4
+ title: "Components/Tax And Cash Referral Table Rewards Cell",
5
+ };
6
+ function getDays() {
7
+ return DateTime.now().toMillis() + 600000000;
8
+ }
9
+ function getMonths() {
10
+ return DateTime.now().toMillis() + 10000000000;
11
+ }
12
+ const cashReward = {
13
+ id: "1234",
14
+ type: "CREDIT",
15
+ value: 50,
16
+ unit: "USD",
17
+ name: "test",
18
+ dateScheduledFor: getDays(),
19
+ dateExpires: getMonths(),
20
+ dateCancelled: 134400,
21
+ dateRedeemed: 0,
22
+ fuelTankCode: null,
23
+ fuelTankType: null,
24
+ currency: "USD",
25
+ prettyValue: "$50.00",
26
+ statuses: ["AVAILABLE"],
27
+ globalRewardKey: "Key",
28
+ rewardRedemptionTransactions: null,
29
+ partnerFundsTransfer: null,
30
+ };
31
+ const taxConnection = {
32
+ connected: true,
33
+ taxHandlingEnabled: true,
34
+ publisher: {
35
+ requiredTaxDocumentType: "W9",
36
+ withdrawalSettings: { paymentMethod: "BANK_TRANSFER" },
37
+ payoutsAccount: null,
38
+ currentTaxDocument: {
39
+ status: "ACTIVE",
40
+ type: "W9",
41
+ dateCreated: 1627427794891,
42
+ },
43
+ },
44
+ };
45
+ const defaultPFT = {
46
+ id: "ID1234",
47
+ status: null,
48
+ dateCreated: null,
49
+ dateScheduled: null,
50
+ dateTransferred: null,
51
+ };
52
+ const defaultTaxDocument = {
53
+ status: "NOT_VERIFIED",
54
+ type: "W9",
55
+ dateCreated: DateTime.now().toMillis() - 1000000,
56
+ };
57
+ const defaultProps = {
58
+ 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} }",
59
+ 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 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 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} }",
60
+ rewardReceivedText: "Reward received on",
61
+ hideDetails: false,
62
+ };
63
+ export const CashReward = () => {
64
+ return (h("sqm-referral-table-rewards-cell", Object.assign({ rewards: [{ ...cashReward }], taxConnection: taxConnection }, defaultProps)));
65
+ };
66
+ export const PayoutApproved = () => {
67
+ return (h("sqm-referral-table-rewards-cell", Object.assign({ rewards: [
68
+ {
69
+ ...cashReward,
70
+ partnerFundsTransfer: {
71
+ ...defaultPFT,
72
+ status: "TRANSFERRED",
73
+ dateScheduled: Date.now() - 600000000,
74
+ },
75
+ },
76
+ ], taxConnection: taxConnection }, defaultProps)));
77
+ };
78
+ export const PayoutProcessing = () => {
79
+ return (h("sqm-referral-table-rewards-cell", Object.assign({ rewards: [
80
+ {
81
+ ...cashReward,
82
+ partnerFundsTransfer: {
83
+ ...defaultPFT,
84
+ dateCreated: 1355612521321,
85
+ dateScheduled: getDays(),
86
+ },
87
+ },
88
+ ], taxConnection: taxConnection }, defaultProps)));
89
+ };
90
+ export const PayoutFailed = () => {
91
+ return (h("sqm-referral-table-rewards-cell", Object.assign({ rewards: [
92
+ {
93
+ ...cashReward,
94
+ partnerFundsTransfer: {
95
+ ...defaultPFT,
96
+ status: "OVERDUE",
97
+ dateScheduled: Date.now() - 100000,
98
+ },
99
+ },
100
+ ], taxConnection: taxConnection }, defaultProps)));
101
+ };
102
+ export const PayoutCancelled = () => {
103
+ return (h("sqm-referral-table-rewards-cell", Object.assign({ rewards: [
104
+ {
105
+ ...cashReward,
106
+ partnerFundsTransfer: {
107
+ ...defaultPFT,
108
+ status: "REVERSED",
109
+ dateScheduled: Date.now() - 100000,
110
+ },
111
+ },
112
+ ], taxConnection: taxConnection }, defaultProps)));
113
+ };
114
+ export const PendingTaxReview = () => {
115
+ return (h("sqm-referral-table-rewards-cell", Object.assign({ rewards: [
116
+ {
117
+ ...cashReward,
118
+ statuses: ["PENDING"],
119
+ pendingReasons: ["US_TAX"],
120
+ },
121
+ ], taxConnection: {
122
+ ...taxConnection,
123
+ publisher: {
124
+ ...taxConnection.publisher,
125
+ currentTaxDocument: {
126
+ ...defaultTaxDocument,
127
+ status: "NOT_VERIFIED",
128
+ },
129
+ },
130
+ } }, defaultProps)));
131
+ };
132
+ export const PendingNewTaxForm = () => {
133
+ return (h("sqm-referral-table-rewards-cell", Object.assign({ rewards: [
134
+ {
135
+ ...cashReward,
136
+ statuses: ["PENDING"],
137
+ pendingReasons: ["US_TAX"],
138
+ },
139
+ ], taxConnection: {
140
+ ...taxConnection,
141
+ publisher: {
142
+ ...taxConnection.publisher,
143
+ currentTaxDocument: {
144
+ ...defaultTaxDocument,
145
+ status: "INACTIVE",
146
+ },
147
+ },
148
+ } }, defaultProps)));
149
+ };
150
+ export const PendingTaxSubmission = () => {
151
+ return (h("sqm-referral-table-rewards-cell", Object.assign({ rewards: [
152
+ {
153
+ ...cashReward,
154
+ statuses: ["PENDING"],
155
+ pendingReasons: ["US_TAX"],
156
+ },
157
+ ], taxConnection: {
158
+ ...taxConnection,
159
+ publisher: {
160
+ ...taxConnection.publisher,
161
+ currentTaxDocument: null,
162
+ },
163
+ } }, defaultProps)));
164
+ };
165
+ export const PendingPartnerCreation = () => {
166
+ return (h("sqm-referral-table-rewards-cell", Object.assign({ rewards: [
167
+ {
168
+ ...cashReward,
169
+ statuses: ["PENDING"],
170
+ pendingReasons: ["MISSING_PAYOUT_CONFIGURATION"],
171
+ },
172
+ ], taxConnection: {
173
+ ...taxConnection,
174
+ connected: false,
175
+ } }, defaultProps)));
176
+ };
177
+ export const PendingW9 = () => {
178
+ return (h("sqm-referral-table-rewards-cell", Object.assign({ rewards: [
179
+ {
180
+ ...cashReward,
181
+ statuses: ["PENDING"],
182
+ pendingReasons: ["US_TAX"],
183
+ },
184
+ ], taxConnection: {
185
+ ...taxConnection,
186
+ taxHandlingEnabled: false,
187
+ } }, defaultProps)));
188
+ };
@@ -6,8 +6,9 @@ import { luxonLocale } from "../../../utils/utils";
6
6
  import { TextSpanView } from "../../sqm-text-span/sqm-text-span-view";
7
7
  export class ReferralTableRewardsCell {
8
8
  constructor() {
9
- this.statusText = "{status, select, AVAILABLE {Available} CANCELLED {Cancelled} PENDING {Pending} PENDING_REVIEW {Pending} PAYOUT_APPROVED {Payout Approved} 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} }";
10
- this.statusLongText = "{status, select, AVAILABLE {Reward expiring on} CANCELLED {Reward cancelled on} PENDING {Available on} PENDING_REVIEW {Pending since} PAYOUT_APPROVED {Reward was scheduled for payment based on your settings, barring any account holds.} 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.} 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} }";
9
+ this.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} }";
10
+ this.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} }";
11
+ this.pendingForText = "{status} for {date}";
11
12
  this.locale = "en";
12
13
  }
13
14
  render() {
@@ -129,6 +130,7 @@ export class ReferralTableRewardsCell {
129
130
  "PENDING_NEW_TAX_FORM",
130
131
  "PENDING_TAX_SUBMISSION",
131
132
  "PENDING_PARTNER_CREATION",
133
+ "PROCESSING",
132
134
  ];
133
135
  if (((_b = (_a = reward.referral) === null || _a === void 0 ? void 0 : _a.fraudData) === null || _b === void 0 ? void 0 : _b.moderationStatus) !== "APPROVED") {
134
136
  if (((_d = (_c = reward.referral) === null || _c === void 0 ? void 0 : _c.fraudData) === null || _d === void 0 ? void 0 : _d.moderationStatus) === "PENDING")
@@ -137,14 +139,19 @@ export class ReferralTableRewardsCell {
137
139
  return "DENIED";
138
140
  }
139
141
  const partnerFundsStatus = (_g = reward.partnerFundsTransfer) === null || _g === void 0 ? void 0 : _g.status;
140
- if (partnerFundsStatus === "NOT_YET_DUE" ||
141
- partnerFundsStatus === "TRANSFERRED") {
142
- return "PAYOUT_APPROVED";
142
+ if (reward.partnerFundsTransfer) {
143
+ if (partnerFundsStatus === "REVERSED")
144
+ return "PAYOUT_CANCELLED";
145
+ if (partnerFundsStatus === "OVERDUE")
146
+ return "PAYOUT_FAILED";
147
+ if (reward.partnerFundsTransfer.dateScheduled > Date.now()) {
148
+ return "PROCESSING";
149
+ }
150
+ if (partnerFundsStatus === "TRANSFERRED" ||
151
+ partnerFundsStatus === "NOT_YET_DUE" ||
152
+ reward.partnerFundsTransfer.dateScheduled < Date.now())
153
+ return "PAYOUT_APPROVED";
143
154
  }
144
- else if (partnerFundsStatus === "OVERDUE")
145
- return "PAYOUT_FAILED";
146
- else if (partnerFundsStatus === "REVERSED")
147
- return "PAYOUT_CANCELLED";
148
155
  if ((_h = reward === null || reward === void 0 ? void 0 : reward.pendingReasons) === null || _h === void 0 ? void 0 : _h.includes("US_TAX")) {
149
156
  if (!(taxConnection === null || taxConnection === void 0 ? void 0 : taxConnection.taxHandlingEnabled))
150
157
  return "PENDING";
@@ -188,6 +195,7 @@ export class ReferralTableRewardsCell {
188
195
  case "PENDING_NEW_TAX_FORM":
189
196
  case "PENDING_TAX_SUBMISSION":
190
197
  case "PENDING_PARTNER_CREATION":
198
+ case "PROCESSING":
191
199
  return "warning";
192
200
  case "AVAILABLE":
193
201
  return "success";
@@ -202,7 +210,7 @@ export class ReferralTableRewardsCell {
202
210
  .trim();
203
211
  };
204
212
  return (_a = this.rewards) === null || _a === void 0 ? void 0 : _a.map((reward) => {
205
- var _a, _b;
213
+ var _a, _b, _c;
206
214
  const state = getState(reward, this.taxConnection);
207
215
  const slBadgeType = getSLBadgeType(state);
208
216
  const badgeText = intl.formatMessage({ id: "statusShortMessage", defaultMessage: this.statusText }, {
@@ -213,6 +221,8 @@ export class ReferralTableRewardsCell {
213
221
  defaultMessage: this.statusLongText,
214
222
  }, {
215
223
  status: state,
224
+ scheduledPayoutDate: reward.partnerFundsTransfer
225
+ ? (_a = DateTime.fromMillis(reward.partnerFundsTransfer.dateScheduled)) === null || _a === void 0 ? void 0 : _a.setLocale(luxonLocale(this.locale)).toLocaleString(DateTime.DATE_MED) : null,
216
226
  });
217
227
  return (h("sl-details", { class: sheet.classes.Details, disabled: this.hideDetails },
218
228
  h("style", { type: "text/css" }, styleString),
@@ -231,7 +241,7 @@ export class ReferralTableRewardsCell {
231
241
  this.expiringText,
232
242
  ` ${getTimeDiff(reward.dateExpires)}`)))),
233
243
  h("div", null,
234
- state === "PENDING_REVIEW" && ((_a = reward.referral) === null || _a === void 0 ? void 0 : _a.dateModerated) && (h("div", null,
244
+ state === "PENDING_REVIEW" && ((_b = reward.referral) === null || _b === void 0 ? void 0 : _b.dateModerated) && (h("div", null,
235
245
  h(TextSpanView, { type: "p" },
236
246
  statusText,
237
247
  " ",
@@ -240,6 +250,8 @@ export class ReferralTableRewardsCell {
240
250
  .toLocaleString(DateTime.DATE_MED))))),
241
251
  state === "PAYOUT_APPROVED" && (h("div", null,
242
252
  h(TextSpanView, { type: "p" }, statusText))),
253
+ state === "PROCESSING" && (h("div", null,
254
+ h(TextSpanView, { type: "p" }, statusText))),
243
255
  state === "PAYOUT_FAILED" && (h("div", null,
244
256
  h(TextSpanView, { type: "p" }, statusText))),
245
257
  state === "PAYOUT_CANCELLED" && (h("div", null,
@@ -252,7 +264,7 @@ export class ReferralTableRewardsCell {
252
264
  h(TextSpanView, { type: "p" }, statusText))),
253
265
  state === "PENDING_PARTNER_CREATION" && (h("div", null,
254
266
  h(TextSpanView, { type: "p" }, statusText))),
255
- state === "DENIED" && ((_b = reward.referral) === null || _b === void 0 ? void 0 : _b.dateModerated) && (h("div", null,
267
+ state === "DENIED" && ((_c = reward.referral) === null || _c === void 0 ? void 0 : _c.dateModerated) && (h("div", null,
256
268
  h(TextSpanView, { type: "p" },
257
269
  statusText,
258
270
  " ",
@@ -379,7 +391,7 @@ export class ReferralTableRewardsCell {
379
391
  },
380
392
  "attribute": "status-text",
381
393
  "reflect": false,
382
- "defaultValue": "\"{status, select, AVAILABLE {Available} CANCELLED {Cancelled} PENDING {Pending} PENDING_REVIEW {Pending} PAYOUT_APPROVED {Payout Approved} 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} }\""
394
+ "defaultValue": "\"{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} }\""
383
395
  },
384
396
  "statusLongText": {
385
397
  "type": "string",
@@ -397,7 +409,7 @@ export class ReferralTableRewardsCell {
397
409
  },
398
410
  "attribute": "status-long-text",
399
411
  "reflect": false,
400
- "defaultValue": "\"{status, select, AVAILABLE {Reward expiring on} CANCELLED {Reward cancelled on} PENDING {Available on} PENDING_REVIEW {Pending since} PAYOUT_APPROVED {Reward was scheduled for payment based on your settings, barring any account holds.} 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.} 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} }\""
412
+ "defaultValue": "\"{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} }\""
401
413
  },
402
414
  "fuelTankText": {
403
415
  "type": "string",
@@ -465,7 +477,8 @@ export class ReferralTableRewardsCell {
465
477
  "text": ""
466
478
  },
467
479
  "attribute": "pending-for-text",
468
- "reflect": false
480
+ "reflect": false,
481
+ "defaultValue": "\"{status} for {date}\""
469
482
  },
470
483
  "deniedHelpText": {
471
484
  "type": "string",
@@ -49,6 +49,9 @@ const GET_REFERRER_DATA = gql `
49
49
  partnerFundsTransfer {
50
50
  id
51
51
  status
52
+ dateScheduled
53
+ dateCreated
54
+ dateTransferred
52
55
  }
53
56
  meta {
54
57
  status
@@ -156,6 +159,9 @@ const GET_REFERRAL_DATA = gql `
156
159
  partnerFundsTransfer {
157
160
  id
158
161
  status
162
+ dateScheduled
163
+ dateCreated
164
+ dateTransferred
159
165
  }
160
166
  referral {
161
167
  dateModerated
@@ -1,6 +1,6 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { GenericTableView } from "../../tables/GenericTableView";
3
- import { DateCell, RewardsCellCreditCancelled, RewardsCellCreditFull, RewardsCellCreditLong, RewardsCellCreditPartial, RewardsCellCreditRedeemed, RewardsCellFueltank, RewardsCellFueltankLong, SourceCellDeletedUser, SourceCellDeletedReferral, SourceCellManual, SourceCellReferral, SourceCellReferred, StatusCellAvailable, StatusCellAvailableExpiry, StatusCellCancelled, StatusCellPending, StatusCellPendingUnhandled, StatusCellRedeemed, StatusCellDenied, StatusCellPendingReview, StatusCellPayoutSent, StatusCellPayoutFailed, StatusCellPendingNewTaxForm, StatusCellPendingPartnerCreation, StatusCellPendingTaxReview, StatusCellPendingTaxSubmission, } from "./RewardsTableCell.stories";
3
+ import { DateCell, RewardsCellCreditCancelled, RewardsCellCreditFull, RewardsCellCreditLong, RewardsCellCreditPartial, RewardsCellCreditRedeemed, RewardsCellFueltank, RewardsCellFueltankLong, SourceCellDeletedUser, SourceCellDeletedReferral, SourceCellManual, SourceCellReferral, SourceCellReferred, StatusCellAvailable, StatusCellAvailableExpiry, StatusCellCancelled, StatusCellPending, StatusCellPendingUnhandled, StatusCellRedeemed, StatusCellDenied, StatusCellPendingReview, } from "./RewardsTableCell.stories";
4
4
  import scenario from "./rewards-table.feature";
5
5
  export default {
6
6
  title: "Components/Rewards Table",
@@ -117,42 +117,6 @@ const r_fueltank_long = [
117
117
  h(SourceCellManual, null),
118
118
  h(DateCell, null),
119
119
  ];
120
- const r_payout_sent = [
121
- h(RewardsCellCreditRedeemed, null),
122
- h(StatusCellPayoutSent, null),
123
- h(SourceCellReferral, null),
124
- h(DateCell, null),
125
- ];
126
- const r_payout_failed = [
127
- h(RewardsCellCreditRedeemed, null),
128
- h(StatusCellPayoutFailed, null),
129
- h(SourceCellReferral, null),
130
- h(DateCell, null),
131
- ];
132
- const r_pending_new_tax_form = [
133
- h(RewardsCellCreditRedeemed, null),
134
- h(StatusCellPendingNewTaxForm, null),
135
- h(SourceCellReferral, null),
136
- h(DateCell, null),
137
- ];
138
- const r_pending_partner_creation = [
139
- h(RewardsCellCreditRedeemed, null),
140
- h(StatusCellPendingPartnerCreation, null),
141
- h(SourceCellReferral, null),
142
- h(DateCell, null),
143
- ];
144
- const r_pending_tax_review = [
145
- h(RewardsCellCreditRedeemed, null),
146
- h(StatusCellPendingTaxReview, null),
147
- h(SourceCellReferral, null),
148
- h(DateCell, null),
149
- ];
150
- const r_pending_tax_submission = [
151
- h(RewardsCellCreditRedeemed, null),
152
- h(StatusCellPendingTaxSubmission, null),
153
- h(SourceCellReferral, null),
154
- h(DateCell, null),
155
- ];
156
120
  export const RewardsTable = () => {
157
121
  return (h(GenericTableView, Object.assign({}, rewardsTableProps([
158
122
  r_available,
@@ -162,12 +126,6 @@ export const RewardsTable = () => {
162
126
  r_expired,
163
127
  r_denied,
164
128
  r_pending_review,
165
- r_payout_sent,
166
- r_payout_failed,
167
- r_pending_new_tax_form,
168
- r_pending_partner_creation,
169
- r_pending_tax_submission,
170
- r_pending_tax_review,
171
129
  ]))));
172
130
  };
173
131
  export const RewardsTableSingle = () => {