@flowuent-org/diagramming-core 1.3.7 → 1.3.9

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowuent-org/diagramming-core",
3
- "version": "1.3.7",
3
+ "version": "1.3.9",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -14,7 +14,6 @@ import {
14
14
  } from '@mui/icons-material';
15
15
  import { RiCloseLine, RiUser2Line } from 'react-icons/ri';
16
16
  import ReactJson from 'react-json-view';
17
- import { getIconByName } from '../../utils/iconMapper';
18
17
  import { useTranslation } from 'react-i18next';
19
18
  import { useDiagram } from '../../contexts/DiagramProvider';
20
19
  import { AISuggestion } from './AISuggestionsModal';
@@ -23,6 +22,7 @@ import { NodeActionButtons } from './NodeActionButtons';
23
22
  import { showNodeAIAssistantPopup } from './NodeAIAssistantPopup';
24
23
  import { useSearch } from '../../contexts/SearchContext';
25
24
  import { getStatusColor } from './statusColors';
25
+ import { ApiNodeIcon } from '../../../../../molecules/src/lib/SvgIcons/icons';
26
26
 
27
27
  interface AutomationApiNodeProps {
28
28
  data: {
@@ -75,9 +75,6 @@ export const AutomationApiNode: React.FC<AutomationApiNodeProps> = ({ data, sele
75
75
  const nodes = useDiagram((state) => state.nodes);
76
76
  const setNodes = useDiagram((state) => state.setNodes);
77
77
 
78
- // Get the icon component based on the iconName
79
- const IconComponent = getIconByName(data.iconName);
80
-
81
78
 
82
79
 
83
80
  const handleJsonClick = () => {
@@ -335,18 +332,20 @@ export const AutomationApiNode: React.FC<AutomationApiNodeProps> = ({ data, sele
335
332
  {/* Title Section */}
336
333
  <Box sx={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', mb: 2 }}>
337
334
  <Box sx={{ display: 'flex', alignItems: 'center', gap: 1.5 }}>
338
- <Box
335
+ <Box
339
336
  sx={{
340
337
  width: '32px',
341
338
  height: '32px',
342
- backgroundColor: '#0ea5e9',
339
+ minWidth: '32px',
340
+ backgroundColor: '#1E3A8A',
343
341
  borderRadius: '50%',
344
342
  display: 'flex',
345
343
  alignItems: 'center',
346
344
  justifyContent: 'center',
347
- }}
345
+ flexShrink: 0,
346
+ }}
348
347
  >
349
- <IconComponent sx={{ color: 'white', fontSize: '18px' }} />
348
+ <ApiNodeIcon/>
350
349
  </Box>
351
350
  <Typography variant="h6" sx={{ fontWeight: 600, fontSize: '16px' }}>
352
351
  {highlightText(data.label)}
@@ -5,7 +5,6 @@ import { Box, Typography, Chip, IconButton, Card, CardContent, Button } from '@m
5
5
  import { AccessTime as AccessTimeIcon, Visibility as VisibilityIcon, Save as SaveIcon, Send as SendIcon, Lightbulb as LightbulbIcon } from '@mui/icons-material';
6
6
  import { RiCloseLine, RiUser2Line } from 'react-icons/ri';
7
7
  import ReactJson from 'react-json-view';
8
- import { getIconByName } from '../../utils/iconMapper';
9
8
  import { useTranslation } from 'react-i18next';
10
9
  import { useDiagram } from '../../contexts/DiagramProvider';
11
10
  import { AISuggestion } from './AISuggestionsModal';
@@ -56,9 +55,7 @@ export const AutomationEndNode: React.FC<AutomationEndNodeProps> = ({ data, sele
56
55
  const nodes = useDiagram((state) => state.nodes);
57
56
  const setNodes = useDiagram((state) => state.setNodes);
58
57
 
59
- // Get the icon component based on the iconName
60
- const IconComponent = getIconByName(data.iconName);
61
- const isEndNode = data.label === 'End' || data.label === 'End Node';
58
+ // Always use EndNodeIcon for automation end nodes
62
59
 
63
60
  const handleJsonClick = () => {
64
61
  if (nodeId) setSelectedNode(nodeId);
@@ -266,23 +263,10 @@ export const AutomationEndNode: React.FC<AutomationEndNodeProps> = ({ data, sele
266
263
  {/* Title Section */}
267
264
  <Box sx={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', mb: 2 }}>
268
265
  <Box sx={{ display: 'flex', alignItems: 'center', gap: 1.5 }}>
269
- <Box
270
- sx={{
271
- width: '32px',
272
- height: '32px',
273
- backgroundColor: '#0ea5e9', // Blue-green color like in image
274
- borderRadius: '50%',
275
- display: 'flex',
276
- alignItems: 'center',
277
- justifyContent: 'center',
278
- }}
279
- >
280
- {isEndNode ? (
281
- <EndNodeIcon size={18} color="#FFFFFF" />
282
- ) : (
283
- <IconComponent sx={{ color: 'white', fontSize: '18px' }} />
284
- )}
285
- </Box>
266
+
267
+
268
+ <EndNodeIcon />
269
+
286
270
  <Typography variant="h6" sx={{ fontWeight: 600, fontSize: '16px' }}>
287
271
  {highlightText(data.label)}
288
272
  </Typography>
@@ -14,7 +14,6 @@ import {
14
14
  } from '@mui/icons-material';
15
15
  import { RiCloseLine, RiUser2Line } from 'react-icons/ri';
16
16
  import ReactJson from 'react-json-view';
17
- import { getIconByName } from '../../utils/iconMapper';
18
17
  import { useTranslation } from 'react-i18next';
19
18
  import { useDiagram } from '../../contexts/DiagramProvider';
20
19
  import { AISuggestion } from './AISuggestionsModal';
@@ -23,7 +22,7 @@ import { NodeActionButtons } from './NodeActionButtons';
23
22
  import { showNodeAIAssistantPopup } from './NodeAIAssistantPopup';
24
23
  import { useSearch } from '../../contexts/SearchContext';
25
24
  import { getStatusColor } from './statusColors';
26
- import { ArticleAnalyzerIcon } from '../../../../../molecules/src/lib/SvgIcons/icons';
25
+ import { ArticleAnalyzerIcon, FormattingNodeIcon } from '../../../../../molecules/src/lib/SvgIcons/icons';
27
26
 
28
27
  interface AutomationFormattingNodeProps {
29
28
  data: {
@@ -83,11 +82,6 @@ export const AutomationFormattingNode: React.FC<AutomationFormattingNodeProps> =
83
82
 
84
83
  // Check if this is Article Analyzer node
85
84
  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);
91
85
 
92
86
  const handleJsonClick = () => {
93
87
  if (nodeId) setSelectedNode(nodeId);
@@ -348,17 +342,19 @@ export const AutomationFormattingNode: React.FC<AutomationFormattingNodeProps> =
348
342
  sx={{
349
343
  width: '32px',
350
344
  height: '32px',
351
- backgroundColor: '#1E3A8A',
345
+ minWidth: '32px',
346
+ backgroundColor: '#1E3A8A',
352
347
  borderRadius: '50%',
353
348
  display: 'flex',
354
349
  alignItems: 'center',
355
350
  justifyContent: 'center',
351
+ flexShrink: 0,
356
352
  }}
357
353
  >
358
354
  {isArticleAnalyzer ? (
359
355
  <ArticleAnalyzerIcon size={18} color="#FFFFFF" />
360
356
  ) : (
361
- <IconComponent size={18} color="#FFFFFF" />
357
+ <FormattingNodeIcon size={18} color="#FFFFFF" />
362
358
  )}
363
359
  </Box>
364
360
  <Typography variant="h6" sx={{ fontWeight: 600, fontSize: '16px' }}>