@stack-spot/ai-chat-widget 1.36.1-beta.1 → 1.36.1-betacitric.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 +1 -26
- package/dist/StackspotAIWidget.d.ts.map +1 -1
- package/dist/StackspotAIWidget.js +6 -7
- package/dist/StackspotAIWidget.js.map +1 -1
- package/dist/app-metadata.json +12 -16
- package/dist/components/AdaptiveTextArea.d.ts +1 -1
- package/dist/components/AdaptiveTextArea.d.ts.map +1 -1
- package/dist/components/AdaptiveTextArea.js +1 -1
- package/dist/components/AdaptiveTextArea.js.map +1 -1
- package/dist/components/AgentCard/AgentCardCreate.d.ts.map +1 -1
- package/dist/components/AgentCard/AgentCardCreate.js +3 -3
- package/dist/components/AgentCard/AgentCardCreate.js.map +1 -1
- package/dist/components/AgentCard/index.d.ts.map +1 -1
- package/dist/components/AgentCard/index.js +5 -6
- package/dist/components/AgentCard/index.js.map +1 -1
- package/dist/components/ButtonFavorite.d.ts +8 -7
- package/dist/components/ButtonFavorite.d.ts.map +1 -1
- package/dist/components/ButtonFavorite.js +5 -14
- package/dist/components/ButtonFavorite.js.map +1 -1
- package/dist/components/Code.d.ts.map +1 -1
- package/dist/components/Code.js +11 -9
- package/dist/components/Code.js.map +1 -1
- package/dist/components/ComponentNavigator.d.ts.map +1 -1
- package/dist/components/ComponentNavigator.js +2 -4
- package/dist/components/ComponentNavigator.js.map +1 -1
- package/dist/components/FadingOverflow.d.ts.map +1 -1
- package/dist/components/FadingOverflow.js +3 -4
- package/dist/components/FadingOverflow.js.map +1 -1
- package/dist/components/FileDescription.d.ts.map +1 -1
- package/dist/components/FileDescription.js +3 -4
- package/dist/components/FileDescription.js.map +1 -1
- package/dist/components/HistoryList.js +1 -1
- package/dist/components/HistoryList.js.map +1 -1
- package/dist/components/ListResource.js +3 -3
- package/dist/components/ListResource.js.map +1 -1
- package/dist/components/Markdown.js +1 -1
- package/dist/components/Markdown.js.map +1 -1
- package/dist/components/Modal.d.ts.map +1 -1
- package/dist/components/Modal.js +2 -4
- package/dist/components/Modal.js.map +1 -1
- package/dist/components/QuickStartButton.d.ts +2 -3
- package/dist/components/QuickStartButton.d.ts.map +1 -1
- package/dist/components/QuickStartButton.js +4 -3
- package/dist/components/QuickStartButton.js.map +1 -1
- package/dist/components/RightPanelForm.d.ts.map +1 -1
- package/dist/components/RightPanelForm.js +20 -13
- package/dist/components/RightPanelForm.js.map +1 -1
- package/dist/components/RightPanelTabs.d.ts +1 -4
- package/dist/components/RightPanelTabs.d.ts.map +1 -1
- package/dist/components/RightPanelTabs.js +4 -16
- package/dist/components/RightPanelTabs.js.map +1 -1
- package/dist/components/Selector/index.d.ts.map +1 -1
- package/dist/components/Selector/index.js +5 -8
- package/dist/components/Selector/index.js.map +1 -1
- package/dist/components/Selector/styled.d.ts.map +1 -1
- package/dist/components/Selector/styled.js +8 -5
- package/dist/components/Selector/styled.js.map +1 -1
- package/dist/components/StackedBadge.js +5 -5
- package/dist/components/StackedBadge.js.map +1 -1
- package/dist/components/TabManager.d.ts.map +1 -1
- package/dist/components/TabManager.js +5 -30
- package/dist/components/TabManager.js.map +1 -1
- package/dist/components/ToolBadge.d.ts +3 -8
- package/dist/components/ToolBadge.d.ts.map +1 -1
- package/dist/components/ToolBadge.js +21 -99
- package/dist/components/ToolBadge.js.map +1 -1
- package/dist/components/WorkspaceTabNavigator.d.ts.map +1 -1
- package/dist/components/WorkspaceTabNavigator.js +7 -9
- package/dist/components/WorkspaceTabNavigator.js.map +1 -1
- package/dist/components/form/DescribedCheckboxGroup.d.ts +24 -2
- package/dist/components/form/DescribedCheckboxGroup.d.ts.map +1 -1
- package/dist/components/form/DescribedCheckboxGroup.js +46 -29
- package/dist/components/form/DescribedCheckboxGroup.js.map +1 -1
- package/dist/components/form/DescribedRadioGroup.d.ts +24 -4
- package/dist/components/form/DescribedRadioGroup.d.ts.map +1 -1
- package/dist/components/form/DescribedRadioGroup.js +39 -18
- package/dist/components/form/DescribedRadioGroup.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/layout.css +1 -27
- package/dist/right-panel/DefaultPanel.d.ts.map +1 -1
- package/dist/right-panel/DefaultPanel.js +2 -4
- package/dist/right-panel/DefaultPanel.js.map +1 -1
- package/dist/state/ChatEntry.d.ts +3 -4
- package/dist/state/ChatEntry.d.ts.map +1 -1
- package/dist/state/ChatEntry.js.map +1 -1
- package/dist/types.d.ts +3 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/views/Agents/AgentDescription.d.ts.map +1 -1
- package/dist/views/Agents/AgentDescription.js +4 -5
- package/dist/views/Agents/AgentDescription.js.map +1 -1
- package/dist/views/Agents/AgentsPanel.d.ts.map +1 -1
- package/dist/views/Agents/AgentsPanel.js +7 -7
- package/dist/views/Agents/AgentsPanel.js.map +1 -1
- package/dist/views/Agents/AgentsTab.d.ts.map +1 -1
- package/dist/views/Agents/AgentsTab.js +29 -28
- package/dist/views/Agents/AgentsTab.js.map +1 -1
- package/dist/views/Agents/dictionary.d.ts +1 -1
- package/dist/views/Chat/AgentInfo.d.ts.map +1 -1
- package/dist/views/Chat/AgentInfo.js +3 -5
- package/dist/views/Chat/AgentInfo.js.map +1 -1
- package/dist/views/Chat/ChatMessage.d.ts.map +1 -1
- package/dist/views/Chat/ChatMessage.js +28 -36
- package/dist/views/Chat/ChatMessage.js.map +1 -1
- package/dist/views/Chat/StepsList.d.ts.map +1 -1
- package/dist/views/Chat/StepsList.js +10 -10
- package/dist/views/Chat/StepsList.js.map +1 -1
- package/dist/views/Chat/styled.d.ts.map +1 -1
- package/dist/views/Chat/styled.js +8 -2
- package/dist/views/Chat/styled.js.map +1 -1
- package/dist/views/ChatHistory/HistoryItem.d.ts.map +1 -1
- package/dist/views/ChatHistory/HistoryItem.js +7 -14
- package/dist/views/ChatHistory/HistoryItem.js.map +1 -1
- package/dist/views/ChatHistory/index.js +1 -1
- package/dist/views/ChatHistory/index.js.map +1 -1
- package/dist/views/ChatHistory/styled.d.ts.map +1 -1
- package/dist/views/ChatHistory/styled.js +3 -5
- package/dist/views/ChatHistory/styled.js.map +1 -1
- package/dist/views/ChatTabSelection.d.ts.map +1 -1
- package/dist/views/ChatTabSelection.js +2 -3
- package/dist/views/ChatTabSelection.js.map +1 -1
- package/dist/views/Editor.d.ts.map +1 -1
- package/dist/views/Editor.js +6 -12
- package/dist/views/Editor.js.map +1 -1
- package/dist/views/Home/BuiltInAgent.d.ts.map +1 -1
- package/dist/views/Home/BuiltInAgent.js +2 -3
- package/dist/views/Home/BuiltInAgent.js.map +1 -1
- package/dist/views/Home/CustomAgent.js +3 -3
- package/dist/views/Home/CustomAgent.js.map +1 -1
- package/dist/views/Home/index.js +1 -1
- package/dist/views/Home/index.js.map +1 -1
- package/dist/views/Home/styled.d.ts.map +1 -1
- package/dist/views/Home/styled.js +21 -22
- package/dist/views/Home/styled.js.map +1 -1
- package/dist/views/KSDocument.d.ts.map +1 -1
- package/dist/views/KSDocument.js +3 -4
- package/dist/views/KSDocument.js.map +1 -1
- package/dist/views/KnowledgeSources.d.ts.map +1 -1
- package/dist/views/KnowledgeSources.js +14 -36
- package/dist/views/KnowledgeSources.js.map +1 -1
- package/dist/views/MessageInput/AgentSelector.d.ts.map +1 -1
- package/dist/views/MessageInput/AgentSelector.js +7 -5
- package/dist/views/MessageInput/AgentSelector.js.map +1 -1
- package/dist/views/MessageInput/ButtonAgent.d.ts.map +1 -1
- package/dist/views/MessageInput/ButtonAgent.js +4 -5
- package/dist/views/MessageInput/ButtonAgent.js.map +1 -1
- package/dist/views/MessageInput/ButtonBar.d.ts.map +1 -1
- package/dist/views/MessageInput/ButtonBar.js +2 -4
- package/dist/views/MessageInput/ButtonBar.js.map +1 -1
- package/dist/views/MessageInput/ContextBar.d.ts.map +1 -1
- package/dist/views/MessageInput/ContextBar.js +4 -6
- package/dist/views/MessageInput/ContextBar.js.map +1 -1
- package/dist/views/MessageInput/QuickCommandSelector.js +2 -2
- package/dist/views/MessageInput/QuickCommandSelector.js.map +1 -1
- package/dist/views/MessageInput/SelectContent.d.ts.map +1 -1
- package/dist/views/MessageInput/SelectContent.js +30 -35
- package/dist/views/MessageInput/SelectContent.js.map +1 -1
- package/dist/views/MessageInput/UploadBar.d.ts.map +1 -1
- package/dist/views/MessageInput/UploadBar.js +2 -29
- package/dist/views/MessageInput/UploadBar.js.map +1 -1
- package/dist/views/MessageInput/UploadDragNDrop.d.ts.map +1 -1
- package/dist/views/MessageInput/UploadDragNDrop.js +2 -3
- package/dist/views/MessageInput/UploadDragNDrop.js.map +1 -1
- package/dist/views/MessageInput/dictionary.d.ts +1 -1
- package/dist/views/MessageInput/dictionary.d.ts.map +1 -1
- package/dist/views/MessageInput/dictionary.js +0 -2
- package/dist/views/MessageInput/dictionary.js.map +1 -1
- package/dist/views/MessageInput/index.d.ts.map +1 -1
- package/dist/views/MessageInput/index.js +3 -4
- package/dist/views/MessageInput/index.js.map +1 -1
- package/dist/views/MessageInput/styled.d.ts +1 -3
- package/dist/views/MessageInput/styled.d.ts.map +1 -1
- package/dist/views/MessageInput/styled.js +11 -27
- package/dist/views/MessageInput/styled.js.map +1 -1
- package/dist/views/MinimizedHeader.d.ts.map +1 -1
- package/dist/views/MinimizedHeader.js +2 -4
- package/dist/views/MinimizedHeader.js.map +1 -1
- package/dist/views/Stacks.d.ts.map +1 -1
- package/dist/views/Stacks.js +23 -28
- package/dist/views/Stacks.js.map +1 -1
- package/dist/views/Steps/FlowChart/NodeStep.d.ts.map +1 -1
- package/dist/views/Steps/FlowChart/NodeStep.js +3 -3
- package/dist/views/Steps/FlowChart/NodeStep.js.map +1 -1
- package/dist/views/Steps/StepModal.d.ts.map +1 -1
- package/dist/views/Steps/StepModal.js +4 -6
- package/dist/views/Steps/StepModal.js.map +1 -1
- package/dist/views/Steps/dictionary.d.ts +1 -1
- package/dist/views/Steps/index.d.ts.map +1 -1
- package/dist/views/Steps/index.js +3 -4
- package/dist/views/Steps/index.js.map +1 -1
- package/dist/views/Steps/utils.d.ts +2 -1
- package/dist/views/Steps/utils.d.ts.map +1 -1
- package/dist/views/Steps/utils.js +8 -8
- package/dist/views/Steps/utils.js.map +1 -1
- package/dist/views/Tools.js +1 -1
- package/dist/views/Tools.js.map +1 -1
- package/dist/views/Workspaces/WorkspacesTab.d.ts.map +1 -1
- package/dist/views/Workspaces/WorkspacesTab.js +7 -10
- package/dist/views/Workspaces/WorkspacesTab.js.map +1 -1
- package/dist/views/Workspaces/index.js +4 -2
- package/dist/views/Workspaces/index.js.map +1 -1
- package/package.json +11 -12
- package/src/StackspotAIWidget.tsx +30 -33
- package/src/app-metadata.json +12 -16
- package/src/components/AdaptiveTextArea.tsx +1 -1
- package/src/components/AgentCard/AgentCardCreate.tsx +3 -5
- package/src/components/AgentCard/index.tsx +7 -7
- package/src/components/ButtonFavorite.tsx +20 -47
- package/src/components/Code.tsx +31 -36
- package/src/components/ComponentNavigator.tsx +4 -8
- package/src/components/FadingOverflow.tsx +6 -7
- package/src/components/FileDescription.tsx +14 -10
- package/src/components/HistoryList.tsx +1 -1
- package/src/components/ListResource.tsx +5 -5
- package/src/components/Markdown.tsx +1 -1
- package/src/components/Modal.tsx +2 -4
- package/src/components/QuickStartButton.tsx +5 -4
- package/src/components/RightPanelForm.tsx +20 -13
- package/src/components/RightPanelTabs.tsx +4 -32
- package/src/components/Selector/index.tsx +17 -13
- package/src/components/Selector/styled.ts +8 -5
- package/src/components/StackedBadge.tsx +5 -5
- package/src/components/TabManager.tsx +8 -36
- package/src/components/ToolBadge.tsx +39 -129
- package/src/components/WorkspaceTabNavigator.tsx +22 -25
- package/src/components/form/DescribedCheckboxGroup.tsx +90 -65
- package/src/components/form/DescribedRadioGroup.tsx +79 -46
- package/src/index.ts +0 -2
- package/src/layout.css +1 -27
- package/src/right-panel/DefaultPanel.tsx +3 -7
- package/src/state/ChatEntry.ts +3 -4
- package/src/types.ts +4 -3
- package/src/views/Agents/AgentDescription.tsx +4 -5
- package/src/views/Agents/AgentsPanel.tsx +11 -12
- package/src/views/Agents/AgentsTab.tsx +37 -56
- package/src/views/Chat/AgentInfo.tsx +7 -6
- package/src/views/Chat/ChatMessage.tsx +109 -118
- package/src/views/Chat/StepsList.tsx +10 -11
- package/src/views/Chat/styled.ts +8 -2
- package/src/views/ChatHistory/HistoryItem.tsx +12 -19
- package/src/views/ChatHistory/index.tsx +1 -1
- package/src/views/ChatHistory/styled.ts +3 -5
- package/src/views/ChatTabSelection.tsx +2 -3
- package/src/views/Editor.tsx +9 -14
- package/src/views/Home/BuiltInAgent.tsx +7 -8
- package/src/views/Home/CustomAgent.tsx +3 -3
- package/src/views/Home/index.tsx +1 -1
- package/src/views/Home/styled.ts +21 -22
- package/src/views/KSDocument.tsx +7 -8
- package/src/views/KnowledgeSources.tsx +24 -66
- package/src/views/MessageInput/AgentSelector.tsx +10 -8
- package/src/views/MessageInput/ButtonAgent.tsx +24 -12
- package/src/views/MessageInput/ButtonBar.tsx +25 -21
- package/src/views/MessageInput/ContextBar.tsx +12 -14
- package/src/views/MessageInput/QuickCommandSelector.tsx +2 -2
- package/src/views/MessageInput/SelectContent.tsx +39 -69
- package/src/views/MessageInput/UploadBar.tsx +1 -39
- package/src/views/MessageInput/UploadDragNDrop.tsx +2 -5
- package/src/views/MessageInput/dictionary.ts +0 -2
- package/src/views/MessageInput/index.tsx +5 -7
- package/src/views/MessageInput/styled.ts +12 -28
- package/src/views/MinimizedHeader.tsx +4 -7
- package/src/views/Stacks.tsx +31 -54
- package/src/views/Steps/FlowChart/NodeStep.tsx +6 -4
- package/src/views/Steps/StepModal.tsx +14 -18
- package/src/views/Steps/index.tsx +4 -5
- package/src/views/Steps/utils.tsx +9 -9
- package/src/views/Tools.tsx +0 -1
- package/src/views/Workspaces/WorkspacesTab.tsx +17 -21
- package/src/views/Workspaces/index.tsx +4 -2
- package/dist/components/Accordion.d.ts +0 -20
- package/dist/components/Accordion.d.ts.map +0 -1
- package/dist/components/Accordion.js +0 -51
- package/dist/components/Accordion.js.map +0 -1
- package/dist/components/FallbackBoundary/ErrorBoundary.d.ts +0 -33
- package/dist/components/FallbackBoundary/ErrorBoundary.d.ts.map +0 -1
- package/dist/components/FallbackBoundary/ErrorBoundary.js +0 -52
- package/dist/components/FallbackBoundary/ErrorBoundary.js.map +0 -1
- package/dist/components/FallbackBoundary/Loading.d.ts +0 -2
- package/dist/components/FallbackBoundary/Loading.d.ts.map +0 -1
- package/dist/components/FallbackBoundary/Loading.js +0 -12
- package/dist/components/FallbackBoundary/Loading.js.map +0 -1
- package/dist/components/FallbackBoundary/index.d.ts +0 -17
- package/dist/components/FallbackBoundary/index.d.ts.map +0 -1
- package/dist/components/FallbackBoundary/index.js +0 -9
- package/dist/components/FallbackBoundary/index.js.map +0 -1
- package/dist/components/IconInput.d.ts +0 -10
- package/dist/components/IconInput.d.ts.map +0 -1
- package/dist/components/IconInput.js +0 -61
- package/dist/components/IconInput.js.map +0 -1
- package/dist/components/OverlayMenu.d.ts +0 -21
- package/dist/components/OverlayMenu.d.ts.map +0 -1
- package/dist/components/OverlayMenu.js +0 -79
- package/dist/components/OverlayMenu.js.map +0 -1
- package/dist/components/ProgressBar.d.ts +0 -37
- package/dist/components/ProgressBar.d.ts.map +0 -1
- package/dist/components/ProgressBar.js +0 -131
- package/dist/components/ProgressBar.js.map +0 -1
- package/dist/components/Tooltip/Tooltip.d.ts +0 -37
- package/dist/components/Tooltip/Tooltip.d.ts.map +0 -1
- package/dist/components/Tooltip/Tooltip.js +0 -30
- package/dist/components/Tooltip/Tooltip.js.map +0 -1
- package/dist/components/Tooltip/TooltipAPI.d.ts +0 -29
- package/dist/components/Tooltip/TooltipAPI.d.ts.map +0 -1
- package/dist/components/Tooltip/TooltipAPI.js +0 -107
- package/dist/components/Tooltip/TooltipAPI.js.map +0 -1
- package/dist/components/Tooltip/context.d.ts +0 -5
- package/dist/components/Tooltip/context.d.ts.map +0 -1
- package/dist/components/Tooltip/context.js +0 -18
- package/dist/components/Tooltip/context.js.map +0 -1
- package/dist/components/Tooltip/index.d.ts +0 -3
- package/dist/components/Tooltip/index.d.ts.map +0 -1
- package/dist/components/Tooltip/index.js +0 -3
- package/dist/components/Tooltip/index.js.map +0 -1
- package/dist/components/Tooltip/style.d.ts +0 -4
- package/dist/components/Tooltip/style.d.ts.map +0 -1
- package/dist/components/Tooltip/style.js +0 -22
- package/dist/components/Tooltip/style.js.map +0 -1
- package/dist/components/Tooltip/types.d.ts +0 -27
- package/dist/components/Tooltip/types.d.ts.map +0 -1
- package/dist/components/Tooltip/types.js +0 -2
- package/dist/components/Tooltip/types.js.map +0 -1
- package/src/components/Accordion.tsx +0 -75
- package/src/components/FallbackBoundary/ErrorBoundary.tsx +0 -71
- package/src/components/FallbackBoundary/Loading.tsx +0 -14
- package/src/components/FallbackBoundary/index.tsx +0 -26
- package/src/components/IconInput.tsx +0 -73
- package/src/components/OverlayMenu.tsx +0 -133
- package/src/components/ProgressBar.tsx +0 -183
- package/src/components/Tooltip/Tooltip.tsx +0 -78
- package/src/components/Tooltip/TooltipAPI.ts +0 -101
- package/src/components/Tooltip/context.tsx +0 -24
- package/src/components/Tooltip/index.ts +0 -2
- package/src/components/Tooltip/style.tsx +0 -24
- package/src/components/Tooltip/types.ts +0 -28
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FallbackBoundary } from '@stack-spot/citric-react'
|
|
2
2
|
import { theme } from '@stack-spot/portal-theme'
|
|
3
3
|
import { styled } from 'styled-components'
|
|
4
4
|
import { panelAnimationTime } from '../right-panel/constants'
|
|
5
5
|
import { PropsOf } from '../types'
|
|
6
6
|
import { AutoFocus } from './AutoFocus'
|
|
7
|
-
import { FallbackBoundary } from './FallbackBoundary'
|
|
8
7
|
|
|
9
8
|
const Form = styled.form`
|
|
10
9
|
display: flex;
|
|
@@ -14,7 +13,7 @@ const Form = styled.form`
|
|
|
14
13
|
flex: 1;
|
|
15
14
|
gap: 20px;
|
|
16
15
|
|
|
17
|
-
> .content, .content-navigator .content, .content-navigator:not(.full) {
|
|
16
|
+
> .content, .content-navigator > .content, .content-navigator:not(.full) {
|
|
18
17
|
display: flex;
|
|
19
18
|
flex-direction: column;
|
|
20
19
|
gap: 8px;
|
|
@@ -52,22 +51,30 @@ const Form = styled.form`
|
|
|
52
51
|
> button {
|
|
53
52
|
margin-right: auto;
|
|
54
53
|
}
|
|
55
|
-
|
|
56
|
-
.search {
|
|
57
|
-
margin-bottom: 8px;
|
|
58
|
-
}
|
|
59
|
-
|
|
54
|
+
|
|
60
55
|
.option-list {
|
|
61
56
|
overflow: auto;
|
|
57
|
+
> .row {
|
|
58
|
+
gap: 6px;
|
|
59
|
+
align-items: start;
|
|
60
|
+
}
|
|
61
|
+
[data-citric="accordion"] {
|
|
62
|
+
background-color: ${theme.color.light[400]};
|
|
63
|
+
flex: 1;
|
|
64
|
+
> header {
|
|
65
|
+
min-height: 24px;
|
|
66
|
+
padding: 8px 10px;
|
|
67
|
+
align-items: center;
|
|
68
|
+
p {
|
|
69
|
+
flex: 1;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
62
73
|
}
|
|
63
74
|
|
|
64
|
-
|
|
75
|
+
.filtered-out {
|
|
65
76
|
opacity: 0.5;
|
|
66
77
|
}
|
|
67
|
-
|
|
68
|
-
${Card} svg {
|
|
69
|
-
fill: transparent;
|
|
70
|
-
}
|
|
71
78
|
`
|
|
72
79
|
|
|
73
80
|
/**
|
|
@@ -1,43 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useMemo
|
|
3
|
-
import styled from 'styled-components'
|
|
1
|
+
import { Tab, Tabs } from '@stack-spot/citric-react'
|
|
2
|
+
import { useMemo } from 'react'
|
|
4
3
|
import { RightPanelForm } from './RightPanelForm'
|
|
5
4
|
|
|
6
|
-
interface Tab {
|
|
7
|
-
title: string,
|
|
8
|
-
content: React.ReactNode,
|
|
9
|
-
}
|
|
10
|
-
|
|
11
5
|
interface Props {
|
|
12
6
|
tabs: Tab[],
|
|
13
7
|
}
|
|
14
8
|
|
|
15
|
-
const StyledTabs = styled(Tabs)`
|
|
16
|
-
> button {
|
|
17
|
-
flex: 1;
|
|
18
|
-
padding: 8px 0;
|
|
19
|
-
}
|
|
20
|
-
`
|
|
21
|
-
|
|
22
|
-
const StyledTabsItem = styled(TabsItem)`
|
|
23
|
-
flex: 1;
|
|
24
|
-
overflow: hidden;
|
|
25
|
-
`
|
|
26
|
-
|
|
27
9
|
/**
|
|
28
10
|
* Tabs for the right panel content.
|
|
29
11
|
*/
|
|
30
12
|
export const RightPanelTabs = ({ tabs }: Props) => {
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
<StyledTabsItem key={title} title={title}>
|
|
34
|
-
<RightPanelForm>{content}</RightPanelForm>
|
|
35
|
-
</StyledTabsItem>
|
|
36
|
-
)), [tabs])
|
|
37
|
-
|
|
38
|
-
return (
|
|
39
|
-
<StyledTabs activeIndex={currentTab} onChange={setCurrentTab}>
|
|
40
|
-
{tabItems}
|
|
41
|
-
</StyledTabs>
|
|
42
|
-
)
|
|
13
|
+
const tabItems = useMemo(() => tabs.map(t => ({ ...t, content: <RightPanelForm>{t.content}</RightPanelForm> })), [tabs])
|
|
14
|
+
return <Tabs tabs={tabItems} />
|
|
43
15
|
}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ExternalLink } from '@citric/icons'
|
|
3
|
-
import { IconButton } from '@citric/ui'
|
|
1
|
+
import { FallbackBoundary, IconLink, Text } from '@stack-spot/citric-react'
|
|
4
2
|
import { useKeyboardControls } from '@stack-spot/portal-components'
|
|
5
3
|
import { AgentVisibilityLevel } from '@stack-spot/portal-network'
|
|
6
4
|
import { Dictionary, interpolate, useTranslate } from '@stack-spot/portal-translate'
|
|
@@ -9,7 +7,6 @@ import { useCurrentChatState, useWidgetState } from '../../context/hooks'
|
|
|
9
7
|
import { getUrlToStackSpotAI } from '../../utils/url'
|
|
10
8
|
import { ButtonFavorite } from '../ButtonFavorite'
|
|
11
9
|
import { Fading } from '../Fading'
|
|
12
|
-
import { FallbackBoundary } from '../FallbackBoundary'
|
|
13
10
|
import { SelectorBox } from './styled'
|
|
14
11
|
|
|
15
12
|
type SectionVisibility = AgentVisibilityLevel
|
|
@@ -100,10 +97,17 @@ const ListItem = <T extends Item>({ item, selectorConfig, onSelect, favorite }:
|
|
|
100
97
|
>
|
|
101
98
|
{renderComponentItem(item)}
|
|
102
99
|
</button>
|
|
103
|
-
<
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
100
|
+
<IconLink
|
|
101
|
+
icon="ExternalLink"
|
|
102
|
+
title={linkTitle}
|
|
103
|
+
aria-label={linkTitle}
|
|
104
|
+
href={`${getUrlToStackSpotAI()}${urlBuilder(item)}`}
|
|
105
|
+
target="_blank"
|
|
106
|
+
/>
|
|
107
|
+
<ButtonFavorite
|
|
108
|
+
appearance="text"
|
|
109
|
+
favorite={{ ...favorite, idOrSlug: favorite?.favoriteIsSlug ? item.slug : item?.id, listFavorites }}
|
|
110
|
+
/>
|
|
107
111
|
</li>
|
|
108
112
|
)
|
|
109
113
|
}
|
|
@@ -128,9 +132,9 @@ const List = <T extends Item>({ selectorConfig, filter, visibility, onSelect, fa
|
|
|
128
132
|
}, [filter, items, visibility, favorites])
|
|
129
133
|
|
|
130
134
|
|
|
131
|
-
if (!items.length) return <Text className="empty"
|
|
135
|
+
if (!items.length) return <Text className="empty" color="light.700">{interpolate(t.noData, selectorConfig.resourceName)}</Text>
|
|
132
136
|
if (!filtered?.length)
|
|
133
|
-
<Text className="empty"
|
|
137
|
+
<Text className="empty" color="light.700">{interpolate(t.noResults, selectorConfig.resourceName)}</Text>
|
|
134
138
|
|
|
135
139
|
return (
|
|
136
140
|
<ul className="selector-list">
|
|
@@ -180,8 +184,8 @@ const SelectorContent = ({ filter, onClose, selectorConfig, favorite }: ContentP
|
|
|
180
184
|
return (
|
|
181
185
|
<div ref={ref}>
|
|
182
186
|
<header>
|
|
183
|
-
|
|
184
|
-
<Text
|
|
187
|
+
{icon}
|
|
188
|
+
<Text tag="h3">{resourceName}</Text>
|
|
185
189
|
</header>
|
|
186
190
|
<div className="body">
|
|
187
191
|
{isGroupResourcesByScope && (
|
|
@@ -190,7 +194,7 @@ const SelectorContent = ({ filter, onClose, selectorConfig, favorite }: ContentP
|
|
|
190
194
|
{sections.map(createSectionItem)}
|
|
191
195
|
</ul>
|
|
192
196
|
)}
|
|
193
|
-
<FallbackBoundary message={interpolate(t.error, selectorConfig.resourceName)}
|
|
197
|
+
<FallbackBoundary message={interpolate(t.error, selectorConfig.resourceName)}>
|
|
194
198
|
<List filter={filter} visibility={visibility} selectorConfig={selectorConfig} onSelect={onSelectItem} favorite={favorite} />
|
|
195
199
|
</FallbackBoundary>
|
|
196
200
|
</div>
|
|
@@ -40,13 +40,16 @@ export const SelectorBox = styled.div<{ $tabsCount: number }>`
|
|
|
40
40
|
flex-direction: row;
|
|
41
41
|
gap: 8px;
|
|
42
42
|
align-items: center;
|
|
43
|
-
padding: 8px;
|
|
43
|
+
padding: 0 8px;
|
|
44
44
|
margin-bottom: 4px;
|
|
45
|
-
font-family: 'San Francisco';
|
|
46
|
-
text-transform: uppercase;
|
|
47
|
-
font-weight: 500;
|
|
48
|
-
font-size: 11px;
|
|
49
45
|
background-color: ${theme.color.light[500]};
|
|
46
|
+
height: 40px;
|
|
47
|
+
h3 {
|
|
48
|
+
text-transform: uppercase;
|
|
49
|
+
font-weight: 500;
|
|
50
|
+
font-size: 12px;
|
|
51
|
+
margin: 0;
|
|
52
|
+
}
|
|
50
53
|
}
|
|
51
54
|
|
|
52
55
|
.body {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Text } from '@stack-spot/citric-react'
|
|
2
2
|
import { theme } from '@stack-spot/portal-theme'
|
|
3
3
|
import { DetailedHTMLProps, HTMLAttributes } from 'react'
|
|
4
4
|
import { styled } from 'styled-components'
|
|
@@ -46,9 +46,9 @@ const Styled = styled.div`
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
.citric-icon {
|
|
50
|
+
margin: 1px;
|
|
51
|
+
font-size: 10px;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
img, svg {
|
|
@@ -67,7 +67,7 @@ export const StackedBadge = ({ label, images, ...props }: Props) => (
|
|
|
67
67
|
<li key={key || i}>
|
|
68
68
|
{url
|
|
69
69
|
? <img alt={name} aria-label={name} title={name} src={url} />
|
|
70
|
-
: <
|
|
70
|
+
: <span aria-label={name} title={name}>{icon}</span>
|
|
71
71
|
}
|
|
72
72
|
</li>
|
|
73
73
|
),
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
/* Tabs to select chat and add new chats */
|
|
2
2
|
|
|
3
|
-
import { Button, IconBox } from '@citric
|
|
4
|
-
import { TimesMini } from '@citric/icons'
|
|
5
|
-
import { IconButton } from '@citric/ui'
|
|
3
|
+
import { Button, IconBox, IconButton } from '@stack-spot/citric-react'
|
|
6
4
|
import { listToClass, theme } from '@stack-spot/portal-theme'
|
|
7
5
|
import { Dictionary, useTranslate } from '@stack-spot/portal-translate'
|
|
8
6
|
import { last } from 'lodash'
|
|
@@ -71,14 +69,6 @@ const Tabs = styled.nav<{ $numberOfExtraButtons: number }>`
|
|
|
71
69
|
}
|
|
72
70
|
}
|
|
73
71
|
|
|
74
|
-
${IconButton} {
|
|
75
|
-
display: flex;
|
|
76
|
-
align-items: center;
|
|
77
|
-
justify-content: center;
|
|
78
|
-
background-color: transparent;
|
|
79
|
-
border: none;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
72
|
.list-overflow {
|
|
83
73
|
max-width: ${({ $numberOfExtraButtons }) => `calc(100% - ${$numberOfExtraButtons * (EXTRA_BTN_SIZE + EXTRA_BTN_MARGIN * 2)}px)`};
|
|
84
74
|
}
|
|
@@ -145,21 +135,6 @@ const Tabs = styled.nav<{ $numberOfExtraButtons: number }>`
|
|
|
145
135
|
mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 70%, rgba(0, 0, 0, 0) 100%);
|
|
146
136
|
}
|
|
147
137
|
}
|
|
148
|
-
|
|
149
|
-
${IconButton} {
|
|
150
|
-
padding: 0;
|
|
151
|
-
width: 18px;
|
|
152
|
-
height: 18px;
|
|
153
|
-
transition: background-color 0.3s;
|
|
154
|
-
|
|
155
|
-
svg {
|
|
156
|
-
height: 14px;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
&:hover {
|
|
160
|
-
background-color: ${theme.color.light[600]};
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
138
|
}
|
|
164
139
|
}
|
|
165
140
|
`
|
|
@@ -185,36 +160,33 @@ export function TabManager<T, Key extends React.Key>(
|
|
|
185
160
|
const tabItems = useMemo(() => tabs.map((tab) => (
|
|
186
161
|
<li key={keygen(tab)} className={keygen(tab) === active ? 'active' : undefined} onClick={onClickTab}>
|
|
187
162
|
<button className="label" onClick={() => onSelect(tab)}><FadingOverflow>{renderLabel(tab)}</FadingOverflow></button>
|
|
188
|
-
{tabs.length > 1 && <IconButton aria-label={t.close} title={t.close} onClick={() => onRemove(tab)}
|
|
163
|
+
{tabs.length > 1 && <IconButton icon="TimesMini" aria-label={t.close} title={t.close} onClick={() => onRemove(tab)} />}
|
|
189
164
|
</li>
|
|
190
165
|
)), [tabs, active])
|
|
191
166
|
|
|
192
|
-
const extras = useMemo(() => buttons.map(({ ariaLabel, label, onClick, icon, className, style }) => (
|
|
167
|
+
const extras = useMemo(() => buttons.map(({ ariaLabel, label, onClick, group, icon, className, style }) => (
|
|
193
168
|
<>
|
|
194
169
|
{label ?
|
|
195
170
|
<Button
|
|
196
|
-
|
|
171
|
+
style={{ ...style, paddingLeft: 0, marginRight: '4px', fontWeight: '400' }}
|
|
197
172
|
colorScheme="light"
|
|
198
173
|
size="md"
|
|
199
174
|
key={ariaLabel}
|
|
200
175
|
title={label}
|
|
201
|
-
style={style}
|
|
202
176
|
onClick={onClick}>
|
|
203
|
-
<IconBox size="sm"
|
|
204
|
-
{icon}
|
|
205
|
-
</IconBox>
|
|
177
|
+
<IconBox group={group} icon={icon as any} size="sm" style={{ width: '32px', height: '16px', paddingInline: '8px' }} />
|
|
206
178
|
{label}
|
|
207
179
|
</Button> :
|
|
208
180
|
<IconButton
|
|
209
181
|
key={ariaLabel}
|
|
182
|
+
group={group}
|
|
183
|
+
icon={icon as any}
|
|
210
184
|
aria-label={ariaLabel}
|
|
211
185
|
title={label}
|
|
212
186
|
className={listToClass([className, 'extra'])}
|
|
213
187
|
style={style}
|
|
214
188
|
onClick={onClick}
|
|
215
|
-
|
|
216
|
-
{icon}
|
|
217
|
-
</IconButton>}
|
|
189
|
+
/>}
|
|
218
190
|
</>)), [buttons])
|
|
219
191
|
|
|
220
192
|
// when a new tab is added, we should scroll to it if there are more tabs that we can show.
|
|
@@ -1,148 +1,58 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { AnimatedHeight } from '@stack-spot/portal-components/AnimatedHeight'
|
|
5
|
-
import { ColorSchemeKey, listToClass, theme } from '@stack-spot/portal-theme'
|
|
6
|
-
import { Dictionary, useTranslate } from '@stack-spot/portal-translate'
|
|
7
|
-
import { get } from 'lodash'
|
|
8
|
-
import { DetailedHTMLProps, HTMLAttributes, useState } from 'react'
|
|
1
|
+
import { Icon } from '@stack-spot/citric-icons'
|
|
2
|
+
import { Accordion, Card, ImageBox, ImageWithFallback, Text } from '@stack-spot/citric-react'
|
|
3
|
+
import { theme } from '@stack-spot/portal-theme'
|
|
9
4
|
import { styled } from 'styled-components'
|
|
10
|
-
import { FastOmit } from 'styled-components/dist/types'
|
|
11
5
|
import { toPrecision } from '../views/Steps/utils'
|
|
12
6
|
|
|
13
|
-
|
|
7
|
+
type Props = Omit<React.JSX.IntrinsicElements['div'], 'onChange'> & {
|
|
14
8
|
name: string,
|
|
15
9
|
duration?: number,
|
|
16
10
|
image?: string,
|
|
17
11
|
description?: string,
|
|
18
|
-
appearance?: 'round' | 'square',
|
|
19
|
-
backgroundColor?: ColorSchemeKey,
|
|
20
12
|
}
|
|
21
13
|
|
|
22
|
-
const Styled = styled.div
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
14
|
+
const Styled = styled.div`
|
|
15
|
+
[data-citric="card"] {
|
|
16
|
+
flex-direction: row;
|
|
17
|
+
gap: 8px;
|
|
18
|
+
border-radius: ${theme.radius.xl};
|
|
19
|
+
border: none;
|
|
20
|
+
align-items: center;
|
|
21
|
+
padding: 4px 16px 4px 4px;
|
|
26
22
|
}
|
|
27
|
-
|
|
28
|
-
.tool-header {
|
|
29
|
-
padding: 4px 8px 4px 4px;
|
|
30
|
-
display: flex;
|
|
31
|
-
flex-direction: column;
|
|
32
|
-
gap: 12px;
|
|
33
|
-
position: relative;
|
|
34
23
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
border-radius: 50%;
|
|
43
|
-
overflow: hidden;
|
|
44
|
-
flex-shrink: 0;
|
|
45
|
-
}
|
|
46
|
-
.name {
|
|
47
|
-
flex: 1;
|
|
48
|
-
overflow: hidden;
|
|
49
|
-
text-overflow: ellipsis;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.btn-expand {
|
|
54
|
-
display: none;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.duration {
|
|
58
|
-
opacity: 0.7;
|
|
59
|
-
text-align: right;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
&.with-description {
|
|
64
|
-
.tool-header {
|
|
65
|
-
&:before {
|
|
66
|
-
content: '';
|
|
67
|
-
top: 32px;
|
|
68
|
-
bottom: 8px;
|
|
69
|
-
left: 15px;
|
|
70
|
-
width: 1px;
|
|
71
|
-
background-color: ${theme.color.light[700]};
|
|
72
|
-
opacity: 0.3;
|
|
73
|
-
position: absolute;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.btn-expand {
|
|
77
|
-
display: flex;
|
|
78
|
-
transition: transform 0.3s ease-in-out;
|
|
79
|
-
&.open {
|
|
80
|
-
transform: rotate(180deg);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.description {
|
|
85
|
-
padding: 0 0 10px 20px;
|
|
86
|
-
opacity: 0.7;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
&.round {
|
|
92
|
-
.tool-header-wrapper {
|
|
93
|
-
border-radius: 30px;
|
|
94
|
-
}
|
|
95
|
-
&:not(.with-description) {
|
|
96
|
-
.tool-header-wrapper {
|
|
97
|
-
padding-right: 10px;
|
|
24
|
+
[data-citric="accordion"] {
|
|
25
|
+
background-color: ${theme.color.light[500]};
|
|
26
|
+
> header > label {
|
|
27
|
+
padding: 6px 10px 6px 6px;
|
|
28
|
+
font: ${theme.font.body2};
|
|
29
|
+
input:before {
|
|
30
|
+
font-size: 12px !important;
|
|
98
31
|
}
|
|
99
32
|
}
|
|
100
33
|
}
|
|
101
34
|
`
|
|
102
35
|
|
|
103
36
|
export const ToolBadge = (
|
|
104
|
-
{ name, duration, image, description,
|
|
37
|
+
{ name, duration, image, description, ...props }: Props,
|
|
105
38
|
) => {
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
<ChevronDown />
|
|
126
|
-
</IconButton>
|
|
127
|
-
</div>
|
|
128
|
-
{showDescription && <Text className="description" colorScheme="light.700">{description}</Text>}
|
|
129
|
-
</div>
|
|
130
|
-
)
|
|
131
|
-
|
|
132
|
-
return (
|
|
133
|
-
<Styled {...props} $backgroundColor={backgroundColor} className={rootClass}>
|
|
134
|
-
{description ? <AnimatedHeight className={wrapperClass}>{content}</AnimatedHeight> : <div className={wrapperClass}>{content}</div>}
|
|
135
|
-
</Styled>
|
|
136
|
-
)
|
|
39
|
+
const header = <>
|
|
40
|
+
<ImageBox><ImageWithFallback src={image} fallback={<Icon icon="Cog" className="tool-image" />} /></ImageBox>
|
|
41
|
+
<Text color="light.700" className="name" style={{ flex: 1 }}>{name}</Text>
|
|
42
|
+
{duration !== undefined && <Text color="light.700" className="duration">
|
|
43
|
+
{toPrecision(duration)}s
|
|
44
|
+
</Text>}
|
|
45
|
+
</>
|
|
46
|
+
|
|
47
|
+
return <Styled>
|
|
48
|
+
{description ? (
|
|
49
|
+
<Accordion
|
|
50
|
+
appearance="card"
|
|
51
|
+
header={header}
|
|
52
|
+
{...props}
|
|
53
|
+
>
|
|
54
|
+
<Text className="description" color="light.700">{description}</Text>
|
|
55
|
+
</Accordion>
|
|
56
|
+
) : <Card {...props}>{header}</Card>}
|
|
57
|
+
</Styled>
|
|
137
58
|
}
|
|
138
|
-
|
|
139
|
-
const dictionary = {
|
|
140
|
-
en: {
|
|
141
|
-
open: 'Open',
|
|
142
|
-
close: 'Close',
|
|
143
|
-
},
|
|
144
|
-
pt: {
|
|
145
|
-
open: 'Abrir',
|
|
146
|
-
close: 'Fechar',
|
|
147
|
-
},
|
|
148
|
-
} satisfies Dictionary
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { Avatar, IconButton } from '@citric/ui'
|
|
1
|
+
import { Icon } from '@stack-spot/citric-icons'
|
|
2
|
+
import { FieldGroup, IconButton, ImageBox, Input, Row, Text } from '@stack-spot/citric-react'
|
|
4
3
|
import { Placeholder } from '@stack-spot/portal-components/Placeholder'
|
|
5
4
|
import { workspaceAiClient } from '@stack-spot/portal-network'
|
|
6
5
|
import { WorkspaceResponse, WorkspaceVisibilityLevelEnum } from '@stack-spot/portal-network/api/workspace-ai'
|
|
@@ -9,7 +8,6 @@ import { memo, useMemo, useState } from 'react'
|
|
|
9
8
|
import { useRightPanel } from '../right-panel/hooks'
|
|
10
9
|
import { ButtonFavorite } from './ButtonFavorite'
|
|
11
10
|
import { ComponentNavigator, ComponentNavigatorProps, NavigationComponent, NavigationMap, useComponentNavigation } from './ComponentNavigator'
|
|
12
|
-
import { IconInput } from './IconInput'
|
|
13
11
|
import { ListResource } from './ListResource'
|
|
14
12
|
|
|
15
13
|
interface CardSpaceProps {
|
|
@@ -20,25 +18,24 @@ interface CardSpaceProps {
|
|
|
20
18
|
}
|
|
21
19
|
|
|
22
20
|
export const CardSpace = ({ onClick, name, icon, logoUrl }: CardSpaceProps) =>
|
|
23
|
-
<
|
|
21
|
+
<Row
|
|
24
22
|
onClick={onClick}
|
|
25
23
|
flex={1}
|
|
26
|
-
alignItems="center"
|
|
27
24
|
justifyContent="space-between"
|
|
28
25
|
mr={2}
|
|
29
26
|
bg="light.400"
|
|
30
|
-
|
|
27
|
+
radius="sm"
|
|
31
28
|
p={3}
|
|
32
|
-
|
|
29
|
+
style={{ cursor: 'pointer' }}
|
|
33
30
|
>
|
|
34
|
-
<
|
|
35
|
-
<
|
|
36
|
-
{logoUrl ? <
|
|
37
|
-
</
|
|
31
|
+
<Row gap="8px">
|
|
32
|
+
<ImageBox appearance="square">
|
|
33
|
+
{logoUrl ? <img src={logoUrl} /> : icon}
|
|
34
|
+
</ImageBox>
|
|
38
35
|
<Text appearance="body2">{name}</Text>
|
|
39
|
-
</
|
|
40
|
-
<IconButton
|
|
41
|
-
</
|
|
36
|
+
</Row>
|
|
37
|
+
<IconButton icon="ArrowRight" />
|
|
38
|
+
</Row>
|
|
42
39
|
|
|
43
40
|
interface WorkspaceSourcesTabProps {
|
|
44
41
|
visibility: WorkspaceVisibilityLevelEnum,
|
|
@@ -91,16 +88,17 @@ const WorkspaceSourcesTab = ({ visibility, onClick }: WorkspaceSourcesTabProps)
|
|
|
91
88
|
|
|
92
89
|
return (
|
|
93
90
|
<>
|
|
94
|
-
<
|
|
95
|
-
<
|
|
96
|
-
|
|
91
|
+
<FieldGroup fullWidth style={{ alignSelf: 'stretch' }}>
|
|
92
|
+
<Icon icon="Search" />
|
|
93
|
+
<Input type="search" value={filter} onChange={setFilter} />
|
|
94
|
+
</FieldGroup>
|
|
97
95
|
|
|
98
96
|
{!!filtered.length &&
|
|
99
97
|
<ListResource
|
|
100
98
|
list={filtered}
|
|
101
99
|
keygen={w => w.id}
|
|
102
100
|
style={{ gap: '6px', display: 'flex', flexDirection: 'column' }}
|
|
103
|
-
renderLabel={w => <CardSpace name={w.name} logoUrl={w.logo} icon={<Spaces />} onClick={() => onClick(w)} />}
|
|
101
|
+
renderLabel={w => <CardSpace name={w.name} logoUrl={w.logo} icon={<Icon icon="Spaces" />} onClick={() => onClick(w)} />}
|
|
104
102
|
renderAfterElement={(w) =>
|
|
105
103
|
<ButtonFavorite favorite={{ idOrSlug: w?.id, listFavorites, onAddFavorite, onRemoveFavorite }} />}
|
|
106
104
|
optionClassName={w => (filter && !w.name.toLocaleLowerCase().includes(filter.toLocaleLowerCase()))
|
|
@@ -110,26 +108,25 @@ const WorkspaceSourcesTab = ({ visibility, onClick }: WorkspaceSourcesTabProps)
|
|
|
110
108
|
className="option-list"
|
|
111
109
|
/>
|
|
112
110
|
}
|
|
113
|
-
<
|
|
111
|
+
<div style={{ width: '100%' }}>
|
|
114
112
|
{!!workspaces.length && !filtered.length &&
|
|
115
113
|
<Placeholder title={t.noSearchResults} description={t.noSearchResultsDescription} className="no-data-placeholder" />}
|
|
116
114
|
{!workspaces.length && <Placeholder title={t.noData} description={t.noDataDescription} />}
|
|
117
|
-
</
|
|
115
|
+
</div>
|
|
118
116
|
</>
|
|
119
117
|
)
|
|
120
118
|
}
|
|
121
119
|
|
|
122
|
-
|
|
123
120
|
const WorkspaceHeader = <T extends NavigationMap, K extends keyof T>({ data }: { data: NavigationComponent<T, K> }) => {
|
|
124
121
|
const { close: closeRightPanel } = useRightPanel()
|
|
125
122
|
const workspaceId = (data.props as any)['workspaceId']
|
|
126
123
|
if (!workspaceId) return
|
|
127
124
|
|
|
128
125
|
const workspace = workspaceAiClient.workspaceAi.useQuery({ id: workspaceId })
|
|
129
|
-
return <
|
|
126
|
+
return <Row justifyContent="space-between" flex={1}>
|
|
130
127
|
{data.component === 'workspaceResource' ? 'Spots' : workspace.name}
|
|
131
|
-
{data.fullScreen && <IconButton title={'t.close'} aria-label={'t.close'} onClick={closeRightPanel}
|
|
132
|
-
</
|
|
128
|
+
{data.fullScreen && <IconButton icon="Times" title={'t.close'} aria-label={'t.close'} onClick={closeRightPanel} />}
|
|
129
|
+
</Row>
|
|
133
130
|
}
|
|
134
131
|
|
|
135
132
|
interface WorkspaceTabNavigatorProps {
|