@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.
Files changed (409) hide show
  1. package/lib/esm/core/components/Panel.js +8 -0
  2. package/lib/esm/core/components/Panel.js.map +1 -0
  3. package/lib/esm/core/components/SelectBox.js +1 -1
  4. package/lib/esm/core/components/SelectBox.js.map +1 -1
  5. package/lib/esm/core/components/SelectList.js +18 -13
  6. package/lib/esm/core/components/SelectList.js.map +1 -1
  7. package/lib/esm/core/components/SidePanel.js +2 -2
  8. package/lib/esm/core/components/SidePanel.js.map +1 -1
  9. package/lib/esm/core/components/index.js +1 -1
  10. package/lib/esm/core/components/index.js.map +1 -1
  11. package/lib/esm/core/components/shadcn/breadcrumb.js +29 -8
  12. package/lib/esm/core/components/shadcn/breadcrumb.js.map +1 -1
  13. package/lib/esm/core/components/shadcn/button.js +3 -2
  14. package/lib/esm/core/components/shadcn/button.js.map +1 -1
  15. package/lib/esm/core/components/shadcn/filters/filterBar.js +41 -14
  16. package/lib/esm/core/components/shadcn/filters/filterBar.js.map +1 -1
  17. package/lib/esm/core/components/shadcn/index.js +2 -0
  18. package/lib/esm/core/components/shadcn/index.js.map +1 -1
  19. package/lib/esm/core/components/shadcn/input.js +4 -1
  20. package/lib/esm/core/components/shadcn/input.js.map +1 -1
  21. package/lib/esm/core/components/shadcn/resizeable.js +15 -0
  22. package/lib/esm/core/components/shadcn/resizeable.js.map +1 -0
  23. package/lib/esm/core/components/shadcn/selectBox.js +15 -9
  24. package/lib/esm/core/components/shadcn/selectBox.js.map +1 -1
  25. package/lib/esm/core/components/shadcn/tabs.js +20 -8
  26. package/lib/esm/core/components/shadcn/tabs.js.map +1 -1
  27. package/lib/esm/core/components/shadcn/textarea.js +7 -0
  28. package/lib/esm/core/components/shadcn/textarea.js.map +1 -0
  29. package/lib/esm/core/components/table/index.js +1 -1
  30. package/lib/esm/core/components/table/index.js.map +1 -1
  31. package/lib/esm/core/hooks/CompositeState.js +139 -1
  32. package/lib/esm/core/hooks/CompositeState.js.map +1 -1
  33. package/lib/esm/core/hooks/index.js +1 -0
  34. package/lib/esm/core/hooks/index.js.map +1 -1
  35. package/lib/esm/core/hooks/useScrollableSearch.js +92 -0
  36. package/lib/esm/core/hooks/useScrollableSearch.js.map +1 -0
  37. package/lib/esm/env/index.js +1 -1
  38. package/lib/esm/env/index.js.map +1 -1
  39. package/lib/esm/features/agent/PayloadBuilder.js +80 -55
  40. package/lib/esm/features/agent/PayloadBuilder.js.map +1 -1
  41. package/lib/esm/features/agent/chat/ModernAgentConversation.js +22 -24
  42. package/lib/esm/features/agent/chat/ModernAgentConversation.js.map +1 -1
  43. package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +2 -3
  44. package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +1 -1
  45. package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js +2 -2
  46. package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js.map +1 -1
  47. package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.js +15 -20
  48. package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.js.map +1 -1
  49. package/lib/esm/features/agent/chat/ModernAgentOutput/PlanPanel.js +1 -0
  50. package/lib/esm/features/agent/chat/ModernAgentOutput/PlanPanel.js.map +1 -1
  51. package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.js +3 -3
  52. package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.js.map +1 -1
  53. package/lib/esm/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js +6 -6
  54. package/lib/esm/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js.map +1 -1
  55. package/lib/esm/features/facets/CollectionsFacetsNav.js +85 -0
  56. package/lib/esm/features/facets/CollectionsFacetsNav.js.map +1 -0
  57. package/lib/esm/features/facets/DocumentsFacetsNav.js +19 -7
  58. package/lib/esm/features/facets/DocumentsFacetsNav.js.map +1 -1
  59. package/lib/esm/features/facets/EnvironmentFacet.js +1 -1
  60. package/lib/esm/features/facets/EnvironmentFacet.js.map +1 -1
  61. package/lib/esm/features/facets/InteractionsFacetsNav.js +88 -0
  62. package/lib/esm/features/facets/InteractionsFacetsNav.js.map +1 -0
  63. package/lib/esm/features/facets/PromptsFacetsNav.js +80 -0
  64. package/lib/esm/features/facets/PromptsFacetsNav.js.map +1 -0
  65. package/lib/esm/features/facets/RunsFacetsNav.js +28 -6
  66. package/lib/esm/features/facets/RunsFacetsNav.js.map +1 -1
  67. package/lib/esm/features/facets/WorkflowExecutionsFacetsNav.js +7 -5
  68. package/lib/esm/features/facets/WorkflowExecutionsFacetsNav.js.map +1 -1
  69. package/lib/esm/features/facets/index.js +10 -8
  70. package/lib/esm/features/facets/index.js.map +1 -1
  71. package/lib/esm/features/facets/utils/SearchInterface.js +2 -0
  72. package/lib/esm/features/facets/utils/SearchInterface.js.map +1 -0
  73. package/lib/esm/features/facets/utils/StringFacet.js.map +1 -0
  74. package/lib/esm/features/facets/utils/StringListFacet.js.map +1 -0
  75. package/lib/esm/features/facets/utils/TypeFacet.js.map +1 -0
  76. package/lib/esm/features/facets/utils/VEnvironmentFacet.js.map +1 -0
  77. package/lib/esm/features/facets/utils/VInteractionFacet.js.map +1 -0
  78. package/lib/esm/features/facets/utils/VStringFacet.js.map +1 -0
  79. package/lib/esm/features/facets/{VTypeFacet.js → utils/VTypeFacet.js} +9 -4
  80. package/lib/esm/features/facets/utils/VTypeFacet.js.map +1 -0
  81. package/lib/esm/features/facets/{VUserFacet.js → utils/VUserFacet.js} +1 -1
  82. package/lib/esm/features/facets/utils/VUserFacet.js.map +1 -0
  83. package/lib/esm/features/facets/utils/utils.js.map +1 -0
  84. package/lib/esm/features/layout/GenericPageNavHeader.js +58 -5
  85. package/lib/esm/features/layout/GenericPageNavHeader.js.map +1 -1
  86. package/lib/esm/features/store/collections/BrowseCollectionView.js +3 -0
  87. package/lib/esm/features/store/collections/BrowseCollectionView.js.map +1 -1
  88. package/lib/esm/features/store/collections/CreateCollection.js +2 -2
  89. package/lib/esm/features/store/collections/CreateCollection.js.map +1 -1
  90. package/lib/esm/features/store/collections/EditCollectionView.js +43 -31
  91. package/lib/esm/features/store/collections/EditCollectionView.js.map +1 -1
  92. package/lib/esm/features/store/collections/SelectCollection.js +46 -16
  93. package/lib/esm/features/store/collections/SelectCollection.js.map +1 -1
  94. package/lib/esm/features/store/objects/DocumentSearchResults.js +43 -13
  95. package/lib/esm/features/store/objects/DocumentSearchResults.js.map +1 -1
  96. package/lib/esm/features/store/objects/DocumentTable.js +6 -6
  97. package/lib/esm/features/store/objects/DocumentTable.js.map +1 -1
  98. package/lib/esm/features/store/objects/components/ContentOverview.js +225 -87
  99. package/lib/esm/features/store/objects/components/ContentOverview.js.map +1 -1
  100. package/lib/esm/features/store/objects/components/DocumentIcon.js +11 -3
  101. package/lib/esm/features/store/objects/components/DocumentIcon.js.map +1 -1
  102. package/lib/esm/features/store/objects/components/SaveVersionConfirmModal.js +11 -2
  103. package/lib/esm/features/store/objects/components/SaveVersionConfirmModal.js.map +1 -1
  104. package/lib/esm/features/store/objects/components/useDownloadObject.js +2 -2
  105. package/lib/esm/features/store/objects/components/useDownloadObject.js.map +1 -1
  106. package/lib/esm/features/store/objects/layout/DocumentTableColumn.js +13 -1
  107. package/lib/esm/features/store/objects/layout/DocumentTableColumn.js.map +1 -1
  108. package/lib/esm/features/store/objects/layout/documentLayout.js +7 -8
  109. package/lib/esm/features/store/objects/layout/documentLayout.js.map +1 -1
  110. package/lib/esm/features/store/objects/layout/renderers.js +28 -12
  111. package/lib/esm/features/store/objects/layout/renderers.js.map +1 -1
  112. package/lib/esm/features/store/objects/search/DocumentSearchContext.js +5 -1
  113. package/lib/esm/features/store/objects/search/DocumentSearchContext.js.map +1 -1
  114. package/lib/esm/features/store/objects/search/DocumentSearchProvider.js +1 -1
  115. package/lib/esm/features/store/objects/search/DocumentSearchProvider.js.map +1 -1
  116. package/lib/esm/features/store/objects/selection/ObjectsActionContext.js +3 -2
  117. package/lib/esm/features/store/objects/selection/ObjectsActionContext.js.map +1 -1
  118. package/lib/esm/features/store/objects/selection/SelectionActions.js +2 -0
  119. package/lib/esm/features/store/objects/selection/SelectionActions.js.map +1 -1
  120. package/lib/esm/features/store/objects/selection/actions/AddToCollectionAction.js +12 -4
  121. package/lib/esm/features/store/objects/selection/actions/AddToCollectionAction.js.map +1 -1
  122. package/lib/esm/features/store/objects/selection/actions/DeleteObjectsAction.js +20 -2
  123. package/lib/esm/features/store/objects/selection/actions/DeleteObjectsAction.js.map +1 -1
  124. package/lib/esm/features/store/objects/upload/DocumentUploadModal.js +16 -8
  125. package/lib/esm/features/store/objects/upload/DocumentUploadModal.js.map +1 -1
  126. package/lib/esm/features/store/types/CreateOrUpdateTypeModal.js +1 -1
  127. package/lib/esm/features/store/types/CreateOrUpdateTypeModal.js.map +1 -1
  128. package/lib/esm/features/store/types/ObjectSchemaEditor.js +1 -1
  129. package/lib/esm/features/store/types/ObjectSchemaEditor.js.map +1 -1
  130. package/lib/esm/features/user/UserInfo.js +35 -1
  131. package/lib/esm/features/user/UserInfo.js.map +1 -1
  132. package/lib/esm/router/HistoryNavigator.js +25 -2
  133. package/lib/esm/router/HistoryNavigator.js.map +1 -1
  134. package/lib/esm/router/Nav.js +3 -3
  135. package/lib/esm/router/Nav.js.map +1 -1
  136. package/lib/esm/session/UserSession.js +1 -0
  137. package/lib/esm/session/UserSession.js.map +1 -1
  138. package/lib/esm/session/UserSessionProvider.js +9 -2
  139. package/lib/esm/session/UserSessionProvider.js.map +1 -1
  140. package/lib/esm/session/auth/composable.js +66 -67
  141. package/lib/esm/session/auth/composable.js.map +1 -1
  142. package/lib/esm/shell/login/UserInfo.js +1 -1
  143. package/lib/esm/shell/login/UserInfo.js.map +1 -1
  144. package/lib/esm/widgets/form/Form.js +17 -30
  145. package/lib/esm/widgets/form/Form.js.map +1 -1
  146. package/lib/esm/widgets/form/FormContext.js +4 -2
  147. package/lib/esm/widgets/form/FormContext.js.map +1 -1
  148. package/lib/esm/widgets/form/ManagedObject.js +4 -0
  149. package/lib/esm/widgets/form/ManagedObject.js.map +1 -1
  150. package/lib/esm/widgets/form/fields.js +4 -3
  151. package/lib/esm/widgets/form/fields.js.map +1 -1
  152. package/lib/esm/widgets/form/inputs.js +2 -0
  153. package/lib/esm/widgets/form/inputs.js.map +1 -1
  154. package/lib/esm/widgets/schema-editor/index.js +0 -1
  155. package/lib/esm/widgets/schema-editor/index.js.map +1 -1
  156. package/lib/tsconfig.tsbuildinfo +1 -1
  157. package/lib/types/core/components/Panel.d.ts +11 -0
  158. package/lib/types/core/components/Panel.d.ts.map +1 -0
  159. package/lib/types/core/components/SelectList.d.ts +2 -1
  160. package/lib/types/core/components/SelectList.d.ts.map +1 -1
  161. package/lib/types/core/components/SidePanel.d.ts.map +1 -1
  162. package/lib/types/core/components/index.d.ts +1 -1
  163. package/lib/types/core/components/index.d.ts.map +1 -1
  164. package/lib/types/core/components/shadcn/breadcrumb.d.ts +3 -2
  165. package/lib/types/core/components/shadcn/breadcrumb.d.ts.map +1 -1
  166. package/lib/types/core/components/shadcn/button.d.ts.map +1 -1
  167. package/lib/types/core/components/shadcn/filters/filterBar.d.ts.map +1 -1
  168. package/lib/types/core/components/shadcn/index.d.ts +2 -0
  169. package/lib/types/core/components/shadcn/index.d.ts.map +1 -1
  170. package/lib/types/core/components/shadcn/input.d.ts.map +1 -1
  171. package/lib/types/core/components/shadcn/resizeable.d.ts +9 -0
  172. package/lib/types/core/components/shadcn/resizeable.d.ts.map +1 -0
  173. package/lib/types/core/components/shadcn/selectBox.d.ts +3 -2
  174. package/lib/types/core/components/shadcn/selectBox.d.ts.map +1 -1
  175. package/lib/types/core/components/shadcn/tabs.d.ts +2 -1
  176. package/lib/types/core/components/shadcn/tabs.d.ts.map +1 -1
  177. package/lib/types/core/components/shadcn/textarea.d.ts +4 -0
  178. package/lib/types/core/components/shadcn/textarea.d.ts.map +1 -0
  179. package/lib/types/core/hooks/CompositeState.d.ts +115 -6
  180. package/lib/types/core/hooks/CompositeState.d.ts.map +1 -1
  181. package/lib/types/core/hooks/index.d.ts +1 -0
  182. package/lib/types/core/hooks/index.d.ts.map +1 -1
  183. package/lib/types/core/hooks/useScrollableSearch.d.ts +82 -0
  184. package/lib/types/core/hooks/useScrollableSearch.d.ts.map +1 -0
  185. package/lib/types/env/index.d.ts +3 -1
  186. package/lib/types/env/index.d.ts.map +1 -1
  187. package/lib/types/features/agent/PayloadBuilder.d.ts +11 -19
  188. package/lib/types/features/agent/PayloadBuilder.d.ts.map +1 -1
  189. package/lib/types/features/agent/chat/ModernAgentConversation.d.ts.map +1 -1
  190. package/lib/types/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts +1 -1
  191. package/lib/types/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts.map +1 -1
  192. package/lib/types/features/agent/chat/ModernAgentOutput/Header.d.ts.map +1 -1
  193. package/lib/types/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.d.ts.map +1 -1
  194. package/lib/types/features/agent/chat/ModernAgentOutput/PlanPanel.d.ts.map +1 -1
  195. package/lib/types/features/facets/CollectionsFacetsNav.d.ts +14 -0
  196. package/lib/types/features/facets/CollectionsFacetsNav.d.ts.map +1 -0
  197. package/lib/types/features/facets/DocumentsFacetsNav.d.ts +1 -1
  198. package/lib/types/features/facets/DocumentsFacetsNav.d.ts.map +1 -1
  199. package/lib/types/features/facets/InteractionsFacetsNav.d.ts +14 -0
  200. package/lib/types/features/facets/InteractionsFacetsNav.d.ts.map +1 -0
  201. package/lib/types/features/facets/PromptsFacetsNav.d.ts +15 -0
  202. package/lib/types/features/facets/PromptsFacetsNav.d.ts.map +1 -0
  203. package/lib/types/features/facets/RunsFacetsNav.d.ts +1 -1
  204. package/lib/types/features/facets/RunsFacetsNav.d.ts.map +1 -1
  205. package/lib/types/features/facets/WorkflowExecutionsFacetsNav.d.ts +1 -1
  206. package/lib/types/features/facets/WorkflowExecutionsFacetsNav.d.ts.map +1 -1
  207. package/lib/types/features/facets/index.d.ts +10 -8
  208. package/lib/types/features/facets/index.d.ts.map +1 -1
  209. package/lib/types/features/facets/utils/SearchInterface.d.ts +14 -0
  210. package/lib/types/features/facets/utils/SearchInterface.d.ts.map +1 -0
  211. package/lib/types/features/facets/utils/StringFacet.d.ts.map +1 -0
  212. package/lib/types/features/facets/utils/StringListFacet.d.ts.map +1 -0
  213. package/lib/types/features/facets/utils/TypeFacet.d.ts.map +1 -0
  214. package/lib/types/features/facets/utils/VEnvironmentFacet.d.ts.map +1 -0
  215. package/lib/types/features/facets/utils/VInteractionFacet.d.ts.map +1 -0
  216. package/lib/types/features/facets/utils/VStringFacet.d.ts.map +1 -0
  217. package/lib/types/features/facets/{VTypeFacet.d.ts → utils/VTypeFacet.d.ts} +2 -1
  218. package/lib/types/features/facets/utils/VTypeFacet.d.ts.map +1 -0
  219. package/lib/types/features/facets/utils/VUserFacet.d.ts.map +1 -0
  220. package/lib/types/features/facets/utils/utils.d.ts.map +1 -0
  221. package/lib/types/features/layout/GenericPageNavHeader.d.ts +2 -1
  222. package/lib/types/features/layout/GenericPageNavHeader.d.ts.map +1 -1
  223. package/lib/types/features/store/collections/BrowseCollectionView.d.ts.map +1 -1
  224. package/lib/types/features/store/collections/CreateCollection.d.ts.map +1 -1
  225. package/lib/types/features/store/collections/EditCollectionView.d.ts.map +1 -1
  226. package/lib/types/features/store/collections/SelectCollection.d.ts +12 -8
  227. package/lib/types/features/store/collections/SelectCollection.d.ts.map +1 -1
  228. package/lib/types/features/store/objects/DocumentSearchResults.d.ts.map +1 -1
  229. package/lib/types/features/store/objects/DocumentTable.d.ts +4 -0
  230. package/lib/types/features/store/objects/DocumentTable.d.ts.map +1 -1
  231. package/lib/types/features/store/objects/components/ContentOverview.d.ts.map +1 -1
  232. package/lib/types/features/store/objects/components/DocumentIcon.d.ts +7 -1
  233. package/lib/types/features/store/objects/components/DocumentIcon.d.ts.map +1 -1
  234. package/lib/types/features/store/objects/components/SaveVersionConfirmModal.d.ts.map +1 -1
  235. package/lib/types/features/store/objects/components/useDownloadObject.d.ts +1 -1
  236. package/lib/types/features/store/objects/components/useDownloadObject.d.ts.map +1 -1
  237. package/lib/types/features/store/objects/layout/DocumentTableColumn.d.ts +2 -1
  238. package/lib/types/features/store/objects/layout/DocumentTableColumn.d.ts.map +1 -1
  239. package/lib/types/features/store/objects/layout/documentLayout.d.ts +4 -2
  240. package/lib/types/features/store/objects/layout/documentLayout.d.ts.map +1 -1
  241. package/lib/types/features/store/objects/layout/renderers.d.ts +1 -1
  242. package/lib/types/features/store/objects/layout/renderers.d.ts.map +1 -1
  243. package/lib/types/features/store/objects/search/DocumentSearchContext.d.ts +2 -3
  244. package/lib/types/features/store/objects/search/DocumentSearchContext.d.ts.map +1 -1
  245. package/lib/types/features/store/objects/selection/ObjectsActionContext.d.ts.map +1 -1
  246. package/lib/types/features/store/objects/selection/SelectionActions.d.ts.map +1 -1
  247. package/lib/types/features/store/objects/selection/actions/DeleteObjectsAction.d.ts +1 -0
  248. package/lib/types/features/store/objects/selection/actions/DeleteObjectsAction.d.ts.map +1 -1
  249. package/lib/types/features/store/objects/upload/DocumentUploadModal.d.ts.map +1 -1
  250. package/lib/types/features/user/UserInfo.d.ts +12 -1
  251. package/lib/types/features/user/UserInfo.d.ts.map +1 -1
  252. package/lib/types/router/HistoryNavigator.d.ts.map +1 -1
  253. package/lib/types/router/Nav.d.ts +2 -1
  254. package/lib/types/router/Nav.d.ts.map +1 -1
  255. package/lib/types/session/UserSession.d.ts.map +1 -1
  256. package/lib/types/session/UserSessionProvider.d.ts.map +1 -1
  257. package/lib/types/session/auth/composable.d.ts.map +1 -1
  258. package/lib/types/widgets/form/Form.d.ts +2 -1
  259. package/lib/types/widgets/form/Form.d.ts.map +1 -1
  260. package/lib/types/widgets/form/FormContext.d.ts +5 -2
  261. package/lib/types/widgets/form/FormContext.d.ts.map +1 -1
  262. package/lib/types/widgets/form/ManagedObject.d.ts.map +1 -1
  263. package/lib/types/widgets/form/fields.d.ts +2 -2
  264. package/lib/types/widgets/form/fields.d.ts.map +1 -1
  265. package/lib/types/widgets/form/inputs.d.ts.map +1 -1
  266. package/lib/types/widgets/schema-editor/index.d.ts +0 -1
  267. package/lib/types/widgets/schema-editor/index.d.ts.map +1 -1
  268. package/lib/vertesia-ui-core.js +1 -1
  269. package/lib/vertesia-ui-core.js.map +1 -1
  270. package/lib/vertesia-ui-env.js +1 -1
  271. package/lib/vertesia-ui-env.js.map +1 -1
  272. package/lib/vertesia-ui-features.js +1 -1
  273. package/lib/vertesia-ui-features.js.map +1 -1
  274. package/lib/vertesia-ui-router.js +1 -1
  275. package/lib/vertesia-ui-router.js.map +1 -1
  276. package/lib/vertesia-ui-session.js +1 -1
  277. package/lib/vertesia-ui-session.js.map +1 -1
  278. package/lib/vertesia-ui-shell.js +1 -1
  279. package/lib/vertesia-ui-shell.js.map +1 -1
  280. package/lib/vertesia-ui-widgets.js +1 -1
  281. package/lib/vertesia-ui-widgets.js.map +1 -1
  282. package/package.json +166 -165
  283. package/src/core/components/Panel.tsx +34 -0
  284. package/src/core/components/SelectList.tsx +11 -1
  285. package/src/core/components/SidePanel.tsx +18 -13
  286. package/src/core/components/index.ts +1 -1
  287. package/src/core/components/shadcn/breadcrumb.tsx +49 -30
  288. package/src/core/components/shadcn/button.tsx +3 -2
  289. package/src/core/components/shadcn/filters/filterBar.tsx +49 -23
  290. package/src/core/components/shadcn/index.ts +2 -0
  291. package/src/core/components/shadcn/input.tsx +10 -7
  292. package/src/core/components/shadcn/resizeable.tsx +54 -0
  293. package/src/core/components/shadcn/selectBox.tsx +87 -67
  294. package/src/core/components/shadcn/tabs.tsx +25 -8
  295. package/src/core/components/shadcn/textarea.tsx +21 -0
  296. package/src/core/components/table/index.tsx +1 -1
  297. package/src/core/hooks/index.ts +1 -0
  298. package/src/core/hooks/useScrollableSearch.tsx +193 -0
  299. package/src/features/agent/chat/ModernAgentConversation.tsx +109 -118
  300. package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +2 -22
  301. package/src/features/agent/chat/ModernAgentOutput/Header.tsx +1 -9
  302. package/src/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.tsx +39 -55
  303. package/src/features/agent/chat/ModernAgentOutput/PlanPanel.tsx +1 -0
  304. package/src/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.tsx +8 -8
  305. package/src/features/agent/chat/ModernAgentOutput/WorkstreamTabs.tsx +8 -8
  306. package/src/features/facets/CollectionsFacetsNav.tsx +115 -0
  307. package/src/features/facets/DocumentsFacetsNav.tsx +22 -11
  308. package/src/features/facets/EnvironmentFacet.tsx +1 -1
  309. package/src/features/facets/InteractionsFacetsNav.tsx +121 -0
  310. package/src/features/facets/PromptsFacetsNav.tsx +110 -0
  311. package/src/features/facets/RunsFacetsNav.tsx +40 -9
  312. package/src/features/facets/WorkflowExecutionsFacetsNav.tsx +10 -8
  313. package/src/features/facets/index.ts +11 -9
  314. package/src/features/facets/utils/SearchInterface.tsx +12 -0
  315. package/src/features/facets/{VTypeFacet.tsx → utils/VTypeFacet.tsx} +12 -5
  316. package/src/features/facets/{VUserFacet.tsx → utils/VUserFacet.tsx} +1 -1
  317. package/src/features/layout/GenericPageNavHeader.tsx +73 -10
  318. package/src/features/store/collections/BrowseCollectionView.tsx +4 -0
  319. package/src/features/store/collections/CreateCollection.tsx +3 -4
  320. package/src/features/store/collections/EditCollectionView.tsx +104 -85
  321. package/src/features/store/collections/SelectCollection.tsx +214 -29
  322. package/src/features/store/objects/DocumentSearchResults.tsx +98 -27
  323. package/src/features/store/objects/DocumentTable.tsx +14 -4
  324. package/src/features/store/objects/components/ContentOverview.tsx +536 -267
  325. package/src/features/store/objects/components/DocumentIcon.tsx +42 -13
  326. package/src/features/store/objects/components/SaveVersionConfirmModal.tsx +12 -2
  327. package/src/features/store/objects/layout/DocumentTableColumn.tsx +16 -1
  328. package/src/features/store/objects/layout/documentLayout.tsx +10 -12
  329. package/src/features/store/objects/layout/knowledge.md +10 -10
  330. package/src/features/store/objects/layout/renderers.tsx +39 -18
  331. package/src/features/store/objects/search/DocumentSearchContext.ts +6 -1
  332. package/src/features/store/objects/search/DocumentSearchProvider.tsx +1 -1
  333. package/src/features/store/objects/selection/ObjectsActionContext.tsx +3 -2
  334. package/src/features/store/objects/selection/SelectionActions.tsx +2 -0
  335. package/src/features/store/objects/selection/actions/AddToCollectionAction.tsx +23 -10
  336. package/src/features/store/objects/selection/actions/DeleteObjectsAction.tsx +22 -2
  337. package/src/features/store/objects/upload/DocumentUploadModal.tsx +23 -15
  338. package/src/features/store/objects/upload/useSmartFileUploadProcessing.ts +10 -7
  339. package/src/features/store/types/CreateOrUpdateTypeModal.tsx +1 -1
  340. package/src/features/store/types/ObjectSchemaEditor.tsx +1 -1
  341. package/src/features/user/UserInfo.tsx +66 -3
  342. package/src/router/HistoryNavigator.ts +33 -2
  343. package/src/router/Nav.tsx +4 -3
  344. package/src/shell/login/UserInfo.tsx +1 -1
  345. package/src/widgets/form/Form.tsx +19 -43
  346. package/src/widgets/form/FormContext.ts +5 -2
  347. package/src/widgets/form/fields.tsx +8 -6
  348. package/src/widgets/form/inputs.tsx +1 -0
  349. package/src/widgets/schema-editor/index.ts +0 -1
  350. package/lib/esm/core/components/Textarea.js +0 -15
  351. package/lib/esm/core/components/Textarea.js.map +0 -1
  352. package/lib/esm/features/facets/FacetsNav.js +0 -8
  353. package/lib/esm/features/facets/FacetsNav.js.map +0 -1
  354. package/lib/esm/features/facets/StringFacet.js.map +0 -1
  355. package/lib/esm/features/facets/StringListFacet.js.map +0 -1
  356. package/lib/esm/features/facets/TypeFacet.js.map +0 -1
  357. package/lib/esm/features/facets/VEnvironmentFacet.js.map +0 -1
  358. package/lib/esm/features/facets/VFacetsNav.js +0 -48
  359. package/lib/esm/features/facets/VFacetsNav.js.map +0 -1
  360. package/lib/esm/features/facets/VInteractionFacet.js.map +0 -1
  361. package/lib/esm/features/facets/VStringFacet.js.map +0 -1
  362. package/lib/esm/features/facets/VTypeFacet.js.map +0 -1
  363. package/lib/esm/features/facets/VUserFacet.js.map +0 -1
  364. package/lib/esm/features/facets/utils.js.map +0 -1
  365. package/lib/esm/widgets/schema-editor/JSONSchemaEditorModal.js +0 -49
  366. package/lib/esm/widgets/schema-editor/JSONSchemaEditorModal.js.map +0 -1
  367. package/lib/types/core/components/Textarea.d.ts +0 -8
  368. package/lib/types/core/components/Textarea.d.ts.map +0 -1
  369. package/lib/types/features/facets/FacetsNav.d.ts +0 -7
  370. package/lib/types/features/facets/FacetsNav.d.ts.map +0 -1
  371. package/lib/types/features/facets/StringFacet.d.ts.map +0 -1
  372. package/lib/types/features/facets/StringListFacet.d.ts.map +0 -1
  373. package/lib/types/features/facets/TypeFacet.d.ts.map +0 -1
  374. package/lib/types/features/facets/VEnvironmentFacet.d.ts.map +0 -1
  375. package/lib/types/features/facets/VFacetsNav.d.ts +0 -16
  376. package/lib/types/features/facets/VFacetsNav.d.ts.map +0 -1
  377. package/lib/types/features/facets/VInteractionFacet.d.ts.map +0 -1
  378. package/lib/types/features/facets/VStringFacet.d.ts.map +0 -1
  379. package/lib/types/features/facets/VTypeFacet.d.ts.map +0 -1
  380. package/lib/types/features/facets/VUserFacet.d.ts.map +0 -1
  381. package/lib/types/features/facets/utils.d.ts.map +0 -1
  382. package/lib/types/widgets/schema-editor/JSONSchemaEditorModal.d.ts +0 -10
  383. package/lib/types/widgets/schema-editor/JSONSchemaEditorModal.d.ts.map +0 -1
  384. package/src/core/components/Textarea.tsx +0 -25
  385. package/src/features/facets/FacetsNav.tsx +0 -19
  386. package/src/features/facets/VFacetsNav.tsx +0 -81
  387. package/src/widgets/schema-editor/JSONSchemaEditorModal.tsx +0 -67
  388. /package/lib/esm/features/facets/{StringFacet.js → utils/StringFacet.js} +0 -0
  389. /package/lib/esm/features/facets/{StringListFacet.js → utils/StringListFacet.js} +0 -0
  390. /package/lib/esm/features/facets/{TypeFacet.js → utils/TypeFacet.js} +0 -0
  391. /package/lib/esm/features/facets/{VEnvironmentFacet.js → utils/VEnvironmentFacet.js} +0 -0
  392. /package/lib/esm/features/facets/{VInteractionFacet.js → utils/VInteractionFacet.js} +0 -0
  393. /package/lib/esm/features/facets/{VStringFacet.js → utils/VStringFacet.js} +0 -0
  394. /package/lib/esm/features/facets/{utils.js → utils/utils.js} +0 -0
  395. /package/lib/types/features/facets/{StringFacet.d.ts → utils/StringFacet.d.ts} +0 -0
  396. /package/lib/types/features/facets/{StringListFacet.d.ts → utils/StringListFacet.d.ts} +0 -0
  397. /package/lib/types/features/facets/{TypeFacet.d.ts → utils/TypeFacet.d.ts} +0 -0
  398. /package/lib/types/features/facets/{VEnvironmentFacet.d.ts → utils/VEnvironmentFacet.d.ts} +0 -0
  399. /package/lib/types/features/facets/{VInteractionFacet.d.ts → utils/VInteractionFacet.d.ts} +0 -0
  400. /package/lib/types/features/facets/{VStringFacet.d.ts → utils/VStringFacet.d.ts} +0 -0
  401. /package/lib/types/features/facets/{VUserFacet.d.ts → utils/VUserFacet.d.ts} +0 -0
  402. /package/lib/types/features/facets/{utils.d.ts → utils/utils.d.ts} +0 -0
  403. /package/src/features/facets/{StringFacet.tsx → utils/StringFacet.tsx} +0 -0
  404. /package/src/features/facets/{StringListFacet.tsx → utils/StringListFacet.tsx} +0 -0
  405. /package/src/features/facets/{TypeFacet.tsx → utils/TypeFacet.tsx} +0 -0
  406. /package/src/features/facets/{VEnvironmentFacet.tsx → utils/VEnvironmentFacet.tsx} +0 -0
  407. /package/src/features/facets/{VInteractionFacet.tsx → utils/VInteractionFacet.tsx} +0 -0
  408. /package/src/features/facets/{VStringFacet.tsx → utils/VStringFacet.tsx} +0 -0
  409. /package/src/features/facets/{utils.tsx → utils/utils.tsx} +0 -0
@@ -1,4 +1,5 @@
1
1
  import { Plan } from "@vertesia/common";
2
+ import { Badge, Button } from "@vertesia/ui/core";
2
3
  import { AlertCircle, CheckCircle, Circle, Clock, X } from "lucide-react";
3
4
 
4
5
  interface InlinePlanPanelProps {
@@ -27,21 +28,15 @@ export default function InlineSlidingPlanPanel({
27
28
 
28
29
  // Render the normal panel
29
30
  return (
30
- <div
31
- className="fixed top-24 right-8 bottom-24 z-50 bg-white dark:bg-gray-900 shadow-xl border border-gray-200 dark:border-gray-700 overflow-hidden"
32
- style={{ width: "350px" }}
33
- >
34
- <div className="flex items-center justify-between p-3 border-b border-gray-200 dark:border-gray-800">
35
- <h3 className="font-bold text-gray-800 dark:text-gray-200 text-base">
31
+ <div className="h-full shadow-xl border border-muted/20 overflow-hidden">
32
+ <div className="flex items-center justify-between p-3 border-b border-muted/20">
33
+ <h3 className="font-bold text-base">
36
34
  Plan
37
35
  </h3>
38
- <button
39
- className="p-1 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-full text-gray-500 dark:text-gray-400"
40
- onClick={onClose}
41
- >
42
- <X className="h-4 w-4" />
36
+ <Button variant={"ghost"} onClick={onClose} >
37
+ <X className="size-4" />
43
38
  <span className="sr-only">Close</span>
44
- </button>
39
+ </Button>
45
40
  </div>
46
41
  <div
47
42
  className="p-3 overflow-y-auto"
@@ -51,8 +46,8 @@ export default function InlineSlidingPlanPanel({
51
46
  }}
52
47
  >
53
48
  {/* Plan Summary - count only tasks, excluding main workstream */}
54
- <div className="mb-3 p-2 bg-blue-50 dark:bg-blue-900/20 rounded-md border border-blue-100 dark:border-blue-800">
55
- <div className="text-xs font-medium text-blue-700 dark:text-blue-300 mb-1">
49
+ <div className="mb-3 p-2 bg-info rounded-md border border-info">
50
+ <div className="text-xs font-medium text-info mb-1">
56
51
  Task Progress
57
52
  </div>
58
53
  <div className="flex items-center gap-2">
@@ -87,13 +82,13 @@ export default function InlineSlidingPlanPanel({
87
82
 
88
83
  return (
89
84
  <>
90
- <div className="w-full bg-gray-200 dark:bg-gray-700 rounded-full h-2">
85
+ <div className="w-full bg-muted rounded-full h-2">
91
86
  <div
92
- className="bg-blue-600 h-2 rounded-full"
87
+ className="bg-background h-2 rounded-full"
93
88
  style={{ width: `${progressPercentage}%` }}
94
89
  />
95
90
  </div>
96
- <span className="text-xs text-gray-600 dark:text-gray-400">
91
+ <span className="text-xs text-muted">
97
92
  {totalTasks > 0 ? `${completedTasks}/${totalTasks}` : "0/0"}
98
93
  </span>
99
94
  </>
@@ -105,39 +100,37 @@ export default function InlineSlidingPlanPanel({
105
100
  {/* Plan selector - only shown when multiple plans exist */}
106
101
  {plans.length > 1 && (
107
102
  <div className="mb-3 flex items-center justify-between">
108
- <button
109
- className="text-xs px-2 py-1 rounded-md bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-300 disabled:opacity-50"
103
+ <Button variant={"ghost"}
110
104
  onClick={() =>
111
105
  onChangePlan(Math.min(plans.length - 1, activePlanIndex + 1))
112
106
  }
113
107
  disabled={activePlanIndex >= plans.length - 1}
114
108
  >
115
109
  Older Plan
116
- </button>
117
- <div className="text-xs text-gray-500 dark:text-gray-400">
110
+ </Button>
111
+ <div className="text-xs text-muted">
118
112
  {plans[activePlanIndex]?.timestamp
119
113
  ? new Date(
120
114
  plans[activePlanIndex].timestamp,
121
115
  ).toLocaleTimeString()
122
116
  : "Unknown time"}
123
117
  </div>
124
- <button
125
- className="text-xs px-2 py-1 rounded-md bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-300 disabled:opacity-50"
118
+ <Button variant={"ghost"}
126
119
  onClick={() => onChangePlan(Math.max(0, activePlanIndex - 1))}
127
120
  disabled={activePlanIndex <= 0}
128
121
  >
129
122
  Newer Plan
130
- </button>
123
+ </Button>
131
124
  </div>
132
125
  )}
133
126
 
134
127
  {/* Detailed Plan Steps */}
135
- <div className="rounded-md border border-gray-200 dark:border-gray-800">
136
- <div className="p-2 border-b border-gray-200 dark:border-gray-800 bg-gray-50 dark:bg-gray-900/50">
128
+ <div className="rounded-md border border-muted/30">
129
+ <div className="p-2 border-b border-muted/30 bg-muted">
137
130
  <div className="font-medium text-xs">Step-by-Step Plan</div>
138
131
  </div>
139
132
 
140
- <div className="divide-y divide-gray-100 dark:divide-gray-800 max-h-[calc(100vh-350px)] overflow-y-auto">
133
+ <div className="divide-y divide-muted/20 max-h-[calc(100vh-350px)] overflow-y-auto">
141
134
  {plan.plan && plan.plan.length > 0 ? (
142
135
  plan.plan.map((task, index) => {
143
136
  // Extract task info with null checks
@@ -156,53 +149,44 @@ export default function InlineSlidingPlanPanel({
156
149
 
157
150
  // Determine status icon and style
158
151
  let StatusIcon = Circle;
159
- let statusColor = "text-gray-400";
160
- let bgColor = "";
152
+ let statusColor = "text-muted";
161
153
 
162
154
  if (status === "in_progress") {
163
155
  StatusIcon = Clock;
164
- statusColor = "text-blue-500";
165
- bgColor = "bg-blue-50/50 dark:bg-blue-900/10";
156
+ statusColor = "text-info";
166
157
  } else if (status === "completed") {
167
158
  StatusIcon = CheckCircle;
168
- statusColor = "text-green-500";
159
+ statusColor = "text-success";
169
160
  }
170
161
 
171
162
  return (
172
- <div key={index} className={`flex p-3 my-1 ${bgColor}`}>
173
- <div className={`mr-2 mt-0.5 flex-shrink-0 ${statusColor}`}>
174
- <StatusIcon className="h-3.5 w-3.5" />
163
+ <div key={index} className={`flex p-3 my-1`}>
164
+ <div className={`mr-2 mt-0.5 flex-shrink-0 text-muted`}>
165
+ {taskId}
175
166
  </div>
176
167
  <div className="w-full">
177
- <div className="text-sm font-medium text-gray-800 dark:text-gray-200 mb-2">
168
+ <div className="text-sm font-medium mb-2 text-muted">
178
169
  {taskGoal}
179
170
  </div>
180
- <div className="mt-1 flex justify-between items-center">
181
- <span className="inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-300">
182
- {taskId}
183
- </span>
184
- <span
185
- className={`ml-2 text-xs px-2 py-0.5 rounded-full ${status === "completed"
186
- ? "bg-green-100 text-green-600 dark:bg-green-900/30 dark:text-green-400"
187
- : status === "in_progress"
188
- ? "bg-blue-100 text-blue-600 dark:bg-blue-900/30 dark:text-blue-400"
189
- : "bg-gray-100 text-gray-500 dark:bg-gray-800 dark:text-gray-400"
190
- }`}
191
- >
171
+ <div className="mt-1 flex justify-end items-center">
172
+ <div className={`mr-2 mt-0.5 flex-shrink-0 ${statusColor}`}>
173
+ <StatusIcon className="size-3.5" />
174
+ </div>
175
+ <Badge variant={status === "completed" ? "success" : status === "in_progress" ? "info" : "default"}>
192
176
  {status === "completed"
193
177
  ? "Completed"
194
178
  : status === "in_progress"
195
179
  ? "In Progress"
196
180
  : "Pending"}
197
- </span>
181
+ </Badge>
198
182
  </div>
199
183
  </div>
200
184
  </div>
201
185
  );
202
186
  })
203
187
  ) : (
204
- <div className="p-3 text-center text-gray-500 dark:text-gray-400 italic">
205
- <AlertCircle className="h-4 w-4 mx-auto mb-2 text-amber-500" />
188
+ <div className="p-3 text-center text-muted italic">
189
+ <AlertCircle className="size-4 mx-auto mb-2 text-attention" />
206
190
  <p className="text-xs">No plan has been detected yet</p>
207
191
  <p className="text-xs mt-1">
208
192
  Plans will appear here when the agent creates one
@@ -242,13 +226,13 @@ export default function InlineSlidingPlanPanel({
242
226
 
243
227
  if (status === "in_progress") {
244
228
  StatusIcon = Clock;
245
- statusColor = "text-blue-500";
246
- statusBg = "bg-blue-100 dark:bg-blue-800/30";
229
+ statusColor = "text-info";
230
+ statusBg = "bg-info/20";
247
231
  statusText = "In Progress";
248
232
  } else if (status === "completed") {
249
233
  StatusIcon = CheckCircle;
250
- statusColor = "text-green-500";
251
- statusBg = "bg-green-100 dark:bg-green-800/30";
234
+ statusColor = "text-success";
235
+ statusBg = "bg-success/20";
252
236
  statusText = "Completed";
253
237
  }
254
238
 
@@ -7,6 +7,7 @@ interface PlanPanelProps {
7
7
  isVisible: boolean;
8
8
  }
9
9
 
10
+ // todo: remove this file
10
11
  export default function PlanPanel({ plan, workstreamStatus, isVisible }: PlanPanelProps) {
11
12
  if (!isVisible) return null;
12
13
 
@@ -12,14 +12,14 @@ interface PlanPanelProps {
12
12
  export default function SlidingPlanPanel({ plan, workstreamStatus, isOpen, onClose }: PlanPanelProps) {
13
13
  return (
14
14
  plan && (
15
- <SlideInPanel isOpen={isOpen} onClose={onClose} title="Agent Plan" width="350px">
15
+ <SlideInPanel isOpen={isOpen} onClose={onClose} title="Agent Plan">
16
16
  {/* Plan Summary */}
17
- <div className="mb-4 p-3 bg-blue-50 dark:bg-blue-900/20 rounded-md border border-blue-100 dark:border-blue-800">
18
- <div className="text-sm font-medium text-blue-700 dark:text-blue-300 mb-1">Plan Progress</div>
17
+ <div className="mb-4 p-3 bg-info rounded-md border border-info">
18
+ <div className="text-sm font-medium text-info mb-1">Plan Progress</div>
19
19
  <div className="flex items-center gap-2">
20
- <div className="w-full bg-gray-200 dark:bg-gray-700 rounded-full h-2.5">
20
+ <div className="w-full bg-muted rounded-full h-2.5">
21
21
  <div
22
- className="bg-blue-600 h-2.5 rounded-full"
22
+ className="bg-info h-2.5 rounded-full"
23
23
  style={{
24
24
  width: `${plan.plan && plan.plan.length
25
25
  ? Math.round(
@@ -34,7 +34,7 @@ export default function SlidingPlanPanel({ plan, workstreamStatus, isOpen, onClo
34
34
  }}
35
35
  />
36
36
  </div>
37
- <span className="text-xs text-gray-600 dark:text-gray-400">
37
+ <span className="text-xs text-muted">
38
38
  {plan.plan && plan.plan.length
39
39
  ? `${Array.from(workstreamStatus.values()).filter((status) => status === "completed").length}/${workstreamStatus.size}`
40
40
  : "0/0"}
@@ -43,8 +43,8 @@ export default function SlidingPlanPanel({ plan, workstreamStatus, isOpen, onClo
43
43
  </div>
44
44
 
45
45
  {/* Detailed Plan Steps */}
46
- <div className="rounded-md border border-gray-200 dark:border-gray-800">
47
- <div className="p-3 border-b border-gray-200 dark:border-gray-800 bg-gray-50 dark:bg-gray-900/50">
46
+ <div className="rounded-md border border-muted">
47
+ <div className="p-3 border-b border-muted bg-muted/50">
48
48
  <div className="font-medium text-sm">Step-by-Step Plan</div>
49
49
  </div>
50
50
 
@@ -62,14 +62,14 @@ export default function WorkstreamTabs({
62
62
  }
63
63
 
64
64
  return (
65
- <div className="flex overflow-x-auto space-x-1 pb-2 mb-2 border-b-2 border-blue-200 dark:border-blue-900 sticky top-0 bg-white dark:bg-gray-900 z-10 pt-1">
65
+ <div className="flex overflow-x-auto space-x-1 mb-2 border-b-2 border-muted/20 sticky top-0 z-10 pt-1">
66
66
  {sortedWorkstreams.map(([id, name]) => (
67
67
  <button
68
68
  key={id}
69
69
  className={`px-3 py-1.5 text-xs font-medium whitespace-nowrap transition-colors flex items-center gap-1.5
70
70
  ${activeWorkstream === id
71
- ? "bg-blue-200 text-blue-800 dark:bg-blue-800 dark:text-blue-200 border-b-2 border-blue-500"
72
- : "text-gray-600 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-gray-800/30 border-b-2 border-transparent"
71
+ ? "bg-info text-info border-b-2 border-info"
72
+ : "text-muted hover:bg-muted border-b-2 border-transparent"
73
73
  }`}
74
74
  onClick={() => onSelectWorkstream(id)}
75
75
  title={name.length > 20 ? name : undefined}
@@ -79,10 +79,10 @@ export default function WorkstreamTabs({
79
79
  {count && count.has(id) && count.get(id)! > 0 && (
80
80
  <div className="flex items-center space-x-1">
81
81
  <span
82
- className={`inline-flex items-center justify-center w-4 h-4 text-xs
82
+ className={`inline-flex items-center justify-center size-4 text-xs rounded-full
83
83
  ${activeWorkstream === id
84
- ? "bg-blue-200 text-blue-800 dark:bg-blue-800 dark:text-blue-200"
85
- : "bg-gray-200 text-gray-600 dark:bg-gray-700 dark:text-gray-300"
84
+ ? "bg-info text-info"
85
+ : "bg-muted text-muted"
86
86
  }`}
87
87
  >
88
88
  {count.get(id)}
@@ -91,9 +91,9 @@ export default function WorkstreamTabs({
91
91
  {completionStatus &&
92
92
  id !== "all" &&
93
93
  (completionStatus.get(id) ? (
94
- <CheckCircle className="h-3 w-3 text-green-500" />
94
+ <CheckCircle className="size-3 text-success" />
95
95
  ) : (
96
- <Clock className="h-3 w-3 text-amber-500" />
96
+ <Clock className="size-3 text-attention" />
97
97
  ))}
98
98
  </div>
99
99
  )}
@@ -0,0 +1,115 @@
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
+ import { useUserSession } from '@vertesia/ui/session';
5
+
6
+ interface CollectionsFacetsNavProps {
7
+ facets: {
8
+ type?: any[];
9
+ dynamic?: any[];
10
+ };
11
+ search: SearchInterface;
12
+ }
13
+
14
+ // Hook to create filter groups for collections
15
+ export function useCollectionsFilterGroups(facets: CollectionsFacetsNavProps['facets']): FilterGroup[] {
16
+ void facets;
17
+ const { typeRegistry } = useUserSession();
18
+
19
+ const customFilterGroups: FilterGroup[] = [];
20
+
21
+ // Add name filter as text type
22
+ const nameFilterGroup = {
23
+ name: 'name',
24
+ placeholder: 'Name',
25
+ type: 'text' as const,
26
+ multiple: false
27
+ };
28
+ customFilterGroups.push(nameFilterGroup);
29
+
30
+ // add type filter as select type
31
+ if (typeRegistry) {
32
+ const typeOptions = typeRegistry.types.map(type => {
33
+ return {
34
+ label: type.name,
35
+ value: type.id
36
+ }
37
+ });
38
+ const typeFilterGroup = {
39
+ name: 'types',
40
+ placeholder: 'Type',
41
+ type: 'select' as const,
42
+ multiple: true,
43
+ options: typeOptions
44
+ };
45
+ customFilterGroups.push(typeFilterGroup);
46
+ }
47
+
48
+ return customFilterGroups;
49
+ }
50
+
51
+ // Hook to create filter change handler for collections
52
+ export function useCollectionsFilterHandler(search: SearchInterface) {
53
+ return (newFilters: BaseFilter[]) => {
54
+ if (newFilters.length === 0) {
55
+ // Clear filters without applying defaults - user wants to remove all filters
56
+ search.clearFilters(true);
57
+ return;
58
+ }
59
+
60
+ // Clear all filters first, then apply new ones
61
+ search.clearFilters(false);
62
+
63
+ newFilters.forEach(filter => {
64
+ if (filter.value && filter.value.length > 0) {
65
+ const filterName = filter.name;
66
+ let filterValue;
67
+ if (filter.type === 'stringList') {
68
+ filterValue = filter.value.map(v => typeof v === 'string' ? v : v.value);
69
+ } else if (filter.multiple) {
70
+ filterValue = Array.isArray(filter.value)
71
+ ? filter.value.map((v: any) => typeof v === 'object' && v.value ? v.value : v)
72
+ : [typeof filter.value === 'object' && (filter.value as any).value ? (filter.value as any).value : filter.value];
73
+ } else {
74
+ // Single value - don't wrap in array
75
+ filterValue = Array.isArray(filter.value) && filter.value[0] && typeof filter.value[0] === 'object'
76
+ ? (filter.value[0] as any).value
77
+ : Array.isArray(filter.value) && filter.value[0]
78
+ ? filter.value[0]
79
+ : filter.value;
80
+ }
81
+
82
+ search.query[filterName] = filterValue;
83
+ }
84
+ });
85
+
86
+ search.search();
87
+ };
88
+ }
89
+
90
+ // Component for collections filtering
91
+ export function CollectionsFacetsNav({ facets, search }: CollectionsFacetsNavProps) {
92
+ const [filters, setFilters] = useState<BaseFilter[]>([]);
93
+ const filterGroups = useCollectionsFilterGroups(facets);
94
+ const handleFilterLogic = useCollectionsFilterHandler(search);
95
+
96
+ const handleFilterChange: React.Dispatch<React.SetStateAction<BaseFilter[]>> = (value) => {
97
+ const newFilters = typeof value === 'function' ? value(filters) : value;
98
+ setFilters(newFilters);
99
+ handleFilterLogic(newFilters);
100
+ };
101
+
102
+ return (
103
+ <FilterProvider
104
+ filterGroups={filterGroups}
105
+ filters={filters}
106
+ setFilters={handleFilterChange}
107
+ >
108
+ <div className="flex gap-2 items-center">
109
+ <FilterBtn />
110
+ <FilterBar />
111
+ <FilterClear />
112
+ </div>
113
+ </FilterProvider>
114
+ );
115
+ }
@@ -1,9 +1,9 @@
1
1
  import { Filter as BaseFilter, FilterProvider, FilterBtn, FilterBar, FilterClear, FilterGroup } from '@vertesia/ui/core';
2
2
  import { useUserSession } from '@vertesia/ui/session';
3
3
  import { useState } from 'react';
4
- import { VStringFacet } from './VStringFacet';
5
- import { VTypeFacet } from './VTypeFacet';
6
- import { SearchInterface } from './VFacetsNav';
4
+ import { VStringFacet } from './utils/VStringFacet';
5
+ import { VTypeFacet } from './utils/VTypeFacet';
6
+ import { SearchInterface } from './utils/SearchInterface';
7
7
 
8
8
  interface DocumentsFacetsNavProps {
9
9
  facets: {
@@ -22,7 +22,14 @@ export function useDocumentFilterGroups(facets: DocumentsFacetsNavProps['facets'
22
22
  const customFilterGroups: FilterGroup[] = [];
23
23
 
24
24
  customFilterGroups.push({
25
- placeholder: 'Name or ID',
25
+ placeholder: 'ID',
26
+ name: 'id',
27
+ type: 'text',
28
+ options: [],
29
+ });
30
+
31
+ customFilterGroups.push({
32
+ placeholder: 'Name',
26
33
  name: 'name',
27
34
  type: 'text',
28
35
  options: [],
@@ -94,7 +101,7 @@ export function useDocumentFilterHandler(search: SearchInterface) {
94
101
  newFilters.forEach(filter => {
95
102
  if (filter.value && filter.value.length > 0) {
96
103
  const filterName = filter.name;
97
-
104
+
98
105
  let filterValue;
99
106
  if (filter.type === 'date' && filter.multiple) {
100
107
  // Handle date range filters
@@ -117,21 +124,25 @@ export function useDocumentFilterHandler(search: SearchInterface) {
117
124
  }
118
125
  }
119
126
  } else if (filter.multiple) {
120
- filterValue = Array.isArray(filter.value)
121
- ? filter.value.map((v: any) => typeof v === 'object' && v.value ? v.value : v)
122
- : [typeof filter.value === 'object' && (filter.value as any).value ? (filter.value as any).value : filter.value];
127
+ if (Array.isArray(filter.value)) {
128
+ filterValue = filter.value.map((v: any) => typeof v === 'object' && v.value ? v.value : v);
129
+ } else {
130
+ const singleValue = typeof filter.value === 'object' && (filter.value as any).value ? (filter.value as any).value : filter.value;
131
+ filterValue = [singleValue];
132
+ }
123
133
  } else {
124
134
  // Single value - don't wrap in array
125
135
  filterValue = Array.isArray(filter.value) && filter.value[0] && typeof filter.value[0] === 'object'
126
136
  ? (filter.value[0] as any).value
127
- : Array.isArray(filter.value) && filter.value[0]
137
+ : Array.isArray(filter.value) && filter.value[0]
128
138
  ? filter.value[0]
129
139
  : filter.value;
130
140
  }
131
-
141
+
132
142
  if (filterName === 'name') {
133
- search.query.search_term = filterValue;
134
143
  search.query.name = filterValue;
144
+ } else if (filterName === 'id') {
145
+ search.query.id = filterValue;
135
146
  } else {
136
147
  search.query[filterName] = filterValue;
137
148
  }
@@ -3,7 +3,7 @@ import { useEffect, useState } from 'react';
3
3
  import { FacetBucket, FacetNameBucket } from '@vertesia/common';
4
4
  import { SelectBox } from '@vertesia/ui/core';
5
5
  import { useUserSession } from '@vertesia/ui/session';
6
- import { facetOptionNameLabel } from './utils';
6
+ import { facetOptionNameLabel } from './utils/utils';
7
7
 
8
8
  interface EnvironmentFacetProps {
9
9
  search: any;
@@ -0,0 +1,121 @@
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 InteractionsFacetsNavProps {
6
+ facets: {
7
+ tags?: any[];
8
+ };
9
+ search: SearchInterface;
10
+ env?: string | null;
11
+ }
12
+
13
+ // Hook to create filter groups for interactions
14
+ export function useInteractionsFilterGroups(facets: InteractionsFacetsNavProps['facets']): FilterGroup[] {
15
+ void facets;
16
+ const customFilterGroups: FilterGroup[] = [];
17
+
18
+ // Add name filter as string type
19
+ const nameFilterGroup = {
20
+ name: 'name',
21
+ placeholder: 'Name',
22
+ type: 'text' as const,
23
+ multiple: false
24
+ };
25
+ customFilterGroups.push(nameFilterGroup);
26
+
27
+ // Add prompt name filter as string type
28
+ const promptNameFilterGroup = {
29
+ name: 'prompt',
30
+ placeholder: 'Prompt Name',
31
+ type: 'text' as const,
32
+ multiple: false
33
+ };
34
+ customFilterGroups.push(promptNameFilterGroup);
35
+
36
+ const ModelFilterGroup = {
37
+ name: 'model',
38
+ placeholder: 'Model',
39
+ type: 'text' as const,
40
+ multiple: false
41
+ };
42
+ customFilterGroups.push(ModelFilterGroup);
43
+
44
+ // Add tags filter as stringList type (allows custom input)
45
+ const tagsFilterGroup = {
46
+ name: 'tags',
47
+ placeholder: 'Tags',
48
+ type: 'stringList' as const,
49
+ multiple: true
50
+ };
51
+ customFilterGroups.push(tagsFilterGroup);
52
+
53
+ return customFilterGroups;
54
+ }
55
+
56
+ // Hook to create filter change handler for interactions
57
+ export function useInteractionsFilterHandler(search: SearchInterface) {
58
+
59
+ return (newFilters: BaseFilter[]) => {
60
+ if (newFilters.length === 0) {
61
+ search.clearFilters(true, true);
62
+
63
+ return;
64
+ }
65
+
66
+ // Clear all filters first without defaults, then apply new ones
67
+ search.clearFilters(false, false);
68
+
69
+ newFilters.forEach(filter => {
70
+ if (filter.value && filter.value.length > 0) {
71
+ const filterName = filter.name;
72
+ let filterValue;
73
+ if (filter.type === 'stringList') {
74
+ filterValue = filter.value.map(v => typeof v === 'string' ? v : v.value);
75
+ } else if (filter.multiple) {
76
+ filterValue = Array.isArray(filter.value)
77
+ ? filter.value.map((v: any) => typeof v === 'object' && v.value ? v.value : v)
78
+ : [typeof filter.value === 'object' && (filter.value as any).value ? (filter.value as any).value : filter.value];
79
+ } else {
80
+ // Single value - don't wrap in array
81
+ filterValue = Array.isArray(filter.value) && filter.value[0] && typeof filter.value[0] === 'object'
82
+ ? (filter.value[0] as any).value
83
+ : Array.isArray(filter.value) && filter.value[0]
84
+ ? filter.value[0]
85
+ : filter.value;
86
+ }
87
+
88
+ search.query[filterName] = filterValue;
89
+ }
90
+ });
91
+
92
+ search.search(true);
93
+ };
94
+ }
95
+
96
+ // Component for interactions filtering
97
+ export function InteractionsFacetsNav({ facets, search }: InteractionsFacetsNavProps) {
98
+ const [filters, setFilters] = useState<BaseFilter[]>([]);
99
+ const filterGroups = useInteractionsFilterGroups(facets);
100
+ const handleFilterLogic = useInteractionsFilterHandler(search);
101
+
102
+ const handleFilterChange: React.Dispatch<React.SetStateAction<BaseFilter[]>> = (value) => {
103
+ const newFilters = typeof value === 'function' ? value(filters) : value;
104
+ setFilters(newFilters);
105
+ handleFilterLogic(newFilters);
106
+ };
107
+
108
+ return (
109
+ <FilterProvider
110
+ filterGroups={filterGroups}
111
+ filters={filters}
112
+ setFilters={handleFilterChange}
113
+ >
114
+ <div className="flex gap-2 items-center">
115
+ <FilterBtn />
116
+ <FilterBar />
117
+ <FilterClear />
118
+ </div>
119
+ </FilterProvider>
120
+ );
121
+ }