@saasquatch/mint-components 2.1.8-1 → 2.1.8-11
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-0745de12.js} +384 -98
- 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 +50 -377
- package/dist/cjs/{sqm-big-stat_46.cjs.entry.js → sqm-big-stat_45.cjs.entry.js} +172 -351
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +168 -175
- package/dist/collection/collection-manifest.json +0 -1
- package/dist/collection/components/sqm-share-code/sqm-share-code.js +0 -1
- package/dist/collection/components/sqm-share-link/ShareLink.stories.js +142 -11
- package/dist/collection/components/sqm-share-link/UseShareLink.stories.js +14 -5
- package/dist/collection/components/sqm-share-link/sqm-share-link-view.js +173 -0
- package/dist/collection/components/sqm-share-link/sqm-share-link.js +536 -26
- package/dist/collection/components/sqm-share-link/useShareLink.js +210 -6
- 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/esm/{ShadowViewAddon-9d97b5d5.js → ShadowViewAddon-cd0033a6.js} +386 -100
- 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 +50 -377
- package/dist/esm/{sqm-big-stat_46.entry.js → sqm-big-stat_45.entry.js} +177 -355
- package/dist/esm/sqm-stencilbook.entry.js +168 -175
- package/dist/esm-es5/ShadowViewAddon-cd0033a6.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_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-499885aa.entry.js → p-23e8dd9a.entry.js} +2 -2
- package/dist/mint-components/p-27e8efc8.system.js +1 -0
- package/dist/mint-components/p-2f314004.system.entry.js +1 -0
- package/dist/mint-components/{p-a6621899.system.entry.js → p-8c53dcc9.system.entry.js} +1 -1
- package/dist/mint-components/{p-22e39d2c.entry.js → p-a9bb29df.entry.js} +21 -90
- package/dist/mint-components/p-ca098be1.system.js +1 -1
- package/dist/mint-components/p-cacb897d.system.entry.js +1 -0
- package/dist/mint-components/p-fcb7e0a3.js +503 -0
- package/dist/mint-components/p-ff378015.entry.js +106 -0
- package/dist/types/components/sqm-share-link/ShareLink.stories.d.ts +10 -0
- package/dist/types/components/sqm-share-link/UseShareLink.stories.d.ts +6 -0
- package/dist/types/components/sqm-share-link/sqm-share-link-view.d.ts +37 -0
- package/dist/types/components/sqm-share-link/sqm-share-link.d.ts +107 -2
- package/dist/types/components/sqm-share-link/useShareLink.d.ts +27 -4
- 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 +183 -380
- 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/ShadowViewAddon-9d97b5d5.js +0 -1
- 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-adc4e263.js +0 -463
- 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, W 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,
|
|
26
|
+
import { u as useDemoBigStat, W 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, U as LeadDropdownFieldView, Q as LeadFormView, X 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, Y as demoRewardExchange, G as useShareButton, a as ShareButtonView, K as useShareLink, J as ShareLinkView, S as StatContainerView, T as TaskCardView } from './ShadowViewAddon-cd0033a6.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",
|
|
@@ -6377,7 +6050,6 @@ function useDemoShareCode(props) {
|
|
|
6377
6050
|
borderRadius: props.borderRadius,
|
|
6378
6051
|
borderColor: props.borderColor,
|
|
6379
6052
|
buttonType: props.buttonType,
|
|
6380
|
-
rewardStatus: "AVAILABLE",
|
|
6381
6053
|
open,
|
|
6382
6054
|
onClick: () => {
|
|
6383
6055
|
// Should well supported: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard#browser_compatibility
|
|
@@ -6437,6 +6109,111 @@ const ShareLink = class {
|
|
|
6437
6109
|
* @uiGroup Style
|
|
6438
6110
|
*/
|
|
6439
6111
|
this.buttonStyle = "icon";
|
|
6112
|
+
/**
|
|
6113
|
+
* Enable users to customize their referral link
|
|
6114
|
+
*
|
|
6115
|
+
* @uiName Customize URL
|
|
6116
|
+
* @uiType boolean
|
|
6117
|
+
*/
|
|
6118
|
+
this.customizeUrl = false;
|
|
6119
|
+
/**
|
|
6120
|
+
* Text shown below the share link input to trigger customization
|
|
6121
|
+
*
|
|
6122
|
+
* @uiName Customize link label
|
|
6123
|
+
* @uiType string
|
|
6124
|
+
*/
|
|
6125
|
+
this.customizeLinkLabel = "Customize Link";
|
|
6126
|
+
/**
|
|
6127
|
+
* Text for the save button in editing mode
|
|
6128
|
+
*
|
|
6129
|
+
* @uiName Save button label
|
|
6130
|
+
* @uiType string
|
|
6131
|
+
*/
|
|
6132
|
+
this.saveLabelText = "Save";
|
|
6133
|
+
/**
|
|
6134
|
+
* Text for the cancel button in editing mode
|
|
6135
|
+
*
|
|
6136
|
+
* @uiName Cancel button label
|
|
6137
|
+
* @uiType string
|
|
6138
|
+
*/
|
|
6139
|
+
this.cancelLabelText = "Cancel";
|
|
6140
|
+
/**
|
|
6141
|
+
* Message shown briefly after successfully saving a custom link
|
|
6142
|
+
*
|
|
6143
|
+
* @uiName Success message
|
|
6144
|
+
* @uiType string
|
|
6145
|
+
*/
|
|
6146
|
+
this.successMessage = "Link updated successfully";
|
|
6147
|
+
/**
|
|
6148
|
+
* Title text shown when the custom link is already taken
|
|
6149
|
+
*
|
|
6150
|
+
* @uiName Existing code conflict error title
|
|
6151
|
+
* @uiType string
|
|
6152
|
+
*/
|
|
6153
|
+
this.existingCodeConflictErrorTitle = "This link is already taken";
|
|
6154
|
+
/**
|
|
6155
|
+
* Description text shown when the custom link is already taken
|
|
6156
|
+
*
|
|
6157
|
+
* @uiName Existing code conflict error description
|
|
6158
|
+
* @uiType string
|
|
6159
|
+
*/
|
|
6160
|
+
this.existingCodeConflictErrorDescription = "Try adding numbers, a dash or underscore to create a unique link.";
|
|
6161
|
+
/**
|
|
6162
|
+
* Title text shown when the link contains invalid characters
|
|
6163
|
+
*
|
|
6164
|
+
* @uiName Invalid characters error title
|
|
6165
|
+
* @uiType string
|
|
6166
|
+
*/
|
|
6167
|
+
this.invalidCharactersErrorTitle = "Please use only letters, numbers, dashes and underscores";
|
|
6168
|
+
/**
|
|
6169
|
+
* Description text shown when the link contains invalid characters
|
|
6170
|
+
*
|
|
6171
|
+
* @uiName Invalid characters error description
|
|
6172
|
+
* @uiType string
|
|
6173
|
+
*/
|
|
6174
|
+
this.invalidCharactersErrorDescription = "Special characters can break the link when sharing.";
|
|
6175
|
+
/**
|
|
6176
|
+
* Title text shown when the link contains profanity
|
|
6177
|
+
*
|
|
6178
|
+
* @uiName Profanity error title
|
|
6179
|
+
* @uiType string
|
|
6180
|
+
*/
|
|
6181
|
+
this.profanityErrorTitle = "Please try a different link";
|
|
6182
|
+
/**
|
|
6183
|
+
* Description text shown when the link contains profanity
|
|
6184
|
+
*
|
|
6185
|
+
* @uiName Profanity error description
|
|
6186
|
+
* @uiType string
|
|
6187
|
+
*/
|
|
6188
|
+
this.profanityErrorDescription = "This link contains a restricted word.";
|
|
6189
|
+
/**
|
|
6190
|
+
* Text describing the edit limit
|
|
6191
|
+
*
|
|
6192
|
+
* @uiName Edit limit text
|
|
6193
|
+
* @uiType string
|
|
6194
|
+
*/
|
|
6195
|
+
this.editLimitText = "You can edit your link up to 5 times.";
|
|
6196
|
+
/**
|
|
6197
|
+
* Message shown when the edit limit has been reached. Use {supportLink} as a placeholder for the support link.
|
|
6198
|
+
*
|
|
6199
|
+
* @uiName Edit limit reached text
|
|
6200
|
+
* @uiType string
|
|
6201
|
+
*/
|
|
6202
|
+
this.editLimitReachedText = "5 edit limit reached. To make more changes, please contact {supportLink}.";
|
|
6203
|
+
/**
|
|
6204
|
+
* Display text for the support link in the edit limit reached message
|
|
6205
|
+
*
|
|
6206
|
+
* @uiName Support link text
|
|
6207
|
+
* @uiType string
|
|
6208
|
+
*/
|
|
6209
|
+
this.supportLinkText = "Support";
|
|
6210
|
+
/**
|
|
6211
|
+
* Tooltip text shown when link customization is disabled
|
|
6212
|
+
*
|
|
6213
|
+
* @uiName Customize disabled tooltip
|
|
6214
|
+
* @uiType string
|
|
6215
|
+
*/
|
|
6216
|
+
this.customizeDisabledTooltip = "Link customization is not available.";
|
|
6440
6217
|
h(this);
|
|
6441
6218
|
}
|
|
6442
6219
|
disconnectedCallback() { }
|
|
@@ -6445,33 +6222,78 @@ const ShareLink = class {
|
|
|
6445
6222
|
const props = isDemo()
|
|
6446
6223
|
? useDemoShareLink(thisProps)
|
|
6447
6224
|
: useShareLink(thisProps);
|
|
6448
|
-
return h$1(
|
|
6225
|
+
return h$1(ShareLinkView, Object.assign({}, props));
|
|
6449
6226
|
}
|
|
6450
6227
|
};
|
|
6451
6228
|
function useDemoShareLink(props) {
|
|
6229
|
+
var _a;
|
|
6452
6230
|
const [open, setOpen] = useState(false);
|
|
6231
|
+
const [isEditing, setIsEditing] = useState(false);
|
|
6232
|
+
const [editValue, setEditValue] = useState("");
|
|
6233
|
+
const [showSuccess, setShowSuccess] = useState(false);
|
|
6453
6234
|
const copyString = "https://www.example.com/sharelink/abc";
|
|
6454
|
-
|
|
6455
|
-
|
|
6456
|
-
|
|
6457
|
-
|
|
6458
|
-
|
|
6459
|
-
|
|
6460
|
-
|
|
6461
|
-
|
|
6462
|
-
|
|
6463
|
-
|
|
6464
|
-
|
|
6465
|
-
|
|
6466
|
-
|
|
6467
|
-
|
|
6468
|
-
|
|
6469
|
-
|
|
6470
|
-
|
|
6471
|
-
|
|
6472
|
-
|
|
6235
|
+
const domainPrefix = "https://www.example.com/";
|
|
6236
|
+
const baseProps = {
|
|
6237
|
+
copyTextViewProps: {
|
|
6238
|
+
copyString,
|
|
6239
|
+
tooltiptext: props.tooltiptext,
|
|
6240
|
+
textAlign: props.textAlign,
|
|
6241
|
+
buttonStyle: props.buttonStyle,
|
|
6242
|
+
backgroundColor: props.backgroundColor,
|
|
6243
|
+
textColor: props.textColor,
|
|
6244
|
+
borderRadius: props.borderRadius,
|
|
6245
|
+
buttonType: props.buttonType,
|
|
6246
|
+
copyButtonLabel: props.copyButtonLabel,
|
|
6247
|
+
borderColor: props.borderColor,
|
|
6248
|
+
open,
|
|
6249
|
+
onClick: () => {
|
|
6250
|
+
navigator.clipboard.writeText(copyString);
|
|
6251
|
+
setOpen(true);
|
|
6252
|
+
setTimeout(() => setOpen(false), props.tooltiplifespan);
|
|
6253
|
+
},
|
|
6473
6254
|
},
|
|
6474
|
-
|
|
6255
|
+
customizeUrl: props.customizeUrl,
|
|
6256
|
+
customizeLinkLabel: props.customizeLinkLabel,
|
|
6257
|
+
saveLabelText: props.saveLabelText,
|
|
6258
|
+
cancelLabelText: props.cancelLabelText,
|
|
6259
|
+
successMessage: props.successMessage,
|
|
6260
|
+
isEditing,
|
|
6261
|
+
editValue,
|
|
6262
|
+
domainPrefix,
|
|
6263
|
+
editsRemaining: 5,
|
|
6264
|
+
maxEdits: 5,
|
|
6265
|
+
limitReached: false,
|
|
6266
|
+
validationError: null,
|
|
6267
|
+
isValidating: false,
|
|
6268
|
+
isSaving: false,
|
|
6269
|
+
showSuccess,
|
|
6270
|
+
characterLimit: 15,
|
|
6271
|
+
charactersRemaining: 15 - editValue.length,
|
|
6272
|
+
editLimitText: props.editLimitText,
|
|
6273
|
+
editLimitReachedText: props.editLimitReachedText,
|
|
6274
|
+
supportLinkText: props.supportLinkText,
|
|
6275
|
+
customizeDisabled: false,
|
|
6276
|
+
customizeDisabledTooltip: (_a = props.customizeDisabledTooltip) !== null && _a !== void 0 ? _a : "Link customization is not available.",
|
|
6277
|
+
onCustomizeClick: () => {
|
|
6278
|
+
setIsEditing(true);
|
|
6279
|
+
setEditValue("");
|
|
6280
|
+
},
|
|
6281
|
+
onEditValueChange: (value) => {
|
|
6282
|
+
setEditValue(value);
|
|
6283
|
+
},
|
|
6284
|
+
onSave: () => {
|
|
6285
|
+
setIsEditing(false);
|
|
6286
|
+
setShowSuccess(true);
|
|
6287
|
+
setTimeout(() => setShowSuccess(false), 3000);
|
|
6288
|
+
},
|
|
6289
|
+
onCancel: () => {
|
|
6290
|
+
setIsEditing(false);
|
|
6291
|
+
setEditValue("");
|
|
6292
|
+
},
|
|
6293
|
+
};
|
|
6294
|
+
return cjs(baseProps, props.demoData || {}, {
|
|
6295
|
+
arrayMerge: (_, a) => a,
|
|
6296
|
+
});
|
|
6475
6297
|
}
|
|
6476
6298
|
|
|
6477
6299
|
const StatContainer = class {
|
|
@@ -6783,7 +6605,7 @@ function useTaxAndCash() {
|
|
|
6783
6605
|
userFormContext.countryCode;
|
|
6784
6606
|
Sn({
|
|
6785
6607
|
namespace: COUNTRIES_QUERY_NAMESPACE,
|
|
6786
|
-
query: GET_COUNTRIES
|
|
6608
|
+
query: GET_COUNTRIES,
|
|
6787
6609
|
skip: !user,
|
|
6788
6610
|
});
|
|
6789
6611
|
const { data: financeNetworkData, refetch } = Sn({
|
|
@@ -6796,7 +6618,7 @@ function useTaxAndCash() {
|
|
|
6796
6618
|
});
|
|
6797
6619
|
const { data: currenciesData } = Sn({
|
|
6798
6620
|
namespace: CURRENCIES_QUERY_NAMESPACE,
|
|
6799
|
-
query: GET_CURRENCIES
|
|
6621
|
+
query: GET_CURRENCIES,
|
|
6800
6622
|
skip: !user,
|
|
6801
6623
|
variables: {
|
|
6802
6624
|
locale,
|
|
@@ -8253,4 +8075,4 @@ function useUserNameDemo(props) {
|
|
|
8253
8075
|
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
8254
8076
|
}
|
|
8255
8077
|
|
|
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,
|
|
8078
|
+
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 };
|