@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,133 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useUserSession } from "@vertesia/ui/session";
3
+ import React, { createContext, useEffect, useState } from "react";
4
+ const DEFAULT_PAGE_COUNT = 10;
5
+ const ADVANCED_PROCESSING_PREFIX = "magic-pdf";
6
+ class PageLayoutProvider {
7
+ totalPages;
8
+ layoutUrls = [];
9
+ cache;
10
+ constructor(totalPages) {
11
+ this.totalPages = totalPages;
12
+ this.cache = new Array(totalPages);
13
+ }
14
+ async loadUrls(vertesia, objectId) {
15
+ const layoutPromises = [];
16
+ for (let i = 0; i < this.totalPages; i++) {
17
+ layoutPromises.push(getLayoutUrlForPage(vertesia, objectId, i + 1));
18
+ }
19
+ const layoutUrls = await Promise.all(layoutPromises);
20
+ this.layoutUrls = layoutUrls.map((r) => r.url);
21
+ }
22
+ async getPageLayout(page) {
23
+ const index = page - 1;
24
+ let content = this.cache[index];
25
+ if (content === undefined) {
26
+ const url = this.layoutUrls[index];
27
+ content = await fetch(url, { method: "GET" }).then((r) => {
28
+ if (r.ok) {
29
+ return r.text();
30
+ }
31
+ else {
32
+ throw new Error("Failed to fetch json layout: " + r.statusText);
33
+ }
34
+ });
35
+ this.cache[index] = content;
36
+ }
37
+ return content;
38
+ }
39
+ }
40
+ const PdfPageContext = createContext(undefined);
41
+ export function PdfPageProvider({ children, object }) {
42
+ const { client } = useUserSession();
43
+ const [info, setInfo] = useState();
44
+ useEffect(() => {
45
+ const page_count = object.metadata.page_count ||
46
+ DEFAULT_PAGE_COUNT;
47
+ getPdfPagesInfo(client, object, page_count).then(setInfo);
48
+ }, [object.id]);
49
+ return (info && (_jsx(PdfPageContext.Provider, { value: info, children: children })));
50
+ }
51
+ function getBasePath(objectId) {
52
+ return `${ADVANCED_PROCESSING_PREFIX}/${objectId}`;
53
+ }
54
+ function getPageImagePath(objectId, pageNumber, ext = ".jpeg") {
55
+ return `${getBasePath(objectId)}/pages/page-${pageNumber}${ext}`;
56
+ }
57
+ function getPageAnnotatedImagePath(objectId, pageNumber, ext = ".jpeg") {
58
+ return `${getBasePath(objectId)}/pages/page-${pageNumber}-annotated${ext}`;
59
+ }
60
+ function getPageInstrumentedImagePath(objectId, pageNumber, ext = ".jpeg") {
61
+ return `${getBasePath(objectId)}/pages/page-${pageNumber}.instrumented${ext}`;
62
+ }
63
+ function getLayoutJsonPath(objectId, pageNumber) {
64
+ return `${getBasePath(objectId)}/pages/page-${pageNumber}.layout.json`;
65
+ }
66
+ export function getResourceUrl(vertesia, objectId, name) {
67
+ return vertesia.files
68
+ .getDownloadUrl(`${getBasePath(objectId)}/${name}`)
69
+ .then((r) => r.url);
70
+ }
71
+ function getImageUrlForPage(vertesia, objectId, pageNumber) {
72
+ return vertesia.files.getDownloadUrl(getPageImagePath(objectId, pageNumber));
73
+ }
74
+ function getAnnotatedImageUrlForPage(vertesia, objectId, pageNumber) {
75
+ return vertesia.files.getDownloadUrl(getPageAnnotatedImagePath(objectId, pageNumber));
76
+ }
77
+ function getInstrumentedImageUrlForPage(vertesia, objectId, pageNumber) {
78
+ return vertesia.files.getDownloadUrl(getPageInstrumentedImagePath(objectId, pageNumber));
79
+ }
80
+ function getLayoutUrlForPage(vertesia, objectId, pageNumber) {
81
+ return vertesia.files.getDownloadUrl(getLayoutJsonPath(objectId, pageNumber));
82
+ }
83
+ async function getPdfPagesInfo(vertesia, object, page_count) {
84
+ const imageUrlPromises = [];
85
+ for (let i = 0; i < page_count; i++) {
86
+ imageUrlPromises.push(getImageUrlForPage(vertesia, object.id, i + 1));
87
+ }
88
+ const imageUrls = await Promise.all(imageUrlPromises);
89
+ const annotatedImageUrlPromises = [];
90
+ for (let i = 0; i < page_count; i++) {
91
+ annotatedImageUrlPromises.push(getAnnotatedImageUrlForPage(vertesia, object.id, i + 1));
92
+ }
93
+ const annotatedImageUrls = await Promise.all(annotatedImageUrlPromises);
94
+ const instrumentedImageUrlPromises = [];
95
+ for (let i = 0; i < page_count; i++) {
96
+ instrumentedImageUrlPromises.push(getInstrumentedImageUrlForPage(vertesia, object.id, i + 1));
97
+ }
98
+ const instrumentedImageUrls = await Promise.all(instrumentedImageUrlPromises);
99
+ const layoutProvider = new PageLayoutProvider(page_count);
100
+ await layoutProvider.loadUrls(vertesia, object.id);
101
+ const xml = object.text ? cleanXml(object.text) : "";
102
+ return {
103
+ count: page_count,
104
+ urls: imageUrls.map((r) => r.url),
105
+ annotatedUrls: annotatedImageUrls.map((r) => r.url),
106
+ instrumentedUrls: instrumentedImageUrls.map((r) => r.url),
107
+ layoutProvider,
108
+ xml,
109
+ xmlPages: object.text ? extractXmlPages(xml) : [],
110
+ };
111
+ }
112
+ export function usePdfPagesInfo() {
113
+ const context = React.useContext(PdfPageContext);
114
+ if (!context) {
115
+ throw new Error("usePdfPagesInfo must be used within a PdfPageProvider");
116
+ }
117
+ return context;
118
+ }
119
+ function extractXmlPages(xml) {
120
+ // Parse the XML string
121
+ const doc = new DOMParser().parseFromString(cleanXml(xml), "text/xml");
122
+ const pages = doc.getElementsByTagName("page");
123
+ const serializer = new XMLSerializer();
124
+ return Array.from(pages).map((p) => serializer.serializeToString(p));
125
+ }
126
+ function cleanXml(xml) {
127
+ const cleanedXML = xml
128
+ // eslint-disable-next-line no-control-regex
129
+ .replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]/g, "")
130
+ .replace(/<\?xml.*?\?>/g, "");
131
+ return cleanedXML;
132
+ }
133
+ //# sourceMappingURL=PdfPageProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PdfPageProvider.js","sourceRoot":"","sources":["../../../../src/features/magic-pdf/PdfPageProvider.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAOtD,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAElE,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAC9B,MAAM,0BAA0B,GAAG,WAAW,CAAC;AAY/C,MAAM,kBAAkB;IAGD;IAFnB,UAAU,GAAa,EAAE,CAAC;IAC1B,KAAK,CAAW;IAChB,YAAmB,UAAkB;QAAlB,eAAU,GAAV,UAAU,CAAQ;QACjC,IAAI,CAAC,KAAK,GAAG,IAAI,KAAK,CAAS,UAAU,CAAC,CAAC;IAC/C,CAAC;IACD,KAAK,CAAC,QAAQ,CAAC,QAAwB,EAAE,QAAgB;QACrD,MAAM,cAAc,GAAkC,EAAE,CAAC;QACzD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC,EAAE,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AgB,EAAE,qBAAqB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;QACzD,cAAc;QACd,GAAG;QACH,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE;KACpD,CAAC;AACN,CAAC;AAED,MAAM,UAAU,eAAe;IAC3B,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;IACjD,IAAI,CAAC,OAAO,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CACX,uDAAuD,CAC1D,CAAC;IACN,CAAC;IACD,OAAO,OAAO,CAAC;AACnB,CAAC;AAED,SAAS,eAAe,CAAC,GAAW;IAChC,uBAAuB;IACvB,MAAM,GAAG,GAAG,IAAI,SAAS,EAAE,CAAC,eAAe,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,UAAU,CAAC,CAAC;IACvE,MAAM,KAAK,GAAG,GAAG,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC;IAC/C,MAAM,UAAU,GAAG,IAAI,aAAa,EAAE,CAAC;IACvC,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC;AACzE,CAAC;AAED,SAAS,QAAQ,CAAC,GAAW;IACzB,MAAM,UAAU,GAAG,GAAG;QAClB,4CAA4C;SAC3C,OAAO,CAAC,mCAAmC,EAAE,EAAE,CAAC;SAChD,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC;IAClC,OAAO,UAAU,CAAC;AACtB,CAAC"}
@@ -0,0 +1,45 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { JSONCode } from "@vertesia/ui/widgets";
3
+ import { XMLViewer } from '@vertesia/ui/widgets';
4
+ import { useEffect, useLayoutEffect, useState } from "react";
5
+ import { usePdfPagesInfo } from "./PdfPageProvider";
6
+ const darkTheme = {
7
+ attributeKeyColor: '#FFD700',
8
+ attributeValueColor: '#FF4500',
9
+ tagColor: '#87CEFA',
10
+ textColor: '#00FF00',
11
+ separatorColor: '#FFD700',
12
+ commentColor: "#BEBEBE",
13
+ cdataColor: "#33CC66",
14
+ };
15
+ export function TextPageView({ viewType, pageNumber }) {
16
+ return viewType === "json" ? _jsx(JsonPageLayoutView, { pageNumber: pageNumber }) : _jsx(XmlPageView, { pageNumber: pageNumber });
17
+ }
18
+ function XmlPageView({ pageNumber }) {
19
+ const [theme, setTheme] = useState();
20
+ const { xmlPages: pages } = usePdfPagesInfo();
21
+ useLayoutEffect(() => {
22
+ const media = window.matchMedia('(prefers-color-scheme: dark)');
23
+ const onMediaChange = (event) => {
24
+ setTheme(event.matches ? darkTheme : undefined);
25
+ };
26
+ media.addEventListener('change', onMediaChange);
27
+ media.matches && setTheme(darkTheme);
28
+ return () => {
29
+ media.removeEventListener('change', onMediaChange);
30
+ };
31
+ }, []);
32
+ return (_jsx("div", { className: "px-4 py-2", children: _jsx(XMLViewer, { xml: pages[pageNumber - 1], collapsible: true, theme: theme }) }));
33
+ }
34
+ function JsonPageLayoutView({ pageNumber }) {
35
+ const [content, setContent] = useState();
36
+ const { layoutProvider } = usePdfPagesInfo();
37
+ useEffect(() => {
38
+ layoutProvider.getPageLayout(pageNumber).then(content => setContent(content ? JSON.parse(content) : undefined)).catch(err => {
39
+ console.error(err);
40
+ setContent(undefined);
41
+ });
42
+ }, [pageNumber]);
43
+ return (content && _jsx(JSONCode, { className: "w-full", data: content }));
44
+ }
45
+ //# sourceMappingURL=TextPageView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextPageView.js","sourceRoot":"","sources":["../../../../src/features/magic-pdf/TextPageView.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAA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,QAAQ,EAAE,aAAa,CAAC,CAAC;QACvD,CAAC,CAAA;IACL,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,OAAO,CACH,cAAK,SAAS,EAAC,WAAW,YACtB,KAAC,SAAS,IAAC,GAAG,EAAE,KAAK,CAAC,UAAU,GAAG,CAAC,CAAC,EAAE,WAAW,QAAC,KAAK,EAAE,KAAK,GAAI,GACjE,CACT,CAAA;AACL,CAAC;AAKD,SAAS,kBAAkB,CAAC,EAAE,UAAU,EAA2B;IAC/D,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,EAAO,CAAC;IAC9C,MAAM,EAAE,cAAc,EAAE,GAAG,eAAe,EAAE,CAAC;IAC7C,SAAS,CAAC,GAAG,EAAE;QACX,cAAc,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;YACxH,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACnB,UAAU,CAAC,SAAS,CAAC,CAAC;QAC1B,CAAC,CAAC,CAAC;IACP,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;IACjB,OAAO,CACH,OAAO,IAAI,KAAC,QAAQ,IAAC,SAAS,EAAC,QAAQ,EAAC,IAAI,EAAE,OAAO,GAAI,CAC5D,CAAA;AACL,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./MagicPdfView";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/features/magic-pdf/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/features/magic-pdf/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,34 @@
1
+ import { useEffect } from "react";
2
+ export function useResizeEW(opts) {
3
+ useEffect(() => {
4
+ if (opts.handler.current && opts.left.current && opts.right.current) {
5
+ const handler = opts.handler.current;
6
+ const left = opts.left.current;
7
+ const right = opts.right.current;
8
+ const onMouseDown = (e) => {
9
+ let x = e.clientX;
10
+ let baseLW = left.offsetWidth;
11
+ let baseRL = right.offsetLeft;
12
+ const onMouseMove = (e) => {
13
+ const dx = e.clientX - x;
14
+ left.style.width = `${baseLW + dx}px`;
15
+ right.style.left = `${baseRL + dx}px`;
16
+ e.target.classList.add('resizing');
17
+ };
18
+ const onMouseUp = (e) => {
19
+ e.target.classList.remove('resizing');
20
+ onMouseMove(e);
21
+ document.removeEventListener('mousemove', onMouseMove);
22
+ document.removeEventListener('mouseup', onMouseUp);
23
+ };
24
+ document.addEventListener('mousemove', onMouseMove);
25
+ document.addEventListener('mouseup', onMouseUp);
26
+ };
27
+ handler.addEventListener('mousedown', onMouseDown);
28
+ return () => {
29
+ handler.removeEventListener('mousedown', onMouseDown);
30
+ };
31
+ }
32
+ }, [opts.handler.current, opts.left.current, opts.right.current]);
33
+ }
34
+ //# sourceMappingURL=useResizeOnDrag.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useResizeOnDrag.js","sourceRoot":"","sources":["../../../../src/features/magic-pdf/useResizeOnDrag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,SAAS,EAAE,MAAM,OAAO,CAAC;AAQ7C,MAAM,UAAU,WAAW,CAAC,IAAyB;IAEjD,SAAS,CAAC,GAAG,EAAE;QACX,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;YAClE,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CA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AAG,EAAE;gBACR,OAAO,CAAC,mBAAmB,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;YAC1D,CAAC,CAAA;QACL,CAAC;IACL,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;AAEtE,CAAC"}
@@ -0,0 +1,37 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useUserSession } from "@vertesia/ui/session";
3
+ import { DocumentSearchResultsWithDropZone, DocumentSearchResults } from "../objects/DocumentSearchResults";
4
+ import { useToast } from "@vertesia/ui/core";
5
+ export function BrowseCollectionView({ collection }) {
6
+ const toast = useToast();
7
+ const { client, typeRegistry } = useUserSession();
8
+ const onUploadDone = async (objectIds) => {
9
+ if (objectIds.length > 0) {
10
+ await client.store.collections.addMembers(collection.id, objectIds).catch(err => {
11
+ toast({
12
+ title: 'Failed to add objects to collection',
13
+ description: err.message,
14
+ status: 'error'
15
+ });
16
+ });
17
+ }
18
+ };
19
+ const tableLayout = getTableLayout(collection, typeRegistry);
20
+ return collection.dynamic ? (_jsx(DocumentSearchResults, { layout: tableLayout })) : (_jsx(DocumentSearchResultsWithDropZone, { onUploadDone: onUploadDone, layout: tableLayout }));
21
+ }
22
+ function getTableLayout(collection, typeRegistry) {
23
+ let table_layout = collection.table_layout;
24
+ if (table_layout && table_layout.length > 0) {
25
+ return table_layout;
26
+ }
27
+ if (collection.type && typeRegistry) {
28
+ table_layout = typeRegistry?.getTypeLayout(collection.type.id);
29
+ }
30
+ if (table_layout && table_layout.length > 0) {
31
+ return table_layout;
32
+ }
33
+ else {
34
+ return undefined;
35
+ }
36
+ }
37
+ //# sourceMappingURL=BrowseCollectionView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BrowseCollectionView.js","sourceRoot":"","sources":["../../../../../src/features/store/collections/BrowseCollectionView.tsx"],"names":[],"m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C;IACxB,CAAC;IACD,IAAI,UAAU,CAAC,IAAI,IAAI,YAAY,EAAE,CAAC;QAClC,YAAY,GAAG,YAAY,EAAE,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACnE,CAAC;IACD,IAAI,YAAY,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC1C,OAAO,YAAY,CAAC;IACxB,CAAC;SAAM,CAAC;QACJ,OAAO,SAAS,CAAC;IACrB,CAAC;AACL,CAAC"}
@@ -0,0 +1,53 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { ErrorBox, Spinner, useFetch, VTabs, VTabsBar, VTabsPanel } from "@vertesia/ui/core";
3
+ import { FullHeightLayout } from "@vertesia/ui/layout";
4
+ import { NavLink } from "@vertesia/ui/router";
5
+ import { useUserSession } from "@vertesia/ui/session";
6
+ import { PanelErrorBoundary } from "../../errors";
7
+ import { GenericPageNavHeader } from "../../layout";
8
+ import { DocumentSearchProvider, DocumentSelectionProvider } from "../../store";
9
+ import { SelectionActions, UploadObjectsButton } from "../objects/selection/SelectionActions";
10
+ import { BrowseCollectionView } from "./BrowseCollectionView";
11
+ import { EditCollectionView } from "./EditCollectionView";
12
+ const facets = [
13
+ {
14
+ name: 'status',
15
+ field: 'status'
16
+ },
17
+ {
18
+ name: 'type',
19
+ field: 'type'
20
+ }
21
+ ];
22
+ export function CollectionView({ collectionId }) {
23
+ const { client } = useUserSession();
24
+ const { data: collection, error, refetch, isLoading } = useFetch(() => client.store.collections.retrieve(collectionId), [collectionId]);
25
+ if (error) {
26
+ return _jsx(ErrorBox, { title: 'Collection fetch failed', children: error.message });
27
+ }
28
+ const actions = [
29
+ _jsx(SelectionActions, {}, 'selection'),
30
+ _jsx(UploadObjectsButton, { collectionId: collectionId ?? '' }, "upload")
31
+ ];
32
+ const title = (_jsx("div", { className: 'flex gap-x-1 items-center', children: _jsx("div", { children: collection?.name || '' }) }));
33
+ const breadcrumbs = [
34
+ _jsx(NavLink, { href: '/collections', children: "Collections" }, 'collections'),
35
+ _jsx("span", { children: "Collection Detail" }, 'collection-detail')
36
+ ];
37
+ const tabs = [
38
+ {
39
+ name: 'browse',
40
+ label: 'Browse',
41
+ content: _jsx(BrowseCollectionView, { collection: collection })
42
+ },
43
+ {
44
+ name: 'metadata',
45
+ label: 'Metadata',
46
+ content: _jsx(EditCollectionView, { collection: collection, refetch: refetch })
47
+ }
48
+ ];
49
+ return (_jsx(FullHeightLayout, { children: _jsx(DocumentSearchProvider, { facets: facets, collectionId: collectionId, children: _jsxs(DocumentSelectionProvider, { collectionId: collectionId, children: [_jsx(GenericPageNavHeader, { title: title, description: collection?.description || '', actions: actions, breadcrumbs: breadcrumbs }), _jsxs(VTabs, { defaultValue: "browse", tabs: tabs, children: [_jsx(VTabsBar, { className: "px-4" }), isLoading ?
50
+ _jsx("div", { className: "w-full flex justify-center", children: _jsx(Spinner, {}) }) :
51
+ _jsx("div", { className: "h-[calc(100vh-165px)] overflow-auto px-4 py-2", children: _jsx(PanelErrorBoundary, { children: _jsx(VTabsPanel, {}) }) })] })] }) }) }));
52
+ }
53
+ //# sourceMappingURL=CollectionView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CollectionView.js","sourceRoot":"","sources":["../../../../../src/features/store/collections/CollectionView.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC7F,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,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IAEF,MAAM,IAAI,GAAG;QACT;YACI,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,QAAQ;YACf,OAAO,EAAE,KAAC,oBAAoB,IAAC,UAAU,EAAE,UAAwB,GAAI;SAC1E;QACD;YACI,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,UAAU;YACjB,OAAO,EAAE,KAAC,kBAAkB,IAAC,UAAU,EAAE,UAAwB,EAAE,OAAO,EAAE,OAAO,GAAI;SAC1F;KACJ,CAAC;IAEF,OAAO,CACH,KAAC,gBAAgB,cACb,KAAC,sBAAsB,IAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,YAC9D,MAAC,yBAAyB,IAAC,YAAY,EAAE,YAAY,aACjD,KAAC,oBAAoB,IAAC,KAAK,EAAE,KAAK,EAC9B,WAAW,EAAE,UAAU,EAAE,WAAW,IAAI,EAAE,EAC1C,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,WAAW,GAC1B,EACF,MAAC,KAAK,IAAC,YAAY,EAAC,QAAQ,EAAC,IAAI,EAAE,IAAI,aACnC,KAAC,QAAQ,IAAC,SAAS,EAAC,MAAM,GAAG,EAEzB,SAAS,CAAC,CAAC;gCACP,cAAK,SAAS,EAAC,4BAA4B,YACvC,KAAC,OAAO,KAAG,GACT,CAAC,CAAC;gCACR,cAAK,SAAS,EAAC,+CAA+C,YAC1D,KAAC,kBAAkB,cACf,KAAC,UAAU,KAAG,GACG,GACnB,IAEV,IAEgB,GACP,GACV,CACtB,CAAA;AACL,CAAC"}
@@ -0,0 +1,60 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { NavLink } from "@vertesia/ui/router";
3
+ import { useUserSession } from "@vertesia/ui/session";
4
+ import { FolderClosed, Search, Trash2 } from "lucide-react";
5
+ import { Button, ConfirmModal, ErrorBox, Table, TBody, TR, useToast, VTooltip } from "@vertesia/ui/core";
6
+ import { useFetch } from "@vertesia/ui/core";
7
+ import dayjs from 'dayjs';
8
+ import relativeTime from 'dayjs/plugin/relativeTime';
9
+ import { useState, useEffect } from "react";
10
+ dayjs.extend(relativeTime);
11
+ export function CollectionsTable({}) {
12
+ const { client } = useUserSession();
13
+ const toast = useToast();
14
+ const [collectionToDelete, setCollectionToDelete] = useState();
15
+ const [isLoading, setIsLoading] = useState(true);
16
+ const { data: collections, error, refetch } = useFetch(() => client.store.collections.list(), []);
17
+ // Update loading state when data is fetched
18
+ useEffect(() => {
19
+ if (collections || error) {
20
+ setIsLoading(false);
21
+ }
22
+ }, [collections, error]);
23
+ if (error) {
24
+ return _jsx(ErrorBox, { title: 'Collections fetch failed', children: error.message });
25
+ }
26
+ const deleteCollection = async () => {
27
+ if (!collectionToDelete)
28
+ return;
29
+ try {
30
+ await client.store.collections.delete(collectionToDelete);
31
+ toast({
32
+ title: 'Collection deleted',
33
+ status: 'success',
34
+ duration: 3000
35
+ });
36
+ refetch();
37
+ }
38
+ catch (err) {
39
+ console.error('Failed to delete collection:', err);
40
+ toast({
41
+ title: 'Failed to delete collection',
42
+ description: err.message || 'An error occurred',
43
+ status: 'error',
44
+ duration: 5000
45
+ });
46
+ }
47
+ finally {
48
+ setCollectionToDelete(undefined);
49
+ }
50
+ };
51
+ return (_jsxs(_Fragment, { children: [collections && _jsxs(Table, { className: "w-full", children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { children: "Name" }), _jsx("th", { children: "Type" }), _jsx("th", { children: "Created" }), _jsx("th", {})] }) }), _jsx(TBody, { columns: 4, isLoading: isLoading, children: collections.map((c) => {
52
+ return _jsxs(TR, { children: [_jsx("td", { children: _jsxs("div", { className: "flex items-center gap-2", children: [collectionIcon(c.dynamic), _jsx(NavLink, { href: `/collections/${c.id}`, children: c.name })] }) }), _jsx("td", { children: c.type?.name || "-" }), _jsx("td", { children: dayjs(c.created_at).fromNow() }), _jsx("td", { className: "text-right", children: _jsx(Button, { variant: "destructive", size: "sm", onClick: () => setCollectionToDelete(c.id), children: _jsx(Trash2, { className: "size-4" }) }) })] }, c.id);
53
+ }) })] }), _jsx(ConfirmModal, { isOpen: !!collectionToDelete, title: "Delete Collection", content: "Are you sure you want to delete this collection? This action cannot be undone.", onConfirm: deleteCollection, onCancel: () => setCollectionToDelete(undefined) })] }));
54
+ }
55
+ export function collectionIcon(isDynamic) {
56
+ const tooltipText = isDynamic ? "Dynamic Collection" : "Static Collection";
57
+ const icon = isDynamic ? _jsx(Search, { className: "size-5" }) : _jsx(FolderClosed, { className: "size-5" });
58
+ return (_jsx(VTooltip, { description: tooltipText, className: "mr-2", children: icon }));
59
+ }
60
+ //# sourceMappingURL=CollectionsTable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CollectionsTable.js","sourceRoot":"","sources":["../../../../../src/features/store/collections/CollectionsTable.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACzG,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,YAAY,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE5C,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;AAI3B,MAAM,UAAU,gBAAgB,CAAC,EAA0B;IACvD,MAAM,EAAE,MAAM,EAAE,GAAG,cAAc,EAAE,CAAC;IACpC,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,CAAC,kBAAk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M,UAAU,cAAc,CAAC,SAAkB;IAC7C,MAAM,WAAW,GAAG,SAAS,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,mBAAmB,CAAC;IAC3E,MAAM,IAAI,GAAG,SAAS,CAAC,CAAC,CAAC,KAAC,MAAM,IAAC,SAAS,EAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,KAAC,YAAY,IAAC,SAAS,EAAC,QAAQ,GAAG,CAAC;IAE7F,OAAO,CACH,KAAC,QAAQ,IAAC,WAAW,EAAE,WAAW,EAAE,SAAS,EAAC,MAAM,YAC/C,IAAI,GACE,CACd,CAAC;AACN,CAAC"}
@@ -0,0 +1,94 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Button, FormItem, Input, Styles, Switch, useFlag, useToast, VModal, VModalBody, VModalFooter, VModalTitle } from "@vertesia/ui/core";
3
+ import { FullHeightLayout } from "@vertesia/ui/layout";
4
+ import { useNavigate } from "@vertesia/ui/router";
5
+ import { useUserSession } from "@vertesia/ui/session";
6
+ import { useState } from "react";
7
+ import { GenericPageNavHeader } from "../../layout";
8
+ import { SelectContentType } from "../../store";
9
+ import { CollectionsTable } from "./CollectionsTable";
10
+ export function CollectionsView({}) {
11
+ const actions = [_jsx(CreateCollectionButton, {}, "create")];
12
+ return (_jsxs(FullHeightLayout, { children: [_jsx(GenericPageNavHeader, { title: "Collections", breadcrumbs: [_jsx("span", { children: "Collections" }, "0")], description: "Group objects together using a collection", actions: actions }), _jsx(FullHeightLayout.Body, { children: _jsx(CollectionsTable, {}) })] }));
13
+ }
14
+ function CreateCollectionButton() {
15
+ const { on, off, isOn } = useFlag();
16
+ return (_jsxs("div", { children: [_jsxs(VModal, { onClose: off, isOpen: isOn, children: [_jsx(VModalTitle, { children: "Create a Collection" }), _jsx(CreateCollectionForm, { onClose: off })] }), _jsx(Button, { onClick: on, children: "Create Collection" })] }));
17
+ }
18
+ export function CreateCollectionForm({ onClose, redirect = true, onAddToCollection }) {
19
+ const navigate = useNavigate();
20
+ const toast = useToast();
21
+ const [isProcessing, setProcessing] = useState(false);
22
+ const { client } = useUserSession();
23
+ const [payload, setPayload] = useState({
24
+ dynamic: false,
25
+ name: "",
26
+ description: "",
27
+ });
28
+ function setPayloadProp(name, value) {
29
+ setPayload({
30
+ ...payload,
31
+ [name]: value,
32
+ });
33
+ }
34
+ const onCreate = () => {
35
+ if (!payload?.name || !payload.name.trim()) {
36
+ toast({
37
+ title: "Name is required",
38
+ description: "Please provide a name for the collection",
39
+ status: "error",
40
+ duration: 5000,
41
+ });
42
+ return;
43
+ }
44
+ payload.name = payload.name.trim();
45
+ if (payload.description) {
46
+ payload.description = payload.description.trim();
47
+ }
48
+ if (payload.dynamic == null) {
49
+ payload.dynamic = false;
50
+ }
51
+ setProcessing(true);
52
+ client.store.collections
53
+ .create(payload)
54
+ .then((r) => {
55
+ onClose();
56
+ toast({
57
+ title: "Collection created",
58
+ description: `Collection "${r.name}" created successfully`,
59
+ status: "success",
60
+ duration: 3000,
61
+ });
62
+ if (redirect)
63
+ navigate(`/collections/${r.id}`);
64
+ if (onAddToCollection) {
65
+ onAddToCollection(r.id);
66
+ }
67
+ })
68
+ .catch((err) => {
69
+ toast({
70
+ title: "Failed to create collection",
71
+ description: err.message,
72
+ status: "error",
73
+ duration: 5000,
74
+ });
75
+ })
76
+ .finally(() => setProcessing(false));
77
+ };
78
+ return (_jsxs("form", { children: [_jsxs(VModalBody, { children: [_jsx(FormItem, { label: "Name", required: true, children: _jsx(Input, { type: "text", value: payload.name || "", onChange: (value) => setPayloadProp("name", value) }) }), _jsx(FormItem, { label: "Description", className: "mt-2", children: _jsx("textarea", { className: Styles.INPUT, value: payload.description || "", onChange: (ev) => setPayloadProp("description", ev.target.value) }) }), _jsx(FormItem, { label: "Dynamic Collection", className: "mt-2", direction: "row", description: "Dynamic Collection is based on a query vs. users manully adding content.", children: _jsx(Switch, { value: payload.dynamic || false, onChange: (value) => setPayloadProp("dynamic", value) }) }), _jsx(FormItem, { label: "Type", className: "mt-2", description: "This is optional and drives what properties are used to describe a collection", children: _jsx(SelectContentType, { defaultValue: payload.type || null, onChange: (v) => {
79
+ if (Array.isArray(v)) {
80
+ setPayloadProp("type", v.length > 0 ? v[0].id : null);
81
+ }
82
+ else {
83
+ setPayloadProp("type", v?.id || null);
84
+ }
85
+ }, isClearable: true }) }), _jsx(FormItem, { label: "Allowed Content Types", className: "mt-4", children: _jsx(SelectContentType, { defaultValue: payload.allowed_types || null, onChange: (v) => {
86
+ if (Array.isArray(v)) {
87
+ setPayloadProp("allowed_types", v.map(type => type.id));
88
+ }
89
+ else {
90
+ setPayloadProp("allowed_types", v ? [v.id] : []);
91
+ }
92
+ }, isClearable: true, multiple: true }) })] }), _jsx(VModalFooter, { children: _jsx(Button, { isDisabled: isProcessing, onClick: onCreate, children: "Create Collection" }) })] }));
93
+ }
94
+ //# sourceMappingURL=CollectionsView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CollectionsView.js","sourceRoot":"","sources":["../../../../../src/features/store/collections/CollectionsView.tsx"],"names":[],"mappings":";AACA,OAAO,EACH,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAC/B,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EACjC,UAAU,EACV,YAAY,EACZ,WAAW,EACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGtD,MAAM,UAAU,eAA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