fix(editor): Add $if, $min, $max to root expression autocomplete (#5858)

This commit is contained in:
OlegIvaniv 2023-03-31 11:37:25 +02:00 committed by GitHub
parent 4b11642a8c
commit a13866e233
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 0 deletions

View file

@ -79,6 +79,18 @@ export const baseCompletions = (Vue as CodeNodeEditorMixin).extend({
label: '$jmespath()',
info: this.$locale.baseText('codeNodeEditor.completer.$jmespath'),
},
{
label: '$if()',
info: this.$locale.baseText('codeNodeEditor.completer.$if'),
},
{
label: '$min()',
info: this.$locale.baseText('codeNodeEditor.completer.$min'),
},
{
label: '$max()',
info: this.$locale.baseText('codeNodeEditor.completer.$max'),
},
{
label: '$runIndex',
info: this.$locale.baseText('codeNodeEditor.completer.$runIndex'),

View file

@ -336,6 +336,9 @@ export class I18nClass {
$now: this.baseText('codeNodeEditor.completer.$now'),
$parameter: this.baseText('codeNodeEditor.completer.$parameter'),
$prevNode: this.baseText('codeNodeEditor.completer.$prevNode'),
$if: this.baseText('codeNodeEditor.completer.$if'),
$max: this.baseText('codeNodeEditor.completer.$max'),
$min: this.baseText('codeNodeEditor.completer.$min'),
$runIndex: this.baseText('codeNodeEditor.completer.$runIndex'),
$today: this.baseText('codeNodeEditor.completer.$today'),
$workflow: this.baseText('codeNodeEditor.completer.$workflow'),

View file

@ -126,6 +126,9 @@
"codeNodeEditor.completer.$input.last": "@:_reusableBaseText.codeNodeEditor.completer.last",
"codeNodeEditor.completer.$itemIndex": "The position of the current item in the list of items",
"codeNodeEditor.completer.$jmespath": "Evaluate a JMESPath expression",
"codeNodeEditor.completer.$if": "Function that takes a condition and returns a value based on whether it's true or false.",
"codeNodeEditor.completer.$max": "Returns the largest of the numbers given as input parameters, or -Infinity if there are no parameters.",
"codeNodeEditor.completer.$min": "Returns the smallest of the numbers given as input parameters, or Infinity if there are no parameters.",
"codeNodeEditor.completer.$now": "The current timestamp (as a Luxon object)",
"codeNodeEditor.completer.$parameter": "The parameters of the current node",
"codeNodeEditor.completer.$prevNode": "The node providing the input data for this run",