@vertesia/ui 0.60.0 → 0.61.0

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 (661) hide show
  1. package/lib/esm/core/components/FormItem.js +9 -0
  2. package/lib/esm/core/components/FormItem.js.map +1 -0
  3. package/lib/esm/core/components/InputList.js +4 -3
  4. package/lib/esm/core/components/InputList.js.map +1 -1
  5. package/lib/esm/core/components/index.js +3 -3
  6. package/lib/esm/core/components/index.js.map +1 -1
  7. package/lib/esm/core/components/shadcn/button.js +37 -7
  8. package/lib/esm/core/components/shadcn/button.js.map +1 -1
  9. package/lib/esm/core/components/shadcn/dialog.js +3 -3
  10. package/lib/esm/core/components/shadcn/dialog.js.map +1 -1
  11. package/lib/esm/core/components/shadcn/filters/DynamicLabel.js +38 -0
  12. package/lib/esm/core/components/shadcn/filters/DynamicLabel.js.map +1 -0
  13. package/lib/esm/core/components/shadcn/filters/comboBox.js +24 -26
  14. package/lib/esm/core/components/shadcn/filters/comboBox.js.map +1 -1
  15. package/lib/esm/core/components/shadcn/filters/dateFilter.js +12 -12
  16. package/lib/esm/core/components/shadcn/filters/dateFilter.js.map +1 -1
  17. package/lib/esm/core/components/shadcn/filters/filterBar.js +49 -36
  18. package/lib/esm/core/components/shadcn/filters/filterBar.js.map +1 -1
  19. package/lib/esm/core/components/shadcn/filters/filters.js +31 -23
  20. package/lib/esm/core/components/shadcn/filters/filters.js.map +1 -1
  21. package/lib/esm/core/components/shadcn/filters/selectFilter.js +33 -24
  22. package/lib/esm/core/components/shadcn/filters/selectFilter.js.map +1 -1
  23. package/lib/esm/core/components/shadcn/filters/textFilter.js +2 -2
  24. package/lib/esm/core/components/shadcn/filters/textFilter.js.map +1 -1
  25. package/lib/esm/core/components/shadcn/filters/types.js.map +1 -1
  26. package/lib/esm/core/components/shadcn/input.js +4 -4
  27. package/lib/esm/core/components/shadcn/input.js.map +1 -1
  28. package/lib/esm/core/components/shadcn/selectBox.js +72 -6
  29. package/lib/esm/core/components/shadcn/selectBox.js.map +1 -1
  30. package/lib/esm/core/components/styles.js +1 -1
  31. package/lib/esm/core/components/styles.js.map +1 -1
  32. package/lib/esm/core/components/table/index.js +3 -0
  33. package/lib/esm/core/components/table/index.js.map +1 -1
  34. package/lib/esm/core/index.js +2 -1
  35. package/lib/esm/core/index.js.map +1 -1
  36. package/lib/esm/core/utils/cn.js +6 -0
  37. package/lib/esm/core/utils/cn.js.map +1 -0
  38. package/lib/esm/core/utils/index.js +2 -0
  39. package/lib/esm/core/utils/index.js.map +1 -0
  40. package/lib/esm/features/agent/PayloadBuilder.js +174 -0
  41. package/lib/esm/features/agent/PayloadBuilder.js.map +1 -0
  42. package/lib/esm/features/agent/chat/AnimatedThinkingDots.js +207 -0
  43. package/lib/esm/features/agent/chat/AnimatedThinkingDots.js.map +1 -0
  44. package/lib/esm/features/agent/chat/JumpingDots.js +6 -0
  45. package/lib/esm/features/agent/chat/JumpingDots.js.map +1 -0
  46. package/lib/esm/features/agent/chat/ModernAgentConversation.js +409 -0
  47. package/lib/esm/features/agent/chat/ModernAgentConversation.js.map +1 -0
  48. package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +129 -0
  49. package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +1 -0
  50. package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js +66 -0
  51. package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js.map +1 -0
  52. package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlideInPanel.js +29 -0
  53. package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlideInPanel.js.map +1 -0
  54. package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.js +97 -0
  55. package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.js.map +1 -0
  56. package/lib/esm/features/agent/chat/ModernAgentOutput/MessageInput.js +46 -0
  57. package/lib/esm/features/agent/chat/ModernAgentOutput/MessageInput.js.map +1 -0
  58. package/lib/esm/features/agent/chat/ModernAgentOutput/MessageItem.js +352 -0
  59. package/lib/esm/features/agent/chat/ModernAgentOutput/MessageItem.js.map +1 -0
  60. package/lib/esm/features/agent/chat/ModernAgentOutput/MessagesContainer.js +20 -0
  61. package/lib/esm/features/agent/chat/ModernAgentOutput/MessagesContainer.js.map +1 -0
  62. package/lib/esm/features/agent/chat/ModernAgentOutput/PlanPanel.js +62 -0
  63. package/lib/esm/features/agent/chat/ModernAgentOutput/PlanPanel.js.map +1 -0
  64. package/lib/esm/features/agent/chat/ModernAgentOutput/SlideInPanel.js +23 -0
  65. package/lib/esm/features/agent/chat/ModernAgentOutput/SlideInPanel.js.map +1 -0
  66. package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingMessages.js +51 -0
  67. package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingMessages.js.map +1 -0
  68. package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.js +82 -0
  69. package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.js.map +1 -0
  70. package/lib/esm/features/agent/chat/ModernAgentOutput/StackedMessages.js +13 -0
  71. package/lib/esm/features/agent/chat/ModernAgentOutput/StackedMessages.js.map +1 -0
  72. package/lib/esm/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js +105 -0
  73. package/lib/esm/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js.map +1 -0
  74. package/lib/esm/features/agent/chat/ModernAgentOutput/utils.js +154 -0
  75. package/lib/esm/features/agent/chat/ModernAgentOutput/utils.js.map +1 -0
  76. package/lib/esm/features/agent/chat/SlidingThinkingIndicator.js +266 -0
  77. package/lib/esm/features/agent/chat/SlidingThinkingIndicator.js.map +1 -0
  78. package/lib/esm/features/agent/chat/WaitingMessages.js +60 -0
  79. package/lib/esm/features/agent/chat/WaitingMessages.js.map +1 -0
  80. package/lib/esm/features/agent/chat/index.js +5 -0
  81. package/lib/esm/features/agent/chat/index.js.map +1 -0
  82. package/lib/esm/features/agent/index.js +3 -0
  83. package/lib/esm/features/agent/index.js.map +1 -0
  84. package/lib/esm/features/errors/PanelErrorBoundary.js +11 -0
  85. package/lib/esm/features/errors/PanelErrorBoundary.js.map +1 -0
  86. package/lib/esm/features/errors/RowErrorBoundary.js +9 -0
  87. package/lib/esm/features/errors/RowErrorBoundary.js.map +1 -0
  88. package/lib/esm/features/errors/VertesiaErrorBoundary.js +15 -0
  89. package/lib/esm/features/errors/VertesiaErrorBoundary.js.map +1 -0
  90. package/lib/esm/features/errors/WidgetErrorBoundary.js +11 -0
  91. package/lib/esm/features/errors/WidgetErrorBoundary.js.map +1 -0
  92. package/lib/esm/features/errors/index.js +5 -0
  93. package/lib/esm/features/errors/index.js.map +1 -0
  94. package/lib/esm/features/facets/EnvironmentFacet.js +39 -0
  95. package/lib/esm/features/facets/EnvironmentFacet.js.map +1 -0
  96. package/lib/esm/features/facets/FacetsNav.js +8 -0
  97. package/lib/esm/features/facets/FacetsNav.js.map +1 -0
  98. package/lib/esm/features/facets/InteractionFacet.js +39 -0
  99. package/lib/esm/features/facets/InteractionFacet.js.map +1 -0
  100. package/lib/esm/features/facets/StringFacet.js +12 -0
  101. package/lib/esm/features/facets/StringFacet.js.map +1 -0
  102. package/lib/esm/features/facets/StringListFacet.js +11 -0
  103. package/lib/esm/features/facets/StringListFacet.js.map +1 -0
  104. package/lib/esm/features/facets/TypeFacet.js +42 -0
  105. package/lib/esm/features/facets/TypeFacet.js.map +1 -0
  106. package/lib/esm/features/facets/TypeOptions.js +19 -0
  107. package/lib/esm/features/facets/TypeOptions.js.map +1 -0
  108. package/lib/esm/features/facets/UserFacet.js +33 -0
  109. package/lib/esm/features/facets/UserFacet.js.map +1 -0
  110. package/lib/esm/features/facets/VFacetsNav.js +114 -0
  111. package/lib/esm/features/facets/VFacetsNav.js.map +1 -0
  112. package/lib/esm/features/facets/VStringFacet.js +17 -0
  113. package/lib/esm/features/facets/VStringFacet.js.map +1 -0
  114. package/lib/esm/features/facets/VTypeFacet.js +56 -0
  115. package/lib/esm/features/facets/VTypeFacet.js.map +1 -0
  116. package/lib/esm/features/facets/VUserFacet.js +31 -0
  117. package/lib/esm/features/facets/VUserFacet.js.map +1 -0
  118. package/lib/esm/features/facets/index.js +12 -0
  119. package/lib/esm/features/facets/index.js.map +1 -0
  120. package/lib/esm/features/facets/utils.js +7 -0
  121. package/lib/esm/features/facets/utils.js.map +1 -0
  122. package/lib/esm/features/index.js +9 -1
  123. package/lib/esm/features/index.js.map +1 -1
  124. package/lib/esm/features/layout/GenericPageNavHeader.js +11 -0
  125. package/lib/esm/features/layout/GenericPageNavHeader.js.map +1 -0
  126. package/lib/esm/features/layout/NotFoundView.js +5 -0
  127. package/lib/esm/features/layout/NotFoundView.js.map +1 -0
  128. package/lib/esm/features/layout/index.js +3 -0
  129. package/lib/esm/features/layout/index.js.map +1 -0
  130. package/lib/esm/features/magic-pdf/DownloadPopover.js +13 -0
  131. package/lib/esm/features/magic-pdf/DownloadPopover.js.map +1 -0
  132. package/lib/esm/features/magic-pdf/MagicPdfView.js +44 -0
  133. package/lib/esm/features/magic-pdf/MagicPdfView.js.map +1 -0
  134. package/lib/esm/features/magic-pdf/PageSlider.js +57 -0
  135. package/lib/esm/features/magic-pdf/PageSlider.js.map +1 -0
  136. package/lib/esm/features/magic-pdf/PdfPageProvider.js +133 -0
  137. package/lib/esm/features/magic-pdf/PdfPageProvider.js.map +1 -0
  138. package/lib/esm/features/magic-pdf/TextPageView.js +45 -0
  139. package/lib/esm/features/magic-pdf/TextPageView.js.map +1 -0
  140. package/lib/esm/features/magic-pdf/index.js +2 -0
  141. package/lib/esm/features/magic-pdf/index.js.map +1 -0
  142. package/lib/esm/features/magic-pdf/types.js +2 -0
  143. package/lib/esm/features/magic-pdf/types.js.map +1 -0
  144. package/lib/esm/features/magic-pdf/useResizeOnDrag.js +34 -0
  145. package/lib/esm/features/magic-pdf/useResizeOnDrag.js.map +1 -0
  146. package/lib/esm/features/store/collections/BrowseCollectionView.js +37 -0
  147. package/lib/esm/features/store/collections/BrowseCollectionView.js.map +1 -0
  148. package/lib/esm/features/store/collections/CollectionView.js +53 -0
  149. package/lib/esm/features/store/collections/CollectionView.js.map +1 -0
  150. package/lib/esm/features/store/collections/CollectionsTable.js +60 -0
  151. package/lib/esm/features/store/collections/CollectionsTable.js.map +1 -0
  152. package/lib/esm/features/store/collections/CollectionsView.js +94 -0
  153. package/lib/esm/features/store/collections/CollectionsView.js.map +1 -0
  154. package/lib/esm/features/store/collections/EditCollectionView.js +161 -0
  155. package/lib/esm/features/store/collections/EditCollectionView.js.map +1 -0
  156. package/lib/esm/features/store/collections/index.js +6 -0
  157. package/lib/esm/features/store/collections/index.js.map +1 -0
  158. package/lib/esm/features/store/index.js +4 -0
  159. package/lib/esm/features/store/index.js.map +1 -0
  160. package/lib/esm/features/store/objects/DocumentPreviewPanel.js +150 -0
  161. package/lib/esm/features/store/objects/DocumentPreviewPanel.js.map +1 -0
  162. package/lib/esm/features/store/objects/DocumentSearchResults.js +123 -0
  163. package/lib/esm/features/store/objects/DocumentSearchResults.js.map +1 -0
  164. package/lib/esm/features/store/objects/DocumentSelectionProvider.js +81 -0
  165. package/lib/esm/features/store/objects/DocumentSelectionProvider.js.map +1 -0
  166. package/lib/esm/features/store/objects/DocumentTable.js +278 -0
  167. package/lib/esm/features/store/objects/DocumentTable.js.map +1 -0
  168. package/lib/esm/features/store/objects/ExportPropertiesModal.js +31 -0
  169. package/lib/esm/features/store/objects/ExportPropertiesModal.js.map +1 -0
  170. package/lib/esm/features/store/objects/components/ContentDispositionButton.js +31 -0
  171. package/lib/esm/features/store/objects/components/ContentDispositionButton.js.map +1 -0
  172. package/lib/esm/features/store/objects/components/ContentOverview.js +195 -0
  173. package/lib/esm/features/store/objects/components/ContentOverview.js.map +1 -0
  174. package/lib/esm/features/store/objects/components/DocumentIcon.js +28 -0
  175. package/lib/esm/features/store/objects/components/DocumentIcon.js.map +1 -0
  176. package/lib/esm/features/store/objects/components/DocumentInput.js +52 -0
  177. package/lib/esm/features/store/objects/components/DocumentInput.js.map +1 -0
  178. package/lib/esm/features/store/objects/components/PropertiesEditorModal.js +169 -0
  179. package/lib/esm/features/store/objects/components/PropertiesEditorModal.js.map +1 -0
  180. package/lib/esm/features/store/objects/components/SaveVersionConfirmModal.js +45 -0
  181. package/lib/esm/features/store/objects/components/SaveVersionConfirmModal.js.map +1 -0
  182. package/lib/esm/features/store/objects/components/SelectDocument.js +39 -0
  183. package/lib/esm/features/store/objects/components/SelectDocument.js.map +1 -0
  184. package/lib/esm/features/store/objects/components/SelectDocumentModal.js +7 -0
  185. package/lib/esm/features/store/objects/components/SelectDocumentModal.js.map +1 -0
  186. package/lib/esm/features/store/objects/components/VectorSearchWidget.js +85 -0
  187. package/lib/esm/features/store/objects/components/VectorSearchWidget.js.map +1 -0
  188. package/lib/esm/features/store/objects/components/index.js +10 -0
  189. package/lib/esm/features/store/objects/components/index.js.map +1 -0
  190. package/lib/esm/features/store/objects/components/useDownloadObject.js +21 -0
  191. package/lib/esm/features/store/objects/components/useDownloadObject.js.map +1 -0
  192. package/lib/esm/features/store/objects/index.js +11 -0
  193. package/lib/esm/features/store/objects/index.js.map +1 -0
  194. package/lib/esm/features/store/objects/layout/DocumentTableColumn.js +74 -0
  195. package/lib/esm/features/store/objects/layout/DocumentTableColumn.js.map +1 -0
  196. package/lib/esm/features/store/objects/layout/documentLayout.js +16 -0
  197. package/lib/esm/features/store/objects/layout/documentLayout.js.map +1 -0
  198. package/lib/esm/features/store/objects/layout/index.js +3 -0
  199. package/lib/esm/features/store/objects/layout/index.js.map +1 -0
  200. package/lib/esm/features/store/objects/layout/renderers.js +128 -0
  201. package/lib/esm/features/store/objects/layout/renderers.js.map +1 -0
  202. package/lib/esm/features/store/objects/search/DocumentSearchContext.js +150 -0
  203. package/lib/esm/features/store/objects/search/DocumentSearchContext.js.map +1 -0
  204. package/lib/esm/features/store/objects/search/DocumentSearchProvider.js +41 -0
  205. package/lib/esm/features/store/objects/search/DocumentSearchProvider.js.map +1 -0
  206. package/lib/esm/features/store/objects/search/index.js +3 -0
  207. package/lib/esm/features/store/objects/search/index.js.map +1 -0
  208. package/lib/esm/features/store/objects/selection/ObjectsActionContext.js +149 -0
  209. package/lib/esm/features/store/objects/selection/ObjectsActionContext.js.map +1 -0
  210. package/lib/esm/features/store/objects/selection/ObjectsActionSpec.js +2 -0
  211. package/lib/esm/features/store/objects/selection/ObjectsActionSpec.js.map +1 -0
  212. package/lib/esm/features/store/objects/selection/SelectionActions.js +75 -0
  213. package/lib/esm/features/store/objects/selection/SelectionActions.js.map +1 -0
  214. package/lib/esm/features/store/objects/selection/actions/AddToCollectionAction.js +64 -0
  215. package/lib/esm/features/store/objects/selection/actions/AddToCollectionAction.js.map +1 -0
  216. package/lib/esm/features/store/objects/selection/actions/ChangeTypeAction.js +53 -0
  217. package/lib/esm/features/store/objects/selection/actions/ChangeTypeAction.js.map +1 -0
  218. package/lib/esm/features/store/objects/selection/actions/ConfirmAction.js +30 -0
  219. package/lib/esm/features/store/objects/selection/actions/ConfirmAction.js.map +1 -0
  220. package/lib/esm/features/store/objects/selection/actions/DeleteObjectsAction.js +66 -0
  221. package/lib/esm/features/store/objects/selection/actions/DeleteObjectsAction.js.map +1 -0
  222. package/lib/esm/features/store/objects/selection/actions/ExportPropertiesAction.js +106 -0
  223. package/lib/esm/features/store/objects/selection/actions/ExportPropertiesAction.js.map +1 -0
  224. package/lib/esm/features/store/objects/selection/actions/RemoveFromCollectionAction.js +64 -0
  225. package/lib/esm/features/store/objects/selection/actions/RemoveFromCollectionAction.js.map +1 -0
  226. package/lib/esm/features/store/objects/selection/actions/StartWorkflowComponent.js +72 -0
  227. package/lib/esm/features/store/objects/selection/actions/StartWorkflowComponent.js.map +1 -0
  228. package/lib/esm/features/store/objects/selection/actions/index.js +8 -0
  229. package/lib/esm/features/store/objects/selection/actions/index.js.map +1 -0
  230. package/lib/esm/features/store/objects/selection/index.js +5 -0
  231. package/lib/esm/features/store/objects/selection/index.js.map +1 -0
  232. package/lib/esm/features/store/objects/upload/DocumentUploadModal.js +476 -0
  233. package/lib/esm/features/store/objects/upload/DocumentUploadModal.js.map +1 -0
  234. package/lib/esm/features/store/objects/upload/index.js +4 -0
  235. package/lib/esm/features/store/objects/upload/index.js.map +1 -0
  236. package/lib/esm/features/store/objects/upload/useSmartFileUploadProcessing.js +201 -0
  237. package/lib/esm/features/store/objects/upload/useSmartFileUploadProcessing.js.map +1 -0
  238. package/lib/esm/features/store/objects/upload/useUploadHandler.js +230 -0
  239. package/lib/esm/features/store/objects/upload/useUploadHandler.js.map +1 -0
  240. package/lib/esm/features/store/types/ContentObjectTypeView.js +158 -0
  241. package/lib/esm/features/store/types/ContentObjectTypeView.js.map +1 -0
  242. package/lib/esm/features/store/types/ContentObjectTypesSearch.js +82 -0
  243. package/lib/esm/features/store/types/ContentObjectTypesSearch.js.map +1 -0
  244. package/lib/esm/features/store/types/ContentObjectTypesTable.js +11 -0
  245. package/lib/esm/features/store/types/ContentObjectTypesTable.js.map +1 -0
  246. package/lib/esm/features/store/types/ContentObjectTypesView.js +55 -0
  247. package/lib/esm/features/store/types/ContentObjectTypesView.js.map +1 -0
  248. package/lib/esm/features/store/types/CreateOrUpdateTypeModal.js +26 -0
  249. package/lib/esm/features/store/types/CreateOrUpdateTypeModal.js.map +1 -0
  250. package/lib/esm/features/store/types/ObjectSchemaEditor.js +89 -0
  251. package/lib/esm/features/store/types/ObjectSchemaEditor.js.map +1 -0
  252. package/lib/esm/features/store/types/SelectContentType.js +43 -0
  253. package/lib/esm/features/store/types/SelectContentType.js.map +1 -0
  254. package/lib/esm/features/store/types/SelectContentTypeModal.js +28 -0
  255. package/lib/esm/features/store/types/SelectContentTypeModal.js.map +1 -0
  256. package/lib/esm/features/store/types/TableLayoutEditor.js +78 -0
  257. package/lib/esm/features/store/types/TableLayoutEditor.js.map +1 -0
  258. package/lib/esm/features/store/types/index.js +11 -0
  259. package/lib/esm/features/store/types/index.js.map +1 -0
  260. package/lib/esm/features/store/types/search/ObjectTypeSearchContext.js +98 -0
  261. package/lib/esm/features/store/types/search/ObjectTypeSearchContext.js.map +1 -0
  262. package/lib/esm/features/store/types/search/ObjectTypeSearchProvider.js +15 -0
  263. package/lib/esm/features/store/types/search/ObjectTypeSearchProvider.js.map +1 -0
  264. package/lib/esm/features/store/types/search/index.js +3 -0
  265. package/lib/esm/features/store/types/search/index.js.map +1 -0
  266. package/lib/esm/features/user/UserAvatar.js +18 -0
  267. package/lib/esm/features/user/UserAvatar.js.map +1 -0
  268. package/lib/esm/features/user/UserInfo.js +88 -0
  269. package/lib/esm/features/user/UserInfo.js.map +1 -0
  270. package/lib/esm/features/user/index.js +3 -0
  271. package/lib/esm/features/user/index.js.map +1 -0
  272. package/lib/esm/features/utils/index.js +4 -0
  273. package/lib/esm/features/utils/index.js.map +1 -0
  274. package/lib/esm/features/utils/mimeType.js +9 -0
  275. package/lib/esm/features/utils/mimeType.js.map +1 -0
  276. package/lib/esm/features/utils/rendition.js +47 -0
  277. package/lib/esm/features/utils/rendition.js.map +1 -0
  278. package/lib/esm/features/utils/text.js +10 -0
  279. package/lib/esm/features/utils/text.js.map +1 -0
  280. package/lib/esm/layout/FullHeightLayout.js +1 -1
  281. package/lib/esm/layout/FullHeightLayout.js.map +1 -1
  282. package/lib/esm/layout/Sidebar.js +12 -2
  283. package/lib/esm/layout/Sidebar.js.map +1 -1
  284. package/lib/esm/widgets/Progress.js +5 -0
  285. package/lib/esm/widgets/Progress.js.map +1 -0
  286. package/lib/esm/widgets/codemirror/CodeMirrorEditor.js +1 -1
  287. package/lib/esm/widgets/codemirror/CodeMirrorEditor.js.map +1 -1
  288. package/lib/esm/widgets/form/Form.js +2 -2
  289. package/lib/esm/widgets/form/Form.js.map +1 -1
  290. package/lib/esm/widgets/form/schema.js +11 -5
  291. package/lib/esm/widgets/form/schema.js.map +1 -1
  292. package/lib/esm/widgets/index.js +4 -0
  293. package/lib/esm/widgets/index.js.map +1 -1
  294. package/lib/esm/widgets/popover/Popover.js +73 -0
  295. package/lib/esm/widgets/popover/Popover.js.map +1 -0
  296. package/lib/esm/widgets/popover/context.js +7 -0
  297. package/lib/esm/widgets/popover/context.js.map +1 -0
  298. package/lib/esm/widgets/popover/index.js +3 -0
  299. package/lib/esm/widgets/popover/index.js.map +1 -0
  300. package/lib/esm/widgets/popover/slots.js +22 -0
  301. package/lib/esm/widgets/popover/slots.js.map +1 -0
  302. package/lib/esm/widgets/properties/PropertiesView.js +6 -0
  303. package/lib/esm/widgets/properties/PropertiesView.js.map +1 -0
  304. package/lib/esm/widgets/properties/index.js +2 -0
  305. package/lib/esm/widgets/properties/index.js.map +1 -0
  306. package/lib/esm/widgets/schema-editor/JSONSchemaEditorModal.js +1 -2
  307. package/lib/esm/widgets/schema-editor/JSONSchemaEditorModal.js.map +1 -1
  308. package/lib/esm/widgets/schema-editor/editor/Editable.js +9 -10
  309. package/lib/esm/widgets/schema-editor/editor/Editable.js.map +1 -1
  310. package/lib/esm/widgets/schema-editor/editor/PropertyViewer.js +1 -1
  311. package/lib/esm/widgets/schema-editor/editor/PropertyViewer.js.map +1 -1
  312. package/lib/esm/widgets/schema-editor/editor/SchemaEditor.js +2 -2
  313. package/lib/esm/widgets/schema-editor/editor/SchemaEditor.js.map +1 -1
  314. package/lib/esm/widgets/upload/DropZone.js +162 -0
  315. package/lib/esm/widgets/upload/DropZone.js.map +1 -0
  316. package/lib/esm/widgets/upload/UploadResultCategory.js +19 -0
  317. package/lib/esm/widgets/upload/UploadResultCategory.js.map +1 -0
  318. package/lib/esm/widgets/upload/UploadSummary.js +30 -0
  319. package/lib/esm/widgets/upload/UploadSummary.js.map +1 -0
  320. package/lib/esm/widgets/upload/index.js +4 -0
  321. package/lib/esm/widgets/upload/index.js.map +1 -0
  322. package/lib/tsconfig.tsbuildinfo +1 -1
  323. package/lib/types/core/components/FormItem.d.ts +11 -0
  324. package/lib/types/core/components/index.d.ts +3 -3
  325. package/lib/types/core/components/shadcn/button.d.ts +13 -2
  326. package/lib/types/core/components/shadcn/command.d.ts +7 -7
  327. package/lib/types/core/components/shadcn/filters/DynamicLabel.d.ts +8 -0
  328. package/lib/types/core/components/shadcn/filters/comboBox.d.ts +5 -5
  329. package/lib/types/core/components/shadcn/filters/dateFilter.d.ts +3 -4
  330. package/lib/types/core/components/shadcn/filters/types.d.ts +7 -1
  331. package/lib/types/core/components/shadcn/input.d.ts +4 -4
  332. package/lib/types/core/components/shadcn/selectBox.d.ts +13 -4
  333. package/lib/types/core/components/table/index.d.ts +1 -0
  334. package/lib/types/core/index.d.ts +2 -1
  335. package/lib/types/core/utils/cn.d.ts +2 -0
  336. package/lib/types/core/utils/index.d.ts +1 -0
  337. package/lib/types/features/agent/PayloadBuilder.d.ts +53 -0
  338. package/lib/types/features/agent/chat/AnimatedThinkingDots.d.ts +37 -0
  339. package/lib/types/features/agent/chat/JumpingDots.d.ts +6 -0
  340. package/lib/types/features/agent/chat/ModernAgentConversation.d.ts +24 -0
  341. package/lib/types/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts +21 -0
  342. package/lib/types/features/agent/chat/ModernAgentOutput/Header.d.ts +18 -0
  343. package/lib/types/features/agent/chat/ModernAgentOutput/InlineSlideInPanel.d.ts +10 -0
  344. package/lib/types/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.d.ts +15 -0
  345. package/lib/types/features/agent/chat/ModernAgentOutput/MessageInput.d.ts +12 -0
  346. package/lib/types/features/agent/chat/ModernAgentOutput/MessageItem.d.ts +7 -0
  347. package/lib/types/features/agent/chat/ModernAgentOutput/MessagesContainer.d.ts +9 -0
  348. package/lib/types/features/agent/chat/ModernAgentOutput/PlanPanel.d.ts +8 -0
  349. package/lib/types/features/agent/chat/ModernAgentOutput/SlideInPanel.d.ts +10 -0
  350. package/lib/types/features/agent/chat/ModernAgentOutput/SlidingMessages.d.ts +7 -0
  351. package/lib/types/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.d.ts +9 -0
  352. package/lib/types/features/agent/chat/ModernAgentOutput/StackedMessages.d.ts +7 -0
  353. package/lib/types/features/agent/chat/ModernAgentOutput/WorkstreamTabs.d.ts +21 -0
  354. package/lib/types/features/agent/chat/ModernAgentOutput/utils.d.ts +23 -0
  355. package/lib/types/features/agent/chat/SlidingThinkingIndicator.d.ts +17 -0
  356. package/lib/types/features/agent/chat/WaitingMessages.d.ts +1 -0
  357. package/lib/types/features/agent/chat/index.d.ts +4 -0
  358. package/lib/types/features/agent/index.d.ts +2 -0
  359. package/lib/types/features/errors/PanelErrorBoundary.d.ts +4 -0
  360. package/lib/types/features/errors/RowErrorBoundary.d.ts +7 -0
  361. package/lib/types/features/errors/VertesiaErrorBoundary.d.ts +11 -0
  362. package/lib/types/features/errors/WidgetErrorBoundary.d.ts +4 -0
  363. package/lib/types/features/errors/index.d.ts +4 -0
  364. package/lib/types/features/facets/EnvironmentFacet.d.ts +9 -0
  365. package/lib/types/features/facets/FacetsNav.d.ts +6 -0
  366. package/lib/types/features/facets/InteractionFacet.d.ts +9 -0
  367. package/lib/types/features/facets/StringFacet.d.ts +10 -0
  368. package/lib/types/features/facets/StringListFacet.d.ts +10 -0
  369. package/lib/types/features/facets/TypeFacet.d.ts +15 -0
  370. package/lib/types/features/facets/TypeOptions.d.ts +3 -0
  371. package/lib/types/features/facets/UserFacet.d.ts +11 -0
  372. package/lib/types/features/facets/VFacetsNav.d.ts +7 -0
  373. package/lib/types/features/facets/VStringFacet.d.ts +15 -0
  374. package/lib/types/features/facets/VTypeFacet.d.ts +8 -0
  375. package/lib/types/features/facets/VUserFacet.d.ts +9 -0
  376. package/lib/types/features/facets/index.d.ts +11 -0
  377. package/lib/types/features/facets/utils.d.ts +3 -0
  378. package/lib/types/features/index.d.ts +9 -1
  379. package/lib/types/features/layout/GenericPageNavHeader.d.ts +12 -0
  380. package/lib/types/features/layout/NotFoundView.d.ts +4 -0
  381. package/lib/types/features/layout/index.d.ts +2 -0
  382. package/lib/types/features/magic-pdf/DownloadPopover.d.ts +6 -0
  383. package/lib/types/features/magic-pdf/MagicPdfView.d.ts +6 -0
  384. package/lib/types/features/magic-pdf/PageSlider.d.ts +7 -0
  385. package/lib/types/features/magic-pdf/PdfPageProvider.d.ts +28 -0
  386. package/lib/types/features/magic-pdf/TextPageView.d.ts +7 -0
  387. package/lib/types/features/magic-pdf/index.d.ts +1 -0
  388. package/lib/types/features/magic-pdf/types.d.ts +1 -0
  389. package/lib/types/features/magic-pdf/useResizeOnDrag.d.ts +8 -0
  390. package/lib/types/features/store/collections/BrowseCollectionView.d.ts +6 -0
  391. package/lib/types/features/store/collections/CollectionView.d.ts +5 -0
  392. package/lib/types/features/store/collections/CollectionsTable.d.ts +5 -0
  393. package/lib/types/features/store/collections/CollectionsView.d.ts +10 -0
  394. package/lib/types/features/store/collections/EditCollectionView.d.ts +7 -0
  395. package/lib/types/features/store/collections/index.d.ts +5 -0
  396. package/lib/types/features/store/index.d.ts +3 -0
  397. package/lib/types/features/store/objects/DocumentPreviewPanel.d.ts +7 -0
  398. package/lib/types/features/store/objects/DocumentSearchResults.d.ts +19 -0
  399. package/lib/types/features/store/objects/DocumentSelectionProvider.d.ts +32 -0
  400. package/lib/types/features/store/objects/DocumentTable.d.ts +20 -0
  401. package/lib/types/features/store/objects/ExportPropertiesModal.d.ts +11 -0
  402. package/lib/types/features/store/objects/components/ContentDispositionButton.d.ts +8 -0
  403. package/lib/types/features/store/objects/components/ContentOverview.d.ts +7 -0
  404. package/lib/types/features/store/objects/components/DocumentIcon.d.ts +10 -0
  405. package/lib/types/features/store/objects/components/DocumentInput.d.ts +7 -0
  406. package/lib/types/features/store/objects/components/PropertiesEditorModal.d.ts +7 -0
  407. package/lib/types/features/store/objects/components/SaveVersionConfirmModal.d.ts +8 -0
  408. package/lib/types/features/store/objects/components/SelectDocument.d.ts +8 -0
  409. package/lib/types/features/store/objects/components/SelectDocumentModal.d.ts +8 -0
  410. package/lib/types/features/store/objects/components/VectorSearchWidget.d.ts +10 -0
  411. package/lib/types/features/store/objects/components/index.d.ts +9 -0
  412. package/lib/types/features/store/objects/components/useDownloadObject.d.ts +3 -0
  413. package/lib/types/features/store/objects/index.d.ts +10 -0
  414. package/lib/types/features/store/objects/layout/DocumentTableColumn.d.ts +16 -0
  415. package/lib/types/features/store/objects/layout/documentLayout.d.ts +17 -0
  416. package/lib/types/features/store/objects/layout/index.d.ts +2 -0
  417. package/lib/types/features/store/objects/layout/renderers.d.ts +2 -0
  418. package/lib/types/features/store/objects/search/DocumentSearchContext.d.ts +48 -0
  419. package/lib/types/features/store/objects/search/DocumentSearchProvider.d.ts +15 -0
  420. package/lib/types/features/store/objects/search/index.d.ts +2 -0
  421. package/lib/types/features/store/objects/selection/ObjectsActionContext.d.ts +25 -0
  422. package/lib/types/features/store/objects/selection/ObjectsActionSpec.d.ts +27 -0
  423. package/lib/types/features/store/objects/selection/SelectionActions.d.ts +4 -0
  424. package/lib/types/features/store/objects/selection/actions/AddToCollectionAction.d.ts +3 -0
  425. package/lib/types/features/store/objects/selection/actions/ChangeTypeAction.d.ts +3 -0
  426. package/lib/types/features/store/objects/selection/actions/ConfirmAction.d.ts +15 -0
  427. package/lib/types/features/store/objects/selection/actions/DeleteObjectsAction.d.ts +2 -0
  428. package/lib/types/features/store/objects/selection/actions/ExportPropertiesAction.d.ts +3 -0
  429. package/lib/types/features/store/objects/selection/actions/RemoveFromCollectionAction.d.ts +2 -0
  430. package/lib/types/features/store/objects/selection/actions/StartWorkflowComponent.d.ts +3 -0
  431. package/lib/types/features/store/objects/selection/actions/index.d.ts +7 -0
  432. package/lib/types/features/store/objects/selection/index.d.ts +4 -0
  433. package/lib/types/features/store/objects/upload/DocumentUploadModal.d.ts +37 -0
  434. package/lib/types/features/store/objects/upload/index.d.ts +3 -0
  435. package/lib/types/features/store/objects/upload/useSmartFileUploadProcessing.d.ts +29 -0
  436. package/lib/types/features/store/objects/upload/useUploadHandler.d.ts +49 -0
  437. package/lib/types/features/store/types/ContentObjectTypeView.d.ts +5 -0
  438. package/lib/types/features/store/types/ContentObjectTypesSearch.d.ts +5 -0
  439. package/lib/types/features/store/types/ContentObjectTypesTable.d.ts +7 -0
  440. package/lib/types/features/store/types/ContentObjectTypesView.d.ts +8 -0
  441. package/lib/types/features/store/types/CreateOrUpdateTypeModal.d.ts +14 -0
  442. package/lib/types/features/store/types/ObjectSchemaEditor.d.ts +7 -0
  443. package/lib/types/features/store/types/SelectContentType.d.ts +10 -0
  444. package/lib/types/features/store/types/SelectContentTypeModal.d.ts +32 -0
  445. package/lib/types/features/store/types/TableLayoutEditor.d.ts +8 -0
  446. package/lib/types/features/store/types/index.d.ts +10 -0
  447. package/lib/types/features/store/types/search/ObjectTypeSearchContext.d.ts +35 -0
  448. package/lib/types/features/store/types/search/ObjectTypeSearchProvider.d.ts +10 -0
  449. package/lib/types/features/store/types/search/index.d.ts +2 -0
  450. package/lib/types/features/user/UserAvatar.d.ts +8 -0
  451. package/lib/types/features/user/UserInfo.d.ts +36 -0
  452. package/lib/types/features/user/index.d.ts +2 -0
  453. package/lib/types/features/utils/index.d.ts +3 -0
  454. package/lib/types/features/utils/mimeType.d.ts +4 -0
  455. package/lib/types/features/utils/rendition.d.ts +3 -0
  456. package/lib/types/features/utils/text.d.ts +2 -0
  457. package/lib/types/layout/Sidebar.d.ts +2 -1
  458. package/lib/types/widgets/Progress.d.ts +5 -0
  459. package/lib/types/widgets/form/schema.d.ts +4 -3
  460. package/lib/types/widgets/index.d.ts +4 -0
  461. package/lib/types/widgets/popover/Popover.d.ts +37 -0
  462. package/lib/types/widgets/popover/context.d.ts +7 -0
  463. package/lib/types/widgets/popover/index.d.ts +2 -0
  464. package/lib/types/widgets/popover/slots.d.ts +4 -0
  465. package/lib/types/widgets/properties/PropertiesView.d.ts +10 -0
  466. package/lib/types/widgets/properties/index.d.ts +1 -0
  467. package/lib/types/widgets/upload/DropZone.d.ts +40 -0
  468. package/lib/types/widgets/upload/UploadResultCategory.d.ts +25 -0
  469. package/lib/types/widgets/upload/UploadSummary.d.ts +37 -0
  470. package/lib/types/widgets/upload/index.d.ts +3 -0
  471. package/lib/vertesia-ui-core.js +1 -1
  472. package/lib/vertesia-ui-core.js.map +1 -1
  473. package/lib/vertesia-ui-features.js +1 -1
  474. package/lib/vertesia-ui-features.js.map +1 -1
  475. package/lib/vertesia-ui-layout.js +1 -1
  476. package/lib/vertesia-ui-layout.js.map +1 -1
  477. package/lib/vertesia-ui-router.js.map +1 -1
  478. package/lib/vertesia-ui-session.js.map +1 -1
  479. package/lib/vertesia-ui-widgets.js +1 -1
  480. package/lib/vertesia-ui-widgets.js.map +1 -1
  481. package/package.json +13 -5
  482. package/src/core/components/FormItem.tsx +35 -0
  483. package/src/core/components/InputList.tsx +4 -3
  484. package/src/core/components/index.ts +3 -3
  485. package/src/core/components/shadcn/button.tsx +68 -8
  486. package/src/core/components/shadcn/dialog.tsx +3 -3
  487. package/src/core/components/shadcn/filters/DynamicLabel.tsx +45 -0
  488. package/src/core/components/shadcn/filters/comboBox.tsx +56 -52
  489. package/src/core/components/shadcn/filters/dateFilter.tsx +24 -25
  490. package/src/core/components/shadcn/filters/filterBar.tsx +53 -47
  491. package/src/core/components/shadcn/filters/filters.tsx +43 -30
  492. package/src/core/components/shadcn/filters/selectFilter.tsx +53 -34
  493. package/src/core/components/shadcn/filters/textFilter.tsx +6 -3
  494. package/src/core/components/shadcn/filters/types.ts +8 -1
  495. package/src/core/components/shadcn/input.tsx +5 -5
  496. package/src/core/components/shadcn/selectBox.tsx +138 -33
  497. package/src/core/components/styles.ts +1 -1
  498. package/src/core/components/table/index.tsx +8 -0
  499. package/src/core/index.ts +2 -1
  500. package/src/core/utils/cn.ts +6 -0
  501. package/src/core/utils/index.ts +1 -0
  502. package/src/features/agent/PayloadBuilder.tsx +208 -0
  503. package/src/features/agent/chat/AnimatedThinkingDots.tsx +350 -0
  504. package/src/features/agent/chat/JumpingDots.tsx +16 -0
  505. package/src/features/agent/chat/ModernAgentConversation.tsx +708 -0
  506. package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +246 -0
  507. package/src/features/agent/chat/ModernAgentOutput/Header.tsx +231 -0
  508. package/src/features/agent/chat/ModernAgentOutput/InlineSlideInPanel.tsx +66 -0
  509. package/src/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.tsx +282 -0
  510. package/src/features/agent/chat/ModernAgentOutput/MessageInput.tsx +125 -0
  511. package/src/features/agent/chat/ModernAgentOutput/MessageItem.tsx +562 -0
  512. package/src/features/agent/chat/ModernAgentOutput/MessagesContainer.tsx +51 -0
  513. package/src/features/agent/chat/ModernAgentOutput/PlanPanel.tsx +123 -0
  514. package/src/features/agent/chat/ModernAgentOutput/README-image-support.md +43 -0
  515. package/src/features/agent/chat/ModernAgentOutput/SlideInPanel.tsx +72 -0
  516. package/src/features/agent/chat/ModernAgentOutput/SlidingMessages.tsx +96 -0
  517. package/src/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.tsx +185 -0
  518. package/src/features/agent/chat/ModernAgentOutput/StackedMessages.tsx +33 -0
  519. package/src/features/agent/chat/ModernAgentOutput/WorkstreamTabs.tsx +167 -0
  520. package/src/features/agent/chat/ModernAgentOutput/utils.ts +195 -0
  521. package/src/features/agent/chat/ModernAgentOutput/with-types.d.ts +15 -0
  522. package/src/features/agent/chat/SlidingThinkingIndicator.tsx +459 -0
  523. package/src/features/agent/chat/WaitingMessages.ts +66 -0
  524. package/src/features/agent/chat/index.ts +4 -0
  525. package/src/features/agent/index.ts +2 -0
  526. package/src/features/errors/PanelErrorBoundary.tsx +30 -0
  527. package/src/features/errors/RowErrorBoundary.tsx +28 -0
  528. package/src/features/errors/VertesiaErrorBoundary.tsx +28 -0
  529. package/src/features/errors/WidgetErrorBoundary.tsx +27 -0
  530. package/src/features/errors/index.ts +4 -0
  531. package/src/features/facets/EnvironmentFacet.tsx +53 -0
  532. package/src/features/facets/FacetsNav.tsx +19 -0
  533. package/src/features/facets/InteractionFacet.tsx +53 -0
  534. package/src/features/facets/StringFacet.tsx +23 -0
  535. package/src/features/facets/StringListFacet.tsx +22 -0
  536. package/src/features/facets/TypeFacet.tsx +59 -0
  537. package/src/features/facets/TypeOptions.tsx +22 -0
  538. package/src/features/facets/UserFacet.tsx +61 -0
  539. package/src/features/facets/VFacetsNav.tsx +139 -0
  540. package/src/features/facets/VStringFacet.tsx +34 -0
  541. package/src/features/facets/VTypeFacet.tsx +72 -0
  542. package/src/features/facets/VUserFacet.tsx +47 -0
  543. package/src/features/facets/index.ts +11 -0
  544. package/src/features/facets/utils.tsx +9 -0
  545. package/src/features/index.ts +9 -1
  546. package/src/features/layout/GenericPageNavHeader.tsx +48 -0
  547. package/src/features/layout/NotFoundView.tsx +11 -0
  548. package/src/features/layout/index.ts +2 -0
  549. package/src/features/magic-pdf/DownloadPopover.tsx +32 -0
  550. package/src/features/magic-pdf/MagicPdfView.tsx +102 -0
  551. package/src/features/magic-pdf/PageSlider.tsx +112 -0
  552. package/src/features/magic-pdf/PdfPageProvider.tsx +229 -0
  553. package/src/features/magic-pdf/TextPageView.tsx +65 -0
  554. package/src/features/magic-pdf/index.ts +1 -0
  555. package/src/features/magic-pdf/types.ts +1 -0
  556. package/src/features/magic-pdf/useResizeOnDrag.ts +42 -0
  557. package/src/features/store/collections/BrowseCollectionView.tsx +45 -0
  558. package/src/features/store/collections/CollectionView.tsx +94 -0
  559. package/src/features/store/collections/CollectionsTable.tsx +115 -0
  560. package/src/features/store/collections/CollectionsView.tsx +166 -0
  561. package/src/features/store/collections/EditCollectionView.tsx +253 -0
  562. package/src/features/store/collections/index.ts +5 -0
  563. package/src/features/store/index.ts +3 -0
  564. package/src/features/store/objects/DocumentPreviewPanel.tsx +417 -0
  565. package/src/features/store/objects/DocumentSearchResults.tsx +209 -0
  566. package/src/features/store/objects/DocumentSelectionProvider.tsx +99 -0
  567. package/src/features/store/objects/DocumentTable.tsx +409 -0
  568. package/src/features/store/objects/ExportPropertiesModal.tsx +89 -0
  569. package/src/features/store/objects/components/ContentDispositionButton.tsx +45 -0
  570. package/src/features/store/objects/components/ContentOverview.tsx +466 -0
  571. package/src/features/store/objects/components/DocumentIcon.tsx +87 -0
  572. package/src/features/store/objects/components/DocumentInput.tsx +90 -0
  573. package/src/features/store/objects/components/PropertiesEditorModal.tsx +253 -0
  574. package/src/features/store/objects/components/SaveVersionConfirmModal.tsx +136 -0
  575. package/src/features/store/objects/components/SelectDocument.tsx +69 -0
  576. package/src/features/store/objects/components/SelectDocumentModal.tsx +20 -0
  577. package/src/features/store/objects/components/VectorSearchWidget.tsx +115 -0
  578. package/src/features/store/objects/components/index.ts +9 -0
  579. package/src/features/store/objects/components/useDownloadObject.ts +24 -0
  580. package/src/features/store/objects/index.ts +10 -0
  581. package/src/features/store/objects/layout/DocumentTableColumn.tsx +84 -0
  582. package/src/features/store/objects/layout/documentLayout.tsx +69 -0
  583. package/src/features/store/objects/layout/index.ts +2 -0
  584. package/src/features/store/objects/layout/knowledge.md +238 -0
  585. package/src/features/store/objects/layout/renderers.tsx +139 -0
  586. package/src/features/store/objects/search/DocumentSearchContext.ts +181 -0
  587. package/src/features/store/objects/search/DocumentSearchProvider.tsx +54 -0
  588. package/src/features/store/objects/search/index.ts +2 -0
  589. package/src/features/store/objects/selection/ObjectsActionContext.tsx +196 -0
  590. package/src/features/store/objects/selection/ObjectsActionSpec.ts +31 -0
  591. package/src/features/store/objects/selection/SelectionActions.tsx +160 -0
  592. package/src/features/store/objects/selection/actions/AddToCollectionAction.tsx +114 -0
  593. package/src/features/store/objects/selection/actions/ChangeTypeAction.tsx +76 -0
  594. package/src/features/store/objects/selection/actions/ConfirmAction.tsx +46 -0
  595. package/src/features/store/objects/selection/actions/DeleteObjectsAction.tsx +77 -0
  596. package/src/features/store/objects/selection/actions/ExportPropertiesAction.tsx +117 -0
  597. package/src/features/store/objects/selection/actions/RemoveFromCollectionAction.tsx +77 -0
  598. package/src/features/store/objects/selection/actions/StartWorkflowComponent.tsx +122 -0
  599. package/src/features/store/objects/selection/actions/index.ts +7 -0
  600. package/src/features/store/objects/selection/index.ts +4 -0
  601. package/src/features/store/objects/upload/DocumentUploadModal.tsx +970 -0
  602. package/src/features/store/objects/upload/index.ts +3 -0
  603. package/src/features/store/objects/upload/useSmartFileUploadProcessing.ts +250 -0
  604. package/src/features/store/objects/upload/useUploadHandler.ts +325 -0
  605. package/src/features/store/types/ContentObjectTypeView.tsx +244 -0
  606. package/src/features/store/types/ContentObjectTypesSearch.tsx +111 -0
  607. package/src/features/store/types/ContentObjectTypesTable.tsx +38 -0
  608. package/src/features/store/types/ContentObjectTypesView.tsx +71 -0
  609. package/src/features/store/types/CreateOrUpdateTypeModal.tsx +70 -0
  610. package/src/features/store/types/ObjectSchemaEditor.tsx +127 -0
  611. package/src/features/store/types/SelectContentType.tsx +88 -0
  612. package/src/features/store/types/SelectContentTypeModal.tsx +142 -0
  613. package/src/features/store/types/TableLayoutEditor.tsx +104 -0
  614. package/src/features/store/types/index.ts +10 -0
  615. package/src/features/store/types/search/ObjectTypeSearchContext.tsx +119 -0
  616. package/src/features/store/types/search/ObjectTypeSearchProvider.tsx +24 -0
  617. package/src/features/store/types/search/index.ts +2 -0
  618. package/src/features/user/UserAvatar.tsx +34 -0
  619. package/src/features/user/UserInfo.tsx +215 -0
  620. package/src/features/user/index.ts +2 -0
  621. package/src/features/utils/index.ts +3 -0
  622. package/src/features/utils/mimeType.ts +9 -0
  623. package/src/features/utils/rendition.ts +75 -0
  624. package/src/features/utils/text.ts +10 -0
  625. package/src/layout/FullHeightLayout.tsx +1 -1
  626. package/src/layout/Sidebar.tsx +12 -2
  627. package/src/widgets/Progress.tsx +10 -0
  628. package/src/widgets/codemirror/CodeMirrorEditor.tsx +1 -1
  629. package/src/widgets/form/Form.tsx +2 -2
  630. package/src/widgets/form/schema.ts +14 -7
  631. package/src/widgets/index.ts +5 -1
  632. package/src/widgets/popover/Popover.tsx +171 -0
  633. package/src/widgets/popover/context.ts +15 -0
  634. package/src/widgets/popover/index.ts +2 -0
  635. package/src/widgets/popover/slots.ts +24 -0
  636. package/src/widgets/properties/PropertiesView.tsx +26 -0
  637. package/src/widgets/properties/index.ts +1 -0
  638. package/src/widgets/schema-editor/JSONSchemaEditorModal.tsx +1 -2
  639. package/src/widgets/schema-editor/editor/Editable.tsx +12 -13
  640. package/src/widgets/schema-editor/editor/PropertyViewer.tsx +1 -1
  641. package/src/widgets/schema-editor/editor/SchemaEditor.tsx +4 -4
  642. package/src/widgets/upload/DropZone.tsx +257 -0
  643. package/src/widgets/upload/UploadResultCategory.tsx +81 -0
  644. package/src/widgets/upload/UploadSummary.tsx +116 -0
  645. package/src/widgets/upload/index.ts +3 -0
  646. package/lib/esm/code/index.js +0 -3
  647. package/lib/esm/code/index.js.map +0 -1
  648. package/lib/esm/core/components/Input.js +0 -16
  649. package/lib/esm/core/components/Input.js.map +0 -1
  650. package/lib/esm/form/index.js +0 -3
  651. package/lib/esm/form/index.js.map +0 -1
  652. package/lib/types/code/index.d.ts +0 -0
  653. package/lib/types/core/components/Input.d.ts +0 -8
  654. package/lib/types/form/index.d.ts +0 -0
  655. package/lib/vertesia-ui-code.js +0 -2
  656. package/lib/vertesia-ui-code.js.map +0 -1
  657. package/lib/vertesia-ui-form.js +0 -2
  658. package/lib/vertesia-ui-form.js.map +0 -1
  659. package/src/code/index.ts +0 -1
  660. package/src/core/components/Input.tsx +0 -43
  661. package/src/form/index.ts +0 -1
@@ -0,0 +1,278 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Spinner, useToast } from "@vertesia/ui/core";
3
+ import { DropZone } from '@vertesia/ui/widgets';
4
+ import clsx from "clsx";
5
+ import { useMemo, useState } from "react";
6
+ import { useOptionalDocumentSelection } from "./DocumentSelectionProvider";
7
+ import { DocumentTableColumn } from "./layout/DocumentTableColumn";
8
+ import { DocumentGridView, DocumentTableView } from "./layout/documentLayout";
9
+ import { useDocumentSearch } from "./search/DocumentSearchContext";
10
+ import { DocumentUploadModal, useSmartFileUploadProcessing } from "./upload";
11
+ const defaultLayout = [
12
+ { name: "ID", field: "id", type: "string?slice=-7" },
13
+ { name: "Name", field: ".", type: "objectLink" },
14
+ { name: "Type", field: "type.name", type: "string" },
15
+ { name: "Status", field: "status", type: "string" },
16
+ { name: "Updated At", field: "updated_at", type: "date" },
17
+ ];
18
+ export function DocumentTable({ isGridView = false, onUpload, collectionId, ...others }) {
19
+ if (onUpload) {
20
+ return (_jsx(ObjectTableWithDropZone, { ...others, onUpload: onUpload, isGridView: isGridView, collectionId: collectionId }));
21
+ }
22
+ else {
23
+ return _jsx(DocumentTableImpl, { ...others, isGridView: isGridView });
24
+ }
25
+ }
26
+ function ObjectTableWithDropZone({ isGridView, onUpload, collectionId, skipTypeModal = false, ...others }) {
27
+ const [isLoading, setLoading] = useState(false);
28
+ const [files, setFiles] = useState([]);
29
+ const [isDragging, setIsDragging] = useState(false);
30
+ const [processedFiles, setProcessedFiles] = useState(null);
31
+ const [typeSelectionOpen, setTypeSelectionOpen] = useState(false);
32
+ const search = useDocumentSearch();
33
+ const toast = useToast();
34
+ const { checkDocumentProcessing } = useSmartFileUploadProcessing();
35
+ // Handle file uploads when a file is dropped
36
+ const handleFileDrop = async (droppedFiles, feedback) => {
37
+ console.log("Files dropped on ObjectTable:", droppedFiles.length, feedback);
38
+ setLoading(true);
39
+ try {
40
+ // Always process files with the smart upload processing if we have a collection ID
41
+ if (collectionId) {
42
+ // Process files to check for duplicates, updates, etc.
43
+ const processed = await checkDocumentProcessing(droppedFiles, null, collectionId);
44
+ setProcessedFiles(processed);
45
+ // Create a user-friendly summary message
46
+ const toCreate = processed.filter((f) => f.action === "create").length;
47
+ const toUpdate = processed.filter((f) => f.action === "update").length;
48
+ const toSkip = processed.filter((f) => f.action === "skip").length;
49
+ toast({
50
+ title: "Files ready to process",
51
+ description: `${droppedFiles.length} file(s): ${toCreate} new, ${toUpdate} to update, ${toSkip} to skip`,
52
+ status: "info",
53
+ duration: 4000,
54
+ });
55
+ }
56
+ else {
57
+ // If no collection ID, we can't check for duplicates
58
+ setProcessedFiles(null);
59
+ }
60
+ }
61
+ catch (error) {
62
+ console.error("Error processing files:", error);
63
+ toast({
64
+ title: "Error processing files",
65
+ description: "There was an error checking for duplicate files",
66
+ status: "error",
67
+ duration: 4000,
68
+ });
69
+ // Continue with plain upload in case of error
70
+ setProcessedFiles(null);
71
+ }
72
+ finally {
73
+ setLoading(false);
74
+ setFiles(droppedFiles);
75
+ setIsDragging(false);
76
+ if (skipTypeModal) {
77
+ // If skipTypeModal is true, we skip our internal modal and call onUpload directly
78
+ console.log("Skipping type modal and calling onUpload directly", {
79
+ filesLength: droppedFiles.length,
80
+ processedFilesLength: processedFiles?.length,
81
+ });
82
+ // Pass processed files as a custom property and collectionId as the third parameter
83
+ const uploadPromise = onUpload(droppedFiles, null, collectionId);
84
+ // Attach the processed files to the promise for parent components to use
85
+ if (uploadPromise && typeof uploadPromise === "object") {
86
+ uploadPromise.processedFiles = processedFiles;
87
+ }
88
+ }
89
+ else {
90
+ // Otherwise, open our type selection modal
91
+ console.log("Setting typeSelectionOpen to true", { filesLength: droppedFiles.length });
92
+ setTypeSelectionOpen(true);
93
+ }
94
+ }
95
+ };
96
+ // Handle the type selection and start the upload
97
+ const onDoUpload = (typeId) => {
98
+ const filesToUpload = [...files]; // Make a copy to be safe
99
+ // Reset state variables
100
+ setFiles([]);
101
+ setProcessedFiles(null);
102
+ setTypeSelectionOpen(false);
103
+ // If typeid is undefined we cancel the upload
104
+ if (filesToUpload.length > 0 && typeId !== undefined) {
105
+ setLoading(true);
106
+ console.log("Starting upload with", {
107
+ typeId,
108
+ filesCount: filesToUpload.length,
109
+ hasProcessingResults: !!processedFiles,
110
+ collectionId,
111
+ });
112
+ onUpload(filesToUpload, typeId, collectionId).finally(() => {
113
+ setLoading(false);
114
+ search.search(); // Refresh the search results after upload
115
+ });
116
+ }
117
+ };
118
+ // Handle drag events to show the drop zone
119
+ const handleDragOver = (e) => {
120
+ e.preventDefault();
121
+ e.stopPropagation();
122
+ setIsDragging(true);
123
+ };
124
+ const handleDragLeave = (e) => {
125
+ e.preventDefault();
126
+ e.stopPropagation();
127
+ // Only set dragging to false if leaving the container (not entering a child)
128
+ if (e.currentTarget.contains(e.relatedTarget)) {
129
+ return;
130
+ }
131
+ setIsDragging(false);
132
+ };
133
+ return (_jsxs("div", { className: "min-h-[400px] relative", onDragOver: handleDragOver, onDragEnter: handleDragOver, onDragLeave: handleDragLeave, onDrop: (e) => {
134
+ e.preventDefault();
135
+ e.stopPropagation();
136
+ setIsDragging(false);
137
+ // Get the files from the drop event
138
+ if (e.dataTransfer.items) {
139
+ const files = [];
140
+ for (let i = 0; i < e.dataTransfer.items.length; i++) {
141
+ const item = e.dataTransfer.items[i];
142
+ if (item.kind === "file") {
143
+ const file = item.getAsFile();
144
+ if (file)
145
+ files.push(file);
146
+ }
147
+ }
148
+ if (files.length > 0) {
149
+ const feedback = {
150
+ count: files.length,
151
+ message: `Preparing to upload ${files.length} file${files.length === 1 ? "" : "s"}...`,
152
+ };
153
+ handleFileDrop(files, feedback);
154
+ }
155
+ }
156
+ }, children: [_jsx("div", { className: clsx("bg-white dark:bg-gray-800 opacity-40 absolute inset-0 z-50 flex justify-center items-center", isLoading ? "block" : "hidden"), children: _jsx(Spinner, { size: "xl" }) }), _jsx(DocumentTableImpl, { ...others, isGridView: isGridView }), _jsx("div", { className: clsx("absolute inset-0 pointer-events-none", isDragging ? "z-40" : "-z-10"), children: _jsx("div", { className: "w-full h-full relative", children: _jsx(DropZone, { onDrop: handleFileDrop, message: "Drop files or folders here to upload", className: clsx("absolute inset-0 bg-white/90 dark:bg-gray-800/90 pointer-events-auto", isDragging ? "flex" : "hidden"), buttonLabel: "Select Files or Folders", allowFolders: true }) }) }), _jsx(DocumentUploadModal, { isOpen: typeSelectionOpen && files.length > 0, onClose: () => {
157
+ // Reset state variables and close the modal
158
+ setFiles([]);
159
+ setProcessedFiles(null);
160
+ setTypeSelectionOpen(false);
161
+ onDoUpload(undefined);
162
+ }, files: files, collectionId: collectionId, selectedFolder: null, title: "Upload Files", onUploadComplete: (result) => {
163
+ // Handle upload completion
164
+ if (result) {
165
+ // If there are failures, show them
166
+ if (result.failedFiles && result.failedFiles.length > 0) {
167
+ toast({
168
+ title: "Upload Issues",
169
+ description: `${result.failedFiles.length} file(s) failed to upload`,
170
+ status: "warning",
171
+ duration: 5000,
172
+ });
173
+ }
174
+ // On success, summarize the results
175
+ if (result.success) {
176
+ const created = result.uploadedFiles.filter((f) => f.status === "created").length;
177
+ const updated = result.uploadedFiles.filter((f) => f.status === "updated").length;
178
+ const skipped = result.skippedFiles.length;
179
+ if (created > 0 || updated > 0) {
180
+ toast({
181
+ title: "Upload Complete",
182
+ description: `${created > 0 ? `${created} created` : ""}${created > 0 && updated > 0 ? ", " : ""}${updated > 0 ? `${updated} updated` : ""}${skipped > 0 ? `, ${skipped} skipped` : ""}`,
183
+ status: "success",
184
+ duration: 5000,
185
+ });
186
+ }
187
+ }
188
+ // Force search refresh
189
+ search.search();
190
+ }
191
+ // Close modal and reset state without passing result
192
+ setFiles([]);
193
+ setProcessedFiles(null);
194
+ setTypeSelectionOpen(false);
195
+ // Complete the upload process with type ID if successful
196
+ if (result && result.success && result.objectIds.length > 0) {
197
+ // We don't have type information here, so pass null (process completed)
198
+ onDoUpload(null);
199
+ }
200
+ else {
201
+ // Cancel the upload
202
+ onDoUpload(undefined);
203
+ }
204
+ } })] }));
205
+ }
206
+ function DocumentTableImpl({ objects, layout = defaultLayout, isLoading, onRowClick, onSelectionChange, isGridView, }) {
207
+ const selection = useOptionalDocumentSelection();
208
+ const _onSelectionChange = (object, ev) => {
209
+ if (selection) {
210
+ const isShift = ev.nativeEvent.shiftKey;
211
+ const checked = ev.target.checked;
212
+ if (!checked) {
213
+ selection.remove(object.id);
214
+ }
215
+ else {
216
+ selection.add(object);
217
+ if (isShift) {
218
+ const index = objects.findIndex((obj) => obj.id === object.id);
219
+ const prev = findPreviousSelected(objects, index, selection);
220
+ if (prev > -1 && prev < index - 1) {
221
+ const toSelect = [];
222
+ for (let i = prev + 1; i < index; i++) {
223
+ toSelect.push(objects[i]);
224
+ }
225
+ selection.addAll(toSelect);
226
+ }
227
+ else {
228
+ const next = findNextSelected(objects, index, selection);
229
+ if (next > -1 && next > index + 1) {
230
+ const toSelect = [];
231
+ for (let i = index + 1; i < next; i++) {
232
+ toSelect.push(objects[i]);
233
+ }
234
+ selection.addAll(toSelect);
235
+ }
236
+ }
237
+ }
238
+ }
239
+ onSelectionChange && onSelectionChange(selection);
240
+ }
241
+ };
242
+ const toggleAll = (ev) => {
243
+ if (selection) {
244
+ const checked = ev.target.checked;
245
+ if (!checked) {
246
+ // remove all
247
+ selection.removeAll();
248
+ }
249
+ else {
250
+ selection.addAll(objects);
251
+ }
252
+ }
253
+ };
254
+ const columns = useMemo(() => {
255
+ // avoid rendering empty layouts
256
+ const actualLayout = layout.length > 0 ? layout : defaultLayout;
257
+ return actualLayout.map((col) => new DocumentTableColumn(col));
258
+ }, [layout]);
259
+ return isGridView ? (_jsx(DocumentGridView, { objects: objects, isLoading: isLoading, columns: columns, onRowClick: onRowClick, selection: selection, toggleAll: toggleAll, onSelectionChange: _onSelectionChange })) : (_jsx(DocumentTableView, { objects: objects, isLoading: isLoading, columns: columns, onRowClick: onRowClick, selection: selection, toggleAll: toggleAll, onSelectionChange: _onSelectionChange }));
260
+ }
261
+ function findPreviousSelected(objects, index, selection) {
262
+ for (let i = index - 1; i >= 0; i--) {
263
+ if (selection.isSelected(objects[i].id)) {
264
+ return i;
265
+ }
266
+ }
267
+ return -1;
268
+ }
269
+ function findNextSelected(objects, index, selection) {
270
+ const length = objects.length;
271
+ for (let i = index + 1; i < length; i++) {
272
+ if (selection.isSelected(objects[i].id)) {
273
+ return i;
274
+ }
275
+ }
276
+ return -1;
277
+ }
278
+ //# sourceMappingURL=DocumentTable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DocumentTable.js","sourceRoot":"","sources":["../../../../../src/features/store/objects/DocumentTable.tsx"],"names":[],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S,EACpB,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,SAAS,EACpB,iBAAiB,EAAE,kBAAkB,GACvC,CACL,CAAC;AACN,CAAC;AAED,SAAS,oBAAoB,CAAC,OAA4B,EAAE,KAAa,EAAE,SAA4B;IACnG,KAAK,IAAI,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAClC,IAAI,SAAS,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;YACtC,OAAO,CAAC,CAAC;QACb,CAAC;IACL,CAAC;IACD,OAAO,CAAC,CAAC,CAAC;AACd,CAAC;AAED,SAAS,gBAAgB,CAAC,OAA4B,EAAE,KAAa,EAAE,SAA4B;IAC/F,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAC9B,KAAK,IAAI,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACtC,IAAI,SAAS,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;YACtC,OAAO,CAAC,CAAC;QACb,CAAC;IACL,CAAC;IACD,OAAO,CAAC,CAAC,CAAC;AACd,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Button, Modal, ModalBody, ModalTitle, SelectBox, Spinner } from "@vertesia/ui/core";
3
+ import { useState } from "react";
4
+ export var ExportTypes;
5
+ (function (ExportTypes) {
6
+ ExportTypes["CSV"] = "CSV";
7
+ ExportTypes["JSON"] = "JSON";
8
+ })(ExportTypes || (ExportTypes = {}));
9
+ ;
10
+ export function ExportPropertiesModal({ isExporting, isOpen, onClose }) {
11
+ const title = "Export Object Properties";
12
+ return (_jsxs(Modal, { onClose: () => onClose(undefined), isOpen: isOpen, className: "relative overflow-visible", children: [_jsx(ModalTitle, { children: title }), !isExporting &&
13
+ _jsx(SelectPanel, { onClose: onClose }), isExporting &&
14
+ _jsx(WaitingPanel, {})] }));
15
+ }
16
+ function SelectPanel({ onClose }) {
17
+ const [exportType, setExportType] = useState(undefined);
18
+ const [exportAll, setExportAll] = useState(undefined);
19
+ const selectionOption = ["Export selected objects", "Export all objects"];
20
+ const exportAllBoolean = (option) => {
21
+ return option == selectionOption[1];
22
+ };
23
+ const onSubmit = () => {
24
+ onClose(exportType, exportAllBoolean(exportAll));
25
+ };
26
+ return (_jsxs(ModalBody, { className: "min-h-[104px] pt-0 flex flex-col gap-y-4", children: [_jsx("div", { className: 'h-1/3', children: _jsx(SelectBox, { options: selectionOption, value: exportAll, onChange: setExportAll, placeholder: "Choose what to export", className: "h-full w-full text-sm", filterBy: "name", isClearable: true }) }), _jsxs("div", { className: 'h-1/2 flex flex-col gap-y-8 content-between', children: [_jsx(SelectBox, { options: Object.values(ExportTypes), value: exportType, onChange: setExportType, placeholder: "Choose a format", className: "h-full w-full text-sm", filterBy: "name", isClearable: true }), _jsx(Button, { className: "w-full", isDisabled: !exportType || !exportAll, onClick: onSubmit, children: "Export Properties" })] })] }));
27
+ }
28
+ function WaitingPanel({}) {
29
+ return (_jsx(ModalBody, { className: "min-h-[84px] pt-0", children: _jsxs("div", { className: 'h-full grid flex-col gap-y-2 content-between justify-items-center', children: [_jsxs("div", { className: "text-sm flex flex-col gap-x-2", children: [_jsx("p", { children: "EXPORT IS IN PROGRESS" }), _jsx("p", { className: "pt-2 grid justify-items-center", children: "PLEASE WAIT" })] }), _jsx(Spinner, { size: 'lg' })] }) }));
30
+ }
31
+ //# sourceMappingURL=ExportPropertiesModal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExportPropertiesModal.js","sourceRoot":"","sources":["../../../../../src/features/store/objects/ExportPropertiesModal.tsx"],"names":[],"mappings":";AAAA,OAAO,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AC,CAAA;IAED,OAAO,CACH,MAAC,SAAS,IAAC,SAAS,EAAC,0CAA0C,aAC3D,cAAK,SAAS,EAAC,OAAO,YAClB,KAAC,SAAS,IACN,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,YAAY,EACtB,WAAW,EAAC,uBAAuB,EACnC,SAAS,EAAC,uBAAuB,EACjC,QAAQ,EAAC,MAAM,EACf,WAAW,SACb,GACA,EACN,eAAK,SAAS,EAAC,6CAA6C,aACxD,KAAC,SAAS,IACN,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,EACnC,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,aAAa,EACvB,WAAW,EAAC,iBAAiB,EAC7B,SAAS,EAAC,uBAAuB,EACjC,QAAQ,EAAC,MAAM,EACf,WAAW,SACb,EAEF,KAAC,MAAM,IAAC,SAAS,EAAC,QAAQ,EAAC,UAAU,EAAE,CAAC,UAAU,IAAI,CAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,kCAA4B,IAC7G,IACE,CACf,CAAA;AACL,CAAC;AAGD,SAAS,YAAY,CAAC,EAAsB;IACxC,OAAO,CACH,KAAC,SAAS,IAAC,SAAS,EAAC,mBAAmB,YACpC,eAAK,SAAS,EAAC,mEAAmE,aAC9E,eAAK,SAAS,EAAC,+BAA+B,aAC1C,gDAA4B,EAC5B,YAAG,SAAS,EAAC,gCAAgC,4BAAgB,IAC3D,EACN,KAAC,OAAO,IAAC,IAAI,EAAC,IAAI,GAAG,IACnB,GACE,CACf,CAAA;AACL,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { LayoutGrid, TableProperties } from 'lucide-react';
3
+ import { useState } from 'react';
4
+ import { Button } from '@vertesia/ui/core';
5
+ const LAST_DISPLAYED_VIEW = 'vertesia.content_store.lastDisplayedView';
6
+ export function ContentDispositionButton({ onUpdate }) {
7
+ const [isGridView, setIsGridView] = useState(localStorage.getItem(LAST_DISPLAYED_VIEW) === "grid");
8
+ const updateView = () => {
9
+ if (isGridView) {
10
+ toggleTableView();
11
+ }
12
+ else {
13
+ toggleGridView();
14
+ }
15
+ };
16
+ const toggleGridView = () => {
17
+ localStorage.setItem(LAST_DISPLAYED_VIEW, "grid");
18
+ setIsGridView(true);
19
+ onUpdate(true);
20
+ };
21
+ const toggleTableView = () => {
22
+ localStorage.setItem(LAST_DISPLAYED_VIEW, "table");
23
+ setIsGridView(false);
24
+ onUpdate(false);
25
+ };
26
+ return (_jsx(Button, { variant: "outline", onClick: updateView, alt: isGridView ? "Table View" : "Thumbnail View", children: isGridView
27
+ ? _jsx(TableProperties, {})
28
+ : _jsx(LayoutGrid, {}) }));
29
+ }
30
+ ContentDispositionButton.LAST_DISPLAYED_VIEW = LAST_DISPLAYED_VIEW;
31
+ //# sourceMappingURL=ContentDispositionButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContentDispositionButton.js","sourceRoot":"","sources":["../../../../../../src/features/store/objects/components/ContentDispositionButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEhC,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAE1C,MAAM,mBAAmB,GAAG,0CAA0C,CAAA;AAKtE,MAAM,UAAU,wBAAwB,CAAC,EAAE,QAAQ,EAA2C;IAC1F,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,YAAY,CAAC,OAAO,CAAC,mBAAmB,CAAC,KAAK,MAAM,CAAC,CAAA;IAElG,MAAM,UAAU,GAAG,GAAG,EAAE;QACpB,IAAI,UAAU,EAAE,CAAC;YACb,eAAe,EAAE,CAAA;QACrB,CAAC;aAAM,CAAC;YACJ,cAAc,EAAE,CAAA;QACpB,CAAC;IACL,CAAC,CAAA;IAED,MAAM,cAAc,GAAG,GAAG,EAAE;QACxB,YAAY,CAAC,OAAO,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAA;QACjD,aAAa,CAAC,IAAI,CAAC,CAAA;QACnB,QAAQ,CAAC,IAAI,CAAC,CAAA;IAClB,CAAC,CAAA;IAED,MAAM,eAAe,GAAG,GAAG,EAAE;QACzB,YAAY,CAAC,OAAO,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAA;QAClD,aAAa,CAAC,KAAK,CAAC,CAAA;QACpB,QAAQ,CAAC,KAAK,CAAC,CAAA;IACnB,CAAC,CAAA;IAED,OAAO,CACH,KAAC,MAAM,IAAC,OAAO,EAAC,SAAS,EAAC,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,gBAAgB,YAExF,UAAU;YACN,CAAC,CAAC,KAAC,eAAe,KAAG;YACrB,CAAC,CAAC,KAAC,UAAU,KAAG,GAEnB,CACZ,CAAA;AACL,CAAC;AAED,wBAAwB,CAAC,mBAAmB,GAAG,mBAAmB,CAAA"}
@@ -0,0 +1,195 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useEffect, useState } from "react";
3
+ import Markdown from "react-markdown";
4
+ import remarkGfm from "remark-gfm";
5
+ import { useUserSession } from "@vertesia/ui/session";
6
+ import { Button, Link, Spinner, useToast } from "@vertesia/ui/core";
7
+ import { JSONDisplay } from "@vertesia/ui/widgets";
8
+ import { ImageRenditionFormat } from "@vertesia/common";
9
+ import { Copy, Download, SquarePen } from "lucide-react";
10
+ import { PropertiesEditorModal } from "./PropertiesEditorModal";
11
+ export function ContentOverview({ object, loadText, }) {
12
+ const { client, store } = useUserSession();
13
+ const [isLoadingText, setIsLoadingText] = useState(false);
14
+ const [text, setText] = useState(object.text);
15
+ const [imageUrl, setImageUrl] = useState();
16
+ const [isPropertiesModalOpen, setPropertiesModalOpen] = useState(false);
17
+ const toast = useToast();
18
+ const [viewCode, setViewCode] = useState(false);
19
+ const VIEW_JSON = "JSON";
20
+ const VIEW_TEXT = "Preview";
21
+ const handleOpenPropertiesModal = () => {
22
+ setPropertiesModalOpen(true);
23
+ };
24
+ const handleClosePropertiesModal = () => {
25
+ setPropertiesModalOpen(false);
26
+ };
27
+ useEffect(() => {
28
+ if (loadText && !text) {
29
+ setIsLoadingText(true);
30
+ store.objects
31
+ .getObjectText(object.id)
32
+ .then((res) => {
33
+ setText(res.text);
34
+ })
35
+ .catch((err) => {
36
+ console.error("Failed to load text", err);
37
+ })
38
+ .finally(() => {
39
+ setIsLoadingText(false);
40
+ });
41
+ }
42
+ }, [loadText]);
43
+ const handleCopyContent = async (content, type) => {
44
+ try {
45
+ await navigator.clipboard.writeText(content);
46
+ toast({
47
+ status: "success",
48
+ title: `${type === "text" ? "Content" : "Properties"} copied`,
49
+ description: `Successfully copied ${type} to clipboard`,
50
+ duration: 2000,
51
+ });
52
+ }
53
+ catch (err) {
54
+ console.error(`Failed to copy ${type}:`, err);
55
+ toast({
56
+ status: "error",
57
+ title: "Copy failed",
58
+ description: `Failed to copy ${type} to clipboard`,
59
+ duration: 5000,
60
+ });
61
+ }
62
+ };
63
+ const handleExportDocument = async (format) => {
64
+ try {
65
+ // Request document rendition from the server
66
+ const response = await client.objects.getRendition(object.id, {
67
+ format: format, // We're extending the format type
68
+ max_hw: 1024, // Not used for document exports but required by API
69
+ generate_if_missing: true,
70
+ sign_url: true,
71
+ });
72
+ if (response.status === "generating") {
73
+ toast({
74
+ status: "info",
75
+ title: "Generating document",
76
+ description: `Please wait while we prepare your ${format.toUpperCase()} file...`,
77
+ duration: 5000,
78
+ });
79
+ // Poll for completion
80
+ setTimeout(() => handleExportDocument(format), 3000);
81
+ return;
82
+ }
83
+ if (response.status === "failed") {
84
+ throw new Error("Document generation failed");
85
+ }
86
+ // Download the generated file or open in new window
87
+ if (response.renditions && response.renditions.length > 0) {
88
+ const downloadUrl = response.renditions[0];
89
+ if (format === 'pdf') {
90
+ // Open PDF in new window
91
+ window.open(downloadUrl, '_blank');
92
+ toast({
93
+ status: "success",
94
+ title: "PDF opened",
95
+ description: "PDF document opened in a new window",
96
+ duration: 2000,
97
+ });
98
+ }
99
+ else {
100
+ // Download DOCX file
101
+ const link = document.createElement("a");
102
+ link.href = downloadUrl;
103
+ link.download = `${object.name || "document"}.${format}`;
104
+ document.body.appendChild(link);
105
+ link.click();
106
+ document.body.removeChild(link);
107
+ toast({
108
+ status: "success",
109
+ title: "Document exported",
110
+ description: `Successfully exported to ${format.toUpperCase()} format`,
111
+ duration: 2000,
112
+ });
113
+ }
114
+ }
115
+ }
116
+ catch (err) {
117
+ console.error(`Failed to export document as ${format}:`, err);
118
+ toast({
119
+ status: "error",
120
+ title: "Export failed",
121
+ description: `Failed to export document to ${format.toUpperCase()} format`,
122
+ duration: 5000,
123
+ });
124
+ }
125
+ };
126
+ const handleExportDocx = () => handleExportDocument("docx");
127
+ //const handleExportPdf = () => handleExportDocument("pdf");
128
+ const content = object.content;
129
+ const isImage = content &&
130
+ content.source &&
131
+ content.type &&
132
+ content.type.startsWith("image/");
133
+ const isMarkdownOrText = content &&
134
+ content.type &&
135
+ (content.type === "text/markdown" || content.type === "text/plain");
136
+ // Check for markdown indicators, ignoring any HTML comments
137
+ const seemsMarkdown = text &&
138
+ // Look for markdown indicators
139
+ (text.includes("\n#") ||
140
+ text.includes("\n*") ||
141
+ text.includes("\n+") ||
142
+ text.includes("!["));
143
+ useEffect(() => {
144
+ if (isImage) {
145
+ client.objects
146
+ .getRendition(object.id, {
147
+ max_hw: 1024,
148
+ format: ImageRenditionFormat.jpeg,
149
+ generate_if_missing: false,
150
+ sign_url: true,
151
+ })
152
+ .then((r) => {
153
+ if (r.status === "found") {
154
+ return r.renditions?.length ? r.renditions[0] : null;
155
+ }
156
+ else {
157
+ return object;
158
+ }
159
+ })
160
+ .catch(() => {
161
+ return object;
162
+ })
163
+ .then(() => {
164
+ client.files
165
+ .getDownloadUrl(object.content.source)
166
+ .then((r) => {
167
+ setImageUrl(r.url);
168
+ });
169
+ });
170
+ }
171
+ }, []);
172
+ return (_jsxs("div", { className: "w-full", children: [_jsxs("div", { className: "flex flex-col lg:flex-row lg:gap-8", children: [_jsxs("div", { className: "w-full lg:w-1/2", children: [_jsxs("div", { className: "h-[41px] text-lg font-semibold mb-4 border-b flex justify-between items-center", children: [_jsxs("div", { className: "flex items-center gap-1", children: ["Properties", _jsx(Button, { variant: "outline", size: "sm", alt: `${viewCode ? "Preview" : "View in JSON format"}`, onClick: () => setViewCode(!viewCode), children: viewCode ? VIEW_TEXT : VIEW_JSON })] }), _jsxs("div", { className: "flex items-center gap-2", children: [object.properties && (_jsx(Button, { variant: "ghost", size: "sm", title: "Copy properties", onClick: () => handleCopyContent(JSON.stringify(object.properties, null, 2), "properties"), children: _jsx(Copy, { className: "size-4" }) })), _jsx(Button, { variant: "ghost", size: "sm", onClick: handleOpenPropertiesModal, title: "Edit properties", className: "flex items-center gap-2", children: _jsx(SquarePen, { className: "size-4" }) })] })] }), object.properties ? (_jsx(JSONDisplay, { value: object.properties, viewCode: viewCode })) : (_jsx("div", { children: "No properties defined" })), isImage && (_jsxs("div", { className: "my-4", children: [_jsx("div", { className: "h-[41px] text-lg font-semibold mb-4 border-b flex justify-between items-center", children: _jsx("span", { className: "py-1", children: "Image" }) }), imageUrl ? (_jsx("img", { src: imageUrl, alt: object.name, className: "w-full object-contain" })) : (_jsx(Spinner, { size: "md" }))] }))] }), _jsxs("div", { className: "w-full lg:w-1/2 mt-4 lg:mt-0", children: [_jsxs("div", { className: "h-[41px] text-lg font-semibold mb-4 border-b flex justify-between items-center", children: [_jsx("span", { className: "py-1", children: "Text" }), _jsxs("div", { className: "flex items-center gap-2", children: [text && (_jsx(Button, { variant: "ghost", size: "sm", title: "Copy text", onClick: () => handleCopyContent(text, "text"), className: "flex items-center gap-2", children: _jsx(Copy, { className: "h-4 w-4" }) })), (isMarkdownOrText || seemsMarkdown) && text && (_jsx(_Fragment, { children: _jsxs(Button, { variant: "ghost", size: "sm", onClick: handleExportDocx, className: "flex items-center gap-2", children: [_jsx(Download, { className: "h-4 w-4" }), "DOCX"] }) }))] })] }), isLoadingText && _jsx(Spinner, { size: "md" }), text ? (_jsx("div", { className: "border shadow-xs rounded-xs max-w-7xl", children: seemsMarkdown ? (_jsx("div", { className: "prose prose-sm max-w-none prose-p:bg-transparent prose-p:my-0 prose-pre:bg-gray-800 dark:prose-pre:bg-gray-900 prose-pre:my-2 prose-code:bg-gray-200/70 dark:prose-code:bg-gray-700/50 prose-headings:bg-transparent prose-li:bg-transparent dark:prose-invert dark:text-gray-100", children: _jsx(Markdown, { remarkPlugins: [remarkGfm], components: {
173
+ a: ({ node, ...props }) => {
174
+ const href = props.href || "";
175
+ if (href.startsWith("/store/objects/")) {
176
+ return (_jsx(Link, { href: href, className: "text-blue-600 hover:text-blue-800 dark:text-blue-400 dark:hover:text-blue-300", children: props.children }));
177
+ }
178
+ return (_jsx("a", { ...props, target: "_blank", rel: "noopener noreferrer" }));
179
+ },
180
+ p: ({ node, ...props }) => (_jsx("p", { ...props, className: "my-0 text-gray-800 dark:text-gray-100" })),
181
+ pre: ({ node, ...props }) => (_jsx("pre", { ...props, className: "my-2 bg-gray-800 dark:bg-gray-900 p-2 rounded text-gray-100" })),
182
+ code: ({ node, className, children, ...props }) => {
183
+ const match = /language-(\w+)/.exec(className || "");
184
+ const isInline = !match;
185
+ return (_jsx("code", { ...props, className: isInline
186
+ ? "px-1.5 py-0.5 rounded text-muted bg-gray-200/70 dark:bg-gray-700/50"
187
+ : "text-gray-100", children: children }));
188
+ },
189
+ h1: ({ node, ...props }) => (_jsx("h1", { ...props, className: "text-gray-900 dark:text-gray-50 font-bold text-2xl my-2" })),
190
+ h2: ({ node, ...props }) => (_jsx("h2", { ...props, className: "text-gray-900 dark:text-gray-50 font-bold text-xl my-2" })),
191
+ h3: ({ node, ...props }) => (_jsx("h3", { ...props, className: "text-gray-900 dark:text-gray-50 font-bold text-lg my-2" })),
192
+ li: ({ node, ...props }) => (_jsx("li", { ...props, className: "text-gray-800 dark:text-gray-100" })),
193
+ }, children: text }) })) : (_jsx("pre", { className: "text-wrap bg-muted text-muted p-2", children: text })) })) : (_jsx("div", { children: "No content" }))] })] }), _jsx(PropertiesEditorModal, { isOpen: isPropertiesModalOpen, onClose: handleClosePropertiesModal, object: object })] }));
194
+ }
195
+ //# sourceMappingURL=ContentOverview.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContentOverview.js","sourceRoot":"","sources":["../../../../../../src/features/store/objects/components/ContentOverview.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAiB,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAMhE,MAAM,UAAU,eAAe,CAAC,EAC5B,MAAM,EACN,QAAQ,GACW;IACnB,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,cAAc,EAAE,CAAC;IAC3C,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC1D,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAqB,MAAM,CAAC,IAAI,CAAC,CAAC;IAClE,MAAM,CAAC,QAA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AACN,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useState } from 'react';
3
+ import { retrieveRendition } from '../../../utils';
4
+ import { Card, CardContent, Separator, VTooltip } from "@vertesia/ui/core";
5
+ import { useNavigate } from "@vertesia/ui/router";
6
+ import { useUserSession } from "@vertesia/ui/session";
7
+ export function DocumentIcon({ selection, document, onSelectionChange }) {
8
+ const { client } = useUserSession();
9
+ const navigate = useNavigate();
10
+ const [renditionUrl, setRenditionUrl] = useState(undefined);
11
+ const [renditionAlt, setRenditionAlt] = useState(undefined);
12
+ const handleNavigateToDocument = () => {
13
+ navigate(`/objects/${document.id}`);
14
+ };
15
+ const handleSelect = (ev) => {
16
+ ev.stopPropagation();
17
+ onSelectionChange(document, ev);
18
+ };
19
+ useEffect(() => {
20
+ if (!document?.content) {
21
+ return;
22
+ }
23
+ retrieveRendition(client, document, setRenditionUrl, setRenditionAlt);
24
+ }, [document]);
25
+ console.log("renditionUrl", document);
26
+ return (_jsxs(Card, { className: "relative flex flex-col border h-fit", onClick: handleNavigateToDocument, children: [selection && (_jsx("div", { className: "absolute top-2 left-2 z-10 flex flex-col items-center gap-1", children: _jsx("input", { checked: selection.isSelected(document.id), type: "checkbox", onChange: handleSelect, onClick: (e) => e.stopPropagation() }) })), renditionUrl ? (_jsx("img", { src: renditionUrl, alt: renditionAlt, className: "w-auto h-48 object-cover rounded-t-xl" })) : (_jsx("div", { className: "h-48 bg-gray-700 rounded-t-xl" })), _jsx(Separator, { className: 'bg-gray-200 h-[2px]' }), _jsx(CardContent, { className: "p-2 flex flex-col gap-1", children: _jsxs("div", { className: "flex flex-col", children: [_jsx(VTooltip, { placement: 'top', description: document.properties?.title ?? document.name, children: _jsx("h3", { className: "text-start font-medium leading-none truncate", children: document.properties?.title ?? document.name }) }), document?.type?.name ? (_jsx(VTooltip, { placement: 'bottom', size: 'xs', description: document?.type?.name, children: _jsx("p", { className: "text-start text-xs text-muted truncate", children: document?.type?.name }) })) : _jsx("p", { className: "text-xs text-muted", children: "\u2002" })] }) })] }));
27
+ }
28
+ //# sourceMappingURL=DocumentIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DocumentIcon.js","sourceRoot":"","sources":["../../../../../../src/features/store/objects/components/DocumentIcon.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAe,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAExD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAGlD,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AASrD,MAAM,UAAU,YAAY,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,iBAAiB,EAA+B;IAChG,MAAM,EAAE,MAAM,EAAE,GAAG,cAAc,EAAE,CAAA;IACnC,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAA;IAE9B,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAqB,SAAS,CAAC,CAAA;IAC/E,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAqB,SAAS,CAAC,CAAA;IAE/E,MAAM,wBAAwB,GAAG,GAAG,EAAE;QAClC,QAAQ,CAAC,YAAY,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAA;IACvC,CAAC,CAAA;IAED,MAAM,YAAY,GAAG,CAAC,EAAuC,EAAE,EAAE;QAC7D,EAAE,CAAC,eAAe,EAAE,CAAA;QACpB,iBAAiB,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAA;IACnC,CAAC,CAAA;IAED,SAAS,CAAC,GAAG,EAAE;QACX,IAAI,CAAC,QAAQ,EAAE,OAAO,EAAE,CAAC;YACrB,OAAM;QAC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