♻️ Add a test for internal waitUntil

This commit is contained in:
Baptiste Arnaud
2024-04-16 12:56:47 +02:00
parent 8d62898d15
commit 87f5d8515a
89 changed files with 1029 additions and 1154 deletions

View File

@@ -18,9 +18,9 @@ import CodeMirror, { ReactCodeMirrorRef } from '@uiw/react-codemirror'
import { tokyoNight } from '@uiw/codemirror-theme-tokyo-night'
import { githubLight } from '@uiw/codemirror-theme-github'
import { LanguageName, loadLanguage } from '@uiw/codemirror-extensions-langs'
import { isDefined } from '@udecode/plate-common'
import { CopyButton } from '../CopyButton'
import { MoreInfoTooltip } from '../MoreInfoTooltip'
import { isDefined } from '@typebot.io/lib/utils'
type Props = {
label?: string

View File

@@ -1,4 +1,4 @@
import { sendMagicLinkEmail } from '@typebot.io/emails'
import { sendMagicLinkEmail } from '@typebot.io/email-legacy'
type Props = {
identifier: string

View File

@@ -1,7 +1,7 @@
import React, { useEffect, useRef } from 'react'
import { Plate } from '@udecode/plate-core'
import { platePlugins } from '@/lib/plate'
import { TElement } from '@udecode/plate-common'
import { TElement } from '@udecode/slate'
import { TextEditorEditorContent } from './TextEditorEditorContent'
type TextBubbleEditorContentProps = {

View File

@@ -15,8 +15,10 @@ import { useCallback, useEffect, useRef, useState } from 'react'
import { TextEditorToolBar } from './TextEditorToolBar'
import { useTranslate } from '@tolgee/react'
import { PlateContent, useEditorRef } from '@udecode/plate-core'
import { focusEditor, insertText, selectEditor } from '@udecode/plate-common'
import { useOutsideClick } from '@/hooks/useOutsideClick'
import { insertText } from '@udecode/slate'
import { focusEditor } from '@udecode/slate-react'
import { selectEditor } from '@udecode/plate-utils'
type Props = {
closeEditor: () => void

View File

@@ -2,7 +2,7 @@ import React from 'react'
import {
useMarkToolbarButton,
useMarkToolbarButtonState,
} from '@udecode/plate-common'
} from '@udecode/plate-utils'
import { IconButton, IconButtonProps } from '@chakra-ui/react'
type Props = {

View File

@@ -1,4 +1,4 @@
import { TElement, TText, TDescendant } from '@udecode/plate-common'
import { TElement, TText, TDescendant } from '@udecode/slate'
import { PlateText } from './PlateText'
export const PlateBlock = ({ element }: { element: TElement | TText }) => {

View File

@@ -1,7 +1,7 @@
import { TextInput, NumberInput } from '@/components/inputs'
import { SwitchWithLabel } from '@/components/inputs/SwitchWithLabel'
import { Stack } from '@chakra-ui/react'
import { isDefined } from '@udecode/plate-common'
import { isDefined } from '@typebot.io/lib/utils'
import { SmtpCredentials } from '@typebot.io/schemas'
import React from 'react'

View File

@@ -42,7 +42,7 @@ import { hasDefaultConnector } from '@/features/typebot/helpers/hasDefaultConnec
import { setMultipleRefs } from '@/helpers/setMultipleRefs'
import { TargetEndpoint } from '../../endpoints/TargetEndpoint'
import { SettingsModal } from './SettingsModal'
import { TElement } from '@udecode/plate-common'
import { TElement } from '@udecode/slate'
import { LogicBlockType } from '@typebot.io/schemas/features/blocks/logic/constants'
import { useGroupsStore } from '@/features/graph/hooks/useGroupsStore'
import { TurnableIntoParam } from '@typebot.io/forge'

View File

@@ -1,8 +1,8 @@
import React, { useState } from 'react'
import { ModalProps } from '../../EmbedButton'
import { EmbedModal } from '../../EmbedModal'
import { isDefined } from '@udecode/plate-common'
import { FramerInstructions } from './instructions/FramerInstructions'
import { isDefined } from '@typebot.io/lib/utils'
export const FramerModal = ({ isOpen, onClose, isPublished }: ModalProps) => {
const [selectedEmbedType, setSelectedEmbedType] = useState<

View File

@@ -1,8 +1,8 @@
import React, { useState } from 'react'
import { ModalProps } from '../../EmbedButton'
import { EmbedModal } from '../../EmbedModal'
import { isDefined } from '@udecode/plate-common'
import { GtmInstructions } from './instructions/GtmInstructions'
import { isDefined } from '@typebot.io/lib/utils'
export const GtmModal = ({
isOpen,

View File

@@ -1,8 +1,8 @@
import React, { useState } from 'react'
import { ModalProps } from '../../EmbedButton'
import { EmbedModal } from '../../EmbedModal'
import { isDefined } from '@udecode/plate-common'
import { JavascriptInstructions } from './instructions/JavascriptInstructions'
import { isDefined } from '@typebot.io/lib/utils'
export const JavascriptModal = ({
isOpen,

View File

@@ -1,8 +1,8 @@
import React, { useState } from 'react'
import { ModalProps } from '../../EmbedButton'
import { EmbedModal } from '../../EmbedModal'
import { isDefined } from '@udecode/plate-common'
import { NextjsInstructions } from './instructions/NextjsInstructions'
import { isDefined } from '@typebot.io/lib/utils'
export const NextjsModal = ({ isOpen, onClose, isPublished }: ModalProps) => {
const [selectedEmbedType, setSelectedEmbedType] = useState<

View File

@@ -1,8 +1,8 @@
import React, { useState } from 'react'
import { ModalProps } from '../../EmbedButton'
import { EmbedModal } from '../../EmbedModal'
import { isDefined } from '@udecode/plate-common'
import { ReactInstructions } from './instructions/ReactInstructions'
import { isDefined } from '@typebot.io/lib/utils'
export const ReactModal = ({ isOpen, onClose, isPublished }: ModalProps) => {
const [selectedEmbedType, setSelectedEmbedType] = useState<

View File

@@ -1,8 +1,8 @@
import React, { useState } from 'react'
import { ModalProps } from '../../EmbedButton'
import { EmbedModal } from '../../EmbedModal'
import { isDefined } from '@udecode/plate-common'
import { ScriptInstructions } from './instructions/ScriptInstructions'
import { isDefined } from '@typebot.io/lib/utils'
export const ScriptModal = ({ isOpen, onClose, isPublished }: ModalProps) => {
const [selectedEmbedType, setSelectedEmbedType] = useState<

View File

@@ -1,8 +1,8 @@
import React, { useState } from 'react'
import { ModalProps } from '../../EmbedButton'
import { EmbedModal } from '../../EmbedModal'
import { isDefined } from '@udecode/plate-common'
import { ShopifyInstructions } from './instructions/ShopifyInstructions'
import { isDefined } from '@typebot.io/lib/utils'
export const ShopifyModal = ({
isOpen,

View File

@@ -1,8 +1,8 @@
import React, { useState } from 'react'
import { ModalProps } from '../../EmbedButton'
import { EmbedModal } from '../../EmbedModal'
import { isDefined } from '@udecode/plate-common'
import { WebflowInstructions } from './instructions/WebflowInstructions'
import { isDefined } from '@typebot.io/lib/utils'
export const WebflowModal = ({ isOpen, onClose, isPublished }: ModalProps) => {
const [selectedEmbedType, setSelectedEmbedType] = useState<

View File

@@ -1,8 +1,8 @@
import React, { useState } from 'react'
import { ModalProps } from '../../EmbedButton'
import { EmbedModal } from '../../EmbedModal'
import { isDefined } from '@udecode/plate-common'
import { WixInstructions } from './instructions/WixInstructions'
import { isDefined } from '@typebot.io/lib/utils'
export const WixModal = ({ isOpen, onClose, isPublished }: ModalProps) => {
const [selectedEmbedType, setSelectedEmbedType] = useState<

View File

@@ -1,5 +1,5 @@
import { trpc } from '@/lib/trpc'
import { isDefined } from '@udecode/plate-common'
import { isDefined } from '@typebot.io/lib/utils'
export const useLogs = (
typebotId: string,

View File

@@ -13,7 +13,7 @@ import {
notAuthenticated,
} from '@typebot.io/lib/api'
import { getAuthenticatedUser } from '@/features/auth/helpers/getAuthenticatedUser'
import { sendGuestInvitationEmail } from '@typebot.io/emails'
import { sendGuestInvitationEmail } from '@typebot.io/email-legacy'
import { env } from '@typebot.io/env'
const handler = async (req: NextApiRequest, res: NextApiResponse) => {

View File

@@ -7,7 +7,7 @@ import {
notAuthenticated,
} from '@typebot.io/lib/api'
import { getAuthenticatedUser } from '@/features/auth/helpers/getAuthenticatedUser'
import { sendWorkspaceMemberInvitationEmail } from '@typebot.io/emails'
import { sendWorkspaceMemberInvitationEmail } from '@typebot.io/email-legacy'
import { getSeatsLimit } from '@typebot.io/billing/getSeatsLimit'
import { env } from '@typebot.io/env'