feat(AI Transform Node): New node (#9990)

Co-authored-by: Giulio Andreini <g.andreini@gmail.com>
Co-authored-by: Shireen Missi <94372015+ShireenMissi@users.noreply.github.com>
This commit is contained in:
Michael Kret
2024-08-07 18:07:48 +03:00
committed by GitHub
parent 9b977e80f6
commit 0de9d56619
23 changed files with 831 additions and 38 deletions

View File

@@ -134,13 +134,14 @@
:model-value="modelValueString"
:default-value="parameter.default"
:language="editorLanguage"
:is-read-only="isReadOnly"
:is-read-only="isReadOnly || editorIsReadOnly"
:rows="editorRows"
:ai-button-enabled="settingsStore.isCloudDeployment"
@update:model-value="valueChangedDebounced"
>
<template #suffix>
<n8n-icon
v-if="!editorIsReadOnly"
data-test-id="code-editor-fullscreen-button"
icon="external-link-alt"
size="xsmall"
@@ -198,12 +199,13 @@
v-else-if="editorType === 'jsEditor'"
:key="'js-' + codeEditDialogVisible.toString()"
:model-value="modelValueString"
:is-read-only="isReadOnly"
:is-read-only="isReadOnly || editorIsReadOnly"
:rows="editorRows"
@update:model-value="valueChangedDebounced"
>
<template #suffix>
<n8n-icon
v-if="!editorIsReadOnly"
data-test-id="code-editor-fullscreen-button"
icon="external-link-alt"
size="xsmall"
@@ -859,6 +861,9 @@ const getIssues = computed<string[]>(() => {
const editorType = computed<EditorType | 'json' | 'code'>(() => {
return getArgument<EditorType>('editor');
});
const editorIsReadOnly = computed<boolean>(() => {
return getArgument<boolean>('editorIsReadOnly') ?? false;
});
const editorLanguage = computed<CodeNodeEditorLanguage>(() => {
if (editorType.value === 'json' || props.parameter.type === 'json')