♻️ Re-organize workspace folders
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { useToast } from '@/hooks/useToast'
|
||||
import { ResultHeaderCell, ResultWithAnswers } from 'models'
|
||||
import { ResultHeaderCell, ResultWithAnswers } from '@typebot.io/schemas'
|
||||
import { createContext, ReactNode, useContext, useMemo } from 'react'
|
||||
import { parseResultHeader } from 'utils/results'
|
||||
import { parseResultHeader } from '@typebot.io/lib/results'
|
||||
import { useTypebot } from '../editor/providers/TypebotProvider'
|
||||
import { useResultsQuery } from './hooks/useResultsQuery'
|
||||
import { TableData } from './types'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import prisma from '@/lib/prisma'
|
||||
import { deleteFiles } from '@/utils/api/storage'
|
||||
import { Prisma } from 'db'
|
||||
import { InputBlockType, Typebot } from 'models'
|
||||
import { Prisma } from '@typebot.io/prisma'
|
||||
import { InputBlockType, Typebot } from '@typebot.io/schemas'
|
||||
|
||||
const batchSize = 100
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { getTypebot } from '@/features/typebot/api/utils/getTypebot'
|
||||
import { authenticatedProcedure } from '@/utils/server/trpc'
|
||||
import { TRPCError } from '@trpc/server'
|
||||
import { Typebot } from 'models'
|
||||
import { Typebot } from '@typebot.io/schemas'
|
||||
import { z } from 'zod'
|
||||
import { archiveResults } from '../archiveResults'
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { getTypebot } from '@/features/typebot/api/utils/getTypebot'
|
||||
import prisma from '@/lib/prisma'
|
||||
import { authenticatedProcedure } from '@/utils/server/trpc'
|
||||
import { logSchema } from 'models'
|
||||
import { logSchema } from '@typebot.io/schemas'
|
||||
import { z } from 'zod'
|
||||
|
||||
export const getResultLogsProcedure = authenticatedProcedure
|
||||
|
||||
@@ -2,7 +2,7 @@ import { getTypebot } from '@/features/typebot/api/utils/getTypebot'
|
||||
import prisma from '@/lib/prisma'
|
||||
import { authenticatedProcedure } from '@/utils/server/trpc'
|
||||
import { TRPCError } from '@trpc/server'
|
||||
import { ResultWithAnswers, resultWithAnswersSchema } from 'models'
|
||||
import { ResultWithAnswers, resultWithAnswersSchema } from '@typebot.io/schemas'
|
||||
import { z } from 'zod'
|
||||
|
||||
const maxLimit = 200
|
||||
|
||||
@@ -17,8 +17,8 @@ import {
|
||||
Text,
|
||||
Tag,
|
||||
} from '@chakra-ui/react'
|
||||
import { Log } from 'db'
|
||||
import { isDefined } from 'utils'
|
||||
import { Log } from '@typebot.io/prisma'
|
||||
import { isDefined } from '@typebot.io/lib'
|
||||
import { useLogs } from '../hooks/useLogs'
|
||||
|
||||
type Props = {
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
} from '@chakra-ui/react'
|
||||
import { useResults } from '../ResultsProvider'
|
||||
import React from 'react'
|
||||
import { isDefined } from 'utils'
|
||||
import { isDefined } from '@typebot.io/lib'
|
||||
import { HeaderIcon } from '../utils'
|
||||
|
||||
type Props = {
|
||||
|
||||
@@ -19,7 +19,7 @@ import {
|
||||
arrayMove,
|
||||
} from '@dnd-kit/sortable'
|
||||
import { Text } from '@chakra-ui/react'
|
||||
import { ResultHeaderCell } from 'models'
|
||||
import { ResultHeaderCell } from '@typebot.io/schemas'
|
||||
import { HeaderIcon } from '../../utils'
|
||||
import { useState } from 'react'
|
||||
import { CSS } from '@dnd-kit/utilities'
|
||||
|
||||
@@ -18,7 +18,7 @@ import {
|
||||
import { TRPCError } from '@trpc/server'
|
||||
import { unparse } from 'papaparse'
|
||||
import { useState } from 'react'
|
||||
import { parseResultHeader } from 'utils/results'
|
||||
import { parseResultHeader } from '@typebot.io/lib/results'
|
||||
import { useResults } from '../../ResultsProvider'
|
||||
import { convertResultsToTableData, parseAccessor } from '../../utils'
|
||||
import { parseColumnOrder } from '../../utils/parseColumnsOrder'
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
useColorModeValue,
|
||||
} from '@chakra-ui/react'
|
||||
import { AlignLeftTextIcon } from '@/components/icons'
|
||||
import { ResultHeaderCell, ResultsTablePreferences } from 'models'
|
||||
import { ResultHeaderCell, ResultsTablePreferences } from '@typebot.io/schemas'
|
||||
import React, { useEffect, useRef, useState } from 'react'
|
||||
import { LoadingRows } from './LoadingRows'
|
||||
import {
|
||||
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
ListIcon,
|
||||
MoreHorizontalIcon,
|
||||
} from '@/components/icons'
|
||||
import { ResultHeaderCell } from 'models'
|
||||
import { ResultHeaderCell } from '@typebot.io/schemas'
|
||||
import React, { useState } from 'react'
|
||||
import { ColumnSettings } from './ColumnSettings'
|
||||
import { ExportAllResultsModal } from './ExportAllResultsModal'
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { UnlockPlanAlertInfo } from '@/components/UnlockPlanAlertInfo'
|
||||
import { trpc } from '@/lib/trpc'
|
||||
import { Flex } from '@chakra-ui/react'
|
||||
import { Workspace } from 'models'
|
||||
import { Workspace } from '@typebot.io/schemas'
|
||||
import { useMemo } from 'react'
|
||||
import { getChatsLimit, getStorageLimit } from 'utils/pricing'
|
||||
import { getChatsLimit, getStorageLimit } from '@typebot.io/lib/pricing'
|
||||
|
||||
const ALERT_CHATS_PERCENT_THRESHOLD = 80
|
||||
const ALERT_STORAGE_PERCENT_THRESHOLD = 80
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Stats } from 'models'
|
||||
import { Stats } from '@typebot.io/schemas'
|
||||
import { fetcher } from '@/utils/helpers'
|
||||
import useSWR from 'swr'
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import { parse } from 'papaparse'
|
||||
import {
|
||||
importTypebotInDatabase,
|
||||
injectFakeResults,
|
||||
} from 'utils/playwright/databaseActions'
|
||||
} from '@typebot.io/lib/playwright/databaseActions'
|
||||
|
||||
const typebotId = createId()
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@ import {
|
||||
VariableWithValue,
|
||||
ResultHeaderCell,
|
||||
InputBlockType,
|
||||
} from 'models'
|
||||
import { Answer } from 'db'
|
||||
import { isDefined } from 'utils'
|
||||
} from '@typebot.io/schemas'
|
||||
import { Answer } from '@typebot.io/prisma'
|
||||
import { isDefined } from '@typebot.io/lib'
|
||||
import { HStack, Wrap, WrapItem, Text } from '@chakra-ui/react'
|
||||
import { BlockIcon } from '@/features/editor'
|
||||
import { HeaderCell, TableData } from './types'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ResultHeaderCell } from 'models'
|
||||
import { ResultHeaderCell } from '@typebot.io/schemas'
|
||||
|
||||
export const parseColumnOrder = (
|
||||
existingOrder: string[] | undefined,
|
||||
|
||||
Reference in New Issue
Block a user