Merge branch 'plugins/beta' into dev/plugin-deploy

This commit is contained in:
Yeuoly
2025-02-06 18:30:49 +08:00
368 changed files with 5095 additions and 3430 deletions

View File

@ -4,7 +4,7 @@ import React from 'react'
import { RiAlignLeft, RiCheckboxMultipleLine, RiFileCopy2Line, RiFileList2Line, RiHashtag, RiTextSnippet } from '@remixicon/react'
import { InputVarType } from '../../../types'
interface Props {
type Props = {
className?: string
type: InputVarType
}

View File

@ -24,7 +24,7 @@ const ConstantField: FC<Props> = ({
const language = useLanguage()
const placeholder = (schema as CredentialFormSchemaSelect).placeholder
const handleStaticChange = useCallback((e: React.ChangeEvent<HTMLInputElement>) => {
const value = e.target.value === '' ? '' : parseFloat(e.target.value)
const value = e.target.value === '' ? '' : Number.parseFloat(e.target.value)
onChange(value, VarKindType.constant)
}, [onChange])
const handleSelectChange = useCallback((value: string | number) => {
@ -39,6 +39,7 @@ const ConstantField: FC<Props> = ({
wrapperClassName='w-full !h-8'
className='flex items-center'
disabled={readonly}
defaultValue={value}
items={(schema as CredentialFormSchemaSelect).options.map(option => ({ value: option.value, name: option.label[language] || option.label.en_US }))}
onSelect={item => handleSelectChange(item.value)}
placeholder={placeholder?.[language] || placeholder?.en_US}