@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
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { Filter as BaseFilter, FilterProvider, FilterBtn, FilterBar, FilterClear, FilterGroup } from '@vertesia/ui/core';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { SearchInterface } from './utils/SearchInterface';
|
|
4
|
+
|
|
5
|
+
interface PromptsFacetsNavProps {
|
|
6
|
+
facets: {
|
|
7
|
+
role?: any[];
|
|
8
|
+
status?: any[];
|
|
9
|
+
tags?: any[];
|
|
10
|
+
};
|
|
11
|
+
search: SearchInterface;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// Hook to create filter groups for prompts
|
|
15
|
+
export function usePromptsFilterGroups(facets: PromptsFacetsNavProps['facets']): FilterGroup[] {
|
|
16
|
+
void facets;
|
|
17
|
+
const customFilterGroups: FilterGroup[] = [];
|
|
18
|
+
|
|
19
|
+
// Add name filter as text type
|
|
20
|
+
const nameFilterGroup = {
|
|
21
|
+
name: 'name',
|
|
22
|
+
placeholder: 'Name',
|
|
23
|
+
type: 'text' as const,
|
|
24
|
+
multiple: false
|
|
25
|
+
};
|
|
26
|
+
customFilterGroups.push(nameFilterGroup);
|
|
27
|
+
|
|
28
|
+
// Add role filter as select type if role facets are available
|
|
29
|
+
if (facets.role && facets.role.length > 0) {
|
|
30
|
+
const rolesFilterGroup = {
|
|
31
|
+
name: 'role',
|
|
32
|
+
placeholder: 'Role',
|
|
33
|
+
type: 'select' as const,
|
|
34
|
+
options: facets.role.map((facet: { _id: string; count: number }) => ({
|
|
35
|
+
label: facet._id,
|
|
36
|
+
value: facet._id,
|
|
37
|
+
count: facet.count
|
|
38
|
+
})),
|
|
39
|
+
};
|
|
40
|
+
customFilterGroups.push(rolesFilterGroup);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return customFilterGroups;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Hook to create filter change handler for prompts
|
|
47
|
+
export function usePromptsFilterHandler(search: SearchInterface) {
|
|
48
|
+
return (newFilters: BaseFilter[]) => {
|
|
49
|
+
if (newFilters.length === 0) {
|
|
50
|
+
// Clear filters without applying defaults - user wants to remove all filters
|
|
51
|
+
search.clearFilters(true, false);
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Clear all filters first without defaults, then apply new ones
|
|
56
|
+
search.clearFilters(false, false);
|
|
57
|
+
|
|
58
|
+
newFilters.forEach(filter => {
|
|
59
|
+
if (filter.value && filter.value.length > 0) {
|
|
60
|
+
const filterName = filter.name;
|
|
61
|
+
let filterValue;
|
|
62
|
+
if (filter.type === 'stringList') {
|
|
63
|
+
filterValue = filter.value.map(v => typeof v === 'string' ? v : v.value);
|
|
64
|
+
} else if (filter.multiple) {
|
|
65
|
+
filterValue = Array.isArray(filter.value)
|
|
66
|
+
? filter.value.map((v: any) => typeof v === 'object' && v.value ? v.value : v)
|
|
67
|
+
: [typeof filter.value === 'object' && (filter.value as any).value ? (filter.value as any).value : filter.value];
|
|
68
|
+
} else {
|
|
69
|
+
// Single value - don't wrap in array
|
|
70
|
+
filterValue = Array.isArray(filter.value) && filter.value[0] && typeof filter.value[0] === 'object'
|
|
71
|
+
? (filter.value[0] as any).value
|
|
72
|
+
: Array.isArray(filter.value) && filter.value[0]
|
|
73
|
+
? filter.value[0]
|
|
74
|
+
: filter.value;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
search.query[filterName] = filterValue;
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
search.search();
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// Component for prompts filtering
|
|
86
|
+
export function PromptsFacetsNav({ facets, search }: PromptsFacetsNavProps) {
|
|
87
|
+
const [filters, setFilters] = useState<BaseFilter[]>([]);
|
|
88
|
+
const filterGroups = usePromptsFilterGroups(facets);
|
|
89
|
+
const handleFilterLogic = usePromptsFilterHandler(search);
|
|
90
|
+
|
|
91
|
+
const handleFilterChange: React.Dispatch<React.SetStateAction<BaseFilter[]>> = (value) => {
|
|
92
|
+
const newFilters = typeof value === 'function' ? value(filters) : value;
|
|
93
|
+
setFilters(newFilters);
|
|
94
|
+
handleFilterLogic(newFilters);
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
return (
|
|
98
|
+
<FilterProvider
|
|
99
|
+
filterGroups={filterGroups}
|
|
100
|
+
filters={filters}
|
|
101
|
+
setFilters={handleFilterChange}
|
|
102
|
+
>
|
|
103
|
+
<div className="flex gap-2 items-center">
|
|
104
|
+
<FilterBtn />
|
|
105
|
+
<FilterBar />
|
|
106
|
+
<FilterClear />
|
|
107
|
+
</div>
|
|
108
|
+
</FilterProvider>
|
|
109
|
+
);
|
|
110
|
+
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { Filter as BaseFilter, FilterProvider, FilterBtn, FilterBar, FilterClear, FilterGroup } from '@vertesia/ui/core';
|
|
1
|
+
import { Button, Filter as BaseFilter, FilterProvider, FilterBtn, FilterBar, FilterClear, FilterGroup } from '@vertesia/ui/core';
|
|
2
2
|
import { useState } from 'react';
|
|
3
|
-
import { VEnvironmentFacet } from './VEnvironmentFacet';
|
|
4
|
-
import { VInteractionFacet } from './VInteractionFacet';
|
|
5
|
-
import { VStringFacet } from './VStringFacet';
|
|
6
|
-
import { VUserFacet } from './VUserFacet';
|
|
7
|
-
import { SearchInterface } from './
|
|
3
|
+
import { VEnvironmentFacet } from './utils/VEnvironmentFacet';
|
|
4
|
+
import { VInteractionFacet } from './utils/VInteractionFacet';
|
|
5
|
+
import { VStringFacet } from './utils/VStringFacet';
|
|
6
|
+
import { VUserFacet } from './utils/VUserFacet';
|
|
7
|
+
import { SearchInterface } from './utils/SearchInterface';
|
|
8
|
+
import { RefreshCw } from 'lucide-react';
|
|
8
9
|
|
|
9
10
|
interface RunsFacetsNavProps {
|
|
10
11
|
facets: {
|
|
@@ -24,6 +25,14 @@ interface RunsFacetsNavProps {
|
|
|
24
25
|
export function useRunsFilterGroups(facets: RunsFacetsNavProps['facets']): FilterGroup[] {
|
|
25
26
|
const customFilterGroups: FilterGroup[] = [];
|
|
26
27
|
|
|
28
|
+
const runIdFilterGroup = {
|
|
29
|
+
name: 'run_ids',
|
|
30
|
+
placeholder: 'Run ID',
|
|
31
|
+
type: 'text' as const,
|
|
32
|
+
multiple: false
|
|
33
|
+
};
|
|
34
|
+
customFilterGroups.push(runIdFilterGroup);
|
|
35
|
+
|
|
27
36
|
if (facets.interactions) {
|
|
28
37
|
const interactionFilterGroup = VInteractionFacet({
|
|
29
38
|
buckets: facets.interactions || [],
|
|
@@ -108,6 +117,14 @@ export function useRunsFilterGroups(facets: RunsFacetsNavProps['facets']): Filte
|
|
|
108
117
|
};
|
|
109
118
|
customFilterGroups.push(dateBeforeFilterGroup);
|
|
110
119
|
|
|
120
|
+
const workflowRunIdFilterGroup = {
|
|
121
|
+
name: 'workflow_run_ids',
|
|
122
|
+
placeholder: 'Workflow Run ID',
|
|
123
|
+
type: 'text' as const,
|
|
124
|
+
multiple: false
|
|
125
|
+
};
|
|
126
|
+
customFilterGroups.push(workflowRunIdFilterGroup);
|
|
127
|
+
|
|
111
128
|
return customFilterGroups;
|
|
112
129
|
}
|
|
113
130
|
|
|
@@ -130,18 +147,23 @@ export function useRunsFilterHandler(search: SearchInterface) {
|
|
|
130
147
|
if (filter.type === 'stringList') {
|
|
131
148
|
filterValue = filter.value.map(v => typeof v === 'string' ? v : v.value);
|
|
132
149
|
} else if (filter.multiple) {
|
|
133
|
-
filterValue = Array.isArray(filter.value)
|
|
150
|
+
filterValue = Array.isArray(filter.value)
|
|
134
151
|
? filter.value.map((v: any) => typeof v === 'object' && v.value ? v.value : v)
|
|
135
152
|
: [typeof filter.value === 'object' && (filter.value as any).value ? (filter.value as any).value : filter.value];
|
|
136
153
|
} else {
|
|
137
154
|
// Single value - don't wrap in array
|
|
138
155
|
filterValue = Array.isArray(filter.value) && filter.value[0] && typeof filter.value[0] === 'object'
|
|
139
156
|
? (filter.value[0] as any).value
|
|
140
|
-
: Array.isArray(filter.value) && filter.value[0]
|
|
157
|
+
: Array.isArray(filter.value) && filter.value[0]
|
|
141
158
|
? filter.value[0]
|
|
142
159
|
: filter.value;
|
|
143
160
|
}
|
|
144
161
|
|
|
162
|
+
// Force array format for backend fields that expect arrays
|
|
163
|
+
if ((filterName === 'run_ids' || filterName === 'workflow_run_ids') && !Array.isArray(filterValue)) {
|
|
164
|
+
filterValue = [filterValue];
|
|
165
|
+
}
|
|
166
|
+
|
|
145
167
|
search.query[filterName] = filterValue;
|
|
146
168
|
}
|
|
147
169
|
});
|
|
@@ -162,14 +184,23 @@ export function RunsFacetsNav({ facets, search }: RunsFacetsNavProps) {
|
|
|
162
184
|
handleFilterLogic(newFilters);
|
|
163
185
|
};
|
|
164
186
|
|
|
187
|
+
const handleRefetch = () => {
|
|
188
|
+
search.search();
|
|
189
|
+
}
|
|
190
|
+
|
|
165
191
|
return (
|
|
166
192
|
<FilterProvider
|
|
167
193
|
filterGroups={filterGroups}
|
|
168
194
|
filters={filters}
|
|
169
195
|
setFilters={handleFilterChange}
|
|
170
196
|
>
|
|
171
|
-
<div className=
|
|
197
|
+
<div className='flex justify-between mb-1'>
|
|
172
198
|
<FilterBtn />
|
|
199
|
+
<Button onClick={handleRefetch} variant='outline' title="Refresh">
|
|
200
|
+
<RefreshCw className="size-5" />
|
|
201
|
+
</Button>
|
|
202
|
+
</div>
|
|
203
|
+
<div className='flex gap-2 items-center'>
|
|
173
204
|
<FilterBar />
|
|
174
205
|
<FilterClear />
|
|
175
206
|
</div>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Filter as BaseFilter, FilterProvider, FilterBtn, FilterBar, FilterClear, FilterGroup } from '@vertesia/ui/core';
|
|
2
2
|
import { useState } from 'react';
|
|
3
|
-
import { VStringFacet } from './VStringFacet';
|
|
4
|
-
import { VUserFacet } from './VUserFacet';
|
|
5
|
-
import { SearchInterface } from './
|
|
3
|
+
import { VStringFacet } from './utils/VStringFacet';
|
|
4
|
+
import { VUserFacet } from './utils/VUserFacet';
|
|
5
|
+
import { SearchInterface } from './utils/SearchInterface';
|
|
6
6
|
|
|
7
7
|
interface WorkflowExecutionsFacetsNavProps {
|
|
8
8
|
facets: {
|
|
@@ -17,7 +17,7 @@ export function useWorkflowExecutionsFilterGroups(facets: WorkflowExecutionsFace
|
|
|
17
17
|
const customFilterGroups: FilterGroup[] = [];
|
|
18
18
|
|
|
19
19
|
customFilterGroups.push({
|
|
20
|
-
placeholder: '
|
|
20
|
+
placeholder: 'Workflow or Run ID',
|
|
21
21
|
name: 'name',
|
|
22
22
|
type: 'text',
|
|
23
23
|
options: [],
|
|
@@ -27,7 +27,8 @@ export function useWorkflowExecutionsFilterGroups(facets: WorkflowExecutionsFace
|
|
|
27
27
|
const statusFilterGroup = VStringFacet({
|
|
28
28
|
search: null as any, // This will be provided by the search context
|
|
29
29
|
buckets: facets.status || [],
|
|
30
|
-
name: '
|
|
30
|
+
name: 'status',
|
|
31
|
+
placeholder: 'Status'
|
|
31
32
|
});
|
|
32
33
|
customFilterGroups.push(statusFilterGroup);
|
|
33
34
|
}
|
|
@@ -35,7 +36,8 @@ export function useWorkflowExecutionsFilterGroups(facets: WorkflowExecutionsFace
|
|
|
35
36
|
if (facets.initiated_by) {
|
|
36
37
|
const initiatedByFilterGroup = VUserFacet({
|
|
37
38
|
buckets: facets.initiated_by || [],
|
|
38
|
-
name: '
|
|
39
|
+
name: 'initiated_by',
|
|
40
|
+
placeholder: 'Initiated By'
|
|
39
41
|
});
|
|
40
42
|
customFilterGroups.push(initiatedByFilterGroup);
|
|
41
43
|
}
|
|
@@ -76,14 +78,14 @@ export function useWorkflowExecutionsFilterHandler(search: SearchInterface) {
|
|
|
76
78
|
if (filter.type === 'stringList') {
|
|
77
79
|
filterValue = filter.value.map(v => typeof v === 'string' ? v : v.value);
|
|
78
80
|
} else if (filter.multiple) {
|
|
79
|
-
filterValue = Array.isArray(filter.value)
|
|
81
|
+
filterValue = Array.isArray(filter.value)
|
|
80
82
|
? filter.value.map((v: any) => typeof v === 'object' && v.value ? v.value : v)
|
|
81
83
|
: [typeof filter.value === 'object' && (filter.value as any).value ? (filter.value as any).value : filter.value];
|
|
82
84
|
} else {
|
|
83
85
|
// Single value - don't wrap in array
|
|
84
86
|
filterValue = Array.isArray(filter.value) && filter.value[0] && typeof filter.value[0] === 'object'
|
|
85
87
|
? (filter.value[0] as any).value
|
|
86
|
-
: Array.isArray(filter.value) && filter.value[0]
|
|
88
|
+
: Array.isArray(filter.value) && filter.value[0]
|
|
87
89
|
? filter.value[0]
|
|
88
90
|
: filter.value;
|
|
89
91
|
}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
export
|
|
2
|
-
export * from "./FacetsNav";
|
|
3
|
-
export { StringFacet } from "./StringFacet";
|
|
4
|
-
export { StringListFacet } from "./StringListFacet";
|
|
5
|
-
export { TypeFacet } from "./TypeFacet";
|
|
1
|
+
export * from "./utils/SearchInterface";
|
|
6
2
|
|
|
7
|
-
export
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
3
|
+
export { StringFacet } from "./utils/StringFacet";
|
|
4
|
+
export { StringListFacet } from "./utils/StringListFacet";
|
|
5
|
+
export { TypeFacet } from "./utils/TypeFacet";
|
|
6
|
+
export { VStringFacet } from "./utils/VStringFacet";
|
|
7
|
+
export { VTypeFacet } from "./utils/VTypeFacet";
|
|
8
|
+
export { VUserFacet } from "./utils/VUserFacet";
|
|
11
9
|
|
|
10
|
+
export { EnvironmentFacet } from "./EnvironmentFacet";
|
|
12
11
|
export { RunsFacetsNav, useRunsFilterGroups, useRunsFilterHandler } from "./RunsFacetsNav";
|
|
13
12
|
export { WorkflowExecutionsFacetsNav, useWorkflowExecutionsFilterGroups, useWorkflowExecutionsFilterHandler } from "./WorkflowExecutionsFacetsNav";
|
|
14
13
|
export { DocumentsFacetsNav, useDocumentFilterGroups, useDocumentFilterHandler } from "./DocumentsFacetsNav";
|
|
14
|
+
export { InteractionsFacetsNav, useInteractionsFilterGroups, useInteractionsFilterHandler } from "./InteractionsFacetsNav";
|
|
15
|
+
export { PromptsFacetsNav, usePromptsFilterGroups, usePromptsFilterHandler } from "./PromptsFacetsNav";
|
|
16
|
+
export { CollectionsFacetsNav, useCollectionsFilterGroups, useCollectionsFilterHandler } from "./CollectionsFacetsNav";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface defaultKeys {
|
|
2
|
+
[key: string]: string;
|
|
3
|
+
}
|
|
4
|
+
export interface SearchInterface {
|
|
5
|
+
getFilterValue(name: string): any;
|
|
6
|
+
setFilterValue(name: string, value: any): void;
|
|
7
|
+
clearFilters(autoSearch?: boolean, applyDefaults?: boolean): void;
|
|
8
|
+
search(applyDefaults?: boolean): Promise<boolean | undefined>;
|
|
9
|
+
setDefaultKeys(keys: defaultKeys[]): void;
|
|
10
|
+
readonly isRunning: boolean;
|
|
11
|
+
query: Record<string, any>;
|
|
12
|
+
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { FacetBucket } from "@vertesia/common";
|
|
2
2
|
import { FilterGroup } from "@vertesia/ui/core";
|
|
3
|
+
import { TypeRegistry } from "@vertesia/ui/session";
|
|
3
4
|
|
|
4
5
|
interface VTypeFacetProps {
|
|
5
6
|
buckets: FacetBucket[];
|
|
6
|
-
typeRegistry
|
|
7
|
+
typeRegistry?: TypeRegistry;
|
|
7
8
|
type?: 'select';
|
|
8
9
|
multiple?: boolean;
|
|
9
10
|
}
|
|
@@ -11,6 +12,9 @@ interface VTypeFacetProps {
|
|
|
11
12
|
export function VTypeFacet({ buckets, typeRegistry, type = 'select', multiple = false }: VTypeFacetProps) {
|
|
12
13
|
// Create a map for quick lookups of type names and counts
|
|
13
14
|
const typeDataMap = new Map();
|
|
15
|
+
if (!typeRegistry) {
|
|
16
|
+
console.warn("Type names cannot be resolved");
|
|
17
|
+
}
|
|
14
18
|
buckets.forEach((bucket) => {
|
|
15
19
|
let name;
|
|
16
20
|
let typeId = bucket._id;
|
|
@@ -19,7 +23,7 @@ export function VTypeFacet({ buckets, typeRegistry, type = 'select', multiple =
|
|
|
19
23
|
typeId = "Document";
|
|
20
24
|
name = "Document";
|
|
21
25
|
} else {
|
|
22
|
-
name = typeRegistry
|
|
26
|
+
name = typeRegistry?.getTypeName(bucket._id);
|
|
23
27
|
if (!name) {
|
|
24
28
|
console.warn("Content Object Type not found", bucket._id);
|
|
25
29
|
name = bucket._id;
|
|
@@ -33,10 +37,13 @@ export function VTypeFacet({ buckets, typeRegistry, type = 'select', multiple =
|
|
|
33
37
|
});
|
|
34
38
|
|
|
35
39
|
const options = buckets.map((bucket) => {
|
|
36
|
-
const
|
|
40
|
+
const actualId = bucket._id;
|
|
41
|
+
const displayKey = actualId || "Document";
|
|
42
|
+
const typeData = typeDataMap.get(displayKey);
|
|
43
|
+
|
|
37
44
|
return {
|
|
38
|
-
value:
|
|
39
|
-
label: `(${bucket.count})`
|
|
45
|
+
value: actualId,
|
|
46
|
+
label: typeData ? `${typeData.name} (${typeData.count})` : `Unknown (${bucket.count})`
|
|
40
47
|
};
|
|
41
48
|
});
|
|
42
49
|
|
|
@@ -2,7 +2,9 @@ import clsx from 'clsx';
|
|
|
2
2
|
import { ReactElement, ReactNode } from 'react';
|
|
3
3
|
|
|
4
4
|
import { ChevronRight, Info } from 'lucide-react';
|
|
5
|
-
import { VTooltip } from '@vertesia/ui/core';
|
|
5
|
+
import { VTooltip, Breadcrumbs } from '@vertesia/ui/core';
|
|
6
|
+
import { capitalize } from 'lodash-es';
|
|
7
|
+
import { useNavigate } from '@vertesia/ui/router';
|
|
6
8
|
|
|
7
9
|
interface GenericPageNavHeaderProps {
|
|
8
10
|
title: string | ReactElement;
|
|
@@ -12,22 +14,83 @@ interface GenericPageNavHeaderProps {
|
|
|
12
14
|
isCompact?: boolean
|
|
13
15
|
children?: ReactNode
|
|
14
16
|
className?: string
|
|
17
|
+
useDynamicBreadcrumbs?: boolean;
|
|
15
18
|
}
|
|
16
19
|
|
|
17
|
-
export function GenericPageNavHeader({ className, children, title, description, actions, breadcrumbs, isCompact = false }: GenericPageNavHeaderProps) {
|
|
20
|
+
export function GenericPageNavHeader({ className, children, title, description, actions, breadcrumbs, isCompact = false, useDynamicBreadcrumbs = true }: GenericPageNavHeaderProps) {
|
|
21
|
+
const navigate = useNavigate();
|
|
22
|
+
|
|
23
|
+
const buildBreadcrumbLabel = (entry: any): string => {
|
|
24
|
+
const href = entry?.href || '';
|
|
25
|
+
if (!href) return 'Page';
|
|
26
|
+
|
|
27
|
+
const cleanHref = href.split('#')[0].split('?')[0];
|
|
28
|
+
const pathSegments: string[] = (cleanHref as string).split('/').filter((segment: string) => segment.length > 0);
|
|
29
|
+
|
|
30
|
+
if (pathSegments.length === 3) {
|
|
31
|
+
const secondSegment = pathSegments[1];
|
|
32
|
+
return `${capitalize(secondSegment)} Detail`;
|
|
33
|
+
} else if (pathSegments.length >= 2) {
|
|
34
|
+
return capitalize(pathSegments[pathSegments.length - 1]);
|
|
35
|
+
} else if (pathSegments.length === 1) {
|
|
36
|
+
return capitalize(pathSegments[0]);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return 'Page';
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// Build breadcrumb items from history chain and current breadcrumbs
|
|
43
|
+
const buildBreadcrumbItems = (): Array<{ label: string, href?: string, onClick?: () => void }> => {
|
|
44
|
+
const items: Array<{ label: string, href?: string, onClick?: () => void, clearHistory?: boolean }> = [];
|
|
45
|
+
|
|
46
|
+
// Add items from history chain
|
|
47
|
+
if (useDynamicBreadcrumbs && typeof window !== 'undefined' && window.history.state?.historyChain) {
|
|
48
|
+
const historyChain = window.history.state.historyChain;
|
|
49
|
+
historyChain.forEach((entry: any, index: number) => {
|
|
50
|
+
const stepsBack = historyChain.length - index;
|
|
51
|
+
items.push({
|
|
52
|
+
label: buildBreadcrumbLabel(entry),
|
|
53
|
+
href: entry.href,
|
|
54
|
+
onClick: () => window.history.go(-stepsBack)
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Add current page breadcrumbs
|
|
60
|
+
if (breadcrumbs && breadcrumbs.length > 0) {
|
|
61
|
+
breadcrumbs.forEach((breadcrumb: any) => {
|
|
62
|
+
// Extract text content from React element
|
|
63
|
+
const label = typeof breadcrumb?.props?.children === 'string'
|
|
64
|
+
? breadcrumb.props.children
|
|
65
|
+
: 'Page';
|
|
66
|
+
|
|
67
|
+
items.push(( breadcrumb?.props?.href ) ? {
|
|
68
|
+
href: breadcrumb?.props?.href,
|
|
69
|
+
label: label,
|
|
70
|
+
onClick: () => navigate(breadcrumb.props.href, { replace: breadcrumb.props.clearBreadcrumbs }),
|
|
71
|
+
} : {
|
|
72
|
+
label: label
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return items;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
const breadcrumbItems = buildBreadcrumbItems();
|
|
81
|
+
|
|
18
82
|
return (
|
|
19
83
|
<div className={clsx(isCompact ? 'pb-0' : 'pb-2', 'p-4 flex flex-col', className)}>
|
|
20
84
|
<div className='flex items-start gap-4'>
|
|
21
85
|
<div className="w-full flex place-content-between h-auto min-h-8 flex-col items-start">
|
|
22
86
|
<nav className="flex-1 flex justify-start text-xs">
|
|
23
|
-
{
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
})}
|
|
87
|
+
{breadcrumbItems.length > 0 && (
|
|
88
|
+
<Breadcrumbs
|
|
89
|
+
path={breadcrumbItems}
|
|
90
|
+
separator={<ChevronRight className="w-3.5 h-3.5" />}
|
|
91
|
+
maxItems={4}
|
|
92
|
+
/>
|
|
93
|
+
)}
|
|
31
94
|
</nav>
|
|
32
95
|
<div className='flex gap-2 items-center'>
|
|
33
96
|
<h1 className="text-xl font-semibold break-all">{title}</h1>
|
|
@@ -2,6 +2,7 @@ import { useUserSession, TypeRegistry } from "@vertesia/ui/session";
|
|
|
2
2
|
import { Collection } from "@vertesia/common";
|
|
3
3
|
import { DocumentSearchResultsWithDropZone, DocumentSearchResults } from "../objects/DocumentSearchResults";
|
|
4
4
|
import { useToast } from "@vertesia/ui/core";
|
|
5
|
+
import { useDocumentSearch } from "../objects/search/DocumentSearchContext";
|
|
5
6
|
|
|
6
7
|
|
|
7
8
|
interface BrowseCollectionViewProps {
|
|
@@ -10,6 +11,9 @@ interface BrowseCollectionViewProps {
|
|
|
10
11
|
export function BrowseCollectionView({ collection }: BrowseCollectionViewProps) {
|
|
11
12
|
const toast = useToast();
|
|
12
13
|
const { client, typeRegistry } = useUserSession();
|
|
14
|
+
const search = useDocumentSearch();
|
|
15
|
+
search.query.all_revisions = true;
|
|
16
|
+
|
|
13
17
|
const onUploadDone = async (objectIds: string[]) => {
|
|
14
18
|
if (objectIds.length > 0) {
|
|
15
19
|
await client.store.collections.addMembers(collection.id, objectIds).catch(err => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CreateCollectionPayload } from "@vertesia/common";
|
|
2
|
-
import { useToast, VModalBody, FormItem,
|
|
2
|
+
import { useToast, VModalBody, FormItem, VModalFooter, Input, Switch, Button, VModal, VModalTitle, Textarea } from "@vertesia/ui/core";
|
|
3
3
|
import { SelectContentType } from "../types/SelectContentType";
|
|
4
4
|
import { useNavigate } from "@vertesia/ui/router";
|
|
5
5
|
import { useUserSession } from "@vertesia/ui/session";
|
|
@@ -80,10 +80,9 @@ export function CreateCollectionForm({ onClose, redirect = true, onAddToCollecti
|
|
|
80
80
|
<Input type="text" value={payload.name || ""} onChange={(value) => setPayloadProp("name", value)} />
|
|
81
81
|
</FormItem>
|
|
82
82
|
<FormItem label="Description" className="mt-2">
|
|
83
|
-
<
|
|
84
|
-
className={Styles.INPUT}
|
|
83
|
+
<Textarea
|
|
85
84
|
value={payload.description || ""}
|
|
86
|
-
onChange={(ev) => setPayloadProp("description", ev
|
|
85
|
+
onChange={(ev) => setPayloadProp("description", ev)}
|
|
87
86
|
/>
|
|
88
87
|
</FormItem>
|
|
89
88
|
<FormItem label="Dynamic Collection" className="mt-2" direction="row" description="Dynamically fetch content for the collection based on a query. If not enabled, then content must be added by users or agents.">
|