@saasquatch/mint-components 2.1.8-1 → 2.1.8-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/dist/cjs/{ShadowViewAddon-5ce32291.js → ShadowViewAddon-a26deae6.js} +1 -90
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/mint-components.cjs.js +1 -1
  4. package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +54 -381
  5. package/dist/cjs/{sqm-big-stat_46.cjs.entry.js → sqm-big-stat_45.cjs.entry.js} +9 -332
  6. package/dist/cjs/sqm-stencilbook.cjs.entry.js +2 -158
  7. package/dist/collection/collection-manifest.json +0 -1
  8. package/dist/collection/components/sqm-referral-iframe/ReferralIframe.stories.js +1 -0
  9. package/dist/collection/components/sqm-referral-iframe/sqm-referral-iframe-view.js +1 -1
  10. package/dist/collection/components/sqm-referral-iframe/sqm-referral-iframe.js +27 -1
  11. package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +0 -2
  12. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/formDefinitions.js +37 -75
  13. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +13 -688
  14. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +1 -95
  15. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form.js +4 -4
  16. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card.js +2 -2
  17. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +6 -6
  18. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +2 -2
  19. package/dist/esm/{ShadowViewAddon-9d97b5d5.js → ShadowViewAddon-47f1e579.js} +2 -90
  20. package/dist/esm/loader.js +1 -1
  21. package/dist/esm/mint-components.js +1 -1
  22. package/dist/esm/sqm-banking-info-form_10.entry.js +54 -381
  23. package/dist/esm/{sqm-big-stat_46.entry.js → sqm-big-stat_45.entry.js} +14 -336
  24. package/dist/esm/sqm-stencilbook.entry.js +2 -158
  25. package/dist/esm-es5/{ShadowViewAddon-9d97b5d5.js → ShadowViewAddon-47f1e579.js} +1 -1
  26. package/dist/esm-es5/loader.js +1 -1
  27. package/dist/esm-es5/mint-components.js +1 -1
  28. package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
  29. package/dist/esm-es5/sqm-big-stat_45.entry.js +1 -0
  30. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  31. package/dist/mint-components/mint-components.esm.js +1 -1
  32. package/dist/mint-components/p-0614dcbc.entry.js +9 -0
  33. package/dist/mint-components/{p-adc4e263.js → p-217dedde.js} +25 -25
  34. package/dist/mint-components/p-5492dd51.system.entry.js +1 -0
  35. package/dist/mint-components/p-7ee8f2ed.entry.js +273 -0
  36. package/dist/mint-components/p-bf545082.system.entry.js +1 -0
  37. package/dist/mint-components/p-ca098be1.system.js +1 -1
  38. package/dist/mint-components/p-ce050888.system.js +1 -0
  39. package/dist/mint-components/p-d4f332a7.entry.js +106 -0
  40. package/dist/mint-components/p-de343dd0.system.entry.js +1 -0
  41. package/dist/types/components/sqm-referral-iframe/sqm-referral-iframe-view.d.ts +1 -0
  42. package/dist/types/components/sqm-referral-iframe/sqm-referral-iframe.d.ts +5 -0
  43. package/dist/types/components/tax-and-cash/sqm-banking-info-form/formDefinitions.d.ts +0 -2
  44. package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.d.ts +0 -4
  45. package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.d.ts +0 -165
  46. package/dist/types/components.d.ts +10 -378
  47. package/docs/docs.docx +0 -0
  48. package/docs/raisins.json +1 -1
  49. package/grapesjs/grapesjs.js +1 -1
  50. package/package.json +1 -1
  51. package/dist/collection/components/sqm-partner-info-modal/PartnerInfoModal.stories.js +0 -143
  52. package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal-view.js +0 -90
  53. package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal.js +0 -462
  54. package/dist/collection/components/sqm-partner-info-modal/usePartnerInfoModal.js +0 -180
  55. package/dist/esm-es5/sqm-big-stat_46.entry.js +0 -1
  56. package/dist/mint-components/p-0f036907.system.js +0 -1
  57. package/dist/mint-components/p-22e39d2c.entry.js +0 -342
  58. package/dist/mint-components/p-499885aa.entry.js +0 -9
  59. package/dist/mint-components/p-a6621899.system.entry.js +0 -1
  60. package/dist/mint-components/p-b0253f4c.entry.js +0 -108
  61. package/dist/mint-components/p-d93e19e9.system.entry.js +0 -1
  62. package/dist/mint-components/p-e45a9966.system.entry.js +0 -1
  63. package/dist/types/components/sqm-partner-info-modal/PartnerInfoModal.stories.d.ts +0 -13
  64. package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal-view.d.ts +0 -41
  65. package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal.d.ts +0 -80
  66. package/dist/types/components/sqm-partner-info-modal/usePartnerInfoModal.d.ts +0 -16
@@ -27,7 +27,7 @@ const useInstantAccessRegistration = require('./useInstantAccessRegistration-239
27
27
  const useLeadFormState = require('./useLeadFormState-b4c2ab5b.js');
28
28
  const utilities = require('./utilities-fcdb9504.js');
29
29
  const ErrorView = require('./ErrorView-ee7b0f36.js');
30
- const ShadowViewAddon = require('./ShadowViewAddon-5ce32291.js');
30
+ const ShadowViewAddon = require('./ShadowViewAddon-a26deae6.js');
31
31
  require('./sqm-portal-container-view-70a47420.js');
32
32
  const data = require('./data-8c8a08f6.js');
33
33
  const extractProps = require('./extractProps-e9c55ba8.js');
@@ -2837,333 +2837,6 @@ function useNavigationMenuDemo(props) {
2837
2837
  }
2838
2838
  NavigationMenu.style = sqmNavigationMenuCss;
2839
2839
 
2840
- const GET_USER_PARTNER_INFO = index_module.dist.gql `
2841
- query getUserPartnerInfo {
2842
- user: viewer {
2843
- ... on User {
2844
- id
2845
- firstName
2846
- lastName
2847
- email
2848
- countryCode
2849
- customFields
2850
- impactConnection {
2851
- connected
2852
- publisher {
2853
- countryCode
2854
- currency
2855
- }
2856
- }
2857
- }
2858
- }
2859
- }
2860
- `;
2861
- const GET_COUNTRIES = index_module.dist.gql `
2862
- query getCountries {
2863
- impactPayoutCountries(limit: 1000) {
2864
- data {
2865
- countryCode
2866
- displayName
2867
- }
2868
- }
2869
- }
2870
- `;
2871
- const GET_CURRENCIES = index_module.dist.gql `
2872
- query currencies($locale: RSLocale) {
2873
- currencies(limit: 300) {
2874
- data {
2875
- displayName(locale: $locale)
2876
- currencyCode
2877
- }
2878
- }
2879
- }
2880
- `;
2881
- const CONNECT_PARTNER = index_module.dist.gql `
2882
- mutation createImpactConnection($vars: ImpactConnectionInput!) {
2883
- createImpactConnection(impactConnectionInput: $vars) {
2884
- success
2885
- validationErrors {
2886
- field
2887
- message
2888
- }
2889
- user {
2890
- id
2891
- accountId
2892
- impactConnection {
2893
- connected
2894
- publisher {
2895
- brandedSignup
2896
- requiredTaxDocumentType
2897
- currentTaxDocument {
2898
- type
2899
- status
2900
- }
2901
- }
2902
- }
2903
- }
2904
- }
2905
- }
2906
- `;
2907
- const GET_BRAND_NAME = index_module.dist.gql `
2908
- query getTenantSettings {
2909
- tenantSettings {
2910
- companyName
2911
- }
2912
- }
2913
- `;
2914
- function usePartnerInfoModal(props) {
2915
- var _a, _b, _c, _d;
2916
- const user = index_module.J();
2917
- const locale = index_module.L();
2918
- const { data: userData, loading: userLoading, refetch, } = index_module.wn(GET_USER_PARTNER_INFO, {}, !(user === null || user === void 0 ? void 0 : user.jwt));
2919
- const { data: currenciesData } = index_module.wn(GET_CURRENCIES, { variables: { locale } }, !(user === null || user === void 0 ? void 0 : user.jwt));
2920
- const { data: countriesData } = index_module.wn(GET_COUNTRIES, {}, !(user === null || user === void 0 ? void 0 : user.jwt));
2921
- const { data: tenantSettingsData } = index_module.wn(GET_BRAND_NAME, {});
2922
- const [connectImpactPartner, { loading: connectLoading, errors: connectErrors },] = index_module.$e(CONNECT_PARTNER);
2923
- const [countryCode, setCountryCode] = domContextHooks_module.useState("");
2924
- const [currency, setCurrency] = domContextHooks_module.useState("");
2925
- const [error, setError] = domContextHooks_module.useState("");
2926
- const [success, setSuccess] = domContextHooks_module.useState(false);
2927
- console.log(user, "user identity in create partner modal"); // TEMP
2928
- console.log(userData, "user data from partner info query"); // TEMP
2929
- const impactConnection = (_a = userData === null || userData === void 0 ? void 0 : userData.user) === null || _a === void 0 ? void 0 : _a.impactConnection;
2930
- function onCountryChange(e) {
2931
- var _a, _b;
2932
- const value = (_b = (_a = e.detail) === null || _a === void 0 ? void 0 : _a.item) === null || _b === void 0 ? void 0 : _b.__value;
2933
- if (!value)
2934
- return;
2935
- setCountryCode(value);
2936
- setCurrency("");
2937
- setError("");
2938
- }
2939
- function onCurrencyChange(e) {
2940
- var _a, _b;
2941
- const value = (_b = (_a = e.detail) === null || _a === void 0 ? void 0 : _a.item) === null || _b === void 0 ? void 0 : _b.__value;
2942
- if (!value)
2943
- return;
2944
- setCurrency(value);
2945
- setError("");
2946
- }
2947
- async function onSubmit() {
2948
- var _a, _b;
2949
- if (!countryCode || !currency) {
2950
- setError(props.missingFieldsErrorText);
2951
- return;
2952
- }
2953
- setError("");
2954
- // AL TODO: How to create impact connection if we dont have address, postalCode, and city?
2955
- try {
2956
- const vars = {
2957
- user: {
2958
- id: user.id,
2959
- accountId: user.accountId,
2960
- },
2961
- firstName: userData.user.firstName,
2962
- lastName: userData.user.lastName,
2963
- countryCode,
2964
- currency,
2965
- };
2966
- const result = await connectImpactPartner({ vars });
2967
- if (!result || ((_a = result) === null || _a === void 0 ? void 0 : _a.message)) {
2968
- setError(props.networkErrorText);
2969
- return;
2970
- }
2971
- const connectionResult = result
2972
- .createImpactConnection;
2973
- console.log(result, connectionResult, "result and connectionResult from creating partner from modal");
2974
- if (!(connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.success)) {
2975
- const validationMsg = (_b = connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.validationErrors) === null || _b === void 0 ? void 0 : _b.map((e) => e.message).join(". ");
2976
- setError(validationMsg || props.networkErrorText);
2977
- console.error("Failed to create Impact connection:", connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.validationErrors);
2978
- return;
2979
- }
2980
- // Success
2981
- window.dispatchEvent(new Event(usePayoutStatus.TAX_FORM_UPDATED_EVENT_KEY));
2982
- await refetch();
2983
- setSuccess(true);
2984
- }
2985
- catch (e) {
2986
- console.error("Partner creation error:", e);
2987
- setError(props.networkErrorText);
2988
- }
2989
- }
2990
- const shouldShow = !success && !userLoading && !(impactConnection === null || impactConnection === void 0 ? void 0 : impactConnection.connected);
2991
- return {
2992
- states: {
2993
- open: shouldShow,
2994
- loading: userLoading,
2995
- submitting: connectLoading,
2996
- isExistingPartner: !!(impactConnection === null || impactConnection === void 0 ? void 0 : impactConnection.connected),
2997
- countryCode,
2998
- currency,
2999
- error,
3000
- success,
3001
- brandName: ((_b = tenantSettingsData === null || tenantSettingsData === void 0 ? void 0 : tenantSettingsData.tenantSettings) === null || _b === void 0 ? void 0 : _b.companyName) || "",
3002
- filteredCountries: ((_c = countriesData === null || countriesData === void 0 ? void 0 : countriesData.impactPayoutCountries) === null || _c === void 0 ? void 0 : _c.data) || [],
3003
- filteredCurrencies: ((_d = currenciesData === null || currenciesData === void 0 ? void 0 : currenciesData.currencies) === null || _d === void 0 ? void 0 : _d.data) || [],
3004
- },
3005
- callbacks: {
3006
- onCountryChange,
3007
- onCurrencyChange,
3008
- onCountrySearch: () => { },
3009
- onCurrencySearch: () => { },
3010
- onSubmit,
3011
- onClose: () => setSuccess(true),
3012
- },
3013
- text: props.getTextProps(),
3014
- };
3015
- }
3016
-
3017
- const PartnerInfoModal = class {
3018
- constructor(hostRef) {
3019
- index.registerInstance(this, hostRef);
3020
- /**
3021
- * Brand name shown in the modal header
3022
- *
3023
- * @uiName Brand name
3024
- */
3025
- this.brandName = "";
3026
- /**
3027
- * Header text when user has no existing partner
3028
- *
3029
- * @uiName New partner header
3030
- * @uiWidget textArea
3031
- */
3032
- this.modalBrandHeader = "Welcome to {brandName} Program!";
3033
- /**
3034
- * Description for new partner setup
3035
- *
3036
- * @uiName New partner description
3037
- * @uiWidget textArea
3038
- */
3039
- this.descriptionNewPartner = "We just need a bit more information about you before you start earning cash!";
3040
- /**
3041
- * Description for existing partner confirmation
3042
- *
3043
- * @uiName Existing partner description
3044
- * @uiWidget textArea
3045
- */
3046
- this.descriptionExistingPartner = "We noticed you are already an Impact.com partner, please confirm your information.";
3047
- /**
3048
- * @uiName Country label
3049
- */
3050
- this.countryLabel = "Country";
3051
- /**
3052
- * @uiName Currency label
3053
- */
3054
- this.currencyLabel = "Currency";
3055
- /**
3056
- * @uiName Submit button label
3057
- */
3058
- this.submitButtonLabel = "Submit";
3059
- /**
3060
- * @uiName Confirm button label
3061
- */
3062
- this.confirmButtonLabel = "Confirm";
3063
- /**
3064
- * @uiName Search country placeholder
3065
- */
3066
- this.searchCountryPlaceholder = "Search for a country";
3067
- /**
3068
- * @uiName Search currency placeholder
3069
- */
3070
- this.searchCurrencyPlaceholder = "Search for a currency";
3071
- /**
3072
- * @uiName Network error text
3073
- * @uiWidget textArea
3074
- */
3075
- this.networkErrorText = "An error occurred. Please try again.";
3076
- /**
3077
- * @uiName Missing fields error text
3078
- * @uiWidget textArea
3079
- */
3080
- this.missingFieldsErrorText = "Please select both a country and currency.";
3081
- domContextHooks_module.h$1(this);
3082
- }
3083
- disconnectedCallback() { }
3084
- getTextProps() {
3085
- return utils.getProps(this);
3086
- }
3087
- render() {
3088
- // AL: TODO add usePartnerInfoModal
3089
- const props = index_module.isDemo()
3090
- ? useDemoPartnerInfoModal(this)
3091
- : usePartnerInfoModal(this);
3092
- return index.h(ShadowViewAddon.PartnerInfoModalView, Object.assign({}, props));
3093
- }
3094
- };
3095
- function useDemoPartnerInfoModal(props) {
3096
- const [countryCode, setCountryCode] = domContextHooks_module.useState("US");
3097
- const [currency, setCurrency] = domContextHooks_module.useState("");
3098
- const [error, setError] = domContextHooks_module.useState("");
3099
- const demoCountries = [
3100
- { countryCode: "US", displayName: "United States" },
3101
- { countryCode: "CA", displayName: "Canada" },
3102
- { countryCode: "GB", displayName: "United Kingdom" },
3103
- { countryCode: "AU", displayName: "Australia" },
3104
- { countryCode: "DE", displayName: "Germany" },
3105
- ];
3106
- const demoCurrencies = [
3107
- { currencyCode: "USD", displayName: "US Dollar" },
3108
- { currencyCode: "CAD", displayName: "Canadian Dollar" },
3109
- { currencyCode: "GBP", displayName: "British Pound" },
3110
- { currencyCode: "EUR", displayName: "Euro" },
3111
- { currencyCode: "AUD", displayName: "Australian Dollar" },
3112
- ];
3113
- return cjs.cjs({
3114
- states: {
3115
- brandName: "Test Brand",
3116
- open: true,
3117
- loading: false,
3118
- submitting: false,
3119
- isExistingPartner: false,
3120
- countryCode,
3121
- currency,
3122
- error,
3123
- success: false,
3124
- filteredCountries: demoCountries,
3125
- filteredCurrencies: demoCurrencies,
3126
- },
3127
- callbacks: {
3128
- onCountryChange: (e) => {
3129
- var _a, _b;
3130
- 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;
3131
- if (value) {
3132
- setCountryCode(value);
3133
- setCurrency("");
3134
- }
3135
- },
3136
- onCurrencyChange: (e) => {
3137
- var _a, _b;
3138
- 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;
3139
- if (value)
3140
- setCurrency(value);
3141
- },
3142
- onCountrySearch: () => { },
3143
- onCurrencySearch: () => { },
3144
- onSubmit: () => {
3145
- if (!countryCode || !currency) {
3146
- setError(props.missingFieldsErrorText);
3147
- return;
3148
- }
3149
- setError("");
3150
- },
3151
- onClose: () => { },
3152
- },
3153
- text: {
3154
- modalBrandHeader: props.modalBrandHeader,
3155
- descriptionNewPartner: props.descriptionNewPartner,
3156
- descriptionExistingPartner: props.descriptionExistingPartner,
3157
- countryLabel: props.countryLabel,
3158
- currencyLabel: props.currencyLabel,
3159
- submitButtonLabel: props.submitButtonLabel,
3160
- confirmButtonLabel: props.confirmButtonLabel,
3161
- searchCountryPlaceholder: props.searchCountryPlaceholder,
3162
- searchCurrencyPlaceholder: props.searchCurrencyPlaceholder,
3163
- },
3164
- }, props.demoData || {}, { arrayMerge: (_, a) => a });
3165
- }
3166
-
3167
2840
  const style$1 = {
3168
2841
  Wrapper: {
3169
2842
  maxWidth: "200px",
@@ -4947,6 +4620,11 @@ const SqmReferralIframe = class {
4947
4620
  * @uiName IFrame width
4948
4621
  */
4949
4622
  this.iframeWidth = "100%";
4623
+ /**
4624
+ * Override the default parameter name used in the iframe
4625
+ * @uiName Referral code parameter name
4626
+ */
4627
+ this.codeParam = "rsCode";
4950
4628
  domContextHooks_module.h$1(this);
4951
4629
  }
4952
4630
  disconnectedCallback() { }
@@ -7045,7 +6723,7 @@ const TaxAndCashMonolith = class {
7045
6723
  * @uiName Indirect tax number field label
7046
6724
  * @uiGroup Step 2 Properties
7047
6725
  */
7048
- this.step2_indirectTaxNumber = "{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}}";
6726
+ 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}}";
7049
6727
  /**
7050
6728
  * @uiName Province field label
7051
6729
  * @uiGroup Step 2 Properties
@@ -7055,7 +6733,7 @@ const TaxAndCashMonolith = class {
7055
6733
  * @uiName Missing indirect tax number error message
7056
6734
  * @uiGroup Step 2 Properties
7057
6735
  */
7058
- 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";
6736
+ 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";
7059
6737
  /**
7060
6738
  * Displayed to participants registered for QST.
7061
6739
  * @uiName QST number field label
@@ -7623,7 +7301,7 @@ const TaxAndCashMonolith = class {
7623
7301
  * @uiName Payout status badge
7624
7302
  * @uiGroup Dashboard Properties
7625
7303
  */
7626
- this.dashboard_statusBadgeText = "{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout} }";
7304
+ this.dashboard_statusBadgeText = "{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout} other {Failed} }";
7627
7305
  /**
7628
7306
  * Display participants' payout preference on the payout information card, indicating the balance at which they want to get paid.
7629
7307
  * @uiName Payout schedule by threshold text
@@ -8278,7 +7956,6 @@ exports.sqm_link_button = LinkButton;
8278
7956
  exports.sqm_marketing_emails_checkbox = MarketingEmailsCheckbox;
8279
7957
  exports.sqm_name_fields = NameFields;
8280
7958
  exports.sqm_navigation_menu = NavigationMenu;
8281
- exports.sqm_partner_info_modal = PartnerInfoModal;
8282
7959
  exports.sqm_payout_button_scroll = PayoutButtonScroll;
8283
7960
  exports.sqm_payout_status_alert = PayoutStatusAlert;
8284
7961
  exports.sqm_portal_change_marketing = PortalChangeMarketing;
@@ -33,7 +33,7 @@ require('./utilities-fcdb9504.js');
33
33
  const sqmPortalResetPasswordView = require('./sqm-portal-reset-password-view-6b1acd90.js');
34
34
  require('./ErrorView-ee7b0f36.js');
35
35
  const sqmQrCodeView = require('./sqm-qr-code-view-1f2daa76.js');
36
- const ShadowViewAddon = require('./ShadowViewAddon-5ce32291.js');
36
+ const ShadowViewAddon = require('./ShadowViewAddon-a26deae6.js');
37
37
  const sqmPortalContainerView = require('./sqm-portal-container-view-70a47420.js');
38
38
  const sqmUserInfoFormView = require('./sqm-user-info-form-view-53306f6e.js');
39
39
  const data = require('./data-8c8a08f6.js');
@@ -10704,6 +10704,7 @@ const props$1 = {
10704
10704
  iframeSrc: "https://example.com",
10705
10705
  iframeHeight: "100%",
10706
10706
  iframeWidth: "100%",
10707
+ codeParam: "rsCode",
10707
10708
  },
10708
10709
  },
10709
10710
  };
@@ -18700,162 +18701,6 @@ const UserInfoFormView = /*#__PURE__*/Object.freeze({
18700
18701
  DisabledForm: DisabledForm
18701
18702
  });
18702
18703
 
18703
- const PartnerInfoModal_stories = {
18704
- title: "Components/Partner Info Modal",
18705
- };
18706
- const demoCountries = [
18707
- { countryCode: "US", displayName: "United States" },
18708
- { countryCode: "CA", displayName: "Canada" },
18709
- { countryCode: "GB", displayName: "United Kingdom" },
18710
- { countryCode: "AU", displayName: "Australia" },
18711
- { countryCode: "DE", displayName: "Germany" },
18712
- { countryCode: "FR", displayName: "France" },
18713
- { countryCode: "JP", displayName: "Japan" },
18714
- ];
18715
- const demoCurrencies = [
18716
- { currencyCode: "USD", displayName: "US Dollar" },
18717
- { currencyCode: "CAD", displayName: "Canadian Dollar" },
18718
- { currencyCode: "GBP", displayName: "British Pound" },
18719
- { currencyCode: "EUR", displayName: "Euro" },
18720
- { currencyCode: "AUD", displayName: "Australian Dollar" },
18721
- ];
18722
- const noopCallbacks = {
18723
- onCountryChange: (e) => console.log("Country changed:", e),
18724
- onCurrencyChange: (e) => console.log("Currency changed:", e),
18725
- onCountrySearch: (v) => console.log("Country search:", v),
18726
- onCurrencySearch: (v) => console.log("Currency search:", v),
18727
- onSubmit: () => console.log("Submit"),
18728
- onClose: () => console.log("Close"),
18729
- };
18730
- const defaultText$1 = {
18731
- modalBrandHeader: "Welcome to {brandName} Program!",
18732
- descriptionNewPartner: "We just need a bit more information about you before you start earning cash!",
18733
- descriptionExistingPartner: "We noticed you are already an Impact.com partner, please confirm your information.",
18734
- countryLabel: "Country",
18735
- currencyLabel: "Currency",
18736
- submitButtonLabel: "Submit",
18737
- confirmButtonLabel: "Confirm",
18738
- searchCountryPlaceholder: "Search for a country",
18739
- searchCurrencyPlaceholder: "Search for a currency",
18740
- };
18741
- const defaultProps$y = {
18742
- states: {
18743
- open: true,
18744
- loading: false,
18745
- submitting: false,
18746
- isExistingPartner: false,
18747
- countryCode: "",
18748
- currency: "",
18749
- error: "",
18750
- success: false,
18751
- brandName: "Test Brand",
18752
- filteredCountries: demoCountries,
18753
- filteredCurrencies: demoCurrencies,
18754
- },
18755
- callbacks: noopCallbacks,
18756
- text: defaultText$1,
18757
- };
18758
- const NewPartnerEmpty = () => {
18759
- return index.h(ShadowViewAddon.PartnerInfoModalView, Object.assign({}, defaultProps$y));
18760
- };
18761
- const NewPartnerPrefilled = () => {
18762
- const props = {
18763
- ...defaultProps$y,
18764
- states: {
18765
- ...defaultProps$y.states,
18766
- countryCode: "US",
18767
- currency: "",
18768
- },
18769
- };
18770
- return index.h(ShadowViewAddon.PartnerInfoModalView, Object.assign({}, props));
18771
- };
18772
- const NewPartnerFullySelected = () => {
18773
- const props = {
18774
- ...defaultProps$y,
18775
- states: {
18776
- ...defaultProps$y.states,
18777
- countryCode: "US",
18778
- currency: "USD",
18779
- },
18780
- };
18781
- return index.h(ShadowViewAddon.PartnerInfoModalView, Object.assign({}, props));
18782
- };
18783
- const ExistingPartnerConfirm = () => {
18784
- const props = {
18785
- ...defaultProps$y,
18786
- states: {
18787
- ...defaultProps$y.states,
18788
- isExistingPartner: true,
18789
- countryCode: "CA",
18790
- currency: "CAD",
18791
- },
18792
- };
18793
- return index.h(ShadowViewAddon.PartnerInfoModalView, Object.assign({}, props));
18794
- };
18795
- const Submitting = () => {
18796
- const props = {
18797
- ...defaultProps$y,
18798
- states: {
18799
- ...defaultProps$y.states,
18800
- countryCode: "GB",
18801
- currency: "GBP",
18802
- submitting: true,
18803
- },
18804
- };
18805
- return index.h(ShadowViewAddon.PartnerInfoModalView, Object.assign({}, props));
18806
- };
18807
- const WithError$3 = () => {
18808
- const props = {
18809
- ...defaultProps$y,
18810
- states: {
18811
- ...defaultProps$y.states,
18812
- countryCode: "US",
18813
- currency: "USD",
18814
- error: "An error occurred while creating your partner account. Please try again.",
18815
- },
18816
- };
18817
- return index.h(ShadowViewAddon.PartnerInfoModalView, Object.assign({}, props));
18818
- };
18819
- const ValidationError$1 = () => {
18820
- const props = {
18821
- ...defaultProps$y,
18822
- states: {
18823
- ...defaultProps$y.states,
18824
- countryCode: "",
18825
- currency: "",
18826
- error: "Please select both a country and currency.",
18827
- },
18828
- };
18829
- return index.h(ShadowViewAddon.PartnerInfoModalView, Object.assign({}, props));
18830
- };
18831
- const Closed = () => {
18832
- const props = {
18833
- ...defaultProps$y,
18834
- states: {
18835
- ...defaultProps$y.states,
18836
- open: false,
18837
- },
18838
- };
18839
- return index.h(ShadowViewAddon.PartnerInfoModalView, Object.assign({}, props));
18840
- };
18841
- const FullStackDemo = () => {
18842
- return (index.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" }));
18843
- };
18844
-
18845
- const PartnerInfoModal = /*#__PURE__*/Object.freeze({
18846
- __proto__: null,
18847
- 'default': PartnerInfoModal_stories,
18848
- NewPartnerEmpty: NewPartnerEmpty,
18849
- NewPartnerPrefilled: NewPartnerPrefilled,
18850
- NewPartnerFullySelected: NewPartnerFullySelected,
18851
- ExistingPartnerConfirm: ExistingPartnerConfirm,
18852
- Submitting: Submitting,
18853
- WithError: WithError$3,
18854
- ValidationError: ValidationError$1,
18855
- Closed: Closed,
18856
- FullStackDemo: FullStackDemo
18857
- });
18858
-
18859
18704
  function deepFreeze(obj) {
18860
18705
  if (obj instanceof Map) {
18861
18706
  obj.clear = obj.delete = obj.set = function () {
@@ -21549,7 +21394,6 @@ const stories = [
21549
21394
  TaxAndCashRewardsTable,
21550
21395
  TaxAndCashReferralTableRewardsCell,
21551
21396
  TaxAndCashReferralTable$1,
21552
- PartnerInfoModal,
21553
21397
  ];
21554
21398
  const StencilStorybook = class {
21555
21399
  constructor(hostRef) {
@@ -54,7 +54,6 @@
54
54
  "./components/sqm-navigation-menu/sqm-navigation-menu.js",
55
55
  "./components/sqm-navigation-sidebar/sqm-navigation-sidebar.js",
56
56
  "./components/sqm-navigation-sidebar-item/sqm-navigation-sidebar-item.js",
57
- "./components/sqm-partner-info-modal/sqm-partner-info-modal.js",
58
57
  "./components/sqm-payout-button-scroll/sqm-payout-button-scroll.js",
59
58
  "./components/sqm-popup-container/sqm-popup-container.js",
60
59
  "./components/sqm-portal-change-marketing/sqm-portal-change-marketing.js",
@@ -16,6 +16,7 @@ const props = {
16
16
  iframeSrc: "https://example.com",
17
17
  iframeHeight: "100%",
18
18
  iframeWidth: "100%",
19
+ codeParam: "rsCode",
19
20
  },
20
21
  },
21
22
  };
@@ -25,5 +25,5 @@ export function ReferralIframeView(props) {
25
25
  const styleString = sheet.toString();
26
26
  return (h("div", { class: sheet.classes.Container },
27
27
  h("style", { type: "text/css" }, styleString),
28
- h("iframe", { class: sheet.classes.IFrame, src: `${content.iframeSrc}?rsCode=${data.shareCode}` })));
28
+ h("iframe", { class: sheet.classes.IFrame, src: `${content.iframeSrc}?${encodeURIComponent(content.codeParam)}=${data.shareCode}` })));
29
29
  }
@@ -22,6 +22,11 @@ export class SqmReferralIframe {
22
22
  * @uiName IFrame width
23
23
  */
24
24
  this.iframeWidth = "100%";
25
+ /**
26
+ * Override the default parameter name used in the iframe
27
+ * @uiName Referral code parameter name
28
+ */
29
+ this.codeParam = "rsCode";
25
30
  withHooks(this);
26
31
  }
27
32
  disconnectedCallback() { }
@@ -108,12 +113,33 @@ export class SqmReferralIframe {
108
113
  "reflect": false,
109
114
  "defaultValue": "\"100%\""
110
115
  },
116
+ "codeParam": {
117
+ "type": "string",
118
+ "mutable": false,
119
+ "complexType": {
120
+ "original": "string",
121
+ "resolved": "string",
122
+ "references": {}
123
+ },
124
+ "required": false,
125
+ "optional": false,
126
+ "docs": {
127
+ "tags": [{
128
+ "text": "Referral code parameter name",
129
+ "name": "uiName"
130
+ }],
131
+ "text": "Override the default parameter name used in the iframe"
132
+ },
133
+ "attribute": "code-param",
134
+ "reflect": false,
135
+ "defaultValue": "\"rsCode\""
136
+ },
111
137
  "demoData": {
112
138
  "type": "unknown",
113
139
  "mutable": false,
114
140
  "complexType": {
115
141
  "original": "DemoData<ReferralIframeViewProps>",
116
- "resolved": "{ states?: { content: { iframeSrc: string; iframeHeight: string; iframeWidth: string; }; }; data?: { shareCode: string; }; }",
142
+ "resolved": "{ states?: { content: { iframeSrc: string; iframeHeight: string; iframeWidth: string; codeParam: string; }; }; data?: { shareCode: string; }; }",
117
143
  "references": {
118
144
  "DemoData": {
119
145
  "location": "import",
@@ -107,7 +107,6 @@ import * as LeadFormDropdownField from "../sqm-lead-form/LeadFormDropdownField.s
107
107
  import * as LeadCheckboxField from "../sqm-lead-form/LeadCheckboxField.stories";
108
108
  import * as Skeleton from "../sqm-skeleton/Skeleton.stories";
109
109
  import * as UserInfoFormView from "../tax-and-cash/sqm-user-info-form/UserInfoFormView.stories";
110
- import * as PartnerInfoModal from "../sqm-partner-info-modal/PartnerInfoModal.stories";
111
110
  import { ShadowViewAddon } from "../../ShadowViewAddon";
112
111
  import { CucumberAddon } from "./CucumberAddon";
113
112
  import { HookStoryAddon } from "./HookStoryAddon";
@@ -219,7 +218,6 @@ const stories = [
219
218
  TaxAndCashRewardsTable,
220
219
  TaxAndCashReferralTableRewardsCell,
221
220
  TaxAndCashReferralTable,
222
- PartnerInfoModal,
223
221
  ];
224
222
  /**
225
223
  * For internal documentation