@saasquatch/mint-components 2.1.8-1 → 2.1.8
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/{ShadowViewAddon-5ce32291.js → ShadowViewAddon-a26deae6.js} +1 -90
- 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 +54 -381
- package/dist/cjs/{sqm-big-stat_46.cjs.entry.js → sqm-big-stat_45.cjs.entry.js} +9 -332
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +2 -158
- package/dist/collection/collection-manifest.json +0 -1
- package/dist/collection/components/sqm-referral-iframe/ReferralIframe.stories.js +1 -0
- package/dist/collection/components/sqm-referral-iframe/sqm-referral-iframe-view.js +1 -1
- package/dist/collection/components/sqm-referral-iframe/sqm-referral-iframe.js +27 -1
- package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +0 -2
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/formDefinitions.js +37 -75
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +13 -688
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +1 -95
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form.js +4 -4
- package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card.js +2 -2
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +6 -6
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +2 -2
- package/dist/esm/{ShadowViewAddon-9d97b5d5.js → ShadowViewAddon-47f1e579.js} +2 -90
- 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 +54 -381
- package/dist/esm/{sqm-big-stat_46.entry.js → sqm-big-stat_45.entry.js} +14 -336
- package/dist/esm/sqm-stencilbook.entry.js +2 -158
- package/dist/esm-es5/{ShadowViewAddon-9d97b5d5.js → ShadowViewAddon-47f1e579.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_10.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_45.entry.js +1 -0
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/p-0614dcbc.entry.js +9 -0
- package/dist/mint-components/{p-adc4e263.js → p-217dedde.js} +25 -25
- package/dist/mint-components/p-5492dd51.system.entry.js +1 -0
- package/dist/mint-components/p-7ee8f2ed.entry.js +273 -0
- package/dist/mint-components/p-bf545082.system.entry.js +1 -0
- package/dist/mint-components/p-ca098be1.system.js +1 -1
- package/dist/mint-components/p-ce050888.system.js +1 -0
- package/dist/mint-components/p-d4f332a7.entry.js +106 -0
- package/dist/mint-components/p-de343dd0.system.entry.js +1 -0
- package/dist/types/components/sqm-referral-iframe/sqm-referral-iframe-view.d.ts +1 -0
- package/dist/types/components/sqm-referral-iframe/sqm-referral-iframe.d.ts +5 -0
- package/dist/types/components/tax-and-cash/sqm-banking-info-form/formDefinitions.d.ts +0 -2
- package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.d.ts +0 -4
- package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.d.ts +0 -165
- package/dist/types/components.d.ts +10 -378
- 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/collection/components/sqm-partner-info-modal/PartnerInfoModal.stories.js +0 -143
- package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal-view.js +0 -90
- package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal.js +0 -462
- package/dist/collection/components/sqm-partner-info-modal/usePartnerInfoModal.js +0 -180
- package/dist/esm-es5/sqm-big-stat_46.entry.js +0 -1
- package/dist/mint-components/p-0f036907.system.js +0 -1
- package/dist/mint-components/p-22e39d2c.entry.js +0 -342
- package/dist/mint-components/p-499885aa.entry.js +0 -9
- package/dist/mint-components/p-a6621899.system.entry.js +0 -1
- package/dist/mint-components/p-b0253f4c.entry.js +0 -108
- package/dist/mint-components/p-d93e19e9.system.entry.js +0 -1
- package/dist/mint-components/p-e45a9966.system.entry.js +0 -1
- package/dist/types/components/sqm-partner-info-modal/PartnerInfoModal.stories.d.ts +0 -13
- package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal-view.d.ts +0 -41
- package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal.d.ts +0 -80
- package/dist/types/components/sqm-partner-info-modal/usePartnerInfoModal.d.ts +0 -16
|
@@ -23,11 +23,11 @@ import { u as useInstantAccessRegistration } from './useInstantAccessRegistratio
|
|
|
23
23
|
import { R as RequiredPropsError, L as LEAD_FORM_STATE_CONTEXT, u as useLeadFormState } from './useLeadFormState-dd4e8b08.js';
|
|
24
24
|
import { i as isEmpty } from './utilities-77b1e0cc.js';
|
|
25
25
|
import { E as ErrorView } from './ErrorView-74cb3af8.js';
|
|
26
|
-
import { u as useDemoBigStat,
|
|
26
|
+
import { u as useDemoBigStat, V as useBigStat, B as BigStatView, C as CardFeedView, d as CheckboxFieldView, e as CouponCodeView, D as DropdownFieldView, E as EditProfileView, H as HeroView, I as InputFieldView, Q as LeadDropdownFieldView, O as LeadFormView, W as withShadowView, L as LeaderboardView, N as NameFieldsView, f as ChangeMarktingView, P as PortalChangePasswordView, g as PortalFooterView, h as PortalFrameView, c as BaseRegistrationFormView, R as ReferralIframeView, i as RewardExchangeView, X as demoRewardExchange, G as useShareButton, a as ShareButtonView, J as useShareLink, S as StatContainerView, T as TaskCardView } from './ShadowViewAddon-47f1e579.js';
|
|
27
27
|
import './sqm-portal-container-view-a8c708cd.js';
|
|
28
|
-
import { T as TAX_CONTEXT_NAMESPACE, a as TAX_FORM_CONTEXT_NAMESPACE, U as USER_FORM_CONTEXT_NAMESPACE, C as CURRENCIES_NAMESPACE, b as COUNTRIES_NAMESPACE, S as SORTED_COUNTRIES_NAMESPACE, g as getCountryObj, c as USER_QUERY_NAMESPACE, G as GET_USER$2, d as COUNTRIES_QUERY_NAMESPACE, e as GET_COUNTRIES
|
|
28
|
+
import { T as TAX_CONTEXT_NAMESPACE, a as TAX_FORM_CONTEXT_NAMESPACE, U as USER_FORM_CONTEXT_NAMESPACE, C as CURRENCIES_NAMESPACE, b as COUNTRIES_NAMESPACE, S as SORTED_COUNTRIES_NAMESPACE, g as getCountryObj, c as USER_QUERY_NAMESPACE, G as GET_USER$2, d as COUNTRIES_QUERY_NAMESPACE, e as GET_COUNTRIES, h as FINANCE_NETWORK_SETTINGS_NAMESPACE, i as GET_FINANCE_NETWORK_SETTINGS, j as CURRENCIES_QUERY_NAMESPACE, k as GET_CURRENCIES, L as LoadingView } from './data-12e6aae1.js';
|
|
29
29
|
import { p as parseStates, e as extractProps } from './extractProps-54064fb0.js';
|
|
30
|
-
import {
|
|
30
|
+
import { u as usePayoutStatus } from './usePayoutStatus-46c0c289.js';
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
33
|
*
|
|
@@ -2833,333 +2833,6 @@ function useNavigationMenuDemo(props) {
|
|
|
2833
2833
|
}
|
|
2834
2834
|
NavigationMenu.style = sqmNavigationMenuCss;
|
|
2835
2835
|
|
|
2836
|
-
const GET_USER_PARTNER_INFO = dist.gql `
|
|
2837
|
-
query getUserPartnerInfo {
|
|
2838
|
-
user: viewer {
|
|
2839
|
-
... on User {
|
|
2840
|
-
id
|
|
2841
|
-
firstName
|
|
2842
|
-
lastName
|
|
2843
|
-
email
|
|
2844
|
-
countryCode
|
|
2845
|
-
customFields
|
|
2846
|
-
impactConnection {
|
|
2847
|
-
connected
|
|
2848
|
-
publisher {
|
|
2849
|
-
countryCode
|
|
2850
|
-
currency
|
|
2851
|
-
}
|
|
2852
|
-
}
|
|
2853
|
-
}
|
|
2854
|
-
}
|
|
2855
|
-
}
|
|
2856
|
-
`;
|
|
2857
|
-
const GET_COUNTRIES = dist.gql `
|
|
2858
|
-
query getCountries {
|
|
2859
|
-
impactPayoutCountries(limit: 1000) {
|
|
2860
|
-
data {
|
|
2861
|
-
countryCode
|
|
2862
|
-
displayName
|
|
2863
|
-
}
|
|
2864
|
-
}
|
|
2865
|
-
}
|
|
2866
|
-
`;
|
|
2867
|
-
const GET_CURRENCIES = dist.gql `
|
|
2868
|
-
query currencies($locale: RSLocale) {
|
|
2869
|
-
currencies(limit: 300) {
|
|
2870
|
-
data {
|
|
2871
|
-
displayName(locale: $locale)
|
|
2872
|
-
currencyCode
|
|
2873
|
-
}
|
|
2874
|
-
}
|
|
2875
|
-
}
|
|
2876
|
-
`;
|
|
2877
|
-
const CONNECT_PARTNER = dist.gql `
|
|
2878
|
-
mutation createImpactConnection($vars: ImpactConnectionInput!) {
|
|
2879
|
-
createImpactConnection(impactConnectionInput: $vars) {
|
|
2880
|
-
success
|
|
2881
|
-
validationErrors {
|
|
2882
|
-
field
|
|
2883
|
-
message
|
|
2884
|
-
}
|
|
2885
|
-
user {
|
|
2886
|
-
id
|
|
2887
|
-
accountId
|
|
2888
|
-
impactConnection {
|
|
2889
|
-
connected
|
|
2890
|
-
publisher {
|
|
2891
|
-
brandedSignup
|
|
2892
|
-
requiredTaxDocumentType
|
|
2893
|
-
currentTaxDocument {
|
|
2894
|
-
type
|
|
2895
|
-
status
|
|
2896
|
-
}
|
|
2897
|
-
}
|
|
2898
|
-
}
|
|
2899
|
-
}
|
|
2900
|
-
}
|
|
2901
|
-
}
|
|
2902
|
-
`;
|
|
2903
|
-
const GET_BRAND_NAME = dist.gql `
|
|
2904
|
-
query getTenantSettings {
|
|
2905
|
-
tenantSettings {
|
|
2906
|
-
companyName
|
|
2907
|
-
}
|
|
2908
|
-
}
|
|
2909
|
-
`;
|
|
2910
|
-
function usePartnerInfoModal(props) {
|
|
2911
|
-
var _a, _b, _c, _d;
|
|
2912
|
-
const user = J();
|
|
2913
|
-
const locale = L();
|
|
2914
|
-
const { data: userData, loading: userLoading, refetch, } = wn(GET_USER_PARTNER_INFO, {}, !(user === null || user === void 0 ? void 0 : user.jwt));
|
|
2915
|
-
const { data: currenciesData } = wn(GET_CURRENCIES, { variables: { locale } }, !(user === null || user === void 0 ? void 0 : user.jwt));
|
|
2916
|
-
const { data: countriesData } = wn(GET_COUNTRIES, {}, !(user === null || user === void 0 ? void 0 : user.jwt));
|
|
2917
|
-
const { data: tenantSettingsData } = wn(GET_BRAND_NAME, {});
|
|
2918
|
-
const [connectImpactPartner, { loading: connectLoading, errors: connectErrors },] = $e(CONNECT_PARTNER);
|
|
2919
|
-
const [countryCode, setCountryCode] = useState("");
|
|
2920
|
-
const [currency, setCurrency] = useState("");
|
|
2921
|
-
const [error, setError] = useState("");
|
|
2922
|
-
const [success, setSuccess] = useState(false);
|
|
2923
|
-
console.log(user, "user identity in create partner modal"); // TEMP
|
|
2924
|
-
console.log(userData, "user data from partner info query"); // TEMP
|
|
2925
|
-
const impactConnection = (_a = userData === null || userData === void 0 ? void 0 : userData.user) === null || _a === void 0 ? void 0 : _a.impactConnection;
|
|
2926
|
-
function onCountryChange(e) {
|
|
2927
|
-
var _a, _b;
|
|
2928
|
-
const value = (_b = (_a = e.detail) === null || _a === void 0 ? void 0 : _a.item) === null || _b === void 0 ? void 0 : _b.__value;
|
|
2929
|
-
if (!value)
|
|
2930
|
-
return;
|
|
2931
|
-
setCountryCode(value);
|
|
2932
|
-
setCurrency("");
|
|
2933
|
-
setError("");
|
|
2934
|
-
}
|
|
2935
|
-
function onCurrencyChange(e) {
|
|
2936
|
-
var _a, _b;
|
|
2937
|
-
const value = (_b = (_a = e.detail) === null || _a === void 0 ? void 0 : _a.item) === null || _b === void 0 ? void 0 : _b.__value;
|
|
2938
|
-
if (!value)
|
|
2939
|
-
return;
|
|
2940
|
-
setCurrency(value);
|
|
2941
|
-
setError("");
|
|
2942
|
-
}
|
|
2943
|
-
async function onSubmit() {
|
|
2944
|
-
var _a, _b;
|
|
2945
|
-
if (!countryCode || !currency) {
|
|
2946
|
-
setError(props.missingFieldsErrorText);
|
|
2947
|
-
return;
|
|
2948
|
-
}
|
|
2949
|
-
setError("");
|
|
2950
|
-
// AL TODO: How to create impact connection if we dont have address, postalCode, and city?
|
|
2951
|
-
try {
|
|
2952
|
-
const vars = {
|
|
2953
|
-
user: {
|
|
2954
|
-
id: user.id,
|
|
2955
|
-
accountId: user.accountId,
|
|
2956
|
-
},
|
|
2957
|
-
firstName: userData.user.firstName,
|
|
2958
|
-
lastName: userData.user.lastName,
|
|
2959
|
-
countryCode,
|
|
2960
|
-
currency,
|
|
2961
|
-
};
|
|
2962
|
-
const result = await connectImpactPartner({ vars });
|
|
2963
|
-
if (!result || ((_a = result) === null || _a === void 0 ? void 0 : _a.message)) {
|
|
2964
|
-
setError(props.networkErrorText);
|
|
2965
|
-
return;
|
|
2966
|
-
}
|
|
2967
|
-
const connectionResult = result
|
|
2968
|
-
.createImpactConnection;
|
|
2969
|
-
console.log(result, connectionResult, "result and connectionResult from creating partner from modal");
|
|
2970
|
-
if (!(connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.success)) {
|
|
2971
|
-
const validationMsg = (_b = connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.validationErrors) === null || _b === void 0 ? void 0 : _b.map((e) => e.message).join(". ");
|
|
2972
|
-
setError(validationMsg || props.networkErrorText);
|
|
2973
|
-
console.error("Failed to create Impact connection:", connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.validationErrors);
|
|
2974
|
-
return;
|
|
2975
|
-
}
|
|
2976
|
-
// Success
|
|
2977
|
-
window.dispatchEvent(new Event(TAX_FORM_UPDATED_EVENT_KEY));
|
|
2978
|
-
await refetch();
|
|
2979
|
-
setSuccess(true);
|
|
2980
|
-
}
|
|
2981
|
-
catch (e) {
|
|
2982
|
-
console.error("Partner creation error:", e);
|
|
2983
|
-
setError(props.networkErrorText);
|
|
2984
|
-
}
|
|
2985
|
-
}
|
|
2986
|
-
const shouldShow = !success && !userLoading && !(impactConnection === null || impactConnection === void 0 ? void 0 : impactConnection.connected);
|
|
2987
|
-
return {
|
|
2988
|
-
states: {
|
|
2989
|
-
open: shouldShow,
|
|
2990
|
-
loading: userLoading,
|
|
2991
|
-
submitting: connectLoading,
|
|
2992
|
-
isExistingPartner: !!(impactConnection === null || impactConnection === void 0 ? void 0 : impactConnection.connected),
|
|
2993
|
-
countryCode,
|
|
2994
|
-
currency,
|
|
2995
|
-
error,
|
|
2996
|
-
success,
|
|
2997
|
-
brandName: ((_b = tenantSettingsData === null || tenantSettingsData === void 0 ? void 0 : tenantSettingsData.tenantSettings) === null || _b === void 0 ? void 0 : _b.companyName) || "",
|
|
2998
|
-
filteredCountries: ((_c = countriesData === null || countriesData === void 0 ? void 0 : countriesData.impactPayoutCountries) === null || _c === void 0 ? void 0 : _c.data) || [],
|
|
2999
|
-
filteredCurrencies: ((_d = currenciesData === null || currenciesData === void 0 ? void 0 : currenciesData.currencies) === null || _d === void 0 ? void 0 : _d.data) || [],
|
|
3000
|
-
},
|
|
3001
|
-
callbacks: {
|
|
3002
|
-
onCountryChange,
|
|
3003
|
-
onCurrencyChange,
|
|
3004
|
-
onCountrySearch: () => { },
|
|
3005
|
-
onCurrencySearch: () => { },
|
|
3006
|
-
onSubmit,
|
|
3007
|
-
onClose: () => setSuccess(true),
|
|
3008
|
-
},
|
|
3009
|
-
text: props.getTextProps(),
|
|
3010
|
-
};
|
|
3011
|
-
}
|
|
3012
|
-
|
|
3013
|
-
const PartnerInfoModal = class {
|
|
3014
|
-
constructor(hostRef) {
|
|
3015
|
-
registerInstance(this, hostRef);
|
|
3016
|
-
/**
|
|
3017
|
-
* Brand name shown in the modal header
|
|
3018
|
-
*
|
|
3019
|
-
* @uiName Brand name
|
|
3020
|
-
*/
|
|
3021
|
-
this.brandName = "";
|
|
3022
|
-
/**
|
|
3023
|
-
* Header text when user has no existing partner
|
|
3024
|
-
*
|
|
3025
|
-
* @uiName New partner header
|
|
3026
|
-
* @uiWidget textArea
|
|
3027
|
-
*/
|
|
3028
|
-
this.modalBrandHeader = "Welcome to {brandName} Program!";
|
|
3029
|
-
/**
|
|
3030
|
-
* Description for new partner setup
|
|
3031
|
-
*
|
|
3032
|
-
* @uiName New partner description
|
|
3033
|
-
* @uiWidget textArea
|
|
3034
|
-
*/
|
|
3035
|
-
this.descriptionNewPartner = "We just need a bit more information about you before you start earning cash!";
|
|
3036
|
-
/**
|
|
3037
|
-
* Description for existing partner confirmation
|
|
3038
|
-
*
|
|
3039
|
-
* @uiName Existing partner description
|
|
3040
|
-
* @uiWidget textArea
|
|
3041
|
-
*/
|
|
3042
|
-
this.descriptionExistingPartner = "We noticed you are already an Impact.com partner, please confirm your information.";
|
|
3043
|
-
/**
|
|
3044
|
-
* @uiName Country label
|
|
3045
|
-
*/
|
|
3046
|
-
this.countryLabel = "Country";
|
|
3047
|
-
/**
|
|
3048
|
-
* @uiName Currency label
|
|
3049
|
-
*/
|
|
3050
|
-
this.currencyLabel = "Currency";
|
|
3051
|
-
/**
|
|
3052
|
-
* @uiName Submit button label
|
|
3053
|
-
*/
|
|
3054
|
-
this.submitButtonLabel = "Submit";
|
|
3055
|
-
/**
|
|
3056
|
-
* @uiName Confirm button label
|
|
3057
|
-
*/
|
|
3058
|
-
this.confirmButtonLabel = "Confirm";
|
|
3059
|
-
/**
|
|
3060
|
-
* @uiName Search country placeholder
|
|
3061
|
-
*/
|
|
3062
|
-
this.searchCountryPlaceholder = "Search for a country";
|
|
3063
|
-
/**
|
|
3064
|
-
* @uiName Search currency placeholder
|
|
3065
|
-
*/
|
|
3066
|
-
this.searchCurrencyPlaceholder = "Search for a currency";
|
|
3067
|
-
/**
|
|
3068
|
-
* @uiName Network error text
|
|
3069
|
-
* @uiWidget textArea
|
|
3070
|
-
*/
|
|
3071
|
-
this.networkErrorText = "An error occurred. Please try again.";
|
|
3072
|
-
/**
|
|
3073
|
-
* @uiName Missing fields error text
|
|
3074
|
-
* @uiWidget textArea
|
|
3075
|
-
*/
|
|
3076
|
-
this.missingFieldsErrorText = "Please select both a country and currency.";
|
|
3077
|
-
h(this);
|
|
3078
|
-
}
|
|
3079
|
-
disconnectedCallback() { }
|
|
3080
|
-
getTextProps() {
|
|
3081
|
-
return getProps(this);
|
|
3082
|
-
}
|
|
3083
|
-
render() {
|
|
3084
|
-
// AL: TODO add usePartnerInfoModal
|
|
3085
|
-
const props = isDemo()
|
|
3086
|
-
? useDemoPartnerInfoModal(this)
|
|
3087
|
-
: usePartnerInfoModal(this);
|
|
3088
|
-
return h$1(PartnerInfoModalView, Object.assign({}, props));
|
|
3089
|
-
}
|
|
3090
|
-
};
|
|
3091
|
-
function useDemoPartnerInfoModal(props) {
|
|
3092
|
-
const [countryCode, setCountryCode] = useState("US");
|
|
3093
|
-
const [currency, setCurrency] = useState("");
|
|
3094
|
-
const [error, setError] = useState("");
|
|
3095
|
-
const demoCountries = [
|
|
3096
|
-
{ countryCode: "US", displayName: "United States" },
|
|
3097
|
-
{ countryCode: "CA", displayName: "Canada" },
|
|
3098
|
-
{ countryCode: "GB", displayName: "United Kingdom" },
|
|
3099
|
-
{ countryCode: "AU", displayName: "Australia" },
|
|
3100
|
-
{ countryCode: "DE", displayName: "Germany" },
|
|
3101
|
-
];
|
|
3102
|
-
const demoCurrencies = [
|
|
3103
|
-
{ currencyCode: "USD", displayName: "US Dollar" },
|
|
3104
|
-
{ currencyCode: "CAD", displayName: "Canadian Dollar" },
|
|
3105
|
-
{ currencyCode: "GBP", displayName: "British Pound" },
|
|
3106
|
-
{ currencyCode: "EUR", displayName: "Euro" },
|
|
3107
|
-
{ currencyCode: "AUD", displayName: "Australian Dollar" },
|
|
3108
|
-
];
|
|
3109
|
-
return cjs({
|
|
3110
|
-
states: {
|
|
3111
|
-
brandName: "Test Brand",
|
|
3112
|
-
open: true,
|
|
3113
|
-
loading: false,
|
|
3114
|
-
submitting: false,
|
|
3115
|
-
isExistingPartner: false,
|
|
3116
|
-
countryCode,
|
|
3117
|
-
currency,
|
|
3118
|
-
error,
|
|
3119
|
-
success: false,
|
|
3120
|
-
filteredCountries: demoCountries,
|
|
3121
|
-
filteredCurrencies: demoCurrencies,
|
|
3122
|
-
},
|
|
3123
|
-
callbacks: {
|
|
3124
|
-
onCountryChange: (e) => {
|
|
3125
|
-
var _a, _b;
|
|
3126
|
-
const value = (_b = (_a = e === null || e === void 0 ? void 0 : e.detail) === null || _a === void 0 ? void 0 : _a.item) === null || _b === void 0 ? void 0 : _b.__value;
|
|
3127
|
-
if (value) {
|
|
3128
|
-
setCountryCode(value);
|
|
3129
|
-
setCurrency("");
|
|
3130
|
-
}
|
|
3131
|
-
},
|
|
3132
|
-
onCurrencyChange: (e) => {
|
|
3133
|
-
var _a, _b;
|
|
3134
|
-
const value = (_b = (_a = e === null || e === void 0 ? void 0 : e.detail) === null || _a === void 0 ? void 0 : _a.item) === null || _b === void 0 ? void 0 : _b.__value;
|
|
3135
|
-
if (value)
|
|
3136
|
-
setCurrency(value);
|
|
3137
|
-
},
|
|
3138
|
-
onCountrySearch: () => { },
|
|
3139
|
-
onCurrencySearch: () => { },
|
|
3140
|
-
onSubmit: () => {
|
|
3141
|
-
if (!countryCode || !currency) {
|
|
3142
|
-
setError(props.missingFieldsErrorText);
|
|
3143
|
-
return;
|
|
3144
|
-
}
|
|
3145
|
-
setError("");
|
|
3146
|
-
},
|
|
3147
|
-
onClose: () => { },
|
|
3148
|
-
},
|
|
3149
|
-
text: {
|
|
3150
|
-
modalBrandHeader: props.modalBrandHeader,
|
|
3151
|
-
descriptionNewPartner: props.descriptionNewPartner,
|
|
3152
|
-
descriptionExistingPartner: props.descriptionExistingPartner,
|
|
3153
|
-
countryLabel: props.countryLabel,
|
|
3154
|
-
currencyLabel: props.currencyLabel,
|
|
3155
|
-
submitButtonLabel: props.submitButtonLabel,
|
|
3156
|
-
confirmButtonLabel: props.confirmButtonLabel,
|
|
3157
|
-
searchCountryPlaceholder: props.searchCountryPlaceholder,
|
|
3158
|
-
searchCurrencyPlaceholder: props.searchCurrencyPlaceholder,
|
|
3159
|
-
},
|
|
3160
|
-
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
3161
|
-
}
|
|
3162
|
-
|
|
3163
2836
|
const style$1 = {
|
|
3164
2837
|
Wrapper: {
|
|
3165
2838
|
maxWidth: "200px",
|
|
@@ -4943,6 +4616,11 @@ const SqmReferralIframe = class {
|
|
|
4943
4616
|
* @uiName IFrame width
|
|
4944
4617
|
*/
|
|
4945
4618
|
this.iframeWidth = "100%";
|
|
4619
|
+
/**
|
|
4620
|
+
* Override the default parameter name used in the iframe
|
|
4621
|
+
* @uiName Referral code parameter name
|
|
4622
|
+
*/
|
|
4623
|
+
this.codeParam = "rsCode";
|
|
4946
4624
|
h(this);
|
|
4947
4625
|
}
|
|
4948
4626
|
disconnectedCallback() { }
|
|
@@ -6783,7 +6461,7 @@ function useTaxAndCash() {
|
|
|
6783
6461
|
userFormContext.countryCode;
|
|
6784
6462
|
Sn({
|
|
6785
6463
|
namespace: COUNTRIES_QUERY_NAMESPACE,
|
|
6786
|
-
query: GET_COUNTRIES
|
|
6464
|
+
query: GET_COUNTRIES,
|
|
6787
6465
|
skip: !user,
|
|
6788
6466
|
});
|
|
6789
6467
|
const { data: financeNetworkData, refetch } = Sn({
|
|
@@ -6796,7 +6474,7 @@ function useTaxAndCash() {
|
|
|
6796
6474
|
});
|
|
6797
6475
|
const { data: currenciesData } = Sn({
|
|
6798
6476
|
namespace: CURRENCIES_QUERY_NAMESPACE,
|
|
6799
|
-
query: GET_CURRENCIES
|
|
6477
|
+
query: GET_CURRENCIES,
|
|
6800
6478
|
skip: !user,
|
|
6801
6479
|
variables: {
|
|
6802
6480
|
locale,
|
|
@@ -7041,7 +6719,7 @@ const TaxAndCashMonolith = class {
|
|
|
7041
6719
|
* @uiName Indirect tax number field label
|
|
7042
6720
|
* @uiGroup Step 2 Properties
|
|
7043
6721
|
*/
|
|
7044
|
-
this.step2_indirectTaxNumber = "{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}}";
|
|
6722
|
+
this.step2_indirectTaxNumber = "{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number} other {Tax number}}";
|
|
7045
6723
|
/**
|
|
7046
6724
|
* @uiName Province field label
|
|
7047
6725
|
* @uiGroup Step 2 Properties
|
|
@@ -7051,7 +6729,7 @@ const TaxAndCashMonolith = class {
|
|
|
7051
6729
|
* @uiName Missing indirect tax number error message
|
|
7052
6730
|
* @uiGroup Step 2 Properties
|
|
7053
6731
|
*/
|
|
7054
|
-
this.step2_indirectTaxNumberError = "{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}} is required";
|
|
6732
|
+
this.step2_indirectTaxNumberError = "{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number} other {Tax number}} is required";
|
|
7055
6733
|
/**
|
|
7056
6734
|
* Displayed to participants registered for QST.
|
|
7057
6735
|
* @uiName QST number field label
|
|
@@ -7619,7 +7297,7 @@ const TaxAndCashMonolith = class {
|
|
|
7619
7297
|
* @uiName Payout status badge
|
|
7620
7298
|
* @uiGroup Dashboard Properties
|
|
7621
7299
|
*/
|
|
7622
|
-
this.dashboard_statusBadgeText = "{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout} }";
|
|
7300
|
+
this.dashboard_statusBadgeText = "{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout} other {Failed} }";
|
|
7623
7301
|
/**
|
|
7624
7302
|
* Display participants' payout preference on the payout information card, indicating the balance at which they want to get paid.
|
|
7625
7303
|
* @uiName Payout schedule by threshold text
|
|
@@ -8253,4 +7931,4 @@ function useUserNameDemo(props) {
|
|
|
8253
7931
|
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
8254
7932
|
}
|
|
8255
7933
|
|
|
8256
|
-
export { BigStat as sqm_big_stat, BrandComponent as sqm_brand, SqmBrandSelector as sqm_brand_selector, CardFeed as sqm_card_feed, CheckboxField as sqm_checkbox_field, CouponCode as sqm_coupon_code, DividedLayout as sqm_divided_layout, DropdownField as sqm_dropdown_field, EditProfile as sqm_edit_profile, Hero as sqm_hero, HeroImage as sqm_hero_image, SqmHookStoryContainer as sqm_hook_story_container, Image as sqm_image, InputField as sqm_input_field, LeadDropdownField as sqm_lead_dropdown_field, LeadForm as sqm_lead_form, Leaderboard as sqm_leaderboard, LinkButton as sqm_link_button, MarketingEmailsCheckbox as sqm_marketing_emails_checkbox, NameFields as sqm_name_fields, NavigationMenu as sqm_navigation_menu,
|
|
7934
|
+
export { BigStat as sqm_big_stat, BrandComponent as sqm_brand, SqmBrandSelector as sqm_brand_selector, CardFeed as sqm_card_feed, CheckboxField as sqm_checkbox_field, CouponCode as sqm_coupon_code, DividedLayout as sqm_divided_layout, DropdownField as sqm_dropdown_field, EditProfile as sqm_edit_profile, Hero as sqm_hero, HeroImage as sqm_hero_image, SqmHookStoryContainer as sqm_hook_story_container, Image as sqm_image, InputField as sqm_input_field, LeadDropdownField as sqm_lead_dropdown_field, LeadForm as sqm_lead_form, Leaderboard as sqm_leaderboard, LinkButton as sqm_link_button, MarketingEmailsCheckbox as sqm_marketing_emails_checkbox, NameFields as sqm_name_fields, NavigationMenu as sqm_navigation_menu, PayoutButtonScroll as sqm_payout_button_scroll, PayoutStatusAlert as sqm_payout_status_alert, PortalChangeMarketing as sqm_portal_change_marketing, PortalChangePassword as sqm_portal_change_password, PortalFooter as sqm_portal_footer, PortalFrame as sqm_portal_frame, PortalGoogleRegistrationForm as sqm_portal_google_registration_form, ProgramExplainer as sqm_program_explainer, ProgramExplainerStep as sqm_program_explainer_step, ProgramMenu as sqm_program_menu, ReferralCard as sqm_referral_card, SqmReferralIframe as sqm_referral_iframe, ReferredRegistration as sqm_referred_registration, SqmRewardExchangeList as sqm_reward_exchange_list, SqmRouter as sqm_router, ShareButton as sqm_share_button, ShareCode as sqm_share_code, ShareLink as sqm_share_link, StatContainer as sqm_stat_container, TaskCard as sqm_task_card, TaxAndCashMonolith as sqm_tax_and_cash, Timeline as sqm_timeline, TimelineReward as sqm_timeline_entry, UserName as sqm_user_name };
|
|
@@ -29,7 +29,7 @@ import './utilities-77b1e0cc.js';
|
|
|
29
29
|
import { P as PortalResetPasswordView } from './sqm-portal-reset-password-view-cfbc0eb0.js';
|
|
30
30
|
import './ErrorView-74cb3af8.js';
|
|
31
31
|
import { Q as QrCodeView } from './sqm-qr-code-view-ce476721.js';
|
|
32
|
-
import { S as StatContainerView, B as BigStatView, a as ShareButtonView, P as PortalChangePasswordView, b as PoweredByImg$1, c as BaseRegistrationFormView, u as useDemoBigStat, T as TaskCardView, C as CardFeedView, d as CheckboxFieldView, e as CouponCodeView, D as DropdownFieldView, E as EditProfileView, L as LeaderboardView, H as HeroView, I as InputFieldView, N as NameFieldsView, f as ChangeMarktingView, g as PortalFooterView, h as PortalFrameView, R as ReferralIframeView, i as RewardExchangeView, r as rewardExchangeCustomErrorMsg, j as rewardExchangeLongText, k as rewardExchangeSelected, l as chooseAmountFixed, m as chooseAmountFixedNoDescription, n as chooseAmountVariable, o as chooseAmountVariableNoDescription, p as chooseAmountVariableDisabled, q as chooseAmountVariableUnavailable, s as confirmFixed, t as confirmVariable, v as redemptionError, w as queryError, x as success, y as successVariable, z as loading, A as empty$1, F as rewardExchange, G as useShareButton, J as useShareLink, K as ProgressBarView, M as ProgressBar$2, O as LeadFormView, Q as LeadDropdownFieldView, U as
|
|
32
|
+
import { S as StatContainerView, B as BigStatView, a as ShareButtonView, P as PortalChangePasswordView, b as PoweredByImg$1, c as BaseRegistrationFormView, u as useDemoBigStat, T as TaskCardView, C as CardFeedView, d as CheckboxFieldView, e as CouponCodeView, D as DropdownFieldView, E as EditProfileView, L as LeaderboardView, H as HeroView, I as InputFieldView, N as NameFieldsView, f as ChangeMarktingView, g as PortalFooterView, h as PortalFrameView, R as ReferralIframeView, i as RewardExchangeView, r as rewardExchangeCustomErrorMsg, j as rewardExchangeLongText, k as rewardExchangeSelected, l as chooseAmountFixed, m as chooseAmountFixedNoDescription, n as chooseAmountVariable, o as chooseAmountVariableNoDescription, p as chooseAmountVariableDisabled, q as chooseAmountVariableUnavailable, s as confirmFixed, t as confirmVariable, v as redemptionError, w as queryError, x as success, y as successVariable, z as loading, A as empty$1, F as rewardExchange, G as useShareButton, J as useShareLink, K as ProgressBarView, M as ProgressBar$2, O as LeadFormView, Q as LeadDropdownFieldView, U as ShadowViewAddon } from './ShadowViewAddon-47f1e579.js';
|
|
33
33
|
import { P as PortalContainerView, a as PortalSectionView } from './sqm-portal-container-view-a8c708cd.js';
|
|
34
34
|
import { I as InvoiceTableView, a as INDIRECT_TAX_SPAIN_REGIONS, b as INDIRECT_TAX_PROVINCES, O as OtherRegionSlotView, U as UserInfoFormView$1 } from './sqm-user-info-form-view-19d81a2b.js';
|
|
35
35
|
import { t as taxTypeToName, L as LoadingView } from './data-12e6aae1.js';
|
|
@@ -10700,6 +10700,7 @@ const props$1 = {
|
|
|
10700
10700
|
iframeSrc: "https://example.com",
|
|
10701
10701
|
iframeHeight: "100%",
|
|
10702
10702
|
iframeWidth: "100%",
|
|
10703
|
+
codeParam: "rsCode",
|
|
10703
10704
|
},
|
|
10704
10705
|
},
|
|
10705
10706
|
};
|
|
@@ -18696,162 +18697,6 @@ const UserInfoFormView = /*#__PURE__*/Object.freeze({
|
|
|
18696
18697
|
DisabledForm: DisabledForm
|
|
18697
18698
|
});
|
|
18698
18699
|
|
|
18699
|
-
const PartnerInfoModal_stories = {
|
|
18700
|
-
title: "Components/Partner Info Modal",
|
|
18701
|
-
};
|
|
18702
|
-
const demoCountries = [
|
|
18703
|
-
{ countryCode: "US", displayName: "United States" },
|
|
18704
|
-
{ countryCode: "CA", displayName: "Canada" },
|
|
18705
|
-
{ countryCode: "GB", displayName: "United Kingdom" },
|
|
18706
|
-
{ countryCode: "AU", displayName: "Australia" },
|
|
18707
|
-
{ countryCode: "DE", displayName: "Germany" },
|
|
18708
|
-
{ countryCode: "FR", displayName: "France" },
|
|
18709
|
-
{ countryCode: "JP", displayName: "Japan" },
|
|
18710
|
-
];
|
|
18711
|
-
const demoCurrencies = [
|
|
18712
|
-
{ currencyCode: "USD", displayName: "US Dollar" },
|
|
18713
|
-
{ currencyCode: "CAD", displayName: "Canadian Dollar" },
|
|
18714
|
-
{ currencyCode: "GBP", displayName: "British Pound" },
|
|
18715
|
-
{ currencyCode: "EUR", displayName: "Euro" },
|
|
18716
|
-
{ currencyCode: "AUD", displayName: "Australian Dollar" },
|
|
18717
|
-
];
|
|
18718
|
-
const noopCallbacks = {
|
|
18719
|
-
onCountryChange: (e) => console.log("Country changed:", e),
|
|
18720
|
-
onCurrencyChange: (e) => console.log("Currency changed:", e),
|
|
18721
|
-
onCountrySearch: (v) => console.log("Country search:", v),
|
|
18722
|
-
onCurrencySearch: (v) => console.log("Currency search:", v),
|
|
18723
|
-
onSubmit: () => console.log("Submit"),
|
|
18724
|
-
onClose: () => console.log("Close"),
|
|
18725
|
-
};
|
|
18726
|
-
const defaultText$1 = {
|
|
18727
|
-
modalBrandHeader: "Welcome to {brandName} Program!",
|
|
18728
|
-
descriptionNewPartner: "We just need a bit more information about you before you start earning cash!",
|
|
18729
|
-
descriptionExistingPartner: "We noticed you are already an Impact.com partner, please confirm your information.",
|
|
18730
|
-
countryLabel: "Country",
|
|
18731
|
-
currencyLabel: "Currency",
|
|
18732
|
-
submitButtonLabel: "Submit",
|
|
18733
|
-
confirmButtonLabel: "Confirm",
|
|
18734
|
-
searchCountryPlaceholder: "Search for a country",
|
|
18735
|
-
searchCurrencyPlaceholder: "Search for a currency",
|
|
18736
|
-
};
|
|
18737
|
-
const defaultProps$y = {
|
|
18738
|
-
states: {
|
|
18739
|
-
open: true,
|
|
18740
|
-
loading: false,
|
|
18741
|
-
submitting: false,
|
|
18742
|
-
isExistingPartner: false,
|
|
18743
|
-
countryCode: "",
|
|
18744
|
-
currency: "",
|
|
18745
|
-
error: "",
|
|
18746
|
-
success: false,
|
|
18747
|
-
brandName: "Test Brand",
|
|
18748
|
-
filteredCountries: demoCountries,
|
|
18749
|
-
filteredCurrencies: demoCurrencies,
|
|
18750
|
-
},
|
|
18751
|
-
callbacks: noopCallbacks,
|
|
18752
|
-
text: defaultText$1,
|
|
18753
|
-
};
|
|
18754
|
-
const NewPartnerEmpty = () => {
|
|
18755
|
-
return h(PartnerInfoModalView, Object.assign({}, defaultProps$y));
|
|
18756
|
-
};
|
|
18757
|
-
const NewPartnerPrefilled = () => {
|
|
18758
|
-
const props = {
|
|
18759
|
-
...defaultProps$y,
|
|
18760
|
-
states: {
|
|
18761
|
-
...defaultProps$y.states,
|
|
18762
|
-
countryCode: "US",
|
|
18763
|
-
currency: "",
|
|
18764
|
-
},
|
|
18765
|
-
};
|
|
18766
|
-
return h(PartnerInfoModalView, Object.assign({}, props));
|
|
18767
|
-
};
|
|
18768
|
-
const NewPartnerFullySelected = () => {
|
|
18769
|
-
const props = {
|
|
18770
|
-
...defaultProps$y,
|
|
18771
|
-
states: {
|
|
18772
|
-
...defaultProps$y.states,
|
|
18773
|
-
countryCode: "US",
|
|
18774
|
-
currency: "USD",
|
|
18775
|
-
},
|
|
18776
|
-
};
|
|
18777
|
-
return h(PartnerInfoModalView, Object.assign({}, props));
|
|
18778
|
-
};
|
|
18779
|
-
const ExistingPartnerConfirm = () => {
|
|
18780
|
-
const props = {
|
|
18781
|
-
...defaultProps$y,
|
|
18782
|
-
states: {
|
|
18783
|
-
...defaultProps$y.states,
|
|
18784
|
-
isExistingPartner: true,
|
|
18785
|
-
countryCode: "CA",
|
|
18786
|
-
currency: "CAD",
|
|
18787
|
-
},
|
|
18788
|
-
};
|
|
18789
|
-
return h(PartnerInfoModalView, Object.assign({}, props));
|
|
18790
|
-
};
|
|
18791
|
-
const Submitting = () => {
|
|
18792
|
-
const props = {
|
|
18793
|
-
...defaultProps$y,
|
|
18794
|
-
states: {
|
|
18795
|
-
...defaultProps$y.states,
|
|
18796
|
-
countryCode: "GB",
|
|
18797
|
-
currency: "GBP",
|
|
18798
|
-
submitting: true,
|
|
18799
|
-
},
|
|
18800
|
-
};
|
|
18801
|
-
return h(PartnerInfoModalView, Object.assign({}, props));
|
|
18802
|
-
};
|
|
18803
|
-
const WithError$3 = () => {
|
|
18804
|
-
const props = {
|
|
18805
|
-
...defaultProps$y,
|
|
18806
|
-
states: {
|
|
18807
|
-
...defaultProps$y.states,
|
|
18808
|
-
countryCode: "US",
|
|
18809
|
-
currency: "USD",
|
|
18810
|
-
error: "An error occurred while creating your partner account. Please try again.",
|
|
18811
|
-
},
|
|
18812
|
-
};
|
|
18813
|
-
return h(PartnerInfoModalView, Object.assign({}, props));
|
|
18814
|
-
};
|
|
18815
|
-
const ValidationError$1 = () => {
|
|
18816
|
-
const props = {
|
|
18817
|
-
...defaultProps$y,
|
|
18818
|
-
states: {
|
|
18819
|
-
...defaultProps$y.states,
|
|
18820
|
-
countryCode: "",
|
|
18821
|
-
currency: "",
|
|
18822
|
-
error: "Please select both a country and currency.",
|
|
18823
|
-
},
|
|
18824
|
-
};
|
|
18825
|
-
return h(PartnerInfoModalView, Object.assign({}, props));
|
|
18826
|
-
};
|
|
18827
|
-
const Closed = () => {
|
|
18828
|
-
const props = {
|
|
18829
|
-
...defaultProps$y,
|
|
18830
|
-
states: {
|
|
18831
|
-
...defaultProps$y.states,
|
|
18832
|
-
open: false,
|
|
18833
|
-
},
|
|
18834
|
-
};
|
|
18835
|
-
return h(PartnerInfoModalView, Object.assign({}, props));
|
|
18836
|
-
};
|
|
18837
|
-
const FullStackDemo = () => {
|
|
18838
|
-
return (h("sqm-partner-info-modal", { "brand-name": "Acme", "header-new-partner": "Welcome to {brandName} Program!", "description-new-partner": "We just need a bit more information about you before you start earning cash!", "submit-button-label": "Submit" }));
|
|
18839
|
-
};
|
|
18840
|
-
|
|
18841
|
-
const PartnerInfoModal = /*#__PURE__*/Object.freeze({
|
|
18842
|
-
__proto__: null,
|
|
18843
|
-
'default': PartnerInfoModal_stories,
|
|
18844
|
-
NewPartnerEmpty: NewPartnerEmpty,
|
|
18845
|
-
NewPartnerPrefilled: NewPartnerPrefilled,
|
|
18846
|
-
NewPartnerFullySelected: NewPartnerFullySelected,
|
|
18847
|
-
ExistingPartnerConfirm: ExistingPartnerConfirm,
|
|
18848
|
-
Submitting: Submitting,
|
|
18849
|
-
WithError: WithError$3,
|
|
18850
|
-
ValidationError: ValidationError$1,
|
|
18851
|
-
Closed: Closed,
|
|
18852
|
-
FullStackDemo: FullStackDemo
|
|
18853
|
-
});
|
|
18854
|
-
|
|
18855
18700
|
function deepFreeze(obj) {
|
|
18856
18701
|
if (obj instanceof Map) {
|
|
18857
18702
|
obj.clear = obj.delete = obj.set = function () {
|
|
@@ -21545,7 +21390,6 @@ const stories = [
|
|
|
21545
21390
|
TaxAndCashRewardsTable,
|
|
21546
21391
|
TaxAndCashReferralTableRewardsCell,
|
|
21547
21392
|
TaxAndCashReferralTable$1,
|
|
21548
|
-
PartnerInfoModal,
|
|
21549
21393
|
];
|
|
21550
21394
|
const StencilStorybook = class {
|
|
21551
21395
|
constructor(hostRef) {
|