@saasquatch/mint-components 2.1.10-0 → 2.1.10-1
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-a26deae6.js → ShadowViewAddon-c97e80de.js} +422 -19
- 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 +1 -27
- package/dist/cjs/sqm-big-stat_45.cjs.entry.js +264 -36
- package/dist/cjs/sqm-code-verification.cjs.entry.js +1 -1
- package/dist/cjs/sqm-email-verification.cjs.entry.js +1 -1
- package/dist/cjs/sqm-empty_4.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-portal-container-view-70a47420.js → sqm-portal-container-view-757f921b.js} +5 -6
- package/dist/cjs/{sqm-portal-email-verification-view-c81fe7f1.js → sqm-portal-email-verification-view-abb773a7.js} +1 -1
- package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +2 -2
- package/dist/cjs/sqm-portal-forgot-password_6.cjs.entry.js +5 -5
- package/dist/cjs/{sqm-portal-profile-view-639337e3.js → sqm-portal-profile-view-3515e1e5.js} +1 -1
- package/dist/cjs/sqm-portal-profile.cjs.entry.js +2 -2
- package/dist/cjs/{sqm-portal-registration-form-view-020f661c.js → sqm-portal-registration-form-view-a45f7a52.js} +1 -1
- package/dist/cjs/{sqm-portal-reset-password-view-6b1acd90.js → sqm-portal-reset-password-view-a767b044.js} +1 -1
- package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +2 -2
- package/dist/cjs/{sqm-portal-verify-email-view-424e406a.js → sqm-portal-verify-email-view-717d0633.js} +1 -1
- package/dist/cjs/sqm-referral-table_11.cjs.entry.js +1 -1
- package/dist/cjs/sqm-rewards-table-customer-note-cell.cjs.entry.js +1 -1
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +168 -25
- package/dist/cjs/{sqm-text-span-view-f274fdf2.js → sqm-text-span-view-b9e10f5d.js} +1 -1
- package/dist/cjs/sqm-text-span.cjs.entry.js +1 -1
- package/dist/collection/components/sqm-password-field/sqm-password-field.js +1 -0
- package/dist/collection/components/sqm-portal-container/sqm-portal-container-view.js +6 -7
- package/dist/collection/components/sqm-portal-google-login/sqm-portal-google-login.js +1 -1
- package/dist/collection/components/sqm-portal-login/sqm-portal-login.js +1 -1
- package/dist/collection/components/sqm-share-code/sqm-share-code.js +0 -1
- package/dist/collection/components/sqm-share-link/ShareLink.stories.js +136 -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 +192 -0
- package/dist/collection/components/sqm-share-link/sqm-share-link.js +935 -48
- package/dist/collection/components/sqm-share-link/useShareLink.js +227 -14
- package/dist/collection/components/sqm-text-span/sqm-text-span-view.js +1 -1
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/formDefinitions.js +1 -19
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +0 -50
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +1 -59
- package/dist/esm/{ShadowViewAddon-47f1e579.js → ShadowViewAddon-33f1a8f7.js} +424 -22
- 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 +1 -27
- package/dist/esm/sqm-big-stat_45.entry.js +264 -36
- package/dist/esm/sqm-code-verification.entry.js +1 -1
- package/dist/esm/sqm-email-verification.entry.js +1 -1
- package/dist/esm/sqm-empty_4.entry.js +1 -1
- package/dist/esm/{sqm-portal-container-view-a8c708cd.js → sqm-portal-container-view-200c9df8.js} +6 -7
- package/dist/esm/{sqm-portal-email-verification-view-426370f1.js → sqm-portal-email-verification-view-04528277.js} +1 -1
- package/dist/esm/sqm-portal-email-verification.entry.js +2 -2
- package/dist/esm/sqm-portal-forgot-password_6.entry.js +5 -5
- package/dist/esm/{sqm-portal-profile-view-f015fd6a.js → sqm-portal-profile-view-b5ea620f.js} +1 -1
- package/dist/esm/sqm-portal-profile.entry.js +2 -2
- package/dist/esm/{sqm-portal-registration-form-view-2f4936ef.js → sqm-portal-registration-form-view-79265df5.js} +1 -1
- package/dist/esm/{sqm-portal-reset-password-view-cfbc0eb0.js → sqm-portal-reset-password-view-f84c04cf.js} +1 -1
- package/dist/esm/sqm-portal-reset-password.entry.js +2 -2
- package/dist/esm/{sqm-portal-verify-email-view-1a638fae.js → sqm-portal-verify-email-view-c61536b7.js} +1 -1
- package/dist/esm/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm/sqm-rewards-table-customer-note-cell.entry.js +1 -1
- package/dist/esm/sqm-stencilbook.entry.js +168 -25
- package/dist/esm/{sqm-text-span-view-738acfb3.js → sqm-text-span-view-72f43dff.js} +1 -1
- package/dist/esm/sqm-text-span.entry.js +1 -1
- package/dist/esm-es5/ShadowViewAddon-33f1a8f7.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 -1
- package/dist/esm-es5/sqm-code-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-email-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-empty_4.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-container-view-200c9df8.js +1 -0
- package/dist/esm-es5/{sqm-portal-email-verification-view-426370f1.js → sqm-portal-email-verification-view-04528277.js} +1 -1
- package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-forgot-password_6.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-profile-view-f015fd6a.js → sqm-portal-profile-view-b5ea620f.js} +1 -1
- package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-registration-form-view-2f4936ef.js → sqm-portal-registration-form-view-79265df5.js} +1 -1
- package/dist/esm-es5/{sqm-portal-reset-password-view-cfbc0eb0.js → sqm-portal-reset-password-view-f84c04cf.js} +1 -1
- package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-verify-email-view-1a638fae.js → sqm-portal-verify-email-view-c61536b7.js} +1 -1
- package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table-customer-note-cell.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/{sqm-text-span-view-738acfb3.js → sqm-text-span-view-72f43dff.js} +1 -1
- package/dist/esm-es5/sqm-text-span.entry.js +1 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/{p-ab0ea688.system.entry.js → p-00b235c5.system.entry.js} +1 -1
- package/dist/mint-components/p-08930b83.js +499 -0
- package/dist/mint-components/p-0b1e90fe.system.js +1 -0
- package/dist/mint-components/p-1021a49f.system.entry.js +1 -0
- package/dist/mint-components/{p-25558a33.entry.js → p-13292317.entry.js} +1 -1
- package/dist/mint-components/{p-d65991d0.entry.js → p-13d1b10d.entry.js} +1 -1
- package/dist/mint-components/{p-d4570314.entry.js → p-1d92c169.entry.js} +1 -1
- package/dist/mint-components/{p-7161e1a6.js → p-2668335b.js} +1 -1
- package/dist/mint-components/{p-6e512063.entry.js → p-3af3e2c1.entry.js} +1 -1
- package/dist/mint-components/{p-5ff7b000.entry.js → p-40bad95a.entry.js} +1 -1
- package/dist/mint-components/{p-f35d856a.system.js → p-43c31fd5.system.js} +1 -1
- package/dist/mint-components/p-5492dd51.system.entry.js +1 -0
- package/dist/mint-components/p-5bc5c61e.entry.js +1 -0
- package/dist/mint-components/{p-dac20392.system.js → p-686dd5eb.system.js} +1 -1
- package/dist/mint-components/{p-7b909aa5.system.js → p-7562cd98.system.js} +1 -1
- package/dist/mint-components/p-76271ec4.entry.js +9 -0
- package/dist/mint-components/p-78b40f71.system.js +1 -0
- package/dist/mint-components/{p-cb0a5990.entry.js → p-7939e4af.entry.js} +1 -1
- package/dist/mint-components/{p-e6ace3ab.js → p-832aea99.js} +1 -1
- package/dist/mint-components/{p-6640bbd6.entry.js → p-8784539d.entry.js} +21 -21
- package/dist/mint-components/{p-b9f57e84.system.entry.js → p-8899ff38.system.entry.js} +1 -1
- package/dist/mint-components/{p-fbe00c97.system.entry.js → p-892797eb.system.entry.js} +1 -1
- package/dist/mint-components/{p-d997001a.js → p-8962e023.js} +1 -1
- package/dist/mint-components/{p-dd368927.system.entry.js → p-9390586b.system.entry.js} +1 -1
- package/dist/mint-components/{p-3c46b4dd.system.js → p-a4825ec2.system.js} +1 -1
- package/dist/mint-components/{p-058aefe1.entry.js → p-af407cce.entry.js} +1 -1
- package/dist/mint-components/{p-56ca7e3c.js → p-b3ad957c.js} +1 -1
- package/dist/mint-components/{p-70570e4d.system.entry.js → p-b96e90a2.system.entry.js} +1 -1
- package/dist/mint-components/{p-c67f8558.system.entry.js → p-bba16a46.system.entry.js} +1 -1
- package/dist/mint-components/{p-669d52c4.js → p-bee4af5d.js} +1 -1
- package/dist/mint-components/p-c3c8d4ee.system.entry.js +1 -0
- package/dist/mint-components/{p-cabf6326.js → p-c813ec64.js} +1 -1
- package/dist/mint-components/p-ca098be1.system.js +1 -1
- package/dist/mint-components/{p-18133026.system.entry.js → p-d3b1ab20.system.entry.js} +1 -1
- package/dist/mint-components/{p-3687d433.entry.js → p-d4f332a7.entry.js} +1 -1
- package/dist/mint-components/{p-692e14c5.system.js → p-d55c50af.system.js} +1 -1
- package/dist/mint-components/p-dd12c32a.system.entry.js +1 -0
- package/dist/mint-components/p-e30abc44.js +1 -0
- package/dist/mint-components/{p-fb5c9802.entry.js → p-e506bf7f.entry.js} +1 -1
- package/dist/mint-components/{p-aefc6c4f.system.entry.js → p-e9485160.system.entry.js} +1 -1
- package/dist/mint-components/{p-f0baeed0.entry.js → p-f6528f8a.entry.js} +1 -1
- package/dist/mint-components/{p-5141769d.system.entry.js → p-f7ca4cc4.system.entry.js} +1 -1
- package/dist/mint-components/{p-e4f17c21.system.js → p-f8026ed6.system.js} +1 -1
- package/dist/types/components/sqm-share-link/ShareLink.stories.d.ts +9 -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 +41 -0
- package/dist/types/components/sqm-share-link/sqm-share-link.d.ts +195 -2
- package/dist/types/components/sqm-share-link/useShareLink.d.ts +33 -4
- package/dist/types/components/tax-and-cash/sqm-banking-info-form/formDefinitions.d.ts +0 -6
- package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.d.ts +0 -8
- package/dist/types/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.d.ts +0 -2
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +0 -10
- package/dist/types/components.d.ts +349 -38
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +2 -2
- package/dist/esm-es5/ShadowViewAddon-47f1e579.js +0 -1
- package/dist/esm-es5/sqm-portal-container-view-a8c708cd.js +0 -1
- package/dist/mint-components/p-0614dcbc.entry.js +0 -9
- package/dist/mint-components/p-217dedde.js +0 -463
- package/dist/mint-components/p-55676213.entry.js +0 -1
- package/dist/mint-components/p-57ac2160.system.entry.js +0 -1
- package/dist/mint-components/p-abc28aeb.system.entry.js +0 -1
- package/dist/mint-components/p-b699f76e.system.js +0 -1
- package/dist/mint-components/p-b6a1e2ac.js +0 -1
- package/dist/mint-components/p-bf545082.system.entry.js +0 -1
- package/dist/mint-components/p-ce050888.system.js +0 -1
- package/dist/mint-components/p-e3497e0e.system.entry.js +0 -1
- package/dist/types/global/android.d.ts +0 -7
- package/dist/types/global/demo.d.ts +0 -2
- package/dist/types/stories/features.d.ts +0 -4
- package/dist/types/stories/templates.d.ts +0 -4
|
@@ -3,7 +3,7 @@ import { useState, withHooks } from "@saasquatch/stencil-hooks";
|
|
|
3
3
|
import { Component, Prop, h } from "@stencil/core";
|
|
4
4
|
import deepmerge from "deepmerge";
|
|
5
5
|
import { getProps } from "../../utils/utils";
|
|
6
|
-
import {
|
|
6
|
+
import { ShareLinkView } from "./sqm-share-link-view";
|
|
7
7
|
import { useShareLink } from "./useShareLink";
|
|
8
8
|
/**
|
|
9
9
|
* @uiName Share Link
|
|
@@ -58,6 +58,199 @@ export class ShareLink {
|
|
|
58
58
|
* @uiGroup Style
|
|
59
59
|
*/
|
|
60
60
|
this.buttonStyle = "icon";
|
|
61
|
+
/**
|
|
62
|
+
* Let advocates customize their share links up to 5 times.
|
|
63
|
+
*
|
|
64
|
+
* @uiName Allow customization
|
|
65
|
+
* @uiType boolean
|
|
66
|
+
* @uiGroup Customizable Vanity Link
|
|
67
|
+
* @uiWidget CustomLinkSwitch
|
|
68
|
+
* @requiredFlavor impact
|
|
69
|
+
*/
|
|
70
|
+
this.allowCustomization = false;
|
|
71
|
+
/**
|
|
72
|
+
* Text for the cancel button in editing mode
|
|
73
|
+
*
|
|
74
|
+
* @uiName Cancel button label
|
|
75
|
+
* @uiType string
|
|
76
|
+
* @uiGroup Customizable Vanity Link
|
|
77
|
+
* @requiredFlavor impact
|
|
78
|
+
*/
|
|
79
|
+
this.cancelLabelText = "Cancel";
|
|
80
|
+
/**
|
|
81
|
+
* Tooltip text shown when link customization is disabled
|
|
82
|
+
*
|
|
83
|
+
* @uiName Customize disabled tooltip
|
|
84
|
+
* @uiType string
|
|
85
|
+
* @uiGroup Customizable Vanity Link
|
|
86
|
+
* @requiredFlavor impact
|
|
87
|
+
*/
|
|
88
|
+
this.customizeDisabledTooltip = "Link customization is not available.";
|
|
89
|
+
/**
|
|
90
|
+
* Displayed below the share link.
|
|
91
|
+
*
|
|
92
|
+
* @uiName Customize link button label
|
|
93
|
+
* @uiType string
|
|
94
|
+
* @uiGroup Customizable Vanity Link
|
|
95
|
+
* @requiredFlavor impact
|
|
96
|
+
*/
|
|
97
|
+
this.customizeLinkButtonLabel = "Customize Link";
|
|
98
|
+
/**
|
|
99
|
+
* Message shown when the URL has been edited 5 times. To display a clickable link, use {supportLink} as a placeholder.
|
|
100
|
+
*
|
|
101
|
+
* @uiName Edit limit reached text
|
|
102
|
+
* @uiType string
|
|
103
|
+
* @uiWidget textarea
|
|
104
|
+
* @uiGroup Customizable Vanity Link
|
|
105
|
+
* @requiredFlavor impact
|
|
106
|
+
*/
|
|
107
|
+
this.editLimitReachedText = "5 edit limit reached. To make more changes, please contact {supportLink}.";
|
|
108
|
+
/**
|
|
109
|
+
* Subtext shown while the user is customizing their URL.
|
|
110
|
+
*
|
|
111
|
+
* @uiName Edit limit text
|
|
112
|
+
* @uiType string
|
|
113
|
+
* @uiGroup Customizable Vanity Link
|
|
114
|
+
* @requiredFlavor impact
|
|
115
|
+
*/
|
|
116
|
+
this.editLimitText = "You can edit your link up to {editsRemaining} more time(s).";
|
|
117
|
+
/**
|
|
118
|
+
* Description text shown when the link contains invalid special characters.
|
|
119
|
+
*
|
|
120
|
+
* @uiName Invalid characters error description
|
|
121
|
+
* @uiType string
|
|
122
|
+
* @uiWidget textarea
|
|
123
|
+
* @uiGroup Customizable Vanity Link
|
|
124
|
+
* @requiredFlavor impact
|
|
125
|
+
*/
|
|
126
|
+
this.invalidCharactersErrorDescription = "Special characters can break the link when sharing.";
|
|
127
|
+
/**
|
|
128
|
+
* Title of the error message shown when the link contains invalid special characters.
|
|
129
|
+
*
|
|
130
|
+
* @uiName Invalid characters error title
|
|
131
|
+
* @uiType string
|
|
132
|
+
* @uiGroup Customizable Vanity Link
|
|
133
|
+
* @requiredFlavor impact
|
|
134
|
+
*/
|
|
135
|
+
this.invalidCharactersErrorTitle = "Please use only letters, numbers, dashes and underscores";
|
|
136
|
+
/**
|
|
137
|
+
* Description text shown when the link has already been taken
|
|
138
|
+
*
|
|
139
|
+
* @uiName Link taken error message
|
|
140
|
+
* @uiType string
|
|
141
|
+
* @uiWidget textarea
|
|
142
|
+
* @uiGroup Customizable Vanity Link
|
|
143
|
+
* @requiredFlavor impact
|
|
144
|
+
*/
|
|
145
|
+
this.linkTakenErrorDescription = "Try adding numbers, a dash or underscore to create a unique link.";
|
|
146
|
+
/**
|
|
147
|
+
* Title of the error message shown when the link has already been taken
|
|
148
|
+
*
|
|
149
|
+
* @uiName Link taken error title
|
|
150
|
+
* @uiType string
|
|
151
|
+
* @uiGroup Customizable Vanity Link
|
|
152
|
+
* @requiredFlavor impact
|
|
153
|
+
*/
|
|
154
|
+
this.linkTakenErrorTitle = "This link is already taken";
|
|
155
|
+
/**
|
|
156
|
+
* Description text shown when the link contains profanity or brand names.
|
|
157
|
+
*
|
|
158
|
+
* @uiName Restricted words error description
|
|
159
|
+
* @uiType string
|
|
160
|
+
* @uiWidget textarea
|
|
161
|
+
* @uiGroup Customizable Vanity Link
|
|
162
|
+
* @requiredFlavor impact
|
|
163
|
+
*/
|
|
164
|
+
this.restrictedWordsErrorDescription = "This link contains a restricted word.";
|
|
165
|
+
/**
|
|
166
|
+
* Title of the error message shown when the link contains profanity or brand names.
|
|
167
|
+
*
|
|
168
|
+
* @uiName Restricted words error title
|
|
169
|
+
* @uiType string
|
|
170
|
+
* @uiGroup Customizable Vanity Link
|
|
171
|
+
* @requiredFlavor impact
|
|
172
|
+
*/
|
|
173
|
+
this.restrictedWordsErrorTitle = "Please try a different link";
|
|
174
|
+
/**
|
|
175
|
+
* Text for the save button in editing mode
|
|
176
|
+
*
|
|
177
|
+
* @uiName Save button label
|
|
178
|
+
* @uiType string
|
|
179
|
+
* @uiGroup Customizable Vanity Link
|
|
180
|
+
* @requiredFlavor impact
|
|
181
|
+
*/
|
|
182
|
+
this.saveLabelText = "Save";
|
|
183
|
+
/**
|
|
184
|
+
* Text for the save button while saving is in progress
|
|
185
|
+
*
|
|
186
|
+
* @uiName Saving button label
|
|
187
|
+
* @uiType string
|
|
188
|
+
* @uiGroup Customizable Vanity Link
|
|
189
|
+
* @requiredFlavor impact
|
|
190
|
+
*/
|
|
191
|
+
this.savingLabelText = "Saving...";
|
|
192
|
+
/**
|
|
193
|
+
* Label shown above the link input while editing
|
|
194
|
+
*
|
|
195
|
+
* @uiName Edit input label
|
|
196
|
+
* @uiType string
|
|
197
|
+
* @uiGroup Customizable Vanity Link
|
|
198
|
+
* @requiredFlavor impact
|
|
199
|
+
*/
|
|
200
|
+
this.editLabelText = "Enter your link";
|
|
201
|
+
/**
|
|
202
|
+
* Text shown when nearing the character limit. Use {charactersRemaining} as a placeholder for the count.
|
|
203
|
+
*
|
|
204
|
+
* @uiName Characters remaining text
|
|
205
|
+
* @uiType string
|
|
206
|
+
* @uiGroup Customizable Vanity Link
|
|
207
|
+
* @requiredFlavor impact
|
|
208
|
+
*/
|
|
209
|
+
this.charactersRemainingText = "Characters remaining: {charactersRemaining}";
|
|
210
|
+
/**
|
|
211
|
+
* Text shown while the link is being validated
|
|
212
|
+
*
|
|
213
|
+
* @uiName Validating label
|
|
214
|
+
* @uiType string
|
|
215
|
+
* @uiGroup Customizable Vanity Link
|
|
216
|
+
* @requiredFlavor impact
|
|
217
|
+
*/
|
|
218
|
+
this.validatingLabelText = "Validating...";
|
|
219
|
+
/**
|
|
220
|
+
* @uiName Min characters text
|
|
221
|
+
* @uiType string
|
|
222
|
+
* @uiGroup Customizable Vanity Link
|
|
223
|
+
* @requiredFlavor impact
|
|
224
|
+
*/
|
|
225
|
+
this.minCharactersText = "Minimum 3 characters.";
|
|
226
|
+
/**
|
|
227
|
+
* Display text for the support link in the edit limit reached message
|
|
228
|
+
*
|
|
229
|
+
* @uiName Support link text
|
|
230
|
+
* @uiType string
|
|
231
|
+
* @uiGroup Customizable Vanity Link
|
|
232
|
+
* @requiredFlavor impact
|
|
233
|
+
*/
|
|
234
|
+
this.supportLinkText = "Support";
|
|
235
|
+
/**
|
|
236
|
+
* Title shown when saving fails with an unknown error
|
|
237
|
+
*
|
|
238
|
+
* @uiName Save error title
|
|
239
|
+
* @uiType string
|
|
240
|
+
* @uiGroup Customizable Vanity Link
|
|
241
|
+
* @requiredFlavor impact
|
|
242
|
+
*/
|
|
243
|
+
this.saveErrorTitle = "Error";
|
|
244
|
+
/**
|
|
245
|
+
* Description shown when saving fails with an unknown error
|
|
246
|
+
*
|
|
247
|
+
* @uiName Save error description
|
|
248
|
+
* @uiType string
|
|
249
|
+
* @uiWidget textarea
|
|
250
|
+
* @uiGroup Customizable Vanity Link
|
|
251
|
+
* @requiredFlavor impact
|
|
252
|
+
*/
|
|
253
|
+
this.saveErrorDescription = "Failed to save custom link. Please try again.";
|
|
61
254
|
withHooks(this);
|
|
62
255
|
}
|
|
63
256
|
disconnectedCallback() { }
|
|
@@ -66,7 +259,7 @@ export class ShareLink {
|
|
|
66
259
|
const props = isDemo()
|
|
67
260
|
? useDemoShareLink(thisProps)
|
|
68
261
|
: useShareLink(thisProps);
|
|
69
|
-
return h(
|
|
262
|
+
return h(ShareLinkView, Object.assign({}, props));
|
|
70
263
|
}
|
|
71
264
|
static get is() { return "sqm-share-link"; }
|
|
72
265
|
static get encapsulation() { return "shadow"; }
|
|
@@ -369,60 +562,754 @@ export class ShareLink {
|
|
|
369
562
|
"reflect": false,
|
|
370
563
|
"defaultValue": "\"icon\""
|
|
371
564
|
},
|
|
372
|
-
"
|
|
373
|
-
"type": "
|
|
565
|
+
"allowCustomization": {
|
|
566
|
+
"type": "boolean",
|
|
374
567
|
"mutable": false,
|
|
375
568
|
"complexType": {
|
|
376
|
-
"original": "
|
|
377
|
-
"resolved": "
|
|
378
|
-
"references": {
|
|
379
|
-
"DemoData": {
|
|
380
|
-
"location": "import",
|
|
381
|
-
"path": "../../global/demo"
|
|
382
|
-
},
|
|
383
|
-
"CopyTextViewProps": {
|
|
384
|
-
"location": "import",
|
|
385
|
-
"path": "../views/copy-text-view"
|
|
386
|
-
}
|
|
387
|
-
}
|
|
569
|
+
"original": "boolean",
|
|
570
|
+
"resolved": "boolean",
|
|
571
|
+
"references": {}
|
|
388
572
|
},
|
|
389
573
|
"required": false,
|
|
390
574
|
"optional": true,
|
|
391
575
|
"docs": {
|
|
392
576
|
"tags": [{
|
|
393
|
-
"text":
|
|
394
|
-
"name": "
|
|
577
|
+
"text": "Allow customization",
|
|
578
|
+
"name": "uiName"
|
|
395
579
|
}, {
|
|
396
|
-
"text": "
|
|
580
|
+
"text": "boolean",
|
|
397
581
|
"name": "uiType"
|
|
582
|
+
}, {
|
|
583
|
+
"text": "Customizable Vanity Link",
|
|
584
|
+
"name": "uiGroup"
|
|
585
|
+
}, {
|
|
586
|
+
"text": "CustomLinkSwitch",
|
|
587
|
+
"name": "uiWidget"
|
|
588
|
+
}, {
|
|
589
|
+
"text": "impact",
|
|
590
|
+
"name": "requiredFlavor"
|
|
398
591
|
}],
|
|
399
|
-
"text": ""
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
592
|
+
"text": "Let advocates customize their share links up to 5 times."
|
|
593
|
+
},
|
|
594
|
+
"attribute": "allow-customization",
|
|
595
|
+
"reflect": false,
|
|
596
|
+
"defaultValue": "false"
|
|
597
|
+
},
|
|
598
|
+
"cancelLabelText": {
|
|
599
|
+
"type": "string",
|
|
600
|
+
"mutable": false,
|
|
601
|
+
"complexType": {
|
|
602
|
+
"original": "string",
|
|
603
|
+
"resolved": "string",
|
|
604
|
+
"references": {}
|
|
605
|
+
},
|
|
606
|
+
"required": false,
|
|
607
|
+
"optional": true,
|
|
608
|
+
"docs": {
|
|
609
|
+
"tags": [{
|
|
610
|
+
"text": "Cancel button label",
|
|
611
|
+
"name": "uiName"
|
|
612
|
+
}, {
|
|
613
|
+
"text": "string",
|
|
614
|
+
"name": "uiType"
|
|
615
|
+
}, {
|
|
616
|
+
"text": "Customizable Vanity Link",
|
|
617
|
+
"name": "uiGroup"
|
|
618
|
+
}, {
|
|
619
|
+
"text": "impact",
|
|
620
|
+
"name": "requiredFlavor"
|
|
621
|
+
}],
|
|
622
|
+
"text": "Text for the cancel button in editing mode"
|
|
623
|
+
},
|
|
624
|
+
"attribute": "cancel-label-text",
|
|
625
|
+
"reflect": false,
|
|
626
|
+
"defaultValue": "\"Cancel\""
|
|
627
|
+
},
|
|
628
|
+
"customizeDisabledTooltip": {
|
|
629
|
+
"type": "string",
|
|
630
|
+
"mutable": false,
|
|
631
|
+
"complexType": {
|
|
632
|
+
"original": "string",
|
|
633
|
+
"resolved": "string",
|
|
634
|
+
"references": {}
|
|
635
|
+
},
|
|
636
|
+
"required": false,
|
|
637
|
+
"optional": true,
|
|
638
|
+
"docs": {
|
|
639
|
+
"tags": [{
|
|
640
|
+
"text": "Customize disabled tooltip",
|
|
641
|
+
"name": "uiName"
|
|
642
|
+
}, {
|
|
643
|
+
"text": "string",
|
|
644
|
+
"name": "uiType"
|
|
645
|
+
}, {
|
|
646
|
+
"text": "Customizable Vanity Link",
|
|
647
|
+
"name": "uiGroup"
|
|
648
|
+
}, {
|
|
649
|
+
"text": "impact",
|
|
650
|
+
"name": "requiredFlavor"
|
|
651
|
+
}],
|
|
652
|
+
"text": "Tooltip text shown when link customization is disabled"
|
|
653
|
+
},
|
|
654
|
+
"attribute": "customize-disabled-tooltip",
|
|
655
|
+
"reflect": false,
|
|
656
|
+
"defaultValue": "\"Link customization is not available.\""
|
|
657
|
+
},
|
|
658
|
+
"customizeLinkButtonLabel": {
|
|
659
|
+
"type": "string",
|
|
660
|
+
"mutable": false,
|
|
661
|
+
"complexType": {
|
|
662
|
+
"original": "string",
|
|
663
|
+
"resolved": "string",
|
|
664
|
+
"references": {}
|
|
665
|
+
},
|
|
666
|
+
"required": false,
|
|
667
|
+
"optional": true,
|
|
668
|
+
"docs": {
|
|
669
|
+
"tags": [{
|
|
670
|
+
"text": "Customize link button label",
|
|
671
|
+
"name": "uiName"
|
|
672
|
+
}, {
|
|
673
|
+
"text": "string",
|
|
674
|
+
"name": "uiType"
|
|
675
|
+
}, {
|
|
676
|
+
"text": "Customizable Vanity Link",
|
|
677
|
+
"name": "uiGroup"
|
|
678
|
+
}, {
|
|
679
|
+
"text": "impact",
|
|
680
|
+
"name": "requiredFlavor"
|
|
681
|
+
}],
|
|
682
|
+
"text": "Displayed below the share link."
|
|
683
|
+
},
|
|
684
|
+
"attribute": "customize-link-button-label",
|
|
685
|
+
"reflect": false,
|
|
686
|
+
"defaultValue": "\"Customize Link\""
|
|
687
|
+
},
|
|
688
|
+
"editLimitReachedText": {
|
|
689
|
+
"type": "string",
|
|
690
|
+
"mutable": false,
|
|
691
|
+
"complexType": {
|
|
692
|
+
"original": "string",
|
|
693
|
+
"resolved": "string",
|
|
694
|
+
"references": {}
|
|
695
|
+
},
|
|
696
|
+
"required": false,
|
|
697
|
+
"optional": true,
|
|
698
|
+
"docs": {
|
|
699
|
+
"tags": [{
|
|
700
|
+
"text": "Edit limit reached text",
|
|
701
|
+
"name": "uiName"
|
|
702
|
+
}, {
|
|
703
|
+
"text": "string",
|
|
704
|
+
"name": "uiType"
|
|
705
|
+
}, {
|
|
706
|
+
"text": "textarea",
|
|
707
|
+
"name": "uiWidget"
|
|
708
|
+
}, {
|
|
709
|
+
"text": "Customizable Vanity Link",
|
|
710
|
+
"name": "uiGroup"
|
|
711
|
+
}, {
|
|
712
|
+
"text": "impact",
|
|
713
|
+
"name": "requiredFlavor"
|
|
714
|
+
}],
|
|
715
|
+
"text": "Message shown when the URL has been edited 5 times. To display a clickable link, use {supportLink} as a placeholder."
|
|
716
|
+
},
|
|
717
|
+
"attribute": "edit-limit-reached-text",
|
|
718
|
+
"reflect": false,
|
|
719
|
+
"defaultValue": "\"5 edit limit reached. To make more changes, please contact {supportLink}.\""
|
|
720
|
+
},
|
|
721
|
+
"editLimitText": {
|
|
722
|
+
"type": "string",
|
|
723
|
+
"mutable": false,
|
|
724
|
+
"complexType": {
|
|
725
|
+
"original": "string",
|
|
726
|
+
"resolved": "string",
|
|
727
|
+
"references": {}
|
|
728
|
+
},
|
|
729
|
+
"required": false,
|
|
730
|
+
"optional": true,
|
|
731
|
+
"docs": {
|
|
732
|
+
"tags": [{
|
|
733
|
+
"text": "Edit limit text",
|
|
734
|
+
"name": "uiName"
|
|
735
|
+
}, {
|
|
736
|
+
"text": "string",
|
|
737
|
+
"name": "uiType"
|
|
738
|
+
}, {
|
|
739
|
+
"text": "Customizable Vanity Link",
|
|
740
|
+
"name": "uiGroup"
|
|
741
|
+
}, {
|
|
742
|
+
"text": "impact",
|
|
743
|
+
"name": "requiredFlavor"
|
|
744
|
+
}],
|
|
745
|
+
"text": "Subtext shown while the user is customizing their URL."
|
|
746
|
+
},
|
|
747
|
+
"attribute": "edit-limit-text",
|
|
748
|
+
"reflect": false,
|
|
749
|
+
"defaultValue": "\"You can edit your link up to {editsRemaining} more time(s).\""
|
|
750
|
+
},
|
|
751
|
+
"invalidCharactersErrorDescription": {
|
|
752
|
+
"type": "string",
|
|
753
|
+
"mutable": false,
|
|
754
|
+
"complexType": {
|
|
755
|
+
"original": "string",
|
|
756
|
+
"resolved": "string",
|
|
757
|
+
"references": {}
|
|
758
|
+
},
|
|
759
|
+
"required": false,
|
|
760
|
+
"optional": true,
|
|
761
|
+
"docs": {
|
|
762
|
+
"tags": [{
|
|
763
|
+
"text": "Invalid characters error description",
|
|
764
|
+
"name": "uiName"
|
|
765
|
+
}, {
|
|
766
|
+
"text": "string",
|
|
767
|
+
"name": "uiType"
|
|
768
|
+
}, {
|
|
769
|
+
"text": "textarea",
|
|
770
|
+
"name": "uiWidget"
|
|
771
|
+
}, {
|
|
772
|
+
"text": "Customizable Vanity Link",
|
|
773
|
+
"name": "uiGroup"
|
|
774
|
+
}, {
|
|
775
|
+
"text": "impact",
|
|
776
|
+
"name": "requiredFlavor"
|
|
777
|
+
}],
|
|
778
|
+
"text": "Description text shown when the link contains invalid special characters."
|
|
779
|
+
},
|
|
780
|
+
"attribute": "invalid-characters-error-description",
|
|
781
|
+
"reflect": false,
|
|
782
|
+
"defaultValue": "\"Special characters can break the link when sharing.\""
|
|
783
|
+
},
|
|
784
|
+
"invalidCharactersErrorTitle": {
|
|
785
|
+
"type": "string",
|
|
786
|
+
"mutable": false,
|
|
787
|
+
"complexType": {
|
|
788
|
+
"original": "string",
|
|
789
|
+
"resolved": "string",
|
|
790
|
+
"references": {}
|
|
791
|
+
},
|
|
792
|
+
"required": false,
|
|
793
|
+
"optional": true,
|
|
794
|
+
"docs": {
|
|
795
|
+
"tags": [{
|
|
796
|
+
"text": "Invalid characters error title",
|
|
797
|
+
"name": "uiName"
|
|
798
|
+
}, {
|
|
799
|
+
"text": "string",
|
|
800
|
+
"name": "uiType"
|
|
801
|
+
}, {
|
|
802
|
+
"text": "Customizable Vanity Link",
|
|
803
|
+
"name": "uiGroup"
|
|
804
|
+
}, {
|
|
805
|
+
"text": "impact",
|
|
806
|
+
"name": "requiredFlavor"
|
|
807
|
+
}],
|
|
808
|
+
"text": "Title of the error message shown when the link contains invalid special characters."
|
|
809
|
+
},
|
|
810
|
+
"attribute": "invalid-characters-error-title",
|
|
811
|
+
"reflect": false,
|
|
812
|
+
"defaultValue": "\"Please use only letters, numbers, dashes and underscores\""
|
|
813
|
+
},
|
|
814
|
+
"linkTakenErrorDescription": {
|
|
815
|
+
"type": "string",
|
|
816
|
+
"mutable": false,
|
|
817
|
+
"complexType": {
|
|
818
|
+
"original": "string",
|
|
819
|
+
"resolved": "string",
|
|
820
|
+
"references": {}
|
|
821
|
+
},
|
|
822
|
+
"required": false,
|
|
823
|
+
"optional": true,
|
|
824
|
+
"docs": {
|
|
825
|
+
"tags": [{
|
|
826
|
+
"text": "Link taken error message",
|
|
827
|
+
"name": "uiName"
|
|
828
|
+
}, {
|
|
829
|
+
"text": "string",
|
|
830
|
+
"name": "uiType"
|
|
831
|
+
}, {
|
|
832
|
+
"text": "textarea",
|
|
833
|
+
"name": "uiWidget"
|
|
834
|
+
}, {
|
|
835
|
+
"text": "Customizable Vanity Link",
|
|
836
|
+
"name": "uiGroup"
|
|
837
|
+
}, {
|
|
838
|
+
"text": "impact",
|
|
839
|
+
"name": "requiredFlavor"
|
|
840
|
+
}],
|
|
841
|
+
"text": "Description text shown when the link has already been taken"
|
|
842
|
+
},
|
|
843
|
+
"attribute": "link-taken-error-description",
|
|
844
|
+
"reflect": false,
|
|
845
|
+
"defaultValue": "\"Try adding numbers, a dash or underscore to create a unique link.\""
|
|
846
|
+
},
|
|
847
|
+
"linkTakenErrorTitle": {
|
|
848
|
+
"type": "string",
|
|
849
|
+
"mutable": false,
|
|
850
|
+
"complexType": {
|
|
851
|
+
"original": "string",
|
|
852
|
+
"resolved": "string",
|
|
853
|
+
"references": {}
|
|
854
|
+
},
|
|
855
|
+
"required": false,
|
|
856
|
+
"optional": true,
|
|
857
|
+
"docs": {
|
|
858
|
+
"tags": [{
|
|
859
|
+
"text": "Link taken error title",
|
|
860
|
+
"name": "uiName"
|
|
861
|
+
}, {
|
|
862
|
+
"text": "string",
|
|
863
|
+
"name": "uiType"
|
|
864
|
+
}, {
|
|
865
|
+
"text": "Customizable Vanity Link",
|
|
866
|
+
"name": "uiGroup"
|
|
867
|
+
}, {
|
|
868
|
+
"text": "impact",
|
|
869
|
+
"name": "requiredFlavor"
|
|
870
|
+
}],
|
|
871
|
+
"text": "Title of the error message shown when the link has already been taken"
|
|
872
|
+
},
|
|
873
|
+
"attribute": "link-taken-error-title",
|
|
874
|
+
"reflect": false,
|
|
875
|
+
"defaultValue": "\"This link is already taken\""
|
|
876
|
+
},
|
|
877
|
+
"restrictedWordsErrorDescription": {
|
|
878
|
+
"type": "string",
|
|
879
|
+
"mutable": false,
|
|
880
|
+
"complexType": {
|
|
881
|
+
"original": "string",
|
|
882
|
+
"resolved": "string",
|
|
883
|
+
"references": {}
|
|
884
|
+
},
|
|
885
|
+
"required": false,
|
|
886
|
+
"optional": true,
|
|
887
|
+
"docs": {
|
|
888
|
+
"tags": [{
|
|
889
|
+
"text": "Restricted words error description",
|
|
890
|
+
"name": "uiName"
|
|
891
|
+
}, {
|
|
892
|
+
"text": "string",
|
|
893
|
+
"name": "uiType"
|
|
894
|
+
}, {
|
|
895
|
+
"text": "textarea",
|
|
896
|
+
"name": "uiWidget"
|
|
897
|
+
}, {
|
|
898
|
+
"text": "Customizable Vanity Link",
|
|
899
|
+
"name": "uiGroup"
|
|
900
|
+
}, {
|
|
901
|
+
"text": "impact",
|
|
902
|
+
"name": "requiredFlavor"
|
|
903
|
+
}],
|
|
904
|
+
"text": "Description text shown when the link contains profanity or brand names."
|
|
905
|
+
},
|
|
906
|
+
"attribute": "restricted-words-error-description",
|
|
907
|
+
"reflect": false,
|
|
908
|
+
"defaultValue": "\"This link contains a restricted word.\""
|
|
909
|
+
},
|
|
910
|
+
"restrictedWordsErrorTitle": {
|
|
911
|
+
"type": "string",
|
|
912
|
+
"mutable": false,
|
|
913
|
+
"complexType": {
|
|
914
|
+
"original": "string",
|
|
915
|
+
"resolved": "string",
|
|
916
|
+
"references": {}
|
|
917
|
+
},
|
|
918
|
+
"required": false,
|
|
919
|
+
"optional": true,
|
|
920
|
+
"docs": {
|
|
921
|
+
"tags": [{
|
|
922
|
+
"text": "Restricted words error title",
|
|
923
|
+
"name": "uiName"
|
|
924
|
+
}, {
|
|
925
|
+
"text": "string",
|
|
926
|
+
"name": "uiType"
|
|
927
|
+
}, {
|
|
928
|
+
"text": "Customizable Vanity Link",
|
|
929
|
+
"name": "uiGroup"
|
|
930
|
+
}, {
|
|
931
|
+
"text": "impact",
|
|
932
|
+
"name": "requiredFlavor"
|
|
933
|
+
}],
|
|
934
|
+
"text": "Title of the error message shown when the link contains profanity or brand names."
|
|
935
|
+
},
|
|
936
|
+
"attribute": "restricted-words-error-title",
|
|
937
|
+
"reflect": false,
|
|
938
|
+
"defaultValue": "\"Please try a different link\""
|
|
939
|
+
},
|
|
940
|
+
"saveLabelText": {
|
|
941
|
+
"type": "string",
|
|
942
|
+
"mutable": false,
|
|
943
|
+
"complexType": {
|
|
944
|
+
"original": "string",
|
|
945
|
+
"resolved": "string",
|
|
946
|
+
"references": {}
|
|
947
|
+
},
|
|
948
|
+
"required": false,
|
|
949
|
+
"optional": true,
|
|
950
|
+
"docs": {
|
|
951
|
+
"tags": [{
|
|
952
|
+
"text": "Save button label",
|
|
953
|
+
"name": "uiName"
|
|
954
|
+
}, {
|
|
955
|
+
"text": "string",
|
|
956
|
+
"name": "uiType"
|
|
957
|
+
}, {
|
|
958
|
+
"text": "Customizable Vanity Link",
|
|
959
|
+
"name": "uiGroup"
|
|
960
|
+
}, {
|
|
961
|
+
"text": "impact",
|
|
962
|
+
"name": "requiredFlavor"
|
|
963
|
+
}],
|
|
964
|
+
"text": "Text for the save button in editing mode"
|
|
965
|
+
},
|
|
966
|
+
"attribute": "save-label-text",
|
|
967
|
+
"reflect": false,
|
|
968
|
+
"defaultValue": "\"Save\""
|
|
969
|
+
},
|
|
970
|
+
"savingLabelText": {
|
|
971
|
+
"type": "string",
|
|
972
|
+
"mutable": false,
|
|
973
|
+
"complexType": {
|
|
974
|
+
"original": "string",
|
|
975
|
+
"resolved": "string",
|
|
976
|
+
"references": {}
|
|
977
|
+
},
|
|
978
|
+
"required": false,
|
|
979
|
+
"optional": true,
|
|
980
|
+
"docs": {
|
|
981
|
+
"tags": [{
|
|
982
|
+
"text": "Saving button label",
|
|
983
|
+
"name": "uiName"
|
|
984
|
+
}, {
|
|
985
|
+
"text": "string",
|
|
986
|
+
"name": "uiType"
|
|
987
|
+
}, {
|
|
988
|
+
"text": "Customizable Vanity Link",
|
|
989
|
+
"name": "uiGroup"
|
|
990
|
+
}, {
|
|
991
|
+
"text": "impact",
|
|
992
|
+
"name": "requiredFlavor"
|
|
993
|
+
}],
|
|
994
|
+
"text": "Text for the save button while saving is in progress"
|
|
995
|
+
},
|
|
996
|
+
"attribute": "saving-label-text",
|
|
997
|
+
"reflect": false,
|
|
998
|
+
"defaultValue": "\"Saving...\""
|
|
999
|
+
},
|
|
1000
|
+
"editLabelText": {
|
|
1001
|
+
"type": "string",
|
|
1002
|
+
"mutable": false,
|
|
1003
|
+
"complexType": {
|
|
1004
|
+
"original": "string",
|
|
1005
|
+
"resolved": "string",
|
|
1006
|
+
"references": {}
|
|
1007
|
+
},
|
|
1008
|
+
"required": false,
|
|
1009
|
+
"optional": true,
|
|
1010
|
+
"docs": {
|
|
1011
|
+
"tags": [{
|
|
1012
|
+
"text": "Edit input label",
|
|
1013
|
+
"name": "uiName"
|
|
1014
|
+
}, {
|
|
1015
|
+
"text": "string",
|
|
1016
|
+
"name": "uiType"
|
|
1017
|
+
}, {
|
|
1018
|
+
"text": "Customizable Vanity Link",
|
|
1019
|
+
"name": "uiGroup"
|
|
1020
|
+
}, {
|
|
1021
|
+
"text": "impact",
|
|
1022
|
+
"name": "requiredFlavor"
|
|
1023
|
+
}],
|
|
1024
|
+
"text": "Label shown above the link input while editing"
|
|
1025
|
+
},
|
|
1026
|
+
"attribute": "edit-label-text",
|
|
1027
|
+
"reflect": false,
|
|
1028
|
+
"defaultValue": "\"Enter your link\""
|
|
1029
|
+
},
|
|
1030
|
+
"charactersRemainingText": {
|
|
1031
|
+
"type": "string",
|
|
1032
|
+
"mutable": false,
|
|
1033
|
+
"complexType": {
|
|
1034
|
+
"original": "string",
|
|
1035
|
+
"resolved": "string",
|
|
1036
|
+
"references": {}
|
|
1037
|
+
},
|
|
1038
|
+
"required": false,
|
|
1039
|
+
"optional": true,
|
|
1040
|
+
"docs": {
|
|
1041
|
+
"tags": [{
|
|
1042
|
+
"text": "Characters remaining text",
|
|
1043
|
+
"name": "uiName"
|
|
1044
|
+
}, {
|
|
1045
|
+
"text": "string",
|
|
1046
|
+
"name": "uiType"
|
|
1047
|
+
}, {
|
|
1048
|
+
"text": "Customizable Vanity Link",
|
|
1049
|
+
"name": "uiGroup"
|
|
1050
|
+
}, {
|
|
1051
|
+
"text": "impact",
|
|
1052
|
+
"name": "requiredFlavor"
|
|
1053
|
+
}],
|
|
1054
|
+
"text": "Text shown when nearing the character limit. Use {charactersRemaining} as a placeholder for the count."
|
|
1055
|
+
},
|
|
1056
|
+
"attribute": "characters-remaining-text",
|
|
1057
|
+
"reflect": false,
|
|
1058
|
+
"defaultValue": "\"Characters remaining: {charactersRemaining}\""
|
|
1059
|
+
},
|
|
1060
|
+
"validatingLabelText": {
|
|
1061
|
+
"type": "string",
|
|
1062
|
+
"mutable": false,
|
|
1063
|
+
"complexType": {
|
|
1064
|
+
"original": "string",
|
|
1065
|
+
"resolved": "string",
|
|
1066
|
+
"references": {}
|
|
1067
|
+
},
|
|
1068
|
+
"required": false,
|
|
1069
|
+
"optional": true,
|
|
1070
|
+
"docs": {
|
|
1071
|
+
"tags": [{
|
|
1072
|
+
"text": "Validating label",
|
|
1073
|
+
"name": "uiName"
|
|
1074
|
+
}, {
|
|
1075
|
+
"text": "string",
|
|
1076
|
+
"name": "uiType"
|
|
1077
|
+
}, {
|
|
1078
|
+
"text": "Customizable Vanity Link",
|
|
1079
|
+
"name": "uiGroup"
|
|
1080
|
+
}, {
|
|
1081
|
+
"text": "impact",
|
|
1082
|
+
"name": "requiredFlavor"
|
|
1083
|
+
}],
|
|
1084
|
+
"text": "Text shown while the link is being validated"
|
|
1085
|
+
},
|
|
1086
|
+
"attribute": "validating-label-text",
|
|
1087
|
+
"reflect": false,
|
|
1088
|
+
"defaultValue": "\"Validating...\""
|
|
1089
|
+
},
|
|
1090
|
+
"minCharactersText": {
|
|
1091
|
+
"type": "string",
|
|
1092
|
+
"mutable": false,
|
|
1093
|
+
"complexType": {
|
|
1094
|
+
"original": "string",
|
|
1095
|
+
"resolved": "string",
|
|
1096
|
+
"references": {}
|
|
1097
|
+
},
|
|
1098
|
+
"required": false,
|
|
1099
|
+
"optional": true,
|
|
1100
|
+
"docs": {
|
|
1101
|
+
"tags": [{
|
|
1102
|
+
"text": "Min characters text",
|
|
1103
|
+
"name": "uiName"
|
|
1104
|
+
}, {
|
|
1105
|
+
"text": "string",
|
|
1106
|
+
"name": "uiType"
|
|
1107
|
+
}, {
|
|
1108
|
+
"text": "Customizable Vanity Link",
|
|
1109
|
+
"name": "uiGroup"
|
|
1110
|
+
}, {
|
|
1111
|
+
"text": "impact",
|
|
1112
|
+
"name": "requiredFlavor"
|
|
1113
|
+
}],
|
|
1114
|
+
"text": ""
|
|
1115
|
+
},
|
|
1116
|
+
"attribute": "min-characters-text",
|
|
1117
|
+
"reflect": false,
|
|
1118
|
+
"defaultValue": "\"Minimum 3 characters.\""
|
|
1119
|
+
},
|
|
1120
|
+
"supportLinkText": {
|
|
1121
|
+
"type": "string",
|
|
1122
|
+
"mutable": false,
|
|
1123
|
+
"complexType": {
|
|
1124
|
+
"original": "string",
|
|
1125
|
+
"resolved": "string",
|
|
1126
|
+
"references": {}
|
|
1127
|
+
},
|
|
1128
|
+
"required": false,
|
|
1129
|
+
"optional": true,
|
|
1130
|
+
"docs": {
|
|
1131
|
+
"tags": [{
|
|
1132
|
+
"text": "Support link text",
|
|
1133
|
+
"name": "uiName"
|
|
1134
|
+
}, {
|
|
1135
|
+
"text": "string",
|
|
1136
|
+
"name": "uiType"
|
|
1137
|
+
}, {
|
|
1138
|
+
"text": "Customizable Vanity Link",
|
|
1139
|
+
"name": "uiGroup"
|
|
1140
|
+
}, {
|
|
1141
|
+
"text": "impact",
|
|
1142
|
+
"name": "requiredFlavor"
|
|
1143
|
+
}],
|
|
1144
|
+
"text": "Display text for the support link in the edit limit reached message"
|
|
1145
|
+
},
|
|
1146
|
+
"attribute": "support-link-text",
|
|
1147
|
+
"reflect": false,
|
|
1148
|
+
"defaultValue": "\"Support\""
|
|
1149
|
+
},
|
|
1150
|
+
"saveErrorTitle": {
|
|
1151
|
+
"type": "string",
|
|
1152
|
+
"mutable": false,
|
|
1153
|
+
"complexType": {
|
|
1154
|
+
"original": "string",
|
|
1155
|
+
"resolved": "string",
|
|
1156
|
+
"references": {}
|
|
1157
|
+
},
|
|
1158
|
+
"required": false,
|
|
1159
|
+
"optional": true,
|
|
1160
|
+
"docs": {
|
|
1161
|
+
"tags": [{
|
|
1162
|
+
"text": "Save error title",
|
|
1163
|
+
"name": "uiName"
|
|
1164
|
+
}, {
|
|
1165
|
+
"text": "string",
|
|
1166
|
+
"name": "uiType"
|
|
1167
|
+
}, {
|
|
1168
|
+
"text": "Customizable Vanity Link",
|
|
1169
|
+
"name": "uiGroup"
|
|
1170
|
+
}, {
|
|
1171
|
+
"text": "impact",
|
|
1172
|
+
"name": "requiredFlavor"
|
|
1173
|
+
}],
|
|
1174
|
+
"text": "Title shown when saving fails with an unknown error"
|
|
1175
|
+
},
|
|
1176
|
+
"attribute": "save-error-title",
|
|
1177
|
+
"reflect": false,
|
|
1178
|
+
"defaultValue": "\"Error\""
|
|
1179
|
+
},
|
|
1180
|
+
"saveErrorDescription": {
|
|
1181
|
+
"type": "string",
|
|
1182
|
+
"mutable": false,
|
|
1183
|
+
"complexType": {
|
|
1184
|
+
"original": "string",
|
|
1185
|
+
"resolved": "string",
|
|
1186
|
+
"references": {}
|
|
1187
|
+
},
|
|
1188
|
+
"required": false,
|
|
1189
|
+
"optional": true,
|
|
1190
|
+
"docs": {
|
|
1191
|
+
"tags": [{
|
|
1192
|
+
"text": "Save error description",
|
|
1193
|
+
"name": "uiName"
|
|
1194
|
+
}, {
|
|
1195
|
+
"text": "string",
|
|
1196
|
+
"name": "uiType"
|
|
1197
|
+
}, {
|
|
1198
|
+
"text": "textarea",
|
|
1199
|
+
"name": "uiWidget"
|
|
1200
|
+
}, {
|
|
1201
|
+
"text": "Customizable Vanity Link",
|
|
1202
|
+
"name": "uiGroup"
|
|
1203
|
+
}, {
|
|
1204
|
+
"text": "impact",
|
|
1205
|
+
"name": "requiredFlavor"
|
|
1206
|
+
}],
|
|
1207
|
+
"text": "Description shown when saving fails with an unknown error"
|
|
1208
|
+
},
|
|
1209
|
+
"attribute": "save-error-description",
|
|
1210
|
+
"reflect": false,
|
|
1211
|
+
"defaultValue": "\"Failed to save custom link. Please try again.\""
|
|
1212
|
+
},
|
|
1213
|
+
"demoData": {
|
|
1214
|
+
"type": "unknown",
|
|
1215
|
+
"mutable": false,
|
|
1216
|
+
"complexType": {
|
|
1217
|
+
"original": "DemoData<ShareLinkViewProps>",
|
|
1218
|
+
"resolved": "{ copyTextViewProps?: CopyTextViewProps; allowCustomization?: boolean; customizeLinkLabel?: string; saveLabelText?: string; savingLabelText?: string; cancelLabelText?: string; editLabelText?: string; charactersRemainingText?: string; validatingLabelText?: string; isEditing?: boolean; editValue?: string; domainPrefix?: string; editsRemaining?: number; maxEdits?: number; limitReached?: boolean; validationError?: ValidationErrorInfo; isValidating?: boolean; isSaving?: boolean; characterLimit?: number; minCharacters?: number; charactersRemaining?: number; editLimitText?: string; editLimitReachedText?: string; minCharactersText?: string; supportLinkText?: string; customizeDisabled?: boolean; customizeDisabledTooltip?: string; onCustomizeClick?: () => void; onEditValueChange?: (value: string) => void; onSave?: () => void; onCancel?: () => void; }",
|
|
1219
|
+
"references": {
|
|
1220
|
+
"DemoData": {
|
|
1221
|
+
"location": "import",
|
|
1222
|
+
"path": "../../global/demo"
|
|
1223
|
+
},
|
|
1224
|
+
"ShareLinkViewProps": {
|
|
1225
|
+
"location": "import",
|
|
1226
|
+
"path": "./sqm-share-link-view"
|
|
1227
|
+
}
|
|
1228
|
+
}
|
|
1229
|
+
},
|
|
1230
|
+
"required": false,
|
|
1231
|
+
"optional": true,
|
|
1232
|
+
"docs": {
|
|
1233
|
+
"tags": [{
|
|
1234
|
+
"text": undefined,
|
|
1235
|
+
"name": "undocumented"
|
|
1236
|
+
}, {
|
|
1237
|
+
"text": "object",
|
|
1238
|
+
"name": "uiType"
|
|
1239
|
+
}],
|
|
1240
|
+
"text": ""
|
|
1241
|
+
}
|
|
1242
|
+
}
|
|
1243
|
+
}; }
|
|
1244
|
+
}
|
|
1245
|
+
function useDemoShareLink(props) {
|
|
1246
|
+
var _a;
|
|
1247
|
+
const [open, setOpen] = useState(false);
|
|
1248
|
+
const [isEditing, setIsEditing] = useState(false);
|
|
1249
|
+
const [editValue, setEditValue] = useState("");
|
|
1250
|
+
const copyString = "https://www.example.com/sharelink/abc";
|
|
1251
|
+
const domainPrefix = "https://www.example.com/";
|
|
1252
|
+
const baseProps = {
|
|
1253
|
+
copyTextViewProps: {
|
|
1254
|
+
copyString,
|
|
1255
|
+
tooltiptext: props.tooltiptext,
|
|
1256
|
+
textAlign: props.textAlign,
|
|
1257
|
+
buttonStyle: props.buttonStyle,
|
|
1258
|
+
backgroundColor: props.backgroundColor,
|
|
1259
|
+
textColor: props.textColor,
|
|
1260
|
+
borderRadius: props.borderRadius,
|
|
1261
|
+
buttonType: props.buttonType,
|
|
1262
|
+
copyButtonLabel: props.copyButtonLabel,
|
|
1263
|
+
borderColor: props.borderColor,
|
|
1264
|
+
open,
|
|
1265
|
+
onClick: () => {
|
|
1266
|
+
navigator.clipboard.writeText(copyString);
|
|
1267
|
+
setOpen(true);
|
|
1268
|
+
setTimeout(() => setOpen(false), props.tooltiplifespan);
|
|
1269
|
+
},
|
|
1270
|
+
},
|
|
1271
|
+
allowCustomization: props.allowCustomization,
|
|
1272
|
+
customizeLinkLabel: props.customizeLinkButtonLabel,
|
|
1273
|
+
saveLabelText: props.saveLabelText,
|
|
1274
|
+
savingLabelText: props.savingLabelText,
|
|
1275
|
+
cancelLabelText: props.cancelLabelText,
|
|
1276
|
+
editLabelText: props.editLabelText,
|
|
1277
|
+
charactersRemainingText: props.charactersRemainingText,
|
|
1278
|
+
validatingLabelText: props.validatingLabelText,
|
|
1279
|
+
isEditing,
|
|
1280
|
+
editValue,
|
|
1281
|
+
domainPrefix,
|
|
1282
|
+
editsRemaining: 5,
|
|
1283
|
+
maxEdits: 5,
|
|
1284
|
+
limitReached: false,
|
|
1285
|
+
validationError: null,
|
|
1286
|
+
isValidating: false,
|
|
1287
|
+
isSaving: false,
|
|
1288
|
+
characterLimit: 15,
|
|
1289
|
+
minCharacters: 3,
|
|
1290
|
+
charactersRemaining: 15 - editValue.length,
|
|
1291
|
+
editLimitText: props.editLimitText,
|
|
1292
|
+
editLimitReachedText: props.editLimitReachedText,
|
|
1293
|
+
supportLinkText: props.supportLinkText,
|
|
1294
|
+
minCharactersText: props.minCharactersText,
|
|
1295
|
+
customizeDisabled: false,
|
|
1296
|
+
customizeDisabledTooltip: (_a = props.customizeDisabledTooltip) !== null && _a !== void 0 ? _a : "Link customization is not available.",
|
|
1297
|
+
onCustomizeClick: () => {
|
|
1298
|
+
setIsEditing(true);
|
|
1299
|
+
setEditValue("");
|
|
1300
|
+
},
|
|
1301
|
+
onEditValueChange: (value) => {
|
|
1302
|
+
setEditValue(value);
|
|
1303
|
+
},
|
|
1304
|
+
onSave: () => {
|
|
1305
|
+
setIsEditing(false);
|
|
1306
|
+
},
|
|
1307
|
+
onCancel: () => {
|
|
1308
|
+
setIsEditing(false);
|
|
1309
|
+
setEditValue("");
|
|
1310
|
+
},
|
|
1311
|
+
};
|
|
1312
|
+
return deepmerge(baseProps, props.demoData || {}, {
|
|
1313
|
+
arrayMerge: (_, a) => a,
|
|
1314
|
+
});
|
|
428
1315
|
}
|