| 27 | const isMultiOutputNodeType = (nodeType?: string): boolean => |
| 28 | nodeType === "generaterows" || nodeType === "generaterowsschema" || nodeType === "multifilter"; |
| 29 | const serializeNodeConfigForExecution = (node: SerializedNode): string => { |
| 30 | if (node.type === "packfilesdropdown") { |
| 31 | return node.data.selectedPack || ""; |
| 32 | } |
| 33 | if (node.type === "tableselectiondropdown") { |
| 34 | return node.data.selectedTable || ""; |
| 35 | } |
| 36 | if (node.type === "columnselectiondropdown") { |
| 37 | return node.data.selectedColumn || ""; |
| 38 | } |
| 39 | if (node.type === "groupbycolumns") { |
| 40 | return JSON.stringify({ |
| 41 | column1: node.data.selectedColumn1 || "", |
| 42 | column2: node.data.selectedColumn2 || "", |
| 43 | onlyForMultiple: node.data.onlyForMultiple || false, |
| 44 | }); |
| 45 | } |
| 46 | if (node.type === "filter") { |
| 47 | return JSON.stringify({ |
| 48 | filters: (node.data as any).filters || [], |
| 49 | }); |
| 50 | } |
| 51 | if (node.type === "multifilter") { |
| 52 | return JSON.stringify({ |
| 53 | selectedColumn: (node.data as any).selectedColumn || "", |
| 54 | splitValues: (node.data as any).splitValues || [], |
| 55 | }); |
| 56 | } |
| 57 | if (node.type === "referencelookup") { |
| 58 | return JSON.stringify({ |
| 59 | selectedReferenceTable: (node.data as any).selectedReferenceTable || "", |
| 60 | includeBaseGame: (node.data as any).includeBaseGame !== false, |
| 61 | }); |
| 62 | } |
| 63 | if (node.type === "reversereferencelookup") { |
| 64 | return JSON.stringify({ |
| 65 | selectedReverseTable: (node.data as any).selectedReverseTable || "", |
| 66 | includeBaseGame: (node.data as any).includeBaseGame !== false, |
| 67 | }); |
| 68 | } |
| 69 | if (node.type === "groupedcolumnstotext") { |
| 70 | return JSON.stringify({ |
| 71 | pattern: (node.data as any).pattern || "{0}: {1}", |
| 72 | joinSeparator: (node.data as any).joinSeparator || "\\n", |
| 73 | }); |
| 74 | } |
| 75 | if (node.type === "savechanges") { |
| 76 | return JSON.stringify({ |
| 77 | packName: (node.data as any).packName || "", |
| 78 | packedFileName: (node.data as any).packedFileName || "", |
| 79 | additionalConfig: node.data.textValue || "", |
| 80 | flowExecutionId: (node.data as any).flowExecutionId || "", |
| 81 | }); |
| 82 | } |
| 83 | if (node.type === "textsurround") { |
| 84 | return JSON.stringify({ |
| 85 | surroundText: node.data.textValue || "", |
| 86 | groupedTextSelection: (node.data as any).groupedTextSelection || "Text", |