-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merge feat/workflow-continue-on-error
- Loading branch information
Showing
12 changed files
with
118 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
...pp/components/workflow/nodes/if-else/components/condition-list/condition-var-selector.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import { PortalToFollowElem, PortalToFollowElemContent, PortalToFollowElemTrigger } from '@/app/components/base/portal-to-follow-elem' | ||
import VariableTag from '@/app/components/workflow/nodes/_base/components/variable-tag' | ||
import VarReferenceVars from '@/app/components/workflow/nodes/_base/components/variable/var-reference-vars' | ||
import type { Node, NodeOutPutVar, ValueSelector, Var, VarType } from '@/app/components/workflow/types' | ||
|
||
type ConditionVarSelectorProps = { | ||
open: boolean | ||
onOpenChange: (open: boolean) => void | ||
valueSelector: ValueSelector | ||
varType: VarType | ||
availableNodes: Node[] | ||
nodesOutputVars: NodeOutPutVar[] | ||
onChange: (valueSelector: ValueSelector, varItem: Var) => void | ||
} | ||
|
||
const ConditionVarSelector = ({ | ||
open, | ||
onOpenChange, | ||
valueSelector, | ||
varType, | ||
availableNodes, | ||
nodesOutputVars, | ||
onChange, | ||
}: ConditionVarSelectorProps) => { | ||
return ( | ||
<PortalToFollowElem | ||
open={open} | ||
onOpenChange={onOpenChange} | ||
placement='bottom-start' | ||
offset={{ | ||
mainAxis: 4, | ||
crossAxis: 0, | ||
}} | ||
> | ||
<PortalToFollowElemTrigger onClick={() => onOpenChange(!open)}> | ||
<div className="cursor-pointer"> | ||
<VariableTag | ||
valueSelector={valueSelector} | ||
varType={varType} | ||
availableNodes={availableNodes} | ||
isShort | ||
/> | ||
</div> | ||
</PortalToFollowElemTrigger> | ||
<PortalToFollowElemContent className='z-[1000]'> | ||
<div className='w-[296px] bg-components-panel-bg-blur rounded-lg border-[0.5px] border-components-panel-border shadow-lg'> | ||
<VarReferenceVars | ||
vars={nodesOutputVars} | ||
isSupportFileVar | ||
onChange={onChange} | ||
/> | ||
</div> | ||
</PortalToFollowElemContent> | ||
</PortalToFollowElem> | ||
) | ||
} | ||
|
||
export default ConditionVarSelector |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.