@flowuent-org/diagramming-core 1.3.4 → 1.3.6
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/package.json +1 -1
- package/packages/diagrams/src/lib/components/automation/AutomationEndNode.tsx +7 -1
- package/packages/diagrams/src/lib/components/automation/AutomationFormattingNode.tsx +14 -4
- package/packages/diagrams/src/lib/components/automation/AutomationGoogleServicesNode.tsx +7 -7
- package/packages/diagrams/src/lib/components/automation/AutomationNavigationNode.tsx +618 -617
- package/packages/diagrams/src/lib/components/automation/AutomationSlackNode.tsx +7 -7
- package/packages/diagrams/src/lib/components/automation/AutomationTelegramNode.tsx +7 -7
- package/packages/diagrams/src/lib/components/automation/statusColors.ts +25 -10
- package/packages/diagrams/src/lib/contexts/diagramStoreTypes.tsx +1 -0
- package/packages/diagrams/src/lib/contexts/onDragStart.ts +17 -0
- package/packages/diagrams/src/lib/contexts/onNodeDragEnd.ts +109 -15
- package/packages/diagrams/src/lib/contexts/onNodesChange.ts +32 -11
- package/packages/diagrams/src/lib/organisms/WorkFlowNode/NodeTypeDisplay.tsx +103 -15
- package/packages/diagrams/src/lib/organisms/WorkFlowNode/WorkflowNodeIcons.tsx +23 -0
- package/packages/diagrams/src/lib/templates/DiagramContent.tsx +153 -30
- package/packages/molecules/src/index.ts +23 -4
- package/packages/molecules/src/lib/SvgIcons/icons.tsx +291 -0
- package/packages/molecules/src/lib/SvgIcons/index.ts +25 -0
- package/packages/molecules/src/lib/SvgIcons/types.ts +7 -0
package/package.json
CHANGED
|
@@ -14,6 +14,7 @@ import { NodeActionButtons } from './NodeActionButtons';
|
|
|
14
14
|
import { showNodeAIAssistantPopup } from './NodeAIAssistantPopup';
|
|
15
15
|
import { useSearch } from '../../contexts/SearchContext';
|
|
16
16
|
import { getStatusColor } from './statusColors';
|
|
17
|
+
import { EndNodeIcon } from '@flowuent-labs/molecules';
|
|
17
18
|
|
|
18
19
|
interface AutomationEndNodeProps {
|
|
19
20
|
data: {
|
|
@@ -57,6 +58,7 @@ export const AutomationEndNode: React.FC<AutomationEndNodeProps> = ({ data, sele
|
|
|
57
58
|
|
|
58
59
|
// Get the icon component based on the iconName
|
|
59
60
|
const IconComponent = getIconByName(data.iconName);
|
|
61
|
+
const isEndNode = data.label === 'End' || data.label === 'End Node';
|
|
60
62
|
|
|
61
63
|
const handleJsonClick = () => {
|
|
62
64
|
if (nodeId) setSelectedNode(nodeId);
|
|
@@ -275,7 +277,11 @@ export const AutomationEndNode: React.FC<AutomationEndNodeProps> = ({ data, sele
|
|
|
275
277
|
justifyContent: 'center',
|
|
276
278
|
}}
|
|
277
279
|
>
|
|
278
|
-
|
|
280
|
+
{isEndNode ? (
|
|
281
|
+
<EndNodeIcon size={18} color="#FFFFFF" />
|
|
282
|
+
) : (
|
|
283
|
+
<IconComponent sx={{ color: 'white', fontSize: '18px' }} />
|
|
284
|
+
)}
|
|
279
285
|
</Box>
|
|
280
286
|
<Typography variant="h6" sx={{ fontWeight: 600, fontSize: '16px' }}>
|
|
281
287
|
{highlightText(data.label)}
|
|
@@ -23,6 +23,7 @@ import { NodeActionButtons } from './NodeActionButtons';
|
|
|
23
23
|
import { showNodeAIAssistantPopup } from './NodeAIAssistantPopup';
|
|
24
24
|
import { useSearch } from '../../contexts/SearchContext';
|
|
25
25
|
import { getStatusColor } from './statusColors';
|
|
26
|
+
import { ArticleAnalyzerIcon } from '@flowuent-labs/molecules';
|
|
26
27
|
|
|
27
28
|
interface AutomationFormattingNodeProps {
|
|
28
29
|
data: {
|
|
@@ -80,8 +81,13 @@ export const AutomationFormattingNode: React.FC<AutomationFormattingNodeProps> =
|
|
|
80
81
|
const nodes = useDiagram((state) => state.nodes);
|
|
81
82
|
const setNodes = useDiagram((state) => state.setNodes);
|
|
82
83
|
|
|
83
|
-
//
|
|
84
|
-
const
|
|
84
|
+
// Check if this is Article Analyzer node
|
|
85
|
+
const isArticleAnalyzer = data.label === 'Article Analyzer';
|
|
86
|
+
|
|
87
|
+
// Get the icon component based on the iconName or use ArticleAnalyzerIcon for Article Analyzer
|
|
88
|
+
const IconComponent = isArticleAnalyzer
|
|
89
|
+
? ArticleAnalyzerIcon
|
|
90
|
+
: getIconByName(data.iconName);
|
|
85
91
|
|
|
86
92
|
const handleJsonClick = () => {
|
|
87
93
|
if (nodeId) setSelectedNode(nodeId);
|
|
@@ -342,14 +348,18 @@ export const AutomationFormattingNode: React.FC<AutomationFormattingNodeProps> =
|
|
|
342
348
|
sx={{
|
|
343
349
|
width: '32px',
|
|
344
350
|
height: '32px',
|
|
345
|
-
backgroundColor: '#
|
|
351
|
+
backgroundColor: '#1E3A8A',
|
|
346
352
|
borderRadius: '50%',
|
|
347
353
|
display: 'flex',
|
|
348
354
|
alignItems: 'center',
|
|
349
355
|
justifyContent: 'center',
|
|
350
356
|
}}
|
|
351
357
|
>
|
|
352
|
-
|
|
358
|
+
{isArticleAnalyzer ? (
|
|
359
|
+
<ArticleAnalyzerIcon size={18} color="#FFFFFF" />
|
|
360
|
+
) : (
|
|
361
|
+
<IconComponent size={18} color="#FFFFFF" />
|
|
362
|
+
)}
|
|
353
363
|
</Box>
|
|
354
364
|
<Typography variant="h6" sx={{ fontWeight: 600, fontSize: '16px' }}>
|
|
355
365
|
{highlightText(data.label)}
|
|
@@ -54,7 +54,7 @@ export interface AutomationGoogleServicesNodeData {
|
|
|
54
54
|
label: string;
|
|
55
55
|
description: string;
|
|
56
56
|
serviceType: GoogleServiceType;
|
|
57
|
-
status: '
|
|
57
|
+
status: 'Ready' | 'Running' | 'Completed' | 'Failed' | 'Need to Config';
|
|
58
58
|
isFirstGoogleNode?: boolean;
|
|
59
59
|
parameters?: {
|
|
60
60
|
// Google Docs
|
|
@@ -239,11 +239,11 @@ export const AutomationGoogleServicesNode: React.FC<AutomationGoogleServicesNode
|
|
|
239
239
|
const tokenExpired = isTokenExpired(data.parameters?.googleTokenExpiresAt);
|
|
240
240
|
|
|
241
241
|
// Execution state
|
|
242
|
-
const status = data.status || '
|
|
243
|
-
const executionProgress = status === '
|
|
242
|
+
const status = data.status || 'Ready';
|
|
243
|
+
const executionProgress = status === 'Running' ? 50 : 0;
|
|
244
244
|
|
|
245
245
|
// Status configuration - using centralized status colors
|
|
246
|
-
const statusConfig = getStatusColor(status, '
|
|
246
|
+
const statusConfig = getStatusColor(status, 'ready');
|
|
247
247
|
|
|
248
248
|
// Handle JSON view
|
|
249
249
|
const handleJsonClick = () => {
|
|
@@ -353,8 +353,8 @@ export const AutomationGoogleServicesNode: React.FC<AutomationGoogleServicesNode
|
|
|
353
353
|
size="small"
|
|
354
354
|
label={
|
|
355
355
|
<Box sx={{ display: 'flex', alignItems: 'center', gap: 0.5 }}>
|
|
356
|
-
{status === 'success' && <CheckCircleIcon sx={{ fontSize: 12 }} />}
|
|
357
|
-
{status === 'error' && <ErrorIcon sx={{ fontSize: 12 }} />}
|
|
356
|
+
{(status === 'Completed' || status === 'success') && <CheckCircleIcon sx={{ fontSize: 12 }} />}
|
|
357
|
+
{(status === 'Failed' || status === 'error') && <ErrorIcon sx={{ fontSize: 12 }} />}
|
|
358
358
|
<span>{statusConfig.label}</span>
|
|
359
359
|
</Box>
|
|
360
360
|
}
|
|
@@ -533,7 +533,7 @@ export const AutomationGoogleServicesNode: React.FC<AutomationGoogleServicesNode
|
|
|
533
533
|
</Box>
|
|
534
534
|
|
|
535
535
|
{/* Progress Bar (when running) */}
|
|
536
|
-
{status === '
|
|
536
|
+
{status === 'Running' && (
|
|
537
537
|
<Box sx={{ mb: 1.5 }}>
|
|
538
538
|
<LinearProgress
|
|
539
539
|
variant="determinate"
|