2
0

Add new Jump block

Also improve Select input with a clear button

Closes #186
This commit is contained in:
Baptiste Arnaud
2023-03-03 15:03:31 +01:00
parent f1a9a1ce8b
commit 022c5a5738
32 changed files with 598 additions and 242 deletions

View File

@ -5,12 +5,14 @@ import { redirectOptionsSchema, redirectBlockSchema } from './redirect'
import { setVariableOptionsSchema, setVariableBlockSchema } from './setVariable'
import { typebotLinkOptionsSchema, typebotLinkBlockSchema } from './typebotLink'
import { waitBlockSchema, waitOptionsSchema } from './wait'
import { jumpBlockSchema, jumpOptionsSchema } from './jump'
const logicBlockOptionsSchema = scriptOptionsSchema
.or(redirectOptionsSchema)
.or(setVariableOptionsSchema)
.or(typebotLinkOptionsSchema)
.or(waitOptionsSchema)
.or(jumpOptionsSchema)
export const logicBlockSchema = scriptBlockSchema
.or(conditionBlockSchema)
@ -18,6 +20,7 @@ export const logicBlockSchema = scriptBlockSchema
.or(typebotLinkBlockSchema)
.or(setVariableBlockSchema)
.or(waitBlockSchema)
.or(jumpBlockSchema)
export type LogicBlock = z.infer<typeof logicBlockSchema>
export type LogicBlockOptions = z.infer<typeof logicBlockOptionsSchema>