@mediansh/widget 0.3.0 → 0.6.0
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/index.d.ts +23 -3
- package/dist/index.js +1328 -964
- package/dist/index.js.map +1 -1
- package/dist/{message-markdown-5ZZ6COCL.js → message-markdown-LOE74LBE.js} +4 -2
- package/dist/{message-markdown-5ZZ6COCL.js.map → message-markdown-LOE74LBE.js.map} +1 -1
- package/dist/widget.css +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -118,6 +118,22 @@ type MedianSupportOptions = {
|
|
|
118
118
|
* redeploy, and either side saying no is enough to keep it away.
|
|
119
119
|
*/
|
|
120
120
|
requireEmail?: boolean;
|
|
121
|
+
/**
|
|
122
|
+
* Show the first lines of an unread reply on the closed button. On by
|
|
123
|
+
* default: the count says something arrived, and the card is what says
|
|
124
|
+
* whether it is worth opening.
|
|
125
|
+
*
|
|
126
|
+
* <MedianSupport apiKey="median_pk_..." messagePreview={false} />
|
|
127
|
+
*
|
|
128
|
+
* Pass `false` and the corner stays a button with a count on it. Nothing
|
|
129
|
+
* else changes: the reply is still there, still counted, still announced.
|
|
130
|
+
* For a page where a customer's words should never appear unprompted,
|
|
131
|
+
* over somebody's shoulder or in a screen share.
|
|
132
|
+
*
|
|
133
|
+
* Your team can turn it off from the dashboard without a redeploy, and
|
|
134
|
+
* either side saying no is enough to keep the card away.
|
|
135
|
+
*/
|
|
136
|
+
messagePreview?: boolean;
|
|
121
137
|
/**
|
|
122
138
|
* Watch what goes wrong on the page, so a bug report arrives with the
|
|
123
139
|
* error already attached instead of after four messages of asking.
|
|
@@ -161,16 +177,20 @@ type MedianSupportOptions = {
|
|
|
161
177
|
/** Every open and close, whoever asked for it. */
|
|
162
178
|
onOpenChange?: (open: boolean) => void;
|
|
163
179
|
/**
|
|
164
|
-
* Take the visitor to a page, when one of your own tools
|
|
180
|
+
* Take the visitor to a page, when one of your own tools offers one.
|
|
165
181
|
*
|
|
166
182
|
* <MedianSupport apiKey="median_pk_..." onNavigate={router.push} />
|
|
167
183
|
*
|
|
184
|
+
* A tool that answers with a destination puts a button under the reply
|
|
185
|
+
* that explains it, and this is what the button does. Nothing moves on its
|
|
186
|
+
* own: the visitor presses it, or they stay where they are.
|
|
187
|
+
*
|
|
168
188
|
* Called with a path on your own site, already checked against this page's
|
|
169
189
|
* origin. Your router decides what happens: pass `router.push` and the
|
|
170
190
|
* conversation stays open across the move.
|
|
171
191
|
*
|
|
172
|
-
* Without it
|
|
173
|
-
* console while you are building. Nothing else needs it.
|
|
192
|
+
* Without it there is nowhere for a press to go, so no button is shown and
|
|
193
|
+
* the console says so while you are building. Nothing else needs it.
|
|
174
194
|
*/
|
|
175
195
|
onNavigate?: (path: string) => void;
|
|
176
196
|
};
|