@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,9 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import clsx from 'clsx';
3
+ import { VTooltip } from './shadcn/tooltip';
4
+ import { Info } from 'lucide-react';
5
+ export function FormItem({ description, required, label, className, direction = "column", children }) {
6
+ return (_jsxs("div", { className: clsx("flex w-full space-y-1", className, direction === "row" ? "flex-row justify-between" : "flex-col"), children: [_jsxs("div", { className: 'flex items-center gap-1', children: [_jsxs("label", { className: "text-sm font-medium mb-1", children: [label, required ? _jsx("span", { className: 'text-destructive -mt-4 ml-1', children: "*" }) : ""] }), description &&
7
+ _jsx("div", { className: 'mx-2 flex w-4 items-center', children: _jsx(VTooltip, { description: description, children: _jsx(Info, { className: "size-3 text-muted" }) }) })] }), children] }));
8
+ }
9
+ //# sourceMappingURL=FormItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormItem.js","sourceRoot":"","sources":["../../../../src/core/components/FormItem.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAUpC,MAAM,UAAU,QAAQ,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,GAAG,QAAQ,EAAE,QAAQ,EAAiB;IAC/G,OAAO,CACH,eAAK,SAAS,EAAE,IAAI,CAAC,uBAAuB,EAAE,SAAS,EAAE,SAAS,KAAK,KAAK,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAAC,UAAU,CAAC,aACnH,eAAK,SAAS,EAAC,yBAAyB,aACpC,iBAAO,SAAS,EAAC,0BAA0B,aACtC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,eAAM,SAAS,EAAC,6BAA6B,kBAAS,CAAC,CAAC,CAAC,EAAE,IAC1E,EAEJ,WAAW;wBACX,cAAK,SAAS,EAAC,4BAA4B,YACvC,KAAC,QAAQ,IACL,WAAW,EAAE,WAAW,YACxB,KAAC,IAAI,IAAC,SAAS,EAAC,mBAAmB,GAAG,GAC/B,GACT,IAER,EACL,QAAQ,IACP,CACT,CAAC;AACN,CAAC"}
@@ -2,7 +2,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import clsx from 'clsx';
3
3
  import { useState } from 'react';
4
4
  import { Badge } from './Badge';
5
- import { VInput } from './shadcn/input';
5
+ import { Input } from './shadcn/input';
6
+ import { Styles } from './styles';
6
7
  export function InputList({ value = [], onChange, className, delimiters = ", ", placeholder }) {
7
8
  const [text, setText] = useState('');
8
9
  const onBlur = (ev) => {
@@ -36,7 +37,7 @@ export function InputList({ value = [], onChange, className, delimiters = ", ",
36
37
  onChange([...value]);
37
38
  }
38
39
  };
39
- return (_jsxs("div", { className: clsx(className, 'w-full space-x-1 space-y-1 flex flex-wrap w-full rounded-md py-2 px-1 text-sm border border-input bg-background dark:bg-slate-800 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2'), children: [value && value.length > 0 &&
40
- (value.map((v, index) => _jsx(Badge, { variant: "secondary", onClick: () => _onClick(index), style: { whiteSpace: 'nowrap' }, className: 'cursor-pointer', children: v }, index))), _jsx("div", { children: _jsx(VInput, { clearable: false, className: 'placeholder:text-muted-foreground px-1', variant: 'unstyled', type: 'text', value: text, onBlur: onBlur, onKeyDown: onKeyDown, onChange: setText, placeholder: !value || value.length === 0 ? placeholder : '' }) })] }));
40
+ return (_jsxs("div", { className: clsx(className, 'w-full space-x-1 space-y-1 p-2', Styles.INPUT), children: [value && value.length > 0 &&
41
+ (value.map((v, index) => _jsx(Badge, { variant: "secondary", onClick: () => _onClick(index), style: { whiteSpace: 'nowrap' }, className: 'cursor-pointer', children: v }, index))), _jsx("div", { children: _jsx(Input, { clearable: false, className: 'placeholder:text-muted-foreground px-1', variant: 'unstyled', type: 'text', value: text, onBlur: onBlur, onKeyDown: onKeyDown, onChange: setText, placeholder: !value || value.length === 0 ? placeholder : '' }) })] }));
41
42
  }
42
43
  //# sourceMappingURL=InputList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"InputList.js","sourceRoot":"","sources":["../../../../src/core/components/InputList.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAU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,EAAE,OAAO,EACjB,WAAW,EAAE,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,GAC9D,GACA,IACJ,CACT,CAAA;AACL,CAAC"}
@@ -5,12 +5,11 @@ export * from "./ComboBox.js";
5
5
  export * from "./ConfirmModal.js";
6
6
  export * from "./DeleteModal.js";
7
7
  export * from "./Divider.js";
8
- export * from "./SidePanel.js";
9
8
  export * from "./Dropdown.js";
10
9
  export * from "./DropdownList.js";
11
10
  export * from "./EmptyCollection.js";
12
11
  export * from "./FileUpload.js";
13
- export * from "./Input.js";
12
+ export * from "./FormItem.js";
14
13
  export * from "./InputList.js";
15
14
  export * from "./Link.js";
16
15
  export * from "./MenuList.js";
@@ -23,6 +22,8 @@ export * from "./RadioGroup.js";
23
22
  export * from "./SelectBox.js";
24
23
  export * from "./SelectList.js";
25
24
  export * from "./SelectStack.js";
25
+ export * from "./shadcn/index.js";
26
+ export * from "./SidePanel.js";
26
27
  export * from "./Spinner.js";
27
28
  export * from "./styles.js";
28
29
  export * from "./Switch.js";
@@ -30,5 +31,4 @@ export * from "./table/index.js";
30
31
  export * from "./tabs/index.js";
31
32
  export * from "./Textarea.js";
32
33
  export * from "./toast/index.js";
33
- export * from "./shadcn/index.js";
34
34
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/components/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAA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cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC"}
@@ -2,25 +2,25 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
3
  import { Slot } from "@radix-ui/react-slot";
4
4
  import { cva } from "class-variance-authority";
5
- import { VTooltip } from "./tooltip";
5
+ import { VTooltip } from "@vertesia/ui/core";
6
6
  import { cn } from "../libs/utils";
7
- import { Loader2 } from "lucide-react";
7
+ import { Check, CopyIcon, Loader2 } from "lucide-react";
8
8
  import clsx from "clsx";
9
+ import { useState } from "react";
9
10
  const buttonVariants = cva("hover:cursor-pointer inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", {
10
11
  variants: {
11
12
  variant: {
12
13
  destructive: "bg-destructive dark:bg-destructive/10 text-destructive ring-1 ring-inset ring-destructive-muted/50 dark:ring-destructive-muted/50 shadow-xs hover:bg-destructive/50",
13
14
  outline: "border border-input bg-background shadow-xs hover:bg-muted ring-inset",
14
- secondary: "bg-secondary-background text-secondary hover:bg-secondary-background/80 ring-inset",
15
+ secondary: "bg-primary/5 dark:bg-primary/10 text-primary shadow-xs hover:bg-primary/10 dark:hover:bg-primary/20 ring-inset",
15
16
  ghost: "hover:bg-muted/50 dark:hover:bg-muted/20 ring-inset",
16
17
  link: "text-white underline-offset-4 hover:underline ring-inset",
17
18
  primary: "bg-primary text-white shadow-xs hover:bg-primary/90 ring-inset",
18
- soft: "bg-primary/5 dark:bg-primary/10 text-primary shadow-xs hover:bg-primary/10 dark:hover:bg-primary/20 ring-inset",
19
19
  unstyled: ""
20
20
  },
21
21
  size: {
22
22
  xs: 'h-7 rounded px-2 py-1 text-xs gap-x-1',
23
- sm: "h-8 rounded px-2 text-xs",
23
+ sm: "h-8 rounded px-3 text-xs",
24
24
  md: "h-9 rounded-md px-4 py-2",
25
25
  lg: "h-10 rounded-md px-3",
26
26
  xl: 'rounded-md px-3.5 py-2.5 text-sm gap-x-2',
@@ -34,12 +34,42 @@ const buttonVariants = cva("hover:cursor-pointer inline-flex items-center justif
34
34
  });
35
35
  const Button = React.forwardRef(({ className, variant, size, asChild = false, alt, isDisabled, isLoading, title, onClick, type, ...props }, ref) => {
36
36
  const Comp = asChild ? Slot : "button";
37
- const buttonElement = (_jsxs(Comp, { className: clsx(className, cn(buttonVariants({ variant, size }))), disabled: isDisabled || isLoading || props.disabled, ref: ref, onClick: onClick, type: type, autoFocus: false, ...props, children: [isLoading && _jsx(Loader2, { className: "animate-spin" }), props.children] }));
37
+ const buttonElement = (_jsxs(Comp, { className: clsx(cn(buttonVariants({ variant, size })), className), disabled: isDisabled || isLoading || props.disabled, ref: ref, onClick: onClick, type: type, autoFocus: false, ...props, children: [isLoading && _jsx(Loader2, { className: "animate-spin" }), props.children] }));
38
38
  if (alt || title) {
39
39
  return (_jsx(VTooltip, { description: alt || title, asChild: true, className: "cursor-pointer", size: "xs", placement: "top", children: buttonElement }));
40
40
  }
41
41
  return buttonElement;
42
42
  });
43
43
  Button.displayName = "Button";
44
- export { Button, buttonVariants };
44
+ const CopyButton = React.forwardRef(({ size, content, toast, className, alt, ...props }, ref) => {
45
+ const [isCopied, setIsCopied] = useState(false);
46
+ const handleCopy = () => {
47
+ navigator.clipboard.writeText(content).then(() => {
48
+ setIsCopied(true);
49
+ setTimeout(() => setIsCopied(false), 2000);
50
+ if (!toast || !toast.toast) {
51
+ return;
52
+ }
53
+ toast.toast({
54
+ status: "success",
55
+ title: toast.message || "Copied to clipboard",
56
+ duration: 2000,
57
+ });
58
+ }).catch((err) => {
59
+ console.error("Failed to copy text: ", err);
60
+ if (toast && toast.toast)
61
+ toast.toast({
62
+ status: "error",
63
+ title: "Failed to copy",
64
+ duration: 2000,
65
+ });
66
+ });
67
+ };
68
+ return (_jsx(Button, { ref: ref, className: cn(className), variant: "unstyled", size: size || "sm", onClick: handleCopy, ...props, alt: alt ?? "Copy", children: isCopied ?
69
+ _jsx(Check, { className: "text-success" })
70
+ :
71
+ _jsx(CopyIcon, { className: "size-4" }) }));
72
+ });
73
+ CopyButton.displayName = "CopyButton";
74
+ export { Button, CopyButton, buttonVariants };
45
75
  //# sourceMappingURL=button.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"button.js","sourceRoot":"","sources":["../../../../../src/core/components/shadcn/button.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAC3C,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAEpC,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAA;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,IAAI,MAAM,MAAM,CAAA;AAEvB,MAAM,cAAc,GAAG,GAAG,CACxB,8TAA8T,EAC9T;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,WAAW,EACT,qKAAqK;YACvK,OAAO,EACL,uEAAuE;YACzE,SAAS,EACP,oFAAoF;YACtF,KAAK,EAAE,qDAAqD;YAC5D,IAAI,EAAE,0DAA0D;YAChE,OAAO,EACL,gEAAgE;YAClE,IAAI,EAAE,gHAAgH;YACtH,QAAQ,EACN,EAAE;SACL;QACD,IAAI,EAAE;YACJ,EAAE,EAAE,uCAAuC;YAC3C,EAAE,EAAE,0BAA0B;YAC9B,EAAE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E,UAAU,EAAE,cAAc,EAAE,CAAA"}
@@ -24,16 +24,16 @@ export function VModal({ className, children, isOpen, onClose, description = "Mo
24
24
  if (!disableCloseOnClickOutside || open) {
25
25
  handleOpenChange(open);
26
26
  }
27
- }, children: [allowOverflow && _jsx(DialogOverlay, { className: "z-50 fixed inset-0 bg-black/80" }), _jsx(VisuallyHidden, { children: _jsx(DialogDescription, { children: description }) }), _jsxs(DialogContent, { className: cn("min-h-20 p-2", "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] border bg-background shadow-lg duration-200 sm:rounded-lg", className), children: [!noCloseButton && (_jsx(DialogClose, { onClick: () => handleOpenChange(false), asChild: true, autoFocus: false, children: _jsx(Button, { variant: "outline", alt: "Close", className: "top-4 right-4 absolute data-[state=open]:bg-accent opacity-70 hover:opacity-100 rounded-sm focus:outline-none focus:ring-2 focus:ring-ring ring-offset-background focus:ring-offset-2 data-[state=open]:text-muted-foreground transition-opacity disabled:pointer-events-none", children: _jsx(X, { className: "w-4 h-4" }) }) })), _jsx(ModalContextProvider, { children: children })] })] }));
27
+ }, children: [allowOverflow && _jsx(DialogOverlay, { className: "z-50 fixed inset-0 bg-black/80" }), _jsx(VisuallyHidden, { children: _jsx(DialogDescription, { children: description }) }), _jsxs(DialogContent, { className: cn("min-h-20 p-4", "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] border bg-background shadow-lg duration-200 sm:rounded-lg", className), children: [!noCloseButton && (_jsx(DialogClose, { onClick: () => handleOpenChange(false), asChild: true, autoFocus: false, children: _jsx(Button, { variant: "outline", alt: "Close", className: "top-4 right-4 absolute data-[state=open]:bg-accent opacity-70 hover:opacity-100 rounded-sm focus:outline-none focus:ring-2 focus:ring-ring ring-offset-background focus:ring-offset-2 data-[state=open]:text-muted-foreground transition-opacity disabled:pointer-events-none", children: _jsx(X, { className: "w-4 h-4" }) }) })), _jsx(ModalContextProvider, { children: children })] })] }));
28
28
  }
29
29
  export const VModalTitle = ({ children, show = true, className, ...props }) => {
30
30
  if (!show) {
31
31
  return (_jsx(VisuallyHidden, { children: _jsx(DialogTitle, { children: children }) }));
32
32
  }
33
- return (_jsx(DialogTitle, { className: cn("text-lg font-semibold leading-6 tracking-tight p-4", className), ...props, children: children }));
33
+ return (_jsx(DialogTitle, { className: cn("text-lg font-semibold leading-6 tracking-tight py-2", className), ...props, children: children }));
34
34
  };
35
35
  export const VModalBody = ({ children, className, ...props }) => {
36
- return (_jsx("div", { className: cn("text-sm p-4 max-h-[80vh] overflow-y-auto", className), ...props, children: children }));
36
+ return (_jsx("div", { className: cn("text-sm max-h-[80vh] overflow-y-auto", className), ...props, children: children }));
37
37
  };
38
38
  export const VModalFooter = ({ align = "right", children, className, ...props }) => {
39
39
  const alignClass = {
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../../../../src/core/components/shadcn/dialog.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AAEnC,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAYlD,MAAM,YAAY,GAAG,aAAa,CAAU,KAAK,CAAC,CAAA;AAClD,MAAM,UAAU,YAAY;IACxB,OAAO,CAAC,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;AACtC,CAAC;AACD,MAAM,UAAU,oBAAoB,CAAC,EAAE,QAAQ,EAAiC;IAC5E,OAAO,KAAC,YAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,IAAI,YAAG,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EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACT,mDAAmD,EACnD,SAAS,CACZ,KACG,KAAK,GACX,CACL,CAAC,CAAA;AACF,WAAW,CAAC,WAAW,GAAG,eAAe,CAAC,KAAK,CAAC,WAAW,CAAA;AAG3D,OAAO,EACH,MAAM,EACN,YAAY,EACZ,aAAa,EACb,WAAW,EACX,aAAa,EACb,aAAa,EACb,WAAW,EACX,iBAAiB,GACpB,CAAC"}
1
+ {"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../../../../src/core/components/shadcn/dialog.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AAEnC,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAYlD,MAAM,YAAY,GAAG,aAAa,CAAU,KAAK,CAAC,CAAA;AAClD,MAAM,UAAU,YAAY;IACxB,OAAO,CAAC,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;AACtC,CAAC;AACD,MAAM,UAAU,oBAAoB,CAAC,EAAE,QAAQ,EAAiC;IAC5E,OAAO,KAAC,YAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,IAAI,YAAG,QAAQ,GAAyB,CAAA;AACjF,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,EACnB,SAAS,EACT,QAAQ,EACR,MAAM,EACN,OAAO,EACP,WAAW,GAAG,mBAAmB,EACjC,aAAa,GAAG,KAAK,EACrB,aAAa,GAAG,KAAK,EACrB,0BAA0B,GAAG,KAAK,GACzB;IACT,MAAM,gBAAgB,GAAG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aAAa,EACb,WAAW,EACX,iBAAiB,GACpB,CAAC"}
@@ -0,0 +1,38 @@
1
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useEffect, useState } from 'react';
3
+ export function DynamicLabel({ value, labelRenderer, fallbackLabel }) {
4
+ const [label, setLabel] = useState(fallbackLabel || value);
5
+ const [isLoading, setIsLoading] = useState(false);
6
+ useEffect(() => {
7
+ if (!labelRenderer) {
8
+ setLabel(fallbackLabel || value);
9
+ return;
10
+ }
11
+ const renderLabel = async () => {
12
+ setIsLoading(true);
13
+ try {
14
+ const result = labelRenderer(value);
15
+ if (result instanceof Promise) {
16
+ const resolvedLabel = await result;
17
+ setLabel(resolvedLabel);
18
+ }
19
+ else {
20
+ setLabel(result);
21
+ }
22
+ }
23
+ catch (error) {
24
+ console.error('Error rendering label:', error);
25
+ setLabel(fallbackLabel || value);
26
+ }
27
+ finally {
28
+ setIsLoading(false);
29
+ }
30
+ };
31
+ renderLabel();
32
+ }, [value, labelRenderer, fallbackLabel]);
33
+ if (isLoading) {
34
+ return _jsx("span", { className: "text-muted-foreground", children: "Loading..." });
35
+ }
36
+ return _jsx(_Fragment, { children: label });
37
+ }
38
+ //# sourceMappingURL=DynamicLabel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DynamicLabel.js","sourceRoot":"","sources":["../../../../../../src/core/components/shadcn/filters/DynamicLabel.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAQnD,MAAM,UAAU,YAAY,CAAC,EAAE,KAAK,EAAE,aAAa,EAAE,aAAa,EAAqB;IACrF,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAkB,aAAa,IAAI,KAAK,CAAC,CAAC;IAC5E,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAElD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,aAAa,EAAE,CAAC;YACnB,QAAQ,CAAC,aAAa,IAAI,KAAK,CAAC,CAAC;YACjC,OAAO;QACT,CAAC;QAED,MAAM,WAAW,GAAG,KAAK,IAAI,EAAE;YAC7B,YAAY,CAAC,IAAI,CAAC,CAAC;YACnB,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;gBACpC,IAAI,MAAM,YAAY,OAAO,EAAE,CAAC;oBAC9B,MAAM,aAAa,GAAG,MAAM,MAAM,CAAC;oBACnC,QAAQ,CAAC,aAAa,CAAC,CAAC;gBAC1B,CAAC;qBAAM,CAAC;oBACN,QAAQ,CAAC,MAAM,CAAC,CAAC;gBACnB,CAAC;YACH,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,CAAC,KAAK,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC;gBAC/C,QAAQ,CAAC,aAAa,IAAI,KAAK,CAAC,CAAC;YACnC,CAAC;oBAAS,CAAC;gBACT,YAAY,CAAC,KAAK,CAAC,CAAC;YACtB,CAAC;QACH,CAAC,CAAC;QAEF,WAAW,EAAE,CAAC;IAChB,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,EAAE,aAAa,CAAC,CAAC,CAAC;IAE1C,IAAI,SAAS,EAAE,CAAC;QACd,OAAO,eAAM,SAAS,EAAC,uBAAuB,2BAAkB,CAAC;IACnE,CAAC;IAED,OAAO,4BAAG,KAAK,GAAI,CAAC;AACtB,CAAC"}
@@ -1,15 +1,16 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { useRef, useState } from "react";
3
3
  // import { AnimatePresence, motion } from "motion/react";
4
+ import dayjs from "dayjs";
4
5
  import { Calendar } from "../calendar";
5
- import { format } from "date-fns";
6
+ import { Button } from "../button";
6
7
  import { Checkbox } from "../checkbox";
7
8
  import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator } from "../command";
9
+ import { Input } from "../input";
8
10
  import { Popover, PopoverContent, PopoverTrigger } from "../popover";
9
11
  import { AnimateChangeInHeight } from "./animateChangeInHeight";
10
- import { Button } from "../button";
11
- import { VInput } from "../input";
12
- export const SelectionCombobox = ({ filterType, filterValues, setFilterValues, options, }) => {
12
+ import { DynamicLabel } from "./DynamicLabel";
13
+ export const SelectionCombobox = ({ filterType, filterValues, setFilterValues, options, labelRenderer, }) => {
13
14
  const [open, setOpen] = useState(false);
14
15
  const [commandInput, setCommandInput] = useState("");
15
16
  const commandInputRef = useRef(null);
@@ -21,10 +22,10 @@ export const SelectionCombobox = ({ filterType, filterValues, setFilterValues, o
21
22
  setCommandInput("");
22
23
  }, 200);
23
24
  }
24
- }, children: [_jsx(PopoverTrigger, { className: "rounded-none px-1.5 py-1 bg-muted hover:bg-muted/50 transition\n text-muted-foreground hover:text-primary shrink-0", children: _jsx("div", { className: "flex gap-1.5 items-center", children: filterValues?.length === 1 ? ((() => {
25
+ }, children: [_jsx(PopoverTrigger, { className: "rounded-none p-1 h-8 bg-muted hover:bg-muted/50 transition text-muted hover:text-primary shrink-0", children: _jsx("div", { className: "flex gap-1.5 items-center", children: filterValues?.length === 1 ? ((() => {
25
26
  const option = filterValues[0];
26
- return option.label;
27
- })()) : (`${filterValues?.length} selected`) }) }), _jsx(PopoverContent, { className: "w-[200px] p-0", children: _jsx(AnimateChangeInHeight, { children: _jsxs(Command, { children: [_jsx(CommandInput, { placeholder: filterType, className: "h-9", value: commandInput, onInputCapture: (e) => {
27
+ return (_jsx(DynamicLabel, { value: option.value || '', labelRenderer: labelRenderer, fallbackLabel: option.label }));
28
+ })()) : (`${filterValues?.length} selected`) }) }), _jsx(PopoverContent, { className: "w-[300px] p-0", children: _jsx(AnimateChangeInHeight, { children: _jsxs(Command, { children: [_jsx(CommandInput, { placeholder: filterType, className: "h-9", value: commandInput, onInputCapture: (e) => {
28
29
  setCommandInput(e.currentTarget.value);
29
30
  }, ref: commandInputRef }), _jsxs(CommandList, { children: [_jsx(CommandEmpty, { children: "No results found." }), _jsx(CommandGroup, { children: filterValues.map((value) => {
30
31
  return (_jsxs(CommandItem, { className: "group flex gap-2 items-center", onSelect: () => {
@@ -33,34 +34,31 @@ export const SelectionCombobox = ({ filterType, filterValues, setFilterValues, o
33
34
  setCommandInput("");
34
35
  }, 200);
35
36
  setOpen(false);
36
- }, children: [_jsx(Checkbox, { checked: true }), value.label] }, value.value));
37
+ }, children: [_jsx(Checkbox, { checked: true }), _jsx(DynamicLabel, { value: value.value || '', labelRenderer: labelRenderer, fallbackLabel: value.label })] }, value.value));
37
38
  }) }), nonSelectedFilterValues?.length > 0 && (_jsxs(_Fragment, { children: [_jsx(CommandSeparator, {}), _jsx(CommandGroup, { children: nonSelectedFilterValues
38
- .filter(option => String(option.label).toLowerCase().includes(commandInput.toLowerCase()))
39
- .map((filter) => (_jsxs(CommandItem, { className: "group flex gap-2 items-center", value: String(filter.label), onSelect: () => {
40
- setFilterValues([...filterValues, filter]);
39
+ .filter(option => String(option.label || option.value).toLowerCase().includes(commandInput.toLowerCase()))
40
+ .map((filter) => (_jsxs(CommandItem, { className: "group flex gap-2 items-center", value: String(filter.label || filter.value), onSelect: () => {
41
+ setFilterValues([...filterValues, {
42
+ value: filter.value,
43
+ label: filter.label
44
+ }]);
41
45
  setTimeout(() => {
42
46
  setCommandInput("");
43
47
  }, 200);
44
48
  setOpen(false);
45
- }, children: [_jsx(Checkbox, { checked: false, className: "opacity-0 group-data-[selected=true]:opacity-100" }), _jsx("span", { className: "text-accent-foreground", children: filter.label })] }, filter.value))) })] }))] })] }) }) })] }));
49
+ }, children: [_jsx(Checkbox, { checked: false, className: "opacity-0 group-data-[selected=true]:opacity-100" }), _jsx("span", { className: "text-muted", children: _jsx(DynamicLabel, { value: filter.value || '', labelRenderer: filter.labelRenderer || labelRenderer, fallbackLabel: filter.label }) })] }, filter.value))) })] }))] })] }) }) })] }));
46
50
  };
47
51
  export const DateCombobox = ({ filterValues, setFilterValues, }) => {
48
52
  const [open, setOpen] = useState(false);
49
- const [dateRange, setDateRange] = useState({
50
- from: filterValues[0] ? new Date(filterValues[0]) : undefined,
51
- to: filterValues[1] ? new Date(filterValues[1]) : undefined,
52
- });
53
- return (_jsxs(Popover, { _open: open, onOpenChange: setOpen, children: [_jsx(PopoverTrigger, { className: "rounded-none px-1.5 py-1 bg-muted hover:bg-muted/50 transition\n text-muted-foreground hover:text-primary shrink-0", children: _jsx("div", { className: "flex gap-1.5 items-center", children: dateRange?.from ? (dateRange.to ? (_jsxs(_Fragment, { children: [format(dateRange.from, "LLL dd, y"), " -", " ", format(dateRange.to, "LLL dd, y")] })) : (format(dateRange.from, "LLL dd, y"))) : (_jsx("span", { children: "Pick a date" })) }) }), _jsx(PopoverContent, { className: "w-full p-0", align: "start", children: _jsx(Calendar, { initialFocus: true, mode: "range", className: "w-4/5 p-0", defaultMonth: dateRange?.from, selected: dateRange, onSelect: (range) => {
54
- setDateRange(range);
55
- if (range?.from) {
56
- setFilterValues([
57
- format(range.from, "yyyy-MM-dd"),
58
- range.to ? format(range.to, "yyyy-MM-dd") : "",
59
- ]);
53
+ const selectedDate = filterValues[0] ? new Date(filterValues[0]) : undefined;
54
+ return (_jsxs(Popover, { _open: open, onOpenChange: setOpen, children: [_jsx(PopoverTrigger, { className: "rounded-none p-1 h-8 bg-muted hover:bg-muted/50 text-muted hover:text-primary shrink-0 transition", children: _jsx("div", { className: "flex gap-1.5 items-center", children: selectedDate ? (dayjs(selectedDate).format("MMM D, YYYY")) : (_jsx("span", { children: "Pick a date" })) }) }), _jsx(PopoverContent, { className: "w-auto p-0", align: "start", children: _jsx(Calendar, { mode: "single", className: "p-0", defaultMonth: selectedDate, selected: selectedDate, onSelect: (date) => {
55
+ if (date) {
56
+ setFilterValues([dayjs(date).format("YYYY-MM-DD")]);
57
+ setOpen(false);
60
58
  }
61
- }, numberOfMonths: 2 }) })] }));
59
+ } }) })] }));
62
60
  };
63
- export const TextCombobox = ({ filterValue, setFilterValue, }) => {
61
+ export const TextCombobox = ({ filterType, filterValue, setFilterValue, }) => {
64
62
  const [open, setOpen] = useState(false);
65
63
  const [inputValue, setInputValue] = useState(filterValue);
66
64
  const handleKeyDown = (event) => {
@@ -74,7 +72,7 @@ export const TextCombobox = ({ filterValue, setFilterValue, }) => {
74
72
  if (!open && inputValue !== filterValue) {
75
73
  setInputValue(filterValue);
76
74
  }
77
- }, children: [_jsx(PopoverTrigger, { className: "rounded-none px-1.5 py-1 bg-muted hover:bg-muted/50 transition\n text-muted-foreground hover:text-primary shrink-0", children: _jsx("div", { className: "flex gap-1.5 items-center", children: filterValue || "Enter text..." }) }), _jsx(PopoverContent, { className: "w-[200px] p-3", children: _jsxs("div", { className: "flex flex-col gap-2 p-2", children: [_jsx(VInput, { autoFocus: true, type: "text", size: "sm", value: inputValue, onChange: setInputValue, onKeyDown: handleKeyDown, placeholder: "Enter text..." }), _jsx(Button, { size: "sm", variant: "outline", onClick: () => {
75
+ }, children: [_jsx(PopoverTrigger, { className: "rounded-none p-1 h-8 bg-muted hover:bg-muted/50 text-muted hover:text-primary shrink-0 transition", children: _jsx("div", { className: "flex gap-1.5 items-center", children: filterValue || "Enter text..." }) }), _jsx(PopoverContent, { className: "w-[300px] p-3", children: _jsxs("div", { className: "flex flex-col gap-1", children: [_jsx("div", { className: "flex items-center p-1.5 text-xs text-muted", children: _jsx("span", { children: filterType }) }), _jsx(Input, { autoFocus: true, type: "text", size: "sm", value: inputValue, onChange: setInputValue, onKeyDown: handleKeyDown, placeholder: "Enter text..." }), _jsx(Button, { size: "sm", variant: "outline", onClick: () => {
78
76
  setFilterValue(inputValue);
79
77
  setOpen(false);
80
78
  }, children: "Apply" })] }) })] }));
@@ -1 +1 @@
1
- {"version":3,"file":"comboBox.js","sourceRoot":"","sources":["../../../../../../src/core/components/shadcn/filters/comboBox.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,C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,CAAC;YACd,IAAI,CAAC,IAAI,IAAI,UAAU,KAAK,WAAW,EAAE,CAAC;gBACtC,aAAa,CAAC,WAAW,CAAC,CAAC;YAC/B,CAAC;QACL,CAAC,aAED,KAAC,cAAc,IACX,SAAS,EAAC,mGAAmG,YAE7G,cAAK,SAAS,EAAC,2BAA2B,YACrC,WAAW,IAAI,eAAe,GAC7B,GACO,EACjB,KAAC,cAAc,IAAC,SAAS,EAAC,eAAe,YACrC,eAAK,SAAS,EAAC,qBAAqB,aAChC,cAAK,SAAS,EAAC,4CAA4C,YACvD,yBAAO,UAAU,GAAQ,GACvB,EACN,KAAC,KAAK,IAAC,SAAS,QACZ,IAAI,EAAC,MAAM,EAAC,IAAI,EAAE,IAAI,EACtB,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,aAAa,EACvB,SAAS,EAAE,aAAa,EACxB,WAAW,EAAC,eAAe,GAC7B,EACF,KAAC,MAAM,IACH,IAAI,EAAC,IAAI,EAAC,OAAO,EAAE,SAAS,EAC5B,OAAO,EAAE,GAAG,EAAE;gCACV,cAAc,CAAC,UAAU,CAAC,CAAC;gCAC3B,OAAO,CAAC,KAAK,CAAC,CAAC;4BACnB,CAAC,sBAGI,IACP,GACO,IACX,CACb,CAAC;AACN,CAAC,CAAC"}
@@ -1,23 +1,23 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import dayjs from "dayjs";
2
3
  import { Calendar } from "../calendar";
3
- import { format } from "date-fns";
4
- export default function DateFilter({ selectedView, dateRange, setDateRange, setFilters, filters, handleClose, filterGroups, }) {
5
- const handleDateRangeSelect = (range) => {
6
- setDateRange(range);
7
- if (range?.from && range?.to) {
4
+ export default function DateFilter({ selectedView, selectedDate, setSelectedDate, setFilters, filters, handleClose, filterGroups, }) {
5
+ const handleDateSelect = (date) => {
6
+ setSelectedDate(date);
7
+ if (date) {
8
8
  const selectedGroup = filterGroups.find(g => g.name === selectedView);
9
+ // Set date to start of day (00:00)
10
+ const selectedDateStart = new Date(date);
11
+ selectedDateStart.setHours(0, 0, 0, 0);
9
12
  setFilters([
10
13
  ...filters,
11
14
  {
12
15
  name: selectedView || "",
16
+ placeholder: selectedGroup?.placeholder,
13
17
  value: [
14
18
  {
15
- value: format(range.from, "yyyy-MM-dd"),
16
- label: format(range.from, "LLL dd, y")
17
- },
18
- {
19
- value: format(range.to, "yyyy-MM-dd"),
20
- label: format(range.to, "LLL dd, y")
19
+ value: selectedDateStart.toISOString(),
20
+ label: dayjs(selectedDateStart).format("LLL dd, y"),
21
21
  }
22
22
  ],
23
23
  type: selectedGroup?.type || "date",
@@ -26,6 +26,6 @@ export default function DateFilter({ selectedView, dateRange, setDateRange, setF
26
26
  handleClose();
27
27
  }
28
28
  };
29
- return (_jsx("div", { className: "p-2", children: _jsx(Calendar, { initialFocus: true, mode: "range", defaultMonth: dateRange?.from, selected: dateRange, onSelect: handleDateRangeSelect, size: "sm" }) }));
29
+ return (_jsx("div", { className: "p-2", children: _jsx(Calendar, { mode: "single", defaultMonth: selectedDate, selected: selectedDate, onSelect: handleDateSelect, size: "sm" }) }));
30
30
  }
31
31
  //# sourceMappingURL=dateFilter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dateFilter.js","sourceRoot":"","sources":["../../../../../../src/core/components/shadcn/filters/dateFilter.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAalC,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,UAAU,EACV,OAAO,EACP,WAAW,EACX,YAAY,GACI;IAChB,MAAM,qBAAqB,GAAG,CAAC,KAA4B,EAAE,EAAE;QAC7D,YAAY,CAAC,KAAK,CAAC,CAAC;QACpB,IAAI,KAAK,EAAE,IAAI,IAAI,KAAK,EAAE,EAAE,EAAE,CAAC;YAC7B,MAAM,aAAa,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,YAAY,CAAC,CAAC;YACtE,UAAU,CAAC;gBACT,GAAG,OAAO;gBACV;oBACE,IAAI,EAAE,YAAY,IAAI,EAAE;oBACxB,KAAK,EAAE;wBACL;4BACE,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,IAAK,EAAE,YAAY,CAAC;4BACxC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,IAAK,EAAE,WAAW,CAAC;yBACxC;wBACD;4BACE,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,EAAG,EAAE,YAAY,CAAC;4BACtC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,EAAG,EAAE,WAAW,CAAC;yBACtC;qBACF;oBACD,IAAI,EAAE,aAAa,EAAE,IAAI,IAAI,MAAM;iBAC1B;aACZ,CAAC,CAAC;YAEH,WAAW,EAAE,CAAC;QAChB,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,CACL,cAAK,SAAS,EAAC,KAAK,YAClB,KAAC,QAAQ,IACP,YAAY,QACZ,IAAI,EAAC,OAAO,EACZ,YAAY,EAAE,SAAS,EAAE,IAAI,EAC7B,QAAQ,EAAE,SAAS,EACnB,QAAQ,EAAE,qBAAqB,EAC/B,IAAI,EAAC,IAAI,GACT,GACE,CACP,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"dateFilter.js","sourceRoot":"","sources":["../../../../../../src/core/components/shadcn/filters/dateFilter.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAavC,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,UAAU,EACV,OAAO,EACP,WAAW,EACX,YAAY,GACI;IAChB,MAAM,gBAAgB,GAAG,CAAC,IAAsB,EAAE,EAAE;QAClD,eAAe,CAAC,IAAI,CAAC,CAAC;QACtB,IAAI,IAAI,EAAE,CAAC;YACT,MAAM,aAAa,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,YAAY,CAAC,CAAC;YAEtE,mCAAmC;YACnC,MAAM,iBAAiB,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;YACzC,iBAAiB,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;YAEvC,UAAU,CAAC;gBACT,GAAG,OAAO;gBACV;oBACE,IAAI,EAAE,YAAY,IAAI,EAAE;oBACxB,WAAW,EAAE,aAAa,EAAE,WAAW;oBACvC,KAAK,EAAE;wBACL;4BACE,KAAK,EAAE,iBAAiB,CAAC,WAAW,EAAE;4BACtC,KAAK,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC;yBACpD;qBACF;oBACD,IAAI,EAAE,aAAa,EAAE,IAAI,IAAI,MAAM;iBAC1B;aACZ,CAAC,CAAC;YAEG,WAAW,EAAE,CAAC;QAClB,CAAC;IACL,CAAC,CAAC;IAEJ,OAAO,CACL,cAAK,SAAS,EAAC,KAAK,YAClB,KAAC,QAAQ,IACP,IAAI,EAAC,QAAQ,EACb,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,YAAY,EACtB,QAAQ,EAAE,gBAAgB,EAC1B,IAAI,EAAC,IAAI,GACT,GACE,CACP,CAAC;AACJ,CAAC"}
@@ -12,7 +12,7 @@ export function FilterBar({ filters, setFilters, filterGroups }) {
12
12
  const [selectedView, setSelectedView] = React.useState(null);
13
13
  const [commandInput, setCommandInput] = React.useState("");
14
14
  const commandInputRef = React.useRef(null);
15
- const [dateRange, setDateRange] = React.useState();
15
+ const [selectedDate, setSelectedDate] = React.useState();
16
16
  const [textValue, setTextValue] = React.useState("");
17
17
  const handleSelect = (groupName) => {
18
18
  setSelectedView(groupName);
@@ -42,7 +42,7 @@ export function FilterBar({ filters, setFilters, filterGroups }) {
42
42
  setTimeout(() => {
43
43
  setSelectedView(null);
44
44
  setCommandInput("");
45
- setDateRange(undefined);
45
+ setSelectedDate(undefined);
46
46
  }, 200);
47
47
  };
48
48
  const handleOpen = (open) => {
@@ -64,7 +64,7 @@ export function FilterBar({ filters, setFilters, filterGroups }) {
64
64
  const selectedGroupType = filterGroups.find(g => g.name === selectedView)?.type;
65
65
  switch (selectedGroupType) {
66
66
  case "date":
67
- return (_jsx(DateFilter, { selectedView: selectedView, dateRange: dateRange, setDateRange: setDateRange, setFilters: setFilters, filters: filters, handleClose: handleClose, filterGroups: filterGroups }));
67
+ return (_jsx(DateFilter, { selectedView: selectedView, selectedDate: selectedDate, setSelectedDate: setSelectedDate, setFilters: setFilters, filters: filters, handleClose: handleClose, filterGroups: filterGroups }));
68
68
  case "text":
69
69
  return (_jsx(TextFilter, { selectedView: selectedView, textValue: textValue, setTextValue: setTextValue, setFilters: setFilters, handleClose: handleClose, filterGroups: filterGroups }));
70
70
  default:
@@ -75,22 +75,16 @@ export function FilterBar({ filters, setFilters, filterGroups }) {
75
75
  const searchParams = url.searchParams;
76
76
  useEffect(() => {
77
77
  try {
78
- const urlSafeFilters = filters.map(filter => {
79
- const safeValue = Array.isArray(filter.value)
80
- ? filter.value.map(item => ({
81
- value: item.value
82
- }))
83
- : filter.value;
84
- return {
85
- name: filter.name,
86
- type: filter.type,
87
- value: safeValue,
88
- placeholder: filter.placeholder
89
- };
90
- });
91
78
  const params = new URLSearchParams(searchParams.toString());
92
79
  if (filters.length > 0) {
93
- params.set('filters', encodeURIComponent(JSON.stringify(urlSafeFilters)));
80
+ // Convert filters to simple format with URL-safe encoding: filterName:value,value;filterName2:value
81
+ const filterString = filters.map(filter => {
82
+ const values = Array.isArray(filter.value)
83
+ ? filter.value.map(item => encodeURIComponent(item.value || '')).join(',')
84
+ : encodeURIComponent(filter.value || '');
85
+ return `${encodeURIComponent(filter.name)}:${values}`;
86
+ }).join(';');
87
+ params.set('filters', filterString);
94
88
  }
95
89
  else {
96
90
  params.delete('filters');
@@ -106,34 +100,53 @@ export function FilterBar({ filters, setFilters, filterGroups }) {
106
100
  const filtersParam = searchParams.get('filters');
107
101
  if (filtersParam) {
108
102
  try {
109
- const parsedFilters = JSON.parse(decodeURIComponent(filtersParam));
110
- const hydratedFilters = parsedFilters.map((filter) => {
111
- if (Array.isArray(filter.value)) {
112
- const group = filterGroups.find(g => g.name === filter.name);
113
- console.log("group", group);
114
- const valuesWithLabels = filter.value.map((item) => {
115
- const matchingOption = group?.options?.find(opt => opt.value === item.value);
103
+ // Parse simple format with URL-safe decoding: filterName:value,value;filterName2:value
104
+ const filterPairs = filtersParam.split(';');
105
+ const parsedFilters = filterPairs.map(pair => {
106
+ const [encodedName, valuesString] = pair.split(':');
107
+ const name = decodeURIComponent(encodedName);
108
+ const values = valuesString.split(',').map(encodedValue => decodeURIComponent(encodedValue));
109
+ const group = filterGroups.find(g => g.name === name);
110
+ console.log("group", group);
111
+ const filterOptions = values.map(value => {
112
+ if (group?.type === 'text') {
113
+ return { value, label: value };
114
+ }
115
+ else {
116
+ // Try to find option with label, or use labelRenderer, or fallback to value
117
+ const matchingOption = group?.options?.find(opt => opt.value === value);
118
+ let label = value;
119
+ if (matchingOption?.label) {
120
+ label = String(matchingOption.label);
121
+ }
122
+ else if (matchingOption?.labelRenderer) {
123
+ label = String(matchingOption.labelRenderer(value));
124
+ }
125
+ else if (group?.labelRenderer) {
126
+ label = String(group.labelRenderer(value));
127
+ }
116
128
  return {
117
- value: item.value,
118
- label: matchingOption?.label || item.value
129
+ value,
130
+ label
119
131
  };
120
- });
121
- console.log("valuesWithLabels", valuesWithLabels);
122
- return {
123
- ...filter,
124
- value: valuesWithLabels
125
- };
126
- }
127
- return filter;
132
+ }
133
+ });
134
+ console.log("valuesWithLabels", filterOptions);
135
+ return {
136
+ name,
137
+ type: group?.type || 'select',
138
+ placeholder: group?.placeholder,
139
+ value: filterOptions
140
+ };
128
141
  });
129
- setFilters(hydratedFilters);
142
+ setFilters(parsedFilters);
130
143
  }
131
144
  catch (error) {
132
145
  console.error("Failed to parse filters from URL:", error);
133
146
  }
134
147
  }
135
148
  }, []);
136
- return (_jsxs("div", { className: "flex gap-2 flex-wrap justify-start w-full items-center", children: [_jsx("div", { className: "flex gap-2 items-center", children: _jsxs(Popover, { _open: open, onOpenChange: handleOpen, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs(Button, { variant: "ghost", role: "combobox", "aria-expanded": open, size: "md", className: cn("transition group flex gap-1.5"), children: [_jsx(ListFilter, { className: "size-4 shrink-0 transition-all text-muted" }), "Filter"] }) }), _jsx(PopoverContent, { className: "w-[200px] p-0", align: "start", children: _jsxs(Command, { children: [filterGroups.find(group => group.name === selectedView)?.type === "select" ? (_jsx(CommandInput, { placeholder: selectedView ? `Filter by ${selectedView}` : "Filter...", className: "h-9 ring-0", value: commandInput, onValueChange: (value) => {
149
+ return (_jsxs("div", { className: "flex gap-2 flex-wrap justify-start w-full items-center", children: [_jsx("div", { className: "flex gap-2 items-center", children: _jsxs(Popover, { _open: open, onOpenChange: handleOpen, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs(Button, { variant: "ghost", role: "combobox", "aria-expanded": open, size: "md", className: cn("transition group flex gap-1.5"), children: [_jsx(ListFilter, { className: "size-4 shrink-0 transition-all text-muted" }), "Filter"] }) }), _jsx(PopoverContent, { className: "w-[300px] p-0", align: "start", children: _jsxs(Command, { children: [filterGroups.find(group => group.name === selectedView)?.type === "select" ? (_jsx(CommandInput, { placeholder: selectedView ? `Filter by ${selectedView}` : "Filter...", className: "h-9 ring-0", value: commandInput, onValueChange: (value) => {
137
150
  setCommandInput(value);
138
151
  }, ref: commandInputRef, autoFocus: true })) : null, _jsx(CommandList, { className: "max-h-[300px] overflow-y-auto", children: _jsx(CommandGroup, { children: !selectedView ? getAvailableFilterGroups() : renderFilterOptions() }) })] }) })] }) }), _jsx(Filters, { filters: filters, setFilters: setFilters, filterGroups: filterGroups }), filters.filter((filter) => filter.value?.length > 0).length > 0 && _jsx(ButtonClearFilter, {})] }));
139
152
  }