@saasquatch/mint-components 2.1.8-23 → 2.1.8-25
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-00d53485.js → ShadowViewAddon-247ccfa4.js} +45 -14
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mint-components.cjs.js +1 -1
- package/dist/cjs/sqm-big-stat_45.cjs.entry.js +44 -40
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +3 -3
- package/dist/collection/components/sqm-share-link/ShareLink.stories.js +1 -1
- package/dist/collection/components/sqm-share-link/UseShareLink.stories.js +1 -1
- package/dist/collection/components/sqm-share-link/sqm-share-link-view.js +37 -6
- package/dist/collection/components/sqm-share-link/sqm-share-link.js +116 -83
- package/dist/collection/components/sqm-share-link/useShareLink.js +8 -8
- package/dist/esm/{ShadowViewAddon-6bf9d141.js → ShadowViewAddon-e7e73e36.js} +45 -14
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mint-components.js +1 -1
- package/dist/esm/sqm-big-stat_45.entry.js +44 -40
- package/dist/esm/sqm-stencilbook.entry.js +3 -3
- package/dist/esm-es5/{ShadowViewAddon-6bf9d141.js → ShadowViewAddon-e7e73e36.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-big-stat_45.entry.js +1 -1
- 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-6fcc0439.system.js → p-0a02a7a5.system.js} +1 -1
- package/dist/mint-components/{p-2065e74e.entry.js → p-365363b5.entry.js} +2 -2
- package/dist/mint-components/{p-a5bbe968.js → p-3be90659.js} +2 -2
- package/dist/mint-components/{p-1cc59885.system.entry.js → p-4aede05c.system.entry.js} +1 -1
- package/dist/mint-components/p-4b365f1f.system.js +1 -1
- package/dist/mint-components/{p-01962a11.entry.js → p-c7f4a587.entry.js} +2 -2
- package/dist/mint-components/{p-d8e5c04c.system.entry.js → p-f62812ff.system.entry.js} +1 -1
- package/dist/types/components/sqm-share-link/sqm-share-link-view.d.ts +1 -1
- package/dist/types/components/sqm-share-link/sqm-share-link.d.ts +41 -36
- package/dist/types/components/sqm-share-link/useShareLink.d.ts +6 -6
- package/dist/types/components.d.ts +106 -314
- package/dist/types/global/android.d.ts +7 -0
- package/dist/types/global/demo.d.ts +2 -0
- package/dist/types/stories/features.d.ts +4 -0
- package/dist/types/stories/templates.d.ts +4 -0
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +1 -1
|
@@ -27,7 +27,7 @@ const useInstantAccessRegistration = require('./useInstantAccessRegistration-651
|
|
|
27
27
|
const useLeadFormState = require('./useLeadFormState-76d3b511.js');
|
|
28
28
|
const utilities = require('./utilities-096934ea.js');
|
|
29
29
|
const ErrorView = require('./ErrorView-ee7b0f36.js');
|
|
30
|
-
const ShadowViewAddon = require('./ShadowViewAddon-
|
|
30
|
+
const ShadowViewAddon = require('./ShadowViewAddon-247ccfa4.js');
|
|
31
31
|
require('./sqm-portal-container-view-70a47420.js');
|
|
32
32
|
const data = require('./data-e83f8a41.js');
|
|
33
33
|
const extractProps = require('./extractProps-e9c55ba8.js');
|
|
@@ -6114,29 +6114,29 @@ const ShareLink = class {
|
|
|
6114
6114
|
*/
|
|
6115
6115
|
this.buttonStyle = "icon";
|
|
6116
6116
|
/**
|
|
6117
|
-
*
|
|
6117
|
+
* Let advocates customize their share links up to 5 times.
|
|
6118
6118
|
*
|
|
6119
|
-
* @uiName
|
|
6119
|
+
* @uiName Allow customization
|
|
6120
6120
|
* @uiType boolean
|
|
6121
|
-
* @uiGroup
|
|
6121
|
+
* @uiGroup Customizable Vanity Link
|
|
6122
6122
|
* @requiredFlavor impact
|
|
6123
6123
|
*/
|
|
6124
|
-
this.
|
|
6124
|
+
this.allowCustomization = false;
|
|
6125
6125
|
/**
|
|
6126
|
-
*
|
|
6126
|
+
* Displayed below the share link.
|
|
6127
6127
|
*
|
|
6128
|
-
* @uiName Customize link label
|
|
6128
|
+
* @uiName Customize link button label
|
|
6129
6129
|
* @uiType string
|
|
6130
|
-
* @uiGroup
|
|
6130
|
+
* @uiGroup Customizable Vanity Link
|
|
6131
6131
|
* @requiredFlavor impact
|
|
6132
6132
|
*/
|
|
6133
|
-
this.
|
|
6133
|
+
this.customizeLinkButtonLabel = "Customize Link";
|
|
6134
6134
|
/**
|
|
6135
6135
|
* Text for the save button in editing mode
|
|
6136
6136
|
*
|
|
6137
6137
|
* @uiName Save button label
|
|
6138
6138
|
* @uiType string
|
|
6139
|
-
* @uiGroup
|
|
6139
|
+
* @uiGroup Customizable Vanity Link
|
|
6140
6140
|
* @requiredFlavor impact
|
|
6141
6141
|
*/
|
|
6142
6142
|
this.saveLabelText = "Save";
|
|
@@ -6145,79 +6145,83 @@ const ShareLink = class {
|
|
|
6145
6145
|
*
|
|
6146
6146
|
* @uiName Cancel button label
|
|
6147
6147
|
* @uiType string
|
|
6148
|
-
* @uiGroup
|
|
6148
|
+
* @uiGroup Customizable Vanity Link
|
|
6149
6149
|
* @requiredFlavor impact
|
|
6150
6150
|
*/
|
|
6151
6151
|
this.cancelLabelText = "Cancel";
|
|
6152
6152
|
/**
|
|
6153
|
-
* Title
|
|
6153
|
+
* Title of the error message shown when the link has already been taken
|
|
6154
6154
|
*
|
|
6155
|
-
* @uiName
|
|
6155
|
+
* @uiName Link taken error title
|
|
6156
6156
|
* @uiType string
|
|
6157
|
-
* @uiGroup
|
|
6157
|
+
* @uiGroup Customizable Vanity Link
|
|
6158
6158
|
* @requiredFlavor impact
|
|
6159
6159
|
*/
|
|
6160
|
-
this.
|
|
6160
|
+
this.linkTakenErrorTitle = "This link is already taken";
|
|
6161
6161
|
/**
|
|
6162
|
-
* Description text shown when the
|
|
6162
|
+
* Description text shown when the link has already been taken
|
|
6163
6163
|
*
|
|
6164
|
-
* @uiName
|
|
6164
|
+
* @uiName Link taken error message
|
|
6165
6165
|
* @uiType string
|
|
6166
|
-
* @
|
|
6166
|
+
* @uiWidget textarea
|
|
6167
|
+
* @uiGroup Customizable Vanity Link
|
|
6167
6168
|
* @requiredFlavor impact
|
|
6168
6169
|
*/
|
|
6169
|
-
this.
|
|
6170
|
+
this.linkTakenErrorDescription = "Try adding numbers, a dash or underscore to create a unique link.";
|
|
6170
6171
|
/**
|
|
6171
|
-
* Title
|
|
6172
|
+
* Title of the error message shown when the link contains invalid special characters.
|
|
6172
6173
|
*
|
|
6173
6174
|
* @uiName Invalid characters error title
|
|
6174
6175
|
* @uiType string
|
|
6175
|
-
* @uiGroup
|
|
6176
|
+
* @uiGroup Customizable Vanity Link
|
|
6176
6177
|
* @requiredFlavor impact
|
|
6177
6178
|
*/
|
|
6178
6179
|
this.invalidCharactersErrorTitle = "Please use only letters, numbers, dashes and underscores";
|
|
6179
6180
|
/**
|
|
6180
|
-
* Description text shown when the link contains invalid characters
|
|
6181
|
+
* Description text shown when the link contains invalid special characters.
|
|
6181
6182
|
*
|
|
6182
6183
|
* @uiName Invalid characters error description
|
|
6183
6184
|
* @uiType string
|
|
6184
|
-
* @
|
|
6185
|
+
* @uiWidget textarea
|
|
6186
|
+
* @uiGroup Customizable Vanity Link
|
|
6185
6187
|
* @requiredFlavor impact
|
|
6186
6188
|
*/
|
|
6187
6189
|
this.invalidCharactersErrorDescription = "Special characters can break the link when sharing.";
|
|
6188
6190
|
/**
|
|
6189
|
-
* Title
|
|
6191
|
+
* Title of the error message shown when the link contains profanity or brand names.
|
|
6190
6192
|
*
|
|
6191
|
-
* @uiName
|
|
6193
|
+
* @uiName Restricted words error title
|
|
6192
6194
|
* @uiType string
|
|
6193
|
-
* @uiGroup
|
|
6195
|
+
* @uiGroup Customizable Vanity Link
|
|
6194
6196
|
* @requiredFlavor impact
|
|
6195
6197
|
*/
|
|
6196
|
-
this.
|
|
6198
|
+
this.restrictedWordsErrorTitle = "Please try a different link";
|
|
6197
6199
|
/**
|
|
6198
|
-
* Description text shown when the link contains profanity
|
|
6200
|
+
* Description text shown when the link contains profanity or brand names.
|
|
6199
6201
|
*
|
|
6200
|
-
* @uiName
|
|
6202
|
+
* @uiName Restricted words error description
|
|
6201
6203
|
* @uiType string
|
|
6202
|
-
* @
|
|
6204
|
+
* @uiWidget textarea
|
|
6205
|
+
* @uiGroup Customizable Vanity Link
|
|
6203
6206
|
* @requiredFlavor impact
|
|
6204
6207
|
*/
|
|
6205
|
-
this.
|
|
6208
|
+
this.restrictedWordsErrorDescription = "This link contains a restricted word.";
|
|
6206
6209
|
/**
|
|
6207
|
-
*
|
|
6210
|
+
* Subtext shown while the user is customizing their URL.
|
|
6208
6211
|
*
|
|
6209
6212
|
* @uiName Edit limit text
|
|
6210
6213
|
* @uiType string
|
|
6211
|
-
* @uiGroup
|
|
6214
|
+
* @uiGroup Customizable Vanity Link
|
|
6212
6215
|
* @requiredFlavor impact
|
|
6213
6216
|
*/
|
|
6214
|
-
this.editLimitText = "You can edit your link up to
|
|
6217
|
+
this.editLimitText = "You can edit your link up to {editsRemaining} more times.";
|
|
6215
6218
|
/**
|
|
6216
|
-
* Message shown when the
|
|
6219
|
+
* Message shown when the URL has been edited 5 times. To display a clickable link, use {supportLink} as a placeholder.
|
|
6217
6220
|
*
|
|
6218
6221
|
* @uiName Edit limit reached text
|
|
6219
6222
|
* @uiType string
|
|
6220
|
-
* @
|
|
6223
|
+
* @uiWidget textarea
|
|
6224
|
+
* @uiGroup Customizable Vanity Link
|
|
6221
6225
|
* @requiredFlavor impact
|
|
6222
6226
|
*/
|
|
6223
6227
|
this.editLimitReachedText = "5 edit limit reached. To make more changes, please contact {supportLink}.";
|
|
@@ -6226,7 +6230,7 @@ const ShareLink = class {
|
|
|
6226
6230
|
*
|
|
6227
6231
|
* @uiName Support link text
|
|
6228
6232
|
* @uiType string
|
|
6229
|
-
* @uiGroup
|
|
6233
|
+
* @uiGroup Customizable Vanity Link
|
|
6230
6234
|
* @requiredFlavor impact
|
|
6231
6235
|
*/
|
|
6232
6236
|
this.supportLinkText = "Support";
|
|
@@ -6235,7 +6239,7 @@ const ShareLink = class {
|
|
|
6235
6239
|
*
|
|
6236
6240
|
* @uiName Customize disabled tooltip
|
|
6237
6241
|
* @uiType string
|
|
6238
|
-
* @uiGroup
|
|
6242
|
+
* @uiGroup Customizable Vanity Link
|
|
6239
6243
|
* @requiredFlavor impact
|
|
6240
6244
|
*/
|
|
6241
6245
|
this.customizeDisabledTooltip = "Link customization is not available.";
|
|
@@ -6276,8 +6280,8 @@ function useDemoShareLink(props) {
|
|
|
6276
6280
|
setTimeout(() => setOpen(false), props.tooltiplifespan);
|
|
6277
6281
|
},
|
|
6278
6282
|
},
|
|
6279
|
-
|
|
6280
|
-
customizeLinkLabel: props.
|
|
6283
|
+
allowCustomization: props.allowCustomization,
|
|
6284
|
+
customizeLinkLabel: props.customizeLinkButtonLabel,
|
|
6281
6285
|
saveLabelText: props.saveLabelText,
|
|
6282
6286
|
cancelLabelText: props.cancelLabelText,
|
|
6283
6287
|
isEditing,
|
|
@@ -33,7 +33,7 @@ require('./utilities-096934ea.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-
|
|
36
|
+
const ShadowViewAddon = require('./ShadowViewAddon-247ccfa4.js');
|
|
37
37
|
const sqmPortalContainerView = require('./sqm-portal-container-view-70a47420.js');
|
|
38
38
|
const sqmUserInfoFormView = require('./sqm-user-info-form-view-93e996d6.js');
|
|
39
39
|
const data = require('./data-e83f8a41.js');
|
|
@@ -14078,7 +14078,7 @@ const defaultCustomizeProps = {
|
|
|
14078
14078
|
open: false,
|
|
14079
14079
|
tooltiptext: "Copied!",
|
|
14080
14080
|
},
|
|
14081
|
-
|
|
14081
|
+
allowCustomization: true,
|
|
14082
14082
|
customizeLinkLabel: "Customize Link",
|
|
14083
14083
|
saveLabelText: "Save",
|
|
14084
14084
|
cancelLabelText: "Cancel",
|
|
@@ -14273,7 +14273,7 @@ const CustomizeUrlEnabled = createHookStory(() => {
|
|
|
14273
14273
|
programId: "klip-referral-program",
|
|
14274
14274
|
tooltiptext: "Copied to clipboard",
|
|
14275
14275
|
tooltiplifespan: 1000,
|
|
14276
|
-
|
|
14276
|
+
allowCustomization: true,
|
|
14277
14277
|
}))));
|
|
14278
14278
|
});
|
|
14279
14279
|
|
|
@@ -9,7 +9,7 @@ const vanillaStyle = `
|
|
|
9
9
|
}
|
|
10
10
|
`;
|
|
11
11
|
export function ShareLinkView(props) {
|
|
12
|
-
const { copyTextViewProps,
|
|
12
|
+
const { copyTextViewProps, allowCustomization, customizeLinkLabel, saveLabelText, cancelLabelText, isEditing, editValue, domainPrefix, editsRemaining, maxEdits, limitReached, validationError, isValidating, isSaving, characterLimit, minCharacters, charactersRemaining, editLimitText, editLimitReachedText, supportLinkText, customizeDisabled, customizeDisabledTooltip, onCustomizeClick, onEditValueChange, onSave, onCancel, } = props;
|
|
13
13
|
const style = {
|
|
14
14
|
Container: {
|
|
15
15
|
display: "flex",
|
|
@@ -97,6 +97,32 @@ export function ShareLinkView(props) {
|
|
|
97
97
|
gap: "var(--sl-spacing-medium)",
|
|
98
98
|
alignItems: "center",
|
|
99
99
|
},
|
|
100
|
+
SaveButton: {
|
|
101
|
+
cursor: "pointer",
|
|
102
|
+
fontFamily: "var(--sl-font-sans)",
|
|
103
|
+
fontSize: "var(--sl-font-size-small)",
|
|
104
|
+
fontWeight: "600",
|
|
105
|
+
padding: "var(--sl-spacing-x-small) var(--sl-spacing-medium)",
|
|
106
|
+
borderRadius: "var(--sqm-border-radius-normal, 4px)",
|
|
107
|
+
border: "1px solid var(--sl-color-neutral-900)",
|
|
108
|
+
background: "var(--sl-color-neutral-900)",
|
|
109
|
+
color: "#fff",
|
|
110
|
+
"&:disabled": {
|
|
111
|
+
opacity: "0.5",
|
|
112
|
+
cursor: "default",
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
CancelButton: {
|
|
116
|
+
margin: "0",
|
|
117
|
+
fontSize: "var(--sl-font-size-small)",
|
|
118
|
+
fontWeight: "600",
|
|
119
|
+
cursor: "pointer",
|
|
120
|
+
background: "none",
|
|
121
|
+
border: "none",
|
|
122
|
+
padding: "0",
|
|
123
|
+
fontFamily: "var(--sl-font-sans)",
|
|
124
|
+
color: "var(--sl-color-neutral-500)",
|
|
125
|
+
},
|
|
100
126
|
LimitReachedContainer: {
|
|
101
127
|
display: "flex",
|
|
102
128
|
alignItems: "center",
|
|
@@ -107,6 +133,11 @@ export function ShareLinkView(props) {
|
|
|
107
133
|
const styleString = sheet.toString();
|
|
108
134
|
const errorMessageType = (validationError === null || validationError === void 0 ? void 0 : validationError.code) === "EXISTING_CODE_CONFLICT" ? "info" : "warning";
|
|
109
135
|
const showCharactersRemaining = charactersRemaining <= 14;
|
|
136
|
+
const editLimitMessage = intl.formatMessage({
|
|
137
|
+
id: "editLimitText",
|
|
138
|
+
defaultMessage: editLimitText,
|
|
139
|
+
}, { editsRemaining });
|
|
140
|
+
console.log(domainPrefix, "domain prefix");
|
|
110
141
|
// Editing state
|
|
111
142
|
if (isEditing) {
|
|
112
143
|
return (h("div", { class: sheet.classes.Container },
|
|
@@ -121,7 +152,7 @@ export function ShareLinkView(props) {
|
|
|
121
152
|
e.preventDefault();
|
|
122
153
|
}, disabled: isSaving, maxLength: characterLimit })),
|
|
123
154
|
h("p", { class: sheet.classes.HelperText },
|
|
124
|
-
|
|
155
|
+
editLimitMessage,
|
|
125
156
|
showCharactersRemaining &&
|
|
126
157
|
` Characters remaining: ${charactersRemaining}`),
|
|
127
158
|
validationError && (h("sqm-form-message", { type: errorMessageType, style: { paddingBottom: "var(--sl-spacing-xx-small)" } },
|
|
@@ -129,12 +160,12 @@ export function ShareLinkView(props) {
|
|
|
129
160
|
validationError.description)),
|
|
130
161
|
isValidating && h("p", { class: sheet.classes.HelperText }, "Validating..."),
|
|
131
162
|
h("div", { class: sheet.classes.ActionRow },
|
|
132
|
-
h("
|
|
163
|
+
h("button", { class: sheet.classes.SaveButton, onClick: onSave, disabled: isSaving ||
|
|
133
164
|
isValidating ||
|
|
134
165
|
!!validationError ||
|
|
135
166
|
!editValue ||
|
|
136
167
|
editValue.length < minCharacters }, isSaving ? "Saving..." : saveLabelText),
|
|
137
|
-
h("
|
|
168
|
+
h("button", { class: sheet.classes.CancelButton, onClick: onCancel, disabled: isSaving }, cancelLabelText))));
|
|
138
169
|
}
|
|
139
170
|
// Default / Customized / Limit reached states
|
|
140
171
|
return (h("div", { class: sheet.classes.Container },
|
|
@@ -142,13 +173,13 @@ export function ShareLinkView(props) {
|
|
|
142
173
|
styleString,
|
|
143
174
|
vanillaStyle),
|
|
144
175
|
h(CopyTextView, Object.assign({}, copyTextViewProps)),
|
|
145
|
-
|
|
176
|
+
allowCustomization &&
|
|
146
177
|
(customizeDisabled ? (h("sl-tooltip", { content: customizeDisabledTooltip, placement: "top", style: { display: "inline-block", width: "fit-content" } },
|
|
147
178
|
h("p", { class: sheet.classes.CustomizeLinkDisabled }, customizeLinkLabel))) : (h("div", { class: sheet.classes.LimitReachedContainer },
|
|
148
179
|
h("p", { class: limitReached
|
|
149
180
|
? sheet.classes.CustomizeLinkDisabled
|
|
150
181
|
: sheet.classes.CustomizeLinkText, onClick: limitReached ? undefined : onCustomizeClick }, customizeLinkLabel),
|
|
151
|
-
|
|
182
|
+
allowCustomization && limitReached && (h("p", { class: sheet.classes.HelperText }, intl.formatMessage({
|
|
152
183
|
id: "editLimitReached",
|
|
153
184
|
defaultMessage: editLimitReachedText,
|
|
154
185
|
}, {
|