@saasquatch/mint-components 2.5.0-5 → 2.5.0
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/{ErrorView-ee7b0f36.js → ErrorView-17578c10.js} +1 -1
- package/dist/cjs/{ShadowViewAddon-6d88b845.js → ShadowViewAddon-d4cf928f.js} +6 -6
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mint-components.cjs.js +1 -1
- package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +6 -5
- package/dist/cjs/sqm-big-stat_47.cjs.entry.js +25 -23
- package/dist/cjs/sqm-email-verification_2.cjs.entry.js +17 -4
- package/dist/cjs/sqm-form-message_2.cjs.entry.js +4 -4
- package/dist/cjs/{sqm-partner-info-modal-view-d9b61d54.js → sqm-partner-info-modal-view-e97ce8ef.js} +21 -8
- package/dist/cjs/{sqm-qr-code-view-1f2daa76.js → sqm-qr-code-view-0d43424e.js} +1 -1
- package/dist/cjs/sqm-qr-code.cjs.entry.js +2 -2
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +45 -10
- package/dist/cjs/{sqm-user-info-form-view-6a65f1fb.js → sqm-user-info-form-view-e725523f.js} +20 -26
- package/dist/cjs/{subregions-d12829d6.js → subregions-cd5c7ad6.js} +9 -4
- package/dist/cjs/{useIndirectTaxForm-0969e194.js → useIndirectTaxForm-ed4df485.js} +23 -35
- package/dist/collection/components/sqm-base-registration/sqm-base-registration-form-view.js +1 -1
- package/dist/collection/components/sqm-coupon-code/sqm-coupon-code-view.js +1 -1
- package/dist/collection/components/sqm-coupon-code/sqm-coupon-code.js +1 -1
- package/dist/collection/components/sqm-empty/sqm-empty.js +1 -1
- package/dist/collection/components/sqm-form-message/sqm-form-message.js +6 -4
- package/dist/collection/components/sqm-instant-access-registration/sqm-instant-access-registration.js +1 -0
- package/dist/collection/components/sqm-lead-form/sqm-lead-checkbox-field.js +2 -0
- package/dist/collection/components/sqm-lead-form/sqm-lead-dropdown-field.js +2 -0
- package/dist/collection/components/sqm-lead-form/sqm-lead-input-field.js +2 -0
- package/dist/collection/components/sqm-partner-info-modal/PartnerInfoModal.stories.js +16 -1
- package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal-view.js +21 -8
- package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal.js +59 -1
- package/dist/collection/components/sqm-partner-info-modal/usePartnerInfoModal.js +4 -3
- package/dist/collection/components/sqm-portal-google-login/sqm-portal-google-login.js +6 -0
- package/dist/collection/components/sqm-portal-google-registration-form/sqm-portal-google-registration-form.js +3 -0
- package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-rewards-column.js +0 -1
- package/dist/collection/components/sqm-referral-table/sqm-referral-table.js +1 -0
- package/dist/collection/components/sqm-referred-registration/sqm-referred-registration.js +1 -0
- package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.js +3 -3
- package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-reward-column.js +0 -3
- package/dist/collection/components/sqm-rewards-table/sqm-rewards-table.js +3 -0
- package/dist/collection/components/sqm-share-button/sqm-share-button-view.js +1 -1
- package/dist/collection/components/sqm-share-button/sqm-share-button.js +1 -2
- package/dist/collection/components/sqm-titled-section/sqm-titled-section.js +1 -0
- package/dist/collection/components/sqm-widget-verification/sqm-widget-verification.js +38 -3
- package/dist/collection/components/tax-and-cash/TaxForm.stories.js +2 -1
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.js +1 -1
- package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form-view.js +1 -1
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form.js +1 -0
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/PayoutStatusAlert.stories.js +10 -1
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.js +10 -14
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js +1 -1
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.js +22 -34
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/ErrorView.js +1 -1
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +4 -2
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/TaxAndCashDashboardView.stories.js +8 -1
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.js +19 -25
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +2 -1
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js +2 -1
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.js +1 -0
- package/dist/collection/components/tax-and-cash/utils.js +9 -4
- package/dist/esm/{ErrorView-74cb3af8.js → ErrorView-c6fc1d9b.js} +1 -1
- package/dist/esm/{ShadowViewAddon-86b5e986.js → ShadowViewAddon-722e6707.js} +6 -6
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mint-components.js +1 -1
- package/dist/esm/sqm-banking-info-form_10.entry.js +6 -5
- package/dist/esm/sqm-big-stat_47.entry.js +25 -23
- package/dist/esm/sqm-email-verification_2.entry.js +17 -4
- package/dist/esm/sqm-form-message_2.entry.js +4 -4
- package/dist/esm/{sqm-partner-info-modal-view-b921fed1.js → sqm-partner-info-modal-view-9c7a2c8c.js} +21 -8
- package/dist/esm/{sqm-qr-code-view-ce476721.js → sqm-qr-code-view-dd46daa3.js} +1 -1
- package/dist/esm/sqm-qr-code.entry.js +2 -2
- package/dist/esm/sqm-stencilbook.entry.js +45 -10
- package/dist/esm/{sqm-user-info-form-view-72afa9af.js → sqm-user-info-form-view-008f8969.js} +20 -26
- package/dist/esm/{subregions-98789b46.js → subregions-8e84e5fa.js} +10 -5
- package/dist/esm/{useIndirectTaxForm-bbe8779d.js → useIndirectTaxForm-f622ba23.js} +23 -35
- package/dist/esm-es5/ErrorView-c6fc1d9b.js +1 -0
- package/dist/esm-es5/ShadowViewAddon-722e6707.js +1 -0
- 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_10.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_47.entry.js +1 -1
- package/dist/esm-es5/sqm-email-verification_2.entry.js +1 -1
- package/dist/esm-es5/sqm-form-message_2.entry.js +1 -1
- package/dist/esm-es5/sqm-partner-info-modal-view-9c7a2c8c.js +1 -0
- package/dist/esm-es5/{sqm-qr-code-view-ce476721.js → sqm-qr-code-view-dd46daa3.js} +1 -1
- package/dist/esm-es5/sqm-qr-code.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/sqm-user-info-form-view-008f8969.js +1 -0
- package/dist/esm-es5/{subregions-98789b46.js → subregions-8e84e5fa.js} +1 -1
- package/dist/esm-es5/{useIndirectTaxForm-bbe8779d.js → useIndirectTaxForm-f622ba23.js} +2 -2
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/{p-97edaf26.system.js → p-04da3964.system.js} +1 -1
- package/dist/mint-components/p-062fcc1d.system.entry.js +1 -0
- package/dist/mint-components/{p-5438b415.system.entry.js → p-09de0b11.system.entry.js} +1 -1
- package/dist/mint-components/p-17f7f612.js +499 -0
- package/dist/mint-components/p-2392aabe.entry.js +1 -0
- package/dist/mint-components/p-2d856a9f.system.entry.js +1 -0
- package/dist/mint-components/{p-53575d04.js → p-2ec539fc.js} +1 -1
- package/dist/mint-components/{p-c0517032.js → p-3484f1c1.js} +1 -1
- package/dist/mint-components/p-349d8437.system.js +1 -0
- package/dist/mint-components/{p-654cdee8.entry.js → p-3bf958d5.entry.js} +6 -5
- package/dist/mint-components/{p-81bc6dca.system.entry.js → p-3c9d8bf4.system.entry.js} +1 -1
- package/dist/mint-components/p-556338c3.system.js +1 -0
- package/dist/mint-components/p-56a7bb18.system.js +1 -0
- package/dist/mint-components/{p-84149f94.entry.js → p-64802b9e.entry.js} +3 -3
- package/dist/mint-components/p-815765ec.system.js +1 -0
- package/dist/mint-components/{p-29bc5f50.entry.js → p-91d2e886.entry.js} +2 -2
- package/dist/mint-components/{p-caa92c4b.entry.js → p-9cbb983c.entry.js} +11 -11
- package/dist/mint-components/p-9d05ad74.js +1 -0
- package/dist/mint-components/p-a6920cc9.system.entry.js +1 -0
- package/dist/mint-components/p-b27f98f1.js +108 -0
- package/dist/mint-components/p-bfb00685.system.js +1 -1
- package/dist/mint-components/p-c2254b88.js +1 -0
- package/dist/mint-components/{p-826e3db0.system.js → p-c5efdac3.system.js} +1 -1
- package/dist/mint-components/p-cb4acd7f.system.entry.js +1 -0
- package/dist/mint-components/{p-f5bea1c6.entry.js → p-de17f8b8.entry.js} +2 -2
- package/dist/mint-components/p-ea7218d3.system.js +6 -0
- package/dist/mint-components/p-ff8b3b02.js +1 -0
- package/dist/types/components/sqm-coupon-code/sqm-coupon-code.d.ts +1 -1
- package/dist/types/components/sqm-empty/sqm-empty.d.ts +1 -1
- package/dist/types/components/sqm-form-message/sqm-form-message.d.ts +2 -0
- package/dist/types/components/sqm-instant-access-registration/sqm-instant-access-registration.d.ts +1 -0
- package/dist/types/components/sqm-lead-form/sqm-lead-checkbox-field.d.ts +2 -0
- package/dist/types/components/sqm-lead-form/sqm-lead-dropdown-field.d.ts +2 -0
- package/dist/types/components/sqm-lead-form/sqm-lead-input-field.d.ts +2 -0
- package/dist/types/components/sqm-partner-info-modal/PartnerInfoModal.stories.d.ts +1 -0
- package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal-view.d.ts +3 -0
- package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal.d.ts +10 -0
- package/dist/types/components/sqm-portal-google-login/sqm-portal-google-login.d.ts +6 -0
- package/dist/types/components/sqm-portal-google-registration-form/sqm-portal-google-registration-form.d.ts +3 -0
- package/dist/types/components/sqm-referral-table/columns/sqm-referral-table-rewards-column.d.ts +0 -1
- package/dist/types/components/sqm-referral-table/sqm-referral-table.d.ts +1 -0
- package/dist/types/components/sqm-referred-registration/sqm-referred-registration.d.ts +1 -0
- package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-reward-column.d.ts +0 -3
- package/dist/types/components/sqm-rewards-table/sqm-rewards-table.d.ts +3 -0
- package/dist/types/components/sqm-share-button/sqm-share-button.d.ts +1 -2
- package/dist/types/components/sqm-titled-section/sqm-titled-section.d.ts +1 -0
- package/dist/types/components/sqm-widget-verification/sqm-widget-verification.d.ts +8 -0
- package/dist/types/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form.d.ts +1 -0
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/PayoutStatusAlert.stories.d.ts +1 -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/usePayoutStatus.d.ts +2 -1
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +2 -0
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/TaxAndCashDashboardView.stories.d.ts +1 -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 +1 -0
- package/dist/types/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.d.ts +1 -0
- package/dist/types/components/tax-and-cash/utils.d.ts +4 -1
- package/dist/types/components.d.ts +30 -0
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +2 -2
- package/dist/esm-es5/ErrorView-74cb3af8.js +0 -1
- package/dist/esm-es5/ShadowViewAddon-86b5e986.js +0 -1
- package/dist/esm-es5/sqm-partner-info-modal-view-b921fed1.js +0 -1
- package/dist/esm-es5/sqm-user-info-form-view-72afa9af.js +0 -1
- package/dist/mint-components/p-044a76f1.js +0 -1
- package/dist/mint-components/p-07b989a3.system.js +0 -6
- package/dist/mint-components/p-288249ae.system.entry.js +0 -1
- package/dist/mint-components/p-58dbdf63.system.js +0 -1
- package/dist/mint-components/p-714c5ef8.js +0 -1
- package/dist/mint-components/p-b15c0870.system.entry.js +0 -1
- package/dist/mint-components/p-b1feb0f1.js +0 -108
- package/dist/mint-components/p-bdfdee11.entry.js +0 -1
- package/dist/mint-components/p-bfb9b01a.system.entry.js +0 -1
- package/dist/mint-components/p-d10ac7eb.system.js +0 -1
- package/dist/mint-components/p-d570bdde.system.js +0 -1
- package/dist/mint-components/p-db73312a.system.js +0 -1
- package/dist/mint-components/p-f1af48c5.system.entry.js +0 -1
- package/dist/mint-components/p-f75ead20.js +0 -1
- package/dist/mint-components/p-ffcbe239.js +0 -499
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const domContextHooks_module = require('./dom-context-hooks.module-e7b6727c.js');
|
|
4
4
|
const index_module = require('./index.module-f8c8495f.js');
|
|
5
5
|
const jsonpointer = require('./jsonpointer-11327262.js');
|
|
6
|
-
const subregions = require('./subregions-
|
|
6
|
+
const subregions = require('./subregions-cd5c7ad6.js');
|
|
7
7
|
const data = require('./data-04ef5511.js');
|
|
8
8
|
const eventKeys = require('./eventKeys-7af4df4d.js');
|
|
9
9
|
|
|
@@ -1013,23 +1013,8 @@ const GET_TAX_SETTING = index_module.dist.gql `
|
|
|
1013
1013
|
}
|
|
1014
1014
|
}
|
|
1015
1015
|
`;
|
|
1016
|
-
/** Transient holds that clear automatically, so a balance under the minimum explains the wait better. */
|
|
1017
|
-
const DISPLACEABLE_STATUSES = [
|
|
1018
|
-
"DONE",
|
|
1019
|
-
"NEW_PAYEE_REVIEW",
|
|
1020
|
-
"PAYMENT_HOLD_ON_CHANGE",
|
|
1021
|
-
];
|
|
1022
1016
|
function getStatus(data) {
|
|
1023
|
-
var _a;
|
|
1024
|
-
const status = getHoldStatus(data);
|
|
1025
|
-
const publisher = (_a = data.user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher;
|
|
1026
|
-
return DISPLACEABLE_STATUSES.includes(status) &&
|
|
1027
|
-
subregions.isBalanceUnderPayoutThreshold(publisher)
|
|
1028
|
-
? "BALANCE_UNDER_THRESHOLD"
|
|
1029
|
-
: status;
|
|
1030
|
-
}
|
|
1031
|
-
function getHoldStatus(data) {
|
|
1032
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
|
1017
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
1033
1018
|
const account = (_b = (_a = data.user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) === null || _b === void 0 ? void 0 : _b.payoutsAccount;
|
|
1034
1019
|
const hasTransferredReward = (_e = (_d = (_c = data === null || data === void 0 ? void 0 : data.user) === null || _c === void 0 ? void 0 : _c.rewards) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.find((reward) => {
|
|
1035
1020
|
var _a;
|
|
@@ -1039,39 +1024,41 @@ function getHoldStatus(data) {
|
|
|
1039
1024
|
if (!((_g = (_f = data.user) === null || _f === void 0 ? void 0 : _f.impactConnection) === null || _g === void 0 ? void 0 : _g.connected) || !account)
|
|
1040
1025
|
return "INFORMATION_REQUIRED";
|
|
1041
1026
|
const currentTaxDocument = (_j = (_h = data.user.impactConnection) === null || _h === void 0 ? void 0 : _h.publisher) === null || _j === void 0 ? void 0 : _j.currentTaxDocument;
|
|
1042
|
-
|
|
1027
|
+
// A new-payee review only starts once funds reach Impact, so until then nobody can act on it
|
|
1028
|
+
const reviewIsLive = !!hasTransferredReward && account.balanceAmount > 0;
|
|
1029
|
+
const holdReasons = ((_k = account.holdReasons) !== null && _k !== void 0 ? _k : []).filter((reason) => reason !== "NEW_PAYEE_REVIEW" || reviewIsLive);
|
|
1030
|
+
if (holdReasons.includes("NO_W9_DOCUMENT") && !currentTaxDocument)
|
|
1043
1031
|
return "OVER_W9_THRESHOLD";
|
|
1044
|
-
if (
|
|
1032
|
+
if (holdReasons.includes("IDV_CHECK_REQUIRED"))
|
|
1045
1033
|
return "VERIFICATION:REQUIRED";
|
|
1046
|
-
if (
|
|
1034
|
+
if (holdReasons.includes("IDV_CHECK_REQUIRED_INTERNAL"))
|
|
1047
1035
|
return "VERIFICATION:INTERNAL";
|
|
1048
|
-
if (
|
|
1036
|
+
if (holdReasons.includes("IDV_CHECK_REVIEW_INTERNAL"))
|
|
1049
1037
|
return "VERIFICATION:REVIEW";
|
|
1050
|
-
if (
|
|
1038
|
+
if (holdReasons.includes("IDV_CHECK_FAILED_INTERNAL"))
|
|
1051
1039
|
return "VERIFICATION:FAILED";
|
|
1052
|
-
|
|
1053
|
-
if (((_q = account.holdReasons) === null || _q === void 0 ? void 0 : _q.includes("NEW_PAYEE_REVIEW")) && hasTransferredReward)
|
|
1040
|
+
if (holdReasons.includes("NEW_PAYEE_REVIEW"))
|
|
1054
1041
|
return "NEW_PAYEE_REVIEW";
|
|
1055
|
-
if (
|
|
1056
|
-
return "DONE";
|
|
1057
|
-
if ((_s = account.holdReasons) === null || _s === void 0 ? void 0 : _s.includes("PAYMENT_HOLD_ON_CHANGE"))
|
|
1042
|
+
if (holdReasons.includes("PAYMENT_HOLD_ON_CHANGE"))
|
|
1058
1043
|
return "PAYMENT_HOLD_ON_CHANGE";
|
|
1059
|
-
if (
|
|
1044
|
+
if (holdReasons.includes("BENEFICIARY_NAME_INVALID"))
|
|
1060
1045
|
return "BENEFICIARY_NAME_INVALID";
|
|
1061
|
-
if (
|
|
1046
|
+
if (holdReasons.includes("BENEFICIARY_NAME_MISMATCH"))
|
|
1062
1047
|
return "BENEFICIARY_NAME_MISMATCH";
|
|
1063
|
-
if (
|
|
1048
|
+
if (holdReasons.includes("BANK_TAX_NAME_MISMATCH"))
|
|
1064
1049
|
return "BANK_TAX_NAME_MISMATCH";
|
|
1065
|
-
if (
|
|
1050
|
+
if (holdReasons.includes("WITHDRAWAL_SETTINGS_INVALID"))
|
|
1066
1051
|
return "WITHDRAWAL_SETTINGS_INVALID";
|
|
1067
|
-
if (
|
|
1052
|
+
if (holdReasons.includes("PAYMENT_RETURNED"))
|
|
1068
1053
|
return "PAYMENT_RETURNED";
|
|
1069
|
-
|
|
1054
|
+
// A hold whose every reason was suppressed leaves nothing to report
|
|
1055
|
+
const unattributedHold = !((_l = account.holdReasons) === null || _l === void 0 ? void 0 : _l.length);
|
|
1056
|
+
if (account.hold && (holdReasons.length > 0 || unattributedHold))
|
|
1070
1057
|
return "HOLD";
|
|
1071
1058
|
return "DONE";
|
|
1072
1059
|
}
|
|
1073
1060
|
function usePayoutStatus(props) {
|
|
1074
|
-
var _a, _b, _c;
|
|
1061
|
+
var _a, _b, _c, _d, _e;
|
|
1075
1062
|
const { type } = index_module.getEnvironmentSDK();
|
|
1076
1063
|
const { loading, data, errors, refetch } = index_module.wn(GET_USER_STATUS, {});
|
|
1077
1064
|
const { data: taxSettingRes } = index_module.wn(GET_TAX_SETTING, {});
|
|
@@ -1121,7 +1108,8 @@ function usePayoutStatus(props) {
|
|
|
1121
1108
|
status,
|
|
1122
1109
|
error: !!errors,
|
|
1123
1110
|
enforceUsTaxComplianceOption,
|
|
1124
|
-
|
|
1111
|
+
belowPayoutThreshold: subregions.isBalanceUnderPayoutThreshold((_c = (_b = data === null || data === void 0 ? void 0 : data.user) === null || _b === void 0 ? void 0 : _b.impactConnection) === null || _c === void 0 ? void 0 : _c.publisher),
|
|
1112
|
+
minPayoutAmount: subregions.formatPayoutThreshold((_e = (_d = data === null || data === void 0 ? void 0 : data.user) === null || _d === void 0 ? void 0 : _d.impactConnection) === null || _e === void 0 ? void 0 : _e.publisher),
|
|
1125
1113
|
},
|
|
1126
1114
|
data: { type },
|
|
1127
1115
|
text: props.getTextProps(),
|
|
@@ -39,7 +39,7 @@ const styleString = sheet.toString();
|
|
|
39
39
|
export function BaseRegistrationFormView(props) {
|
|
40
40
|
var _a, _b;
|
|
41
41
|
const { states, content, callbacks } = props;
|
|
42
|
-
return (h("div", { class: sheet.classes.Wrapper },
|
|
42
|
+
return (h("div", { class: sheet.classes.Wrapper, part: "sqm-base" },
|
|
43
43
|
h("style", { type: "text/css" },
|
|
44
44
|
vanillaStyle,
|
|
45
45
|
styleString),
|
|
@@ -25,6 +25,6 @@ export function CouponCodeView(props) {
|
|
|
25
25
|
styleString,
|
|
26
26
|
vanillaStyle),
|
|
27
27
|
h("p", { class: sheet.classes.couponCodeLabel, style: { textAlign: props.textAlign }, part: "label" }, props.couponCodeLabel),
|
|
28
|
-
error ? (h("sqm-form-message", { type: props.errorType, exportparts: "erroralert-icon" },
|
|
28
|
+
error ? (h("sqm-form-message", { type: props.errorType, exportparts: "alert-icon, erroralert-icon" },
|
|
29
29
|
h("div", { part: "erroralert-text" }, props.errorText))) : (h(CopyTextView, Object.assign({}, props)))));
|
|
30
30
|
}
|
|
@@ -13,7 +13,7 @@ import { useCouponCode } from "./useCouponCode";
|
|
|
13
13
|
* @example Coupon Code - <sqm-coupon-code tooltip-text="Copied to Clipboard" tooltip-lifespan="1000"></sqm-coupon-code>
|
|
14
14
|
* @csspart label - The coupon code label element
|
|
15
15
|
* @csspart erroralert-text - The error message element
|
|
16
|
-
* @csspart
|
|
16
|
+
* @csspart alert-icon - The status alert icon (error, warning, info, or success)
|
|
17
17
|
* @csspart icon-button-base - The copy icon button base
|
|
18
18
|
* @csspart primarybutton-base - The primary button base
|
|
19
19
|
* @csspart secondarybutton-base - The secondary button base
|
|
@@ -4,7 +4,7 @@ import { EmptyStateView } from "./sqm-empty-view";
|
|
|
4
4
|
* @uiName Empty State Content
|
|
5
5
|
* @validParents ["sqm-referral-table","sqm-rewards-table","sqm-leaderboard","sqm-reward-exchange-list"]
|
|
6
6
|
* @csspart sqm-base - The base container
|
|
7
|
-
*
|
|
7
|
+
* @csspart header-text - The empty state header
|
|
8
8
|
* @csspart description-text - The empty state description
|
|
9
9
|
*/
|
|
10
10
|
export class Empty {
|
|
@@ -11,6 +11,8 @@ import { Component, h, Prop, State } from "@stencil/core";
|
|
|
11
11
|
* @csspart warningalert-icon - The warning alert icon
|
|
12
12
|
* @csspart successalert-base - The success alert base
|
|
13
13
|
* @csspart successalert-icon - The success alert icon
|
|
14
|
+
* @csspart alert-base - The alert base, stable across all types
|
|
15
|
+
* @csspart alert-icon - The alert icon, stable across all types
|
|
14
16
|
*/
|
|
15
17
|
export class FormMessage {
|
|
16
18
|
constructor() {
|
|
@@ -33,22 +35,22 @@ export class FormMessage {
|
|
|
33
35
|
return h("sqm-skeleton", { height: "90px", width: "100%" });
|
|
34
36
|
}
|
|
35
37
|
if (this.type === "error") {
|
|
36
|
-
return (h("sl-alert", { exportparts: "base: erroralert-base, icon:erroralert-icon", class: `Error ${this.transparent ? "Transparent" : ""}`, type: "danger", open: true },
|
|
38
|
+
return (h("sl-alert", { exportparts: "base: erroralert-base, icon:erroralert-icon, base: alert-base, icon: alert-icon", class: `Error ${this.transparent ? "Transparent" : ""}`, type: "danger", open: true },
|
|
37
39
|
h("sl-icon", { id: "icon", slot: "icon", name: `${this.icon ? this.icon : "exclamation-octagon"}` }),
|
|
38
40
|
h("slot", null)));
|
|
39
41
|
}
|
|
40
42
|
else if (this.type === "info") {
|
|
41
|
-
return (h("sl-alert", { id: "icon", exportparts: "base: infoalert-base, icon:infoalert-icon", class: `Info ${this.transparent ? "Transparent" : ""}`, type: "info", open: true },
|
|
43
|
+
return (h("sl-alert", { id: "icon", exportparts: "base: infoalert-base, icon:infoalert-icon, base: alert-base, icon: alert-icon", class: `Info ${this.transparent ? "Transparent" : ""}`, type: "info", open: true },
|
|
42
44
|
h("sl-icon", { id: "icon", slot: "icon", name: `${this.icon ? this.icon : "info-circle"}` }),
|
|
43
45
|
h("slot", null)));
|
|
44
46
|
}
|
|
45
47
|
else if (this.type === "warning") {
|
|
46
|
-
return (h("sl-alert", { exportparts: "base: warningalert-base, icon:warningalert-icon", class: `Warning ${this.transparent ? "Transparent" : ""}`, type: "warning", open: true },
|
|
48
|
+
return (h("sl-alert", { exportparts: "base: warningalert-base, icon:warningalert-icon, base: alert-base, icon: alert-icon", class: `Warning ${this.transparent ? "Transparent" : ""}`, type: "warning", open: true },
|
|
47
49
|
h("sl-icon", { id: "icon", slot: "icon", name: `${this.icon ? this.icon : "exclamation-triangle"}` }),
|
|
48
50
|
h("slot", null)));
|
|
49
51
|
}
|
|
50
52
|
else {
|
|
51
|
-
return (h("sl-alert", { exportparts: "base: successalert-base, icon:successalert-icon", class: `Success ${this.transparent ? "Transparent" : ""}`, type: "success", open: true },
|
|
53
|
+
return (h("sl-alert", { exportparts: "base: successalert-base, icon:successalert-icon, base: alert-base, icon: alert-icon", class: `Success ${this.transparent ? "Transparent" : ""}`, type: "success", open: true },
|
|
52
54
|
h("sl-icon", { id: "icon", slot: "icon", name: `${this.icon ? this.icon : "check2-circle"}` }),
|
|
53
55
|
h("slot", null)));
|
|
54
56
|
}
|
|
@@ -12,6 +12,7 @@ import { useInstantAccessRegistration } from "./useInstantAccessRegistration";
|
|
|
12
12
|
* @example Advocate Registration - <sqm-instant-access-registration></sqm-instant-access-registration>
|
|
13
13
|
* @slots [{"name":"top","title":"Top Content"},{"name":"bottom","title":"Bottom Content"}]
|
|
14
14
|
* @csspart sqm-base - The base container for the instant access registration component
|
|
15
|
+
* @csspart erroralert-text - The error message element
|
|
15
16
|
* @csspart erroralert-icon - The error alert icon
|
|
16
17
|
* @csspart input-label - The input label
|
|
17
18
|
* @csspart input-base - The input base
|
|
@@ -10,6 +10,8 @@ import { useLeadCheckboxField } from "./useCheckboxField";
|
|
|
10
10
|
* @uiName Lead Form Checkbox Field
|
|
11
11
|
* @validParents ["sqm-lead-form"]
|
|
12
12
|
* @csspart sqm-base - The base container
|
|
13
|
+
* @csspart input-label - The input label
|
|
14
|
+
* @csspart input-base - The input base
|
|
13
15
|
*/
|
|
14
16
|
export class LeadCheckboxField {
|
|
15
17
|
constructor() {
|
|
@@ -11,6 +11,8 @@ import { useLeadDropdownField } from "./useLeadDropdownField";
|
|
|
11
11
|
* @validParents ["sqm-lead-form"]
|
|
12
12
|
* @slots [{"name":"", "title":"Dropdown Option"}]
|
|
13
13
|
* @csspart sqm-base - The base container
|
|
14
|
+
* @csspart input-label - The input label
|
|
15
|
+
* @csspart input-base - The input base
|
|
14
16
|
*/
|
|
15
17
|
export class LeadDropdownField {
|
|
16
18
|
constructor() {
|
|
@@ -10,6 +10,8 @@ import { useLeadInputField } from "./useLeadInputField";
|
|
|
10
10
|
* @uiName Lead Form Input Field
|
|
11
11
|
* @validParents ["sqm-lead-form"]
|
|
12
12
|
* @csspart sqm-base - The base container
|
|
13
|
+
* @csspart input-label - The input label
|
|
14
|
+
* @csspart input-base - The input base
|
|
13
15
|
*/
|
|
14
16
|
export class LeadInputField {
|
|
15
17
|
constructor() {
|
|
@@ -34,7 +34,7 @@ const defaultText = {
|
|
|
34
34
|
modalHeader: "Let's get you ready for rewards",
|
|
35
35
|
modalHeaderExistingPartner: "We found an existing account",
|
|
36
36
|
descriptionNewPartner: "Confirm your country and currency now to get your future rewards faster.",
|
|
37
|
-
descriptionExistingPartner: "We
|
|
37
|
+
descriptionExistingPartner: "We found an account with this email on our referral program provider, impact.com. Please confirm your country and currency now to get your future rewards faster.",
|
|
38
38
|
supportDescriptionExistingPartner: "If this is a mistake, please contact Support or sign up for this referral program with a different email.",
|
|
39
39
|
supportLink: "Support",
|
|
40
40
|
countryLabel: "Country",
|
|
@@ -47,6 +47,8 @@ const defaultText = {
|
|
|
47
47
|
allowBankingCollection: "I have read the {termsAndConditionsLink} and allow impact.com to collect my tax and banking information",
|
|
48
48
|
termsAndConditionsLabel: "terms and conditions",
|
|
49
49
|
termsAndConditionsLink: "https://terms.advocate.impact.com/PayoutTermsAndConditions.html",
|
|
50
|
+
emailVerificationErrorText: "Please log in to {loginLinkText} to review your account status. You may need to complete email verification or other pending steps. Once resolved, refresh this page to proceed.",
|
|
51
|
+
loginLinkText: "impact.com",
|
|
50
52
|
};
|
|
51
53
|
const defaultProps = {
|
|
52
54
|
states: {
|
|
@@ -60,6 +62,7 @@ const defaultProps = {
|
|
|
60
62
|
countryCode: "",
|
|
61
63
|
currency: "",
|
|
62
64
|
error: "",
|
|
65
|
+
emailCanBeUsed: true,
|
|
63
66
|
success: false,
|
|
64
67
|
filteredCountries: demoCountries,
|
|
65
68
|
filteredCurrencies: demoCurrencies,
|
|
@@ -154,6 +157,18 @@ export const ValidationError = () => {
|
|
|
154
157
|
};
|
|
155
158
|
return h(PartnerInfoModalView, Object.assign({}, props));
|
|
156
159
|
};
|
|
160
|
+
export const EmailVerificationRequired = () => {
|
|
161
|
+
const props = {
|
|
162
|
+
...defaultProps,
|
|
163
|
+
states: {
|
|
164
|
+
...defaultProps.states,
|
|
165
|
+
countryCode: "US",
|
|
166
|
+
currency: "USD",
|
|
167
|
+
emailCanBeUsed: false,
|
|
168
|
+
},
|
|
169
|
+
};
|
|
170
|
+
return h(PartnerInfoModalView, Object.assign({}, props));
|
|
171
|
+
};
|
|
157
172
|
export const Closed = () => {
|
|
158
173
|
const props = {
|
|
159
174
|
...defaultProps,
|
|
@@ -81,16 +81,22 @@ export function PartnerInfoModalContentView(props) {
|
|
|
81
81
|
const { states, callbacks, text } = props;
|
|
82
82
|
const sheet = createStyleSheet(style);
|
|
83
83
|
const styleString = sheet.toString();
|
|
84
|
+
const emailVerificationMessage = intl.formatMessage({
|
|
85
|
+
id: "emailVerificationErrorText",
|
|
86
|
+
defaultMessage: text.emailVerificationErrorText,
|
|
87
|
+
}, {
|
|
88
|
+
loginLinkText: (h("a", { target: "_blank", href: `https://app.impact.com/login.user` }, text.loginLinkText)),
|
|
89
|
+
});
|
|
84
90
|
const supportMessage = intl.formatMessage({
|
|
85
91
|
id: "supportDescriptionExistingPartner",
|
|
86
92
|
defaultMessage: text.supportDescriptionExistingPartner,
|
|
87
93
|
}, {
|
|
88
94
|
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-payment-support@impact.com` }, text.supportLink)),
|
|
89
95
|
});
|
|
90
|
-
const description = states.isExistingPartner ? (h("span", { class: sheet.classes.DescriptionContainer },
|
|
96
|
+
const description = states.isExistingPartner || !states.emailCanBeUsed ? (h("span", { class: sheet.classes.DescriptionContainer },
|
|
91
97
|
h("p", null, text.descriptionExistingPartner),
|
|
92
98
|
h("p", null, supportMessage))) : (h("p", { class: sheet.classes.DescriptionContainer }, text.descriptionNewPartner));
|
|
93
|
-
const buttonLabel = states.isExistingPartner
|
|
99
|
+
const buttonLabel = states.isExistingPartner || !states.emailCanBeUsed
|
|
94
100
|
? text.confirmButtonLabel
|
|
95
101
|
: text.submitButtonLabel;
|
|
96
102
|
const bankingCollectionText = intl.formatMessage({
|
|
@@ -99,32 +105,39 @@ export function PartnerInfoModalContentView(props) {
|
|
|
99
105
|
}, {
|
|
100
106
|
termsAndConditionsLink: (h("a", { href: text.termsAndConditionsLink, target: "_blank" }, text.termsAndConditionsLabel)),
|
|
101
107
|
});
|
|
102
|
-
return (h("div",
|
|
108
|
+
return (h("div", { part: "sqm-base" },
|
|
103
109
|
h("style", { type: "text/css" }, styleString),
|
|
104
110
|
h("div", { class: sheet.classes.FormFields },
|
|
105
111
|
description,
|
|
106
112
|
states.shouldDisplayNameFields && (h(Fragment, null,
|
|
107
|
-
h("sl-input", { exportparts: "label: input-label, base: input-base", class: sheet.classes.NameInput, label: "First Name", value: states.firstName, "onSl-input": callbacks.onFirstNameChange, disabled: states.submitting, required: true }),
|
|
108
|
-
h("sl-input", { exportparts: "label: input-label, base: input-base", class: sheet.classes.NameInput, label: "Last Name", value: states.lastName, "onSl-input": callbacks.onLastNameChange, disabled: states.submitting, required: true }))),
|
|
113
|
+
h("sl-input", { exportparts: "label: input-label, base: input-base", class: sheet.classes.NameInput, label: "First Name", value: states.firstName, "onSl-input": callbacks.onFirstNameChange, disabled: states.submitting || !states.emailCanBeUsed, required: true }),
|
|
114
|
+
h("sl-input", { exportparts: "label: input-label, base: input-base", class: sheet.classes.NameInput, label: "Last Name", value: states.lastName, "onSl-input": callbacks.onLastNameChange, disabled: states.submitting || !states.emailCanBeUsed, required: true }))),
|
|
109
115
|
h("sl-select", { exportparts: "label: input-label, base: input-base, menu: select-menu", label: text.countryLabel, value: states.countryCode, disabled: states.submitting ||
|
|
116
|
+
!states.emailCanBeUsed ||
|
|
110
117
|
(!!states.countryCode && states.isExistingPartner), required: true, hoist: true, "onSl-select": callbacks.onCountryChange },
|
|
111
118
|
h("sl-input", { class: sheet.classes.SearchInput, placeholder: text.searchCountryPlaceholder, onKeyDown: (e) => e.stopPropagation(), "onSl-input": (e) => {
|
|
112
119
|
var _a;
|
|
113
120
|
callbacks.setCountrySearch((_a = e.target) === null || _a === void 0 ? void 0 : _a.value);
|
|
114
121
|
} }),
|
|
115
122
|
h("div", { class: sheet.classes.SelectMenu }, (_a = states.filteredCountries) === null || _a === void 0 ? void 0 : _a.map((c) => (h("sl-menu-item", { value: c.countryCode }, c.displayName))))),
|
|
116
|
-
h("sl-select", { exportparts: "label: input-label, base: input-base", label: text.currencyLabel, value: states.currency, disabled: states.submitting ||
|
|
123
|
+
h("sl-select", { exportparts: "label: input-label, base: input-base", label: text.currencyLabel, value: states.currency, disabled: states.submitting ||
|
|
124
|
+
!states.emailCanBeUsed ||
|
|
125
|
+
(!!states.currency && states.isExistingPartner), required: true, hoist: true, "onSl-select": callbacks.onCurrencyChange },
|
|
117
126
|
h("sl-input", { class: sheet.classes.SearchInput, placeholder: text.searchCurrencyPlaceholder, onKeyDown: (e) => e.stopPropagation(), "onSl-input": (e) => { var _a; return callbacks.setCurrencySearch((_a = e.target) === null || _a === void 0 ? void 0 : _a.value); } }),
|
|
118
127
|
h("div", { class: sheet.classes.SelectMenu }, (_b = states.filteredCurrencies) === null || _b === void 0 ? void 0 : _b.map((c) => (h("sl-menu-item", { value: c.currencyCode },
|
|
119
128
|
c.currencyCode,
|
|
120
129
|
" - ",
|
|
121
130
|
c.displayName))))),
|
|
122
131
|
h("div", { class: sheet.classes.CheckboxWrapper },
|
|
123
|
-
h("sl-checkbox", { class: sheet.classes.Checkbox, checked: states.allowBankingCollection === true, "onSl-change": callbacks.onCheckboxChange, disabled: states.submitting, required: true, value: states.allowBankingCollection, id: "allowBankingCollection", name: "/allowBankingCollection" }, bankingCollectionText))),
|
|
132
|
+
h("sl-checkbox", { class: sheet.classes.Checkbox, checked: states.allowBankingCollection === true, "onSl-change": callbacks.onCheckboxChange, disabled: states.submitting || !states.emailCanBeUsed, required: true, value: states.allowBankingCollection, id: "allowBankingCollection", name: "/allowBankingCollection" }, bankingCollectionText))),
|
|
124
133
|
states.error && (h("div", { class: sheet.classes.ErrorMessage },
|
|
125
134
|
h("sqm-form-message", { class: sheet.classes.ErrorMessage, type: "error" },
|
|
126
135
|
h("p", { part: "alert-description" }, states.error)))),
|
|
136
|
+
!states.emailCanBeUsed && (h("div", { class: sheet.classes.ErrorMessage },
|
|
137
|
+
h("sqm-form-message", { type: "error" },
|
|
138
|
+
h("p", { part: "alert-description" }, emailVerificationMessage)))),
|
|
127
139
|
h("sl-button", { slot: "footer", type: "primary", loading: states.submitting, disabled: states.submitting ||
|
|
140
|
+
!states.emailCanBeUsed ||
|
|
128
141
|
!states.countryCode ||
|
|
129
142
|
!states.currency ||
|
|
130
143
|
!states.allowBankingCollection ||
|
|
@@ -137,7 +150,7 @@ export function PartnerInfoModalView(props) {
|
|
|
137
150
|
const styleString = sheet.toString();
|
|
138
151
|
if (!states.open)
|
|
139
152
|
return h("div", null);
|
|
140
|
-
const modalHeader = states.isExistingPartner
|
|
153
|
+
const modalHeader = states.isExistingPartner || !states.emailCanBeUsed
|
|
141
154
|
? text.modalHeaderExistingPartner
|
|
142
155
|
: text.modalHeader;
|
|
143
156
|
return (h("div", null,
|
|
@@ -12,6 +12,7 @@ import { usePartnerInfoModal, } from "./usePartnerInfoModal";
|
|
|
12
12
|
* @validParents ["sqm-portal-container", "sqm-portal-frame", "div", "sqm-divided-layout", "sqb-program-section", "sqb-conditional-section"]
|
|
13
13
|
* @example Partner Info Modal - <sqm-partner-info-modal></sqm-partner-info-modal>
|
|
14
14
|
* @hidden
|
|
15
|
+
* @csspart sqm-base - The base container
|
|
15
16
|
* @csspart alert-description - The error description
|
|
16
17
|
* @csspart input-label - The input label
|
|
17
18
|
* @csspart input-base - The input base
|
|
@@ -106,6 +107,15 @@ export class PartnerInfoModal {
|
|
|
106
107
|
* @uiWidget textArea
|
|
107
108
|
*/
|
|
108
109
|
this.networkErrorText = "An error occurred. Please try again.";
|
|
110
|
+
/**
|
|
111
|
+
* @uiName Email verification error text
|
|
112
|
+
* @uiWidget textArea
|
|
113
|
+
*/
|
|
114
|
+
this.emailVerificationErrorText = "Please log in to {loginLinkText} to review your account status. You may need to complete email verification or other pending steps. Once resolved, refresh this page to proceed.";
|
|
115
|
+
/**
|
|
116
|
+
* @uiName login link text
|
|
117
|
+
*/
|
|
118
|
+
this.loginLinkText = "impact.com";
|
|
109
119
|
/**
|
|
110
120
|
* @uiName Missing fields error text
|
|
111
121
|
* @uiWidget textArea
|
|
@@ -498,6 +508,51 @@ export class PartnerInfoModal {
|
|
|
498
508
|
"reflect": false,
|
|
499
509
|
"defaultValue": "\"An error occurred. Please try again.\""
|
|
500
510
|
},
|
|
511
|
+
"emailVerificationErrorText": {
|
|
512
|
+
"type": "string",
|
|
513
|
+
"mutable": false,
|
|
514
|
+
"complexType": {
|
|
515
|
+
"original": "string",
|
|
516
|
+
"resolved": "string",
|
|
517
|
+
"references": {}
|
|
518
|
+
},
|
|
519
|
+
"required": false,
|
|
520
|
+
"optional": false,
|
|
521
|
+
"docs": {
|
|
522
|
+
"tags": [{
|
|
523
|
+
"text": "Email verification error text",
|
|
524
|
+
"name": "uiName"
|
|
525
|
+
}, {
|
|
526
|
+
"text": "textArea",
|
|
527
|
+
"name": "uiWidget"
|
|
528
|
+
}],
|
|
529
|
+
"text": ""
|
|
530
|
+
},
|
|
531
|
+
"attribute": "email-verification-error-text",
|
|
532
|
+
"reflect": false,
|
|
533
|
+
"defaultValue": "\"Please log in to {loginLinkText} to review your account status. You may need to complete email verification or other pending steps. Once resolved, refresh this page to proceed.\""
|
|
534
|
+
},
|
|
535
|
+
"loginLinkText": {
|
|
536
|
+
"type": "string",
|
|
537
|
+
"mutable": false,
|
|
538
|
+
"complexType": {
|
|
539
|
+
"original": "string",
|
|
540
|
+
"resolved": "string",
|
|
541
|
+
"references": {}
|
|
542
|
+
},
|
|
543
|
+
"required": false,
|
|
544
|
+
"optional": false,
|
|
545
|
+
"docs": {
|
|
546
|
+
"tags": [{
|
|
547
|
+
"text": "login link text",
|
|
548
|
+
"name": "uiName"
|
|
549
|
+
}],
|
|
550
|
+
"text": ""
|
|
551
|
+
},
|
|
552
|
+
"attribute": "login-link-text",
|
|
553
|
+
"reflect": false,
|
|
554
|
+
"defaultValue": "\"impact.com\""
|
|
555
|
+
},
|
|
501
556
|
"missingFieldsErrorText": {
|
|
502
557
|
"type": "string",
|
|
503
558
|
"mutable": false,
|
|
@@ -578,7 +633,7 @@ export class PartnerInfoModal {
|
|
|
578
633
|
"mutable": false,
|
|
579
634
|
"complexType": {
|
|
580
635
|
"original": "DemoData<PartnerInfoModalResult>",
|
|
581
|
-
"resolved": "{ states?: { open: boolean; loading: boolean; submitting: boolean; isExistingPartner: boolean; shouldDisplayNameFields: boolean; firstName: string; lastName: string; countryCode: string; currency: string; error: string; success: boolean; filteredCountries: { countryCode: string; displayName: string; }[]; filteredCurrencies: { currencyCode: string; displayName: string; }[]; allowBankingCollection: boolean; disabled: boolean; }; }",
|
|
636
|
+
"resolved": "{ states?: { open: boolean; loading: boolean; submitting: boolean; isExistingPartner: boolean; shouldDisplayNameFields: boolean; firstName: string; lastName: string; countryCode: string; currency: string; error: string; emailCanBeUsed: boolean; success: boolean; filteredCountries: { countryCode: string; displayName: string; }[]; filteredCurrencies: { currencyCode: string; displayName: string; }[]; allowBankingCollection: boolean; disabled: boolean; }; }",
|
|
582
637
|
"references": {
|
|
583
638
|
"DemoData": {
|
|
584
639
|
"location": "import",
|
|
@@ -626,6 +681,7 @@ function useDemoPartnerInfoModal(props) {
|
|
|
626
681
|
filteredCountries: [],
|
|
627
682
|
filteredCurrencies: [],
|
|
628
683
|
allowBankingCollection,
|
|
684
|
+
emailCanBeUsed: true,
|
|
629
685
|
disabled: false,
|
|
630
686
|
},
|
|
631
687
|
callbacks: {
|
|
@@ -671,6 +727,8 @@ function useDemoPartnerInfoModal(props) {
|
|
|
671
727
|
supportDescriptionExistingPartner: props.supportDescriptionExistingPartner,
|
|
672
728
|
supportLink: props.supportLink,
|
|
673
729
|
modalHeaderExistingPartner: props.modalHeaderExistingPartner,
|
|
730
|
+
emailVerificationErrorText: props.emailVerificationErrorText,
|
|
731
|
+
loginLinkText: props.loginLinkText,
|
|
674
732
|
},
|
|
675
733
|
}, props.demoData || stateOverride, { arrayMerge: (_, a) => a });
|
|
676
734
|
}
|
|
@@ -18,6 +18,7 @@ export const GET_USER_PARTNER_INFO = gql `
|
|
|
18
18
|
impactConnection {
|
|
19
19
|
connected
|
|
20
20
|
connectionStatus
|
|
21
|
+
emailCanBeUsed
|
|
21
22
|
publisher {
|
|
22
23
|
id
|
|
23
24
|
countryCode
|
|
@@ -184,7 +185,6 @@ export function usePartnerInfoModal(props) {
|
|
|
184
185
|
return;
|
|
185
186
|
setCountryCode(value);
|
|
186
187
|
setCurrency("");
|
|
187
|
-
setError("");
|
|
188
188
|
}
|
|
189
189
|
function onCurrencyChange(e) {
|
|
190
190
|
var _a, _b;
|
|
@@ -192,7 +192,6 @@ export function usePartnerInfoModal(props) {
|
|
|
192
192
|
if (!value)
|
|
193
193
|
return;
|
|
194
194
|
setCurrency(value);
|
|
195
|
-
setError("");
|
|
196
195
|
}
|
|
197
196
|
function onCheckboxChange(e) {
|
|
198
197
|
const checked = e.target.checked;
|
|
@@ -249,6 +248,7 @@ export function usePartnerInfoModal(props) {
|
|
|
249
248
|
const showModal = !success &&
|
|
250
249
|
!userLoading &&
|
|
251
250
|
(impactConnection === null || impactConnection === void 0 ? void 0 : impactConnection.connectionStatus) === "NOT_STARTED";
|
|
251
|
+
const emailCanBeUsed = (impactConnection === null || impactConnection === void 0 ? void 0 : impactConnection.emailCanBeUsed) !== false;
|
|
252
252
|
return {
|
|
253
253
|
states: {
|
|
254
254
|
open: showModal,
|
|
@@ -261,11 +261,12 @@ export function usePartnerInfoModal(props) {
|
|
|
261
261
|
countryCode,
|
|
262
262
|
currency,
|
|
263
263
|
error,
|
|
264
|
+
emailCanBeUsed,
|
|
264
265
|
success,
|
|
265
266
|
filteredCountries: filteredCountries || [],
|
|
266
267
|
filteredCurrencies: filteredCurrencies || [],
|
|
267
268
|
allowBankingCollection,
|
|
268
|
-
disabled: userLoading || connectLoading,
|
|
269
|
+
disabled: userLoading || connectLoading || !emailCanBeUsed,
|
|
269
270
|
},
|
|
270
271
|
callbacks: {
|
|
271
272
|
onFirstNameChange,
|
|
@@ -7,7 +7,13 @@ import { PortalLoginView, } from "../sqm-portal-login/sqm-portal-login-view";
|
|
|
7
7
|
import { usePortalLogin } from "../sqm-portal-login/usePortalLogin";
|
|
8
8
|
/**
|
|
9
9
|
* @uiName Microsite Login
|
|
10
|
+
* @csspart sqm-base - The base container
|
|
10
11
|
* @csspart forgot-password-link - The forgot password link
|
|
12
|
+
* @csspart erroralert-text - The error message element
|
|
13
|
+
* @csspart erroralert-icon - The error alert icon
|
|
14
|
+
* @csspart input-label - The input label
|
|
15
|
+
* @csspart input-base - The input base
|
|
16
|
+
* @csspart primarybutton-base - The primary button base
|
|
11
17
|
*/
|
|
12
18
|
export class PortalGoogleLogin {
|
|
13
19
|
constructor() {
|
|
@@ -11,6 +11,9 @@ import { usePortalGoogleRegistrationForm } from "./usePortalGoogleRegistrationFo
|
|
|
11
11
|
* @uiName Google Registration
|
|
12
12
|
* @canvasRenderer always-replace
|
|
13
13
|
* @slots [{"name":"formData","title":"Additional Fields"},{"name":"terms","title":"Terms And Conditions Fields"}]
|
|
14
|
+
* @csspart sqm-base - The base container
|
|
15
|
+
* @csspart erroralert-text - The error message element
|
|
16
|
+
* @csspart erroralert-icon - The error alert icon
|
|
14
17
|
* @csspart input-label - The input label
|
|
15
18
|
* @csspart input-base - The input base
|
|
16
19
|
* @csspart primarybutton-base - The primary button base
|
package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-rewards-column.js
CHANGED
|
@@ -4,7 +4,6 @@ import { useRequestRerender } from "../../../tables/re-render";
|
|
|
4
4
|
/**
|
|
5
5
|
* @uiName Referral Table Rewards Column
|
|
6
6
|
* @validParents ["sqm-referral-table"]
|
|
7
|
-
* @csspart sqm-cell-value - The reward cell value
|
|
8
7
|
* @exampleGroup Referrals
|
|
9
8
|
* @example Referral Table Rewards Column - <sqm-referral-table-rewards-column column-title="Rewards" status-text="{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} }" status-long-text="{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} }" fuel-tank-text="Your code is" reward-received-text="Reward received on" expiring-text="Expiring in" pending-for-text="{status} for {date}" denied-help-text="Contact support if you think this is a mistake." ></sqm-referral-table-rewards-column>
|
|
10
9
|
*/
|
|
@@ -16,6 +16,7 @@ import { tryMethod, useReferralTable } from "./useReferralTable";
|
|
|
16
16
|
* @exampleGroup Referrals
|
|
17
17
|
* @slots [{"name":"", "title":"Table Row"},{"name":"empty", "title":"Empty"},{"name":"loading","title":"Loading"}]
|
|
18
18
|
* @example Referral Table - <sqm-referral-table per-page="4" hidden-columns="2" more-label="Next" prev-label="Prev" sm-breakpoint="599" md-breakpoint="799" > <sqm-referral-table-user-column column-title="Customer" anonymous-user="Your Friend" deleted-user="Deleted User" ></sqm-referral-table-user-column> <sqm-referral-table-rewards-column column-title="Rewards" status-text="{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} }" status-long-text="{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} }" fuel-tank-text="Your code is" reward-received-text="Reward received on" expiring-text="Expiring in" pending-for-text="{status} for {date}" denied-help-text="Contact support if you think this is a mistake." ></sqm-referral-table-rewards-column> <sqm-referral-table-date-column column-title="Date converted" date-shown="dateConverted" ></sqm-referral-table-date-column> <sqm-referral-table-status-column column-title="Status" converted-status-text="Converted" in-progress-status-text="In Progress" pending-review-status-text="Pending" denied-status-text="Denied" pending-review-status-sub-text="Awaiting review" denied-status-sub-text="Detected self-referral" ></sqm-referral-table-status-column> <sqm-empty empty-state-image="https://res.cloudinary.com/saasquatch/image/upload/v1644000223/squatch-assets/empty_referral2.png" empty-state-header="View your referral details" empty-state-text="Refer a friend to view the status of your referrals and rewards earned" slot="empty" ></sqm-empty> </sqm-referral-table>
|
|
19
|
+
* @csspart sqm-cell-value - The reward cell value, rendered by the rewards column's cell
|
|
19
20
|
*/
|
|
20
21
|
export class ReferralTable {
|
|
21
22
|
constructor() {
|
|
@@ -12,6 +12,7 @@ import { EmailRegistrationView, } from "../views/email-registration-view";
|
|
|
12
12
|
* @example Friend Registration - <sqm-referred-registration></sqm-referred-registration>
|
|
13
13
|
* @slots [{"name":"top","title":"Top Content"},{"name":"bottom","title":"Bottom Content"}]
|
|
14
14
|
* @csspart sqm-base - The base container for the instant access registration component
|
|
15
|
+
* @csspart erroralert-text - The error message element
|
|
15
16
|
* @csspart erroralert-icon - The error alert icon
|
|
16
17
|
* @csspart input-label - The input label
|
|
17
18
|
* @csspart input-base - The input base
|
package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.js
CHANGED
|
@@ -520,8 +520,8 @@ export function RewardExchangeView(props) {
|
|
|
520
520
|
h("div", { class: "field" }, states.content.text.costTitle),
|
|
521
521
|
h("div", { class: "value" }, cost)),
|
|
522
522
|
h("div", { class: sheet.classes.Button },
|
|
523
|
-
h("sl-button", { class: "cancel", type: "secondary", size: "large", onClick: () => callbacks.setStage("chooseAmount") }, states.content.text.backText),
|
|
524
|
-
h("sl-button", { class: "continue", size: "large", type: "primary", loading: states.loading, onClick: callbacks.exchangeReward }, states.content.text.redeemText)))));
|
|
523
|
+
h("sl-button", { exportparts: "base: secondarybutton-base", class: "cancel", type: "secondary", size: "large", onClick: () => callbacks.setStage("chooseAmount") }, states.content.text.backText),
|
|
524
|
+
h("sl-button", { exportparts: "base: primarybutton-base", class: "continue", size: "large", type: "primary", loading: states.loading, onClick: callbacks.exchangeReward }, states.content.text.redeemText)))));
|
|
525
525
|
}
|
|
526
526
|
function success() {
|
|
527
527
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
@@ -540,7 +540,7 @@ export function RewardExchangeView(props) {
|
|
|
540
540
|
states.content.text.promoCode,
|
|
541
541
|
h(CopyTextView, { copyString: data.fuelTankCode, tooltiptext: (_h = states === null || states === void 0 ? void 0 : states.content) === null || _h === void 0 ? void 0 : _h.text.tooltipText, open: states.open, onClick: callbacks.copyFuelTankCode }))),
|
|
542
542
|
h("div", { class: sheet.classes.Button },
|
|
543
|
-
h("sl-button", { class: "continue center", type: "primary", size: "large", onClick: () => callbacks.resetState(true) }, states.content.text.doneText))));
|
|
543
|
+
h("sl-button", { exportparts: "base: primarybutton-base", class: "continue center", type: "primary", size: "large", onClick: () => callbacks.resetState(true) }, states.content.text.doneText))));
|
|
544
544
|
}
|
|
545
545
|
const stages = {
|
|
546
546
|
chooseReward: () => chooseReward(),
|
package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-reward-column.js
CHANGED
|
@@ -4,9 +4,6 @@ import { useRequestRerender } from "../../../tables/re-render";
|
|
|
4
4
|
/**
|
|
5
5
|
* @uiName Rewards Table Reward Column
|
|
6
6
|
* @validParents ["sqm-rewards-table"]
|
|
7
|
-
* @csspart sqm-reward-cell-value - The reward cell value
|
|
8
|
-
* @csspart sqm-reward-cell-progress - The reward progress
|
|
9
|
-
* @csspart sqm-reward-cell-subtext - The reward cell subtext
|
|
10
7
|
* @exampleGroup Rewards
|
|
11
8
|
* @example Reward Column - <sqm-rewards-table-reward-column column-title="Reward" redeemed-text="{redeemedAmount} redeemed" available-text="{availableAmount} remaining" copy-text="Copied!"></sqm-rewards-table-reward-column>
|
|
12
9
|
*/
|
|
@@ -15,6 +15,9 @@ import { tryMethod, useRewardsTable } from "./useRewardsTable";
|
|
|
15
15
|
* @exampleGroup Rewards
|
|
16
16
|
* @slots [{"name":"", "title":"Table Row"},{"name":"empty", "title":"Empty"},{"name":"loading","title":"Loading"}]
|
|
17
17
|
* @example Reward Table - <sqm-rewards-table per-page="4" prev-label="Prev" more-label="Next" hidden-columns="0" sm-breakpoint="599" md-breakpoint="799" ><sqm-rewards-table-status-column column-title="Status" status-text="{status, select, AVAILABLE {Available} CANCELLED {Cancelled} PENDING {Pending} PENDING_REVIEW {Pending} PAYOUT_APPROVED {Payout Approved} PROCESSING {Payment Processing} PAYOUT_CANCELLED {Payout Cancelled} PAYOUT_FAILED {Payout Failed} EXPIRED {Expired} REDEEMED {Redeemed} DENIED {Denied} other {Not available} }" expiry-text="Expires on " pending-us-tax="W-9 required" pending-scheduled="Until" pending-unhandled="Fulfillment error" pending-review-text="Awaiting review" denied-text="Detected self-referral" 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." 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." payout-approved="Reward was scheduled for payment based on your settings, barring any account holds." ></sqm-rewards-table-status-column> <sqm-rewards-table-source-column column-title="Source" anonymous-user="Your Friend" deleted-user="Deleted User" reward-exchange-text="Reward Exchange" referral-text="{rewardSource, select, FRIEND_SIGNUP {Referral to} REFERRED {Referred by} other {}}" reward-source-text="{rewardSource, select, MANUAL {Manual} AUTOMATED {{programName}} other {}}" ></sqm-rewards-table-source-column ><sqm-rewards-table-reward-column column-title="Reward" redeemed-text="{redeemedAmount} redeemed" available-text="{availableAmount} remaining" copy-text="Copied!" ></sqm-rewards-table-reward-column ><sqm-rewards-table-date-column column-title="Date received" date-shown="dateGiven" ></sqm-rewards-table-date-column ><sqm-rewards-table-customer-note-column column-title="Note" ></sqm-rewards-table-customer-note-column ><sqm-empty slot="empty" empty-state-image="https://res.cloudinary.com/saasquatch/image/upload/v1644360953/squatch-assets/empty_reward2.png" empty-state-header="View your rewards" empty-state-text="Complete program tasks to view the details of your rewards" ></sqm-empty ></sqm-rewards-table>
|
|
18
|
+
* @csspart sqm-reward-cell-value - The reward cell value, rendered by the reward column's cell
|
|
19
|
+
* @csspart sqm-reward-cell-progress - The reward progress, rendered by the reward column's cell
|
|
20
|
+
* @csspart sqm-reward-cell-subtext - The reward cell subtext, rendered by the reward column's cell
|
|
18
21
|
*/
|
|
19
22
|
export class RewardsTable {
|
|
20
23
|
constructor() {
|
|
@@ -59,7 +59,7 @@ export function ShareButtonView(props, children) {
|
|
|
59
59
|
return props.hide ? (h(Host, { style: { display: "none" } })) : (h("div", null,
|
|
60
60
|
h("style", { type: "text/css" }, styleString),
|
|
61
61
|
h("style", { type: "text/css" }, vanillaStyle),
|
|
62
|
-
h("sl-button", { class: sheet.classes.buttonStyle, target: props.openInSameTab ? "_self" : "_blank", loading: props.loading, disabled: props.disabled, pill: props.pill, size: props.size, type: props.type, onClick: !props.isPlainLink ? props.onClick : undefined, href: props.isPlainLink ? props.messageLink : undefined, exportparts: `base: ${props.type}button-base` },
|
|
62
|
+
h("sl-button", { class: sheet.classes.buttonStyle, target: props.openInSameTab ? "_self" : "_blank", loading: props.loading, disabled: props.disabled, pill: props.pill, size: props.size, type: props.type, onClick: !props.isPlainLink ? props.onClick : undefined, href: props.isPlainLink ? props.messageLink : undefined, exportparts: `base: ${props.type}button-base, base: button-base` },
|
|
63
63
|
!props.hideicon && (h("sl-icon", { slot: props.iconslot || "prefix", name: props.icon ? props.icon : medium[props.medium].icon, exportparts: "base: icon" })),
|
|
64
64
|
!props.hidetext && children)));
|
|
65
65
|
}
|