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

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 (67) hide show
  1. package/dist/cjs/{ShadowViewAddon-5ce32291.js → ShadowViewAddon-19755faf.js} +384 -98
  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 +50 -377
  5. package/dist/cjs/{sqm-big-stat_46.cjs.entry.js → sqm-big-stat_45.cjs.entry.js} +172 -351
  6. package/dist/cjs/sqm-stencilbook.cjs.entry.js +168 -175
  7. package/dist/collection/collection-manifest.json +0 -1
  8. package/dist/collection/components/sqm-share-code/sqm-share-code.js +0 -1
  9. package/dist/collection/components/sqm-share-link/ShareLink.stories.js +142 -11
  10. package/dist/collection/components/sqm-share-link/UseShareLink.stories.js +14 -5
  11. package/dist/collection/components/sqm-share-link/sqm-share-link-view.js +173 -0
  12. package/dist/collection/components/sqm-share-link/sqm-share-link.js +536 -26
  13. package/dist/collection/components/sqm-share-link/useShareLink.js +210 -6
  14. package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +0 -2
  15. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/formDefinitions.js +37 -75
  16. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +13 -688
  17. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +1 -95
  18. package/dist/esm/{ShadowViewAddon-9d97b5d5.js → ShadowViewAddon-23d56d60.js} +386 -100
  19. package/dist/esm/loader.js +1 -1
  20. package/dist/esm/mint-components.js +1 -1
  21. package/dist/esm/sqm-banking-info-form_10.entry.js +50 -377
  22. package/dist/esm/{sqm-big-stat_46.entry.js → sqm-big-stat_45.entry.js} +177 -355
  23. package/dist/esm/sqm-stencilbook.entry.js +168 -175
  24. package/dist/esm-es5/ShadowViewAddon-23d56d60.js +1 -0
  25. package/dist/esm-es5/loader.js +1 -1
  26. package/dist/esm-es5/mint-components.js +1 -1
  27. package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
  28. package/dist/esm-es5/sqm-big-stat_45.entry.js +1 -0
  29. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  30. package/dist/mint-components/mint-components.esm.js +1 -1
  31. package/dist/mint-components/p-182b5b6a.js +503 -0
  32. package/dist/mint-components/{p-22e39d2c.entry.js → p-27ec70af.entry.js} +21 -90
  33. package/dist/mint-components/{p-499885aa.entry.js → p-47b630aa.entry.js} +2 -2
  34. package/dist/mint-components/p-644fca99.system.js +1 -0
  35. package/dist/mint-components/p-af8c2202.system.entry.js +1 -0
  36. package/dist/mint-components/p-ca098be1.system.js +1 -1
  37. package/dist/mint-components/p-cacb897d.system.entry.js +1 -0
  38. package/dist/mint-components/{p-a6621899.system.entry.js → p-ebe1eb7a.system.entry.js} +1 -1
  39. package/dist/mint-components/p-ff378015.entry.js +106 -0
  40. package/dist/types/components/sqm-share-link/ShareLink.stories.d.ts +10 -0
  41. package/dist/types/components/sqm-share-link/UseShareLink.stories.d.ts +6 -0
  42. package/dist/types/components/sqm-share-link/sqm-share-link-view.d.ts +37 -0
  43. package/dist/types/components/sqm-share-link/sqm-share-link.d.ts +107 -2
  44. package/dist/types/components/sqm-share-link/useShareLink.d.ts +27 -4
  45. package/dist/types/components/tax-and-cash/sqm-banking-info-form/formDefinitions.d.ts +0 -2
  46. package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.d.ts +0 -4
  47. package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.d.ts +0 -165
  48. package/dist/types/components.d.ts +183 -380
  49. package/docs/docs.docx +0 -0
  50. package/docs/raisins.json +1 -1
  51. package/grapesjs/grapesjs.js +1 -1
  52. package/package.json +1 -1
  53. package/dist/collection/components/sqm-partner-info-modal/PartnerInfoModal.stories.js +0 -143
  54. package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal-view.js +0 -90
  55. package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal.js +0 -462
  56. package/dist/collection/components/sqm-partner-info-modal/usePartnerInfoModal.js +0 -180
  57. package/dist/esm-es5/ShadowViewAddon-9d97b5d5.js +0 -1
  58. package/dist/esm-es5/sqm-big-stat_46.entry.js +0 -1
  59. package/dist/mint-components/p-0f036907.system.js +0 -1
  60. package/dist/mint-components/p-adc4e263.js +0 -463
  61. package/dist/mint-components/p-b0253f4c.entry.js +0 -108
  62. package/dist/mint-components/p-d93e19e9.system.entry.js +0 -1
  63. package/dist/mint-components/p-e45a9966.system.entry.js +0 -1
  64. package/dist/types/components/sqm-partner-info-modal/PartnerInfoModal.stories.d.ts +0 -13
  65. package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal-view.d.ts +0 -41
  66. package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal.d.ts +0 -80
  67. 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-19755faf.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",
@@ -6381,7 +6054,6 @@ function useDemoShareCode(props) {
6381
6054
  borderRadius: props.borderRadius,
6382
6055
  borderColor: props.borderColor,
6383
6056
  buttonType: props.buttonType,
6384
- rewardStatus: "AVAILABLE",
6385
6057
  open,
6386
6058
  onClick: () => {
6387
6059
  // Should well supported: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard#browser_compatibility
@@ -6441,6 +6113,111 @@ const ShareLink = class {
6441
6113
  * @uiGroup Style
6442
6114
  */
6443
6115
  this.buttonStyle = "icon";
6116
+ /**
6117
+ * Enable users to customize their referral link
6118
+ *
6119
+ * @uiName Customize URL
6120
+ * @uiType boolean
6121
+ */
6122
+ this.customizeUrl = false;
6123
+ /**
6124
+ * Text shown below the share link input to trigger customization
6125
+ *
6126
+ * @uiName Customize link label
6127
+ * @uiType string
6128
+ */
6129
+ this.customizeLinkLabel = "Customize Link";
6130
+ /**
6131
+ * Text for the save button in editing mode
6132
+ *
6133
+ * @uiName Save button label
6134
+ * @uiType string
6135
+ */
6136
+ this.saveLabelText = "Save";
6137
+ /**
6138
+ * Text for the cancel button in editing mode
6139
+ *
6140
+ * @uiName Cancel button label
6141
+ * @uiType string
6142
+ */
6143
+ this.cancelLabelText = "Cancel";
6144
+ /**
6145
+ * Message shown briefly after successfully saving a custom link
6146
+ *
6147
+ * @uiName Success message
6148
+ * @uiType string
6149
+ */
6150
+ this.successMessage = "Link updated successfully";
6151
+ /**
6152
+ * Title text shown when the custom link is already taken
6153
+ *
6154
+ * @uiName Existing code conflict error title
6155
+ * @uiType string
6156
+ */
6157
+ this.existingCodeConflictErrorTitle = "This link is already taken";
6158
+ /**
6159
+ * Description text shown when the custom link is already taken
6160
+ *
6161
+ * @uiName Existing code conflict error description
6162
+ * @uiType string
6163
+ */
6164
+ this.existingCodeConflictErrorDescription = "Try adding numbers, a dash or underscore to create a unique link.";
6165
+ /**
6166
+ * Title text shown when the link contains invalid characters
6167
+ *
6168
+ * @uiName Invalid characters error title
6169
+ * @uiType string
6170
+ */
6171
+ this.invalidCharactersErrorTitle = "Please use only letters, numbers, dashes and underscores";
6172
+ /**
6173
+ * Description text shown when the link contains invalid characters
6174
+ *
6175
+ * @uiName Invalid characters error description
6176
+ * @uiType string
6177
+ */
6178
+ this.invalidCharactersErrorDescription = "Special characters can break the link when sharing.";
6179
+ /**
6180
+ * Title text shown when the link contains profanity
6181
+ *
6182
+ * @uiName Profanity error title
6183
+ * @uiType string
6184
+ */
6185
+ this.profanityErrorTitle = "Please try a different link";
6186
+ /**
6187
+ * Description text shown when the link contains profanity
6188
+ *
6189
+ * @uiName Profanity error description
6190
+ * @uiType string
6191
+ */
6192
+ this.profanityErrorDescription = "This link contains a restricted word.";
6193
+ /**
6194
+ * Text describing the edit limit
6195
+ *
6196
+ * @uiName Edit limit text
6197
+ * @uiType string
6198
+ */
6199
+ this.editLimitText = "You can edit your link up to 5 times.";
6200
+ /**
6201
+ * Message shown when the edit limit has been reached. Use {supportLink} as a placeholder for the support link.
6202
+ *
6203
+ * @uiName Edit limit reached text
6204
+ * @uiType string
6205
+ */
6206
+ this.editLimitReachedText = "5 edit limit reached. To make more changes, please contact {supportLink}.";
6207
+ /**
6208
+ * Display text for the support link in the edit limit reached message
6209
+ *
6210
+ * @uiName Support link text
6211
+ * @uiType string
6212
+ */
6213
+ this.supportLinkText = "Support";
6214
+ /**
6215
+ * Tooltip text shown when link customization is disabled
6216
+ *
6217
+ * @uiName Customize disabled tooltip
6218
+ * @uiType string
6219
+ */
6220
+ this.customizeDisabledTooltip = "Link customization is not available.";
6444
6221
  domContextHooks_module.h$1(this);
6445
6222
  }
6446
6223
  disconnectedCallback() { }
@@ -6449,33 +6226,78 @@ const ShareLink = class {
6449
6226
  const props = index_module.isDemo()
6450
6227
  ? useDemoShareLink(thisProps)
6451
6228
  : ShadowViewAddon.useShareLink(thisProps);
6452
- return index.h(copyTextView.CopyTextView, Object.assign({}, props));
6229
+ return index.h(ShadowViewAddon.ShareLinkView, Object.assign({}, props));
6453
6230
  }
6454
6231
  };
6455
6232
  function useDemoShareLink(props) {
6233
+ var _a;
6456
6234
  const [open, setOpen] = domContextHooks_module.useState(false);
6235
+ const [isEditing, setIsEditing] = domContextHooks_module.useState(false);
6236
+ const [editValue, setEditValue] = domContextHooks_module.useState("");
6237
+ const [showSuccess, setShowSuccess] = domContextHooks_module.useState(false);
6457
6238
  const copyString = "https://www.example.com/sharelink/abc";
6458
- return cjs.cjs({
6459
- copyString: copyString,
6460
- tooltiptext: props.tooltiptext,
6461
- textAlign: props.textAlign,
6462
- buttonStyle: props.buttonStyle,
6463
- backgroundColor: props.backgroundColor,
6464
- textColor: props.textColor,
6465
- borderRadius: props.borderRadius,
6466
- buttonType: props.buttonType,
6467
- copyButtonLabel: props.copyButtonLabel,
6468
- borderColor: props.borderColor,
6469
- rewardStatus: "AVAILABLE",
6470
- open,
6471
- onClick: () => {
6472
- // Should well supported: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard#browser_compatibility
6473
- // Only if called from a user-initiated event
6474
- navigator.clipboard.writeText(copyString);
6475
- setOpen(true);
6476
- setTimeout(() => setOpen(false), props.tooltiplifespan);
6239
+ const domainPrefix = "https://www.example.com/";
6240
+ const baseProps = {
6241
+ copyTextViewProps: {
6242
+ copyString,
6243
+ tooltiptext: props.tooltiptext,
6244
+ textAlign: props.textAlign,
6245
+ buttonStyle: props.buttonStyle,
6246
+ backgroundColor: props.backgroundColor,
6247
+ textColor: props.textColor,
6248
+ borderRadius: props.borderRadius,
6249
+ buttonType: props.buttonType,
6250
+ copyButtonLabel: props.copyButtonLabel,
6251
+ borderColor: props.borderColor,
6252
+ open,
6253
+ onClick: () => {
6254
+ navigator.clipboard.writeText(copyString);
6255
+ setOpen(true);
6256
+ setTimeout(() => setOpen(false), props.tooltiplifespan);
6257
+ },
6477
6258
  },
6478
- }, props.demoData || {}, { arrayMerge: (_, a) => a });
6259
+ customizeUrl: props.customizeUrl,
6260
+ customizeLinkLabel: props.customizeLinkLabel,
6261
+ saveLabelText: props.saveLabelText,
6262
+ cancelLabelText: props.cancelLabelText,
6263
+ successMessage: props.successMessage,
6264
+ isEditing,
6265
+ editValue,
6266
+ domainPrefix,
6267
+ editsRemaining: 5,
6268
+ maxEdits: 5,
6269
+ limitReached: false,
6270
+ validationError: null,
6271
+ isValidating: false,
6272
+ isSaving: false,
6273
+ showSuccess,
6274
+ characterLimit: 15,
6275
+ charactersRemaining: 15 - editValue.length,
6276
+ editLimitText: props.editLimitText,
6277
+ editLimitReachedText: props.editLimitReachedText,
6278
+ supportLinkText: props.supportLinkText,
6279
+ customizeDisabled: false,
6280
+ customizeDisabledTooltip: (_a = props.customizeDisabledTooltip) !== null && _a !== void 0 ? _a : "Link customization is not available.",
6281
+ onCustomizeClick: () => {
6282
+ setIsEditing(true);
6283
+ setEditValue("");
6284
+ },
6285
+ onEditValueChange: (value) => {
6286
+ setEditValue(value);
6287
+ },
6288
+ onSave: () => {
6289
+ setIsEditing(false);
6290
+ setShowSuccess(true);
6291
+ setTimeout(() => setShowSuccess(false), 3000);
6292
+ },
6293
+ onCancel: () => {
6294
+ setIsEditing(false);
6295
+ setEditValue("");
6296
+ },
6297
+ };
6298
+ return cjs.cjs(baseProps, props.demoData || {}, {
6299
+ arrayMerge: (_, a) => a,
6300
+ });
6479
6301
  }
6480
6302
 
6481
6303
  const StatContainer = class {
@@ -8278,7 +8100,6 @@ exports.sqm_link_button = LinkButton;
8278
8100
  exports.sqm_marketing_emails_checkbox = MarketingEmailsCheckbox;
8279
8101
  exports.sqm_name_fields = NameFields;
8280
8102
  exports.sqm_navigation_menu = NavigationMenu;
8281
- exports.sqm_partner_info_modal = PartnerInfoModal;
8282
8103
  exports.sqm_payout_button_scroll = PayoutButtonScroll;
8283
8104
  exports.sqm_payout_status_alert = PayoutStatusAlert;
8284
8105
  exports.sqm_portal_change_marketing = PortalChangeMarketing;