From 49dec1919614c8893a89daf3ccd2adcc2de63f85 Mon Sep 17 00:00:00 2001 From: Charlie Kolb Date: Thu, 24 Jul 2025 12:38:49 +0200 Subject: [PATCH] fix(editor): Add targetNodeParameterContext for remaining editors (no-changelog) (#17510) --- .../frontend/editor-ui/src/components/CssEditor/CssEditor.vue | 4 ++++ packages/frontend/editor-ui/src/components/FocusPanel.vue | 3 +++ .../editor-ui/src/components/HtmlEditor/HtmlEditor.vue | 4 ++++ .../frontend/editor-ui/src/components/SqlEditor/SqlEditor.vue | 4 ++++ 4 files changed, 15 insertions(+) diff --git a/packages/frontend/editor-ui/src/components/CssEditor/CssEditor.vue b/packages/frontend/editor-ui/src/components/CssEditor/CssEditor.vue index 8ecfcc4b0b..6f4adde633 100644 --- a/packages/frontend/editor-ui/src/components/CssEditor/CssEditor.vue +++ b/packages/frontend/editor-ui/src/components/CssEditor/CssEditor.vue @@ -22,18 +22,21 @@ import { import { editorKeymap } from '@/plugins/codemirror/keymap'; import { n8nAutocompletion } from '@/plugins/codemirror/n8nLang'; import { codeEditorTheme } from '../CodeNodeEditor/theme'; +import type { TargetNodeParameterContext } from '@/Interface'; type Props = { modelValue: string; rows?: number; isReadOnly?: boolean; fullscreen?: boolean; + targetNodeParameterContext?: TargetNodeParameterContext; }; const props = withDefaults(defineProps(), { rows: 4, isReadOnly: false, fullscreen: false, + targetNodeParameterContext: undefined, }); const emit = defineEmits<{ @@ -77,6 +80,7 @@ const { editorRef: cssEditor, editorValue, extensions, + targetNodeParameterContext: props.targetNodeParameterContext, onChange: () => { emit('update:model-value', readEditorValue()); }, diff --git a/packages/frontend/editor-ui/src/components/FocusPanel.vue b/packages/frontend/editor-ui/src/components/FocusPanel.vue index a198c72833..cdbe50f1ce 100644 --- a/packages/frontend/editor-ui/src/components/FocusPanel.vue +++ b/packages/frontend/editor-ui/src/components/FocusPanel.vue @@ -415,6 +415,7 @@ const onResizeThrottle = useThrottleFn(onResize, 10); :disable-expression-coloring="!isHtmlNode" :disable-expression-completions="!isHtmlNode" fullscreen + :target-node-parameter-context="targetNodeParameterContext" @update:model-value="valueChangedDebounced" /> (), { rows: 4, isReadOnly: false, fullscreen: false, + targetNodeParameterContext: undefined, }); const emit = defineEmits<{ @@ -89,6 +92,7 @@ const { editorRef: htmlEditor, editorValue: () => props.modelValue, extensions, + targetNodeParameterContext: props.targetNodeParameterContext, onChange: () => { emit('update:model-value', readEditorValue()); }, diff --git a/packages/frontend/editor-ui/src/components/SqlEditor/SqlEditor.vue b/packages/frontend/editor-ui/src/components/SqlEditor/SqlEditor.vue index c6905816b9..ea5fe859e2 100644 --- a/packages/frontend/editor-ui/src/components/SqlEditor/SqlEditor.vue +++ b/packages/frontend/editor-ui/src/components/SqlEditor/SqlEditor.vue @@ -36,6 +36,7 @@ import { expressionCloseBrackets, expressionCloseBracketsConfig, } from '@/plugins/codemirror/expressionCloseBrackets'; +import type { TargetNodeParameterContext } from '@/Interface'; const SQL_DIALECTS = { StandardSQL, @@ -54,6 +55,7 @@ type Props = { rows?: number; isReadOnly?: boolean; fullscreen?: boolean; + targetNodeParameterContext?: TargetNodeParameterContext; }; const props = withDefaults(defineProps(), { @@ -61,6 +63,7 @@ const props = withDefaults(defineProps(), { rows: 4, isReadOnly: false, fullscreen: false, + targetNodeParameterContext: undefined, }); const emit = defineEmits<{ @@ -124,6 +127,7 @@ const { extensions, skipSegments: ['Statement', 'CompositeIdentifier', 'Parens', 'Brackets'], isReadOnly: props.isReadOnly, + targetNodeParameterContext: props.targetNodeParameterContext, onChange: () => { emit('update:model-value', readEditorValue()); },