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

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-14 16:20:02 +03:00
committed by GitHub
parent 5ed2a77740
commit 4d222ac19d
24 changed files with 839 additions and 39 deletions

View File

@@ -136,13 +136,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"
@@ -200,12 +201,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"
@@ -861,6 +863,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')