@vertesia/ui 0.78.0 → 0.79.1
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/Panel.js +8 -0
- package/lib/esm/core/components/Panel.js.map +1 -0
- package/lib/esm/core/components/SelectBox.js +1 -1
- package/lib/esm/core/components/SelectBox.js.map +1 -1
- package/lib/esm/core/components/SelectList.js +18 -13
- package/lib/esm/core/components/SelectList.js.map +1 -1
- package/lib/esm/core/components/SidePanel.js +2 -2
- package/lib/esm/core/components/SidePanel.js.map +1 -1
- package/lib/esm/core/components/index.js +1 -1
- package/lib/esm/core/components/index.js.map +1 -1
- package/lib/esm/core/components/shadcn/breadcrumb.js +29 -8
- package/lib/esm/core/components/shadcn/breadcrumb.js.map +1 -1
- package/lib/esm/core/components/shadcn/button.js +3 -2
- package/lib/esm/core/components/shadcn/button.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/filterBar.js +41 -14
- package/lib/esm/core/components/shadcn/filters/filterBar.js.map +1 -1
- package/lib/esm/core/components/shadcn/index.js +2 -0
- package/lib/esm/core/components/shadcn/index.js.map +1 -1
- package/lib/esm/core/components/shadcn/input.js +4 -1
- package/lib/esm/core/components/shadcn/input.js.map +1 -1
- package/lib/esm/core/components/shadcn/resizeable.js +15 -0
- package/lib/esm/core/components/shadcn/resizeable.js.map +1 -0
- package/lib/esm/core/components/shadcn/selectBox.js +15 -9
- package/lib/esm/core/components/shadcn/selectBox.js.map +1 -1
- package/lib/esm/core/components/shadcn/tabs.js +20 -8
- package/lib/esm/core/components/shadcn/tabs.js.map +1 -1
- package/lib/esm/core/components/shadcn/textarea.js +7 -0
- package/lib/esm/core/components/shadcn/textarea.js.map +1 -0
- package/lib/esm/core/components/table/index.js +1 -1
- package/lib/esm/core/components/table/index.js.map +1 -1
- package/lib/esm/core/hooks/CompositeState.js +139 -1
- package/lib/esm/core/hooks/CompositeState.js.map +1 -1
- package/lib/esm/core/hooks/index.js +1 -0
- package/lib/esm/core/hooks/index.js.map +1 -1
- package/lib/esm/core/hooks/useScrollableSearch.js +92 -0
- package/lib/esm/core/hooks/useScrollableSearch.js.map +1 -0
- package/lib/esm/env/index.js +1 -1
- package/lib/esm/env/index.js.map +1 -1
- package/lib/esm/features/agent/PayloadBuilder.js +80 -55
- package/lib/esm/features/agent/PayloadBuilder.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentConversation.js +22 -24
- package/lib/esm/features/agent/chat/ModernAgentConversation.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +2 -3
- package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js +2 -2
- package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.js +15 -20
- package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/PlanPanel.js +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/PlanPanel.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.js +3 -3
- package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js +6 -6
- package/lib/esm/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js.map +1 -1
- package/lib/esm/features/facets/CollectionsFacetsNav.js +85 -0
- package/lib/esm/features/facets/CollectionsFacetsNav.js.map +1 -0
- package/lib/esm/features/facets/DocumentsFacetsNav.js +19 -7
- package/lib/esm/features/facets/DocumentsFacetsNav.js.map +1 -1
- package/lib/esm/features/facets/EnvironmentFacet.js +1 -1
- package/lib/esm/features/facets/EnvironmentFacet.js.map +1 -1
- package/lib/esm/features/facets/InteractionsFacetsNav.js +88 -0
- package/lib/esm/features/facets/InteractionsFacetsNav.js.map +1 -0
- package/lib/esm/features/facets/PromptsFacetsNav.js +80 -0
- package/lib/esm/features/facets/PromptsFacetsNav.js.map +1 -0
- package/lib/esm/features/facets/RunsFacetsNav.js +28 -6
- package/lib/esm/features/facets/RunsFacetsNav.js.map +1 -1
- package/lib/esm/features/facets/WorkflowExecutionsFacetsNav.js +7 -5
- package/lib/esm/features/facets/WorkflowExecutionsFacetsNav.js.map +1 -1
- package/lib/esm/features/facets/index.js +10 -8
- package/lib/esm/features/facets/index.js.map +1 -1
- package/lib/esm/features/facets/utils/SearchInterface.js +2 -0
- package/lib/esm/features/facets/utils/SearchInterface.js.map +1 -0
- package/lib/esm/features/facets/utils/StringFacet.js.map +1 -0
- package/lib/esm/features/facets/utils/StringListFacet.js.map +1 -0
- package/lib/esm/features/facets/utils/TypeFacet.js.map +1 -0
- package/lib/esm/features/facets/utils/VEnvironmentFacet.js.map +1 -0
- package/lib/esm/features/facets/utils/VInteractionFacet.js.map +1 -0
- package/lib/esm/features/facets/utils/VStringFacet.js.map +1 -0
- package/lib/esm/features/facets/{VTypeFacet.js → utils/VTypeFacet.js} +9 -4
- package/lib/esm/features/facets/utils/VTypeFacet.js.map +1 -0
- package/lib/esm/features/facets/{VUserFacet.js → utils/VUserFacet.js} +1 -1
- package/lib/esm/features/facets/utils/VUserFacet.js.map +1 -0
- package/lib/esm/features/facets/utils/utils.js.map +1 -0
- package/lib/esm/features/layout/GenericPageNavHeader.js +58 -5
- package/lib/esm/features/layout/GenericPageNavHeader.js.map +1 -1
- package/lib/esm/features/store/collections/BrowseCollectionView.js +3 -0
- package/lib/esm/features/store/collections/BrowseCollectionView.js.map +1 -1
- package/lib/esm/features/store/collections/CreateCollection.js +2 -2
- package/lib/esm/features/store/collections/CreateCollection.js.map +1 -1
- package/lib/esm/features/store/collections/EditCollectionView.js +43 -31
- package/lib/esm/features/store/collections/EditCollectionView.js.map +1 -1
- package/lib/esm/features/store/collections/SelectCollection.js +46 -16
- package/lib/esm/features/store/collections/SelectCollection.js.map +1 -1
- package/lib/esm/features/store/objects/DocumentSearchResults.js +43 -13
- package/lib/esm/features/store/objects/DocumentSearchResults.js.map +1 -1
- package/lib/esm/features/store/objects/DocumentTable.js +6 -6
- package/lib/esm/features/store/objects/DocumentTable.js.map +1 -1
- package/lib/esm/features/store/objects/components/ContentOverview.js +225 -87
- package/lib/esm/features/store/objects/components/ContentOverview.js.map +1 -1
- package/lib/esm/features/store/objects/components/DocumentIcon.js +11 -3
- package/lib/esm/features/store/objects/components/DocumentIcon.js.map +1 -1
- package/lib/esm/features/store/objects/components/SaveVersionConfirmModal.js +11 -2
- package/lib/esm/features/store/objects/components/SaveVersionConfirmModal.js.map +1 -1
- package/lib/esm/features/store/objects/components/useDownloadObject.js +2 -2
- package/lib/esm/features/store/objects/components/useDownloadObject.js.map +1 -1
- package/lib/esm/features/store/objects/layout/DocumentTableColumn.js +13 -1
- package/lib/esm/features/store/objects/layout/DocumentTableColumn.js.map +1 -1
- package/lib/esm/features/store/objects/layout/documentLayout.js +7 -8
- package/lib/esm/features/store/objects/layout/documentLayout.js.map +1 -1
- package/lib/esm/features/store/objects/layout/renderers.js +28 -12
- package/lib/esm/features/store/objects/layout/renderers.js.map +1 -1
- package/lib/esm/features/store/objects/search/DocumentSearchContext.js +5 -1
- package/lib/esm/features/store/objects/search/DocumentSearchContext.js.map +1 -1
- package/lib/esm/features/store/objects/search/DocumentSearchProvider.js +1 -1
- package/lib/esm/features/store/objects/search/DocumentSearchProvider.js.map +1 -1
- package/lib/esm/features/store/objects/selection/ObjectsActionContext.js +3 -2
- package/lib/esm/features/store/objects/selection/ObjectsActionContext.js.map +1 -1
- package/lib/esm/features/store/objects/selection/SelectionActions.js +2 -0
- package/lib/esm/features/store/objects/selection/SelectionActions.js.map +1 -1
- package/lib/esm/features/store/objects/selection/actions/AddToCollectionAction.js +12 -4
- package/lib/esm/features/store/objects/selection/actions/AddToCollectionAction.js.map +1 -1
- package/lib/esm/features/store/objects/selection/actions/DeleteObjectsAction.js +20 -2
- package/lib/esm/features/store/objects/selection/actions/DeleteObjectsAction.js.map +1 -1
- package/lib/esm/features/store/objects/upload/DocumentUploadModal.js +16 -8
- package/lib/esm/features/store/objects/upload/DocumentUploadModal.js.map +1 -1
- package/lib/esm/features/store/types/CreateOrUpdateTypeModal.js +1 -1
- package/lib/esm/features/store/types/CreateOrUpdateTypeModal.js.map +1 -1
- package/lib/esm/features/store/types/ObjectSchemaEditor.js +1 -1
- package/lib/esm/features/store/types/ObjectSchemaEditor.js.map +1 -1
- package/lib/esm/features/user/UserInfo.js +35 -1
- package/lib/esm/features/user/UserInfo.js.map +1 -1
- package/lib/esm/router/HistoryNavigator.js +25 -2
- package/lib/esm/router/HistoryNavigator.js.map +1 -1
- package/lib/esm/router/Nav.js +3 -3
- package/lib/esm/router/Nav.js.map +1 -1
- package/lib/esm/session/UserSession.js +1 -0
- package/lib/esm/session/UserSession.js.map +1 -1
- package/lib/esm/session/UserSessionProvider.js +9 -2
- package/lib/esm/session/UserSessionProvider.js.map +1 -1
- package/lib/esm/session/auth/composable.js +66 -67
- package/lib/esm/session/auth/composable.js.map +1 -1
- package/lib/esm/shell/login/UserInfo.js +1 -1
- package/lib/esm/shell/login/UserInfo.js.map +1 -1
- package/lib/esm/widgets/form/Form.js +17 -30
- package/lib/esm/widgets/form/Form.js.map +1 -1
- package/lib/esm/widgets/form/FormContext.js +4 -2
- package/lib/esm/widgets/form/FormContext.js.map +1 -1
- package/lib/esm/widgets/form/ManagedObject.js +4 -0
- package/lib/esm/widgets/form/ManagedObject.js.map +1 -1
- package/lib/esm/widgets/form/fields.js +4 -3
- package/lib/esm/widgets/form/fields.js.map +1 -1
- package/lib/esm/widgets/form/inputs.js +2 -0
- package/lib/esm/widgets/form/inputs.js.map +1 -1
- package/lib/esm/widgets/schema-editor/index.js +0 -1
- package/lib/esm/widgets/schema-editor/index.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/core/components/Panel.d.ts +11 -0
- package/lib/types/core/components/Panel.d.ts.map +1 -0
- package/lib/types/core/components/SelectList.d.ts +2 -1
- package/lib/types/core/components/SelectList.d.ts.map +1 -1
- package/lib/types/core/components/SidePanel.d.ts.map +1 -1
- package/lib/types/core/components/index.d.ts +1 -1
- package/lib/types/core/components/index.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/breadcrumb.d.ts +3 -2
- package/lib/types/core/components/shadcn/breadcrumb.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/button.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/filters/filterBar.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/index.d.ts +2 -0
- package/lib/types/core/components/shadcn/index.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/input.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/resizeable.d.ts +9 -0
- package/lib/types/core/components/shadcn/resizeable.d.ts.map +1 -0
- package/lib/types/core/components/shadcn/selectBox.d.ts +3 -2
- package/lib/types/core/components/shadcn/selectBox.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/tabs.d.ts +2 -1
- package/lib/types/core/components/shadcn/tabs.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/textarea.d.ts +4 -0
- package/lib/types/core/components/shadcn/textarea.d.ts.map +1 -0
- package/lib/types/core/hooks/CompositeState.d.ts +115 -6
- package/lib/types/core/hooks/CompositeState.d.ts.map +1 -1
- package/lib/types/core/hooks/index.d.ts +1 -0
- package/lib/types/core/hooks/index.d.ts.map +1 -1
- package/lib/types/core/hooks/useScrollableSearch.d.ts +82 -0
- package/lib/types/core/hooks/useScrollableSearch.d.ts.map +1 -0
- package/lib/types/env/index.d.ts +3 -1
- package/lib/types/env/index.d.ts.map +1 -1
- package/lib/types/features/agent/PayloadBuilder.d.ts +11 -19
- package/lib/types/features/agent/PayloadBuilder.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentConversation.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/Header.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/PlanPanel.d.ts.map +1 -1
- package/lib/types/features/facets/CollectionsFacetsNav.d.ts +14 -0
- package/lib/types/features/facets/CollectionsFacetsNav.d.ts.map +1 -0
- package/lib/types/features/facets/DocumentsFacetsNav.d.ts +1 -1
- package/lib/types/features/facets/DocumentsFacetsNav.d.ts.map +1 -1
- package/lib/types/features/facets/InteractionsFacetsNav.d.ts +14 -0
- package/lib/types/features/facets/InteractionsFacetsNav.d.ts.map +1 -0
- package/lib/types/features/facets/PromptsFacetsNav.d.ts +15 -0
- package/lib/types/features/facets/PromptsFacetsNav.d.ts.map +1 -0
- package/lib/types/features/facets/RunsFacetsNav.d.ts +1 -1
- package/lib/types/features/facets/RunsFacetsNav.d.ts.map +1 -1
- package/lib/types/features/facets/WorkflowExecutionsFacetsNav.d.ts +1 -1
- package/lib/types/features/facets/WorkflowExecutionsFacetsNav.d.ts.map +1 -1
- package/lib/types/features/facets/index.d.ts +10 -8
- package/lib/types/features/facets/index.d.ts.map +1 -1
- package/lib/types/features/facets/utils/SearchInterface.d.ts +14 -0
- package/lib/types/features/facets/utils/SearchInterface.d.ts.map +1 -0
- package/lib/types/features/facets/utils/StringFacet.d.ts.map +1 -0
- package/lib/types/features/facets/utils/StringListFacet.d.ts.map +1 -0
- package/lib/types/features/facets/utils/TypeFacet.d.ts.map +1 -0
- package/lib/types/features/facets/utils/VEnvironmentFacet.d.ts.map +1 -0
- package/lib/types/features/facets/utils/VInteractionFacet.d.ts.map +1 -0
- package/lib/types/features/facets/utils/VStringFacet.d.ts.map +1 -0
- package/lib/types/features/facets/{VTypeFacet.d.ts → utils/VTypeFacet.d.ts} +2 -1
- package/lib/types/features/facets/utils/VTypeFacet.d.ts.map +1 -0
- package/lib/types/features/facets/utils/VUserFacet.d.ts.map +1 -0
- package/lib/types/features/facets/utils/utils.d.ts.map +1 -0
- package/lib/types/features/layout/GenericPageNavHeader.d.ts +2 -1
- package/lib/types/features/layout/GenericPageNavHeader.d.ts.map +1 -1
- package/lib/types/features/store/collections/BrowseCollectionView.d.ts.map +1 -1
- package/lib/types/features/store/collections/CreateCollection.d.ts.map +1 -1
- package/lib/types/features/store/collections/EditCollectionView.d.ts.map +1 -1
- package/lib/types/features/store/collections/SelectCollection.d.ts +12 -8
- package/lib/types/features/store/collections/SelectCollection.d.ts.map +1 -1
- package/lib/types/features/store/objects/DocumentSearchResults.d.ts.map +1 -1
- package/lib/types/features/store/objects/DocumentTable.d.ts +4 -0
- package/lib/types/features/store/objects/DocumentTable.d.ts.map +1 -1
- package/lib/types/features/store/objects/components/ContentOverview.d.ts.map +1 -1
- package/lib/types/features/store/objects/components/DocumentIcon.d.ts +7 -1
- package/lib/types/features/store/objects/components/DocumentIcon.d.ts.map +1 -1
- package/lib/types/features/store/objects/components/SaveVersionConfirmModal.d.ts.map +1 -1
- package/lib/types/features/store/objects/components/useDownloadObject.d.ts +1 -1
- package/lib/types/features/store/objects/components/useDownloadObject.d.ts.map +1 -1
- package/lib/types/features/store/objects/layout/DocumentTableColumn.d.ts +2 -1
- package/lib/types/features/store/objects/layout/DocumentTableColumn.d.ts.map +1 -1
- package/lib/types/features/store/objects/layout/documentLayout.d.ts +4 -2
- package/lib/types/features/store/objects/layout/documentLayout.d.ts.map +1 -1
- package/lib/types/features/store/objects/layout/renderers.d.ts +1 -1
- package/lib/types/features/store/objects/layout/renderers.d.ts.map +1 -1
- package/lib/types/features/store/objects/search/DocumentSearchContext.d.ts +2 -3
- package/lib/types/features/store/objects/search/DocumentSearchContext.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/ObjectsActionContext.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/SelectionActions.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/actions/DeleteObjectsAction.d.ts +1 -0
- package/lib/types/features/store/objects/selection/actions/DeleteObjectsAction.d.ts.map +1 -1
- package/lib/types/features/store/objects/upload/DocumentUploadModal.d.ts.map +1 -1
- package/lib/types/features/user/UserInfo.d.ts +12 -1
- package/lib/types/features/user/UserInfo.d.ts.map +1 -1
- package/lib/types/router/HistoryNavigator.d.ts.map +1 -1
- package/lib/types/router/Nav.d.ts +2 -1
- package/lib/types/router/Nav.d.ts.map +1 -1
- package/lib/types/session/UserSession.d.ts.map +1 -1
- package/lib/types/session/UserSessionProvider.d.ts.map +1 -1
- package/lib/types/session/auth/composable.d.ts.map +1 -1
- package/lib/types/widgets/form/Form.d.ts +2 -1
- package/lib/types/widgets/form/Form.d.ts.map +1 -1
- package/lib/types/widgets/form/FormContext.d.ts +5 -2
- package/lib/types/widgets/form/FormContext.d.ts.map +1 -1
- package/lib/types/widgets/form/ManagedObject.d.ts.map +1 -1
- package/lib/types/widgets/form/fields.d.ts +2 -2
- package/lib/types/widgets/form/fields.d.ts.map +1 -1
- package/lib/types/widgets/form/inputs.d.ts.map +1 -1
- package/lib/types/widgets/schema-editor/index.d.ts +0 -1
- package/lib/types/widgets/schema-editor/index.d.ts.map +1 -1
- package/lib/vertesia-ui-core.js +1 -1
- package/lib/vertesia-ui-core.js.map +1 -1
- package/lib/vertesia-ui-env.js +1 -1
- package/lib/vertesia-ui-env.js.map +1 -1
- package/lib/vertesia-ui-features.js +1 -1
- package/lib/vertesia-ui-features.js.map +1 -1
- package/lib/vertesia-ui-router.js +1 -1
- package/lib/vertesia-ui-router.js.map +1 -1
- package/lib/vertesia-ui-session.js +1 -1
- package/lib/vertesia-ui-session.js.map +1 -1
- package/lib/vertesia-ui-shell.js +1 -1
- package/lib/vertesia-ui-shell.js.map +1 -1
- package/lib/vertesia-ui-widgets.js +1 -1
- package/lib/vertesia-ui-widgets.js.map +1 -1
- package/package.json +166 -165
- package/src/core/components/Panel.tsx +34 -0
- package/src/core/components/SelectList.tsx +11 -1
- package/src/core/components/SidePanel.tsx +18 -13
- package/src/core/components/index.ts +1 -1
- package/src/core/components/shadcn/breadcrumb.tsx +49 -30
- package/src/core/components/shadcn/button.tsx +3 -2
- package/src/core/components/shadcn/filters/filterBar.tsx +49 -23
- package/src/core/components/shadcn/index.ts +2 -0
- package/src/core/components/shadcn/input.tsx +10 -7
- package/src/core/components/shadcn/resizeable.tsx +54 -0
- package/src/core/components/shadcn/selectBox.tsx +87 -67
- package/src/core/components/shadcn/tabs.tsx +25 -8
- package/src/core/components/shadcn/textarea.tsx +21 -0
- package/src/core/components/table/index.tsx +1 -1
- package/src/core/hooks/index.ts +1 -0
- package/src/core/hooks/useScrollableSearch.tsx +193 -0
- package/src/features/agent/chat/ModernAgentConversation.tsx +109 -118
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +2 -22
- package/src/features/agent/chat/ModernAgentOutput/Header.tsx +1 -9
- package/src/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.tsx +39 -55
- package/src/features/agent/chat/ModernAgentOutput/PlanPanel.tsx +1 -0
- package/src/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.tsx +8 -8
- package/src/features/agent/chat/ModernAgentOutput/WorkstreamTabs.tsx +8 -8
- package/src/features/facets/CollectionsFacetsNav.tsx +115 -0
- package/src/features/facets/DocumentsFacetsNav.tsx +22 -11
- package/src/features/facets/EnvironmentFacet.tsx +1 -1
- package/src/features/facets/InteractionsFacetsNav.tsx +121 -0
- package/src/features/facets/PromptsFacetsNav.tsx +110 -0
- package/src/features/facets/RunsFacetsNav.tsx +40 -9
- package/src/features/facets/WorkflowExecutionsFacetsNav.tsx +10 -8
- package/src/features/facets/index.ts +11 -9
- package/src/features/facets/utils/SearchInterface.tsx +12 -0
- package/src/features/facets/{VTypeFacet.tsx → utils/VTypeFacet.tsx} +12 -5
- package/src/features/facets/{VUserFacet.tsx → utils/VUserFacet.tsx} +1 -1
- package/src/features/layout/GenericPageNavHeader.tsx +73 -10
- package/src/features/store/collections/BrowseCollectionView.tsx +4 -0
- package/src/features/store/collections/CreateCollection.tsx +3 -4
- package/src/features/store/collections/EditCollectionView.tsx +104 -85
- package/src/features/store/collections/SelectCollection.tsx +214 -29
- package/src/features/store/objects/DocumentSearchResults.tsx +98 -27
- package/src/features/store/objects/DocumentTable.tsx +14 -4
- package/src/features/store/objects/components/ContentOverview.tsx +536 -267
- package/src/features/store/objects/components/DocumentIcon.tsx +42 -13
- package/src/features/store/objects/components/SaveVersionConfirmModal.tsx +12 -2
- package/src/features/store/objects/layout/DocumentTableColumn.tsx +16 -1
- package/src/features/store/objects/layout/documentLayout.tsx +10 -12
- package/src/features/store/objects/layout/knowledge.md +10 -10
- package/src/features/store/objects/layout/renderers.tsx +39 -18
- package/src/features/store/objects/search/DocumentSearchContext.ts +6 -1
- package/src/features/store/objects/search/DocumentSearchProvider.tsx +1 -1
- package/src/features/store/objects/selection/ObjectsActionContext.tsx +3 -2
- package/src/features/store/objects/selection/SelectionActions.tsx +2 -0
- package/src/features/store/objects/selection/actions/AddToCollectionAction.tsx +23 -10
- package/src/features/store/objects/selection/actions/DeleteObjectsAction.tsx +22 -2
- package/src/features/store/objects/upload/DocumentUploadModal.tsx +23 -15
- package/src/features/store/objects/upload/useSmartFileUploadProcessing.ts +10 -7
- package/src/features/store/types/CreateOrUpdateTypeModal.tsx +1 -1
- package/src/features/store/types/ObjectSchemaEditor.tsx +1 -1
- package/src/features/user/UserInfo.tsx +66 -3
- package/src/router/HistoryNavigator.ts +33 -2
- package/src/router/Nav.tsx +4 -3
- package/src/shell/login/UserInfo.tsx +1 -1
- package/src/widgets/form/Form.tsx +19 -43
- package/src/widgets/form/FormContext.ts +5 -2
- package/src/widgets/form/fields.tsx +8 -6
- package/src/widgets/form/inputs.tsx +1 -0
- package/src/widgets/schema-editor/index.ts +0 -1
- package/lib/esm/core/components/Textarea.js +0 -15
- package/lib/esm/core/components/Textarea.js.map +0 -1
- package/lib/esm/features/facets/FacetsNav.js +0 -8
- package/lib/esm/features/facets/FacetsNav.js.map +0 -1
- package/lib/esm/features/facets/StringFacet.js.map +0 -1
- package/lib/esm/features/facets/StringListFacet.js.map +0 -1
- package/lib/esm/features/facets/TypeFacet.js.map +0 -1
- package/lib/esm/features/facets/VEnvironmentFacet.js.map +0 -1
- package/lib/esm/features/facets/VFacetsNav.js +0 -48
- package/lib/esm/features/facets/VFacetsNav.js.map +0 -1
- package/lib/esm/features/facets/VInteractionFacet.js.map +0 -1
- package/lib/esm/features/facets/VStringFacet.js.map +0 -1
- package/lib/esm/features/facets/VTypeFacet.js.map +0 -1
- package/lib/esm/features/facets/VUserFacet.js.map +0 -1
- package/lib/esm/features/facets/utils.js.map +0 -1
- package/lib/esm/widgets/schema-editor/JSONSchemaEditorModal.js +0 -49
- package/lib/esm/widgets/schema-editor/JSONSchemaEditorModal.js.map +0 -1
- package/lib/types/core/components/Textarea.d.ts +0 -8
- package/lib/types/core/components/Textarea.d.ts.map +0 -1
- package/lib/types/features/facets/FacetsNav.d.ts +0 -7
- package/lib/types/features/facets/FacetsNav.d.ts.map +0 -1
- package/lib/types/features/facets/StringFacet.d.ts.map +0 -1
- package/lib/types/features/facets/StringListFacet.d.ts.map +0 -1
- package/lib/types/features/facets/TypeFacet.d.ts.map +0 -1
- package/lib/types/features/facets/VEnvironmentFacet.d.ts.map +0 -1
- package/lib/types/features/facets/VFacetsNav.d.ts +0 -16
- package/lib/types/features/facets/VFacetsNav.d.ts.map +0 -1
- package/lib/types/features/facets/VInteractionFacet.d.ts.map +0 -1
- package/lib/types/features/facets/VStringFacet.d.ts.map +0 -1
- package/lib/types/features/facets/VTypeFacet.d.ts.map +0 -1
- package/lib/types/features/facets/VUserFacet.d.ts.map +0 -1
- package/lib/types/features/facets/utils.d.ts.map +0 -1
- package/lib/types/widgets/schema-editor/JSONSchemaEditorModal.d.ts +0 -10
- package/lib/types/widgets/schema-editor/JSONSchemaEditorModal.d.ts.map +0 -1
- package/src/core/components/Textarea.tsx +0 -25
- package/src/features/facets/FacetsNav.tsx +0 -19
- package/src/features/facets/VFacetsNav.tsx +0 -81
- package/src/widgets/schema-editor/JSONSchemaEditorModal.tsx +0 -67
- /package/lib/esm/features/facets/{StringFacet.js → utils/StringFacet.js} +0 -0
- /package/lib/esm/features/facets/{StringListFacet.js → utils/StringListFacet.js} +0 -0
- /package/lib/esm/features/facets/{TypeFacet.js → utils/TypeFacet.js} +0 -0
- /package/lib/esm/features/facets/{VEnvironmentFacet.js → utils/VEnvironmentFacet.js} +0 -0
- /package/lib/esm/features/facets/{VInteractionFacet.js → utils/VInteractionFacet.js} +0 -0
- /package/lib/esm/features/facets/{VStringFacet.js → utils/VStringFacet.js} +0 -0
- /package/lib/esm/features/facets/{utils.js → utils/utils.js} +0 -0
- /package/lib/types/features/facets/{StringFacet.d.ts → utils/StringFacet.d.ts} +0 -0
- /package/lib/types/features/facets/{StringListFacet.d.ts → utils/StringListFacet.d.ts} +0 -0
- /package/lib/types/features/facets/{TypeFacet.d.ts → utils/TypeFacet.d.ts} +0 -0
- /package/lib/types/features/facets/{VEnvironmentFacet.d.ts → utils/VEnvironmentFacet.d.ts} +0 -0
- /package/lib/types/features/facets/{VInteractionFacet.d.ts → utils/VInteractionFacet.d.ts} +0 -0
- /package/lib/types/features/facets/{VStringFacet.d.ts → utils/VStringFacet.d.ts} +0 -0
- /package/lib/types/features/facets/{VUserFacet.d.ts → utils/VUserFacet.d.ts} +0 -0
- /package/lib/types/features/facets/{utils.d.ts → utils/utils.d.ts} +0 -0
- /package/src/features/facets/{StringFacet.tsx → utils/StringFacet.tsx} +0 -0
- /package/src/features/facets/{StringListFacet.tsx → utils/StringListFacet.tsx} +0 -0
- /package/src/features/facets/{TypeFacet.tsx → utils/TypeFacet.tsx} +0 -0
- /package/src/features/facets/{VEnvironmentFacet.tsx → utils/VEnvironmentFacet.tsx} +0 -0
- /package/src/features/facets/{VInteractionFacet.tsx → utils/VInteractionFacet.tsx} +0 -0
- /package/src/features/facets/{VStringFacet.tsx → utils/VStringFacet.tsx} +0 -0
- /package/src/features/facets/{utils.tsx → utils/utils.tsx} +0 -0
|
@@ -4,7 +4,6 @@ import { retrieveRendition } from '../../../utils'
|
|
|
4
4
|
|
|
5
5
|
import { ContentObjectItem } from '@vertesia/common'
|
|
6
6
|
import { Button, Card, CardContent, Separator, VTooltip } from "@vertesia/ui/core"
|
|
7
|
-
import { NavLink } from "@vertesia/ui/router"
|
|
8
7
|
import { useUserSession } from "@vertesia/ui/session"
|
|
9
8
|
import { DocumentSelection } from '../DocumentSelectionProvider'
|
|
10
9
|
import { Eye } from 'lucide-react'
|
|
@@ -14,8 +13,40 @@ interface DocumentIconProps {
|
|
|
14
13
|
onSelectionChange: ((object: ContentObjectItem, ev: ChangeEvent<HTMLInputElement>) => void);
|
|
15
14
|
selection: DocumentSelection;
|
|
16
15
|
onRowClick?: (object: ContentObjectItem) => void;
|
|
16
|
+
previewObject?: (objectId: string) => void;
|
|
17
|
+
selectedObject?: ContentObjectItem | null;
|
|
17
18
|
}
|
|
18
|
-
|
|
19
|
+
|
|
20
|
+
export function DocumentIconSkeleton({ isLoading = false, counts = 6 }: { isLoading?: boolean, counts?: number }) {
|
|
21
|
+
if (!isLoading) {
|
|
22
|
+
return null
|
|
23
|
+
}
|
|
24
|
+
return (
|
|
25
|
+
<div className='flex flex-wrap gap-2 justify-between'>
|
|
26
|
+
{Array(counts).fill(0).map((_, index) =>
|
|
27
|
+
<div key={index} className="w-[15vw] animate-pulse">
|
|
28
|
+
<Card className="relative flex flex-col border h-fit">
|
|
29
|
+
<div className="h-48 bg-muted rounded-t-xl flex items-center justify-center text-muted">
|
|
30
|
+
|
|
31
|
+
</div>
|
|
32
|
+
<Separator className='bg-muted h-[2px]' />
|
|
33
|
+
<CardContent className="p-2 flex flex-col">
|
|
34
|
+
<div className="flex flex-col overflow-hidden">
|
|
35
|
+
<div className="h-5 bg-muted rounded w-3/4 mb-2"></div>
|
|
36
|
+
<div className="h-4 bg-muted rounded w-1/2"></div>
|
|
37
|
+
</div>
|
|
38
|
+
<div className="text-xs text-muted w-full flex justify-end mt-2">
|
|
39
|
+
<div className="h-3 bg-muted rounded w-1/4"></div>
|
|
40
|
+
</div>
|
|
41
|
+
</CardContent>
|
|
42
|
+
</Card>
|
|
43
|
+
</div>
|
|
44
|
+
)}
|
|
45
|
+
</div>
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function DocumentIcon({ selection, document, onSelectionChange, onRowClick, previewObject, selectedObject }: Readonly<DocumentIconProps>) {
|
|
19
50
|
const { client } = useUserSession()
|
|
20
51
|
|
|
21
52
|
const [renditionUrl, setRenditionUrl] = useState<string | undefined>(undefined)
|
|
@@ -37,7 +68,7 @@ export function DocumentIcon({ selection, document, onSelectionChange, onRowClic
|
|
|
37
68
|
}, [document])
|
|
38
69
|
|
|
39
70
|
return (
|
|
40
|
-
<Card className=
|
|
71
|
+
<Card className={`relative flex flex-col border h-fit ${selectedObject?.id === document.id ? 'border-attention border-4' : ''}`} onClick={() => (onRowClick && onRowClick(document))}>
|
|
41
72
|
{
|
|
42
73
|
selection && (
|
|
43
74
|
<div
|
|
@@ -55,16 +86,14 @@ export function DocumentIcon({ selection, document, onSelectionChange, onRowClic
|
|
|
55
86
|
<div
|
|
56
87
|
className="absolute top-1 right-1 z-10 flex flex-col items-center"
|
|
57
88
|
>
|
|
58
|
-
<
|
|
59
|
-
|
|
60
|
-
|
|
89
|
+
<Button
|
|
90
|
+
variant="ghost" size="sm" title="Preivew Object" onClick={(e) => {
|
|
91
|
+
e.stopPropagation();
|
|
92
|
+
previewObject?.(document.id);
|
|
93
|
+
}}
|
|
61
94
|
>
|
|
62
|
-
<
|
|
63
|
-
|
|
64
|
-
>
|
|
65
|
-
<Eye className={`size-4 ${renditionStatus === 'ready' ? 'text-muted' : 'text-white'}`} />
|
|
66
|
-
</Button>
|
|
67
|
-
</NavLink>
|
|
95
|
+
<Eye className={`size-4 ${renditionStatus === 'ready' ? 'text-muted' : 'text-white'}`} />
|
|
96
|
+
</Button>
|
|
68
97
|
</div>
|
|
69
98
|
|
|
70
99
|
{
|
|
@@ -95,7 +124,7 @@ export function DocumentIcon({ selection, document, onSelectionChange, onRowClic
|
|
|
95
124
|
}
|
|
96
125
|
</div>
|
|
97
126
|
{document.score && (
|
|
98
|
-
<div className="text-xs text-muted w-full flex justify-end">
|
|
127
|
+
<div className="text-xs text-muted w-full flex justify-end">
|
|
99
128
|
Score: {(document.score).toFixed(4) ?? "-"}
|
|
100
129
|
</div>
|
|
101
130
|
)}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useState } from 'react';
|
|
1
|
+
import { useState, useEffect } from 'react';
|
|
2
2
|
import {
|
|
3
3
|
Button,
|
|
4
4
|
Modal,
|
|
@@ -65,10 +65,20 @@ export function SaveVersionConfirmModal({ isOpen, onClose, onConfirm, isLoading,
|
|
|
65
65
|
}
|
|
66
66
|
];
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
// Default to "create new version" when replacing a file, "update current version" when editing properties
|
|
69
|
+
const defaultOption = uploadedFileName ? saveOptions[1] : saveOptions[0];
|
|
70
|
+
const [selectedOption, setSelectedOption] = useState<SaveOptionType | undefined>(defaultOption);
|
|
69
71
|
const [versionLabel, setVersionLabel] = useState('');
|
|
70
72
|
const optionAdapter = new SaveOptionAdapter();
|
|
71
73
|
|
|
74
|
+
// Reset to default when modal opens or uploadedFileName changes
|
|
75
|
+
useEffect(() => {
|
|
76
|
+
if (isOpen) {
|
|
77
|
+
setSelectedOption(defaultOption);
|
|
78
|
+
setVersionLabel('');
|
|
79
|
+
}
|
|
80
|
+
}, [isOpen, uploadedFileName]);
|
|
81
|
+
|
|
72
82
|
const createVersion = selectedOption?.id === "new-version";
|
|
73
83
|
|
|
74
84
|
const handleOptionChange = (option: SaveOptionType) => {
|
|
@@ -37,9 +37,11 @@ export class DocumentTableColumn {
|
|
|
37
37
|
renderer: (value: any, index: number) => React.ReactNode = defaultRenderer;
|
|
38
38
|
path: string[];
|
|
39
39
|
fallbackPath?: string[];
|
|
40
|
-
|
|
40
|
+
previewObject?: (objectId: string) => void;
|
|
41
|
+
constructor(public layout: ExtendedColumnLayout, previewObject?: (objectId: string) => void) {
|
|
41
42
|
this.path = splitPath(layout.field || '');
|
|
42
43
|
this.fallbackPath = layout.fallback ? splitPath(layout.fallback) : undefined;
|
|
44
|
+
this.previewObject = previewObject;
|
|
43
45
|
|
|
44
46
|
// If there's a custom render function, use it
|
|
45
47
|
if (layout.render) {
|
|
@@ -78,6 +80,19 @@ export class DocumentTableColumn {
|
|
|
78
80
|
if (this.layout.render) {
|
|
79
81
|
return <td key={index} className="whitespace-nowrap px-3 py-4 text-sm">{this.layout.render(object)}</td>;
|
|
80
82
|
}
|
|
83
|
+
|
|
84
|
+
const type = this.layout.type || 'string';
|
|
85
|
+
const baseType = type.indexOf('?') > 0 ? type.substring(0, type.indexOf('?')) : type;
|
|
86
|
+
|
|
87
|
+
if (baseType === 'objectId' && this.previewObject) {
|
|
88
|
+
const i = type.indexOf('?');
|
|
89
|
+
const params = i > 0 ? new URLSearchParams(type.substring(i + 1)) : undefined;
|
|
90
|
+
const objectIdRenderer = renderers.objectId(params, (_id: string) => {
|
|
91
|
+
this.previewObject!(object.id);
|
|
92
|
+
});
|
|
93
|
+
return objectIdRenderer(object, index);
|
|
94
|
+
}
|
|
95
|
+
|
|
81
96
|
// Otherwise use the type-based renderer with the resolved value
|
|
82
97
|
return this.renderer(this.resolveValue(object), index);
|
|
83
98
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Table, TBody
|
|
1
|
+
import { Table, TBody } from "@vertesia/ui/core";
|
|
2
2
|
import { ContentObjectItem, ColumnLayout } from "@vertesia/common";
|
|
3
|
-
import clsx from "clsx";
|
|
4
3
|
import { ChangeEvent } from "react";
|
|
5
|
-
import { DocumentIcon } from "../components/DocumentIcon";
|
|
4
|
+
import { DocumentIcon, DocumentIconSkeleton } from "../components/DocumentIcon";
|
|
6
5
|
import { DocumentSelection } from "../DocumentSelectionProvider";
|
|
7
6
|
import { DocumentTableColumn } from "./DocumentTableColumn";
|
|
8
7
|
|
|
@@ -11,13 +10,15 @@ interface ViewProps {
|
|
|
11
10
|
isLoading: boolean;
|
|
12
11
|
layout?: ColumnLayout[];
|
|
13
12
|
onRowClick?: (object: ContentObjectItem) => void;
|
|
13
|
+
previewObject?: (objectId: string) => void;
|
|
14
|
+
selectedObject?: ContentObjectItem | null;
|
|
14
15
|
onSelectionChange: ((object: ContentObjectItem, ev: ChangeEvent<HTMLInputElement>) => void);
|
|
15
16
|
selection: DocumentSelection;
|
|
16
17
|
toggleAll?: (ev: ChangeEvent<HTMLInputElement>) => void;
|
|
17
18
|
columns: DocumentTableColumn[];
|
|
18
19
|
}
|
|
19
20
|
|
|
20
|
-
export function DocumentTableView({ objects, selection, isLoading, onRowClick,
|
|
21
|
+
export function DocumentTableView({ objects, selection, isLoading, columns, onRowClick, selectedObject, toggleAll, onSelectionChange }: ViewProps) {
|
|
21
22
|
return (
|
|
22
23
|
<Table className="w-full border-t">
|
|
23
24
|
<thead>
|
|
@@ -32,12 +33,12 @@ export function DocumentTableView({ objects, selection, isLoading, onRowClick, c
|
|
|
32
33
|
{
|
|
33
34
|
objects?.map((obj: ContentObjectItem) => {
|
|
34
35
|
return (
|
|
35
|
-
<tr key={obj.id} className=
|
|
36
|
+
<tr key={obj.id} className={`cursor-pointer hover:bg-muted group ${selectedObject?.id === obj.id ? 'bg-muted' : ''}`} onClick={() => {
|
|
36
37
|
onRowClick && onRowClick(obj)
|
|
37
38
|
}}>
|
|
38
39
|
{selection &&
|
|
39
40
|
<td onClick={ev => ev.stopPropagation()}>
|
|
40
|
-
<input checked={selection.isSelected(obj.id)} type="checkbox"
|
|
41
|
+
<input checked={selection.isSelected(obj.id)} type="checkbox" className={`${!selection.isSelected(obj.id) ? 'hidden group-hover:block' : ''}`}
|
|
41
42
|
onChange={(ev: ChangeEvent<HTMLInputElement>) => onSelectionChange(obj, ev)} />
|
|
42
43
|
</td>
|
|
43
44
|
}
|
|
@@ -52,16 +53,13 @@ export function DocumentTableView({ objects, selection, isLoading, onRowClick, c
|
|
|
52
53
|
)
|
|
53
54
|
}
|
|
54
55
|
|
|
55
|
-
export function DocumentGridView({ objects, selection, isLoading, onSelectionChange, onRowClick }: ViewProps) {
|
|
56
|
-
|
|
56
|
+
export function DocumentGridView({ objects, selection, isLoading, onSelectionChange, onRowClick, previewObject, selectedObject }: ViewProps) {
|
|
57
57
|
return (
|
|
58
58
|
<>
|
|
59
|
-
<
|
|
60
|
-
<Spinner size='xl' />
|
|
61
|
-
</div>
|
|
59
|
+
<DocumentIconSkeleton isLoading={isLoading} />
|
|
62
60
|
<div className="w-full gap-2 grid lg:grid-cols-6">
|
|
63
61
|
{objects.map((document) => (
|
|
64
|
-
<DocumentIcon key={document.id} document={document} selection={selection} onSelectionChange={onSelectionChange} onRowClick={onRowClick} />
|
|
62
|
+
<DocumentIcon key={document.id} document={document} selection={selection} onSelectionChange={onSelectionChange} onRowClick={onRowClick} previewObject={previewObject} selectedObject={selectedObject} />
|
|
65
63
|
))}
|
|
66
64
|
</div>
|
|
67
65
|
</>
|
|
@@ -30,8 +30,8 @@ Complete list of supported types:
|
|
|
30
30
|
1. **string** - Text display
|
|
31
31
|
2. **number** - Numeric display
|
|
32
32
|
3. **date** - Date/time display
|
|
33
|
-
4. **
|
|
34
|
-
5. **
|
|
33
|
+
4. **objectId** - object id with preview button
|
|
34
|
+
5. **objectName** - object name display
|
|
35
35
|
|
|
36
36
|
### Column Types and Renderers
|
|
37
37
|
Built-in renderers with parameters:
|
|
@@ -48,14 +48,14 @@ Built-in renderers with parameters:
|
|
|
48
48
|
- `currency`: Format as currency (e.g., USD)
|
|
49
49
|
- `decimals`: Number of decimal places (default: 2)
|
|
50
50
|
|
|
51
|
-
3. **
|
|
52
|
-
- `title`: Property to use as title (default: "title")
|
|
53
|
-
- `underline`: Link underline style (default: "hover")
|
|
54
|
-
|
|
55
|
-
4. **date**
|
|
51
|
+
3. **date**
|
|
56
52
|
- `localized`: Use localized format (e.g., "LLL")
|
|
57
53
|
- `relative`: Use relative time ("fromNow"/"toNow")
|
|
58
54
|
|
|
55
|
+
4. **objectId**
|
|
56
|
+
- `slice`: Take substring from index
|
|
57
|
+
|
|
58
|
+
|
|
59
59
|
### Parameter Syntax
|
|
60
60
|
Parameters are added using URL query string syntax:
|
|
61
61
|
```typescript
|
|
@@ -92,12 +92,12 @@ Parameters are added using URL query string syntax:
|
|
|
92
92
|
{
|
|
93
93
|
"name": "ID",
|
|
94
94
|
"field": "id",
|
|
95
|
-
"type": "
|
|
95
|
+
"type": "objectId?slice=-7"
|
|
96
96
|
},
|
|
97
97
|
{
|
|
98
98
|
"name": "Name",
|
|
99
99
|
"field": ".",
|
|
100
|
-
"type": "
|
|
100
|
+
"type": "objectName"
|
|
101
101
|
},
|
|
102
102
|
{
|
|
103
103
|
"name": "Price",
|
|
@@ -126,7 +126,7 @@ Parameters are added using URL query string syntax:
|
|
|
126
126
|
{
|
|
127
127
|
"name": "Document",
|
|
128
128
|
"field": ".",
|
|
129
|
-
"type": "
|
|
129
|
+
"type": "objectName"
|
|
130
130
|
},
|
|
131
131
|
{
|
|
132
132
|
"name": "Score",
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { NavLink } from "@vertesia/ui/router";
|
|
2
1
|
import dayjs from "dayjs";
|
|
3
2
|
import LocalizedFormat from "dayjs/plugin/localizedFormat";
|
|
4
3
|
import RelativeTime from "dayjs/plugin/relativeTime";
|
|
5
4
|
import { shortId } from "../../../utils";
|
|
5
|
+
import { Eye } from "lucide-react";
|
|
6
|
+
import { Button } from "@vertesia/ui/core";
|
|
6
7
|
dayjs.extend(RelativeTime);
|
|
7
8
|
dayjs.extend(LocalizedFormat);
|
|
8
9
|
|
|
9
|
-
const renderers: Record<string, (params?: URLSearchParams) => (value: any, index: number) => React.ReactNode> = {
|
|
10
|
-
string(params?: URLSearchParams) {
|
|
10
|
+
const renderers: Record<string, (params?: URLSearchParams, onClick?: (id: string) => void) => (value: any, index: number) => React.ReactNode> = {
|
|
11
|
+
string(params?: URLSearchParams, _onClick?: (id: string) => void) {
|
|
11
12
|
let transforms: ((value: string) => string)[] = [];
|
|
12
13
|
if (params) {
|
|
13
14
|
const slice = params.get("slice");
|
|
@@ -48,7 +49,7 @@ const renderers: Record<string, (params?: URLSearchParams) => (value: any, index
|
|
|
48
49
|
};
|
|
49
50
|
},
|
|
50
51
|
|
|
51
|
-
fileSize(_params?: URLSearchParams) {
|
|
52
|
+
fileSize(_params?: URLSearchParams, _onClick?: (id: string) => void) {
|
|
52
53
|
return (value: any, index: number) => {
|
|
53
54
|
let fileSize = "";
|
|
54
55
|
if (value) {
|
|
@@ -69,7 +70,7 @@ const renderers: Record<string, (params?: URLSearchParams) => (value: any, index
|
|
|
69
70
|
};
|
|
70
71
|
},
|
|
71
72
|
|
|
72
|
-
number(params?: URLSearchParams) {
|
|
73
|
+
number(params?: URLSearchParams, _onClick?: (id: string) => void) {
|
|
73
74
|
let currency: string | undefined;
|
|
74
75
|
let decimals: string | undefined;
|
|
75
76
|
if (params) {
|
|
@@ -88,34 +89,54 @@ const renderers: Record<string, (params?: URLSearchParams) => (value: any, index
|
|
|
88
89
|
return <td key={index}>{v}</td>;
|
|
89
90
|
};
|
|
90
91
|
},
|
|
91
|
-
|
|
92
|
-
|
|
92
|
+
objectId(params?: URLSearchParams, onClick?: (id: string) => void) {
|
|
93
|
+
let transforms: ((value: string) => string)[] = [];
|
|
94
|
+
let hasSlice = false;
|
|
95
|
+
if (params) {
|
|
96
|
+
const slice = params.get("slice");
|
|
97
|
+
if (slice) {
|
|
98
|
+
hasSlice = true;
|
|
99
|
+
transforms.push((value) => value.slice(parseInt(slice)));
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return (value: any, index: number) => {
|
|
103
|
+
const displayValue = transforms.reduce((v, t) => t(v), value.id);
|
|
104
|
+
return (
|
|
105
|
+
<td key={index} className="flex justify-between items-center gap-2">
|
|
106
|
+
{hasSlice ? '~' : ''}{displayValue}
|
|
107
|
+
<Button
|
|
108
|
+
variant="ghost"
|
|
109
|
+
alt="Preview Object"
|
|
110
|
+
onClick={(e) => {
|
|
111
|
+
e.stopPropagation();
|
|
112
|
+
onClick?.(value.id);
|
|
113
|
+
}}
|
|
114
|
+
>
|
|
115
|
+
<Eye className="size-4" />
|
|
116
|
+
</Button>
|
|
117
|
+
</td>
|
|
118
|
+
);
|
|
119
|
+
};
|
|
120
|
+
},
|
|
121
|
+
objectName(params?: URLSearchParams, _onClick?: (id: string) => void) {
|
|
93
122
|
let title = "title";
|
|
94
|
-
//let underline = "hover";
|
|
95
123
|
if (params) {
|
|
96
124
|
title = params.get("title") || "title";
|
|
97
|
-
//underline = params.get("underline") || "hover";
|
|
98
125
|
}
|
|
99
126
|
return (value: any, index: number) => {
|
|
100
127
|
return (
|
|
101
128
|
<td key={index}>
|
|
102
|
-
|
|
103
|
-
topLevelNav
|
|
104
|
-
className="underline text-indigo-800 dark:text-indigo-300"
|
|
105
|
-
href={`/store/objects/${value.id}`}
|
|
106
|
-
>
|
|
107
|
-
{value.properties?.[title] || value.name || shortId(value.id)}
|
|
108
|
-
</NavLink>
|
|
129
|
+
{value.properties?.[title] || value.name || shortId(value.id)}
|
|
109
130
|
</td>
|
|
110
131
|
);
|
|
111
132
|
};
|
|
112
133
|
},
|
|
113
|
-
typeLink(_params?: URLSearchParams) {
|
|
134
|
+
typeLink(_params?: URLSearchParams, _onClick?: (id: string) => void) {
|
|
114
135
|
return (value: any, index: number) => {
|
|
115
136
|
return <td key={index}>{value?.name || "n/a"}</td>;
|
|
116
137
|
};
|
|
117
138
|
},
|
|
118
|
-
date(params?: URLSearchParams) {
|
|
139
|
+
date(params?: URLSearchParams, _onClick?: (id: string) => void) {
|
|
119
140
|
let method = "format";
|
|
120
141
|
let arg: string | undefined = "LLL";
|
|
121
142
|
if (params) {
|
|
@@ -55,9 +55,13 @@ export class DocumentSearch implements SearchInterface {
|
|
|
55
55
|
this.search();
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
+
setDefaultKeys(keys: any[]) {
|
|
59
|
+
void keys;
|
|
60
|
+
}
|
|
61
|
+
|
|
58
62
|
clearFilters(autoSearch: boolean = true) {
|
|
59
63
|
// Preserve search-related fields when clearing filters
|
|
60
|
-
const { parent, full_text, vector, weights, score_aggregation, dynamic_scaling, limit } = this.query;
|
|
64
|
+
const { parent, full_text, vector, weights, score_aggregation, dynamic_scaling, limit, all_revisions } = this.query;
|
|
61
65
|
this.query = {
|
|
62
66
|
parent,
|
|
63
67
|
...(full_text !== undefined && { full_text }),
|
|
@@ -65,6 +69,7 @@ export class DocumentSearch implements SearchInterface {
|
|
|
65
69
|
...(weights !== undefined && { weights }),
|
|
66
70
|
...(score_aggregation !== undefined && { score_aggregation }),
|
|
67
71
|
...(dynamic_scaling !== undefined && { dynamic_scaling }),
|
|
72
|
+
...(all_revisions !== undefined && { all_revisions }),
|
|
68
73
|
...(limit !== undefined && { limit })
|
|
69
74
|
};
|
|
70
75
|
|
|
@@ -42,7 +42,7 @@ export function DocumentSearchProvider({ children, limit, parent, typeId, facets
|
|
|
42
42
|
search.query.parent = parent;
|
|
43
43
|
search.query.name = name;
|
|
44
44
|
return search;
|
|
45
|
-
}, [typeId, limit]);
|
|
45
|
+
}, [typeId, limit, collectionId]);
|
|
46
46
|
|
|
47
47
|
return (
|
|
48
48
|
<SearchContext.Provider value={search}>{children}</SearchContext.Provider>
|
|
@@ -6,7 +6,7 @@ import { useUserSession } from '@vertesia/ui/session';
|
|
|
6
6
|
import { useDocumentSearch, useDocumentSelection } from '../../../store';
|
|
7
7
|
import { AddToCollectionAction } from './actions/AddToCollectionAction';
|
|
8
8
|
import { ChangeTypeAction } from './actions/ChangeTypeAction';
|
|
9
|
-
import { DeleteObjectsAction } from './actions/DeleteObjectsAction';
|
|
9
|
+
import { DeleteObjectsAction, DeleteObjectsFromCollectionsAction } from './actions/DeleteObjectsAction';
|
|
10
10
|
import { ExportPropertiesAction } from './actions/ExportPropertiesAction';
|
|
11
11
|
import { RemoveFromCollectionAction } from './actions/RemoveFromCollectionAction';
|
|
12
12
|
import { StartWorkflowAction, StartWorkflowComponent } from './actions/StartWorkflowComponent';
|
|
@@ -22,6 +22,7 @@ export class ObjectsActionContext {
|
|
|
22
22
|
AddToCollectionAction,
|
|
23
23
|
DeleteObjectsAction,
|
|
24
24
|
RemoveFromCollectionAction,
|
|
25
|
+
DeleteObjectsFromCollectionsAction
|
|
25
26
|
];
|
|
26
27
|
wfRules: ObjectsActionSpec[] = [];
|
|
27
28
|
callbacks: Record<string, ObjectsActionCallback> = {};
|
|
@@ -38,7 +39,7 @@ export class ObjectsActionContext {
|
|
|
38
39
|
);
|
|
39
40
|
} else {
|
|
40
41
|
return this.allActions.filter(action =>
|
|
41
|
-
action.id !== 'removeFromCollection'
|
|
42
|
+
action.id !== 'removeFromCollection' && action.id !== 'deleteFromCollections'
|
|
42
43
|
);
|
|
43
44
|
}
|
|
44
45
|
}
|
|
@@ -62,6 +62,8 @@ export function UploadObjectsButton({ collectionId }: { collectionId?: string })
|
|
|
62
62
|
const selectFile = () => {
|
|
63
63
|
const fileInput = document.createElement("input");
|
|
64
64
|
fileInput.type = "file";
|
|
65
|
+
fileInput.multiple = true;
|
|
66
|
+
fileInput.accept = "*";
|
|
65
67
|
fileInput?.click();
|
|
66
68
|
fileInput.onchange = (event) => {
|
|
67
69
|
const files = (event.target as HTMLInputElement).files;
|
|
@@ -41,14 +41,16 @@ interface SelectCollectionModalProps {
|
|
|
41
41
|
}
|
|
42
42
|
function SelectCollectionModal({ isOpen, onClose, objectIds }: SelectCollectionModalProps) {
|
|
43
43
|
return (
|
|
44
|
-
<VModal isOpen={isOpen} onClose={onClose}>
|
|
45
|
-
<VModalTitle className="flex flex-col">
|
|
44
|
+
<VModal isOpen={isOpen} onClose={onClose} className="max-w-lg w-full min-w-0 overflow-hidden">
|
|
45
|
+
<VModalTitle className="flex flex-col min-w-0 overflow-hidden">
|
|
46
46
|
Add to a Collection
|
|
47
47
|
</VModalTitle>
|
|
48
|
-
<DialogDescription>
|
|
48
|
+
<DialogDescription className="min-w-0 overflow-hidden">
|
|
49
49
|
Add the selected objects to an existing collection or create a new one.
|
|
50
50
|
</DialogDescription>
|
|
51
|
-
<
|
|
51
|
+
<div className="min-w-0 max-w-full overflow-hidden">
|
|
52
|
+
<AddToCollectionForm onClose={onClose} objectIds={objectIds} />
|
|
53
|
+
</div>
|
|
52
54
|
</VModal>
|
|
53
55
|
)
|
|
54
56
|
}
|
|
@@ -83,8 +85,14 @@ function AddToCollectionForm({ onClose, objectIds }: AddToCollectionFormProps) {
|
|
|
83
85
|
});
|
|
84
86
|
}
|
|
85
87
|
|
|
86
|
-
const onCollectionChange = (collectionId: string | undefined) => {
|
|
87
|
-
|
|
88
|
+
const onCollectionChange = (collectionId: string | string[] | undefined, _collection?: any) => {
|
|
89
|
+
if (typeof collectionId === "string" || typeof collectionId === "undefined") {
|
|
90
|
+
setSelectedCollectionId(collectionId);
|
|
91
|
+
} else if (Array.isArray(collectionId) && collectionId.length > 0) {
|
|
92
|
+
setSelectedCollectionId(collectionId[0]);
|
|
93
|
+
} else {
|
|
94
|
+
setSelectedCollectionId(undefined);
|
|
95
|
+
}
|
|
88
96
|
};
|
|
89
97
|
|
|
90
98
|
const tabs = [
|
|
@@ -92,13 +100,18 @@ function AddToCollectionForm({ onClose, objectIds }: AddToCollectionFormProps) {
|
|
|
92
100
|
name: 'select',
|
|
93
101
|
label: 'Select Collection',
|
|
94
102
|
content: (
|
|
95
|
-
<div className="p-4">
|
|
103
|
+
<div className="p-4 min-w-0 max-w-full overflow-hidden">
|
|
96
104
|
<Heading level={5}>Choose from existing collections</Heading>
|
|
97
|
-
<VModalBody>
|
|
98
|
-
<
|
|
105
|
+
<VModalBody className="min-w-0 max-w-full overflow-hidden">
|
|
106
|
+
<div className="mb-4 min-w-0 max-w-full overflow-hidden">
|
|
107
|
+
<SelectCollection onChange={onCollectionChange} value={selectedCollectionId} />
|
|
108
|
+
</div>
|
|
99
109
|
</VModalBody>
|
|
100
110
|
<VModalFooter>
|
|
101
|
-
<Button
|
|
111
|
+
<Button
|
|
112
|
+
isDisabled={!selectedCollectionId}
|
|
113
|
+
onClick={() => selectedCollectionId && onAddToCollection({ collectionId: selectedCollectionId })}
|
|
114
|
+
>
|
|
102
115
|
Add to Collection
|
|
103
116
|
</Button>
|
|
104
117
|
</VModalFooter>
|
|
@@ -28,12 +28,21 @@ export function DeleteObjectsActionComponent({ action, objectIds, children }: Ac
|
|
|
28
28
|
return Promise.resolve(false);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
function limitFilesName(names: string, maxLength: number) {
|
|
32
|
+
if (names.length <= maxLength) return names;
|
|
33
|
+
const extIndex = names.lastIndexOf('.');
|
|
34
|
+
const ext = extIndex !== -1 ? names.substring(extIndex) : '';
|
|
35
|
+
const baseName = extIndex !== -1 ? names.substring(0, extIndex) : names;
|
|
36
|
+
const limitedBaseName = baseName.substring(0, maxLength - ext.length - 3);
|
|
37
|
+
return `${limitedBaseName}...${ext}`;
|
|
38
|
+
}
|
|
39
|
+
|
|
31
40
|
return Promise.all(objectIds.map(id => client.store.objects.delete(id))).then((res) => {
|
|
32
41
|
const plural = res.length > 1 ? 's' : '';
|
|
33
42
|
toast({
|
|
34
43
|
status: 'success',
|
|
35
44
|
title: `${res.length} object${plural} deleted`,
|
|
36
|
-
description: `Objects ${res.map(d => d.id).join(", ")} have been deleted`,
|
|
45
|
+
description: `Objects ${(limitFilesName(res.map(d => d.id).join(", "), 100))} have been deleted`,
|
|
37
46
|
duration: 2000
|
|
38
47
|
});
|
|
39
48
|
|
|
@@ -71,7 +80,18 @@ export const DeleteObjectsAction: ObjectsActionSpec = {
|
|
|
71
80
|
name: 'Delete',
|
|
72
81
|
description: 'Delete the selected objects',
|
|
73
82
|
confirm: true,
|
|
74
|
-
confirmationText: 'Are you sure you want to delete the selected objects?',
|
|
83
|
+
confirmationText: 'Are you sure you want to delete all the selected objects? This action cannot be undone.',
|
|
84
|
+
component: DeleteObjectsActionComponent,
|
|
85
|
+
destructive: true
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
export const DeleteObjectsFromCollectionsAction: ObjectsActionSpec = {
|
|
90
|
+
id: 'deleteFromCollections',
|
|
91
|
+
name: 'Delete Objects',
|
|
92
|
+
description: 'Delete the selected objects',
|
|
93
|
+
confirm: true,
|
|
94
|
+
confirmationText: 'Are you sure you want to delete the selected objects?\nThis is not removable from collections.',
|
|
75
95
|
component: DeleteObjectsActionComponent,
|
|
76
96
|
destructive: true
|
|
77
97
|
}
|
|
@@ -114,12 +114,11 @@ export function DocumentUploadModal({
|
|
|
114
114
|
if (!collectionData && !selectedFolder) return null;
|
|
115
115
|
|
|
116
116
|
return (
|
|
117
|
-
<
|
|
118
|
-
<div className="flex items-center
|
|
119
|
-
<FolderIcon className="size-5 mr-2" />
|
|
117
|
+
<MessageBox className="mb-4" status="default" icon={<FolderIcon className="size-5" />}>
|
|
118
|
+
<div className="flex items-center">
|
|
120
119
|
<span className="font-medium">Upload Location:</span>
|
|
121
120
|
</div>
|
|
122
|
-
<div className="
|
|
121
|
+
<div className="text-sm mt-1">
|
|
123
122
|
{collectionData && (
|
|
124
123
|
<div className="flex items-center">
|
|
125
124
|
<span className="mr-1">Collection:</span>
|
|
@@ -133,7 +132,7 @@ export function DocumentUploadModal({
|
|
|
133
132
|
</div>
|
|
134
133
|
)}
|
|
135
134
|
</div>
|
|
136
|
-
</
|
|
135
|
+
</MessageBox>
|
|
137
136
|
);
|
|
138
137
|
};
|
|
139
138
|
|
|
@@ -167,7 +166,7 @@ export function DocumentUploadModal({
|
|
|
167
166
|
setResult(null);
|
|
168
167
|
setTitle(title);
|
|
169
168
|
setDescription("");
|
|
170
|
-
|
|
169
|
+
|
|
171
170
|
// Set initial files if provided
|
|
172
171
|
if (initialFiles && initialFiles.length > 0) {
|
|
173
172
|
setFiles(initialFiles);
|
|
@@ -315,6 +314,7 @@ export function DocumentUploadModal({
|
|
|
315
314
|
|
|
316
315
|
// Process files in batches of 50
|
|
317
316
|
const BATCH_SIZE = 50;
|
|
317
|
+
const PROGRESS_UPDATE_INTERVAL = 5; // Update progress every 5 files
|
|
318
318
|
|
|
319
319
|
// Helper function to process a batch of files
|
|
320
320
|
const processBatch = async (files: FileWithMetadata[], action: "create" | "update") => {
|
|
@@ -338,7 +338,8 @@ export function DocumentUploadModal({
|
|
|
338
338
|
});
|
|
339
339
|
}
|
|
340
340
|
|
|
341
|
-
// Process the batch
|
|
341
|
+
// Process the batch with progress tracking
|
|
342
|
+
let filesProcessedInBatch = 0;
|
|
342
343
|
await Promise.all(
|
|
343
344
|
batch.map(async (fileInfo) => {
|
|
344
345
|
try {
|
|
@@ -447,16 +448,23 @@ export function DocumentUploadModal({
|
|
|
447
448
|
// Mark the overall success as false if any file fails
|
|
448
449
|
result.success = false;
|
|
449
450
|
}
|
|
451
|
+
|
|
452
|
+
// Update progress every PROGRESS_UPDATE_INTERVAL files
|
|
453
|
+
filesProcessedInBatch++;
|
|
454
|
+
if (filesProcessedInBatch % PROGRESS_UPDATE_INTERVAL === 0 || filesProcessedInBatch === batch.length) {
|
|
455
|
+
setFileStatuses((currentStatuses) => {
|
|
456
|
+
const completedFiles = currentStatuses.filter(
|
|
457
|
+
(f) => f.status === "success" || f.status === "error",
|
|
458
|
+
).length;
|
|
459
|
+
const totalFiles = currentStatuses.length;
|
|
460
|
+
const progress = totalFiles > 0 ? Math.round((completedFiles / totalFiles) * 100) : 0;
|
|
461
|
+
setOverallProgress(progress);
|
|
462
|
+
return currentStatuses;
|
|
463
|
+
});
|
|
464
|
+
}
|
|
450
465
|
}),
|
|
451
466
|
);
|
|
452
467
|
|
|
453
|
-
// Calculate overall progress after each batch completion
|
|
454
|
-
const completedFiles = fileStatuses.filter(
|
|
455
|
-
(f) => f.status === "success" || f.status === "error",
|
|
456
|
-
).length;
|
|
457
|
-
const totalFiles = fileStatuses.length;
|
|
458
|
-
const progress = Math.round((completedFiles / totalFiles) * 100);
|
|
459
|
-
setOverallProgress(progress);
|
|
460
468
|
}
|
|
461
469
|
};
|
|
462
470
|
|
|
@@ -907,7 +915,7 @@ export function DocumentUploadModal({
|
|
|
907
915
|
};
|
|
908
916
|
|
|
909
917
|
return (
|
|
910
|
-
<VModal key={modalKey} isOpen={isOpen} onClose={handleClose} className="mx-auto">
|
|
918
|
+
<VModal key={modalKey} isOpen={isOpen} onClose={handleClose} className="mx-auto" disableCloseOnClickOutside>
|
|
911
919
|
<VModalTitle description={_description}>{_title}</VModalTitle>
|
|
912
920
|
{renderModalContent()}
|
|
913
921
|
{renderModalFooter()}
|