@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,99 @@
|
|
|
1
|
+
import { ContentObjectItem } from "@vertesia/common";
|
|
2
|
+
import { createContext, useContext, useEffect, useState } from "react";
|
|
3
|
+
|
|
4
|
+
export class DocumentSelection {
|
|
5
|
+
/**
|
|
6
|
+
* The collection id to which the selected objects belong to.
|
|
7
|
+
*/
|
|
8
|
+
collectionId?: string | undefined;
|
|
9
|
+
|
|
10
|
+
singleSelection = false;
|
|
11
|
+
|
|
12
|
+
constructor(public object: ContentObjectItem | undefined, collectionId: string | undefined, public objects: Record<string, ContentObjectItem>, private setState: (selection: DocumentSelection) => void) {
|
|
13
|
+
this.singleSelection = Object.keys(this.objects).length === 0;
|
|
14
|
+
this.collectionId = collectionId;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
isSingleSelection() {
|
|
18
|
+
return this.singleSelection;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
hasSelection() {
|
|
22
|
+
return this.object !== undefined || this.size() !== 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
size() {
|
|
26
|
+
return Object.keys(this.objects).length;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
getObjectIds() {
|
|
30
|
+
return Object.keys(this.objects);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
getObjectId() {
|
|
34
|
+
return this.object?.id;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
clone() {
|
|
38
|
+
return new DocumentSelection(this.object, this.collectionId, this.objects, this.setState);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
add(object: ContentObjectItem) {
|
|
42
|
+
this.objects[object.id] = object;
|
|
43
|
+
this.singleSelection = Object.keys(this.objects).length === 0;
|
|
44
|
+
this.setState(this.clone());
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
remove(objectId: string) {
|
|
48
|
+
delete this.objects[objectId];
|
|
49
|
+
this.singleSelection = Object.keys(this.objects).length === 0;
|
|
50
|
+
this.setState(this.clone());
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
addAll(objects: ContentObjectItem[]) {
|
|
54
|
+
for (const obj of objects) {
|
|
55
|
+
this.objects[obj.id] = obj;
|
|
56
|
+
}
|
|
57
|
+
this.setState(this.clone());
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
isSelected(objectId: string) {
|
|
61
|
+
return this.objects[objectId] !== undefined;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
removeAll() {
|
|
65
|
+
this.objects = {};
|
|
66
|
+
this.singleSelection = true;
|
|
67
|
+
this.setState(this.clone());
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const DocumentSelectionContext = createContext<DocumentSelection>(undefined as any);
|
|
72
|
+
|
|
73
|
+
export function useDocumentSelection() {
|
|
74
|
+
const selection = useContext(DocumentSelectionContext);
|
|
75
|
+
if (!selection) {
|
|
76
|
+
throw new Error("useObjectSelection must be used within a ObjectSelectionProvider");
|
|
77
|
+
}
|
|
78
|
+
return selection;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function useOptionalDocumentSelection() {
|
|
82
|
+
return useContext(DocumentSelectionContext);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
interface DocumentSelectionProviderProps {
|
|
86
|
+
children: React.ReactNode;
|
|
87
|
+
collectionId?: string;
|
|
88
|
+
value?: ContentObjectItem; // initial selection if any (for single selection purpose)
|
|
89
|
+
}
|
|
90
|
+
export function DocumentSelectionProvider({ value, collectionId, children }: DocumentSelectionProviderProps) {
|
|
91
|
+
const [selection, setSelection] = useState<DocumentSelection>();
|
|
92
|
+
useEffect(() => {
|
|
93
|
+
const selection = new DocumentSelection(value, collectionId, {}, setSelection);
|
|
94
|
+
setSelection(selection);
|
|
95
|
+
}, [value]);
|
|
96
|
+
return selection && (
|
|
97
|
+
<DocumentSelectionContext.Provider value={selection}>{children}</DocumentSelectionContext.Provider>
|
|
98
|
+
)
|
|
99
|
+
}
|
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
import { ContentObjectItem } from "@vertesia/common";
|
|
2
|
+
import { Spinner, useToast } from "@vertesia/ui/core";
|
|
3
|
+
import { DropZone } from '@vertesia/ui/widgets';
|
|
4
|
+
import clsx from "clsx";
|
|
5
|
+
import { ChangeEvent, useMemo, useState } from "react";
|
|
6
|
+
import { DocumentSelection, useOptionalDocumentSelection } from "./DocumentSelectionProvider";
|
|
7
|
+
import { ExtendedColumnLayout, DocumentTableColumn } from "./layout/DocumentTableColumn";
|
|
8
|
+
import { DocumentGridView, DocumentTableView } from "./layout/documentLayout";
|
|
9
|
+
import { useDocumentSearch } from "./search/DocumentSearchContext";
|
|
10
|
+
import { FileWithMetadata, DocumentUploadModal, useSmartFileUploadProcessing } from "./upload";
|
|
11
|
+
|
|
12
|
+
const defaultLayout: ExtendedColumnLayout[] = [
|
|
13
|
+
{ name: "ID", field: "id", type: "string?slice=-7" },
|
|
14
|
+
{ name: "Name", field: ".", type: "objectLink" },
|
|
15
|
+
{ name: "Type", field: "type.name", type: "string" },
|
|
16
|
+
{ name: "Status", field: "status", type: "string" },
|
|
17
|
+
{ name: "Updated At", field: "updated_at", type: "date" },
|
|
18
|
+
];
|
|
19
|
+
|
|
20
|
+
interface DocumentTableProps extends DocumentTableImplProps {
|
|
21
|
+
isGridView?: boolean;
|
|
22
|
+
onUpload?: (files: File[], type: string | null, collectionId?: string) => Promise<unknown>; // if defined, accept drag drop to upload
|
|
23
|
+
collectionId?: string; // Important: Add collection ID to ensure uploads go to the right collection
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function DocumentTable({ isGridView = false, onUpload, collectionId, ...others }: DocumentTableProps) {
|
|
27
|
+
if (onUpload) {
|
|
28
|
+
return (
|
|
29
|
+
<ObjectTableWithDropZone
|
|
30
|
+
{...others}
|
|
31
|
+
onUpload={onUpload}
|
|
32
|
+
isGridView={isGridView}
|
|
33
|
+
collectionId={collectionId}
|
|
34
|
+
/>
|
|
35
|
+
);
|
|
36
|
+
} else {
|
|
37
|
+
return <DocumentTableImpl {...others} isGridView={isGridView} />;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
interface ObjectTableWithDropZoneProps extends DocumentTableProps {
|
|
42
|
+
isGridView?: boolean;
|
|
43
|
+
onUpload: (files: File[], type: string | null, collectionId?: string) => Promise<unknown>;
|
|
44
|
+
collectionId?: string;
|
|
45
|
+
skipTypeModal?: boolean;
|
|
46
|
+
}
|
|
47
|
+
function ObjectTableWithDropZone({
|
|
48
|
+
isGridView,
|
|
49
|
+
onUpload,
|
|
50
|
+
collectionId,
|
|
51
|
+
skipTypeModal = false,
|
|
52
|
+
...others
|
|
53
|
+
}: ObjectTableWithDropZoneProps) {
|
|
54
|
+
const [isLoading, setLoading] = useState(false);
|
|
55
|
+
const [files, setFiles] = useState<File[]>([]);
|
|
56
|
+
const [isDragging, setIsDragging] = useState(false);
|
|
57
|
+
const [processedFiles, setProcessedFiles] = useState<FileWithMetadata[] | null>(null);
|
|
58
|
+
const [typeSelectionOpen, setTypeSelectionOpen] = useState(false);
|
|
59
|
+
const search = useDocumentSearch();
|
|
60
|
+
const toast = useToast();
|
|
61
|
+
const { checkDocumentProcessing } = useSmartFileUploadProcessing();
|
|
62
|
+
|
|
63
|
+
// Handle file uploads when a file is dropped
|
|
64
|
+
const handleFileDrop = async (droppedFiles: File[], feedback?: { count: number; message: string }) => {
|
|
65
|
+
console.log("Files dropped on ObjectTable:", droppedFiles.length, feedback);
|
|
66
|
+
setLoading(true);
|
|
67
|
+
|
|
68
|
+
try {
|
|
69
|
+
// Always process files with the smart upload processing if we have a collection ID
|
|
70
|
+
if (collectionId) {
|
|
71
|
+
// Process files to check for duplicates, updates, etc.
|
|
72
|
+
const processed = await checkDocumentProcessing(droppedFiles, null, collectionId);
|
|
73
|
+
setProcessedFiles(processed);
|
|
74
|
+
|
|
75
|
+
// Create a user-friendly summary message
|
|
76
|
+
const toCreate = processed.filter((f) => f.action === "create").length;
|
|
77
|
+
const toUpdate = processed.filter((f) => f.action === "update").length;
|
|
78
|
+
const toSkip = processed.filter((f) => f.action === "skip").length;
|
|
79
|
+
|
|
80
|
+
toast({
|
|
81
|
+
title: "Files ready to process",
|
|
82
|
+
description: `${droppedFiles.length} file(s): ${toCreate} new, ${toUpdate} to update, ${toSkip} to skip`,
|
|
83
|
+
status: "info",
|
|
84
|
+
duration: 4000,
|
|
85
|
+
});
|
|
86
|
+
} else {
|
|
87
|
+
// If no collection ID, we can't check for duplicates
|
|
88
|
+
setProcessedFiles(null);
|
|
89
|
+
}
|
|
90
|
+
} catch (error) {
|
|
91
|
+
console.error("Error processing files:", error);
|
|
92
|
+
toast({
|
|
93
|
+
title: "Error processing files",
|
|
94
|
+
description: "There was an error checking for duplicate files",
|
|
95
|
+
status: "error",
|
|
96
|
+
duration: 4000,
|
|
97
|
+
});
|
|
98
|
+
// Continue with plain upload in case of error
|
|
99
|
+
setProcessedFiles(null);
|
|
100
|
+
} finally {
|
|
101
|
+
setLoading(false);
|
|
102
|
+
setFiles(droppedFiles);
|
|
103
|
+
setIsDragging(false);
|
|
104
|
+
|
|
105
|
+
if (skipTypeModal) {
|
|
106
|
+
// If skipTypeModal is true, we skip our internal modal and call onUpload directly
|
|
107
|
+
console.log("Skipping type modal and calling onUpload directly", {
|
|
108
|
+
filesLength: droppedFiles.length,
|
|
109
|
+
processedFilesLength: processedFiles?.length,
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
// Pass processed files as a custom property and collectionId as the third parameter
|
|
113
|
+
const uploadPromise = onUpload(droppedFiles, null, collectionId);
|
|
114
|
+
|
|
115
|
+
// Attach the processed files to the promise for parent components to use
|
|
116
|
+
if (uploadPromise && typeof uploadPromise === "object") {
|
|
117
|
+
(uploadPromise as any).processedFiles = processedFiles;
|
|
118
|
+
}
|
|
119
|
+
} else {
|
|
120
|
+
// Otherwise, open our type selection modal
|
|
121
|
+
console.log("Setting typeSelectionOpen to true", { filesLength: droppedFiles.length });
|
|
122
|
+
setTypeSelectionOpen(true);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
// Handle the type selection and start the upload
|
|
128
|
+
const onDoUpload = (typeId?: string | null | undefined) => {
|
|
129
|
+
const filesToUpload = [...files]; // Make a copy to be safe
|
|
130
|
+
|
|
131
|
+
// Reset state variables
|
|
132
|
+
setFiles([]);
|
|
133
|
+
setProcessedFiles(null);
|
|
134
|
+
setTypeSelectionOpen(false);
|
|
135
|
+
|
|
136
|
+
// If typeid is undefined we cancel the upload
|
|
137
|
+
if (filesToUpload.length > 0 && typeId !== undefined) {
|
|
138
|
+
setLoading(true);
|
|
139
|
+
|
|
140
|
+
console.log("Starting upload with", {
|
|
141
|
+
typeId,
|
|
142
|
+
filesCount: filesToUpload.length,
|
|
143
|
+
hasProcessingResults: !!processedFiles,
|
|
144
|
+
collectionId,
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
onUpload(filesToUpload, typeId, collectionId).finally(() => {
|
|
148
|
+
setLoading(false);
|
|
149
|
+
search.search(); // Refresh the search results after upload
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
// Handle drag events to show the drop zone
|
|
155
|
+
const handleDragOver = (e: React.DragEvent) => {
|
|
156
|
+
e.preventDefault();
|
|
157
|
+
e.stopPropagation();
|
|
158
|
+
setIsDragging(true);
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
const handleDragLeave = (e: React.DragEvent) => {
|
|
162
|
+
e.preventDefault();
|
|
163
|
+
e.stopPropagation();
|
|
164
|
+
// Only set dragging to false if leaving the container (not entering a child)
|
|
165
|
+
if (e.currentTarget.contains(e.relatedTarget as Node)) {
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
setIsDragging(false);
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
return (
|
|
172
|
+
<div
|
|
173
|
+
className="min-h-[400px] relative"
|
|
174
|
+
onDragOver={handleDragOver}
|
|
175
|
+
onDragEnter={handleDragOver}
|
|
176
|
+
onDragLeave={handleDragLeave}
|
|
177
|
+
onDrop={(e) => {
|
|
178
|
+
e.preventDefault();
|
|
179
|
+
e.stopPropagation();
|
|
180
|
+
setIsDragging(false);
|
|
181
|
+
|
|
182
|
+
// Get the files from the drop event
|
|
183
|
+
if (e.dataTransfer.items) {
|
|
184
|
+
const files: File[] = [];
|
|
185
|
+
for (let i = 0; i < e.dataTransfer.items.length; i++) {
|
|
186
|
+
const item = e.dataTransfer.items[i];
|
|
187
|
+
if (item.kind === "file") {
|
|
188
|
+
const file = item.getAsFile();
|
|
189
|
+
if (file) files.push(file);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
if (files.length > 0) {
|
|
194
|
+
const feedback = {
|
|
195
|
+
count: files.length,
|
|
196
|
+
message: `Preparing to upload ${files.length} file${files.length === 1 ? "" : "s"}...`,
|
|
197
|
+
};
|
|
198
|
+
handleFileDrop(files, feedback);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}}
|
|
202
|
+
>
|
|
203
|
+
{/* Loading overlay */}
|
|
204
|
+
<div
|
|
205
|
+
className={clsx(
|
|
206
|
+
"bg-white dark:bg-gray-800 opacity-40 absolute inset-0 z-50 flex justify-center items-center",
|
|
207
|
+
isLoading ? "block" : "hidden",
|
|
208
|
+
)}
|
|
209
|
+
>
|
|
210
|
+
<Spinner size="xl" />
|
|
211
|
+
</div>
|
|
212
|
+
|
|
213
|
+
{/* The actual table */}
|
|
214
|
+
<DocumentTableImpl {...others} isGridView={isGridView} />
|
|
215
|
+
|
|
216
|
+
{/* Overlay the table with a drop zone */}
|
|
217
|
+
<div className={clsx("absolute inset-0 pointer-events-none", isDragging ? "z-40" : "-z-10")}>
|
|
218
|
+
<div className="w-full h-full relative">
|
|
219
|
+
<DropZone
|
|
220
|
+
onDrop={handleFileDrop}
|
|
221
|
+
message="Drop files or folders here to upload"
|
|
222
|
+
className={clsx(
|
|
223
|
+
"absolute inset-0 bg-white/90 dark:bg-gray-800/90 pointer-events-auto",
|
|
224
|
+
isDragging ? "flex" : "hidden",
|
|
225
|
+
)}
|
|
226
|
+
buttonLabel="Select Files or Folders"
|
|
227
|
+
allowFolders={true}
|
|
228
|
+
/>
|
|
229
|
+
</div>
|
|
230
|
+
</div>
|
|
231
|
+
|
|
232
|
+
{/* New unified UploadModal */}
|
|
233
|
+
<DocumentUploadModal
|
|
234
|
+
isOpen={typeSelectionOpen && files.length > 0}
|
|
235
|
+
onClose={() => {
|
|
236
|
+
// Reset state variables and close the modal
|
|
237
|
+
setFiles([]);
|
|
238
|
+
setProcessedFiles(null);
|
|
239
|
+
setTypeSelectionOpen(false);
|
|
240
|
+
onDoUpload(undefined);
|
|
241
|
+
}}
|
|
242
|
+
files={files}
|
|
243
|
+
collectionId={collectionId}
|
|
244
|
+
selectedFolder={null}
|
|
245
|
+
title="Upload Files"
|
|
246
|
+
onUploadComplete={(result) => {
|
|
247
|
+
// Handle upload completion
|
|
248
|
+
if (result) {
|
|
249
|
+
// If there are failures, show them
|
|
250
|
+
if (result.failedFiles && result.failedFiles.length > 0) {
|
|
251
|
+
toast({
|
|
252
|
+
title: "Upload Issues",
|
|
253
|
+
description: `${result.failedFiles.length} file(s) failed to upload`,
|
|
254
|
+
status: "warning",
|
|
255
|
+
duration: 5000,
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
// On success, summarize the results
|
|
260
|
+
if (result.success) {
|
|
261
|
+
const created = result.uploadedFiles.filter((f) => f.status === "created").length;
|
|
262
|
+
const updated = result.uploadedFiles.filter((f) => f.status === "updated").length;
|
|
263
|
+
const skipped = result.skippedFiles.length;
|
|
264
|
+
|
|
265
|
+
if (created > 0 || updated > 0) {
|
|
266
|
+
toast({
|
|
267
|
+
title: "Upload Complete",
|
|
268
|
+
description: `${created > 0 ? `${created} created` : ""}${created > 0 && updated > 0 ? ", " : ""}${updated > 0 ? `${updated} updated` : ""}${skipped > 0 ? `, ${skipped} skipped` : ""}`,
|
|
269
|
+
status: "success",
|
|
270
|
+
duration: 5000,
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
// Force search refresh
|
|
276
|
+
search.search();
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
// Close modal and reset state without passing result
|
|
280
|
+
setFiles([]);
|
|
281
|
+
setProcessedFiles(null);
|
|
282
|
+
setTypeSelectionOpen(false);
|
|
283
|
+
|
|
284
|
+
// Complete the upload process with type ID if successful
|
|
285
|
+
if (result && result.success && result.objectIds.length > 0) {
|
|
286
|
+
// We don't have type information here, so pass null (process completed)
|
|
287
|
+
onDoUpload(null);
|
|
288
|
+
} else {
|
|
289
|
+
// Cancel the upload
|
|
290
|
+
onDoUpload(undefined);
|
|
291
|
+
}
|
|
292
|
+
}}
|
|
293
|
+
/>
|
|
294
|
+
</div>
|
|
295
|
+
);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
interface DocumentTableImplProps {
|
|
299
|
+
objects: ContentObjectItem[];
|
|
300
|
+
isLoading: boolean;
|
|
301
|
+
layout?: ExtendedColumnLayout[];
|
|
302
|
+
onRowClick?: (object: ContentObjectItem) => void;
|
|
303
|
+
onSelectionChange?: (selection: DocumentSelection) => void;
|
|
304
|
+
highlightRow?: (item: ContentObjectItem) => boolean;
|
|
305
|
+
rowActions?: (item: ContentObjectItem) => React.ReactNode[];
|
|
306
|
+
isGridView?: boolean;
|
|
307
|
+
}
|
|
308
|
+
function DocumentTableImpl({
|
|
309
|
+
objects,
|
|
310
|
+
layout = defaultLayout,
|
|
311
|
+
isLoading,
|
|
312
|
+
onRowClick,
|
|
313
|
+
onSelectionChange,
|
|
314
|
+
isGridView,
|
|
315
|
+
}: DocumentTableImplProps) {
|
|
316
|
+
const selection = useOptionalDocumentSelection();
|
|
317
|
+
|
|
318
|
+
const _onSelectionChange = (object: ContentObjectItem, ev: ChangeEvent<HTMLInputElement>) => {
|
|
319
|
+
if (selection) {
|
|
320
|
+
const isShift = (ev.nativeEvent as any).shiftKey;
|
|
321
|
+
const checked = ev.target.checked;
|
|
322
|
+
if (!checked) {
|
|
323
|
+
selection.remove(object.id);
|
|
324
|
+
} else {
|
|
325
|
+
selection.add(object);
|
|
326
|
+
if (isShift) {
|
|
327
|
+
const index = objects.findIndex((obj) => obj.id === object.id);
|
|
328
|
+
const prev = findPreviousSelected(objects, index, selection);
|
|
329
|
+
if (prev > -1 && prev < index - 1) {
|
|
330
|
+
const toSelect: ContentObjectItem[] = [];
|
|
331
|
+
for (let i = prev + 1; i < index; i++) {
|
|
332
|
+
toSelect.push(objects[i]);
|
|
333
|
+
}
|
|
334
|
+
selection.addAll(toSelect);
|
|
335
|
+
} else {
|
|
336
|
+
const next = findNextSelected(objects, index, selection);
|
|
337
|
+
if (next > -1 && next > index + 1) {
|
|
338
|
+
const toSelect: ContentObjectItem[] = [];
|
|
339
|
+
for (let i = index + 1; i < next; i++) {
|
|
340
|
+
toSelect.push(objects[i]);
|
|
341
|
+
}
|
|
342
|
+
selection.addAll(toSelect);
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
onSelectionChange && onSelectionChange(selection);
|
|
348
|
+
}
|
|
349
|
+
};
|
|
350
|
+
|
|
351
|
+
const toggleAll = (ev: ChangeEvent<HTMLInputElement>) => {
|
|
352
|
+
if (selection) {
|
|
353
|
+
const checked = ev.target.checked;
|
|
354
|
+
if (!checked) {
|
|
355
|
+
// remove all
|
|
356
|
+
selection.removeAll();
|
|
357
|
+
} else {
|
|
358
|
+
selection.addAll(objects);
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
};
|
|
362
|
+
|
|
363
|
+
const columns = useMemo(() => {
|
|
364
|
+
// avoid rendering empty layouts
|
|
365
|
+
const actualLayout = layout.length > 0 ? layout : defaultLayout;
|
|
366
|
+
return actualLayout.map((col) => new DocumentTableColumn(col));
|
|
367
|
+
}, [layout]);
|
|
368
|
+
|
|
369
|
+
return isGridView ? (
|
|
370
|
+
<DocumentGridView
|
|
371
|
+
objects={objects}
|
|
372
|
+
isLoading={isLoading}
|
|
373
|
+
columns={columns}
|
|
374
|
+
onRowClick={onRowClick}
|
|
375
|
+
selection={selection}
|
|
376
|
+
toggleAll={toggleAll}
|
|
377
|
+
onSelectionChange={_onSelectionChange}
|
|
378
|
+
/>
|
|
379
|
+
) : (
|
|
380
|
+
<DocumentTableView
|
|
381
|
+
objects={objects}
|
|
382
|
+
isLoading={isLoading}
|
|
383
|
+
columns={columns}
|
|
384
|
+
onRowClick={onRowClick}
|
|
385
|
+
selection={selection}
|
|
386
|
+
toggleAll={toggleAll}
|
|
387
|
+
onSelectionChange={_onSelectionChange}
|
|
388
|
+
/>
|
|
389
|
+
);
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
function findPreviousSelected(objects: ContentObjectItem[], index: number, selection: DocumentSelection) {
|
|
393
|
+
for (let i = index - 1; i >= 0; i--) {
|
|
394
|
+
if (selection.isSelected(objects[i].id)) {
|
|
395
|
+
return i;
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
return -1;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
function findNextSelected(objects: ContentObjectItem[], index: number, selection: DocumentSelection) {
|
|
402
|
+
const length = objects.length;
|
|
403
|
+
for (let i = index + 1; i < length; i++) {
|
|
404
|
+
if (selection.isSelected(objects[i].id)) {
|
|
405
|
+
return i;
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
return -1;
|
|
409
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { Button, Modal, ModalBody, ModalTitle, SelectBox, Spinner } from "@vertesia/ui/core";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
|
|
4
|
+
export enum ExportTypes {
|
|
5
|
+
CSV = "CSV", JSON = "JSON"
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
interface ExportPropertiesModalProps {
|
|
9
|
+
isExporting: boolean;
|
|
10
|
+
isOpen: boolean;
|
|
11
|
+
onClose: (exportType?: string | null | undefined, exportAll?: boolean) => void;
|
|
12
|
+
}
|
|
13
|
+
export function ExportPropertiesModal({ isExporting, isOpen, onClose }: ExportPropertiesModalProps) {
|
|
14
|
+
const title = "Export Object Properties";
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<Modal onClose={() => onClose(undefined)} isOpen={isOpen} className="relative overflow-visible">
|
|
18
|
+
<ModalTitle>{title}</ModalTitle>
|
|
19
|
+
{!isExporting &&
|
|
20
|
+
<SelectPanel onClose={onClose} />
|
|
21
|
+
}
|
|
22
|
+
{isExporting &&
|
|
23
|
+
<WaitingPanel />
|
|
24
|
+
}
|
|
25
|
+
</Modal>
|
|
26
|
+
)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
interface SelectPanelProps {
|
|
30
|
+
onClose: (exportType?: string | null, exportAll?: boolean) => void;
|
|
31
|
+
}
|
|
32
|
+
function SelectPanel({ onClose }: SelectPanelProps) {
|
|
33
|
+
const [exportType, setExportType] = useState<string | undefined>(undefined);
|
|
34
|
+
const [exportAll, setExportAll] = useState<string | undefined>(undefined);
|
|
35
|
+
|
|
36
|
+
const selectionOption: string[] = ["Export selected objects", "Export all objects"];
|
|
37
|
+
|
|
38
|
+
const exportAllBoolean = (option: string | undefined) => {
|
|
39
|
+
return option == selectionOption[1];
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const onSubmit = () => {
|
|
43
|
+
onClose(exportType, exportAllBoolean(exportAll));
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<ModalBody className="min-h-[104px] pt-0 flex flex-col gap-y-4">
|
|
48
|
+
<div className='h-1/3'>
|
|
49
|
+
<SelectBox
|
|
50
|
+
options={selectionOption}
|
|
51
|
+
value={exportAll}
|
|
52
|
+
onChange={setExportAll}
|
|
53
|
+
placeholder="Choose what to export"
|
|
54
|
+
className="h-full w-full text-sm"
|
|
55
|
+
filterBy="name"
|
|
56
|
+
isClearable
|
|
57
|
+
/>
|
|
58
|
+
</div>
|
|
59
|
+
<div className='h-1/2 flex flex-col gap-y-8 content-between'>
|
|
60
|
+
<SelectBox
|
|
61
|
+
options={Object.values(ExportTypes)}
|
|
62
|
+
value={exportType}
|
|
63
|
+
onChange={setExportType}
|
|
64
|
+
placeholder="Choose a format"
|
|
65
|
+
className="h-full w-full text-sm"
|
|
66
|
+
filterBy="name"
|
|
67
|
+
isClearable
|
|
68
|
+
/>
|
|
69
|
+
|
|
70
|
+
<Button className="w-full" isDisabled={!exportType || !exportAll} onClick={onSubmit}>Export Properties</Button>
|
|
71
|
+
</div>
|
|
72
|
+
</ModalBody>
|
|
73
|
+
)
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
interface WaitingPanelProps { }
|
|
77
|
+
function WaitingPanel({ }: WaitingPanelProps) {
|
|
78
|
+
return (
|
|
79
|
+
<ModalBody className="min-h-[84px] pt-0">
|
|
80
|
+
<div className='h-full grid flex-col gap-y-2 content-between justify-items-center'>
|
|
81
|
+
<div className="text-sm flex flex-col gap-x-2">
|
|
82
|
+
<p>EXPORT IS IN PROGRESS</p>
|
|
83
|
+
<p className="pt-2 grid justify-items-center">PLEASE WAIT</p>
|
|
84
|
+
</div>
|
|
85
|
+
<Spinner size='lg' />
|
|
86
|
+
</div>
|
|
87
|
+
</ModalBody>
|
|
88
|
+
)
|
|
89
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { LayoutGrid, TableProperties } from 'lucide-react'
|
|
2
|
+
import { useState } from 'react'
|
|
3
|
+
|
|
4
|
+
import { Button } from '@vertesia/ui/core'
|
|
5
|
+
|
|
6
|
+
const LAST_DISPLAYED_VIEW = 'vertesia.content_store.lastDisplayedView'
|
|
7
|
+
|
|
8
|
+
interface ContentDispositionButtonProps {
|
|
9
|
+
onUpdate: (value: boolean) => void
|
|
10
|
+
}
|
|
11
|
+
export function ContentDispositionButton({ onUpdate }: Readonly<ContentDispositionButtonProps>) {
|
|
12
|
+
const [isGridView, setIsGridView] = useState(localStorage.getItem(LAST_DISPLAYED_VIEW) === "grid")
|
|
13
|
+
|
|
14
|
+
const updateView = () => {
|
|
15
|
+
if (isGridView) {
|
|
16
|
+
toggleTableView()
|
|
17
|
+
} else {
|
|
18
|
+
toggleGridView()
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const toggleGridView = () => {
|
|
23
|
+
localStorage.setItem(LAST_DISPLAYED_VIEW, "grid")
|
|
24
|
+
setIsGridView(true)
|
|
25
|
+
onUpdate(true)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const toggleTableView = () => {
|
|
29
|
+
localStorage.setItem(LAST_DISPLAYED_VIEW, "table")
|
|
30
|
+
setIsGridView(false)
|
|
31
|
+
onUpdate(false)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<Button variant="outline" onClick={updateView} alt={isGridView ? "Table View" : "Thumbnail View"}>
|
|
36
|
+
{
|
|
37
|
+
isGridView
|
|
38
|
+
? <TableProperties />
|
|
39
|
+
: <LayoutGrid />
|
|
40
|
+
}
|
|
41
|
+
</Button>
|
|
42
|
+
)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
ContentDispositionButton.LAST_DISPLAYED_VIEW = LAST_DISPLAYED_VIEW
|