@oneuptime/common 10.0.39 → 10.0.41

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 (285) hide show
  1. package/Models/AnalyticsModels/Index.ts +4 -0
  2. package/Models/AnalyticsModels/Profile.ts +687 -0
  3. package/Models/AnalyticsModels/ProfileSample.ts +547 -0
  4. package/Models/DatabaseModels/Dashboard.ts +357 -0
  5. package/Models/DatabaseModels/DashboardDomain.ts +658 -0
  6. package/Models/DatabaseModels/Index.ts +2 -0
  7. package/Models/DatabaseModels/StatusPage.ts +41 -0
  8. package/Server/API/DashboardAPI.ts +408 -0
  9. package/Server/API/DashboardDomainAPI.ts +235 -0
  10. package/Server/API/StatusPageAPI.ts +36 -2
  11. package/Server/API/TelemetryAPI.ts +393 -0
  12. package/Server/EnvironmentConfig.ts +12 -0
  13. package/Server/Infrastructure/Postgres/SchemaMigrations/1774524742177-MigrationName.ts +97 -0
  14. package/Server/Infrastructure/Postgres/SchemaMigrations/1774524742178-MigrationName.ts +17 -0
  15. package/Server/Infrastructure/Postgres/SchemaMigrations/1774524742179-MigrationName.ts +50 -0
  16. package/Server/Infrastructure/Postgres/SchemaMigrations/1774559064919-MigrationName.ts +59 -0
  17. package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +8 -0
  18. package/Server/Middleware/UserAuthorization.ts +96 -1
  19. package/Server/Services/DashboardDomainService.ts +647 -0
  20. package/Server/Services/DashboardService.ts +174 -3
  21. package/Server/Services/IncidentService.ts +295 -50
  22. package/Server/Services/IncidentStateTimelineService.ts +1 -0
  23. package/Server/Services/Index.ts +6 -0
  24. package/Server/Services/MonitorService.ts +5 -0
  25. package/Server/Services/ProfileAggregationService.ts +559 -0
  26. package/Server/Services/ProfileSampleService.ts +11 -0
  27. package/Server/Services/ProfileService.ts +11 -0
  28. package/Server/Services/TelemetryUsageBillingService.ts +77 -3
  29. package/Server/Services/WorkspaceNotificationSummaryService.ts +15 -1
  30. package/Server/Types/Billing/MeteredPlan/AllMeteredPlans.ts +9 -0
  31. package/Server/Utils/Cookie.ts +48 -0
  32. package/Server/Utils/Monitor/Criteria/ProfileMonitorCriteria.ts +34 -0
  33. package/Server/Utils/Monitor/DataToProcess.ts +3 -1
  34. package/Server/Utils/Monitor/MonitorCriteriaEvaluator.ts +299 -0
  35. package/Server/Utils/Profile/PprofEncoder.ts +225 -0
  36. package/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.ts +53 -16
  37. package/Server/Utils/Workspace/Slack/Slack.ts +26 -6
  38. package/ServiceRoute.ts +2 -0
  39. package/Tests/UI/Components/ComponentsModal.test.tsx +19 -15
  40. package/Types/AnalyticsDatabase/AnalyticsTableName.ts +2 -0
  41. package/Types/CookieName.ts +1 -0
  42. package/Types/Dashboard/Chart/ChartType.ts +5 -0
  43. package/Types/Dashboard/DashboardComponentType.ts +4 -0
  44. package/Types/Dashboard/DashboardComponents/ComponentArgument.ts +10 -0
  45. package/Types/Dashboard/DashboardComponents/DashboardChartComponent.ts +1 -2
  46. package/Types/Dashboard/DashboardComponents/DashboardGaugeComponent.ts +17 -0
  47. package/Types/Dashboard/DashboardComponents/DashboardLogStreamComponent.ts +15 -0
  48. package/Types/Dashboard/DashboardComponents/DashboardTableComponent.ts +14 -0
  49. package/Types/Dashboard/DashboardComponents/DashboardTextComponent.ts +1 -0
  50. package/Types/Dashboard/DashboardComponents/DashboardTraceListComponent.ts +13 -0
  51. package/Types/Dashboard/DashboardComponents/DashboardValueComponent.ts +2 -0
  52. package/Types/Dashboard/DashboardTemplates.ts +964 -0
  53. package/Types/Dashboard/DashboardVariable.ts +23 -0
  54. package/Types/Dashboard/DashboardViewConfig.ts +59 -0
  55. package/Types/Dashboard/MasterPassword.ts +10 -0
  56. package/Types/Icon/IconProp.ts +1 -0
  57. package/Types/Incident/IncidentMetricType.ts +3 -0
  58. package/Types/MeteredPlan/ProductType.ts +1 -0
  59. package/Types/Metrics/MetricQueryConfigData.ts +3 -0
  60. package/Types/Monitor/CriteriaFilter.ts +3 -0
  61. package/Types/Monitor/KubernetesAlertTemplates.ts +78 -7
  62. package/Types/Monitor/MetricMonitor/MetricMonitorResponse.ts +20 -0
  63. package/Types/Monitor/MonitorStep.ts +25 -0
  64. package/Types/Monitor/MonitorStepProfileMonitor.ts +96 -0
  65. package/Types/Monitor/MonitorType.ts +11 -0
  66. package/Types/Monitor/ProfileMonitor/ProfileMonitorResponse.ts +12 -0
  67. package/Types/Permission.ts +87 -0
  68. package/Types/Telemetry/TelemetryType.ts +1 -0
  69. package/Types/Workspace/NotificationSummary/WorkspaceNotificationSummaryItem.ts +1 -0
  70. package/UI/Components/Button/Button.tsx +1 -1
  71. package/UI/Components/Card/Card.tsx +8 -4
  72. package/UI/Components/Charts/Area/AreaChart.tsx +4 -0
  73. package/UI/Components/Charts/Bar/BarChart.tsx +4 -0
  74. package/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.tsx +26 -0
  75. package/UI/Components/Charts/ChartLibrary/BarChart/BarChart.tsx +26 -0
  76. package/UI/Components/Charts/ChartLibrary/LineChart/LineChart.tsx +26 -0
  77. package/UI/Components/Charts/Line/LineChart.tsx +4 -0
  78. package/UI/Components/Charts/Types/ReferenceLineProps.ts +6 -0
  79. package/UI/Components/Icon/Icon.tsx +33 -0
  80. package/UI/Components/ModelTable/BaseModelTable.tsx +13 -10
  81. package/UI/Components/MoreMenu/MoreMenu.tsx +15 -2
  82. package/UI/Components/MoreMenu/MoreMenuItem.tsx +4 -4
  83. package/UI/Components/Workflow/Component.tsx +450 -209
  84. package/UI/Components/Workflow/ComponentPortViewer.tsx +57 -20
  85. package/UI/Components/Workflow/ComponentReturnValueViewer.tsx +65 -25
  86. package/UI/Components/Workflow/ComponentSettingsModal.tsx +202 -37
  87. package/UI/Components/Workflow/ComponentsModal.tsx +180 -93
  88. package/UI/Components/Workflow/Workflow.tsx +105 -9
  89. package/UI/Config.ts +9 -0
  90. package/Utils/Dashboard/Components/DashboardChartComponent.ts +53 -22
  91. package/Utils/Dashboard/Components/DashboardGaugeComponent.ts +124 -0
  92. package/Utils/Dashboard/Components/DashboardLogStreamComponent.ts +110 -0
  93. package/Utils/Dashboard/Components/DashboardTableComponent.ts +86 -0
  94. package/Utils/Dashboard/Components/DashboardTextComponent.ts +32 -7
  95. package/Utils/Dashboard/Components/DashboardTraceListComponent.ts +86 -0
  96. package/Utils/Dashboard/Components/DashboardValueComponent.ts +39 -3
  97. package/Utils/Dashboard/Components/Index.ts +28 -0
  98. package/Utils/ValueFormatter.ts +170 -0
  99. package/build/dist/Models/AnalyticsModels/Index.js +4 -0
  100. package/build/dist/Models/AnalyticsModels/Index.js.map +1 -1
  101. package/build/dist/Models/AnalyticsModels/Profile.js +621 -0
  102. package/build/dist/Models/AnalyticsModels/Profile.js.map +1 -0
  103. package/build/dist/Models/AnalyticsModels/ProfileSample.js +497 -0
  104. package/build/dist/Models/AnalyticsModels/ProfileSample.js.map +1 -0
  105. package/build/dist/Models/DatabaseModels/Dashboard.js +365 -0
  106. package/build/dist/Models/DatabaseModels/Dashboard.js.map +1 -1
  107. package/build/dist/Models/DatabaseModels/DashboardDomain.js +691 -0
  108. package/build/dist/Models/DatabaseModels/DashboardDomain.js.map +1 -0
  109. package/build/dist/Models/DatabaseModels/Index.js +2 -0
  110. package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
  111. package/build/dist/Models/DatabaseModels/StatusPage.js +42 -0
  112. package/build/dist/Models/DatabaseModels/StatusPage.js.map +1 -1
  113. package/build/dist/Server/API/DashboardAPI.js +293 -0
  114. package/build/dist/Server/API/DashboardAPI.js.map +1 -0
  115. package/build/dist/Server/API/DashboardDomainAPI.js +124 -0
  116. package/build/dist/Server/API/DashboardDomainAPI.js.map +1 -0
  117. package/build/dist/Server/API/StatusPageAPI.js +26 -2
  118. package/build/dist/Server/API/StatusPageAPI.js.map +1 -1
  119. package/build/dist/Server/API/TelemetryAPI.js +222 -0
  120. package/build/dist/Server/API/TelemetryAPI.js.map +1 -1
  121. package/build/dist/Server/EnvironmentConfig.js +4 -0
  122. package/build/dist/Server/EnvironmentConfig.js.map +1 -1
  123. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1774524742177-MigrationName.js +40 -0
  124. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1774524742177-MigrationName.js.map +1 -0
  125. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1774524742178-MigrationName.js +12 -0
  126. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1774524742178-MigrationName.js.map +1 -0
  127. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1774524742179-MigrationName.js +23 -0
  128. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1774524742179-MigrationName.js.map +1 -0
  129. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1774559064919-MigrationName.js +26 -0
  130. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1774559064919-MigrationName.js.map +1 -0
  131. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +8 -0
  132. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
  133. package/build/dist/Server/Middleware/UserAuthorization.js +41 -0
  134. package/build/dist/Server/Middleware/UserAuthorization.js.map +1 -1
  135. package/build/dist/Server/Services/DashboardDomainService.js +595 -0
  136. package/build/dist/Server/Services/DashboardDomainService.js.map +1 -0
  137. package/build/dist/Server/Services/DashboardService.js +117 -3
  138. package/build/dist/Server/Services/DashboardService.js.map +1 -1
  139. package/build/dist/Server/Services/IncidentService.js +231 -55
  140. package/build/dist/Server/Services/IncidentService.js.map +1 -1
  141. package/build/dist/Server/Services/IncidentStateTimelineService.js +1 -1
  142. package/build/dist/Server/Services/IncidentStateTimelineService.js.map +1 -1
  143. package/build/dist/Server/Services/Index.js +6 -0
  144. package/build/dist/Server/Services/Index.js.map +1 -1
  145. package/build/dist/Server/Services/MonitorService.js +5 -2
  146. package/build/dist/Server/Services/MonitorService.js.map +1 -1
  147. package/build/dist/Server/Services/ProfileAggregationService.js +356 -0
  148. package/build/dist/Server/Services/ProfileAggregationService.js.map +1 -0
  149. package/build/dist/Server/Services/ProfileSampleService.js +9 -0
  150. package/build/dist/Server/Services/ProfileSampleService.js.map +1 -0
  151. package/build/dist/Server/Services/ProfileService.js +9 -0
  152. package/build/dist/Server/Services/ProfileService.js.map +1 -0
  153. package/build/dist/Server/Services/TelemetryUsageBillingService.js +61 -4
  154. package/build/dist/Server/Services/TelemetryUsageBillingService.js.map +1 -1
  155. package/build/dist/Server/Services/WorkspaceNotificationSummaryService.js +13 -1
  156. package/build/dist/Server/Services/WorkspaceNotificationSummaryService.js.map +1 -1
  157. package/build/dist/Server/Types/Billing/MeteredPlan/AllMeteredPlans.js +8 -0
  158. package/build/dist/Server/Types/Billing/MeteredPlan/AllMeteredPlans.js.map +1 -1
  159. package/build/dist/Server/Utils/Cookie.js +36 -0
  160. package/build/dist/Server/Utils/Cookie.js.map +1 -1
  161. package/build/dist/Server/Utils/Monitor/Criteria/ProfileMonitorCriteria.js +34 -0
  162. package/build/dist/Server/Utils/Monitor/Criteria/ProfileMonitorCriteria.js.map +1 -0
  163. package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js +173 -0
  164. package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js.map +1 -1
  165. package/build/dist/Server/Utils/Profile/PprofEncoder.js +129 -0
  166. package/build/dist/Server/Utils/Profile/PprofEncoder.js.map +1 -0
  167. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js +36 -14
  168. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js.map +1 -1
  169. package/build/dist/Server/Utils/Workspace/Slack/Slack.js +23 -6
  170. package/build/dist/Server/Utils/Workspace/Slack/Slack.js.map +1 -1
  171. package/build/dist/ServiceRoute.js +1 -0
  172. package/build/dist/ServiceRoute.js.map +1 -1
  173. package/build/dist/Tests/UI/Components/ComponentsModal.test.js +15 -15
  174. package/build/dist/Tests/UI/Components/ComponentsModal.test.js.map +1 -1
  175. package/build/dist/Types/AnalyticsDatabase/AnalyticsTableName.js +2 -0
  176. package/build/dist/Types/AnalyticsDatabase/AnalyticsTableName.js.map +1 -1
  177. package/build/dist/Types/CookieName.js +1 -0
  178. package/build/dist/Types/CookieName.js.map +1 -1
  179. package/build/dist/Types/Dashboard/Chart/ChartType.js +5 -0
  180. package/build/dist/Types/Dashboard/Chart/ChartType.js.map +1 -1
  181. package/build/dist/Types/Dashboard/DashboardComponentType.js +4 -0
  182. package/build/dist/Types/Dashboard/DashboardComponentType.js.map +1 -1
  183. package/build/dist/Types/Dashboard/DashboardComponents/ComponentArgument.js +1 -0
  184. package/build/dist/Types/Dashboard/DashboardComponents/ComponentArgument.js.map +1 -1
  185. package/build/dist/Types/Dashboard/DashboardComponents/DashboardGaugeComponent.js +2 -0
  186. package/build/dist/Types/Dashboard/DashboardComponents/DashboardGaugeComponent.js.map +1 -0
  187. package/build/dist/Types/Dashboard/DashboardComponents/DashboardLogStreamComponent.js +2 -0
  188. package/build/dist/Types/Dashboard/DashboardComponents/DashboardLogStreamComponent.js.map +1 -0
  189. package/build/dist/Types/Dashboard/DashboardComponents/DashboardTableComponent.js +2 -0
  190. package/build/dist/Types/Dashboard/DashboardComponents/DashboardTableComponent.js.map +1 -0
  191. package/build/dist/Types/Dashboard/DashboardComponents/DashboardTraceListComponent.js +2 -0
  192. package/build/dist/Types/Dashboard/DashboardComponents/DashboardTraceListComponent.js.map +1 -0
  193. package/build/dist/Types/Dashboard/DashboardTemplates.js +853 -0
  194. package/build/dist/Types/Dashboard/DashboardTemplates.js.map +1 -0
  195. package/build/dist/Types/Dashboard/DashboardVariable.js +7 -0
  196. package/build/dist/Types/Dashboard/DashboardVariable.js.map +1 -0
  197. package/build/dist/Types/Dashboard/DashboardViewConfig.js +50 -1
  198. package/build/dist/Types/Dashboard/DashboardViewConfig.js.map +1 -1
  199. package/build/dist/Types/Dashboard/MasterPassword.js +5 -0
  200. package/build/dist/Types/Dashboard/MasterPassword.js.map +1 -0
  201. package/build/dist/Types/Icon/IconProp.js +1 -0
  202. package/build/dist/Types/Icon/IconProp.js.map +1 -1
  203. package/build/dist/Types/Incident/IncidentMetricType.js +3 -0
  204. package/build/dist/Types/Incident/IncidentMetricType.js.map +1 -1
  205. package/build/dist/Types/MeteredPlan/ProductType.js +1 -0
  206. package/build/dist/Types/MeteredPlan/ProductType.js.map +1 -1
  207. package/build/dist/Types/Metrics/MetricQueryConfigData.js +1 -0
  208. package/build/dist/Types/Metrics/MetricQueryConfigData.js.map +1 -1
  209. package/build/dist/Types/Monitor/CriteriaFilter.js +2 -0
  210. package/build/dist/Types/Monitor/CriteriaFilter.js.map +1 -1
  211. package/build/dist/Types/Monitor/KubernetesAlertTemplates.js +58 -7
  212. package/build/dist/Types/Monitor/KubernetesAlertTemplates.js.map +1 -1
  213. package/build/dist/Types/Monitor/MonitorStep.js +15 -0
  214. package/build/dist/Types/Monitor/MonitorStep.js.map +1 -1
  215. package/build/dist/Types/Monitor/MonitorStepProfileMonitor.js +59 -0
  216. package/build/dist/Types/Monitor/MonitorStepProfileMonitor.js.map +1 -0
  217. package/build/dist/Types/Monitor/MonitorType.js +10 -0
  218. package/build/dist/Types/Monitor/MonitorType.js.map +1 -1
  219. package/build/dist/Types/Monitor/ProfileMonitor/ProfileMonitorResponse.js +2 -0
  220. package/build/dist/Types/Monitor/ProfileMonitor/ProfileMonitorResponse.js.map +1 -0
  221. package/build/dist/Types/Permission.js +75 -0
  222. package/build/dist/Types/Permission.js.map +1 -1
  223. package/build/dist/Types/Telemetry/TelemetryType.js +1 -0
  224. package/build/dist/Types/Telemetry/TelemetryType.js.map +1 -1
  225. package/build/dist/Types/Workspace/NotificationSummary/WorkspaceNotificationSummaryItem.js +1 -0
  226. package/build/dist/Types/Workspace/NotificationSummary/WorkspaceNotificationSummaryItem.js.map +1 -1
  227. package/build/dist/UI/Components/Button/Button.js +1 -1
  228. package/build/dist/UI/Components/Button/Button.js.map +1 -1
  229. package/build/dist/UI/Components/Card/Card.js +4 -4
  230. package/build/dist/UI/Components/Card/Card.js.map +1 -1
  231. package/build/dist/UI/Components/Charts/Area/AreaChart.js +1 -1
  232. package/build/dist/UI/Components/Charts/Area/AreaChart.js.map +1 -1
  233. package/build/dist/UI/Components/Charts/Bar/BarChart.js +1 -1
  234. package/build/dist/UI/Components/Charts/Bar/BarChart.js.map +1 -1
  235. package/build/dist/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.js +5 -2
  236. package/build/dist/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.js.map +1 -1
  237. package/build/dist/UI/Components/Charts/ChartLibrary/BarChart/BarChart.js +5 -2
  238. package/build/dist/UI/Components/Charts/ChartLibrary/BarChart/BarChart.js.map +1 -1
  239. package/build/dist/UI/Components/Charts/ChartLibrary/LineChart/LineChart.js +6 -3
  240. package/build/dist/UI/Components/Charts/ChartLibrary/LineChart/LineChart.js.map +1 -1
  241. package/build/dist/UI/Components/Charts/Line/LineChart.js +1 -1
  242. package/build/dist/UI/Components/Charts/Line/LineChart.js.map +1 -1
  243. package/build/dist/UI/Components/Charts/Types/ReferenceLineProps.js +2 -0
  244. package/build/dist/UI/Components/Charts/Types/ReferenceLineProps.js.map +1 -0
  245. package/build/dist/UI/Components/Icon/Icon.js +11 -0
  246. package/build/dist/UI/Components/Icon/Icon.js.map +1 -1
  247. package/build/dist/UI/Components/ModelTable/BaseModelTable.js +12 -9
  248. package/build/dist/UI/Components/ModelTable/BaseModelTable.js.map +1 -1
  249. package/build/dist/UI/Components/MoreMenu/MoreMenu.js +8 -2
  250. package/build/dist/UI/Components/MoreMenu/MoreMenu.js.map +1 -1
  251. package/build/dist/UI/Components/MoreMenu/MoreMenuItem.js +4 -4
  252. package/build/dist/UI/Components/MoreMenu/MoreMenuItem.js.map +1 -1
  253. package/build/dist/UI/Components/Workflow/Component.js +311 -143
  254. package/build/dist/UI/Components/Workflow/Component.js.map +1 -1
  255. package/build/dist/UI/Components/Workflow/ComponentPortViewer.js +44 -18
  256. package/build/dist/UI/Components/Workflow/ComponentPortViewer.js.map +1 -1
  257. package/build/dist/UI/Components/Workflow/ComponentReturnValueViewer.js +48 -22
  258. package/build/dist/UI/Components/Workflow/ComponentReturnValueViewer.js.map +1 -1
  259. package/build/dist/UI/Components/Workflow/ComponentSettingsModal.js +127 -21
  260. package/build/dist/UI/Components/Workflow/ComponentSettingsModal.js.map +1 -1
  261. package/build/dist/UI/Components/Workflow/ComponentsModal.js +107 -52
  262. package/build/dist/UI/Components/Workflow/ComponentsModal.js.map +1 -1
  263. package/build/dist/UI/Components/Workflow/Workflow.js +87 -12
  264. package/build/dist/UI/Components/Workflow/Workflow.js.map +1 -1
  265. package/build/dist/UI/Config.js +3 -1
  266. package/build/dist/UI/Config.js.map +1 -1
  267. package/build/dist/Utils/Dashboard/Components/DashboardChartComponent.js +50 -21
  268. package/build/dist/Utils/Dashboard/Components/DashboardChartComponent.js.map +1 -1
  269. package/build/dist/Utils/Dashboard/Components/DashboardGaugeComponent.js +104 -0
  270. package/build/dist/Utils/Dashboard/Components/DashboardGaugeComponent.js.map +1 -0
  271. package/build/dist/Utils/Dashboard/Components/DashboardLogStreamComponent.js +91 -0
  272. package/build/dist/Utils/Dashboard/Components/DashboardLogStreamComponent.js.map +1 -0
  273. package/build/dist/Utils/Dashboard/Components/DashboardTableComponent.js +70 -0
  274. package/build/dist/Utils/Dashboard/Components/DashboardTableComponent.js.map +1 -0
  275. package/build/dist/Utils/Dashboard/Components/DashboardTextComponent.js +28 -7
  276. package/build/dist/Utils/Dashboard/Components/DashboardTextComponent.js.map +1 -1
  277. package/build/dist/Utils/Dashboard/Components/DashboardTraceListComponent.js +70 -0
  278. package/build/dist/Utils/Dashboard/Components/DashboardTraceListComponent.js.map +1 -0
  279. package/build/dist/Utils/Dashboard/Components/DashboardValueComponent.js +34 -3
  280. package/build/dist/Utils/Dashboard/Components/DashboardValueComponent.js.map +1 -1
  281. package/build/dist/Utils/Dashboard/Components/Index.js +16 -0
  282. package/build/dist/Utils/Dashboard/Components/Index.js.map +1 -1
  283. package/build/dist/Utils/ValueFormatter.js +132 -0
  284. package/build/dist/Utils/ValueFormatter.js.map +1 -0
  285. package/package.json +1 -1
@@ -1,7 +1,5 @@
1
1
  import Icon, { ThickProp } from "../Icon/Icon";
2
- import Pill from "../Pill/Pill";
3
2
  import Tooltip from "../Tooltip/Tooltip";
4
- import { Green } from "../../../Types/BrandColors";
5
3
  import IconProp from "../../../Types/Icon/IconProp";
6
4
  import {
7
5
  ComponentType,
@@ -17,106 +15,272 @@ export interface ComponentProps {
17
15
  selected: boolean;
18
16
  }
19
17
 
20
- const Node: FunctionComponent<ComponentProps> = (props: ComponentProps) => {
21
- const [isHovering, setIsHovering] = useState<boolean>(false);
18
+ type CategoryColorScheme = {
19
+ bg: string;
20
+ border: string;
21
+ headerBg: string;
22
+ headerText: string;
23
+ iconColor: string;
24
+ selectedBorder: string;
25
+ selectedShadow: string;
26
+ handleBg: string;
27
+ handleBorder: string;
28
+ };
22
29
 
23
- let textColor: string = "#6b7280";
24
- let descriptionColor: string = "#6b7280";
30
+ const getCategoryColors: (
31
+ category: string,
32
+ componentType: ComponentType,
33
+ ) => CategoryColorScheme = (
34
+ category: string,
35
+ componentType: ComponentType,
36
+ ): CategoryColorScheme => {
37
+ if (componentType === ComponentType.Trigger) {
38
+ return {
39
+ bg: "#fefce8",
40
+ border: "#fde68a",
41
+ headerBg: "linear-gradient(135deg, #f59e0b, #d97706)",
42
+ headerText: "#ffffff",
43
+ iconColor: "#ffffff",
44
+ selectedBorder: "#f59e0b",
45
+ selectedShadow: "0 0 0 3px rgba(245, 158, 11, 0.2)",
46
+ handleBg: "#f59e0b",
47
+ handleBorder: "#d97706",
48
+ };
49
+ }
25
50
 
26
- if (isHovering) {
27
- textColor = "#111827";
28
- descriptionColor = "#111827";
51
+ const lowerCategory: string = category.toLowerCase();
52
+
53
+ if (lowerCategory.includes("condition") || lowerCategory.includes("logic")) {
54
+ return {
55
+ bg: "#faf5ff",
56
+ border: "#e9d5ff",
57
+ headerBg: "linear-gradient(135deg, #a855f7, #7c3aed)",
58
+ headerText: "#ffffff",
59
+ iconColor: "#ffffff",
60
+ selectedBorder: "#a855f7",
61
+ selectedShadow: "0 0 0 3px rgba(168, 85, 247, 0.2)",
62
+ handleBg: "#a855f7",
63
+ handleBorder: "#7c3aed",
64
+ };
29
65
  }
30
66
 
31
- let componentStyle: React.CSSProperties = {
32
- width: "15rem",
33
- height: "10rem",
34
- padding: "1rem",
35
- borderColor: props.selected ? "#6366f1" : textColor,
36
- alignItems: "center",
37
- borderRadius: "0.25rem",
38
- borderWidth: "2px",
39
- backgroundColor: "white",
40
- display: "inline-block",
41
- verticalAlign: "middle",
42
- boxShadow: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",
43
- };
67
+ if (lowerCategory.includes("api") || lowerCategory.includes("webhook")) {
68
+ return {
69
+ bg: "#eff6ff",
70
+ border: "#bfdbfe",
71
+ headerBg: "linear-gradient(135deg, #3b82f6, #2563eb)",
72
+ headerText: "#ffffff",
73
+ iconColor: "#ffffff",
74
+ selectedBorder: "#3b82f6",
75
+ selectedShadow: "0 0 0 3px rgba(59, 130, 246, 0.2)",
76
+ handleBg: "#3b82f6",
77
+ handleBorder: "#2563eb",
78
+ };
79
+ }
44
80
 
45
- let handleStyle: React.CSSProperties = {
46
- background: "#6b7280",
47
- height: "0.75rem",
48
- width: "0.75rem",
49
- };
81
+ if (
82
+ lowerCategory.includes("slack") ||
83
+ lowerCategory.includes("discord") ||
84
+ lowerCategory.includes("teams") ||
85
+ lowerCategory.includes("telegram") ||
86
+ lowerCategory.includes("email") ||
87
+ lowerCategory.includes("notification")
88
+ ) {
89
+ return {
90
+ bg: "#ecfdf5",
91
+ border: "#a7f3d0",
92
+ headerBg: "linear-gradient(135deg, #10b981, #059669)",
93
+ headerText: "#ffffff",
94
+ iconColor: "#ffffff",
95
+ selectedBorder: "#10b981",
96
+ selectedShadow: "0 0 0 3px rgba(16, 185, 129, 0.2)",
97
+ handleBg: "#10b981",
98
+ handleBorder: "#059669",
99
+ };
100
+ }
50
101
 
51
- type GetPortPositionFunction = (
52
- portCount: number,
53
- totalPorts: number,
54
- isLabel: boolean,
55
- ) => React.CSSProperties;
102
+ if (
103
+ lowerCategory.includes("code") ||
104
+ lowerCategory.includes("javascript") ||
105
+ lowerCategory.includes("custom")
106
+ ) {
107
+ return {
108
+ bg: "#fef2f2",
109
+ border: "#fecaca",
110
+ headerBg: "linear-gradient(135deg, #ef4444, #dc2626)",
111
+ headerText: "#ffffff",
112
+ iconColor: "#ffffff",
113
+ selectedBorder: "#ef4444",
114
+ selectedShadow: "0 0 0 3px rgba(239, 68, 68, 0.2)",
115
+ handleBg: "#ef4444",
116
+ handleBorder: "#dc2626",
117
+ };
118
+ }
56
119
 
57
- const getPortPosition: GetPortPositionFunction = (
58
- portCount: number,
59
- totalPorts: number,
60
- isLabel: boolean,
61
- ): React.CSSProperties => {
62
- if (portCount === 1 && totalPorts === 1) {
63
- return isLabel ? { left: 100 } : {};
64
- }
120
+ if (lowerCategory.includes("json") || lowerCategory.includes("util")) {
121
+ return {
122
+ bg: "#f0fdf4",
123
+ border: "#bbf7d0",
124
+ headerBg: "linear-gradient(135deg, #22c55e, #16a34a)",
125
+ headerText: "#ffffff",
126
+ iconColor: "#ffffff",
127
+ selectedBorder: "#22c55e",
128
+ selectedShadow: "0 0 0 3px rgba(34, 197, 94, 0.2)",
129
+ handleBg: "#22c55e",
130
+ handleBorder: "#16a34a",
131
+ };
132
+ }
65
133
 
66
- if (portCount === 1 && totalPorts === 2) {
67
- return { left: isLabel ? 70 : 80 };
68
- }
134
+ if (
135
+ lowerCategory.includes("schedule") ||
136
+ lowerCategory.includes("cron") ||
137
+ lowerCategory.includes("timer")
138
+ ) {
139
+ return {
140
+ bg: "#fff7ed",
141
+ border: "#fed7aa",
142
+ headerBg: "linear-gradient(135deg, #f97316, #ea580c)",
143
+ headerText: "#ffffff",
144
+ iconColor: "#ffffff",
145
+ selectedBorder: "#f97316",
146
+ selectedShadow: "0 0 0 3px rgba(249, 115, 22, 0.2)",
147
+ handleBg: "#f97316",
148
+ handleBorder: "#ea580c",
149
+ };
150
+ }
69
151
 
70
- if (portCount === 2 && totalPorts === 2) {
71
- return { left: isLabel ? 150 : 160 };
72
- }
152
+ // Default / database models
153
+ return {
154
+ bg: "#f8fafc",
155
+ border: "#e2e8f0",
156
+ headerBg: "linear-gradient(135deg, #6366f1, #4f46e5)",
157
+ headerText: "#ffffff",
158
+ iconColor: "#ffffff",
159
+ selectedBorder: "#6366f1",
160
+ selectedShadow: "0 0 0 3px rgba(99, 102, 241, 0.2)",
161
+ handleBg: "#6366f1",
162
+ handleBorder: "#4f46e5",
163
+ };
164
+ };
73
165
 
74
- if (portCount === 1 && totalPorts === 3) {
75
- return { left: isLabel ? 70 : 80 };
76
- }
166
+ type GetPortPositionFunction = (
167
+ portCount: number,
168
+ totalPorts: number,
169
+ isLabel: boolean,
170
+ ) => React.CSSProperties;
77
171
 
78
- if (portCount === 2 && totalPorts === 3) {
79
- return isLabel ? { left: 100 } : {};
80
- }
172
+ const getPortPosition: GetPortPositionFunction = (
173
+ portCount: number,
174
+ totalPorts: number,
175
+ isLabel: boolean,
176
+ ): React.CSSProperties => {
177
+ if (portCount === 1 && totalPorts === 1) {
178
+ return isLabel ? { left: 120 } : {};
179
+ }
81
180
 
82
- if (portCount === 3 && totalPorts === 3) {
83
- return { left: isLabel ? 150 : 160 };
84
- }
181
+ if (portCount === 1 && totalPorts === 2) {
182
+ return { left: isLabel ? 70 : 80 };
183
+ }
85
184
 
86
- // default
87
- return {};
88
- };
185
+ if (portCount === 2 && totalPorts === 2) {
186
+ return { left: isLabel ? 170 : 180 };
187
+ }
89
188
 
90
- if (props.data.nodeType === NodeType.PlaceholderNode) {
91
- handleStyle = {
92
- background: "#cbd5e1",
93
- height: "0.75rem",
94
- width: "0.75rem",
95
- };
189
+ if (portCount === 1 && totalPorts === 3) {
190
+ return { left: isLabel ? 40 : 50 };
191
+ }
96
192
 
97
- componentStyle = {
98
- borderStyle: "dashed",
99
- width: "15rem",
100
- height: "8rem",
101
- padding: "1rem",
102
- display: "inline-block",
103
- alignItems: "center",
104
- verticalAlign: "middle",
105
- borderColor: isHovering ? "#94a3b8" : "#cbd5e1",
106
- borderRadius: "0.25rem",
107
- borderWidth: "2px",
108
- backgroundColor: "white",
109
- };
193
+ if (portCount === 2 && totalPorts === 3) {
194
+ return isLabel ? { left: 120 } : {};
195
+ }
196
+
197
+ if (portCount === 3 && totalPorts === 3) {
198
+ return { left: isLabel ? 200 : 210 };
199
+ }
110
200
 
111
- textColor = "#cbd5e1";
112
- descriptionColor = "#cbd5e1";
201
+ return {};
202
+ };
113
203
 
114
- if (isHovering) {
115
- textColor = "#94a3b8";
116
- descriptionColor = "#94a3b8";
117
- }
204
+ const Node: FunctionComponent<ComponentProps> = (props: ComponentProps) => {
205
+ const [isHovering, setIsHovering] = useState<boolean>(false);
206
+
207
+ const colors: CategoryColorScheme = getCategoryColors(
208
+ props.data.metadata.category || "",
209
+ props.data.metadata.componentType,
210
+ );
211
+
212
+ // Placeholder node
213
+ if (props.data.nodeType === NodeType.PlaceholderNode) {
214
+ return (
215
+ <div
216
+ className="cursor-pointer"
217
+ onMouseOver={() => {
218
+ setIsHovering(true);
219
+ }}
220
+ onMouseOut={() => {
221
+ setIsHovering(false);
222
+ }}
223
+ style={{
224
+ width: "16rem",
225
+ borderRadius: "12px",
226
+ border: `2px dashed ${isHovering ? "#94a3b8" : "#cbd5e1"}`,
227
+ backgroundColor: isHovering ? "#f8fafc" : "#ffffff",
228
+ padding: "1.5rem",
229
+ display: "flex",
230
+ flexDirection: "column",
231
+ alignItems: "center",
232
+ justifyContent: "center",
233
+ gap: "0.75rem",
234
+ transition: "all 0.2s ease",
235
+ minHeight: "7rem",
236
+ }}
237
+ onClick={() => {
238
+ if (props.data.onClick) {
239
+ props.data.onClick(props.data);
240
+ }
241
+ }}
242
+ >
243
+ <div
244
+ style={{
245
+ width: "2.5rem",
246
+ height: "2.5rem",
247
+ borderRadius: "50%",
248
+ backgroundColor: isHovering ? "#e2e8f0" : "#f1f5f9",
249
+ display: "flex",
250
+ alignItems: "center",
251
+ justifyContent: "center",
252
+ transition: "all 0.2s ease",
253
+ }}
254
+ >
255
+ <Icon
256
+ icon={IconProp.Add}
257
+ style={{
258
+ color: isHovering ? "#64748b" : "#94a3b8",
259
+ width: "1.25rem",
260
+ height: "1.25rem",
261
+ transition: "all 0.2s ease",
262
+ }}
263
+ />
264
+ </div>
265
+ <p
266
+ style={{
267
+ color: isHovering ? "#64748b" : "#94a3b8",
268
+ fontSize: "0.8125rem",
269
+ fontWeight: 500,
270
+ textAlign: "center",
271
+ margin: 0,
272
+ transition: "all 0.2s ease",
273
+ }}
274
+ >
275
+ {props.data.metadata.description || "Click to add trigger"}
276
+ </p>
277
+ </div>
278
+ );
118
279
  }
119
280
 
281
+ // Regular node
282
+ const hasError: boolean = Boolean(props.data.error);
283
+
120
284
  return (
121
285
  <div
122
286
  className="cursor-pointer"
@@ -127,8 +291,27 @@ const Node: FunctionComponent<ComponentProps> = (props: ComponentProps) => {
127
291
  setIsHovering(false);
128
292
  }}
129
293
  style={{
130
- ...componentStyle,
131
- height: props.data.id ? "12rem" : "10rem",
294
+ width: "16rem",
295
+ borderRadius: "12px",
296
+ border: `2px solid ${
297
+ hasError
298
+ ? "#fca5a5"
299
+ : props.selected
300
+ ? colors.selectedBorder
301
+ : isHovering
302
+ ? colors.selectedBorder
303
+ : colors.border
304
+ }`,
305
+ backgroundColor: "#ffffff",
306
+ overflow: "visible",
307
+ boxShadow: props.selected
308
+ ? colors.selectedShadow
309
+ : isHovering
310
+ ? `0 8px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 10px -6px rgba(0, 0, 0, 0.05)`
311
+ : `0 1px 3px 0 rgba(0, 0, 0, 0.07), 0 1px 2px -1px rgba(0, 0, 0, 0.05)`,
312
+ transition: "all 0.2s ease",
313
+ transform: isHovering ? "translateY(-1px)" : "none",
314
+ position: "relative",
132
315
  }}
133
316
  onClick={() => {
134
317
  if (props.data.onClick) {
@@ -136,42 +319,7 @@ const Node: FunctionComponent<ComponentProps> = (props: ComponentProps) => {
136
319
  }
137
320
  }}
138
321
  >
139
- <div className="flex justify-center">
140
- {props.data.metadata.componentType === ComponentType.Trigger &&
141
- props.data.nodeType !== NodeType.PlaceholderNode &&
142
- !props.data.isPreview && <Pill text="Trigger" color={Green} />}
143
- </div>
144
- {!props.data.isPreview &&
145
- props.data.error &&
146
- props.data.nodeType !== NodeType.PlaceholderNode && (
147
- <div
148
- style={{
149
- width: "20px",
150
- height: "20px",
151
- borderRadius: "100px",
152
- color: "#ef4444",
153
- position: "absolute",
154
- top: "0px",
155
- left: "220px",
156
- cursor: "pointer",
157
- }}
158
- onClick={() => {}}
159
- >
160
- <Icon
161
- icon={IconProp.Alert}
162
- style={{
163
- color: "#ef4444",
164
- width: "1rem",
165
- height: "1rem",
166
- textAlign: "center",
167
- margin: "auto",
168
- marginTop: "2px",
169
- }}
170
- thick={ThickProp.Thick}
171
- />
172
- </div>
173
- )}
174
-
322
+ {/* In Ports (top handles) */}
175
323
  {!props.data.isPreview &&
176
324
  props.data.metadata.componentType !== ComponentType.Trigger && (
177
325
  <div>
@@ -187,7 +335,12 @@ const Node: FunctionComponent<ComponentProps> = (props: ComponentProps) => {
187
335
  isConnectable={true}
188
336
  position={Position.Top}
189
337
  style={{
190
- ...handleStyle,
338
+ background: colors.handleBg,
339
+ height: "10px",
340
+ width: "10px",
341
+ border: `2px solid ${colors.handleBorder}`,
342
+ top: "-5px",
343
+ transition: "all 0.15s ease",
191
344
  ...getPortPosition(
192
345
  i + 1,
193
346
  props.data.metadata.inPorts.length,
@@ -200,117 +353,205 @@ const Node: FunctionComponent<ComponentProps> = (props: ComponentProps) => {
200
353
  </div>
201
354
  )}
202
355
 
356
+ {/* Error indicator */}
357
+ {!props.data.isPreview && hasError && (
358
+ <div
359
+ style={{
360
+ position: "absolute",
361
+ top: "8px",
362
+ right: "8px",
363
+ zIndex: 10,
364
+ width: "22px",
365
+ height: "22px",
366
+ borderRadius: "50%",
367
+ backgroundColor: "#fef2f2",
368
+ display: "flex",
369
+ alignItems: "center",
370
+ justifyContent: "center",
371
+ border: "1px solid #fecaca",
372
+ }}
373
+ >
374
+ <Icon
375
+ icon={IconProp.Alert}
376
+ style={{
377
+ color: "#ef4444",
378
+ width: "0.75rem",
379
+ height: "0.75rem",
380
+ }}
381
+ thick={ThickProp.Thick}
382
+ />
383
+ </div>
384
+ )}
385
+
386
+ {/* Header bar with gradient */}
203
387
  <div
204
388
  style={{
205
- width: "100%",
389
+ background: colors.headerBg,
390
+ padding: "0.625rem 0.875rem",
206
391
  display: "flex",
207
- justifyContent: "center",
392
+ alignItems: "center",
393
+ gap: "0.5rem",
394
+ borderRadius: "10px 10px 0 0",
208
395
  }}
209
396
  >
210
- <div
211
- style={{
212
- margin: "auto",
213
- marginTop: props.data.metadata.iconProp ? "0.5rem" : "1rem",
214
- }}
215
- >
216
- {props.data.metadata.iconProp && (
397
+ {props.data.metadata.iconProp && (
398
+ <div
399
+ style={{
400
+ width: "1.75rem",
401
+ height: "1.75rem",
402
+ borderRadius: "6px",
403
+ backgroundColor: "rgba(255, 255, 255, 0.2)",
404
+ display: "flex",
405
+ alignItems: "center",
406
+ justifyContent: "center",
407
+ flexShrink: 0,
408
+ }}
409
+ >
217
410
  <Icon
218
411
  icon={props.data.metadata.iconProp}
219
412
  style={{
220
- color: textColor,
221
- width: "1.5rem",
222
- height: "1.5rem",
223
- textAlign: "center",
224
- margin: "auto",
413
+ color: colors.iconColor,
414
+ width: "0.875rem",
415
+ height: "0.875rem",
225
416
  }}
226
417
  />
227
- )}
228
- <p
418
+ </div>
419
+ )}
420
+ <span
421
+ style={{
422
+ color: colors.headerText,
423
+ fontSize: "0.8125rem",
424
+ fontWeight: 600,
425
+ letterSpacing: "0.01em",
426
+ overflow: "hidden",
427
+ textOverflow: "ellipsis",
428
+ whiteSpace: "nowrap",
429
+ }}
430
+ >
431
+ {props.data.metadata.title}
432
+ </span>
433
+ </div>
434
+
435
+ {/* Body */}
436
+ <div
437
+ style={{
438
+ padding: "0.75rem 0.875rem",
439
+ backgroundColor: colors.bg,
440
+ minHeight: "3rem",
441
+ borderRadius:
442
+ !props.data.metadata.outPorts ||
443
+ props.data.metadata.outPorts.length === 0
444
+ ? "0 0 10px 10px"
445
+ : undefined,
446
+ }}
447
+ >
448
+ {/* Component ID badge */}
449
+ {!props.data.isPreview && props.data.id && (
450
+ <div
229
451
  style={{
230
- color: textColor,
231
- fontSize: "0.875rem",
232
- lineHeight: "1.25rem",
233
- textAlign: "center",
234
- marginTop: "6px",
452
+ display: "inline-flex",
453
+ alignItems: "center",
454
+ backgroundColor: "#ffffff",
455
+ border: "1px solid #e2e8f0",
456
+ borderRadius: "6px",
457
+ padding: "0.125rem 0.5rem",
458
+ marginBottom: "0.5rem",
235
459
  }}
236
460
  >
237
- {props.data.metadata.title}
238
- </p>
239
- {!props.data.isPreview && props.data.id && (
240
- <p
461
+ <span
241
462
  style={{
242
- color: descriptionColor,
243
- fontSize: "0.875rem",
244
- textAlign: "center",
463
+ color: "#64748b",
464
+ fontSize: "0.6875rem",
465
+ fontWeight: 500,
466
+ fontFamily:
467
+ 'ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace',
245
468
  }}
246
469
  >
247
- ({props.data.id.trim()})
248
- </p>
249
- )}
250
- <p
251
- style={{
252
- color: descriptionColor,
253
- fontSize: "0.775rem",
254
- lineHeight: "1.0rem",
255
- textAlign: "center",
256
- marginTop: "6px",
257
- }}
258
- >
259
- {props.data.metadata.description}
260
- </p>
261
- </div>
470
+ {props.data.id.trim()}
471
+ </span>
472
+ </div>
473
+ )}
474
+
475
+ {/* Description */}
476
+ <p
477
+ style={{
478
+ color: "#64748b",
479
+ fontSize: "0.75rem",
480
+ lineHeight: "1.125rem",
481
+ margin: 0,
482
+ display: "-webkit-box",
483
+ WebkitLineClamp: 2,
484
+ WebkitBoxOrient: "vertical",
485
+ overflow: "hidden",
486
+ }}
487
+ >
488
+ {props.data.metadata.description}
489
+ </p>
262
490
  </div>
263
491
 
492
+ {/* Out ports section */}
264
493
  {!props.data.isPreview &&
265
- props.data.nodeType !== NodeType.PlaceholderNode && (
494
+ props.data.metadata.outPorts &&
495
+ props.data.metadata.outPorts.length > 0 && (
266
496
  <>
267
- <div>
268
- {props.data.metadata.outPorts &&
269
- props.data.metadata.outPorts.length > 0 &&
270
- props.data.metadata.outPorts.map((port: Port, i: number) => {
271
- return (
272
- <Handle
273
- key={i}
274
- type="source"
275
- id={port.id}
276
- onConnect={(_params: Connection) => {}}
277
- isConnectable={true}
278
- position={Position.Bottom}
497
+ {/* Port labels */}
498
+ <div
499
+ style={{
500
+ borderTop: `1px solid ${colors.border}`,
501
+ padding: "0.375rem 0.875rem",
502
+ display: "flex",
503
+ justifyContent:
504
+ props.data.metadata.outPorts.length === 1
505
+ ? "center"
506
+ : "space-between",
507
+ backgroundColor: "#ffffff",
508
+ borderRadius: "0 0 10px 10px",
509
+ }}
510
+ >
511
+ {props.data.metadata.outPorts.map((port: Port, i: number) => {
512
+ return (
513
+ <Tooltip key={i} text={port.description || ""}>
514
+ <span
279
515
  style={{
280
- ...handleStyle,
281
- ...getPortPosition(
282
- i + 1,
283
- props.data.metadata.outPorts.length,
284
- false,
285
- ),
516
+ color: "#94a3b8",
517
+ fontSize: "0.6875rem",
518
+ fontWeight: 500,
286
519
  }}
287
- />
288
- );
289
- })}
520
+ >
521
+ {port.title}
522
+ </span>
523
+ </Tooltip>
524
+ );
525
+ })}
290
526
  </div>
527
+
528
+ {/* Bottom handles */}
291
529
  <div>
292
- {props.data.metadata.outPorts &&
293
- props.data.metadata.outPorts.length > 0 &&
294
- props.data.metadata.outPorts.map((port: Port, i: number) => {
295
- return (
296
- <Tooltip key={i} text={port.description || ""}>
297
- <div
298
- key={i}
299
- className="text-sm text-gray-400 absolute"
300
- style={{
301
- bottom: "10px",
302
- ...getPortPosition(
303
- i + 1,
304
- props.data.metadata.outPorts.length,
305
- true,
306
- ),
307
- }}
308
- >
309
- {port.title}
310
- </div>
311
- </Tooltip>
312
- );
313
- })}
530
+ {props.data.metadata.outPorts.map((port: Port, i: number) => {
531
+ return (
532
+ <Handle
533
+ key={i}
534
+ type="source"
535
+ id={port.id}
536
+ onConnect={(_params: Connection) => {}}
537
+ isConnectable={true}
538
+ position={Position.Bottom}
539
+ style={{
540
+ background: colors.handleBg,
541
+ height: "10px",
542
+ width: "10px",
543
+ border: `2px solid ${colors.handleBorder}`,
544
+ bottom: "-5px",
545
+ transition: "all 0.15s ease",
546
+ ...getPortPosition(
547
+ i + 1,
548
+ props.data.metadata.outPorts.length,
549
+ false,
550
+ ),
551
+ }}
552
+ />
553
+ );
554
+ })}
314
555
  </div>
315
556
  </>
316
557
  )}