@vertesia/ui 0.59.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,64 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { Button, ErrorBox, Portal, useFetch, useToast, VModal, VModalBody, VModalFooter, VModalTitle, VSelectBox } from "@vertesia/ui/core";
3
+ import { useUserSession } from "@vertesia/ui/session";
4
+ import { useCallback, useState } from "react";
5
+ import { CreateCollectionForm } from "../../../collections";
6
+ import { useObjectsActionCallback } from "../ObjectsActionContext";
7
+ export function AddToCollectionActionComponent({ action, objectIds }) {
8
+ const [showModal, setShowModal] = useState(false);
9
+ const callback = useCallback(() => {
10
+ if (objectIds.length > 0) {
11
+ setShowModal(true);
12
+ }
13
+ return Promise.resolve(true);
14
+ }, [objectIds]);
15
+ const onClose = () => {
16
+ setShowModal(false);
17
+ };
18
+ useObjectsActionCallback(action.id, callback);
19
+ return showModal && _jsx(Portal, { children: _jsx(SelectCollectionModal, { objectIds: objectIds, isOpen: showModal, onClose: onClose }) });
20
+ }
21
+ export const AddToCollectionAction = {
22
+ id: "addToCollection",
23
+ name: 'Add to Collection',
24
+ description: 'Add documents to a collection',
25
+ confirm: false,
26
+ component: AddToCollectionActionComponent,
27
+ };
28
+ function SelectCollectionModal({ isOpen, onClose, objectIds }) {
29
+ return (_jsxs(VModal, { isOpen: isOpen, onClose: onClose, children: [_jsx(VModalTitle, { children: "Add to a Collection" }), _jsx(AddToCollectionForm, { onClose: onClose, objectIds: objectIds })] }));
30
+ }
31
+ function AddToCollectionForm({ onClose, objectIds }) {
32
+ const toast = useToast();
33
+ const { client } = useUserSession();
34
+ const [selectedCol, setSelectedCol] = useState();
35
+ const { data: collections, error } = useFetch(() => client.store.collections.list({ dynamic: false }), []);
36
+ const onAddToCollection = ({ collectionId }) => {
37
+ if (!collectionId || !objectIds?.length) {
38
+ return;
39
+ }
40
+ client.store.collections.addMembers(collectionId, objectIds).then(() => {
41
+ toast({
42
+ title: 'Add to collection success',
43
+ status: 'success',
44
+ description: `Added ${objectIds.length} objects to the selected collection`,
45
+ duration: 3000
46
+ });
47
+ onClose();
48
+ }).catch(() => {
49
+ toast({
50
+ title: 'Add to collection failure',
51
+ status: 'error',
52
+ description: `Failed to add the selected objects to the collection`,
53
+ duration: 5000
54
+ });
55
+ });
56
+ };
57
+ if (error) {
58
+ return _jsx(ErrorBox, { title: 'Collection fetch failed', children: error.message });
59
+ }
60
+ return (_jsxs(_Fragment, { children: [_jsx(VModalBody, { children: _jsx(VSelectBox, { filterBy: "name", value: selectedCol, onChange: (collection) => {
61
+ setSelectedCol(collection);
62
+ }, placeholder: "Select a collection", options: collections || [], optionLabel: (col) => col.name, by: "id", className: "mb-4" }) }), _jsx(VModalFooter, { children: _jsx(Button, { isDisabled: !selectedCol, onClick: () => selectedCol && onAddToCollection({ collectionId: selectedCol.id }), children: "Add to Collection" }) }), _jsxs("div", { className: "flex items-center flex-row w-full text-muted", children: [_jsx("hr", { className: "w-full" }), _jsx("div", { className: "px-2 text-xs", children: "OR" }), _jsx("hr", { className: "w-full" })] }), _jsx(CreateCollectionForm, { onClose: onClose, onAddToCollection: (id) => onAddToCollection({ collectionId: id }), redirect: false })] }));
63
+ }
64
+ //# sourceMappingURL=AddToCollectionAction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AddToCollectionAction.js","sourceRoot":"","sources":["../../../../../../../src/features/store/objects/selection/actions/AddToCollectionAction.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC5I,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAGnE,MAAM,UAAU,8BAA8B,CAAC,EAAE,MAAM,EAAE,SAAS,EAA4B;IAC1F,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAClD,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,EAAE;QAC9B,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACvB,YAAY,CAAC,IAAI,CAAC,CAAC;QACvB,CAAC;QACD,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC,EAAE,C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CAAC,WAAW,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,IAAI,iBAAiB,CAAC,EAAE,YAAY,EAAE,WAAW,CAAC,EAAE,EAAE,CAAC,kCAE1G,GACE,EACf,eAAK,SAAS,EAAC,8CAA8C,aACzD,aAAI,SAAS,EAAC,QAAQ,GAAG,EACzB,cAAK,SAAS,EAAC,cAAc,mBAAS,EACtC,aAAI,SAAS,EAAC,QAAQ,GAAG,IACvB,EACN,KAAC,oBAAoB,IAAC,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,CAAC,EAAU,EAAE,EAAE,CAAC,iBAAiB,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK,GAAI,IACxI,CACN,CAAA;AACL,CAAC"}
@@ -0,0 +1,53 @@
1
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
+ import { useToast } from "@vertesia/ui/core";
3
+ import { useUserSession } from "@vertesia/ui/session";
4
+ import { useCallback, useState } from "react";
5
+ import { SelectContentTypeModal } from "../../../../store";
6
+ import { useObjectsActionCallback } from "../ObjectsActionContext";
7
+ export function ChangeTypeActionComponent({ action, objectIds, children }) {
8
+ const { store } = useUserSession();
9
+ const toast = useToast();
10
+ const [isOpen, setOpen] = useState(false);
11
+ const callback = useCallback(() => {
12
+ setOpen(true);
13
+ return Promise.resolve(true);
14
+ }, []);
15
+ useObjectsActionCallback(action.id, callback);
16
+ const handleTypeSelect = (typeId) => {
17
+ // Close the modal
18
+ setOpen(false);
19
+ // If no selection was made
20
+ if (typeId === undefined) {
21
+ return;
22
+ }
23
+ // Execute the operation with the selected typeId
24
+ store.runOperation({
25
+ name: "change_type",
26
+ ids: objectIds,
27
+ params: { typeId }
28
+ }).then((r) => {
29
+ toast({
30
+ status: 'success',
31
+ title: 'Change Type',
32
+ description: `Change the type of ${objectIds.length} objects is ${r.status === 'in_progress' ? 'in progress' : 'completed'}`,
33
+ duration: 2000
34
+ });
35
+ }).catch(err => {
36
+ toast({
37
+ status: 'error',
38
+ title: 'Error changing type',
39
+ description: err.message,
40
+ duration: 5000
41
+ });
42
+ });
43
+ };
44
+ return (_jsxs("div", { children: [children, _jsx(SelectContentTypeModal, { isOpen: isOpen, onClose: handleTypeSelect, title: "Change Content Type", confirmLabel: "Change Type", children: _jsxs("div", { className: "text-sm flex flex-col gap-x-2", children: [_jsxs("p", { children: ["Choose a new Content Type for the selected object", objectIds.length > 1 ? 's' : ' ', "or let the system choose or generate a type based on the content."] }), _jsxs("p", { className: "pt-2 text-xs", children: ["Note: This action will raise the ", _jsx("code", { children: "change_type" }), " event and will trigger the standard intake workflows which may reset the object properties."] })] }) })] }));
45
+ }
46
+ export const ChangeTypeAction = {
47
+ id: "changeType",
48
+ name: 'Change Content Type',
49
+ description: 'Change the Content Type of the selected documents',
50
+ confirm: false,
51
+ component: ChangeTypeActionComponent,
52
+ };
53
+ //# sourceMappingURL=ChangeTypeAction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChangeTypeAction.js","sourceRoot":"","sources":["../../../../../../../src/features/store/objects/selection/actions/ChangeTypeAction.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAGnE,MAAM,UAAU,yBAAyB,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAA4B;IAC/F,MAAM,EAAE,KAAK,EAAE,GAAG,cAAc,EAAE,CAAC;IACnC,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC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qBAAqB,EAC3B,YAAY,EAAC,aAAa,YAE1B,eAAK,SAAS,EAAC,+BAA+B,aAC1C,6EAAqD,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,yEACZ,EACzE,aAAG,SAAS,EAAC,cAAc,kDAAkC,yCAAwB,oGACvC,IAC5C,GACe,IACvB,CACT,CAAA;AACL,CAAC;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAsB;IAC/C,EAAE,EAAE,YAAY;IAChB,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,mDAAmD;IAChE,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,yBAAyB;CACvC,CAAA"}
@@ -0,0 +1,30 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { ConfirmModal } from "@vertesia/ui/core";
3
+ import { useCallback, useState } from "react";
4
+ import { useObjectsActionCallback } from "../ObjectsActionContext";
5
+ /**
6
+ * Generic implementation of an action component.
7
+ * The action component is not the one which is clicked by the user, but the one that is registering the action callback.
8
+ * @param param0
9
+ * @returns
10
+ */
11
+ export default function ConfirmAction({ action, callback, children }) {
12
+ const [showConfirmModal, setShowConfirmModal] = useState(false);
13
+ const confirmationText = action.confirmationText || `Are you sure you want to ${action.name}?`;
14
+ const _callback = useCallback((params) => {
15
+ if (action.confirm) {
16
+ setShowConfirmModal(true);
17
+ return Promise.resolve(true);
18
+ }
19
+ else {
20
+ return callback(params);
21
+ }
22
+ }, [action.confirm, callback]);
23
+ const ctx = useObjectsActionCallback(action.id, _callback);
24
+ const onConfirm = () => {
25
+ setShowConfirmModal(false);
26
+ callback({ ...ctx.params, action });
27
+ };
28
+ return (_jsxs(_Fragment, { children: [children, _jsx(ConfirmModal, { onConfirm: onConfirm, onCancel: () => setShowConfirmModal(false), title: "Are you sure?", content: confirmationText, isOpen: showConfirmModal })] }));
29
+ }
30
+ //# sourceMappingURL=ConfirmAction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConfirmAction.js","sourceRoot":"","sources":["../../../../../../../src/features/store/objects/selection/actions/ConfirmAction.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAyB,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAQ1F;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAA+B;IAE7F,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAChE,MAAM,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,IAAI,4BAA4B,MAAM,CAAC,IAAI,GAAG,CAAC;IAE/F,MAAM,SAAS,GAAG,WAAW,CAAC,CAAC,MAA2B,EAAE,EAAE;QAC1D,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YACjB,mBAAmB,CAAC,IAAI,CAAC,CAAC;YAC1B,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACjC,CAAC;aAAM,CAAC;YACJ,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC;QAC5B,CAAC;IACL,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;IAE/B,MAAM,GAAG,GAAG,wBAAwB,CAAC,MAAM,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC;IAE3D,MAAM,SAAS,GAAG,GAAG,EAAE;QACnB,mBAAmB,CAAC,KAAK,CAAC,CAAC;QAC3B,QAAQ,CAAC,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACxC,CAAC,CAAC;IAEF,OAAO,CACH,8BACK,QAAQ,EACT,KAAC,YAAY,IAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,mBAAmB,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,gBAAgB,GAAI,IAChK,CACN,CAAC;AAGN,CAAC"}
@@ -0,0 +1,66 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useCallback } from 'react';
3
+ import { useToast } from '@vertesia/ui/core';
4
+ import { useNavigate } from "@vertesia/ui/router";
5
+ import { useUserSession } from '@vertesia/ui/session';
6
+ import { useDocumentSearch } from '../../../../store';
7
+ import { useObjectsActionContext } from '../ObjectsActionContext';
8
+ import ConfirmAction from './ConfirmAction';
9
+ function DeleteObjectsActionComponent({ action, objectIds, children }) {
10
+ const ctx = useObjectsActionContext();
11
+ const toast = useToast();
12
+ const { client } = useUserSession();
13
+ const search = useDocumentSearch();
14
+ const navigate = useNavigate();
15
+ const callback = useCallback(() => {
16
+ if (!objectIds || !objectIds.length) {
17
+ toast({
18
+ status: 'error',
19
+ title: 'No objects selected',
20
+ description: 'Please select objects to delete',
21
+ duration: 3000
22
+ });
23
+ return Promise.resolve(false);
24
+ }
25
+ return Promise.all(objectIds.map(id => client.store.objects.delete(id))).then((res) => {
26
+ const plural = res.length > 1 ? 's' : '';
27
+ toast({
28
+ status: 'success',
29
+ title: `${res.length} object${plural} deleted`,
30
+ description: `Objects ${res.map(d => d.id).join(", ")} have been deleted`,
31
+ duration: 2000
32
+ });
33
+ if (search) { // we are in the objects table view
34
+ ctx.params?.selection?.removeAll();
35
+ const facets = JSON.parse(JSON.stringify(search.facets));
36
+ if (objectIds.length === facets._value.total) {
37
+ search.resetFacets();
38
+ }
39
+ search.search();
40
+ }
41
+ else {
42
+ // we are in the object view
43
+ // go back to the parent
44
+ navigate("/objects");
45
+ }
46
+ }).catch(err => {
47
+ toast({
48
+ status: 'error',
49
+ title: 'Error deleting objects',
50
+ description: err.message,
51
+ duration: 5000
52
+ });
53
+ });
54
+ }, [objectIds]);
55
+ return (_jsx(ConfirmAction, { action: action, callback: callback, children: children }));
56
+ }
57
+ export const DeleteObjectsAction = {
58
+ id: 'delete',
59
+ name: 'Delete',
60
+ description: 'Delete the selected objects',
61
+ confirm: true,
62
+ confirmationText: 'Are you sure you want to delete the selected objects?',
63
+ component: DeleteObjectsActionComponent,
64
+ destructive: true
65
+ };
66
+ //# sourceMappingURL=DeleteObjectsAction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeleteObjectsAction.js","sourceRoot":"","sources":["../../../../../../../src/features/store/objects/selection/actions/DeleteObjectsAction.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAElE,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAE5C,SAAS,4BAA4B,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAA4B;IAC3F,MAAM,GAAG,GAAG,uBAAuB,EAAE,CAAC;IAEtC,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,EAAE,MAAM,EAAE,GAAG,cAAc,EAAE,CAAC;IACpC,MAAM,MAAM,GAAG,iBAAiB,EAAE,CAAC;IACnC,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAE/B,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,EAAE;QAC9B,IAAI,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC;YAClC,KAAK,CAAC;gBACF,MAAM,EAAE,OAAO;gBACf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YACzB,CAAC;QACL,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;YACX,KAAK,CAAC;gBACF,MAAM,EAAE,OAAO;gBACf,KAAK,EAAE,wBAAwB;gBAC/B,WAAW,EAAE,GAAG,CAAC,OAAO;gBACxB,QAAQ,EAAE,IAAI;aACjB,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IAEhB,OAAO,CACH,KAAC,aAAa,IAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,YAC5C,QAAQ,GACG,CACnB,CAAA;AACL,CAAC;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAsB;IAClD,EAAE,EAAE,QAAQ;IACZ,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,6BAA6B;IAC1C,OAAO,EAAE,IAAI;IACb,gBAAgB,EAAE,uDAAuD;IACzE,SAAS,EAAE,4BAA4B;IACvC,WAAW,EAAE,IAAI;CACpB,CAAA"}
@@ -0,0 +1,106 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useToast } from "@vertesia/ui/core";
3
+ import { useUserSession } from "@vertesia/ui/session";
4
+ import { useCallback, useState } from "react";
5
+ import { ExportPropertiesModal, ExportTypes } from "../../../../store";
6
+ import { useObjectsActionCallback } from "../ObjectsActionContext";
7
+ export function ExportPropertiesComponent({ action, objectIds }) {
8
+ const { store } = useUserSession();
9
+ const toast = useToast();
10
+ const [isOpen, setOpen] = useState(false);
11
+ const [isExporting, setIsExporting] = useState(false);
12
+ const callback = useCallback(() => {
13
+ setOpen(true);
14
+ return Promise.resolve(true);
15
+ }, []);
16
+ const ctx = useObjectsActionCallback(action.id, callback);
17
+ const onExportType = (exportType, exportAll) => {
18
+ if (exportType && (exportAll || objectIds.length > 0)) {
19
+ setIsExporting(true);
20
+ const query = ctx.params?.search?.query || {};
21
+ const search_objectIds = ctx.params?.search?.result?.value?.objects?.map(obj => obj.id) || undefined;
22
+ const getChildObjects = async (objectId) => {
23
+ return store.objects.list({
24
+ query: {
25
+ parent: objectId,
26
+ }
27
+ }).then((response) => {
28
+ return response.map(obj => obj.id);
29
+ });
30
+ };
31
+ const getObjectIds = async () => {
32
+ if (exportAll) {
33
+ // If there is a vector search use that.
34
+ if (search_objectIds) {
35
+ return query.vector ? search_objectIds : [];
36
+ }
37
+ // Nothing is selected, export all objects.
38
+ if (objectIds.length === 0) {
39
+ return [];
40
+ }
41
+ // If there is no search, and 1 object is selected we are on the object page.
42
+ // Export all children of the object and the object itself.
43
+ return (await getChildObjects(objectIds[0])).concat(objectIds);
44
+ }
45
+ else {
46
+ return objectIds;
47
+ }
48
+ };
49
+ getObjectIds().then((Ids) => {
50
+ // When exporting all, send search result if a vector search was used
51
+ // otherwise send the query.
52
+ store.objects.exportProperties({
53
+ objectIds: Ids,
54
+ type: exportType,
55
+ query: exportAll && !query.vector ? query : { type: query.type },
56
+ }).then((response) => {
57
+ let data;
58
+ if (exportType === ExportTypes.CSV) {
59
+ data = new Blob([response.data], { type: response.type });
60
+ }
61
+ else if (exportType === ExportTypes.JSON) {
62
+ data = new Blob([JSON.stringify(response.data)], { type: response.type });
63
+ }
64
+ else {
65
+ const responseData = response.data;
66
+ data = new Blob([new Uint8Array(responseData.data)], { type: response.type });
67
+ }
68
+ const url = window.URL.createObjectURL(data);
69
+ const a = document.createElement('a');
70
+ a.download = response.name;
71
+ a.href = url;
72
+ a.click();
73
+ toast({
74
+ status: 'success',
75
+ title: 'Export Properties',
76
+ description: exportAll ? 'Export the properties of all objects completed'
77
+ : `Export the properties of ${objectIds.length} object${objectIds.length > 1 ? 's' : ''} is completed`,
78
+ duration: 2000
79
+ });
80
+ }).catch(err => {
81
+ toast({
82
+ status: 'error',
83
+ title: 'Error Export Properties',
84
+ description: err.message,
85
+ duration: 5000
86
+ });
87
+ }).finally(() => {
88
+ setIsExporting(false);
89
+ setOpen(false);
90
+ });
91
+ });
92
+ }
93
+ else {
94
+ setOpen(false);
95
+ }
96
+ };
97
+ return (_jsx("div", { children: _jsx(ExportPropertiesModal, { isExporting: isExporting, isOpen: isOpen, onClose: onExportType }) }));
98
+ }
99
+ export const ExportPropertiesAction = {
100
+ id: "exportProperties",
101
+ name: 'Export Properties',
102
+ description: 'Export all Object Properties',
103
+ confirm: false,
104
+ component: ExportPropertiesComponent,
105
+ };
106
+ //# sourceMappingURL=ExportPropertiesAction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExportPropertiesAction.js","sourceRoot":"","sources":["../../../../../../../src/features/store/objects/selection/actions/ExportPropertiesAction.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAGnE,MAAM,UAAU,yBAAyB,CAAC,EAAE,MAAM,EAAE,SAAS,EAA4B;IACrF,MAAM,EAAE,KAAK,EAAE,GAAG,cAAc,EAAE,CAAC;IACnC,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC1C,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACtD,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,EAAE;QAC9B,OAAO,CAAC,IAAI,CAAC,CAAC;QACd,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC,EAAE,EAAE,CAAC,CAAA;IAEN,MAAM,GAAG,GAAG,wBAAwB,CAAC,MAAM,CAAC,EA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ACrD,EAAE,EAAE,kBAAkB;IACtB,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,8BAA8B;IAC3C,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,yBAAyB;CACvC,CAAA"}
@@ -0,0 +1,64 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useCallback } from 'react';
3
+ import { useToast } from '@vertesia/ui/core';
4
+ import { useUserSession } from '@vertesia/ui/session';
5
+ import { useDocumentSearch } from '../../search';
6
+ import { useObjectsActionContext } from '../ObjectsActionContext';
7
+ import ConfirmAction from './ConfirmAction';
8
+ function RemoveFromCollectionActionComponent({ action, objectIds, collectionId }) {
9
+ const ctx = useObjectsActionContext();
10
+ const toast = useToast();
11
+ const { client } = useUserSession();
12
+ const search = useDocumentSearch();
13
+ const callback = useCallback(() => {
14
+ if (!objectIds || !objectIds.length) {
15
+ toast({
16
+ status: 'error',
17
+ title: 'No objects selected',
18
+ description: 'Please select objects to remove from collection',
19
+ duration: 3000
20
+ });
21
+ return Promise.resolve(false);
22
+ }
23
+ if (!collectionId) {
24
+ toast({
25
+ status: 'error',
26
+ title: 'No collection context',
27
+ description: 'Cannot remove objects: no collection specified',
28
+ duration: 3000
29
+ });
30
+ return Promise.resolve(false);
31
+ }
32
+ return client.store.collections.deleteMembers(collectionId, objectIds).then(() => {
33
+ const plural = objectIds.length > 1 ? 's' : '';
34
+ toast({
35
+ status: 'success',
36
+ title: `${objectIds.length} object${plural} removed from collection`,
37
+ description: `Objects have been removed from the collection`,
38
+ duration: 2000
39
+ });
40
+ if (search) {
41
+ ctx.params?.selection?.removeAll();
42
+ search.search();
43
+ }
44
+ }).catch((err) => {
45
+ toast({
46
+ status: 'error',
47
+ title: 'Error removing objects from collection',
48
+ description: err.message,
49
+ duration: 5000
50
+ });
51
+ });
52
+ }, [objectIds, collectionId]);
53
+ return (_jsx(ConfirmAction, { action: action, callback: callback }));
54
+ }
55
+ export const RemoveFromCollectionAction = {
56
+ id: 'removeFromCollection',
57
+ name: 'Remove from Collection',
58
+ description: 'Remove the selected objects from this collection',
59
+ confirm: true,
60
+ confirmationText: 'Are you sure you want to remove the selected objects from this collection?',
61
+ component: RemoveFromCollectionActionComponent,
62
+ destructive: true
63
+ };
64
+ //# sourceMappingURL=RemoveFromCollectionAction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RemoveFromCollectionAction.js","sourceRoot":"","sources":["../../../../../../../src/features/store/objects/selection/actions/RemoveFromCollectionAction.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAElE,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAE5C,SAAS,mCAAmC,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAA4B;IACtG,MAAM,GAAG,GAAG,uBAAuB,EAAE,CAAC;IAEtC,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,EAAE,MAAM,EAAE,GAAG,cAAc,EAAE,CAAC;IACpC,MAAM,MAAM,GAAG,iBAAiB,EAAE,CAAC;IAEnC,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,EAAE;QAC9B,IAAI,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC;YAClC,KAAK,CAAC;gBACF,MAAM,EAAE,OAAO;gBACf,KAAK,EAAE,qBAAqB;gBAC5B,WAAW,EAAE,iDAAiD;gBAC9D,QAAQ,EAAE,IAAI;aACjB,CAAC,CAAC;YACH,OAAO,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAClC,CAAC;QAED,IAAI,CAAC,YAAY,EAAE,CAAC;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,EAAE,wBAAwB;IAC9B,WAAW,EAAE,kDAAkD;IAC/D,OAAO,EAAE,IAAI;IACb,gBAAgB,EAAE,4EAA4E;IAC9F,SAAS,EAAE,mCAAmC;IAC9C,WAAW,EAAE,IAAI;CACpB,CAAA"}
@@ -0,0 +1,72 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useUserSession } from "@vertesia/ui/session";
3
+ import { Button, VModal, VModalBody, VModalFooter, VModalTitle, SelectList, useToast } from "@vertesia/ui/core";
4
+ import { useCallback, useState } from "react";
5
+ import { useObjectsActionCallback, useObjectsActionContext } from "../ObjectsActionContext";
6
+ export function StartWorkflowComponent({ action, objectIds, collectionId }) {
7
+ const toast = useToast();
8
+ const { client } = useUserSession();
9
+ const [isOpen, setOpen] = useState(false);
10
+ const callback = useCallback(() => {
11
+ setOpen(true);
12
+ return Promise.resolve(true);
13
+ }, []);
14
+ const onStartWorkflow = (workflowId) => {
15
+ setOpen(false);
16
+ if (!workflowId) {
17
+ return;
18
+ }
19
+ // const objectIds = params.selection.getObjectIds();
20
+ // const workflowId = params.action.id;
21
+ return client.store.workflows.rules
22
+ .execute(workflowId, objectIds, { collection_id: collectionId })
23
+ .then(() => {
24
+ toast({
25
+ title: "Workflow started",
26
+ status: "success",
27
+ duration: 3000,
28
+ });
29
+ })
30
+ .catch((err) => {
31
+ toast({
32
+ title: "Error starting workflow",
33
+ status: "error",
34
+ description: err.message,
35
+ duration: 9000,
36
+ });
37
+ });
38
+ };
39
+ useObjectsActionCallback(action.id, callback);
40
+ return _jsx(StartWorkflowModal, { isOpen: isOpen, onClose: onStartWorkflow });
41
+ }
42
+ export const StartWorkflowAction = {
43
+ id: "startWorkflow",
44
+ name: "Start Workflow",
45
+ description: "Start an workflow on the selected objects",
46
+ confirm: false,
47
+ hideInList: true,
48
+ component: StartWorkflowComponent,
49
+ };
50
+ function StartWorkflowModal({ isOpen, onClose }) {
51
+ return (_jsxs(VModal, { onClose: () => onClose(undefined), isOpen: isOpen, className: "", children: [_jsx(VModalTitle, { children: "Start a Workflow by Rule" }), _jsx(StartWorkflowBody, { onClose: onClose })] }));
52
+ }
53
+ function optionLayout(option) {
54
+ return {
55
+ label: (_jsxs("div", { children: [_jsx("div", { children: option.name }), _jsx("div", { className: "text-sm text-muted", children: option.description })] })),
56
+ reverse: true,
57
+ };
58
+ }
59
+ function StartWorkflowBody({ onClose }) {
60
+ const [selected, setSelected] = useState(undefined);
61
+ const context = useObjectsActionContext();
62
+ const onSelect = (value) => {
63
+ setSelected(value);
64
+ };
65
+ const onStart = () => {
66
+ if (selected) {
67
+ onClose(selected.id);
68
+ }
69
+ };
70
+ return (_jsxs("div", { children: [_jsxs(VModalBody, { children: [_jsx("div", { className: "pb-2", children: "Choose a workflow rule to start:" }), _jsx("div", { className: "max-h-[420px] overflow-y-scroll border-border border rounded-md", children: _jsx(SelectList, { options: context.wfRules, optionLayout: optionLayout, onChange: onSelect, value: selected }) })] }), _jsxs(VModalFooter, { children: [_jsx(Button, { variant: "secondary", onClick: () => onClose(), children: "Cancel" }), _jsx(Button, { onClick: onStart, isDisabled: !selected, children: "Start" })] })] }));
71
+ }
72
+ //# sourceMappingURL=StartWorkflowComponent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StartWorkflowComponent.js","sourceRoot":"","sources":["../../../../../../../src/features/store/objects/selection/actions/StartWorkflowComponent.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAChH,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAG5F,MAAM,UAAU,sBAAsB,CAAC,EAAE,MAAM,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,EAC5D,cAAK,SAAS,EAAC,iEAAiE,YAC5E,KAAC,UAAU,IACP,OAAO,EAAE,OAAO,CAAC,OAAO,EACxB,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,QAAQ,GACjB,GACA,IACG,EACb,MAAC,YAAY,eACT,KAAC,MAAM,IAAC,OAAO,EAAC,WAAW,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,uBAE3C,EACT,KAAC,MAAM,IAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,QAAQ,sBAEtC,IACE,IACb,CACT,CAAC;AACN,CAAC"}
@@ -0,0 +1,8 @@
1
+ export * from "./AddToCollectionAction";
2
+ export * from "./ChangeTypeAction";
3
+ export * from "./ConfirmAction";
4
+ export * from "./DeleteObjectsAction";
5
+ export * from "./ExportPropertiesAction";
6
+ export * from "./RemoveFromCollectionAction";
7
+ export * from "./StartWorkflowComponent";
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/features/store/objects/selection/actions/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from "./actions";
2
+ export * from "./ObjectsActionContext";
3
+ export * from "./ObjectsActionSpec";
4
+ export * from "./SelectionActions";
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/features/store/objects/selection/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC"}