@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,181 @@
|
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
|
|
3
|
+
import { SharedState, useWatchSharedState } from '@vertesia/ui/core';
|
|
4
|
+
import { ComputeFacetsResponse, ZenoClient } from '@vertesia/client';
|
|
5
|
+
import { ComplexSearchQuery, ContentObjectItem, FacetBucket, FacetSpec, ObjectSearchQuery } from '@vertesia/common';
|
|
6
|
+
|
|
7
|
+
interface DocumentSearchResult {
|
|
8
|
+
objects: ContentObjectItem[],
|
|
9
|
+
error?: Error;
|
|
10
|
+
isLoading: boolean;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
export class DocumentSearch {
|
|
15
|
+
|
|
16
|
+
collectionId?: string;
|
|
17
|
+
facets = new SharedState<ComputeFacetsResponse>({});
|
|
18
|
+
result = new SharedState<DocumentSearchResult>({ objects: [], isLoading: false });
|
|
19
|
+
|
|
20
|
+
facetSpecs: FacetSpec[] = [];
|
|
21
|
+
query: ComplexSearchQuery = {};
|
|
22
|
+
|
|
23
|
+
constructor(public client: ZenoClient, public limit = 100) { }
|
|
24
|
+
|
|
25
|
+
withFacets(facets: FacetSpec[]) {
|
|
26
|
+
this.facetSpecs = facets;
|
|
27
|
+
return this;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
get objects() {
|
|
31
|
+
return this.result.value.objects;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
get error() {
|
|
35
|
+
return this.result.value.error;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
get isRunning() {
|
|
39
|
+
return this.result.value.isLoading;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
getFilterValue(name: string) {
|
|
43
|
+
return (this.query as any)[name];
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
setFilterValue(name: string, value: any) {
|
|
47
|
+
(this.query as any)[name] = value;
|
|
48
|
+
// search now
|
|
49
|
+
this.search();
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
clearFilters() {
|
|
53
|
+
const parent = this.query.parent;
|
|
54
|
+
this.query = {
|
|
55
|
+
parent
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
this.search();
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
getFacetBuckets(name: string): FacetBucket[] {
|
|
62
|
+
return (this.facets.value as any)[name]?.buckets || [];
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
resetFacets() {
|
|
66
|
+
this.query = {};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
reset(isLoading = false) {
|
|
70
|
+
this.result.value = {
|
|
71
|
+
objects: [],
|
|
72
|
+
isLoading
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
_updateRunningState(value: boolean) {
|
|
77
|
+
const prev = this.result.value;
|
|
78
|
+
this.result.value = {
|
|
79
|
+
objects: prev.objects,
|
|
80
|
+
isLoading: value,
|
|
81
|
+
error: prev.error
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
_searchRequest(query: ComplexSearchQuery, limit: number, offset: number) {
|
|
86
|
+
return this.collectionId ?
|
|
87
|
+
this.client.collections.searchMembers(this.collectionId, {
|
|
88
|
+
limit,
|
|
89
|
+
offset,
|
|
90
|
+
query
|
|
91
|
+
})
|
|
92
|
+
: this.client.objects.search({
|
|
93
|
+
limit,
|
|
94
|
+
offset,
|
|
95
|
+
query
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
_facetsRequest() {
|
|
100
|
+
return this.collectionId ?
|
|
101
|
+
this.client.collections.computeFacets(this.collectionId, {
|
|
102
|
+
facets: this.facetSpecs,
|
|
103
|
+
query: this.query
|
|
104
|
+
})
|
|
105
|
+
: this.client.objects.computeFacets({
|
|
106
|
+
facets: this.facetSpecs,
|
|
107
|
+
query: this.query
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
computeFacets(_query: ObjectSearchQuery) {
|
|
112
|
+
this._facetsRequest().then((facets) => {
|
|
113
|
+
this.facets.value = facets;
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
_search(loadMore = false) {
|
|
118
|
+
if (this.isRunning) { // avoid searching when a search is pending
|
|
119
|
+
return Promise.resolve(false);
|
|
120
|
+
}
|
|
121
|
+
this.result.value = {
|
|
122
|
+
isLoading: true,
|
|
123
|
+
objects: loadMore ? this.objects : [],
|
|
124
|
+
}
|
|
125
|
+
const limit = this.limit;
|
|
126
|
+
const offset = this.objects.length;
|
|
127
|
+
return this._searchRequest(this.query, limit, offset).then(async (res) => {
|
|
128
|
+
this.result.value = {
|
|
129
|
+
isLoading: false,
|
|
130
|
+
objects: this.objects.concat(res)
|
|
131
|
+
}
|
|
132
|
+
return true;
|
|
133
|
+
}).catch((err) => {
|
|
134
|
+
this.result.value = {
|
|
135
|
+
error: err,
|
|
136
|
+
isLoading: false,
|
|
137
|
+
objects: this.objects
|
|
138
|
+
}
|
|
139
|
+
throw err;
|
|
140
|
+
})
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
search(noFacets = false) {
|
|
144
|
+
if (this.isRunning) return Promise.resolve(false);
|
|
145
|
+
!noFacets && this.computeFacets(this.query);
|
|
146
|
+
return this._search(false);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
loadMore(noFacets = false) {
|
|
150
|
+
if (this.isRunning) return Promise.resolve(false);
|
|
151
|
+
if (this.objects.length === 0) {
|
|
152
|
+
!noFacets && this.computeFacets(this.query);
|
|
153
|
+
}
|
|
154
|
+
return this._search(true);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
const DocumentSearchContext = createContext<DocumentSearch | undefined>(undefined);
|
|
159
|
+
|
|
160
|
+
export function useDocumentSearch() {
|
|
161
|
+
return useContext(DocumentSearchContext)!;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export function useWatchDocumentSearchFacets() {
|
|
165
|
+
return useWatchSharedState(useDocumentSearch().facets);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export function useWatchDocumentSearchResult() {
|
|
169
|
+
const search = useDocumentSearch();
|
|
170
|
+
const result = useWatchSharedState(search.result);
|
|
171
|
+
return { ...result, search };
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export function useDocumentSearchCount() {
|
|
175
|
+
const search = useDocumentSearch();
|
|
176
|
+
const result = useWatchSharedState(search.facets);
|
|
177
|
+
return result.total;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
export { DocumentSearchContext as SearchContext };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { useUserSession } from "@vertesia/ui/session";
|
|
2
|
+
import { FacetSpec, SupportedEmbeddingTypes } from "@vertesia/common";
|
|
3
|
+
import React, { useMemo } from "react";
|
|
4
|
+
import { DocumentSearch, SearchContext } from "./DocumentSearchContext";
|
|
5
|
+
|
|
6
|
+
interface DocumentSearchProviderProps {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
limit?: number;
|
|
9
|
+
typeId?: string;
|
|
10
|
+
parent?: string;
|
|
11
|
+
facets?: FacetSpec[];
|
|
12
|
+
similarTo?: string; //vector search similarity
|
|
13
|
+
embeddingType?: SupportedEmbeddingTypes; //vector search similarity
|
|
14
|
+
collectionId?: string;
|
|
15
|
+
name?: string;
|
|
16
|
+
}
|
|
17
|
+
export function DocumentSearchProvider({ children, limit, parent, typeId, facets, similarTo, embeddingType, name, collectionId }: DocumentSearchProviderProps) {
|
|
18
|
+
const { store } = useUserSession();
|
|
19
|
+
const search = useMemo(() => {
|
|
20
|
+
let facetSpecs: FacetSpec[];
|
|
21
|
+
if (facets) {
|
|
22
|
+
facetSpecs = facets;
|
|
23
|
+
} else {
|
|
24
|
+
facetSpecs = [
|
|
25
|
+
{
|
|
26
|
+
name: 'status',
|
|
27
|
+
field: 'status'
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: 'location',
|
|
31
|
+
field: 'location'
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
if (!typeId) {
|
|
35
|
+
facetSpecs.unshift({
|
|
36
|
+
name: 'type',
|
|
37
|
+
field: 'type'
|
|
38
|
+
})
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
const search = new DocumentSearch(store, limit).withFacets(facetSpecs);
|
|
42
|
+
search.collectionId = collectionId;
|
|
43
|
+
search.query.type = typeId;
|
|
44
|
+
search.query.parent = parent;
|
|
45
|
+
search.query.similarTo = similarTo;
|
|
46
|
+
search.query.embeddingType = embeddingType;
|
|
47
|
+
search.query.name = name;
|
|
48
|
+
return search;
|
|
49
|
+
}, [typeId, limit]);
|
|
50
|
+
|
|
51
|
+
return (
|
|
52
|
+
<SearchContext.Provider value={search}>{children}</SearchContext.Provider>
|
|
53
|
+
)
|
|
54
|
+
}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import { createContext, ReactNode, useContext, useEffect, useMemo } from 'react';
|
|
2
|
+
|
|
3
|
+
import { ErrorBox, useFetch, useToast } from '@vertesia/ui/core';
|
|
4
|
+
import { useUserSession } from '@vertesia/ui/session';
|
|
5
|
+
|
|
6
|
+
import { useDocumentSearch, useDocumentSelection } from '../../../store';
|
|
7
|
+
import { AddToCollectionAction } from './actions/AddToCollectionAction';
|
|
8
|
+
import { ChangeTypeAction } from './actions/ChangeTypeAction';
|
|
9
|
+
import { DeleteObjectsAction } from './actions/DeleteObjectsAction';
|
|
10
|
+
import { ExportPropertiesAction } from './actions/ExportPropertiesAction';
|
|
11
|
+
import { RemoveFromCollectionAction } from './actions/RemoveFromCollectionAction';
|
|
12
|
+
import { StartWorkflowAction, StartWorkflowComponent } from './actions/StartWorkflowComponent';
|
|
13
|
+
import { ObjectsActionParams, ObjectsActionSpec } from './ObjectsActionSpec';
|
|
14
|
+
|
|
15
|
+
export type ObjectsActionCallback = (params: ObjectsActionParams) => Promise<unknown>;
|
|
16
|
+
|
|
17
|
+
export class ObjectsActionContext {
|
|
18
|
+
allActions: ObjectsActionSpec[] = [
|
|
19
|
+
ExportPropertiesAction,
|
|
20
|
+
ChangeTypeAction,
|
|
21
|
+
StartWorkflowAction,
|
|
22
|
+
AddToCollectionAction,
|
|
23
|
+
DeleteObjectsAction,
|
|
24
|
+
RemoveFromCollectionAction,
|
|
25
|
+
];
|
|
26
|
+
wfRules: ObjectsActionSpec[] = [];
|
|
27
|
+
callbacks: Record<string, ObjectsActionCallback> = {};
|
|
28
|
+
startWorkflow?: ObjectsActionCallback;
|
|
29
|
+
|
|
30
|
+
constructor(public params: Omit<ObjectsActionParams, 'action'>) { }
|
|
31
|
+
|
|
32
|
+
get actions(): ObjectsActionSpec[] {
|
|
33
|
+
const isInCollection = !!this.params.selection?.collectionId;
|
|
34
|
+
|
|
35
|
+
if (isInCollection) {
|
|
36
|
+
return this.allActions.filter(action =>
|
|
37
|
+
action.id !== 'addToCollection' && action.id !== 'delete'
|
|
38
|
+
);
|
|
39
|
+
} else {
|
|
40
|
+
return this.allActions.filter(action =>
|
|
41
|
+
action.id !== 'removeFromCollection'
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
async loadWorkflows() {
|
|
47
|
+
this.params.client.workflows.rules.list().then((rules) => {
|
|
48
|
+
this.wfRules = rules.map(rule => (
|
|
49
|
+
{
|
|
50
|
+
id: rule.id,
|
|
51
|
+
name: rule.name,
|
|
52
|
+
description: rule.description,
|
|
53
|
+
confirm: false,
|
|
54
|
+
isWorkflow: true,
|
|
55
|
+
component: StartWorkflowComponent
|
|
56
|
+
}
|
|
57
|
+
)).sort((a, b) => a.name.localeCompare(b.name));
|
|
58
|
+
});
|
|
59
|
+
return this.wfRules;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
registerCallback(name: string, cb: (params: ObjectsActionParams) => Promise<unknown>) {
|
|
63
|
+
this.callbacks[name] = cb;
|
|
64
|
+
return () => {
|
|
65
|
+
delete this.callbacks[name];
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
unregisterCallback(name: string) {
|
|
70
|
+
delete this.callbacks[name];
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
findAction(actionId: string) {
|
|
74
|
+
let action = this.allActions.find(a => a.id === actionId);
|
|
75
|
+
if (!action) {
|
|
76
|
+
action = this.wfRules.find(a => a.id === actionId);
|
|
77
|
+
}
|
|
78
|
+
return action;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
async run(actionId: string): Promise<unknown> {
|
|
82
|
+
const action = this.findAction(actionId);
|
|
83
|
+
if (!action) {
|
|
84
|
+
throw new Error(`Action ${actionId} not found`);
|
|
85
|
+
}
|
|
86
|
+
const params = { ...this.params, action };
|
|
87
|
+
// if (action.isWorkflow) {
|
|
88
|
+
// if (!this.startWorkflow) {
|
|
89
|
+
// throw new Error("No startWorkflow callback set");
|
|
90
|
+
// }
|
|
91
|
+
// return this.startWorkflow(params);
|
|
92
|
+
// } else {
|
|
93
|
+
const cb = this.callbacks[actionId];
|
|
94
|
+
if (cb) {
|
|
95
|
+
return cb(params);
|
|
96
|
+
} else {
|
|
97
|
+
throw new Error("No action callback set");
|
|
98
|
+
}
|
|
99
|
+
// }
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const ObjectsActionContextReact = createContext<ObjectsActionContext>(undefined as any);
|
|
104
|
+
|
|
105
|
+
interface ObjectsActionContextProps {
|
|
106
|
+
children: ReactNode;
|
|
107
|
+
}
|
|
108
|
+
export function ObjectsActionContextProvider({ children }: ObjectsActionContextProps) {
|
|
109
|
+
const selection = useDocumentSelection();
|
|
110
|
+
const toast = useToast();
|
|
111
|
+
const { client } = useUserSession();
|
|
112
|
+
const search = useDocumentSearch();
|
|
113
|
+
|
|
114
|
+
const { data: rules, error } = useFetch<ObjectsActionSpec[]>(() => {
|
|
115
|
+
return client.workflows.rules.list().then((rules) => {
|
|
116
|
+
return rules.map(rule => (
|
|
117
|
+
{
|
|
118
|
+
id: rule.id,
|
|
119
|
+
name: rule.name,
|
|
120
|
+
description: rule.description,
|
|
121
|
+
confirm: false,
|
|
122
|
+
isWorkflow: true,
|
|
123
|
+
component: StartWorkflowComponent
|
|
124
|
+
}
|
|
125
|
+
)).sort((a, b) => a.name.localeCompare(b.name));
|
|
126
|
+
});
|
|
127
|
+
}, []);
|
|
128
|
+
|
|
129
|
+
const context = useMemo(() => {
|
|
130
|
+
const context = new ObjectsActionContext({
|
|
131
|
+
selection, toast, client, search
|
|
132
|
+
});
|
|
133
|
+
context.wfRules = rules!;
|
|
134
|
+
return context;
|
|
135
|
+
}, [selection, rules]);
|
|
136
|
+
|
|
137
|
+
if (error) {
|
|
138
|
+
return <ErrorBox title="Failed to fetch workflows">{error.message}</ErrorBox>
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
return (
|
|
142
|
+
context && (
|
|
143
|
+
<ObjectsActionContextReact.Provider value={context}>
|
|
144
|
+
<Actions />
|
|
145
|
+
{children}
|
|
146
|
+
</ObjectsActionContextReact.Provider>
|
|
147
|
+
)
|
|
148
|
+
)
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
interface ActionsProps {
|
|
152
|
+
}
|
|
153
|
+
function Actions({ }: ActionsProps) {
|
|
154
|
+
const context = useObjectsActionContext();
|
|
155
|
+
|
|
156
|
+
const selection = context.params.selection;
|
|
157
|
+
const objectId = selection.getObjectId();
|
|
158
|
+
const objectIds = selection.isSingleSelection() && objectId ? [objectId] : selection.getObjectIds();
|
|
159
|
+
|
|
160
|
+
return (
|
|
161
|
+
<div style={{ display: 'none' }}>
|
|
162
|
+
{
|
|
163
|
+
context.allActions.map(action => (
|
|
164
|
+
<action.component key={action.id} action={action} objectIds={objectIds} collectionId={selection.collectionId} />
|
|
165
|
+
))
|
|
166
|
+
}
|
|
167
|
+
</div>
|
|
168
|
+
)
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export function useObjectsActionContext() {
|
|
172
|
+
const ctx = useContext(ObjectsActionContextReact);
|
|
173
|
+
if (!ctx) {
|
|
174
|
+
throw new Error("You cannot use useActionContext outside an ActionProvider");
|
|
175
|
+
}
|
|
176
|
+
return ctx;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export function useObjectsActionCallback(name: string, cb: ObjectsActionCallback) {
|
|
180
|
+
const ctx = useObjectsActionContext();
|
|
181
|
+
useEffect(() => {
|
|
182
|
+
return ctx.registerCallback(name, cb);
|
|
183
|
+
}, [ctx, name, cb]);
|
|
184
|
+
return ctx;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export function useStartWorkflowCallback(cb: ObjectsActionCallback) {
|
|
188
|
+
const ctx = useObjectsActionContext();
|
|
189
|
+
useEffect(() => {
|
|
190
|
+
ctx.startWorkflow = cb;
|
|
191
|
+
return () => {
|
|
192
|
+
ctx.startWorkflow = undefined;
|
|
193
|
+
}
|
|
194
|
+
}, [cb, ctx]);
|
|
195
|
+
return ctx;
|
|
196
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { VertesiaClient } from "@vertesia/client";
|
|
2
|
+
import { ToastFn } from "@vertesia/ui/core";
|
|
3
|
+
import { DocumentSearch, DocumentSelection } from "../../../store";
|
|
4
|
+
|
|
5
|
+
export interface ObjectsActionSpec {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
confirm?: boolean;
|
|
10
|
+
confirmationText?: string;
|
|
11
|
+
component: ActionComponentType;
|
|
12
|
+
hideInList?: boolean;
|
|
13
|
+
destructive?: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface ObjectsActionParams {
|
|
17
|
+
action: ObjectsActionSpec,
|
|
18
|
+
client: VertesiaClient,
|
|
19
|
+
selection: DocumentSelection,
|
|
20
|
+
toast: ToastFn,
|
|
21
|
+
search: DocumentSearch,
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface ActionComponentTypeProps {
|
|
25
|
+
action: ObjectsActionSpec,
|
|
26
|
+
objectIds: string[],
|
|
27
|
+
children?: React.ReactNode,
|
|
28
|
+
// the collection id if the action is being performed on a collection
|
|
29
|
+
collectionId?: string,
|
|
30
|
+
}
|
|
31
|
+
export type ActionComponentType = React.ComponentType<ActionComponentTypeProps>;
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { Button, Popover, PopoverContent, PopoverTrigger, SelectList } from '@vertesia/ui/core';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { EllipsisVertical, X } from 'lucide-react';
|
|
4
|
+
|
|
5
|
+
import { useState } from "react";
|
|
6
|
+
import { DocumentSelection, DocumentUploadModal, useDocumentSelection } from "../../../store";
|
|
7
|
+
import { ExportPropertiesAction } from "./actions/ExportPropertiesAction";
|
|
8
|
+
import { StartWorkflowAction } from "./actions/StartWorkflowComponent";
|
|
9
|
+
import { ObjectsActionContextProvider, useObjectsActionContext } from "./ObjectsActionContext";
|
|
10
|
+
import { ObjectsActionSpec } from "./ObjectsActionSpec";
|
|
11
|
+
|
|
12
|
+
export function SelectionActions() {
|
|
13
|
+
const selection = useDocumentSelection();
|
|
14
|
+
const size = selection.size();
|
|
15
|
+
const plural = size > 1 ? "s" : "";
|
|
16
|
+
|
|
17
|
+
const hasSelection = selection?.hasSelection();
|
|
18
|
+
const hasSingleSelection = selection?.isSingleSelection();
|
|
19
|
+
|
|
20
|
+
const onClearSelection = () => {
|
|
21
|
+
selection?.removeAll();
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<ObjectsActionContextProvider>
|
|
26
|
+
<div className="flex items-center gap-x-2">
|
|
27
|
+
{hasSelection && !hasSingleSelection &&
|
|
28
|
+
<div className="flex items-center gap-x-1 shrink-0">
|
|
29
|
+
<div className='text-sm nowrap'>{size} document{plural} selected</div>
|
|
30
|
+
<Button title="Clear selection" variant={"ghost"}
|
|
31
|
+
className=" rounded-md p-2"
|
|
32
|
+
onClick={onClearSelection}>
|
|
33
|
+
<X className="size-4" />
|
|
34
|
+
</Button>
|
|
35
|
+
</div>
|
|
36
|
+
}
|
|
37
|
+
<SelectionActionsPopover selection={selection}>
|
|
38
|
+
<Button variant="ghost" alt="More action" size="sm">
|
|
39
|
+
<EllipsisVertical size={16} />
|
|
40
|
+
</Button>
|
|
41
|
+
</SelectionActionsPopover>
|
|
42
|
+
{/* StartWorkflowButton must be inside the context */}
|
|
43
|
+
{hasSelection && <ActionsWrapper selection={selection} />}
|
|
44
|
+
</div>
|
|
45
|
+
</ObjectsActionContextProvider>
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Wrapper component that accesses the context
|
|
50
|
+
interface ActionsWrapperProps {
|
|
51
|
+
selection: DocumentSelection;
|
|
52
|
+
}
|
|
53
|
+
function ActionsWrapper({ }: ActionsWrapperProps) {
|
|
54
|
+
return <StartWorkflowButton />;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function UploadObjectsButton({ collectionId }: { collectionId?: string }) {
|
|
58
|
+
const [files, setFiles] = useState<File[]>([]);
|
|
59
|
+
const selection = useDocumentSelection();
|
|
60
|
+
|
|
61
|
+
const hasSelection = selection?.hasSelection();
|
|
62
|
+
|
|
63
|
+
const selectFile = () => {
|
|
64
|
+
const fileInput = document.createElement("input");
|
|
65
|
+
fileInput.type = "file";
|
|
66
|
+
fileInput?.click();
|
|
67
|
+
fileInput.onchange = (event) => {
|
|
68
|
+
const files = (event.target as HTMLInputElement).files;
|
|
69
|
+
if (files) {
|
|
70
|
+
setFiles(Array.from(files));
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
return (
|
|
76
|
+
!hasSelection &&
|
|
77
|
+
<>
|
|
78
|
+
<Button onClick={() => selectFile()}>Upload</Button>
|
|
79
|
+
<DocumentUploadModal
|
|
80
|
+
collectionId={collectionId ?? ''}
|
|
81
|
+
isOpen={files.length > 0}
|
|
82
|
+
onClose={() => setFiles([])}
|
|
83
|
+
files={files}
|
|
84
|
+
title="Upload Files"
|
|
85
|
+
onUploadComplete={(result) => {
|
|
86
|
+
if (result && result.success) {
|
|
87
|
+
setFiles([]);
|
|
88
|
+
}
|
|
89
|
+
}}
|
|
90
|
+
>
|
|
91
|
+
<div className="text-sm">
|
|
92
|
+
Select the associated Content Type, or let the system choose or generate the type based on the
|
|
93
|
+
content.
|
|
94
|
+
</div>
|
|
95
|
+
</DocumentUploadModal>
|
|
96
|
+
</>
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function StartWorkflowButton() {
|
|
101
|
+
const ctx = useObjectsActionContext();
|
|
102
|
+
|
|
103
|
+
const selection = ctx.params.selection;
|
|
104
|
+
const hasSelection = selection.hasSelection();
|
|
105
|
+
|
|
106
|
+
return (
|
|
107
|
+
hasSelection &&
|
|
108
|
+
<Button onClick={() => ctx.run(StartWorkflowAction.id)}>Start Workflow</Button>
|
|
109
|
+
)
|
|
110
|
+
}
|
|
111
|
+
function optionLayout(option: ObjectsActionSpec) {
|
|
112
|
+
return {
|
|
113
|
+
label: option.name,
|
|
114
|
+
className: clsx('flex-1 px-2 py-2 hover:bg-accent nowrap', option.destructive ? 'text-destructive' : ''),
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
interface SelectionActionsPopoverProps {
|
|
119
|
+
children: React.ReactNode;
|
|
120
|
+
selection: DocumentSelection;
|
|
121
|
+
}
|
|
122
|
+
function SelectionActionsPopover({ selection, children }: SelectionActionsPopoverProps) {
|
|
123
|
+
const context = useObjectsActionContext();
|
|
124
|
+
const executeAction = (action: ObjectsActionSpec) => {
|
|
125
|
+
context.run(action.id);
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
return (
|
|
129
|
+
<Popover hover>
|
|
130
|
+
<PopoverTrigger>
|
|
131
|
+
{children}
|
|
132
|
+
</PopoverTrigger >
|
|
133
|
+
<PopoverContent className='p-0 w-50' align='end' sideOffset={6}>
|
|
134
|
+
<PopoverBody executeAction={executeAction} selection={selection} />
|
|
135
|
+
</PopoverContent>
|
|
136
|
+
</Popover >
|
|
137
|
+
)
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
interface PopoverBodyProps {
|
|
141
|
+
executeAction: (action: ObjectsActionSpec) => void;
|
|
142
|
+
selection: DocumentSelection;
|
|
143
|
+
}
|
|
144
|
+
function PopoverBody({ executeAction, selection }: PopoverBodyProps) {
|
|
145
|
+
const context = useObjectsActionContext();
|
|
146
|
+
|
|
147
|
+
const _executeAction = (action: ObjectsActionSpec) => {
|
|
148
|
+
executeAction(action);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
const _selection = selection?.hasSelection() ? context.actions.filter(action => !action.hideInList) : [ExportPropertiesAction];
|
|
152
|
+
|
|
153
|
+
return (
|
|
154
|
+
<div className="rounded-md shadow-md py-2">
|
|
155
|
+
<div className="px-1 text-sm">
|
|
156
|
+
<SelectList options={_selection} optionLayout={optionLayout} onChange={_executeAction} noCheck />
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
);
|
|
160
|
+
}
|