@saasquatch/mint-components 2.1.8-22 → 2.1.8-24
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-643b83e2.js → ShadowViewAddon-1ed8faf9.js} +12 -8
- 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 +4 -4
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +590 -1146
- 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 -7
- package/dist/collection/components/sqm-share-link/sqm-share-link.js +24 -7
- package/dist/collection/components/sqm-share-link/useShareLink.js +3 -3
- package/dist/esm/{ShadowViewAddon-fcb6446a.js → ShadowViewAddon-395ab799.js} +12 -8
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mint-components.js +1 -1
- package/dist/esm/sqm-big-stat_45.entry.js +4 -4
- package/dist/esm/sqm-stencilbook.entry.js +2773 -3329
- package/dist/esm-es5/{ShadowViewAddon-fcb6446a.js → ShadowViewAddon-395ab799.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-3692c0da.system.entry.js → p-2b108f39.system.entry.js} +1 -1
- package/dist/mint-components/p-4b365f1f.system.js +1 -1
- package/dist/mint-components/{p-8d7548fb.system.entry.js → p-8e5a6491.system.entry.js} +1 -1
- package/dist/mint-components/{p-04502b80.entry.js → p-ba640335.entry.js} +2 -2
- package/dist/mint-components/{p-0eeb5438.js → p-cd79864c.js} +6 -6
- package/dist/mint-components/{p-5284bb02.system.js → p-d7adb7f3.system.js} +1 -1
- package/dist/mint-components/{p-31757712.entry.js → p-e6cf9daa.entry.js} +2 -2
- 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 +2 -1
- package/dist/types/components/sqm-share-link/useShareLink.d.ts +1 -1
- package/dist/types/components.d.ts +18 -234
- 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
- package/dist/cjs/sqm-share-link.cjs.entry.js +0 -271
- package/dist/cjs/useShareLink-1282123e.js +0 -422
- package/dist/cjs/useShareLink-3c22b1b9.js +0 -448
- package/dist/cjs/useShareLink-54e24928.js +0 -448
- package/dist/cjs/useShareLink-b664fbc7.js +0 -450
- package/dist/cjs/useShareLink-bf04b25c.js +0 -450
- package/dist/cjs/useShareLink-e8e2ae6d.js +0 -448
- package/dist/esm/sqm-share-link.entry.js +0 -267
- package/dist/esm/useShareLink-023284f3.js +0 -445
- package/dist/esm/useShareLink-436e9cad.js +0 -445
- package/dist/esm/useShareLink-4ba01373.js +0 -447
- package/dist/esm/useShareLink-79056582.js +0 -445
- package/dist/esm/useShareLink-a3329e33.js +0 -419
- package/dist/esm/useShareLink-bc20ec4c.js +0 -447
- package/dist/esm-es5/sqm-share-link.entry.js +0 -1
- package/dist/esm-es5/useShareLink-023284f3.js +0 -1
- package/dist/esm-es5/useShareLink-436e9cad.js +0 -1
- package/dist/esm-es5/useShareLink-4ba01373.js +0 -1
- package/dist/esm-es5/useShareLink-79056582.js +0 -1
- package/dist/esm-es5/useShareLink-a3329e33.js +0 -1
- package/dist/esm-es5/useShareLink-bc20ec4c.js +0 -1
- package/dist/mint-components/sqm-share-link.entry.js +0 -267
- package/dist/mint-components/sqm-share-link.system.entry.js +0 -1
- package/dist/mint-components/sqm-stencilbook.entry.js +0 -22106
- package/dist/mint-components/sqm-stencilbook.system.entry.js +0 -1
- package/dist/mint-components/useShareLink-023284f3.js +0 -445
- package/dist/mint-components/useShareLink-1d7c9fd8.system.js +0 -1
- package/dist/mint-components/useShareLink-211e061c.system.js +0 -1
- package/dist/mint-components/useShareLink-2de7ffce.system.js +0 -1
- package/dist/mint-components/useShareLink-436e9cad.js +0 -445
- package/dist/mint-components/useShareLink-454939f5.system.js +0 -1
- package/dist/mint-components/useShareLink-4ba01373.js +0 -447
- package/dist/mint-components/useShareLink-79056582.js +0 -445
- package/dist/mint-components/useShareLink-a3329e33.js +0 -419
- package/dist/mint-components/useShareLink-bc20ec4c.js +0 -447
- package/dist/mint-components/useShareLink-c05fe151.system.js +0 -1
- package/dist/mint-components/useShareLink-cb5abd96.system.js +0 -1
|
@@ -1,267 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h as h$1 } from './index-d9876cd5.js';
|
|
2
|
-
import './global-e1c1ff72.js';
|
|
3
|
-
import { o as h, i as useState } from './dom-context-hooks.module-8411297a.js';
|
|
4
|
-
import { i as isDemo } from './index.module-60e4da3a.js';
|
|
5
|
-
import './GoogleFonts-e3a7f82a.js';
|
|
6
|
-
import './jss-preset-default.esm-c36417f8.js';
|
|
7
|
-
import './JSS-8c381d8b.js';
|
|
8
|
-
import './mixins-acc245cc.js';
|
|
9
|
-
import { g as getProps } from './utils-61821fb1.js';
|
|
10
|
-
import { c as cjs } from './cjs-e829b75b.js';
|
|
11
|
-
import './useReferralCodes-cff9a9dc.js';
|
|
12
|
-
import './copy-text-view-c508f2e1.js';
|
|
13
|
-
import { u as useShareLink, S as ShareLinkView } from './useShareLink-a3329e33.js';
|
|
14
|
-
|
|
15
|
-
const ShareLink = class {
|
|
16
|
-
constructor(hostRef) {
|
|
17
|
-
registerInstance(this, hostRef);
|
|
18
|
-
/**
|
|
19
|
-
* Shown inside a tooltip after someone has successfully copied the link to their clipboard
|
|
20
|
-
*
|
|
21
|
-
* @uiName Tooltip text
|
|
22
|
-
*/
|
|
23
|
-
this.tooltiptext = "Copied to Clipboard";
|
|
24
|
-
/**
|
|
25
|
-
* The number of milliseconds that the tooltip appears for
|
|
26
|
-
*
|
|
27
|
-
* @uiName Tooltip lifespan
|
|
28
|
-
*/
|
|
29
|
-
this.tooltiplifespan = 1000;
|
|
30
|
-
/**
|
|
31
|
-
* Change the text alignment
|
|
32
|
-
*
|
|
33
|
-
* @uiName Share link alignment
|
|
34
|
-
* @uiType string
|
|
35
|
-
* @uiEnum ["left", "center", "right"]
|
|
36
|
-
* @uiEnumNames ["Left", "Center", "Right"]
|
|
37
|
-
* @uiGroup Style
|
|
38
|
-
*/
|
|
39
|
-
this.textAlign = "left";
|
|
40
|
-
/**
|
|
41
|
-
* @uiName Copy button label
|
|
42
|
-
*/
|
|
43
|
-
this.copyButtonLabel = "Copy Link";
|
|
44
|
-
/**
|
|
45
|
-
* The type of the button that is used (primary or secondary).
|
|
46
|
-
* @uiName Button Type
|
|
47
|
-
* @uiType string
|
|
48
|
-
* @uiEnum ["primary", "secondary"]
|
|
49
|
-
* @uiEnumNames ["Primary", "Secondary"]
|
|
50
|
-
* @uiGroup Style
|
|
51
|
-
*/
|
|
52
|
-
this.buttonType = "primary";
|
|
53
|
-
/**
|
|
54
|
-
* Set the copy button style and placement
|
|
55
|
-
*
|
|
56
|
-
* @uiName Button style
|
|
57
|
-
* @uiType string
|
|
58
|
-
* @uiEnum ["icon", "button-outside", "button-below"]
|
|
59
|
-
* @uiEnumNames ["Icon", "Button outside", "Button below"]
|
|
60
|
-
* @uiGroup Style
|
|
61
|
-
*/
|
|
62
|
-
this.buttonStyle = "icon";
|
|
63
|
-
/**
|
|
64
|
-
* Enable users to customize their referral link
|
|
65
|
-
*
|
|
66
|
-
* @uiName Customize URL
|
|
67
|
-
* @uiType boolean
|
|
68
|
-
* @uiGroup Customize Vanity Link
|
|
69
|
-
* @requiredFlavor impact
|
|
70
|
-
*/
|
|
71
|
-
this.customizeUrl = false;
|
|
72
|
-
/**
|
|
73
|
-
* Text shown below the share link input to trigger customization
|
|
74
|
-
*
|
|
75
|
-
* @uiName Customize link label
|
|
76
|
-
* @uiType string
|
|
77
|
-
* @uiGroup Customize Vanity Link
|
|
78
|
-
* @requiredFlavor impact
|
|
79
|
-
*/
|
|
80
|
-
this.customizeLinkLabel = "Customize Link";
|
|
81
|
-
/**
|
|
82
|
-
* Text for the save button in editing mode
|
|
83
|
-
*
|
|
84
|
-
* @uiName Save button label
|
|
85
|
-
* @uiType string
|
|
86
|
-
* @uiGroup Customize Vanity Link
|
|
87
|
-
* @requiredFlavor impact
|
|
88
|
-
*/
|
|
89
|
-
this.saveLabelText = "Save";
|
|
90
|
-
/**
|
|
91
|
-
* Text for the cancel button in editing mode
|
|
92
|
-
*
|
|
93
|
-
* @uiName Cancel button label
|
|
94
|
-
* @uiType string
|
|
95
|
-
* @uiGroup Customize Vanity Link
|
|
96
|
-
* @requiredFlavor impact
|
|
97
|
-
*/
|
|
98
|
-
this.cancelLabelText = "Cancel";
|
|
99
|
-
/**
|
|
100
|
-
* Title text shown when the custom link is already taken
|
|
101
|
-
*
|
|
102
|
-
* @uiName Existing code conflict error title
|
|
103
|
-
* @uiType string
|
|
104
|
-
* @uiGroup Customize Vanity Link
|
|
105
|
-
* @requiredFlavor impact
|
|
106
|
-
*/
|
|
107
|
-
this.existingCodeConflictErrorTitle = "This link is already taken";
|
|
108
|
-
/**
|
|
109
|
-
* Description text shown when the custom link is already taken
|
|
110
|
-
*
|
|
111
|
-
* @uiName Existing code conflict error description
|
|
112
|
-
* @uiType string
|
|
113
|
-
* @uiGroup Customize Vanity Link
|
|
114
|
-
* @requiredFlavor impact
|
|
115
|
-
*/
|
|
116
|
-
this.existingCodeConflictErrorDescription = "Try adding numbers, a dash or underscore to create a unique link.";
|
|
117
|
-
/**
|
|
118
|
-
* Title text shown when the link contains invalid characters
|
|
119
|
-
*
|
|
120
|
-
* @uiName Invalid characters error title
|
|
121
|
-
* @uiType string
|
|
122
|
-
* @uiGroup Customize Vanity Link
|
|
123
|
-
* @requiredFlavor impact
|
|
124
|
-
*/
|
|
125
|
-
this.invalidCharactersErrorTitle = "Please use only letters, numbers, dashes and underscores";
|
|
126
|
-
/**
|
|
127
|
-
* Description text shown when the link contains invalid characters
|
|
128
|
-
*
|
|
129
|
-
* @uiName Invalid characters error description
|
|
130
|
-
* @uiType string
|
|
131
|
-
* @uiGroup Customize Vanity Link
|
|
132
|
-
* @requiredFlavor impact
|
|
133
|
-
*/
|
|
134
|
-
this.invalidCharactersErrorDescription = "Special characters can break the link when sharing.";
|
|
135
|
-
/**
|
|
136
|
-
* Title text shown when the link contains profanity
|
|
137
|
-
*
|
|
138
|
-
* @uiName Profanity error title
|
|
139
|
-
* @uiType string
|
|
140
|
-
* @uiGroup Customize Vanity Link
|
|
141
|
-
* @requiredFlavor impact
|
|
142
|
-
*/
|
|
143
|
-
this.profanityErrorTitle = "Please try a different link";
|
|
144
|
-
/**
|
|
145
|
-
* Description text shown when the link contains profanity
|
|
146
|
-
*
|
|
147
|
-
* @uiName Profanity error description
|
|
148
|
-
* @uiType string
|
|
149
|
-
* @uiGroup Customize Vanity Link
|
|
150
|
-
* @requiredFlavor impact
|
|
151
|
-
*/
|
|
152
|
-
this.profanityErrorDescription = "This link contains a restricted word.";
|
|
153
|
-
/**
|
|
154
|
-
* Text describing the edit limit
|
|
155
|
-
*
|
|
156
|
-
* @uiName Edit limit text
|
|
157
|
-
* @uiType string
|
|
158
|
-
* @uiGroup Customize Vanity Link
|
|
159
|
-
* @requiredFlavor impact
|
|
160
|
-
*/
|
|
161
|
-
this.editLimitText = "You can edit your link up to 5 times.";
|
|
162
|
-
/**
|
|
163
|
-
* Message shown when the edit limit has been reached. Use {supportLink} as a placeholder for the support link.
|
|
164
|
-
*
|
|
165
|
-
* @uiName Edit limit reached text
|
|
166
|
-
* @uiType string
|
|
167
|
-
* @uiGroup Customize Vanity Link
|
|
168
|
-
* @requiredFlavor impact
|
|
169
|
-
*/
|
|
170
|
-
this.editLimitReachedText = "5 edit limit reached. To make more changes, please contact {supportLink}.";
|
|
171
|
-
/**
|
|
172
|
-
* Display text for the support link in the edit limit reached message
|
|
173
|
-
*
|
|
174
|
-
* @uiName Support link text
|
|
175
|
-
* @uiType string
|
|
176
|
-
* @uiGroup Customize Vanity Link
|
|
177
|
-
* @requiredFlavor impact
|
|
178
|
-
*/
|
|
179
|
-
this.supportLinkText = "Support";
|
|
180
|
-
/**
|
|
181
|
-
* Tooltip text shown when link customization is disabled
|
|
182
|
-
*
|
|
183
|
-
* @uiName Customize disabled tooltip
|
|
184
|
-
* @uiType string
|
|
185
|
-
* @uiGroup Customize Vanity Link
|
|
186
|
-
* @requiredFlavor impact
|
|
187
|
-
*/
|
|
188
|
-
this.customizeDisabledTooltip = "Link customization is not available.";
|
|
189
|
-
h(this);
|
|
190
|
-
}
|
|
191
|
-
disconnectedCallback() { }
|
|
192
|
-
render() {
|
|
193
|
-
const thisProps = getProps(this);
|
|
194
|
-
const props = isDemo()
|
|
195
|
-
? useDemoShareLink(thisProps)
|
|
196
|
-
: useShareLink(thisProps);
|
|
197
|
-
return h$1(ShareLinkView, Object.assign({}, props));
|
|
198
|
-
}
|
|
199
|
-
};
|
|
200
|
-
function useDemoShareLink(props) {
|
|
201
|
-
var _a;
|
|
202
|
-
const [open, setOpen] = useState(false);
|
|
203
|
-
const [isEditing, setIsEditing] = useState(false);
|
|
204
|
-
const [editValue, setEditValue] = useState("");
|
|
205
|
-
const copyString = "https://www.example.com/sharelink/abc";
|
|
206
|
-
const domainPrefix = "https://www.example.com/";
|
|
207
|
-
const baseProps = {
|
|
208
|
-
copyTextViewProps: {
|
|
209
|
-
copyString,
|
|
210
|
-
tooltiptext: props.tooltiptext,
|
|
211
|
-
textAlign: props.textAlign,
|
|
212
|
-
buttonStyle: props.buttonStyle,
|
|
213
|
-
backgroundColor: props.backgroundColor,
|
|
214
|
-
textColor: props.textColor,
|
|
215
|
-
borderRadius: props.borderRadius,
|
|
216
|
-
buttonType: props.buttonType,
|
|
217
|
-
copyButtonLabel: props.copyButtonLabel,
|
|
218
|
-
borderColor: props.borderColor,
|
|
219
|
-
open,
|
|
220
|
-
onClick: () => {
|
|
221
|
-
navigator.clipboard.writeText(copyString);
|
|
222
|
-
setOpen(true);
|
|
223
|
-
setTimeout(() => setOpen(false), props.tooltiplifespan);
|
|
224
|
-
},
|
|
225
|
-
},
|
|
226
|
-
customizeUrl: props.customizeUrl,
|
|
227
|
-
customizeLinkLabel: props.customizeLinkLabel,
|
|
228
|
-
saveLabelText: props.saveLabelText,
|
|
229
|
-
cancelLabelText: props.cancelLabelText,
|
|
230
|
-
isEditing,
|
|
231
|
-
editValue,
|
|
232
|
-
domainPrefix,
|
|
233
|
-
editsRemaining: 5,
|
|
234
|
-
maxEdits: 5,
|
|
235
|
-
limitReached: false,
|
|
236
|
-
validationError: null,
|
|
237
|
-
isValidating: false,
|
|
238
|
-
isSaving: false,
|
|
239
|
-
characterLimit: 15,
|
|
240
|
-
minCharacters: 3,
|
|
241
|
-
charactersRemaining: 15 - editValue.length,
|
|
242
|
-
editLimitText: props.editLimitText,
|
|
243
|
-
editLimitReachedText: props.editLimitReachedText,
|
|
244
|
-
supportLinkText: props.supportLinkText,
|
|
245
|
-
customizeDisabled: false,
|
|
246
|
-
customizeDisabledTooltip: (_a = props.customizeDisabledTooltip) !== null && _a !== void 0 ? _a : "Link customization is not available.",
|
|
247
|
-
onCustomizeClick: () => {
|
|
248
|
-
setIsEditing(true);
|
|
249
|
-
setEditValue("");
|
|
250
|
-
},
|
|
251
|
-
onEditValueChange: (value) => {
|
|
252
|
-
setEditValue(value);
|
|
253
|
-
},
|
|
254
|
-
onSave: () => {
|
|
255
|
-
setIsEditing(false);
|
|
256
|
-
},
|
|
257
|
-
onCancel: () => {
|
|
258
|
-
setIsEditing(false);
|
|
259
|
-
setEditValue("");
|
|
260
|
-
},
|
|
261
|
-
};
|
|
262
|
-
return cjs(baseProps, props.demoData || {}, {
|
|
263
|
-
arrayMerge: (_, a) => a,
|
|
264
|
-
});
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
export { ShareLink as sqm_share_link };
|