@flowuent-org/diagramming-core 1.3.1 → 1.3.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/package.json +1 -1
- package/packages/diagrams/src/lib/components/automation/AutomationGoogleServicesNode.tsx +3 -3
- package/packages/diagrams/src/lib/components/automation/AutomationSlackNode.tsx +4 -4
- package/packages/diagrams/src/lib/components/automation/AutomationTelegramNode.tsx +3 -3
- package/packages/diagrams/src/lib/components/automation/statusColors.ts +24 -8
package/package.json
CHANGED
|
@@ -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' | 'success' | 'error' | 'needToConfig';
|
|
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 || '
|
|
242
|
+
const status = data.status || 'ready';
|
|
243
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 = () => {
|
|
@@ -55,7 +55,7 @@ export interface AutomationSlackNodeData {
|
|
|
55
55
|
label: string;
|
|
56
56
|
description: string;
|
|
57
57
|
operationType?: SlackOperationType;
|
|
58
|
-
status: '
|
|
58
|
+
status: 'ready' | 'running' | 'success' | 'error' | 'authenticated' | 'needToConfig';
|
|
59
59
|
parameters?: {
|
|
60
60
|
// Message operations
|
|
61
61
|
channel?: string;
|
|
@@ -216,7 +216,7 @@ export const AutomationSlackNode: React.FC<AutomationSlackNodeProps> = ({
|
|
|
216
216
|
const enableJson = useDiagram((state) => state.enableNodeJsonPopover ?? true);
|
|
217
217
|
|
|
218
218
|
// Get operation configuration
|
|
219
|
-
const operationType = data.operationType || data.formData?.operationType || 'send-message';
|
|
219
|
+
const operationType = (data.operationType || data.formData?.operationType || 'send-message') as SlackOperationType;
|
|
220
220
|
const operationConfig = OPERATION_CONFIG[operationType] || OPERATION_CONFIG['send-message'];
|
|
221
221
|
const OperationIcon = operationConfig.icon;
|
|
222
222
|
|
|
@@ -228,11 +228,11 @@ export const AutomationSlackNode: React.FC<AutomationSlackNodeProps> = ({
|
|
|
228
228
|
const tokenExpired = isTokenExpired(data.parameters?.slackTokenExpiresAt);
|
|
229
229
|
|
|
230
230
|
// Execution state
|
|
231
|
-
const status = data.status || '
|
|
231
|
+
const status = data.status || 'ready';
|
|
232
232
|
const executionProgress = status === 'running' ? 50 : 0;
|
|
233
233
|
|
|
234
234
|
// Status configuration - using centralized status colors
|
|
235
|
-
const statusConfig = getStatusColor(status, status === 'authenticated' ? 'authenticated' : '
|
|
235
|
+
const statusConfig = getStatusColor(status, status === 'authenticated' ? 'authenticated' : 'ready');
|
|
236
236
|
|
|
237
237
|
// Handle JSON view
|
|
238
238
|
const handleJsonClick = () => {
|
|
@@ -58,7 +58,7 @@ export interface AutomationTelegramNodeData {
|
|
|
58
58
|
label: string;
|
|
59
59
|
description: string;
|
|
60
60
|
operationType?: TelegramOperationType;
|
|
61
|
-
status: '
|
|
61
|
+
status: 'ready' | 'running' | 'success' | 'error' | 'authenticated' | 'needToConfig';
|
|
62
62
|
parameters?: {
|
|
63
63
|
// Message operations
|
|
64
64
|
chatId?: string;
|
|
@@ -221,11 +221,11 @@ export const AutomationTelegramNode: React.FC<AutomationTelegramNodeProps> = ({
|
|
|
221
221
|
const botId = data.telegramAuth?.botId || data.parameters?.botId;
|
|
222
222
|
|
|
223
223
|
// Execution state
|
|
224
|
-
const status = data.status || '
|
|
224
|
+
const status = data.status || 'ready';
|
|
225
225
|
const executionProgress = status === 'running' ? 50 : 0;
|
|
226
226
|
|
|
227
227
|
// Status configuration - using centralized status colors
|
|
228
|
-
const statusConfig = getStatusColor(status, status === 'authenticated' ? 'authenticated' : '
|
|
228
|
+
const statusConfig = getStatusColor(status, status === 'authenticated' ? 'authenticated' : 'ready');
|
|
229
229
|
|
|
230
230
|
// Handle JSON view
|
|
231
231
|
const handleJsonClick = () => {
|
|
@@ -18,7 +18,7 @@ export interface AutomationStatusColors {
|
|
|
18
18
|
success: StatusColorConfig; // Alias for completed (used in some nodes)
|
|
19
19
|
error: StatusColorConfig;
|
|
20
20
|
ready: StatusColorConfig;
|
|
21
|
-
|
|
21
|
+
needToConfig: StatusColorConfig;
|
|
22
22
|
authenticated?: StatusColorConfig; // Optional, used in auth-enabled nodes
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -29,7 +29,8 @@ export interface AutomationStatusColors {
|
|
|
29
29
|
* - Running: Blue (#2563EB) - indicates active execution
|
|
30
30
|
* - Completed/Success: Yellow (#FCD34D) - indicates successful completion
|
|
31
31
|
* - Error: Red (#EF4444) - indicates failure
|
|
32
|
-
* - Ready
|
|
32
|
+
* - Ready: Green - indicates ready state
|
|
33
|
+
* - Need to Config: Cyan (#06B6D4) - indicates configuration required
|
|
33
34
|
*/
|
|
34
35
|
export const automationStatusColors: AutomationStatusColors = {
|
|
35
36
|
running: {
|
|
@@ -57,10 +58,10 @@ export const automationStatusColors: AutomationStatusColors = {
|
|
|
57
58
|
bgColor: 'rgba(16, 185, 129, 0.1)',
|
|
58
59
|
label: 'Ready',
|
|
59
60
|
},
|
|
60
|
-
|
|
61
|
-
color: '#
|
|
62
|
-
bgColor: 'rgba(
|
|
63
|
-
label: '
|
|
61
|
+
needToConfig: {
|
|
62
|
+
color: '#06B6D4',
|
|
63
|
+
bgColor: 'rgba(6, 182, 212, 0.15)',
|
|
64
|
+
label: 'Need to Config',
|
|
64
65
|
},
|
|
65
66
|
authenticated: {
|
|
66
67
|
color: '#0088cc',
|
|
@@ -86,17 +87,32 @@ export const getStatusColor = (
|
|
|
86
87
|
const statusMap: Record<string, keyof AutomationStatusColors> = {
|
|
87
88
|
'running': 'running',
|
|
88
89
|
'completed': 'completed',
|
|
90
|
+
'complete': 'completed',
|
|
89
91
|
'success': 'success',
|
|
90
92
|
'error': 'error',
|
|
91
93
|
'failed': 'error',
|
|
92
94
|
'ready': 'ready',
|
|
93
|
-
'
|
|
95
|
+
'needtoconfig': 'needToConfig',
|
|
96
|
+
'need to config': 'needToConfig',
|
|
97
|
+
'need-to-config': 'needToConfig',
|
|
98
|
+
'config': 'needToConfig',
|
|
99
|
+
'configuration': 'needToConfig',
|
|
94
100
|
'authenticated': 'authenticated',
|
|
95
101
|
'connected': 'authenticated',
|
|
96
102
|
};
|
|
97
103
|
|
|
98
104
|
const configKey = statusMap[normalizedStatus] || defaultStatus;
|
|
99
|
-
|
|
105
|
+
const config = automationStatusColors[configKey];
|
|
106
|
+
if (config) {
|
|
107
|
+
return config;
|
|
108
|
+
}
|
|
109
|
+
// Fallback to defaultStatus, and if that's also optional (authenticated), use 'ready'
|
|
110
|
+
const defaultConfig = automationStatusColors[defaultStatus];
|
|
111
|
+
if (defaultConfig) {
|
|
112
|
+
return defaultConfig;
|
|
113
|
+
}
|
|
114
|
+
// Final fallback to 'ready' which is always defined
|
|
115
|
+
return automationStatusColors.ready;
|
|
100
116
|
};
|
|
101
117
|
|
|
102
118
|
/**
|