@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
@@ -41,6 +41,97 @@ const rewardsData = {
41
41
  rewardRedemptionTransactions: {
42
42
  data: null,
43
43
  },
44
+ partnerFundsTransfer: null,
45
+ };
46
+ const cashReward = {
47
+ id: "68c34fd98a6cb4f5f8394084",
48
+ type: "CREDIT",
49
+ value: 59900,
50
+ prettyValue: "$599.00",
51
+ availableValue: 0,
52
+ prettyAvailableValue: "$0.00",
53
+ prettyAssignedCredit: "$599.00",
54
+ prettyRedeemedCredit: "$599.00",
55
+ prettyValueNumber: "599",
56
+ prettyAvailableNumber: "0",
57
+ prettyRedeemedNumber: "599",
58
+ unit: "CASH/USD",
59
+ baseUnit: "CASH",
60
+ rewardUnit: {
61
+ key: "CASH/USD",
62
+ name: "Cash",
63
+ },
64
+ name: null,
65
+ dateCreated: 1757630425085,
66
+ dateScheduledFor: 1757631025115,
67
+ dateGiven: 1757630737115,
68
+ dateExpires: null,
69
+ dateCancelled: null,
70
+ dateRedeemed: 1757630737115,
71
+ dateModified: 1757630737115,
72
+ rewardSource: "MANUAL",
73
+ fuelTankCode: null,
74
+ fuelTankType: null,
75
+ fuelTankSyncSetting: null,
76
+ currency: "USD",
77
+ meta: null,
78
+ programId: "40444",
79
+ programRewardKey: null,
80
+ globalRewardKey: "cash",
81
+ program: {
82
+ id: "40444",
83
+ name: "Make Money Program",
84
+ template: {
85
+ id: "2qdmAx1fi31deo3P9O36sQ",
86
+ name: "Referral Program With Objectives",
87
+ },
88
+ },
89
+ partnerFundsTransfer: {
90
+ id: "693503",
91
+ status: "TRANSFERRED",
92
+ dateScheduled: 1768583958000,
93
+ dateTransferred: 1768583958000,
94
+ dateCreated: 1767979159000,
95
+ },
96
+ user: {
97
+ id: "8da2c67e05e3e56de7ea638c2705017945211621c80e1cd4b4aac0e423d1cdb2",
98
+ accountId: "8da2c67e05e3e56de7ea638c2705017945211621c80e1cd4b4aac0e423d1cdb2",
99
+ firstName: "Billy",
100
+ lastName: "Jean",
101
+ email: "billy.jean@impact.com",
102
+ impactConnection: {
103
+ connected: true,
104
+ taxHandlingEnabled: true,
105
+ publisher: null,
106
+ },
107
+ },
108
+ referral: null,
109
+ description: null,
110
+ statuses: ["REDEEMED"],
111
+ // rewardRedemptionTransactions: {
112
+ // data: [
113
+ // {
114
+ // exchangedRewards: {
115
+ // data: [],
116
+ // },
117
+ // redeemedRewards: {
118
+ // data: [
119
+ // {
120
+ // prettyValue: "$599.00",
121
+ // },
122
+ // ],
123
+ // },
124
+ // creditRedeemed: 59900,
125
+ // prettyRedeemedCredit: "$599.00",
126
+ // dateRedeemed: 1757630737115,
127
+ // },
128
+ // ],
129
+ // },
130
+ rewardRedemptionTransactions: {
131
+ data: null,
132
+ },
133
+ exchangedRewardRedemptionTransaction: null,
134
+ pendingReasons: [],
44
135
  };
45
136
  const taxConnection = {
46
137
  connected: true,
@@ -261,16 +352,6 @@ export const StatusCellExpired = () => {
261
352
  const pending = {
262
353
  statuses: ["PENDING"],
263
354
  };
264
- const payoutSent = {
265
- statuses: ["PAYOUT_SENT"],
266
- };
267
- const payoutFailed = {
268
- statuses: ["PAYOUT_FAILED"],
269
- };
270
- const payoutCancelled = {
271
- statuses: ["PAYOUT_CANCELLED"],
272
- dateCancelled: 1355612521321,
273
- };
274
355
  const us_tax = {
275
356
  pendingReasons: ["US_TAX"],
276
357
  };
@@ -284,57 +365,6 @@ const unhandled = {
284
365
  export const StatusCellPending = () => {
285
366
  return (h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: { ...rewardsData, ...pending } }));
286
367
  };
287
- export const StatusCellPendingTaxReview = () => {
288
- return (h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: { ...rewardsData }, taxConnection: {
289
- ...taxConnection,
290
- publisher: {
291
- requiredTaxDocumentType: "W8BEN",
292
- currentTaxDocument: {
293
- status: "",
294
- },
295
- ...taxConnection.publisher,
296
- },
297
- } }));
298
- };
299
- export const StatusCellPendingNewTaxForm = () => {
300
- return (h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: { ...rewardsData }, taxConnection: {
301
- ...taxConnection,
302
- publisher: {
303
- ...taxConnection.publisher,
304
- requiredTaxDocumentType: "W8BEN",
305
- currentTaxDocument: {
306
- status: "INACTIVE",
307
- type: "W8BEN",
308
- dateCreated: 321321487,
309
- },
310
- },
311
- } }));
312
- };
313
- export const StatusCellPendingTaxSubmission = () => {
314
- return (h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: { ...rewardsData }, taxConnection: {
315
- ...taxConnection,
316
- publisher: {
317
- ...taxConnection.publisher,
318
- requiredTaxDocumentType: "W8BEN",
319
- currentTaxDocument: null,
320
- },
321
- } }));
322
- };
323
- export const StatusCellPendingPartnerCreation = () => {
324
- return (h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: {
325
- ...rewardsData,
326
- pendingReasons: ["MISSING_PAYOUT_CONFIGURATION"],
327
- } }));
328
- };
329
- export const StatusCellPayoutSent = () => {
330
- return (h("sqm-rewards-table-status-cell", { statusText: "Payout Sent", reward: { ...rewardsData, ...payoutSent }, taxConnection: taxConnection }));
331
- };
332
- export const StatusCellPayoutFailed = () => {
333
- return (h("sqm-rewards-table-status-cell", { statusText: "Payout Failed", reward: { ...rewardsData, ...payoutFailed } }));
334
- };
335
- export const StatusCellPayoutCancelled = () => {
336
- return (h("sqm-rewards-table-status-cell", { statusText: "Payout Cancelled", reward: { ...rewardsData, ...payoutCancelled } }));
337
- };
338
368
  export const StatusCellPendingWithLongText = () => {
339
369
  return (h("div", { style: { width: "200px" } },
340
370
  h("sqm-rewards-table-status-cell", { statusText: "Pending for 300,000,000 months and some change", reward: { ...rewardsData, ...pending } })));
@@ -0,0 +1,113 @@
1
+ import { h } from "@stencil/core";
2
+ import { GenericTableView } from "../../tables/GenericTableView";
3
+ import { SourceCellReferral, DateCell } from "./RewardsTableCell.stories";
4
+ import { StatusCellPayoutSent, StatusCellPayoutFailed, StatusCellPendingNewTaxForm, StatusCellPendingPartnerCreation, StatusCellPendingTaxReview, StatusCellPendingTaxSubmission, StatusCellPayoutProcessing, CashReward, StatusCellPendingW9, StatusCellPayoutCancelled, } from "./TaxAndCashRewardsTableCell.stories";
5
+ export default {
6
+ title: "Components/Tax And Cash Rewards Table",
7
+ };
8
+ const rewardsTableProps = (rows, empty = false, loading = false, prev = "Prev", next = "Next", hidden = "") => ({
9
+ states: {
10
+ hasPrev: false,
11
+ hasNext: true,
12
+ show: empty
13
+ ? "empty"
14
+ : loading
15
+ ? "loading"
16
+ : "rows",
17
+ namespace: "sqm-rewards-table",
18
+ },
19
+ data: {
20
+ textOverrides: {
21
+ showLabels: true,
22
+ prevLabel: prev,
23
+ moreLabel: next,
24
+ },
25
+ hiddenColumns: hidden,
26
+ mdBreakpoint: 799,
27
+ smBreakpoint: 599,
28
+ },
29
+ callbacks: {
30
+ prevPage: () => console.log("Prev"),
31
+ nextPage: () => console.log("Next"),
32
+ },
33
+ elements: {
34
+ columns: ["Rewards", "Status", "Source", "Date received"],
35
+ rows: rows,
36
+ },
37
+ });
38
+ /* -------------------------------------------------------------------------- */
39
+ /* PENDING ROWS */
40
+ /* -------------------------------------------------------------------------- */
41
+ const r_pending_new_tax_form = [
42
+ h(CashReward, null),
43
+ h(StatusCellPendingNewTaxForm, null),
44
+ h(SourceCellReferral, null),
45
+ h(DateCell, null),
46
+ ];
47
+ const r_pending_tax_submission = [
48
+ h(CashReward, null),
49
+ h(StatusCellPendingTaxSubmission, null),
50
+ h(SourceCellReferral, null),
51
+ h(DateCell, null),
52
+ ];
53
+ const r_pending_tax_review = [
54
+ h(CashReward, null),
55
+ h(StatusCellPendingTaxReview, null),
56
+ h(SourceCellReferral, null),
57
+ h(DateCell, null),
58
+ ];
59
+ const r_pending_partner_creation = [
60
+ h(CashReward, null),
61
+ h(StatusCellPendingPartnerCreation, null),
62
+ h(SourceCellReferral, null),
63
+ h(DateCell, null),
64
+ ];
65
+ const r_pending_w9 = [
66
+ h(CashReward, null),
67
+ h(StatusCellPendingW9, null),
68
+ h(SourceCellReferral, null),
69
+ h(DateCell, null),
70
+ ];
71
+ /* -------------------------------------------------------------------------- */
72
+ /* SUCCESS / PROCESSING ROWS */
73
+ /* -------------------------------------------------------------------------- */
74
+ const r_payout_sent = [
75
+ h(CashReward, null),
76
+ h(StatusCellPayoutSent, null),
77
+ h(SourceCellReferral, null),
78
+ h(DateCell, null),
79
+ ];
80
+ const r_payout_processing = [
81
+ h(CashReward, null),
82
+ h(StatusCellPayoutProcessing, null),
83
+ h(SourceCellReferral, null),
84
+ h(DateCell, null),
85
+ ];
86
+ /* -------------------------------------------------------------------------- */
87
+ /* ERROR / CANCELLED ROWS */
88
+ /* -------------------------------------------------------------------------- */
89
+ const r_payout_failed = [
90
+ h(CashReward, null),
91
+ h(StatusCellPayoutFailed, null),
92
+ h(SourceCellReferral, null),
93
+ h(DateCell, null),
94
+ ];
95
+ const r_payout_cancelled = [
96
+ h(CashReward, null),
97
+ h(StatusCellPayoutCancelled, null),
98
+ h(SourceCellReferral, null),
99
+ h(DateCell, null),
100
+ ];
101
+ export const RewardsTable = () => {
102
+ return (h(GenericTableView, Object.assign({}, rewardsTableProps([
103
+ r_pending_new_tax_form,
104
+ r_pending_tax_submission,
105
+ r_pending_tax_review,
106
+ r_pending_partner_creation,
107
+ r_pending_w9,
108
+ r_payout_processing,
109
+ r_payout_sent,
110
+ r_payout_failed,
111
+ r_payout_cancelled,
112
+ ]))));
113
+ };
@@ -0,0 +1,213 @@
1
+ import { h } from "@stencil/core";
2
+ export default {
3
+ title: "Components/Tax And Cash Rewards Table Cell",
4
+ };
5
+ const cashReward = {
6
+ id: "68c34fd98a6cb4f5f8394084",
7
+ type: "CREDIT",
8
+ value: 59900,
9
+ prettyValue: "$599.00",
10
+ availableValue: 0,
11
+ prettyAvailableValue: "$0.00",
12
+ prettyAssignedCredit: "$599.00",
13
+ prettyRedeemedCredit: "$599.00",
14
+ prettyValueNumber: "599",
15
+ prettyAvailableNumber: "0",
16
+ prettyRedeemedNumber: "599",
17
+ unit: "CASH/USD",
18
+ baseUnit: "CASH",
19
+ rewardUnit: {
20
+ key: "CASH/USD",
21
+ name: "Cash",
22
+ },
23
+ name: null,
24
+ dateCreated: 1757630425085,
25
+ dateScheduledFor: 1757631025115,
26
+ dateGiven: 1757630737115,
27
+ dateExpires: null,
28
+ dateCancelled: null,
29
+ dateRedeemed: 1757630737115,
30
+ dateModified: 1757630737115,
31
+ rewardSource: "MANUAL",
32
+ fuelTankCode: null,
33
+ fuelTankType: null,
34
+ fuelTankSyncSetting: null,
35
+ currency: "USD",
36
+ meta: null,
37
+ programId: "40444",
38
+ programRewardKey: null,
39
+ globalRewardKey: "cash",
40
+ program: {
41
+ id: "40444",
42
+ name: "Make Money Program",
43
+ template: {
44
+ id: "2qdmAx1fi31deo3P9O36sQ",
45
+ name: "Referral Program With Objectives",
46
+ },
47
+ },
48
+ partnerFundsTransfer: null,
49
+ user: {
50
+ id: "8da2c67e05e3e56de7ea638c2705017945211621c80e1cd4b4aac0e423d1cdb2",
51
+ accountId: "8da2c67e05e3e56de7ea638c2705017945211621c80e1cd4b4aac0e423d1cdb2",
52
+ firstName: "Billy",
53
+ lastName: "Jean",
54
+ email: "billy.jean@impact.com",
55
+ impactConnection: {
56
+ connected: true,
57
+ taxHandlingEnabled: true,
58
+ publisher: null,
59
+ },
60
+ },
61
+ referral: null,
62
+ description: null,
63
+ statuses: ["REDEEMED"],
64
+ rewardRedemptionTransactions: {
65
+ data: null,
66
+ },
67
+ exchangedRewardRedemptionTransaction: null,
68
+ pendingReasons: [],
69
+ };
70
+ const pending = {
71
+ statuses: ["PENDING"],
72
+ };
73
+ const payoutSent = {
74
+ statuses: ["PAYOUT_APPROVED"],
75
+ };
76
+ const payoutFailed = {
77
+ statuses: ["PAYOUT_FAILED"],
78
+ };
79
+ const payoutCancelled = {
80
+ statuses: ["PAYOUT_CANCELLED"],
81
+ dateCancelled: 1355612521321,
82
+ };
83
+ const processingPFT = {
84
+ partnerFundsTransfer: {
85
+ id: "123",
86
+ status: null,
87
+ dateCreated: 1355612521321,
88
+ dateScheduled: 2779257600000,
89
+ dateTransferred: null,
90
+ },
91
+ };
92
+ const taxConnection = {
93
+ connected: true,
94
+ taxHandlingEnabled: true,
95
+ publisher: {
96
+ requiredTaxDocumentType: "W8BEN",
97
+ currentTaxDocument: {
98
+ status: "NOT_VERIFIED",
99
+ type: "W8BEN",
100
+ dateCreated: 321321487,
101
+ },
102
+ withdrawalSettings: {
103
+ paymentMethod: "BANK_TRANSFER",
104
+ },
105
+ payoutsAccount: null,
106
+ },
107
+ };
108
+ export const CashReward = () => {
109
+ return (h("sqm-rewards-table-reward-cell", { reward: { ...cashReward }, availableText: "{availableAmount} remaining" }));
110
+ };
111
+ export const StatusCellPendingTaxReview = () => {
112
+ return (h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: { ...cashReward, ...pending, pendingReasons: ["US_TAX"] }, taxConnection: {
113
+ ...taxConnection,
114
+ publisher: {
115
+ requiredTaxDocumentType: "W8BEN",
116
+ currentTaxDocument: {
117
+ status: "",
118
+ },
119
+ ...taxConnection.publisher,
120
+ },
121
+ } }));
122
+ };
123
+ export const StatusCellPendingNewTaxForm = () => {
124
+ return (h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: {
125
+ ...cashReward,
126
+ statuses: ["PENDING"],
127
+ pendingReasons: ["US_TAX"],
128
+ }, taxConnection: {
129
+ connected: true,
130
+ taxHandlingEnabled: true,
131
+ publisher: {
132
+ requiredTaxDocumentType: "W8BEN",
133
+ withdrawalSettings: {
134
+ paymentMethod: "BANK_TRANSFER",
135
+ },
136
+ payoutsAccount: null,
137
+ currentTaxDocument: {
138
+ status: "INACTIVE",
139
+ type: "W8BEN",
140
+ dateCreated: 321321487,
141
+ },
142
+ },
143
+ } }));
144
+ };
145
+ export const StatusCellPendingTaxSubmission = () => {
146
+ return (h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: { ...cashReward, ...pending, pendingReasons: ["US_TAX"] }, taxConnection: {
147
+ ...taxConnection,
148
+ publisher: {
149
+ ...taxConnection.publisher,
150
+ requiredTaxDocumentType: "W8BEN",
151
+ currentTaxDocument: null,
152
+ },
153
+ } }));
154
+ };
155
+ export const StatusCellPendingPartnerCreation = () => {
156
+ return (h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: {
157
+ ...cashReward,
158
+ ...pending,
159
+ pendingReasons: ["US_TAX"],
160
+ }, taxConnection: {
161
+ ...taxConnection,
162
+ connected: false,
163
+ } }));
164
+ };
165
+ export const StatusCellPendingW9 = () => {
166
+ return (h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: {
167
+ ...cashReward,
168
+ ...pending,
169
+ pendingReasons: ["US_TAX"],
170
+ }, taxConnection: {
171
+ ...taxConnection,
172
+ taxHandlingEnabled: false,
173
+ } }));
174
+ };
175
+ export const StatusCellPayoutSent = () => {
176
+ return (h("sqm-rewards-table-status-cell", { statusText: "Payout Sent", reward: {
177
+ ...cashReward,
178
+ partnerFundsTransfer: {
179
+ id: "transfer-123",
180
+ status: "TRANSFERRED",
181
+ dateScheduled: 1640995200000,
182
+ dateTransferred: 1640995200000,
183
+ dateCreated: 1640995200000,
184
+ },
185
+ }, taxConnection: taxConnection }));
186
+ };
187
+ export const StatusCellPayoutFailed = () => {
188
+ return (h("sqm-rewards-table-status-cell", { statusText: "Payout Failed", reward: {
189
+ ...cashReward,
190
+ partnerFundsTransfer: {
191
+ id: "transfer-failed",
192
+ status: "OVERDUE",
193
+ dateScheduled: 1640995200000,
194
+ dateTransferred: null,
195
+ dateCreated: 1640995200000,
196
+ },
197
+ } }));
198
+ };
199
+ export const StatusCellPayoutProcessing = () => {
200
+ return (h("sqm-rewards-table-status-cell", { statusText: "Payment Processing", reward: { ...cashReward, ...processingPFT } }));
201
+ };
202
+ export const StatusCellPayoutCancelled = () => {
203
+ return (h("sqm-rewards-table-status-cell", { statusText: "Payout Cancelled", reward: {
204
+ ...cashReward,
205
+ partnerFundsTransfer: {
206
+ id: "transfer-reversed",
207
+ status: "REVERSED",
208
+ dateScheduled: 1640995200000,
209
+ dateTransferred: null,
210
+ dateCreated: 1640995200000,
211
+ },
212
+ } }));
213
+ };
@@ -74,8 +74,9 @@ export class RewardTableStatusCell {
74
74
  this.pendingReviewText = "Awaiting review";
75
75
  this.deniedText = "Detected self-referral";
76
76
  this.payoutFailed = "Payout failed due to a fulfillment issue and is current being retried.";
77
- this.payoutApproved = "Reward was scheduled for payment based on your settings, barring any account holds.";
77
+ this.payoutApproved = "Payout approved and scheduled for payment based on your settings.";
78
78
  this.payoutCancelled = "If you think this is a mistake, contact our Support team.";
79
+ this.payoutProcessing = "Processing until {date}. Payout is then scheduled based on your settings.";
79
80
  }
80
81
  rewardStatus(reward) {
81
82
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
@@ -88,13 +89,24 @@ export class RewardTableStatusCell {
88
89
  if (fraudStatus === "PENDING")
89
90
  return "PENDING_REVIEW";
90
91
  const partnerTransferStatus = (_e = reward.partnerFundsTransfer) === null || _e === void 0 ? void 0 : _e.status;
91
- if (partnerTransferStatus === "TRANSFERRED" ||
92
- partnerTransferStatus === "NOT_YET_DUE")
93
- return "PAYOUT_APPROVED";
94
- if (partnerTransferStatus === "OVERDUE")
95
- return "PAYOUT_FAILED";
96
- if (partnerTransferStatus === "REVERSED")
97
- return "PAYOUT_CANCELLED";
92
+ if (reward.partnerFundsTransfer) {
93
+ console.log({
94
+ isProcessing: reward.partnerFundsTransfer.dateScheduled > Date.now(),
95
+ });
96
+ if (partnerTransferStatus === "REVERSED")
97
+ return "PAYOUT_CANCELLED";
98
+ if (partnerTransferStatus === "OVERDUE")
99
+ return "PAYOUT_FAILED";
100
+ if (reward.partnerFundsTransfer.dateScheduled > Date.now()) {
101
+ return "PROCESSING";
102
+ }
103
+ if (partnerTransferStatus === "TRANSFERRED" ||
104
+ partnerTransferStatus === "NOT_YET_DUE" ||
105
+ (reward.partnerFundsTransfer.dateScheduled < Date.now() &&
106
+ partnerTransferStatus !== "OVERDUE" &&
107
+ partnerTransferStatus !== "REVERSED"))
108
+ return "PAYOUT_APPROVED";
109
+ }
98
110
  if (reward.dateCancelled)
99
111
  return "CANCELLED";
100
112
  if (hasExpired)
@@ -151,12 +163,14 @@ export class RewardTableStatusCell {
151
163
  return "primary";
152
164
  case "PENDING":
153
165
  case "PENDING_REVIEW":
166
+ case "PROCESSING":
154
167
  return "warning";
155
168
  default:
156
169
  return "danger";
157
170
  }
158
171
  }
159
172
  getPayoutStatusText(taxStatus) {
173
+ var _a;
160
174
  switch (taxStatus) {
161
175
  case "US_TAX":
162
176
  return this.pendingUsTax;
@@ -174,6 +188,13 @@ export class RewardTableStatusCell {
174
188
  return this.pendingTaxSubmission;
175
189
  case "PENDING_PARTNER_CREATION":
176
190
  return this.pendingPartnerCreation;
191
+ case "PROCESSING":
192
+ return intl.formatMessage({
193
+ id: "payoutProcessingText",
194
+ defaultMessage: this.payoutProcessing,
195
+ }, {
196
+ date: (_a = DateTime.fromMillis(this.reward.partnerFundsTransfer.dateScheduled)) === null || _a === void 0 ? void 0 : _a.setLocale(luxonLocale(this.locale)).toLocaleString(DateTime.DATE_MED),
197
+ });
177
198
  }
178
199
  }
179
200
  render() {
@@ -210,6 +231,7 @@ export class RewardTableStatusCell {
210
231
  return sheet.classes.RedeemBadge;
211
232
  case "PENDING":
212
233
  case "PENDING_REVIEW":
234
+ case "PROCESSING":
213
235
  return sheet.classes.WarningBadge;
214
236
  default:
215
237
  return sheet.classes.DangerBadge;
@@ -534,7 +556,7 @@ export class RewardTableStatusCell {
534
556
  },
535
557
  "attribute": "payout-approved",
536
558
  "reflect": false,
537
- "defaultValue": "\"Reward was scheduled for payment based on your settings, barring any account holds.\""
559
+ "defaultValue": "\"Payout approved and scheduled for payment based on your settings.\""
538
560
  },
539
561
  "payoutCancelled": {
540
562
  "type": "string",
@@ -553,6 +575,24 @@ export class RewardTableStatusCell {
553
575
  "attribute": "payout-cancelled",
554
576
  "reflect": false,
555
577
  "defaultValue": "\"If you think this is a mistake, contact our Support team.\""
578
+ },
579
+ "payoutProcessing": {
580
+ "type": "string",
581
+ "mutable": false,
582
+ "complexType": {
583
+ "original": "string",
584
+ "resolved": "string",
585
+ "references": {}
586
+ },
587
+ "required": false,
588
+ "optional": false,
589
+ "docs": {
590
+ "tags": [],
591
+ "text": ""
592
+ },
593
+ "attribute": "payout-processing",
594
+ "reflect": false,
595
+ "defaultValue": "\"Processing until {date}. Payout is then scheduled based on your settings.\""
556
596
  }
557
597
  }; }
558
598
  }
@@ -17,7 +17,7 @@ export class RewardTableStatusColumn {
17
17
  * @uiName Reward status text
18
18
  * @uiWidget textArea
19
19
  */
20
- this.statusText = "{status, select, AVAILABLE {Available} CANCELLED {Cancelled} PENDING {Pending} PENDING_REVIEW {Pending} PAYOUT_APPROVED {Payout Approved} PAYOUT_CANCELLED {Payout Cancelled} PAYOUT_FAILED {Payout Failed} EXPIRED {Expired} REDEEMED {Redeemed} DENIED {Denied} other {Not available} }";
20
+ this.statusText = "{status, select, AVAILABLE {Available} CANCELLED {Cancelled} PENDING {Pending} PENDING_REVIEW {Pending} PAYOUT_APPROVED {Payout Approved} PROCESSING {Processing} PAYOUT_CANCELLED {Payout Cancelled} PAYOUT_FAILED {Payout Failed} EXPIRED {Expired} REDEEMED {Redeemed} DENIED {Denied} other {Not available} }";
21
21
  /**
22
22
  * Text shown before the date of an expiring reward.
23
23
  *
@@ -163,7 +163,7 @@ export class RewardTableStatusColumn {
163
163
  },
164
164
  "attribute": "status-text",
165
165
  "reflect": false,
166
- "defaultValue": "\"{status, select, AVAILABLE {Available} CANCELLED {Cancelled} PENDING {Pending} PENDING_REVIEW {Pending} PAYOUT_APPROVED {Payout Approved} PAYOUT_CANCELLED {Payout Cancelled} PAYOUT_FAILED {Payout Failed} EXPIRED {Expired} REDEEMED {Redeemed} DENIED {Denied} other {Not available} }\""
166
+ "defaultValue": "\"{status, select, AVAILABLE {Available} CANCELLED {Cancelled} PENDING {Pending} PENDING_REVIEW {Pending} PAYOUT_APPROVED {Payout Approved} PROCESSING {Processing} PAYOUT_CANCELLED {Payout Cancelled} PAYOUT_FAILED {Payout Failed} EXPIRED {Expired} REDEEMED {Redeemed} DENIED {Denied} other {Not available} }\""
167
167
  },
168
168
  "expiryText": {
169
169
  "type": "string",
@@ -69,6 +69,9 @@ const GET_REWARDS = gql `
69
69
  partnerFundsTransfer {
70
70
  id
71
71
  status
72
+ dateScheduled
73
+ dateCreated
74
+ dateTransferred
72
75
  }
73
76
  statuses
74
77
  pendingReasons
@@ -66,13 +66,17 @@ import * as ReferralCode from "../sqm-referral-code/ReferralCode.stories";
66
66
  import * as ReferralCodes from "../sqm-referral-codes/ReferralCodes.stories";
67
67
  import * as ReferralIframe from "../sqm-referral-iframe/ReferralIframe.stories";
68
68
  import * as ReferralTable from "../sqm-referral-table/ReferralTable.stories";
69
+ import * as TaxAndCashReferralTable from "../sqm-referral-table/TaxAndCashReferralTable.stories";
70
+ import * as TaxAndCashReferralTableRewardsCell from "../sqm-referral-table/TaxAndCashReferralTableRewardsCell.stories";
69
71
  import * as ReferralTableCell from "../sqm-referral-table/ReferralTableCell.stories";
70
72
  import * as ReferralTableRewardsCell from "../sqm-referral-table/ReferralTableRewardsCell.stories";
71
73
  import * as UseReferralTable from "../sqm-referral-table/UseReferralTable.stories";
72
74
  import * as RewardExchangeList from "../sqm-reward-exchange-list/RewardExchangeList.stories";
73
75
  import * as UseRewardExchangeList from "../sqm-reward-exchange-list/UseRewardExchangeList.stories";
74
- import * as RewardsTable from "../sqm-rewards-table/RewardsTable.stories";
76
+ import * as RewardsTable from "../sqm-rewards-table/TaxAndCashRewardsTable.stories";
77
+ import * as TaxAndCashRewardsTable from "../sqm-rewards-table/RewardsTable.stories";
75
78
  import * as RewardsTableCell from "../sqm-rewards-table/RewardsTableCell.stories";
79
+ import * as TaxAndCashRewardsTableCell from "../sqm-rewards-table/TaxAndCashRewardsTableCell.stories";
76
80
  import * as UseRewardsTable from "../sqm-rewards-table/UseRewardsTable.stories";
77
81
  import * as Router from "../sqm-router/Router.stories";
78
82
  import * as Scroll from "../sqm-scroll/Scroll.stories";
@@ -208,6 +212,10 @@ const stories = [
208
212
  LeadInputField,
209
213
  LeadFormDropdownField,
210
214
  LeadCheckboxField,
215
+ TaxAndCashRewardsTableCell,
216
+ TaxAndCashRewardsTable,
217
+ TaxAndCashReferralTableRewardsCell,
218
+ TaxAndCashReferralTable,
211
219
  ];
212
220
  /**
213
221
  * For internal documentation
@@ -25,6 +25,9 @@ export const GET_USER = gql `
25
25
  partnerFundsTransfer {
26
26
  id
27
27
  status
28
+ dateScheduled
29
+ dateCreated
30
+ dateTransferred
28
31
  }
29
32
  }
30
33
  }
@@ -121,6 +121,9 @@ const GET_USER = dist.gql `
121
121
  partnerFundsTransfer {
122
122
  id
123
123
  status
124
+ dateScheduled
125
+ dateCreated
126
+ dateTransferred
124
127
  }
125
128
  }
126
129
  }