refactor: update classnames import style across multiple components

This commit is contained in:
twwu 2025-12-22 18:09:11 +08:00
parent 138922f3f4
commit ddfd1cb1f5
22 changed files with 20 additions and 23 deletions

View File

@ -16,7 +16,7 @@ import { UserActionButtonType } from '@/app/components/workflow/nodes/human-inpu
import type { GeneratedFormInputItem, UserAction } from '@/app/components/workflow/nodes/human-input/types'
import { getHumanInputForm, submitHumanInputForm } from '@/service/share'
import { asyncRunSafe } from '@/utils'
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
export type FormData = {
site: any

View File

@ -5,8 +5,6 @@ import Button from '@/app/components/base/button'
import ContentItem from './content-item'
import type { GeneratedFormInputItem, UserAction } from '@/app/components/workflow/nodes/human-input/types'
import { getButtonStyle, initializeInputs, splitByOutputVar } from './utils'
// import { getHumanInputForm, submitHumanInputForm } from '@/service/share'
// import cn from '@/utils/classnames'
export type FormData = {
form_id: string

View File

@ -3,7 +3,7 @@ import { DraggableBlockPlugin_EXPERIMENTAL } from '@lexical/react/LexicalDraggab
import { useEffect, useRef, useState } from 'react'
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'
import { RiDraggable } from '@remixicon/react'
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
const DRAGGABLE_BLOCK_MENU_CLASSNAME = 'draggable-block-menu'

View File

@ -7,7 +7,7 @@ import { Trans, useTranslation } from 'react-i18next'
import Textarea from '../../../textarea'
import TagLabel from './tag-label'
import TypeSwitch from './type-switch'
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
type Props = {
isVariable?: boolean

View File

@ -3,7 +3,7 @@ import { RiEditLine } from '@remixicon/react'
import type { FC } from 'react'
import React from 'react'
import { Variable02 } from '../../../icons/src/vender/solid/development'
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
type Props = {
type: 'edit' | 'variable'

View File

@ -2,7 +2,7 @@
import type { FC } from 'react'
import React from 'react'
import { Variable02 } from '../../../icons/src/vender/solid/development'
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
import { useTranslation } from 'react-i18next'
type Props = {

View File

@ -4,7 +4,7 @@ import { RiGlobalLine } from '@remixicon/react'
import { useSelectOrDelete } from '../../hooks'
import { DELETE_REQUEST_URL_BLOCK_COMMAND } from './index'
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
type RequestURLBlockComponentProps = {
nodeKey: string

View File

@ -12,7 +12,7 @@ import {
$getSelection,
$isRangeSelection,
} from 'lexical'
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
import {
autoUpdate,
flip,

View File

@ -11,7 +11,7 @@ import {
} from '@/app/components/base/portal-to-follow-elem'
import Button from '@/app/components/base/button'
import { UserActionButtonType } from '../types'
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
const i18nPrefix = 'workflow.nodes.humanInput'

View File

@ -6,7 +6,7 @@ import type {
NodeOutPutVar,
} from '@/app/components/workflow/types'
import { BlockEnum } from '@/app/components/workflow/types'
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
type MailBodyInputProps = {
readOnly?: boolean

View File

@ -19,7 +19,7 @@ import type {
Node,
NodeOutPutVar,
} from '@/app/components/workflow/types'
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
import TestEmailSender from './test-email-sender'
const i18nPrefix = 'workflow.nodes.humanInput'

View File

@ -21,7 +21,7 @@ import type { DeliveryMethod } from '../../types'
import { DeliveryMethodType } from '../../types'
import { IS_CE_EDITION } from '@/config'
import { v4 as uuid4 } from 'uuid'
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
const i18nPrefix = 'workflow.nodes.humanInput'

View File

@ -9,7 +9,7 @@ import {
PortalToFollowElemContent,
PortalToFollowElemTrigger,
} from '@/app/components/base/portal-to-follow-elem'
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
const i18nPrefix = 'workflow.nodes.humanInput'

View File

@ -8,7 +8,7 @@ import MemberSelector from './member-selector'
import EmailInput from './email-input'
import { fetchMembers } from '@/service/common'
import type { RecipientData, Recipient as RecipientItem } from '../../../types'
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
import { produce } from 'immer'
const i18nPrefix = 'workflow.nodes.humanInput'

View File

@ -5,7 +5,7 @@ import { useTranslation } from 'react-i18next'
import Input from '@/app/components/base/input'
import Avatar from '@/app/components/base/avatar'
import type { Member } from '@/models/common'
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
const i18nPrefix = 'workflow.nodes.humanInput'

View File

@ -9,7 +9,7 @@ import { PortalToFollowElem, PortalToFollowElemContent, PortalToFollowElemTrigge
import Button from '@/app/components/base/button'
import MemberList from './member-list'
import type { Member } from '@/models/common'
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
const i18nPrefix = 'workflow.nodes.humanInput'

View File

@ -26,7 +26,7 @@ import { fetchMembers } from '@/service/common'
import { useTestEmailSender } from '@/service/use-workflow'
import { noop, unionBy } from 'lodash-es'
import { isOutput } from '../../utils'
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
const i18nPrefix = 'workflow.nodes.humanInput'

View File

@ -12,7 +12,7 @@ import { INSERT_HITL_INPUT_BLOCK_COMMAND } from '@/app/components/base/prompt-ed
import type { LexicalCommand } from 'lexical'
import { isMac } from '../../../utils'
import { useBoolean } from 'ahooks'
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
type Props = {
nodeId: string

View File

@ -7,7 +7,6 @@ import Button from '@/app/components/base/button'
import ContentItem from '@/app/components/base/chat/chat/answer/human-input-content/content-item'
import { UserActionButtonType } from '@/app/components/workflow/nodes/human-input/types'
import type { GeneratedFormInputItem, UserAction } from '@/app/components/workflow/nodes/human-input/types'
// import cn from '@/utils/classnames'
type Props = {
nodeName: string

View File

@ -2,7 +2,7 @@ import type { FC } from 'react'
import React from 'react'
import { useTranslation } from 'react-i18next'
import Input from '@/app/components/base/input'
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
const i18nPrefix = 'workflow.nodes.humanInput'

View File

@ -27,7 +27,7 @@ import Button from '@/app/components/base/button'
import Toast from '@/app/components/base/toast'
import copy from 'copy-to-clipboard'
import { useBoolean } from 'ahooks'
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
import { useStore } from '@/app/components/workflow/store'
import FormContentPreview from './components/form-content-preview'

View File

@ -5,7 +5,7 @@ import { FOCUS_COMMAND } from 'lexical'
import { $insertNodes } from 'lexical'
import { CustomTextNode } from '@/app/components/base/prompt-editor/plugins/custom-text/node'
import Badge from '@/app/components/base/badge'
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
type PlaceholderProps = {
disableVariableInsertion?: boolean