@vertesia/ui 1.0.0 → 1.1.0-dev.20260427.060440Z
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/ComboBox.js +23 -24
- package/lib/esm/core/components/ComboBox.js.map +1 -1
- package/lib/esm/core/components/FormItem.js +2 -2
- package/lib/esm/core/components/FormItem.js.map +1 -1
- package/lib/esm/core/components/SidePanel.js +1 -1
- package/lib/esm/core/components/SidePanel.js.map +1 -1
- package/lib/esm/core/components/shadcn/collaspible.js +3 -4
- package/lib/esm/core/components/shadcn/collaspible.js.map +1 -1
- package/lib/esm/core/components/shadcn/dropdown.js +37 -12
- package/lib/esm/core/components/shadcn/dropdown.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/comboBox/DateCombobox.js +6 -6
- package/lib/esm/core/components/shadcn/filters/comboBox/DateCombobox.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/filterBar.js +5 -3
- package/lib/esm/core/components/shadcn/filters/filterBar.js.map +1 -1
- package/lib/esm/core/components/shadcn/radioGroup.js +1 -2
- package/lib/esm/core/components/shadcn/radioGroup.js.map +1 -1
- package/lib/esm/core/components/shadcn/switch.js +0 -1
- package/lib/esm/core/components/shadcn/switch.js.map +1 -1
- package/lib/esm/core/components/shadcn/tabs.js +2 -2
- package/lib/esm/core/components/shadcn/tabs.js.map +1 -1
- package/lib/esm/core/components/shadcn/tooltip.js +17 -1
- package/lib/esm/core/components/shadcn/tooltip.js.map +1 -1
- package/lib/esm/core/hooks/PortalContainerProvider.js +9 -3
- package/lib/esm/core/hooks/PortalContainerProvider.js.map +1 -1
- package/lib/esm/env/index.js +5 -8
- package/lib/esm/env/index.js.map +1 -1
- package/lib/esm/features/agent/chat/AgentRightPanel.js +21 -11
- package/lib/esm/features/agent/chat/AgentRightPanel.js.map +1 -1
- package/lib/esm/features/agent/chat/AskUserWidget.js +2 -6
- package/lib/esm/features/agent/chat/AskUserWidget.js.map +1 -1
- package/lib/esm/features/agent/chat/DocumentPanel.js +8 -5
- package/lib/esm/features/agent/chat/DocumentPanel.js.map +1 -1
- package/lib/esm/features/agent/chat/DocumentTabBar.js +5 -13
- package/lib/esm/features/agent/chat/DocumentTabBar.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentConversation.js +57 -26
- package/lib/esm/features/agent/chat/ModernAgentConversation.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +20 -16
- package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js +56 -45
- package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessageItem.js +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessageItem.js.map +1 -1
- package/lib/esm/features/agent/chat/SlidingThinkingIndicator.js +3 -9
- package/lib/esm/features/agent/chat/SlidingThinkingIndicator.js.map +1 -1
- package/lib/esm/features/agent/chat/hooks/useAgentStream.js +9 -5
- package/lib/esm/features/agent/chat/hooks/useAgentStream.js.map +1 -1
- package/lib/esm/features/agent/chat/hooks/useDocumentPanel.js +4 -0
- package/lib/esm/features/agent/chat/hooks/useDocumentPanel.js.map +1 -1
- package/lib/esm/features/facets/AgentRunnerFacetsNav.js +1 -1
- package/lib/esm/features/facets/AgentRunnerFacetsNav.js.map +1 -1
- package/lib/esm/features/facets/DocumentsFacetsNav.js +3 -2
- package/lib/esm/features/facets/DocumentsFacetsNav.js.map +1 -1
- package/lib/esm/features/facets/RunsFacetsNav.js +8 -1
- package/lib/esm/features/facets/RunsFacetsNav.js.map +1 -1
- package/lib/esm/features/facets/WorkflowExecutionsFacetsNav.js +1 -1
- package/lib/esm/features/facets/WorkflowExecutionsFacetsNav.js.map +1 -1
- package/lib/esm/features/facets/index.js +1 -0
- package/lib/esm/features/facets/index.js.map +1 -1
- package/lib/esm/features/facets/utils/VInteractionFacet.js +5 -5
- package/lib/esm/features/facets/utils/VInteractionFacet.js.map +1 -1
- package/lib/esm/features/index.js +1 -0
- package/lib/esm/features/index.js.map +1 -1
- package/lib/esm/features/oauth/OAuthProviderConnectButton.js +85 -0
- package/lib/esm/features/oauth/OAuthProviderConnectButton.js.map +1 -0
- package/lib/esm/features/oauth/RemoteMcpConnectionButton.js +119 -0
- package/lib/esm/features/oauth/RemoteMcpConnectionButton.js.map +1 -0
- package/lib/esm/features/oauth/index.js +4 -0
- package/lib/esm/features/oauth/index.js.map +1 -0
- package/lib/esm/features/oauth/useOAuthPopup.js +89 -0
- package/lib/esm/features/oauth/useOAuthPopup.js.map +1 -0
- package/lib/esm/features/store/collections/BrowseCollectionView.js.map +1 -1
- package/lib/esm/features/store/collections/EditCollectionView.js +9 -2
- package/lib/esm/features/store/collections/EditCollectionView.js.map +1 -1
- package/lib/esm/features/store/objects/components/ContentOverview.js +19 -7
- package/lib/esm/features/store/objects/components/ContentOverview.js.map +1 -1
- package/lib/esm/features/store/objects/components/useContentPanelHooks.js +35 -15
- package/lib/esm/features/store/objects/components/useContentPanelHooks.js.map +1 -1
- package/lib/esm/features/store/objects/selection/ObjectsActionContext.js +3 -3
- package/lib/esm/features/store/objects/selection/ObjectsActionContext.js.map +1 -1
- package/lib/esm/features/store/objects/selection/SelectionActions.js +4 -3
- package/lib/esm/features/store/objects/selection/SelectionActions.js.map +1 -1
- package/lib/esm/features/store/objects/selection/actions/ExportPropertiesAction.js +11 -3
- package/lib/esm/features/store/objects/selection/actions/ExportPropertiesAction.js.map +1 -1
- package/lib/esm/features/store/objects/upload/DocumentUploadModal.js +1 -5
- package/lib/esm/features/store/objects/upload/DocumentUploadModal.js.map +1 -1
- package/lib/esm/features/user/UserInfo.js +33 -10
- package/lib/esm/features/user/UserInfo.js.map +1 -1
- package/lib/esm/i18n/locales/ar.json +81 -98
- package/lib/esm/i18n/locales/de.json +44 -73
- package/lib/esm/i18n/locales/en.json +31 -61
- package/lib/esm/i18n/locales/es.json +55 -79
- package/lib/esm/i18n/locales/fr.json +55 -81
- package/lib/esm/i18n/locales/it.json +55 -79
- package/lib/esm/i18n/locales/ja.json +46 -75
- package/lib/esm/i18n/locales/ko.json +44 -73
- package/lib/esm/i18n/locales/pt.json +55 -79
- package/lib/esm/i18n/locales/ru.json +58 -81
- package/lib/esm/i18n/locales/tr.json +46 -75
- package/lib/esm/i18n/locales/zh-TW.json +46 -75
- package/lib/esm/i18n/locales/zh.json +46 -75
- package/lib/esm/session/UserSession.js +2 -4
- package/lib/esm/session/UserSession.js.map +1 -1
- package/lib/esm/session/UserSessionProvider.js +22 -17
- package/lib/esm/session/UserSessionProvider.js.map +1 -1
- package/lib/esm/session/auth/composable.js +20 -2
- package/lib/esm/session/auth/composable.js.map +1 -1
- package/lib/esm/session/auth/domainRouting.js +7 -0
- package/lib/esm/session/auth/domainRouting.js.map +1 -0
- package/lib/esm/shell/login/InviteAcceptModal.js +1 -0
- package/lib/esm/shell/login/InviteAcceptModal.js.map +1 -1
- package/lib/esm/widgets/form/Form.js +2 -2
- package/lib/esm/widgets/form/Form.js.map +1 -1
- package/lib/esm/widgets/markdown/MarkdownRenderer.js +2 -1
- package/lib/esm/widgets/markdown/MarkdownRenderer.js.map +1 -1
- package/lib/esm/widgets/markdown/preprocessMathDelimiters.js +226 -0
- package/lib/esm/widgets/markdown/preprocessMathDelimiters.js.map +1 -0
- package/lib/esm/widgets/monacoEditor/MonacoEditor.js +40 -5
- package/lib/esm/widgets/monacoEditor/MonacoEditor.js.map +1 -1
- package/lib/esm/widgets/monacoEditor/foldingProviders.js +132 -0
- package/lib/esm/widgets/monacoEditor/foldingProviders.js.map +1 -0
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/core/components/ComboBox.d.ts +12 -2
- package/lib/types/core/components/ComboBox.d.ts.map +1 -1
- package/lib/types/core/components/FormItem.d.ts +5 -2
- package/lib/types/core/components/FormItem.d.ts.map +1 -1
- package/lib/types/core/components/SidePanel.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/badge.d.ts +2 -2
- package/lib/types/core/components/shadcn/collaspible.d.ts +3 -3
- package/lib/types/core/components/shadcn/collaspible.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/dropdown.d.ts +11 -3
- package/lib/types/core/components/shadcn/dropdown.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/filters/filterBar.d.ts +2 -1
- package/lib/types/core/components/shadcn/filters/filterBar.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/input.d.ts +1 -1
- package/lib/types/core/components/shadcn/radioGroup.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/switch.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/tabs.d.ts +4 -2
- package/lib/types/core/components/shadcn/tabs.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/text.d.ts +1 -1
- package/lib/types/core/components/shadcn/tooltip.d.ts +1 -1
- package/lib/types/core/components/shadcn/tooltip.d.ts.map +1 -1
- package/lib/types/core/hooks/PortalContainerProvider.d.ts +1 -0
- package/lib/types/core/hooks/PortalContainerProvider.d.ts.map +1 -1
- package/lib/types/env/index.d.ts +2 -2
- package/lib/types/env/index.d.ts.map +1 -1
- package/lib/types/features/agent/chat/AgentChart.d.ts +1 -1
- package/lib/types/features/agent/chat/AgentChart.d.ts.map +1 -1
- package/lib/types/features/agent/chat/AgentRightPanel.d.ts +7 -2
- package/lib/types/features/agent/chat/AgentRightPanel.d.ts.map +1 -1
- package/lib/types/features/agent/chat/DocumentPanel.d.ts +2 -2
- package/lib/types/features/agent/chat/DocumentPanel.d.ts.map +1 -1
- package/lib/types/features/agent/chat/DocumentTabBar.d.ts +1 -2
- package/lib/types/features/agent/chat/DocumentTabBar.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentConversation.d.ts +5 -3
- package/lib/types/features/agent/chat/ModernAgentConversation.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts +4 -2
- package/lib/types/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/Header.d.ts +4 -4
- package/lib/types/features/agent/chat/ModernAgentOutput/Header.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/MessageItem.d.ts.map +1 -1
- package/lib/types/features/agent/chat/VegaLiteChart.d.ts +1 -1
- package/lib/types/features/agent/chat/VegaLiteChart.d.ts.map +1 -1
- package/lib/types/features/agent/chat/hooks/useAgentStream.d.ts +4 -2
- package/lib/types/features/agent/chat/hooks/useAgentStream.d.ts.map +1 -1
- package/lib/types/features/agent/chat/hooks/useDocumentPanel.d.ts +1 -0
- package/lib/types/features/agent/chat/hooks/useDocumentPanel.d.ts.map +1 -1
- package/lib/types/features/facets/DocumentsFacetsNav.d.ts.map +1 -1
- package/lib/types/features/facets/RunsFacetsNav.d.ts.map +1 -1
- package/lib/types/features/facets/index.d.ts +1 -0
- package/lib/types/features/facets/index.d.ts.map +1 -1
- package/lib/types/features/index.d.ts +1 -0
- package/lib/types/features/index.d.ts.map +1 -1
- package/lib/types/features/oauth/OAuthProviderConnectButton.d.ts +11 -0
- package/lib/types/features/oauth/OAuthProviderConnectButton.d.ts.map +1 -0
- package/lib/types/features/oauth/RemoteMcpConnectionButton.d.ts +25 -0
- package/lib/types/features/oauth/RemoteMcpConnectionButton.d.ts.map +1 -0
- package/lib/types/features/oauth/index.d.ts +4 -0
- package/lib/types/features/oauth/index.d.ts.map +1 -0
- package/lib/types/features/oauth/useOAuthPopup.d.ts +12 -0
- package/lib/types/features/oauth/useOAuthPopup.d.ts.map +1 -0
- package/lib/types/features/store/collections/BrowseCollectionView.d.ts.map +1 -1
- package/lib/types/features/store/collections/EditCollectionView.d.ts.map +1 -1
- package/lib/types/features/store/objects/components/useContentPanelHooks.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/ObjectsActionContext.d.ts +3 -3
- package/lib/types/features/store/objects/selection/ObjectsActionContext.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/ObjectsActionSpec.d.ts +2 -1
- package/lib/types/features/store/objects/selection/ObjectsActionSpec.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/SelectionActions.d.ts +3 -3
- package/lib/types/features/store/objects/selection/SelectionActions.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/actions/ExportPropertiesAction.d.ts.map +1 -1
- package/lib/types/features/user/UserInfo.d.ts +2 -1
- package/lib/types/features/user/UserInfo.d.ts.map +1 -1
- package/lib/types/session/UserSession.d.ts.map +1 -1
- package/lib/types/session/UserSessionProvider.d.ts +0 -1
- package/lib/types/session/UserSessionProvider.d.ts.map +1 -1
- package/lib/types/session/auth/composable.d.ts +4 -0
- package/lib/types/session/auth/composable.d.ts.map +1 -1
- package/lib/types/session/auth/domainRouting.d.ts +8 -0
- package/lib/types/session/auth/domainRouting.d.ts.map +1 -0
- package/lib/types/shell/login/InviteAcceptModal.d.ts.map +1 -1
- package/lib/types/widgets/markdown/MarkdownRenderer.d.ts.map +1 -1
- package/lib/types/widgets/markdown/preprocessMathDelimiters.d.ts +24 -0
- package/lib/types/widgets/markdown/preprocessMathDelimiters.d.ts.map +1 -0
- package/lib/types/widgets/monacoEditor/MonacoEditor.d.ts +2 -1
- package/lib/types/widgets/monacoEditor/MonacoEditor.d.ts.map +1 -1
- package/lib/types/widgets/monacoEditor/foldingProviders.d.ts +2 -0
- package/lib/types/widgets/monacoEditor/foldingProviders.d.ts.map +1 -0
- package/lib/vertesia-ui-core.js +1 -1
- package/lib/vertesia-ui-core.js.map +1 -1
- package/lib/vertesia-ui-env.js +1 -1
- package/lib/vertesia-ui-env.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-i18n.js +1 -1
- package/lib/vertesia-ui-i18n.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-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 +15 -15
- package/src/core/components/ComboBox.tsx +66 -29
- package/src/core/components/FormItem.tsx +9 -6
- package/src/core/components/SidePanel.tsx +5 -3
- package/src/core/components/shadcn/collaspible.tsx +5 -7
- package/src/core/components/shadcn/dropdown.tsx +68 -13
- package/src/core/components/shadcn/filters/comboBox/DateCombobox.tsx +6 -6
- package/src/core/components/shadcn/filters/filterBar.tsx +5 -3
- package/src/core/components/shadcn/radioGroup.tsx +1 -3
- package/src/core/components/shadcn/switch.tsx +0 -2
- package/src/core/components/shadcn/tabs.tsx +15 -2
- package/src/core/components/shadcn/tooltip.tsx +20 -3
- package/src/core/hooks/PortalContainerProvider.tsx +11 -3
- package/src/env/index.ts +7 -10
- package/src/features/agent/chat/AgentRightPanel.tsx +43 -23
- package/src/features/agent/chat/DocumentPanel.tsx +21 -19
- package/src/features/agent/chat/DocumentTabBar.tsx +21 -32
- package/src/features/agent/chat/ModernAgentConversation.tsx +72 -27
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +21 -9
- package/src/features/agent/chat/ModernAgentOutput/Header.tsx +136 -115
- package/src/features/agent/chat/ModernAgentOutput/MessageItem.tsx +0 -3
- package/src/features/agent/chat/hooks/useAgentStream.ts +13 -7
- package/src/features/agent/chat/hooks/useDocumentPanel.ts +8 -0
- package/src/features/facets/AgentRunnerFacetsNav.tsx +1 -1
- package/src/features/facets/DocumentsFacetsNav.tsx +3 -1
- package/src/features/facets/RunsFacetsNav.tsx +9 -1
- package/src/features/facets/WorkflowExecutionsFacetsNav.tsx +1 -1
- package/src/features/facets/index.ts +1 -0
- package/src/features/facets/utils/VInteractionFacet.tsx +12 -12
- package/src/features/index.ts +1 -0
- package/src/features/oauth/OAuthProviderConnectButton.tsx +125 -0
- package/src/features/oauth/RemoteMcpConnectionButton.tsx +274 -0
- package/src/features/oauth/index.ts +3 -0
- package/src/features/oauth/useOAuthPopup.ts +125 -0
- package/src/features/store/collections/BrowseCollectionView.tsx +3 -3
- package/src/features/store/collections/EditCollectionView.tsx +10 -1
- package/src/features/store/objects/components/ContentOverview.tsx +108 -87
- package/src/features/store/objects/components/useContentPanelHooks.ts +50 -15
- package/src/features/store/objects/selection/ObjectsActionContext.tsx +5 -5
- package/src/features/store/objects/selection/ObjectsActionSpec.ts +2 -1
- package/src/features/store/objects/selection/SelectionActions.tsx +6 -5
- package/src/features/store/objects/selection/actions/ExportPropertiesAction.tsx +12 -3
- package/src/features/user/UserInfo.tsx +82 -10
- package/src/i18n/locales/ar.json +81 -98
- package/src/i18n/locales/de.json +44 -73
- package/src/i18n/locales/en.json +31 -61
- package/src/i18n/locales/es.json +55 -79
- package/src/i18n/locales/fr.json +55 -81
- package/src/i18n/locales/it.json +55 -79
- package/src/i18n/locales/ja.json +46 -75
- package/src/i18n/locales/ko.json +44 -73
- package/src/i18n/locales/pt.json +55 -79
- package/src/i18n/locales/ru.json +58 -81
- package/src/i18n/locales/tr.json +46 -75
- package/src/i18n/locales/zh-TW.json +46 -75
- package/src/i18n/locales/zh.json +46 -75
- package/src/session/UserSession.ts +2 -5
- package/src/session/UserSessionProvider.tsx +23 -18
- package/src/session/auth/auth-flow.md +1 -1
- package/src/session/auth/composable.ts +21 -2
- package/src/session/auth/domainRouting.test.ts +26 -0
- package/src/session/auth/domainRouting.ts +13 -0
- package/src/shell/login/InviteAcceptModal.tsx +1 -0
- package/src/widgets/form/Form.tsx +2 -2
- package/src/widgets/markdown/MarkdownRenderer.tsx +2 -1
- package/src/widgets/markdown/markdown.css +12 -0
- package/src/widgets/markdown/preprocessMathDelimiters.test.ts +87 -0
- package/src/widgets/markdown/preprocessMathDelimiters.ts +229 -0
- package/src/widgets/monacoEditor/MonacoEditor.tsx +47 -4
- package/src/widgets/monacoEditor/foldingProviders.ts +122 -0
|
@@ -237,73 +237,71 @@ function PropertiesPanel({ object, refetch, handleCopyContent }: { object: Conte
|
|
|
237
237
|
|
|
238
238
|
return (
|
|
239
239
|
<>
|
|
240
|
-
<div className="flex
|
|
241
|
-
<div className="flex items-center
|
|
242
|
-
<
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
240
|
+
<div className="flex flex-col h-full">
|
|
241
|
+
<div className="flex justify-between items-center px-2">
|
|
242
|
+
<div className="flex items-center gap-1 bg-muted mb-2 p-1 rounded">
|
|
243
|
+
<Button
|
|
244
|
+
variant={`${viewCode ? "ghost" : "primary"}`}
|
|
245
|
+
size="sm"
|
|
246
|
+
alt={t('store.previewProperties')}
|
|
247
|
+
onClick={() => setViewCode(!viewCode)}
|
|
248
|
+
>
|
|
249
|
+
Properties
|
|
250
|
+
</Button>
|
|
251
|
+
<Button
|
|
252
|
+
variant={`${viewCode ? "primary" : "ghost"}`}
|
|
253
|
+
size="sm"
|
|
254
|
+
alt={t('store.viewInJsonFormat')}
|
|
255
|
+
onClick={() => setViewCode(!viewCode)}
|
|
256
|
+
>
|
|
257
|
+
JSON
|
|
258
|
+
</Button>
|
|
259
|
+
</div>
|
|
260
|
+
<div className="flex items-center gap-2">
|
|
261
|
+
{object.properties && (
|
|
262
|
+
<Button
|
|
263
|
+
variant="ghost"
|
|
264
|
+
size="sm"
|
|
265
|
+
title="Copy properties"
|
|
266
|
+
onClick={() =>
|
|
267
|
+
handleCopyContent(
|
|
268
|
+
JSON.stringify(
|
|
269
|
+
object.properties,
|
|
270
|
+
null,
|
|
271
|
+
2,
|
|
272
|
+
),
|
|
273
|
+
"properties",
|
|
274
|
+
)
|
|
275
|
+
}
|
|
276
|
+
>
|
|
277
|
+
<Copy className="size-4" />
|
|
278
|
+
</Button>
|
|
279
|
+
)}
|
|
261
280
|
<Button
|
|
262
281
|
variant="ghost"
|
|
263
282
|
size="sm"
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
JSON.stringify(
|
|
268
|
-
object.properties,
|
|
269
|
-
null,
|
|
270
|
-
2,
|
|
271
|
-
),
|
|
272
|
-
"properties",
|
|
273
|
-
)
|
|
274
|
-
}
|
|
283
|
+
onClick={handleOpenPropertiesModal}
|
|
284
|
+
title="Edit properties"
|
|
285
|
+
className="flex items-center gap-2"
|
|
275
286
|
>
|
|
276
|
-
<
|
|
287
|
+
<SquarePen className="size-4" />
|
|
277
288
|
</Button>
|
|
278
|
-
|
|
279
|
-
<Button
|
|
280
|
-
variant="ghost"
|
|
281
|
-
size="sm"
|
|
282
|
-
onClick={handleOpenPropertiesModal}
|
|
283
|
-
title="Edit properties"
|
|
284
|
-
className="flex items-center gap-2"
|
|
285
|
-
>
|
|
286
|
-
<SquarePen className="size-4" />
|
|
287
|
-
</Button>
|
|
289
|
+
</div>
|
|
288
290
|
</div>
|
|
289
|
-
</div>
|
|
290
291
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
<div className={`h-full px-2`}>
|
|
292
|
+
{object.properties ? (
|
|
293
|
+
<div className="flex-1 min-h-0 px-2">
|
|
294
294
|
<JSONDisplay
|
|
295
295
|
value={object.properties}
|
|
296
296
|
viewCode={viewCode}
|
|
297
|
-
|
|
298
297
|
/>
|
|
299
298
|
</div>
|
|
300
299
|
) : (
|
|
301
|
-
<div className=
|
|
300
|
+
<div className="flex-1 min-h-0 px-2">
|
|
302
301
|
<div>{t('store.noPropertiesDefined')}</div>
|
|
303
302
|
</div>
|
|
304
|
-
)
|
|
305
|
-
|
|
306
|
-
{/* Properties Editor Modal */}
|
|
303
|
+
)}
|
|
304
|
+
</div>
|
|
307
305
|
<PropertiesEditorModal
|
|
308
306
|
isOpen={isPropertiesModalOpen}
|
|
309
307
|
onClose={handleClosePropertiesModal}
|
|
@@ -337,6 +335,13 @@ function DataPanel({ object, loadText, handleCopyContent, refetch }: { object: C
|
|
|
337
335
|
};
|
|
338
336
|
|
|
339
337
|
const [currentPanel, setCurrentPanel] = useState<PanelView>(getInitialView());
|
|
338
|
+
const [hasVisitedPdfPanel, setHasVisitedPdfPanel] = useState(currentPanel === PanelView.Pdf);
|
|
339
|
+
|
|
340
|
+
useEffect(() => {
|
|
341
|
+
if (currentPanel === PanelView.Pdf) {
|
|
342
|
+
setHasVisitedPdfPanel(true);
|
|
343
|
+
}
|
|
344
|
+
}, [currentPanel]);
|
|
340
345
|
|
|
341
346
|
// Text editing state
|
|
342
347
|
const [isEditing, setIsEditing] = useState(false);
|
|
@@ -358,8 +363,10 @@ function DataPanel({ object, loadText, handleCopyContent, refetch }: { object: C
|
|
|
358
363
|
loadText: reloadText,
|
|
359
364
|
} = useObjectText(object.id, object.text, loadText);
|
|
360
365
|
|
|
361
|
-
//
|
|
362
|
-
const shouldPollProgress = (isPdf || isPreviewableAsPdfDoc)
|
|
366
|
+
// Only poll while the active panel can actually surface processing progress.
|
|
367
|
+
const shouldPollProgress = (isPdf || isPreviewableAsPdfDoc)
|
|
368
|
+
&& isCreatedOrProcessing
|
|
369
|
+
&& (currentPanel === PanelView.Text || currentPanel === PanelView.Pdf);
|
|
363
370
|
const {
|
|
364
371
|
progress: pdfProgress,
|
|
365
372
|
status: pdfStatus,
|
|
@@ -375,15 +382,19 @@ function DataPanel({ object, loadText, handleCopyContent, refetch }: { object: C
|
|
|
375
382
|
triggerConversion: triggerOfficePdfConversion,
|
|
376
383
|
} = useOfficePdfConversion(object.id, isPreviewableAsPdfDoc);
|
|
377
384
|
|
|
378
|
-
//
|
|
385
|
+
// Load text once processing completes without triggering a full object refetch
|
|
386
|
+
// (which would flash the page-level loading spinner).
|
|
379
387
|
useEffect(() => {
|
|
380
388
|
if (processingComplete && pdfStatus === WorkflowExecutionStatus.COMPLETED) {
|
|
381
|
-
|
|
389
|
+
reloadText();
|
|
382
390
|
}
|
|
383
|
-
}, [processingComplete, pdfStatus,
|
|
391
|
+
}, [processingComplete, pdfStatus, reloadText]);
|
|
384
392
|
|
|
385
393
|
// Show processing panel when workflow is running (for both PDFs and Office documents)
|
|
386
394
|
const showProcessingPanel = (isPdf || isPreviewableAsPdfDoc) && isCreatedOrProcessing && !processingComplete && pdfStatus === WorkflowExecutionStatus.RUNNING;
|
|
395
|
+
const showPdfPreviewPanel = currentPanel === PanelView.Pdf && !showProcessingPanel;
|
|
396
|
+
const showPdfProcessingPanel = showProcessingPanel && (currentPanel === PanelView.Text || currentPanel === PanelView.Pdf);
|
|
397
|
+
const keepPdfPreviewMounted = hasVisitedPdfPanel && !showProcessingPanel;
|
|
387
398
|
|
|
388
399
|
const textContainerRef = useRef<HTMLDivElement | null>(null);
|
|
389
400
|
|
|
@@ -489,27 +500,33 @@ function DataPanel({ object, loadText, handleCopyContent, refetch }: { object: C
|
|
|
489
500
|
/>
|
|
490
501
|
)}
|
|
491
502
|
</div>
|
|
492
|
-
|
|
493
|
-
<
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
+
{currentPanel === PanelView.Image && (
|
|
504
|
+
<div className={getPanelVisibility(true)}>
|
|
505
|
+
<ImagePanel object={object} />
|
|
506
|
+
</div>
|
|
507
|
+
)}
|
|
508
|
+
{currentPanel === PanelView.Video && (
|
|
509
|
+
<div className={getPanelVisibility(true)}>
|
|
510
|
+
<VideoPanel object={object} />
|
|
511
|
+
</div>
|
|
512
|
+
)}
|
|
513
|
+
{currentPanel === PanelView.Audio && (
|
|
514
|
+
<div className={getPanelVisibility(true)}>
|
|
515
|
+
<AudioPanel object={object} />
|
|
516
|
+
</div>
|
|
517
|
+
)}
|
|
518
|
+
{hasTranscript && currentPanel === PanelView.Transcript && (
|
|
519
|
+
<div className={getPanelVisibility(true)}>
|
|
503
520
|
<TranscriptPanel object={object} handleCopyContent={handleCopyContent} />
|
|
504
521
|
</div>
|
|
505
522
|
)}
|
|
506
|
-
{isPdf && (
|
|
507
|
-
<div className={getPanelVisibility(
|
|
523
|
+
{isPdf && keepPdfPreviewMounted && (
|
|
524
|
+
<div className={getPanelVisibility(showPdfPreviewPanel)}>
|
|
508
525
|
<PdfPreviewPanel object={object} />
|
|
509
526
|
</div>
|
|
510
527
|
)}
|
|
511
|
-
{isPreviewableAsPdfDoc && (
|
|
512
|
-
<div className={getPanelVisibility(
|
|
528
|
+
{isPreviewableAsPdfDoc && keepPdfPreviewMounted && (
|
|
529
|
+
<div className={getPanelVisibility(showPdfPreviewPanel)}>
|
|
513
530
|
<OfficePdfPreviewPanel
|
|
514
531
|
pdfRendition={pdfRendition}
|
|
515
532
|
officePdfUrl={officePdfUrl}
|
|
@@ -519,24 +536,28 @@ function DataPanel({ object, loadText, handleCopyContent, refetch }: { object: C
|
|
|
519
536
|
/>
|
|
520
537
|
</div>
|
|
521
538
|
)}
|
|
522
|
-
{
|
|
523
|
-
<div className={getPanelVisibility(
|
|
539
|
+
{showPdfProcessingPanel && (
|
|
540
|
+
<div className={getPanelVisibility(true)}>
|
|
524
541
|
<PdfProcessingPanel progress={pdfProgress} status={pdfStatus} outputFormat={pdfOutputFormat} />
|
|
525
542
|
</div>
|
|
526
543
|
)}
|
|
527
|
-
|
|
528
|
-
<div className=
|
|
529
|
-
<
|
|
544
|
+
{currentPanel === PanelView.Text && !showProcessingPanel && isLoadingText && (
|
|
545
|
+
<div className={getPanelVisibility(true)}>
|
|
546
|
+
<div className="flex justify-center items-center flex-1">
|
|
547
|
+
<Spinner size="lg" />
|
|
548
|
+
</div>
|
|
530
549
|
</div>
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
<
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
550
|
+
)}
|
|
551
|
+
{currentPanel === PanelView.Text && !showProcessingPanel && !isLoadingText && (
|
|
552
|
+
<div className={getPanelVisibility(true)}>
|
|
553
|
+
<TextPanel
|
|
554
|
+
object={object}
|
|
555
|
+
text={displayText}
|
|
556
|
+
isTextCropped={isTextCropped}
|
|
557
|
+
textContainerRef={textContainerRef}
|
|
558
|
+
/>
|
|
559
|
+
</div>
|
|
560
|
+
)}
|
|
540
561
|
{isEditing && currentPanel === PanelView.Text && fullText != null && (
|
|
541
562
|
<TextEditorPanel
|
|
542
563
|
object={object}
|
|
@@ -1279,4 +1300,4 @@ function ProgressLine({ name, progress }: { name: string, progress: { total: num
|
|
|
1279
1300
|
<span>{progress.processed} of {progress.total}</span>
|
|
1280
1301
|
</div>
|
|
1281
1302
|
);
|
|
1282
|
-
}
|
|
1303
|
+
}
|
|
@@ -83,52 +83,87 @@ export function useObjectText(objectId: string, initialText?: string, loadOnMoun
|
|
|
83
83
|
export function usePdfProcessingStatus(objectId: string, shouldPoll: boolean) {
|
|
84
84
|
const { client } = useUserSession();
|
|
85
85
|
|
|
86
|
-
const [
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
86
|
+
const [state, setState] = useState<{
|
|
87
|
+
progress?: DocAnalyzerProgress;
|
|
88
|
+
status?: WorkflowExecutionStatus;
|
|
89
|
+
outputFormat?: DocProcessorOutputFormat;
|
|
90
|
+
isComplete: boolean;
|
|
91
|
+
}>({ isComplete: false });
|
|
90
92
|
|
|
91
93
|
useEffect(() => {
|
|
92
94
|
if (!shouldPoll) return;
|
|
93
95
|
|
|
94
96
|
let interrupted = false;
|
|
97
|
+
let timeoutId: ReturnType<typeof setTimeout> | undefined;
|
|
98
|
+
|
|
99
|
+
const updateStateIfChanged = (
|
|
100
|
+
nextProgress: DocAnalyzerProgress | undefined,
|
|
101
|
+
nextStatus: WorkflowExecutionStatus | undefined,
|
|
102
|
+
nextOutputFormat: DocProcessorOutputFormat | undefined,
|
|
103
|
+
nextIsComplete: boolean,
|
|
104
|
+
) => {
|
|
105
|
+
setState((prev) => {
|
|
106
|
+
const prevProgress = JSON.stringify(prev.progress ?? null);
|
|
107
|
+
const nextProgressSignature = JSON.stringify(nextProgress ?? null);
|
|
108
|
+
|
|
109
|
+
if (
|
|
110
|
+
prev.status === nextStatus
|
|
111
|
+
&& prev.outputFormat === nextOutputFormat
|
|
112
|
+
&& prev.isComplete === nextIsComplete
|
|
113
|
+
&& prevProgress === nextProgressSignature
|
|
114
|
+
) {
|
|
115
|
+
return prev;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
return {
|
|
119
|
+
progress: nextProgress,
|
|
120
|
+
status: nextStatus,
|
|
121
|
+
outputFormat: nextOutputFormat,
|
|
122
|
+
isComplete: nextIsComplete,
|
|
123
|
+
};
|
|
124
|
+
});
|
|
125
|
+
};
|
|
95
126
|
|
|
96
127
|
function poll() {
|
|
97
128
|
if (interrupted) return;
|
|
98
129
|
|
|
99
130
|
client.objects.analyze(objectId).getStatus()
|
|
100
131
|
.then((r) => {
|
|
101
|
-
|
|
102
|
-
setStatus(r.status);
|
|
103
|
-
setOutputFormat(r.output_format ?? r.progress?.output_format);
|
|
132
|
+
const nextOutputFormat = r.output_format ?? r.progress?.output_format;
|
|
104
133
|
|
|
105
134
|
if (r.status === WorkflowExecutionStatus.RUNNING) {
|
|
135
|
+
updateStateIfChanged(r.progress, r.status, nextOutputFormat, false);
|
|
106
136
|
// Workflow is running, poll every 2 seconds for progress
|
|
107
137
|
if (!interrupted) {
|
|
108
|
-
setTimeout(poll, 2000);
|
|
138
|
+
timeoutId = setTimeout(poll, 2000);
|
|
109
139
|
}
|
|
110
140
|
} else {
|
|
111
141
|
// Workflow completed or terminal state
|
|
112
|
-
|
|
142
|
+
updateStateIfChanged(r.progress, r.status, nextOutputFormat, true);
|
|
113
143
|
}
|
|
114
144
|
})
|
|
115
145
|
.catch(() => {
|
|
116
146
|
// No workflow found yet, poll every 10 seconds to check if one starts
|
|
117
147
|
if (!interrupted) {
|
|
118
|
-
setTimeout(poll, 10000);
|
|
148
|
+
timeoutId = setTimeout(poll, 10000);
|
|
119
149
|
}
|
|
120
150
|
});
|
|
121
151
|
}
|
|
122
152
|
|
|
123
153
|
poll();
|
|
124
|
-
return () => {
|
|
154
|
+
return () => {
|
|
155
|
+
interrupted = true;
|
|
156
|
+
if (timeoutId) {
|
|
157
|
+
clearTimeout(timeoutId);
|
|
158
|
+
}
|
|
159
|
+
};
|
|
125
160
|
}, [shouldPoll, objectId, client]);
|
|
126
161
|
|
|
127
162
|
return {
|
|
128
|
-
progress,
|
|
129
|
-
status,
|
|
130
|
-
outputFormat,
|
|
131
|
-
isComplete,
|
|
163
|
+
progress: state.progress,
|
|
164
|
+
status: state.status,
|
|
165
|
+
outputFormat: state.outputFormat,
|
|
166
|
+
isComplete: state.isComplete,
|
|
132
167
|
};
|
|
133
168
|
}
|
|
134
169
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode, useMemo } from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { ContentObjectTypeItem } from '@vertesia/common';
|
|
4
4
|
import { ErrorBox, useFetch, useToast } from '@vertesia/ui/core';
|
|
5
5
|
import { useUserSession } from '@vertesia/ui/session';
|
|
6
6
|
import { useUITranslation } from '../../../../i18n/index.js';
|
|
@@ -29,9 +29,9 @@ const DEFAULT_ACTIONS: ObjectsActionSpec[] = [
|
|
|
29
29
|
|
|
30
30
|
interface ObjectsActionContextProps {
|
|
31
31
|
children: ReactNode;
|
|
32
|
-
|
|
32
|
+
type?: ContentObjectTypeItem;
|
|
33
33
|
}
|
|
34
|
-
export function ObjectsActionContextProvider({ children,
|
|
34
|
+
export function ObjectsActionContextProvider({ children, type }: ObjectsActionContextProps) {
|
|
35
35
|
const { t } = useUITranslation();
|
|
36
36
|
const selection = useDocumentSelection();
|
|
37
37
|
const toast = useToast();
|
|
@@ -55,12 +55,12 @@ export function ObjectsActionContextProvider({ children, table_layout }: Objects
|
|
|
55
55
|
|
|
56
56
|
const context = useMemo(() => {
|
|
57
57
|
const context = new ObjectsActionContext({
|
|
58
|
-
selection, toast, client, search,
|
|
58
|
+
selection, toast, client, search, type
|
|
59
59
|
});
|
|
60
60
|
context.allActions = DEFAULT_ACTIONS;
|
|
61
61
|
context.wfRules = rules!;
|
|
62
62
|
return context;
|
|
63
|
-
}, [selection, rules,
|
|
63
|
+
}, [selection, rules, type]);
|
|
64
64
|
|
|
65
65
|
if (error) {
|
|
66
66
|
return <ErrorBox title={t('store.failedToFetchWorkflows')}>{error.message}</ErrorBox>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VertesiaClient } from "@vertesia/client";
|
|
2
|
-
import { ColumnLayout } from "@vertesia/common";
|
|
2
|
+
import { ColumnLayout, ContentObjectTypeItem } from "@vertesia/common";
|
|
3
3
|
import { ToastFn } from "@vertesia/ui/core";
|
|
4
4
|
import { DocumentSelection } from '../DocumentSelectionProvider';
|
|
5
5
|
import { DocumentSearch } from '../search/DocumentSearchContext';
|
|
@@ -22,6 +22,7 @@ export interface ObjectsActionParams {
|
|
|
22
22
|
toast: ToastFn,
|
|
23
23
|
search: DocumentSearch,
|
|
24
24
|
table_layout?: ColumnLayout[],
|
|
25
|
+
type?: ContentObjectTypeItem,
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
export interface ActionComponentTypeProps {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ContentObjectTypeItem } from '@vertesia/common';
|
|
2
2
|
import { Button, Popover, PopoverContent, PopoverTrigger, SelectList } from '@vertesia/ui/core';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { EllipsisVertical, X } from 'lucide-react';
|
|
5
5
|
|
|
6
6
|
import { useState } from "react";
|
|
7
7
|
import { useUITranslation } from '../../../../i18n/index.js';
|
|
8
|
-
import { DocumentSelection,
|
|
8
|
+
import { DocumentSelection, useDocumentSelection } from "../DocumentSelectionProvider.js";
|
|
9
|
+
import { DocumentUploadModal } from "../upload/DocumentUploadModal.js";
|
|
9
10
|
import { ExportPropertiesAction } from "./actions/ExportPropertiesAction";
|
|
10
11
|
import { StartWorkflowAction } from "./actions/StartWorkflowComponent";
|
|
11
12
|
import { ObjectsActionContextProvider } from "./ObjectsActionContext";
|
|
@@ -13,9 +14,9 @@ import { useObjectsActionContext } from "./ObjectsActionHooks";
|
|
|
13
14
|
import { ObjectsActionSpec } from "./ObjectsActionSpec";
|
|
14
15
|
|
|
15
16
|
interface SelectionActionsProps {
|
|
16
|
-
|
|
17
|
+
type?: ContentObjectTypeItem;
|
|
17
18
|
}
|
|
18
|
-
export function SelectionActions({
|
|
19
|
+
export function SelectionActions({ type }: SelectionActionsProps) {
|
|
19
20
|
const selection = useDocumentSelection();
|
|
20
21
|
const size = selection.size();
|
|
21
22
|
const plural = size > 1 ? "s" : "";
|
|
@@ -28,7 +29,7 @@ export function SelectionActions({ table_layout }: SelectionActionsProps) {
|
|
|
28
29
|
};
|
|
29
30
|
|
|
30
31
|
return (
|
|
31
|
-
<ObjectsActionContextProvider
|
|
32
|
+
<ObjectsActionContextProvider type={type}>
|
|
32
33
|
<div className="flex items-center gap-x-2">
|
|
33
34
|
{hasSelection && !hasSingleSelection &&
|
|
34
35
|
<div className="flex items-center gap-x-1 shrink-0">
|
|
@@ -55,14 +55,17 @@ export function ExportPropertiesComponent({ action, objectIds }: ActionComponent
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
+
const typeId = ctx.params?.type?.id ?? query.type;
|
|
59
|
+
const table_layout = ctx.params?.type?.table_layout ?? undefined;
|
|
60
|
+
|
|
58
61
|
getObjectIds().then((Ids) => {
|
|
59
62
|
// When exporting all, send search result if a vector search was used
|
|
60
|
-
// otherwise send the query.
|
|
63
|
+
// otherwise send the query — always constrained to the current content type.
|
|
61
64
|
store.objects.exportProperties({
|
|
62
65
|
objectIds: Ids,
|
|
63
66
|
type: exportType,
|
|
64
|
-
query: exportAll && !query.vector ? query : { type:
|
|
65
|
-
table_layout:
|
|
67
|
+
query: exportAll && !query.vector ? { ...query, type: typeId } : { type: typeId },
|
|
68
|
+
table_layout: table_layout,
|
|
66
69
|
}).then((response) => {
|
|
67
70
|
let data;
|
|
68
71
|
|
|
@@ -102,6 +105,12 @@ export function ExportPropertiesComponent({ action, objectIds }: ActionComponent
|
|
|
102
105
|
});
|
|
103
106
|
} else {
|
|
104
107
|
setOpen(false);
|
|
108
|
+
toast({
|
|
109
|
+
status: 'error',
|
|
110
|
+
title: t('store.actions.errorExportProperties'),
|
|
111
|
+
description: 'No objects selected for export',
|
|
112
|
+
duration: 5000
|
|
113
|
+
});
|
|
105
114
|
}
|
|
106
115
|
}
|
|
107
116
|
|