mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
feat(editor): Help users discover expressions when using drag n drop (#8869)
This commit is contained in:
@@ -7,7 +7,11 @@ import type {
|
||||
XYPosition,
|
||||
} from '@/Interface';
|
||||
import { useStorage } from '@/composables/useStorage';
|
||||
import { LOCAL_STORAGE_MAPPING_IS_ONBOARDED, STORES } from '@/constants';
|
||||
import {
|
||||
LOCAL_STORAGE_AUTOCOMPLETE_IS_ONBOARDED,
|
||||
LOCAL_STORAGE_MAPPING_IS_ONBOARDED,
|
||||
STORES,
|
||||
} from '@/constants';
|
||||
import type { INodeExecutionData, INodeIssues } from 'n8n-workflow';
|
||||
import { NodeConnectionType } from 'n8n-workflow';
|
||||
import { defineStore } from 'pinia';
|
||||
@@ -50,6 +54,7 @@ export const useNDVStore = defineStore(STORES.NDV, {
|
||||
activeTarget: null,
|
||||
},
|
||||
isMappingOnboarded: useStorage(LOCAL_STORAGE_MAPPING_IS_ONBOARDED).value === 'true',
|
||||
isAutocompleteOnboarded: useStorage(LOCAL_STORAGE_AUTOCOMPLETE_IS_ONBOARDED).value === 'true',
|
||||
}),
|
||||
getters: {
|
||||
activeNode(): INodeUi | null {
|
||||
@@ -77,7 +82,9 @@ export const useNDVStore = defineStore(STORES.NDV, {
|
||||
},
|
||||
hasInputData(): boolean {
|
||||
const data = this.ndvInputData;
|
||||
return data && data.length > 0;
|
||||
const pinData =
|
||||
this.ndvInputNodeName && useWorkflowsStore().pinDataByNodeName(this.ndvInputNodeName);
|
||||
return !!(data && data.length > 0) || !!(pinData && pinData.length > 0);
|
||||
},
|
||||
getPanelDisplayMode() {
|
||||
return (panel: NodePanelType) => this[panel].displayMode;
|
||||
@@ -236,11 +243,13 @@ export const useNDVStore = defineStore(STORES.NDV, {
|
||||
setNDVPanelDataIsEmpty(payload: { panel: 'input' | 'output'; isEmpty: boolean }): void {
|
||||
this[payload.panel].data.isEmpty = payload.isEmpty;
|
||||
},
|
||||
disableMappingHint(store = true) {
|
||||
setMappingOnboarded() {
|
||||
this.isMappingOnboarded = true;
|
||||
if (store) {
|
||||
useStorage(LOCAL_STORAGE_MAPPING_IS_ONBOARDED).value = 'true';
|
||||
}
|
||||
useStorage(LOCAL_STORAGE_MAPPING_IS_ONBOARDED).value = 'true';
|
||||
},
|
||||
setAutocompleteOnboarded() {
|
||||
this.isAutocompleteOnboarded = true;
|
||||
useStorage(LOCAL_STORAGE_AUTOCOMPLETE_IS_ONBOARDED).value = 'true';
|
||||
},
|
||||
updateNodeParameterIssues(issues: INodeIssues): void {
|
||||
const workflowsStore = useWorkflowsStore();
|
||||
|
||||
Reference in New Issue
Block a user