mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
refactor(editor): Move nodeTypes into store module (#3799)
* ⚡ Refactor `nodeTypes` into store module * ⚡ Fix condition * 🔥 Remove leftovers * ⚡ Move `getNodeTranslationHeaders`, `getNodesInformation`, `getNodeParameterOptions` * ⚡ Move leftover call * ⚡ Correct excess prefix * 🚚 Rename `nodeType` to `getNodeType` * 🚚 Move logic to `getFullNodesProperties` * ⚡ Simplify `getNodeType` * ⚡ Refactor `nodeTypes` mutations * ⚡ Refactor `Vue.set` call * ⚡ Simplify check * 🚚 Move export to bottom * 📘 Simplify typing * 🔥 Remove unused interface * 👕 Add `void` * 🚚 Fix naming * 🔥 Remove logging * ⚡ Simplify `updateNodeTypes` * 🚚 Move `omit` to utils * 🐛 Update `rootGetters` call * 🐛 Fix `allNodeTypes` call in `nativelyNumberSuffixedDefaults` * 🔥 Remove unused method * 🔥 Remove excess namespace Co-authored-by: Mutasem <mutdmour@gmail.com>
This commit is contained in:
@@ -172,7 +172,7 @@ export default mixins(
|
||||
},
|
||||
isSingleActiveTriggerNode (): boolean {
|
||||
const nodes = this.$store.getters.workflowTriggerNodes.filter((node: INodeUi) => {
|
||||
const nodeType = this.$store.getters.nodeType(node.type, node.typeVersion) as INodeTypeDescription | null;
|
||||
const nodeType = this.$store.getters['nodeTypes/getNodeType'](node.type, node.typeVersion) as INodeTypeDescription | null;
|
||||
return nodeType && nodeType.eventTriggerDescription !== '' && !node.disabled;
|
||||
});
|
||||
|
||||
@@ -188,7 +188,7 @@ export default mixins(
|
||||
return this.node && this.node.disabled;
|
||||
},
|
||||
nodeType (): INodeTypeDescription | null {
|
||||
return this.data && this.$store.getters.nodeType(this.data.type, this.data.typeVersion);
|
||||
return this.data && this.$store.getters['nodeTypes/getNodeType'](this.data.type, this.data.typeVersion);
|
||||
},
|
||||
node (): INodeUi | undefined { // same as this.data but reactive..
|
||||
return this.$store.getters.nodesByName[this.name] as INodeUi | undefined;
|
||||
|
||||
Reference in New Issue
Block a user