@saasquatch/mint-components 1.12.0-13 → 1.12.0-15
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/loader.cjs.js +1 -1
- package/dist/cjs/mint-components.cjs.js +1 -1
- package/dist/cjs/sqm-banking-info-form_16.cjs.entry.js +182 -56
- package/dist/cjs/sqm-big-stat_39.cjs.entry.js +84 -15
- package/dist/cjs/sqm-email-verification.cjs.entry.js +15 -7
- package/dist/cjs/{sqm-invoice-table-view-e92c557a.js → sqm-invoice-table-view-b0602970.js} +16 -1
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +41 -18
- package/dist/cjs/{usePayoutStatus-5ac536a3.js → usePayoutStatus-8f924372.js} +1 -1
- package/dist/collection/components/sqm-payout-button-scroll/PayoutButtonScroll.stories.js +7 -0
- package/dist/collection/components/sqm-payout-button-scroll/sqm-payout-button-scroll-view.js +1 -0
- package/dist/collection/components/sqm-payout-button-scroll/sqm-payout-button-scroll.js +5 -1
- package/dist/collection/components/sqm-payout-button-scroll/usePayoutButton.js +3 -10
- package/dist/collection/components/sqm-referral-table/ReferralTable.stories.js +7 -1
- package/dist/collection/components/sqm-referral-table/ReferralTableRewardsCell.stories.js +16 -4
- package/dist/collection/components/sqm-rewards-table/RewardsTableCell.stories.js +7 -12
- package/dist/collection/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification-view.js +9 -5
- package/dist/collection/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification.js +29 -4
- package/dist/collection/components/tax-and-cash/TaxForm.stories.js +15 -1
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.js +12 -2
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +29 -4
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +3 -2
- package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form-view.js +12 -2
- package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form.js +31 -6
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form-view.js +26 -8
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form.js +33 -8
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.js +34 -6
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js +41 -16
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.js +1 -1
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +49 -16
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.js +51 -8
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +43 -18
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +18 -3
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.js +31 -6
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mint-components.js +1 -1
- package/dist/esm/sqm-banking-info-form_16.entry.js +182 -56
- package/dist/esm/sqm-big-stat_39.entry.js +84 -15
- package/dist/esm/sqm-email-verification.entry.js +15 -7
- package/dist/esm/{sqm-invoice-table-view-c184248a.js → sqm-invoice-table-view-b1ac1bfc.js} +16 -1
- package/dist/esm/sqm-stencilbook.entry.js +41 -18
- package/dist/esm/{usePayoutStatus-d613ff10.js → usePayoutStatus-0bc0380f.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/sqm-banking-info-form_16.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_39.entry.js +1 -1
- package/dist/esm-es5/sqm-email-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-invoice-table-view-b1ac1bfc.js +1 -0
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/{usePayoutStatus-d613ff10.js → usePayoutStatus-0bc0380f.js} +2 -2
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/p-158568e5.system.entry.js +1 -0
- package/dist/mint-components/{p-2c99add0.js → p-47b47e3b.js} +1 -1
- package/dist/mint-components/p-7789349d.system.js +1 -0
- package/dist/mint-components/p-9e788a1a.js +1 -0
- package/dist/mint-components/p-a5c96f2a.entry.js +195 -0
- package/dist/mint-components/p-a8e79cad.entry.js +9 -0
- package/dist/mint-components/p-b99108a6.system.entry.js +1 -0
- package/dist/mint-components/{p-209eab38.system.js → p-bd1372d2.system.js} +1 -1
- package/dist/mint-components/p-bfd92031.system.entry.js +1 -0
- package/dist/mint-components/p-c58250e6.system.entry.js +1 -0
- package/dist/mint-components/p-ca809fdd.system.js +1 -1
- package/dist/mint-components/p-e11b605d.entry.js +25 -0
- package/dist/mint-components/{p-b9e863d0.entry.js → p-fc17c2d2.entry.js} +30 -12
- package/dist/types/components/sqm-payout-button-scroll/PayoutButtonScroll.stories.d.ts +1 -0
- package/dist/types/components/sqm-referral-table/ReferralTableRewardsCell.stories.d.ts +1 -0
- package/dist/types/components/sqm-rewards-table/RewardsTableCell.stories.d.ts +1 -0
- package/dist/types/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification-view.d.ts +1 -0
- package/dist/types/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification.d.ts +4 -0
- package/dist/types/components/tax-and-cash/TaxForm.stories.d.ts +1 -0
- package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.d.ts +1 -0
- package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.d.ts +4 -0
- package/dist/types/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form-view.d.ts +1 -0
- package/dist/types/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form.d.ts +4 -0
- package/dist/types/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form-view.d.ts +1 -0
- package/dist/types/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form.d.ts +4 -0
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.d.ts +1 -0
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.d.ts +6 -2
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +12 -0
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.d.ts +1 -0
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.d.ts +4 -0
- package/dist/types/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.d.ts +1 -0
- package/dist/types/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.d.ts +4 -0
- package/dist/types/components.d.ts +72 -4
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/sqm-invoice-table-view-c184248a.js +0 -1
- package/dist/mint-components/p-13ce67a3.js +0 -1
- package/dist/mint-components/p-4e21de5f.entry.js +0 -9
- package/dist/mint-components/p-8c26c4ce.entry.js +0 -195
- package/dist/mint-components/p-9266a8fc.system.entry.js +0 -1
- package/dist/mint-components/p-a567ba84.system.entry.js +0 -1
- package/dist/mint-components/p-a9b7e11f.entry.js +0 -25
- package/dist/mint-components/p-b7836281.system.js +0 -1
- package/dist/mint-components/p-c520d10d.system.entry.js +0 -1
- package/dist/mint-components/p-c5d26757.system.entry.js +0 -1
- package/docs/picklesdoc--2024-01-15--11-20-00.xlsx +0 -0
- package/docs/picklesdoc--2024-01-15--11-24-04.xlsx +0 -0
|
@@ -21,7 +21,7 @@ const utilities = require('./utilities-f7de6c04.js');
|
|
|
21
21
|
const AsYouType = require('./AsYouType-6788393a.js');
|
|
22
22
|
const ShadowViewAddon = require('./ShadowViewAddon-040cffad.js');
|
|
23
23
|
require('./sqm-portal-container-view-990a85a3.js');
|
|
24
|
-
const usePayoutStatus = require('./usePayoutStatus-
|
|
24
|
+
const usePayoutStatus = require('./usePayoutStatus-8f924372.js');
|
|
25
25
|
|
|
26
26
|
const BigStat = class {
|
|
27
27
|
constructor(hostRef) {
|
|
@@ -1724,6 +1724,7 @@ NavigationMenu.style = sqmNavigationMenuCss;
|
|
|
1724
1724
|
const style$2 = {
|
|
1725
1725
|
Wrapper: {
|
|
1726
1726
|
maxWidth: "200px",
|
|
1727
|
+
border: "1px solid black",
|
|
1727
1728
|
},
|
|
1728
1729
|
PayoutButtonDescription: {
|
|
1729
1730
|
color: "var(--sl-color-neutral-500)",
|
|
@@ -1743,6 +1744,41 @@ function PayoutButtonScrollView(props) {
|
|
|
1743
1744
|
index.h("p", { class: sheet$2.classes.PayoutButtonDescription }, text.payoutButtonDescription)));
|
|
1744
1745
|
}
|
|
1745
1746
|
|
|
1747
|
+
const GET_PAYOUT_DETAILS = index_module.dist.gql `
|
|
1748
|
+
query getPayoutDetails {
|
|
1749
|
+
user: viewer {
|
|
1750
|
+
... on User {
|
|
1751
|
+
id
|
|
1752
|
+
impactConnection {
|
|
1753
|
+
connected
|
|
1754
|
+
publisher {
|
|
1755
|
+
id
|
|
1756
|
+
payoutsAccount {
|
|
1757
|
+
hold
|
|
1758
|
+
balance
|
|
1759
|
+
}
|
|
1760
|
+
}
|
|
1761
|
+
}
|
|
1762
|
+
}
|
|
1763
|
+
}
|
|
1764
|
+
}
|
|
1765
|
+
`;
|
|
1766
|
+
function usePayoutButton(props) {
|
|
1767
|
+
var _a, _b, _c;
|
|
1768
|
+
const { data, refetch } = index_module.En(GET_PAYOUT_DETAILS, {});
|
|
1769
|
+
stencilHooks_module.useEffect(() => {
|
|
1770
|
+
const cb = () => refetch();
|
|
1771
|
+
window.addEventListener("sqm:tax-form-updated", cb);
|
|
1772
|
+
return () => window.removeEventListener("sqm:tax-form-updated", cb);
|
|
1773
|
+
}, []);
|
|
1774
|
+
return {
|
|
1775
|
+
states: {
|
|
1776
|
+
payoutSettingsComplete: !!((_c = (_b = (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher) === null || _c === void 0 ? void 0 : _c.payoutsAccount),
|
|
1777
|
+
},
|
|
1778
|
+
text: props.getTextProps(),
|
|
1779
|
+
};
|
|
1780
|
+
}
|
|
1781
|
+
|
|
1746
1782
|
const PayoutButtonScroll = class {
|
|
1747
1783
|
constructor(hostRef) {
|
|
1748
1784
|
index.registerInstance(this, hostRef);
|
|
@@ -1763,7 +1799,9 @@ const PayoutButtonScroll = class {
|
|
|
1763
1799
|
return utils.getProps(this);
|
|
1764
1800
|
}
|
|
1765
1801
|
render() {
|
|
1766
|
-
const props =
|
|
1802
|
+
const props = index_module.isDemo()
|
|
1803
|
+
? useDemoPayoutButtonScroll(this)
|
|
1804
|
+
: usePayoutButton(this);
|
|
1767
1805
|
return index.h(PayoutButtonScrollView, Object.assign({}, props));
|
|
1768
1806
|
}
|
|
1769
1807
|
};
|
|
@@ -1861,7 +1899,12 @@ function PayoutStatusAlertView(props) {
|
|
|
1861
1899
|
case "VERIFICATION:REQUIRED":
|
|
1862
1900
|
return {
|
|
1863
1901
|
header: text.verificationRequiredHeader,
|
|
1864
|
-
description:
|
|
1902
|
+
description: global.intl.formatMessage({
|
|
1903
|
+
id: "verificationRequiredDescription",
|
|
1904
|
+
defaultMessage: text.verificationRequiredDescription,
|
|
1905
|
+
}, {
|
|
1906
|
+
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
1907
|
+
}),
|
|
1865
1908
|
buttonText: text.verificationRequiredButtonText,
|
|
1866
1909
|
alertType: "warning",
|
|
1867
1910
|
icon: "exclamation-triangle",
|
|
@@ -1870,7 +1913,12 @@ function PayoutStatusAlertView(props) {
|
|
|
1870
1913
|
case "VERIFICATION:INTERNAL":
|
|
1871
1914
|
return {
|
|
1872
1915
|
header: text.verificationRequiredInternalHeader,
|
|
1873
|
-
description:
|
|
1916
|
+
description: global.intl.formatMessage({
|
|
1917
|
+
id: "verificationRequiredInternalDescription",
|
|
1918
|
+
defaultMessage: text.verificationRequiredInternalDescription,
|
|
1919
|
+
}, {
|
|
1920
|
+
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
1921
|
+
}),
|
|
1874
1922
|
alertType: "warning",
|
|
1875
1923
|
icon: "exclamation-triangle",
|
|
1876
1924
|
class: sheet$3.classes.WarningAlertContainer,
|
|
@@ -1878,7 +1926,12 @@ function PayoutStatusAlertView(props) {
|
|
|
1878
1926
|
case "VERIFICATION:REVIEW":
|
|
1879
1927
|
return {
|
|
1880
1928
|
header: text.verificationReviewInternalHeader,
|
|
1881
|
-
description:
|
|
1929
|
+
description: global.intl.formatMessage({
|
|
1930
|
+
id: "verificationReviewInternalDescription",
|
|
1931
|
+
defaultMessage: text.verificationReviewInternalDescription,
|
|
1932
|
+
}, {
|
|
1933
|
+
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
1934
|
+
}),
|
|
1882
1935
|
alertType: "warning",
|
|
1883
1936
|
icon: "exclamation-triangle",
|
|
1884
1937
|
class: sheet$3.classes.WarningAlertContainer,
|
|
@@ -1886,7 +1939,12 @@ function PayoutStatusAlertView(props) {
|
|
|
1886
1939
|
case "VERIFICATION:FAILED":
|
|
1887
1940
|
return {
|
|
1888
1941
|
header: text.verificationFailedInternalHeader,
|
|
1889
|
-
description:
|
|
1942
|
+
description: global.intl.formatMessage({
|
|
1943
|
+
id: "verificationFailedInternalDescription",
|
|
1944
|
+
defaultMessage: text.verificationFailedInternalDescription,
|
|
1945
|
+
}, {
|
|
1946
|
+
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
1947
|
+
}),
|
|
1890
1948
|
alertType: "critical",
|
|
1891
1949
|
icon: "exclamation-octagon",
|
|
1892
1950
|
class: sheet$3.classes.ErrorAlertContainer,
|
|
@@ -1894,7 +1952,12 @@ function PayoutStatusAlertView(props) {
|
|
|
1894
1952
|
case "HOLD":
|
|
1895
1953
|
return {
|
|
1896
1954
|
header: text.holdHeader,
|
|
1897
|
-
description:
|
|
1955
|
+
description: global.intl.formatMessage({
|
|
1956
|
+
id: "holdDescription",
|
|
1957
|
+
defaultMessage: text.holdDescription,
|
|
1958
|
+
}, {
|
|
1959
|
+
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
1960
|
+
}),
|
|
1898
1961
|
buttonText: null,
|
|
1899
1962
|
alertType: "warning",
|
|
1900
1963
|
icon: "exclamation-triangle",
|
|
@@ -1907,7 +1970,9 @@ function PayoutStatusAlertView(props) {
|
|
|
1907
1970
|
function getButton(status) {
|
|
1908
1971
|
switch (status) {
|
|
1909
1972
|
case "INFORMATION_REQUIRED":
|
|
1910
|
-
return data.type === "SquatchJS2" ? (index.h("sqm-scroll", { "scroll-tag-name": "sqm-tabs", "button-text": text.informationRequiredButtonText, "scroll-animation": "smooth" })) : data.type === "SquatchPortal" ? (index.h("sl-button", { type: "default", onClick: callbacks.onTermsClick }, text.informationRequiredButtonText)) : (
|
|
1973
|
+
return data.type === "SquatchJS2" ? (index.h("sqm-scroll", { "scroll-tag-name": "sqm-tabs", "button-text": text.informationRequiredButtonText, "scroll-animation": "smooth" })) : data.type === "SquatchPortal" ? (index.h("sl-button", { type: "default", onClick: callbacks.onTermsClick }, text.informationRequiredButtonText)) : (
|
|
1974
|
+
// Demo case
|
|
1975
|
+
index.h("sl-button", { type: "default" }, text.informationRequiredButtonText));
|
|
1911
1976
|
case "VERIFICATION:REQUIRED":
|
|
1912
1977
|
return (index.h("sl-button", { type: "default", loading: states.veriffLoading, onClick: callbacks.onClick }, text.verificationRequiredButtonText));
|
|
1913
1978
|
default:
|
|
@@ -1945,7 +2010,7 @@ const PayoutStatusAlert = class {
|
|
|
1945
2010
|
/**
|
|
1946
2011
|
* @uiName Verification required alert description
|
|
1947
2012
|
*/
|
|
1948
|
-
this.verificationRequiredDescription = "
|
|
2013
|
+
this.verificationRequiredDescription = "It should only take a few minutes verify. If you run in to an issue verifying your identity contact our {supportLink}.";
|
|
1949
2014
|
/**
|
|
1950
2015
|
* @uiName Verification required alert button text
|
|
1951
2016
|
*/
|
|
@@ -1957,7 +2022,7 @@ const PayoutStatusAlert = class {
|
|
|
1957
2022
|
/**
|
|
1958
2023
|
* @uiName Verification required internal alert description
|
|
1959
2024
|
*/
|
|
1960
|
-
this.verificationRequiredInternalDescription = "Identity verification submission has been received. Our system is currently performing additional checks and analyzing the results. You will be updated shortley.";
|
|
2025
|
+
this.verificationRequiredInternalDescription = "Identity verification submission has been received. Our system is currently performing additional checks and analyzing the results. You will be updated shortley. If you don't hear from us contact our {supportLink}.";
|
|
1961
2026
|
/**
|
|
1962
2027
|
* @uiName Verification review internal alert header
|
|
1963
2028
|
*/
|
|
@@ -1965,7 +2030,7 @@ const PayoutStatusAlert = class {
|
|
|
1965
2030
|
/**
|
|
1966
2031
|
* @uiName Verification review internal alert description
|
|
1967
2032
|
*/
|
|
1968
|
-
this.verificationReviewInternalDescription = "Identity verification requires further review due to a potential error. Our team is reviewing the information and will update you shortly.";
|
|
2033
|
+
this.verificationReviewInternalDescription = "Identity verification requires further review due to a potential error. Our team is reviewing the information and will update you shortly. If you don't hear from us contact our {supportLink}.";
|
|
1969
2034
|
/**
|
|
1970
2035
|
* @uiName Verification failed internal alert header
|
|
1971
2036
|
*/
|
|
@@ -1973,7 +2038,7 @@ const PayoutStatusAlert = class {
|
|
|
1973
2038
|
/**
|
|
1974
2039
|
* @uiName Verification failed internal alert description
|
|
1975
2040
|
*/
|
|
1976
|
-
this.verificationFailedInternalDescription = "Identity verification has failed. Our team is reviewing the report and will contact you with further information.";
|
|
2041
|
+
this.verificationFailedInternalDescription = "Identity verification has failed. Our team is reviewing the report and will contact you with further information. If you don't hear from us contact our {supportLink}.";
|
|
1977
2042
|
/**
|
|
1978
2043
|
* @uiName Payout on hold alert header
|
|
1979
2044
|
*/
|
|
@@ -1982,11 +2047,15 @@ const PayoutStatusAlert = class {
|
|
|
1982
2047
|
* @uiName Payout on hold alert description
|
|
1983
2048
|
* AL: TODO copy not finalized for support section
|
|
1984
2049
|
*/
|
|
1985
|
-
this.holdDescription = "Please check your inbox for an email from our referral provider, impact.com. It contains details on how to resolve this issue. If you need further assistance, feel free to reach out to our
|
|
2050
|
+
this.holdDescription = "Please check your inbox for an email from our referral provider, impact.com. It contains details on how to resolve this issue. If you need further assistance, feel free to reach out to our {supportLink}.";
|
|
2051
|
+
/**
|
|
2052
|
+
* @uiName Cash & Payouts Microsite Page (only set if alert is used in a microsite)
|
|
2053
|
+
*/
|
|
2054
|
+
this.cashPayoutsPageUrl = "/cash";
|
|
1986
2055
|
/**
|
|
1987
|
-
* @uiName
|
|
2056
|
+
* @uiName Support link text
|
|
1988
2057
|
*/
|
|
1989
|
-
this.
|
|
2058
|
+
this.supportLink = "support team";
|
|
1990
2059
|
/**
|
|
1991
2060
|
* @uiName Error header
|
|
1992
2061
|
*/
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-b0129cd6.js');
|
|
6
6
|
const stencilHooks_module = require('./stencil-hooks.module-72742a0b.js');
|
|
7
|
+
const global = require('./global-c3637175.js');
|
|
7
8
|
const index_module = require('./index.module-b8d9d0ba.js');
|
|
8
9
|
const cjs = require('./cjs-1066ec21.js');
|
|
9
10
|
const JSS = require('./JSS-8503a151.js');
|
|
@@ -153,10 +154,7 @@ const style = {
|
|
|
153
154
|
backgroundColor: "var(--sl-color-red-100)",
|
|
154
155
|
borderTop: "none",
|
|
155
156
|
},
|
|
156
|
-
"&::part(message)": {
|
|
157
|
-
display: "flex",
|
|
158
|
-
flexDirection: "column",
|
|
159
|
-
},
|
|
157
|
+
"&::part(message)": {},
|
|
160
158
|
},
|
|
161
159
|
ContinueButton: {
|
|
162
160
|
width: "100%",
|
|
@@ -209,7 +207,13 @@ function WidgetEmailVerificationView(props) {
|
|
|
209
207
|
states.sendCodeError && (index.h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "danger", class: sheet.classes.ErrorAlertContainer, open: true },
|
|
210
208
|
index.h("sl-icon", { slot: "icon", name: "exclamation-octagon" }),
|
|
211
209
|
index.h("b", null, text.sendCodeErrorHeader),
|
|
212
|
-
|
|
210
|
+
index.h("br", null),
|
|
211
|
+
global.intl.formatMessage({
|
|
212
|
+
id: "sendCodeErrorDescription",
|
|
213
|
+
defaultMessage: text.sendCodeErrorDescription,
|
|
214
|
+
}, {
|
|
215
|
+
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
216
|
+
}))),
|
|
213
217
|
states.initialLoading ? (renderLoadingSkeleton()) : (index.h("div", { class: sheet.classes.Wrapper },
|
|
214
218
|
index.h(sqmTextSpanView.TextSpanView, { type: "p" }, text.verifyEmailHeaderText),
|
|
215
219
|
index.h("sl-form", { "onSl-submit": callbacks.submitEmail },
|
|
@@ -233,11 +237,15 @@ const WidgetEmailVerification = class {
|
|
|
233
237
|
/**
|
|
234
238
|
* @uiName Send code to email alert header
|
|
235
239
|
*/
|
|
236
|
-
this.sendCodeErrorHeader = "There was an error sending your code
|
|
240
|
+
this.sendCodeErrorHeader = "There was an error sending your code";
|
|
241
|
+
/**
|
|
242
|
+
* @uiName Support link text
|
|
243
|
+
*/
|
|
244
|
+
this.supportLink = "support team";
|
|
237
245
|
/**
|
|
238
246
|
* @uiName Send code to email alert description
|
|
239
247
|
*/
|
|
240
|
-
this.sendCodeErrorDescription = "Please try again. If this problem continues, contact our program
|
|
248
|
+
this.sendCodeErrorDescription = "Please try again. If this problem continues, contact our program {supportLink}.";
|
|
241
249
|
/**
|
|
242
250
|
* @uiName Email input label
|
|
243
251
|
*/
|
|
@@ -779,7 +779,7 @@ const GeneralLoadingView = () => {
|
|
|
779
779
|
return index.h(LoadingView, null);
|
|
780
780
|
};
|
|
781
781
|
const GeneralErrorView = () => {
|
|
782
|
-
return (index.h(ErrorView, { loadingErrorAlertHeader: "There was a problem loading your form", loadingErrorAlertDescription: "Please refresh the page and try again. If this problem continues, contact
|
|
782
|
+
return (index.h(ErrorView, { loadingErrorAlertHeader: "There was a problem loading your form", loadingErrorAlertDescription: "Please refresh the page and try again. If this problem continues, contact our support team." }));
|
|
783
783
|
};
|
|
784
784
|
// STEP ONE
|
|
785
785
|
const StepOne = () => {
|
|
@@ -1263,6 +1263,20 @@ const StepFourToPaypalChecked = () => {
|
|
|
1263
1263
|
},
|
|
1264
1264
|
} }));
|
|
1265
1265
|
};
|
|
1266
|
+
const StepFourReVerifyEmail = () => {
|
|
1267
|
+
return (index.h("sqm-banking-info-form", { demoData: {
|
|
1268
|
+
...stepFourProps,
|
|
1269
|
+
states: {
|
|
1270
|
+
...stepFourProps.states,
|
|
1271
|
+
showVerification: true,
|
|
1272
|
+
isPartner: true,
|
|
1273
|
+
formState: {
|
|
1274
|
+
...stepFourProps.states.formState,
|
|
1275
|
+
paymentMethodChecked: "toPayPalAccount",
|
|
1276
|
+
},
|
|
1277
|
+
},
|
|
1278
|
+
} }));
|
|
1279
|
+
};
|
|
1266
1280
|
const TaxAndCashDashboardActiveW9Form = () => {
|
|
1267
1281
|
return (index.h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
1268
1282
|
...dashboardProps,
|
|
@@ -1756,6 +1770,7 @@ const TaxForm = /*#__PURE__*/Object.freeze({
|
|
|
1756
1770
|
StepFourIsPartner: StepFourIsPartner,
|
|
1757
1771
|
StepFourDirectToBankChecked: StepFourDirectToBankChecked,
|
|
1758
1772
|
StepFourToPaypalChecked: StepFourToPaypalChecked,
|
|
1773
|
+
StepFourReVerifyEmail: StepFourReVerifyEmail,
|
|
1759
1774
|
TaxAndCashDashboardActiveW9Form: TaxAndCashDashboardActiveW9Form,
|
|
1760
1775
|
TaxAndCashDashboardActiveW8BENForm: TaxAndCashDashboardActiveW8BENForm,
|
|
1761
1776
|
TaxAndCashDashboardActiveW8BENEForm: TaxAndCashDashboardActiveW8BENEForm,
|
|
@@ -30,7 +30,7 @@ const sqmPortalResetPasswordView = require('./sqm-portal-reset-password-view-96f
|
|
|
30
30
|
const sqmPortalVerifyEmailView = require('./sqm-portal-verify-email-view-7ffcc0d4.js');
|
|
31
31
|
const ShadowViewAddon = require('./ShadowViewAddon-040cffad.js');
|
|
32
32
|
const sqmPortalContainerView = require('./sqm-portal-container-view-990a85a3.js');
|
|
33
|
-
const sqmInvoiceTableView = require('./sqm-invoice-table-view-
|
|
33
|
+
const sqmInvoiceTableView = require('./sqm-invoice-table-view-b0602970.js');
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
36
|
* lodash (Custom Build) <https://lodash.com/>
|
|
@@ -8438,6 +8438,9 @@ const deniedReward = {
|
|
|
8438
8438
|
const payoutFailedReward = {
|
|
8439
8439
|
statuses: ["PAYOUT_FAILED"],
|
|
8440
8440
|
};
|
|
8441
|
+
const payoutCancelledReward = {
|
|
8442
|
+
statuses: ["PAYOUT_CANCELLED"],
|
|
8443
|
+
};
|
|
8441
8444
|
const pendingReviewReward = {
|
|
8442
8445
|
statuses: ["PENDING_REVIEW"],
|
|
8443
8446
|
};
|
|
@@ -8517,8 +8520,8 @@ function getMonths() {
|
|
|
8517
8520
|
function getYears() {
|
|
8518
8521
|
return luxon.luxon.DateTime.now().toMillis() + 200000000000;
|
|
8519
8522
|
}
|
|
8520
|
-
const statusText = "{status, select, AVAILABLE {Available}
|
|
8521
|
-
const statusLongText = "{status, select, AVAILABLE {Reward expiring on}
|
|
8523
|
+
const 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} }";
|
|
8524
|
+
const statusLongText = "{status, select, AVAILABLE {Reward expiring on} CANCELLED {Reward cancelled on} PENDING {Available on} PENDING_REVIEW {Pending since} PAYOUT_APPROVED {Reward approved for payout and was scheduled for payment 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.} 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} }";
|
|
8522
8525
|
const PendingNoUnpend = () => {
|
|
8523
8526
|
return (index.h("sqm-referral-table-rewards-cell", { rewards: [{ ...baseReward, ...pendingReward, ...nullScheduledFor }], statusText: statusText, statusLongText: statusLongText, fuelTankText: "Your code is", rewardReceivedText: "Reward received on", expiringText: "Expiring in", pendingForText: "{status} for {date}", deniedHelpText: "Contact support if you think this is a mistake." }));
|
|
8524
8527
|
};
|
|
@@ -8601,8 +8604,7 @@ const PayoutFailed = () => {
|
|
|
8601
8604
|
},
|
|
8602
8605
|
], statusText: statusText, statusLongText: statusLongText, fuelTankText: "Your code is", rewardReceivedText: "Reward received on", expiringText: "Expiring in", pendingForText: "{status} for {date}", deniedHelpText: "Contact support if you think this is a mistake." }));
|
|
8603
8606
|
};
|
|
8604
|
-
|
|
8605
|
-
const PayoutCancelled = () => {
|
|
8607
|
+
const PayoutDenied = () => {
|
|
8606
8608
|
return (index.h("sqm-referral-table-rewards-cell", { rewards: [
|
|
8607
8609
|
{
|
|
8608
8610
|
...cashPayoutSentReward,
|
|
@@ -8612,6 +8614,16 @@ const PayoutCancelled = () => {
|
|
|
8612
8614
|
},
|
|
8613
8615
|
], statusText: statusText, statusLongText: statusLongText, fuelTankText: "Your code is", rewardReceivedText: "Reward received on", expiringText: "Expiring in", pendingForText: "{status} for {date}", deniedHelpText: "Contact support if you think this is a mistake." }));
|
|
8614
8616
|
};
|
|
8617
|
+
const PayoutCancelled = () => {
|
|
8618
|
+
return (index.h("sqm-referral-table-rewards-cell", { rewards: [
|
|
8619
|
+
{
|
|
8620
|
+
...cashPayoutSentReward,
|
|
8621
|
+
...payoutCancelledReward,
|
|
8622
|
+
datePayoutRetried: getDays(),
|
|
8623
|
+
dateGiven: null,
|
|
8624
|
+
},
|
|
8625
|
+
], statusText: statusText, statusLongText: statusLongText, fuelTankText: "Your code is", rewardReceivedText: "Reward received on", expiringText: "Expiring in", pendingForText: "{status} for {date}", deniedHelpText: "Contact support if you think this is a mistake." }));
|
|
8626
|
+
};
|
|
8615
8627
|
const PendingReview = () => {
|
|
8616
8628
|
return (index.h("sqm-referral-table-rewards-cell", { rewards: [{ ...baseReward, ...pendingReviewReward }], statusText: statusText, statusLongText: statusLongText, fuelTankText: "Your code is", rewardReceivedText: "Reward received on", expiringText: "Expiring in", pendingForText: "{status} for {date}", deniedHelpText: "Contact support if you think this is a mistake." }));
|
|
8617
8629
|
};
|
|
@@ -8669,6 +8681,7 @@ const ReferralTableRewardsCell = /*#__PURE__*/Object.freeze({
|
|
|
8669
8681
|
Expired: Expired,
|
|
8670
8682
|
Denied: Denied,
|
|
8671
8683
|
PayoutFailed: PayoutFailed,
|
|
8684
|
+
PayoutDenied: PayoutDenied,
|
|
8672
8685
|
PayoutCancelled: PayoutCancelled,
|
|
8673
8686
|
PendingReview: PendingReview,
|
|
8674
8687
|
PendingTaxReview: PendingTaxReview,
|
|
@@ -8899,6 +8912,12 @@ const simpleUserTableProps = {
|
|
|
8899
8912
|
index.h(DateCell, null),
|
|
8900
8913
|
index.h(PayoutFailed, null),
|
|
8901
8914
|
],
|
|
8915
|
+
[
|
|
8916
|
+
index.h("sqm-referral-table-user-cell", { name: "Sarah Joseph" }),
|
|
8917
|
+
index.h(Converted, null),
|
|
8918
|
+
index.h(DateCell, null),
|
|
8919
|
+
index.h(PayoutCancelled, null),
|
|
8920
|
+
],
|
|
8902
8921
|
[
|
|
8903
8922
|
index.h("sqm-referral-table-user-cell", { name: "Sarah Joseph" }),
|
|
8904
8923
|
index.h(Converted, null),
|
|
@@ -12016,24 +12035,16 @@ const StatusCellExpired = () => {
|
|
|
12016
12035
|
const pending = {
|
|
12017
12036
|
statuses: ["PENDING"],
|
|
12018
12037
|
};
|
|
12019
|
-
// const pendingTaxReview = {
|
|
12020
|
-
// statuses: ["PENDING_TAX_REVIEW"],
|
|
12021
|
-
// };
|
|
12022
|
-
// const pendingNewTaxForm = {
|
|
12023
|
-
// statuses: ["PENDING_NEW_TAX_FORM"],
|
|
12024
|
-
// };
|
|
12025
|
-
// const pendingTaxSubmission = {
|
|
12026
|
-
// statuses: ["PENDING_TAX_SUBMISSION"],
|
|
12027
|
-
// };
|
|
12028
|
-
// const pendingPartnerCreation = {
|
|
12029
|
-
// statuses: ["PENDING_PARTNER_CREATION"],
|
|
12030
|
-
// };
|
|
12031
12038
|
const payoutSent = {
|
|
12032
12039
|
statuses: ["PAYOUT_SENT"],
|
|
12033
12040
|
};
|
|
12034
12041
|
const payoutFailed = {
|
|
12035
12042
|
statuses: ["PAYOUT_FAILED"],
|
|
12036
12043
|
};
|
|
12044
|
+
const payoutCancelled = {
|
|
12045
|
+
statuses: ["PAYOUT_CANCELLED"],
|
|
12046
|
+
dateCancelled: 1355612521321,
|
|
12047
|
+
};
|
|
12037
12048
|
const us_tax = {
|
|
12038
12049
|
pendingReasons: ["US_TAX"],
|
|
12039
12050
|
};
|
|
@@ -12095,6 +12106,9 @@ const StatusCellPayoutSent = () => {
|
|
|
12095
12106
|
const StatusCellPayoutFailed = () => {
|
|
12096
12107
|
return (index.h("sqm-rewards-table-status-cell", { statusText: "Payout Failed", reward: { ...rewardsData$1, ...payoutFailed } }));
|
|
12097
12108
|
};
|
|
12109
|
+
const StatusCellPayoutCancelled = () => {
|
|
12110
|
+
return (index.h("sqm-rewards-table-status-cell", { statusText: "Payout Cancelled", reward: { ...rewardsData$1, ...payoutCancelled } }));
|
|
12111
|
+
};
|
|
12098
12112
|
const StatusCellPendingWithLongText = () => {
|
|
12099
12113
|
return (index.h("div", { style: { width: "200px" } },
|
|
12100
12114
|
index.h("sqm-rewards-table-status-cell", { statusText: "Pending for 300,000,000 months and some change", reward: { ...rewardsData$1, ...pending } })));
|
|
@@ -12198,6 +12212,7 @@ const RewardsTableCell = /*#__PURE__*/Object.freeze({
|
|
|
12198
12212
|
StatusCellPendingPartnerCreation: StatusCellPendingPartnerCreation,
|
|
12199
12213
|
StatusCellPayoutSent: StatusCellPayoutSent,
|
|
12200
12214
|
StatusCellPayoutFailed: StatusCellPayoutFailed,
|
|
12215
|
+
StatusCellPayoutCancelled: StatusCellPayoutCancelled,
|
|
12201
12216
|
StatusCellPendingWithLongText: StatusCellPendingWithLongText,
|
|
12202
12217
|
StatusCellPendingUsTax: StatusCellPendingUsTax,
|
|
12203
12218
|
StatusCellPendingScheduled: StatusCellPendingScheduled,
|
|
@@ -15094,11 +15109,19 @@ const defaultProps$m = {
|
|
|
15094
15109
|
payoutSettingsComplete: true,
|
|
15095
15110
|
};
|
|
15096
15111
|
const CompletedTaxForm = () => (index.h("sqm-payout-button-scroll", { demoData: { states: { ...defaultProps$m, payoutSettingsComplete: true } } }));
|
|
15112
|
+
const CompletedTaxFormWithStatsContainer = () => (index.h("sqm-portal-container", { display: "flex", maxWidth: "100%", minWidth: "100%", "justify-content": "space-between", flexWrap: "nowrap" },
|
|
15113
|
+
index.h("sqm-portal-container", { display: "flex", "max-width": "fit-content" },
|
|
15114
|
+
index.h("sqm-big-stat", { "flex-reverse": "true", alignment: "left", "stat-type": "/referralsCount" },
|
|
15115
|
+
index.h("p", null, "Referrals")),
|
|
15116
|
+
index.h("sqm-big-stat", { "flex-reverse": "true", alignment: "left", "stat-type": "/payoutBalance" },
|
|
15117
|
+
index.h("p", null, "Cash Balance"))),
|
|
15118
|
+
index.h("sqm-payout-button-scroll", { demoData: { states: { ...defaultProps$m, payoutSettingsComplete: true } } })));
|
|
15097
15119
|
|
|
15098
15120
|
const PayoutButtonScroll = /*#__PURE__*/Object.freeze({
|
|
15099
15121
|
__proto__: null,
|
|
15100
15122
|
'default': PayoutButtonScroll_stories,
|
|
15101
|
-
CompletedTaxForm: CompletedTaxForm
|
|
15123
|
+
CompletedTaxForm: CompletedTaxForm,
|
|
15124
|
+
CompletedTaxFormWithStatsContainer: CompletedTaxFormWithStatsContainer
|
|
15102
15125
|
});
|
|
15103
15126
|
|
|
15104
15127
|
const PayoutStatusAlert_stories = {
|
|
@@ -1032,7 +1032,7 @@ function usePayoutStatus(props) {
|
|
|
1032
1032
|
data: { type },
|
|
1033
1033
|
text: props.getTextProps(),
|
|
1034
1034
|
callbacks: {
|
|
1035
|
-
onTermsClick: () => window.open(props.
|
|
1035
|
+
onTermsClick: () => window.open(props.cashPayoutsPageUrl, "_blank").focus(),
|
|
1036
1036
|
onClick: render,
|
|
1037
1037
|
},
|
|
1038
1038
|
};
|
|
@@ -6,3 +6,10 @@ const defaultProps = {
|
|
|
6
6
|
payoutSettingsComplete: true,
|
|
7
7
|
};
|
|
8
8
|
export const CompletedTaxForm = () => (h("sqm-payout-button-scroll", { demoData: { states: { ...defaultProps, payoutSettingsComplete: true } } }));
|
|
9
|
+
export const CompletedTaxFormWithStatsContainer = () => (h("sqm-portal-container", { display: "flex", maxWidth: "100%", minWidth: "100%", "justify-content": "space-between", flexWrap: "nowrap" },
|
|
10
|
+
h("sqm-portal-container", { display: "flex", "max-width": "fit-content" },
|
|
11
|
+
h("sqm-big-stat", { "flex-reverse": "true", alignment: "left", "stat-type": "/referralsCount" },
|
|
12
|
+
h("p", null, "Referrals")),
|
|
13
|
+
h("sqm-big-stat", { "flex-reverse": "true", alignment: "left", "stat-type": "/payoutBalance" },
|
|
14
|
+
h("p", null, "Cash Balance"))),
|
|
15
|
+
h("sqm-payout-button-scroll", { demoData: { states: { ...defaultProps, payoutSettingsComplete: true } } })));
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { Component, h, Prop, State } from "@stencil/core";
|
|
2
2
|
import { withHooks } from "@saasquatch/stencil-hooks";
|
|
3
|
+
import { isDemo } from "@saasquatch/component-boilerplate";
|
|
3
4
|
import { getProps } from "../../utils/utils";
|
|
4
5
|
import { PayoutButtonScrollView, } from "./sqm-payout-button-scroll-view";
|
|
5
6
|
import deepmerge from "deepmerge";
|
|
7
|
+
import { usePayoutButton } from "./usePayoutButton";
|
|
6
8
|
/**
|
|
7
9
|
* @uiName Payout Button Scroll
|
|
8
10
|
*/
|
|
@@ -25,7 +27,9 @@ export class PayoutButtonScroll {
|
|
|
25
27
|
return getProps(this);
|
|
26
28
|
}
|
|
27
29
|
render() {
|
|
28
|
-
const props =
|
|
30
|
+
const props = isDemo()
|
|
31
|
+
? useDemoPayoutButtonScroll(this)
|
|
32
|
+
: usePayoutButton(this);
|
|
29
33
|
return h(PayoutButtonScrollView, Object.assign({}, props));
|
|
30
34
|
}
|
|
31
35
|
static get is() { return "sqm-payout-button-scroll"; }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { gql } from "graphql-request";
|
|
2
2
|
import { useQuery } from "@saasquatch/component-boilerplate";
|
|
3
|
-
import { useEffect
|
|
3
|
+
import { useEffect } from "@saasquatch/universal-hooks";
|
|
4
4
|
const GET_PAYOUT_DETAILS = gql `
|
|
5
5
|
query getPayoutDetails {
|
|
6
6
|
user: viewer {
|
|
@@ -21,15 +21,8 @@ const GET_PAYOUT_DETAILS = gql `
|
|
|
21
21
|
}
|
|
22
22
|
`;
|
|
23
23
|
export function usePayoutButton(props) {
|
|
24
|
+
var _a, _b, _c;
|
|
24
25
|
const { data, refetch } = useQuery(GET_PAYOUT_DETAILS, {});
|
|
25
|
-
const [completed, setCompleted] = useState(false);
|
|
26
|
-
useEffect(() => {
|
|
27
|
-
var _a, _b, _c;
|
|
28
|
-
if (!data)
|
|
29
|
-
return;
|
|
30
|
-
const hasCompleted = (_c = (_b = (_a = data.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher) === null || _c === void 0 ? void 0 : _c.payoutAccount;
|
|
31
|
-
setCompleted(hasCompleted);
|
|
32
|
-
}, [data]);
|
|
33
26
|
useEffect(() => {
|
|
34
27
|
const cb = () => refetch();
|
|
35
28
|
window.addEventListener("sqm:tax-form-updated", cb);
|
|
@@ -37,7 +30,7 @@ export function usePayoutButton(props) {
|
|
|
37
30
|
}, []);
|
|
38
31
|
return {
|
|
39
32
|
states: {
|
|
40
|
-
payoutSettingsComplete:
|
|
33
|
+
payoutSettingsComplete: !!((_c = (_b = (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher) === null || _c === void 0 ? void 0 : _c.payoutsAccount),
|
|
41
34
|
},
|
|
42
35
|
text: props.getTextProps(),
|
|
43
36
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { GenericTableView } from "../../tables/GenericTableView";
|
|
3
|
-
import { AvailableNoExpiry, PendingNoUnpend, Redeemed, Denied, PendingReview, PayoutSent, PayoutFailed, PendingNewTaxForm, PendingPartnerCreation, PendingTaxReview, PendingTaxSubmission, } from "./ReferralTableRewardsCell.stories";
|
|
3
|
+
import { AvailableNoExpiry, PendingNoUnpend, Redeemed, Denied, PendingReview, PayoutSent, PayoutFailed, PendingNewTaxForm, PendingPartnerCreation, PendingTaxReview, PendingTaxSubmission, PayoutCancelled, } from "./ReferralTableRewardsCell.stories";
|
|
4
4
|
import { DateCell, PendingReview as PendingReviewStatus, Pending as PendingStatus, Denied as DeniedStatus, Converted as ConvertedStatus, InProgress, } from "./ReferralTableCell.stories";
|
|
5
5
|
import scenario from "./referral-table.feature";
|
|
6
6
|
export default {
|
|
@@ -132,6 +132,12 @@ const simpleUserTableProps = {
|
|
|
132
132
|
h(DateCell, null),
|
|
133
133
|
h(PayoutFailed, null),
|
|
134
134
|
],
|
|
135
|
+
[
|
|
136
|
+
h("sqm-referral-table-user-cell", { name: "Sarah Joseph" }),
|
|
137
|
+
h(ConvertedStatus, null),
|
|
138
|
+
h(DateCell, null),
|
|
139
|
+
h(PayoutCancelled, null),
|
|
140
|
+
],
|
|
135
141
|
[
|
|
136
142
|
h("sqm-referral-table-user-cell", { name: "Sarah Joseph" }),
|
|
137
143
|
h(ConvertedStatus, null),
|
|
@@ -126,6 +126,9 @@ const deniedReward = {
|
|
|
126
126
|
const payoutFailedReward = {
|
|
127
127
|
statuses: ["PAYOUT_FAILED"],
|
|
128
128
|
};
|
|
129
|
+
const payoutCancelledReward = {
|
|
130
|
+
statuses: ["PAYOUT_CANCELLED"],
|
|
131
|
+
};
|
|
129
132
|
const pendingReviewReward = {
|
|
130
133
|
statuses: ["PENDING_REVIEW"],
|
|
131
134
|
};
|
|
@@ -205,8 +208,8 @@ function getMonths() {
|
|
|
205
208
|
function getYears() {
|
|
206
209
|
return DateTime.now().toMillis() + 200000000000;
|
|
207
210
|
}
|
|
208
|
-
const statusText = "{status, select, AVAILABLE {Available}
|
|
209
|
-
const statusLongText = "{status, select, AVAILABLE {Reward expiring on}
|
|
211
|
+
const 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} }";
|
|
212
|
+
const statusLongText = "{status, select, AVAILABLE {Reward expiring on} CANCELLED {Reward cancelled on} PENDING {Available on} PENDING_REVIEW {Pending since} PAYOUT_APPROVED {Reward approved for payout and was scheduled for payment 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.} 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} }";
|
|
210
213
|
export const PendingNoUnpend = () => {
|
|
211
214
|
return (h("sqm-referral-table-rewards-cell", { rewards: [{ ...baseReward, ...pendingReward, ...nullScheduledFor }], statusText: statusText, statusLongText: statusLongText, fuelTankText: "Your code is", rewardReceivedText: "Reward received on", expiringText: "Expiring in", pendingForText: "{status} for {date}", deniedHelpText: "Contact support if you think this is a mistake." }));
|
|
212
215
|
};
|
|
@@ -289,8 +292,7 @@ export const PayoutFailed = () => {
|
|
|
289
292
|
},
|
|
290
293
|
], statusText: statusText, statusLongText: statusLongText, fuelTankText: "Your code is", rewardReceivedText: "Reward received on", expiringText: "Expiring in", pendingForText: "{status} for {date}", deniedHelpText: "Contact support if you think this is a mistake." }));
|
|
291
294
|
};
|
|
292
|
-
|
|
293
|
-
export const PayoutCancelled = () => {
|
|
295
|
+
export const PayoutDenied = () => {
|
|
294
296
|
return (h("sqm-referral-table-rewards-cell", { rewards: [
|
|
295
297
|
{
|
|
296
298
|
...cashPayoutSentReward,
|
|
@@ -300,6 +302,16 @@ export const PayoutCancelled = () => {
|
|
|
300
302
|
},
|
|
301
303
|
], statusText: statusText, statusLongText: statusLongText, fuelTankText: "Your code is", rewardReceivedText: "Reward received on", expiringText: "Expiring in", pendingForText: "{status} for {date}", deniedHelpText: "Contact support if you think this is a mistake." }));
|
|
302
304
|
};
|
|
305
|
+
export const PayoutCancelled = () => {
|
|
306
|
+
return (h("sqm-referral-table-rewards-cell", { rewards: [
|
|
307
|
+
{
|
|
308
|
+
...cashPayoutSentReward,
|
|
309
|
+
...payoutCancelledReward,
|
|
310
|
+
datePayoutRetried: getDays(),
|
|
311
|
+
dateGiven: null,
|
|
312
|
+
},
|
|
313
|
+
], statusText: statusText, statusLongText: statusLongText, fuelTankText: "Your code is", rewardReceivedText: "Reward received on", expiringText: "Expiring in", pendingForText: "{status} for {date}", deniedHelpText: "Contact support if you think this is a mistake." }));
|
|
314
|
+
};
|
|
303
315
|
export const PendingReview = () => {
|
|
304
316
|
return (h("sqm-referral-table-rewards-cell", { rewards: [{ ...baseReward, ...pendingReviewReward }], statusText: statusText, statusLongText: statusLongText, fuelTankText: "Your code is", rewardReceivedText: "Reward received on", expiringText: "Expiring in", pendingForText: "{status} for {date}", deniedHelpText: "Contact support if you think this is a mistake." }));
|
|
305
317
|
};
|
|
@@ -263,24 +263,16 @@ export const StatusCellExpired = () => {
|
|
|
263
263
|
const pending = {
|
|
264
264
|
statuses: ["PENDING"],
|
|
265
265
|
};
|
|
266
|
-
// const pendingTaxReview = {
|
|
267
|
-
// statuses: ["PENDING_TAX_REVIEW"],
|
|
268
|
-
// };
|
|
269
|
-
// const pendingNewTaxForm = {
|
|
270
|
-
// statuses: ["PENDING_NEW_TAX_FORM"],
|
|
271
|
-
// };
|
|
272
|
-
// const pendingTaxSubmission = {
|
|
273
|
-
// statuses: ["PENDING_TAX_SUBMISSION"],
|
|
274
|
-
// };
|
|
275
|
-
// const pendingPartnerCreation = {
|
|
276
|
-
// statuses: ["PENDING_PARTNER_CREATION"],
|
|
277
|
-
// };
|
|
278
266
|
const payoutSent = {
|
|
279
267
|
statuses: ["PAYOUT_SENT"],
|
|
280
268
|
};
|
|
281
269
|
const payoutFailed = {
|
|
282
270
|
statuses: ["PAYOUT_FAILED"],
|
|
283
271
|
};
|
|
272
|
+
const payoutCancelled = {
|
|
273
|
+
statuses: ["PAYOUT_CANCELLED"],
|
|
274
|
+
dateCancelled: 1355612521321,
|
|
275
|
+
};
|
|
284
276
|
const us_tax = {
|
|
285
277
|
pendingReasons: ["US_TAX"],
|
|
286
278
|
};
|
|
@@ -342,6 +334,9 @@ export const StatusCellPayoutSent = () => {
|
|
|
342
334
|
export const StatusCellPayoutFailed = () => {
|
|
343
335
|
return (h("sqm-rewards-table-status-cell", { statusText: "Payout Failed", reward: { ...rewardsData, ...payoutFailed } }));
|
|
344
336
|
};
|
|
337
|
+
export const StatusCellPayoutCancelled = () => {
|
|
338
|
+
return (h("sqm-rewards-table-status-cell", { statusText: "Payout Cancelled", reward: { ...rewardsData, ...payoutCancelled } }));
|
|
339
|
+
};
|
|
345
340
|
export const StatusCellPendingWithLongText = () => {
|
|
346
341
|
return (h("div", { style: { width: "200px" } },
|
|
347
342
|
h("sqm-rewards-table-status-cell", { statusText: "Pending for 300,000,000 months and some change", reward: { ...rewardsData, ...pending } })));
|