Fix merge conflicts

This commit is contained in:
Ilango
2024-03-06 16:03:12 +05:30
636 changed files with 29474 additions and 5308 deletions
+26 -9
View File
@@ -99,6 +99,7 @@ export const initNode = (nodeData, newNodeId) => {
id: `${newNodeId}-output-${nodeData.outputs[j].name}-${baseClasses}`,
name: nodeData.outputs[j].name,
label: nodeData.outputs[j].label,
description: nodeData.outputs[j].description ?? '',
type
}
options.push(newOutputOption)
@@ -107,6 +108,7 @@ export const initNode = (nodeData, newNodeId) => {
name: 'output',
label: 'Output',
type: 'options',
description: nodeData.outputs[0].description ?? '',
options,
default: nodeData.outputs[0].name
}
@@ -116,6 +118,7 @@ export const initNode = (nodeData, newNodeId) => {
id: `${newNodeId}-output-${nodeData.name}-${nodeData.baseClasses.join('|')}`,
name: nodeData.name,
label: nodeData.type,
description: nodeData.description ?? '',
type: nodeData.baseClasses.join(' | ')
}
outputAnchors.push(newOutput)
@@ -182,15 +185,6 @@ export const initNode = (nodeData, newNodeId) => {
return nodeData
}
export const getEdgeLabelName = (source) => {
const sourceSplit = source.split('-')
if (sourceSplit.length && sourceSplit[0].includes('ifElse')) {
const outputAnchorsIndex = sourceSplit[sourceSplit.length - 1]
return outputAnchorsIndex === '0' ? 'true' : 'false'
}
return ''
}
export const isValidConnection = (connection, reactFlowInstance) => {
const sourceHandle = connection.sourceHandle
const targetHandle = connection.targetHandle
@@ -286,6 +280,7 @@ export const generateExportFlowData = (flowData) => {
name: node.data.name,
type: node.data.type,
baseClasses: node.data.baseClasses,
tags: node.data.tags,
category: node.data.category,
description: node.data.description,
inputParams: node.data.inputParams,
@@ -612,3 +607,25 @@ export const getConfigExamplesForCurl = (configData, bodyType, isMultiple, stopN
}
return finalStr
}
export const getOS = () => {
let userAgent = window.navigator.userAgent.toLowerCase(),
macosPlatforms = /(macintosh|macintel|macppc|mac68k|macos)/i,
windowsPlatforms = /(win32|win64|windows|wince)/i,
iosPlatforms = /(iphone|ipad|ipod)/i,
os = null
if (macosPlatforms.test(userAgent)) {
os = 'macos'
} else if (iosPlatforms.test(userAgent)) {
os = 'ios'
} else if (windowsPlatforms.test(userAgent)) {
os = 'windows'
} else if (/android/.test(userAgent)) {
os = 'android'
} else if (!os && /linux/.test(userAgent)) {
os = 'linux'
}
return os
}