@vertesia/ui 1.0.0 → 1.1.0-dev.20260427.060440Z

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 (293) hide show
  1. package/lib/esm/core/components/ComboBox.js +23 -24
  2. package/lib/esm/core/components/ComboBox.js.map +1 -1
  3. package/lib/esm/core/components/FormItem.js +2 -2
  4. package/lib/esm/core/components/FormItem.js.map +1 -1
  5. package/lib/esm/core/components/SidePanel.js +1 -1
  6. package/lib/esm/core/components/SidePanel.js.map +1 -1
  7. package/lib/esm/core/components/shadcn/collaspible.js +3 -4
  8. package/lib/esm/core/components/shadcn/collaspible.js.map +1 -1
  9. package/lib/esm/core/components/shadcn/dropdown.js +37 -12
  10. package/lib/esm/core/components/shadcn/dropdown.js.map +1 -1
  11. package/lib/esm/core/components/shadcn/filters/comboBox/DateCombobox.js +6 -6
  12. package/lib/esm/core/components/shadcn/filters/comboBox/DateCombobox.js.map +1 -1
  13. package/lib/esm/core/components/shadcn/filters/filterBar.js +5 -3
  14. package/lib/esm/core/components/shadcn/filters/filterBar.js.map +1 -1
  15. package/lib/esm/core/components/shadcn/radioGroup.js +1 -2
  16. package/lib/esm/core/components/shadcn/radioGroup.js.map +1 -1
  17. package/lib/esm/core/components/shadcn/switch.js +0 -1
  18. package/lib/esm/core/components/shadcn/switch.js.map +1 -1
  19. package/lib/esm/core/components/shadcn/tabs.js +2 -2
  20. package/lib/esm/core/components/shadcn/tabs.js.map +1 -1
  21. package/lib/esm/core/components/shadcn/tooltip.js +17 -1
  22. package/lib/esm/core/components/shadcn/tooltip.js.map +1 -1
  23. package/lib/esm/core/hooks/PortalContainerProvider.js +9 -3
  24. package/lib/esm/core/hooks/PortalContainerProvider.js.map +1 -1
  25. package/lib/esm/env/index.js +5 -8
  26. package/lib/esm/env/index.js.map +1 -1
  27. package/lib/esm/features/agent/chat/AgentRightPanel.js +21 -11
  28. package/lib/esm/features/agent/chat/AgentRightPanel.js.map +1 -1
  29. package/lib/esm/features/agent/chat/AskUserWidget.js +2 -6
  30. package/lib/esm/features/agent/chat/AskUserWidget.js.map +1 -1
  31. package/lib/esm/features/agent/chat/DocumentPanel.js +8 -5
  32. package/lib/esm/features/agent/chat/DocumentPanel.js.map +1 -1
  33. package/lib/esm/features/agent/chat/DocumentTabBar.js +5 -13
  34. package/lib/esm/features/agent/chat/DocumentTabBar.js.map +1 -1
  35. package/lib/esm/features/agent/chat/ModernAgentConversation.js +57 -26
  36. package/lib/esm/features/agent/chat/ModernAgentConversation.js.map +1 -1
  37. package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +20 -16
  38. package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +1 -1
  39. package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js +56 -45
  40. package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js.map +1 -1
  41. package/lib/esm/features/agent/chat/ModernAgentOutput/MessageItem.js +1 -1
  42. package/lib/esm/features/agent/chat/ModernAgentOutput/MessageItem.js.map +1 -1
  43. package/lib/esm/features/agent/chat/SlidingThinkingIndicator.js +3 -9
  44. package/lib/esm/features/agent/chat/SlidingThinkingIndicator.js.map +1 -1
  45. package/lib/esm/features/agent/chat/hooks/useAgentStream.js +9 -5
  46. package/lib/esm/features/agent/chat/hooks/useAgentStream.js.map +1 -1
  47. package/lib/esm/features/agent/chat/hooks/useDocumentPanel.js +4 -0
  48. package/lib/esm/features/agent/chat/hooks/useDocumentPanel.js.map +1 -1
  49. package/lib/esm/features/facets/AgentRunnerFacetsNav.js +1 -1
  50. package/lib/esm/features/facets/AgentRunnerFacetsNav.js.map +1 -1
  51. package/lib/esm/features/facets/DocumentsFacetsNav.js +3 -2
  52. package/lib/esm/features/facets/DocumentsFacetsNav.js.map +1 -1
  53. package/lib/esm/features/facets/RunsFacetsNav.js +8 -1
  54. package/lib/esm/features/facets/RunsFacetsNav.js.map +1 -1
  55. package/lib/esm/features/facets/WorkflowExecutionsFacetsNav.js +1 -1
  56. package/lib/esm/features/facets/WorkflowExecutionsFacetsNav.js.map +1 -1
  57. package/lib/esm/features/facets/index.js +1 -0
  58. package/lib/esm/features/facets/index.js.map +1 -1
  59. package/lib/esm/features/facets/utils/VInteractionFacet.js +5 -5
  60. package/lib/esm/features/facets/utils/VInteractionFacet.js.map +1 -1
  61. package/lib/esm/features/index.js +1 -0
  62. package/lib/esm/features/index.js.map +1 -1
  63. package/lib/esm/features/oauth/OAuthProviderConnectButton.js +85 -0
  64. package/lib/esm/features/oauth/OAuthProviderConnectButton.js.map +1 -0
  65. package/lib/esm/features/oauth/RemoteMcpConnectionButton.js +119 -0
  66. package/lib/esm/features/oauth/RemoteMcpConnectionButton.js.map +1 -0
  67. package/lib/esm/features/oauth/index.js +4 -0
  68. package/lib/esm/features/oauth/index.js.map +1 -0
  69. package/lib/esm/features/oauth/useOAuthPopup.js +89 -0
  70. package/lib/esm/features/oauth/useOAuthPopup.js.map +1 -0
  71. package/lib/esm/features/store/collections/BrowseCollectionView.js.map +1 -1
  72. package/lib/esm/features/store/collections/EditCollectionView.js +9 -2
  73. package/lib/esm/features/store/collections/EditCollectionView.js.map +1 -1
  74. package/lib/esm/features/store/objects/components/ContentOverview.js +19 -7
  75. package/lib/esm/features/store/objects/components/ContentOverview.js.map +1 -1
  76. package/lib/esm/features/store/objects/components/useContentPanelHooks.js +35 -15
  77. package/lib/esm/features/store/objects/components/useContentPanelHooks.js.map +1 -1
  78. package/lib/esm/features/store/objects/selection/ObjectsActionContext.js +3 -3
  79. package/lib/esm/features/store/objects/selection/ObjectsActionContext.js.map +1 -1
  80. package/lib/esm/features/store/objects/selection/SelectionActions.js +4 -3
  81. package/lib/esm/features/store/objects/selection/SelectionActions.js.map +1 -1
  82. package/lib/esm/features/store/objects/selection/actions/ExportPropertiesAction.js +11 -3
  83. package/lib/esm/features/store/objects/selection/actions/ExportPropertiesAction.js.map +1 -1
  84. package/lib/esm/features/store/objects/upload/DocumentUploadModal.js +1 -5
  85. package/lib/esm/features/store/objects/upload/DocumentUploadModal.js.map +1 -1
  86. package/lib/esm/features/user/UserInfo.js +33 -10
  87. package/lib/esm/features/user/UserInfo.js.map +1 -1
  88. package/lib/esm/i18n/locales/ar.json +81 -98
  89. package/lib/esm/i18n/locales/de.json +44 -73
  90. package/lib/esm/i18n/locales/en.json +31 -61
  91. package/lib/esm/i18n/locales/es.json +55 -79
  92. package/lib/esm/i18n/locales/fr.json +55 -81
  93. package/lib/esm/i18n/locales/it.json +55 -79
  94. package/lib/esm/i18n/locales/ja.json +46 -75
  95. package/lib/esm/i18n/locales/ko.json +44 -73
  96. package/lib/esm/i18n/locales/pt.json +55 -79
  97. package/lib/esm/i18n/locales/ru.json +58 -81
  98. package/lib/esm/i18n/locales/tr.json +46 -75
  99. package/lib/esm/i18n/locales/zh-TW.json +46 -75
  100. package/lib/esm/i18n/locales/zh.json +46 -75
  101. package/lib/esm/session/UserSession.js +2 -4
  102. package/lib/esm/session/UserSession.js.map +1 -1
  103. package/lib/esm/session/UserSessionProvider.js +22 -17
  104. package/lib/esm/session/UserSessionProvider.js.map +1 -1
  105. package/lib/esm/session/auth/composable.js +20 -2
  106. package/lib/esm/session/auth/composable.js.map +1 -1
  107. package/lib/esm/session/auth/domainRouting.js +7 -0
  108. package/lib/esm/session/auth/domainRouting.js.map +1 -0
  109. package/lib/esm/shell/login/InviteAcceptModal.js +1 -0
  110. package/lib/esm/shell/login/InviteAcceptModal.js.map +1 -1
  111. package/lib/esm/widgets/form/Form.js +2 -2
  112. package/lib/esm/widgets/form/Form.js.map +1 -1
  113. package/lib/esm/widgets/markdown/MarkdownRenderer.js +2 -1
  114. package/lib/esm/widgets/markdown/MarkdownRenderer.js.map +1 -1
  115. package/lib/esm/widgets/markdown/preprocessMathDelimiters.js +226 -0
  116. package/lib/esm/widgets/markdown/preprocessMathDelimiters.js.map +1 -0
  117. package/lib/esm/widgets/monacoEditor/MonacoEditor.js +40 -5
  118. package/lib/esm/widgets/monacoEditor/MonacoEditor.js.map +1 -1
  119. package/lib/esm/widgets/monacoEditor/foldingProviders.js +132 -0
  120. package/lib/esm/widgets/monacoEditor/foldingProviders.js.map +1 -0
  121. package/lib/tsconfig.tsbuildinfo +1 -1
  122. package/lib/types/core/components/ComboBox.d.ts +12 -2
  123. package/lib/types/core/components/ComboBox.d.ts.map +1 -1
  124. package/lib/types/core/components/FormItem.d.ts +5 -2
  125. package/lib/types/core/components/FormItem.d.ts.map +1 -1
  126. package/lib/types/core/components/SidePanel.d.ts.map +1 -1
  127. package/lib/types/core/components/shadcn/badge.d.ts +2 -2
  128. package/lib/types/core/components/shadcn/collaspible.d.ts +3 -3
  129. package/lib/types/core/components/shadcn/collaspible.d.ts.map +1 -1
  130. package/lib/types/core/components/shadcn/dropdown.d.ts +11 -3
  131. package/lib/types/core/components/shadcn/dropdown.d.ts.map +1 -1
  132. package/lib/types/core/components/shadcn/filters/filterBar.d.ts +2 -1
  133. package/lib/types/core/components/shadcn/filters/filterBar.d.ts.map +1 -1
  134. package/lib/types/core/components/shadcn/input.d.ts +1 -1
  135. package/lib/types/core/components/shadcn/radioGroup.d.ts.map +1 -1
  136. package/lib/types/core/components/shadcn/switch.d.ts.map +1 -1
  137. package/lib/types/core/components/shadcn/tabs.d.ts +4 -2
  138. package/lib/types/core/components/shadcn/tabs.d.ts.map +1 -1
  139. package/lib/types/core/components/shadcn/text.d.ts +1 -1
  140. package/lib/types/core/components/shadcn/tooltip.d.ts +1 -1
  141. package/lib/types/core/components/shadcn/tooltip.d.ts.map +1 -1
  142. package/lib/types/core/hooks/PortalContainerProvider.d.ts +1 -0
  143. package/lib/types/core/hooks/PortalContainerProvider.d.ts.map +1 -1
  144. package/lib/types/env/index.d.ts +2 -2
  145. package/lib/types/env/index.d.ts.map +1 -1
  146. package/lib/types/features/agent/chat/AgentChart.d.ts +1 -1
  147. package/lib/types/features/agent/chat/AgentChart.d.ts.map +1 -1
  148. package/lib/types/features/agent/chat/AgentRightPanel.d.ts +7 -2
  149. package/lib/types/features/agent/chat/AgentRightPanel.d.ts.map +1 -1
  150. package/lib/types/features/agent/chat/DocumentPanel.d.ts +2 -2
  151. package/lib/types/features/agent/chat/DocumentPanel.d.ts.map +1 -1
  152. package/lib/types/features/agent/chat/DocumentTabBar.d.ts +1 -2
  153. package/lib/types/features/agent/chat/DocumentTabBar.d.ts.map +1 -1
  154. package/lib/types/features/agent/chat/ModernAgentConversation.d.ts +5 -3
  155. package/lib/types/features/agent/chat/ModernAgentConversation.d.ts.map +1 -1
  156. package/lib/types/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts +4 -2
  157. package/lib/types/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts.map +1 -1
  158. package/lib/types/features/agent/chat/ModernAgentOutput/Header.d.ts +4 -4
  159. package/lib/types/features/agent/chat/ModernAgentOutput/Header.d.ts.map +1 -1
  160. package/lib/types/features/agent/chat/ModernAgentOutput/MessageItem.d.ts.map +1 -1
  161. package/lib/types/features/agent/chat/VegaLiteChart.d.ts +1 -1
  162. package/lib/types/features/agent/chat/VegaLiteChart.d.ts.map +1 -1
  163. package/lib/types/features/agent/chat/hooks/useAgentStream.d.ts +4 -2
  164. package/lib/types/features/agent/chat/hooks/useAgentStream.d.ts.map +1 -1
  165. package/lib/types/features/agent/chat/hooks/useDocumentPanel.d.ts +1 -0
  166. package/lib/types/features/agent/chat/hooks/useDocumentPanel.d.ts.map +1 -1
  167. package/lib/types/features/facets/DocumentsFacetsNav.d.ts.map +1 -1
  168. package/lib/types/features/facets/RunsFacetsNav.d.ts.map +1 -1
  169. package/lib/types/features/facets/index.d.ts +1 -0
  170. package/lib/types/features/facets/index.d.ts.map +1 -1
  171. package/lib/types/features/index.d.ts +1 -0
  172. package/lib/types/features/index.d.ts.map +1 -1
  173. package/lib/types/features/oauth/OAuthProviderConnectButton.d.ts +11 -0
  174. package/lib/types/features/oauth/OAuthProviderConnectButton.d.ts.map +1 -0
  175. package/lib/types/features/oauth/RemoteMcpConnectionButton.d.ts +25 -0
  176. package/lib/types/features/oauth/RemoteMcpConnectionButton.d.ts.map +1 -0
  177. package/lib/types/features/oauth/index.d.ts +4 -0
  178. package/lib/types/features/oauth/index.d.ts.map +1 -0
  179. package/lib/types/features/oauth/useOAuthPopup.d.ts +12 -0
  180. package/lib/types/features/oauth/useOAuthPopup.d.ts.map +1 -0
  181. package/lib/types/features/store/collections/BrowseCollectionView.d.ts.map +1 -1
  182. package/lib/types/features/store/collections/EditCollectionView.d.ts.map +1 -1
  183. package/lib/types/features/store/objects/components/useContentPanelHooks.d.ts.map +1 -1
  184. package/lib/types/features/store/objects/selection/ObjectsActionContext.d.ts +3 -3
  185. package/lib/types/features/store/objects/selection/ObjectsActionContext.d.ts.map +1 -1
  186. package/lib/types/features/store/objects/selection/ObjectsActionSpec.d.ts +2 -1
  187. package/lib/types/features/store/objects/selection/ObjectsActionSpec.d.ts.map +1 -1
  188. package/lib/types/features/store/objects/selection/SelectionActions.d.ts +3 -3
  189. package/lib/types/features/store/objects/selection/SelectionActions.d.ts.map +1 -1
  190. package/lib/types/features/store/objects/selection/actions/ExportPropertiesAction.d.ts.map +1 -1
  191. package/lib/types/features/user/UserInfo.d.ts +2 -1
  192. package/lib/types/features/user/UserInfo.d.ts.map +1 -1
  193. package/lib/types/session/UserSession.d.ts.map +1 -1
  194. package/lib/types/session/UserSessionProvider.d.ts +0 -1
  195. package/lib/types/session/UserSessionProvider.d.ts.map +1 -1
  196. package/lib/types/session/auth/composable.d.ts +4 -0
  197. package/lib/types/session/auth/composable.d.ts.map +1 -1
  198. package/lib/types/session/auth/domainRouting.d.ts +8 -0
  199. package/lib/types/session/auth/domainRouting.d.ts.map +1 -0
  200. package/lib/types/shell/login/InviteAcceptModal.d.ts.map +1 -1
  201. package/lib/types/widgets/markdown/MarkdownRenderer.d.ts.map +1 -1
  202. package/lib/types/widgets/markdown/preprocessMathDelimiters.d.ts +24 -0
  203. package/lib/types/widgets/markdown/preprocessMathDelimiters.d.ts.map +1 -0
  204. package/lib/types/widgets/monacoEditor/MonacoEditor.d.ts +2 -1
  205. package/lib/types/widgets/monacoEditor/MonacoEditor.d.ts.map +1 -1
  206. package/lib/types/widgets/monacoEditor/foldingProviders.d.ts +2 -0
  207. package/lib/types/widgets/monacoEditor/foldingProviders.d.ts.map +1 -0
  208. package/lib/vertesia-ui-core.js +1 -1
  209. package/lib/vertesia-ui-core.js.map +1 -1
  210. package/lib/vertesia-ui-env.js +1 -1
  211. package/lib/vertesia-ui-env.js.map +1 -1
  212. package/lib/vertesia-ui-features.js +1 -1
  213. package/lib/vertesia-ui-features.js.map +1 -1
  214. package/lib/vertesia-ui-i18n.js +1 -1
  215. package/lib/vertesia-ui-i18n.js.map +1 -1
  216. package/lib/vertesia-ui-layout.js +1 -1
  217. package/lib/vertesia-ui-layout.js.map +1 -1
  218. package/lib/vertesia-ui-session.js +1 -1
  219. package/lib/vertesia-ui-session.js.map +1 -1
  220. package/lib/vertesia-ui-shell.js +1 -1
  221. package/lib/vertesia-ui-shell.js.map +1 -1
  222. package/lib/vertesia-ui-widgets.js +1 -1
  223. package/lib/vertesia-ui-widgets.js.map +1 -1
  224. package/package.json +15 -15
  225. package/src/core/components/ComboBox.tsx +66 -29
  226. package/src/core/components/FormItem.tsx +9 -6
  227. package/src/core/components/SidePanel.tsx +5 -3
  228. package/src/core/components/shadcn/collaspible.tsx +5 -7
  229. package/src/core/components/shadcn/dropdown.tsx +68 -13
  230. package/src/core/components/shadcn/filters/comboBox/DateCombobox.tsx +6 -6
  231. package/src/core/components/shadcn/filters/filterBar.tsx +5 -3
  232. package/src/core/components/shadcn/radioGroup.tsx +1 -3
  233. package/src/core/components/shadcn/switch.tsx +0 -2
  234. package/src/core/components/shadcn/tabs.tsx +15 -2
  235. package/src/core/components/shadcn/tooltip.tsx +20 -3
  236. package/src/core/hooks/PortalContainerProvider.tsx +11 -3
  237. package/src/env/index.ts +7 -10
  238. package/src/features/agent/chat/AgentRightPanel.tsx +43 -23
  239. package/src/features/agent/chat/DocumentPanel.tsx +21 -19
  240. package/src/features/agent/chat/DocumentTabBar.tsx +21 -32
  241. package/src/features/agent/chat/ModernAgentConversation.tsx +72 -27
  242. package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +21 -9
  243. package/src/features/agent/chat/ModernAgentOutput/Header.tsx +136 -115
  244. package/src/features/agent/chat/ModernAgentOutput/MessageItem.tsx +0 -3
  245. package/src/features/agent/chat/hooks/useAgentStream.ts +13 -7
  246. package/src/features/agent/chat/hooks/useDocumentPanel.ts +8 -0
  247. package/src/features/facets/AgentRunnerFacetsNav.tsx +1 -1
  248. package/src/features/facets/DocumentsFacetsNav.tsx +3 -1
  249. package/src/features/facets/RunsFacetsNav.tsx +9 -1
  250. package/src/features/facets/WorkflowExecutionsFacetsNav.tsx +1 -1
  251. package/src/features/facets/index.ts +1 -0
  252. package/src/features/facets/utils/VInteractionFacet.tsx +12 -12
  253. package/src/features/index.ts +1 -0
  254. package/src/features/oauth/OAuthProviderConnectButton.tsx +125 -0
  255. package/src/features/oauth/RemoteMcpConnectionButton.tsx +274 -0
  256. package/src/features/oauth/index.ts +3 -0
  257. package/src/features/oauth/useOAuthPopup.ts +125 -0
  258. package/src/features/store/collections/BrowseCollectionView.tsx +3 -3
  259. package/src/features/store/collections/EditCollectionView.tsx +10 -1
  260. package/src/features/store/objects/components/ContentOverview.tsx +108 -87
  261. package/src/features/store/objects/components/useContentPanelHooks.ts +50 -15
  262. package/src/features/store/objects/selection/ObjectsActionContext.tsx +5 -5
  263. package/src/features/store/objects/selection/ObjectsActionSpec.ts +2 -1
  264. package/src/features/store/objects/selection/SelectionActions.tsx +6 -5
  265. package/src/features/store/objects/selection/actions/ExportPropertiesAction.tsx +12 -3
  266. package/src/features/user/UserInfo.tsx +82 -10
  267. package/src/i18n/locales/ar.json +81 -98
  268. package/src/i18n/locales/de.json +44 -73
  269. package/src/i18n/locales/en.json +31 -61
  270. package/src/i18n/locales/es.json +55 -79
  271. package/src/i18n/locales/fr.json +55 -81
  272. package/src/i18n/locales/it.json +55 -79
  273. package/src/i18n/locales/ja.json +46 -75
  274. package/src/i18n/locales/ko.json +44 -73
  275. package/src/i18n/locales/pt.json +55 -79
  276. package/src/i18n/locales/ru.json +58 -81
  277. package/src/i18n/locales/tr.json +46 -75
  278. package/src/i18n/locales/zh-TW.json +46 -75
  279. package/src/i18n/locales/zh.json +46 -75
  280. package/src/session/UserSession.ts +2 -5
  281. package/src/session/UserSessionProvider.tsx +23 -18
  282. package/src/session/auth/auth-flow.md +1 -1
  283. package/src/session/auth/composable.ts +21 -2
  284. package/src/session/auth/domainRouting.test.ts +26 -0
  285. package/src/session/auth/domainRouting.ts +13 -0
  286. package/src/shell/login/InviteAcceptModal.tsx +1 -0
  287. package/src/widgets/form/Form.tsx +2 -2
  288. package/src/widgets/markdown/MarkdownRenderer.tsx +2 -1
  289. package/src/widgets/markdown/markdown.css +12 -0
  290. package/src/widgets/markdown/preprocessMathDelimiters.test.ts +87 -0
  291. package/src/widgets/markdown/preprocessMathDelimiters.ts +229 -0
  292. package/src/widgets/monacoEditor/MonacoEditor.tsx +47 -4
  293. package/src/widgets/monacoEditor/foldingProviders.ts +122 -0
@@ -237,73 +237,71 @@ function PropertiesPanel({ object, refetch, handleCopyContent }: { object: Conte
237
237
 
238
238
  return (
239
239
  <>
240
- <div className="flex justify-between items-center px-2">
241
- <div className="flex items-center gap-1 bg-muted mb-2 p-1 rounded">
242
- <Button
243
- variant={`${viewCode ? "ghost" : "primary"}`}
244
- size="sm"
245
- alt={t('store.previewProperties')}
246
- onClick={() => setViewCode(!viewCode)}
247
- >
248
- Properties
249
- </Button>
250
- <Button
251
- variant={`${viewCode ? "primary" : "ghost"}`}
252
- size="sm"
253
- alt={t('store.viewInJsonFormat')}
254
- onClick={() => setViewCode(!viewCode)}
255
- >
256
- JSON
257
- </Button>
258
- </div>
259
- <div className="flex items-center gap-2">
260
- {object.properties && (
240
+ <div className="flex flex-col h-full">
241
+ <div className="flex justify-between items-center px-2">
242
+ <div className="flex items-center gap-1 bg-muted mb-2 p-1 rounded">
243
+ <Button
244
+ variant={`${viewCode ? "ghost" : "primary"}`}
245
+ size="sm"
246
+ alt={t('store.previewProperties')}
247
+ onClick={() => setViewCode(!viewCode)}
248
+ >
249
+ Properties
250
+ </Button>
251
+ <Button
252
+ variant={`${viewCode ? "primary" : "ghost"}`}
253
+ size="sm"
254
+ alt={t('store.viewInJsonFormat')}
255
+ onClick={() => setViewCode(!viewCode)}
256
+ >
257
+ JSON
258
+ </Button>
259
+ </div>
260
+ <div className="flex items-center gap-2">
261
+ {object.properties && (
262
+ <Button
263
+ variant="ghost"
264
+ size="sm"
265
+ title="Copy properties"
266
+ onClick={() =>
267
+ handleCopyContent(
268
+ JSON.stringify(
269
+ object.properties,
270
+ null,
271
+ 2,
272
+ ),
273
+ "properties",
274
+ )
275
+ }
276
+ >
277
+ <Copy className="size-4" />
278
+ </Button>
279
+ )}
261
280
  <Button
262
281
  variant="ghost"
263
282
  size="sm"
264
- title="Copy properties"
265
- onClick={() =>
266
- handleCopyContent(
267
- JSON.stringify(
268
- object.properties,
269
- null,
270
- 2,
271
- ),
272
- "properties",
273
- )
274
- }
283
+ onClick={handleOpenPropertiesModal}
284
+ title="Edit properties"
285
+ className="flex items-center gap-2"
275
286
  >
276
- <Copy className="size-4" />
287
+ <SquarePen className="size-4" />
277
288
  </Button>
278
- )}
279
- <Button
280
- variant="ghost"
281
- size="sm"
282
- onClick={handleOpenPropertiesModal}
283
- title="Edit properties"
284
- className="flex items-center gap-2"
285
- >
286
- <SquarePen className="size-4" />
287
- </Button>
289
+ </div>
288
290
  </div>
289
- </div>
290
291
 
291
- {
292
- object.properties ? (
293
- <div className={`h-full px-2`}>
292
+ {object.properties ? (
293
+ <div className="flex-1 min-h-0 px-2">
294
294
  <JSONDisplay
295
295
  value={object.properties}
296
296
  viewCode={viewCode}
297
-
298
297
  />
299
298
  </div>
300
299
  ) : (
301
- <div className={`h-full px-2`}>
300
+ <div className="flex-1 min-h-0 px-2">
302
301
  <div>{t('store.noPropertiesDefined')}</div>
303
302
  </div>
304
- )
305
- }
306
- {/* Properties Editor Modal */}
303
+ )}
304
+ </div>
307
305
  <PropertiesEditorModal
308
306
  isOpen={isPropertiesModalOpen}
309
307
  onClose={handleClosePropertiesModal}
@@ -337,6 +335,13 @@ function DataPanel({ object, loadText, handleCopyContent, refetch }: { object: C
337
335
  };
338
336
 
339
337
  const [currentPanel, setCurrentPanel] = useState<PanelView>(getInitialView());
338
+ const [hasVisitedPdfPanel, setHasVisitedPdfPanel] = useState(currentPanel === PanelView.Pdf);
339
+
340
+ useEffect(() => {
341
+ if (currentPanel === PanelView.Pdf) {
342
+ setHasVisitedPdfPanel(true);
343
+ }
344
+ }, [currentPanel]);
340
345
 
341
346
  // Text editing state
342
347
  const [isEditing, setIsEditing] = useState(false);
@@ -358,8 +363,10 @@ function DataPanel({ object, loadText, handleCopyContent, refetch }: { object: C
358
363
  loadText: reloadText,
359
364
  } = useObjectText(object.id, object.text, loadText);
360
365
 
361
- // Poll for PDF/document processing status when object is created or processing
362
- const shouldPollProgress = (isPdf || isPreviewableAsPdfDoc) && isCreatedOrProcessing;
366
+ // Only poll while the active panel can actually surface processing progress.
367
+ const shouldPollProgress = (isPdf || isPreviewableAsPdfDoc)
368
+ && isCreatedOrProcessing
369
+ && (currentPanel === PanelView.Text || currentPanel === PanelView.Pdf);
363
370
  const {
364
371
  progress: pdfProgress,
365
372
  status: pdfStatus,
@@ -375,15 +382,19 @@ function DataPanel({ object, loadText, handleCopyContent, refetch }: { object: C
375
382
  triggerConversion: triggerOfficePdfConversion,
376
383
  } = useOfficePdfConversion(object.id, isPreviewableAsPdfDoc);
377
384
 
378
- // Reload object when PDF processing completes
385
+ // Load text once processing completes without triggering a full object refetch
386
+ // (which would flash the page-level loading spinner).
379
387
  useEffect(() => {
380
388
  if (processingComplete && pdfStatus === WorkflowExecutionStatus.COMPLETED) {
381
- refetch?.();
389
+ reloadText();
382
390
  }
383
- }, [processingComplete, pdfStatus, refetch]);
391
+ }, [processingComplete, pdfStatus, reloadText]);
384
392
 
385
393
  // Show processing panel when workflow is running (for both PDFs and Office documents)
386
394
  const showProcessingPanel = (isPdf || isPreviewableAsPdfDoc) && isCreatedOrProcessing && !processingComplete && pdfStatus === WorkflowExecutionStatus.RUNNING;
395
+ const showPdfPreviewPanel = currentPanel === PanelView.Pdf && !showProcessingPanel;
396
+ const showPdfProcessingPanel = showProcessingPanel && (currentPanel === PanelView.Text || currentPanel === PanelView.Pdf);
397
+ const keepPdfPreviewMounted = hasVisitedPdfPanel && !showProcessingPanel;
387
398
 
388
399
  const textContainerRef = useRef<HTMLDivElement | null>(null);
389
400
 
@@ -489,27 +500,33 @@ function DataPanel({ object, loadText, handleCopyContent, refetch }: { object: C
489
500
  />
490
501
  )}
491
502
  </div>
492
- <div className={getPanelVisibility(currentPanel === PanelView.Image)}>
493
- <ImagePanel object={object} />
494
- </div>
495
- <div className={getPanelVisibility(currentPanel === PanelView.Video)}>
496
- <VideoPanel object={object} />
497
- </div>
498
- <div className={getPanelVisibility(currentPanel === PanelView.Audio)}>
499
- <AudioPanel object={object} />
500
- </div>
501
- {hasTranscript && (
502
- <div className={getPanelVisibility(currentPanel === PanelView.Transcript)}>
503
+ {currentPanel === PanelView.Image && (
504
+ <div className={getPanelVisibility(true)}>
505
+ <ImagePanel object={object} />
506
+ </div>
507
+ )}
508
+ {currentPanel === PanelView.Video && (
509
+ <div className={getPanelVisibility(true)}>
510
+ <VideoPanel object={object} />
511
+ </div>
512
+ )}
513
+ {currentPanel === PanelView.Audio && (
514
+ <div className={getPanelVisibility(true)}>
515
+ <AudioPanel object={object} />
516
+ </div>
517
+ )}
518
+ {hasTranscript && currentPanel === PanelView.Transcript && (
519
+ <div className={getPanelVisibility(true)}>
503
520
  <TranscriptPanel object={object} handleCopyContent={handleCopyContent} />
504
521
  </div>
505
522
  )}
506
- {isPdf && (
507
- <div className={getPanelVisibility(currentPanel === PanelView.Pdf)}>
523
+ {isPdf && keepPdfPreviewMounted && (
524
+ <div className={getPanelVisibility(showPdfPreviewPanel)}>
508
525
  <PdfPreviewPanel object={object} />
509
526
  </div>
510
527
  )}
511
- {isPreviewableAsPdfDoc && (
512
- <div className={getPanelVisibility(currentPanel === PanelView.Pdf)}>
528
+ {isPreviewableAsPdfDoc && keepPdfPreviewMounted && (
529
+ <div className={getPanelVisibility(showPdfPreviewPanel)}>
513
530
  <OfficePdfPreviewPanel
514
531
  pdfRendition={pdfRendition}
515
532
  officePdfUrl={officePdfUrl}
@@ -519,24 +536,28 @@ function DataPanel({ object, loadText, handleCopyContent, refetch }: { object: C
519
536
  />
520
537
  </div>
521
538
  )}
522
- {showProcessingPanel && (
523
- <div className={getPanelVisibility(currentPanel === PanelView.Text)}>
539
+ {showPdfProcessingPanel && (
540
+ <div className={getPanelVisibility(true)}>
524
541
  <PdfProcessingPanel progress={pdfProgress} status={pdfStatus} outputFormat={pdfOutputFormat} />
525
542
  </div>
526
543
  )}
527
- <div className={getPanelVisibility(currentPanel === PanelView.Text && !showProcessingPanel && isLoadingText)}>
528
- <div className="flex justify-center items-center flex-1">
529
- <Spinner size="lg" />
544
+ {currentPanel === PanelView.Text && !showProcessingPanel && isLoadingText && (
545
+ <div className={getPanelVisibility(true)}>
546
+ <div className="flex justify-center items-center flex-1">
547
+ <Spinner size="lg" />
548
+ </div>
530
549
  </div>
531
- </div>
532
- <div className={getPanelVisibility(currentPanel === PanelView.Text && !showProcessingPanel && !isLoadingText)}>
533
- <TextPanel
534
- object={object}
535
- text={displayText}
536
- isTextCropped={isTextCropped}
537
- textContainerRef={textContainerRef}
538
- />
539
- </div>
550
+ )}
551
+ {currentPanel === PanelView.Text && !showProcessingPanel && !isLoadingText && (
552
+ <div className={getPanelVisibility(true)}>
553
+ <TextPanel
554
+ object={object}
555
+ text={displayText}
556
+ isTextCropped={isTextCropped}
557
+ textContainerRef={textContainerRef}
558
+ />
559
+ </div>
560
+ )}
540
561
  {isEditing && currentPanel === PanelView.Text && fullText != null && (
541
562
  <TextEditorPanel
542
563
  object={object}
@@ -1279,4 +1300,4 @@ function ProgressLine({ name, progress }: { name: string, progress: { total: num
1279
1300
  <span>{progress.processed} of {progress.total}</span>
1280
1301
  </div>
1281
1302
  );
1282
- }
1303
+ }
@@ -83,52 +83,87 @@ export function useObjectText(objectId: string, initialText?: string, loadOnMoun
83
83
  export function usePdfProcessingStatus(objectId: string, shouldPoll: boolean) {
84
84
  const { client } = useUserSession();
85
85
 
86
- const [progress, setProgress] = useState<DocAnalyzerProgress | undefined>();
87
- const [status, setStatus] = useState<WorkflowExecutionStatus | undefined>();
88
- const [outputFormat, setOutputFormat] = useState<DocProcessorOutputFormat | undefined>();
89
- const [isComplete, setIsComplete] = useState(false);
86
+ const [state, setState] = useState<{
87
+ progress?: DocAnalyzerProgress;
88
+ status?: WorkflowExecutionStatus;
89
+ outputFormat?: DocProcessorOutputFormat;
90
+ isComplete: boolean;
91
+ }>({ isComplete: false });
90
92
 
91
93
  useEffect(() => {
92
94
  if (!shouldPoll) return;
93
95
 
94
96
  let interrupted = false;
97
+ let timeoutId: ReturnType<typeof setTimeout> | undefined;
98
+
99
+ const updateStateIfChanged = (
100
+ nextProgress: DocAnalyzerProgress | undefined,
101
+ nextStatus: WorkflowExecutionStatus | undefined,
102
+ nextOutputFormat: DocProcessorOutputFormat | undefined,
103
+ nextIsComplete: boolean,
104
+ ) => {
105
+ setState((prev) => {
106
+ const prevProgress = JSON.stringify(prev.progress ?? null);
107
+ const nextProgressSignature = JSON.stringify(nextProgress ?? null);
108
+
109
+ if (
110
+ prev.status === nextStatus
111
+ && prev.outputFormat === nextOutputFormat
112
+ && prev.isComplete === nextIsComplete
113
+ && prevProgress === nextProgressSignature
114
+ ) {
115
+ return prev;
116
+ }
117
+
118
+ return {
119
+ progress: nextProgress,
120
+ status: nextStatus,
121
+ outputFormat: nextOutputFormat,
122
+ isComplete: nextIsComplete,
123
+ };
124
+ });
125
+ };
95
126
 
96
127
  function poll() {
97
128
  if (interrupted) return;
98
129
 
99
130
  client.objects.analyze(objectId).getStatus()
100
131
  .then((r) => {
101
- setProgress(r.progress);
102
- setStatus(r.status);
103
- setOutputFormat(r.output_format ?? r.progress?.output_format);
132
+ const nextOutputFormat = r.output_format ?? r.progress?.output_format;
104
133
 
105
134
  if (r.status === WorkflowExecutionStatus.RUNNING) {
135
+ updateStateIfChanged(r.progress, r.status, nextOutputFormat, false);
106
136
  // Workflow is running, poll every 2 seconds for progress
107
137
  if (!interrupted) {
108
- setTimeout(poll, 2000);
138
+ timeoutId = setTimeout(poll, 2000);
109
139
  }
110
140
  } else {
111
141
  // Workflow completed or terminal state
112
- setIsComplete(true);
142
+ updateStateIfChanged(r.progress, r.status, nextOutputFormat, true);
113
143
  }
114
144
  })
115
145
  .catch(() => {
116
146
  // No workflow found yet, poll every 10 seconds to check if one starts
117
147
  if (!interrupted) {
118
- setTimeout(poll, 10000);
148
+ timeoutId = setTimeout(poll, 10000);
119
149
  }
120
150
  });
121
151
  }
122
152
 
123
153
  poll();
124
- return () => { interrupted = true; };
154
+ return () => {
155
+ interrupted = true;
156
+ if (timeoutId) {
157
+ clearTimeout(timeoutId);
158
+ }
159
+ };
125
160
  }, [shouldPoll, objectId, client]);
126
161
 
127
162
  return {
128
- progress,
129
- status,
130
- outputFormat,
131
- isComplete,
163
+ progress: state.progress,
164
+ status: state.status,
165
+ outputFormat: state.outputFormat,
166
+ isComplete: state.isComplete,
132
167
  };
133
168
  }
134
169
 
@@ -1,6 +1,6 @@
1
1
  import { ReactNode, useMemo } from 'react';
2
2
 
3
- import { ColumnLayout } from '@vertesia/common';
3
+ import { ContentObjectTypeItem } from '@vertesia/common';
4
4
  import { ErrorBox, useFetch, useToast } from '@vertesia/ui/core';
5
5
  import { useUserSession } from '@vertesia/ui/session';
6
6
  import { useUITranslation } from '../../../../i18n/index.js';
@@ -29,9 +29,9 @@ const DEFAULT_ACTIONS: ObjectsActionSpec[] = [
29
29
 
30
30
  interface ObjectsActionContextProps {
31
31
  children: ReactNode;
32
- table_layout?: ColumnLayout[];
32
+ type?: ContentObjectTypeItem;
33
33
  }
34
- export function ObjectsActionContextProvider({ children, table_layout }: ObjectsActionContextProps) {
34
+ export function ObjectsActionContextProvider({ children, type }: ObjectsActionContextProps) {
35
35
  const { t } = useUITranslation();
36
36
  const selection = useDocumentSelection();
37
37
  const toast = useToast();
@@ -55,12 +55,12 @@ export function ObjectsActionContextProvider({ children, table_layout }: Objects
55
55
 
56
56
  const context = useMemo(() => {
57
57
  const context = new ObjectsActionContext({
58
- selection, toast, client, search, table_layout
58
+ selection, toast, client, search, type
59
59
  });
60
60
  context.allActions = DEFAULT_ACTIONS;
61
61
  context.wfRules = rules!;
62
62
  return context;
63
- }, [selection, rules, table_layout]);
63
+ }, [selection, rules, type]);
64
64
 
65
65
  if (error) {
66
66
  return <ErrorBox title={t('store.failedToFetchWorkflows')}>{error.message}</ErrorBox>
@@ -1,5 +1,5 @@
1
1
  import { VertesiaClient } from "@vertesia/client";
2
- import { ColumnLayout } from "@vertesia/common";
2
+ import { ColumnLayout, ContentObjectTypeItem } from "@vertesia/common";
3
3
  import { ToastFn } from "@vertesia/ui/core";
4
4
  import { DocumentSelection } from '../DocumentSelectionProvider';
5
5
  import { DocumentSearch } from '../search/DocumentSearchContext';
@@ -22,6 +22,7 @@ export interface ObjectsActionParams {
22
22
  toast: ToastFn,
23
23
  search: DocumentSearch,
24
24
  table_layout?: ColumnLayout[],
25
+ type?: ContentObjectTypeItem,
25
26
  }
26
27
 
27
28
  export interface ActionComponentTypeProps {
@@ -1,11 +1,12 @@
1
- import { ColumnLayout } from '@vertesia/common';
1
+ import { ContentObjectTypeItem } from '@vertesia/common';
2
2
  import { Button, Popover, PopoverContent, PopoverTrigger, SelectList } from '@vertesia/ui/core';
3
3
  import clsx from 'clsx';
4
4
  import { EllipsisVertical, X } from 'lucide-react';
5
5
 
6
6
  import { useState } from "react";
7
7
  import { useUITranslation } from '../../../../i18n/index.js';
8
- import { DocumentSelection, DocumentUploadModal, useDocumentSelection } from "../../../store";
8
+ import { DocumentSelection, useDocumentSelection } from "../DocumentSelectionProvider.js";
9
+ import { DocumentUploadModal } from "../upload/DocumentUploadModal.js";
9
10
  import { ExportPropertiesAction } from "./actions/ExportPropertiesAction";
10
11
  import { StartWorkflowAction } from "./actions/StartWorkflowComponent";
11
12
  import { ObjectsActionContextProvider } from "./ObjectsActionContext";
@@ -13,9 +14,9 @@ import { useObjectsActionContext } from "./ObjectsActionHooks";
13
14
  import { ObjectsActionSpec } from "./ObjectsActionSpec";
14
15
 
15
16
  interface SelectionActionsProps {
16
- table_layout?: ColumnLayout[];
17
+ type?: ContentObjectTypeItem;
17
18
  }
18
- export function SelectionActions({ table_layout }: SelectionActionsProps) {
19
+ export function SelectionActions({ type }: SelectionActionsProps) {
19
20
  const selection = useDocumentSelection();
20
21
  const size = selection.size();
21
22
  const plural = size > 1 ? "s" : "";
@@ -28,7 +29,7 @@ export function SelectionActions({ table_layout }: SelectionActionsProps) {
28
29
  };
29
30
 
30
31
  return (
31
- <ObjectsActionContextProvider table_layout={table_layout}>
32
+ <ObjectsActionContextProvider type={type}>
32
33
  <div className="flex items-center gap-x-2">
33
34
  {hasSelection && !hasSingleSelection &&
34
35
  <div className="flex items-center gap-x-1 shrink-0">
@@ -55,14 +55,17 @@ export function ExportPropertiesComponent({ action, objectIds }: ActionComponent
55
55
  }
56
56
  }
57
57
 
58
+ const typeId = ctx.params?.type?.id ?? query.type;
59
+ const table_layout = ctx.params?.type?.table_layout ?? undefined;
60
+
58
61
  getObjectIds().then((Ids) => {
59
62
  // When exporting all, send search result if a vector search was used
60
- // otherwise send the query.
63
+ // otherwise send the query — always constrained to the current content type.
61
64
  store.objects.exportProperties({
62
65
  objectIds: Ids,
63
66
  type: exportType,
64
- query: exportAll && !query.vector ? query : { type: query.type },
65
- table_layout: ctx.params?.table_layout,
67
+ query: exportAll && !query.vector ? { ...query, type: typeId } : { type: typeId },
68
+ table_layout: table_layout,
66
69
  }).then((response) => {
67
70
  let data;
68
71
 
@@ -102,6 +105,12 @@ export function ExportPropertiesComponent({ action, objectIds }: ActionComponent
102
105
  });
103
106
  } else {
104
107
  setOpen(false);
108
+ toast({
109
+ status: 'error',
110
+ title: t('store.actions.errorExportProperties'),
111
+ description: 'No objects selected for export',
112
+ duration: 5000
113
+ });
105
114
  }
106
115
  }
107
116