-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
29 changed files
with
306 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
apps/builder/src/features/blocks/bubbles/audio/audio.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import test, { expect } from '@playwright/test' | ||
import { createTypebots } from 'utils/playwright/databaseActions' | ||
import { parseDefaultGroupWithBlock } from 'utils/playwright/databaseHelpers' | ||
import { BubbleBlockType, defaultAudioBubbleContent } from 'models' | ||
import cuid from 'cuid' | ||
import { getTestAsset } from '@/test/utils/playwright' | ||
import { typebotViewer } from 'utils/playwright/testHelpers' | ||
|
||
const audioSampleUrl = | ||
'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3' | ||
|
||
test('should work as expected', async ({ page }) => { | ||
const typebotId = cuid() | ||
await createTypebots([ | ||
{ | ||
id: typebotId, | ||
...parseDefaultGroupWithBlock({ | ||
type: BubbleBlockType.AUDIO, | ||
content: defaultAudioBubbleContent, | ||
}), | ||
}, | ||
]) | ||
|
||
await page.goto(`/typebots/${typebotId}/edit`) | ||
await page.getByText('Click to edit...').click() | ||
await page | ||
.getByPlaceholder('Paste the audio file link...') | ||
.fill(audioSampleUrl) | ||
await expect(page.locator('audio')).toHaveAttribute('src', audioSampleUrl) | ||
await page.getByRole('button', { name: 'Upload' }).click() | ||
await page.setInputFiles('input[type="file"]', getTestAsset('sample.mp3')) | ||
await expect(page.locator('audio')).toHaveAttribute( | ||
'src', | ||
RegExp(`/public/typebots/${typebotId}/blocks`, 'gm') | ||
) | ||
await page.getByRole('button', { name: 'Preview' }).click() | ||
await expect(typebotViewer(page).locator('audio')).toHaveAttribute( | ||
'src', | ||
RegExp(`/public/typebots/${typebotId}/blocks`, 'gm') | ||
) | ||
}) |
68 changes: 68 additions & 0 deletions
68
apps/builder/src/features/blocks/bubbles/audio/components/AudioBubbleForm.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import { Button, Flex, HStack, Stack, Text } from '@chakra-ui/react' | ||
import { AudioBubbleContent } from 'models' | ||
import { Input } from '@/components/inputs' | ||
import { useState } from 'react' | ||
import { UploadButton } from '@/components/ImageUploadContent/UploadButton' | ||
|
||
type Props = { | ||
fileUploadPath: string | ||
content: AudioBubbleContent | ||
onSubmit: (content: AudioBubbleContent) => void | ||
} | ||
|
||
export const AudioBubbleForm = ({ | ||
fileUploadPath, | ||
content, | ||
onSubmit, | ||
}: Props) => { | ||
const [currentTab, setCurrentTab] = useState<'link' | 'upload'>('link') | ||
|
||
const submit = (url: string) => onSubmit({ url }) | ||
|
||
return ( | ||
<Stack> | ||
<HStack> | ||
<Button | ||
variant={currentTab === 'upload' ? 'solid' : 'ghost'} | ||
onClick={() => setCurrentTab('upload')} | ||
size="sm" | ||
> | ||
Upload | ||
</Button> | ||
<Button | ||
variant={currentTab === 'link' ? 'solid' : 'ghost'} | ||
onClick={() => setCurrentTab('link')} | ||
size="sm" | ||
> | ||
Embed link | ||
</Button> | ||
</HStack> | ||
<Stack p="2"> | ||
{currentTab === 'upload' && ( | ||
<Flex justify="center" py="2"> | ||
<UploadButton | ||
fileType="audio" | ||
filePath={fileUploadPath} | ||
onFileUploaded={submit} | ||
colorScheme="blue" | ||
> | ||
Choose a file | ||
</UploadButton> | ||
</Flex> | ||
)} | ||
{currentTab === 'link' && ( | ||
<> | ||
<Input | ||
placeholder="Paste the audio file link..." | ||
defaultValue={content.url ?? ''} | ||
onChange={submit} | ||
/> | ||
<Text fontSize="sm" color="gray.400" textAlign="center"> | ||
Works with .MP3s, .WAVs and .OGGs | ||
</Text> | ||
</> | ||
)} | ||
</Stack> | ||
</Stack> | ||
) | ||
} |
10 changes: 10 additions & 0 deletions
10
apps/builder/src/features/blocks/bubbles/audio/components/AudioBubbleIcon.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { featherIconsBaseProps } from '@/components/icons' | ||
import { Icon, IconProps } from '@chakra-ui/react' | ||
import React from 'react' | ||
|
||
export const AudioBubbleIcon = (props: IconProps) => ( | ||
<Icon color="blue.500" {...featherIconsBaseProps} {...props}> | ||
<path d="M3 18v-6a9 9 0 0 1 18 0v6"></path> | ||
<path d="M21 19a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3zM3 19a2 2 0 0 0 2 2h1a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2H3z"></path> | ||
</Icon> | ||
) |
14 changes: 14 additions & 0 deletions
14
apps/builder/src/features/blocks/bubbles/audio/components/AudioBubbleNode.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Text } from '@chakra-ui/react' | ||
import { AudioBubbleContent } from 'models' | ||
import { isDefined } from 'utils' | ||
|
||
type Props = { | ||
url: AudioBubbleContent['url'] | ||
} | ||
|
||
export const AudioBubbleNode = ({ url }: Props) => | ||
isDefined(url) ? ( | ||
<audio src={url} controls /> | ||
) : ( | ||
<Text color={'gray.500'}>Click to edit...</Text> | ||
) |
2 changes: 2 additions & 0 deletions
2
apps/builder/src/features/blocks/bubbles/audio/components/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './AudioBubbleNode' | ||
export * from './AudioBubbleIcon' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './components' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { FlowToBot } from '../../../../src/js/FlowToBot' | ||
|
||
# Audio | ||
|
||
The Audio bubble block allows you to play a recorded audio to your user. You can upload an audio file or directly paste a URL. | ||
|
||
<FlowToBot | ||
flow={ | ||
<img | ||
src="/img/blocks/bubbles/audio/editor.png" | ||
width="100%" | ||
style={{ maxWidth: '400px' }} | ||
alt="Audio bubble" | ||
/> | ||
} | ||
bot={ | ||
<video controls width="100%" style={{ maxWidth: '400px' }}> | ||
<source src="/img/blocks/bubbles/audio/bot.mp4" type="video/mp4" /> | ||
</video> | ||
} | ||
/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
--- | ||
sidebar_position: 4 | ||
--- | ||
|
||
import { FlowToBot } from '../../../../src/js/FlowToBot' | ||
|
||
# Embed | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
--- | ||
sidebar_position: 3 | ||
--- | ||
|
||
import { FlowToBot } from '../../../../src/js/FlowToBot' | ||
|
||
# Video | ||
|
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
7db0e01
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
viewer-v2-alpha – ./apps/viewer
ns8.vn
yobot.me
247987.com
8jours.top
bot.aws.bj
bot.bbc.bj
finplex.be
sat.cr8.ai
bot.aipr.kr
minipost.uk
bt.id8rs.com
bot.krdfy.com
goldorayo.com
vhpage.cr8.ai
am.nigerias.io
an.nigerias.io
ar.nigerias.io
bot.enreso.org
bot.lalmon.com
ticketfute.com
apo.nigerias.io
apr.nigerias.io
aso.nigerias.io
bot.ageenda.com
bot.artiweb.app
bot.devitus.com
bot.tc-mail.com
chat.sureb4.com
eventhub.com.au
games.klujo.com
sakuranembro.it
typebot.aloe.do
bot.piccinato.co
bot.upfunnel.art
botc.ceox.com.br
clo.closeer.work
faqs.nigerias.io
feedback.ofx.one
form.syncwin.com
kw.wpwakanda.com
myrentalhost.com
stan.vselise.com
start.taxtree.io
typebot.aloe.bot
voicehelp.cr8.ai
app.chatforms.net
bot.agfunnel.tech
bot.hostnation.de
bot.maitempah.com
bot.phuonghub.com
bot.reviewzer.com
cares.urlabout.me
fmm.wpwakanda.com
gentleman-shop.fr
k1.kandabrand.com
onboarding.growthside.io
reward.onlinebotdemo.xyz
type.opaulovieira.com.br
aibot.angrybranding.co.uk
bot.aidigitalmarketing.kr
bot.arraesecenteno.com.br
bot.blackboxsports.com.br
bot.cabinrentalagency.com
boyfriend-breakup.riku.ai
brigadeirosemdrama.com.br
chat.ertcrebateportal.com
chat.thisiscrushhouse.com
sellmyharleylouisiana.com
verfica.botmachine.com.br
configurator.bouclidom.com
help.atlasoutfittersk9.com
ted.meujalecobrasil.com.br
type.dericsoncalari.com.br
chatbot.berbelanjabiz.trade
designguide.techyscouts.com
presente.empresarias.com.mx
sell.sellthemotorhome.co.uk
anamnese.odontopavani.com.br
austin.channelautomation.com
bot.marketingplusmindset.com
piazzatorre.barrettamario.it
requests.swamprecordsgnv.com
type.cookieacademyonline.com
bot.brigadeirosemdrama.com.br
onboarding.libertydreamcare.ie
type.talitasouzamarques.com.br
agendamento.sergiolimajr.com.br
anamnese.clinicamegasjdr.com.br
bookings.littlepartymonkeys.com
bot.comercializadoraomicron.com
yourfeedback.comebackreward.com
personal-trainer.barrettamario.it
preagendamento.sergiolimajr.com.br
studiotecnicoimmobiliaremerelli.it
download.thailandmicespecialist.com
register.thailandmicespecialist.com
viewer-v2-alpha-typebot-io.vercel.app
pesquisa.escolamodacomproposito.com.br
anamnese.clinicaramosodontologia.com.br
viewer-v2-alpha-git-main-typebot-io.vercel.app
7db0e01
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
docs – ./apps/docs
docs-git-main-typebot-io.vercel.app
docs.typebot.io
docs-typebot-io.vercel.app
7db0e01
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
viewer-v2 – ./apps/viewer
bot.joof.it
yoda.riku.ai
bergamo.store
bot.tvbeat.it
app.yvon.earth
bots.bridge.ai
chat.hayuri.id
gollum.riku.ai
talk.gocare.io
bot.jesopizz.it
fitness.riku.ai
bot.contakit.com
zap.fundviser.in
bot.rihabilita.it
viewer.typebot.io
bot.danyservice.it
bot.dsignagency.com
chatbot.matthesv.de
demo.wemakebots.xyz
88584434.therpm.club
92109660.therpm.club
bot.barrettamario.it
hello.advergreen.com
bot.coachayongzul.com
bot.digitalpointer.id
bot.eikju.photography
bot.outstandbrand.com
bot.robertohairlab.it
criar.somaperuzzo.com
bot.ilmuseoaiborghi.it
bot.pratikmandalia.com
form.bridesquadapp.com
michaeljackson.riku.ai
87656003.actualizar.xyz
88152257.actualizar.xyz
91375310.actualizar.xyz
arrivalx2.wpwakanda.com
bot.hotelplayarimini.it
link.venturasuceder.com
invite.bridesquadapp.com
bot.amicidisanfaustino.it
chat.thehomebuyersusa.com
forms.hiabhaykulkarni.com
typebot-viewer.vercel.app
bot.adventureconsulting.hu
casestudyemb.wpwakanda.com
chat.atlasoutfittersk9.com
herbalife.barrettamario.it
homepageonly.wpwakanda.com
liveconvert.kandalearn.com
mainmenu1one.wpwakanda.com
tarian.theiofoundation.org
bot.pinpointinteractive.com
bot.polychromes-project.com
bot.seidinembroseanchetu.it
liveconvert2.kandalearn.com
bot.seidibergamoseanchetu.it
forms.escoladeautomacao.com.br
viewer-v2-typebot-io.vercel.app
bot.studiotecnicoimmobiliaremerelli.it
viewer-v2-git-main-typebot-io.vercel.app
7db0e01
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
landing-page-v2 – ./apps/landing-page
www.typebot.io
www.get-typebot.com
typebot.io
landing-page-v2-typebot-io.vercel.app
landing-page-v2-git-main-typebot-io.vercel.app
get-typebot.com
7db0e01
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
builder-v2 – ./apps/builder
builder-v2-git-main-typebot-io.vercel.app
app.typebot.io
builder-v2-typebot-io.vercel.app