@notmrabhi/flowforge 0.1.41 → 0.1.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/dist/GatewayBranchEdge-CMY30xhz.js +2 -0
  2. package/dist/GatewayBranchEdge-CMY30xhz.js.map +1 -0
  3. package/dist/{GatewayBranchEdge-F2AGJpun.js → GatewayBranchEdge-CrgczPYJ.js} +161 -153
  4. package/dist/GatewayBranchEdge-CrgczPYJ.js.map +1 -0
  5. package/dist/{SchemaBuilderDrawer-CUzYWGCN.js → SchemaBuilderDrawer-DlmInnSC.js} +33 -33
  6. package/dist/{SchemaBuilderDrawer-CUzYWGCN.js.map → SchemaBuilderDrawer-DlmInnSC.js.map} +1 -1
  7. package/dist/{SchemaBuilderDrawer-CiSdfXzJ.js → SchemaBuilderDrawer-KUOXc7K_.js} +2 -2
  8. package/dist/{SchemaBuilderDrawer-CiSdfXzJ.js.map → SchemaBuilderDrawer-KUOXc7K_.js.map} +1 -1
  9. package/dist/canvas.cjs +1 -1
  10. package/dist/canvas.d.ts +131 -1
  11. package/dist/canvas.js +2 -2
  12. package/dist/core.cjs +1 -1
  13. package/dist/core.d.ts +39 -0
  14. package/dist/core.js +22 -23
  15. package/dist/core.js.map +1 -1
  16. package/dist/defaultUi.cjs +1 -1
  17. package/dist/defaultUi.js +1 -1
  18. package/dist/form.cjs +1 -1
  19. package/dist/form.d.ts +121 -0
  20. package/dist/form.js +36 -33
  21. package/dist/{index-B8-KKaH_.js → index-AISQhG1t.js} +2 -2
  22. package/dist/{index-B8-KKaH_.js.map → index-AISQhG1t.js.map} +1 -1
  23. package/dist/index-BDDJrQn0.js +10 -0
  24. package/dist/index-BDDJrQn0.js.map +1 -0
  25. package/dist/{index-Buv1ylwP.js → index-CBJiDDQc.js} +2 -2
  26. package/dist/{index-Buv1ylwP.js.map → index-CBJiDDQc.js.map} +1 -1
  27. package/dist/{index-DjKhaaWf.js → index-CbdFoSw3.js} +2 -2
  28. package/dist/{index-DjKhaaWf.js.map → index-CbdFoSw3.js.map} +1 -1
  29. package/dist/{index-CiU9_8f1.js → index-DU-niBi3.js} +2 -2
  30. package/dist/{index-CiU9_8f1.js.map → index-DU-niBi3.js.map} +1 -1
  31. package/dist/{index-B74jTc2b.js → index-y_v8Qog1.js} +3124 -3005
  32. package/dist/index-y_v8Qog1.js.map +1 -0
  33. package/dist/index.cjs +1 -1
  34. package/dist/index.cjs.map +1 -1
  35. package/dist/index.d.ts +143 -1
  36. package/dist/index.js +81 -79
  37. package/dist/index.js.map +1 -1
  38. package/dist/nodeRegistry.cjs +1 -1
  39. package/dist/nodeRegistry.cjs.map +1 -1
  40. package/dist/nodeRegistry.d.ts +39 -0
  41. package/dist/nodeRegistry.js +543 -23
  42. package/dist/nodeRegistry.js.map +1 -1
  43. package/dist/{templateSkeletons-BQQ7UKp6.js → templateSkeletons-CHrd4Z5h.js} +375 -373
  44. package/dist/templateSkeletons-CHrd4Z5h.js.map +1 -0
  45. package/dist/templateSkeletons-CtknKiGO.js +2 -0
  46. package/dist/templateSkeletons-CtknKiGO.js.map +1 -0
  47. package/package.json +1 -1
  48. package/dist/GatewayBranchEdge-Dvkwkx-b.js +0 -2
  49. package/dist/GatewayBranchEdge-Dvkwkx-b.js.map +0 -1
  50. package/dist/GatewayBranchEdge-F2AGJpun.js.map +0 -1
  51. package/dist/index-B6xrei80.js +0 -87
  52. package/dist/index-B6xrei80.js.map +0 -1
  53. package/dist/index-B74jTc2b.js.map +0 -1
  54. package/dist/index-BrJBVztu.js +0 -2
  55. package/dist/index-BrJBVztu.js.map +0 -1
  56. package/dist/index-CXmgrKoe.js +0 -2
  57. package/dist/index-CXmgrKoe.js.map +0 -1
  58. package/dist/index-CqMPyOkL.js +0 -10
  59. package/dist/index-CqMPyOkL.js.map +0 -1
  60. package/dist/index-Dcur-XJ9.js +0 -36
  61. package/dist/index-Dcur-XJ9.js.map +0 -1
  62. package/dist/subWorkflowDescriptor-DYOYgBzX.js +0 -535
  63. package/dist/subWorkflowDescriptor-DYOYgBzX.js.map +0 -1
  64. package/dist/subWorkflowDescriptor-JDKi2INh.js +0 -2
  65. package/dist/subWorkflowDescriptor-JDKi2INh.js.map +0 -1
  66. package/dist/templateSkeletons-BQQ7UKp6.js.map +0 -1
  67. package/dist/templateSkeletons-C00QyIgk.js +0 -2
  68. package/dist/templateSkeletons-C00QyIgk.js.map +0 -1
@@ -1,2 +0,0 @@
1
- "use strict";const a=require("react"),r=require("react-icons/md"),d=require("./canvasTokens-gKNYrPl4.js"),s={formSchema:[],bpmnEntry:e=>e,bpmnExit:e=>e,emitBpmnElements:e=>[{id:e,$type:"bpmn:Task"}]};function o(e){return{...s,...e}}const c=o({type:"startEvent",label:"Start",icon:a.createElement(r.MdPlayCircleOutline,{size:18,color:"#616161"}),matches:e=>e==="start",reactFlowType:"startNode",emitBpmnElements:e=>[{id:e,$type:"bpmn:StartEvent"}],maxPerWorkflow:1}),u=o({type:"endEvent",label:"End",icon:a.createElement(r.MdStopCircle,{size:18,color:"#616161"}),matches:e=>e==="end"||e.startsWith("end-"),reactFlowType:"endNode",emitBpmnElements:e=>[{id:e,$type:"bpmn:EndEvent"}]}),b=o({type:"restApi",label:"REST API Call",icon:a.createElement(r.MdHttp,{size:18,color:"#546e7a"}),matches:e=>e.startsWith("restApi-"),reactFlowType:"restApiNode",formSchema:[{id:"method",type:"select",label:"HTTP Method",required:!0,options:[{label:"GET",value:"GET"},{label:"POST",value:"POST"},{label:"PUT",value:"PUT"},{label:"PATCH",value:"PATCH"},{label:"DELETE",value:"DELETE"}]},{id:"url",type:"text",label:"URL",required:!0,placeholder:"https://api.example.com/endpoint",formulaEnabled:!0},{id:"headers",type:"key-value",label:"Request Headers",placeholder:"Add headers..."},{id:"queryParams",type:"key-value",label:"Query Parameters",shouldHide:({values:e})=>e.method!=="GET"&&e.method!=="DELETE"},{id:"body",type:"json-editor",label:"Request Body (JSON)",shouldHide:({values:e})=>e.method==="GET"||e.method==="DELETE"},{id:"responseMapping",type:"array",label:"Map Response Fields to Variables",children:[{id:"jsonPath",type:"text",label:"JSON Path",placeholder:"$.data.userId",required:!0},{id:"variableName",type:"text",label:"Variable Name",placeholder:"userId",required:!0}]},{id:"timeoutMs",type:"number",label:"Timeout (ms)",placeholder:"5000"},{id:"continueOnError",type:"toggle",label:"Continue workflow on error"}],bpmnEntry:e=>`REST API Call: ${e}`,bpmnExit:e=>`End REST API Call: ${e}`,emitBpmnElements:(e,t)=>{const l=t;return[{id:e,$type:"bpmn:ServiceTask",name:`${l.method??"HTTP"} ${l.url??""}`.trim()}]}}),h=o({type:"notification",label:"Send Notification",icon:a.createElement(r.MdNotifications,{size:18,color:"#7b1fa2"}),matches:e=>e.startsWith("notification-"),reactFlowType:"notificationNode",formSchema:[{id:"channel",type:"descriptive-select",label:"Notification Channel",required:!0,options:[{value:"email",label:"Email",description:"Send via SMTP or email provider"},{value:"slack",label:"Slack",description:"Post to a Slack channel or DM"},{value:"teams",label:"Microsoft Teams",description:"Post to a Teams channel or chat"},{value:"sms",label:"SMS",description:"Send a text message"},{value:"in-app",label:"In-App",description:"miniOrange notification center"},{value:"webhook",label:"Webhook",description:"POST to an external URL"}]},{id:"emailTo",type:"tags",label:"To",placeholder:"Add email address...",required:!0,shouldHide:({values:e})=>e.channel!=="email",formulaEnabled:!0},{id:"emailCc",type:"tags",label:"CC",placeholder:"Add email address...",shouldHide:({values:e})=>e.channel!=="email"},{id:"emailSubject",type:"text",label:"Subject",required:!0,formulaEnabled:!0,shouldHide:({values:e})=>e.channel!=="email"},{id:"emailBody",type:"rich-text",label:"Body",required:!0,shouldHide:({values:e})=>e.channel!=="email"},{id:"slackChannel",type:"text",label:"Channel / DM",required:!0,placeholder:"#general or @username",formulaEnabled:!0,shouldHide:({values:e})=>e.channel!=="slack"},{id:"slackMessage",type:"textarea",label:"Message",required:!0,formulaEnabled:!0,shouldHide:({values:e})=>e.channel!=="slack"},{id:"teamsWebhookUrl",type:"text",label:"Incoming Webhook URL",required:!0,placeholder:"https://...",shouldHide:({values:e})=>e.channel!=="teams"},{id:"teamsMessage",type:"textarea",label:"Message",required:!0,formulaEnabled:!0,shouldHide:({values:e})=>e.channel!=="teams"},{id:"smsTo",type:"text",label:"Phone Number",required:!0,placeholder:"+1234567890",formulaEnabled:!0,shouldHide:({values:e})=>e.channel!=="sms"},{id:"smsBody",type:"textarea",label:"Message",required:!0,formulaEnabled:!0,shouldHide:({values:e})=>e.channel!=="sms"},{id:"inAppRecipient",type:"text",label:"Recipient (User ID or Username)",required:!0,formulaEnabled:!0,shouldHide:({values:e})=>e.channel!=="in-app"},{id:"inAppTitle",type:"text",label:"Title",required:!0,formulaEnabled:!0,shouldHide:({values:e})=>e.channel!=="in-app"},{id:"inAppBody",type:"textarea",label:"Message",required:!0,formulaEnabled:!0,shouldHide:({values:e})=>e.channel!=="in-app"},{id:"webhookUrl",type:"text",label:"Webhook URL",required:!0,placeholder:"https://...",formulaEnabled:!0,shouldHide:({values:e})=>e.channel!=="webhook"},{id:"webhookPayload",type:"json-editor",label:"Payload (JSON)",shouldHide:({values:e})=>e.channel!=="webhook"},{id:"sendOnFailure",type:"toggle",label:"Also send notification on workflow failure"},{id:"deduplicationKey",type:"text",label:"Deduplication Key",placeholder:"Optional — prevents duplicate sends",formulaEnabled:!0}],bpmnEntry:e=>`Send Notification: ${e}`,bpmnExit:e=>`End Notification: ${e}`,emitBpmnElements:(e,t)=>[{id:e,$type:"bpmn:SendTask",name:`Notify via ${t.channel??"channel"}`}]}),m=[{label:"equals (=)",value:"eq"},{label:"not equals (≠)",value:"neq"},{label:"greater than (>)",value:"gt"},{label:"greater or equal (≥)",value:"gte"},{label:"less than (<)",value:"lt"},{label:"less or equal (≤)",value:"lte"},{label:"contains",value:"contains"},{label:"starts with",value:"startsWith"},{label:"ends with",value:"endsWith"},{label:"is empty",value:"isEmpty"},{label:"is not empty",value:"isNotEmpty"}],y=o({type:"conditionBranch",label:"Condition Branch",icon:a.createElement(r.MdCallSplit,{size:18,color:"#512da8"}),matches:e=>e.startsWith("conditionBranch-"),reactFlowType:"conditionBranchNode",branchLabels:{branch1:"IF · Branch 1",branch2:"ELSE IF · Branch 2",default:"ELSE"},formSchema:[{id:"title",type:"text",label:"Node Label",placeholder:"e.g. Route by User Role"},{id:"branchConfigs",type:"array",label:"Branches",required:!0,children:[{id:"kind",type:"select",label:"Branch Type",required:!0,options:[{label:"IF",value:"if"},{label:"ELSE IF",value:"elseif"},{label:"ELSE",value:"else"}],placeholder:"elseif"},{id:"key",type:"text",label:"Branch Key",required:!0,placeholder:"e.g. admin (no spaces)"},{id:"label",type:"text",label:"Branch Label",required:!0,placeholder:"e.g. Admin Users"},{id:"conditions",type:"array",label:"Conditions",shouldHide:({values:e})=>e.kind==="else",children:[{id:"field",type:"text",label:"Field / Variable",required:!0,placeholder:"e.g. user.role",formulaEnabled:!0},{id:"operator",type:"select",label:"Operator",required:!0,options:m},{id:"value",type:"text",label:"Value",placeholder:"e.g. admin",formulaEnabled:!0,shouldHide:({values:e})=>e.operator==="isEmpty"||e.operator==="isNotEmpty"},{id:"logicalOperator",type:"select",label:"Combine with next",options:[{label:"AND",value:"AND"},{label:"OR",value:"OR"}]}]}]},{id:"defaultBranch",type:"text",label:"Default Branch Key (fallback if no condition matches)",placeholder:"e.g. default"}],bpmnEntry:e=>`Condition Branch: ${e}`,bpmnExit:e=>`End Condition Branch: ${e}`,emitBpmnElements:(e,t)=>{const l=t,i=l.branchConfigs??[];return[{id:e,$type:"bpmn:ExclusiveGateway",name:l.title??"Condition Branch"},...i.map(n=>({id:`${e}-${n.key}`,$type:"bpmn:SequenceFlow",name:n.label}))]}}),E=o({type:"webhookTrigger",label:"Webhook Trigger",icon:a.createElement(r.MdWebhook,{size:d.NODE_DESCRIPTOR_ICON_SIZE,color:"#1565c0"}),matches:e=>e.startsWith("webhookTrigger-"),reactFlowType:"webhookTriggerNode",formSchema:[{id:"endpointUrl",type:"text",label:"Endpoint URL",disabled:!0,placeholder:"Generated after saving"},{id:"authMethod",type:"select",label:"Authentication",required:!0,options:[{label:"None",value:"none"},{label:"API Key",value:"api-key"},{label:"HMAC Signature",value:"hmac"}]},{id:"apiKeyHeader",type:"text",label:"API Key Header Name",placeholder:"e.g. X-API-Key",shouldHide:({values:e})=>e.authMethod!=="api-key"},{id:"hmacSecret",type:"text",label:"HMAC Secret",placeholder:"Shared secret for signature verification",shouldHide:({values:e})=>e.authMethod!=="hmac"},{id:"payloadDescription",type:"textarea",label:"Expected Payload Description",placeholder:"Describe the expected JSON payload fields..."}],bpmnEntry:e=>`Webhook Trigger: ${e}`,bpmnExit:e=>`End Webhook Trigger: ${e}`,emitBpmnElements:e=>[{id:e,$type:"bpmn:StartEvent",name:"Webhook Trigger"}]}),f={triggerKey:"WEBHOOK_TRIGGER",label:"Incoming Webhook",description:"Start this workflow when an HTTP POST is received at a generated endpoint.",triggerCategory:"webhook",icon:a.createElement(r.MdWebhook,{size:d.NODE_DESCRIPTOR_ICON_SIZE,color:"#1565c0"})};function p(e={}){return o({type:"subWorkflow",label:"Sub-Workflow",icon:a.createElement(r.MdAccountTree,{size:18,color:"#00695c"}),matches:t=>t.startsWith("subWorkflow-"),reactFlowType:"subWorkflowNode",formSchema:[{id:"workflowId",type:"select",label:"Workflow to Call",required:!0,placeholder:"Select a workflow...",...e.fetchWorkflowOptions?{fetchOptions:e.fetchWorkflowOptions}:{options:[]}},{id:"workflowLabel",type:"text",label:"Display Name (optional)",placeholder:"Override display name shown on canvas"},{id:"inputMapping",type:"key-value",label:"Input Mapping",placeholder:"Map parent variables → sub-workflow inputs",formulaEnabled:!0},{id:"outputMapping",type:"key-value",label:"Output Mapping",placeholder:"Map sub-workflow outputs → parent variables"},{id:"waitForCompletion",type:"toggle",label:"Wait for sub-workflow to complete before continuing"},{id:"continueOnError",type:"toggle",label:"Continue parent workflow if sub-workflow fails"}],bpmnEntry:t=>`Sub-Workflow Call: ${t}`,bpmnExit:t=>`End Sub-Workflow Call: ${t}`,emitBpmnElements:(t,l)=>{const i=l;return[{id:t,$type:"bpmn:CallActivity",name:i.workflowLabel||i.workflowId||"Sub-Workflow",calledElement:i.workflowId}]}})}const k=p();exports.baseNodeDefaults=s;exports.conditionBranchDescriptor=y;exports.defineNode=o;exports.endEventDescriptor=u;exports.makeSubWorkflowDescriptor=p;exports.notificationDescriptor=h;exports.restApiDescriptor=b;exports.startEventDescriptor=c;exports.subWorkflowDescriptor=k;exports.webhookTriggerDescriptor=E;exports.webhookTriggerTemplate=f;
2
- //# sourceMappingURL=subWorkflowDescriptor-JDKi2INh.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"subWorkflowDescriptor-JDKi2INh.js","sources":["../src/nodeRegistry/defineNode.ts","../src/nodeRegistry/descriptors/startEventDescriptor.ts","../src/nodeRegistry/descriptors/endEventDescriptor.ts","../src/nodeRegistry/descriptors/restApiDescriptor.ts","../src/nodeRegistry/descriptors/notificationDescriptor.ts","../src/nodeRegistry/descriptors/conditionBranchDescriptor.ts","../src/nodeRegistry/descriptors/webhookDescriptors.ts","../src/nodeRegistry/descriptors/subWorkflowDescriptor.ts"],"sourcesContent":["import { NodeDescriptor } from '../WorkflowCanvas/types';\n\n/**\n * Base defaults shared by every node descriptor. A new node only has to specify\n * what makes it different — these fill in the rest.\n *\n * - `formSchema: []` → no config form unless the node defines one\n * - `bpmnEntry` / `bpmnExit` → incoming/outgoing flow connects to the node id itself\n * - `emitBpmnElements` → a single generic bpmn:Task; override for real output\n */\nexport const baseNodeDefaults: Pick<\n NodeDescriptor,\n 'formSchema' | 'bpmnEntry' | 'bpmnExit' | 'emitBpmnElements'\n> = {\n formSchema: [],\n bpmnEntry: (id) => id,\n bpmnExit: (id) => id,\n emitBpmnElements: (id) => [{ id, $type: 'bpmn:Task' }],\n};\n\n/** The fields every node MUST provide — there is no sensible default for these. */\ntype RequiredNodeFields = Pick<NodeDescriptor, 'type' | 'label' | 'matches' | 'reactFlowType'>;\n\n/**\n * Build a node descriptor on top of {@link baseNodeDefaults}.\n *\n * Supply the four required identity fields plus only the behaviour you want to\n * override. Everything else inherits the base.\n *\n * export const startEventDescriptor = defineNode({\n * type: 'startEvent',\n * label: 'Start',\n * matches: (id) => id === 'start',\n * reactFlowType: 'startNode',\n * emitBpmnElements: (id) => [{ id, $type: 'bpmn:StartEvent' }], // override\n * });\n */\nexport function defineNode(\n overrides: RequiredNodeFields & Partial<NodeDescriptor>,\n): NodeDescriptor {\n return { ...baseNodeDefaults, ...overrides };\n}\n","import React from 'react';\nimport { MdPlayCircleOutline } from 'react-icons/md';\nimport { defineNode } from '../defineNode';\n\n/**\n * Start event — a fixed skeleton node with no user-editable form.\n * The canvas seeds it as the literal slot id `'start'` (see buildInitialSlots\n * in WorkflowCanvas.tsx). This descriptor exists so the registry can resolve\n * that id via `forId('start')` and emit it during descriptor-driven BPMN save.\n *\n * Inherits formSchema (none) and bpmnEntry/bpmnExit from the base node.\n */\nexport const startEventDescriptor = defineNode({\n type: 'startEvent',\n label: 'Start',\n icon: React.createElement(MdPlayCircleOutline, { size: 18, color: '#616161' }),\n matches: (id) => id === 'start',\n reactFlowType: 'startNode',\n emitBpmnElements: (id) => [{ id, $type: 'bpmn:StartEvent' }],\n maxPerWorkflow: 1,\n});\n","import React from 'react';\nimport { MdStopCircle } from 'react-icons/md';\nimport { defineNode } from '../defineNode';\n\n/**\n * End event — a fixed skeleton node with no user-editable form.\n * The canvas seeds the main-spine end as the literal slot id `'end'`, and one\n * end per branch as `'end-${filterId}-${branch}'` (see WorkflowCanvas.tsx).\n * `matches` must cover both shapes so every terminal node resolves via `forId`\n * during descriptor-driven BPMN load — otherwise branch ends get skipped.\n *\n * Inherits formSchema (none) and bpmnEntry/bpmnExit from the base node.\n */\nexport const endEventDescriptor = defineNode({\n type: 'endEvent',\n label: 'End',\n icon: React.createElement(MdStopCircle, { size: 18, color: '#616161' }),\n matches: (id) => id === 'end' || id.startsWith('end-'),\n reactFlowType: 'endNode',\n emitBpmnElements: (id) => [{ id, $type: 'bpmn:EndEvent' }],\n});\n","import React from 'react';\nimport { MdHttp } from 'react-icons/md';\nimport { defineNode } from '../defineNode';\n\nexport const restApiDescriptor = defineNode({\n type: 'restApi',\n label: 'REST API Call',\n icon: React.createElement(MdHttp, { size: 18, color: '#546e7a' }),\n matches: (id) => id.startsWith('restApi-'),\n reactFlowType: 'restApiNode',\n formSchema: [\n {\n id: 'method',\n type: 'select',\n label: 'HTTP Method',\n required: true,\n options: [\n { label: 'GET', value: 'GET' },\n { label: 'POST', value: 'POST' },\n { label: 'PUT', value: 'PUT' },\n { label: 'PATCH', value: 'PATCH' },\n { label: 'DELETE', value: 'DELETE' },\n ],\n },\n {\n id: 'url',\n type: 'text',\n label: 'URL',\n required: true,\n placeholder: 'https://api.example.com/endpoint',\n formulaEnabled: true,\n },\n {\n id: 'headers',\n type: 'key-value',\n label: 'Request Headers',\n placeholder: 'Add headers...',\n },\n {\n id: 'queryParams',\n type: 'key-value',\n label: 'Query Parameters',\n shouldHide: ({ values }: { values: Record<string, unknown> }) =>\n values.method !== 'GET' && values.method !== 'DELETE',\n },\n {\n id: 'body',\n type: 'json-editor',\n label: 'Request Body (JSON)',\n shouldHide: ({ values }: { values: Record<string, unknown> }) =>\n values.method === 'GET' || values.method === 'DELETE',\n },\n {\n id: 'responseMapping',\n type: 'array',\n label: 'Map Response Fields to Variables',\n children: [\n {\n id: 'jsonPath',\n type: 'text',\n label: 'JSON Path',\n placeholder: '$.data.userId',\n required: true,\n },\n {\n id: 'variableName',\n type: 'text',\n label: 'Variable Name',\n placeholder: 'userId',\n required: true,\n },\n ],\n },\n {\n id: 'timeoutMs',\n type: 'number',\n label: 'Timeout (ms)',\n placeholder: '5000',\n },\n {\n id: 'continueOnError',\n type: 'toggle',\n label: 'Continue workflow on error',\n },\n ],\n bpmnEntry: (id) => `REST API Call: ${id}`,\n bpmnExit: (id) => `End REST API Call: ${id}`,\n emitBpmnElements: (id, data) => {\n const d = data as Record<string, unknown>;\n return [{\n id,\n $type: 'bpmn:ServiceTask',\n name: `${d.method ?? 'HTTP'} ${d.url ?? ''}`.trim(),\n }];\n },\n});\n","import React from 'react';\nimport { MdNotifications } from 'react-icons/md';\nimport { defineNode } from '../defineNode';\n\nexport const notificationDescriptor = defineNode({\n type: 'notification',\n label: 'Send Notification',\n icon: React.createElement(MdNotifications, { size: 18, color: '#7b1fa2' }),\n matches: (id) => id.startsWith('notification-'),\n reactFlowType: 'notificationNode',\n formSchema: [\n {\n id: 'channel',\n type: 'descriptive-select',\n label: 'Notification Channel',\n required: true,\n options: [\n { value: 'email', label: 'Email', description: 'Send via SMTP or email provider' },\n { value: 'slack', label: 'Slack', description: 'Post to a Slack channel or DM' },\n { value: 'teams', label: 'Microsoft Teams', description: 'Post to a Teams channel or chat' },\n { value: 'sms', label: 'SMS', description: 'Send a text message' },\n { value: 'in-app', label: 'In-App', description: 'miniOrange notification center' },\n { value: 'webhook', label: 'Webhook', description: 'POST to an external URL' },\n ],\n },\n\n // ── Email fields ──────────────────────────────────────────────────────────\n {\n id: 'emailTo',\n type: 'tags',\n label: 'To',\n placeholder: 'Add email address...',\n required: true,\n shouldHide: ({ values }: { values: Record<string, unknown> }) => values.channel !== 'email',\n formulaEnabled: true,\n },\n {\n id: 'emailCc',\n type: 'tags',\n label: 'CC',\n placeholder: 'Add email address...',\n shouldHide: ({ values }: { values: Record<string, unknown> }) => values.channel !== 'email',\n },\n {\n id: 'emailSubject',\n type: 'text',\n label: 'Subject',\n required: true,\n formulaEnabled: true,\n shouldHide: ({ values }: { values: Record<string, unknown> }) => values.channel !== 'email',\n },\n {\n id: 'emailBody',\n type: 'rich-text',\n label: 'Body',\n required: true,\n shouldHide: ({ values }: { values: Record<string, unknown> }) => values.channel !== 'email',\n },\n\n // ── Slack fields ──────────────────────────────────────────────────────────\n {\n id: 'slackChannel',\n type: 'text',\n label: 'Channel / DM',\n required: true,\n placeholder: '#general or @username',\n formulaEnabled: true,\n shouldHide: ({ values }: { values: Record<string, unknown> }) => values.channel !== 'slack',\n },\n {\n id: 'slackMessage',\n type: 'textarea',\n label: 'Message',\n required: true,\n formulaEnabled: true,\n shouldHide: ({ values }: { values: Record<string, unknown> }) => values.channel !== 'slack',\n },\n\n // ── Teams fields ──────────────────────────────────────────────────────────\n {\n id: 'teamsWebhookUrl',\n type: 'text',\n label: 'Incoming Webhook URL',\n required: true,\n placeholder: 'https://...',\n shouldHide: ({ values }: { values: Record<string, unknown> }) => values.channel !== 'teams',\n },\n {\n id: 'teamsMessage',\n type: 'textarea',\n label: 'Message',\n required: true,\n formulaEnabled: true,\n shouldHide: ({ values }: { values: Record<string, unknown> }) => values.channel !== 'teams',\n },\n\n // ── SMS fields ────────────────────────────────────────────────────────────\n {\n id: 'smsTo',\n type: 'text',\n label: 'Phone Number',\n required: true,\n placeholder: '+1234567890',\n formulaEnabled: true,\n shouldHide: ({ values }: { values: Record<string, unknown> }) => values.channel !== 'sms',\n },\n {\n id: 'smsBody',\n type: 'textarea',\n label: 'Message',\n required: true,\n formulaEnabled: true,\n shouldHide: ({ values }: { values: Record<string, unknown> }) => values.channel !== 'sms',\n },\n\n // ── In-App fields ─────────────────────────────────────────────────────────\n {\n id: 'inAppRecipient',\n type: 'text',\n label: 'Recipient (User ID or Username)',\n required: true,\n formulaEnabled: true,\n shouldHide: ({ values }: { values: Record<string, unknown> }) => values.channel !== 'in-app',\n },\n {\n id: 'inAppTitle',\n type: 'text',\n label: 'Title',\n required: true,\n formulaEnabled: true,\n shouldHide: ({ values }: { values: Record<string, unknown> }) => values.channel !== 'in-app',\n },\n {\n id: 'inAppBody',\n type: 'textarea',\n label: 'Message',\n required: true,\n formulaEnabled: true,\n shouldHide: ({ values }: { values: Record<string, unknown> }) => values.channel !== 'in-app',\n },\n\n // ── Webhook fields ────────────────────────────────────────────────────────\n {\n id: 'webhookUrl',\n type: 'text',\n label: 'Webhook URL',\n required: true,\n placeholder: 'https://...',\n formulaEnabled: true,\n shouldHide: ({ values }: { values: Record<string, unknown> }) => values.channel !== 'webhook',\n },\n {\n id: 'webhookPayload',\n type: 'json-editor',\n label: 'Payload (JSON)',\n shouldHide: ({ values }: { values: Record<string, unknown> }) => values.channel !== 'webhook',\n },\n\n // ── Shared options ────────────────────────────────────────────────────────\n {\n id: 'sendOnFailure',\n type: 'toggle',\n label: 'Also send notification on workflow failure',\n },\n {\n id: 'deduplicationKey',\n type: 'text',\n label: 'Deduplication Key',\n placeholder: 'Optional — prevents duplicate sends',\n formulaEnabled: true,\n },\n ],\n bpmnEntry: (id) => `Send Notification: ${id}`,\n bpmnExit: (id) => `End Notification: ${id}`,\n emitBpmnElements: (id, data) => {\n const d = data as Record<string, unknown>;\n return [{ id, $type: 'bpmn:SendTask', name: `Notify via ${d.channel ?? 'channel'}` }];\n },\n});\n","import React from 'react';\nimport { MdCallSplit } from 'react-icons/md';\nimport { defineNode } from '../defineNode';\n\nconst CONDITION_OPERATORS = [\n { label: 'equals (=)', value: 'eq' },\n { label: 'not equals (≠)', value: 'neq' },\n { label: 'greater than (>)', value: 'gt' },\n { label: 'greater or equal (≥)', value: 'gte' },\n { label: 'less than (<)', value: 'lt' },\n { label: 'less or equal (≤)', value: 'lte' },\n { label: 'contains', value: 'contains' },\n { label: 'starts with', value: 'startsWith' },\n { label: 'ends with', value: 'endsWith' },\n { label: 'is empty', value: 'isEmpty' },\n { label: 'is not empty', value: 'isNotEmpty' },\n];\n\nexport const conditionBranchDescriptor = defineNode({\n type: 'conditionBranch',\n label: 'Condition Branch',\n icon: React.createElement(MdCallSplit, { size: 18, color: '#512da8' }),\n matches: (id) => id.startsWith('conditionBranch-'),\n reactFlowType: 'conditionBranchNode',\n /** Initial branch labels — canvas uses these keys to initialise BranchMap on insert.\n * Pre-seeded as Workato-style IF / ELSE IF / ELSE chain. */\n branchLabels: { branch1: 'IF · Branch 1', branch2: 'ELSE IF · Branch 2', default: 'ELSE' },\n formSchema: [\n {\n id: 'title',\n type: 'text',\n label: 'Node Label',\n placeholder: 'e.g. Route by User Role',\n },\n {\n id: 'branchConfigs',\n type: 'array',\n label: 'Branches',\n required: true,\n children: [\n {\n id: 'kind',\n type: 'select',\n label: 'Branch Type',\n required: true,\n options: [\n { label: 'IF', value: 'if' },\n { label: 'ELSE IF', value: 'elseif' },\n { label: 'ELSE', value: 'else' },\n ],\n // Default for new branches is \"elseif\" so the chain reads correctly when\n // appended between the first IF and the trailing ELSE.\n placeholder: 'elseif',\n },\n {\n id: 'key',\n type: 'text',\n label: 'Branch Key',\n required: true,\n placeholder: 'e.g. admin (no spaces)',\n },\n {\n id: 'label',\n type: 'text',\n label: 'Branch Label',\n required: true,\n placeholder: 'e.g. Admin Users',\n },\n {\n id: 'conditions',\n type: 'array',\n label: 'Conditions',\n // ELSE branches have no condition by definition — hide the array.\n shouldHide: ({ values }: { values: Record<string, unknown> }) =>\n values.kind === 'else',\n children: [\n {\n id: 'field',\n type: 'text',\n label: 'Field / Variable',\n required: true,\n placeholder: 'e.g. user.role',\n formulaEnabled: true,\n },\n {\n id: 'operator',\n type: 'select',\n label: 'Operator',\n required: true,\n options: CONDITION_OPERATORS,\n },\n {\n id: 'value',\n type: 'text',\n label: 'Value',\n placeholder: 'e.g. admin',\n formulaEnabled: true,\n shouldHide: ({ values }: { values: Record<string, unknown> }) =>\n values.operator === 'isEmpty' || values.operator === 'isNotEmpty',\n },\n {\n id: 'logicalOperator',\n type: 'select',\n label: 'Combine with next',\n options: [\n { label: 'AND', value: 'AND' },\n { label: 'OR', value: 'OR' },\n ],\n },\n ],\n },\n ],\n },\n {\n id: 'defaultBranch',\n type: 'text',\n label: 'Default Branch Key (fallback if no condition matches)',\n placeholder: 'e.g. default',\n },\n ],\n bpmnEntry: (id) => `Condition Branch: ${id}`,\n bpmnExit: (id) => `End Condition Branch: ${id}`,\n emitBpmnElements: (id, data) => {\n const d = data as Record<string, unknown>;\n const branches = (d.branchConfigs as Array<{ key: string; label: string }> | undefined) ?? [];\n return [\n { id, $type: 'bpmn:ExclusiveGateway', name: (d.title as string) ?? 'Condition Branch' },\n ...branches.map((b) => ({\n id: `${id}-${b.key}`,\n $type: 'bpmn:SequenceFlow',\n name: b.label,\n })),\n ];\n },\n});\n","import React from 'react';\nimport { MdWebhook } from 'react-icons/md';\nimport { WorkflowTemplate } from '../../WorkflowCanvas/types';\nimport { NODE_DESCRIPTOR_ICON_SIZE } from '../../WorkflowCanvas/canvasTokens';\nimport { defineNode } from '../defineNode';\n\nexport const webhookTriggerDescriptor = defineNode({\n type: 'webhookTrigger',\n label: 'Webhook Trigger',\n icon: React.createElement(MdWebhook, { size: NODE_DESCRIPTOR_ICON_SIZE, color: '#1565c0' }),\n matches: (id) => id.startsWith('webhookTrigger-'),\n reactFlowType: 'webhookTriggerNode',\n formSchema: [\n {\n id: 'endpointUrl',\n type: 'text',\n label: 'Endpoint URL',\n disabled: true,\n placeholder: 'Generated after saving',\n },\n {\n id: 'authMethod',\n type: 'select',\n label: 'Authentication',\n required: true,\n options: [\n { label: 'None', value: 'none' },\n { label: 'API Key', value: 'api-key' },\n { label: 'HMAC Signature', value: 'hmac' },\n ],\n },\n {\n id: 'apiKeyHeader',\n type: 'text',\n label: 'API Key Header Name',\n placeholder: 'e.g. X-API-Key',\n shouldHide: ({ values }: { values: Record<string, unknown> }) => values.authMethod !== 'api-key',\n },\n {\n id: 'hmacSecret',\n type: 'text',\n label: 'HMAC Secret',\n placeholder: 'Shared secret for signature verification',\n shouldHide: ({ values }: { values: Record<string, unknown> }) => values.authMethod !== 'hmac',\n },\n {\n id: 'payloadDescription',\n type: 'textarea',\n label: 'Expected Payload Description',\n placeholder: 'Describe the expected JSON payload fields...',\n },\n ],\n bpmnEntry: (id) => `Webhook Trigger: ${id}`,\n bpmnExit: (id) => `End Webhook Trigger: ${id}`,\n emitBpmnElements: (id) => [{ id, $type: 'bpmn:StartEvent', name: 'Webhook Trigger' }],\n});\n\nexport const webhookTriggerTemplate: WorkflowTemplate = {\n triggerKey: 'WEBHOOK_TRIGGER',\n label: 'Incoming Webhook',\n description: 'Start this workflow when an HTTP POST is received at a generated endpoint.',\n triggerCategory: 'webhook',\n icon: React.createElement(MdWebhook, { size: NODE_DESCRIPTOR_ICON_SIZE, color: '#1565c0' }),\n};\n","import React from 'react';\nimport { MdAccountTree } from 'react-icons/md';\nimport { NodeDescriptor } from '../../WorkflowCanvas/types';\nimport { defineNode } from '../defineNode';\n\n/**\n * Sub-Workflow node — calls another saved workflow by ID.\n *\n * The host app must provide `fetchWorkflowOptions` at registration time so the\n * `workflowId` select field can populate. Inject it via the descriptor factory:\n *\n * import { makeSubWorkflowDescriptor } from '@miniorange/flowforge';\n * nodeTypeRegistry.register(makeSubWorkflowDescriptor({\n * fetchWorkflowOptions: async () => myApi.listWorkflows(),\n * }));\n */\nexport interface SubWorkflowDescriptorOptions {\n /** Return a list of available workflows for the workflowId select field */\n fetchWorkflowOptions?: () => Promise<Array<{ label: string; value: string }>>;\n}\n\nexport function makeSubWorkflowDescriptor(opts: SubWorkflowDescriptorOptions = {}): NodeDescriptor {\n return defineNode({\n type: 'subWorkflow',\n label: 'Sub-Workflow',\n icon: React.createElement(MdAccountTree, { size: 18, color: '#00695c' }),\n matches: (id) => id.startsWith('subWorkflow-'),\n reactFlowType: 'subWorkflowNode',\n formSchema: [\n {\n id: 'workflowId',\n type: 'select',\n label: 'Workflow to Call',\n required: true,\n placeholder: 'Select a workflow...',\n ...(opts.fetchWorkflowOptions\n ? { fetchOptions: opts.fetchWorkflowOptions }\n : { options: [] }),\n },\n {\n id: 'workflowLabel',\n type: 'text',\n label: 'Display Name (optional)',\n placeholder: 'Override display name shown on canvas',\n },\n {\n id: 'inputMapping',\n type: 'key-value',\n label: 'Input Mapping',\n placeholder: 'Map parent variables → sub-workflow inputs',\n formulaEnabled: true,\n },\n {\n id: 'outputMapping',\n type: 'key-value',\n label: 'Output Mapping',\n placeholder: 'Map sub-workflow outputs → parent variables',\n },\n {\n id: 'waitForCompletion',\n type: 'toggle',\n label: 'Wait for sub-workflow to complete before continuing',\n },\n {\n id: 'continueOnError',\n type: 'toggle',\n label: 'Continue parent workflow if sub-workflow fails',\n },\n ],\n bpmnEntry: (id) => `Sub-Workflow Call: ${id}`,\n bpmnExit: (id) => `End Sub-Workflow Call: ${id}`,\n emitBpmnElements: (id, data) => {\n const d = data as Record<string, unknown>;\n return [{\n id,\n $type: 'bpmn:CallActivity',\n name: (d.workflowLabel as string) || (d.workflowId as string) || 'Sub-Workflow',\n calledElement: d.workflowId as string,\n }];\n },\n });\n}\n\n/** Pre-built static descriptor (no dynamic workflow list). Swap for makeSubWorkflowDescriptor when you have an API. */\nexport const subWorkflowDescriptor: NodeDescriptor = makeSubWorkflowDescriptor();\n"],"names":["baseNodeDefaults","id","defineNode","overrides","startEventDescriptor","React","MdPlayCircleOutline","endEventDescriptor","MdStopCircle","restApiDescriptor","MdHttp","values","data","d","notificationDescriptor","MdNotifications","CONDITION_OPERATORS","conditionBranchDescriptor","MdCallSplit","branches","b","webhookTriggerDescriptor","MdWebhook","NODE_DESCRIPTOR_ICON_SIZE","webhookTriggerTemplate","makeSubWorkflowDescriptor","opts","MdAccountTree","subWorkflowDescriptor"],"mappings":"0GAUaA,EAGT,CACF,WAAY,CAAA,EACZ,UAAYC,GAAOA,EACnB,SAAWA,GAAOA,EAClB,iBAAmBA,GAAO,CAAC,CAAE,GAAAA,EAAI,MAAO,YAAa,CACvD,EAmBO,SAASC,EACdC,EACgB,CAChB,MAAO,CAAE,GAAGH,EAAkB,GAAGG,CAAA,CACnC,CC7BO,MAAMC,EAAuBF,EAAW,CAC7C,KAAM,aACN,MAAO,QACP,KAAMG,EAAM,cAAcC,EAAAA,oBAAqB,CAAE,KAAM,GAAI,MAAO,UAAW,EAC7E,QAAUL,GAAOA,IAAO,QACxB,cAAe,YACf,iBAAmBA,GAAO,CAAC,CAAE,GAAAA,EAAI,MAAO,kBAAmB,EAC3D,eAAgB,CAClB,CAAC,ECPYM,EAAqBL,EAAW,CAC3C,KAAM,WACN,MAAO,MACP,KAAMG,EAAM,cAAcG,EAAAA,aAAc,CAA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