@flowuent-org/diagramming-core 1.4.1 → 1.4.2
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.
- package/apps/diagramming/src/AutomationDiagramData.ts +12 -0
- package/package.json +1 -1
- package/packages/diagrams/src/lib/components/automation/AutomationApiNode.tsx +3 -13
- package/packages/diagrams/src/lib/components/automation/AutomationDecisionNode.tsx +0 -1
- package/packages/diagrams/src/lib/components/automation/AutomationEndNode.tsx +3 -13
- package/packages/diagrams/src/lib/components/automation/AutomationFormattingNode.tsx +3 -13
- package/packages/diagrams/src/lib/components/automation/AutomationInteractionNode.tsx +3 -13
- package/packages/diagrams/src/lib/components/automation/AutomationNavigationNode.tsx +3 -13
- package/packages/diagrams/src/lib/components/automation/AutomationNodeCard.tsx +7 -11
- package/packages/diagrams/src/lib/components/automation/AutomationNodeHeader.tsx +45 -0
- package/packages/diagrams/src/lib/components/automation/AutomationSlackNode.tsx +3 -13
- package/packages/diagrams/src/lib/components/automation/AutomationSmsNode.tsx +0 -1
- package/packages/diagrams/src/lib/components/automation/AutomationStartNode.tsx +3 -13
- package/packages/diagrams/src/lib/components/automation/AutomationTelegramNode.tsx +3 -13
- package/packages/diagrams/src/lib/components/automation/AutomationVoiceCallNode.tsx +0 -1
- package/packages/diagrams/src/lib/components/automation/AutomationWorkflowNode.tsx +0 -1
- package/packages/diagrams/src/lib/components/automation/index.ts +5 -0
- package/packages/diagrams/src/lib/types/automation-node-data-types.ts +1 -0
|
@@ -10,6 +10,7 @@ export const automationDefaultNodes = [
|
|
|
10
10
|
// Display data for the node UI
|
|
11
11
|
label: 'Workflow Trigger',
|
|
12
12
|
description: 'Workflow entry point. Triggered manually or on schedule.',
|
|
13
|
+
headerText: 'Workflow entry point',
|
|
13
14
|
status: 'Ready',
|
|
14
15
|
lastRun: 'Never',
|
|
15
16
|
duration: '0.0s',
|
|
@@ -19,6 +20,7 @@ export const automationDefaultNodes = [
|
|
|
19
20
|
formData: {
|
|
20
21
|
nodeId: 'start-node',
|
|
21
22
|
title: 'Workflow Trigger',
|
|
23
|
+
headerText: 'Workflow entry point',
|
|
22
24
|
type: 'start',
|
|
23
25
|
triggerType: 'manual',
|
|
24
26
|
scheduleConfig: {
|
|
@@ -67,6 +69,7 @@ export const automationDefaultNodes = [
|
|
|
67
69
|
label: 'Discover Headlines',
|
|
68
70
|
description:
|
|
69
71
|
"This node extracts all news headlines from CNN's homepage using web scraping techniques.",
|
|
72
|
+
headerText: 'Get all CNN headlines',
|
|
70
73
|
status: 'Ready',
|
|
71
74
|
lastRun: 'Never',
|
|
72
75
|
duration: '0.8s',
|
|
@@ -76,6 +79,7 @@ export const automationDefaultNodes = [
|
|
|
76
79
|
formData: {
|
|
77
80
|
nodeId: 'api-call-node',
|
|
78
81
|
title: 'Discover Headlines',
|
|
82
|
+
headerText: 'Get all CNN headlines',
|
|
79
83
|
type: 'api',
|
|
80
84
|
method: 'GET',
|
|
81
85
|
url: 'https://jsonplaceholder.typicode.com/posts',
|
|
@@ -157,6 +161,7 @@ export const automationDefaultNodes = [
|
|
|
157
161
|
// Display data for the node UI
|
|
158
162
|
label: 'Navigate to Website',
|
|
159
163
|
description: 'Navigate to the target website and wait for page load',
|
|
164
|
+
headerText: 'Web navigation action',
|
|
160
165
|
status: 'Ready',
|
|
161
166
|
navigationType: 'navigate',
|
|
162
167
|
url: 'https://example.com',
|
|
@@ -203,6 +208,7 @@ export const automationDefaultNodes = [
|
|
|
203
208
|
label: 'Article Analyzer',
|
|
204
209
|
description:
|
|
205
210
|
'Extract and analyze article content, generate summaries and topic classifications.',
|
|
211
|
+
headerText: 'AI-powered content analysis',
|
|
206
212
|
status: 'Ready',
|
|
207
213
|
lastRun: '2 minutes ago',
|
|
208
214
|
duration: '1.2s',
|
|
@@ -212,6 +218,7 @@ export const automationDefaultNodes = [
|
|
|
212
218
|
formData: {
|
|
213
219
|
nodeId: 'data-formatting-node',
|
|
214
220
|
title: 'Article Analyzer',
|
|
221
|
+
headerText: 'AI-powered content analysis',
|
|
215
222
|
type: 'formatting',
|
|
216
223
|
inputVariable: 'postsResponse',
|
|
217
224
|
formattingType: 'ai-powered',
|
|
@@ -277,6 +284,7 @@ export const automationDefaultNodes = [
|
|
|
277
284
|
// Display data for the node UI
|
|
278
285
|
label: 'Results Display',
|
|
279
286
|
description: 'Display analyzed article results to the user.',
|
|
287
|
+
headerText: 'Workflow completion and results display',
|
|
280
288
|
status: 'Ready',
|
|
281
289
|
lastRun: '1 minute ago',
|
|
282
290
|
duration: '0.3s',
|
|
@@ -487,6 +495,7 @@ export const automationDefaultNodes = [
|
|
|
487
495
|
data: {
|
|
488
496
|
label: 'Route by Condition',
|
|
489
497
|
description: 'Conditional branching / routing',
|
|
498
|
+
headerText: 'Conditional branching / routing',
|
|
490
499
|
routingType: 'condition',
|
|
491
500
|
status: 'Need to Config',
|
|
492
501
|
parameters: {
|
|
@@ -524,6 +533,7 @@ export const automationDefaultNodes = [
|
|
|
524
533
|
data: {
|
|
525
534
|
label: 'Send SMS',
|
|
526
535
|
description: 'Send SMS (recipientPhone)',
|
|
536
|
+
headerText: 'Send SMS (recipientPhone)',
|
|
527
537
|
status: 'Need to Config',
|
|
528
538
|
parameters: {
|
|
529
539
|
recipientPhone: '+1 (555) 123-4567',
|
|
@@ -559,6 +569,7 @@ export const automationDefaultNodes = [
|
|
|
559
569
|
data: {
|
|
560
570
|
label: 'Voice Call',
|
|
561
571
|
description: 'Voice calls with spoken content',
|
|
572
|
+
headerText: 'Voice calls with spoken content',
|
|
562
573
|
status: 'Need to Config',
|
|
563
574
|
parameters: {
|
|
564
575
|
recipientPhone: '+1 (555) 987-6543',
|
|
@@ -594,6 +605,7 @@ export const automationDefaultNodes = [
|
|
|
594
605
|
data: {
|
|
595
606
|
label: 'Run Sub-Workflow',
|
|
596
607
|
description: 'Run/embed another workflow (workflowId)',
|
|
608
|
+
headerText: 'Run/embed another workflow (workflowId)',
|
|
597
609
|
status: 'Need to Config',
|
|
598
610
|
parameters: {
|
|
599
611
|
workflowId: 'wf-notification-pipeline',
|
package/package.json
CHANGED
|
@@ -23,11 +23,13 @@ import { showNodeAIAssistantPopup } from './NodeAIAssistantPopup';
|
|
|
23
23
|
import { useSearch } from '../../contexts/SearchContext';
|
|
24
24
|
import { getStatusColor } from './statusColors';
|
|
25
25
|
import { ApiNodeIcon } from '../../icons';
|
|
26
|
+
import { AutomationNodeHeaderSection } from './AutomationNodeHeader';
|
|
26
27
|
|
|
27
28
|
interface AutomationApiNodeProps {
|
|
28
29
|
data: {
|
|
29
30
|
label: string;
|
|
30
31
|
description: string;
|
|
32
|
+
headerText?: string;
|
|
31
33
|
status: 'Ready' | 'Running' | 'Completed' | 'Error';
|
|
32
34
|
method: 'GET' | 'POST' | 'PUT' | 'DELETE';
|
|
33
35
|
url: string;
|
|
@@ -313,19 +315,7 @@ export const AutomationApiNode: React.FC<AutomationApiNodeProps> = ({ data, sele
|
|
|
313
315
|
onClick={handleJsonClick}
|
|
314
316
|
>
|
|
315
317
|
{/* Top Header Section */}
|
|
316
|
-
<
|
|
317
|
-
backgroundColor: "rgba(67, 93, 132, 0.1)",
|
|
318
|
-
padding: '8px 16px',
|
|
319
|
-
borderRadius: '12px 12px 0 0'
|
|
320
|
-
}}>
|
|
321
|
-
<Typography variant="body2" sx={{
|
|
322
|
-
color: '#ffffff',
|
|
323
|
-
fontSize: '12px',
|
|
324
|
-
fontWeight: 500
|
|
325
|
-
}}>
|
|
326
|
-
{data.formData?.description || t('automation.apiNode.headerDescription')}
|
|
327
|
-
</Typography>
|
|
328
|
-
</Box>
|
|
318
|
+
<AutomationNodeHeaderSection data={data} />
|
|
329
319
|
|
|
330
320
|
{/* Main Content */}
|
|
331
321
|
<Box sx={{ padding: '16px' }}>
|
|
@@ -44,7 +44,6 @@ export const AutomationDecisionNode: React.FC<AutomationDecisionNodeProps> = ({
|
|
|
44
44
|
data={data}
|
|
45
45
|
selected={selected}
|
|
46
46
|
icon={<DecisionNodeIcon />}
|
|
47
|
-
headerText="Conditional branching / routing"
|
|
48
47
|
aiAssistantTitle="Decision Node"
|
|
49
48
|
branchHandles
|
|
50
49
|
descriptionContent={
|
|
@@ -14,11 +14,13 @@ import { showNodeAIAssistantPopup } from './NodeAIAssistantPopup';
|
|
|
14
14
|
import { useSearch } from '../../contexts/SearchContext';
|
|
15
15
|
import { getStatusColor } from './statusColors';
|
|
16
16
|
import { EndNodeIcon } from '../../icons';
|
|
17
|
+
import { AutomationNodeHeaderSection } from './AutomationNodeHeader';
|
|
17
18
|
|
|
18
19
|
interface AutomationEndNodeProps {
|
|
19
20
|
data: {
|
|
20
21
|
label: string;
|
|
21
22
|
description: string;
|
|
23
|
+
headerText?: string;
|
|
22
24
|
status: 'Ready' | 'Running' | 'Completed' | 'Error';
|
|
23
25
|
outputType: 'display' | 'store' | 'send';
|
|
24
26
|
outputConfig?: {
|
|
@@ -244,19 +246,7 @@ export const AutomationEndNode: React.FC<AutomationEndNodeProps> = ({ data, sele
|
|
|
244
246
|
onClick={handleJsonClick}
|
|
245
247
|
>
|
|
246
248
|
{/* Top Header Section */}
|
|
247
|
-
<
|
|
248
|
-
backgroundColor: "rgba(67, 93, 132, 0.1)",
|
|
249
|
-
padding: '8px 16px',
|
|
250
|
-
borderRadius: '12px 12px 0 0'
|
|
251
|
-
}}>
|
|
252
|
-
<Typography variant="body2" sx={{
|
|
253
|
-
color: '#ffffff',
|
|
254
|
-
fontSize: '12px',
|
|
255
|
-
fontWeight: 500
|
|
256
|
-
}}>
|
|
257
|
-
{data.formData?.description || t('automation.endNode.headerDescription')}
|
|
258
|
-
</Typography>
|
|
259
|
-
</Box>
|
|
249
|
+
<AutomationNodeHeaderSection data={data} highlightText={highlightText} />
|
|
260
250
|
|
|
261
251
|
{/* Main Content */}
|
|
262
252
|
<Box sx={{ padding: '16px' }}>
|
|
@@ -23,11 +23,13 @@ import { showNodeAIAssistantPopup } from './NodeAIAssistantPopup';
|
|
|
23
23
|
import { useSearch } from '../../contexts/SearchContext';
|
|
24
24
|
import { getStatusColor } from './statusColors';
|
|
25
25
|
import { ArticleAnalyzerIcon, FormattingNodeIcon } from '../../icons';
|
|
26
|
+
import { AutomationNodeHeaderSection } from './AutomationNodeHeader';
|
|
26
27
|
|
|
27
28
|
interface AutomationFormattingNodeProps {
|
|
28
29
|
data: {
|
|
29
30
|
label: string;
|
|
30
31
|
description: string;
|
|
32
|
+
headerText?: string;
|
|
31
33
|
status: 'Ready' | 'Running' | 'Completed' | 'Error';
|
|
32
34
|
inputVariable: string;
|
|
33
35
|
formattingType: 'basic' | 'ai-powered';
|
|
@@ -319,19 +321,7 @@ export const AutomationFormattingNode: React.FC<AutomationFormattingNodeProps> =
|
|
|
319
321
|
onClick={handleJsonClick}
|
|
320
322
|
>
|
|
321
323
|
{/* Top Header Section */}
|
|
322
|
-
<
|
|
323
|
-
backgroundColor: "rgba(67, 93, 132, 0.1)",
|
|
324
|
-
padding: '8px 16px',
|
|
325
|
-
borderRadius: '12px 12px 0 0'
|
|
326
|
-
}}>
|
|
327
|
-
<Typography variant="body2" sx={{
|
|
328
|
-
color: '#ffffff',
|
|
329
|
-
fontSize: '12px',
|
|
330
|
-
fontWeight: 500
|
|
331
|
-
}}>
|
|
332
|
-
{data.formData?.description || t('automation.formattingNode.headerDescription')}
|
|
333
|
-
</Typography>
|
|
334
|
-
</Box>
|
|
324
|
+
<AutomationNodeHeaderSection data={data} />
|
|
335
325
|
|
|
336
326
|
{/* Main Content */}
|
|
337
327
|
<Box sx={{ padding: '16px' }}>
|
|
@@ -27,6 +27,7 @@ import { useSearch } from '../../contexts/SearchContext';
|
|
|
27
27
|
import { NodeActionButtons } from './NodeActionButtons';
|
|
28
28
|
import { showNodeAIAssistantPopup } from './NodeAIAssistantPopup';
|
|
29
29
|
import { getStatusColor } from './statusColors';
|
|
30
|
+
import { AutomationNodeHeaderSection } from './AutomationNodeHeader';
|
|
30
31
|
|
|
31
32
|
// ========================
|
|
32
33
|
// Types
|
|
@@ -49,6 +50,7 @@ export type InteractionType =
|
|
|
49
50
|
export interface AutomationInteractionNodeData {
|
|
50
51
|
label: string;
|
|
51
52
|
description: string;
|
|
53
|
+
headerText?: string;
|
|
52
54
|
interactionType?: InteractionType;
|
|
53
55
|
status: 'Ready' | 'Running' | 'Completed' | 'Error';
|
|
54
56
|
parameters?: {
|
|
@@ -424,19 +426,7 @@ export const AutomationInteractionNode: React.FC<AutomationInteractionNodeProps>
|
|
|
424
426
|
onClick={handleJsonClick}
|
|
425
427
|
>
|
|
426
428
|
{/* Top Header Section */}
|
|
427
|
-
<
|
|
428
|
-
backgroundColor: "rgba(67, 93, 132, 0.1)",
|
|
429
|
-
padding: '8px 16px',
|
|
430
|
-
borderRadius: '12px 12px 0 0'
|
|
431
|
-
}}>
|
|
432
|
-
<Typography variant="body2" sx={{
|
|
433
|
-
color: '#ffffff',
|
|
434
|
-
fontSize: '12px',
|
|
435
|
-
fontWeight: 500
|
|
436
|
-
}}>
|
|
437
|
-
{highlightText(data.description || interactionConfig.description)}
|
|
438
|
-
</Typography>
|
|
439
|
-
</Box>
|
|
429
|
+
<AutomationNodeHeaderSection data={data} highlightText={highlightText} />
|
|
440
430
|
|
|
441
431
|
{/* Main Content */}
|
|
442
432
|
<Box sx={{ padding: '16px' }}>
|
|
@@ -15,11 +15,13 @@ import { showNodeAIAssistantPopup } from './NodeAIAssistantPopup';
|
|
|
15
15
|
import { useSearch } from '../../contexts/SearchContext';
|
|
16
16
|
import { getStatusColor } from './statusColors';
|
|
17
17
|
import { NavigationIcon } from '../../icons';
|
|
18
|
+
import { AutomationNodeHeaderSection } from './AutomationNodeHeader';
|
|
18
19
|
|
|
19
20
|
interface AutomationNavigationNodeProps {
|
|
20
21
|
data: {
|
|
21
22
|
label: string;
|
|
22
23
|
description: string;
|
|
24
|
+
headerText?: string;
|
|
23
25
|
status: 'Ready' | 'Running' | 'Completed' | 'Error';
|
|
24
26
|
navigationType: 'navigate' | 'click' | 'scroll' | 'wait' | 'extract';
|
|
25
27
|
url?: string;
|
|
@@ -276,19 +278,7 @@ export const AutomationNavigationNode: React.FC<AutomationNavigationNodeProps> =
|
|
|
276
278
|
onClick={handleJsonClick}
|
|
277
279
|
>
|
|
278
280
|
{/* Top Header Section */}
|
|
279
|
-
<
|
|
280
|
-
backgroundColor: "rgba(67, 93, 132, 0.1)",
|
|
281
|
-
padding: '8px 16px',
|
|
282
|
-
borderRadius: '12px 12px 0 0'
|
|
283
|
-
}}>
|
|
284
|
-
<Typography variant="body2" sx={{
|
|
285
|
-
color: '#ffffff',
|
|
286
|
-
fontSize: '12px',
|
|
287
|
-
fontWeight: 500
|
|
288
|
-
}}>
|
|
289
|
-
{data.formData?.description || data.description || 'Web navigation action'}
|
|
290
|
-
</Typography>
|
|
291
|
-
</Box>
|
|
281
|
+
<AutomationNodeHeaderSection data={data} highlightText={highlightText} />
|
|
292
282
|
|
|
293
283
|
{/* Main Content */}
|
|
294
284
|
<Box sx={{ padding: '16px' }}>
|
|
@@ -11,10 +11,12 @@ import { NodeActionButtons } from './NodeActionButtons';
|
|
|
11
11
|
import { showNodeAIAssistantPopup } from './NodeAIAssistantPopup';
|
|
12
12
|
import { useSearch } from '../../contexts/SearchContext';
|
|
13
13
|
import { getStatusColor } from './statusColors';
|
|
14
|
+
import { AutomationNodeHeaderSection } from './AutomationNodeHeader';
|
|
14
15
|
|
|
15
16
|
export interface AutomationNodeCardData {
|
|
16
17
|
label: string;
|
|
17
18
|
description: string;
|
|
19
|
+
headerText?: string;
|
|
18
20
|
status?: string;
|
|
19
21
|
lastRun?: string;
|
|
20
22
|
formData?: Record<string, unknown>;
|
|
@@ -300,17 +302,11 @@ export const AutomationNodeCard: React.FC<AutomationNodeCardProps> = ({
|
|
|
300
302
|
}}
|
|
301
303
|
onClick={handleJsonClick}
|
|
302
304
|
>
|
|
303
|
-
<
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
}}
|
|
309
|
-
>
|
|
310
|
-
<Typography variant="body2" sx={{ color: '#ffffff', fontSize: '12px', fontWeight: 500 }}>
|
|
311
|
-
{highlightText(headerText || data.description)}
|
|
312
|
-
</Typography>
|
|
313
|
-
</Box>
|
|
305
|
+
<AutomationNodeHeaderSection
|
|
306
|
+
data={data}
|
|
307
|
+
headerText={headerText}
|
|
308
|
+
highlightText={highlightText}
|
|
309
|
+
/>
|
|
314
310
|
|
|
315
311
|
<Box sx={{ padding: '16px' }}>
|
|
316
312
|
<Box sx={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', mb: 2 }}>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Box, Typography } from '@mui/material';
|
|
3
|
+
|
|
4
|
+
export interface AutomationNodeHeaderData {
|
|
5
|
+
headerText?: string;
|
|
6
|
+
formData?: Record<string, unknown>;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const getAutomationNodeHeaderText = (
|
|
10
|
+
data: AutomationNodeHeaderData,
|
|
11
|
+
override?: string,
|
|
12
|
+
): string | undefined => {
|
|
13
|
+
const text = override ?? data.headerText ?? (data.formData?.headerText as string | undefined);
|
|
14
|
+
const trimmed = text?.trim();
|
|
15
|
+
return trimmed || undefined;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
interface AutomationNodeHeaderSectionProps {
|
|
19
|
+
data: AutomationNodeHeaderData;
|
|
20
|
+
headerText?: string;
|
|
21
|
+
highlightText?: (text: string) => React.ReactNode;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const AutomationNodeHeaderSection: React.FC<AutomationNodeHeaderSectionProps> = ({
|
|
25
|
+
data,
|
|
26
|
+
headerText,
|
|
27
|
+
highlightText,
|
|
28
|
+
}) => {
|
|
29
|
+
const text = getAutomationNodeHeaderText(data, headerText);
|
|
30
|
+
if (!text) return null;
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<Box
|
|
34
|
+
sx={{
|
|
35
|
+
backgroundColor: 'rgba(67, 93, 132, 0.1)',
|
|
36
|
+
padding: '8px 16px',
|
|
37
|
+
borderRadius: '12px 12px 0 0',
|
|
38
|
+
}}
|
|
39
|
+
>
|
|
40
|
+
<Typography variant="body2" sx={{ color: '#ffffff', fontSize: '12px', fontWeight: 500 }}>
|
|
41
|
+
{highlightText ? highlightText(text) : text}
|
|
42
|
+
</Typography>
|
|
43
|
+
</Box>
|
|
44
|
+
);
|
|
45
|
+
};
|
|
@@ -28,6 +28,7 @@ import { useDiagram } from '../../contexts/DiagramProvider';
|
|
|
28
28
|
import { useSearch } from '../../contexts/SearchContext';
|
|
29
29
|
import { NodeActionButtons } from './NodeActionButtons';
|
|
30
30
|
import { getStatusColor } from './statusColors';
|
|
31
|
+
import { AutomationNodeHeaderSection } from './AutomationNodeHeader';
|
|
31
32
|
|
|
32
33
|
// ========================
|
|
33
34
|
// Types
|
|
@@ -54,6 +55,7 @@ export interface SlackTokenData {
|
|
|
54
55
|
export interface AutomationSlackNodeData {
|
|
55
56
|
label: string;
|
|
56
57
|
description: string;
|
|
58
|
+
headerText?: string;
|
|
57
59
|
operationType?: SlackOperationType;
|
|
58
60
|
status: 'Ready' | 'Running' | 'Completed' | 'Failed' | 'Need to Config' | 'authenticated';
|
|
59
61
|
parameters?: {
|
|
@@ -469,19 +471,7 @@ export const AutomationSlackNode: React.FC<AutomationSlackNodeProps> = ({
|
|
|
469
471
|
/>
|
|
470
472
|
|
|
471
473
|
{/* Top Header Section */}
|
|
472
|
-
<
|
|
473
|
-
backgroundColor: "rgba(67, 93, 132, 0.1)",
|
|
474
|
-
padding: '8px 16px',
|
|
475
|
-
borderRadius: '12px 12px 0 0'
|
|
476
|
-
}}>
|
|
477
|
-
<Typography variant="body2" sx={{
|
|
478
|
-
color: '#ffffff',
|
|
479
|
-
fontSize: '12px',
|
|
480
|
-
fontWeight: 500
|
|
481
|
-
}}>
|
|
482
|
-
{data.description || operationConfig.description}
|
|
483
|
-
</Typography>
|
|
484
|
-
</Box>
|
|
474
|
+
<AutomationNodeHeaderSection data={data} highlightText={highlightText} />
|
|
485
475
|
|
|
486
476
|
{/* Header */}
|
|
487
477
|
<Box
|
|
@@ -43,7 +43,6 @@ export const AutomationSmsNode: React.FC<AutomationSmsNodeProps> = ({
|
|
|
43
43
|
data={{ ...data, description: descriptionText }}
|
|
44
44
|
selected={selected}
|
|
45
45
|
icon={<SmsNodeIcon />}
|
|
46
|
-
headerText="Send SMS (recipientPhone)"
|
|
47
46
|
aiAssistantTitle="SMS Node"
|
|
48
47
|
descriptionContent={
|
|
49
48
|
<>
|
|
@@ -12,11 +12,13 @@ import { showNodeAIAssistantPopup } from './NodeAIAssistantPopup';
|
|
|
12
12
|
import { useSearch } from '../../contexts/SearchContext';
|
|
13
13
|
import { getStatusColor } from './statusColors';
|
|
14
14
|
import { StartNodeIcon } from '../../icons';
|
|
15
|
+
import { AutomationNodeHeaderSection } from './AutomationNodeHeader';
|
|
15
16
|
|
|
16
17
|
interface AutomationStartNodeProps {
|
|
17
18
|
data: {
|
|
18
19
|
label: string;
|
|
19
20
|
description: string;
|
|
21
|
+
headerText?: string;
|
|
20
22
|
status: 'Ready' | 'Running' | 'Completed' | 'Error';
|
|
21
23
|
triggerType: 'manual' | 'scheduled';
|
|
22
24
|
scheduleConfig?: {
|
|
@@ -235,19 +237,7 @@ export const AutomationStartNode: React.FC<AutomationStartNodeProps> = ({ data,
|
|
|
235
237
|
onClick={handleJsonClick}
|
|
236
238
|
>
|
|
237
239
|
{/* Top Header Section */}
|
|
238
|
-
<
|
|
239
|
-
backgroundColor: "rgba(67, 93, 132, 0.1)",
|
|
240
|
-
padding: '8px 16px',
|
|
241
|
-
borderRadius: '12px 12px 0 0'
|
|
242
|
-
}}>
|
|
243
|
-
<Typography variant="body2" sx={{
|
|
244
|
-
color: '#ffffff',
|
|
245
|
-
fontSize: '12px',
|
|
246
|
-
fontWeight: 500
|
|
247
|
-
}}>
|
|
248
|
-
{highlightText(data.formData?.description || t('automation.startNode.headerDescription'))}
|
|
249
|
-
</Typography>
|
|
250
|
-
</Box>
|
|
240
|
+
<AutomationNodeHeaderSection data={data} highlightText={highlightText} />
|
|
251
241
|
|
|
252
242
|
{/* Main Content */}
|
|
253
243
|
<Box sx={{ padding: '16px' }}>
|
|
@@ -31,6 +31,7 @@ import { useDiagram } from '../../contexts/DiagramProvider';
|
|
|
31
31
|
import { useSearch } from '../../contexts/SearchContext';
|
|
32
32
|
import { NodeActionButtons } from './NodeActionButtons';
|
|
33
33
|
import { getStatusColor } from './statusColors';
|
|
34
|
+
import { AutomationNodeHeaderSection } from './AutomationNodeHeader';
|
|
34
35
|
|
|
35
36
|
// ========================
|
|
36
37
|
// Types
|
|
@@ -57,6 +58,7 @@ export interface TelegramTokenData {
|
|
|
57
58
|
export interface AutomationTelegramNodeData {
|
|
58
59
|
label: string;
|
|
59
60
|
description: string;
|
|
61
|
+
headerText?: string;
|
|
60
62
|
operationType?: TelegramOperationType;
|
|
61
63
|
status: 'Ready' | 'Running' | 'Completed' | 'Failed' | 'Need to Config' | 'authenticated';
|
|
62
64
|
parameters?: {
|
|
@@ -462,19 +464,7 @@ export const AutomationTelegramNode: React.FC<AutomationTelegramNodeProps> = ({
|
|
|
462
464
|
/>
|
|
463
465
|
|
|
464
466
|
{/* Top Header Section */}
|
|
465
|
-
<
|
|
466
|
-
backgroundColor: "rgba(67, 93, 132, 0.1)",
|
|
467
|
-
padding: '8px 16px',
|
|
468
|
-
borderRadius: '12px 12px 0 0'
|
|
469
|
-
}}>
|
|
470
|
-
<Typography variant="body2" sx={{
|
|
471
|
-
color: '#ffffff',
|
|
472
|
-
fontSize: '12px',
|
|
473
|
-
fontWeight: 500
|
|
474
|
-
}}>
|
|
475
|
-
{data.description || operationConfig.description}
|
|
476
|
-
</Typography>
|
|
477
|
-
</Box>
|
|
467
|
+
<AutomationNodeHeaderSection data={data} highlightText={highlightText} />
|
|
478
468
|
|
|
479
469
|
{/* Header */}
|
|
480
470
|
<Box
|
|
@@ -43,7 +43,6 @@ export const AutomationVoiceCallNode: React.FC<AutomationVoiceCallNodeProps> = (
|
|
|
43
43
|
data={data}
|
|
44
44
|
selected={selected}
|
|
45
45
|
icon={<VoiceCallNodeIcon />}
|
|
46
|
-
headerText="Voice calls with spoken content"
|
|
47
46
|
aiAssistantTitle="Voice Call Node"
|
|
48
47
|
descriptionContent={
|
|
49
48
|
<>
|
|
@@ -43,7 +43,6 @@ export const AutomationWorkflowNode: React.FC<AutomationWorkflowNodeProps> = ({
|
|
|
43
43
|
data={data}
|
|
44
44
|
selected={selected}
|
|
45
45
|
icon={<SubWorkflowNodeIcon />}
|
|
46
|
-
headerText="Run/embed another workflow (workflowId)"
|
|
47
46
|
aiAssistantTitle="Workflow Node"
|
|
48
47
|
descriptionContent={
|
|
49
48
|
<>
|
|
@@ -69,6 +69,11 @@ export type {
|
|
|
69
69
|
AutomationWorkflowNodeData,
|
|
70
70
|
AutomationWorkflowNodeProps,
|
|
71
71
|
} from './AutomationWorkflowNode';
|
|
72
|
+
export {
|
|
73
|
+
getAutomationNodeHeaderText,
|
|
74
|
+
AutomationNodeHeaderSection,
|
|
75
|
+
} from './AutomationNodeHeader';
|
|
76
|
+
export type { AutomationNodeHeaderData } from './AutomationNodeHeader';
|
|
72
77
|
export { AutomationNodeCard } from './AutomationNodeCard';
|
|
73
78
|
export type {
|
|
74
79
|
AutomationNodeCardData,
|