@vertesia/ui 1.1.0-dev.20260427.060440Z → 1.1.1-dev.20260505.160410Z
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/shadcn/filters/comboBox/SelectCombobox.js +8 -7
- package/lib/esm/core/components/shadcn/filters/comboBox/SelectCombobox.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/filters.js +1 -1
- package/lib/esm/core/components/shadcn/filters/filters.js.map +1 -1
- package/lib/esm/features/agent/PayloadBuilder.js +13 -0
- package/lib/esm/features/agent/PayloadBuilder.js.map +1 -1
- package/lib/esm/features/agent/chat/DocumentPanel.js +1 -1
- package/lib/esm/features/agent/chat/DocumentPanel.js.map +1 -1
- package/lib/esm/features/facets/AgentRunnerFacetsNav.js +2 -2
- package/lib/esm/features/facets/AgentRunnerFacetsNav.js.map +1 -1
- package/lib/esm/features/facets/DocumentsFacetsNav.js +8 -5
- package/lib/esm/features/facets/DocumentsFacetsNav.js.map +1 -1
- package/lib/esm/features/facets/InteractionsFacetsNav.js.map +1 -1
- package/lib/esm/features/facets/RunsFacetsNav.js +2 -2
- package/lib/esm/features/facets/RunsFacetsNav.js.map +1 -1
- package/lib/esm/features/store/objects/DocumentSearchResults.js +2 -1
- package/lib/esm/features/store/objects/DocumentSearchResults.js.map +1 -1
- package/lib/esm/features/store/objects/layout/documentLayout.js +2 -2
- package/lib/esm/features/store/objects/layout/documentLayout.js.map +1 -1
- package/lib/esm/features/store/objects/search/DocumentSearchContext.js +7 -1
- package/lib/esm/features/store/objects/search/DocumentSearchContext.js.map +1 -1
- package/lib/esm/features/store/types/ContentObjectTypesSearch.js +2 -2
- package/lib/esm/features/store/types/ContentObjectTypesSearch.js.map +1 -1
- package/lib/esm/layout/FullHeightLayout.js +3 -0
- package/lib/esm/layout/FullHeightLayout.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/core/components/shadcn/filters/comboBox/SelectCombobox.d.ts +2 -1
- package/lib/types/core/components/shadcn/filters/comboBox/SelectCombobox.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/filters/filters.d.ts.map +1 -1
- package/lib/types/features/agent/PayloadBuilder.d.ts +5 -0
- package/lib/types/features/agent/PayloadBuilder.d.ts.map +1 -1
- package/lib/types/features/facets/AgentRunnerFacetsNav.d.ts +3 -1
- package/lib/types/features/facets/AgentRunnerFacetsNav.d.ts.map +1 -1
- package/lib/types/features/facets/DocumentsFacetsNav.d.ts +2 -7
- package/lib/types/features/facets/DocumentsFacetsNav.d.ts.map +1 -1
- package/lib/types/features/facets/InteractionsFacetsNav.d.ts +2 -3
- package/lib/types/features/facets/InteractionsFacetsNav.d.ts.map +1 -1
- package/lib/types/features/facets/RunsFacetsNav.d.ts +3 -1
- package/lib/types/features/facets/RunsFacetsNav.d.ts.map +1 -1
- package/lib/types/features/facets/utils/SearchInterface.d.ts +2 -0
- package/lib/types/features/facets/utils/SearchInterface.d.ts.map +1 -1
- package/lib/types/features/store/objects/DocumentSearchResults.d.ts.map +1 -1
- package/lib/types/features/store/objects/search/DocumentSearchContext.d.ts +6 -6
- package/lib/types/features/store/objects/search/DocumentSearchContext.d.ts.map +1 -1
- package/lib/types/features/store/types/ContentObjectTypesSearch.d.ts.map +1 -1
- package/lib/types/features/user/UserInfo.d.ts +2 -2
- package/lib/types/layout/FullHeightLayout.d.ts +1 -0
- package/lib/types/layout/FullHeightLayout.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-features.js +1 -1
- package/lib/vertesia-ui-features.js.map +1 -1
- package/lib/vertesia-ui-layout.js +1 -1
- package/lib/vertesia-ui-layout.js.map +1 -1
- package/package.json +6 -6
- package/src/core/components/shadcn/filters/comboBox/SelectCombobox.tsx +14 -7
- package/src/core/components/shadcn/filters/filters.tsx +1 -0
- package/src/features/agent/PayloadBuilder.tsx +16 -0
- package/src/features/agent/chat/DocumentPanel.tsx +1 -1
- package/src/features/facets/AgentRunnerFacetsNav.tsx +30 -8
- package/src/features/facets/DocumentsFacetsNav.tsx +11 -12
- package/src/features/facets/InteractionsFacetsNav.tsx +3 -4
- package/src/features/facets/RunsFacetsNav.tsx +31 -8
- package/src/features/facets/utils/SearchInterface.tsx +2 -0
- package/src/features/store/objects/DocumentSearchResults.tsx +25 -20
- package/src/features/store/objects/layout/documentLayout.tsx +4 -4
- package/src/features/store/objects/search/DocumentSearchContext.ts +10 -4
- package/src/features/store/types/ContentObjectTypesSearch.tsx +17 -12
- package/src/layout/FullHeightLayout.tsx +15 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createContext, useContext } from 'react';
|
|
2
2
|
|
|
3
3
|
import { SharedState, useWatchSharedState } from '@vertesia/ui/core';
|
|
4
|
-
import {
|
|
5
|
-
import { ComplexSearchPayload, ComplexSearchQuery, ComputeObjectFacetPayload, ContentObjectItem, FacetBucket, FacetSpec, ObjectSearchQuery } from '@vertesia/common';
|
|
4
|
+
import { ZenoClient } from '@vertesia/client';
|
|
5
|
+
import { ComplexSearchPayload, ComplexSearchQuery, ComputeObjectFacetPayload, ComputedFacetResponse, ContentObjectItem, FacetBucket, FacetSpec, ObjectSearchQuery } from '@vertesia/common';
|
|
6
6
|
import { SearchInterface } from '@vertesia/ui/features'
|
|
7
7
|
|
|
8
8
|
interface DocumentSearchResult {
|
|
@@ -16,7 +16,7 @@ interface DocumentSearchResult {
|
|
|
16
16
|
export class DocumentSearch implements SearchInterface {
|
|
17
17
|
|
|
18
18
|
collectionId?: string;
|
|
19
|
-
facets = new SharedState<
|
|
19
|
+
facets = new SharedState<ComputedFacetResponse>({});
|
|
20
20
|
result = new SharedState<DocumentSearchResult>({ objects: [], isLoading: false });
|
|
21
21
|
|
|
22
22
|
facetSpecs: FacetSpec[] = [];
|
|
@@ -79,7 +79,8 @@ export class DocumentSearch implements SearchInterface {
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
getFacetBuckets(name: string): FacetBucket[] {
|
|
82
|
-
|
|
82
|
+
const value = this.facets.value[name];
|
|
83
|
+
return Array.isArray(value) ? value : [];
|
|
83
84
|
}
|
|
84
85
|
|
|
85
86
|
resetFacets() {
|
|
@@ -161,6 +162,11 @@ export class DocumentSearch implements SearchInterface {
|
|
|
161
162
|
|
|
162
163
|
return true;
|
|
163
164
|
}).catch((err) => {
|
|
165
|
+
// index_not_found_exception means the data store has no index yet — treat as empty
|
|
166
|
+
if (err?.status === 404) {
|
|
167
|
+
this.result.value = { isLoading: false, objects: [], hasMore: false };
|
|
168
|
+
return false;
|
|
169
|
+
}
|
|
164
170
|
this.result.value = {
|
|
165
171
|
error: err,
|
|
166
172
|
isLoading: false,
|
|
@@ -96,22 +96,27 @@ export function ContentObjectTypesSearch({ isDirty = false }: ContentObjectTypes
|
|
|
96
96
|
};
|
|
97
97
|
|
|
98
98
|
return (
|
|
99
|
-
<div className="flex flex-col
|
|
99
|
+
<div className="flex flex-col flex-1 min-h-0">
|
|
100
100
|
<div className="flex flex-shrink-0 gap-4">
|
|
101
101
|
<Input placeholder={t('store.filterByName')} value={searchTerm} onChange={setSearchTerm} />
|
|
102
102
|
<SelectBox className="w-60" isClearable options={Object.values(ChunkableOptions)} value={chunkable} onChange={onChunkableChange} placeholder={t('store.isChunkable')} />
|
|
103
103
|
</div>
|
|
104
|
-
<div className="flex-1
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
{t('store.
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
104
|
+
<div className="flex flex-col w-full flex-1 min-h-0 border rounded-md my-2">
|
|
105
|
+
<div className="flex-1 min-h-0 overflow-y-auto">
|
|
106
|
+
{
|
|
107
|
+
(!isLoading && objects?.length === 0) ? (
|
|
108
|
+
<EmptyCollection title={t('store.noType')} buttonLabel={t('store.createType')} onClick={onOpenCreateModal}>
|
|
109
|
+
{t('store.getStartedTypes')}
|
|
110
|
+
</EmptyCollection >
|
|
111
|
+
) : (
|
|
112
|
+
<>
|
|
113
|
+
<ContentObjectTypesTable objects={objects} isLoading={isLoading} />
|
|
114
|
+
<div ref={loadMoreRef} className="h-4 w-full" />
|
|
115
|
+
</>
|
|
116
|
+
)
|
|
117
|
+
}
|
|
118
|
+
<CreateOrUpdateTypeModal okLabel="Create" title={t('store.createType')} isOpen={showCreateModal} onClose={onCloseCreateModal} />
|
|
119
|
+
</div>
|
|
115
120
|
</div>
|
|
116
121
|
</div>
|
|
117
122
|
)
|
|
@@ -73,6 +73,21 @@ FullHeightLayout.HR = function HDivider({ }: HDividerProps) {
|
|
|
73
73
|
);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
+
FullHeightLayout.Flex = function Flex({ className, children }: BodyProps) {
|
|
77
|
+
return (
|
|
78
|
+
<div
|
|
79
|
+
className={clsx(
|
|
80
|
+
"grow flex flex-col",
|
|
81
|
+
"overflow-hidden min-h-0",
|
|
82
|
+
"p-2",
|
|
83
|
+
className
|
|
84
|
+
)}
|
|
85
|
+
>
|
|
86
|
+
{children}
|
|
87
|
+
</div>
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
|
|
76
91
|
FullHeightLayout.Tab = function Tab({ children }: { children: React.ReactNode }) {
|
|
77
92
|
return (
|
|
78
93
|
<div className="flex flex-col h-full">
|