@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.
Files changed (69) hide show
  1. package/lib/esm/core/components/shadcn/filters/comboBox/SelectCombobox.js +8 -7
  2. package/lib/esm/core/components/shadcn/filters/comboBox/SelectCombobox.js.map +1 -1
  3. package/lib/esm/core/components/shadcn/filters/filters.js +1 -1
  4. package/lib/esm/core/components/shadcn/filters/filters.js.map +1 -1
  5. package/lib/esm/features/agent/PayloadBuilder.js +13 -0
  6. package/lib/esm/features/agent/PayloadBuilder.js.map +1 -1
  7. package/lib/esm/features/agent/chat/DocumentPanel.js +1 -1
  8. package/lib/esm/features/agent/chat/DocumentPanel.js.map +1 -1
  9. package/lib/esm/features/facets/AgentRunnerFacetsNav.js +2 -2
  10. package/lib/esm/features/facets/AgentRunnerFacetsNav.js.map +1 -1
  11. package/lib/esm/features/facets/DocumentsFacetsNav.js +8 -5
  12. package/lib/esm/features/facets/DocumentsFacetsNav.js.map +1 -1
  13. package/lib/esm/features/facets/InteractionsFacetsNav.js.map +1 -1
  14. package/lib/esm/features/facets/RunsFacetsNav.js +2 -2
  15. package/lib/esm/features/facets/RunsFacetsNav.js.map +1 -1
  16. package/lib/esm/features/store/objects/DocumentSearchResults.js +2 -1
  17. package/lib/esm/features/store/objects/DocumentSearchResults.js.map +1 -1
  18. package/lib/esm/features/store/objects/layout/documentLayout.js +2 -2
  19. package/lib/esm/features/store/objects/layout/documentLayout.js.map +1 -1
  20. package/lib/esm/features/store/objects/search/DocumentSearchContext.js +7 -1
  21. package/lib/esm/features/store/objects/search/DocumentSearchContext.js.map +1 -1
  22. package/lib/esm/features/store/types/ContentObjectTypesSearch.js +2 -2
  23. package/lib/esm/features/store/types/ContentObjectTypesSearch.js.map +1 -1
  24. package/lib/esm/layout/FullHeightLayout.js +3 -0
  25. package/lib/esm/layout/FullHeightLayout.js.map +1 -1
  26. package/lib/tsconfig.tsbuildinfo +1 -1
  27. package/lib/types/core/components/shadcn/filters/comboBox/SelectCombobox.d.ts +2 -1
  28. package/lib/types/core/components/shadcn/filters/comboBox/SelectCombobox.d.ts.map +1 -1
  29. package/lib/types/core/components/shadcn/filters/filters.d.ts.map +1 -1
  30. package/lib/types/features/agent/PayloadBuilder.d.ts +5 -0
  31. package/lib/types/features/agent/PayloadBuilder.d.ts.map +1 -1
  32. package/lib/types/features/facets/AgentRunnerFacetsNav.d.ts +3 -1
  33. package/lib/types/features/facets/AgentRunnerFacetsNav.d.ts.map +1 -1
  34. package/lib/types/features/facets/DocumentsFacetsNav.d.ts +2 -7
  35. package/lib/types/features/facets/DocumentsFacetsNav.d.ts.map +1 -1
  36. package/lib/types/features/facets/InteractionsFacetsNav.d.ts +2 -3
  37. package/lib/types/features/facets/InteractionsFacetsNav.d.ts.map +1 -1
  38. package/lib/types/features/facets/RunsFacetsNav.d.ts +3 -1
  39. package/lib/types/features/facets/RunsFacetsNav.d.ts.map +1 -1
  40. package/lib/types/features/facets/utils/SearchInterface.d.ts +2 -0
  41. package/lib/types/features/facets/utils/SearchInterface.d.ts.map +1 -1
  42. package/lib/types/features/store/objects/DocumentSearchResults.d.ts.map +1 -1
  43. package/lib/types/features/store/objects/search/DocumentSearchContext.d.ts +6 -6
  44. package/lib/types/features/store/objects/search/DocumentSearchContext.d.ts.map +1 -1
  45. package/lib/types/features/store/types/ContentObjectTypesSearch.d.ts.map +1 -1
  46. package/lib/types/features/user/UserInfo.d.ts +2 -2
  47. package/lib/types/layout/FullHeightLayout.d.ts +1 -0
  48. package/lib/types/layout/FullHeightLayout.d.ts.map +1 -1
  49. package/lib/vertesia-ui-core.js +1 -1
  50. package/lib/vertesia-ui-core.js.map +1 -1
  51. package/lib/vertesia-ui-features.js +1 -1
  52. package/lib/vertesia-ui-features.js.map +1 -1
  53. package/lib/vertesia-ui-layout.js +1 -1
  54. package/lib/vertesia-ui-layout.js.map +1 -1
  55. package/package.json +6 -6
  56. package/src/core/components/shadcn/filters/comboBox/SelectCombobox.tsx +14 -7
  57. package/src/core/components/shadcn/filters/filters.tsx +1 -0
  58. package/src/features/agent/PayloadBuilder.tsx +16 -0
  59. package/src/features/agent/chat/DocumentPanel.tsx +1 -1
  60. package/src/features/facets/AgentRunnerFacetsNav.tsx +30 -8
  61. package/src/features/facets/DocumentsFacetsNav.tsx +11 -12
  62. package/src/features/facets/InteractionsFacetsNav.tsx +3 -4
  63. package/src/features/facets/RunsFacetsNav.tsx +31 -8
  64. package/src/features/facets/utils/SearchInterface.tsx +2 -0
  65. package/src/features/store/objects/DocumentSearchResults.tsx +25 -20
  66. package/src/features/store/objects/layout/documentLayout.tsx +4 -4
  67. package/src/features/store/objects/search/DocumentSearchContext.ts +10 -4
  68. package/src/features/store/types/ContentObjectTypesSearch.tsx +17 -12
  69. 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 { ComputeFacetsResponse, ZenoClient } from '@vertesia/client';
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<ComputeFacetsResponse>({});
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
- return (this.facets.value as any)[name]?.buckets || [];
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 gap-4 h-full">
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 overflow-y-auto">
105
- {
106
- (!isLoading && objects?.length === 0) ? (
107
- <EmptyCollection title={t('store.noType')} buttonLabel={t('store.createType')} onClick={onOpenCreateModal}>
108
- {t('store.getStartedTypes')}
109
- </EmptyCollection >
110
- ) : (
111
- <ContentObjectTypesTable objects={objects} isLoading={isLoading} />
112
- )
113
- }
114
- <CreateOrUpdateTypeModal okLabel="Create" title={t('store.createType')} isOpen={showCreateModal} onClose={onCloseCreateModal} />
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">