@vertesia/ui 1.0.0-dev.20260128.144200 → 1.0.0-dev.20260225.024852Z
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/lib/esm/core/components/InputList.js +1 -1
- package/lib/esm/core/components/InputList.js.map +1 -1
- package/lib/esm/core/components/Overlay.js +1 -1
- package/lib/esm/core/components/Overlay.js.map +1 -1
- package/lib/esm/core/components/SidePanel.js +8 -2
- package/lib/esm/core/components/SidePanel.js.map +1 -1
- package/lib/esm/core/components/Switch.js +1 -1
- package/lib/esm/core/components/Switch.js.map +1 -1
- package/lib/esm/core/components/index.js +0 -8
- package/lib/esm/core/components/index.js.map +1 -1
- package/lib/esm/core/components/shadcn/MessageBox.js.map +1 -0
- package/lib/esm/core/components/shadcn/Panel.js +13 -0
- package/lib/esm/core/components/shadcn/Panel.js.map +1 -0
- package/lib/esm/core/components/{Badge.js → shadcn/badge.js} +2 -2
- package/lib/esm/core/components/shadcn/badge.js.map +1 -0
- package/lib/esm/core/components/shadcn/command.js +1 -1
- package/lib/esm/core/components/shadcn/command.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/filterBar.js +73 -83
- package/lib/esm/core/components/shadcn/filters/filterBar.js.map +1 -1
- package/lib/esm/core/components/shadcn/index.js +4 -2
- package/lib/esm/core/components/shadcn/index.js.map +1 -1
- package/lib/esm/core/components/shadcn/modal/ConfirmModal.js +10 -0
- package/lib/esm/core/components/shadcn/modal/ConfirmModal.js.map +1 -0
- package/lib/esm/core/components/{DeleteModal.js → shadcn/modal/DeleteModal.js} +1 -1
- package/lib/esm/core/components/shadcn/modal/DeleteModal.js.map +1 -0
- package/lib/esm/core/components/shadcn/{dialog.js → modal/dialog.js} +19 -15
- package/lib/esm/core/components/shadcn/modal/dialog.js.map +1 -0
- package/lib/esm/core/components/shadcn/modal/index.js +4 -0
- package/lib/esm/core/components/shadcn/modal/index.js.map +1 -0
- package/lib/esm/core/components/shadcn/popover.js +4 -2
- package/lib/esm/core/components/shadcn/popover.js.map +1 -1
- package/lib/esm/core/components/shadcn/selectBox.js +19 -15
- package/lib/esm/core/components/shadcn/selectBox.js.map +1 -1
- package/lib/esm/core/components/shadcn/tabs.js +16 -14
- package/lib/esm/core/components/shadcn/tabs.js.map +1 -1
- package/lib/esm/core/components/shadcn/textarea.js +30 -2
- package/lib/esm/core/components/shadcn/textarea.js.map +1 -1
- package/lib/esm/core/components/shadcn/tooltip.js +5 -1
- package/lib/esm/core/components/shadcn/tooltip.js.map +1 -1
- package/lib/esm/features/agent/PayloadBuilder.js +45 -0
- package/lib/esm/features/agent/PayloadBuilder.js.map +1 -1
- package/lib/esm/features/agent/chat/AgentChart.js +12 -232
- package/lib/esm/features/agent/chat/AgentChart.js.map +1 -1
- package/lib/esm/features/agent/chat/AskUserWidget.js +2 -1
- package/lib/esm/features/agent/chat/AskUserWidget.js.map +1 -1
- package/lib/esm/features/agent/chat/DocumentPanel.js +46 -0
- package/lib/esm/features/agent/chat/DocumentPanel.js.map +1 -0
- package/lib/esm/features/agent/chat/DocumentTabBar.js +17 -0
- package/lib/esm/features/agent/chat/DocumentTabBar.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentConversation.js +159 -402
- package/lib/esm/features/agent/chat/ModernAgentConversation.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +99 -57
- package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/BatchProgressPanel.js +4 -4
- package/lib/esm/features/agent/chat/ModernAgentOutput/BatchProgressPanel.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js +4 -4
- package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.js +3 -3
- package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessageInput.js +25 -22
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessageInput.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessageItem.js +110 -55
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessageItem.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/StreamingMessage.js +2 -2
- package/lib/esm/features/agent/chat/ModernAgentOutput/StreamingMessage.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/ToolCallGroup.js +146 -55
- package/lib/esm/features/agent/chat/ModernAgentOutput/ToolCallGroup.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js +5 -6
- package/lib/esm/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/utils.js +110 -2
- package/lib/esm/features/agent/chat/ModernAgentOutput/utils.js.map +1 -1
- package/lib/esm/features/agent/chat/SkillWidgetProvider.js +28 -15
- package/lib/esm/features/agent/chat/SkillWidgetProvider.js.map +1 -1
- package/lib/esm/features/agent/chat/hooks/useAgentPlans.js +146 -0
- package/lib/esm/features/agent/chat/hooks/useAgentPlans.js.map +1 -0
- package/lib/esm/features/agent/chat/hooks/useAgentStream.js +180 -0
- package/lib/esm/features/agent/chat/hooks/useAgentStream.js.map +1 -0
- package/lib/esm/features/agent/chat/hooks/useDocumentPanel.js +100 -0
- package/lib/esm/features/agent/chat/hooks/useDocumentPanel.js.map +1 -0
- package/lib/esm/features/agent/chat/hooks/useFileProcessing.js +90 -0
- package/lib/esm/features/agent/chat/hooks/useFileProcessing.js.map +1 -0
- package/lib/esm/features/agent/chat/index.js +6 -5
- package/lib/esm/features/agent/chat/index.js.map +1 -1
- package/lib/esm/features/agent/chat/types/document.js +2 -0
- package/lib/esm/features/agent/chat/types/document.js.map +1 -0
- package/lib/esm/features/agent/index.js +0 -2
- package/lib/esm/features/agent/index.js.map +1 -1
- package/lib/esm/features/store/collections/BrowseCollectionView.js +4 -6
- package/lib/esm/features/store/collections/BrowseCollectionView.js.map +1 -1
- package/lib/esm/features/store/collections/CreateCollection.js +4 -4
- package/lib/esm/features/store/collections/CreateCollection.js.map +1 -1
- package/lib/esm/features/store/collections/EditCollectionView.js +1 -1
- package/lib/esm/features/store/collections/EditCollectionView.js.map +1 -1
- package/lib/esm/features/store/objects/DocumentSearchResults.js +5 -5
- package/lib/esm/features/store/objects/DocumentSearchResults.js.map +1 -1
- package/lib/esm/features/store/objects/ExportPropertiesModal.js +3 -3
- package/lib/esm/features/store/objects/ExportPropertiesModal.js.map +1 -1
- package/lib/esm/features/store/objects/components/ContentOverview.js +19 -120
- package/lib/esm/features/store/objects/components/ContentOverview.js.map +1 -1
- package/lib/esm/features/store/objects/components/PropertiesEditorModal.js +1 -1
- package/lib/esm/features/store/objects/components/PropertiesEditorModal.js.map +1 -1
- package/lib/esm/features/store/objects/components/SelectDocumentModal.js +2 -2
- package/lib/esm/features/store/objects/components/SelectDocumentModal.js.map +1 -1
- package/lib/esm/features/store/objects/components/VectorSearchWidget.js +1 -1
- package/lib/esm/features/store/objects/components/VectorSearchWidget.js.map +1 -1
- package/lib/esm/features/store/objects/components/index.js +1 -1
- package/lib/esm/features/store/objects/components/index.js.map +1 -1
- package/lib/esm/features/store/objects/components/useDownloadFile.js +192 -0
- package/lib/esm/features/store/objects/components/useDownloadFile.js.map +1 -0
- package/lib/esm/features/store/objects/search/DocumentSearchContext.js +1 -2
- package/lib/esm/features/store/objects/search/DocumentSearchContext.js.map +1 -1
- package/lib/esm/features/store/objects/selection/SelectionActions.js +5 -8
- package/lib/esm/features/store/objects/selection/SelectionActions.js.map +1 -1
- package/lib/esm/features/store/objects/selection/actions/AddToCollectionAction.js +4 -4
- package/lib/esm/features/store/objects/selection/actions/AddToCollectionAction.js.map +1 -1
- package/lib/esm/features/store/objects/selection/actions/ChangeTypeAction.js +2 -2
- package/lib/esm/features/store/objects/selection/actions/ChangeTypeAction.js.map +1 -1
- package/lib/esm/features/store/objects/selection/actions/ExportPropertiesAction.js +1 -1
- package/lib/esm/features/store/objects/selection/actions/ExportPropertiesAction.js.map +1 -1
- package/lib/esm/features/store/objects/selection/actions/StartWorkflowComponent.js +3 -3
- package/lib/esm/features/store/objects/selection/actions/StartWorkflowComponent.js.map +1 -1
- package/lib/esm/features/store/objects/upload/DocumentUploadModal.js +13 -13
- package/lib/esm/features/store/objects/upload/DocumentUploadModal.js.map +1 -1
- package/lib/esm/features/store/objects/upload/useSmartFileUploadProcessing.js +15 -8
- package/lib/esm/features/store/objects/upload/useSmartFileUploadProcessing.js.map +1 -1
- package/lib/esm/features/store/types/ObjectSchemaEditor.js +6 -5
- package/lib/esm/features/store/types/ObjectSchemaEditor.js.map +1 -1
- package/lib/esm/features/store/types/SelectContentType.js +3 -3
- package/lib/esm/features/store/types/SelectContentType.js.map +1 -1
- package/lib/esm/features/store/types/SelectContentTypeModal.js +5 -4
- package/lib/esm/features/store/types/SelectContentTypeModal.js.map +1 -1
- package/lib/esm/features/store/types/TableLayoutEditor.js +4 -4
- package/lib/esm/features/store/types/TableLayoutEditor.js.map +1 -1
- package/lib/esm/features/user/UserInfo.js +73 -9
- package/lib/esm/features/user/UserInfo.js.map +1 -1
- package/lib/esm/features/utils/print.js +0 -1
- package/lib/esm/features/utils/print.js.map +1 -1
- package/lib/esm/layout/AppLayout.js +3 -4
- package/lib/esm/layout/AppLayout.js.map +1 -1
- package/lib/esm/layout/Sidebar.js +5 -5
- package/lib/esm/layout/Sidebar.js.map +1 -1
- package/lib/esm/router/HistoryNavigator.js +7 -1
- package/lib/esm/router/HistoryNavigator.js.map +1 -1
- package/lib/esm/router/Nav.js +2 -2
- package/lib/esm/router/Nav.js.map +1 -1
- package/lib/esm/session/UserSession.js +35 -9
- package/lib/esm/session/UserSession.js.map +1 -1
- package/lib/esm/session/UserSessionProvider.js +3 -2
- package/lib/esm/session/UserSessionProvider.js.map +1 -1
- package/lib/esm/shell/apps/AppProjectSelector.js +2 -2
- package/lib/esm/shell/apps/AppProjectSelector.js.map +1 -1
- package/lib/esm/shell/apps/StandaloneApp.js +2 -2
- package/lib/esm/shell/apps/StandaloneApp.js.map +1 -1
- package/lib/esm/shell/login/InviteAcceptModal.js +2 -2
- package/lib/esm/shell/login/InviteAcceptModal.js.map +1 -1
- package/lib/esm/shell/login/SignInModal.js +1 -1
- package/lib/esm/shell/login/SignInModal.js.map +1 -1
- package/lib/esm/shell/login/SignupForm.js +2 -2
- package/lib/esm/shell/login/SignupForm.js.map +1 -1
- package/lib/esm/shell/login/UserInfo.js +2 -2
- package/lib/esm/shell/login/UserInfo.js.map +1 -1
- package/lib/esm/widgets/json-view/JSONCode.js +1 -1
- package/lib/esm/widgets/json-view/JSONCode.js.map +1 -1
- package/lib/esm/widgets/json-view/JSONDisplay.js +1 -1
- package/lib/esm/widgets/json-view/JSONDisplay.js.map +1 -1
- package/lib/esm/widgets/markdown/ArtifactContentRenderer.js +84 -13
- package/lib/esm/widgets/markdown/ArtifactContentRenderer.js.map +1 -1
- package/lib/esm/widgets/markdown/MarkdownFigure.js +40 -0
- package/lib/esm/widgets/markdown/MarkdownFigure.js.map +1 -0
- package/lib/esm/widgets/markdown/MarkdownRenderer.js +42 -7
- package/lib/esm/widgets/markdown/MarkdownRenderer.js.map +1 -1
- package/lib/esm/widgets/markdown/MermaidDiagram.js +80 -5
- package/lib/esm/widgets/markdown/MermaidDiagram.js.map +1 -1
- package/lib/esm/widgets/markdown/codeBlockHandlers.js +33 -33
- package/lib/esm/widgets/markdown/codeBlockHandlers.js.map +1 -1
- package/lib/esm/widgets/markdown/codeBlockHandlers.test.js +2 -29
- package/lib/esm/widgets/markdown/codeBlockHandlers.test.js.map +1 -1
- package/lib/esm/widgets/markdown/index.js +1 -0
- package/lib/esm/widgets/markdown/index.js.map +1 -1
- package/lib/esm/widgets/markdown/normalizeCustomSchemeLinks.js +77 -0
- package/lib/esm/widgets/markdown/normalizeCustomSchemeLinks.js.map +1 -0
- package/lib/esm/widgets/markdown/normalizeDirectives.js +45 -0
- package/lib/esm/widgets/markdown/normalizeDirectives.js.map +1 -0
- package/lib/esm/widgets/markdown/remarkDirectiveHandler.js +96 -0
- package/lib/esm/widgets/markdown/remarkDirectiveHandler.js.map +1 -0
- package/lib/esm/widgets/monacoEditor/MonacoEditor.js +8 -14
- package/lib/esm/widgets/monacoEditor/MonacoEditor.js.map +1 -1
- package/lib/esm/widgets/schema-editor/ManagedSchema.js.map +1 -1
- package/lib/esm/widgets/schema-editor/editor/PropertyEditor.js +3 -3
- package/lib/esm/widgets/schema-editor/editor/PropertyEditor.js.map +1 -1
- package/lib/esm/widgets/schema-editor/json-schema4-utils.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/core/components/SidePanel.d.ts +4 -1
- package/lib/types/core/components/SidePanel.d.ts.map +1 -1
- package/lib/types/core/components/index.d.ts +0 -8
- package/lib/types/core/components/index.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/MessageBox.d.ts.map +1 -0
- package/lib/types/core/components/{Panel.d.ts → shadcn/Panel.d.ts} +3 -1
- package/lib/types/core/components/shadcn/Panel.d.ts.map +1 -0
- package/lib/types/core/components/{Badge.d.ts → shadcn/badge.d.ts} +4 -4
- package/lib/types/core/components/shadcn/badge.d.ts.map +1 -0
- package/lib/types/core/components/shadcn/button.d.ts +1 -1
- package/lib/types/core/components/shadcn/filters/filterBar.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/index.d.ts +4 -2
- package/lib/types/core/components/shadcn/index.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/input.d.ts +1 -1
- package/lib/types/core/components/shadcn/modal/ConfirmModal.d.ts.map +1 -0
- package/lib/types/core/components/shadcn/modal/DeleteModal.d.ts.map +1 -0
- package/lib/types/core/components/shadcn/{dialog.d.ts → modal/dialog.d.ts} +7 -4
- package/lib/types/core/components/shadcn/modal/dialog.d.ts.map +1 -0
- package/lib/types/core/components/shadcn/modal/index.d.ts +4 -0
- package/lib/types/core/components/shadcn/modal/index.d.ts.map +1 -0
- package/lib/types/core/components/shadcn/popover.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/selectBox.d.ts +9 -5
- package/lib/types/core/components/shadcn/selectBox.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/tabs.d.ts +14 -5
- package/lib/types/core/components/shadcn/tabs.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/textarea.d.ts +6 -2
- package/lib/types/core/components/shadcn/textarea.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/tooltip.d.ts.map +1 -1
- package/lib/types/features/agent/PayloadBuilder.d.ts +22 -4
- package/lib/types/features/agent/PayloadBuilder.d.ts.map +1 -1
- package/lib/types/features/agent/chat/AgentChart.d.ts +3 -44
- package/lib/types/features/agent/chat/AgentChart.d.ts.map +1 -1
- package/lib/types/features/agent/chat/AskUserWidget.d.ts.map +1 -1
- package/lib/types/features/agent/chat/DocumentPanel.d.ts +16 -0
- package/lib/types/features/agent/chat/DocumentPanel.d.ts.map +1 -0
- package/lib/types/features/agent/chat/DocumentTabBar.d.ts +10 -0
- package/lib/types/features/agent/chat/DocumentTabBar.d.ts.map +1 -0
- package/lib/types/features/agent/chat/ModernAgentConversation.d.ts +69 -1
- package/lib/types/features/agent/chat/ModernAgentConversation.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts +36 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/BatchProgressPanel.d.ts +18 -2
- package/lib/types/features/agent/chat/ModernAgentOutput/BatchProgressPanel.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/Header.d.ts +4 -7
- package/lib/types/features/agent/chat/ModernAgentOutput/Header.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/MessageInput.d.ts +2 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/MessageInput.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/MessageItem.d.ts +35 -7
- package/lib/types/features/agent/chat/ModernAgentOutput/MessageItem.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/StreamingMessage.d.ts +11 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/StreamingMessage.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/ToolCallGroup.d.ts +20 -2
- package/lib/types/features/agent/chat/ModernAgentOutput/ToolCallGroup.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/WorkstreamTabs.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/utils.d.ts +18 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/utils.d.ts.map +1 -1
- package/lib/types/features/agent/chat/SkillWidgetProvider.d.ts.map +1 -1
- package/lib/types/features/agent/chat/hooks/useAgentPlans.d.ts +22 -0
- package/lib/types/features/agent/chat/hooks/useAgentPlans.d.ts.map +1 -0
- package/lib/types/features/agent/chat/hooks/useAgentStream.d.ts +42 -0
- package/lib/types/features/agent/chat/hooks/useAgentStream.d.ts.map +1 -0
- package/lib/types/features/agent/chat/hooks/useDocumentPanel.d.ts +22 -0
- package/lib/types/features/agent/chat/hooks/useDocumentPanel.d.ts.map +1 -0
- package/lib/types/features/agent/chat/hooks/useFileProcessing.d.ts +27 -0
- package/lib/types/features/agent/chat/hooks/useFileProcessing.d.ts.map +1 -0
- package/lib/types/features/agent/chat/index.d.ts +12 -8
- package/lib/types/features/agent/chat/index.d.ts.map +1 -1
- package/lib/types/features/agent/chat/types/document.d.ts +5 -0
- package/lib/types/features/agent/chat/types/document.d.ts.map +1 -0
- package/lib/types/features/agent/index.d.ts +0 -2
- package/lib/types/features/agent/index.d.ts.map +1 -1
- package/lib/types/features/store/collections/BrowseCollectionView.d.ts.map +1 -1
- package/lib/types/features/store/objects/ExportPropertiesModal.d.ts.map +1 -1
- package/lib/types/features/store/objects/components/ContentOverview.d.ts.map +1 -1
- package/lib/types/features/store/objects/components/PropertiesEditorModal.d.ts.map +1 -1
- package/lib/types/features/store/objects/components/index.d.ts +1 -1
- package/lib/types/features/store/objects/components/index.d.ts.map +1 -1
- package/lib/types/features/store/objects/components/useDownloadFile.d.ts +35 -0
- package/lib/types/features/store/objects/components/useDownloadFile.d.ts.map +1 -0
- package/lib/types/features/store/objects/search/DocumentSearchContext.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/SelectionActions.d.ts +1 -1
- package/lib/types/features/store/objects/selection/SelectionActions.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/actions/ChangeTypeAction.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/actions/ExportPropertiesAction.d.ts.map +1 -1
- package/lib/types/features/store/objects/upload/useSmartFileUploadProcessing.d.ts.map +1 -1
- package/lib/types/features/store/types/ObjectSchemaEditor.d.ts +2 -1
- package/lib/types/features/store/types/ObjectSchemaEditor.d.ts.map +1 -1
- package/lib/types/features/store/types/SelectContentTypeModal.d.ts +1 -1
- package/lib/types/features/store/types/SelectContentTypeModal.d.ts.map +1 -1
- package/lib/types/features/store/types/TableLayoutEditor.d.ts +2 -1
- package/lib/types/features/store/types/TableLayoutEditor.d.ts.map +1 -1
- package/lib/types/features/user/UserInfo.d.ts +12 -1
- package/lib/types/features/user/UserInfo.d.ts.map +1 -1
- package/lib/types/features/utils/print.d.ts.map +1 -1
- package/lib/types/layout/AppLayout.d.ts.map +1 -1
- package/lib/types/layout/Sidebar.d.ts +4 -2
- package/lib/types/layout/Sidebar.d.ts.map +1 -1
- package/lib/types/router/HistoryNavigator.d.ts.map +1 -1
- package/lib/types/router/Nav.d.ts +6 -1
- package/lib/types/router/Nav.d.ts.map +1 -1
- package/lib/types/session/UserSession.d.ts.map +1 -1
- package/lib/types/session/UserSessionProvider.d.ts +1 -0
- package/lib/types/session/UserSessionProvider.d.ts.map +1 -1
- package/lib/types/widgets/json-view/JSONCode.d.ts.map +1 -1
- package/lib/types/widgets/markdown/ArtifactContentRenderer.d.ts +10 -1
- package/lib/types/widgets/markdown/ArtifactContentRenderer.d.ts.map +1 -1
- package/lib/types/widgets/markdown/MarkdownFigure.d.ts +15 -0
- package/lib/types/widgets/markdown/MarkdownFigure.d.ts.map +1 -0
- package/lib/types/widgets/markdown/MarkdownRenderer.d.ts.map +1 -1
- package/lib/types/widgets/markdown/MermaidDiagram.d.ts.map +1 -1
- package/lib/types/widgets/markdown/codeBlockHandlers.d.ts +5 -2
- package/lib/types/widgets/markdown/codeBlockHandlers.d.ts.map +1 -1
- package/lib/types/widgets/markdown/index.d.ts +1 -0
- package/lib/types/widgets/markdown/index.d.ts.map +1 -1
- package/lib/types/widgets/markdown/normalizeCustomSchemeLinks.d.ts +9 -0
- package/lib/types/widgets/markdown/normalizeCustomSchemeLinks.d.ts.map +1 -0
- package/lib/types/widgets/markdown/normalizeDirectives.d.ts +20 -0
- package/lib/types/widgets/markdown/normalizeDirectives.d.ts.map +1 -0
- package/lib/types/widgets/markdown/remarkDirectiveHandler.d.ts +2 -0
- package/lib/types/widgets/markdown/remarkDirectiveHandler.d.ts.map +1 -0
- package/lib/types/widgets/monacoEditor/MonacoEditor.d.ts +1 -3
- package/lib/types/widgets/monacoEditor/MonacoEditor.d.ts.map +1 -1
- package/lib/types/widgets/schema-editor/ManagedSchema.d.ts +1 -1
- package/lib/types/widgets/schema-editor/ManagedSchema.d.ts.map +1 -1
- package/lib/vertesia-ui-core.js +1 -1
- package/lib/vertesia-ui-core.js.map +1 -1
- package/lib/vertesia-ui-features.js +1 -1
- package/lib/vertesia-ui-features.js.map +1 -1
- package/lib/vertesia-ui-layout.js +1 -1
- package/lib/vertesia-ui-layout.js.map +1 -1
- package/lib/vertesia-ui-router.js +1 -1
- package/lib/vertesia-ui-router.js.map +1 -1
- package/lib/vertesia-ui-session.js +1 -1
- package/lib/vertesia-ui-session.js.map +1 -1
- package/lib/vertesia-ui-shell.js +1 -1
- package/lib/vertesia-ui-shell.js.map +1 -1
- package/lib/vertesia-ui-widgets.js +1 -1
- package/lib/vertesia-ui-widgets.js.map +1 -1
- package/package.json +14 -10
- package/src/core/components/InputList.tsx +1 -1
- package/src/core/components/Overlay.tsx +1 -1
- package/src/core/components/SidePanel.tsx +29 -15
- package/src/core/components/Switch.tsx +1 -1
- package/src/core/components/index.ts +0 -8
- package/src/core/components/shadcn/Panel.tsx +50 -0
- package/src/core/components/{Badge.tsx → shadcn/badge.tsx} +3 -3
- package/src/core/components/shadcn/command.tsx +1 -1
- package/src/core/components/shadcn/filters/filterBar.tsx +76 -87
- package/src/core/components/shadcn/index.ts +5 -3
- package/src/core/components/{ConfirmModal.tsx → shadcn/modal/ConfirmModal.tsx} +8 -8
- package/src/core/components/{DeleteModal.tsx → shadcn/modal/DeleteModal.tsx} +1 -1
- package/src/core/components/shadcn/{dialog.tsx → modal/dialog.tsx} +43 -32
- package/src/core/components/shadcn/modal/index.ts +3 -0
- package/src/core/components/shadcn/popover.tsx +4 -2
- package/src/core/components/shadcn/selectBox.tsx +71 -52
- package/src/core/components/shadcn/tabs.tsx +36 -19
- package/src/core/components/shadcn/textarea.tsx +43 -2
- package/src/core/components/shadcn/tooltip.tsx +23 -17
- package/src/features/agent/PayloadBuilder.tsx +70 -9
- package/src/features/agent/chat/AgentChart.tsx +46 -678
- package/src/features/agent/chat/AskUserWidget.tsx +4 -3
- package/src/features/agent/chat/DocumentPanel.tsx +120 -0
- package/src/features/agent/chat/DocumentTabBar.tsx +49 -0
- package/src/features/agent/chat/ModernAgentConversation.tsx +403 -549
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +162 -55
- package/src/features/agent/chat/ModernAgentOutput/BatchProgressPanel.tsx +40 -10
- package/src/features/agent/chat/ModernAgentOutput/Header.tsx +12 -16
- package/src/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.tsx +3 -3
- package/src/features/agent/chat/ModernAgentOutput/MessageInput.tsx +68 -75
- package/src/features/agent/chat/ModernAgentOutput/MessageItem.tsx +206 -94
- package/src/features/agent/chat/ModernAgentOutput/StreamingMessage.tsx +22 -5
- package/src/features/agent/chat/ModernAgentOutput/ToolCallGroup.tsx +295 -113
- package/src/features/agent/chat/ModernAgentOutput/WorkstreamTabs.tsx +11 -8
- package/src/features/agent/chat/ModernAgentOutput/utils.ts +133 -4
- package/src/features/agent/chat/SkillWidgetProvider.tsx +32 -15
- package/src/features/agent/chat/hooks/useAgentPlans.ts +190 -0
- package/src/features/agent/chat/hooks/useAgentStream.ts +239 -0
- package/src/features/agent/chat/hooks/useDocumentPanel.ts +118 -0
- package/src/features/agent/chat/hooks/useFileProcessing.ts +126 -0
- package/src/features/agent/chat/index.ts +18 -17
- package/src/features/agent/chat/types/document.ts +4 -0
- package/src/features/agent/index.ts +0 -2
- package/src/features/store/collections/BrowseCollectionView.tsx +5 -8
- package/src/features/store/collections/CreateCollection.tsx +8 -8
- package/src/features/store/collections/EditCollectionView.tsx +1 -1
- package/src/features/store/objects/DocumentSearchResults.tsx +9 -13
- package/src/features/store/objects/ExportPropertiesModal.tsx +9 -7
- package/src/features/store/objects/components/ContentOverview.tsx +29 -155
- package/src/features/store/objects/components/PropertiesEditorModal.tsx +0 -1
- package/src/features/store/objects/components/SelectDocumentModal.tsx +6 -6
- package/src/features/store/objects/components/VectorSearchWidget.tsx +2 -2
- package/src/features/store/objects/components/index.ts +1 -1
- package/src/features/store/objects/components/useDownloadFile.ts +237 -0
- package/src/features/store/objects/search/DocumentSearchContext.ts +1 -2
- package/src/features/store/objects/selection/SelectionActions.tsx +0 -4
- package/src/features/store/objects/selection/actions/AddToCollectionAction.tsx +13 -13
- package/src/features/store/objects/selection/actions/ChangeTypeAction.tsx +2 -6
- package/src/features/store/objects/selection/actions/ExportPropertiesAction.tsx +1 -3
- package/src/features/store/objects/selection/actions/StartWorkflowComponent.tsx +8 -8
- package/src/features/store/objects/upload/DocumentUploadModal.tsx +25 -25
- package/src/features/store/objects/upload/useSmartFileUploadProcessing.ts +16 -10
- package/src/features/store/types/ObjectSchemaEditor.tsx +32 -29
- package/src/features/store/types/SelectContentType.tsx +3 -3
- package/src/features/store/types/SelectContentTypeModal.tsx +17 -30
- package/src/features/store/types/TableLayoutEditor.tsx +14 -18
- package/src/features/user/UserInfo.tsx +176 -10
- package/src/features/utils/print.ts +0 -1
- package/src/layout/AppLayout.tsx +16 -44
- package/src/layout/Sidebar.tsx +7 -5
- package/src/router/HistoryNavigator.ts +9 -1
- package/src/router/Nav.tsx +7 -2
- package/src/session/UserSession.ts +38 -9
- package/src/session/UserSessionProvider.tsx +3 -2
- package/src/shell/apps/AppProjectSelector.tsx +2 -2
- package/src/shell/apps/StandaloneApp.tsx +3 -3
- package/src/shell/login/InviteAcceptModal.tsx +6 -6
- package/src/shell/login/SignInModal.tsx +1 -1
- package/src/shell/login/SignupForm.tsx +3 -3
- package/src/shell/login/UserInfo.tsx +5 -5
- package/src/widgets/json-view/JSONCode.tsx +1 -3
- package/src/widgets/json-view/JSONDisplay.tsx +1 -1
- package/src/widgets/markdown/ArtifactContentRenderer.tsx +115 -14
- package/src/widgets/markdown/MarkdownFigure.tsx +100 -0
- package/src/widgets/markdown/MarkdownRenderer.tsx +62 -9
- package/src/widgets/markdown/MermaidDiagram.tsx +97 -5
- package/src/widgets/markdown/codeBlockHandlers.test.tsx +3 -34
- package/src/widgets/markdown/codeBlockHandlers.tsx +47 -42
- package/src/widgets/markdown/index.ts +1 -0
- package/src/widgets/markdown/markdown.css +192 -0
- package/src/widgets/markdown/normalizeCustomSchemeLinks.test.ts +86 -0
- package/src/widgets/markdown/normalizeCustomSchemeLinks.ts +91 -0
- package/src/widgets/markdown/normalizeDirectives.ts +50 -0
- package/src/widgets/markdown/remarkDirectiveHandler.ts +119 -0
- package/src/widgets/monacoEditor/MonacoEditor.tsx +8 -22
- package/src/widgets/schema-editor/ManagedSchema.ts +1 -1
- package/src/widgets/schema-editor/editor/PropertyEditor.tsx +5 -5
- package/src/widgets/schema-editor/json-schema4-utils.ts +1 -1
- package/lib/esm/core/components/Badge.js.map +0 -1
- package/lib/esm/core/components/Button.js +0 -32
- package/lib/esm/core/components/Button.js.map +0 -1
- package/lib/esm/core/components/ConfirmModal.js +0 -10
- package/lib/esm/core/components/ConfirmModal.js.map +0 -1
- package/lib/esm/core/components/DeleteModal.js.map +0 -1
- package/lib/esm/core/components/MessageBox.js.map +0 -1
- package/lib/esm/core/components/Modal.js +0 -26
- package/lib/esm/core/components/Modal.js.map +0 -1
- package/lib/esm/core/components/Panel.js +0 -8
- package/lib/esm/core/components/Panel.js.map +0 -1
- package/lib/esm/core/components/SelectBox.js +0 -67
- package/lib/esm/core/components/SelectBox.js.map +0 -1
- package/lib/esm/core/components/shadcn/dialog.js.map +0 -1
- package/lib/esm/core/components/tabs/Tabs.js +0 -78
- package/lib/esm/core/components/tabs/Tabs.js.map +0 -1
- package/lib/esm/core/components/tabs/TabsContext.js +0 -7
- package/lib/esm/core/components/tabs/TabsContext.js.map +0 -1
- package/lib/esm/core/components/tabs/index.js +0 -3
- package/lib/esm/core/components/tabs/index.js.map +0 -1
- package/lib/esm/features/agent/createChartTool.js +0 -632
- package/lib/esm/features/agent/createChartTool.js.map +0 -1
- package/lib/esm/features/agent/examples.js +0 -295
- package/lib/esm/features/agent/examples.js.map +0 -1
- package/lib/esm/features/agent/visualization.js +0 -165
- package/lib/esm/features/agent/visualization.js.map +0 -1
- package/lib/esm/features/store/objects/components/useDownloadObject.js +0 -21
- package/lib/esm/features/store/objects/components/useDownloadObject.js.map +0 -1
- package/lib/types/core/components/Badge.d.ts.map +0 -1
- package/lib/types/core/components/Button.d.ts +0 -14
- package/lib/types/core/components/Button.d.ts.map +0 -1
- package/lib/types/core/components/ConfirmModal.d.ts.map +0 -1
- package/lib/types/core/components/DeleteModal.d.ts.map +0 -1
- package/lib/types/core/components/MessageBox.d.ts.map +0 -1
- package/lib/types/core/components/Modal.d.ts +0 -30
- package/lib/types/core/components/Modal.d.ts.map +0 -1
- package/lib/types/core/components/Panel.d.ts.map +0 -1
- package/lib/types/core/components/SelectBox.d.ts +0 -36
- package/lib/types/core/components/SelectBox.d.ts.map +0 -1
- package/lib/types/core/components/shadcn/dialog.d.ts.map +0 -1
- package/lib/types/core/components/tabs/Tabs.d.ts +0 -25
- package/lib/types/core/components/tabs/Tabs.d.ts.map +0 -1
- package/lib/types/core/components/tabs/TabsContext.d.ts +0 -17
- package/lib/types/core/components/tabs/TabsContext.d.ts.map +0 -1
- package/lib/types/core/components/tabs/index.d.ts +0 -3
- package/lib/types/core/components/tabs/index.d.ts.map +0 -1
- package/lib/types/features/agent/createChartTool.d.ts +0 -178
- package/lib/types/features/agent/createChartTool.d.ts.map +0 -1
- package/lib/types/features/agent/examples.d.ts +0 -59
- package/lib/types/features/agent/examples.d.ts.map +0 -1
- package/lib/types/features/agent/visualization.d.ts +0 -95
- package/lib/types/features/agent/visualization.d.ts.map +0 -1
- package/lib/types/features/store/objects/components/useDownloadObject.d.ts +0 -4
- package/lib/types/features/store/objects/components/useDownloadObject.d.ts.map +0 -1
- package/src/core/components/Button.tsx +0 -63
- package/src/core/components/Modal.tsx +0 -144
- package/src/core/components/Panel.tsx +0 -34
- package/src/core/components/SelectBox.tsx +0 -188
- package/src/core/components/tabs/Tabs.tsx +0 -132
- package/src/core/components/tabs/TabsContext.ts +0 -25
- package/src/core/components/tabs/index.ts +0 -2
- package/src/features/agent/CHART_INSTRUCTIONS.md +0 -228
- package/src/features/agent/createChartTool.ts +0 -643
- package/src/features/agent/examples.ts +0 -321
- package/src/features/agent/visualization.ts +0 -227
- package/src/features/store/objects/components/useDownloadObject.ts +0 -29
- /package/lib/esm/core/components/{MessageBox.js → shadcn/MessageBox.js} +0 -0
- /package/lib/types/core/components/{MessageBox.d.ts → shadcn/MessageBox.d.ts} +0 -0
- /package/lib/types/core/components/{ConfirmModal.d.ts → shadcn/modal/ConfirmModal.d.ts} +0 -0
- /package/lib/types/core/components/{DeleteModal.d.ts → shadcn/modal/DeleteModal.d.ts} +0 -0
- /package/src/core/components/{MessageBox.tsx → shadcn/MessageBox.tsx} +0 -0
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
3
|
-
import { cn } from "
|
|
3
|
+
import { cn } from "../../libs/utils";
|
|
4
4
|
|
|
5
5
|
import { X } from "lucide-react";
|
|
6
|
-
import { Button } from "
|
|
7
|
-
import { VisuallyHidden } from "
|
|
6
|
+
import { Button } from "../button";
|
|
7
|
+
import { VisuallyHidden } from "../../libs/visuallyHidden";
|
|
8
8
|
import { createContext, useContext } from "react";
|
|
9
|
+
import { usePortalContainer } from "../../../hooks/PortalContainerProvider";
|
|
9
10
|
|
|
10
11
|
interface ModalProps {
|
|
11
12
|
children: React.ReactNode | React.ReactNode[];
|
|
@@ -27,7 +28,7 @@ export function ModalContextProvider({ children }: { children: React.ReactNode }
|
|
|
27
28
|
return <ModalContext.Provider value={true}>{children}</ModalContext.Provider>
|
|
28
29
|
}
|
|
29
30
|
|
|
30
|
-
export function
|
|
31
|
+
export function Modal({
|
|
31
32
|
className,
|
|
32
33
|
children,
|
|
33
34
|
isOpen,
|
|
@@ -49,13 +50,13 @@ export function VModal({
|
|
|
49
50
|
case "sm":
|
|
50
51
|
return "max-w-[20vw]";
|
|
51
52
|
case "md":
|
|
52
|
-
return "max-w-[40vw]";
|
|
53
|
+
return "max-w-[60vw] lg:max-w-[40vw]";
|
|
53
54
|
case "lg":
|
|
54
|
-
return "max-w-[60vw]";
|
|
55
|
+
return "max-w-[80vw] md:max-w-[60vw]";
|
|
55
56
|
case "xl":
|
|
56
|
-
return "max-w-[80vw]";
|
|
57
|
+
return "max-w-[95vw] lg:max-w-[80vw]";
|
|
57
58
|
default:
|
|
58
|
-
return "max-w-[40vw]";
|
|
59
|
+
return "max-w-[60vw] lg:max-w-[40vw]";
|
|
59
60
|
}
|
|
60
61
|
}
|
|
61
62
|
|
|
@@ -109,13 +110,14 @@ export function VModal({
|
|
|
109
110
|
);
|
|
110
111
|
}
|
|
111
112
|
|
|
112
|
-
export const
|
|
113
|
+
export const ModalTitle = ({
|
|
113
114
|
children,
|
|
114
115
|
show = true,
|
|
115
116
|
className,
|
|
116
117
|
description,
|
|
118
|
+
showDivider = false,
|
|
117
119
|
...props
|
|
118
|
-
}: React.HTMLAttributes<HTMLHeadingElement> & { show?: boolean; description?: string }) => {
|
|
120
|
+
}: React.HTMLAttributes<HTMLHeadingElement> & { show?: boolean; description?: string, showDivider?: boolean }) => {
|
|
119
121
|
if (!show) {
|
|
120
122
|
return (
|
|
121
123
|
<VisuallyHidden>
|
|
@@ -127,7 +129,11 @@ export const VModalTitle = ({
|
|
|
127
129
|
return (
|
|
128
130
|
<>
|
|
129
131
|
<DialogTitle
|
|
130
|
-
className={cn(
|
|
132
|
+
className={cn(
|
|
133
|
+
showDivider ? "border-b-solid border-b border-b-1 pb-2 mb-4" : "",
|
|
134
|
+
"text-lg font-semibold leading-6 tracking-tight",
|
|
135
|
+
{ 'py-2': !description },
|
|
136
|
+
className)}
|
|
131
137
|
{...props}
|
|
132
138
|
>
|
|
133
139
|
{children}
|
|
@@ -141,7 +147,7 @@ export const VModalTitle = ({
|
|
|
141
147
|
);
|
|
142
148
|
};
|
|
143
149
|
|
|
144
|
-
export const
|
|
150
|
+
export const ModalBody = ({
|
|
145
151
|
children,
|
|
146
152
|
className,
|
|
147
153
|
...props
|
|
@@ -155,9 +161,11 @@ export const VModalBody = ({
|
|
|
155
161
|
|
|
156
162
|
interface ModalFooterProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
157
163
|
align?: "left" | "right" | "center";
|
|
164
|
+
children: React.ReactNode | React.ReactNode[];
|
|
165
|
+
className?: string;
|
|
158
166
|
}
|
|
159
167
|
|
|
160
|
-
export const
|
|
168
|
+
export const ModalFooter = ({
|
|
161
169
|
align = "right",
|
|
162
170
|
children,
|
|
163
171
|
className,
|
|
@@ -205,25 +213,28 @@ DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
|
205
213
|
const DialogContent = React.forwardRef<
|
|
206
214
|
React.ElementRef<typeof DialogPrimitive.Content>,
|
|
207
215
|
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>
|
|
208
|
-
>(({ className, children, ...props }, ref) =>
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
<
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
className
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
216
|
+
>(({ className, children, ...props }, ref) => {
|
|
217
|
+
const container = usePortalContainer();
|
|
218
|
+
return (
|
|
219
|
+
<DialogPortal container={container}>
|
|
220
|
+
<DialogOverlay />
|
|
221
|
+
<DialogPrimitive.Content
|
|
222
|
+
ref={ref}
|
|
223
|
+
autoFocus={false}
|
|
224
|
+
onOpenAutoFocus={(event) => {
|
|
225
|
+
event.preventDefault();
|
|
226
|
+
}}
|
|
227
|
+
className={cn(
|
|
228
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] border bg-background shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
229
|
+
className
|
|
230
|
+
)}
|
|
231
|
+
{...props}
|
|
232
|
+
>
|
|
233
|
+
{children}
|
|
234
|
+
</DialogPrimitive.Content>
|
|
235
|
+
</DialogPortal>
|
|
236
|
+
);
|
|
237
|
+
});
|
|
227
238
|
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
228
239
|
|
|
229
240
|
const DialogDescription = React.forwardRef<
|
|
@@ -3,7 +3,8 @@ import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
|
3
3
|
|
|
4
4
|
import { cn } from "../libs/utils"
|
|
5
5
|
import { JSX } from "react";
|
|
6
|
-
import { useIsInModal } from "./dialog";
|
|
6
|
+
import { useIsInModal } from "./modal/dialog";
|
|
7
|
+
import { usePortalContainer } from "../../hooks/PortalContainerProvider";
|
|
7
8
|
|
|
8
9
|
export interface PopoverContextValue {
|
|
9
10
|
open: boolean;
|
|
@@ -87,9 +88,10 @@ const PopoverContent = React.forwardRef<
|
|
|
87
88
|
}
|
|
88
89
|
|
|
89
90
|
const { setOpen, hover } = context;
|
|
91
|
+
const container = usePortalContainer();
|
|
90
92
|
|
|
91
93
|
return (
|
|
92
|
-
<PopoverPrimitive.Portal>
|
|
94
|
+
<PopoverPrimitive.Portal container={container}>
|
|
93
95
|
<PopoverPrimitive.Content
|
|
94
96
|
ref={ref}
|
|
95
97
|
align={align}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import clsx from 'clsx';
|
|
2
2
|
import { isEqual } from 'lodash-es';
|
|
3
|
-
import { AlertTriangle, Check, ChevronsUpDown, SearchIcon, SquarePlus, X } from 'lucide-react';
|
|
4
|
-
import { useState, useEffect, useRef, useMemo } from 'react';
|
|
3
|
+
import { AlertTriangle, Check, ChevronsUpDown, LoaderCircle, SearchIcon, SquarePlus, X } from 'lucide-react';
|
|
4
|
+
import { useState, useEffect, useRef, useMemo, ReactNode } from 'react';
|
|
5
5
|
|
|
6
6
|
import { Popover, PopoverContent, PopoverTrigger, PopoverClose } from './popover';
|
|
7
7
|
import { Command, CommandEmpty, CommandGroup, CommandItem, CommandList } from './command';
|
|
8
8
|
import { Input } from './input';
|
|
9
|
-
import { Button } from '
|
|
9
|
+
import { Button } from './button';
|
|
10
10
|
import { VTooltip } from './tooltip';
|
|
11
11
|
|
|
12
|
-
export interface
|
|
12
|
+
export interface SelectBoxBaseProps<T> {
|
|
13
13
|
options: T[] | undefined;
|
|
14
14
|
optionLabel?: (option: T) => React.ReactNode;
|
|
15
15
|
onBlur?: () => void;
|
|
@@ -26,27 +26,30 @@ export interface VSelectBoxBaseProps<T> {
|
|
|
26
26
|
isClearable?: boolean;
|
|
27
27
|
border?: boolean;
|
|
28
28
|
inline?: boolean;
|
|
29
|
+
clearIcon?: ReactNode;
|
|
30
|
+
clearTitle?: string;
|
|
31
|
+
isLoading?: boolean;
|
|
29
32
|
/** Show warning when value is not in options list (default: true) */
|
|
30
33
|
warnOnMissingValue?: boolean;
|
|
31
34
|
/** Custom warning message when value is not in options */
|
|
32
35
|
missingValueWarning?: string;
|
|
33
36
|
}
|
|
34
37
|
|
|
35
|
-
interface
|
|
38
|
+
interface SelectBoxSingleProps<T> extends SelectBoxBaseProps<T> {
|
|
36
39
|
multiple?: false;
|
|
37
40
|
value?: T;
|
|
38
41
|
onChange: (option: T) => void;
|
|
39
42
|
}
|
|
40
43
|
|
|
41
|
-
interface
|
|
44
|
+
interface SelectBoxMultipleProps<T> extends SelectBoxBaseProps<T> {
|
|
42
45
|
multiple: true;
|
|
43
46
|
value?: T[];
|
|
44
47
|
onChange: (options: T[]) => void;
|
|
45
48
|
}
|
|
46
49
|
|
|
47
|
-
type
|
|
50
|
+
type SelectBoxProps<T> = SelectBoxSingleProps<T> | SelectBoxMultipleProps<T>;
|
|
48
51
|
|
|
49
|
-
export function
|
|
52
|
+
export function SelectBox<T = any>({ options, optionLabel, value, onChange, addNew, addNewLabel, disabled, filterBy, label, placeholder, className, popupClass, isClearable, border = true, multiple = false, by, inline = false, isLoading = false, warnOnMissingValue = true, missingValueWarning = "Value not in options list, may not be valid", clearIcon, clearTitle }: Readonly<SelectBoxProps<T>>) {
|
|
50
53
|
const triggerRef = useRef<HTMLDivElement>(null);
|
|
51
54
|
const [open, setOpen] = useState(false);
|
|
52
55
|
const [width, setWidth] = useState<number>(0);
|
|
@@ -91,7 +94,7 @@ export function VSelectBox<T = any>({ options, optionLabel, value, onChange, add
|
|
|
91
94
|
}, []);
|
|
92
95
|
|
|
93
96
|
const handleTriggerClick = (e: React.MouseEvent) => {
|
|
94
|
-
if (disabled) {
|
|
97
|
+
if (disabled || isLoading) {
|
|
95
98
|
e.preventDefault();
|
|
96
99
|
return;
|
|
97
100
|
}
|
|
@@ -203,7 +206,10 @@ export function VSelectBox<T = any>({ options, optionLabel, value, onChange, add
|
|
|
203
206
|
</div>
|
|
204
207
|
)}
|
|
205
208
|
<Command className="overflow-hidden">
|
|
206
|
-
<CommandList
|
|
209
|
+
<CommandList
|
|
210
|
+
className={inline ? "max-h-full overflow-y-auto" : "max-h-[200px] overflow-y-auto"}
|
|
211
|
+
onWheel={(e) => { e.currentTarget.scrollTop += e.deltaY; }}
|
|
212
|
+
>
|
|
207
213
|
<CommandEmpty>No result found.</CommandEmpty>
|
|
208
214
|
<CommandGroup>
|
|
209
215
|
{filteredOptions?.map((opt, index) => {
|
|
@@ -262,7 +268,10 @@ export function VSelectBox<T = any>({ options, optionLabel, value, onChange, add
|
|
|
262
268
|
"bg-popover p-1",
|
|
263
269
|
popupClass
|
|
264
270
|
)}>
|
|
265
|
-
{
|
|
271
|
+
{isLoading
|
|
272
|
+
? <div className="flex justify-center items-center p-2 text-muted text-sm"><LoaderCircle className="size-4 animate-spin" /></div>
|
|
273
|
+
: renderOptionsContent()
|
|
274
|
+
}
|
|
266
275
|
</div>
|
|
267
276
|
);
|
|
268
277
|
}
|
|
@@ -275,50 +284,60 @@ export function VSelectBox<T = any>({ options, optionLabel, value, onChange, add
|
|
|
275
284
|
onClick={handleTriggerClick}
|
|
276
285
|
className={clsx(
|
|
277
286
|
className,
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
287
|
+
isLoading
|
|
288
|
+
? 'flex justify-center items-center gap-2 border border-border rounded-md p-2 text-muted text-sm'
|
|
289
|
+
: clsx(
|
|
290
|
+
border && (isMissingValue ? 'border border-destructive' : 'border border-border'),
|
|
291
|
+
'flex flex-row gap-2 items-center justify-between p-2 rounded-md group relative [&:hover_.clear-button]:opacity-100',
|
|
292
|
+
!disabled ? "cursor-pointer hover:bg-muted" : "cursor-not-allowed text-muted",
|
|
293
|
+
),
|
|
281
294
|
)}
|
|
282
295
|
>
|
|
283
|
-
|
|
284
|
-
className=
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
<VTooltip description={missingValueWarning} placement="top" asChild>
|
|
294
|
-
<AlertTriangle className="inline-block size-4 mr-1 -mt-0.5 cursor-help" />
|
|
295
|
-
</VTooltip>
|
|
296
|
-
)}
|
|
297
|
-
{multiple ? renderMultipleValue() : renderSingleValue()}
|
|
298
|
-
</div>
|
|
299
|
-
</div>
|
|
300
|
-
<div className="flex items-center gap-1 group">
|
|
301
|
-
{isClearable && value && (Array.isArray(value) ? value.length > 0 : true) && (
|
|
302
|
-
<Button variant={"link"} size={"icon"}
|
|
303
|
-
disabled={disabled}
|
|
304
|
-
alt="Clear selection"
|
|
305
|
-
onClick={(e) => {
|
|
306
|
-
e.stopPropagation();
|
|
307
|
-
if (multiple) {
|
|
308
|
-
(onChange as (options: T[]) => void)([] as T[]);
|
|
309
|
-
} else {
|
|
310
|
-
(onChange as (option: T) => void)(undefined as any);
|
|
311
|
-
}
|
|
312
|
-
}}
|
|
313
|
-
className="cursor-pointer hover:bg-muted/20 clear-button opacity-0 transition-opacity duration-200 rounded p-1"
|
|
296
|
+
{isLoading ? (
|
|
297
|
+
<LoaderCircle className="size-4 animate-spin" />
|
|
298
|
+
) : (
|
|
299
|
+
<>
|
|
300
|
+
<div
|
|
301
|
+
className={clsx(
|
|
302
|
+
"flex flex-col w-full rounded-md text-sm min-h-6 items-center justify-center truncate",
|
|
303
|
+
!disabled && "",
|
|
304
|
+
isClearable && value && (Array.isArray(value) ? value.length > 0 : true) && "pr-6"
|
|
305
|
+
)}
|
|
314
306
|
>
|
|
315
|
-
<
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
307
|
+
{label && <div className='w-full text-left text-xs font-semibold'>{label}</div>}
|
|
308
|
+
<div className={clsx('w-full text-left ', !disabled && '', isMissingValue && 'text-destructive')}>
|
|
309
|
+
{isMissingValue && (
|
|
310
|
+
<VTooltip description={missingValueWarning} placement="top" asChild>
|
|
311
|
+
<AlertTriangle className="inline-block size-4 mr-1 -mt-0.5 cursor-help" />
|
|
312
|
+
</VTooltip>
|
|
313
|
+
)}
|
|
314
|
+
{multiple ? renderMultipleValue() : renderSingleValue()}
|
|
315
|
+
</div>
|
|
316
|
+
</div>
|
|
317
|
+
<div className="flex items-center gap-1 group">
|
|
318
|
+
{isClearable && value && (Array.isArray(value) ? value.length > 0 : true) && (
|
|
319
|
+
<Button variant={"link"} size={"icon"}
|
|
320
|
+
disabled={disabled}
|
|
321
|
+
alt={clearTitle || "Clear selection"}
|
|
322
|
+
onClick={(e: { stopPropagation: () => void; }) => {
|
|
323
|
+
e.stopPropagation();
|
|
324
|
+
if (multiple) {
|
|
325
|
+
(onChange as (options: T[]) => void)([] as T[]);
|
|
326
|
+
} else {
|
|
327
|
+
(onChange as (option: T) => void)(undefined as any);
|
|
328
|
+
}
|
|
329
|
+
}}
|
|
330
|
+
className="cursor-pointer hover:bg-muted/20 clear-button opacity-0 transition-opacity duration-200 rounded p-1"
|
|
331
|
+
>
|
|
332
|
+
{clearIcon ? clearIcon : <X className="size-4" />}
|
|
333
|
+
</Button>
|
|
334
|
+
)}
|
|
335
|
+
{!disabled && (
|
|
336
|
+
<ChevronsUpDown className="size-4 opacity-50" />
|
|
337
|
+
)}
|
|
338
|
+
</div>
|
|
339
|
+
</>
|
|
340
|
+
)}
|
|
322
341
|
</div>
|
|
323
342
|
</PopoverTrigger>
|
|
324
343
|
|
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { ReactNode } from "react";
|
|
2
3
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
3
4
|
|
|
4
5
|
import { cn } from "../libs/utils";
|
|
5
|
-
import {
|
|
6
|
-
|
|
6
|
+
import { SelectBox } from "./selectBox";
|
|
7
|
+
|
|
8
|
+
export interface Tab {
|
|
9
|
+
name: string;
|
|
10
|
+
current?: boolean;
|
|
11
|
+
href?: string;
|
|
12
|
+
label: ReactNode;
|
|
13
|
+
content: ReactNode;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
is_allowed?: boolean;
|
|
16
|
+
}
|
|
7
17
|
|
|
8
18
|
const TabsContext = React.createContext<{
|
|
9
19
|
size?: number;
|
|
@@ -36,7 +46,7 @@ interface TabsProps {
|
|
|
36
46
|
updateHash?: boolean;
|
|
37
47
|
}
|
|
38
48
|
|
|
39
|
-
const
|
|
49
|
+
const Tabs = ({
|
|
40
50
|
tabs,
|
|
41
51
|
defaultValue,
|
|
42
52
|
current,
|
|
@@ -48,6 +58,12 @@ const VTabs = ({
|
|
|
48
58
|
variant = "tabs",
|
|
49
59
|
updateHash = true
|
|
50
60
|
}: TabsProps) => {
|
|
61
|
+
// Filter tabs based on is_allowed (undefined or true means visible)
|
|
62
|
+
const visibleTabs = React.useMemo(() =>
|
|
63
|
+
tabs.filter(tab => tab.is_allowed === undefined || tab.is_allowed === true),
|
|
64
|
+
[tabs]
|
|
65
|
+
);
|
|
66
|
+
|
|
51
67
|
// Initialize value
|
|
52
68
|
const [value, setValue] = React.useState(() => {
|
|
53
69
|
// First check if current is provided
|
|
@@ -59,14 +75,14 @@ const VTabs = ({
|
|
|
59
75
|
// Then check hash
|
|
60
76
|
const hash = window.location.hash;
|
|
61
77
|
const currentTab = hash ? hash.substring(1) : undefined;
|
|
62
|
-
|
|
63
|
-
// Check if the tab from hash exists in tabs
|
|
64
|
-
if (currentTab &&
|
|
78
|
+
|
|
79
|
+
// Check if the tab from hash exists in visible tabs
|
|
80
|
+
if (currentTab && visibleTabs.some(tab => tab.name === currentTab)) {
|
|
65
81
|
return currentTab;
|
|
66
82
|
}
|
|
67
|
-
|
|
68
|
-
// Fall back to default or first tab
|
|
69
|
-
return defaultValue ||
|
|
83
|
+
|
|
84
|
+
// Fall back to default or first visible tab
|
|
85
|
+
return defaultValue || visibleTabs[0]?.name;
|
|
70
86
|
});
|
|
71
87
|
|
|
72
88
|
// Update when current prop changes (but don't create a loop)
|
|
@@ -84,9 +100,9 @@ const VTabs = ({
|
|
|
84
100
|
const handleHashChange = () => {
|
|
85
101
|
const hash = window.location.hash;
|
|
86
102
|
const currentTab = hash ? hash.substring(1) : undefined;
|
|
87
|
-
|
|
88
|
-
// Only update if the tab exists in tabs
|
|
89
|
-
if (currentTab &&
|
|
103
|
+
|
|
104
|
+
// Only update if the tab exists in visible tabs
|
|
105
|
+
if (currentTab && visibleTabs.some(tab => tab.name === currentTab)) {
|
|
90
106
|
setValue(currentTab);
|
|
91
107
|
} else if (!hash && defaultValue) {
|
|
92
108
|
// If no hash, fall back to default
|
|
@@ -99,7 +115,7 @@ const VTabs = ({
|
|
|
99
115
|
|
|
100
116
|
window.addEventListener('hashchange', handleHashChange);
|
|
101
117
|
return () => window.removeEventListener('hashchange', handleHashChange);
|
|
102
|
-
}, [current,
|
|
118
|
+
}, [current, visibleTabs, defaultValue]);
|
|
103
119
|
|
|
104
120
|
const handleValueChange = (newValue: string) => {
|
|
105
121
|
setValue(newValue);
|
|
@@ -122,9 +138,9 @@ const VTabs = ({
|
|
|
122
138
|
}, [handleValueChange]);
|
|
123
139
|
|
|
124
140
|
return (
|
|
125
|
-
<TabsContext.Provider value={{ tabs, size: fullWidth ?
|
|
141
|
+
<TabsContext.Provider value={{ tabs: visibleTabs, size: fullWidth ? visibleTabs.length : 0, current: value, setTab, responsive: responsive, variant, updateHash }}>
|
|
126
142
|
<TabsPrimitive.Root
|
|
127
|
-
defaultValue={value ||
|
|
143
|
+
defaultValue={value || visibleTabs[0]?.name}
|
|
128
144
|
value={value}
|
|
129
145
|
onValueChange={handleValueChange}
|
|
130
146
|
className={className}
|
|
@@ -135,7 +151,7 @@ const VTabs = ({
|
|
|
135
151
|
);
|
|
136
152
|
};
|
|
137
153
|
|
|
138
|
-
const
|
|
154
|
+
const TabsBar = ({ className }: { className?: string }) => {
|
|
139
155
|
const { tabs, size, current, setTab, responsive, variant, updateHash } = React.useContext(TabsContext);
|
|
140
156
|
|
|
141
157
|
const fullWidth = size !== 0;
|
|
@@ -164,7 +180,7 @@ const VTabsBar = ({ className }: { className?: string }) => {
|
|
|
164
180
|
<>
|
|
165
181
|
{responsive && (
|
|
166
182
|
<div className="px-2 block lg:hidden">
|
|
167
|
-
<
|
|
183
|
+
<SelectBox
|
|
168
184
|
label="Tab"
|
|
169
185
|
className={(className)}
|
|
170
186
|
options={tabs}
|
|
@@ -178,6 +194,7 @@ const VTabsBar = ({ className }: { className?: string }) => {
|
|
|
178
194
|
)}
|
|
179
195
|
<TabsList size={size} variant={variant} className={cn((fullWidth ? "w-full" : ""), className, (responsive ? "hidden lg:flex" : ""))}>
|
|
180
196
|
{tabs.map((tab) => (
|
|
197
|
+
|
|
181
198
|
<TabsTrigger
|
|
182
199
|
key={tab.name}
|
|
183
200
|
value={tab.name}
|
|
@@ -194,7 +211,7 @@ const VTabsBar = ({ className }: { className?: string }) => {
|
|
|
194
211
|
);
|
|
195
212
|
};
|
|
196
213
|
|
|
197
|
-
const
|
|
214
|
+
const TabsPanel = ({ className }: { className?: string }) => {
|
|
198
215
|
const { tabs } = React.useContext(TabsContext);
|
|
199
216
|
|
|
200
217
|
if (!tabs) return null;
|
|
@@ -299,4 +316,4 @@ const TabsContent: React.ForwardRefExoticComponent<TabsContentProps & React.RefA
|
|
|
299
316
|
));
|
|
300
317
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
301
318
|
|
|
302
|
-
export {
|
|
319
|
+
export { Tabs, TabsBar, TabsPanel, TabsList, TabsTrigger, TabsContent };
|
|
@@ -1,16 +1,56 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { useLayoutEffect, useRef, useCallback } from "react"
|
|
2
2
|
|
|
3
3
|
import { cn } from "../libs/utils"
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
interface TextareaProps extends React.ComponentProps<"textarea"> {
|
|
6
|
+
minLines?: number
|
|
7
|
+
maxLines?: number
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
function Textarea({ className, minLines, maxLines, value, ...props }: TextareaProps) {
|
|
11
|
+
const textareaRef = useRef<HTMLTextAreaElement | null>(null)
|
|
12
|
+
const growing = minLines !== undefined || maxLines !== undefined
|
|
13
|
+
|
|
14
|
+
const resize = useCallback(() => {
|
|
15
|
+
const el = textareaRef.current
|
|
16
|
+
if (!el) return
|
|
17
|
+
|
|
18
|
+
const style = getComputedStyle(el)
|
|
19
|
+
const lineHeight = parseFloat(style.lineHeight) || parseFloat(style.fontSize) * 1.5
|
|
20
|
+
const paddingTop = parseFloat(style.paddingTop) || 0
|
|
21
|
+
const paddingBottom = parseFloat(style.paddingBottom) || 0
|
|
22
|
+
const paddingY = paddingTop + paddingBottom
|
|
23
|
+
const borderTop = parseFloat(style.borderTopWidth) || 0
|
|
24
|
+
const borderBottom = parseFloat(style.borderBottomWidth) || 0
|
|
25
|
+
const borderY = borderTop + borderBottom
|
|
26
|
+
|
|
27
|
+
const effectiveMin = minLines ?? 1
|
|
28
|
+
const effectiveMax = maxLines ?? Infinity
|
|
29
|
+
const minHeight = effectiveMin * lineHeight + paddingY + borderY
|
|
30
|
+
const maxHeight = effectiveMax === Infinity ? Infinity : effectiveMax * lineHeight + paddingY + borderY
|
|
31
|
+
|
|
32
|
+
el.style.height = "auto"
|
|
33
|
+
|
|
34
|
+
const contentHeight = Math.min(Math.max(el.scrollHeight, minHeight), maxHeight)
|
|
35
|
+
el.style.height = `${contentHeight}px`
|
|
36
|
+
el.style.overflowY = maxHeight !== Infinity && el.scrollHeight > maxHeight ? "auto" : "hidden"
|
|
37
|
+
}, [minLines, maxLines])
|
|
38
|
+
|
|
39
|
+
useLayoutEffect(() => {
|
|
40
|
+
if (growing) resize()
|
|
41
|
+
}, [value, growing, resize])
|
|
42
|
+
|
|
6
43
|
return (
|
|
7
44
|
<textarea
|
|
45
|
+
ref={textareaRef}
|
|
8
46
|
data-slot="textarea"
|
|
47
|
+
value={value}
|
|
9
48
|
className={cn(
|
|
10
49
|
"py-2 text-sm",
|
|
11
50
|
"flex w-full rounded-md border border-input bg-background ring-offset-background",
|
|
12
51
|
"placeholder:text-muted focus-visible:outline-none focus-visible:ring-1 ring-inset focus-visible:ring-ring",
|
|
13
52
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
53
|
+
growing && "resize-none",
|
|
14
54
|
className
|
|
15
55
|
)}
|
|
16
56
|
{...props}
|
|
@@ -19,3 +59,4 @@ function Textarea({ className, ...props }: React.ComponentProps<"textarea">) {
|
|
|
19
59
|
}
|
|
20
60
|
|
|
21
61
|
export { Textarea }
|
|
62
|
+
export type { TextareaProps }
|
|
@@ -2,6 +2,7 @@ import * as React from "react"
|
|
|
2
2
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip"
|
|
3
3
|
import { cn } from "../libs/utils"
|
|
4
4
|
import { ReactNode } from "react"
|
|
5
|
+
import { usePortalContainer } from "../../hooks/PortalContainerProvider"
|
|
5
6
|
|
|
6
7
|
const TooltipProvider: typeof TooltipPrimitive.Provider = TooltipPrimitive.Provider
|
|
7
8
|
|
|
@@ -15,23 +16,28 @@ type TooltipContentProps = React.ComponentPropsWithoutRef<typeof TooltipPrimitiv
|
|
|
15
16
|
|
|
16
17
|
const TooltipContent: React.ForwardRefExoticComponent<TooltipContentProps & React.RefAttributes<React.ElementRef<typeof TooltipPrimitive.Content>>> = React.forwardRef<
|
|
17
18
|
React.ElementRef<typeof TooltipPrimitive.Content>,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
)
|
|
19
|
+
React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content> & {
|
|
20
|
+
side?: "top" | "right" | "bottom" | "left"
|
|
21
|
+
}
|
|
22
|
+
>(({ className, sideOffset = 4, side = "top", ...props }, ref) => {
|
|
23
|
+
const container = usePortalContainer();
|
|
24
|
+
return (
|
|
25
|
+
<TooltipPrimitive.Portal container={container}>
|
|
26
|
+
<TooltipPrimitive.Content
|
|
27
|
+
ref={ref}
|
|
28
|
+
sideOffset={sideOffset}
|
|
29
|
+
side={side}
|
|
30
|
+
style={{ zIndex: 100 }}
|
|
31
|
+
className={cn(
|
|
32
|
+
"max-w-[90vw]",
|
|
33
|
+
"z-50 overflow-hidden rounded-md bg-tooltips border px-3 py-1.5 text-xs animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
34
|
+
className
|
|
35
|
+
)}
|
|
36
|
+
{...props}
|
|
37
|
+
/>
|
|
38
|
+
</TooltipPrimitive.Portal>
|
|
39
|
+
);
|
|
40
|
+
})
|
|
35
41
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName
|
|
36
42
|
|
|
37
43
|
interface TooltipPopoverProps {
|