-
-
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.
- Loading branch information
1 parent
3010976
commit b1aecf8
Showing
19 changed files
with
455 additions
and
28 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
149 changes: 149 additions & 0 deletions
149
...nts/shared/Graph/Nodes/StepNode/SettingsPopoverContent/bodies/RatingInputSettingsBody.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,149 @@ | ||
import { FormLabel, Stack } from '@chakra-ui/react' | ||
import { DropdownList } from 'components/shared/DropdownList' | ||
import { SwitchWithLabel } from 'components/shared/SwitchWithLabel' | ||
import { Input } from 'components/shared/Textbox' | ||
import { VariableSearchInput } from 'components/shared/VariableSearchInput' | ||
import { RatingInputOptions, Variable } from 'models' | ||
import React from 'react' | ||
|
||
type RatingInputSettingsProps = { | ||
options: RatingInputOptions | ||
onOptionsChange: (options: RatingInputOptions) => void | ||
} | ||
|
||
export const RatingInputSettings = ({ | ||
options, | ||
onOptionsChange, | ||
}: RatingInputSettingsProps) => { | ||
const handleLengthChange = (length: number) => | ||
onOptionsChange({ ...options, length }) | ||
|
||
const handleTypeChange = (buttonType: 'Icons' | 'Numbers') => | ||
onOptionsChange({ ...options, buttonType }) | ||
|
||
const handleCustomIconCheck = (isEnabled: boolean) => | ||
onOptionsChange({ | ||
...options, | ||
customIcon: { ...options.customIcon, isEnabled }, | ||
}) | ||
|
||
const handleIconSvgChange = (svg: string) => | ||
onOptionsChange({ ...options, customIcon: { ...options.customIcon, svg } }) | ||
|
||
const handleLeftLabelChange = (left: string) => | ||
onOptionsChange({ ...options, labels: { ...options.labels, left } }) | ||
|
||
const handleMiddleLabelChange = (middle: string) => | ||
onOptionsChange({ ...options, labels: { ...options.labels, middle } }) | ||
|
||
const handleRightLabelChange = (right: string) => | ||
onOptionsChange({ ...options, labels: { ...options.labels, right } }) | ||
|
||
const handleButtonLabelChange = (button: string) => | ||
onOptionsChange({ ...options, labels: { ...options.labels, button } }) | ||
|
||
const handleVariableChange = (variable?: Variable) => | ||
onOptionsChange({ ...options, variableId: variable?.id }) | ||
|
||
return ( | ||
<Stack spacing={4}> | ||
<Stack> | ||
<FormLabel mb="0" htmlFor="button"> | ||
Maximum: | ||
</FormLabel> | ||
<DropdownList | ||
onItemSelect={handleLengthChange} | ||
items={[3, 4, 5, 6, 7, 8, 9, 10]} | ||
currentItem={options.length} | ||
/> | ||
</Stack> | ||
|
||
<Stack> | ||
<FormLabel mb="0" htmlFor="button"> | ||
Type: | ||
</FormLabel> | ||
<DropdownList | ||
onItemSelect={handleTypeChange} | ||
items={['Icons', 'Numbers']} | ||
currentItem={options.buttonType} | ||
/> | ||
</Stack> | ||
|
||
{options.buttonType === 'Icons' && ( | ||
<SwitchWithLabel | ||
id="switch" | ||
label="Custom icon?" | ||
initialValue={options.customIcon.isEnabled} | ||
onCheckChange={handleCustomIconCheck} | ||
/> | ||
)} | ||
{options.buttonType === 'Icons' && options.customIcon.isEnabled && ( | ||
<Stack> | ||
<FormLabel mb="0" htmlFor="svg"> | ||
Icon SVG: | ||
</FormLabel> | ||
<Input | ||
id="svg" | ||
defaultValue={options.customIcon.svg} | ||
onChange={handleIconSvgChange} | ||
placeholder="<svg>...</svg>" | ||
/> | ||
</Stack> | ||
)} | ||
<Stack> | ||
<FormLabel mb="0" htmlFor="button"> | ||
1 label: | ||
</FormLabel> | ||
<Input | ||
id="button" | ||
defaultValue={options.labels.left} | ||
onChange={handleLeftLabelChange} | ||
placeholder="Not likely at all" | ||
/> | ||
</Stack> | ||
{options.length >= 4 && ( | ||
<Stack> | ||
<FormLabel mb="0" htmlFor="button"> | ||
{Math.floor(options.length / 2)} label: | ||
</FormLabel> | ||
<Input | ||
id="button" | ||
defaultValue={options.labels.middle} | ||
onChange={handleMiddleLabelChange} | ||
placeholder="Neutral" | ||
/> | ||
</Stack> | ||
)} | ||
<Stack> | ||
<FormLabel mb="0" htmlFor="button"> | ||
{options.length} label: | ||
</FormLabel> | ||
<Input | ||
id="button" | ||
defaultValue={options.labels.right} | ||
onChange={handleRightLabelChange} | ||
placeholder="Extremely likely" | ||
/> | ||
</Stack> | ||
<Stack> | ||
<FormLabel mb="0" htmlFor="button"> | ||
Button label: | ||
</FormLabel> | ||
<Input | ||
id="button" | ||
defaultValue={options.labels.button} | ||
onChange={handleButtonLabelChange} | ||
/> | ||
</Stack> | ||
<Stack> | ||
<FormLabel mb="0" htmlFor="variable"> | ||
Save answer in a variable: | ||
</FormLabel> | ||
<VariableSearchInput | ||
initialVariableId={options.variableId} | ||
onSelectVariable={handleVariableChange} | ||
/> | ||
</Stack> | ||
</Stack> | ||
) | ||
} |
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
12 changes: 12 additions & 0 deletions
12
...er/components/shared/Graph/Nodes/StepNode/StepNodeContent/contents/RatingInputContent.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,12 @@ | ||
import { Text } from '@chakra-ui/react' | ||
import { RatingInputStep } from 'models' | ||
|
||
type Props = { | ||
step: RatingInputStep | ||
} | ||
|
||
export const RatingInputContent = ({ step }: Props) => ( | ||
<Text noOfLines={0} pr="6"> | ||
Rate from 1 to {step.options.length} | ||
</Text> | ||
) |
Oops, something went wrong.
b1aecf8
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
sat.cr8.ai
chat.sureb4.com
an.nigerias.io
ar.nigerias.io
apo.nigerias.io
bt.id8rs.com
apr.nigerias.io
vhpage.cr8.ai
am.nigerias.io
aso.nigerias.io
feedback.ofx.one
bot.piccinato.co
sakuranembro.it
games.klujo.com
faqs.nigerias.io
bot.upfunnel.art
clo.closeer.work
eventhub.com.au
stan.vselise.com
voicehelp.cr8.ai
zap.techadviser.in
bot.eventhub.com.au
typebot.stillio.com
forms.webisharp.com
app.chatforms.net
bot.ansuraniphone.my
bot.cotemeuplano.com
bot.incusservices.com
chat.hayurihijab.com
bot.meuesocial.com.br
cdd.searchcube.com.sg
kodawariab736.skeep.it
form.searchcube.com.sg
info.clickasuransi.com
c23111azqw.nigerias.io
gcase.barrettamario.it
mainmenu.diddancing.com
83242573.actualizar.xyz
serviziaziendali.online
hunterbot.saleshunter.ai
aibot.angrybranding.co.uk
type.opaulovieira.com.br
piazzatorre.barrettamario.it
onboarding.libertydreamcare.ie
boyfriend-breakup.riku.ai
type.dericsoncalari.com.br
bot.comercializadoraomicron.com
bookings.littlepartymonkeys.com
personal-trainer.barrettamario.it
studiotecnicoimmobiliaremerelli.it
viewer-v2-alpha-typebot-io.vercel.app
type.talitasouzamarques.com.br
viewer-v2-alpha-git-main-typebot-io.vercel.app
b1aecf8
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-typebot-io.vercel.app
docs-git-main-typebot-io.vercel.app
docs.typebot.io
b1aecf8
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
landing-page-v2-git-main-typebot-io.vercel.app
typebot.io
landing-page-v2-typebot-io.vercel.app
www.typebot.io
get-typebot.com
www.get-typebot.com
b1aecf8
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
bergamo.store
yoda.riku.ai
bot.joof.it
talk.gocare.io
bot.tvbeat.it
app.yvon.earth
bots.bridge.ai
gollum.riku.ai
chat.hayuri.id
bot.jesopizz.it
fitness.riku.ai
zap.fundviser.in
bot.contakit.com
bot.rihabilita.it
chatbot.matthesv.de
bot.dsignagency.com
demo.wemakebots.xyz
bot.danyservice.it
viewer.typebot.io
88584434.therpm.club
92109660.therpm.club
hello.advergreen.com
bot.barrettamario.it
bot.coachayongzul.com
bot.digitalpointer.id
criar.somaperuzzo.com
bot.eikju.photography
bot.ilmuseoaiborghi.it
bot.outstandbrand.com
bot.robertohairlab.it
bot.pratikmandalia.com
michaeljackson.riku.ai
87656003.actualizar.xyz
form.bridesquadapp.com
88152257.actualizar.xyz
91375310.actualizar.xyz
invite.bridesquadapp.com
link.venturasuceder.com
bot.hotelplayarimini.it
arrivalx2.wpwakanda.com
bot.amicidisanfaustino.it
chat.thehomebuyersusa.com
forms.hiabhaykulkarni.com
typebot-viewer.vercel.app
casestudyemb.wpwakanda.com
bot.adventureconsulting.hu
herbalife.barrettamario.it
chat.atlasoutfittersk9.com
liveconvert.kandalearn.com
homepageonly.wpwakanda.com
tarian.theiofoundation.org
bot.pinpointinteractive.com
bot.polychromes-project.com
mainmenu1one.wpwakanda.com
viewer-v2-typebot-io.vercel.app
bot.studiotecnicoimmobiliaremerelli.it
bot.seidibergamoseanchetu.it
bot.seidinembroseanchetu.it
liveconvert2.kandalearn.com
forms.escoladeautomacao.com.br
viewer-v2-git-main-typebot-io.vercel.app
b1aecf8
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