♻️ Re-organize workspace folders
This commit is contained in:
@@ -5,12 +5,12 @@ import {
|
||||
InputBlockType,
|
||||
IntegrationBlockType,
|
||||
LogicBlockType,
|
||||
} from 'models'
|
||||
} from '@typebot.io/schemas'
|
||||
import { useBlockDnd } from '@/features/graph'
|
||||
import React, { useEffect, useState } from 'react'
|
||||
import { BlockIcon } from './BlockIcon'
|
||||
import { isFreePlan, LockTag } from '@/features/billing'
|
||||
import { Plan } from 'db'
|
||||
import { Plan } from '@typebot.io/prisma'
|
||||
import { useWorkspace } from '@/features/workspace'
|
||||
import { BlockLabel } from './BlockLabel'
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { StackProps, HStack, useColorModeValue } from '@chakra-ui/react'
|
||||
import { BlockType } from 'models'
|
||||
import { BlockType } from '@typebot.io/schemas'
|
||||
import { BlockIcon } from './BlockIcon'
|
||||
import { BlockLabel } from './BlockLabel'
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
IntegrationBlockType,
|
||||
LogicBlockType,
|
||||
BlockType,
|
||||
} from 'models'
|
||||
} from '@typebot.io/schemas'
|
||||
import React from 'react'
|
||||
import { TextBubbleIcon } from '@/features/blocks/bubbles/textBubble'
|
||||
import { ImageBubbleIcon } from '@/features/blocks/bubbles/image'
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
IntegrationBlockType,
|
||||
LogicBlockType,
|
||||
BlockType,
|
||||
} from 'models'
|
||||
} from '@typebot.io/schemas'
|
||||
import React from 'react'
|
||||
|
||||
type Props = { type: BlockType }
|
||||
|
||||
@@ -16,7 +16,7 @@ import {
|
||||
InputBlockType,
|
||||
IntegrationBlockType,
|
||||
LogicBlockType,
|
||||
} from 'models'
|
||||
} from '@typebot.io/schemas'
|
||||
import { useBlockDnd } from '@/features/graph'
|
||||
import React, { useState } from 'react'
|
||||
import { BlockCard } from './BlockCard'
|
||||
|
||||
@@ -19,7 +19,7 @@ import { useTypebot } from '../providers/TypebotProvider'
|
||||
import { useUser } from '@/features/account'
|
||||
import { useRouter } from 'next/router'
|
||||
import React, { useEffect, useState } from 'react'
|
||||
import { isNotDefined } from 'utils'
|
||||
import { isNotDefined } from '@typebot.io/lib'
|
||||
import { EditorSettingsModal } from './EditorSettingsModal'
|
||||
import { parseDefaultPublicId } from '@/features/publish'
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ import { RightPanel, useEditor } from '../../providers/EditorProvider'
|
||||
import { useTypebot } from '../../providers/TypebotProvider'
|
||||
import { useRouter } from 'next/router'
|
||||
import React, { useState } from 'react'
|
||||
import { isDefined, isNotDefined } from 'utils'
|
||||
import { isDefined, isNotDefined } from '@typebot.io/lib'
|
||||
import { EditableTypebotName } from './EditableTypebotName'
|
||||
import { open as openSupportBubble } from '@typebot.io/js'
|
||||
import Link from 'next/link'
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import test, { expect } from '@playwright/test'
|
||||
import { defaultTextInputOptions, InputBlockType } from 'models'
|
||||
import { defaultTextInputOptions, InputBlockType } from '@typebot.io/schemas'
|
||||
import { createId } from '@paralleldrive/cuid2'
|
||||
import {
|
||||
createTypebots,
|
||||
importTypebotInDatabase,
|
||||
} from 'utils/playwright/databaseActions'
|
||||
} from '@typebot.io/lib/playwright/databaseActions'
|
||||
import {
|
||||
waitForSuccessfulDeleteRequest,
|
||||
waitForSuccessfulPostRequest,
|
||||
waitForSuccessfulPutRequest,
|
||||
} from 'utils/playwright/testHelpers'
|
||||
import { parseDefaultGroupWithBlock } from 'utils/playwright/databaseHelpers'
|
||||
} from '@typebot.io/lib/playwright/testHelpers'
|
||||
import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers'
|
||||
import { getTestAsset } from '@/test/utils/playwright'
|
||||
|
||||
test.describe.configure({ mode: 'parallel' })
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { dequal } from 'dequal'
|
||||
import { useCallback, useRef, useState } from 'react'
|
||||
import { isDefined } from 'utils'
|
||||
import { isDefined } from '@typebot.io/lib'
|
||||
|
||||
export interface Actions<T extends { updatedAt: Date }> {
|
||||
set: (newPresent: T | ((current: T) => T) | undefined) => void
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
Theme,
|
||||
Typebot,
|
||||
Webhook,
|
||||
} from 'models'
|
||||
} from '@typebot.io/schemas'
|
||||
import { Router, useRouter } from 'next/router'
|
||||
import {
|
||||
createContext,
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
useMemo,
|
||||
useState,
|
||||
} from 'react'
|
||||
import { isDefined, omit } from 'utils'
|
||||
import { isDefined, omit } from '@typebot.io/lib'
|
||||
import { edgesAction, EdgesActions } from './actions/edges'
|
||||
import { itemsAction, ItemsActions } from './actions/items'
|
||||
import { GroupsActions, groupsActions } from './actions/groups'
|
||||
|
||||
@@ -5,13 +5,13 @@ import {
|
||||
DraggableBlockType,
|
||||
BlockIndices,
|
||||
Webhook,
|
||||
} from 'models'
|
||||
} from '@typebot.io/schemas'
|
||||
import { WritableDraft } from 'immer/dist/types/types-external'
|
||||
import { SetTypebot } from '../TypebotProvider'
|
||||
import produce from 'immer'
|
||||
import { cleanUpEdgeDraft, deleteEdgeDraft } from './edges'
|
||||
import { createId } from '@paralleldrive/cuid2'
|
||||
import { byId, isWebhookBlock, blockHasItems } from 'utils'
|
||||
import { byId, isWebhookBlock, blockHasItems } from '@typebot.io/lib'
|
||||
import { duplicateItemDraft } from './items'
|
||||
import { parseNewBlock } from '@/features/graph/utils'
|
||||
|
||||
|
||||
@@ -5,11 +5,11 @@ import {
|
||||
BlockIndices,
|
||||
ItemIndices,
|
||||
Block,
|
||||
} from 'models'
|
||||
} from '@typebot.io/schemas'
|
||||
import { WritableDraft } from 'immer/dist/types/types-external'
|
||||
import { SetTypebot } from '../TypebotProvider'
|
||||
import { produce } from 'immer'
|
||||
import { byId, isDefined, blockHasItems } from 'utils'
|
||||
import { byId, isDefined, blockHasItems } from '@typebot.io/lib'
|
||||
import { createId } from '@paralleldrive/cuid2'
|
||||
|
||||
export type EdgesActions = {
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
import { createId } from '@paralleldrive/cuid2'
|
||||
import { produce } from 'immer'
|
||||
import { Group, DraggableBlock, DraggableBlockType, BlockIndices } from 'models'
|
||||
import {
|
||||
Group,
|
||||
DraggableBlock,
|
||||
DraggableBlockType,
|
||||
BlockIndices,
|
||||
} from '@typebot.io/schemas'
|
||||
import { SetTypebot } from '../TypebotProvider'
|
||||
import {
|
||||
deleteGroupDraft,
|
||||
@@ -9,7 +14,7 @@ import {
|
||||
WebhookCallBacks,
|
||||
} from './blocks'
|
||||
import { Coordinates } from '@/features/graph'
|
||||
import { parseGroupTitle } from 'utils'
|
||||
import { parseGroupTitle } from '@typebot.io/lib'
|
||||
|
||||
export type GroupsActions = {
|
||||
createGroup: (
|
||||
|
||||
@@ -7,11 +7,11 @@ import {
|
||||
Block,
|
||||
LogicBlockType,
|
||||
InputBlockType,
|
||||
} from 'models'
|
||||
} from '@typebot.io/schemas'
|
||||
import { SetTypebot } from '../TypebotProvider'
|
||||
import produce from 'immer'
|
||||
import { cleanUpEdgeDraft } from './edges'
|
||||
import { byId, blockHasItems } from 'utils'
|
||||
import { byId, blockHasItems } from '@typebot.io/lib'
|
||||
import { createId } from '@paralleldrive/cuid2'
|
||||
import { WritableDraft } from 'immer/dist/types/types-external'
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Typebot, Variable } from 'models'
|
||||
import { Typebot, Variable } from '@typebot.io/schemas'
|
||||
import { WritableDraft } from 'immer/dist/types/types-external'
|
||||
import { SetTypebot } from '../TypebotProvider'
|
||||
import { produce } from 'immer'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Typebot } from 'models'
|
||||
import { sendRequest } from 'utils'
|
||||
import { Typebot } from '@typebot.io/schemas'
|
||||
import { sendRequest } from '@typebot.io/lib'
|
||||
|
||||
export const updateTypebotQuery = async (id: string, typebot: Typebot) =>
|
||||
sendRequest<{ typebot: Typebot }>({
|
||||
|
||||
Reference in New Issue
Block a user