🚸 Improve support accessibility
Add documentation button in board menu and hide the support bubble in the editor. Makes it accessible only by clicking the "Help" button
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@typebot.io/js",
|
||||
"version": "0.0.49",
|
||||
"version": "0.0.50",
|
||||
"description": "Javascript library to display typebots on your website",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
|
||||
@@ -32,4 +32,6 @@ export const defaultBubbleProps: BubbleProps = {
|
||||
onOpen: undefined,
|
||||
theme: undefined,
|
||||
previewMessage: undefined,
|
||||
onPreviewMessageClick: undefined,
|
||||
autoShowDelay: undefined,
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ export const Bubble = (props: BubbleProps) => {
|
||||
'previewMessage',
|
||||
'onPreviewMessageClick',
|
||||
'theme',
|
||||
'autoShowDelay',
|
||||
])
|
||||
const [prefilledVariables, setPrefilledVariables] = createSignal(
|
||||
// eslint-disable-next-line solid/reactivity
|
||||
@@ -47,12 +48,19 @@ export const Bubble = (props: BubbleProps) => {
|
||||
|
||||
onMount(() => {
|
||||
window.addEventListener('message', processIncomingEvent)
|
||||
const autoShowDelay = bubbleProps.previewMessage?.autoShowDelay
|
||||
const autoShowDelay = bubbleProps.autoShowDelay
|
||||
const previewMessageAutoShowDelay =
|
||||
bubbleProps.previewMessage?.autoShowDelay
|
||||
if (isDefined(autoShowDelay)) {
|
||||
setTimeout(() => {
|
||||
showMessage()
|
||||
openBot()
|
||||
}, autoShowDelay)
|
||||
}
|
||||
if (isDefined(previewMessageAutoShowDelay)) {
|
||||
setTimeout(() => {
|
||||
showMessage()
|
||||
}, previewMessageAutoShowDelay)
|
||||
}
|
||||
})
|
||||
|
||||
onCleanup(() => {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
export type BubbleParams = {
|
||||
theme?: BubbleTheme
|
||||
previewMessage?: PreviewMessageParams
|
||||
autoShowDelay?: number
|
||||
}
|
||||
|
||||
export type BubbleTheme = {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@typebot.io/react",
|
||||
"version": "0.0.49",
|
||||
"version": "0.0.50",
|
||||
"description": "React library to display typebots on your website",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
||||
Reference in New Issue
Block a user