@arbidocs/blocks 0.5.145 → 0.5.147

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 (307) hide show
  1. package/README.md +5 -0
  2. package/dist/{ConnectedCallDock-JVLJEWLJ.cjs → ConnectedCallDock-6VGATAAQ.cjs} +5 -5
  3. package/dist/{ConnectedCallDock-JVLJEWLJ.cjs.map → ConnectedCallDock-6VGATAAQ.cjs.map} +1 -1
  4. package/dist/{ConnectedCallRoom-7YQRDIS3.cjs → ConnectedCallRoom-YBNERVTW.cjs} +5 -5
  5. package/dist/{ConnectedCallRoom-7YQRDIS3.cjs.map → ConnectedCallRoom-YBNERVTW.cjs.map} +1 -1
  6. package/dist/{ConnectedNativeDocxComparison-KKX27IGJ.cjs → ConnectedNativeDocxComparison-MG54YLSO.cjs} +10 -10
  7. package/dist/{ConnectedNativeDocxComparison-KKX27IGJ.cjs.map → ConnectedNativeDocxComparison-MG54YLSO.cjs.map} +1 -1
  8. package/dist/{ConnectedPresentation-JJXQBIV2.cjs → ConnectedPresentation-JZQFTC5H.cjs} +4 -4
  9. package/dist/{ConnectedPresentation-JJXQBIV2.cjs.map → ConnectedPresentation-JZQFTC5H.cjs.map} +1 -1
  10. package/dist/{ConnectedStreamedWordArtifact-HAHRU4DQ.cjs → ConnectedStreamedWordArtifact-7KZGQECL.cjs} +10 -10
  11. package/dist/{ConnectedStreamedWordArtifact-HAHRU4DQ.cjs.map → ConnectedStreamedWordArtifact-7KZGQECL.cjs.map} +1 -1
  12. package/dist/{DocumentReviewCard-ENCPTGJE.cjs → DocumentReviewCard-UDC4PNIS.cjs} +15 -14
  13. package/dist/DocumentReviewCard-UDC4PNIS.cjs.map +1 -0
  14. package/dist/{FilesViewerDialog-VJYQ7XZA.cjs → FilesViewerDialog-D5GHWK4Y.cjs} +16 -15
  15. package/dist/FilesViewerDialog-D5GHWK4Y.cjs.map +1 -0
  16. package/dist/{NativeDocxEditor-7A3SYDAJ.cjs → NativeDocxEditor-R2OKJLRY.cjs} +6 -6
  17. package/dist/{NativeDocxEditor-7A3SYDAJ.cjs.map → NativeDocxEditor-R2OKJLRY.cjs.map} +1 -1
  18. package/dist/{WorkspaceTableView-2RH33X3U.cjs → WorkspaceTableView-2NRV4CWP.cjs} +7 -6
  19. package/dist/WorkspaceTableView-2NRV4CWP.cjs.map +1 -0
  20. package/dist/agents/index.cjs +176 -175
  21. package/dist/agents/tasks/TaskRowMenu.d.ts +1 -2
  22. package/dist/agents/tasks/TaskRowMenu.js +0 -2
  23. package/dist/agents/tasks/TaskRowMenu.js.map +2 -2
  24. package/dist/agents/tasks/TaskTable.d.ts +5 -2
  25. package/dist/agents/tasks/TaskTable.js +11 -8
  26. package/dist/agents/tasks/TaskTable.js.map +2 -2
  27. package/dist/agents/tasks/taskTableLabels.js +1 -1
  28. package/dist/agents/tasks/taskTableLabels.js.map +1 -1
  29. package/dist/{ai-YX3OAC4F.cjs → ai-VLIPYNWP.cjs} +13 -13
  30. package/dist/ai-VLIPYNWP.cjs.map +1 -0
  31. package/dist/calls/index.cjs +2 -2
  32. package/dist/chat/ChatThreads.js +1 -1
  33. package/dist/chat/ChatThreads.js.map +2 -2
  34. package/dist/chat/chat-page-types.d.ts +2 -0
  35. package/dist/chat/chat-page-types.js.map +2 -2
  36. package/dist/chat/index.cjs +25 -25
  37. package/dist/{chunk-32HVYK4Q.cjs → chunk-3VPNL4EH.cjs} +14 -13
  38. package/dist/chunk-3VPNL4EH.cjs.map +1 -0
  39. package/dist/{chunk-6TU4YLFW.cjs → chunk-5TT6J67U.cjs} +3 -3
  40. package/dist/chunk-5TT6J67U.cjs.map +1 -0
  41. package/dist/{chunk-UNBORYTW.cjs → chunk-7AULM6LS.cjs} +7 -7
  42. package/dist/{chunk-UNBORYTW.cjs.map → chunk-7AULM6LS.cjs.map} +1 -1
  43. package/dist/{chunk-MBXXWTKT.cjs → chunk-AYWY4MX2.cjs} +28 -28
  44. package/dist/{chunk-MBXXWTKT.cjs.map → chunk-AYWY4MX2.cjs.map} +1 -1
  45. package/dist/{chunk-P2AZ2HX7.cjs → chunk-AZQ4XIVY.cjs} +26 -26
  46. package/dist/{chunk-P2AZ2HX7.cjs.map → chunk-AZQ4XIVY.cjs.map} +1 -1
  47. package/dist/{chunk-6JLRF7N6.cjs → chunk-BD7P4KYQ.cjs} +5 -6
  48. package/dist/chunk-BD7P4KYQ.cjs.map +1 -0
  49. package/dist/{chunk-INNHU46B.cjs → chunk-BLJET4KG.cjs} +4 -4
  50. package/dist/{chunk-INNHU46B.cjs.map → chunk-BLJET4KG.cjs.map} +1 -1
  51. package/dist/{chunk-VZKTOGZR.cjs → chunk-BLRPBEUG.cjs} +2 -2
  52. package/dist/{chunk-VZKTOGZR.cjs.map → chunk-BLRPBEUG.cjs.map} +1 -1
  53. package/dist/chunk-DKY67DA6.cjs +43 -0
  54. package/dist/chunk-DKY67DA6.cjs.map +1 -0
  55. package/dist/{chunk-N3H3YAKY.cjs → chunk-DUNXLT63.cjs} +17 -12
  56. package/dist/chunk-DUNXLT63.cjs.map +1 -0
  57. package/dist/{chunk-UOI6JJPG.cjs → chunk-EF2QQBDV.cjs} +29 -134
  58. package/dist/chunk-EF2QQBDV.cjs.map +1 -0
  59. package/dist/{chunk-3Y75LUCT.cjs → chunk-FHKBR55Q.cjs} +3 -3
  60. package/dist/{chunk-3Y75LUCT.cjs.map → chunk-FHKBR55Q.cjs.map} +1 -1
  61. package/dist/chunk-G5YLJ2YT.cjs +18 -0
  62. package/dist/{chunk-S2NQS4RC.cjs.map → chunk-G5YLJ2YT.cjs.map} +1 -1
  63. package/dist/{chunk-QW6NCUR7.cjs → chunk-GAA222SK.cjs} +5 -5
  64. package/dist/{chunk-QW6NCUR7.cjs.map → chunk-GAA222SK.cjs.map} +1 -1
  65. package/dist/{chunk-I5L24HOC.cjs → chunk-HWZT24TD.cjs} +6 -6
  66. package/dist/{chunk-I5L24HOC.cjs.map → chunk-HWZT24TD.cjs.map} +1 -1
  67. package/dist/{chunk-LVIQWRC5.cjs → chunk-KRQCUVH7.cjs} +2 -2
  68. package/dist/chunk-KRQCUVH7.cjs.map +1 -0
  69. package/dist/{chunk-6RJXO2NF.cjs → chunk-KWV4VC74.cjs} +6 -6
  70. package/dist/{chunk-6RJXO2NF.cjs.map → chunk-KWV4VC74.cjs.map} +1 -1
  71. package/dist/{chunk-UD56Y6UA.cjs → chunk-L5Q5PDTA.cjs} +4 -4
  72. package/dist/{chunk-UD56Y6UA.cjs.map → chunk-L5Q5PDTA.cjs.map} +1 -1
  73. package/dist/{chunk-XAW22O2S.cjs → chunk-LCIMYEGX.cjs} +4 -4
  74. package/dist/{chunk-XAW22O2S.cjs.map → chunk-LCIMYEGX.cjs.map} +1 -1
  75. package/dist/{chunk-A53YMUOX.cjs → chunk-LH3PDPJP.cjs} +3 -3
  76. package/dist/{chunk-A53YMUOX.cjs.map → chunk-LH3PDPJP.cjs.map} +1 -1
  77. package/dist/{chunk-BCRB42SP.cjs → chunk-LYYJDQW6.cjs} +110 -970
  78. package/dist/chunk-LYYJDQW6.cjs.map +1 -0
  79. package/dist/{chunk-OE36OY64.cjs → chunk-LZQ2XZOC.cjs} +4 -4
  80. package/dist/{chunk-OE36OY64.cjs.map → chunk-LZQ2XZOC.cjs.map} +1 -1
  81. package/dist/{chunk-WQEWVZGO.cjs → chunk-MEWRE43W.cjs} +31 -31
  82. package/dist/{chunk-WQEWVZGO.cjs.map → chunk-MEWRE43W.cjs.map} +1 -1
  83. package/dist/chunk-MWHVETKN.cjs +151 -0
  84. package/dist/chunk-MWHVETKN.cjs.map +1 -0
  85. package/dist/{chunk-33GOYI3O.cjs → chunk-ONRUHYW3.cjs} +4 -4
  86. package/dist/{chunk-33GOYI3O.cjs.map → chunk-ONRUHYW3.cjs.map} +1 -1
  87. package/dist/{chunk-KP7BQIZL.cjs → chunk-ORGGDQKZ.cjs} +43 -40
  88. package/dist/chunk-ORGGDQKZ.cjs.map +1 -0
  89. package/dist/{chunk-TMZS7IKQ.cjs → chunk-OXPIJYRU.cjs} +70 -65
  90. package/dist/chunk-OXPIJYRU.cjs.map +1 -0
  91. package/dist/{chunk-2V5HW6T5.cjs → chunk-P5TQOSKA.cjs} +6 -6
  92. package/dist/{chunk-2V5HW6T5.cjs.map → chunk-P5TQOSKA.cjs.map} +1 -1
  93. package/dist/chunk-Q25CZLK6.cjs +958 -0
  94. package/dist/chunk-Q25CZLK6.cjs.map +1 -0
  95. package/dist/{chunk-464TFVQ7.cjs → chunk-UNWDR6GG.cjs} +6 -6
  96. package/dist/{chunk-464TFVQ7.cjs.map → chunk-UNWDR6GG.cjs.map} +1 -1
  97. package/dist/{chunk-ZPIZINH2.cjs → chunk-VLHBKF4P.cjs} +164 -98
  98. package/dist/chunk-VLHBKF4P.cjs.map +1 -0
  99. package/dist/{chunk-TG2GM7WJ.cjs → chunk-WCT6FT2K.cjs} +11 -7
  100. package/dist/chunk-WCT6FT2K.cjs.map +1 -0
  101. package/dist/{chunk-O6OLY43S.cjs → chunk-WN6BLSAZ.cjs} +5 -5
  102. package/dist/{chunk-O6OLY43S.cjs.map → chunk-WN6BLSAZ.cjs.map} +1 -1
  103. package/dist/{chunk-NPRNR54M.cjs → chunk-ZCVW63DF.cjs} +4 -4
  104. package/dist/{chunk-NPRNR54M.cjs.map → chunk-ZCVW63DF.cjs.map} +1 -1
  105. package/dist/collaboration/index.cjs +34 -9
  106. package/dist/collaboration/sharing/ShareControl.d.ts +15 -6
  107. package/dist/collaboration/sharing/ShareControl.js +9 -4
  108. package/dist/collaboration/sharing/ShareControl.js.map +2 -2
  109. package/dist/collaboration/sharing/index.d.ts +1 -0
  110. package/dist/collaboration/sharing/index.js +15 -1
  111. package/dist/collaboration/sharing/index.js.map +2 -2
  112. package/dist/collaboration/sharing/one-way.d.ts +41 -0
  113. package/dist/collaboration/sharing/one-way.js +39 -0
  114. package/dist/collaboration/sharing/one-way.js.map +7 -0
  115. package/dist/connect/docx.cjs +14 -14
  116. package/dist/connect/index.cjs +4050 -3997
  117. package/dist/connect/index.cjs.map +1 -1
  118. package/dist/connect/viewer.cjs +13 -12
  119. package/dist/connection/account-cluster/ConnectedAccountCluster.js +1 -1
  120. package/dist/connection/account-cluster/ConnectedAccountCluster.js.map +1 -1
  121. package/dist/connection/agents/agentsPageParts.js +6 -2
  122. package/dist/connection/agents/agentsPageParts.js.map +2 -2
  123. package/dist/connection/command/actions.js +3 -3
  124. package/dist/connection/command/actions.js.map +2 -2
  125. package/dist/connection/conversation/ConnectedConversationSettings.js +3 -6
  126. package/dist/connection/conversation/ConnectedConversationSettings.js.map +2 -2
  127. package/dist/connection/dashboards/PanelEditor.d.ts +3 -9
  128. package/dist/connection/dashboards/PanelEditor.js +17 -124
  129. package/dist/connection/dashboards/PanelEditor.js.map +2 -2
  130. package/dist/connection/dashboards/index.d.ts +0 -1
  131. package/dist/connection/dashboards/index.js +0 -6
  132. package/dist/connection/dashboards/index.js.map +2 -2
  133. package/dist/connection/dashboards/templates.d.ts +1 -1
  134. package/dist/connection/dashboards/templates.js.map +1 -1
  135. package/dist/connection/databases/ConnectedDatabasesPage.js +46 -20
  136. package/dist/connection/databases/ConnectedDatabasesPage.js.map +2 -2
  137. package/dist/connection/databases/DatabaseViewsMenu.d.ts +5 -1
  138. package/dist/connection/databases/DatabaseViewsMenu.js +16 -21
  139. package/dist/connection/databases/DatabaseViewsMenu.js.map +2 -2
  140. package/dist/connection/files/bulk/ConnectedFilesBulkActions.d.ts +4 -3
  141. package/dist/connection/files/bulk/ConnectedFilesBulkActions.js +12 -18
  142. package/dist/connection/files/bulk/ConnectedFilesBulkActions.js.map +2 -2
  143. package/dist/connection/files/bulk/useDocumentBulkActions.d.ts +2 -3
  144. package/dist/connection/files/bulk/useDocumentBulkActions.js +6 -15
  145. package/dist/connection/files/bulk/useDocumentBulkActions.js.map +2 -2
  146. package/dist/connection/files/grid/cells.d.ts +7 -3
  147. package/dist/connection/files/grid/cells.js +8 -5
  148. package/dist/connection/files/grid/cells.js.map +2 -2
  149. package/dist/connection/files/grid/documentCellRenderers.d.ts +4 -1
  150. package/dist/connection/files/grid/documentCellRenderers.js +3 -2
  151. package/dist/connection/files/grid/documentCellRenderers.js.map +2 -2
  152. package/dist/connection/files/grid/documentColumns.d.ts +3 -3
  153. package/dist/connection/files/grid/documentColumns.js +4 -2
  154. package/dist/connection/files/grid/documentColumns.js.map +2 -2
  155. package/dist/connection/files/grid/useDocumentTable.js +10 -5
  156. package/dist/connection/files/grid/useDocumentTable.js.map +2 -2
  157. package/dist/connection/files/index.d.ts +1 -2
  158. package/dist/connection/files/index.js +4 -12
  159. package/dist/connection/files/index.js.map +2 -2
  160. package/dist/connection/files/review/useAiReviewLiveUpdates.js +13 -2
  161. package/dist/connection/files/review/useAiReviewLiveUpdates.js.map +2 -2
  162. package/dist/connection/files/views/ViewSelector.js +9 -21
  163. package/dist/connection/files/views/ViewSelector.js.map +2 -2
  164. package/dist/connection/files/views/useTableViews.d.ts +23 -15
  165. package/dist/connection/files/views/useTableViews.js +61 -35
  166. package/dist/connection/files/views/useTableViews.js.map +2 -2
  167. package/dist/connection/files/views/useViewWrites.d.ts +6 -0
  168. package/dist/connection/files/views/useViewWrites.js +64 -0
  169. package/dist/connection/files/views/useViewWrites.js.map +7 -0
  170. package/dist/connection/pages/BlockEditor.d.ts +32 -0
  171. package/dist/connection/pages/BlockEditor.js +175 -0
  172. package/dist/connection/pages/BlockEditor.js.map +7 -0
  173. package/dist/connection/pages/ConnectedPagesPage.d.ts +31 -0
  174. package/dist/connection/pages/ConnectedPagesPage.js +426 -0
  175. package/dist/connection/pages/ConnectedPagesPage.js.map +7 -0
  176. package/dist/connection/pages/DocumentBlocks.d.ts +46 -0
  177. package/dist/connection/pages/DocumentBlocks.js +200 -0
  178. package/dist/connection/pages/DocumentBlocks.js.map +7 -0
  179. package/dist/connection/pages/DocumentsPicker.d.ts +26 -0
  180. package/dist/connection/pages/DocumentsPicker.js +133 -0
  181. package/dist/connection/pages/DocumentsPicker.js.map +7 -0
  182. package/dist/connection/pages/PageBlockView.d.ts +22 -0
  183. package/dist/connection/pages/PageBlockView.js +82 -0
  184. package/dist/connection/pages/PageBlockView.js.map +7 -0
  185. package/dist/connection/pages/PageGrid.d.ts +26 -0
  186. package/dist/connection/pages/PageGrid.js +50 -0
  187. package/dist/connection/pages/PageGrid.js.map +7 -0
  188. package/dist/connection/pages/PageView.d.ts +24 -0
  189. package/dist/connection/pages/PageView.js +93 -0
  190. package/dist/connection/pages/PageView.js.map +7 -0
  191. package/dist/connection/pages/PagesList.d.ts +14 -0
  192. package/dist/connection/pages/PagesList.js +143 -0
  193. package/dist/connection/pages/PagesList.js.map +7 -0
  194. package/dist/connection/pages/TableViewBlock.d.ts +24 -0
  195. package/dist/connection/pages/TableViewBlock.js +82 -0
  196. package/dist/connection/pages/TableViewBlock.js.map +7 -0
  197. package/dist/connection/pages/ViewPicker.d.ts +21 -0
  198. package/dist/connection/pages/ViewPicker.js +56 -0
  199. package/dist/connection/pages/ViewPicker.js.map +7 -0
  200. package/dist/connection/pages/index.d.ts +9 -0
  201. package/dist/connection/pages/index.js +49 -0
  202. package/dist/connection/pages/index.js.map +7 -0
  203. package/dist/connection/pages/labels.d.ts +61 -0
  204. package/dist/connection/pages/labels.js +61 -0
  205. package/dist/connection/pages/labels.js.map +7 -0
  206. package/dist/connection/settings-page/featuresSection.js +2 -2
  207. package/dist/connection/settings-page/featuresSection.js.map +1 -1
  208. package/dist/connection/sharing/ResourceShareForm.js +1 -1
  209. package/dist/connection/sharing/ResourceShareForm.js.map +2 -2
  210. package/dist/connection/threads-page/ConnectedThreadsPage.js +10 -8
  211. package/dist/connection/threads-page/ConnectedThreadsPage.js.map +2 -2
  212. package/dist/connection/viewer/ConnectedDocumentViewer.js +11 -6
  213. package/dist/connection/viewer/ConnectedDocumentViewer.js.map +2 -2
  214. package/dist/dashboards/ConditionsEditor.d.ts +54 -0
  215. package/dist/dashboards/ConditionsEditor.js +156 -0
  216. package/dist/dashboards/ConditionsEditor.js.map +7 -0
  217. package/dist/dashboards/index.cjs +33 -521
  218. package/dist/dashboards/index.cjs.map +1 -1
  219. package/dist/dashboards/index.d.ts +3 -2
  220. package/dist/dashboards/index.js +13 -1
  221. package/dist/dashboards/index.js.map +2 -2
  222. package/dist/databases/DatabaseFilterMenu.d.ts +18 -0
  223. package/dist/databases/DatabaseFilterMenu.js +95 -0
  224. package/dist/databases/DatabaseFilterMenu.js.map +7 -0
  225. package/dist/databases/DatabaseTable.js +1 -1
  226. package/dist/databases/DatabaseTable.js.map +1 -1
  227. package/dist/databases/DatabaseToolbar.d.ts +3 -1
  228. package/dist/databases/DatabaseToolbar.js +2 -0
  229. package/dist/databases/DatabaseToolbar.js.map +2 -2
  230. package/dist/databases/index.cjs +85 -71
  231. package/dist/databases/index.d.ts +1 -0
  232. package/dist/databases/index.js +8 -0
  233. package/dist/databases/index.js.map +2 -2
  234. package/dist/docx/NativeDocxEditor.js +3 -4
  235. package/dist/docx/NativeDocxEditor.js.map +2 -2
  236. package/dist/docx/index.cjs +38 -38
  237. package/dist/embed/index.cjs +14 -13
  238. package/dist/facts/index.cjs +43 -43
  239. package/dist/files/bulk/BulkActionsBar.d.ts +8 -5
  240. package/dist/files/bulk/BulkActionsBar.js +6 -7
  241. package/dist/files/bulk/BulkActionsBar.js.map +2 -2
  242. package/dist/files/cells/DocumentNameCell.d.ts +2 -1
  243. package/dist/files/cells/DocumentNameCell.js +1 -1
  244. package/dist/files/cells/DocumentNameCell.js.map +2 -2
  245. package/dist/files/index.cjs +237 -224
  246. package/dist/files/index.d.ts +1 -1
  247. package/dist/files/index.js +0 -2
  248. package/dist/files/index.js.map +2 -2
  249. package/dist/files/permissions.d.ts +4 -3
  250. package/dist/files/permissions.js +6 -3
  251. package/dist/files/permissions.js.map +2 -2
  252. package/dist/files/views/ViewSelectorMenu.d.ts +24 -5
  253. package/dist/files/views/ViewSelectorMenu.js +78 -51
  254. package/dist/files/views/ViewSelectorMenu.js.map +2 -2
  255. package/dist/files/views/gridViews.d.ts +34 -1
  256. package/dist/files/views/gridViews.js +28 -0
  257. package/dist/files/views/gridViews.js.map +2 -2
  258. package/dist/files/views/index.d.ts +2 -2
  259. package/dist/files/views/index.js +8 -0
  260. package/dist/files/views/index.js.map +2 -2
  261. package/dist/files/views/useGridViews.d.ts +8 -4
  262. package/dist/files/views/useGridViews.js +42 -11
  263. package/dist/files/views/useGridViews.js.map +2 -2
  264. package/dist/files/visibility.d.ts +1 -16
  265. package/dist/files/visibility.js +6 -23
  266. package/dist/files/visibility.js.map +2 -2
  267. package/dist/index.cjs +455 -430
  268. package/dist/index.cjs.map +1 -1
  269. package/dist/pages/index.cjs +1363 -0
  270. package/dist/pages/index.cjs.map +1 -0
  271. package/dist/pages/index.d.ts +14 -0
  272. package/dist/pages/index.js +3 -0
  273. package/dist/pages/index.js.map +7 -0
  274. package/dist/settings/ConversationSettingsParts.d.ts +4 -6
  275. package/dist/settings/ConversationSettingsParts.js +15 -10
  276. package/dist/settings/ConversationSettingsParts.js.map +2 -2
  277. package/dist/settings/index.cjs +145 -144
  278. package/dist/studio/index.cjs +8 -7
  279. package/dist/studio/index.cjs.map +1 -1
  280. package/dist/studio/widgets.js.map +1 -1
  281. package/dist/styles.css +1 -1
  282. package/dist/workflow-canvas/index.cjs +28 -27
  283. package/dist/workflow-canvas/index.cjs.map +1 -1
  284. package/node_modules/@arbidocs/coedit/package.json +1 -1
  285. package/package.json +10 -5
  286. package/dist/DocumentReviewCard-ENCPTGJE.cjs.map +0 -1
  287. package/dist/FilesViewerDialog-VJYQ7XZA.cjs.map +0 -1
  288. package/dist/WorkspaceTableView-2RH33X3U.cjs.map +0 -1
  289. package/dist/ai-YX3OAC4F.cjs.map +0 -1
  290. package/dist/chunk-32HVYK4Q.cjs.map +0 -1
  291. package/dist/chunk-6JLRF7N6.cjs.map +0 -1
  292. package/dist/chunk-6TU4YLFW.cjs.map +0 -1
  293. package/dist/chunk-BCRB42SP.cjs.map +0 -1
  294. package/dist/chunk-KP7BQIZL.cjs.map +0 -1
  295. package/dist/chunk-LVIQWRC5.cjs.map +0 -1
  296. package/dist/chunk-N3H3YAKY.cjs.map +0 -1
  297. package/dist/chunk-S2NQS4RC.cjs +0 -18
  298. package/dist/chunk-TG2GM7WJ.cjs.map +0 -1
  299. package/dist/chunk-TMZS7IKQ.cjs.map +0 -1
  300. package/dist/chunk-UOI6JJPG.cjs.map +0 -1
  301. package/dist/chunk-ZPIZINH2.cjs.map +0 -1
  302. package/dist/connection/dashboards/ConnectedDashboardsPage.d.ts +0 -69
  303. package/dist/connection/dashboards/ConnectedDashboardsPage.js +0 -554
  304. package/dist/connection/dashboards/ConnectedDashboardsPage.js.map +0 -7
  305. package/dist/connection/files/views/tableViews.d.ts +0 -19
  306. package/dist/connection/files/views/tableViews.js +0 -36
  307. package/dist/connection/files/views/tableViews.js.map +0 -7
@@ -1,69 +0,0 @@
1
- import { type DashboardSpec } from '@arbidocs/react';
2
- import { type DashboardPanelLabels } from './DashboardPanel';
3
- import { type PanelEditorLabels } from './PanelEditor';
4
- export interface DashboardsPageLabels {
5
- title: string;
6
- description: string;
7
- newDashboard: string;
8
- blank: string;
9
- untitled: string;
10
- empty: string;
11
- emptyDescription: string;
12
- loadError: string;
13
- /** Offline with no dashboards cached. */
14
- offline: string;
15
- retry: string;
16
- panels: (count: number) => string;
17
- back: string;
18
- edit: string;
19
- /** The "…" menu of an open dashboard (its rarer actions: delete). */
20
- more: string;
21
- delete: string;
22
- confirmDelete: (title: string) => string;
23
- deleteFailed: string;
24
- /** Leaving the editor with changes not saved. */
25
- confirmDiscard: string;
26
- save: string;
27
- saving: string;
28
- cancel: string;
29
- dashboardTitle: string;
30
- dashboardDescription: string;
31
- addPanel: string;
32
- editPanel: string;
33
- editPanelDescription: string;
34
- panelDone: string;
35
- moveUp: string;
36
- moveDown: string;
37
- removePanel: string;
38
- noPanels: string;
39
- saved: string;
40
- saveFailed: string;
41
- /** The figure of a new dashboard made from a database ("Chart this"): its rows. */
42
- rows: string;
43
- /** Saved dashboards that could not be opened (sealed under another key, or damaged). */
44
- unreadable: (count: number) => string;
45
- deleteUnreadable: string;
46
- confirmDeleteUnreadable: (count: number) => string;
47
- }
48
- export declare const DEFAULT_DASHBOARDS_PAGE_LABELS: DashboardsPageLabels;
49
- export interface ConnectedDashboardsPageProps {
50
- /**
51
- * Starting points for a new dashboard. Default: an overview and one per area (documents, tags and
52
- * facts, workflows, AI usage, recent activity) over the built-in sources; Workflows only while
53
- * the host's `workflows` feature is on.
54
- */
55
- templates?: readonly DashboardSpec[];
56
- /** The open dashboard (controlled, for a route): `null` is the list. */
57
- dashboardId?: string | null;
58
- onDashboardChange?: (id: string | null) => void;
59
- labels?: Partial<DashboardsPageLabels>;
60
- panelLabels?: Partial<DashboardPanelLabels>;
61
- editorLabels?: Partial<PanelEditorLabels>;
62
- /**
63
- * Classes on the page's scrolling frame, merged over its padding (`p-4 sm:p-6`): a host whose
64
- * own frame pads its pages passes `p-0`.
65
- */
66
- className?: string;
67
- testId?: string;
68
- }
69
- export declare function ConnectedDashboardsPage({ templates: siteTemplates, dashboardId, onDashboardChange, labels, panelLabels, editorLabels, className, testId, }: ConnectedDashboardsPageProps): import("react").JSX.Element;
@@ -1,554 +0,0 @@
1
- "use client";
2
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
- import { useEffect, useMemo, useRef, useState } from "react";
4
- import {
5
- ArrowDown,
6
- ArrowLeft,
7
- ArrowUp,
8
- LayoutDashboard,
9
- MoreHorizontal,
10
- Pencil,
11
- Plus,
12
- Trash2
13
- } from "lucide-react";
14
- import {
15
- ANALYTICS_CHART_VIEW,
16
- useFeature,
17
- useSessionView,
18
- useTransientView,
19
- useDashboardStore,
20
- useDeleteDashboard,
21
- useSaveDashboard,
22
- useSavedDashboards
23
- } from "@arbidocs/react";
24
- import {
25
- Button,
26
- Card,
27
- cn,
28
- Dialog,
29
- DialogContent,
30
- DialogDescription,
31
- DialogFooter,
32
- DialogHeader,
33
- DialogTitle,
34
- DropdownMenu,
35
- DropdownMenuContent,
36
- DropdownMenuItem,
37
- DropdownMenuTrigger,
38
- Input,
39
- Label
40
- } from "@arbidocs/react/ui";
41
- import { EmptyState } from "../../components/EmptyState.js";
42
- import { PageHeader } from "../../components/PageHeader.js";
43
- import { DashboardCell, DashboardGrid } from "../../dashboards/DashboardGrid.js";
44
- import { useBlocksEnvironment } from "../../provider/environment.js";
45
- import { DashboardPanel } from "./DashboardPanel.js";
46
- import { PanelEditor } from "./PanelEditor.js";
47
- import { DASHBOARD_TEMPLATES, newPanel, templatesFor } from "./templates.js";
48
- const DEFAULT_DASHBOARDS_PAGE_LABELS = {
49
- title: "Analytics",
50
- description: "Charts and figures from your documents, threads, tags, facts, workflows, AI usage and databases.",
51
- newDashboard: "New dashboard",
52
- blank: "Blank dashboard",
53
- untitled: "Untitled dashboard",
54
- empty: "No dashboards yet",
55
- emptyDescription: "Start from a template or a blank page, then add charts, figures and tables.",
56
- loadError: "The dashboards could not be loaded.",
57
- offline: "You are offline. Your dashboards show when the connection is back.",
58
- retry: "Try again",
59
- panels: (count) => `${count} ${count === 1 ? "panel" : "panels"}`,
60
- back: "All dashboards",
61
- edit: "Edit",
62
- more: "More dashboard actions",
63
- delete: "Delete",
64
- confirmDelete: (title) => `Delete the dashboard \u201C${title}\u201D? Its panels go with it.`,
65
- deleteFailed: "The dashboard could not be deleted",
66
- confirmDiscard: "Discard the changes to this dashboard?",
67
- save: "Save",
68
- saving: "Saving\u2026",
69
- cancel: "Cancel",
70
- dashboardTitle: "Name",
71
- dashboardDescription: "Description",
72
- addPanel: "Add a panel",
73
- editPanel: "Panel",
74
- editPanelDescription: "Choose the data, how to show it, and what to measure.",
75
- panelDone: "Done",
76
- moveUp: "Move up",
77
- moveDown: "Move down",
78
- removePanel: "Remove the panel",
79
- noPanels: "No panels yet. Add one to start.",
80
- saved: "Dashboard saved",
81
- saveFailed: "The dashboard could not be saved",
82
- rows: "Rows",
83
- unreadable: (count) => `${count} saved ${count === 1 ? "dashboard" : "dashboards"} could not be opened.`,
84
- deleteUnreadable: "Delete",
85
- confirmDeleteUnreadable: (count) => `Delete the ${count === 1 ? "dashboard" : `${count} dashboards`} that could not be opened?`
86
- };
87
- function PanelsGrid({
88
- spec,
89
- panelLabels,
90
- editing,
91
- testId
92
- }) {
93
- return /* @__PURE__ */ jsx(DashboardGrid, { testId: testId && `${testId}-grid`, children: spec.panels.map((panel, i) => /* @__PURE__ */ jsx(DashboardCell, { width: panel.width, children: /* @__PURE__ */ jsx(
94
- DashboardPanel,
95
- {
96
- panel,
97
- labels: panelLabels,
98
- testId: testId && `${testId}-panel-${panel.id}`,
99
- actions: editing && /* @__PURE__ */ jsxs(Fragment, { children: [
100
- /* @__PURE__ */ jsx(
101
- Button,
102
- {
103
- variant: "ghost",
104
- size: "icon",
105
- className: "size-7",
106
- "aria-label": editing.l.editPanel,
107
- onClick: () => editing.onEdit(i),
108
- children: /* @__PURE__ */ jsx(Pencil, { className: "size-3.5" })
109
- }
110
- ),
111
- /* @__PURE__ */ jsx(
112
- Button,
113
- {
114
- variant: "ghost",
115
- size: "icon",
116
- className: "size-7",
117
- "aria-label": editing.l.moveUp,
118
- disabled: i === 0,
119
- onClick: () => editing.onMove(i, -1),
120
- children: /* @__PURE__ */ jsx(ArrowUp, { className: "size-3.5" })
121
- }
122
- ),
123
- /* @__PURE__ */ jsx(
124
- Button,
125
- {
126
- variant: "ghost",
127
- size: "icon",
128
- className: "size-7",
129
- "aria-label": editing.l.moveDown,
130
- disabled: i === spec.panels.length - 1,
131
- onClick: () => editing.onMove(i, 1),
132
- children: /* @__PURE__ */ jsx(ArrowDown, { className: "size-3.5" })
133
- }
134
- ),
135
- /* @__PURE__ */ jsx(
136
- Button,
137
- {
138
- variant: "ghost",
139
- size: "icon",
140
- className: "size-7",
141
- "aria-label": editing.l.removePanel,
142
- onClick: () => editing.onRemove(i),
143
- children: /* @__PURE__ */ jsx(Trash2, { className: "size-3.5" })
144
- }
145
- )
146
- ] })
147
- }
148
- ) }, panel.id)) });
149
- }
150
- function NewDashboardButton({
151
- templates,
152
- l,
153
- onBlank,
154
- onTemplate,
155
- busy,
156
- testId
157
- }) {
158
- return /* @__PURE__ */ jsxs(DropdownMenu, { children: [
159
- /* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { disabled: busy, "data-testid": `${testId}-new`, children: [
160
- /* @__PURE__ */ jsx(Plus, { className: "size-4" }),
161
- " ",
162
- busy ? l.saving : l.newDashboard
163
- ] }) }),
164
- /* @__PURE__ */ jsxs(DropdownMenuContent, { align: "end", className: "max-w-[min(20rem,calc(100vw-1rem))]", children: [
165
- /* @__PURE__ */ jsx(DropdownMenuItem, { onSelect: onBlank, "data-testid": `${testId}-blank`, children: l.blank }),
166
- templates.map((t, i) => /* @__PURE__ */ jsxs(
167
- DropdownMenuItem,
168
- {
169
- onSelect: () => onTemplate(t),
170
- className: "flex-col items-start gap-0.5",
171
- "data-testid": `${testId}-template-${i}`,
172
- children: [
173
- /* @__PURE__ */ jsx("span", { children: t.title }),
174
- t.description && /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: t.description })
175
- ]
176
- },
177
- `${t.title}-${i}`
178
- ))
179
- ] })
180
- ] });
181
- }
182
- function ConnectedDashboardsPage({
183
- templates: siteTemplates,
184
- dashboardId,
185
- onDashboardChange,
186
- labels,
187
- panelLabels,
188
- editorLabels,
189
- className,
190
- testId = "dashboards"
191
- }) {
192
- const l = { ...DEFAULT_DASHBOARDS_PAGE_LABELS, ...labels };
193
- const { confirm, notify } = useBlocksEnvironment();
194
- const workflowsOn = useFeature("workflows");
195
- const templates = siteTemplates ?? templatesFor(DASHBOARD_TEMPLATES, { workflows: workflowsOn });
196
- const store = useDashboardStore();
197
- const saved = useSavedDashboards(store);
198
- const save = useSaveDashboard(store);
199
- const remove = useDeleteDashboard(store);
200
- const [ownOpenId, setOwnOpenId] = useSessionView(
201
- `dashboards.open:${store.scope ?? ""}`,
202
- null
203
- );
204
- const openId = dashboardId === void 0 ? ownOpenId : dashboardId;
205
- const setOpenId = (id) => {
206
- setOwnOpenId(id);
207
- onDashboardChange?.(id);
208
- };
209
- const [draft, setDraft] = useState(null);
210
- const [creating, setCreating] = useState(false);
211
- const openIdRef = useRef(openId);
212
- useEffect(() => {
213
- openIdRef.current = openId;
214
- }, [openId]);
215
- const [editingPanel, setEditingPanel] = useState(null);
216
- const open = useMemo(
217
- () => saved.data?.find((d) => d.id === openId && !d.unreadable),
218
- [saved.data, openId]
219
- );
220
- useEffect(() => {
221
- if (openId && saved.data && !open && !draft) setOwnOpenId(null);
222
- }, [openId, saved.data, open, draft]);
223
- const [chartRequest, clearChartRequest] = useTransientView(
224
- ANALYTICS_CHART_VIEW,
225
- null
226
- );
227
- useEffect(() => {
228
- if (!chartRequest) return;
229
- clearChartRequest(void 0);
230
- const source = {
231
- id: "database",
232
- params: { databaseId: chartRequest.id, workspaceId: chartRequest.workspaceId }
233
- };
234
- const spec = {
235
- version: 1,
236
- title: chartRequest.name,
237
- panels: [
238
- { ...newPanel(), title: l.rows, source, chart: { type: "metric" }, width: 3 },
239
- { ...newPanel(), title: chartRequest.name, source, chart: { type: "table" }, width: 12 }
240
- ]
241
- };
242
- setDraft({ spec, base: spec });
243
- }, [chartRequest]);
244
- const startEditing = (d) => setDraft({ id: d.id, spec: d.spec, base: d.spec });
245
- const createBlank = () => {
246
- const spec = { version: 1, title: l.untitled, panels: [] };
247
- setDraft({ spec, base: spec });
248
- };
249
- const createFromTemplate = async (template) => {
250
- if (creating) return;
251
- setCreating(true);
252
- const openWhenStarted = openIdRef.current;
253
- try {
254
- const result = await save.mutateAsync({
255
- spec: { ...template, panels: template.panels.map((p) => ({ ...p })) }
256
- });
257
- if (openIdRef.current === openWhenStarted) setOpenId(result.id);
258
- notify(l.saved, "success");
259
- } catch (error) {
260
- notify(`${l.saveFailed}: ${error instanceof Error ? error.message : String(error)}`, "error");
261
- } finally {
262
- setCreating(false);
263
- }
264
- };
265
- const cancelEditing = async () => {
266
- const changed = draft && JSON.stringify(draft.spec) !== JSON.stringify(draft.base);
267
- if (changed && !await confirm({ message: l.confirmDiscard, kind: "yesno" })) return;
268
- setDraft(null);
269
- };
270
- const updateDraft = (patch) => setDraft((d) => d ? { ...d, spec: { ...d.spec, ...patch } } : d);
271
- const setPanels = (panels) => updateDraft({ panels });
272
- const commit = async () => {
273
- if (!draft) return;
274
- try {
275
- const result = await save.mutateAsync({
276
- id: draft.id,
277
- spec: { ...draft.spec, title: draft.spec.title.trim() || l.untitled }
278
- });
279
- setDraft(null);
280
- setOpenId(result.id);
281
- notify(l.saved, "success");
282
- } catch (error) {
283
- notify(`${l.saveFailed}: ${error instanceof Error ? error.message : String(error)}`, "error");
284
- }
285
- };
286
- const deleteOpen = async (d) => {
287
- if (!await confirm({ message: l.confirmDelete(d.spec.title), kind: "yesno" })) return;
288
- try {
289
- await remove.mutateAsync(d.id);
290
- setOpenId(null);
291
- } catch (error) {
292
- notify(
293
- `${l.deleteFailed}: ${error instanceof Error ? error.message : String(error)}`,
294
- "error"
295
- );
296
- }
297
- };
298
- let content;
299
- if (draft) {
300
- const panels = draft.spec.panels;
301
- content = /* @__PURE__ */ jsxs("div", { className: "space-y-6", "data-testid": `${testId}-editor`, children: [
302
- /* @__PURE__ */ jsx(
303
- PageHeader,
304
- {
305
- title: draft.spec.title || l.untitled,
306
- actions: /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
307
- /* @__PURE__ */ jsx(
308
- Button,
309
- {
310
- variant: "ghost",
311
- onClick: () => void cancelEditing(),
312
- "data-testid": `${testId}-cancel`,
313
- children: l.cancel
314
- }
315
- ),
316
- /* @__PURE__ */ jsx(
317
- Button,
318
- {
319
- onClick: () => void commit(),
320
- disabled: save.isPending,
321
- "data-testid": `${testId}-save`,
322
- children: save.isPending ? l.saving : l.save
323
- }
324
- )
325
- ] })
326
- }
327
- ),
328
- /* @__PURE__ */ jsxs("div", { className: "grid gap-4 sm:grid-cols-2", children: [
329
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1.5", children: [
330
- /* @__PURE__ */ jsx(Label, { htmlFor: `${testId}-name`, children: l.dashboardTitle }),
331
- /* @__PURE__ */ jsx(
332
- Input,
333
- {
334
- id: `${testId}-name`,
335
- value: draft.spec.title,
336
- onChange: (e) => updateDraft({ title: e.target.value }),
337
- "data-testid": `${testId}-name`
338
- }
339
- )
340
- ] }),
341
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1.5", children: [
342
- /* @__PURE__ */ jsx(Label, { htmlFor: `${testId}-about`, children: l.dashboardDescription }),
343
- /* @__PURE__ */ jsx(
344
- Input,
345
- {
346
- id: `${testId}-about`,
347
- value: draft.spec.description ?? "",
348
- onChange: (e) => updateDraft({ description: e.target.value || void 0 })
349
- }
350
- )
351
- ] })
352
- ] }),
353
- panels.length ? /* @__PURE__ */ jsx(
354
- PanelsGrid,
355
- {
356
- spec: draft.spec,
357
- panelLabels,
358
- testId,
359
- editing: {
360
- l,
361
- onEdit: (index) => setEditingPanel({ index, panel: panels[index] }),
362
- onMove: (index, by) => {
363
- const next = [...panels];
364
- const [moved] = next.splice(index, 1);
365
- next.splice(index + by, 0, moved);
366
- setPanels(next);
367
- },
368
- onRemove: (index) => setPanels(panels.filter((_, i) => i !== index))
369
- }
370
- }
371
- ) : /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: l.noPanels }),
372
- /* @__PURE__ */ jsxs(
373
- Button,
374
- {
375
- variant: "outline",
376
- onClick: () => setEditingPanel({ index: panels.length, panel: newPanel() }),
377
- "data-testid": `${testId}-add-panel`,
378
- children: [
379
- /* @__PURE__ */ jsx(Plus, { className: "size-4" }),
380
- " ",
381
- l.addPanel
382
- ]
383
- }
384
- ),
385
- /* @__PURE__ */ jsx(Dialog, { open: editingPanel !== null, onOpenChange: (o) => !o && setEditingPanel(null), children: /* @__PURE__ */ jsxs(DialogContent, { className: "max-h-[90dvh] max-w-5xl overflow-y-auto", children: [
386
- /* @__PURE__ */ jsxs(DialogHeader, { children: [
387
- /* @__PURE__ */ jsx(DialogTitle, { children: l.editPanel }),
388
- /* @__PURE__ */ jsx(DialogDescription, { children: l.editPanelDescription })
389
- ] }),
390
- editingPanel && /* @__PURE__ */ jsx(
391
- PanelEditor,
392
- {
393
- value: editingPanel.panel,
394
- onChange: (panel) => setEditingPanel({ ...editingPanel, panel }),
395
- labels: editorLabels,
396
- testId: `${testId}-panel-editor`
397
- }
398
- ),
399
- /* @__PURE__ */ jsxs(DialogFooter, { children: [
400
- /* @__PURE__ */ jsx(Button, { variant: "ghost", onClick: () => setEditingPanel(null), children: l.cancel }),
401
- /* @__PURE__ */ jsx(
402
- Button,
403
- {
404
- "data-testid": `${testId}-panel-done`,
405
- onClick: () => {
406
- if (!editingPanel) return;
407
- const next = [...panels];
408
- next[editingPanel.index] = editingPanel.panel;
409
- setPanels(next);
410
- setEditingPanel(null);
411
- },
412
- children: l.panelDone
413
- }
414
- )
415
- ] })
416
- ] }) })
417
- ] });
418
- } else if (open) {
419
- content = /* @__PURE__ */ jsxs("div", { className: "space-y-6", "data-testid": `${testId}-view`, children: [
420
- /* @__PURE__ */ jsx(
421
- PageHeader,
422
- {
423
- title: open.spec.title,
424
- description: open.spec.description,
425
- leading: /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "icon", "aria-label": l.back, onClick: () => setOpenId(null), children: /* @__PURE__ */ jsx(ArrowLeft, { className: "size-4" }) }),
426
- actions: /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
427
- /* @__PURE__ */ jsxs(
428
- Button,
429
- {
430
- variant: "outline",
431
- onClick: () => startEditing(open),
432
- "data-testid": `${testId}-edit`,
433
- children: [
434
- /* @__PURE__ */ jsx(Pencil, { className: "size-4" }),
435
- " ",
436
- l.edit
437
- ]
438
- }
439
- ),
440
- /* @__PURE__ */ jsxs(DropdownMenu, { children: [
441
- /* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
442
- Button,
443
- {
444
- variant: "ghost",
445
- size: "icon",
446
- "aria-label": l.more,
447
- "data-testid": `${testId}-more`,
448
- children: /* @__PURE__ */ jsx(MoreHorizontal, { className: "size-4" })
449
- }
450
- ) }),
451
- /* @__PURE__ */ jsx(DropdownMenuContent, { align: "end", children: /* @__PURE__ */ jsxs(
452
- DropdownMenuItem,
453
- {
454
- onSelect: () => void deleteOpen(open),
455
- className: "text-destructive focus:text-destructive",
456
- "data-testid": `${testId}-delete`,
457
- children: [
458
- /* @__PURE__ */ jsx(Trash2, { className: "size-4" }),
459
- " ",
460
- l.delete
461
- ]
462
- }
463
- ) })
464
- ] })
465
- ] })
466
- }
467
- ),
468
- /* @__PURE__ */ jsx(PanelsGrid, { spec: open.spec, panelLabels, testId })
469
- ] });
470
- } else {
471
- const list = (saved.data ?? []).filter((d) => !d.unreadable);
472
- const unreadable = (saved.data ?? []).filter((d) => d.unreadable);
473
- const deleteUnreadable = async () => {
474
- if (!await confirm({ message: l.confirmDeleteUnreadable(unreadable.length), kind: "yesno" }))
475
- return;
476
- try {
477
- for (const d of unreadable) await remove.mutateAsync(d.id);
478
- } catch (error) {
479
- notify(
480
- `${l.deleteFailed}: ${error instanceof Error ? error.message : String(error)}`,
481
- "error"
482
- );
483
- }
484
- };
485
- const newButton = /* @__PURE__ */ jsx(
486
- NewDashboardButton,
487
- {
488
- templates,
489
- l,
490
- onBlank: createBlank,
491
- onTemplate: (t) => void createFromTemplate(t),
492
- busy: creating,
493
- testId
494
- }
495
- );
496
- const isEmpty = !!saved.data && list.length === 0;
497
- content = /* @__PURE__ */ jsxs("div", { className: "space-y-6", "data-testid": `${testId}-list`, children: [
498
- /* @__PURE__ */ jsx(
499
- PageHeader,
500
- {
501
- title: l.title,
502
- description: l.description,
503
- actions: saved.isError || saved.data && !isEmpty ? newButton : void 0
504
- }
505
- ),
506
- unreadable.length > 0 && /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-3", "data-testid": `${testId}-unreadable`, children: [
507
- /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: l.unreadable(unreadable.length) }),
508
- /* @__PURE__ */ jsx(Button, { variant: "outline", size: "sm", onClick: () => void deleteUnreadable(), children: l.deleteUnreadable })
509
- ] }),
510
- saved.isError && !saved.data ? /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-3", role: "alert", children: [
511
- /* @__PURE__ */ jsx("p", { className: "text-sm text-destructive", children: l.loadError }),
512
- /* @__PURE__ */ jsx(Button, { variant: "outline", size: "sm", onClick: () => void saved.refetch(), children: l.retry })
513
- ] }) : !saved.data && saved.fetchStatus === "paused" ? /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", "data-testid": `${testId}-offline`, children: l.offline }) : !saved.data ? /* @__PURE__ */ jsx("div", { className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-3", children: [0, 1, 2].map((i) => /* @__PURE__ */ jsx("div", { className: "h-24 animate-pulse rounded-xl bg-muted" }, i)) }) : isEmpty ? /* @__PURE__ */ jsx(
514
- EmptyState,
515
- {
516
- icon: LayoutDashboard,
517
- title: l.empty,
518
- description: l.emptyDescription,
519
- action: newButton,
520
- testId: `${testId}-empty`
521
- }
522
- ) : /* @__PURE__ */ jsx("ul", { className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-3", children: list.map((d) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Card, { variant: "elevated", className: "card-hover h-full rounded-xl p-0", children: /* @__PURE__ */ jsxs(
523
- "button",
524
- {
525
- type: "button",
526
- className: "flex size-full flex-col items-start gap-1 rounded-xl p-5 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
527
- onClick: () => setOpenId(d.id),
528
- "data-testid": `${testId}-open-${d.id}`,
529
- children: [
530
- /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2 font-medium text-foreground", children: [
531
- /* @__PURE__ */ jsx(LayoutDashboard, { className: "size-4 text-muted-foreground" }),
532
- d.spec.title
533
- ] }),
534
- d.spec.description && /* @__PURE__ */ jsx("span", { className: "line-clamp-2 text-sm text-muted-foreground", children: d.spec.description }),
535
- /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: l.panels(d.spec.panels.length) })
536
- ]
537
- }
538
- ) }) }, d.id)) })
539
- ] });
540
- }
541
- return /* @__PURE__ */ jsx(
542
- "div",
543
- {
544
- className: cn("h-full min-h-0 w-full overflow-y-auto p-4 sm:p-6", className),
545
- "data-testid": testId,
546
- children: content
547
- }
548
- );
549
- }
550
- export {
551
- ConnectedDashboardsPage,
552
- DEFAULT_DASHBOARDS_PAGE_LABELS
553
- };
554
- //# sourceMappingURL=ConnectedDashboardsPage.js.map