♻️ Re-organize workspace folders
This commit is contained in:
@@ -21,9 +21,9 @@ import {
|
||||
} from '@/components/icons'
|
||||
import { useTypebot } from '@/features/editor'
|
||||
import { useWorkspace } from '@/features/workspace'
|
||||
import { InputBlockType } from 'models'
|
||||
import { InputBlockType } from '@typebot.io/schemas'
|
||||
import { useRouter } from 'next/router'
|
||||
import { isNotDefined } from 'utils'
|
||||
import { isNotDefined } from '@typebot.io/lib'
|
||||
import { ChangePlanModal, isFreePlan, LimitReached } from '@/features/billing'
|
||||
import { timeSince } from '@/utils/helpers'
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@ import {
|
||||
Wrap,
|
||||
Text,
|
||||
} from '@chakra-ui/react'
|
||||
import { Plan } from 'db'
|
||||
import { isDefined, getViewerUrl, isNotDefined, env } from 'utils'
|
||||
import { Plan } from '@typebot.io/prisma'
|
||||
import { isDefined, getViewerUrl, isNotDefined, env } from '@typebot.io/lib'
|
||||
import { isPublicDomainAvailableQuery } from '../queries/isPublicDomainAvailableQuery'
|
||||
import { parseDefaultPublicId } from '../utils'
|
||||
import { EditableUrl } from './EditableUrl'
|
||||
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
Stack,
|
||||
ModalFooter,
|
||||
} from '@chakra-ui/react'
|
||||
import { capitalize } from 'utils'
|
||||
import { capitalize } from '@typebot.io/lib'
|
||||
import { EmbedTypeMenu } from './EmbedTypeMenu/EmbedTypeMenu'
|
||||
|
||||
type Props = {
|
||||
|
||||
@@ -16,7 +16,7 @@ import {
|
||||
Text,
|
||||
Stack,
|
||||
} from '@chakra-ui/react'
|
||||
import { env, getViewerUrl } from 'utils'
|
||||
import { env, getViewerUrl } from '@typebot.io/lib'
|
||||
import { ModalProps } from '../EmbedButton'
|
||||
|
||||
export const ApiModal = ({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { CodeEditor } from '@/components/inputs/CodeEditor'
|
||||
import { OrderedList, ListItem, Code, Stack, Text } from '@chakra-ui/react'
|
||||
import { Typebot } from 'models'
|
||||
import { Typebot } from '@typebot.io/schemas'
|
||||
import { useState } from 'react'
|
||||
import { StandardSettings } from '../../../settings/StandardSettings'
|
||||
import {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { FlexProps } from '@chakra-ui/react'
|
||||
import { useTypebot } from '@/features/editor'
|
||||
import { env, getViewerUrl } from 'utils'
|
||||
import { env, getViewerUrl } from '@typebot.io/lib'
|
||||
import { CodeEditor } from '@/components/inputs/CodeEditor'
|
||||
import prettier from 'prettier/standalone'
|
||||
import parserHtml from 'prettier/parser-html'
|
||||
|
||||
@@ -5,7 +5,7 @@ import { useTypebot } from '@/features/editor'
|
||||
import { CodeEditor } from '@/components/inputs/CodeEditor'
|
||||
import { BubbleProps } from '@typebot.io/js'
|
||||
import { isCloudProdInstance } from '@/utils/helpers'
|
||||
import { env, getViewerUrl } from 'utils'
|
||||
import { env, getViewerUrl } from '@typebot.io/lib'
|
||||
|
||||
type Props = Pick<BubbleProps, 'theme' | 'previewMessage'>
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import { parseInitPopupCode, typebotImportCode } from '../../snippetParsers'
|
||||
import { CodeEditor } from '@/components/inputs/CodeEditor'
|
||||
import { PopupProps } from '@typebot.io/js'
|
||||
import { isCloudProdInstance } from '@/utils/helpers'
|
||||
import { env, getViewerUrl } from 'utils'
|
||||
import { env, getViewerUrl } from '@typebot.io/lib'
|
||||
|
||||
type Props = Pick<PopupProps, 'autoShowDelay'>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import { parseInitStandardCode, typebotImportCode } from '../../snippetParsers'
|
||||
import { useTypebot } from '@/features/editor'
|
||||
import { CodeEditor } from '@/components/inputs/CodeEditor'
|
||||
import { isCloudProdInstance } from '@/utils/helpers'
|
||||
import { env, getViewerUrl } from 'utils'
|
||||
import { env, getViewerUrl } from '@typebot.io/lib'
|
||||
|
||||
type Props = {
|
||||
widthLabel?: string
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useTypebot } from '@/features/editor'
|
||||
import { Stack, Code, Text } from '@chakra-ui/react'
|
||||
import { BubbleProps } from '@typebot.io/js'
|
||||
import { Typebot } from 'models'
|
||||
import { Typebot } from '@typebot.io/schemas'
|
||||
import { useState } from 'react'
|
||||
import { BubbleSettings } from '../../../settings/BubbleSettings/BubbleSettings'
|
||||
import { JavascriptBubbleSnippet } from '../JavascriptBubbleSnippet'
|
||||
|
||||
@@ -18,7 +18,7 @@ import {
|
||||
Text,
|
||||
Stack,
|
||||
} from '@chakra-ui/react'
|
||||
import { env, getViewerUrl } from 'utils'
|
||||
import { env, getViewerUrl } from '@typebot.io/lib'
|
||||
import { ModalProps } from '../EmbedButton'
|
||||
|
||||
export const NotionModal = ({
|
||||
|
||||
@@ -3,9 +3,9 @@ import { useTypebot } from '@/features/editor'
|
||||
import { isCloudProdInstance } from '@/utils/helpers'
|
||||
import { Stack, Text } from '@chakra-ui/react'
|
||||
import { BubbleProps } from '@typebot.io/js'
|
||||
import { Typebot } from 'models'
|
||||
import { Typebot } from '@typebot.io/schemas'
|
||||
import { useState } from 'react'
|
||||
import { env, getViewerUrl } from 'utils'
|
||||
import { env, getViewerUrl } from '@typebot.io/lib'
|
||||
import { BubbleSettings } from '../../../settings/BubbleSettings/BubbleSettings'
|
||||
import {
|
||||
parseInlineScript,
|
||||
|
||||
@@ -3,7 +3,7 @@ import { useTypebot } from '@/features/editor'
|
||||
import { isCloudProdInstance } from '@/utils/helpers'
|
||||
import { Stack, Text } from '@chakra-ui/react'
|
||||
import { useState } from 'react'
|
||||
import { env, getViewerUrl } from 'utils'
|
||||
import { env, getViewerUrl } from '@typebot.io/lib'
|
||||
import { PopupSettings } from '../../../settings/PopupSettings'
|
||||
import { parseInitPopupCode } from '../../../snippetParsers'
|
||||
import {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { useTypebot } from '@/features/editor'
|
||||
import { isCloudProdInstance } from '@/utils/helpers'
|
||||
import { Stack, Code, Text } from '@chakra-ui/react'
|
||||
import { useState } from 'react'
|
||||
import { env, getViewerUrl } from 'utils'
|
||||
import { env, getViewerUrl } from '@typebot.io/lib'
|
||||
import { StandardSettings } from '../../../settings/StandardSettings'
|
||||
import { parseInitStandardCode } from '../../../snippetParsers/standard'
|
||||
import { parseStandardElementCode } from '../../Javascript/JavascriptStandardSnippet'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { isDefined } from 'utils'
|
||||
import { isDefined } from '@typebot.io/lib'
|
||||
import { ModalProps } from '../../EmbedButton'
|
||||
import { useState } from 'react'
|
||||
import { EmbedModal } from '../../EmbedModal'
|
||||
|
||||
@@ -15,7 +15,7 @@ import { BubbleSettings } from '../../../settings/BubbleSettings/BubbleSettings'
|
||||
import { parseInitBubbleCode } from '../../../snippetParsers'
|
||||
import { parseDefaultBubbleTheme } from '../../Javascript/instructions/JavascriptBubbleInstructions'
|
||||
import { isCloudProdInstance } from '@/utils/helpers'
|
||||
import { env, getViewerUrl } from 'utils'
|
||||
import { env, getViewerUrl } from '@typebot.io/lib'
|
||||
|
||||
type Props = {
|
||||
publicId: string
|
||||
|
||||
@@ -12,7 +12,7 @@ import { useState } from 'react'
|
||||
import { PopupSettings } from '../../../settings/PopupSettings'
|
||||
import { parseInitPopupCode } from '../../../snippetParsers/popup'
|
||||
import { isCloudProdInstance } from '@/utils/helpers'
|
||||
import { env, getViewerUrl } from 'utils'
|
||||
import { env, getViewerUrl } from '@typebot.io/lib'
|
||||
|
||||
type Props = {
|
||||
publicId: string
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
import { useState } from 'react'
|
||||
import { StandardSettings } from '../../../settings/StandardSettings'
|
||||
import { isCloudProdInstance } from '@/utils/helpers'
|
||||
import { env, getViewerUrl } from 'utils'
|
||||
import { env, getViewerUrl } from '@typebot.io/lib'
|
||||
|
||||
type Props = {
|
||||
publicId: string
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Stack, Heading, HStack, Flex, Text, Image } from '@chakra-ui/react'
|
||||
import { BubbleProps } from '@typebot.io/js'
|
||||
import { isDefined } from 'utils'
|
||||
import { isDefined } from '@typebot.io/lib'
|
||||
import { PreviewMessageSettings } from './PreviewMessageSettings'
|
||||
import { ThemeSettings } from './ThemeSettings'
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { NumberInput } from '@/components/inputs'
|
||||
import { FormLabel, HStack, Input, Stack, Switch, Text } from '@chakra-ui/react'
|
||||
import { PreviewMessageParams } from '@typebot.io/js/dist/features/bubble/types'
|
||||
import { useState } from 'react'
|
||||
import { isDefined } from 'utils'
|
||||
import { isDefined } from '@typebot.io/lib'
|
||||
|
||||
type Props = {
|
||||
defaultAvatar: string
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
} from '@chakra-ui/react'
|
||||
import { PopupProps } from '@typebot.io/js'
|
||||
import { useState, useEffect } from 'react'
|
||||
import { isDefined } from 'utils'
|
||||
import { isDefined } from '@typebot.io/lib'
|
||||
|
||||
type Props = {
|
||||
onUpdateSettings: (windowSettings: Pick<PopupProps, 'autoShowDelay'>) => void
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { BotProps } from '@typebot.io/js'
|
||||
import parserBabel from 'prettier/parser-babel'
|
||||
import prettier from 'prettier/standalone'
|
||||
import { isDefined } from 'utils'
|
||||
import { isDefined } from '@typebot.io/lib'
|
||||
|
||||
export const parseStringParam = (fieldName: string, fieldValue?: string) =>
|
||||
fieldValue ? `${fieldName}: "${fieldValue}",` : ``
|
||||
|
||||
Reference in New Issue
Block a user