@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,128 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { NavLink } from "@vertesia/ui/router";
3
+ import dayjs from "dayjs";
4
+ import LocalizedFormat from "dayjs/plugin/localizedFormat";
5
+ import RelativeTime from "dayjs/plugin/relativeTime";
6
+ import { shortId } from "../../../utils";
7
+ dayjs.extend(RelativeTime);
8
+ dayjs.extend(LocalizedFormat);
9
+ const renderers = {
10
+ string(params) {
11
+ let transforms = [];
12
+ if (params) {
13
+ const slice = params.get("slice");
14
+ if (slice) {
15
+ transforms.push((value) => value.slice(parseInt(slice)));
16
+ }
17
+ const max_length = params.get("max_length");
18
+ if (max_length) {
19
+ transforms.push((value) => value.slice(0, parseInt(max_length)));
20
+ }
21
+ if (params.has("upper")) {
22
+ transforms.push((value) => value.toUpperCase());
23
+ }
24
+ if (params.has("lower")) {
25
+ transforms.push((value) => value.toLowerCase());
26
+ }
27
+ if (params.has("capitalize")) {
28
+ transforms.push((value) => value[0].toUpperCase() + value.substring(1));
29
+ }
30
+ if (params.has("ellipsis")) {
31
+ transforms.push((value) => value + "...");
32
+ }
33
+ }
34
+ return (value, index) => {
35
+ let v;
36
+ if (value) {
37
+ v = String(value);
38
+ if (transforms.length > 0) {
39
+ for (const t of transforms) {
40
+ v = t(v);
41
+ }
42
+ }
43
+ }
44
+ else {
45
+ v = "";
46
+ }
47
+ return _jsx("td", { children: v }, index);
48
+ };
49
+ },
50
+ fileSize(_params) {
51
+ return (value, index) => {
52
+ let fileSize = "";
53
+ if (value) {
54
+ const bytes = Number(value);
55
+ if (!isNaN(bytes)) {
56
+ const sizes = ["Bytes", "KB", "MB", "GB", "TB"];
57
+ if (bytes === 0) {
58
+ fileSize = "0 Bytes";
59
+ }
60
+ else {
61
+ const i = Math.floor(Math.log(bytes) / Math.log(1024));
62
+ fileSize = `${(bytes / Math.pow(1024, i)).toFixed(2)} ${sizes[i]}`;
63
+ }
64
+ }
65
+ else {
66
+ fileSize = String(value);
67
+ }
68
+ }
69
+ return _jsx("td", { children: fileSize }, index);
70
+ };
71
+ },
72
+ number(params) {
73
+ let currency;
74
+ let decimals;
75
+ if (params) {
76
+ currency = params.get("currency") || undefined;
77
+ decimals = params.get("decimals") || undefined;
78
+ }
79
+ const digits = decimals ? parseInt(decimals) : 2;
80
+ return (value, index) => {
81
+ let v = new Intl.NumberFormat("en-US", {
82
+ style: currency ? "currency" : "decimal",
83
+ currency,
84
+ maximumFractionDigits: digits,
85
+ }).format(value);
86
+ return _jsx("td", { children: v }, index);
87
+ };
88
+ },
89
+ // value must be the object itself
90
+ objectLink(params) {
91
+ let title = "title";
92
+ //let underline = "hover";
93
+ if (params) {
94
+ title = params.get("title") || "title";
95
+ //underline = params.get("underline") || "hover";
96
+ }
97
+ return (value, index) => {
98
+ return (_jsx("td", { children: _jsx(NavLink, { topLevelNav: true, className: "underline text-indigo-800 dark:text-indigo-300", href: `/store/objects/${value.id}`, children: value.properties?.[title] || value.name || shortId(value.id) }) }, index));
99
+ };
100
+ },
101
+ typeLink(_params) {
102
+ return (value, index) => {
103
+ return _jsx("td", { children: value?.name || "n/a" }, index);
104
+ };
105
+ },
106
+ date(params) {
107
+ let method = "format";
108
+ let arg = "LLL";
109
+ if (params) {
110
+ const localized = params.get("localized");
111
+ if (localized) {
112
+ arg = localized;
113
+ }
114
+ else {
115
+ const relative = params.get("relative");
116
+ if (relative) {
117
+ method = relative; // fromNow or toNow
118
+ arg = undefined;
119
+ }
120
+ }
121
+ }
122
+ return (value, index) => {
123
+ return _jsx("td", { children: dayjs(value)[method](arg) }, index);
124
+ };
125
+ },
126
+ };
127
+ export default renderers;
128
+ //# sourceMappingURL=renderers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderers.js","sourceRoot":"","sources":["../../../../../../src/features/store/objects/layout/renderers.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAC3D,OAAO,YAAY,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;AAC3B,KAAK,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;AAE9B,MAAM,SAAS,GAAiG;IAC5G,MAAM,CAAC,MAAwB;QAC3B,IAAI,UAAU,GAAkC,EAAE,CAAC;QACnD,IAAI,MAAM,EAAE,CAAC;YACT,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,C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AAK,CAAC,EAAE,EAAE,YAEjC,KAAK,CAAC,UAAU,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,IAAI,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,GACvD,IAPL,KAAK,CAQT,CACR,CAAC;QACN,CAAC,CAAC;IACN,CAAC;IACD,QAAQ,CAAC,OAAyB;QAC9B,OAAO,CAAC,KAAU,EAAE,KAAa,EAAE,EAAE;YACjC,OAAO,uBAAiB,KAAK,EAAE,IAAI,IAAI,KAAK,IAA5B,KAAK,CAA6B,CAAC;QACvD,CAAC,CAAC;IACN,CAAC;IACD,IAAI,CAAC,MAAwB;QACzB,IAAI,MAAM,GAAG,QAAQ,CAAC;QACtB,IAAI,GAAG,GAAuB,KAAK,CAAC;QACpC,IAAI,MAAM,EAAE,CAAC;YACT,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;YAC1C,IAAI,SAAS,EAAE,CAAC;gBACZ,GAAG,GAAG,SAAS,CAAC;YACpB,CAAC;iBAAM,CAAC;gBACJ,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;gBACxC,IAAI,QAAQ,EAAE,CAAC;oBACX,MAAM,GAAG,QAAQ,CAAC,CAAC,mBAAmB;oBACtC,GAAG,GAAG,SAAS,CAAC;gBACpB,CAAC;YACL,CAAC;QACL,CAAC;QACD,OAAO,CAAC,KAAU,EAAE,KAAa,EAAE,EAAE;YACjC,OAAO,uBAAkB,KAAK,CAAC,KAAK,CAAS,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,IAA1C,KAAK,CAA2C,CAAC;QACrE,CAAC,CAAC;IACN,CAAC;CACJ,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -0,0 +1,150 @@
1
+ import { createContext, useContext } from 'react';
2
+ import { SharedState, useWatchSharedState } from '@vertesia/ui/core';
3
+ export class DocumentSearch {
4
+ client;
5
+ limit;
6
+ collectionId;
7
+ facets = new SharedState({});
8
+ result = new SharedState({ objects: [], isLoading: false });
9
+ facetSpecs = [];
10
+ query = {};
11
+ constructor(client, limit = 100) {
12
+ this.client = client;
13
+ this.limit = limit;
14
+ }
15
+ withFacets(facets) {
16
+ this.facetSpecs = facets;
17
+ return this;
18
+ }
19
+ get objects() {
20
+ return this.result.value.objects;
21
+ }
22
+ get error() {
23
+ return this.result.value.error;
24
+ }
25
+ get isRunning() {
26
+ return this.result.value.isLoading;
27
+ }
28
+ getFilterValue(name) {
29
+ return this.query[name];
30
+ }
31
+ setFilterValue(name, value) {
32
+ this.query[name] = value;
33
+ // search now
34
+ this.search();
35
+ }
36
+ clearFilters() {
37
+ const parent = this.query.parent;
38
+ this.query = {
39
+ parent
40
+ };
41
+ this.search();
42
+ }
43
+ getFacetBuckets(name) {
44
+ return this.facets.value[name]?.buckets || [];
45
+ }
46
+ resetFacets() {
47
+ this.query = {};
48
+ }
49
+ reset(isLoading = false) {
50
+ this.result.value = {
51
+ objects: [],
52
+ isLoading
53
+ };
54
+ }
55
+ _updateRunningState(value) {
56
+ const prev = this.result.value;
57
+ this.result.value = {
58
+ objects: prev.objects,
59
+ isLoading: value,
60
+ error: prev.error
61
+ };
62
+ }
63
+ _searchRequest(query, limit, offset) {
64
+ return this.collectionId ?
65
+ this.client.collections.searchMembers(this.collectionId, {
66
+ limit,
67
+ offset,
68
+ query
69
+ })
70
+ : this.client.objects.search({
71
+ limit,
72
+ offset,
73
+ query
74
+ });
75
+ }
76
+ _facetsRequest() {
77
+ return this.collectionId ?
78
+ this.client.collections.computeFacets(this.collectionId, {
79
+ facets: this.facetSpecs,
80
+ query: this.query
81
+ })
82
+ : this.client.objects.computeFacets({
83
+ facets: this.facetSpecs,
84
+ query: this.query
85
+ });
86
+ }
87
+ computeFacets(_query) {
88
+ this._facetsRequest().then((facets) => {
89
+ this.facets.value = facets;
90
+ });
91
+ }
92
+ _search(loadMore = false) {
93
+ if (this.isRunning) { // avoid searching when a search is pending
94
+ return Promise.resolve(false);
95
+ }
96
+ this.result.value = {
97
+ isLoading: true,
98
+ objects: loadMore ? this.objects : [],
99
+ };
100
+ const limit = this.limit;
101
+ const offset = this.objects.length;
102
+ return this._searchRequest(this.query, limit, offset).then(async (res) => {
103
+ this.result.value = {
104
+ isLoading: false,
105
+ objects: this.objects.concat(res)
106
+ };
107
+ return true;
108
+ }).catch((err) => {
109
+ this.result.value = {
110
+ error: err,
111
+ isLoading: false,
112
+ objects: this.objects
113
+ };
114
+ throw err;
115
+ });
116
+ }
117
+ search(noFacets = false) {
118
+ if (this.isRunning)
119
+ return Promise.resolve(false);
120
+ !noFacets && this.computeFacets(this.query);
121
+ return this._search(false);
122
+ }
123
+ loadMore(noFacets = false) {
124
+ if (this.isRunning)
125
+ return Promise.resolve(false);
126
+ if (this.objects.length === 0) {
127
+ !noFacets && this.computeFacets(this.query);
128
+ }
129
+ return this._search(true);
130
+ }
131
+ }
132
+ const DocumentSearchContext = createContext(undefined);
133
+ export function useDocumentSearch() {
134
+ return useContext(DocumentSearchContext);
135
+ }
136
+ export function useWatchDocumentSearchFacets() {
137
+ return useWatchSharedState(useDocumentSearch().facets);
138
+ }
139
+ export function useWatchDocumentSearchResult() {
140
+ const search = useDocumentSearch();
141
+ const result = useWatchSharedState(search.result);
142
+ return { ...result, search };
143
+ }
144
+ export function useDocumentSearchCount() {
145
+ const search = useDocumentSearch();
146
+ const result = useWatchSharedState(search.facets);
147
+ return result.total;
148
+ }
149
+ export { DocumentSearchContext as SearchContext };
150
+ //# sourceMappingURL=DocumentSearchContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DocumentSearchContext.js","sourceRoot":"","sources":["../../../../../../src/features/store/objects/search/DocumentSearchContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAElD,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAWrE,MAAM,OAAO,cAAc;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,EAAE,CAAC"}
@@ -0,0 +1,41 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useUserSession } from "@vertesia/ui/session";
3
+ import { useMemo } from "react";
4
+ import { DocumentSearch, SearchContext } from "./DocumentSearchContext";
5
+ export function DocumentSearchProvider({ children, limit, parent, typeId, facets, similarTo, embeddingType, name, collectionId }) {
6
+ const { store } = useUserSession();
7
+ const search = useMemo(() => {
8
+ let facetSpecs;
9
+ if (facets) {
10
+ facetSpecs = facets;
11
+ }
12
+ else {
13
+ facetSpecs = [
14
+ {
15
+ name: 'status',
16
+ field: 'status'
17
+ },
18
+ {
19
+ name: 'location',
20
+ field: 'location'
21
+ }
22
+ ];
23
+ if (!typeId) {
24
+ facetSpecs.unshift({
25
+ name: 'type',
26
+ field: 'type'
27
+ });
28
+ }
29
+ }
30
+ const search = new DocumentSearch(store, limit).withFacets(facetSpecs);
31
+ search.collectionId = collectionId;
32
+ search.query.type = typeId;
33
+ search.query.parent = parent;
34
+ search.query.similarTo = similarTo;
35
+ search.query.embeddingType = embeddingType;
36
+ search.query.name = name;
37
+ return search;
38
+ }, [typeId, limit]);
39
+ return (_jsx(SearchContext.Provider, { value: search, children: children }));
40
+ }
41
+ //# sourceMappingURL=DocumentSearchProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DocumentSearchProvider.js","sourceRoot":"","sources":["../../../../../../src/features/store/objects/search/DocumentSearchProvider.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAc,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAaxE,MAAM,UAAU,sBAAsB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,IAAI,EAAE,YAAY,EAA+B;IACzJ,MAAM,E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 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/features/store/objects/search/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA;AACvC,cAAc,0BAA0B,CAAA"}
@@ -0,0 +1,149 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { createContext, useContext, useEffect, useMemo } from 'react';
3
+ import { ErrorBox, useFetch, useToast } from '@vertesia/ui/core';
4
+ import { useUserSession } from '@vertesia/ui/session';
5
+ import { useDocumentSearch, useDocumentSelection } from '../../../store';
6
+ import { AddToCollectionAction } from './actions/AddToCollectionAction';
7
+ import { ChangeTypeAction } from './actions/ChangeTypeAction';
8
+ import { DeleteObjectsAction } from './actions/DeleteObjectsAction';
9
+ import { ExportPropertiesAction } from './actions/ExportPropertiesAction';
10
+ import { RemoveFromCollectionAction } from './actions/RemoveFromCollectionAction';
11
+ import { StartWorkflowAction, StartWorkflowComponent } from './actions/StartWorkflowComponent';
12
+ export class ObjectsActionContext {
13
+ params;
14
+ allActions = [
15
+ ExportPropertiesAction,
16
+ ChangeTypeAction,
17
+ StartWorkflowAction,
18
+ AddToCollectionAction,
19
+ DeleteObjectsAction,
20
+ RemoveFromCollectionAction,
21
+ ];
22
+ wfRules = [];
23
+ callbacks = {};
24
+ startWorkflow;
25
+ constructor(params) {
26
+ this.params = params;
27
+ }
28
+ get actions() {
29
+ const isInCollection = !!this.params.selection?.collectionId;
30
+ if (isInCollection) {
31
+ return this.allActions.filter(action => action.id !== 'addToCollection' && action.id !== 'delete');
32
+ }
33
+ else {
34
+ return this.allActions.filter(action => action.id !== 'removeFromCollection');
35
+ }
36
+ }
37
+ async loadWorkflows() {
38
+ this.params.client.workflows.rules.list().then((rules) => {
39
+ this.wfRules = rules.map(rule => ({
40
+ id: rule.id,
41
+ name: rule.name,
42
+ description: rule.description,
43
+ confirm: false,
44
+ isWorkflow: true,
45
+ component: StartWorkflowComponent
46
+ })).sort((a, b) => a.name.localeCompare(b.name));
47
+ });
48
+ return this.wfRules;
49
+ }
50
+ registerCallback(name, cb) {
51
+ this.callbacks[name] = cb;
52
+ return () => {
53
+ delete this.callbacks[name];
54
+ };
55
+ }
56
+ unregisterCallback(name) {
57
+ delete this.callbacks[name];
58
+ }
59
+ findAction(actionId) {
60
+ let action = this.allActions.find(a => a.id === actionId);
61
+ if (!action) {
62
+ action = this.wfRules.find(a => a.id === actionId);
63
+ }
64
+ return action;
65
+ }
66
+ async run(actionId) {
67
+ const action = this.findAction(actionId);
68
+ if (!action) {
69
+ throw new Error(`Action ${actionId} not found`);
70
+ }
71
+ const params = { ...this.params, action };
72
+ // if (action.isWorkflow) {
73
+ // if (!this.startWorkflow) {
74
+ // throw new Error("No startWorkflow callback set");
75
+ // }
76
+ // return this.startWorkflow(params);
77
+ // } else {
78
+ const cb = this.callbacks[actionId];
79
+ if (cb) {
80
+ return cb(params);
81
+ }
82
+ else {
83
+ throw new Error("No action callback set");
84
+ }
85
+ // }
86
+ }
87
+ }
88
+ const ObjectsActionContextReact = createContext(undefined);
89
+ export function ObjectsActionContextProvider({ children }) {
90
+ const selection = useDocumentSelection();
91
+ const toast = useToast();
92
+ const { client } = useUserSession();
93
+ const search = useDocumentSearch();
94
+ const { data: rules, error } = useFetch(() => {
95
+ return client.workflows.rules.list().then((rules) => {
96
+ return rules.map(rule => ({
97
+ id: rule.id,
98
+ name: rule.name,
99
+ description: rule.description,
100
+ confirm: false,
101
+ isWorkflow: true,
102
+ component: StartWorkflowComponent
103
+ })).sort((a, b) => a.name.localeCompare(b.name));
104
+ });
105
+ }, []);
106
+ const context = useMemo(() => {
107
+ const context = new ObjectsActionContext({
108
+ selection, toast, client, search
109
+ });
110
+ context.wfRules = rules;
111
+ return context;
112
+ }, [selection, rules]);
113
+ if (error) {
114
+ return _jsx(ErrorBox, { title: "Failed to fetch workflows", children: error.message });
115
+ }
116
+ return (context && (_jsxs(ObjectsActionContextReact.Provider, { value: context, children: [_jsx(Actions, {}), children] })));
117
+ }
118
+ function Actions({}) {
119
+ const context = useObjectsActionContext();
120
+ const selection = context.params.selection;
121
+ const objectId = selection.getObjectId();
122
+ const objectIds = selection.isSingleSelection() && objectId ? [objectId] : selection.getObjectIds();
123
+ return (_jsx("div", { style: { display: 'none' }, children: context.allActions.map(action => (_jsx(action.component, { action: action, objectIds: objectIds, collectionId: selection.collectionId }, action.id))) }));
124
+ }
125
+ export function useObjectsActionContext() {
126
+ const ctx = useContext(ObjectsActionContextReact);
127
+ if (!ctx) {
128
+ throw new Error("You cannot use useActionContext outside an ActionProvider");
129
+ }
130
+ return ctx;
131
+ }
132
+ export function useObjectsActionCallback(name, cb) {
133
+ const ctx = useObjectsActionContext();
134
+ useEffect(() => {
135
+ return ctx.registerCallback(name, cb);
136
+ }, [ctx, name, cb]);
137
+ return ctx;
138
+ }
139
+ export function useStartWorkflowCallback(cb) {
140
+ const ctx = useObjectsActionContext();
141
+ useEffect(() => {
142
+ ctx.startWorkflow = cb;
143
+ return () => {
144
+ ctx.startWorkflow = undefined;
145
+ };
146
+ }, [cb, ctx]);
147
+ return ctx;
148
+ }
149
+ //# sourceMappingURL=ObjectsActionContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ObjectsActionContext.js","sourceRoot":"","sources":["../../../../../../src/features/store/objects/selection/ObjectsActionContext.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAa,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEjF,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OA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M,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,CAAC,YAAY,IAArF,MAAM,CAAC,EAAE,CAAgF,CACnH,CAAC,GAEJ,CACT,CAAA;AACL,CAAC;AAED,MAAM,UAAU,uBAAuB;IACnC,MAAM,GAAG,GAAG,UAAU,CAAC,yBAAyB,CAAC,CAAC;IAClD,IAAI,CAAC,GAAG,EAAE,CAAC;QACP,MAAM,IAAI,KAAK,CAAC,2DAA2D,CAAC,CAAC;IACjF,CAAC;IACD,OAAO,GAAG,CAAC;AACf,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,IAAY,EAAE,EAAyB;IAC5E,MAAM,GAAG,GAAG,uBAAuB,EAAE,CAAC;IACtC,SAAS,CAAC,GAAG,EAAE;QACX,OAAO,GAAG,CAAC,gBAAgB,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IAC1C,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;IACpB,OAAO,GAAG,CAAC;AACf,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,EAAyB;IAC9D,MAAM,GAAG,GAAG,uBAAuB,EAAE,CAAC;IACtC,SAAS,CAAC,GAAG,EAAE;QACX,GAAG,CAAC,aAAa,GAAG,EAAE,CAAC;QACvB,OAAO,GAAG,EAAE;YACR,GAAG,CAAC,aAAa,GAAG,SAAS,CAAC;QAClC,CAAC,CAAA;IACL,CAAC,EAAE,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC,CAAC;IACd,OAAO,GAAG,CAAC;AACf,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ObjectsActionSpec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ObjectsActionSpec.js","sourceRoot":"","sources":["../../../../../../src/features/store/objects/selection/ObjectsActionSpec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,75 @@
1
+ import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { Button, Popover, PopoverContent, PopoverTrigger, SelectList } from '@vertesia/ui/core';
3
+ import clsx from 'clsx';
4
+ import { EllipsisVertical, X } from 'lucide-react';
5
+ import { useState } from "react";
6
+ import { DocumentUploadModal, useDocumentSelection } from "../../../store";
7
+ import { ExportPropertiesAction } from "./actions/ExportPropertiesAction";
8
+ import { StartWorkflowAction } from "./actions/StartWorkflowComponent";
9
+ import { ObjectsActionContextProvider, useObjectsActionContext } from "./ObjectsActionContext";
10
+ export function SelectionActions() {
11
+ const selection = useDocumentSelection();
12
+ const size = selection.size();
13
+ const plural = size > 1 ? "s" : "";
14
+ const hasSelection = selection?.hasSelection();
15
+ const hasSingleSelection = selection?.isSingleSelection();
16
+ const onClearSelection = () => {
17
+ selection?.removeAll();
18
+ };
19
+ return (_jsx(ObjectsActionContextProvider, { children: _jsxs("div", { className: "flex items-center gap-x-2", children: [hasSelection && !hasSingleSelection &&
20
+ _jsxs("div", { className: "flex items-center gap-x-1 shrink-0", children: [_jsxs("div", { className: 'text-sm nowrap', children: [size, " document", plural, " selected"] }), _jsx(Button, { title: "Clear selection", variant: "ghost", className: " rounded-md p-2", onClick: onClearSelection, children: _jsx(X, { className: "size-4" }) })] }), _jsx(SelectionActionsPopover, { selection: selection, children: _jsx(Button, { variant: "ghost", alt: "More action", size: "sm", children: _jsx(EllipsisVertical, { size: 16 }) }) }), hasSelection && _jsx(ActionsWrapper, { selection: selection })] }) }));
21
+ }
22
+ function ActionsWrapper({}) {
23
+ return _jsx(StartWorkflowButton, {});
24
+ }
25
+ export function UploadObjectsButton({ collectionId }) {
26
+ const [files, setFiles] = useState([]);
27
+ const selection = useDocumentSelection();
28
+ const hasSelection = selection?.hasSelection();
29
+ const selectFile = () => {
30
+ const fileInput = document.createElement("input");
31
+ fileInput.type = "file";
32
+ fileInput?.click();
33
+ fileInput.onchange = (event) => {
34
+ const files = event.target.files;
35
+ if (files) {
36
+ setFiles(Array.from(files));
37
+ }
38
+ };
39
+ };
40
+ return (!hasSelection &&
41
+ _jsxs(_Fragment, { children: [_jsx(Button, { onClick: () => selectFile(), children: "Upload" }), _jsx(DocumentUploadModal, { collectionId: collectionId ?? '', isOpen: files.length > 0, onClose: () => setFiles([]), files: files, title: "Upload Files", onUploadComplete: (result) => {
42
+ if (result && result.success) {
43
+ setFiles([]);
44
+ }
45
+ }, children: _jsx("div", { className: "text-sm", children: "Select the associated Content Type, or let the system choose or generate the type based on the content." }) })] }));
46
+ }
47
+ function StartWorkflowButton() {
48
+ const ctx = useObjectsActionContext();
49
+ const selection = ctx.params.selection;
50
+ const hasSelection = selection.hasSelection();
51
+ return (hasSelection &&
52
+ _jsx(Button, { onClick: () => ctx.run(StartWorkflowAction.id), children: "Start Workflow" }));
53
+ }
54
+ function optionLayout(option) {
55
+ return {
56
+ label: option.name,
57
+ className: clsx('flex-1 px-2 py-2 hover:bg-accent nowrap', option.destructive ? 'text-destructive' : ''),
58
+ };
59
+ }
60
+ function SelectionActionsPopover({ selection, children }) {
61
+ const context = useObjectsActionContext();
62
+ const executeAction = (action) => {
63
+ context.run(action.id);
64
+ };
65
+ return (_jsxs(Popover, { hover: true, children: [_jsx(PopoverTrigger, { children: children }), _jsx(PopoverContent, { className: 'p-0 w-50', align: 'end', sideOffset: 6, children: _jsx(PopoverBody, { executeAction: executeAction, selection: selection }) })] }));
66
+ }
67
+ function PopoverBody({ executeAction, selection }) {
68
+ const context = useObjectsActionContext();
69
+ const _executeAction = (action) => {
70
+ executeAction(action);
71
+ };
72
+ const _selection = selection?.hasSelection() ? context.actions.filter(action => !action.hideInList) : [ExportPropertiesAction];
73
+ return (_jsx("div", { className: "rounded-md shadow-md py-2", children: _jsx("div", { className: "px-1 text-sm", children: _jsx(SelectList, { options: _selection, optionLayout: optionLayout, onChange: _executeAction, noCheck: true }) }) }));
74
+ }
75
+ //# sourceMappingURL=SelectionActions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectionActions.js","sourceR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