-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1bcc8ae
commit 7e61ab1
Showing
61 changed files
with
1,272 additions
and
245 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
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
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
...h/Nodes/StepNode/SettingsPopoverContent/bodies/TypebotLinkSettingsForm/BlocksDropdown.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,41 @@ | ||
import { Input } from '@chakra-ui/react' | ||
import { SearchableDropdown } from 'components/shared/SearchableDropdown' | ||
import { Block } from 'models' | ||
import { useMemo } from 'react' | ||
import { byId } from 'utils' | ||
|
||
type Props = { | ||
blocks: Block[] | ||
blockId?: string | ||
onBlockIdSelected: (blockId: string) => void | ||
isLoading?: boolean | ||
} | ||
|
||
export const BlocksDropdown = ({ | ||
blocks, | ||
blockId, | ||
onBlockIdSelected, | ||
isLoading, | ||
}: Props) => { | ||
const currentBlock = useMemo( | ||
() => blocks?.find(byId(blockId)), | ||
[blockId, blocks] | ||
) | ||
|
||
const handleBlockSelect = (title: string) => { | ||
const id = blocks?.find((b) => b.title === title)?.id | ||
if (id) onBlockIdSelected(id) | ||
} | ||
|
||
if (isLoading) return <Input value="Loading..." isDisabled /> | ||
if (!blocks || blocks.length === 0) | ||
return <Input value="No blocks found" isDisabled /> | ||
return ( | ||
<SearchableDropdown | ||
selectedItem={currentBlock?.title} | ||
items={(blocks ?? []).map((b) => b.title)} | ||
onValueChange={handleBlockSelect} | ||
placeholder={'Select a block'} | ||
/> | ||
) | ||
} |
46 changes: 46 additions & 0 deletions
46
...tepNode/SettingsPopoverContent/bodies/TypebotLinkSettingsForm/TypebotLinkSettingsForm.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,46 @@ | ||
import { Stack } from '@chakra-ui/react' | ||
import { useTypebot } from 'contexts/TypebotContext' | ||
import { TypebotLinkOptions } from 'models' | ||
import { byId } from 'utils' | ||
import { BlocksDropdown } from './BlocksDropdown' | ||
import { TypebotsDropdown } from './TypebotsDropdown' | ||
|
||
type Props = { | ||
options: TypebotLinkOptions | ||
onOptionsChange: (options: TypebotLinkOptions) => void | ||
} | ||
|
||
export const TypebotLinkSettingsForm = ({ | ||
options, | ||
onOptionsChange, | ||
}: Props) => { | ||
const { linkedTypebots, typebot } = useTypebot() | ||
|
||
const handleTypebotIdChange = (typebotId: string) => | ||
onOptionsChange({ ...options, typebotId }) | ||
const handleBlockIdChange = (blockId: string) => | ||
onOptionsChange({ ...options, blockId }) | ||
|
||
return ( | ||
<Stack> | ||
<TypebotsDropdown | ||
typebotId={options.typebotId} | ||
onSelectTypebotId={handleTypebotIdChange} | ||
/> | ||
<BlocksDropdown | ||
blocks={ | ||
typebot && options.typebotId === typebot.id | ||
? typebot.blocks | ||
: linkedTypebots?.find(byId(options.typebotId))?.blocks ?? [] | ||
} | ||
blockId={options.blockId} | ||
onBlockIdSelected={handleBlockIdChange} | ||
isLoading={ | ||
linkedTypebots === undefined && | ||
typebot && | ||
typebot.id !== options.typebotId | ||
} | ||
/> | ||
</Stack> | ||
) | ||
} |
Oops, something went wrong.
7e61ab1
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
granitemj.com
graniteerwin.com
bot.matthesv.de
bot.contakit.com
app.yvon.earth
gelville.com
gmqtops.com
gevenice.com
chat.hayuri.id
chat.matthesv.de
bot.dsignagency.com
viewer.typebot.io
zap.fundviser.in
88584434.therpm.club
demo.wemakebots.xyz
bot.digitalpointer.id
thegraniteempire.com
graniteempirecin.com
92109660.therpm.club
bot.outstandbrand.com
countertopscolumbia.com
criar.somaperuzzo.com
bot.pratikmandalia.com
link.venturasuceder.com
granitedepotasheville.com
chat.thehomebuyersusa.com
granitedepotknoxville.com
invite.bridesquadapp.com
typebot-viewer.vercel.app
bot.adventureconsulting.hu
chat.atlasoutfittersk9.com
granitedepotcrossroads.com
lavergne.thegraniteempire.com
viewer-v2-typebot-io.vercel.app
granitedepotcountertops.com
tarian.theiofoundation.org
granitequartzgreeneville.com
viewer-v2-git-main-typebot-io.vercel.app
bot.pinpointinteractive.com
7e61ab1
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
app.typebot.io
builder-v2-git-main-typebot-io.vercel.app
builder-v2-typebot-io.vercel.app