♻️ Re-organize workspace folders

This commit is contained in:
Baptiste Arnaud
2023-03-15 08:35:16 +01:00
parent 25c367901f
commit cbc8194f19
987 changed files with 2716 additions and 2770 deletions

View File

@@ -1,6 +1,6 @@
import { Stack } from '@chakra-ui/react'
import { DropdownList } from '@/components/DropdownList'
import { Comparison, Variable, ComparisonOperators } from 'models'
import { Comparison, Variable, ComparisonOperators } from '@typebot.io/schemas'
import { TableListItemProps } from '@/components/TableList'
import { VariableSearchInput } from '@/components/inputs/VariableSearchInput'
import { TextInput } from '@/components/inputs'

View File

@@ -1,6 +1,6 @@
import { Flex } from '@chakra-ui/react'
import { DropdownList } from '@/components/DropdownList'
import { Comparison, ConditionItem, LogicalOperator } from 'models'
import { Comparison, ConditionItem, LogicalOperator } from '@typebot.io/schemas'
import React from 'react'
import { ComparisonItem } from './ComparisonItem'
import { TableList } from '@/components/TableList'

View File

@@ -22,9 +22,9 @@ import {
ComparisonOperators,
ItemType,
ItemIndices,
} from 'models'
} from '@typebot.io/schemas'
import React, { useRef } from 'react'
import { byId, isNotDefined } from 'utils'
import { byId, isNotDefined } from '@typebot.io/lib'
import { PlusIcon } from '@/components/icons'
import { ConditionItemForm } from './ConditionItemForm'
import { useGraph } from '@/features/graph'

View File

@@ -1,5 +1,5 @@
import test, { expect } from '@playwright/test'
import { importTypebotInDatabase } from 'utils/playwright/databaseActions'
import { importTypebotInDatabase } from '@typebot.io/lib/playwright/databaseActions'
import { createId } from '@paralleldrive/cuid2'
import { getTestAsset } from '@/test/utils/playwright'

View File

@@ -1,8 +1,8 @@
import React from 'react'
import { Tag, Text } from '@chakra-ui/react'
import { useTypebot } from '@/features/editor'
import { byId, isDefined, parseGroupTitle } from 'utils'
import { JumpBlock } from 'models/features/blocks/logic/jump'
import { byId, isDefined, parseGroupTitle } from '@typebot.io/lib'
import { JumpBlock } from '@typebot.io/schemas/features/blocks/logic/jump'
type Props = {
options: JumpBlock['options']

View File

@@ -1,9 +1,9 @@
import { Select } from '@/components/inputs/Select'
import { useTypebot } from '@/features/editor'
import { Stack } from '@chakra-ui/react'
import { JumpBlock } from 'models/features/blocks/logic/jump'
import { JumpBlock } from '@typebot.io/schemas/features/blocks/logic/jump'
import React from 'react'
import { byId, parseGroupTitle } from 'utils'
import { byId, parseGroupTitle } from '@typebot.io/lib'
type Props = {
groupId: string

View File

@@ -1,5 +1,5 @@
import test, { expect } from '@playwright/test'
import { importTypebotInDatabase } from 'utils/playwright/databaseActions'
import { importTypebotInDatabase } from '@typebot.io/lib/playwright/databaseActions'
import { createId } from '@paralleldrive/cuid2'
import { getTestAsset } from '@/test/utils/playwright'

View File

@@ -1,6 +1,6 @@
import React from 'react'
import { Text } from '@chakra-ui/react'
import { RedirectOptions } from 'models'
import { RedirectOptions } from '@typebot.io/schemas'
type Props = { url: RedirectOptions['url'] }

View File

@@ -1,7 +1,7 @@
import { TextInput } from '@/components/inputs'
import { SwitchWithLabel } from '@/components/inputs/SwitchWithLabel'
import { Stack } from '@chakra-ui/react'
import { RedirectOptions } from 'models'
import { RedirectOptions } from '@typebot.io/schemas'
import React from 'react'
type Props = {

View File

@@ -1,5 +1,5 @@
import test, { expect } from '@playwright/test'
import { importTypebotInDatabase } from 'utils/playwright/databaseActions'
import { importTypebotInDatabase } from '@typebot.io/lib/playwright/databaseActions'
import { createId } from '@paralleldrive/cuid2'
import { getTestAsset } from '@/test/utils/playwright'

View File

@@ -1,6 +1,6 @@
import React from 'react'
import { Text } from '@chakra-ui/react'
import { ScriptOptions } from 'models'
import { ScriptOptions } from '@typebot.io/schemas'
type Props = ScriptOptions

View File

@@ -2,7 +2,7 @@ import { Stack, Text } from '@chakra-ui/react'
import { CodeEditor } from '@/components/inputs/CodeEditor'
import React from 'react'
import { TextInput } from '@/components/inputs'
import { ScriptOptions } from 'models'
import { ScriptOptions } from '@typebot.io/schemas'
type Props = {
options: ScriptOptions

View File

@@ -1,5 +1,5 @@
import test, { expect } from '@playwright/test'
import { importTypebotInDatabase } from 'utils/playwright/databaseActions'
import { importTypebotInDatabase } from '@typebot.io/lib/playwright/databaseActions'
import { createId } from '@paralleldrive/cuid2'
import { getTestAsset } from '@/test/utils/playwright'

View File

@@ -1,7 +1,7 @@
import { Text } from '@chakra-ui/react'
import { useTypebot } from '@/features/editor'
import { SetVariableBlock } from 'models'
import { byId } from 'utils'
import { SetVariableBlock } from '@typebot.io/schemas'
import { byId } from '@typebot.io/lib'
export const SetVariableContent = ({ block }: { block: SetVariableBlock }) => {
const { typebot } = useTypebot()

View File

@@ -1,6 +1,6 @@
import { FormLabel, HStack, Stack, Switch, Text } from '@chakra-ui/react'
import { CodeEditor } from '@/components/inputs/CodeEditor'
import { SetVariableOptions, Variable } from 'models'
import { SetVariableOptions, Variable } from '@typebot.io/schemas'
import React from 'react'
import { VariableSearchInput } from '@/components/inputs/VariableSearchInput'
import { Textarea } from '@/components/inputs'

View File

@@ -1,5 +1,5 @@
import test, { expect } from '@playwright/test'
import { importTypebotInDatabase } from 'utils/playwright/databaseActions'
import { importTypebotInDatabase } from '@typebot.io/lib/playwright/databaseActions'
import { createId } from '@paralleldrive/cuid2'
import { getTestAsset } from '@/test/utils/playwright'

View File

@@ -1,13 +1,13 @@
import prisma from '@/lib/prisma'
import { canReadTypebots } from '@/utils/api/dbRules'
import { User } from 'db'
import { User } from '@typebot.io/prisma'
import {
LogicBlockType,
PublicTypebot,
Typebot,
TypebotLinkBlock,
} from 'models'
import { isDefined } from 'utils'
} from '@typebot.io/schemas'
import { isDefined } from '@typebot.io/lib'
export const getLinkedTypebots = async (
typebot: Pick<PublicTypebot, 'groups'>,

View File

@@ -1,7 +1,7 @@
import { Select } from '@/components/inputs/Select'
import { Input } from '@chakra-ui/react'
import { Group } from 'models'
import { parseGroupTitle } from 'utils'
import { Group } from '@typebot.io/schemas'
import { parseGroupTitle } from '@typebot.io/lib'
type Props = {
groups: Group[]

View File

@@ -1,7 +1,7 @@
import { Stack } from '@chakra-ui/react'
import { useTypebot } from '@/features/editor'
import { TypebotLinkOptions } from 'models'
import { byId } from 'utils'
import { TypebotLinkOptions } from '@typebot.io/schemas'
import { byId } from '@typebot.io/lib'
import { GroupsDropdown } from './GroupsDropdown'
import { TypebotsDropdown } from './TypebotsDropdown'

View File

@@ -1,8 +1,8 @@
import { TypebotLinkBlock } from 'models'
import { TypebotLinkBlock } from '@typebot.io/schemas'
import React from 'react'
import { Tag, Text } from '@chakra-ui/react'
import { useTypebot } from '@/features/editor'
import { byId } from 'utils'
import { byId } from '@typebot.io/lib'
type Props = {
block: TypebotLinkBlock

View File

@@ -1,5 +1,5 @@
import test, { expect } from '@playwright/test'
import { importTypebotInDatabase } from 'utils/playwright/databaseActions'
import { importTypebotInDatabase } from '@typebot.io/lib/playwright/databaseActions'
import { createId } from '@paralleldrive/cuid2'
import { getTestAsset } from '@/test/utils/playwright'

View File

@@ -1,5 +1,5 @@
import { Text } from '@chakra-ui/react'
import { WaitOptions } from 'models'
import { WaitOptions } from '@typebot.io/schemas'
import React from 'react'
type Props = {

View File

@@ -1,5 +1,5 @@
import { Stack } from '@chakra-ui/react'
import { WaitOptions } from 'models'
import { WaitOptions } from '@typebot.io/schemas'
import React from 'react'
import { TextInput } from '@/components/inputs'

View File

@@ -1,5 +1,5 @@
import test, { expect } from '@playwright/test'
import { importTypebotInDatabase } from 'utils/playwright/databaseActions'
import { importTypebotInDatabase } from '@typebot.io/lib/playwright/databaseActions'
import { createId } from '@paralleldrive/cuid2'
import { getTestAsset } from '@/test/utils/playwright'