feat(core): Expression function $ifEmpty (#7660)

Github issue / Community forum post (link here to close automatically):

---------

Co-authored-by: Elias Meire <elias@meire.dev>
This commit is contained in:
Michael Kret
2023-11-13 13:28:41 +02:00
committed by GitHub
parent 14035e1244
commit 1c7225ebdb
7 changed files with 54 additions and 3 deletions

View File

@@ -44,7 +44,7 @@ export const baseCompletions = defineComponent({
/**
* - Complete `$` to `$execution $input $prevNode $runIndex $workflow $now $today
* $jmespath $('nodeName')` in both modes.
* $jmespath $ifEmpt $('nodeName')` in both modes.
* - Complete `$` to `$json $binary $itemIndex` in single-item mode.
*/
baseCompletions(context: CompletionContext): CompletionResult | null {
@@ -58,6 +58,10 @@ export const baseCompletions = defineComponent({
label: `${prefix}execution`,
info: this.$locale.baseText('codeNodeEditor.completer.$execution'),
},
{
label: `${prefix}ifEmpty()`,
info: this.$locale.baseText('codeNodeEditor.completer.$ifEmpty'),
},
{ label: `${prefix}input`, info: this.$locale.baseText('codeNodeEditor.completer.$input') },
{
label: `${prefix}prevNode`,