@vertesia/ui 1.5.0-dev.20260807.073259Z → 1.5.0-dev.20260826.064249Z
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/README.md +1 -7
- package/lib/core/components/shadcn/filters/comboBox/DateCombobox.js +1 -1
- package/lib/core/components/shadcn/filters/comboBox/DateCombobox.js.map +1 -1
- package/lib/core/components/shadcn/filters/filter/dateFilter.d.ts.map +1 -1
- package/lib/core/components/shadcn/filters/filter/dateFilter.js +1 -1
- package/lib/core/components/shadcn/filters/filter/dateFilter.js.map +1 -1
- package/lib/core/components/shadcn/filters/filters.d.ts.map +1 -1
- package/lib/core/components/shadcn/filters/filters.js +1 -1
- package/lib/core/components/shadcn/filters/filters.js.map +1 -1
- package/lib/core/components/shadcn/index.d.ts +1 -0
- package/lib/core/components/shadcn/index.d.ts.map +1 -1
- package/lib/core/components/shadcn/index.js +1 -0
- package/lib/core/components/shadcn/index.js.map +1 -1
- package/lib/core/components/shadcn/modal/dialog.d.ts.map +1 -1
- package/lib/core/components/shadcn/modal/dialog.js +1 -3
- package/lib/core/components/shadcn/modal/dialog.js.map +1 -1
- package/lib/core/components/shadcn/overflowTabs.d.ts +59 -0
- package/lib/core/components/shadcn/overflowTabs.d.ts.map +1 -0
- package/lib/core/components/shadcn/overflowTabs.js +173 -0
- package/lib/core/components/shadcn/overflowTabs.js.map +1 -0
- package/lib/core/components/shadcn/selectBox.js +2 -2
- package/lib/core/components/shadcn/selectBox.js.map +1 -1
- package/lib/core/components/shadcn/theme/ThemeProvider.d.ts +3 -1
- package/lib/core/components/shadcn/theme/ThemeProvider.d.ts.map +1 -1
- package/lib/core/components/shadcn/theme/ThemeProvider.js +8 -9
- package/lib/core/components/shadcn/theme/ThemeProvider.js.map +1 -1
- package/lib/core/utils/dayjs.d.ts +12 -0
- package/lib/core/utils/dayjs.d.ts.map +1 -0
- package/lib/core/utils/dayjs.js +16 -0
- package/lib/core/utils/dayjs.js.map +1 -0
- package/lib/env/index.d.ts +17 -0
- package/lib/env/index.d.ts.map +1 -1
- package/lib/env/index.js +18 -1
- package/lib/env/index.js.map +1 -1
- package/lib/features/agent/PayloadBuilder.d.ts +1 -0
- package/lib/features/agent/PayloadBuilder.d.ts.map +1 -1
- package/lib/features/agent/PayloadBuilder.js +22 -5
- package/lib/features/agent/PayloadBuilder.js.map +1 -1
- package/lib/features/agent/chat/AgentRightPanel.d.ts.map +1 -1
- package/lib/features/agent/chat/AgentRightPanel.js +3 -135
- package/lib/features/agent/chat/AgentRightPanel.js.map +1 -1
- package/lib/features/agent/chat/ArtifactsTab.d.ts.map +1 -1
- package/lib/features/agent/chat/ArtifactsTab.js +1 -1
- package/lib/features/agent/chat/ArtifactsTab.js.map +1 -1
- package/lib/features/agent/chat/AskUserWidget.d.ts.map +1 -1
- package/lib/features/agent/chat/AskUserWidget.js +19 -4
- package/lib/features/agent/chat/AskUserWidget.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentConversation.d.ts +6 -0
- package/lib/features/agent/chat/ModernAgentConversation.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentConversation.js +99 -29
- package/lib/features/agent/chat/ModernAgentConversation.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/ActiveWorkstreamsSummary.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/ActiveWorkstreamsSummary.js +10 -9
- package/lib/features/agent/chat/ModernAgentOutput/ActiveWorkstreamsSummary.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +5 -8
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/AttachmentPreview.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/AttachmentPreview.js +45 -4
- package/lib/features/agent/chat/ModernAgentOutput/AttachmentPreview.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/BatchProgressPanel.js +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/BatchProgressPanel.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/Header.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/Header.js +3 -3
- package/lib/features/agent/chat/ModernAgentOutput/Header.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.js +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/StreamingMessage.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/StreamingMessage.js +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/StreamingMessage.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/ToolCallGroup.js +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/ToolCallGroup.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/WorkstreamTabs.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js +9 -121
- package/lib/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/utils.d.ts +6 -0
- package/lib/features/agent/chat/ModernAgentOutput/utils.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/utils.js +19 -11
- package/lib/features/agent/chat/ModernAgentOutput/utils.js.map +1 -1
- package/lib/features/agent/chat/VegaLiteChart.d.ts.map +1 -1
- package/lib/features/agent/chat/VegaLiteChart.js +11 -3
- package/lib/features/agent/chat/VegaLiteChart.js.map +1 -1
- package/lib/features/agent/chat/hooks/useAgentStream.d.ts.map +1 -1
- package/lib/features/agent/chat/hooks/useAgentStream.js +3 -0
- package/lib/features/agent/chat/hooks/useAgentStream.js.map +1 -1
- package/lib/features/document-viewer/UniversalDocumentViewer.d.ts.map +1 -1
- package/lib/features/document-viewer/UniversalDocumentViewer.js +1 -1
- package/lib/features/document-viewer/UniversalDocumentViewer.js.map +1 -1
- package/lib/features/facets/AgentRunnerFacetsNav.d.ts +14 -2
- package/lib/features/facets/AgentRunnerFacetsNav.d.ts.map +1 -1
- package/lib/features/facets/AgentRunnerFacetsNav.js +20 -2
- package/lib/features/facets/AgentRunnerFacetsNav.js.map +1 -1
- package/lib/features/facets/CollectionsFacetsNav.d.ts +3 -3
- package/lib/features/facets/CollectionsFacetsNav.d.ts.map +1 -1
- package/lib/features/facets/CollectionsFacetsNav.js +6 -1
- package/lib/features/facets/CollectionsFacetsNav.js.map +1 -1
- package/lib/features/facets/DocumentsFacetsNav.d.ts +3 -3
- package/lib/features/facets/DocumentsFacetsNav.d.ts.map +1 -1
- package/lib/features/facets/DocumentsFacetsNav.js +20 -8
- package/lib/features/facets/DocumentsFacetsNav.js.map +1 -1
- package/lib/features/facets/InteractionsFacetsNav.d.ts +3 -3
- package/lib/features/facets/InteractionsFacetsNav.d.ts.map +1 -1
- package/lib/features/facets/InteractionsFacetsNav.js +11 -1
- package/lib/features/facets/InteractionsFacetsNav.js.map +1 -1
- package/lib/features/facets/PromptsFacetsNav.d.ts +3 -3
- package/lib/features/facets/PromptsFacetsNav.d.ts.map +1 -1
- package/lib/features/facets/PromptsFacetsNav.js +6 -1
- package/lib/features/facets/PromptsFacetsNav.js.map +1 -1
- package/lib/features/facets/RunsFacetsNav.d.ts +4 -14
- package/lib/features/facets/RunsFacetsNav.d.ts.map +1 -1
- package/lib/features/facets/RunsFacetsNav.js +26 -15
- package/lib/features/facets/RunsFacetsNav.js.map +1 -1
- package/lib/features/facets/WorkflowExecutionsFacetsNav.d.ts +4 -3
- package/lib/features/facets/WorkflowExecutionsFacetsNav.d.ts.map +1 -1
- package/lib/features/facets/WorkflowExecutionsFacetsNav.js +18 -10
- package/lib/features/facets/WorkflowExecutionsFacetsNav.js.map +1 -1
- package/lib/features/facets/index.d.ts +1 -1
- package/lib/features/facets/index.d.ts.map +1 -1
- package/lib/features/facets/index.js.map +1 -1
- package/lib/features/facets/utils/SearchInterface.d.ts +4 -3
- package/lib/features/facets/utils/SearchInterface.d.ts.map +1 -1
- package/lib/features/facets/utils/SearchInterface.js +4 -0
- package/lib/features/facets/utils/SearchInterface.js.map +1 -1
- package/lib/features/layout/GenericPageNavHeader.d.ts +8 -1
- package/lib/features/layout/GenericPageNavHeader.d.ts.map +1 -1
- package/lib/features/layout/GenericPageNavHeader.js +9 -1
- package/lib/features/layout/GenericPageNavHeader.js.map +1 -1
- package/lib/features/magic-pdf/DownloadPopover.d.ts +3 -2
- package/lib/features/magic-pdf/DownloadPopover.d.ts.map +1 -1
- package/lib/features/magic-pdf/DownloadPopover.js.map +1 -1
- package/lib/features/magic-pdf/GroundedExtractionView.d.ts.map +1 -1
- package/lib/features/magic-pdf/GroundedExtractionView.js +51 -64
- package/lib/features/magic-pdf/GroundedExtractionView.js.map +1 -1
- package/lib/features/oauth/McpConnectionsButton.d.ts +1 -1
- package/lib/features/oauth/McpConnectionsButton.d.ts.map +1 -1
- package/lib/features/oauth/McpConnectionsButton.js +2 -2
- package/lib/features/oauth/McpConnectionsButton.js.map +1 -1
- package/lib/features/oauth/McpConnectionsDialog.d.ts +1 -1
- package/lib/features/oauth/McpConnectionsDialog.js +2 -2
- package/lib/features/oauth/McpConnectionsDialog.js.map +1 -1
- package/lib/features/oauth/useMcpConnections.d.ts +4 -5
- package/lib/features/oauth/useMcpConnections.d.ts.map +1 -1
- package/lib/features/oauth/useMcpConnections.js +20 -4
- package/lib/features/oauth/useMcpConnections.js.map +1 -1
- package/lib/features/pdf-viewer/PdfPageRenderer.d.ts.map +1 -1
- package/lib/features/pdf-viewer/PdfPageRenderer.js +9 -11
- package/lib/features/pdf-viewer/PdfPageRenderer.js.map +1 -1
- package/lib/features/pdf-viewer/lazyReactPdf.d.ts +10 -0
- package/lib/features/pdf-viewer/lazyReactPdf.d.ts.map +1 -0
- package/lib/features/pdf-viewer/lazyReactPdf.js +25 -0
- package/lib/features/pdf-viewer/lazyReactPdf.js.map +1 -0
- package/lib/features/store/collections/CollectionsTable.d.ts.map +1 -1
- package/lib/features/store/collections/CollectionsTable.js +1 -3
- package/lib/features/store/collections/CollectionsTable.js.map +1 -1
- package/lib/features/store/collections/EditCollectionView.js +1 -1
- package/lib/features/store/collections/EditCollectionView.js.map +1 -1
- package/lib/features/store/objects/ExportPropertiesModal.d.ts +3 -1
- package/lib/features/store/objects/ExportPropertiesModal.d.ts.map +1 -1
- package/lib/features/store/objects/ExportPropertiesModal.js +5 -5
- package/lib/features/store/objects/ExportPropertiesModal.js.map +1 -1
- package/lib/features/store/objects/components/ContentOverview.d.ts.map +1 -1
- package/lib/features/store/objects/components/ContentOverview.js +4 -10
- package/lib/features/store/objects/components/ContentOverview.js.map +1 -1
- package/lib/features/store/objects/components/TextEditorPanel.d.ts.map +1 -1
- package/lib/features/store/objects/components/TextEditorPanel.js +8 -3
- package/lib/features/store/objects/components/TextEditorPanel.js.map +1 -1
- package/lib/features/store/objects/layout/renderers.d.ts.map +1 -1
- package/lib/features/store/objects/layout/renderers.js +1 -5
- package/lib/features/store/objects/layout/renderers.js.map +1 -1
- package/lib/features/store/objects/search/DocumentSearchContext.d.ts +29 -62
- package/lib/features/store/objects/search/DocumentSearchContext.d.ts.map +1 -1
- package/lib/features/store/objects/search/DocumentSearchContext.js +2 -0
- package/lib/features/store/objects/search/DocumentSearchContext.js.map +1 -1
- package/lib/features/store/objects/upload/DocumentUploadModal.d.ts +6 -1
- package/lib/features/store/objects/upload/DocumentUploadModal.d.ts.map +1 -1
- package/lib/features/store/objects/upload/DocumentUploadModal.js +4 -3
- package/lib/features/store/objects/upload/DocumentUploadModal.js.map +1 -1
- package/lib/features/store/objects/upload/useSmartFileUploadProcessing.d.ts.map +1 -1
- package/lib/features/store/objects/upload/useSmartFileUploadProcessing.js +2 -2
- package/lib/features/store/objects/upload/useSmartFileUploadProcessing.js.map +1 -1
- package/lib/features/store/types/ContentObjectTypesTable.d.ts.map +1 -1
- package/lib/features/store/types/ContentObjectTypesTable.js +1 -3
- package/lib/features/store/types/ContentObjectTypesTable.js.map +1 -1
- package/lib/features/store/types/IntakePolicyEditor.d.ts.map +1 -1
- package/lib/features/store/types/IntakePolicyEditor.js +11 -1
- package/lib/features/store/types/IntakePolicyEditor.js.map +1 -1
- package/lib/features/store/types/ObjectSchemaEditor.d.ts.map +1 -1
- package/lib/features/store/types/ObjectSchemaEditor.js +6 -2
- package/lib/features/store/types/ObjectSchemaEditor.js.map +1 -1
- package/lib/features/store/types/TableLayoutEditor.d.ts.map +1 -1
- package/lib/features/store/types/TableLayoutEditor.js +2 -0
- package/lib/features/store/types/TableLayoutEditor.js.map +1 -1
- package/lib/features/store/types/TypeRegistry.d.ts +272 -0
- package/lib/features/store/types/TypeRegistry.d.ts.map +1 -1
- package/lib/features/store/types/search/ObjectTypeSearchContext.d.ts +271 -0
- package/lib/features/store/types/search/ObjectTypeSearchContext.d.ts.map +1 -1
- package/lib/features/user/UserInfo.d.ts.map +1 -1
- package/lib/features/user/UserInfo.js +2 -4
- package/lib/features/user/UserInfo.js.map +1 -1
- package/lib/features/views/ViewActions.d.ts +32 -0
- package/lib/features/views/ViewActions.d.ts.map +1 -0
- package/lib/features/views/ViewActions.js +186 -0
- package/lib/features/views/ViewActions.js.map +1 -0
- package/lib/features/views/ViewDropTarget.d.ts +15 -0
- package/lib/features/views/ViewDropTarget.d.ts.map +1 -0
- package/lib/features/views/ViewDropTarget.js +79 -0
- package/lib/features/views/ViewDropTarget.js.map +1 -0
- package/lib/features/views/ViewExperience.d.ts +3 -2
- package/lib/features/views/ViewExperience.d.ts.map +1 -1
- package/lib/features/views/ViewExperience.js +103 -12
- package/lib/features/views/ViewExperience.js.map +1 -1
- package/lib/features/views/ViewNavigation.d.ts +1 -1
- package/lib/features/views/ViewNavigation.d.ts.map +1 -1
- package/lib/features/views/ViewNavigation.js +14 -5
- package/lib/features/views/ViewNavigation.js.map +1 -1
- package/lib/features/views/ViewResults.d.ts +1 -1
- package/lib/features/views/ViewResults.d.ts.map +1 -1
- package/lib/features/views/ViewResults.js +124 -34
- package/lib/features/views/ViewResults.js.map +1 -1
- package/lib/features/views/index.d.ts +1 -0
- package/lib/features/views/index.d.ts.map +1 -1
- package/lib/features/views/index.js +1 -0
- package/lib/features/views/index.js.map +1 -1
- package/lib/features/views/types.d.ts +46 -1
- package/lib/features/views/types.d.ts.map +1 -1
- package/lib/features/views/viewState.d.ts.map +1 -1
- package/lib/features/views/viewState.js +34 -0
- package/lib/features/views/viewState.js.map +1 -1
- package/lib/i18n/LanguageProvider.d.ts +3 -1
- package/lib/i18n/LanguageProvider.d.ts.map +1 -1
- package/lib/i18n/LanguageProvider.js +9 -7
- package/lib/i18n/LanguageProvider.js.map +1 -1
- package/lib/i18n/instance.d.ts +2 -0
- package/lib/i18n/instance.d.ts.map +1 -1
- package/lib/i18n/instance.js +45 -26
- package/lib/i18n/instance.js.map +1 -1
- package/lib/i18n/locales/ar.json +261 -15
- package/lib/i18n/locales/de.json +259 -13
- package/lib/i18n/locales/en.json +30 -4
- package/lib/i18n/locales/es.json +260 -14
- package/lib/i18n/locales/fr.json +259 -13
- package/lib/i18n/locales/it.json +259 -13
- package/lib/i18n/locales/ja.json +257 -10
- package/lib/i18n/locales/ko.json +257 -10
- package/lib/i18n/locales/pt.json +259 -13
- package/lib/i18n/locales/ru.json +256 -10
- package/lib/i18n/locales/tr.json +256 -10
- package/lib/i18n/locales/zh-TW.json +257 -10
- package/lib/i18n/locales/zh.json +257 -10
- package/lib/session/UserSessionProvider.d.ts.map +1 -1
- package/lib/session/UserSessionProvider.js +8 -16
- package/lib/session/UserSessionProvider.js.map +1 -1
- package/lib/session/auth/composable.d.ts.map +1 -1
- package/lib/session/auth/composable.js +25 -19
- package/lib/session/auth/composable.js.map +1 -1
- package/lib/session/auth/firebase.js +1 -1
- package/lib/session/auth/firebase.js.map +1 -1
- package/lib/shell/VertesiaShell.d.ts.map +1 -1
- package/lib/shell/VertesiaShell.js +2 -1
- package/lib/shell/VertesiaShell.js.map +1 -1
- package/lib/shell/apps/AppInstallationProvider.d.ts +4 -2
- package/lib/shell/apps/AppInstallationProvider.d.ts.map +1 -1
- package/lib/shell/apps/IframeAppContextSync.d.ts +3 -0
- package/lib/shell/apps/IframeAppContextSync.d.ts.map +1 -0
- package/lib/shell/apps/IframeAppContextSync.js +95 -0
- package/lib/shell/apps/IframeAppContextSync.js.map +1 -0
- package/lib/shell/apps/iframe-auth.d.ts +55 -0
- package/lib/shell/apps/iframe-auth.d.ts.map +1 -0
- package/lib/shell/apps/iframe-auth.js +154 -0
- package/lib/shell/apps/iframe-auth.js.map +1 -0
- package/lib/shell/apps/index.d.ts +2 -0
- package/lib/shell/apps/index.d.ts.map +1 -1
- package/lib/shell/apps/index.js +2 -0
- package/lib/shell/apps/index.js.map +1 -1
- package/lib/vertesia-ui-core.js +4 -4
- 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 +32 -34
- package/lib/vertesia-ui-features.js.map +1 -1
- package/lib/vertesia-ui-i18n.js +16 -16
- package/lib/vertesia-ui-i18n.js.map +1 -1
- package/lib/vertesia-ui-rich-text.js +4 -4
- package/lib/vertesia-ui-rich-text.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 +20 -20
- package/lib/vertesia-ui-widgets.js.map +1 -1
- package/lib/widgets/markdown/MarkdownRenderer.d.ts.map +1 -1
- package/lib/widgets/markdown/MarkdownRenderer.js +43 -2
- package/lib/widgets/markdown/MarkdownRenderer.js.map +1 -1
- package/lib/widgets/markdown/MermaidDiagram.d.ts.map +1 -1
- package/lib/widgets/markdown/MermaidDiagram.js +35 -22
- package/lib/widgets/markdown/MermaidDiagram.js.map +1 -1
- package/lib/widgets/monacoEditor/MonacoEditor.d.ts.map +1 -1
- package/lib/widgets/monacoEditor/MonacoEditor.js +14 -10
- package/lib/widgets/monacoEditor/MonacoEditor.js.map +1 -1
- package/lib/widgets/xml-viewer/hooks/useCollapsible.d.ts +1 -1
- package/package.json +24 -29
- package/src/core/components/shadcn/filters/comboBox/DateCombobox.tsx +1 -1
- package/src/core/components/shadcn/filters/filter/dateFilter.tsx +1 -1
- package/src/core/components/shadcn/filters/filters.tsx +1 -1
- package/src/core/components/shadcn/index.ts +1 -0
- package/src/core/components/shadcn/modal/dialog.test.tsx +35 -0
- package/src/core/components/shadcn/modal/dialog.tsx +0 -4
- package/src/core/components/shadcn/overflowTabs.tsx +320 -0
- package/src/core/components/shadcn/selectBox.tsx +2 -2
- package/src/core/components/shadcn/theme/ThemeProvider.tsx +10 -9
- package/src/core/utils/dayjs.ts +17 -0
- package/src/css/base.css +78 -0
- package/src/env/index.test.ts +94 -0
- package/src/env/index.ts +36 -1
- package/src/features/agent/PayloadBuilder.test.ts +68 -0
- package/src/features/agent/PayloadBuilder.tsx +28 -4
- package/src/features/agent/chat/AgentRightPanel.tsx +2 -252
- package/src/features/agent/chat/ArtifactsTab.tsx +1 -0
- package/src/features/agent/chat/AskUserWidget.test.tsx +20 -1
- package/src/features/agent/chat/AskUserWidget.tsx +22 -6
- package/src/features/agent/chat/ModernAgentConversation.test.tsx +160 -0
- package/src/features/agent/chat/ModernAgentConversation.tsx +111 -31
- package/src/features/agent/chat/ModernAgentOutput/ActiveWorkstreamsSummary.tsx +86 -67
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.test.tsx +90 -7
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +4 -6
- package/src/features/agent/chat/ModernAgentOutput/AttachmentPreview.test.ts +103 -1
- package/src/features/agent/chat/ModernAgentOutput/AttachmentPreview.tsx +50 -4
- package/src/features/agent/chat/ModernAgentOutput/BatchProgressPanel.tsx +1 -1
- package/src/features/agent/chat/ModernAgentOutput/Header.tsx +18 -1
- package/src/features/agent/chat/ModernAgentOutput/MessageItem.tsx +1 -1
- package/src/features/agent/chat/ModernAgentOutput/StreamingMessage.tsx +1 -1
- package/src/features/agent/chat/ModernAgentOutput/ToolCallGroup.tsx +1 -1
- package/src/features/agent/chat/ModernAgentOutput/WorkstreamTabs.tsx +37 -167
- package/src/features/agent/chat/ModernAgentOutput/utils.test.ts +94 -0
- package/src/features/agent/chat/ModernAgentOutput/utils.ts +19 -10
- package/src/features/agent/chat/VegaLiteChart.tsx +32 -14
- package/src/features/agent/chat/hooks/useAgentStream.test.tsx +18 -0
- package/src/features/agent/chat/hooks/useAgentStream.ts +3 -0
- package/src/features/document-viewer/UniversalDocumentViewer.tsx +1 -1
- package/src/features/facets/AgentRunnerFacetsNav.tsx +44 -4
- package/src/features/facets/CollectionsFacetsNav.tsx +15 -4
- package/src/features/facets/DocumentsFacetsNav.tsx +25 -8
- package/src/features/facets/FacetQueryHandlers.test.ts +84 -0
- package/src/features/facets/InteractionsFacetsNav.tsx +20 -4
- package/src/features/facets/PromptsFacetsNav.tsx +15 -4
- package/src/features/facets/RunsFacetsNav.test.ts +59 -0
- package/src/features/facets/RunsFacetsNav.tsx +40 -30
- package/src/features/facets/WorkflowExecutionsFacetsNav.test.ts +57 -0
- package/src/features/facets/WorkflowExecutionsFacetsNav.tsx +36 -16
- package/src/features/facets/index.ts +1 -0
- package/src/features/facets/utils/SearchInterface.tsx +12 -3
- package/src/features/layout/GenericPageNavHeader.tsx +16 -0
- package/src/features/magic-pdf/DownloadPopover.tsx +1 -2
- package/src/features/magic-pdf/GroundedExtractionView.test.tsx +7 -1
- package/src/features/magic-pdf/GroundedExtractionView.tsx +162 -242
- package/src/features/oauth/McpConnectionsButton.test.tsx +18 -1
- package/src/features/oauth/McpConnectionsButton.tsx +6 -2
- package/src/features/oauth/McpConnectionsDialog.tsx +3 -3
- package/src/features/oauth/useMcpConnections.test.ts +1 -0
- package/src/features/oauth/useMcpConnections.ts +24 -7
- package/src/features/pdf-viewer/PdfPageRenderer.tsx +76 -71
- package/src/features/pdf-viewer/lazyReactPdf.ts +33 -0
- package/src/features/store/collections/CollectionsTable.tsx +1 -4
- package/src/features/store/collections/EditCollectionView.tsx +1 -1
- package/src/features/store/objects/ExportPropertiesModal.tsx +25 -16
- package/src/features/store/objects/components/ContentOverview.tsx +2 -28
- package/src/features/store/objects/components/TextEditorPanel.tsx +13 -3
- package/src/features/store/objects/layout/renderers.tsx +1 -6
- package/src/features/store/objects/search/DocumentSearchContext.ts +4 -2
- package/src/features/store/objects/upload/DocumentUploadModal.tsx +10 -3
- package/src/features/store/objects/upload/useSmartFileUploadProcessing.ts +15 -6
- package/src/features/store/types/ContentObjectTypesTable.tsx +1 -4
- package/src/features/store/types/IntakePolicyEditor.tsx +11 -1
- package/src/features/store/types/ObjectSchemaEditor.tsx +6 -2
- package/src/features/store/types/TableLayoutEditor.tsx +2 -0
- package/src/features/user/UserInfo.test.tsx +10 -0
- package/src/features/user/UserInfo.tsx +2 -7
- package/src/features/views/ViewActions.test.tsx +80 -0
- package/src/features/views/ViewActions.tsx +352 -0
- package/src/features/views/ViewDropTarget.test.tsx +150 -0
- package/src/features/views/ViewDropTarget.tsx +140 -0
- package/src/features/views/ViewExperience.test.tsx +72 -0
- package/src/features/views/ViewExperience.tsx +189 -22
- package/src/features/views/ViewMedia.test.tsx +180 -0
- package/src/features/views/ViewNavigation.test.tsx +42 -0
- package/src/features/views/ViewNavigation.tsx +43 -5
- package/src/features/views/ViewResults.tsx +243 -26
- package/src/features/views/index.ts +1 -0
- package/src/features/views/types.ts +50 -0
- package/src/features/views/viewState.test.ts +7 -1
- package/src/features/views/viewState.ts +32 -0
- package/src/i18n/LanguageProvider.tsx +15 -8
- package/src/i18n/instance.test.ts +30 -0
- package/src/i18n/instance.ts +67 -40
- package/src/i18n/locales/ar.json +1157 -911
- package/src/i18n/locales/de.json +1113 -867
- package/src/i18n/locales/en.json +30 -4
- package/src/i18n/locales/es.json +1124 -878
- package/src/i18n/locales/fr.json +1124 -878
- package/src/i18n/locales/it.json +1124 -878
- package/src/i18n/locales/ja.json +1113 -866
- package/src/i18n/locales/ko.json +1113 -866
- package/src/i18n/locales/pt.json +1124 -878
- package/src/i18n/locales/ru.json +1135 -889
- package/src/i18n/locales/tr.json +1113 -867
- package/src/i18n/locales/zh-TW.json +1113 -866
- package/src/i18n/locales/zh.json +1113 -866
- package/src/i18n/rtl.test.ts +16 -7
- package/src/rich-text/VertesiaRichTextEditor.test.tsx +33 -1
- package/src/session/UserSessionProvider.tsx +8 -20
- package/src/session/auth/composable.scope.test.ts +1 -1
- package/src/session/auth/composable.test.ts +61 -1
- package/src/session/auth/composable.ts +29 -23
- package/src/session/auth/firebase.ts +1 -1
- package/src/shell/VertesiaShell.tsx +2 -0
- package/src/shell/apps/IframeAppContextSync.test.tsx +196 -0
- package/src/shell/apps/IframeAppContextSync.tsx +101 -0
- package/src/shell/apps/iframe-auth.test.ts +118 -0
- package/src/shell/apps/iframe-auth.ts +193 -0
- package/src/shell/apps/index.ts +2 -0
- package/src/widgets/markdown/ArtifactEditingSurface.test.tsx +12 -3
- package/src/widgets/markdown/MarkdownRenderer.tsx +50 -2
- package/src/widgets/markdown/MermaidDiagram.tsx +38 -22
- package/src/widgets/monacoEditor/MonacoEditor.tsx +27 -20
- package/lib/features/magic-pdf/GroundedExtractionAssistantPanel.d.ts +0 -25
- package/lib/features/magic-pdf/GroundedExtractionAssistantPanel.d.ts.map +0 -1
- package/lib/features/magic-pdf/GroundedExtractionAssistantPanel.js +0 -42
- package/lib/features/magic-pdf/GroundedExtractionAssistantPanel.js.map +0 -1
- package/src/features/magic-pdf/GroundedExtractionAssistantPanel.tsx +0 -86
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
CardFooter,
|
|
20
20
|
CardHeader,
|
|
21
21
|
CardTitle,
|
|
22
|
+
Checkbox,
|
|
22
23
|
SortableTableHeaderCell,
|
|
23
24
|
Table,
|
|
24
25
|
TableHeaderCell,
|
|
@@ -28,8 +29,9 @@ import {
|
|
|
28
29
|
} from '@vertesia/ui/core';
|
|
29
30
|
import { type LocaleFormat, useLocaleFormat, useUITranslation } from '@vertesia/ui/i18n';
|
|
30
31
|
import { ChevronDown, ChevronsUpDown, ChevronUp, ExternalLink, FileText, ImageIcon } from 'lucide-react';
|
|
31
|
-
import { createContext, type ReactNode, useContext, useEffect, useState } from 'react';
|
|
32
|
-
import type { ViewMediaResolver, ViewResultsRendererProps } from './types.js';
|
|
32
|
+
import { createContext, type ReactNode, useContext, useEffect, useRef, useState } from 'react';
|
|
33
|
+
import type { ViewMediaResolver, ViewResultsRendererProps, ViewSelectionController } from './types.js';
|
|
34
|
+
import { useViewActions, ViewRowActions } from './ViewActions.js';
|
|
33
35
|
import { resolveViewSort } from './viewState.js';
|
|
34
36
|
|
|
35
37
|
function nestedValue(root: unknown, path: string): unknown {
|
|
@@ -140,6 +142,46 @@ function safeMediaUrl(hit: ViewHit, media: ViewResultMedia): string | undefined
|
|
|
140
142
|
}
|
|
141
143
|
}
|
|
142
144
|
|
|
145
|
+
/**
|
|
146
|
+
* Resolutions currently in flight, keyed by the resolver and then by the media it is resolving.
|
|
147
|
+
*
|
|
148
|
+
* Resolving a thumbnail is a network call, and every result tile in a grid makes one. Entries are
|
|
149
|
+
* dropped as soon as they settle, so nothing is cached across renders — this only collapses the
|
|
150
|
+
* duplicate concurrent requests that a re-render or a remount of the same tile would otherwise
|
|
151
|
+
* issue.
|
|
152
|
+
*
|
|
153
|
+
* The outer key is the resolver itself: two views can render the same hit with different
|
|
154
|
+
* `resolveMedia` implementations, and sharing a promise between them would hand one view a URL
|
|
155
|
+
* resolved by the other's context.
|
|
156
|
+
*/
|
|
157
|
+
const inFlightMediaResolutions = new WeakMap<ViewMediaResolver, Map<string, Promise<string | undefined>>>();
|
|
158
|
+
|
|
159
|
+
/** Backoff for a resolution that succeeded but has no URL yet — a rendition still being generated. */
|
|
160
|
+
const MEDIA_RETRY_DELAYS_MS = [2000, 4000, 8000];
|
|
161
|
+
|
|
162
|
+
function inFlightMediaResolutionsFor(resolver: ViewMediaResolver): Map<string, Promise<string | undefined>> {
|
|
163
|
+
const existing = inFlightMediaResolutions.get(resolver);
|
|
164
|
+
if (existing) return existing;
|
|
165
|
+
const created = new Map<string, Promise<string | undefined>>();
|
|
166
|
+
inFlightMediaResolutions.set(resolver, created);
|
|
167
|
+
return created;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
function resolveMediaOnce(
|
|
171
|
+
resolver: ViewMediaResolver,
|
|
172
|
+
key: string,
|
|
173
|
+
resolve: () => Promise<string | undefined>,
|
|
174
|
+
): Promise<string | undefined> {
|
|
175
|
+
const inFlight = inFlightMediaResolutionsFor(resolver);
|
|
176
|
+
const pending = inFlight.get(key);
|
|
177
|
+
if (pending) return pending;
|
|
178
|
+
const started = resolve().finally(() => {
|
|
179
|
+
inFlight.delete(key);
|
|
180
|
+
});
|
|
181
|
+
inFlight.set(key, started);
|
|
182
|
+
return started;
|
|
183
|
+
}
|
|
184
|
+
|
|
143
185
|
function ViewMedia({
|
|
144
186
|
hit,
|
|
145
187
|
media,
|
|
@@ -154,24 +196,57 @@ function ViewMedia({
|
|
|
154
196
|
const directUrl = media ? safeMediaUrl(hit, media) : undefined;
|
|
155
197
|
const [resolvedUrl, setResolvedUrl] = useState<string>();
|
|
156
198
|
const [failed, setFailed] = useState(false);
|
|
199
|
+
// `hit` and `media` are rebuilt on every parent render, so depending on them by identity
|
|
200
|
+
// re-ran this effect — and re-issued the request — on each one. Which media to resolve is
|
|
201
|
+
// fully described by the hit id and the media descriptor's contents.
|
|
202
|
+
const mediaKey = !directUrl && media ? `${hit.id}|${JSON.stringify(media)}` : undefined;
|
|
203
|
+
const hitRef = useRef(hit);
|
|
204
|
+
const mediaRef = useRef(media);
|
|
205
|
+
hitRef.current = hit;
|
|
206
|
+
mediaRef.current = media;
|
|
157
207
|
|
|
208
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: directUrl is deliberately extra; see the dependency array
|
|
158
209
|
useEffect(() => {
|
|
159
210
|
setResolvedUrl(undefined);
|
|
160
211
|
setFailed(false);
|
|
161
|
-
if (
|
|
212
|
+
if (!mediaKey || !resolveMedia) return;
|
|
162
213
|
|
|
163
214
|
let active = true;
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
215
|
+
let retryTimer: ReturnType<typeof setTimeout> | undefined;
|
|
216
|
+
|
|
217
|
+
const attempt = (retry: number) => {
|
|
218
|
+
// biome-ignore lint/style/noNonNullAssertion: mediaKey is only set when media is defined
|
|
219
|
+
resolveMediaOnce(resolveMedia, mediaKey, async () => resolveMedia(hitRef.current, mediaRef.current!))
|
|
220
|
+
.then((url) => {
|
|
221
|
+
if (!active) return;
|
|
222
|
+
if (url) {
|
|
223
|
+
setResolvedUrl(url);
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
// No URL yet. The effect no longer re-runs on every parent render, so a
|
|
227
|
+
// rendition that is still generating needs an explicit retry — a bounded one,
|
|
228
|
+
// since "no thumbnail" is also the permanent answer for most content.
|
|
229
|
+
const delay = MEDIA_RETRY_DELAYS_MS[retry];
|
|
230
|
+
if (delay === undefined) return;
|
|
231
|
+
retryTimer = setTimeout(() => attempt(retry + 1), delay);
|
|
232
|
+
})
|
|
233
|
+
.catch(() => {
|
|
234
|
+
// A failed resolution is terminal: retrying is what turned a 500 into a storm.
|
|
235
|
+
if (active) setFailed(true);
|
|
236
|
+
});
|
|
237
|
+
};
|
|
238
|
+
attempt(0);
|
|
239
|
+
|
|
171
240
|
return () => {
|
|
172
241
|
active = false;
|
|
242
|
+
if (retryTimer) clearTimeout(retryTimer);
|
|
173
243
|
};
|
|
174
|
-
|
|
244
|
+
// `directUrl` earns its place even though the body never reads it: it is what clears a
|
|
245
|
+
// `failed` left behind by <img onError>. Property-backed media has no mediaKey, so a tile
|
|
246
|
+
// whose URL 404'd would otherwise stay on the fallback icon forever, even once the hit
|
|
247
|
+
// carries a fresh, working URL. It is a string, so this costs no extra resolver call —
|
|
248
|
+
// and when it is set, the early return above means no request either.
|
|
249
|
+
}, [mediaKey, resolveMedia, directUrl]);
|
|
175
250
|
|
|
176
251
|
const url = failed ? undefined : (directUrl ?? resolvedUrl);
|
|
177
252
|
const fit = media?.fit === 'contain' ? 'object-contain' : 'object-cover';
|
|
@@ -196,6 +271,37 @@ function Annotation({ hit }: { hit: ViewHit }) {
|
|
|
196
271
|
return annotation ? <p className="text-sm text-info">{annotation}</p> : null;
|
|
197
272
|
}
|
|
198
273
|
|
|
274
|
+
function HitSelectionCheckbox({
|
|
275
|
+
hit,
|
|
276
|
+
page,
|
|
277
|
+
selection,
|
|
278
|
+
}: {
|
|
279
|
+
hit: ViewHit;
|
|
280
|
+
page: ViewHit[];
|
|
281
|
+
selection?: ViewSelectionController;
|
|
282
|
+
}) {
|
|
283
|
+
const { t } = useUITranslation();
|
|
284
|
+
const shiftPressed = useRef(false);
|
|
285
|
+
if (!selection) return null;
|
|
286
|
+
return (
|
|
287
|
+
<Checkbox
|
|
288
|
+
checked={selection.isSelected(hit.id)}
|
|
289
|
+
aria-label={t('view.selectResult', { name: hit.document.name })}
|
|
290
|
+
onClick={(event) => {
|
|
291
|
+
shiftPressed.current = event.shiftKey;
|
|
292
|
+
event.stopPropagation();
|
|
293
|
+
}}
|
|
294
|
+
onCheckedChange={(checked) => {
|
|
295
|
+
selection.toggle(hit, checked === true, {
|
|
296
|
+
page,
|
|
297
|
+
range: selection.mode === 'multiple' && shiftPressed.current,
|
|
298
|
+
});
|
|
299
|
+
shiftPressed.current = false;
|
|
300
|
+
}}
|
|
301
|
+
/>
|
|
302
|
+
);
|
|
303
|
+
}
|
|
304
|
+
|
|
199
305
|
function BadgeFields({ hit, fields }: { hit: ViewHit; fields?: ViewResultField[] }) {
|
|
200
306
|
if (!fields?.length) return null;
|
|
201
307
|
return (
|
|
@@ -231,16 +337,26 @@ function ListResults({
|
|
|
231
337
|
hits,
|
|
232
338
|
onOpenHit,
|
|
233
339
|
resolveMedia,
|
|
340
|
+
selection,
|
|
234
341
|
}: {
|
|
235
342
|
display: ViewListDisplay;
|
|
236
343
|
hits: ViewHit[];
|
|
237
344
|
onOpenHit?: (hit: ViewHit) => void;
|
|
238
345
|
resolveMedia?: ViewMediaResolver;
|
|
346
|
+
selection?: ViewSelectionController;
|
|
239
347
|
}) {
|
|
240
348
|
return (
|
|
241
349
|
<div className="divide-y divide-border rounded-md border">
|
|
242
350
|
{hits.map((hit) => (
|
|
243
|
-
<article
|
|
351
|
+
<article
|
|
352
|
+
key={hit.id}
|
|
353
|
+
className={`flex gap-4 p-4 ${selection?.isSelected(hit.id) ? 'bg-muted/40' : ''}`}
|
|
354
|
+
>
|
|
355
|
+
{selection && (
|
|
356
|
+
<div className="pt-1">
|
|
357
|
+
<HitSelectionCheckbox hit={hit} page={hits} selection={selection} />
|
|
358
|
+
</div>
|
|
359
|
+
)}
|
|
244
360
|
{display.media && (
|
|
245
361
|
<ViewMedia
|
|
246
362
|
hit={hit}
|
|
@@ -272,6 +388,7 @@ function ListResults({
|
|
|
272
388
|
</div>
|
|
273
389
|
<div className="shrink-0 self-center">
|
|
274
390
|
<OpenResultButton hit={hit} onOpenHit={onOpenHit} compact />
|
|
391
|
+
<ViewRowActions hit={hit} />
|
|
275
392
|
</div>
|
|
276
393
|
</article>
|
|
277
394
|
))}
|
|
@@ -287,6 +404,7 @@ function TableResults({
|
|
|
287
404
|
sortOptions,
|
|
288
405
|
currentSort,
|
|
289
406
|
onSortChange,
|
|
407
|
+
selection,
|
|
290
408
|
}: {
|
|
291
409
|
display: ViewTableDisplay;
|
|
292
410
|
hits: ViewHit[];
|
|
@@ -295,13 +413,31 @@ function TableResults({
|
|
|
295
413
|
sortOptions?: ViewSortOption[];
|
|
296
414
|
currentSort?: string;
|
|
297
415
|
onSortChange?: (sort: string) => void;
|
|
416
|
+
selection?: ViewSelectionController;
|
|
298
417
|
}) {
|
|
299
418
|
const { t } = useUITranslation();
|
|
419
|
+
const actions = useViewActions();
|
|
420
|
+
const hasRowActions = actions?.actions.some((action) => action.placement === 'row') ?? false;
|
|
421
|
+
const selectedOnPage = selection ? hits.filter((hit) => selection.isSelected(hit.id)).length : 0;
|
|
422
|
+
const allOnPageSelected = hits.length > 0 && selectedOnPage === hits.length;
|
|
300
423
|
return (
|
|
301
424
|
<div className="overflow-x-auto rounded-md border">
|
|
302
425
|
<Table className="w-full">
|
|
303
426
|
<THead>
|
|
304
427
|
<tr>
|
|
428
|
+
{selection && (
|
|
429
|
+
<TableHeaderCell className="w-0">
|
|
430
|
+
{selection.selectAll && (
|
|
431
|
+
<Checkbox
|
|
432
|
+
checked={
|
|
433
|
+
allOnPageSelected ? true : selectedOnPage > 0 ? 'indeterminate' : false
|
|
434
|
+
}
|
|
435
|
+
aria-label={t('view.selectPage')}
|
|
436
|
+
onCheckedChange={(checked) => selection.togglePage(hits, checked === true)}
|
|
437
|
+
/>
|
|
438
|
+
)}
|
|
439
|
+
</TableHeaderCell>
|
|
440
|
+
)}
|
|
305
441
|
{display.columns.map((column) => {
|
|
306
442
|
const sortOption = column.sort_option
|
|
307
443
|
? sortOptions?.find((option) => option.id === column.sort_option)
|
|
@@ -339,19 +475,26 @@ function TableResults({
|
|
|
339
475
|
</SortableTableHeaderCell>
|
|
340
476
|
);
|
|
341
477
|
})}
|
|
342
|
-
{onOpenHit && (
|
|
478
|
+
{(onOpenHit || hasRowActions) && (
|
|
343
479
|
<TableHeaderCell className="w-0">
|
|
344
|
-
<span className="sr-only">
|
|
480
|
+
<span className="sr-only">
|
|
481
|
+
{hasRowActions ? t('view.actions') : t('agent.openDocument')}
|
|
482
|
+
</span>
|
|
345
483
|
</TableHeaderCell>
|
|
346
484
|
)}
|
|
347
485
|
</tr>
|
|
348
486
|
</THead>
|
|
349
487
|
<TBody
|
|
350
488
|
isLoading={isLoading && hits.length === 0}
|
|
351
|
-
columns={display.columns.length + (onOpenHit ? 1 : 0)}
|
|
489
|
+
columns={display.columns.length + (selection ? 1 : 0) + (onOpenHit || hasRowActions ? 1 : 0)}
|
|
352
490
|
>
|
|
353
491
|
{hits.map((hit) => (
|
|
354
|
-
<tr key={hit.id}>
|
|
492
|
+
<tr key={hit.id} className={selection?.isSelected(hit.id) ? 'bg-muted/40' : undefined}>
|
|
493
|
+
{selection && (
|
|
494
|
+
<td className="w-0">
|
|
495
|
+
<HitSelectionCheckbox hit={hit} page={hits} selection={selection} />
|
|
496
|
+
</td>
|
|
497
|
+
)}
|
|
355
498
|
{display.columns.map((column) => (
|
|
356
499
|
<td
|
|
357
500
|
key={`${hit.id}-${column.field}`}
|
|
@@ -360,9 +503,12 @@ function TableResults({
|
|
|
360
503
|
<ViewField hit={hit} field={column} />
|
|
361
504
|
</td>
|
|
362
505
|
))}
|
|
363
|
-
{onOpenHit && (
|
|
506
|
+
{(onOpenHit || hasRowActions) && (
|
|
364
507
|
<td className="w-0 whitespace-nowrap text-end">
|
|
365
|
-
<
|
|
508
|
+
<div className="flex items-center justify-end gap-1">
|
|
509
|
+
<OpenResultButton hit={hit} onOpenHit={onOpenHit} compact />
|
|
510
|
+
<ViewRowActions hit={hit} />
|
|
511
|
+
</div>
|
|
366
512
|
</td>
|
|
367
513
|
)}
|
|
368
514
|
</tr>
|
|
@@ -386,14 +532,27 @@ function ResultCard({
|
|
|
386
532
|
configuration,
|
|
387
533
|
onOpenHit,
|
|
388
534
|
resolveMedia,
|
|
535
|
+
selection,
|
|
536
|
+
page,
|
|
389
537
|
}: {
|
|
390
538
|
hit: ViewHit;
|
|
391
539
|
configuration: ViewCardsDisplay | ViewBoardCardConfiguration;
|
|
392
540
|
onOpenHit?: (hit: ViewHit) => void;
|
|
393
541
|
resolveMedia?: ViewMediaResolver;
|
|
542
|
+
selection?: ViewSelectionController;
|
|
543
|
+
page: ViewHit[];
|
|
394
544
|
}) {
|
|
545
|
+
const actions = useViewActions();
|
|
546
|
+
const hasRowActions = actions?.actions.some((action) => action.placement === 'row') ?? false;
|
|
395
547
|
return (
|
|
396
|
-
<Card
|
|
548
|
+
<Card
|
|
549
|
+
className={`relative flex h-full min-w-0 flex-col overflow-hidden ${selection?.isSelected(hit.id) ? 'ring-2 ring-primary' : ''}`}
|
|
550
|
+
>
|
|
551
|
+
{selection && (
|
|
552
|
+
<div className="absolute start-2 top-2 z-10 rounded bg-background/80 p-1">
|
|
553
|
+
<HitSelectionCheckbox hit={hit} page={page} selection={selection} />
|
|
554
|
+
</div>
|
|
555
|
+
)}
|
|
397
556
|
{configuration.media && (
|
|
398
557
|
<ViewMedia
|
|
399
558
|
hit={hit}
|
|
@@ -417,9 +576,10 @@ function ResultCard({
|
|
|
417
576
|
<LabeledFields hit={hit} fields={configuration.fields} />
|
|
418
577
|
<Annotation hit={hit} />
|
|
419
578
|
</CardContent>
|
|
420
|
-
{onOpenHit && (
|
|
579
|
+
{(onOpenHit || hasRowActions) && (
|
|
421
580
|
<CardFooter className="justify-end p-4 pt-0">
|
|
422
581
|
<OpenResultButton hit={hit} onOpenHit={onOpenHit} />
|
|
582
|
+
<ViewRowActions hit={hit} />
|
|
423
583
|
</CardFooter>
|
|
424
584
|
)}
|
|
425
585
|
</Card>
|
|
@@ -431,11 +591,13 @@ function CardsResults({
|
|
|
431
591
|
hits,
|
|
432
592
|
onOpenHit,
|
|
433
593
|
resolveMedia,
|
|
594
|
+
selection,
|
|
434
595
|
}: {
|
|
435
596
|
display: ViewCardsDisplay;
|
|
436
597
|
hits: ViewHit[];
|
|
437
598
|
onOpenHit?: (hit: ViewHit) => void;
|
|
438
599
|
resolveMedia?: ViewMediaResolver;
|
|
600
|
+
selection?: ViewSelectionController;
|
|
439
601
|
}) {
|
|
440
602
|
return (
|
|
441
603
|
<div className={`grid grid-cols-1 gap-4 ${GRID_COLUMNS[display.columns ?? 3]}`}>
|
|
@@ -446,6 +608,8 @@ function CardsResults({
|
|
|
446
608
|
configuration={display}
|
|
447
609
|
onOpenHit={onOpenHit}
|
|
448
610
|
resolveMedia={resolveMedia}
|
|
611
|
+
selection={selection}
|
|
612
|
+
page={hits}
|
|
449
613
|
/>
|
|
450
614
|
))}
|
|
451
615
|
</div>
|
|
@@ -457,16 +621,26 @@ function GalleryResults({
|
|
|
457
621
|
hits,
|
|
458
622
|
onOpenHit,
|
|
459
623
|
resolveMedia,
|
|
624
|
+
selection,
|
|
460
625
|
}: {
|
|
461
626
|
display: ViewGalleryDisplay;
|
|
462
627
|
hits: ViewHit[];
|
|
463
628
|
onOpenHit?: (hit: ViewHit) => void;
|
|
464
629
|
resolveMedia?: ViewMediaResolver;
|
|
630
|
+
selection?: ViewSelectionController;
|
|
465
631
|
}) {
|
|
466
632
|
return (
|
|
467
633
|
<div className={`grid grid-cols-1 gap-4 ${GRID_COLUMNS[display.columns ?? 4]}`}>
|
|
468
634
|
{hits.map((hit) => (
|
|
469
|
-
<Card
|
|
635
|
+
<Card
|
|
636
|
+
key={hit.id}
|
|
637
|
+
className={`relative overflow-hidden ${selection?.isSelected(hit.id) ? 'ring-2 ring-primary' : ''}`}
|
|
638
|
+
>
|
|
639
|
+
{selection && (
|
|
640
|
+
<div className="absolute start-2 top-2 z-10 rounded bg-background/80 p-1">
|
|
641
|
+
<HitSelectionCheckbox hit={hit} page={hits} selection={selection} />
|
|
642
|
+
</div>
|
|
643
|
+
)}
|
|
470
644
|
<ViewMedia
|
|
471
645
|
hit={hit}
|
|
472
646
|
media={display.media}
|
|
@@ -486,7 +660,10 @@ function GalleryResults({
|
|
|
486
660
|
))}
|
|
487
661
|
</div>
|
|
488
662
|
)}
|
|
489
|
-
<
|
|
663
|
+
<div className="flex items-center justify-end gap-1">
|
|
664
|
+
<OpenResultButton hit={hit} onOpenHit={onOpenHit} />
|
|
665
|
+
<ViewRowActions hit={hit} />
|
|
666
|
+
</div>
|
|
490
667
|
</CardContent>
|
|
491
668
|
</Card>
|
|
492
669
|
))}
|
|
@@ -499,11 +676,13 @@ function BoardResults({
|
|
|
499
676
|
hits,
|
|
500
677
|
onOpenHit,
|
|
501
678
|
resolveMedia,
|
|
679
|
+
selection,
|
|
502
680
|
}: {
|
|
503
681
|
display: Extract<ViewDisplayConfiguration, { type: 'board' }>;
|
|
504
682
|
hits: ViewHit[];
|
|
505
683
|
onOpenHit?: (hit: ViewHit) => void;
|
|
506
684
|
resolveMedia?: ViewMediaResolver;
|
|
685
|
+
selection?: ViewSelectionController;
|
|
507
686
|
}) {
|
|
508
687
|
const grouped = new Map<string, ViewHit[]>();
|
|
509
688
|
for (const hit of hits) {
|
|
@@ -532,6 +711,8 @@ function BoardResults({
|
|
|
532
711
|
configuration={display.card}
|
|
533
712
|
onOpenHit={onOpenHit}
|
|
534
713
|
resolveMedia={resolveMedia}
|
|
714
|
+
selection={selection}
|
|
715
|
+
page={hits}
|
|
535
716
|
/>
|
|
536
717
|
))}
|
|
537
718
|
</div>
|
|
@@ -551,6 +732,7 @@ function renderResults(
|
|
|
551
732
|
sortOptions?: ViewSortOption[],
|
|
552
733
|
currentSort?: string,
|
|
553
734
|
onSortChange?: (sort: string) => void,
|
|
735
|
+
selection?: ViewSelectionController,
|
|
554
736
|
): ReactNode {
|
|
555
737
|
if (configuration.type === 'table') {
|
|
556
738
|
return (
|
|
@@ -562,19 +744,52 @@ function renderResults(
|
|
|
562
744
|
sortOptions={sortOptions}
|
|
563
745
|
currentSort={currentSort}
|
|
564
746
|
onSortChange={onSortChange}
|
|
747
|
+
selection={selection}
|
|
565
748
|
/>
|
|
566
749
|
);
|
|
567
750
|
}
|
|
568
751
|
if (configuration.type === 'cards') {
|
|
569
|
-
return
|
|
752
|
+
return (
|
|
753
|
+
<CardsResults
|
|
754
|
+
display={configuration}
|
|
755
|
+
hits={hits}
|
|
756
|
+
onOpenHit={onOpenHit}
|
|
757
|
+
resolveMedia={resolveMedia}
|
|
758
|
+
selection={selection}
|
|
759
|
+
/>
|
|
760
|
+
);
|
|
570
761
|
}
|
|
571
762
|
if (configuration.type === 'gallery') {
|
|
572
|
-
return
|
|
763
|
+
return (
|
|
764
|
+
<GalleryResults
|
|
765
|
+
display={configuration}
|
|
766
|
+
hits={hits}
|
|
767
|
+
onOpenHit={onOpenHit}
|
|
768
|
+
resolveMedia={resolveMedia}
|
|
769
|
+
selection={selection}
|
|
770
|
+
/>
|
|
771
|
+
);
|
|
573
772
|
}
|
|
574
773
|
if (configuration.type === 'board') {
|
|
575
|
-
return
|
|
774
|
+
return (
|
|
775
|
+
<BoardResults
|
|
776
|
+
display={configuration}
|
|
777
|
+
hits={hits}
|
|
778
|
+
onOpenHit={onOpenHit}
|
|
779
|
+
resolveMedia={resolveMedia}
|
|
780
|
+
selection={selection}
|
|
781
|
+
/>
|
|
782
|
+
);
|
|
576
783
|
}
|
|
577
|
-
return
|
|
784
|
+
return (
|
|
785
|
+
<ListResults
|
|
786
|
+
display={configuration}
|
|
787
|
+
hits={hits}
|
|
788
|
+
onOpenHit={onOpenHit}
|
|
789
|
+
resolveMedia={resolveMedia}
|
|
790
|
+
selection={selection}
|
|
791
|
+
/>
|
|
792
|
+
);
|
|
578
793
|
}
|
|
579
794
|
|
|
580
795
|
export function DefaultViewResults({
|
|
@@ -586,6 +801,7 @@ export function DefaultViewResults({
|
|
|
586
801
|
onSortChange,
|
|
587
802
|
onOpenHit,
|
|
588
803
|
resolveMedia,
|
|
804
|
+
selection,
|
|
589
805
|
}: ViewResultsRendererProps) {
|
|
590
806
|
const { t } = useUITranslation();
|
|
591
807
|
const formatters = useLocaleFormat();
|
|
@@ -603,6 +819,7 @@ export function DefaultViewResults({
|
|
|
603
819
|
definition.results?.sort_options,
|
|
604
820
|
resolveViewSort(request, result, definition.results?.default_sort),
|
|
605
821
|
onSortChange,
|
|
822
|
+
selection,
|
|
606
823
|
)}
|
|
607
824
|
</ViewValueFormattersContext.Provider>
|
|
608
825
|
);
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
ExecuteViewRequest,
|
|
3
|
+
ViewActionConfiguration,
|
|
3
4
|
ViewDisplayConfiguration,
|
|
5
|
+
ViewDropConfiguration,
|
|
4
6
|
ViewExecutionDefinition,
|
|
5
7
|
ViewExecutionResult,
|
|
6
8
|
ViewHit,
|
|
@@ -26,6 +28,8 @@ export interface ViewNavigationRendererProps {
|
|
|
26
28
|
result: ViewNavigationResult;
|
|
27
29
|
isLoading: boolean;
|
|
28
30
|
onChange: (values: string[]) => void;
|
|
31
|
+
/** Apply a server-side node filter for navigation sources that support it. */
|
|
32
|
+
onQueryChange?: (query: string) => void;
|
|
29
33
|
}
|
|
30
34
|
|
|
31
35
|
export interface ViewResultsRendererProps {
|
|
@@ -37,6 +41,52 @@ export interface ViewResultsRendererProps {
|
|
|
37
41
|
onSortChange?: (sort: string) => void;
|
|
38
42
|
onOpenHit?: (hit: ViewHit) => void;
|
|
39
43
|
resolveMedia?: ViewMediaResolver;
|
|
44
|
+
selection?: ViewSelectionController;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface ViewSelectionController {
|
|
48
|
+
mode: 'single' | 'multiple';
|
|
49
|
+
selectAll: boolean;
|
|
50
|
+
selectedIds: string[];
|
|
51
|
+
selectedHits: ViewHit[];
|
|
52
|
+
isSelected: (id: string) => boolean;
|
|
53
|
+
toggle: (hit: ViewHit, selected: boolean, options?: { page?: ViewHit[]; range?: boolean }) => void;
|
|
54
|
+
togglePage: (hits: ViewHit[], selected: boolean) => void;
|
|
55
|
+
clear: () => void;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface ViewActionContext {
|
|
59
|
+
action: ViewActionConfiguration;
|
|
60
|
+
hits: ViewHit[];
|
|
61
|
+
definition: ViewExecutionDefinition;
|
|
62
|
+
request: ExecuteViewRequest;
|
|
63
|
+
result: ViewExecutionResult;
|
|
64
|
+
refresh: () => Promise<void>;
|
|
65
|
+
clearSelection: () => void;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface ViewActionContribution {
|
|
69
|
+
run: (context: ViewActionContext) => void | Promise<void>;
|
|
70
|
+
isAvailable?: (context: Omit<ViewActionContext, 'action' | 'hits'>) => boolean;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export interface ViewDropContext {
|
|
74
|
+
configuration?: ViewDropConfiguration;
|
|
75
|
+
files: File[];
|
|
76
|
+
definition: ViewExecutionDefinition;
|
|
77
|
+
request: ExecuteViewRequest;
|
|
78
|
+
result: ViewExecutionResult;
|
|
79
|
+
refresh: () => Promise<void>;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export interface ViewDropContribution {
|
|
83
|
+
run: (context: ViewDropContext) => void | Promise<void>;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export interface ViewExperienceContributions {
|
|
87
|
+
actions?: Record<string, ViewActionContribution>;
|
|
88
|
+
/** Code-only drop behavior. When present it overrides the JSON-configured upload target. */
|
|
89
|
+
drop?: ViewDropContribution;
|
|
40
90
|
}
|
|
41
91
|
|
|
42
92
|
export interface ViewExperienceRenderers {
|
|
@@ -6,12 +6,13 @@ describe('View URL state', () => {
|
|
|
6
6
|
it('parses repeated key terms and navigation values', () => {
|
|
7
7
|
expect(
|
|
8
8
|
parseViewState(
|
|
9
|
-
'?q=find+contracts&t.party=Acme&t.party=Globex&n.brand=Vertesia&display=cards&sort=updated&offset=20',
|
|
9
|
+
'?q=find+contracts&t.party=Acme&t.party=Globex&n.brand=Vertesia&nq.collections=legal&display=cards&sort=updated&offset=20',
|
|
10
10
|
),
|
|
11
11
|
).toEqual({
|
|
12
12
|
query: 'find contracts',
|
|
13
13
|
key_terms: { party: ['Acme', 'Globex'] },
|
|
14
14
|
navigation: { brand: ['Vertesia'] },
|
|
15
|
+
navigation_queries: { collections: 'legal' },
|
|
15
16
|
display: 'cards',
|
|
16
17
|
sort: 'updated',
|
|
17
18
|
offset: 20,
|
|
@@ -29,6 +30,7 @@ describe('View URL state', () => {
|
|
|
29
30
|
brand: ['Contoso', 'Vertesia'],
|
|
30
31
|
geography: [hierarchyPath],
|
|
31
32
|
},
|
|
33
|
+
navigation_queries: { collections: ' legal contracts ' },
|
|
32
34
|
display: 'table',
|
|
33
35
|
},
|
|
34
36
|
'?account=account-1&project=project-1&q=stale&n.brand=stale',
|
|
@@ -44,6 +46,7 @@ describe('View URL state', () => {
|
|
|
44
46
|
geography: [hierarchyPath],
|
|
45
47
|
location: ['/Customers/Acme'],
|
|
46
48
|
},
|
|
49
|
+
navigation_queries: { collections: 'legal contracts' },
|
|
47
50
|
display: 'table',
|
|
48
51
|
});
|
|
49
52
|
});
|
|
@@ -59,6 +62,7 @@ describe('View URL state', () => {
|
|
|
59
62
|
query: ' contracts ',
|
|
60
63
|
key_terms: { party: ['Acme'], retired: ['old'] },
|
|
61
64
|
navigation: { brand: ['stale'], retired: ['old'] },
|
|
65
|
+
navigation_queries: { collections: 'legal', retired: 'old' },
|
|
62
66
|
display: 'retired',
|
|
63
67
|
sort: 'retired',
|
|
64
68
|
offset: 20,
|
|
@@ -77,6 +81,7 @@ describe('View URL state', () => {
|
|
|
77
81
|
total: 0,
|
|
78
82
|
navigation: {
|
|
79
83
|
brand: { id: 'brand', selected: ['Acme'], nodes: [] },
|
|
84
|
+
collections: { id: 'collections', selected: [], nodes: [], query: 'legal' },
|
|
80
85
|
},
|
|
81
86
|
took: 5,
|
|
82
87
|
},
|
|
@@ -85,6 +90,7 @@ describe('View URL state', () => {
|
|
|
85
90
|
query: 'contracts',
|
|
86
91
|
key_terms: { party: ['Acme'] },
|
|
87
92
|
navigation: { brand: ['Acme'] },
|
|
93
|
+
navigation_queries: { collections: 'legal' },
|
|
88
94
|
display: 'table',
|
|
89
95
|
sort: 'updated',
|
|
90
96
|
offset: 20,
|