mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +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:
@@ -188,7 +188,7 @@ export const workflowHelpers = mixins(
|
||||
|
||||
const returnData: INodeTypesMaxCount = {};
|
||||
|
||||
const nodeTypes = this.$store.getters.allNodeTypes;
|
||||
const nodeTypes = this.$store.getters['nodeTypes/allNodeTypes'];
|
||||
for (const nodeType of nodeTypes) {
|
||||
if (nodeType.maxNodes !== undefined) {
|
||||
returnData[nodeType.name] = {
|
||||
@@ -298,7 +298,7 @@ export const workflowHelpers = mixins(
|
||||
return [];
|
||||
},
|
||||
getByNameAndVersion: (nodeType: string, version?: number): INodeType | undefined => {
|
||||
const nodeTypeDescription = this.$store.getters.nodeType(nodeType, version) as INodeTypeDescription | null;
|
||||
const nodeTypeDescription = this.$store.getters['nodeTypes/getNodeType'](nodeType, version) as INodeTypeDescription | null;
|
||||
|
||||
if (nodeTypeDescription === null) {
|
||||
return undefined;
|
||||
@@ -406,7 +406,7 @@ export const workflowHelpers = mixins(
|
||||
|
||||
// Get the data of the node type that we can get the default values
|
||||
// TODO: Later also has to care about the node-type-version as defaults could be different
|
||||
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;
|
||||
|
||||
if (nodeType !== null) {
|
||||
// Node-Type is known so we can save the parameters correctly
|
||||
|
||||
Reference in New Issue
Block a user