orcheo-canvas 0.0.1
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/CHANGELOG.md +26 -0
- package/README.md +32 -0
- package/components.json +21 -0
- package/dist/assets/index-C8cjvUcR.js +772 -0
- package/dist/assets/index-D_Md8dhB.css +1 -0
- package/dist/favicon.drawio +83 -0
- package/dist/favicon.png +0 -0
- package/dist/favicon.svg +4 -0
- package/dist/index.html +19 -0
- package/eslint.config.js +28 -0
- package/index.html +18 -0
- package/package.json +165 -0
- package/postcss.config.js +6 -0
- package/public/favicon.drawio +83 -0
- package/public/favicon.png +0 -0
- package/public/favicon.svg +4 -0
- package/src/App.test.tsx +10 -0
- package/src/App.tsx +43 -0
- package/src/assets/react.svg +1 -0
- package/src/design-system/ui/accordion.tsx +57 -0
- package/src/design-system/ui/alert-dialog.tsx +141 -0
- package/src/design-system/ui/alert.tsx +59 -0
- package/src/design-system/ui/aspect-ratio.tsx +7 -0
- package/src/design-system/ui/avatar.tsx +50 -0
- package/src/design-system/ui/badge.tsx +37 -0
- package/src/design-system/ui/breadcrumb.tsx +115 -0
- package/src/design-system/ui/button.tsx +58 -0
- package/src/design-system/ui/calendar.tsx +76 -0
- package/src/design-system/ui/card.tsx +83 -0
- package/src/design-system/ui/carousel/carousel-context.ts +17 -0
- package/src/design-system/ui/carousel/carousel-navigation.tsx +65 -0
- package/src/design-system/ui/carousel/carousel-provider.tsx +18 -0
- package/src/design-system/ui/carousel/carousel-root.tsx +119 -0
- package/src/design-system/ui/carousel/carousel-slides.tsx +49 -0
- package/src/design-system/ui/carousel/types.ts +24 -0
- package/src/design-system/ui/carousel.tsx +6 -0
- package/src/design-system/ui/chart-context-shared.ts +27 -0
- package/src/design-system/ui/chart-context.tsx +81 -0
- package/src/design-system/ui/chart-legend.tsx +68 -0
- package/src/design-system/ui/chart-tooltip.tsx +164 -0
- package/src/design-system/ui/chart-utils.ts +39 -0
- package/src/design-system/ui/chart.tsx +3 -0
- package/src/design-system/ui/checkbox.tsx +30 -0
- package/src/design-system/ui/collapsible.tsx +11 -0
- package/src/design-system/ui/command.tsx +153 -0
- package/src/design-system/ui/context-menu.tsx +200 -0
- package/src/design-system/ui/dialog.tsx +122 -0
- package/src/design-system/ui/drawer.tsx +118 -0
- package/src/design-system/ui/dropdown-menu.tsx +201 -0
- package/src/design-system/ui/form.tsx +180 -0
- package/src/design-system/ui/hover-card.tsx +29 -0
- package/src/design-system/ui/input-otp.tsx +71 -0
- package/src/design-system/ui/input.tsx +22 -0
- package/src/design-system/ui/label.tsx +26 -0
- package/src/design-system/ui/menubar-content.tsx +85 -0
- package/src/design-system/ui/menubar-items.tsx +123 -0
- package/src/design-system/ui/menubar-root.tsx +60 -0
- package/src/design-system/ui/menubar.tsx +26 -0
- package/src/design-system/ui/navigation-menu.tsx +129 -0
- package/src/design-system/ui/pagination.tsx +117 -0
- package/src/design-system/ui/popover.tsx +33 -0
- package/src/design-system/ui/progress.tsx +28 -0
- package/src/design-system/ui/radio-group.tsx +44 -0
- package/src/design-system/ui/resizable.tsx +45 -0
- package/src/design-system/ui/scroll-area.tsx +48 -0
- package/src/design-system/ui/select.tsx +159 -0
- package/src/design-system/ui/separator.tsx +31 -0
- package/src/design-system/ui/sheet.tsx +140 -0
- package/src/design-system/ui/sidebar/constants.ts +6 -0
- package/src/design-system/ui/sidebar/sidebar-context.ts +15 -0
- package/src/design-system/ui/sidebar/sidebar-layout.tsx +216 -0
- package/src/design-system/ui/sidebar/sidebar-menu/index.ts +11 -0
- package/src/design-system/ui/sidebar/sidebar-menu/menu-action.tsx +35 -0
- package/src/design-system/ui/sidebar/sidebar-menu/menu-badge.tsx +28 -0
- package/src/design-system/ui/sidebar/sidebar-menu/menu-button-variants.ts +25 -0
- package/src/design-system/ui/sidebar/sidebar-menu/menu-button.tsx +73 -0
- package/src/design-system/ui/sidebar/sidebar-menu/menu-skeleton.tsx +45 -0
- package/src/design-system/ui/sidebar/sidebar-menu/menu-sub.tsx +61 -0
- package/src/design-system/ui/sidebar/sidebar-menu/menu.tsx +33 -0
- package/src/design-system/ui/sidebar/sidebar-provider.tsx +132 -0
- package/src/design-system/ui/sidebar/sidebar-structure.tsx +152 -0
- package/src/design-system/ui/sidebar/use-sidebar.ts +14 -0
- package/src/design-system/ui/sidebar.ts +35 -0
- package/src/design-system/ui/skeleton.tsx +15 -0
- package/src/design-system/ui/slider.tsx +28 -0
- package/src/design-system/ui/sonner.tsx +31 -0
- package/src/design-system/ui/switch.tsx +29 -0
- package/src/design-system/ui/table.tsx +120 -0
- package/src/design-system/ui/tabs.tsx +55 -0
- package/src/design-system/ui/textarea.tsx +22 -0
- package/src/design-system/ui/toast.tsx +129 -0
- package/src/design-system/ui/toaster.tsx +35 -0
- package/src/design-system/ui/toggle-group.tsx +61 -0
- package/src/design-system/ui/toggle.tsx +46 -0
- package/src/design-system/ui/tooltip.tsx +32 -0
- package/src/features/account/components/settings/appearance-settings-tab.tsx +70 -0
- package/src/features/account/components/settings/application-settings-tab.tsx +146 -0
- package/src/features/account/components/settings/notification-settings-tab.tsx +157 -0
- package/src/features/account/components/settings/team-billing-settings-tab.tsx +164 -0
- package/src/features/account/components/theme-settings.tsx +228 -0
- package/src/features/account/components/use-theme-preferences.ts +111 -0
- package/src/features/account/pages/profile/components/profile-api-keys-tab.tsx +59 -0
- package/src/features/account/pages/profile/components/profile-general-tab.tsx +125 -0
- package/src/features/account/pages/profile/components/profile-security-tab.tsx +114 -0
- package/src/features/account/pages/profile/types.ts +8 -0
- package/src/features/account/pages/profile.tsx +64 -0
- package/src/features/account/pages/settings.tsx +58 -0
- package/src/features/auth/components/auth-logos.tsx +61 -0
- package/src/features/auth/components/auth-page.tsx +213 -0
- package/src/features/auth/pages/login.tsx +5 -0
- package/src/features/auth/pages/signup.tsx +5 -0
- package/src/features/chatkit/components/canvas-chat-bubble.tsx +324 -0
- package/src/features/chatkit/components/chatkit-surface.tsx +18 -0
- package/src/features/chatkit/components/public-chat-error-boundary.tsx +74 -0
- package/src/features/chatkit/components/public-chat-widget.tsx +138 -0
- package/src/features/chatkit/lib/chatkit-client.test.ts +98 -0
- package/src/features/chatkit/lib/chatkit-client.ts +175 -0
- package/src/features/chatkit/lib/chatkit-theme.ts +20 -0
- package/src/features/chatkit/lib/telemetry.ts +29 -0
- package/src/features/chatkit/lib/workflow-session.ts +69 -0
- package/src/features/chatkit/pages/public-chat.tsx +391 -0
- package/src/features/shared/components/chat-input/attachment-preview.tsx +78 -0
- package/src/features/shared/components/chat-input/chat-input-types.ts +13 -0
- package/src/features/shared/components/chat-input/emoji-picker.tsx +106 -0
- package/src/features/shared/components/chat-input.tsx +234 -0
- package/src/features/shared/components/chat-interface-options.ts +305 -0
- package/src/features/shared/components/chat-interface.tsx +162 -0
- package/src/features/shared/components/chat-interface.types.ts +36 -0
- package/src/features/shared/components/chat-message-attachments.tsx +122 -0
- package/src/features/shared/components/chat-message-markdown.ts +33 -0
- package/src/features/shared/components/chat-message.tsx +128 -0
- package/src/features/shared/components/top-navigation/account-menu.tsx +101 -0
- package/src/features/shared/components/top-navigation/command-palette-button.tsx +78 -0
- package/src/features/shared/components/top-navigation/project-switcher.tsx +64 -0
- package/src/features/shared/components/top-navigation/top-navigation-types.ts +16 -0
- package/src/features/shared/components/top-navigation/use-window-width.ts +24 -0
- package/src/features/shared/components/top-navigation/workflow-breadcrumbs.tsx +107 -0
- package/src/features/shared/components/top-navigation.tsx +52 -0
- package/src/features/support/components/support-chat-callout.tsx +40 -0
- package/src/features/support/components/support-header.tsx +53 -0
- package/src/features/support/components/support-help-tabs.tsx +172 -0
- package/src/features/support/components/support-resources.tsx +157 -0
- package/src/features/support/pages/help-support.tsx +72 -0
- package/src/features/workflow/components/canvas/annotations-layer/annotation-composer.tsx +109 -0
- package/src/features/workflow/components/canvas/annotations-layer/annotation-item.tsx +141 -0
- package/src/features/workflow/components/canvas/annotations-layer/annotation-list.tsx +30 -0
- package/src/features/workflow/components/canvas/annotations-layer/types.ts +10 -0
- package/src/features/workflow/components/canvas/annotations-layer.tsx +99 -0
- package/src/features/workflow/components/canvas/breakpoints-layer.tsx +148 -0
- package/src/features/workflow/components/canvas/connection-validator.tsx +230 -0
- package/src/features/workflow/components/canvas/custom-edge.tsx +154 -0
- package/src/features/workflow/components/canvas/edge-hover-context.tsx +11 -0
- package/src/features/workflow/components/canvas/mini-map.tsx +111 -0
- package/src/features/workflow/components/canvas/split-pane.tsx +165 -0
- package/src/features/workflow/components/canvas/time-travel-debugger.tsx +164 -0
- package/src/features/workflow/components/canvas/time-travel-header.tsx +45 -0
- package/src/features/workflow/components/canvas/time-travel-playback-controls.tsx +174 -0
- package/src/features/workflow/components/canvas/time-travel-state-details.tsx +63 -0
- package/src/features/workflow/components/canvas/time-travel-timeline.tsx +80 -0
- package/src/features/workflow/components/canvas/time-travel-types.ts +18 -0
- package/src/features/workflow/components/canvas/workflow-context-menu.tsx +179 -0
- package/src/features/workflow/components/canvas/workflow-controls/action-control-group.tsx +219 -0
- package/src/features/workflow/components/canvas/workflow-controls/history-control-group.tsx +84 -0
- package/src/features/workflow/components/canvas/workflow-controls/types.ts +18 -0
- package/src/features/workflow/components/canvas/workflow-controls.tsx +50 -0
- package/src/features/workflow/components/canvas/workflow-flow.tsx +214 -0
- package/src/features/workflow/components/canvas/workflow-search.tsx +152 -0
- package/src/features/workflow/components/dialogs/add-credential-dialog.tsx +233 -0
- package/src/features/workflow/components/dialogs/add-notification-channel-dialog.tsx +230 -0
- package/src/features/workflow/components/dialogs/command-palette-items.tsx +77 -0
- package/src/features/workflow/components/dialogs/command-palette-types.ts +13 -0
- package/src/features/workflow/components/dialogs/command-palette-utils.ts +44 -0
- package/src/features/workflow/components/dialogs/command-palette.tsx +195 -0
- package/src/features/workflow/components/dialogs/credential-access-badge.tsx +44 -0
- package/src/features/workflow/components/dialogs/credential-status-badge.tsx +45 -0
- package/src/features/workflow/components/dialogs/credentials-table.tsx +234 -0
- package/src/features/workflow/components/dialogs/credentials-vault.tsx +63 -0
- package/src/features/workflow/components/dialogs/notification-channel-card.tsx +106 -0
- package/src/features/workflow/components/dialogs/notification-event-toggles.tsx +95 -0
- package/src/features/workflow/components/dialogs/notification-settings.tsx +108 -0
- package/src/features/workflow/components/dialogs/notification-settings.types.ts +34 -0
- package/src/features/workflow/components/dialogs/use-command-palette-navigation.ts +60 -0
- package/src/features/workflow/components/dialogs/user-role-management/invite-user-dialog.tsx +152 -0
- package/src/features/workflow/components/dialogs/user-role-management/role-badges.tsx +83 -0
- package/src/features/workflow/components/dialogs/user-role-management/user-role-table.tsx +188 -0
- package/src/features/workflow/components/dialogs/user-role-management/user-role-types.ts +20 -0
- package/src/features/workflow/components/dialogs/user-role-management.tsx +61 -0
- package/src/features/workflow/components/dialogs/version-control-dialog.tsx +232 -0
- package/src/features/workflow/components/layouts/sidebar-layout.tsx +208 -0
- package/src/features/workflow/components/layouts/use-sidebar-resize.ts +83 -0
- package/src/features/workflow/components/layouts/workflow-page-layout.tsx +69 -0
- package/src/features/workflow/components/nodes/chat-trigger-node.tsx +106 -0
- package/src/features/workflow/components/nodes/group-node.tsx +195 -0
- package/src/features/workflow/components/nodes/node-label.tsx +105 -0
- package/src/features/workflow/components/nodes/start-end-node.tsx +68 -0
- package/src/features/workflow/components/nodes/sticky-note-node.tsx +246 -0
- package/src/features/workflow/components/nodes/workflow-node-controls.tsx +91 -0
- package/src/features/workflow/components/nodes/workflow-node-handle-config.ts +22 -0
- package/src/features/workflow/components/nodes/workflow-node-handles.tsx +79 -0
- package/src/features/workflow/components/nodes/workflow-node-style.tsx +50 -0
- package/src/features/workflow/components/nodes/workflow-node.tsx +147 -0
- package/src/features/workflow/components/nodes/workflow-node.types.ts +32 -0
- package/src/features/workflow/components/panels/node-inspector/config-panel.tsx +130 -0
- package/src/features/workflow/components/panels/node-inspector/index.tsx +225 -0
- package/src/features/workflow/components/panels/node-inspector/input-panel.tsx +199 -0
- package/src/features/workflow/components/panels/node-inspector/live-data-unavailable.tsx +26 -0
- package/src/features/workflow/components/panels/node-inspector/node-inspector-layout.tsx +251 -0
- package/src/features/workflow/components/panels/node-inspector/output-panel.tsx +165 -0
- package/src/features/workflow/components/panels/node-inspector/schema-fields.ts +39 -0
- package/src/features/workflow/components/panels/node-inspector/types.ts +31 -0
- package/src/features/workflow/components/panels/node-inspector/use-node-tester.ts +209 -0
- package/src/features/workflow/components/panels/node-inspector/utils.ts +82 -0
- package/src/features/workflow/components/panels/rjsf-basic-widgets.tsx +21 -0
- package/src/features/workflow/components/panels/rjsf-condition-widgets.tsx +241 -0
- package/src/features/workflow/components/panels/rjsf-input-widgets.tsx +105 -0
- package/src/features/workflow/components/panels/rjsf-templates.tsx +146 -0
- package/src/features/workflow/components/panels/rjsf-text-widgets.tsx +139 -0
- package/src/features/workflow/components/panels/rjsf-theme.tsx +16 -0
- package/src/features/workflow/components/panels/schema-dnd.ts +79 -0
- package/src/features/workflow/components/panels/sidebar-node-item.tsx +42 -0
- package/src/features/workflow/components/panels/sidebar-nodes/actions.tsx +34 -0
- package/src/features/workflow/components/panels/sidebar-nodes/ai.tsx +40 -0
- package/src/features/workflow/components/panels/sidebar-nodes/data.tsx +53 -0
- package/src/features/workflow/components/panels/sidebar-nodes/index.ts +2 -0
- package/src/features/workflow/components/panels/sidebar-nodes/logic.tsx +127 -0
- package/src/features/workflow/components/panels/sidebar-nodes/node-categories.tsx +19 -0
- package/src/features/workflow/components/panels/sidebar-nodes/node-lists.ts +71 -0
- package/src/features/workflow/components/panels/sidebar-nodes/special.tsx +44 -0
- package/src/features/workflow/components/panels/sidebar-nodes/triggers.tsx +44 -0
- package/src/features/workflow/components/panels/sidebar-nodes/visualization.tsx +33 -0
- package/src/features/workflow/components/panels/sidebar-panel.tsx +243 -0
- package/src/features/workflow/components/panels/sidebar-panel.types.ts +73 -0
- package/src/features/workflow/components/panels/variable-inspector-table.tsx +99 -0
- package/src/features/workflow/components/panels/variable-inspector-tree.tsx +193 -0
- package/src/features/workflow/components/panels/variable-inspector-types.ts +3 -0
- package/src/features/workflow/components/panels/variable-inspector.tsx +189 -0
- package/src/features/workflow/components/panels/workflow-diff-dialog.tsx +207 -0
- package/src/features/workflow/components/panels/workflow-execution-details.tsx +118 -0
- package/src/features/workflow/components/panels/workflow-execution-history.hooks.ts +116 -0
- package/src/features/workflow/components/panels/workflow-execution-history.tsx +150 -0
- package/src/features/workflow/components/panels/workflow-execution-history.types.ts +53 -0
- package/src/features/workflow/components/panels/workflow-execution-history.utils.ts +195 -0
- package/src/features/workflow/components/panels/workflow-execution-sidebar.tsx +221 -0
- package/src/features/workflow/components/panels/workflow-governance-panel/subworkflow-list-card.tsx +147 -0
- package/src/features/workflow/components/panels/workflow-governance-panel/types.ts +26 -0
- package/src/features/workflow/components/panels/workflow-governance-panel/validation-section.tsx +126 -0
- package/src/features/workflow/components/panels/workflow-governance-panel.tsx +43 -0
- package/src/features/workflow/components/panels/workflow-history-filters.tsx +62 -0
- package/src/features/workflow/components/panels/workflow-history-footer.tsx +28 -0
- package/src/features/workflow/components/panels/workflow-history-header.tsx +47 -0
- package/src/features/workflow/components/panels/workflow-history-table.tsx +148 -0
- package/src/features/workflow/components/panels/workflow-history.tsx +150 -0
- package/src/features/workflow/components/panels/workflow-node-gallery-data/categories.ts +11 -0
- package/src/features/workflow/components/panels/workflow-node-gallery-data/items/actions.tsx +39 -0
- package/src/features/workflow/components/panels/workflow-node-gallery-data/items/ai.tsx +39 -0
- package/src/features/workflow/components/panels/workflow-node-gallery-data/items/data.tsx +55 -0
- package/src/features/workflow/components/panels/workflow-node-gallery-data/items/logic.tsx +39 -0
- package/src/features/workflow/components/panels/workflow-node-gallery-data/items/special.tsx +50 -0
- package/src/features/workflow/components/panels/workflow-node-gallery-data/items/triggers.tsx +71 -0
- package/src/features/workflow/components/panels/workflow-node-gallery-data/types.ts +9 -0
- package/src/features/workflow/components/panels/workflow-node-gallery-data.tsx +21 -0
- package/src/features/workflow/components/panels/workflow-node-gallery.tsx +86 -0
- package/src/features/workflow/components/panels/workflow-tabs.tsx +49 -0
- package/src/features/workflow/components/trace/agent-prism/Avatar.tsx +146 -0
- package/src/features/workflow/components/trace/agent-prism/Badge.tsx +95 -0
- package/src/features/workflow/components/trace/agent-prism/BrandLogo.tsx +102 -0
- package/src/features/workflow/components/trace/agent-prism/Button.tsx +124 -0
- package/src/features/workflow/components/trace/agent-prism/CollapseAndExpandControls.tsx +45 -0
- package/src/features/workflow/components/trace/agent-prism/CollapsibleSection.tsx +124 -0
- package/src/features/workflow/components/trace/agent-prism/CopyButton.tsx +63 -0
- package/src/features/workflow/components/trace/agent-prism/DetailsView/DetailsView.tsx +143 -0
- package/src/features/workflow/components/trace/agent-prism/DetailsView/DetailsViewAttributesTab.tsx +125 -0
- package/src/features/workflow/components/trace/agent-prism/DetailsView/DetailsViewContentViewer.tsx +51 -0
- package/src/features/workflow/components/trace/agent-prism/DetailsView/DetailsViewHeader.tsx +100 -0
- package/src/features/workflow/components/trace/agent-prism/DetailsView/DetailsViewHeaderActions.tsx +21 -0
- package/src/features/workflow/components/trace/agent-prism/DetailsView/DetailsViewInputOutputTab.tsx +126 -0
- package/src/features/workflow/components/trace/agent-prism/DetailsView/DetailsViewJsonOutput.tsx +30 -0
- package/src/features/workflow/components/trace/agent-prism/DetailsView/DetailsViewRawDataTab.tsx +31 -0
- package/src/features/workflow/components/trace/agent-prism/IconButton.tsx +75 -0
- package/src/features/workflow/components/trace/agent-prism/PriceBadge.tsx +14 -0
- package/src/features/workflow/components/trace/agent-prism/SearchInput.tsx +17 -0
- package/src/features/workflow/components/trace/agent-prism/SpanBadge.tsx +52 -0
- package/src/features/workflow/components/trace/agent-prism/SpanCard/SpanCard.tsx +480 -0
- package/src/features/workflow/components/trace/agent-prism/SpanCard/SpanCardBadges.tsx +23 -0
- package/src/features/workflow/components/trace/agent-prism/SpanCard/SpanCardConnector.tsx +36 -0
- package/src/features/workflow/components/trace/agent-prism/SpanCard/SpanCardTimeline.tsx +60 -0
- package/src/features/workflow/components/trace/agent-prism/SpanCard/SpanCardToggle.tsx +39 -0
- package/src/features/workflow/components/trace/agent-prism/SpanStatus.tsx +80 -0
- package/src/features/workflow/components/trace/agent-prism/TabSelector.tsx +35 -0
- package/src/features/workflow/components/trace/agent-prism/Tabs.tsx +140 -0
- package/src/features/workflow/components/trace/agent-prism/TextInput.tsx +143 -0
- package/src/features/workflow/components/trace/agent-prism/TimestampBadge.tsx +22 -0
- package/src/features/workflow/components/trace/agent-prism/TokensBadge.tsx +27 -0
- package/src/features/workflow/components/trace/agent-prism/TraceList/TraceList.tsx +87 -0
- package/src/features/workflow/components/trace/agent-prism/TraceList/TraceListItem.tsx +86 -0
- package/src/features/workflow/components/trace/agent-prism/TraceList/TraceListItemHeader.tsx +37 -0
- package/src/features/workflow/components/trace/agent-prism/TraceViewer/TraceViewer.test.tsx +183 -0
- package/src/features/workflow/components/trace/agent-prism/TraceViewer/TraceViewer.tsx +207 -0
- package/src/features/workflow/components/trace/agent-prism/TraceViewer/TraceViewerDesktopLayout.tsx +99 -0
- package/src/features/workflow/components/trace/agent-prism/TraceViewer/TraceViewerMobileLayout.tsx +103 -0
- package/src/features/workflow/components/trace/agent-prism/TraceViewer/TraceViewerPlaceholder.tsx +5 -0
- package/src/features/workflow/components/trace/agent-prism/TraceViewer/TraceViewerSearchAndControls.tsx +30 -0
- package/src/features/workflow/components/trace/agent-prism/TraceViewer/TraceViewerTreeViewContainer.tsx +76 -0
- package/src/features/workflow/components/trace/agent-prism/TraceViewer/useTraceSelection.ts +186 -0
- package/src/features/workflow/components/trace/agent-prism/TreeView.tsx +73 -0
- package/src/features/workflow/components/trace/agent-prism/index.ts +7 -0
- package/src/features/workflow/components/trace/agent-prism/shared.ts +170 -0
- package/src/features/workflow/components/trace/agent-prism/theme/index.js +97 -0
- package/src/features/workflow/components/trace/agent-prism/theme/index.ts +101 -0
- package/src/features/workflow/components/trace/agent-prism/theme/theme.css +247 -0
- package/src/features/workflow/data/node-types.ts +32 -0
- package/src/features/workflow/data/templates/feedly-digest.ts +120 -0
- package/src/features/workflow/data/templates/index.ts +30 -0
- package/src/features/workflow/data/templates/mongodb-session.ts +59 -0
- package/src/features/workflow/data/templates/python-task.ts +59 -0
- package/src/features/workflow/data/templates/quickstart-welcome.ts +65 -0
- package/src/features/workflow/data/templates/rss-monitor.ts +60 -0
- package/src/features/workflow/data/templates/slack-broadcast.ts +58 -0
- package/src/features/workflow/data/templates/telegram-broadcast.ts +76 -0
- package/src/features/workflow/data/templates/template-owner.ts +7 -0
- package/src/features/workflow/data/workflow-data.ts +13 -0
- package/src/features/workflow/data/workflow-types.ts +47 -0
- package/src/features/workflow/lib/graph-config/constants.ts +7 -0
- package/src/features/workflow/lib/graph-config/edge-processing.ts +147 -0
- package/src/features/workflow/lib/graph-config/name-mapping.ts +30 -0
- package/src/features/workflow/lib/graph-config/node-handlers/branching.ts +171 -0
- package/src/features/workflow/lib/graph-config/node-handlers/index.ts +16 -0
- package/src/features/workflow/lib/graph-config/node-handlers/integrations.ts +201 -0
- package/src/features/workflow/lib/graph-config/node-handlers/set-variable.ts +124 -0
- package/src/features/workflow/lib/graph-config/node-processing.ts +163 -0
- package/src/features/workflow/lib/graph-config/serialization.ts +31 -0
- package/src/features/workflow/lib/graph-config/terminal-connections.ts +37 -0
- package/src/features/workflow/lib/graph-config/types.ts +84 -0
- package/src/features/workflow/lib/graph-config/utils.ts +65 -0
- package/src/features/workflow/lib/graph-config/workload.ts +29 -0
- package/src/features/workflow/lib/graph-config.integration.logic.test.ts +168 -0
- package/src/features/workflow/lib/graph-config.integration.start-end.test.ts +68 -0
- package/src/features/workflow/lib/graph-config.integration.variables.test.ts +67 -0
- package/src/features/workflow/lib/graph-config.ts +80 -0
- package/src/features/workflow/lib/graph-utils.ts +193 -0
- package/src/features/workflow/lib/node-icons.tsx +183 -0
- package/src/features/workflow/lib/node-schemas/ai-nodes.ts +81 -0
- package/src/features/workflow/lib/node-schemas/base.ts +154 -0
- package/src/features/workflow/lib/node-schemas/condition-operators.ts +111 -0
- package/src/features/workflow/lib/node-schemas/index.ts +73 -0
- package/src/features/workflow/lib/node-schemas/integration-nodes.ts +153 -0
- package/src/features/workflow/lib/node-schemas/logic-nodes.ts +110 -0
- package/src/features/workflow/lib/node-schemas/state-nodes.ts +45 -0
- package/src/features/workflow/lib/node-schemas/trigger-nodes.ts +218 -0
- package/src/features/workflow/lib/node-schemas/ui.ts +88 -0
- package/src/features/workflow/lib/python-node.ts +23 -0
- package/src/features/workflow/lib/workflow-diff.ts +191 -0
- package/src/features/workflow/lib/workflow-execution-builders.ts +101 -0
- package/src/features/workflow/lib/workflow-execution-formatters.ts +145 -0
- package/src/features/workflow/lib/workflow-execution-storage.ts +60 -0
- package/src/features/workflow/lib/workflow-execution.types.ts +38 -0
- package/src/features/workflow/lib/workflow-storage-api.ts +122 -0
- package/src/features/workflow/lib/workflow-storage-helpers.ts +207 -0
- package/src/features/workflow/lib/workflow-storage-versioning.ts +71 -0
- package/src/features/workflow/lib/workflow-storage.constants.ts +21 -0
- package/src/features/workflow/lib/workflow-storage.list.integration.test.ts +70 -0
- package/src/features/workflow/lib/workflow-storage.sanitized-save.integration.test.ts +116 -0
- package/src/features/workflow/lib/workflow-storage.save.integration.test.ts +124 -0
- package/src/features/workflow/lib/workflow-storage.test-helpers.ts +29 -0
- package/src/features/workflow/lib/workflow-storage.ts +183 -0
- package/src/features/workflow/lib/workflow-storage.types.ts +76 -0
- package/src/features/workflow/pages/workflow-canvas/components/canvas-tab-content.tsx +157 -0
- package/src/features/workflow/pages/workflow-canvas/components/execution-tab-content.tsx +57 -0
- package/src/features/workflow/pages/workflow-canvas/components/readiness-tab-content.tsx +49 -0
- package/src/features/workflow/pages/workflow-canvas/components/settings-tab-content.tsx +160 -0
- package/src/features/workflow/pages/workflow-canvas/components/trace-tab-content.test.tsx +204 -0
- package/src/features/workflow/pages/workflow-canvas/components/trace-tab-content.tsx +202 -0
- package/src/features/workflow/pages/workflow-canvas/components/workflow-canvas-layout.tsx +179 -0
- package/src/features/workflow/pages/workflow-canvas/handlers/credentials.ts +158 -0
- package/src/features/workflow/pages/workflow-canvas/handlers/subworkflows.ts +227 -0
- package/src/features/workflow/pages/workflow-canvas/handlers/validation.ts +175 -0
- package/src/features/workflow/pages/workflow-canvas/helpers/clipboard.ts +85 -0
- package/src/features/workflow/pages/workflow-canvas/helpers/execution.ts +39 -0
- package/src/features/workflow/pages/workflow-canvas/helpers/id.ts +15 -0
- package/src/features/workflow/pages/workflow-canvas/helpers/node-identity.ts +157 -0
- package/src/features/workflow/pages/workflow-canvas/helpers/runtime-cache.ts +70 -0
- package/src/features/workflow/pages/workflow-canvas/helpers/sticky-notes.ts +52 -0
- package/src/features/workflow/pages/workflow-canvas/helpers/subworkflow-library.ts +12 -0
- package/src/features/workflow/pages/workflow-canvas/helpers/subworkflows/content-qa.ts +88 -0
- package/src/features/workflow/pages/workflow-canvas/helpers/subworkflows/customer-onboarding.ts +67 -0
- package/src/features/workflow/pages/workflow-canvas/helpers/subworkflows/incident-response.ts +88 -0
- package/src/features/workflow/pages/workflow-canvas/helpers/subworkflows/types.ts +9 -0
- package/src/features/workflow/pages/workflow-canvas/helpers/trace.ts +552 -0
- package/src/features/workflow/pages/workflow-canvas/helpers/transformers.ts +140 -0
- package/src/features/workflow/pages/workflow-canvas/helpers/types.ts +122 -0
- package/src/features/workflow/pages/workflow-canvas/helpers/validation.ts +57 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/controller/build-layout-props.ts +229 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/controller/use-workflow-canvas-controller.ts +26 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/controller/use-workflow-canvas-core.ts +188 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/controller/use-workflow-canvas-execution.ts +269 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/controller/use-workflow-canvas-lifecycle.ts +44 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/controller/use-workflow-canvas-resources.ts +92 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/execution-canvas-updater.ts +79 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/execution-log-helpers.ts +75 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/execution-node-status.ts +46 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/execution-record-updater.ts +118 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/execution-record.ts +69 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/execution-runtime-updates.ts +84 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/node-factory.ts +166 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/use-canvas-ui-state.ts +19 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/use-decorated-nodes.ts +115 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/use-execution-history-handlers.ts +187 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/use-execution-trace.ts +302 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/use-execution-updates.ts +143 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/use-initial-fit-view.ts +27 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/use-node-creation.ts +133 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/use-node-inspector-handlers.ts +194 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/use-pause-workflow.ts +95 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/use-run-workflow.ts +139 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/use-runtime-cache-sync.ts +52 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/use-subworkflow-state.ts +47 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/use-workflow-canvas-history.ts +233 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/use-workflow-chat.ts +284 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/use-workflow-clipboard.ts +218 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/use-workflow-credentials.ts +139 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/use-workflow-duplicate-nodes.ts +140 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/use-workflow-execution-state.ts +20 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/use-workflow-file-transfer.ts +203 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/use-workflow-keybindings.ts +126 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/use-workflow-loader.ts +174 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/use-workflow-metadata-state.ts +28 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/use-workflow-node-deletion.ts +167 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/use-workflow-node-state.ts +89 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/use-workflow-saver.ts +204 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/use-workflow-search.ts +167 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/use-workflow-sticky-notes.ts +89 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/use-workflow-storage-listener.ts +51 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/use-workflow-validation-state.ts +22 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/workflow-clipboard-copy.ts +96 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/workflow-clipboard-paste.ts +109 -0
- package/src/features/workflow/pages/workflow-canvas/hooks/workflow-runner-websocket.ts +146 -0
- package/src/features/workflow/pages/workflow-canvas.test.tsx +194 -0
- package/src/features/workflow/pages/workflow-canvas.tsx +23 -0
- package/src/features/workflow/pages/workflow-execution-details.tsx +194 -0
- package/src/features/workflow/pages/workflow-gallery/types.ts +21 -0
- package/src/features/workflow/pages/workflow-gallery/use-workflow-gallery-actions.ts +219 -0
- package/src/features/workflow/pages/workflow-gallery/use-workflow-gallery-state.ts +204 -0
- package/src/features/workflow/pages/workflow-gallery/use-workflow-gallery.ts +21 -0
- package/src/features/workflow/pages/workflow-gallery/workflow-card.tsx +222 -0
- package/src/features/workflow/pages/workflow-gallery/workflow-create-dialogs.tsx +114 -0
- package/src/features/workflow/pages/workflow-gallery/workflow-filter-popover.tsx +190 -0
- package/src/features/workflow/pages/workflow-gallery/workflow-gallery-header.tsx +134 -0
- package/src/features/workflow/pages/workflow-gallery/workflow-gallery-tabs.tsx +93 -0
- package/src/features/workflow/pages/workflow-gallery/workflow-thumbnail.tsx +82 -0
- package/src/features/workflow/pages/workflow-gallery.tsx +100 -0
- package/src/features/workflow/types/credential-vault.ts +36 -0
- package/src/hooks/use-color-scheme.ts +77 -0
- package/src/hooks/use-credential-vault.ts +245 -0
- package/src/hooks/use-mobile.tsx +21 -0
- package/src/hooks/use-toast.ts +182 -0
- package/src/index.css +95 -0
- package/src/lib/api.test.ts +135 -0
- package/src/lib/api.ts +45 -0
- package/src/lib/config.ts +84 -0
- package/src/lib/theme.ts +71 -0
- package/src/lib/utils.ts +6 -0
- package/src/main.tsx +24 -0
- package/src/setupTests.ts +5 -0
- package/src/test-utils/chatkit-stub.ts +15 -0
- package/src/testing/mocks/backend/credentials.ts +60 -0
- package/src/testing/mocks/backend/request-utils.ts +32 -0
- package/src/testing/mocks/backend/workflows.ts +235 -0
- package/src/testing/mocks/backend.ts +52 -0
- package/src/testing/mocks/chatkit.ts +14 -0
- package/src/vite-env.d.ts +10 -0
- package/tailwind.config.js +61 -0
- package/tsconfig.app.json +30 -0
- package/tsconfig.json +16 -0
- package/tsconfig.node.json +20 -0
- package/vite.config.ts +30 -0
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { buildBackendHttpUrl } from "@/lib/config";
|
|
2
|
+
|
|
3
|
+
export interface PublicChatHttpError {
|
|
4
|
+
status: number;
|
|
5
|
+
message: string;
|
|
6
|
+
code?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
interface PublicChatFetchOptions {
|
|
10
|
+
workflowId: string;
|
|
11
|
+
backendBaseUrl?: string;
|
|
12
|
+
onHttpError?: (error: PublicChatHttpError) => void;
|
|
13
|
+
metadata?: Record<string, unknown>;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
type RuntimeConfig = {
|
|
17
|
+
chatkitDomainKey?: unknown;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const safeString = (value: unknown): string | undefined => {
|
|
21
|
+
if (typeof value === "string" && value.trim()) {
|
|
22
|
+
return value.trim();
|
|
23
|
+
}
|
|
24
|
+
return undefined;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const DEFAULT_DOMAIN_KEY =
|
|
28
|
+
safeString(import.meta.env?.VITE_ORCHEO_CHATKIT_DEFAULT_DOMAIN_KEY) ??
|
|
29
|
+
"domain_pk_localhost_dev";
|
|
30
|
+
|
|
31
|
+
const getRuntimeDomainKey = (): string | undefined => {
|
|
32
|
+
if (typeof window === "undefined") {
|
|
33
|
+
return undefined;
|
|
34
|
+
}
|
|
35
|
+
const runtimeConfig = (
|
|
36
|
+
window as typeof window & {
|
|
37
|
+
__ORCHEO_CONFIG__?: RuntimeConfig;
|
|
38
|
+
}
|
|
39
|
+
).__ORCHEO_CONFIG__;
|
|
40
|
+
return safeString(runtimeConfig?.chatkitDomainKey);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
const parseErrorPayload = async (
|
|
44
|
+
response: Response,
|
|
45
|
+
): Promise<Pick<PublicChatHttpError, "message" | "code">> => {
|
|
46
|
+
try {
|
|
47
|
+
const body = await response.json();
|
|
48
|
+
if (!body) {
|
|
49
|
+
return {
|
|
50
|
+
message: response.statusText || "ChatKit request failed.",
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
if (typeof body === "string") {
|
|
54
|
+
return { message: body };
|
|
55
|
+
}
|
|
56
|
+
if (typeof body === "object") {
|
|
57
|
+
const detail =
|
|
58
|
+
(("detail" in body ? body.detail : undefined) as Record<
|
|
59
|
+
string,
|
|
60
|
+
unknown
|
|
61
|
+
>) ?? (body as Record<string, unknown>);
|
|
62
|
+
const message =
|
|
63
|
+
safeString(detail?.message) ??
|
|
64
|
+
safeString((body as Record<string, unknown>).message);
|
|
65
|
+
const code =
|
|
66
|
+
safeString(detail?.code) ??
|
|
67
|
+
safeString((body as Record<string, unknown>).code);
|
|
68
|
+
return {
|
|
69
|
+
message:
|
|
70
|
+
message ??
|
|
71
|
+
(response.statusText ||
|
|
72
|
+
"ChatKit request failed. Please retry shortly."),
|
|
73
|
+
code,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
message: response.statusText || "ChatKit request failed.",
|
|
78
|
+
};
|
|
79
|
+
} catch {
|
|
80
|
+
return {
|
|
81
|
+
message: response.statusText || "ChatKit request failed.",
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export const getChatKitDomainKey = (): string => {
|
|
87
|
+
const fromEnv = safeString(import.meta.env?.VITE_ORCHEO_CHATKIT_DOMAIN_KEY);
|
|
88
|
+
const fromRuntime = getRuntimeDomainKey();
|
|
89
|
+
return fromEnv ?? fromRuntime ?? DEFAULT_DOMAIN_KEY;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export const buildPublicChatFetch = ({
|
|
93
|
+
workflowId,
|
|
94
|
+
backendBaseUrl,
|
|
95
|
+
onHttpError,
|
|
96
|
+
metadata,
|
|
97
|
+
}: PublicChatFetchOptions): typeof fetch => {
|
|
98
|
+
const baseFetch = window.fetch.bind(window);
|
|
99
|
+
const resolvedUrl = buildBackendHttpUrl("/api/chatkit", backendBaseUrl);
|
|
100
|
+
|
|
101
|
+
const emitError = async (response: Response) => {
|
|
102
|
+
if (!onHttpError) {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
const detail = await parseErrorPayload(response);
|
|
106
|
+
onHttpError({
|
|
107
|
+
status: response.status,
|
|
108
|
+
message: detail.message,
|
|
109
|
+
code: detail.code,
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
return async (input: RequestInfo | URL, init: RequestInit = {}) => {
|
|
114
|
+
const nextInit: RequestInit = {
|
|
115
|
+
...init,
|
|
116
|
+
credentials: "include",
|
|
117
|
+
};
|
|
118
|
+
// Ensure OAuth HttpOnly cookies are sent with every ChatKit request.
|
|
119
|
+
|
|
120
|
+
const headers = new Headers(nextInit.headers ?? {});
|
|
121
|
+
const contentType = headers.get("Content-Type") ?? "";
|
|
122
|
+
const expectsJson = contentType.includes("application/json");
|
|
123
|
+
const stringBody = typeof nextInit.body === "string";
|
|
124
|
+
|
|
125
|
+
const augmentPayload = (serialized: string | null) => {
|
|
126
|
+
if (!serialized) {
|
|
127
|
+
return JSON.stringify({
|
|
128
|
+
workflow_id: workflowId,
|
|
129
|
+
metadata: {
|
|
130
|
+
...(metadata ?? {}),
|
|
131
|
+
workflow_id: workflowId,
|
|
132
|
+
},
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
try {
|
|
136
|
+
const payload = JSON.parse(serialized);
|
|
137
|
+
if (payload && typeof payload === "object") {
|
|
138
|
+
if (!payload.workflow_id) {
|
|
139
|
+
payload.workflow_id = workflowId;
|
|
140
|
+
}
|
|
141
|
+
const payloadMetadata =
|
|
142
|
+
payload.metadata && typeof payload.metadata === "object"
|
|
143
|
+
? { ...(payload.metadata as Record<string, unknown>) }
|
|
144
|
+
: {};
|
|
145
|
+
if (metadata) {
|
|
146
|
+
Object.assign(payloadMetadata, metadata);
|
|
147
|
+
}
|
|
148
|
+
payloadMetadata.workflow_id = workflowId;
|
|
149
|
+
payload.metadata = payloadMetadata;
|
|
150
|
+
}
|
|
151
|
+
return JSON.stringify(payload);
|
|
152
|
+
} catch {
|
|
153
|
+
return serialized;
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
if (expectsJson || stringBody || !nextInit.body) {
|
|
158
|
+
nextInit.body = augmentPayload(
|
|
159
|
+
stringBody ? (nextInit.body as string) : null,
|
|
160
|
+
);
|
|
161
|
+
headers.set("Content-Type", "application/json");
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
nextInit.headers = headers;
|
|
165
|
+
|
|
166
|
+
const requestInfo = input ?? resolvedUrl;
|
|
167
|
+
const response = await baseFetch(requestInfo, nextInit);
|
|
168
|
+
|
|
169
|
+
if (!response.ok) {
|
|
170
|
+
await emitError(response.clone());
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
return response;
|
|
174
|
+
};
|
|
175
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { UseChatKitOptions } from "@openai/chatkit-react";
|
|
2
|
+
import type { ColorScheme } from "@/hooks/use-color-scheme";
|
|
3
|
+
|
|
4
|
+
export const buildChatTheme = (
|
|
5
|
+
scheme: ColorScheme,
|
|
6
|
+
): NonNullable<UseChatKitOptions["theme"]> => ({
|
|
7
|
+
colorScheme: scheme,
|
|
8
|
+
color: {
|
|
9
|
+
grayscale: {
|
|
10
|
+
hue: 220,
|
|
11
|
+
tint: 6,
|
|
12
|
+
shade: scheme === "dark" ? -1 : -4,
|
|
13
|
+
},
|
|
14
|
+
accent: {
|
|
15
|
+
primary: scheme === "dark" ? "#f1f5f9" : "#0f172a",
|
|
16
|
+
level: 1,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
radius: "round",
|
|
20
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
type ChatTelemetryEvent =
|
|
2
|
+
| "canvas.chat.open"
|
|
3
|
+
| "canvas.chat.close"
|
|
4
|
+
| "canvas.chat.session.success"
|
|
5
|
+
| "canvas.chat.session.failure";
|
|
6
|
+
|
|
7
|
+
const buildDetail = (detail?: Record<string, unknown>) => ({
|
|
8
|
+
timestamp: new Date().toISOString(),
|
|
9
|
+
...(detail ?? {}),
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export function recordChatTelemetry(
|
|
13
|
+
event: ChatTelemetryEvent,
|
|
14
|
+
detail?: Record<string, unknown>,
|
|
15
|
+
) {
|
|
16
|
+
if (typeof window !== "undefined") {
|
|
17
|
+
window.dispatchEvent(
|
|
18
|
+
new CustomEvent("chatkit:telemetry", {
|
|
19
|
+
detail: { event, ...buildDetail(detail) },
|
|
20
|
+
}),
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
if (process.env.NODE_ENV !== "production") {
|
|
25
|
+
console.info(`[telemetry] ${event}`, buildDetail(detail));
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export type { ChatTelemetryEvent };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { buildBackendHttpUrl } from "@/lib/config";
|
|
2
|
+
|
|
3
|
+
interface WorkflowSessionResponse {
|
|
4
|
+
client_secret?: string;
|
|
5
|
+
clientSecret?: string;
|
|
6
|
+
expires_at?: string;
|
|
7
|
+
expiresAt?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface WorkflowChatSession {
|
|
11
|
+
clientSecret: string;
|
|
12
|
+
expiresAt: number | null;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const parseErrorDetail = async (response: Response): Promise<string> => {
|
|
16
|
+
try {
|
|
17
|
+
const payload = (await response.json()) as Record<string, unknown>;
|
|
18
|
+
if (typeof payload?.detail === "object" && payload.detail !== null) {
|
|
19
|
+
const detail = payload.detail as Record<string, unknown>;
|
|
20
|
+
const message =
|
|
21
|
+
typeof detail.message === "string" ? detail.message : null;
|
|
22
|
+
if (message) {
|
|
23
|
+
return message;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
if (typeof payload.message === "string") {
|
|
27
|
+
return payload.message;
|
|
28
|
+
}
|
|
29
|
+
} catch {
|
|
30
|
+
// Ignore JSON parse errors and fall through to status text.
|
|
31
|
+
}
|
|
32
|
+
return response.statusText || "ChatKit session request failed.";
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export async function requestWorkflowChatSession(
|
|
36
|
+
workflowId: string,
|
|
37
|
+
backendBaseUrl?: string | null,
|
|
38
|
+
): Promise<WorkflowChatSession> {
|
|
39
|
+
const url = buildBackendHttpUrl(
|
|
40
|
+
`/api/workflows/${workflowId}/chatkit/session`,
|
|
41
|
+
backendBaseUrl ?? undefined,
|
|
42
|
+
);
|
|
43
|
+
const response = await fetch(url, {
|
|
44
|
+
method: "POST",
|
|
45
|
+
headers: {
|
|
46
|
+
"Content-Type": "application/json",
|
|
47
|
+
},
|
|
48
|
+
credentials: "include",
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
if (!response.ok) {
|
|
52
|
+
const message = await parseErrorDetail(response);
|
|
53
|
+
throw new Error(message);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const payload = (await response.json()) as WorkflowSessionResponse;
|
|
57
|
+
const secret = payload.client_secret ?? payload.clientSecret;
|
|
58
|
+
if (!secret) {
|
|
59
|
+
throw new Error("ChatKit session response missing client secret.");
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const expiresRaw = payload.expires_at ?? payload.expiresAt;
|
|
63
|
+
const expiresAt = expiresRaw ? new Date(expiresRaw).getTime() : null;
|
|
64
|
+
|
|
65
|
+
return {
|
|
66
|
+
clientSecret: secret,
|
|
67
|
+
expiresAt,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
import { Monitor, Moon, Sun } from "lucide-react";
|
|
4
|
+
import { Link, useParams } from "react-router-dom";
|
|
5
|
+
import { Alert, AlertDescription, AlertTitle } from "@/design-system/ui/alert";
|
|
6
|
+
import { Button } from "@/design-system/ui/button";
|
|
7
|
+
import { Skeleton } from "@/design-system/ui/skeleton";
|
|
8
|
+
import { ToggleGroup, ToggleGroupItem } from "@/design-system/ui/toggle-group";
|
|
9
|
+
import { getBackendBaseUrl } from "@/lib/config";
|
|
10
|
+
import { cn } from "@/lib/utils";
|
|
11
|
+
import type { Theme } from "@/lib/theme";
|
|
12
|
+
import { useThemePreferences } from "@features/account/components/use-theme-preferences";
|
|
13
|
+
import {
|
|
14
|
+
ApiRequestError,
|
|
15
|
+
fetchWorkflow,
|
|
16
|
+
} from "@features/workflow/lib/workflow-storage-api";
|
|
17
|
+
import type { ApiWorkflow } from "@features/workflow/lib/workflow-storage.types";
|
|
18
|
+
import { PublicChatWidget } from "@features/chatkit/components/public-chat-widget";
|
|
19
|
+
import { PublicChatErrorBoundary } from "@features/chatkit/components/public-chat-error-boundary";
|
|
20
|
+
import type { PublicChatHttpError } from "@features/chatkit/lib/chatkit-client";
|
|
21
|
+
|
|
22
|
+
type ColorScheme = "light" | "dark";
|
|
23
|
+
|
|
24
|
+
type WorkflowState =
|
|
25
|
+
| { status: "loading" }
|
|
26
|
+
| { status: "error"; message: string }
|
|
27
|
+
| { status: "ready"; workflow: ApiWorkflow };
|
|
28
|
+
|
|
29
|
+
const sanitizeWorkflowNameForEmail = (value: string): string =>
|
|
30
|
+
value
|
|
31
|
+
.replace(/[\r\n]+/g, " ")
|
|
32
|
+
.replace(/[<>]/g, "")
|
|
33
|
+
.trim();
|
|
34
|
+
|
|
35
|
+
export default function PublicChatPage() {
|
|
36
|
+
const { workflowId } = useParams<{ workflowId: string }>();
|
|
37
|
+
const [workflowState, setWorkflowState] = useState<WorkflowState>({
|
|
38
|
+
status: workflowId ? "loading" : "error",
|
|
39
|
+
...(workflowId ? {} : { message: "Workflow identifier missing from URL." }),
|
|
40
|
+
});
|
|
41
|
+
const [chatError, setChatError] = useState<PublicChatHttpError | null>(null);
|
|
42
|
+
const [rateLimitError, setRateLimitError] =
|
|
43
|
+
useState<PublicChatHttpError | null>(null);
|
|
44
|
+
const [isChatReady, setIsChatReady] = useState(false);
|
|
45
|
+
const [systemColorScheme, setSystemColorScheme] = useState<ColorScheme>(() =>
|
|
46
|
+
typeof window !== "undefined" &&
|
|
47
|
+
window.matchMedia("(prefers-color-scheme: dark)").matches
|
|
48
|
+
? "dark"
|
|
49
|
+
: "light",
|
|
50
|
+
);
|
|
51
|
+
const { theme, setTheme } = useThemePreferences({});
|
|
52
|
+
const backendBaseUrl = useMemo(() => getBackendBaseUrl(), []);
|
|
53
|
+
|
|
54
|
+
useEffect(() => {
|
|
55
|
+
setChatError(null);
|
|
56
|
+
setRateLimitError(null);
|
|
57
|
+
setIsChatReady(false);
|
|
58
|
+
}, [workflowId]);
|
|
59
|
+
|
|
60
|
+
useEffect(() => {
|
|
61
|
+
if (!workflowId) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
let cancelled = false;
|
|
65
|
+
setWorkflowState({ status: "loading" });
|
|
66
|
+
|
|
67
|
+
fetchWorkflow(workflowId)
|
|
68
|
+
.then((workflow) => {
|
|
69
|
+
if (cancelled) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
if (!workflow) {
|
|
73
|
+
setWorkflowState({
|
|
74
|
+
status: "error",
|
|
75
|
+
message: "This workflow does not exist or is no longer available.",
|
|
76
|
+
});
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
if (!workflow.is_public) {
|
|
80
|
+
setWorkflowState({
|
|
81
|
+
status: "error",
|
|
82
|
+
message:
|
|
83
|
+
"This workflow is private. Ask the owner to republish it before trying again.",
|
|
84
|
+
});
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
setWorkflowState({ status: "ready", workflow });
|
|
88
|
+
})
|
|
89
|
+
.catch((error: unknown) => {
|
|
90
|
+
if (cancelled) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
if (error instanceof ApiRequestError) {
|
|
94
|
+
const message =
|
|
95
|
+
error.status >= 500
|
|
96
|
+
? "The workflow service is unavailable. Please try again later."
|
|
97
|
+
: "Unable to load workflow metadata.";
|
|
98
|
+
setWorkflowState({ status: "error", message });
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
setWorkflowState({
|
|
102
|
+
status: "error",
|
|
103
|
+
message: "Unexpected error while loading workflow metadata.",
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
return () => {
|
|
108
|
+
cancelled = true;
|
|
109
|
+
};
|
|
110
|
+
}, [workflowId]);
|
|
111
|
+
|
|
112
|
+
const contactHref = useMemo(() => {
|
|
113
|
+
if (workflowState.status !== "ready") {
|
|
114
|
+
return "mailto:?subject=Orcheo%20workflow%20access";
|
|
115
|
+
}
|
|
116
|
+
const sanitizedName = sanitizeWorkflowNameForEmail(
|
|
117
|
+
workflowState.workflow.name,
|
|
118
|
+
);
|
|
119
|
+
const subject = encodeURIComponent(`Request access to ${sanitizedName}`);
|
|
120
|
+
const link = typeof window !== "undefined" ? window.location.href : "";
|
|
121
|
+
const body = encodeURIComponent(
|
|
122
|
+
`Hi,%0A%0ACould you confirm access for workflow "${sanitizedName}" (${workflowState.workflow.id})?%0A%0ALink: ${link}%0A`,
|
|
123
|
+
);
|
|
124
|
+
return `mailto:?subject=${subject}&body=${body}`;
|
|
125
|
+
}, [workflowState]);
|
|
126
|
+
|
|
127
|
+
const handleErrorBoundaryReset = useCallback(() => {
|
|
128
|
+
setChatError(null);
|
|
129
|
+
setRateLimitError(null);
|
|
130
|
+
setIsChatReady(false);
|
|
131
|
+
}, []);
|
|
132
|
+
|
|
133
|
+
const handleChatHttpError = (error: PublicChatHttpError) => {
|
|
134
|
+
if (error.status === 429 || error.code?.startsWith("chatkit.rate_limit")) {
|
|
135
|
+
setRateLimitError(error);
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
if (error.code === "chatkit.auth.oauth_required") {
|
|
139
|
+
setChatError({
|
|
140
|
+
...error,
|
|
141
|
+
message:
|
|
142
|
+
"OAuth login is required before this workflow can be used. Sign in and try again.",
|
|
143
|
+
});
|
|
144
|
+
setIsChatReady(false);
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
if (error.status === 401 || error.status === 403) {
|
|
148
|
+
setChatError({
|
|
149
|
+
...error,
|
|
150
|
+
message:
|
|
151
|
+
"You do not have access to this workflow yet. Ask the owner to confirm it is still published.",
|
|
152
|
+
});
|
|
153
|
+
setIsChatReady(false);
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
setChatError({
|
|
157
|
+
...error,
|
|
158
|
+
message:
|
|
159
|
+
error.message ||
|
|
160
|
+
"ChatKit could not start this conversation. Please try again shortly.",
|
|
161
|
+
});
|
|
162
|
+
setIsChatReady(false);
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
const resolvedColorScheme: ColorScheme =
|
|
166
|
+
theme === "system" ? systemColorScheme : theme;
|
|
167
|
+
|
|
168
|
+
useEffect(() => {
|
|
169
|
+
if (typeof window === "undefined") {
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
const media = window.matchMedia("(prefers-color-scheme: dark)");
|
|
173
|
+
const handleChange = (event: MediaQueryListEvent) => {
|
|
174
|
+
setSystemColorScheme(event.matches ? "dark" : "light");
|
|
175
|
+
};
|
|
176
|
+
if (typeof media.addEventListener === "function") {
|
|
177
|
+
media.addEventListener("change", handleChange);
|
|
178
|
+
} else {
|
|
179
|
+
media.addListener(handleChange);
|
|
180
|
+
}
|
|
181
|
+
return () => {
|
|
182
|
+
if (typeof media.removeEventListener === "function") {
|
|
183
|
+
media.removeEventListener("change", handleChange);
|
|
184
|
+
} else {
|
|
185
|
+
media.removeListener(handleChange);
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
}, []);
|
|
189
|
+
|
|
190
|
+
const handleThemeRequest = useCallback(
|
|
191
|
+
(requestedScheme: ColorScheme) => {
|
|
192
|
+
setTheme(requestedScheme);
|
|
193
|
+
},
|
|
194
|
+
[setTheme],
|
|
195
|
+
);
|
|
196
|
+
|
|
197
|
+
const renderChatColumn = () => {
|
|
198
|
+
const currentWorkflowName =
|
|
199
|
+
workflowState.status === "ready"
|
|
200
|
+
? workflowState.workflow.name
|
|
201
|
+
: "this workflow";
|
|
202
|
+
|
|
203
|
+
const renderBody = () => {
|
|
204
|
+
if (workflowState.status === "loading") {
|
|
205
|
+
return (
|
|
206
|
+
<div className="space-y-4">
|
|
207
|
+
<Skeleton className="h-10 w-40 rounded-full" />
|
|
208
|
+
<Skeleton className="h-[520px] w-full rounded-3xl" />
|
|
209
|
+
</div>
|
|
210
|
+
);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
if (workflowState.status === "error") {
|
|
214
|
+
return (
|
|
215
|
+
<div className="rounded-3xl border border-slate-200/80 bg-white/70 p-6 text-slate-900 shadow-sm dark:border-slate-800/60 dark:bg-slate-950/40 dark:text-white">
|
|
216
|
+
<p className="text-lg font-semibold">Chat unavailable</p>
|
|
217
|
+
<p className="mt-2 text-sm text-slate-600 dark:text-slate-300">
|
|
218
|
+
We cannot open a ChatKit session until the workflow loads.
|
|
219
|
+
</p>
|
|
220
|
+
<Button asChild variant="secondary" className="mt-4">
|
|
221
|
+
<Link to="/">Return home</Link>
|
|
222
|
+
</Button>
|
|
223
|
+
</div>
|
|
224
|
+
);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
return (
|
|
228
|
+
<div className="space-y-4">
|
|
229
|
+
{rateLimitError && (
|
|
230
|
+
<Alert className="border-amber-500/50 bg-amber-500/[0.08] text-amber-100">
|
|
231
|
+
<AlertTitle>Slow down for a moment</AlertTitle>
|
|
232
|
+
<AlertDescription>
|
|
233
|
+
{rateLimitError.message ||
|
|
234
|
+
"Too many requests were sent for this workflow. Please wait before retrying."}
|
|
235
|
+
</AlertDescription>
|
|
236
|
+
<div className="mt-3">
|
|
237
|
+
<Button
|
|
238
|
+
size="sm"
|
|
239
|
+
variant="outline"
|
|
240
|
+
className="border-amber-400/60 text-amber-100"
|
|
241
|
+
onClick={() => setRateLimitError(null)}
|
|
242
|
+
>
|
|
243
|
+
Dismiss
|
|
244
|
+
</Button>
|
|
245
|
+
</div>
|
|
246
|
+
</Alert>
|
|
247
|
+
)}
|
|
248
|
+
|
|
249
|
+
{chatError ? (
|
|
250
|
+
<div className="space-y-4 rounded-3xl border border-red-500/40 bg-red-500/10 p-6 text-center">
|
|
251
|
+
<p className="font-medium text-red-100">{chatError.message}</p>
|
|
252
|
+
<div className="flex flex-wrap justify-center gap-3">
|
|
253
|
+
<Button asChild variant="outline">
|
|
254
|
+
<a href={contactHref}>Contact owner</a>
|
|
255
|
+
</Button>
|
|
256
|
+
</div>
|
|
257
|
+
</div>
|
|
258
|
+
) : (
|
|
259
|
+
<div className="relative min-h-[520px]">
|
|
260
|
+
{!isChatReady && (
|
|
261
|
+
<div className="absolute inset-0 flex flex-col gap-4 rounded-3xl bg-white/90 p-6 shadow-sm dark:bg-slate-950/80">
|
|
262
|
+
<Skeleton className="h-10 w-1/2 self-center" />
|
|
263
|
+
<Skeleton className="h-full w-full" />
|
|
264
|
+
</div>
|
|
265
|
+
)}
|
|
266
|
+
<div
|
|
267
|
+
className={cn(
|
|
268
|
+
"h-[520px] w-full",
|
|
269
|
+
isChatReady ? "opacity-100" : "opacity-0",
|
|
270
|
+
"transition-opacity duration-200",
|
|
271
|
+
)}
|
|
272
|
+
>
|
|
273
|
+
<PublicChatWidget
|
|
274
|
+
key={workflowState.workflow.id}
|
|
275
|
+
workflowId={workflowState.workflow.id}
|
|
276
|
+
workflowName={workflowState.workflow.name}
|
|
277
|
+
backendBaseUrl={backendBaseUrl}
|
|
278
|
+
onHttpError={handleChatHttpError}
|
|
279
|
+
onReady={() => setIsChatReady(true)}
|
|
280
|
+
colorScheme={resolvedColorScheme}
|
|
281
|
+
onThemeRequest={handleThemeRequest}
|
|
282
|
+
/>
|
|
283
|
+
</div>
|
|
284
|
+
</div>
|
|
285
|
+
)}
|
|
286
|
+
</div>
|
|
287
|
+
);
|
|
288
|
+
};
|
|
289
|
+
|
|
290
|
+
return (
|
|
291
|
+
<div className="space-y-6">
|
|
292
|
+
<div className="flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between">
|
|
293
|
+
<div className="space-y-2">
|
|
294
|
+
<p className="text-3xl font-semibold text-slate-900 dark:text-white">
|
|
295
|
+
Chat with “{currentWorkflowName}”
|
|
296
|
+
</p>
|
|
297
|
+
<p className="text-base text-slate-600 dark:text-slate-300">
|
|
298
|
+
Chat sessions open automatically for published workflows unless
|
|
299
|
+
the owner requires OAuth login.
|
|
300
|
+
</p>
|
|
301
|
+
</div>
|
|
302
|
+
<ThemeToggleButtonGroup value={theme} onChange={setTheme} />
|
|
303
|
+
</div>
|
|
304
|
+
{renderBody()}
|
|
305
|
+
</div>
|
|
306
|
+
);
|
|
307
|
+
};
|
|
308
|
+
|
|
309
|
+
return (
|
|
310
|
+
<PublicChatErrorBoundary onReset={handleErrorBoundaryReset}>
|
|
311
|
+
<div className="h-screen overflow-hidden bg-white text-slate-900 dark:bg-slate-950 dark:text-white">
|
|
312
|
+
<div className="mx-auto flex h-full max-w-6xl flex-col px-4 py-6 lg:py-8">
|
|
313
|
+
<div className="flex flex-1 items-center justify-center">
|
|
314
|
+
<div className="w-full max-w-3xl">{renderChatColumn()}</div>
|
|
315
|
+
</div>
|
|
316
|
+
</div>
|
|
317
|
+
</div>
|
|
318
|
+
</PublicChatErrorBoundary>
|
|
319
|
+
);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
const THEME_OPTIONS: Array<{
|
|
323
|
+
icon: ReactNode;
|
|
324
|
+
label: string;
|
|
325
|
+
value: Theme;
|
|
326
|
+
}> = [
|
|
327
|
+
{
|
|
328
|
+
value: "light",
|
|
329
|
+
label: "Light",
|
|
330
|
+
icon: <Sun className="h-4 w-4" />,
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
value: "dark",
|
|
334
|
+
label: "Dark",
|
|
335
|
+
icon: <Moon className="h-4 w-4" />,
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
value: "system",
|
|
339
|
+
label: "System",
|
|
340
|
+
icon: <Monitor className="h-4 w-4" />,
|
|
341
|
+
},
|
|
342
|
+
];
|
|
343
|
+
|
|
344
|
+
const isThemeValue = (value: string): value is Theme =>
|
|
345
|
+
THEME_OPTIONS.some((option) => option.value === value);
|
|
346
|
+
|
|
347
|
+
interface ThemeToggleButtonGroupProps {
|
|
348
|
+
className?: string;
|
|
349
|
+
value: Theme;
|
|
350
|
+
onChange: (theme: Theme) => void;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
function ThemeToggleButtonGroup({
|
|
354
|
+
className,
|
|
355
|
+
value,
|
|
356
|
+
onChange,
|
|
357
|
+
}: ThemeToggleButtonGroupProps) {
|
|
358
|
+
const handleThemeChange = (value: string) => {
|
|
359
|
+
if (!value || !isThemeValue(value)) {
|
|
360
|
+
return;
|
|
361
|
+
}
|
|
362
|
+
onChange(value);
|
|
363
|
+
};
|
|
364
|
+
|
|
365
|
+
return (
|
|
366
|
+
<ToggleGroup
|
|
367
|
+
type="single"
|
|
368
|
+
value={value}
|
|
369
|
+
onValueChange={handleThemeChange}
|
|
370
|
+
aria-label="Select display theme"
|
|
371
|
+
className={cn(
|
|
372
|
+
"rounded-full border border-slate-200 bg-white/90 px-1 py-1 shadow-[inset_0_-1px_4px_rgba(15,23,42,0.12)] backdrop-blur-sm dark:border-slate-800 dark:bg-slate-950/70",
|
|
373
|
+
className,
|
|
374
|
+
)}
|
|
375
|
+
variant="default"
|
|
376
|
+
size="default"
|
|
377
|
+
>
|
|
378
|
+
{THEME_OPTIONS.map((option) => (
|
|
379
|
+
<ToggleGroupItem
|
|
380
|
+
key={option.value}
|
|
381
|
+
value={option.value}
|
|
382
|
+
aria-label={`Use ${option.label.toLowerCase()} theme`}
|
|
383
|
+
className="h-9 w-9 rounded-full border border-transparent p-0 text-slate-400 transition-all hover:bg-transparent hover:text-slate-900 dark:text-slate-400 dark:hover:text-white data-[state=on]:border-slate-900/20 data-[state=on]:bg-slate-900 data-[state=on]:text-white data-[state=on]:shadow-[0_4px_12px_rgba(15,23,42,0.3)] dark:data-[state=on]:border-white/30 dark:data-[state=on]:bg-white dark:data-[state=on]:text-slate-900"
|
|
384
|
+
>
|
|
385
|
+
{option.icon}
|
|
386
|
+
<span className="sr-only">{option.label}</span>
|
|
387
|
+
</ToggleGroupItem>
|
|
388
|
+
))}
|
|
389
|
+
</ToggleGroup>
|
|
390
|
+
);
|
|
391
|
+
}
|