|
@@ -13,6 +13,7 @@ import FilterCondition from './components/filter-condition'
|
|
|
import Field from '@/app/components/workflow/nodes/_base/components/field'
|
|
|
import { type NodePanelProps } from '@/app/components/workflow/types'
|
|
|
import Switch from '@/app/components/base/switch'
|
|
|
+import ExtractInput from '@/app/components/workflow/nodes/list-operator/components/extract-input'
|
|
|
|
|
|
const i18nPrefix = 'workflow.nodes.listFilter'
|
|
|
|
|
@@ -32,6 +33,8 @@ const Panel: FC<NodePanelProps<ListFilterNodeType>> = ({
|
|
|
filterVar,
|
|
|
handleFilterEnabledChange,
|
|
|
handleFilterChange,
|
|
|
+ handleExtractsEnabledChange,
|
|
|
+ handleExtractsChange,
|
|
|
handleLimitChange,
|
|
|
handleOrderByEnabledChange,
|
|
|
handleOrderByKeyChange,
|
|
@@ -79,6 +82,41 @@ const Panel: FC<NodePanelProps<ListFilterNodeType>> = ({
|
|
|
: null}
|
|
|
</Field>
|
|
|
<Split />
|
|
|
+ <Field
|
|
|
+ title={t(`${i18nPrefix}.extractsCondition`)}
|
|
|
+ operations={
|
|
|
+ <Switch
|
|
|
+ defaultValue={inputs.extract_by?.enabled}
|
|
|
+ onChange={handleExtractsEnabledChange}
|
|
|
+ size='md'
|
|
|
+ disabled={readOnly}
|
|
|
+ />
|
|
|
+ }
|
|
|
+ >
|
|
|
+ {inputs.extract_by?.enabled
|
|
|
+ ? (
|
|
|
+ <div className='flex items-center justify-between'>
|
|
|
+ {hasSubVariable && (
|
|
|
+ <div className='grow mr-2'>
|
|
|
+ <ExtractInput
|
|
|
+ value={inputs.extract_by.serial as string}
|
|
|
+ onChange={handleExtractsChange}
|
|
|
+ readOnly={readOnly}
|
|
|
+ nodeId={id}
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ )}
|
|
|
+ </div>
|
|
|
+ )
|
|
|
+ : null}
|
|
|
+ </Field>
|
|
|
+ <Split />
|
|
|
+ <LimitConfig
|
|
|
+ config={inputs.limit}
|
|
|
+ onChange={handleLimitChange}
|
|
|
+ readonly={readOnly}
|
|
|
+ />
|
|
|
+ <Split />
|
|
|
<Field
|
|
|
title={t(`${i18nPrefix}.orderBy`)}
|
|
|
operations={
|
|
@@ -118,13 +156,7 @@ const Panel: FC<NodePanelProps<ListFilterNodeType>> = ({
|
|
|
: null}
|
|
|
</Field>
|
|
|
<Split />
|
|
|
- <LimitConfig
|
|
|
- config={inputs.limit}
|
|
|
- onChange={handleLimitChange}
|
|
|
- readonly={readOnly}
|
|
|
- />
|
|
|
</div>
|
|
|
- <Split />
|
|
|
<div className='px-4 pt-4 pb-2'>
|
|
|
<OutputVars>
|
|
|
<>
|