@vertesia/ui 0.60.0 → 0.61.0
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/FormItem.js +9 -0
- package/lib/esm/core/components/FormItem.js.map +1 -0
- package/lib/esm/core/components/InputList.js +4 -3
- package/lib/esm/core/components/InputList.js.map +1 -1
- package/lib/esm/core/components/index.js +3 -3
- package/lib/esm/core/components/index.js.map +1 -1
- package/lib/esm/core/components/shadcn/button.js +37 -7
- package/lib/esm/core/components/shadcn/button.js.map +1 -1
- package/lib/esm/core/components/shadcn/dialog.js +3 -3
- package/lib/esm/core/components/shadcn/dialog.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/DynamicLabel.js +38 -0
- package/lib/esm/core/components/shadcn/filters/DynamicLabel.js.map +1 -0
- package/lib/esm/core/components/shadcn/filters/comboBox.js +24 -26
- package/lib/esm/core/components/shadcn/filters/comboBox.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/dateFilter.js +12 -12
- package/lib/esm/core/components/shadcn/filters/dateFilter.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/filterBar.js +49 -36
- package/lib/esm/core/components/shadcn/filters/filterBar.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/filters.js +31 -23
- package/lib/esm/core/components/shadcn/filters/filters.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/selectFilter.js +33 -24
- package/lib/esm/core/components/shadcn/filters/selectFilter.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/textFilter.js +2 -2
- package/lib/esm/core/components/shadcn/filters/textFilter.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/types.js.map +1 -1
- package/lib/esm/core/components/shadcn/input.js +4 -4
- package/lib/esm/core/components/shadcn/input.js.map +1 -1
- package/lib/esm/core/components/shadcn/selectBox.js +72 -6
- package/lib/esm/core/components/shadcn/selectBox.js.map +1 -1
- package/lib/esm/core/components/styles.js +1 -1
- package/lib/esm/core/components/styles.js.map +1 -1
- package/lib/esm/core/components/table/index.js +3 -0
- package/lib/esm/core/components/table/index.js.map +1 -1
- package/lib/esm/core/index.js +2 -1
- package/lib/esm/core/index.js.map +1 -1
- package/lib/esm/core/utils/cn.js +6 -0
- package/lib/esm/core/utils/cn.js.map +1 -0
- package/lib/esm/core/utils/index.js +2 -0
- package/lib/esm/core/utils/index.js.map +1 -0
- package/lib/esm/features/agent/PayloadBuilder.js +174 -0
- package/lib/esm/features/agent/PayloadBuilder.js.map +1 -0
- package/lib/esm/features/agent/chat/AnimatedThinkingDots.js +207 -0
- package/lib/esm/features/agent/chat/AnimatedThinkingDots.js.map +1 -0
- package/lib/esm/features/agent/chat/JumpingDots.js +6 -0
- package/lib/esm/features/agent/chat/JumpingDots.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentConversation.js +409 -0
- package/lib/esm/features/agent/chat/ModernAgentConversation.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +129 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js +66 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlideInPanel.js +29 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlideInPanel.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.js +97 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessageInput.js +46 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessageInput.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessageItem.js +352 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessageItem.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessagesContainer.js +20 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessagesContainer.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/PlanPanel.js +62 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/PlanPanel.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/SlideInPanel.js +23 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/SlideInPanel.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingMessages.js +51 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingMessages.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.js +82 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/StackedMessages.js +13 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/StackedMessages.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js +105 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/utils.js +154 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/utils.js.map +1 -0
- package/lib/esm/features/agent/chat/SlidingThinkingIndicator.js +266 -0
- package/lib/esm/features/agent/chat/SlidingThinkingIndicator.js.map +1 -0
- package/lib/esm/features/agent/chat/WaitingMessages.js +60 -0
- package/lib/esm/features/agent/chat/WaitingMessages.js.map +1 -0
- package/lib/esm/features/agent/chat/index.js +5 -0
- package/lib/esm/features/agent/chat/index.js.map +1 -0
- package/lib/esm/features/agent/index.js +3 -0
- package/lib/esm/features/agent/index.js.map +1 -0
- package/lib/esm/features/errors/PanelErrorBoundary.js +11 -0
- package/lib/esm/features/errors/PanelErrorBoundary.js.map +1 -0
- package/lib/esm/features/errors/RowErrorBoundary.js +9 -0
- package/lib/esm/features/errors/RowErrorBoundary.js.map +1 -0
- package/lib/esm/features/errors/VertesiaErrorBoundary.js +15 -0
- package/lib/esm/features/errors/VertesiaErrorBoundary.js.map +1 -0
- package/lib/esm/features/errors/WidgetErrorBoundary.js +11 -0
- package/lib/esm/features/errors/WidgetErrorBoundary.js.map +1 -0
- package/lib/esm/features/errors/index.js +5 -0
- package/lib/esm/features/errors/index.js.map +1 -0
- package/lib/esm/features/facets/EnvironmentFacet.js +39 -0
- package/lib/esm/features/facets/EnvironmentFacet.js.map +1 -0
- package/lib/esm/features/facets/FacetsNav.js +8 -0
- package/lib/esm/features/facets/FacetsNav.js.map +1 -0
- package/lib/esm/features/facets/InteractionFacet.js +39 -0
- package/lib/esm/features/facets/InteractionFacet.js.map +1 -0
- package/lib/esm/features/facets/StringFacet.js +12 -0
- package/lib/esm/features/facets/StringFacet.js.map +1 -0
- package/lib/esm/features/facets/StringListFacet.js +11 -0
- package/lib/esm/features/facets/StringListFacet.js.map +1 -0
- package/lib/esm/features/facets/TypeFacet.js +42 -0
- package/lib/esm/features/facets/TypeFacet.js.map +1 -0
- package/lib/esm/features/facets/TypeOptions.js +19 -0
- package/lib/esm/features/facets/TypeOptions.js.map +1 -0
- package/lib/esm/features/facets/UserFacet.js +33 -0
- package/lib/esm/features/facets/UserFacet.js.map +1 -0
- package/lib/esm/features/facets/VFacetsNav.js +114 -0
- package/lib/esm/features/facets/VFacetsNav.js.map +1 -0
- package/lib/esm/features/facets/VStringFacet.js +17 -0
- package/lib/esm/features/facets/VStringFacet.js.map +1 -0
- package/lib/esm/features/facets/VTypeFacet.js +56 -0
- package/lib/esm/features/facets/VTypeFacet.js.map +1 -0
- package/lib/esm/features/facets/VUserFacet.js +31 -0
- package/lib/esm/features/facets/VUserFacet.js.map +1 -0
- package/lib/esm/features/facets/index.js +12 -0
- package/lib/esm/features/facets/index.js.map +1 -0
- package/lib/esm/features/facets/utils.js +7 -0
- package/lib/esm/features/facets/utils.js.map +1 -0
- package/lib/esm/features/index.js +9 -1
- package/lib/esm/features/index.js.map +1 -1
- package/lib/esm/features/layout/GenericPageNavHeader.js +11 -0
- package/lib/esm/features/layout/GenericPageNavHeader.js.map +1 -0
- package/lib/esm/features/layout/NotFoundView.js +5 -0
- package/lib/esm/features/layout/NotFoundView.js.map +1 -0
- package/lib/esm/features/layout/index.js +3 -0
- package/lib/esm/features/layout/index.js.map +1 -0
- package/lib/esm/features/magic-pdf/DownloadPopover.js +13 -0
- package/lib/esm/features/magic-pdf/DownloadPopover.js.map +1 -0
- package/lib/esm/features/magic-pdf/MagicPdfView.js +44 -0
- package/lib/esm/features/magic-pdf/MagicPdfView.js.map +1 -0
- package/lib/esm/features/magic-pdf/PageSlider.js +57 -0
- package/lib/esm/features/magic-pdf/PageSlider.js.map +1 -0
- package/lib/esm/features/magic-pdf/PdfPageProvider.js +133 -0
- package/lib/esm/features/magic-pdf/PdfPageProvider.js.map +1 -0
- package/lib/esm/features/magic-pdf/TextPageView.js +45 -0
- package/lib/esm/features/magic-pdf/TextPageView.js.map +1 -0
- package/lib/esm/features/magic-pdf/index.js +2 -0
- package/lib/esm/features/magic-pdf/index.js.map +1 -0
- package/lib/esm/features/magic-pdf/types.js +2 -0
- package/lib/esm/features/magic-pdf/types.js.map +1 -0
- package/lib/esm/features/magic-pdf/useResizeOnDrag.js +34 -0
- package/lib/esm/features/magic-pdf/useResizeOnDrag.js.map +1 -0
- package/lib/esm/features/store/collections/BrowseCollectionView.js +37 -0
- package/lib/esm/features/store/collections/BrowseCollectionView.js.map +1 -0
- package/lib/esm/features/store/collections/CollectionView.js +53 -0
- package/lib/esm/features/store/collections/CollectionView.js.map +1 -0
- package/lib/esm/features/store/collections/CollectionsTable.js +60 -0
- package/lib/esm/features/store/collections/CollectionsTable.js.map +1 -0
- package/lib/esm/features/store/collections/CollectionsView.js +94 -0
- package/lib/esm/features/store/collections/CollectionsView.js.map +1 -0
- package/lib/esm/features/store/collections/EditCollectionView.js +161 -0
- package/lib/esm/features/store/collections/EditCollectionView.js.map +1 -0
- package/lib/esm/features/store/collections/index.js +6 -0
- package/lib/esm/features/store/collections/index.js.map +1 -0
- package/lib/esm/features/store/index.js +4 -0
- package/lib/esm/features/store/index.js.map +1 -0
- package/lib/esm/features/store/objects/DocumentPreviewPanel.js +150 -0
- package/lib/esm/features/store/objects/DocumentPreviewPanel.js.map +1 -0
- package/lib/esm/features/store/objects/DocumentSearchResults.js +123 -0
- package/lib/esm/features/store/objects/DocumentSearchResults.js.map +1 -0
- package/lib/esm/features/store/objects/DocumentSelectionProvider.js +81 -0
- package/lib/esm/features/store/objects/DocumentSelectionProvider.js.map +1 -0
- package/lib/esm/features/store/objects/DocumentTable.js +278 -0
- package/lib/esm/features/store/objects/DocumentTable.js.map +1 -0
- package/lib/esm/features/store/objects/ExportPropertiesModal.js +31 -0
- package/lib/esm/features/store/objects/ExportPropertiesModal.js.map +1 -0
- package/lib/esm/features/store/objects/components/ContentDispositionButton.js +31 -0
- package/lib/esm/features/store/objects/components/ContentDispositionButton.js.map +1 -0
- package/lib/esm/features/store/objects/components/ContentOverview.js +195 -0
- package/lib/esm/features/store/objects/components/ContentOverview.js.map +1 -0
- package/lib/esm/features/store/objects/components/DocumentIcon.js +28 -0
- package/lib/esm/features/store/objects/components/DocumentIcon.js.map +1 -0
- package/lib/esm/features/store/objects/components/DocumentInput.js +52 -0
- package/lib/esm/features/store/objects/components/DocumentInput.js.map +1 -0
- package/lib/esm/features/store/objects/components/PropertiesEditorModal.js +169 -0
- package/lib/esm/features/store/objects/components/PropertiesEditorModal.js.map +1 -0
- package/lib/esm/features/store/objects/components/SaveVersionConfirmModal.js +45 -0
- package/lib/esm/features/store/objects/components/SaveVersionConfirmModal.js.map +1 -0
- package/lib/esm/features/store/objects/components/SelectDocument.js +39 -0
- package/lib/esm/features/store/objects/components/SelectDocument.js.map +1 -0
- package/lib/esm/features/store/objects/components/SelectDocumentModal.js +7 -0
- package/lib/esm/features/store/objects/components/SelectDocumentModal.js.map +1 -0
- package/lib/esm/features/store/objects/components/VectorSearchWidget.js +85 -0
- package/lib/esm/features/store/objects/components/VectorSearchWidget.js.map +1 -0
- package/lib/esm/features/store/objects/components/index.js +10 -0
- package/lib/esm/features/store/objects/components/index.js.map +1 -0
- package/lib/esm/features/store/objects/components/useDownloadObject.js +21 -0
- package/lib/esm/features/store/objects/components/useDownloadObject.js.map +1 -0
- package/lib/esm/features/store/objects/index.js +11 -0
- package/lib/esm/features/store/objects/index.js.map +1 -0
- package/lib/esm/features/store/objects/layout/DocumentTableColumn.js +74 -0
- package/lib/esm/features/store/objects/layout/DocumentTableColumn.js.map +1 -0
- package/lib/esm/features/store/objects/layout/documentLayout.js +16 -0
- package/lib/esm/features/store/objects/layout/documentLayout.js.map +1 -0
- package/lib/esm/features/store/objects/layout/index.js +3 -0
- package/lib/esm/features/store/objects/layout/index.js.map +1 -0
- package/lib/esm/features/store/objects/layout/renderers.js +128 -0
- package/lib/esm/features/store/objects/layout/renderers.js.map +1 -0
- package/lib/esm/features/store/objects/search/DocumentSearchContext.js +150 -0
- package/lib/esm/features/store/objects/search/DocumentSearchContext.js.map +1 -0
- package/lib/esm/features/store/objects/search/DocumentSearchProvider.js +41 -0
- package/lib/esm/features/store/objects/search/DocumentSearchProvider.js.map +1 -0
- package/lib/esm/features/store/objects/search/index.js +3 -0
- package/lib/esm/features/store/objects/search/index.js.map +1 -0
- package/lib/esm/features/store/objects/selection/ObjectsActionContext.js +149 -0
- package/lib/esm/features/store/objects/selection/ObjectsActionContext.js.map +1 -0
- package/lib/esm/features/store/objects/selection/ObjectsActionSpec.js +2 -0
- package/lib/esm/features/store/objects/selection/ObjectsActionSpec.js.map +1 -0
- package/lib/esm/features/store/objects/selection/SelectionActions.js +75 -0
- package/lib/esm/features/store/objects/selection/SelectionActions.js.map +1 -0
- package/lib/esm/features/store/objects/selection/actions/AddToCollectionAction.js +64 -0
- package/lib/esm/features/store/objects/selection/actions/AddToCollectionAction.js.map +1 -0
- package/lib/esm/features/store/objects/selection/actions/ChangeTypeAction.js +53 -0
- package/lib/esm/features/store/objects/selection/actions/ChangeTypeAction.js.map +1 -0
- package/lib/esm/features/store/objects/selection/actions/ConfirmAction.js +30 -0
- package/lib/esm/features/store/objects/selection/actions/ConfirmAction.js.map +1 -0
- package/lib/esm/features/store/objects/selection/actions/DeleteObjectsAction.js +66 -0
- package/lib/esm/features/store/objects/selection/actions/DeleteObjectsAction.js.map +1 -0
- package/lib/esm/features/store/objects/selection/actions/ExportPropertiesAction.js +106 -0
- package/lib/esm/features/store/objects/selection/actions/ExportPropertiesAction.js.map +1 -0
- package/lib/esm/features/store/objects/selection/actions/RemoveFromCollectionAction.js +64 -0
- package/lib/esm/features/store/objects/selection/actions/RemoveFromCollectionAction.js.map +1 -0
- package/lib/esm/features/store/objects/selection/actions/StartWorkflowComponent.js +72 -0
- package/lib/esm/features/store/objects/selection/actions/StartWorkflowComponent.js.map +1 -0
- package/lib/esm/features/store/objects/selection/actions/index.js +8 -0
- package/lib/esm/features/store/objects/selection/actions/index.js.map +1 -0
- package/lib/esm/features/store/objects/selection/index.js +5 -0
- package/lib/esm/features/store/objects/selection/index.js.map +1 -0
- package/lib/esm/features/store/objects/upload/DocumentUploadModal.js +476 -0
- package/lib/esm/features/store/objects/upload/DocumentUploadModal.js.map +1 -0
- package/lib/esm/features/store/objects/upload/index.js +4 -0
- package/lib/esm/features/store/objects/upload/index.js.map +1 -0
- package/lib/esm/features/store/objects/upload/useSmartFileUploadProcessing.js +201 -0
- package/lib/esm/features/store/objects/upload/useSmartFileUploadProcessing.js.map +1 -0
- package/lib/esm/features/store/objects/upload/useUploadHandler.js +230 -0
- package/lib/esm/features/store/objects/upload/useUploadHandler.js.map +1 -0
- package/lib/esm/features/store/types/ContentObjectTypeView.js +158 -0
- package/lib/esm/features/store/types/ContentObjectTypeView.js.map +1 -0
- package/lib/esm/features/store/types/ContentObjectTypesSearch.js +82 -0
- package/lib/esm/features/store/types/ContentObjectTypesSearch.js.map +1 -0
- package/lib/esm/features/store/types/ContentObjectTypesTable.js +11 -0
- package/lib/esm/features/store/types/ContentObjectTypesTable.js.map +1 -0
- package/lib/esm/features/store/types/ContentObjectTypesView.js +55 -0
- package/lib/esm/features/store/types/ContentObjectTypesView.js.map +1 -0
- package/lib/esm/features/store/types/CreateOrUpdateTypeModal.js +26 -0
- package/lib/esm/features/store/types/CreateOrUpdateTypeModal.js.map +1 -0
- package/lib/esm/features/store/types/ObjectSchemaEditor.js +89 -0
- package/lib/esm/features/store/types/ObjectSchemaEditor.js.map +1 -0
- package/lib/esm/features/store/types/SelectContentType.js +43 -0
- package/lib/esm/features/store/types/SelectContentType.js.map +1 -0
- package/lib/esm/features/store/types/SelectContentTypeModal.js +28 -0
- package/lib/esm/features/store/types/SelectContentTypeModal.js.map +1 -0
- package/lib/esm/features/store/types/TableLayoutEditor.js +78 -0
- package/lib/esm/features/store/types/TableLayoutEditor.js.map +1 -0
- package/lib/esm/features/store/types/index.js +11 -0
- package/lib/esm/features/store/types/index.js.map +1 -0
- package/lib/esm/features/store/types/search/ObjectTypeSearchContext.js +98 -0
- package/lib/esm/features/store/types/search/ObjectTypeSearchContext.js.map +1 -0
- package/lib/esm/features/store/types/search/ObjectTypeSearchProvider.js +15 -0
- package/lib/esm/features/store/types/search/ObjectTypeSearchProvider.js.map +1 -0
- package/lib/esm/features/store/types/search/index.js +3 -0
- package/lib/esm/features/store/types/search/index.js.map +1 -0
- package/lib/esm/features/user/UserAvatar.js +18 -0
- package/lib/esm/features/user/UserAvatar.js.map +1 -0
- package/lib/esm/features/user/UserInfo.js +88 -0
- package/lib/esm/features/user/UserInfo.js.map +1 -0
- package/lib/esm/features/user/index.js +3 -0
- package/lib/esm/features/user/index.js.map +1 -0
- package/lib/esm/features/utils/index.js +4 -0
- package/lib/esm/features/utils/index.js.map +1 -0
- package/lib/esm/features/utils/mimeType.js +9 -0
- package/lib/esm/features/utils/mimeType.js.map +1 -0
- package/lib/esm/features/utils/rendition.js +47 -0
- package/lib/esm/features/utils/rendition.js.map +1 -0
- package/lib/esm/features/utils/text.js +10 -0
- package/lib/esm/features/utils/text.js.map +1 -0
- package/lib/esm/layout/FullHeightLayout.js +1 -1
- package/lib/esm/layout/FullHeightLayout.js.map +1 -1
- package/lib/esm/layout/Sidebar.js +12 -2
- package/lib/esm/layout/Sidebar.js.map +1 -1
- package/lib/esm/widgets/Progress.js +5 -0
- package/lib/esm/widgets/Progress.js.map +1 -0
- package/lib/esm/widgets/codemirror/CodeMirrorEditor.js +1 -1
- package/lib/esm/widgets/codemirror/CodeMirrorEditor.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/form/schema.js +11 -5
- package/lib/esm/widgets/form/schema.js.map +1 -1
- package/lib/esm/widgets/index.js +4 -0
- package/lib/esm/widgets/index.js.map +1 -1
- package/lib/esm/widgets/popover/Popover.js +73 -0
- package/lib/esm/widgets/popover/Popover.js.map +1 -0
- package/lib/esm/widgets/popover/context.js +7 -0
- package/lib/esm/widgets/popover/context.js.map +1 -0
- package/lib/esm/widgets/popover/index.js +3 -0
- package/lib/esm/widgets/popover/index.js.map +1 -0
- package/lib/esm/widgets/popover/slots.js +22 -0
- package/lib/esm/widgets/popover/slots.js.map +1 -0
- package/lib/esm/widgets/properties/PropertiesView.js +6 -0
- package/lib/esm/widgets/properties/PropertiesView.js.map +1 -0
- package/lib/esm/widgets/properties/index.js +2 -0
- package/lib/esm/widgets/properties/index.js.map +1 -0
- package/lib/esm/widgets/schema-editor/JSONSchemaEditorModal.js +1 -2
- package/lib/esm/widgets/schema-editor/JSONSchemaEditorModal.js.map +1 -1
- package/lib/esm/widgets/schema-editor/editor/Editable.js +9 -10
- package/lib/esm/widgets/schema-editor/editor/Editable.js.map +1 -1
- package/lib/esm/widgets/schema-editor/editor/PropertyViewer.js +1 -1
- package/lib/esm/widgets/schema-editor/editor/PropertyViewer.js.map +1 -1
- package/lib/esm/widgets/schema-editor/editor/SchemaEditor.js +2 -2
- package/lib/esm/widgets/schema-editor/editor/SchemaEditor.js.map +1 -1
- package/lib/esm/widgets/upload/DropZone.js +162 -0
- package/lib/esm/widgets/upload/DropZone.js.map +1 -0
- package/lib/esm/widgets/upload/UploadResultCategory.js +19 -0
- package/lib/esm/widgets/upload/UploadResultCategory.js.map +1 -0
- package/lib/esm/widgets/upload/UploadSummary.js +30 -0
- package/lib/esm/widgets/upload/UploadSummary.js.map +1 -0
- package/lib/esm/widgets/upload/index.js +4 -0
- package/lib/esm/widgets/upload/index.js.map +1 -0
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/core/components/FormItem.d.ts +11 -0
- package/lib/types/core/components/index.d.ts +3 -3
- package/lib/types/core/components/shadcn/button.d.ts +13 -2
- package/lib/types/core/components/shadcn/command.d.ts +7 -7
- package/lib/types/core/components/shadcn/filters/DynamicLabel.d.ts +8 -0
- package/lib/types/core/components/shadcn/filters/comboBox.d.ts +5 -5
- package/lib/types/core/components/shadcn/filters/dateFilter.d.ts +3 -4
- package/lib/types/core/components/shadcn/filters/types.d.ts +7 -1
- package/lib/types/core/components/shadcn/input.d.ts +4 -4
- package/lib/types/core/components/shadcn/selectBox.d.ts +13 -4
- package/lib/types/core/components/table/index.d.ts +1 -0
- package/lib/types/core/index.d.ts +2 -1
- package/lib/types/core/utils/cn.d.ts +2 -0
- package/lib/types/core/utils/index.d.ts +1 -0
- package/lib/types/features/agent/PayloadBuilder.d.ts +53 -0
- package/lib/types/features/agent/chat/AnimatedThinkingDots.d.ts +37 -0
- package/lib/types/features/agent/chat/JumpingDots.d.ts +6 -0
- package/lib/types/features/agent/chat/ModernAgentConversation.d.ts +24 -0
- package/lib/types/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts +21 -0
- package/lib/types/features/agent/chat/ModernAgentOutput/Header.d.ts +18 -0
- package/lib/types/features/agent/chat/ModernAgentOutput/InlineSlideInPanel.d.ts +10 -0
- package/lib/types/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.d.ts +15 -0
- package/lib/types/features/agent/chat/ModernAgentOutput/MessageInput.d.ts +12 -0
- package/lib/types/features/agent/chat/ModernAgentOutput/MessageItem.d.ts +7 -0
- package/lib/types/features/agent/chat/ModernAgentOutput/MessagesContainer.d.ts +9 -0
- package/lib/types/features/agent/chat/ModernAgentOutput/PlanPanel.d.ts +8 -0
- package/lib/types/features/agent/chat/ModernAgentOutput/SlideInPanel.d.ts +10 -0
- package/lib/types/features/agent/chat/ModernAgentOutput/SlidingMessages.d.ts +7 -0
- package/lib/types/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.d.ts +9 -0
- package/lib/types/features/agent/chat/ModernAgentOutput/StackedMessages.d.ts +7 -0
- package/lib/types/features/agent/chat/ModernAgentOutput/WorkstreamTabs.d.ts +21 -0
- package/lib/types/features/agent/chat/ModernAgentOutput/utils.d.ts +23 -0
- package/lib/types/features/agent/chat/SlidingThinkingIndicator.d.ts +17 -0
- package/lib/types/features/agent/chat/WaitingMessages.d.ts +1 -0
- package/lib/types/features/agent/chat/index.d.ts +4 -0
- package/lib/types/features/agent/index.d.ts +2 -0
- package/lib/types/features/errors/PanelErrorBoundary.d.ts +4 -0
- package/lib/types/features/errors/RowErrorBoundary.d.ts +7 -0
- package/lib/types/features/errors/VertesiaErrorBoundary.d.ts +11 -0
- package/lib/types/features/errors/WidgetErrorBoundary.d.ts +4 -0
- package/lib/types/features/errors/index.d.ts +4 -0
- package/lib/types/features/facets/EnvironmentFacet.d.ts +9 -0
- package/lib/types/features/facets/FacetsNav.d.ts +6 -0
- package/lib/types/features/facets/InteractionFacet.d.ts +9 -0
- package/lib/types/features/facets/StringFacet.d.ts +10 -0
- package/lib/types/features/facets/StringListFacet.d.ts +10 -0
- package/lib/types/features/facets/TypeFacet.d.ts +15 -0
- package/lib/types/features/facets/TypeOptions.d.ts +3 -0
- package/lib/types/features/facets/UserFacet.d.ts +11 -0
- package/lib/types/features/facets/VFacetsNav.d.ts +7 -0
- package/lib/types/features/facets/VStringFacet.d.ts +15 -0
- package/lib/types/features/facets/VTypeFacet.d.ts +8 -0
- package/lib/types/features/facets/VUserFacet.d.ts +9 -0
- package/lib/types/features/facets/index.d.ts +11 -0
- package/lib/types/features/facets/utils.d.ts +3 -0
- package/lib/types/features/index.d.ts +9 -1
- package/lib/types/features/layout/GenericPageNavHeader.d.ts +12 -0
- package/lib/types/features/layout/NotFoundView.d.ts +4 -0
- package/lib/types/features/layout/index.d.ts +2 -0
- package/lib/types/features/magic-pdf/DownloadPopover.d.ts +6 -0
- package/lib/types/features/magic-pdf/MagicPdfView.d.ts +6 -0
- package/lib/types/features/magic-pdf/PageSlider.d.ts +7 -0
- package/lib/types/features/magic-pdf/PdfPageProvider.d.ts +28 -0
- package/lib/types/features/magic-pdf/TextPageView.d.ts +7 -0
- package/lib/types/features/magic-pdf/index.d.ts +1 -0
- package/lib/types/features/magic-pdf/types.d.ts +1 -0
- package/lib/types/features/magic-pdf/useResizeOnDrag.d.ts +8 -0
- package/lib/types/features/store/collections/BrowseCollectionView.d.ts +6 -0
- package/lib/types/features/store/collections/CollectionView.d.ts +5 -0
- package/lib/types/features/store/collections/CollectionsTable.d.ts +5 -0
- package/lib/types/features/store/collections/CollectionsView.d.ts +10 -0
- package/lib/types/features/store/collections/EditCollectionView.d.ts +7 -0
- package/lib/types/features/store/collections/index.d.ts +5 -0
- package/lib/types/features/store/index.d.ts +3 -0
- package/lib/types/features/store/objects/DocumentPreviewPanel.d.ts +7 -0
- package/lib/types/features/store/objects/DocumentSearchResults.d.ts +19 -0
- package/lib/types/features/store/objects/DocumentSelectionProvider.d.ts +32 -0
- package/lib/types/features/store/objects/DocumentTable.d.ts +20 -0
- package/lib/types/features/store/objects/ExportPropertiesModal.d.ts +11 -0
- package/lib/types/features/store/objects/components/ContentDispositionButton.d.ts +8 -0
- package/lib/types/features/store/objects/components/ContentOverview.d.ts +7 -0
- package/lib/types/features/store/objects/components/DocumentIcon.d.ts +10 -0
- package/lib/types/features/store/objects/components/DocumentInput.d.ts +7 -0
- package/lib/types/features/store/objects/components/PropertiesEditorModal.d.ts +7 -0
- package/lib/types/features/store/objects/components/SaveVersionConfirmModal.d.ts +8 -0
- package/lib/types/features/store/objects/components/SelectDocument.d.ts +8 -0
- package/lib/types/features/store/objects/components/SelectDocumentModal.d.ts +8 -0
- package/lib/types/features/store/objects/components/VectorSearchWidget.d.ts +10 -0
- package/lib/types/features/store/objects/components/index.d.ts +9 -0
- package/lib/types/features/store/objects/components/useDownloadObject.d.ts +3 -0
- package/lib/types/features/store/objects/index.d.ts +10 -0
- package/lib/types/features/store/objects/layout/DocumentTableColumn.d.ts +16 -0
- package/lib/types/features/store/objects/layout/documentLayout.d.ts +17 -0
- package/lib/types/features/store/objects/layout/index.d.ts +2 -0
- package/lib/types/features/store/objects/layout/renderers.d.ts +2 -0
- package/lib/types/features/store/objects/search/DocumentSearchContext.d.ts +48 -0
- package/lib/types/features/store/objects/search/DocumentSearchProvider.d.ts +15 -0
- package/lib/types/features/store/objects/search/index.d.ts +2 -0
- package/lib/types/features/store/objects/selection/ObjectsActionContext.d.ts +25 -0
- package/lib/types/features/store/objects/selection/ObjectsActionSpec.d.ts +27 -0
- package/lib/types/features/store/objects/selection/SelectionActions.d.ts +4 -0
- package/lib/types/features/store/objects/selection/actions/AddToCollectionAction.d.ts +3 -0
- package/lib/types/features/store/objects/selection/actions/ChangeTypeAction.d.ts +3 -0
- package/lib/types/features/store/objects/selection/actions/ConfirmAction.d.ts +15 -0
- package/lib/types/features/store/objects/selection/actions/DeleteObjectsAction.d.ts +2 -0
- package/lib/types/features/store/objects/selection/actions/ExportPropertiesAction.d.ts +3 -0
- package/lib/types/features/store/objects/selection/actions/RemoveFromCollectionAction.d.ts +2 -0
- package/lib/types/features/store/objects/selection/actions/StartWorkflowComponent.d.ts +3 -0
- package/lib/types/features/store/objects/selection/actions/index.d.ts +7 -0
- package/lib/types/features/store/objects/selection/index.d.ts +4 -0
- package/lib/types/features/store/objects/upload/DocumentUploadModal.d.ts +37 -0
- package/lib/types/features/store/objects/upload/index.d.ts +3 -0
- package/lib/types/features/store/objects/upload/useSmartFileUploadProcessing.d.ts +29 -0
- package/lib/types/features/store/objects/upload/useUploadHandler.d.ts +49 -0
- package/lib/types/features/store/types/ContentObjectTypeView.d.ts +5 -0
- package/lib/types/features/store/types/ContentObjectTypesSearch.d.ts +5 -0
- package/lib/types/features/store/types/ContentObjectTypesTable.d.ts +7 -0
- package/lib/types/features/store/types/ContentObjectTypesView.d.ts +8 -0
- package/lib/types/features/store/types/CreateOrUpdateTypeModal.d.ts +14 -0
- package/lib/types/features/store/types/ObjectSchemaEditor.d.ts +7 -0
- package/lib/types/features/store/types/SelectContentType.d.ts +10 -0
- package/lib/types/features/store/types/SelectContentTypeModal.d.ts +32 -0
- package/lib/types/features/store/types/TableLayoutEditor.d.ts +8 -0
- package/lib/types/features/store/types/index.d.ts +10 -0
- package/lib/types/features/store/types/search/ObjectTypeSearchContext.d.ts +35 -0
- package/lib/types/features/store/types/search/ObjectTypeSearchProvider.d.ts +10 -0
- package/lib/types/features/store/types/search/index.d.ts +2 -0
- package/lib/types/features/user/UserAvatar.d.ts +8 -0
- package/lib/types/features/user/UserInfo.d.ts +36 -0
- package/lib/types/features/user/index.d.ts +2 -0
- package/lib/types/features/utils/index.d.ts +3 -0
- package/lib/types/features/utils/mimeType.d.ts +4 -0
- package/lib/types/features/utils/rendition.d.ts +3 -0
- package/lib/types/features/utils/text.d.ts +2 -0
- package/lib/types/layout/Sidebar.d.ts +2 -1
- package/lib/types/widgets/Progress.d.ts +5 -0
- package/lib/types/widgets/form/schema.d.ts +4 -3
- package/lib/types/widgets/index.d.ts +4 -0
- package/lib/types/widgets/popover/Popover.d.ts +37 -0
- package/lib/types/widgets/popover/context.d.ts +7 -0
- package/lib/types/widgets/popover/index.d.ts +2 -0
- package/lib/types/widgets/popover/slots.d.ts +4 -0
- package/lib/types/widgets/properties/PropertiesView.d.ts +10 -0
- package/lib/types/widgets/properties/index.d.ts +1 -0
- package/lib/types/widgets/upload/DropZone.d.ts +40 -0
- package/lib/types/widgets/upload/UploadResultCategory.d.ts +25 -0
- package/lib/types/widgets/upload/UploadSummary.d.ts +37 -0
- package/lib/types/widgets/upload/index.d.ts +3 -0
- 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.map +1 -1
- package/lib/vertesia-ui-session.js.map +1 -1
- package/lib/vertesia-ui-widgets.js +1 -1
- package/lib/vertesia-ui-widgets.js.map +1 -1
- package/package.json +13 -5
- package/src/core/components/FormItem.tsx +35 -0
- package/src/core/components/InputList.tsx +4 -3
- package/src/core/components/index.ts +3 -3
- package/src/core/components/shadcn/button.tsx +68 -8
- package/src/core/components/shadcn/dialog.tsx +3 -3
- package/src/core/components/shadcn/filters/DynamicLabel.tsx +45 -0
- package/src/core/components/shadcn/filters/comboBox.tsx +56 -52
- package/src/core/components/shadcn/filters/dateFilter.tsx +24 -25
- package/src/core/components/shadcn/filters/filterBar.tsx +53 -47
- package/src/core/components/shadcn/filters/filters.tsx +43 -30
- package/src/core/components/shadcn/filters/selectFilter.tsx +53 -34
- package/src/core/components/shadcn/filters/textFilter.tsx +6 -3
- package/src/core/components/shadcn/filters/types.ts +8 -1
- package/src/core/components/shadcn/input.tsx +5 -5
- package/src/core/components/shadcn/selectBox.tsx +138 -33
- package/src/core/components/styles.ts +1 -1
- package/src/core/components/table/index.tsx +8 -0
- package/src/core/index.ts +2 -1
- package/src/core/utils/cn.ts +6 -0
- package/src/core/utils/index.ts +1 -0
- package/src/features/agent/PayloadBuilder.tsx +208 -0
- package/src/features/agent/chat/AnimatedThinkingDots.tsx +350 -0
- package/src/features/agent/chat/JumpingDots.tsx +16 -0
- package/src/features/agent/chat/ModernAgentConversation.tsx +708 -0
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +246 -0
- package/src/features/agent/chat/ModernAgentOutput/Header.tsx +231 -0
- package/src/features/agent/chat/ModernAgentOutput/InlineSlideInPanel.tsx +66 -0
- package/src/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.tsx +282 -0
- package/src/features/agent/chat/ModernAgentOutput/MessageInput.tsx +125 -0
- package/src/features/agent/chat/ModernAgentOutput/MessageItem.tsx +562 -0
- package/src/features/agent/chat/ModernAgentOutput/MessagesContainer.tsx +51 -0
- package/src/features/agent/chat/ModernAgentOutput/PlanPanel.tsx +123 -0
- package/src/features/agent/chat/ModernAgentOutput/README-image-support.md +43 -0
- package/src/features/agent/chat/ModernAgentOutput/SlideInPanel.tsx +72 -0
- package/src/features/agent/chat/ModernAgentOutput/SlidingMessages.tsx +96 -0
- package/src/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.tsx +185 -0
- package/src/features/agent/chat/ModernAgentOutput/StackedMessages.tsx +33 -0
- package/src/features/agent/chat/ModernAgentOutput/WorkstreamTabs.tsx +167 -0
- package/src/features/agent/chat/ModernAgentOutput/utils.ts +195 -0
- package/src/features/agent/chat/ModernAgentOutput/with-types.d.ts +15 -0
- package/src/features/agent/chat/SlidingThinkingIndicator.tsx +459 -0
- package/src/features/agent/chat/WaitingMessages.ts +66 -0
- package/src/features/agent/chat/index.ts +4 -0
- package/src/features/agent/index.ts +2 -0
- package/src/features/errors/PanelErrorBoundary.tsx +30 -0
- package/src/features/errors/RowErrorBoundary.tsx +28 -0
- package/src/features/errors/VertesiaErrorBoundary.tsx +28 -0
- package/src/features/errors/WidgetErrorBoundary.tsx +27 -0
- package/src/features/errors/index.ts +4 -0
- package/src/features/facets/EnvironmentFacet.tsx +53 -0
- package/src/features/facets/FacetsNav.tsx +19 -0
- package/src/features/facets/InteractionFacet.tsx +53 -0
- package/src/features/facets/StringFacet.tsx +23 -0
- package/src/features/facets/StringListFacet.tsx +22 -0
- package/src/features/facets/TypeFacet.tsx +59 -0
- package/src/features/facets/TypeOptions.tsx +22 -0
- package/src/features/facets/UserFacet.tsx +61 -0
- package/src/features/facets/VFacetsNav.tsx +139 -0
- package/src/features/facets/VStringFacet.tsx +34 -0
- package/src/features/facets/VTypeFacet.tsx +72 -0
- package/src/features/facets/VUserFacet.tsx +47 -0
- package/src/features/facets/index.ts +11 -0
- package/src/features/facets/utils.tsx +9 -0
- package/src/features/index.ts +9 -1
- package/src/features/layout/GenericPageNavHeader.tsx +48 -0
- package/src/features/layout/NotFoundView.tsx +11 -0
- package/src/features/layout/index.ts +2 -0
- package/src/features/magic-pdf/DownloadPopover.tsx +32 -0
- package/src/features/magic-pdf/MagicPdfView.tsx +102 -0
- package/src/features/magic-pdf/PageSlider.tsx +112 -0
- package/src/features/magic-pdf/PdfPageProvider.tsx +229 -0
- package/src/features/magic-pdf/TextPageView.tsx +65 -0
- package/src/features/magic-pdf/index.ts +1 -0
- package/src/features/magic-pdf/types.ts +1 -0
- package/src/features/magic-pdf/useResizeOnDrag.ts +42 -0
- package/src/features/store/collections/BrowseCollectionView.tsx +45 -0
- package/src/features/store/collections/CollectionView.tsx +94 -0
- package/src/features/store/collections/CollectionsTable.tsx +115 -0
- package/src/features/store/collections/CollectionsView.tsx +166 -0
- package/src/features/store/collections/EditCollectionView.tsx +253 -0
- package/src/features/store/collections/index.ts +5 -0
- package/src/features/store/index.ts +3 -0
- package/src/features/store/objects/DocumentPreviewPanel.tsx +417 -0
- package/src/features/store/objects/DocumentSearchResults.tsx +209 -0
- package/src/features/store/objects/DocumentSelectionProvider.tsx +99 -0
- package/src/features/store/objects/DocumentTable.tsx +409 -0
- package/src/features/store/objects/ExportPropertiesModal.tsx +89 -0
- package/src/features/store/objects/components/ContentDispositionButton.tsx +45 -0
- package/src/features/store/objects/components/ContentOverview.tsx +466 -0
- package/src/features/store/objects/components/DocumentIcon.tsx +87 -0
- package/src/features/store/objects/components/DocumentInput.tsx +90 -0
- package/src/features/store/objects/components/PropertiesEditorModal.tsx +253 -0
- package/src/features/store/objects/components/SaveVersionConfirmModal.tsx +136 -0
- package/src/features/store/objects/components/SelectDocument.tsx +69 -0
- package/src/features/store/objects/components/SelectDocumentModal.tsx +20 -0
- package/src/features/store/objects/components/VectorSearchWidget.tsx +115 -0
- package/src/features/store/objects/components/index.ts +9 -0
- package/src/features/store/objects/components/useDownloadObject.ts +24 -0
- package/src/features/store/objects/index.ts +10 -0
- package/src/features/store/objects/layout/DocumentTableColumn.tsx +84 -0
- package/src/features/store/objects/layout/documentLayout.tsx +69 -0
- package/src/features/store/objects/layout/index.ts +2 -0
- package/src/features/store/objects/layout/knowledge.md +238 -0
- package/src/features/store/objects/layout/renderers.tsx +139 -0
- package/src/features/store/objects/search/DocumentSearchContext.ts +181 -0
- package/src/features/store/objects/search/DocumentSearchProvider.tsx +54 -0
- package/src/features/store/objects/search/index.ts +2 -0
- package/src/features/store/objects/selection/ObjectsActionContext.tsx +196 -0
- package/src/features/store/objects/selection/ObjectsActionSpec.ts +31 -0
- package/src/features/store/objects/selection/SelectionActions.tsx +160 -0
- package/src/features/store/objects/selection/actions/AddToCollectionAction.tsx +114 -0
- package/src/features/store/objects/selection/actions/ChangeTypeAction.tsx +76 -0
- package/src/features/store/objects/selection/actions/ConfirmAction.tsx +46 -0
- package/src/features/store/objects/selection/actions/DeleteObjectsAction.tsx +77 -0
- package/src/features/store/objects/selection/actions/ExportPropertiesAction.tsx +117 -0
- package/src/features/store/objects/selection/actions/RemoveFromCollectionAction.tsx +77 -0
- package/src/features/store/objects/selection/actions/StartWorkflowComponent.tsx +122 -0
- package/src/features/store/objects/selection/actions/index.ts +7 -0
- package/src/features/store/objects/selection/index.ts +4 -0
- package/src/features/store/objects/upload/DocumentUploadModal.tsx +970 -0
- package/src/features/store/objects/upload/index.ts +3 -0
- package/src/features/store/objects/upload/useSmartFileUploadProcessing.ts +250 -0
- package/src/features/store/objects/upload/useUploadHandler.ts +325 -0
- package/src/features/store/types/ContentObjectTypeView.tsx +244 -0
- package/src/features/store/types/ContentObjectTypesSearch.tsx +111 -0
- package/src/features/store/types/ContentObjectTypesTable.tsx +38 -0
- package/src/features/store/types/ContentObjectTypesView.tsx +71 -0
- package/src/features/store/types/CreateOrUpdateTypeModal.tsx +70 -0
- package/src/features/store/types/ObjectSchemaEditor.tsx +127 -0
- package/src/features/store/types/SelectContentType.tsx +88 -0
- package/src/features/store/types/SelectContentTypeModal.tsx +142 -0
- package/src/features/store/types/TableLayoutEditor.tsx +104 -0
- package/src/features/store/types/index.ts +10 -0
- package/src/features/store/types/search/ObjectTypeSearchContext.tsx +119 -0
- package/src/features/store/types/search/ObjectTypeSearchProvider.tsx +24 -0
- package/src/features/store/types/search/index.ts +2 -0
- package/src/features/user/UserAvatar.tsx +34 -0
- package/src/features/user/UserInfo.tsx +215 -0
- package/src/features/user/index.ts +2 -0
- package/src/features/utils/index.ts +3 -0
- package/src/features/utils/mimeType.ts +9 -0
- package/src/features/utils/rendition.ts +75 -0
- package/src/features/utils/text.ts +10 -0
- package/src/layout/FullHeightLayout.tsx +1 -1
- package/src/layout/Sidebar.tsx +12 -2
- package/src/widgets/Progress.tsx +10 -0
- package/src/widgets/codemirror/CodeMirrorEditor.tsx +1 -1
- package/src/widgets/form/Form.tsx +2 -2
- package/src/widgets/form/schema.ts +14 -7
- package/src/widgets/index.ts +5 -1
- package/src/widgets/popover/Popover.tsx +171 -0
- package/src/widgets/popover/context.ts +15 -0
- package/src/widgets/popover/index.ts +2 -0
- package/src/widgets/popover/slots.ts +24 -0
- package/src/widgets/properties/PropertiesView.tsx +26 -0
- package/src/widgets/properties/index.ts +1 -0
- package/src/widgets/schema-editor/JSONSchemaEditorModal.tsx +1 -2
- package/src/widgets/schema-editor/editor/Editable.tsx +12 -13
- package/src/widgets/schema-editor/editor/PropertyViewer.tsx +1 -1
- package/src/widgets/schema-editor/editor/SchemaEditor.tsx +4 -4
- package/src/widgets/upload/DropZone.tsx +257 -0
- package/src/widgets/upload/UploadResultCategory.tsx +81 -0
- package/src/widgets/upload/UploadSummary.tsx +116 -0
- package/src/widgets/upload/index.ts +3 -0
- package/lib/esm/code/index.js +0 -3
- package/lib/esm/code/index.js.map +0 -1
- package/lib/esm/core/components/Input.js +0 -16
- package/lib/esm/core/components/Input.js.map +0 -1
- package/lib/esm/form/index.js +0 -3
- package/lib/esm/form/index.js.map +0 -1
- package/lib/types/code/index.d.ts +0 -0
- package/lib/types/core/components/Input.d.ts +0 -8
- package/lib/types/form/index.d.ts +0 -0
- package/lib/vertesia-ui-code.js +0 -2
- package/lib/vertesia-ui-code.js.map +0 -1
- package/lib/vertesia-ui-form.js +0 -2
- package/lib/vertesia-ui-form.js.map +0 -1
- package/src/code/index.ts +0 -1
- package/src/core/components/Input.tsx +0 -43
- package/src/form/index.ts +0 -1
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
import { useUserSession } from '@vertesia/ui/session';
|
|
2
|
+
import { useState, useRef, useEffect } from 'react';
|
|
3
|
+
import {
|
|
4
|
+
Button,
|
|
5
|
+
Modal,
|
|
6
|
+
ModalBody,
|
|
7
|
+
ModalFooter,
|
|
8
|
+
ModalTitle,
|
|
9
|
+
useToast
|
|
10
|
+
} from '@vertesia/ui/core';
|
|
11
|
+
import { ContentObject } from '@vertesia/common';
|
|
12
|
+
import { useNavigate } from "@vertesia/ui/router";
|
|
13
|
+
|
|
14
|
+
// Import Monaco Editor
|
|
15
|
+
import Editor, { Monaco } from '@monaco-editor/react';
|
|
16
|
+
import { editor } from 'monaco-editor';
|
|
17
|
+
|
|
18
|
+
// Import SaveVersionConfirmModal
|
|
19
|
+
import { SaveVersionConfirmModal } from './SaveVersionConfirmModal';
|
|
20
|
+
|
|
21
|
+
export interface PropertiesEditorModalProps {
|
|
22
|
+
isOpen: boolean;
|
|
23
|
+
onClose: () => void;
|
|
24
|
+
object: ContentObject;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function PropertiesEditorModal({ isOpen, onClose, object }: PropertiesEditorModalProps) {
|
|
28
|
+
const { client, store } = useUserSession();
|
|
29
|
+
const toast = useToast();
|
|
30
|
+
const navigate = useNavigate();
|
|
31
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
32
|
+
const [propertiesJson, setPropertiesJson] = useState('');
|
|
33
|
+
const [showConfirmation, setShowConfirmation] = useState(false);
|
|
34
|
+
const [parsedProperties, setParsedProperties] = useState<any>(null);
|
|
35
|
+
const editorRef = useRef<editor.IStandaloneCodeEditor | null>(null);
|
|
36
|
+
const monacoRef = useRef<Monaco | null>(null);
|
|
37
|
+
const [jsonSchema, setJsonSchema] = useState<any>(null);
|
|
38
|
+
//TODO state not used
|
|
39
|
+
const [_newVersionId, setNewVersionId] = useState<string | null>(null);
|
|
40
|
+
|
|
41
|
+
// Initialize editor content when modal opens
|
|
42
|
+
useEffect(() => {
|
|
43
|
+
if (isOpen) {
|
|
44
|
+
setPropertiesJson(JSON.stringify(object.properties || {}, null, 2));
|
|
45
|
+
|
|
46
|
+
// Try to fetch JSON schema if object has a type
|
|
47
|
+
if (object.type?.id) {
|
|
48
|
+
fetchJsonSchema(object.type.id);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}, [isOpen, object]);
|
|
52
|
+
|
|
53
|
+
// Handle editor mounting
|
|
54
|
+
function handleEditorDidMount(editor: editor.IStandaloneCodeEditor, monaco: Monaco) {
|
|
55
|
+
editorRef.current = editor;
|
|
56
|
+
monacoRef.current = monaco;
|
|
57
|
+
|
|
58
|
+
// Apply JSON schema validation if available
|
|
59
|
+
if (jsonSchema) {
|
|
60
|
+
setMonacoJsonSchema(monaco, jsonSchema);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// Fetch JSON schema for the object type
|
|
65
|
+
async function fetchJsonSchema(typeId: string) {
|
|
66
|
+
try {
|
|
67
|
+
const typeDetails = await store.types.retrieve(typeId);
|
|
68
|
+
if (typeDetails.object_schema) {
|
|
69
|
+
setJsonSchema(typeDetails.object_schema);
|
|
70
|
+
|
|
71
|
+
// Apply schema if Monaco is already mounted
|
|
72
|
+
if (monacoRef.current) {
|
|
73
|
+
setMonacoJsonSchema(monacoRef.current, typeDetails.object_schema);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
} catch (error) {
|
|
77
|
+
console.error('Failed to fetch JSON schema:', error);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Configure Monaco editor with JSON schema
|
|
82
|
+
function setMonacoJsonSchema(monaco: Monaco, schema: any) {
|
|
83
|
+
monaco.languages.json.jsonDefaults.setDiagnosticsOptions({
|
|
84
|
+
validate: true,
|
|
85
|
+
schemas: [
|
|
86
|
+
{
|
|
87
|
+
uri: 'http://myserver/object-schema.json',
|
|
88
|
+
fileMatch: ['*'],
|
|
89
|
+
schema
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Validate JSON and open confirmation modal
|
|
96
|
+
function handleSave() {
|
|
97
|
+
if (!editorRef.current) return;
|
|
98
|
+
|
|
99
|
+
const editorValue = editorRef.current.getValue();
|
|
100
|
+
|
|
101
|
+
try {
|
|
102
|
+
const properties = JSON.parse(editorValue);
|
|
103
|
+
setParsedProperties(properties);
|
|
104
|
+
setShowConfirmation(true);
|
|
105
|
+
} catch (err) {
|
|
106
|
+
toast({
|
|
107
|
+
status: 'error',
|
|
108
|
+
title: 'Invalid JSON',
|
|
109
|
+
description: 'Please fix the JSON syntax errors before saving.',
|
|
110
|
+
duration: 5000
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// Save properties
|
|
116
|
+
async function saveProperties(createVersion: boolean, versionLabel?: string) {
|
|
117
|
+
try {
|
|
118
|
+
setIsLoading(true);
|
|
119
|
+
|
|
120
|
+
const properties = parsedProperties || JSON.parse(propertiesJson);
|
|
121
|
+
|
|
122
|
+
if (createVersion) {
|
|
123
|
+
// Create a new version with the updated properties
|
|
124
|
+
const response = await client.objects.update(object.id, {
|
|
125
|
+
properties: properties
|
|
126
|
+
}, {
|
|
127
|
+
createRevision: true,
|
|
128
|
+
revisionLabel: versionLabel
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
// Store the new version ID for navigation
|
|
132
|
+
if (response.id !== object.id) {
|
|
133
|
+
setNewVersionId(response.id);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
toast({
|
|
137
|
+
status: 'success',
|
|
138
|
+
title: 'New version created',
|
|
139
|
+
description: 'A new version with updated properties has been created.',
|
|
140
|
+
duration: 2000
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
// Close modals
|
|
144
|
+
setShowConfirmation(false);
|
|
145
|
+
onClose();
|
|
146
|
+
|
|
147
|
+
// Navigate to the new version
|
|
148
|
+
if (response.id !== object.id) {
|
|
149
|
+
// Delay slightly to allow modal closing to complete
|
|
150
|
+
setTimeout(() => {
|
|
151
|
+
navigate(`/objects/${response.id}`);
|
|
152
|
+
toast({
|
|
153
|
+
status: 'info',
|
|
154
|
+
title: 'Viewing New Version',
|
|
155
|
+
description: versionLabel ? `Now viewing version '${versionLabel}'` : 'Now viewing the new version',
|
|
156
|
+
duration: 3000
|
|
157
|
+
});
|
|
158
|
+
}, 100);
|
|
159
|
+
}
|
|
160
|
+
} else {
|
|
161
|
+
// Update the object properties in place
|
|
162
|
+
await store.objects.update(object.id, {
|
|
163
|
+
properties: properties
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
toast({
|
|
167
|
+
status: 'success',
|
|
168
|
+
title: 'Properties updated',
|
|
169
|
+
description: 'The object properties have been updated successfully.',
|
|
170
|
+
duration: 2000
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
// Close modals
|
|
174
|
+
setShowConfirmation(false);
|
|
175
|
+
onClose();
|
|
176
|
+
}
|
|
177
|
+
} catch (error: any) {
|
|
178
|
+
toast({
|
|
179
|
+
status: 'error',
|
|
180
|
+
title: 'Error updating properties',
|
|
181
|
+
description: error.message || 'An error occurred while updating the properties.',
|
|
182
|
+
duration: 5000
|
|
183
|
+
});
|
|
184
|
+
setIsLoading(false);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
// Handle closing the confirmation modal without saving
|
|
189
|
+
function handleCancelConfirmation() {
|
|
190
|
+
setShowConfirmation(false);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
return (
|
|
195
|
+
<>
|
|
196
|
+
<Modal
|
|
197
|
+
isOpen={isOpen}
|
|
198
|
+
onClose={onClose}
|
|
199
|
+
className="sm:max-w-[90%] md:max-w-[80%] lg:max-w-[75%] xl:max-w-[70%]"
|
|
200
|
+
>
|
|
201
|
+
<ModalTitle>Edit Properties</ModalTitle>
|
|
202
|
+
<ModalBody>
|
|
203
|
+
<div className="mb-2 text-sm text-gray-500">
|
|
204
|
+
{object.type?.name ? (
|
|
205
|
+
<span>Editing properties for object type: <strong>{object.type.name}</strong></span>
|
|
206
|
+
) : (
|
|
207
|
+
<span>Editing properties for generic document</span>
|
|
208
|
+
)}
|
|
209
|
+
{jsonSchema && (
|
|
210
|
+
<span className="ml-2 text-green-600">(JSON schema validation enabled)</span>
|
|
211
|
+
)}
|
|
212
|
+
</div>
|
|
213
|
+
<div className="h-[75vh] border border-gray-300 dark:border-gray-700 rounded-md">
|
|
214
|
+
<Editor
|
|
215
|
+
height="100%"
|
|
216
|
+
language="json"
|
|
217
|
+
value={propertiesJson}
|
|
218
|
+
onChange={(value) => setPropertiesJson(value || '')}
|
|
219
|
+
onMount={handleEditorDidMount}
|
|
220
|
+
options={{
|
|
221
|
+
minimap: { enabled: false },
|
|
222
|
+
scrollBeyondLastLine: false,
|
|
223
|
+
formatOnPaste: true,
|
|
224
|
+
formatOnType: true,
|
|
225
|
+
automaticLayout: true,
|
|
226
|
+
wordWrap: 'on'
|
|
227
|
+
}}
|
|
228
|
+
/>
|
|
229
|
+
</div>
|
|
230
|
+
</ModalBody>
|
|
231
|
+
<ModalFooter>
|
|
232
|
+
<Button variant="secondary" onClick={onClose}>
|
|
233
|
+
Cancel
|
|
234
|
+
</Button>
|
|
235
|
+
<Button
|
|
236
|
+
variant="primary"
|
|
237
|
+
onClick={handleSave}
|
|
238
|
+
>
|
|
239
|
+
Save Changes
|
|
240
|
+
</Button>
|
|
241
|
+
</ModalFooter>
|
|
242
|
+
</Modal>
|
|
243
|
+
|
|
244
|
+
{/* Version Confirmation Modal */}
|
|
245
|
+
<SaveVersionConfirmModal
|
|
246
|
+
isOpen={showConfirmation}
|
|
247
|
+
onClose={handleCancelConfirmation}
|
|
248
|
+
onConfirm={saveProperties}
|
|
249
|
+
isLoading={isLoading}
|
|
250
|
+
/>
|
|
251
|
+
</>
|
|
252
|
+
);
|
|
253
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Button,
|
|
4
|
+
Modal,
|
|
5
|
+
ModalBody,
|
|
6
|
+
ModalFooter,
|
|
7
|
+
ModalTitle,
|
|
8
|
+
Input,
|
|
9
|
+
RadioGroup,
|
|
10
|
+
RadioOptionAdapter
|
|
11
|
+
} from '@vertesia/ui/core';
|
|
12
|
+
import { FormItem } from '@vertesia/ui/core';
|
|
13
|
+
|
|
14
|
+
export interface SaveVersionConfirmModalProps {
|
|
15
|
+
isOpen: boolean;
|
|
16
|
+
onClose: () => void;
|
|
17
|
+
onConfirm: (createVersion: boolean, versionLabel?: string) => Promise<void>;
|
|
18
|
+
isLoading: boolean;
|
|
19
|
+
uploadedFileName?: string; // Add this to show when an uploaded file is being used
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Define option type and adapter for RadioGroup
|
|
23
|
+
interface SaveOptionType {
|
|
24
|
+
id: string;
|
|
25
|
+
label: string;
|
|
26
|
+
description: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
class SaveOptionAdapter extends RadioOptionAdapter<SaveOptionType> {
|
|
30
|
+
labelOf(item: SaveOptionType): string {
|
|
31
|
+
return item.label;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
idOf(item: SaveOptionType): string {
|
|
35
|
+
return item.id;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
renderOption(item: SaveOptionType): React.ReactNode {
|
|
39
|
+
return (
|
|
40
|
+
<div>
|
|
41
|
+
<div className="font-medium">{item.label}</div>
|
|
42
|
+
<p className="text-sm text-gray-500 dark:text-gray-400 mt-1">
|
|
43
|
+
{item.description}
|
|
44
|
+
</p>
|
|
45
|
+
</div>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function SaveVersionConfirmModal({ isOpen, onClose, onConfirm, isLoading, uploadedFileName }: SaveVersionConfirmModalProps) {
|
|
51
|
+
const saveOptions: SaveOptionType[] = [
|
|
52
|
+
{
|
|
53
|
+
id: "update",
|
|
54
|
+
label: "Update current version",
|
|
55
|
+
description: uploadedFileName
|
|
56
|
+
? "Replace the content file and modify properties directly in the current revision."
|
|
57
|
+
: "Modify the properties directly in the current revision."
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: "new-version",
|
|
61
|
+
label: "Create new version",
|
|
62
|
+
description: uploadedFileName
|
|
63
|
+
? "Create a new revision with the replacement file while preserving the original."
|
|
64
|
+
: "Create a new revision with these property changes while preserving the original."
|
|
65
|
+
}
|
|
66
|
+
];
|
|
67
|
+
|
|
68
|
+
const [selectedOption, setSelectedOption] = useState<SaveOptionType | undefined>(saveOptions[0]);
|
|
69
|
+
const [versionLabel, setVersionLabel] = useState('');
|
|
70
|
+
const optionAdapter = new SaveOptionAdapter();
|
|
71
|
+
|
|
72
|
+
const createVersion = selectedOption?.id === "new-version";
|
|
73
|
+
|
|
74
|
+
const handleOptionChange = (option: SaveOptionType) => {
|
|
75
|
+
setSelectedOption(option);
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
const handleConfirm = async () => {
|
|
79
|
+
await onConfirm(createVersion, createVersion ? versionLabel : undefined);
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
return (
|
|
83
|
+
<Modal isOpen={isOpen} onClose={onClose} className="sm:max-w-md">
|
|
84
|
+
<ModalTitle>Save Changes</ModalTitle>
|
|
85
|
+
<ModalBody>
|
|
86
|
+
<div className="space-y-4">
|
|
87
|
+
{uploadedFileName && (
|
|
88
|
+
<div className="mb-4 p-3 bg-blue-50 dark:bg-blue-900/20 rounded-md">
|
|
89
|
+
<p className="text-sm text-blue-700 dark:text-blue-300 font-medium">
|
|
90
|
+
You're about to replace the content file with: <span className="font-bold">{uploadedFileName}</span>
|
|
91
|
+
</p>
|
|
92
|
+
</div>
|
|
93
|
+
)}
|
|
94
|
+
<p className="text-sm text-mixer-muted/5">
|
|
95
|
+
How would you like to save these changes?
|
|
96
|
+
</p>
|
|
97
|
+
|
|
98
|
+
<RadioGroup
|
|
99
|
+
adapter={optionAdapter}
|
|
100
|
+
options={saveOptions}
|
|
101
|
+
value={selectedOption}
|
|
102
|
+
onChange={handleOptionChange}
|
|
103
|
+
gap="gap-4"
|
|
104
|
+
/>
|
|
105
|
+
|
|
106
|
+
{createVersion && (
|
|
107
|
+
<FormItem
|
|
108
|
+
label="Version Label (Optional)"
|
|
109
|
+
description="Optional label for the new version."
|
|
110
|
+
className="mt-3 pl-8"
|
|
111
|
+
>
|
|
112
|
+
<Input
|
|
113
|
+
value={versionLabel}
|
|
114
|
+
onChange={setVersionLabel}
|
|
115
|
+
placeholder="e.g., v1.2, approved, post-review"
|
|
116
|
+
className="w-full"
|
|
117
|
+
/>
|
|
118
|
+
</FormItem>
|
|
119
|
+
)}
|
|
120
|
+
</div>
|
|
121
|
+
</ModalBody>
|
|
122
|
+
<ModalFooter>
|
|
123
|
+
<Button variant="secondary" onClick={onClose} disabled={isLoading}>
|
|
124
|
+
Cancel
|
|
125
|
+
</Button>
|
|
126
|
+
<Button
|
|
127
|
+
variant="primary"
|
|
128
|
+
onClick={handleConfirm}
|
|
129
|
+
isLoading={isLoading}
|
|
130
|
+
>
|
|
131
|
+
Save
|
|
132
|
+
</Button>
|
|
133
|
+
</ModalFooter>
|
|
134
|
+
</Modal>
|
|
135
|
+
);
|
|
136
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { ColumnLayout, ContentObjectItem } from "@vertesia/common";
|
|
2
|
+
import { ErrorBox, Spinner, useIntersectionObserver } from "@vertesia/ui/core";
|
|
3
|
+
import { useEffect, useRef, useState } from "react";
|
|
4
|
+
import { VFacetsNav } from "../../../facets";
|
|
5
|
+
import { DocumentTable } from "../DocumentTable";
|
|
6
|
+
import { useDocumentSearch, useWatchDocumentSearchFacets, useWatchDocumentSearchResult } from "../search/DocumentSearchContext";
|
|
7
|
+
import { DocumentSearchProvider } from "../search/DocumentSearchProvider";
|
|
8
|
+
import { ContentDispositionButton } from "./ContentDispositionButton";
|
|
9
|
+
|
|
10
|
+
const layout: ColumnLayout[] = [
|
|
11
|
+
{ "name": "Name", "field": "properties.title", "type": "string", "fallback": "name" },
|
|
12
|
+
{ "name": "Type", "field": "type.name", "type": "string" },
|
|
13
|
+
{ "name": "Status", "field": "status", "type": "string" },
|
|
14
|
+
{ "name": "Created At", "field": "created_at", "type": "date" }
|
|
15
|
+
];
|
|
16
|
+
|
|
17
|
+
interface SelectDocumentProps {
|
|
18
|
+
onChange: (value: ContentObjectItem) => void;
|
|
19
|
+
type?: string;
|
|
20
|
+
mimeType?: string;
|
|
21
|
+
}
|
|
22
|
+
export function SelectDocument({ onChange }: SelectDocumentProps) {
|
|
23
|
+
const onRowClick = (selected: ContentObjectItem) => {
|
|
24
|
+
onChange(selected || undefined);
|
|
25
|
+
}
|
|
26
|
+
return (
|
|
27
|
+
<DocumentSearchProvider>
|
|
28
|
+
<SelectDocumentImpl onRowClick={onRowClick} />
|
|
29
|
+
</DocumentSearchProvider>
|
|
30
|
+
)
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
interface SelectDocumentImplProps {
|
|
34
|
+
onRowClick: (selected: ContentObjectItem) => void;
|
|
35
|
+
}
|
|
36
|
+
function SelectDocumentImpl({ onRowClick }: SelectDocumentImplProps) {
|
|
37
|
+
const [isReady, setIsReady] = useState(false);
|
|
38
|
+
const [isGridView, setIsGridView] = useState(localStorage.getItem('lastDisplayedView') === 'grid');
|
|
39
|
+
const { search, isLoading, error, objects } = useWatchDocumentSearchResult();
|
|
40
|
+
|
|
41
|
+
const loadMoreRef = useRef<HTMLDivElement>(null);
|
|
42
|
+
useIntersectionObserver(loadMoreRef, () => {
|
|
43
|
+
isReady && search.loadMore(true)
|
|
44
|
+
}, { deps: [isReady] });
|
|
45
|
+
useEffect(() => {
|
|
46
|
+
search.search().then(() => setIsReady(true));
|
|
47
|
+
}, []);
|
|
48
|
+
|
|
49
|
+
const facets = useWatchDocumentSearchFacets();
|
|
50
|
+
const facetSearch = useDocumentSearch();
|
|
51
|
+
|
|
52
|
+
if (error) {
|
|
53
|
+
return <ErrorBox title="Search failed">{error.message}</ErrorBox>
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<div>
|
|
58
|
+
<div className="flex justify-between items-center mb-4">
|
|
59
|
+
<VFacetsNav facets={facets} search={facetSearch} textSearch="Filter content" />
|
|
60
|
+
<ContentDispositionButton onUpdate={setIsGridView} />
|
|
61
|
+
</div>
|
|
62
|
+
<DocumentTable objects={objects || []} isLoading={false} layout={layout} onRowClick={onRowClick} isGridView={isGridView} />
|
|
63
|
+
<div ref={loadMoreRef} className='mt-10' />
|
|
64
|
+
{
|
|
65
|
+
isLoading && <div className='flex justify-center'><Spinner size='xl' /></div>
|
|
66
|
+
}
|
|
67
|
+
</div>
|
|
68
|
+
)
|
|
69
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ContentObjectItem } from "@vertesia/common";
|
|
2
|
+
import { Modal, ModalBody, ModalTitle } from "@vertesia/ui/core";
|
|
3
|
+
import { SelectDocument } from "./SelectDocument";
|
|
4
|
+
|
|
5
|
+
interface SelectDocumentModalProps {
|
|
6
|
+
value?: string;
|
|
7
|
+
isOpen?: boolean
|
|
8
|
+
// if value is undefined then do not save changes
|
|
9
|
+
onClose: (value?: ContentObjectItem) => void;
|
|
10
|
+
}
|
|
11
|
+
export function SelectDocumentModal({ isOpen, onClose }: SelectDocumentModalProps) {
|
|
12
|
+
return (
|
|
13
|
+
<Modal onClose={() => onClose()} isOpen={!!isOpen} className='min-w-[60vw]'>
|
|
14
|
+
<ModalTitle>Select Content</ModalTitle>
|
|
15
|
+
<ModalBody className='p-4 pt-0 overflow-y-auto max-h-[80vh] min-h-[80vh]'>
|
|
16
|
+
{isOpen && <SelectDocument onChange={onClose} />}
|
|
17
|
+
</ModalBody>
|
|
18
|
+
</Modal>
|
|
19
|
+
)
|
|
20
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
|
|
3
|
+
import { ProjectConfiguration, SupportedEmbeddingTypes, VectorSearchQuery } from '@vertesia/common';
|
|
4
|
+
import { Button, Input, useToast } from '@vertesia/ui/core';
|
|
5
|
+
import { useUserSession } from '@vertesia/ui/session';
|
|
6
|
+
|
|
7
|
+
interface VectorSearchWidgetProps {
|
|
8
|
+
onChange: (query?: VectorSearchQuery) => void;
|
|
9
|
+
className?: string;
|
|
10
|
+
status?: boolean;
|
|
11
|
+
isLoading?: boolean;
|
|
12
|
+
refresh: number
|
|
13
|
+
}
|
|
14
|
+
export function VectorSearchWidget({ onChange, isLoading, refresh }: VectorSearchWidgetProps) {
|
|
15
|
+
const { client, project } = useUserSession();
|
|
16
|
+
const toast = useToast();
|
|
17
|
+
|
|
18
|
+
const [searchText, setSearchText] = useState<string | undefined>(undefined);
|
|
19
|
+
const [searchSketch, setSearchSketch] = useState<string | undefined>(undefined);
|
|
20
|
+
const [config, setConfig] = useState<ProjectConfiguration | undefined>(undefined);
|
|
21
|
+
const isReady = !!project && (!!config?.embeddings.text || !!config?.embeddings.image);
|
|
22
|
+
const [status, setStatus] = useState<string | undefined>(undefined);
|
|
23
|
+
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
setSearchText(undefined);
|
|
26
|
+
setSearchSketch(undefined);
|
|
27
|
+
setStatus(undefined);
|
|
28
|
+
}, [refresh]);
|
|
29
|
+
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
if (!project) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
client.projects.retrieve(project.id).then((project) => {
|
|
36
|
+
setConfig(project.configuration);
|
|
37
|
+
})
|
|
38
|
+
}, [project]);
|
|
39
|
+
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
if (status) {
|
|
42
|
+
toast({ title: status, status: 'success', duration: 2000 });
|
|
43
|
+
}
|
|
44
|
+
}, [status]);
|
|
45
|
+
|
|
46
|
+
useEffect(() => {
|
|
47
|
+
if (!searchText || searchText.length === 0) {
|
|
48
|
+
onChange(undefined);
|
|
49
|
+
}
|
|
50
|
+
}, [searchText]);
|
|
51
|
+
|
|
52
|
+
const generateTextEmbeddings = async () => {
|
|
53
|
+
if (!isReady || !searchText || !config?.embeddings.text) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
setStatus('Generating text embeddings...');
|
|
58
|
+
const response = await client.environments.embeddings(config.embeddings.text?.environment, {
|
|
59
|
+
model: config.embeddings.text?.model,
|
|
60
|
+
text: searchText,
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
const query: VectorSearchQuery = {
|
|
64
|
+
values: response.values,
|
|
65
|
+
type: SupportedEmbeddingTypes.text
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
return query;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const generateImageEmbeddings = async () => {
|
|
72
|
+
if (!isReady || !searchText || !config?.embeddings.image) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
setStatus('Generating image embeddings...');
|
|
77
|
+
const response = await client.environments.embeddings(config.embeddings.image?.environment, {
|
|
78
|
+
model: config.embeddings.image?.model,
|
|
79
|
+
image: searchSketch,
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
const query: VectorSearchQuery = {
|
|
83
|
+
values: response.values,
|
|
84
|
+
type: SupportedEmbeddingTypes.image
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
return query;
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
const fireSearch = (type: "text" | "image" = "text") => {
|
|
91
|
+
const generateEmbedding = type === "text" ? generateTextEmbeddings : generateImageEmbeddings;
|
|
92
|
+
|
|
93
|
+
generateEmbedding().then((query) => {
|
|
94
|
+
setStatus("Embeddings generated");
|
|
95
|
+
if (!query) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
onChange(query);
|
|
99
|
+
setStatus("Searching...");
|
|
100
|
+
});
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
const handleKeyPress = (e: React.KeyboardEvent<HTMLInputElement>) => {
|
|
104
|
+
if (e.key === "Enter") {
|
|
105
|
+
fireSearch("text");
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
return (
|
|
110
|
+
<div className="flex gap-1 items-center w-full">
|
|
111
|
+
<Input placeholder="Type what you are looking for" value={searchText} onChange={setSearchText} onKeyDown={handleKeyPress} />
|
|
112
|
+
<Button variant="secondary" isLoading={isLoading} onClick={() => fireSearch("text")} isDisabled={!isReady} alt="semantic search">Search</Button>
|
|
113
|
+
</div>
|
|
114
|
+
);
|
|
115
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./ContentDispositionButton"
|
|
2
|
+
export * from "./ContentOverview"
|
|
3
|
+
export * from "./DocumentIcon"
|
|
4
|
+
export * from "./DocumentInput"
|
|
5
|
+
export * from "./SelectDocument"
|
|
6
|
+
export * from "./SelectDocumentModal"
|
|
7
|
+
export * from "./useDownloadObject"
|
|
8
|
+
export * from "./PropertiesEditorModal"
|
|
9
|
+
export * from "./SaveVersionConfirmModal"
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { VertesiaClient, ZenoClient } from "@vertesia/client";
|
|
2
|
+
import { ToastFn } from "@vertesia/ui/core";
|
|
3
|
+
|
|
4
|
+
export function useDownloadDocument(client: VertesiaClient | ZenoClient, toast: ToastFn, uri: string | undefined) {
|
|
5
|
+
const onDownload = () => {
|
|
6
|
+
if (uri) {
|
|
7
|
+
client.files
|
|
8
|
+
.getDownloadUrl(uri)
|
|
9
|
+
.then((r) => {
|
|
10
|
+
window.open(r.url, "_blank");
|
|
11
|
+
})
|
|
12
|
+
.catch((err) => {
|
|
13
|
+
toast({
|
|
14
|
+
status: "error",
|
|
15
|
+
title: "Failed to get download URL",
|
|
16
|
+
description: err.message,
|
|
17
|
+
duration: 5000,
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
return onDownload;
|
|
24
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from "./components";
|
|
2
|
+
export * from "./DocumentPreviewPanel";
|
|
3
|
+
export * from "./DocumentSearchResults";
|
|
4
|
+
export * from "./DocumentSelectionProvider";
|
|
5
|
+
export * from "./DocumentTable";
|
|
6
|
+
export * from "./ExportPropertiesModal";
|
|
7
|
+
export * from "./layout";
|
|
8
|
+
export * from "./search";
|
|
9
|
+
export * from "./selection";
|
|
10
|
+
export * from "./upload";
|