mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
feat(Set Node): Overhaul (#6348)
Github issue / Community forum post (link here to close automatically): https://github.com/n8n-io/n8n/pull/6348 --------- Co-authored-by: Giulio Andreini <g.andreini@gmail.com> Co-authored-by: Marcus <marcus@n8n.io>
This commit is contained in:
@@ -99,6 +99,7 @@
|
||||
:defaultValue="parameter.default"
|
||||
:language="editorLanguage"
|
||||
:isReadOnly="isReadOnly"
|
||||
:rows="getArgument('rows')"
|
||||
:aiButtonEnabled="settingsStore.isCloudDeployment"
|
||||
@update:modelValue="valueChangedDebounced"
|
||||
/>
|
||||
@@ -118,7 +119,20 @@
|
||||
:modelValue="modelValue"
|
||||
:dialect="getArgument('sqlDialect')"
|
||||
:isReadOnly="isReadOnly"
|
||||
:rows="getArgument('rows')"
|
||||
@valueChanged="valueChangedDebounced"
|
||||
/>
|
||||
|
||||
<code-node-editor
|
||||
v-else-if="editorType === 'json' && !isExecuteWorkflowNode(node)"
|
||||
:mode="node.parameters.mode"
|
||||
:modelValue="modelValue"
|
||||
:defaultValue="parameter.default"
|
||||
:language="editorLanguage"
|
||||
:isReadOnly="isReadOnly"
|
||||
:aiButtonEnabled="false"
|
||||
@update:modelValue="valueChangedDebounced"
|
||||
:rows="getArgument('rows')"
|
||||
/>
|
||||
|
||||
<div v-else-if="editorType" class="readonly-code clickable" @click="displayEditDialog()">
|
||||
@@ -127,6 +141,7 @@
|
||||
:modelValue="modelValue"
|
||||
:language="editorLanguage"
|
||||
:isReadOnly="true"
|
||||
:rows="getArgument('rows')"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -384,7 +399,14 @@ import { externalHooks } from '@/mixins/externalHooks';
|
||||
import { nodeHelpers } from '@/mixins/nodeHelpers';
|
||||
import { workflowHelpers } from '@/mixins/workflowHelpers';
|
||||
import { hasExpressionMapping, isValueExpression, isResourceLocatorValue } from '@/utils';
|
||||
import { CODE_NODE_TYPE, CUSTOM_API_CALL_KEY, HTML_NODE_TYPE } from '@/constants';
|
||||
|
||||
import {
|
||||
CODE_NODE_TYPE,
|
||||
CUSTOM_API_CALL_KEY,
|
||||
EXECUTE_WORKFLOW_NODE_TYPE,
|
||||
HTML_NODE_TYPE,
|
||||
} from '@/constants';
|
||||
|
||||
import type { PropType } from 'vue';
|
||||
import { debounceHelper } from '@/mixins/debounce';
|
||||
import { useWorkflowsStore } from '@/stores/workflows.store';
|
||||
@@ -1035,6 +1057,9 @@ export default defineComponent({
|
||||
isHtmlNode(node: INodeUi): boolean {
|
||||
return node.type === HTML_NODE_TYPE;
|
||||
},
|
||||
isExecuteWorkflowNode(node: INodeUi): boolean {
|
||||
return node.type === EXECUTE_WORKFLOW_NODE_TYPE;
|
||||
},
|
||||
rgbaToHex(value: string): string | null {
|
||||
// Convert rgba to hex from: https://stackoverflow.com/questions/5623838/rgb-to-hex-and-hex-to-rgb
|
||||
const valueMatch = (value as string).match(
|
||||
|
||||
Reference in New Issue
Block a user