@vertesia/ui 0.60.0 → 0.62.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 (665) 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/calendar.js +7 -39
  10. package/lib/esm/core/components/shadcn/calendar.js.map +1 -1
  11. package/lib/esm/core/components/shadcn/dialog.js +3 -3
  12. package/lib/esm/core/components/shadcn/dialog.js.map +1 -1
  13. package/lib/esm/core/components/shadcn/filters/DynamicLabel.js +38 -0
  14. package/lib/esm/core/components/shadcn/filters/DynamicLabel.js.map +1 -0
  15. package/lib/esm/core/components/shadcn/filters/comboBox.js +27 -26
  16. package/lib/esm/core/components/shadcn/filters/comboBox.js.map +1 -1
  17. package/lib/esm/core/components/shadcn/filters/dateFilter.js +19 -14
  18. package/lib/esm/core/components/shadcn/filters/dateFilter.js.map +1 -1
  19. package/lib/esm/core/components/shadcn/filters/filterBar.js +49 -36
  20. package/lib/esm/core/components/shadcn/filters/filterBar.js.map +1 -1
  21. package/lib/esm/core/components/shadcn/filters/filters.js +31 -23
  22. package/lib/esm/core/components/shadcn/filters/filters.js.map +1 -1
  23. package/lib/esm/core/components/shadcn/filters/selectFilter.js +33 -24
  24. package/lib/esm/core/components/shadcn/filters/selectFilter.js.map +1 -1
  25. package/lib/esm/core/components/shadcn/filters/textFilter.js +2 -2
  26. package/lib/esm/core/components/shadcn/filters/textFilter.js.map +1 -1
  27. package/lib/esm/core/components/shadcn/filters/types.js.map +1 -1
  28. package/lib/esm/core/components/shadcn/input.js +4 -4
  29. package/lib/esm/core/components/shadcn/input.js.map +1 -1
  30. package/lib/esm/core/components/shadcn/selectBox.js +72 -6
  31. package/lib/esm/core/components/shadcn/selectBox.js.map +1 -1
  32. package/lib/esm/core/components/styles.js +1 -1
  33. package/lib/esm/core/components/styles.js.map +1 -1
  34. package/lib/esm/core/components/table/index.js +3 -0
  35. package/lib/esm/core/components/table/index.js.map +1 -1
  36. package/lib/esm/core/index.js +2 -1
  37. package/lib/esm/core/index.js.map +1 -1
  38. package/lib/esm/core/utils/cn.js +6 -0
  39. package/lib/esm/core/utils/cn.js.map +1 -0
  40. package/lib/esm/core/utils/index.js +2 -0
  41. package/lib/esm/core/utils/index.js.map +1 -0
  42. package/lib/esm/features/agent/PayloadBuilder.js +174 -0
  43. package/lib/esm/features/agent/PayloadBuilder.js.map +1 -0
  44. package/lib/esm/features/agent/chat/AnimatedThinkingDots.js +207 -0
  45. package/lib/esm/features/agent/chat/AnimatedThinkingDots.js.map +1 -0
  46. package/lib/esm/features/agent/chat/JumpingDots.js +6 -0
  47. package/lib/esm/features/agent/chat/JumpingDots.js.map +1 -0
  48. package/lib/esm/features/agent/chat/ModernAgentConversation.js +409 -0
  49. package/lib/esm/features/agent/chat/ModernAgentConversation.js.map +1 -0
  50. package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +129 -0
  51. package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +1 -0
  52. package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js +66 -0
  53. package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js.map +1 -0
  54. package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlideInPanel.js +29 -0
  55. package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlideInPanel.js.map +1 -0
  56. package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.js +97 -0
  57. package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.js.map +1 -0
  58. package/lib/esm/features/agent/chat/ModernAgentOutput/MessageInput.js +46 -0
  59. package/lib/esm/features/agent/chat/ModernAgentOutput/MessageInput.js.map +1 -0
  60. package/lib/esm/features/agent/chat/ModernAgentOutput/MessageItem.js +352 -0
  61. package/lib/esm/features/agent/chat/ModernAgentOutput/MessageItem.js.map +1 -0
  62. package/lib/esm/features/agent/chat/ModernAgentOutput/MessagesContainer.js +20 -0
  63. package/lib/esm/features/agent/chat/ModernAgentOutput/MessagesContainer.js.map +1 -0
  64. package/lib/esm/features/agent/chat/ModernAgentOutput/PlanPanel.js +62 -0
  65. package/lib/esm/features/agent/chat/ModernAgentOutput/PlanPanel.js.map +1 -0
  66. package/lib/esm/features/agent/chat/ModernAgentOutput/SlideInPanel.js +23 -0
  67. package/lib/esm/features/agent/chat/ModernAgentOutput/SlideInPanel.js.map +1 -0
  68. package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingMessages.js +51 -0
  69. package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingMessages.js.map +1 -0
  70. package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.js +82 -0
  71. package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.js.map +1 -0
  72. package/lib/esm/features/agent/chat/ModernAgentOutput/StackedMessages.js +13 -0
  73. package/lib/esm/features/agent/chat/ModernAgentOutput/StackedMessages.js.map +1 -0
  74. package/lib/esm/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js +105 -0
  75. package/lib/esm/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js.map +1 -0
  76. package/lib/esm/features/agent/chat/ModernAgentOutput/utils.js +154 -0
  77. package/lib/esm/features/agent/chat/ModernAgentOutput/utils.js.map +1 -0
  78. package/lib/esm/features/agent/chat/SlidingThinkingIndicator.js +266 -0
  79. package/lib/esm/features/agent/chat/SlidingThinkingIndicator.js.map +1 -0
  80. package/lib/esm/features/agent/chat/WaitingMessages.js +60 -0
  81. package/lib/esm/features/agent/chat/WaitingMessages.js.map +1 -0
  82. package/lib/esm/features/agent/chat/index.js +5 -0
  83. package/lib/esm/features/agent/chat/index.js.map +1 -0
  84. package/lib/esm/features/agent/index.js +3 -0
  85. package/lib/esm/features/agent/index.js.map +1 -0
  86. package/lib/esm/features/errors/PanelErrorBoundary.js +11 -0
  87. package/lib/esm/features/errors/PanelErrorBoundary.js.map +1 -0
  88. package/lib/esm/features/errors/RowErrorBoundary.js +9 -0
  89. package/lib/esm/features/errors/RowErrorBoundary.js.map +1 -0
  90. package/lib/esm/features/errors/VertesiaErrorBoundary.js +15 -0
  91. package/lib/esm/features/errors/VertesiaErrorBoundary.js.map +1 -0
  92. package/lib/esm/features/errors/WidgetErrorBoundary.js +11 -0
  93. package/lib/esm/features/errors/WidgetErrorBoundary.js.map +1 -0
  94. package/lib/esm/features/errors/index.js +5 -0
  95. package/lib/esm/features/errors/index.js.map +1 -0
  96. package/lib/esm/features/facets/EnvironmentFacet.js +39 -0
  97. package/lib/esm/features/facets/EnvironmentFacet.js.map +1 -0
  98. package/lib/esm/features/facets/FacetsNav.js +8 -0
  99. package/lib/esm/features/facets/FacetsNav.js.map +1 -0
  100. package/lib/esm/features/facets/InteractionFacet.js +39 -0
  101. package/lib/esm/features/facets/InteractionFacet.js.map +1 -0
  102. package/lib/esm/features/facets/StringFacet.js +12 -0
  103. package/lib/esm/features/facets/StringFacet.js.map +1 -0
  104. package/lib/esm/features/facets/StringListFacet.js +11 -0
  105. package/lib/esm/features/facets/StringListFacet.js.map +1 -0
  106. package/lib/esm/features/facets/TypeFacet.js +42 -0
  107. package/lib/esm/features/facets/TypeFacet.js.map +1 -0
  108. package/lib/esm/features/facets/TypeOptions.js +19 -0
  109. package/lib/esm/features/facets/TypeOptions.js.map +1 -0
  110. package/lib/esm/features/facets/UserFacet.js +33 -0
  111. package/lib/esm/features/facets/UserFacet.js.map +1 -0
  112. package/lib/esm/features/facets/VFacetsNav.js +114 -0
  113. package/lib/esm/features/facets/VFacetsNav.js.map +1 -0
  114. package/lib/esm/features/facets/VStringFacet.js +17 -0
  115. package/lib/esm/features/facets/VStringFacet.js.map +1 -0
  116. package/lib/esm/features/facets/VTypeFacet.js +56 -0
  117. package/lib/esm/features/facets/VTypeFacet.js.map +1 -0
  118. package/lib/esm/features/facets/VUserFacet.js +31 -0
  119. package/lib/esm/features/facets/VUserFacet.js.map +1 -0
  120. package/lib/esm/features/facets/index.js +12 -0
  121. package/lib/esm/features/facets/index.js.map +1 -0
  122. package/lib/esm/features/facets/utils.js +7 -0
  123. package/lib/esm/features/facets/utils.js.map +1 -0
  124. package/lib/esm/features/index.js +9 -1
  125. package/lib/esm/features/index.js.map +1 -1
  126. package/lib/esm/features/layout/GenericPageNavHeader.js +11 -0
  127. package/lib/esm/features/layout/GenericPageNavHeader.js.map +1 -0
  128. package/lib/esm/features/layout/NotFoundView.js +5 -0
  129. package/lib/esm/features/layout/NotFoundView.js.map +1 -0
  130. package/lib/esm/features/layout/index.js +3 -0
  131. package/lib/esm/features/layout/index.js.map +1 -0
  132. package/lib/esm/features/magic-pdf/DownloadPopover.js +13 -0
  133. package/lib/esm/features/magic-pdf/DownloadPopover.js.map +1 -0
  134. package/lib/esm/features/magic-pdf/MagicPdfView.js +44 -0
  135. package/lib/esm/features/magic-pdf/MagicPdfView.js.map +1 -0
  136. package/lib/esm/features/magic-pdf/PageSlider.js +57 -0
  137. package/lib/esm/features/magic-pdf/PageSlider.js.map +1 -0
  138. package/lib/esm/features/magic-pdf/PdfPageProvider.js +133 -0
  139. package/lib/esm/features/magic-pdf/PdfPageProvider.js.map +1 -0
  140. package/lib/esm/features/magic-pdf/TextPageView.js +45 -0
  141. package/lib/esm/features/magic-pdf/TextPageView.js.map +1 -0
  142. package/lib/esm/features/magic-pdf/index.js +2 -0
  143. package/lib/esm/features/magic-pdf/index.js.map +1 -0
  144. package/lib/esm/features/magic-pdf/types.js +2 -0
  145. package/lib/esm/features/magic-pdf/types.js.map +1 -0
  146. package/lib/esm/features/magic-pdf/useResizeOnDrag.js +34 -0
  147. package/lib/esm/features/magic-pdf/useResizeOnDrag.js.map +1 -0
  148. package/lib/esm/features/store/collections/BrowseCollectionView.js +37 -0
  149. package/lib/esm/features/store/collections/BrowseCollectionView.js.map +1 -0
  150. package/lib/esm/features/store/collections/CollectionView.js +53 -0
  151. package/lib/esm/features/store/collections/CollectionView.js.map +1 -0
  152. package/lib/esm/features/store/collections/CollectionsTable.js +60 -0
  153. package/lib/esm/features/store/collections/CollectionsTable.js.map +1 -0
  154. package/lib/esm/features/store/collections/CollectionsView.js +94 -0
  155. package/lib/esm/features/store/collections/CollectionsView.js.map +1 -0
  156. package/lib/esm/features/store/collections/EditCollectionView.js +161 -0
  157. package/lib/esm/features/store/collections/EditCollectionView.js.map +1 -0
  158. package/lib/esm/features/store/collections/index.js +6 -0
  159. package/lib/esm/features/store/collections/index.js.map +1 -0
  160. package/lib/esm/features/store/index.js +4 -0
  161. package/lib/esm/features/store/index.js.map +1 -0
  162. package/lib/esm/features/store/objects/DocumentPreviewPanel.js +150 -0
  163. package/lib/esm/features/store/objects/DocumentPreviewPanel.js.map +1 -0
  164. package/lib/esm/features/store/objects/DocumentSearchResults.js +123 -0
  165. package/lib/esm/features/store/objects/DocumentSearchResults.js.map +1 -0
  166. package/lib/esm/features/store/objects/DocumentSelectionProvider.js +81 -0
  167. package/lib/esm/features/store/objects/DocumentSelectionProvider.js.map +1 -0
  168. package/lib/esm/features/store/objects/DocumentTable.js +278 -0
  169. package/lib/esm/features/store/objects/DocumentTable.js.map +1 -0
  170. package/lib/esm/features/store/objects/ExportPropertiesModal.js +31 -0
  171. package/lib/esm/features/store/objects/ExportPropertiesModal.js.map +1 -0
  172. package/lib/esm/features/store/objects/components/ContentDispositionButton.js +31 -0
  173. package/lib/esm/features/store/objects/components/ContentDispositionButton.js.map +1 -0
  174. package/lib/esm/features/store/objects/components/ContentOverview.js +195 -0
  175. package/lib/esm/features/store/objects/components/ContentOverview.js.map +1 -0
  176. package/lib/esm/features/store/objects/components/DocumentIcon.js +28 -0
  177. package/lib/esm/features/store/objects/components/DocumentIcon.js.map +1 -0
  178. package/lib/esm/features/store/objects/components/DocumentInput.js +52 -0
  179. package/lib/esm/features/store/objects/components/DocumentInput.js.map +1 -0
  180. package/lib/esm/features/store/objects/components/PropertiesEditorModal.js +169 -0
  181. package/lib/esm/features/store/objects/components/PropertiesEditorModal.js.map +1 -0
  182. package/lib/esm/features/store/objects/components/SaveVersionConfirmModal.js +45 -0
  183. package/lib/esm/features/store/objects/components/SaveVersionConfirmModal.js.map +1 -0
  184. package/lib/esm/features/store/objects/components/SelectDocument.js +39 -0
  185. package/lib/esm/features/store/objects/components/SelectDocument.js.map +1 -0
  186. package/lib/esm/features/store/objects/components/SelectDocumentModal.js +7 -0
  187. package/lib/esm/features/store/objects/components/SelectDocumentModal.js.map +1 -0
  188. package/lib/esm/features/store/objects/components/VectorSearchWidget.js +85 -0
  189. package/lib/esm/features/store/objects/components/VectorSearchWidget.js.map +1 -0
  190. package/lib/esm/features/store/objects/components/index.js +10 -0
  191. package/lib/esm/features/store/objects/components/index.js.map +1 -0
  192. package/lib/esm/features/store/objects/components/useDownloadObject.js +21 -0
  193. package/lib/esm/features/store/objects/components/useDownloadObject.js.map +1 -0
  194. package/lib/esm/features/store/objects/index.js +11 -0
  195. package/lib/esm/features/store/objects/index.js.map +1 -0
  196. package/lib/esm/features/store/objects/layout/DocumentTableColumn.js +74 -0
  197. package/lib/esm/features/store/objects/layout/DocumentTableColumn.js.map +1 -0
  198. package/lib/esm/features/store/objects/layout/documentLayout.js +16 -0
  199. package/lib/esm/features/store/objects/layout/documentLayout.js.map +1 -0
  200. package/lib/esm/features/store/objects/layout/index.js +3 -0
  201. package/lib/esm/features/store/objects/layout/index.js.map +1 -0
  202. package/lib/esm/features/store/objects/layout/renderers.js +128 -0
  203. package/lib/esm/features/store/objects/layout/renderers.js.map +1 -0
  204. package/lib/esm/features/store/objects/search/DocumentSearchContext.js +150 -0
  205. package/lib/esm/features/store/objects/search/DocumentSearchContext.js.map +1 -0
  206. package/lib/esm/features/store/objects/search/DocumentSearchProvider.js +41 -0
  207. package/lib/esm/features/store/objects/search/DocumentSearchProvider.js.map +1 -0
  208. package/lib/esm/features/store/objects/search/index.js +3 -0
  209. package/lib/esm/features/store/objects/search/index.js.map +1 -0
  210. package/lib/esm/features/store/objects/selection/ObjectsActionContext.js +149 -0
  211. package/lib/esm/features/store/objects/selection/ObjectsActionContext.js.map +1 -0
  212. package/lib/esm/features/store/objects/selection/ObjectsActionSpec.js +2 -0
  213. package/lib/esm/features/store/objects/selection/ObjectsActionSpec.js.map +1 -0
  214. package/lib/esm/features/store/objects/selection/SelectionActions.js +75 -0
  215. package/lib/esm/features/store/objects/selection/SelectionActions.js.map +1 -0
  216. package/lib/esm/features/store/objects/selection/actions/AddToCollectionAction.js +64 -0
  217. package/lib/esm/features/store/objects/selection/actions/AddToCollectionAction.js.map +1 -0
  218. package/lib/esm/features/store/objects/selection/actions/ChangeTypeAction.js +53 -0
  219. package/lib/esm/features/store/objects/selection/actions/ChangeTypeAction.js.map +1 -0
  220. package/lib/esm/features/store/objects/selection/actions/ConfirmAction.js +30 -0
  221. package/lib/esm/features/store/objects/selection/actions/ConfirmAction.js.map +1 -0
  222. package/lib/esm/features/store/objects/selection/actions/DeleteObjectsAction.js +66 -0
  223. package/lib/esm/features/store/objects/selection/actions/DeleteObjectsAction.js.map +1 -0
  224. package/lib/esm/features/store/objects/selection/actions/ExportPropertiesAction.js +106 -0
  225. package/lib/esm/features/store/objects/selection/actions/ExportPropertiesAction.js.map +1 -0
  226. package/lib/esm/features/store/objects/selection/actions/RemoveFromCollectionAction.js +64 -0
  227. package/lib/esm/features/store/objects/selection/actions/RemoveFromCollectionAction.js.map +1 -0
  228. package/lib/esm/features/store/objects/selection/actions/StartWorkflowComponent.js +72 -0
  229. package/lib/esm/features/store/objects/selection/actions/StartWorkflowComponent.js.map +1 -0
  230. package/lib/esm/features/store/objects/selection/actions/index.js +8 -0
  231. package/lib/esm/features/store/objects/selection/actions/index.js.map +1 -0
  232. package/lib/esm/features/store/objects/selection/index.js +5 -0
  233. package/lib/esm/features/store/objects/selection/index.js.map +1 -0
  234. package/lib/esm/features/store/objects/upload/DocumentUploadModal.js +476 -0
  235. package/lib/esm/features/store/objects/upload/DocumentUploadModal.js.map +1 -0
  236. package/lib/esm/features/store/objects/upload/index.js +4 -0
  237. package/lib/esm/features/store/objects/upload/index.js.map +1 -0
  238. package/lib/esm/features/store/objects/upload/useSmartFileUploadProcessing.js +201 -0
  239. package/lib/esm/features/store/objects/upload/useSmartFileUploadProcessing.js.map +1 -0
  240. package/lib/esm/features/store/objects/upload/useUploadHandler.js +230 -0
  241. package/lib/esm/features/store/objects/upload/useUploadHandler.js.map +1 -0
  242. package/lib/esm/features/store/types/ContentObjectTypeView.js +158 -0
  243. package/lib/esm/features/store/types/ContentObjectTypeView.js.map +1 -0
  244. package/lib/esm/features/store/types/ContentObjectTypesSearch.js +82 -0
  245. package/lib/esm/features/store/types/ContentObjectTypesSearch.js.map +1 -0
  246. package/lib/esm/features/store/types/ContentObjectTypesTable.js +11 -0
  247. package/lib/esm/features/store/types/ContentObjectTypesTable.js.map +1 -0
  248. package/lib/esm/features/store/types/ContentObjectTypesView.js +55 -0
  249. package/lib/esm/features/store/types/ContentObjectTypesView.js.map +1 -0
  250. package/lib/esm/features/store/types/CreateOrUpdateTypeModal.js +26 -0
  251. package/lib/esm/features/store/types/CreateOrUpdateTypeModal.js.map +1 -0
  252. package/lib/esm/features/store/types/ObjectSchemaEditor.js +89 -0
  253. package/lib/esm/features/store/types/ObjectSchemaEditor.js.map +1 -0
  254. package/lib/esm/features/store/types/SelectContentType.js +43 -0
  255. package/lib/esm/features/store/types/SelectContentType.js.map +1 -0
  256. package/lib/esm/features/store/types/SelectContentTypeModal.js +28 -0
  257. package/lib/esm/features/store/types/SelectContentTypeModal.js.map +1 -0
  258. package/lib/esm/features/store/types/TableLayoutEditor.js +78 -0
  259. package/lib/esm/features/store/types/TableLayoutEditor.js.map +1 -0
  260. package/lib/esm/features/store/types/index.js +11 -0
  261. package/lib/esm/features/store/types/index.js.map +1 -0
  262. package/lib/esm/features/store/types/search/ObjectTypeSearchContext.js +98 -0
  263. package/lib/esm/features/store/types/search/ObjectTypeSearchContext.js.map +1 -0
  264. package/lib/esm/features/store/types/search/ObjectTypeSearchProvider.js +15 -0
  265. package/lib/esm/features/store/types/search/ObjectTypeSearchProvider.js.map +1 -0
  266. package/lib/esm/features/store/types/search/index.js +3 -0
  267. package/lib/esm/features/store/types/search/index.js.map +1 -0
  268. package/lib/esm/features/user/UserAvatar.js +18 -0
  269. package/lib/esm/features/user/UserAvatar.js.map +1 -0
  270. package/lib/esm/features/user/UserInfo.js +88 -0
  271. package/lib/esm/features/user/UserInfo.js.map +1 -0
  272. package/lib/esm/features/user/index.js +3 -0
  273. package/lib/esm/features/user/index.js.map +1 -0
  274. package/lib/esm/features/utils/index.js +4 -0
  275. package/lib/esm/features/utils/index.js.map +1 -0
  276. package/lib/esm/features/utils/mimeType.js +9 -0
  277. package/lib/esm/features/utils/mimeType.js.map +1 -0
  278. package/lib/esm/features/utils/rendition.js +47 -0
  279. package/lib/esm/features/utils/rendition.js.map +1 -0
  280. package/lib/esm/features/utils/text.js +10 -0
  281. package/lib/esm/features/utils/text.js.map +1 -0
  282. package/lib/esm/layout/FullHeightLayout.js +1 -1
  283. package/lib/esm/layout/FullHeightLayout.js.map +1 -1
  284. package/lib/esm/layout/Sidebar.js +12 -2
  285. package/lib/esm/layout/Sidebar.js.map +1 -1
  286. package/lib/esm/widgets/Progress.js +5 -0
  287. package/lib/esm/widgets/Progress.js.map +1 -0
  288. package/lib/esm/widgets/codemirror/CodeMirrorEditor.js +1 -1
  289. package/lib/esm/widgets/codemirror/CodeMirrorEditor.js.map +1 -1
  290. package/lib/esm/widgets/form/Form.js +2 -2
  291. package/lib/esm/widgets/form/Form.js.map +1 -1
  292. package/lib/esm/widgets/form/schema.js +11 -5
  293. package/lib/esm/widgets/form/schema.js.map +1 -1
  294. package/lib/esm/widgets/index.js +4 -0
  295. package/lib/esm/widgets/index.js.map +1 -1
  296. package/lib/esm/widgets/popover/Popover.js +73 -0
  297. package/lib/esm/widgets/popover/Popover.js.map +1 -0
  298. package/lib/esm/widgets/popover/context.js +7 -0
  299. package/lib/esm/widgets/popover/context.js.map +1 -0
  300. package/lib/esm/widgets/popover/index.js +3 -0
  301. package/lib/esm/widgets/popover/index.js.map +1 -0
  302. package/lib/esm/widgets/popover/slots.js +22 -0
  303. package/lib/esm/widgets/popover/slots.js.map +1 -0
  304. package/lib/esm/widgets/properties/PropertiesView.js +6 -0
  305. package/lib/esm/widgets/properties/PropertiesView.js.map +1 -0
  306. package/lib/esm/widgets/properties/index.js +2 -0
  307. package/lib/esm/widgets/properties/index.js.map +1 -0
  308. package/lib/esm/widgets/schema-editor/JSONSchemaEditorModal.js +1 -2
  309. package/lib/esm/widgets/schema-editor/JSONSchemaEditorModal.js.map +1 -1
  310. package/lib/esm/widgets/schema-editor/editor/Editable.js +9 -10
  311. package/lib/esm/widgets/schema-editor/editor/Editable.js.map +1 -1
  312. package/lib/esm/widgets/schema-editor/editor/PropertyViewer.js +1 -1
  313. package/lib/esm/widgets/schema-editor/editor/PropertyViewer.js.map +1 -1
  314. package/lib/esm/widgets/schema-editor/editor/SchemaEditor.js +2 -2
  315. package/lib/esm/widgets/schema-editor/editor/SchemaEditor.js.map +1 -1
  316. package/lib/esm/widgets/upload/DropZone.js +162 -0
  317. package/lib/esm/widgets/upload/DropZone.js.map +1 -0
  318. package/lib/esm/widgets/upload/UploadResultCategory.js +19 -0
  319. package/lib/esm/widgets/upload/UploadResultCategory.js.map +1 -0
  320. package/lib/esm/widgets/upload/UploadSummary.js +30 -0
  321. package/lib/esm/widgets/upload/UploadSummary.js.map +1 -0
  322. package/lib/esm/widgets/upload/index.js +4 -0
  323. package/lib/esm/widgets/upload/index.js.map +1 -0
  324. package/lib/tsconfig.tsbuildinfo +1 -1
  325. package/lib/types/core/components/FormItem.d.ts +11 -0
  326. package/lib/types/core/components/index.d.ts +3 -3
  327. package/lib/types/core/components/shadcn/button.d.ts +13 -2
  328. package/lib/types/core/components/shadcn/calendar.d.ts +3 -3
  329. package/lib/types/core/components/shadcn/command.d.ts +7 -7
  330. package/lib/types/core/components/shadcn/filters/DynamicLabel.d.ts +8 -0
  331. package/lib/types/core/components/shadcn/filters/comboBox.d.ts +5 -5
  332. package/lib/types/core/components/shadcn/filters/dateFilter.d.ts +3 -4
  333. package/lib/types/core/components/shadcn/filters/types.d.ts +7 -1
  334. package/lib/types/core/components/shadcn/input.d.ts +4 -4
  335. package/lib/types/core/components/shadcn/selectBox.d.ts +13 -4
  336. package/lib/types/core/components/table/index.d.ts +1 -0
  337. package/lib/types/core/index.d.ts +2 -1
  338. package/lib/types/core/utils/cn.d.ts +2 -0
  339. package/lib/types/core/utils/index.d.ts +1 -0
  340. package/lib/types/features/agent/PayloadBuilder.d.ts +53 -0
  341. package/lib/types/features/agent/chat/AnimatedThinkingDots.d.ts +37 -0
  342. package/lib/types/features/agent/chat/JumpingDots.d.ts +6 -0
  343. package/lib/types/features/agent/chat/ModernAgentConversation.d.ts +24 -0
  344. package/lib/types/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts +21 -0
  345. package/lib/types/features/agent/chat/ModernAgentOutput/Header.d.ts +18 -0
  346. package/lib/types/features/agent/chat/ModernAgentOutput/InlineSlideInPanel.d.ts +10 -0
  347. package/lib/types/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.d.ts +15 -0
  348. package/lib/types/features/agent/chat/ModernAgentOutput/MessageInput.d.ts +12 -0
  349. package/lib/types/features/agent/chat/ModernAgentOutput/MessageItem.d.ts +7 -0
  350. package/lib/types/features/agent/chat/ModernAgentOutput/MessagesContainer.d.ts +9 -0
  351. package/lib/types/features/agent/chat/ModernAgentOutput/PlanPanel.d.ts +8 -0
  352. package/lib/types/features/agent/chat/ModernAgentOutput/SlideInPanel.d.ts +10 -0
  353. package/lib/types/features/agent/chat/ModernAgentOutput/SlidingMessages.d.ts +7 -0
  354. package/lib/types/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.d.ts +9 -0
  355. package/lib/types/features/agent/chat/ModernAgentOutput/StackedMessages.d.ts +7 -0
  356. package/lib/types/features/agent/chat/ModernAgentOutput/WorkstreamTabs.d.ts +21 -0
  357. package/lib/types/features/agent/chat/ModernAgentOutput/utils.d.ts +23 -0
  358. package/lib/types/features/agent/chat/SlidingThinkingIndicator.d.ts +17 -0
  359. package/lib/types/features/agent/chat/WaitingMessages.d.ts +1 -0
  360. package/lib/types/features/agent/chat/index.d.ts +4 -0
  361. package/lib/types/features/agent/index.d.ts +2 -0
  362. package/lib/types/features/errors/PanelErrorBoundary.d.ts +4 -0
  363. package/lib/types/features/errors/RowErrorBoundary.d.ts +7 -0
  364. package/lib/types/features/errors/VertesiaErrorBoundary.d.ts +11 -0
  365. package/lib/types/features/errors/WidgetErrorBoundary.d.ts +4 -0
  366. package/lib/types/features/errors/index.d.ts +4 -0
  367. package/lib/types/features/facets/EnvironmentFacet.d.ts +9 -0
  368. package/lib/types/features/facets/FacetsNav.d.ts +6 -0
  369. package/lib/types/features/facets/InteractionFacet.d.ts +9 -0
  370. package/lib/types/features/facets/StringFacet.d.ts +10 -0
  371. package/lib/types/features/facets/StringListFacet.d.ts +10 -0
  372. package/lib/types/features/facets/TypeFacet.d.ts +15 -0
  373. package/lib/types/features/facets/TypeOptions.d.ts +3 -0
  374. package/lib/types/features/facets/UserFacet.d.ts +11 -0
  375. package/lib/types/features/facets/VFacetsNav.d.ts +7 -0
  376. package/lib/types/features/facets/VStringFacet.d.ts +15 -0
  377. package/lib/types/features/facets/VTypeFacet.d.ts +8 -0
  378. package/lib/types/features/facets/VUserFacet.d.ts +9 -0
  379. package/lib/types/features/facets/index.d.ts +11 -0
  380. package/lib/types/features/facets/utils.d.ts +3 -0
  381. package/lib/types/features/index.d.ts +9 -1
  382. package/lib/types/features/layout/GenericPageNavHeader.d.ts +12 -0
  383. package/lib/types/features/layout/NotFoundView.d.ts +4 -0
  384. package/lib/types/features/layout/index.d.ts +2 -0
  385. package/lib/types/features/magic-pdf/DownloadPopover.d.ts +6 -0
  386. package/lib/types/features/magic-pdf/MagicPdfView.d.ts +6 -0
  387. package/lib/types/features/magic-pdf/PageSlider.d.ts +7 -0
  388. package/lib/types/features/magic-pdf/PdfPageProvider.d.ts +28 -0
  389. package/lib/types/features/magic-pdf/TextPageView.d.ts +7 -0
  390. package/lib/types/features/magic-pdf/index.d.ts +1 -0
  391. package/lib/types/features/magic-pdf/types.d.ts +1 -0
  392. package/lib/types/features/magic-pdf/useResizeOnDrag.d.ts +8 -0
  393. package/lib/types/features/store/collections/BrowseCollectionView.d.ts +6 -0
  394. package/lib/types/features/store/collections/CollectionView.d.ts +5 -0
  395. package/lib/types/features/store/collections/CollectionsTable.d.ts +5 -0
  396. package/lib/types/features/store/collections/CollectionsView.d.ts +10 -0
  397. package/lib/types/features/store/collections/EditCollectionView.d.ts +7 -0
  398. package/lib/types/features/store/collections/index.d.ts +5 -0
  399. package/lib/types/features/store/index.d.ts +3 -0
  400. package/lib/types/features/store/objects/DocumentPreviewPanel.d.ts +7 -0
  401. package/lib/types/features/store/objects/DocumentSearchResults.d.ts +19 -0
  402. package/lib/types/features/store/objects/DocumentSelectionProvider.d.ts +32 -0
  403. package/lib/types/features/store/objects/DocumentTable.d.ts +20 -0
  404. package/lib/types/features/store/objects/ExportPropertiesModal.d.ts +11 -0
  405. package/lib/types/features/store/objects/components/ContentDispositionButton.d.ts +8 -0
  406. package/lib/types/features/store/objects/components/ContentOverview.d.ts +7 -0
  407. package/lib/types/features/store/objects/components/DocumentIcon.d.ts +10 -0
  408. package/lib/types/features/store/objects/components/DocumentInput.d.ts +7 -0
  409. package/lib/types/features/store/objects/components/PropertiesEditorModal.d.ts +7 -0
  410. package/lib/types/features/store/objects/components/SaveVersionConfirmModal.d.ts +8 -0
  411. package/lib/types/features/store/objects/components/SelectDocument.d.ts +8 -0
  412. package/lib/types/features/store/objects/components/SelectDocumentModal.d.ts +8 -0
  413. package/lib/types/features/store/objects/components/VectorSearchWidget.d.ts +10 -0
  414. package/lib/types/features/store/objects/components/index.d.ts +9 -0
  415. package/lib/types/features/store/objects/components/useDownloadObject.d.ts +3 -0
  416. package/lib/types/features/store/objects/index.d.ts +10 -0
  417. package/lib/types/features/store/objects/layout/DocumentTableColumn.d.ts +16 -0
  418. package/lib/types/features/store/objects/layout/documentLayout.d.ts +17 -0
  419. package/lib/types/features/store/objects/layout/index.d.ts +2 -0
  420. package/lib/types/features/store/objects/layout/renderers.d.ts +2 -0
  421. package/lib/types/features/store/objects/search/DocumentSearchContext.d.ts +48 -0
  422. package/lib/types/features/store/objects/search/DocumentSearchProvider.d.ts +15 -0
  423. package/lib/types/features/store/objects/search/index.d.ts +2 -0
  424. package/lib/types/features/store/objects/selection/ObjectsActionContext.d.ts +25 -0
  425. package/lib/types/features/store/objects/selection/ObjectsActionSpec.d.ts +27 -0
  426. package/lib/types/features/store/objects/selection/SelectionActions.d.ts +4 -0
  427. package/lib/types/features/store/objects/selection/actions/AddToCollectionAction.d.ts +3 -0
  428. package/lib/types/features/store/objects/selection/actions/ChangeTypeAction.d.ts +3 -0
  429. package/lib/types/features/store/objects/selection/actions/ConfirmAction.d.ts +15 -0
  430. package/lib/types/features/store/objects/selection/actions/DeleteObjectsAction.d.ts +2 -0
  431. package/lib/types/features/store/objects/selection/actions/ExportPropertiesAction.d.ts +3 -0
  432. package/lib/types/features/store/objects/selection/actions/RemoveFromCollectionAction.d.ts +2 -0
  433. package/lib/types/features/store/objects/selection/actions/StartWorkflowComponent.d.ts +3 -0
  434. package/lib/types/features/store/objects/selection/actions/index.d.ts +7 -0
  435. package/lib/types/features/store/objects/selection/index.d.ts +4 -0
  436. package/lib/types/features/store/objects/upload/DocumentUploadModal.d.ts +37 -0
  437. package/lib/types/features/store/objects/upload/index.d.ts +3 -0
  438. package/lib/types/features/store/objects/upload/useSmartFileUploadProcessing.d.ts +29 -0
  439. package/lib/types/features/store/objects/upload/useUploadHandler.d.ts +49 -0
  440. package/lib/types/features/store/types/ContentObjectTypeView.d.ts +5 -0
  441. package/lib/types/features/store/types/ContentObjectTypesSearch.d.ts +5 -0
  442. package/lib/types/features/store/types/ContentObjectTypesTable.d.ts +7 -0
  443. package/lib/types/features/store/types/ContentObjectTypesView.d.ts +8 -0
  444. package/lib/types/features/store/types/CreateOrUpdateTypeModal.d.ts +14 -0
  445. package/lib/types/features/store/types/ObjectSchemaEditor.d.ts +7 -0
  446. package/lib/types/features/store/types/SelectContentType.d.ts +10 -0
  447. package/lib/types/features/store/types/SelectContentTypeModal.d.ts +32 -0
  448. package/lib/types/features/store/types/TableLayoutEditor.d.ts +8 -0
  449. package/lib/types/features/store/types/index.d.ts +10 -0
  450. package/lib/types/features/store/types/search/ObjectTypeSearchContext.d.ts +35 -0
  451. package/lib/types/features/store/types/search/ObjectTypeSearchProvider.d.ts +10 -0
  452. package/lib/types/features/store/types/search/index.d.ts +2 -0
  453. package/lib/types/features/user/UserAvatar.d.ts +8 -0
  454. package/lib/types/features/user/UserInfo.d.ts +36 -0
  455. package/lib/types/features/user/index.d.ts +2 -0
  456. package/lib/types/features/utils/index.d.ts +3 -0
  457. package/lib/types/features/utils/mimeType.d.ts +4 -0
  458. package/lib/types/features/utils/rendition.d.ts +3 -0
  459. package/lib/types/features/utils/text.d.ts +2 -0
  460. package/lib/types/layout/Sidebar.d.ts +2 -1
  461. package/lib/types/widgets/Progress.d.ts +5 -0
  462. package/lib/types/widgets/form/schema.d.ts +4 -3
  463. package/lib/types/widgets/index.d.ts +4 -0
  464. package/lib/types/widgets/popover/Popover.d.ts +37 -0
  465. package/lib/types/widgets/popover/context.d.ts +7 -0
  466. package/lib/types/widgets/popover/index.d.ts +2 -0
  467. package/lib/types/widgets/popover/slots.d.ts +4 -0
  468. package/lib/types/widgets/properties/PropertiesView.d.ts +10 -0
  469. package/lib/types/widgets/properties/index.d.ts +1 -0
  470. package/lib/types/widgets/upload/DropZone.d.ts +40 -0
  471. package/lib/types/widgets/upload/UploadResultCategory.d.ts +25 -0
  472. package/lib/types/widgets/upload/UploadSummary.d.ts +37 -0
  473. package/lib/types/widgets/upload/index.d.ts +3 -0
  474. package/lib/vertesia-ui-core.js +1 -1
  475. package/lib/vertesia-ui-core.js.map +1 -1
  476. package/lib/vertesia-ui-features.js +1 -1
  477. package/lib/vertesia-ui-features.js.map +1 -1
  478. package/lib/vertesia-ui-layout.js +1 -1
  479. package/lib/vertesia-ui-layout.js.map +1 -1
  480. package/lib/vertesia-ui-router.js.map +1 -1
  481. package/lib/vertesia-ui-session.js.map +1 -1
  482. package/lib/vertesia-ui-widgets.js +1 -1
  483. package/lib/vertesia-ui-widgets.js.map +1 -1
  484. package/package.json +14 -6
  485. package/src/core/components/FormItem.tsx +35 -0
  486. package/src/core/components/InputList.tsx +4 -3
  487. package/src/core/components/index.ts +3 -3
  488. package/src/core/components/shadcn/button.tsx +68 -8
  489. package/src/core/components/shadcn/calendar.tsx +9 -65
  490. package/src/core/components/shadcn/dialog.tsx +3 -3
  491. package/src/core/components/shadcn/filters/DynamicLabel.tsx +45 -0
  492. package/src/core/components/shadcn/filters/comboBox.tsx +57 -52
  493. package/src/core/components/shadcn/filters/dateFilter.tsx +46 -29
  494. package/src/core/components/shadcn/filters/filterBar.tsx +53 -47
  495. package/src/core/components/shadcn/filters/filters.tsx +43 -30
  496. package/src/core/components/shadcn/filters/selectFilter.tsx +53 -34
  497. package/src/core/components/shadcn/filters/textFilter.tsx +6 -3
  498. package/src/core/components/shadcn/filters/types.ts +8 -1
  499. package/src/core/components/shadcn/input.tsx +5 -5
  500. package/src/core/components/shadcn/selectBox.tsx +138 -33
  501. package/src/core/components/styles.ts +1 -1
  502. package/src/core/components/table/index.tsx +8 -0
  503. package/src/core/index.ts +2 -1
  504. package/src/core/utils/cn.ts +6 -0
  505. package/src/core/utils/index.ts +1 -0
  506. package/src/features/agent/PayloadBuilder.tsx +208 -0
  507. package/src/features/agent/chat/AnimatedThinkingDots.tsx +350 -0
  508. package/src/features/agent/chat/JumpingDots.tsx +16 -0
  509. package/src/features/agent/chat/ModernAgentConversation.tsx +708 -0
  510. package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +246 -0
  511. package/src/features/agent/chat/ModernAgentOutput/Header.tsx +231 -0
  512. package/src/features/agent/chat/ModernAgentOutput/InlineSlideInPanel.tsx +66 -0
  513. package/src/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.tsx +282 -0
  514. package/src/features/agent/chat/ModernAgentOutput/MessageInput.tsx +125 -0
  515. package/src/features/agent/chat/ModernAgentOutput/MessageItem.tsx +562 -0
  516. package/src/features/agent/chat/ModernAgentOutput/MessagesContainer.tsx +51 -0
  517. package/src/features/agent/chat/ModernAgentOutput/PlanPanel.tsx +123 -0
  518. package/src/features/agent/chat/ModernAgentOutput/README-image-support.md +43 -0
  519. package/src/features/agent/chat/ModernAgentOutput/SlideInPanel.tsx +72 -0
  520. package/src/features/agent/chat/ModernAgentOutput/SlidingMessages.tsx +96 -0
  521. package/src/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.tsx +185 -0
  522. package/src/features/agent/chat/ModernAgentOutput/StackedMessages.tsx +33 -0
  523. package/src/features/agent/chat/ModernAgentOutput/WorkstreamTabs.tsx +167 -0
  524. package/src/features/agent/chat/ModernAgentOutput/utils.ts +195 -0
  525. package/src/features/agent/chat/ModernAgentOutput/with-types.d.ts +15 -0
  526. package/src/features/agent/chat/SlidingThinkingIndicator.tsx +459 -0
  527. package/src/features/agent/chat/WaitingMessages.ts +66 -0
  528. package/src/features/agent/chat/index.ts +4 -0
  529. package/src/features/agent/index.ts +2 -0
  530. package/src/features/errors/PanelErrorBoundary.tsx +30 -0
  531. package/src/features/errors/RowErrorBoundary.tsx +28 -0
  532. package/src/features/errors/VertesiaErrorBoundary.tsx +28 -0
  533. package/src/features/errors/WidgetErrorBoundary.tsx +27 -0
  534. package/src/features/errors/index.ts +4 -0
  535. package/src/features/facets/EnvironmentFacet.tsx +53 -0
  536. package/src/features/facets/FacetsNav.tsx +19 -0
  537. package/src/features/facets/InteractionFacet.tsx +53 -0
  538. package/src/features/facets/StringFacet.tsx +23 -0
  539. package/src/features/facets/StringListFacet.tsx +22 -0
  540. package/src/features/facets/TypeFacet.tsx +59 -0
  541. package/src/features/facets/TypeOptions.tsx +22 -0
  542. package/src/features/facets/UserFacet.tsx +61 -0
  543. package/src/features/facets/VFacetsNav.tsx +139 -0
  544. package/src/features/facets/VStringFacet.tsx +34 -0
  545. package/src/features/facets/VTypeFacet.tsx +72 -0
  546. package/src/features/facets/VUserFacet.tsx +47 -0
  547. package/src/features/facets/index.ts +11 -0
  548. package/src/features/facets/utils.tsx +9 -0
  549. package/src/features/index.ts +9 -1
  550. package/src/features/layout/GenericPageNavHeader.tsx +48 -0
  551. package/src/features/layout/NotFoundView.tsx +11 -0
  552. package/src/features/layout/index.ts +2 -0
  553. package/src/features/magic-pdf/DownloadPopover.tsx +32 -0
  554. package/src/features/magic-pdf/MagicPdfView.tsx +102 -0
  555. package/src/features/magic-pdf/PageSlider.tsx +112 -0
  556. package/src/features/magic-pdf/PdfPageProvider.tsx +229 -0
  557. package/src/features/magic-pdf/TextPageView.tsx +65 -0
  558. package/src/features/magic-pdf/index.ts +1 -0
  559. package/src/features/magic-pdf/types.ts +1 -0
  560. package/src/features/magic-pdf/useResizeOnDrag.ts +42 -0
  561. package/src/features/store/collections/BrowseCollectionView.tsx +45 -0
  562. package/src/features/store/collections/CollectionView.tsx +94 -0
  563. package/src/features/store/collections/CollectionsTable.tsx +115 -0
  564. package/src/features/store/collections/CollectionsView.tsx +166 -0
  565. package/src/features/store/collections/EditCollectionView.tsx +253 -0
  566. package/src/features/store/collections/index.ts +5 -0
  567. package/src/features/store/index.ts +3 -0
  568. package/src/features/store/objects/DocumentPreviewPanel.tsx +417 -0
  569. package/src/features/store/objects/DocumentSearchResults.tsx +209 -0
  570. package/src/features/store/objects/DocumentSelectionProvider.tsx +99 -0
  571. package/src/features/store/objects/DocumentTable.tsx +409 -0
  572. package/src/features/store/objects/ExportPropertiesModal.tsx +89 -0
  573. package/src/features/store/objects/components/ContentDispositionButton.tsx +45 -0
  574. package/src/features/store/objects/components/ContentOverview.tsx +466 -0
  575. package/src/features/store/objects/components/DocumentIcon.tsx +87 -0
  576. package/src/features/store/objects/components/DocumentInput.tsx +90 -0
  577. package/src/features/store/objects/components/PropertiesEditorModal.tsx +253 -0
  578. package/src/features/store/objects/components/SaveVersionConfirmModal.tsx +136 -0
  579. package/src/features/store/objects/components/SelectDocument.tsx +69 -0
  580. package/src/features/store/objects/components/SelectDocumentModal.tsx +20 -0
  581. package/src/features/store/objects/components/VectorSearchWidget.tsx +115 -0
  582. package/src/features/store/objects/components/index.ts +9 -0
  583. package/src/features/store/objects/components/useDownloadObject.ts +24 -0
  584. package/src/features/store/objects/index.ts +10 -0
  585. package/src/features/store/objects/layout/DocumentTableColumn.tsx +84 -0
  586. package/src/features/store/objects/layout/documentLayout.tsx +69 -0
  587. package/src/features/store/objects/layout/index.ts +2 -0
  588. package/src/features/store/objects/layout/knowledge.md +238 -0
  589. package/src/features/store/objects/layout/renderers.tsx +139 -0
  590. package/src/features/store/objects/search/DocumentSearchContext.ts +181 -0
  591. package/src/features/store/objects/search/DocumentSearchProvider.tsx +54 -0
  592. package/src/features/store/objects/search/index.ts +2 -0
  593. package/src/features/store/objects/selection/ObjectsActionContext.tsx +196 -0
  594. package/src/features/store/objects/selection/ObjectsActionSpec.ts +31 -0
  595. package/src/features/store/objects/selection/SelectionActions.tsx +160 -0
  596. package/src/features/store/objects/selection/actions/AddToCollectionAction.tsx +114 -0
  597. package/src/features/store/objects/selection/actions/ChangeTypeAction.tsx +76 -0
  598. package/src/features/store/objects/selection/actions/ConfirmAction.tsx +46 -0
  599. package/src/features/store/objects/selection/actions/DeleteObjectsAction.tsx +77 -0
  600. package/src/features/store/objects/selection/actions/ExportPropertiesAction.tsx +117 -0
  601. package/src/features/store/objects/selection/actions/RemoveFromCollectionAction.tsx +77 -0
  602. package/src/features/store/objects/selection/actions/StartWorkflowComponent.tsx +122 -0
  603. package/src/features/store/objects/selection/actions/index.ts +7 -0
  604. package/src/features/store/objects/selection/index.ts +4 -0
  605. package/src/features/store/objects/upload/DocumentUploadModal.tsx +970 -0
  606. package/src/features/store/objects/upload/index.ts +3 -0
  607. package/src/features/store/objects/upload/useSmartFileUploadProcessing.ts +250 -0
  608. package/src/features/store/objects/upload/useUploadHandler.ts +325 -0
  609. package/src/features/store/types/ContentObjectTypeView.tsx +244 -0
  610. package/src/features/store/types/ContentObjectTypesSearch.tsx +111 -0
  611. package/src/features/store/types/ContentObjectTypesTable.tsx +38 -0
  612. package/src/features/store/types/ContentObjectTypesView.tsx +71 -0
  613. package/src/features/store/types/CreateOrUpdateTypeModal.tsx +70 -0
  614. package/src/features/store/types/ObjectSchemaEditor.tsx +127 -0
  615. package/src/features/store/types/SelectContentType.tsx +88 -0
  616. package/src/features/store/types/SelectContentTypeModal.tsx +142 -0
  617. package/src/features/store/types/TableLayoutEditor.tsx +104 -0
  618. package/src/features/store/types/index.ts +10 -0
  619. package/src/features/store/types/search/ObjectTypeSearchContext.tsx +119 -0
  620. package/src/features/store/types/search/ObjectTypeSearchProvider.tsx +24 -0
  621. package/src/features/store/types/search/index.ts +2 -0
  622. package/src/features/user/UserAvatar.tsx +34 -0
  623. package/src/features/user/UserInfo.tsx +215 -0
  624. package/src/features/user/index.ts +2 -0
  625. package/src/features/utils/index.ts +3 -0
  626. package/src/features/utils/mimeType.ts +9 -0
  627. package/src/features/utils/rendition.ts +75 -0
  628. package/src/features/utils/text.ts +10 -0
  629. package/src/layout/FullHeightLayout.tsx +1 -1
  630. package/src/layout/Sidebar.tsx +12 -2
  631. package/src/widgets/Progress.tsx +10 -0
  632. package/src/widgets/codemirror/CodeMirrorEditor.tsx +1 -1
  633. package/src/widgets/form/Form.tsx +2 -2
  634. package/src/widgets/form/schema.ts +14 -7
  635. package/src/widgets/index.ts +5 -1
  636. package/src/widgets/popover/Popover.tsx +171 -0
  637. package/src/widgets/popover/context.ts +15 -0
  638. package/src/widgets/popover/index.ts +2 -0
  639. package/src/widgets/popover/slots.ts +24 -0
  640. package/src/widgets/properties/PropertiesView.tsx +26 -0
  641. package/src/widgets/properties/index.ts +1 -0
  642. package/src/widgets/schema-editor/JSONSchemaEditorModal.tsx +1 -2
  643. package/src/widgets/schema-editor/editor/Editable.tsx +12 -13
  644. package/src/widgets/schema-editor/editor/PropertyViewer.tsx +1 -1
  645. package/src/widgets/schema-editor/editor/SchemaEditor.tsx +4 -4
  646. package/src/widgets/upload/DropZone.tsx +257 -0
  647. package/src/widgets/upload/UploadResultCategory.tsx +81 -0
  648. package/src/widgets/upload/UploadSummary.tsx +116 -0
  649. package/src/widgets/upload/index.ts +3 -0
  650. package/lib/esm/code/index.js +0 -3
  651. package/lib/esm/code/index.js.map +0 -1
  652. package/lib/esm/core/components/Input.js +0 -16
  653. package/lib/esm/core/components/Input.js.map +0 -1
  654. package/lib/esm/form/index.js +0 -3
  655. package/lib/esm/form/index.js.map +0 -1
  656. package/lib/types/code/index.d.ts +0 -0
  657. package/lib/types/core/components/Input.d.ts +0 -8
  658. package/lib/types/form/index.d.ts +0 -0
  659. package/lib/vertesia-ui-code.js +0 -2
  660. package/lib/vertesia-ui-code.js.map +0 -1
  661. package/lib/vertesia-ui-form.js +0 -2
  662. package/lib/vertesia-ui-form.js.map +0 -1
  663. package/src/code/index.ts +0 -1
  664. package/src/core/components/Input.tsx +0 -43
  665. package/src/form/index.ts +0 -1
@@ -0,0 +1,52 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import clsx from 'clsx';
3
+ import { useEffect, useState } from 'react';
4
+ import { useUserSession } from '@vertesia/ui/session';
5
+ import { ChevronsUpDown, X } from 'lucide-react';
6
+ import { Button, Styles } from '@vertesia/ui/core';
7
+ import { useFlag } from '@vertesia/ui/core';
8
+ import { SelectDocumentModal } from './SelectDocumentModal';
9
+ const STORE_REGEX = /store:([a-f0-9]+)/;
10
+ export function DocumentInput({ object }) {
11
+ const { client } = useUserSession();
12
+ const { off, on, isOn } = useFlag();
13
+ const [actualValue, setValue] = useState(object.value != null ? String(object.value) : '');
14
+ const [doc, setDoc] = useState(undefined);
15
+ const _onChange = (event) => {
16
+ const value = event.target.value;
17
+ setValue(value);
18
+ object.value = value;
19
+ };
20
+ const clearValue = () => {
21
+ setValue('');
22
+ object.value = '';
23
+ setDoc(undefined);
24
+ };
25
+ const onSelect = (value) => {
26
+ if (value) {
27
+ const uri = "store:" + value.id;
28
+ setValue(uri);
29
+ setDoc(value || undefined);
30
+ object.value = uri;
31
+ }
32
+ off();
33
+ };
34
+ useEffect(() => {
35
+ if (!actualValue || doc) {
36
+ return;
37
+ }
38
+ const match = actualValue.match(STORE_REGEX);
39
+ if (!match) {
40
+ return;
41
+ }
42
+ client.objects.get(match[1]).then((doc) => {
43
+ setDoc(doc);
44
+ }).catch(() => {
45
+ clearValue();
46
+ });
47
+ }, [actualValue]);
48
+ return (_jsxs("div", { children: [_jsxs("div", { className: "relative", children: [_jsx("input", { value: actualValue, onChange: _onChange, className: clsx(Styles.INPUT, "pr-10 w-full") }), doc &&
49
+ _jsx("div", { className: "absolute inset-y-0 right-10 flex items-center justify-center ", children: _jsx(Button, { onClick: clearValue, variant: 'unstyled', className: 'hover:text-red-500 hover:bg-gray-100 dark:hover:bg-gray-600', children: _jsx(X, { className: "size-5" }) }) }), _jsx("div", { className: "absolute inset-y-0 right-0 flex items-center justify-center", children: _jsx(Button, { onClick: on, variant: 'unstyled', className: 'hover:bg-gray-100 dark:hover:bg-gray-600', children: _jsx(ChevronsUpDown, { className: "size-5" }) }) }), _jsx(SelectDocumentModal, { value: actualValue, isOpen: isOn, onClose: onSelect })] }), doc &&
50
+ _jsx("div", { className: "p-1 semibold text-sm text-gray-600 dark:text-slate-300", children: doc.properties?.title || doc.name })] }));
51
+ }
52
+ //# sourceMappingURL=DocumentInput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DocumentInput.js","sourceRoot":"","sources":["../../../../../../src/features/store/objects/components/DocumentInput.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAe,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAE,cAAc,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAG5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,WAAW,GAAG,mBAAmB,CAAC;AAMxC,MAAM,UAAU,aAAa,CAAC,EAAE,MAAM,EAAsB;IACxD,MAAM,EAAE,MAAM,EAAE,GAAG,cAAc,EAAE,CAAC;IAEpC,MAAM,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC;IACpC,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAC3F,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,QAAQ,CAAgC,SAAS,CAAC,CAAA;IAExE,MAAM,SAAS,GAAG,CAAC,KAAoC,EAAE,EAAE;QACvD,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;QACjC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAChB,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC;IACzB,CAAC,CAAC;IAEF,MAAM,UAAU,G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AAO,EAAE,UAAU,EAAE,OAAO,EAAC,UAAU,EAAC,SAAS,EAAC,6DAA6D,YACnH,KAAC,CAAC,IAAC,SAAS,EAAC,QAAQ,GAAG,GACnB,GACP,EAEV,cAAK,SAAS,EAAC,6DAA6D,YACxE,KAAC,MAAM,IAAC,OAAO,EAAE,EAAE,EAAE,OAAO,EAAC,UAAU,EAAC,SAAS,EAAC,0CAA0C,YACxF,KAAC,cAAc,IAAC,SAAS,EAAC,QAAQ,GAAG,GAChC,GACP,EACN,KAAC,mBAAmB,IAAC,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,GAAI,IAC1E,EACL,GAAG;gBACA,cAAK,SAAS,EAAC,wDAAwD,YAClE,GAAG,CAAC,UAAU,EAAE,KAAK,IAAI,GAAG,CAAC,IAAI,GAChC,IAER,CACT,CAAA;AACL,CAAC"}
@@ -0,0 +1,169 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useUserSession } from '@vertesia/ui/session';
3
+ import { useState, useRef, useEffect } from 'react';
4
+ import { Button, Modal, ModalBody, ModalFooter, ModalTitle, useToast } from '@vertesia/ui/core';
5
+ import { useNavigate } from "@vertesia/ui/router";
6
+ // Import Monaco Editor
7
+ import Editor from '@monaco-editor/react';
8
+ // Import SaveVersionConfirmModal
9
+ import { SaveVersionConfirmModal } from './SaveVersionConfirmModal';
10
+ export function PropertiesEditorModal({ isOpen, onClose, object }) {
11
+ const { client, store } = useUserSession();
12
+ const toast = useToast();
13
+ const navigate = useNavigate();
14
+ const [isLoading, setIsLoading] = useState(false);
15
+ const [propertiesJson, setPropertiesJson] = useState('');
16
+ const [showConfirmation, setShowConfirmation] = useState(false);
17
+ const [parsedProperties, setParsedProperties] = useState(null);
18
+ const editorRef = useRef(null);
19
+ const monacoRef = useRef(null);
20
+ const [jsonSchema, setJsonSchema] = useState(null);
21
+ //TODO state not used
22
+ const [_newVersionId, setNewVersionId] = useState(null);
23
+ // Initialize editor content when modal opens
24
+ useEffect(() => {
25
+ if (isOpen) {
26
+ setPropertiesJson(JSON.stringify(object.properties || {}, null, 2));
27
+ // Try to fetch JSON schema if object has a type
28
+ if (object.type?.id) {
29
+ fetchJsonSchema(object.type.id);
30
+ }
31
+ }
32
+ }, [isOpen, object]);
33
+ // Handle editor mounting
34
+ function handleEditorDidMount(editor, monaco) {
35
+ editorRef.current = editor;
36
+ monacoRef.current = monaco;
37
+ // Apply JSON schema validation if available
38
+ if (jsonSchema) {
39
+ setMonacoJsonSchema(monaco, jsonSchema);
40
+ }
41
+ }
42
+ // Fetch JSON schema for the object type
43
+ async function fetchJsonSchema(typeId) {
44
+ try {
45
+ const typeDetails = await store.types.retrieve(typeId);
46
+ if (typeDetails.object_schema) {
47
+ setJsonSchema(typeDetails.object_schema);
48
+ // Apply schema if Monaco is already mounted
49
+ if (monacoRef.current) {
50
+ setMonacoJsonSchema(monacoRef.current, typeDetails.object_schema);
51
+ }
52
+ }
53
+ }
54
+ catch (error) {
55
+ console.error('Failed to fetch JSON schema:', error);
56
+ }
57
+ }
58
+ // Configure Monaco editor with JSON schema
59
+ function setMonacoJsonSchema(monaco, schema) {
60
+ monaco.languages.json.jsonDefaults.setDiagnosticsOptions({
61
+ validate: true,
62
+ schemas: [
63
+ {
64
+ uri: 'http://myserver/object-schema.json',
65
+ fileMatch: ['*'],
66
+ schema
67
+ }
68
+ ]
69
+ });
70
+ }
71
+ // Validate JSON and open confirmation modal
72
+ function handleSave() {
73
+ if (!editorRef.current)
74
+ return;
75
+ const editorValue = editorRef.current.getValue();
76
+ try {
77
+ const properties = JSON.parse(editorValue);
78
+ setParsedProperties(properties);
79
+ setShowConfirmation(true);
80
+ }
81
+ catch (err) {
82
+ toast({
83
+ status: 'error',
84
+ title: 'Invalid JSON',
85
+ description: 'Please fix the JSON syntax errors before saving.',
86
+ duration: 5000
87
+ });
88
+ }
89
+ }
90
+ // Save properties
91
+ async function saveProperties(createVersion, versionLabel) {
92
+ try {
93
+ setIsLoading(true);
94
+ const properties = parsedProperties || JSON.parse(propertiesJson);
95
+ if (createVersion) {
96
+ // Create a new version with the updated properties
97
+ const response = await client.objects.update(object.id, {
98
+ properties: properties
99
+ }, {
100
+ createRevision: true,
101
+ revisionLabel: versionLabel
102
+ });
103
+ // Store the new version ID for navigation
104
+ if (response.id !== object.id) {
105
+ setNewVersionId(response.id);
106
+ }
107
+ toast({
108
+ status: 'success',
109
+ title: 'New version created',
110
+ description: 'A new version with updated properties has been created.',
111
+ duration: 2000
112
+ });
113
+ // Close modals
114
+ setShowConfirmation(false);
115
+ onClose();
116
+ // Navigate to the new version
117
+ if (response.id !== object.id) {
118
+ // Delay slightly to allow modal closing to complete
119
+ setTimeout(() => {
120
+ navigate(`/objects/${response.id}`);
121
+ toast({
122
+ status: 'info',
123
+ title: 'Viewing New Version',
124
+ description: versionLabel ? `Now viewing version '${versionLabel}'` : 'Now viewing the new version',
125
+ duration: 3000
126
+ });
127
+ }, 100);
128
+ }
129
+ }
130
+ else {
131
+ // Update the object properties in place
132
+ await store.objects.update(object.id, {
133
+ properties: properties
134
+ });
135
+ toast({
136
+ status: 'success',
137
+ title: 'Properties updated',
138
+ description: 'The object properties have been updated successfully.',
139
+ duration: 2000
140
+ });
141
+ // Close modals
142
+ setShowConfirmation(false);
143
+ onClose();
144
+ }
145
+ }
146
+ catch (error) {
147
+ toast({
148
+ status: 'error',
149
+ title: 'Error updating properties',
150
+ description: error.message || 'An error occurred while updating the properties.',
151
+ duration: 5000
152
+ });
153
+ setIsLoading(false);
154
+ }
155
+ }
156
+ // Handle closing the confirmation modal without saving
157
+ function handleCancelConfirmation() {
158
+ setShowConfirmation(false);
159
+ }
160
+ return (_jsxs(_Fragment, { children: [_jsxs(Modal, { isOpen: isOpen, onClose: onClose, className: "sm:max-w-[90%] md:max-w-[80%] lg:max-w-[75%] xl:max-w-[70%]", children: [_jsx(ModalTitle, { children: "Edit Properties" }), _jsxs(ModalBody, { children: [_jsxs("div", { className: "mb-2 text-sm text-gray-500", children: [object.type?.name ? (_jsxs("span", { children: ["Editing properties for object type: ", _jsx("strong", { children: object.type.name })] })) : (_jsx("span", { children: "Editing properties for generic document" })), jsonSchema && (_jsx("span", { className: "ml-2 text-green-600", children: "(JSON schema validation enabled)" }))] }), _jsx("div", { className: "h-[75vh] border border-gray-300 dark:border-gray-700 rounded-md", children: _jsx(Editor, { height: "100%", language: "json", value: propertiesJson, onChange: (value) => setPropertiesJson(value || ''), onMount: handleEditorDidMount, options: {
161
+ minimap: { enabled: false },
162
+ scrollBeyondLastLine: false,
163
+ formatOnPaste: true,
164
+ formatOnType: true,
165
+ automaticLayout: true,
166
+ wordWrap: 'on'
167
+ } }) })] }), _jsxs(ModalFooter, { children: [_jsx(Button, { variant: "secondary", onClick: onClose, children: "Cancel" }), _jsx(Button, { variant: "primary", onClick: handleSave, children: "Save Changes" })] })] }), _jsx(SaveVersionConfirmModal, { isOpen: showConfirmation, onClose: handleCancelConfirmation, onConfirm: saveProperties, isLoading: isLoading })] }));
168
+ }
169
+ //# sourceMappingURL=PropertiesEditorModal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PropertiesEditorModal.js","sourceRoot":"","sources":["../../../../../../src/features/store/objects/components/PropertiesEditorModal.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EACH,MAAM,EACN,KAAK,EACL,SAAS,EACT,WAAW,EACX,UAAU,EACV,QAAQ,EACX,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,uBAAuB;AACvB,OAAO,MAAkB,MAAM,sBAAsB,CAAC;AAGtD,iCAAiC;AACjC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAQpE,MAA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,EAAE,OAAO,EAChB,SAAS,EAAC,6DAA6D,aAEvE,KAAC,UAAU,kCAA6B,EACxC,MAAC,SAAS,eACN,eAAK,SAAS,EAAC,4BAA4B,aACtC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CACjB,mEAA0C,2BAAS,MAAM,CAAC,IAAI,CAAC,IAAI,GAAU,IAAO,CACvF,CAAC,CAAC,CAAC,CACA,qEAAoD,CACvD,EACA,UAAU,IAAI,CACX,eAAM,SAAS,EAAC,qBAAqB,iDAAwC,CAChF,IACC,EACN,cAAK,SAAS,EAAC,iEAAiE,YAC5E,KAAC,MAAM,IACH,MAAM,EAAC,MAAM,EACb,QAAQ,EAAC,MAAM,EACf,KAAK,EAAE,cAAc,EACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,iBAAiB,CAAC,KAAK,IAAI,EAAE,CAAC,EACnD,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE;wCACL,OAAO,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE;wCAC3B,oBAAoB,EAAE,KAAK;wCAC3B,aAAa,EAAE,IAAI;wCACnB,YAAY,EAAE,IAAI;wCAClB,eAAe,EAAE,IAAI;wCACrB,QAAQ,EAAE,IAAI;qCACjB,GACH,GACA,IACE,EACZ,MAAC,WAAW,eACR,KAAC,MAAM,IAAC,OAAO,EAAC,WAAW,EAAC,OAAO,EAAE,OAAO,uBAEnC,EACT,KAAC,MAAM,IACH,OAAO,EAAC,SAAS,EACjB,OAAO,EAAE,UAAU,6BAGd,IACC,IACV,EAGR,KAAC,uBAAuB,IACpB,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,wBAAwB,EACjC,SAAS,EAAE,cAAc,EACzB,SAAS,EAAE,SAAS,GACtB,IACH,CACN,CAAC;AACN,CAAC"}
@@ -0,0 +1,45 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from 'react';
3
+ import { Button, Modal, ModalBody, ModalFooter, ModalTitle, Input, RadioGroup, RadioOptionAdapter } from '@vertesia/ui/core';
4
+ import { FormItem } from '@vertesia/ui/core';
5
+ class SaveOptionAdapter extends RadioOptionAdapter {
6
+ labelOf(item) {
7
+ return item.label;
8
+ }
9
+ idOf(item) {
10
+ return item.id;
11
+ }
12
+ renderOption(item) {
13
+ return (_jsxs("div", { children: [_jsx("div", { className: "font-medium", children: item.label }), _jsx("p", { className: "text-sm text-gray-500 dark:text-gray-400 mt-1", children: item.description })] }));
14
+ }
15
+ }
16
+ export function SaveVersionConfirmModal({ isOpen, onClose, onConfirm, isLoading, uploadedFileName }) {
17
+ const saveOptions = [
18
+ {
19
+ id: "update",
20
+ label: "Update current version",
21
+ description: uploadedFileName
22
+ ? "Replace the content file and modify properties directly in the current revision."
23
+ : "Modify the properties directly in the current revision."
24
+ },
25
+ {
26
+ id: "new-version",
27
+ label: "Create new version",
28
+ description: uploadedFileName
29
+ ? "Create a new revision with the replacement file while preserving the original."
30
+ : "Create a new revision with these property changes while preserving the original."
31
+ }
32
+ ];
33
+ const [selectedOption, setSelectedOption] = useState(saveOptions[0]);
34
+ const [versionLabel, setVersionLabel] = useState('');
35
+ const optionAdapter = new SaveOptionAdapter();
36
+ const createVersion = selectedOption?.id === "new-version";
37
+ const handleOptionChange = (option) => {
38
+ setSelectedOption(option);
39
+ };
40
+ const handleConfirm = async () => {
41
+ await onConfirm(createVersion, createVersion ? versionLabel : undefined);
42
+ };
43
+ return (_jsxs(Modal, { isOpen: isOpen, onClose: onClose, className: "sm:max-w-md", children: [_jsx(ModalTitle, { children: "Save Changes" }), _jsx(ModalBody, { children: _jsxs("div", { className: "space-y-4", children: [uploadedFileName && (_jsx("div", { className: "mb-4 p-3 bg-blue-50 dark:bg-blue-900/20 rounded-md", children: _jsxs("p", { className: "text-sm text-blue-700 dark:text-blue-300 font-medium", children: ["You're about to replace the content file with: ", _jsx("span", { className: "font-bold", children: uploadedFileName })] }) })), _jsx("p", { className: "text-sm text-mixer-muted/5", children: "How would you like to save these changes?" }), _jsx(RadioGroup, { adapter: optionAdapter, options: saveOptions, value: selectedOption, onChange: handleOptionChange, gap: "gap-4" }), createVersion && (_jsx(FormItem, { label: "Version Label (Optional)", description: "Optional label for the new version.", className: "mt-3 pl-8", children: _jsx(Input, { value: versionLabel, onChange: setVersionLabel, placeholder: "e.g., v1.2, approved, post-review", className: "w-full" }) }))] }) }), _jsxs(ModalFooter, { children: [_jsx(Button, { variant: "secondary", onClick: onClose, disabled: isLoading, children: "Cancel" }), _jsx(Button, { variant: "primary", onClick: handleConfirm, isLoading: isLoading, children: "Save" })] })] }));
44
+ }
45
+ //# sourceMappingURL=SaveVersionConfirmModal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SaveVersionConfirmModal.js","sourceRoot":"","sources":["../../../../../../src/features/store/objects/components/SaveVersionConfirmModal.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EACH,MAAM,EACN,KAAK,EACL,SAAS,EACT,WAAW,EACX,UAAU,EACV,KAAK,EACL,UAAU,EACV,kBAAkB,EACrB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAiB7C,MAAM,iBAAkB,SAAQ,kBAAkC;IAC9D,OAAO,CAAC,IAAoB;QACxB,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAED,IAAI,CAAC,IAAoB;QACrB,OAAO,IAAI,CAAC,EAAE,CAAC;IACnB,CAAC;IAED,YAAY,CAAC,IAAoB;QAC7B,OAAO,CACH,0BACI,cAAK,SAAS,EAAC,aAAa,YAAE,IAAI,CAAC,KAAK,GAAO,EAC/C,YAAG,SAAS,EAAC,+CAA+C,YACvD,IAAI,CAAC,WAAW,GACjB,IACF,CACT,CAAC;IACN,CAAC;CACJ;AAED,MAAM,UAAU,uBAAuB,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE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AE,gBAAgB,GAAQ,IACzG,GACF,CACT,EACD,YAAG,SAAS,EAAC,4BAA4B,0DAErC,EAEJ,KAAC,UAAU,IACP,OAAO,EAAE,aAAa,EACtB,OAAO,EAAE,WAAW,EACpB,KAAK,EAAE,cAAc,EACrB,QAAQ,EAAE,kBAAkB,EAC5B,GAAG,EAAC,OAAO,GACb,EAED,aAAa,IAAI,CACd,KAAC,QAAQ,IACL,KAAK,EAAC,0BAA0B,EAChC,WAAW,EAAC,qCAAqC,EACjD,SAAS,EAAC,WAAW,YAErB,KAAC,KAAK,IACF,KAAK,EAAE,YAAY,EACnB,QAAQ,EAAE,eAAe,EACzB,WAAW,EAAC,mCAAmC,EAC/C,SAAS,EAAC,QAAQ,GACpB,GACK,CACd,IACC,GACE,EACZ,MAAC,WAAW,eACR,KAAC,MAAM,IAAC,OAAO,EAAC,WAAW,EAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,uBAExD,EACT,KAAC,MAAM,IACH,OAAO,EAAC,SAAS,EACjB,OAAO,EAAE,aAAa,EACtB,SAAS,EAAE,SAAS,qBAGf,IACC,IACV,CACX,CAAC;AACN,CAAC"}
@@ -0,0 +1,39 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { ErrorBox, Spinner, useIntersectionObserver } from "@vertesia/ui/core";
3
+ import { useEffect, useRef, useState } from "react";
4
+ import { VFacetsNav } from "../../../facets";
5
+ import { DocumentTable } from "../DocumentTable";
6
+ import { useDocumentSearch, useWatchDocumentSearchFacets, useWatchDocumentSearchResult } from "../search/DocumentSearchContext";
7
+ import { DocumentSearchProvider } from "../search/DocumentSearchProvider";
8
+ import { ContentDispositionButton } from "./ContentDispositionButton";
9
+ const layout = [
10
+ { "name": "Name", "field": "properties.title", "type": "string", "fallback": "name" },
11
+ { "name": "Type", "field": "type.name", "type": "string" },
12
+ { "name": "Status", "field": "status", "type": "string" },
13
+ { "name": "Created At", "field": "created_at", "type": "date" }
14
+ ];
15
+ export function SelectDocument({ onChange }) {
16
+ const onRowClick = (selected) => {
17
+ onChange(selected || undefined);
18
+ };
19
+ return (_jsx(DocumentSearchProvider, { children: _jsx(SelectDocumentImpl, { onRowClick: onRowClick }) }));
20
+ }
21
+ function SelectDocumentImpl({ onRowClick }) {
22
+ const [isReady, setIsReady] = useState(false);
23
+ const [isGridView, setIsGridView] = useState(localStorage.getItem('lastDisplayedView') === 'grid');
24
+ const { search, isLoading, error, objects } = useWatchDocumentSearchResult();
25
+ const loadMoreRef = useRef(null);
26
+ useIntersectionObserver(loadMoreRef, () => {
27
+ isReady && search.loadMore(true);
28
+ }, { deps: [isReady] });
29
+ useEffect(() => {
30
+ search.search().then(() => setIsReady(true));
31
+ }, []);
32
+ const facets = useWatchDocumentSearchFacets();
33
+ const facetSearch = useDocumentSearch();
34
+ if (error) {
35
+ return _jsx(ErrorBox, { title: "Search failed", children: error.message });
36
+ }
37
+ return (_jsxs("div", { children: [_jsxs("div", { className: "flex justify-between items-center mb-4", children: [_jsx(VFacetsNav, { facets: facets, search: facetSearch, textSearch: "Filter content" }), _jsx(ContentDispositionButton, { onUpdate: setIsGridView })] }), _jsx(DocumentTable, { objects: objects || [], isLoading: false, layout: layout, onRowClick: onRowClick, isGridView: isGridView }), _jsx("div", { ref: loadMoreRef, className: 'mt-10' }), isLoading && _jsx("div", { className: 'flex justify-center', children: _jsx(Spinner, { size: 'xl' }) })] }));
38
+ }
39
+ //# sourceMappingURL=SelectDocument.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectDocument.js","sourceRoot":"","sources":["../../../../../../src/features/store/objects/components/SelectDocument.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;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@@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Modal, ModalBody, ModalTitle } from "@vertesia/ui/core";
3
+ import { SelectDocument } from "./SelectDocument";
4
+ export function SelectDocumentModal({ isOpen, onClose }) {
5
+ return (_jsxs(Modal, { onClose: () => onClose(), isOpen: !!isOpen, className: 'min-w-[60vw]', children: [_jsx(ModalTitle, { children: "Select Content" }), _jsx(ModalBody, { className: 'p-4 pt-0 overflow-y-auto max-h-[80vh] min-h-[80vh]', children: isOpen && _jsx(SelectDocument, { onChange: onClose }) })] }));
6
+ }
7
+ //# sourceMappingURL=SelectDocumentModal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectDocumentModal.js","sourceRoot":"","sources":["../../../../../../src/features/store/objects/components/SelectDocumentModal.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAQlD,MAAM,UAAU,mBAAmB,CAAC,EAAE,MAAM,EAAE,OAAO,EAA4B;IAC7E,OAAO,CACH,MAAC,KAAK,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,SAAS,EAAC,cAAc,aACvE,KAAC,UAAU,iCAA4B,EACvC,KAAC,SAAS,IAAC,SAAS,EAAC,oDAAoD,YACpE,MAAM,IAAI,KAAC,cAAc,IAAC,QAAQ,EAAE,OAAO,GAAI,GACxC,IACR,CACX,CAAA;AACL,CAAC"}
@@ -0,0 +1,85 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useState } from 'react';
3
+ import { SupportedEmbeddingTypes } from '@vertesia/common';
4
+ import { Button, Input, useToast } from '@vertesia/ui/core';
5
+ import { useUserSession } from '@vertesia/ui/session';
6
+ export function VectorSearchWidget({ onChange, isLoading, refresh }) {
7
+ const { client, project } = useUserSession();
8
+ const toast = useToast();
9
+ const [searchText, setSearchText] = useState(undefined);
10
+ const [searchSketch, setSearchSketch] = useState(undefined);
11
+ const [config, setConfig] = useState(undefined);
12
+ const isReady = !!project && (!!config?.embeddings.text || !!config?.embeddings.image);
13
+ const [status, setStatus] = useState(undefined);
14
+ useEffect(() => {
15
+ setSearchText(undefined);
16
+ setSearchSketch(undefined);
17
+ setStatus(undefined);
18
+ }, [refresh]);
19
+ useEffect(() => {
20
+ if (!project) {
21
+ return;
22
+ }
23
+ client.projects.retrieve(project.id).then((project) => {
24
+ setConfig(project.configuration);
25
+ });
26
+ }, [project]);
27
+ useEffect(() => {
28
+ if (status) {
29
+ toast({ title: status, status: 'success', duration: 2000 });
30
+ }
31
+ }, [status]);
32
+ useEffect(() => {
33
+ if (!searchText || searchText.length === 0) {
34
+ onChange(undefined);
35
+ }
36
+ }, [searchText]);
37
+ const generateTextEmbeddings = async () => {
38
+ if (!isReady || !searchText || !config?.embeddings.text) {
39
+ return;
40
+ }
41
+ setStatus('Generating text embeddings...');
42
+ const response = await client.environments.embeddings(config.embeddings.text?.environment, {
43
+ model: config.embeddings.text?.model,
44
+ text: searchText,
45
+ });
46
+ const query = {
47
+ values: response.values,
48
+ type: SupportedEmbeddingTypes.text
49
+ };
50
+ return query;
51
+ };
52
+ const generateImageEmbeddings = async () => {
53
+ if (!isReady || !searchText || !config?.embeddings.image) {
54
+ return;
55
+ }
56
+ setStatus('Generating image embeddings...');
57
+ const response = await client.environments.embeddings(config.embeddings.image?.environment, {
58
+ model: config.embeddings.image?.model,
59
+ image: searchSketch,
60
+ });
61
+ const query = {
62
+ values: response.values,
63
+ type: SupportedEmbeddingTypes.image
64
+ };
65
+ return query;
66
+ };
67
+ const fireSearch = (type = "text") => {
68
+ const generateEmbedding = type === "text" ? generateTextEmbeddings : generateImageEmbeddings;
69
+ generateEmbedding().then((query) => {
70
+ setStatus("Embeddings generated");
71
+ if (!query) {
72
+ return;
73
+ }
74
+ onChange(query);
75
+ setStatus("Searching...");
76
+ });
77
+ };
78
+ const handleKeyPress = (e) => {
79
+ if (e.key === "Enter") {
80
+ fireSearch("text");
81
+ }
82
+ };
83
+ return (_jsxs("div", { className: "flex gap-1 items-center w-full", children: [_jsx(Input, { placeholder: "Type what you are looking for", value: searchText, onChange: setSearchText, onKeyDown: handleKeyPress }), _jsx(Button, { variant: "secondary", isLoading: isLoading, onClick: () => fireSearch("text"), isDisabled: !isReady, alt: "semantic search", children: "Search" })] }));
84
+ }
85
+ //# sourceMappingURL=VectorSearchWidget.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VectorSearchWidget.js","sourceRoot":"","sources":["../../../../../../src/features/store/objects/components/VectorSearchWidget.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAwB,uBAAuB,EAAqB,MAAM,kBAAkB,CAAC;AACpG,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAStD,MAAM,UAAU,kBAAkB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAA2B;IACxF,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,cAAc,EAAE,CAAC;IAC7C,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IAEzB,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAqB,SAAS,CAAC,CAAC;IAC5E,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAqB,SAAS,CAAC,CAAC;IAChF,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAmC,SAAS,CAAC,CAAC;IAClF,MAAM,OAAO,GAAG,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,MA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,EAAE;YAC/B,SAAS,CAAC,sBAAsB,CAAC,CAAC;YAClC,IAAI,CAAC,KAAK,EAAE,CAAC;gBACT,OAAO;YACX,CAAC;YACD,QAAQ,CAAC,KAAK,CAAC,CAAC;YAChB,SAAS,CAAC,cAAc,CAAC,CAAC;QAC9B,CAAC,CAAC,CAAC;IACP,CAAC,CAAC;IAEF,MAAM,cAAc,GAAG,CAAC,CAAwC,EAAE,EAAE;QAChE,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO,EAAE,CAAC;YACpB,UAAU,CAAC,MAAM,CAAC,CAAC;QACvB,CAAC;IACL,CAAC,CAAC;IAEF,OAAO,CACH,eAAK,SAAS,EAAC,gCAAgC,aAC3C,KAAC,KAAK,IAAC,WAAW,EAAC,+BAA+B,EAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,cAAc,GAAI,EAC5H,KAAC,MAAM,IAAC,OAAO,EAAC,WAAW,EAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,CAAC,OAAO,EAAE,GAAG,EAAC,iBAAiB,uBAAgB,IAC9I,CACT,CAAC;AACN,CAAC"}
@@ -0,0 +1,10 @@
1
+ export * from "./ContentDispositionButton";
2
+ export * from "./ContentOverview";
3
+ export * from "./DocumentIcon";
4
+ export * from "./DocumentInput";
5
+ export * from "./SelectDocument";
6
+ export * from "./SelectDocumentModal";
7
+ export * from "./useDownloadObject";
8
+ export * from "./PropertiesEditorModal";
9
+ export * from "./SaveVersionConfirmModal";
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/features/store/objects/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA;AAC1C,cAAc,mBAAmB,CAAA;AACjC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,uBAAuB,CAAA;AACrC,cAAc,qBAAqB,CAAA;AACnC,cAAc,yBAAyB,CAAA;AACvC,cAAc,2BAA2B,CAAA"}
@@ -0,0 +1,21 @@
1
+ export function useDownloadDocument(client, toast, uri) {
2
+ const onDownload = () => {
3
+ if (uri) {
4
+ client.files
5
+ .getDownloadUrl(uri)
6
+ .then((r) => {
7
+ window.open(r.url, "_blank");
8
+ })
9
+ .catch((err) => {
10
+ toast({
11
+ status: "error",
12
+ title: "Failed to get download URL",
13
+ description: err.message,
14
+ duration: 5000,
15
+ });
16
+ });
17
+ }
18
+ };
19
+ return onDownload;
20
+ }
21
+ //# sourceMappingURL=useDownloadObject.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDownloadObject.js","sourceRoot":"","sources":["../../../../../../src/features/store/objects/components/useDownloadObject.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,mBAAmB,CAAC,MAAmC,EAAE,KAAc,EAAE,GAAuB;IAC5G,MAAM,UAAU,GAAG,GAAG,EAAE;QACpB,IAAI,GAAG,EAAE,CAAC;YACN,MAAM,CAAC,KAAK;iBACP,cAAc,CAAC,GAAG,CAAC;iBACnB,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE;gBACR,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;YACjC,CAAC,CAAC;iBACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;gBACX,KAAK,CAAC;oBACF,MAAM,EAAE,OAAO;oBACf,KAAK,EAAE,4BAA4B;oBACnC,WAAW,EAAE,GAAG,CAAC,OAAO;oBACxB,QAAQ,EAAE,IAAI;iBACjB,CAAC,CAAC;YACP,CAAC,CAAC,CAAC;QACX,CAAC;IACL,CAAC,CAAC;IAEF,OAAO,UAAU,CAAC;AACtB,CAAC"}
@@ -0,0 +1,11 @@
1
+ export * from "./components";
2
+ export * from "./DocumentPreviewPanel";
3
+ export * from "./DocumentSearchResults";
4
+ export * from "./DocumentSelectionProvider";
5
+ export * from "./DocumentTable";
6
+ export * from "./ExportPropertiesModal";
7
+ export * from "./layout";
8
+ export * from "./search";
9
+ export * from "./selection";
10
+ export * from "./upload";
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/features/store/objects/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC"}
@@ -0,0 +1,74 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import renderers from './renderers';
3
+ const defaultRenderer = renderers.string();
4
+ function resolveField(object, path) {
5
+ let p = object;
6
+ if (!p)
7
+ return undefined;
8
+ if (!path.length)
9
+ return p;
10
+ const last = path.length - 1;
11
+ for (let i = 0; i < last; i++) {
12
+ p = p[path[i]];
13
+ if (!p) {
14
+ return undefined;
15
+ }
16
+ }
17
+ return p[path[last]];
18
+ }
19
+ function splitPath(path) {
20
+ if (!path || path === '.') {
21
+ return [];
22
+ }
23
+ return path.split('.');
24
+ }
25
+ export class DocumentTableColumn {
26
+ layout;
27
+ renderer = defaultRenderer;
28
+ path;
29
+ fallbackPath;
30
+ constructor(layout) {
31
+ this.layout = layout;
32
+ this.path = splitPath(layout.field || '');
33
+ this.fallbackPath = layout.fallback ? splitPath(layout.fallback) : undefined;
34
+ // If there's a custom render function, use it
35
+ if (layout.render) {
36
+ this.renderer = (_value, _index) => null; // Placeholder, we'll use render directly
37
+ }
38
+ else {
39
+ // Otherwise use the type-based renderer
40
+ const type = layout.type || 'string';
41
+ const i = type.indexOf('?');
42
+ if (i > 0) {
43
+ const name = type.substring(0, i);
44
+ const params = new URLSearchParams(type.substring(i + 1));
45
+ this.renderer = renderers[name](params);
46
+ }
47
+ else {
48
+ this.renderer = renderers[type]();
49
+ }
50
+ }
51
+ }
52
+ get name() {
53
+ return this.layout.name;
54
+ }
55
+ resolveValue(object) {
56
+ let value = resolveField(object, this.path);
57
+ if (value === undefined && this.fallbackPath) {
58
+ value = resolveField(object, this.fallbackPath);
59
+ }
60
+ if (value === undefined) {
61
+ value = this.layout.default;
62
+ }
63
+ return value;
64
+ }
65
+ render(object, index) {
66
+ // If there's a custom render function, wrap its result in a td
67
+ if (this.layout.render) {
68
+ return _jsx("td", { className: "whitespace-nowrap px-3 py-4 text-sm", children: this.layout.render(object) }, index);
69
+ }
70
+ // Otherwise use the type-based renderer with the resolved value
71
+ return this.renderer(this.resolveValue(object), index);
72
+ }
73
+ }
74
+ //# sourceMappingURL=DocumentTableColumn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DocumentTableColumn.js","sourceRoot":"","sources":["../../../../../../src/features/store/objects/layout/DocumentTableColumn.tsx"],"names":[],"mappings":";AAIA,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC,MAAM,eAAe,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC;AAE3C,SAAS,YAAY,CAAC,MAAyB,EAAE,IAAc;IAC3D,IAAI,CAAC,GAAG,MAAa,CAAC;IACtB,IAAI,CAAC,CAAC;QAAE,OAAO,SAAS,CAAC;IACzB,IAAI,CAAC,IAAI,CAAC,MAAM;QAAE,OAAO,CAAC,CAAC;IAC3B,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;IAC7B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC;QAC5B,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QACf,IAAI,CAAC,CAAC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AC,CAAC,CAAC;gBAC1D,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC;YAC5C,CAAC;iBAAM,CAAC;gBACJ,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;YACtC,CAAC;QACL,CAAC;IACL,CAAC;IAED,IAAI,IAAI;QACJ,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;IAC5B,CAAC;IAED,YAAY,CAAC,MAAyB;QAClC,IAAI,KAAK,GAAG,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5C,IAAI,KAAK,KAAK,SAAS,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;YAC3C,KAAK,GAAG,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QACpD,CAAC;QACD,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACtB,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;QAChC,CAAC;QACD,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,MAAM,CAAC,MAAyB,EAAE,KAAa;QAC3C,+DAA+D;QAC/D,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;YACrB,OAAO,aAAgB,SAAS,EAAC,qCAAqC,YAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAlF,KAAK,CAAmF,CAAC;QAC7G,CAAC;QACD,gEAAgE;QAChE,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,CAAC;IAC3D,CAAC;CACJ"}
@@ -0,0 +1,16 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { Table, TBody, Spinner } from "@vertesia/ui/core";
3
+ import clsx from "clsx";
4
+ import { DocumentIcon } from "../components/DocumentIcon";
5
+ export function DocumentTableView({ objects, selection, isLoading, onRowClick, columns, toggleAll, onSelectionChange }) {
6
+ return (_jsxs(Table, { className: "w-full border-t", children: [_jsx("thead", { children: _jsxs("tr", { children: [selection && _jsx("th", { children: _jsx("input", { type: "checkbox", onChange: toggleAll }) }), columns.map((col) => (_jsx("th", { children: col.name }, col.name)))] }) }), _jsxs(TBody, { isLoading: isLoading, columns: columns.length, children: [objects?.map((obj) => {
7
+ return (_jsxs("tr", { className: 'cursor-pointer hover:bg-muted', onClick: () => {
8
+ onRowClick && onRowClick(obj);
9
+ }, children: [selection &&
10
+ _jsx("td", { onClick: ev => ev.stopPropagation(), children: _jsx("input", { checked: selection.isSelected(obj.id), type: "checkbox", onChange: (ev) => onSelectionChange(obj, ev) }) }), columns.map((col, index) => col.render(obj, index))] }, obj.id));
11
+ }), objects.length === 0 && _jsx("tr", { children: _jsx("td", { colSpan: columns.length + (selection ? 1 : 0), className: "text-center", children: "No objects. Just drag and drop documents or images here to create content objects." }) })] })] }));
12
+ }
13
+ export function DocumentGridView({ objects, selection, isLoading, onSelectionChange }) {
14
+ return (_jsxs(_Fragment, { children: [_jsx("div", { className: clsx("bg-white opacity-40 absolute inset-0 z-50 flex justify-center items-center", isLoading ? "block" : "hidden"), children: _jsx(Spinner, { size: 'xl' }) }), _jsx("div", { className: "w-full gap-2 grid lg:grid-cols-6", children: objects.map((document) => (_jsx(DocumentIcon, { document: document, selection: selection, onSelectionChange: onSelectionChange }, document.id))) })] }));
15
+ }
16
+ //# sourceMappingURL=documentLayout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"documentLayout.js","sourceRoot":"","sources":["../../../../../../src/features/store/objects/layout/documentLayout.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,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AAO,EAAE,OAAO,CAAC,MAAM,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,SAAS,EAAC,aAAa,mGAAwF,GAAK,IAChM,IACJ,CACX,CAAA;AACL,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,iBAAiB,EAAa;IAE5F,OAAO,CACH,8BACI,cAAK,SAAS,EAAE,IAAI,CAAC,4EAA4E,EAAE,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,YAC9H,KAAC,OAAO,IAAC,IAAI,EAAC,IAAI,GAAG,GACnB,EACN,cAAK,SAAS,EAAC,kCAAkC,YAC5C,OAAO,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CACvB,KAAC,YAAY,IAAmB,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,iBAAiB,EAAE,iBAAiB,IAA3F,QAAQ,CAAC,EAAE,CAAoF,CACrH,CAAC,GACA,IACP,CACN,CAAA;AACL,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./DocumentTableColumn";
2
+ export * from "./documentLayout";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/features/store/objects/layout/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC"}