@lunora/studio 1.0.0-alpha.59 → 1.0.0-alpha.60

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 (381) hide show
  1. package/dist/index.d.ts +1 -1
  2. package/dist/index.js +1 -43
  3. package/dist/mount.js +1 -27
  4. package/dist/packem_chunks/ApiTab.js +1 -251
  5. package/dist/packem_chunks/AuditPanel.js +1 -200
  6. package/dist/packem_chunks/DeploymentHealthPanel.js +1 -664
  7. package/dist/packem_chunks/ExportImportPanel.js +3 -198
  8. package/dist/packem_chunks/FileBrowser.js +4 -2955
  9. package/dist/packem_chunks/FunctionRunner.js +1 -326
  10. package/dist/packem_chunks/FunctionStatsPanel.js +1 -377
  11. package/dist/packem_chunks/HealthPanel.js +1 -648
  12. package/dist/packem_chunks/InsightsPanel.js +1 -462
  13. package/dist/packem_chunks/LogsPanel.js +1 -1303
  14. package/dist/packem_chunks/MailPanel.js +2 -353
  15. package/dist/packem_chunks/MetricsPanel.js +1 -1960
  16. package/dist/packem_chunks/MigrationsPanel.js +1 -239
  17. package/dist/packem_chunks/NotificationsPanel.js +1 -306
  18. package/dist/packem_chunks/PitrPanel.js +1 -252
  19. package/dist/packem_chunks/SchemaViewer.js +1 -2512
  20. package/dist/packem_chunks/SecurityAdvisorPanel.js +1 -95
  21. package/dist/packem_chunks/SettingsPanel.js +1 -391
  22. package/dist/packem_chunks/SqlEditorPanel.js +4 -2340
  23. package/dist/packem_chunks/TableEditor.js +1 -290
  24. package/dist/packem_chunks/agents-panel.js +1 -326
  25. package/dist/packem_chunks/analytics-panel.js +1 -261
  26. package/dist/packem_chunks/auth-audit-panel.js +1 -247
  27. package/dist/packem_chunks/auth-config-panel.js +1 -365
  28. package/dist/packem_chunks/auth-sessions-panel.js +1 -175
  29. package/dist/packem_chunks/containers-panel.js +1 -261
  30. package/dist/packem_chunks/dashboards-panel.js +1 -781
  31. package/dist/packem_chunks/fanout-panel.js +1 -482
  32. package/dist/packem_chunks/flags-panel.js +1 -176
  33. package/dist/packem_chunks/issues-panel.js +1 -427
  34. package/dist/packem_chunks/kv-browser.js +1 -1896
  35. package/dist/packem_chunks/log-drains-panel.js +4 -273
  36. package/dist/packem_chunks/organizations-panel.js +1 -3209
  37. package/dist/packem_chunks/payments-panel.js +1 -213
  38. package/dist/packem_chunks/permissions-panel.js +1 -805
  39. package/dist/packem_chunks/queues-panel.js +1 -1075
  40. package/dist/packem_chunks/rls-panel.js +1 -315
  41. package/dist/packem_chunks/schedule-panel.js +1 -831
  42. package/dist/packem_chunks/sparkline.js +1 -79
  43. package/dist/packem_chunks/storage-rules-panel.js +1 -140
  44. package/dist/packem_chunks/subscriptions-panel.js +1 -238
  45. package/dist/packem_chunks/sync-client-panel.js +1 -0
  46. package/dist/packem_chunks/traces-panel.js +1 -747
  47. package/dist/packem_chunks/users-panel.js +1 -1731
  48. package/dist/packem_chunks/vector-browser.js +1 -281
  49. package/dist/packem_chunks/workflows-panel.js +1 -562
  50. package/dist/packem_shared/ADMIN_FUNCTIONS-BYNSbBVE.js +1 -0
  51. package/dist/packem_shared/ApiDocsPanel-eJYZlylw.js +2 -0
  52. package/dist/packem_shared/ApiReferencePanel-C42v1jr6.js +1 -0
  53. package/dist/packem_shared/CommandPalette-CVIaY3j8.js +1 -0
  54. package/dist/packem_shared/ConfirmButton-CTL3f3kr.js +1 -0
  55. package/dist/packem_shared/ConnectionBadge-DOk0CQWo.js +1 -0
  56. package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-BCC8_4BQ.js +1 -0
  57. package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-B-hcFVoi.js +1 -0
  58. package/dist/packem_shared/DEFAULT_LOCALE-BZ4NojpD.js +1 -0
  59. package/dist/packem_shared/DataBrowser-B8J5lHjP.js +1 -0
  60. package/dist/packem_shared/DataFilters-Csb30F0C.js +1 -0
  61. package/dist/packem_shared/ErrorBoundary-DvzYskH7.js +1 -0
  62. package/dist/packem_shared/GlobalDataBrowser-RLJ6NvOs.js +1 -0
  63. package/dist/packem_shared/HomePanel-DL1HupAN.js +1 -0
  64. package/dist/packem_shared/OpenRpcReferencePanel-sGsIgYWj.js +1 -0
  65. package/dist/packem_shared/STUDIO_ROOT_CLASS-C6MccdVk.js +1 -0
  66. package/dist/packem_shared/ScheduledJobs-DUbo6epc.js +1 -0
  67. package/dist/packem_shared/ShardInput-BVn2iCU0.js +1 -0
  68. package/dist/packem_shared/Studio-BWBclm_C.js +1 -0
  69. package/dist/packem_shared/StudioApp-BFm73yVr.js +1 -0
  70. package/dist/packem_shared/StudioI18nProvider-CZ5h4nrV.js +1 -0
  71. package/dist/packem_shared/advisor-view-DaCX9Jy5.js +1 -0
  72. package/dist/packem_shared/aggregateMetrics-BNfajLa2.js +1 -0
  73. package/dist/packem_shared/alert-CVcOFuDR.js +1 -0
  74. package/dist/packem_shared/badge-BbuuAio7.js +1 -0
  75. package/dist/packem_shared/bar-chart-AryFCeoa.js +9 -0
  76. package/dist/packem_shared/browser-storage-xjTyMKY0.js +1 -0
  77. package/dist/packem_shared/button-BkCrNcAs.js +1 -0
  78. package/dist/packem_shared/card-CIDGUN6K.js +1 -0
  79. package/dist/packem_shared/cf-links-gbDy51nR.js +1 -0
  80. package/dist/packem_shared/checkbox-StT4Gob6.js +1 -0
  81. package/dist/packem_shared/data-grid-BMBKzMEJ.js +1 -0
  82. package/dist/packem_shared/data-view-params-C8T3bW1z.js +1 -0
  83. package/dist/packem_shared/dropdown-menu-C3RQ_HlW.js +2 -0
  84. package/dist/packem_shared/empty-state-Cg7t_8qu.js +1 -0
  85. package/dist/packem_shared/error-alert-B59DnrDI.js +1 -0
  86. package/dist/packem_shared/grid-features-uZCUj955.js +6 -0
  87. package/dist/packem_shared/home-panel-B-8BCffw.js +3 -0
  88. package/dist/packem_shared/input-JHu63lTv.js +1 -0
  89. package/dist/packem_shared/internal-AtZ4bTal.js +2 -0
  90. package/dist/packem_shared/label-6uP1obNF.js +1 -0
  91. package/dist/packem_shared/live-status-CGW2JHf_.js +1 -0
  92. package/dist/packem_shared/log-fields-CoL3hsIQ.js +1 -0
  93. package/dist/packem_shared/modal-shell-CUwwWC2o.js +1 -0
  94. package/dist/packem_shared/reference-view-KvhektwF.js +12 -0
  95. package/dist/packem_shared/result-chart-CwKhhKM0.js +1 -0
  96. package/dist/packem_shared/scroll-area-DTEq6Jec.js +2 -0
  97. package/dist/packem_shared/select-Bul-DeII.js +2 -0
  98. package/dist/packem_shared/shard-history-DMEW5VBE.js +1 -0
  99. package/dist/packem_shared/skeleton-C1wQ9M5t.js +1 -0
  100. package/dist/packem_shared/sparkline-DtcZoU48.js +1 -0
  101. package/dist/packem_shared/storage-tier-DznqOf-q.js +1 -0
  102. package/dist/packem_shared/studio-BHA7hnI3.js +2 -0
  103. package/dist/packem_shared/table-DdJBrClo.js +2 -0
  104. package/dist/packem_shared/table-list-sidebar-CMCcNALK.js +1 -0
  105. package/dist/packem_shared/textarea-Bu2-jKAs.js +1 -0
  106. package/dist/packem_shared/trace-handoff-Dw7mwjxu.js +1 -0
  107. package/dist/packem_shared/use-admin-query-Di3fLE8H.js +1 -0
  108. package/dist/packem_shared/use-async-submit-H68GHPz8.js +1 -0
  109. package/dist/packem_shared/useDebounced-Ihdiid_k.js +1 -0
  110. package/dist/packem_shared/utils-bhneXptQ.js +1 -0
  111. package/dist/packem_shared/virtual-rect-1o1veP7R.js +1 -0
  112. package/dist/standalone/chunk-23HKRH5H.js +13 -0
  113. package/dist/standalone/chunk-2A4RKII2.js +1 -0
  114. package/dist/standalone/chunk-3DTM4GI5.js +1 -0
  115. package/dist/standalone/chunk-3MHKT76P.js +1 -0
  116. package/dist/standalone/chunk-46IB4C4Q.js +1 -0
  117. package/dist/standalone/chunk-4AYEV5UN.js +1 -0
  118. package/dist/standalone/chunk-4FNHHFWR.js +1 -0
  119. package/dist/standalone/chunk-6CLVIOCB.js +1 -0
  120. package/dist/standalone/chunk-6I62RSI5.js +1 -0
  121. package/dist/standalone/chunk-6OKDCV7J.js +1 -0
  122. package/dist/standalone/chunk-6P7HIPUE.js +1 -0
  123. package/dist/standalone/chunk-6UYILUSX.js +1 -0
  124. package/dist/standalone/chunk-725RLB7D.js +1 -0
  125. package/dist/standalone/chunk-7AZZ7OJO.js +1 -0
  126. package/dist/standalone/chunk-7CRLAMGB.js +1 -0
  127. package/dist/standalone/chunk-7Z5QEFR4.js +2 -0
  128. package/dist/standalone/chunk-AGVJJQFL.js +1 -0
  129. package/dist/standalone/chunk-AKTGRZXN.js +1 -0
  130. package/dist/standalone/chunk-BAIN7UJ4.js +1 -0
  131. package/dist/standalone/chunk-BHWSIIDT.js +1 -0
  132. package/dist/standalone/{chunk-L7SK4ZZD.js → chunk-C4O5UR4Y.js} +1 -1
  133. package/dist/standalone/chunk-C4VURT57.js +1 -0
  134. package/dist/standalone/chunk-CKO3F55C.js +4 -0
  135. package/dist/standalone/chunk-CVMRZUF5.js +4 -0
  136. package/dist/standalone/chunk-CWWGDW4V.js +1 -0
  137. package/dist/standalone/chunk-CYET4BRZ.js +1 -0
  138. package/dist/standalone/chunk-CZEUVNCQ.js +1 -0
  139. package/dist/standalone/chunk-FXFK4M4E.js +1 -0
  140. package/dist/standalone/chunk-FYAJPWE7.js +1 -0
  141. package/dist/standalone/chunk-GS7OBQO5.js +1 -0
  142. package/dist/standalone/chunk-GTXVH7I5.js +1 -0
  143. package/dist/standalone/chunk-H6SIM4BT.js +1 -0
  144. package/dist/standalone/chunk-H6WOFY6A.js +8 -0
  145. package/dist/standalone/chunk-HA34GYEX.js +1 -0
  146. package/dist/standalone/chunk-HMIOF5GV.js +1 -0
  147. package/dist/standalone/chunk-HY46NTNW.js +6 -0
  148. package/dist/standalone/chunk-IBCKC2BO.js +1 -0
  149. package/dist/standalone/chunk-ICKBVXPP.js +1 -0
  150. package/dist/standalone/chunk-IE4ROTQD.js +1 -0
  151. package/dist/standalone/chunk-IYYTWZ2E.js +2 -0
  152. package/dist/standalone/chunk-J2LMP2A7.js +1 -0
  153. package/dist/standalone/chunk-JC6WYIHM.js +1 -0
  154. package/dist/standalone/chunk-JKPK25JO.js +1 -0
  155. package/dist/standalone/chunk-JLFCXBNQ.js +1 -0
  156. package/dist/standalone/chunk-JRWBGR5B.js +1 -0
  157. package/dist/standalone/chunk-K5PFWU5J.js +1 -0
  158. package/dist/standalone/chunk-KJTLW5W2.js +11 -0
  159. package/dist/standalone/{chunk-HBGS4SEX.js → chunk-KLLYGWNF.js} +9 -9
  160. package/dist/standalone/chunk-KNN3ZEQ7.js +1 -0
  161. package/dist/standalone/{chunk-4QHKBC77.js → chunk-KOC5KV3E.js} +1 -1
  162. package/dist/standalone/chunk-KSRXMTBV.js +1 -0
  163. package/dist/standalone/chunk-KYCAYNXM.js +1 -0
  164. package/dist/standalone/chunk-KZ2YUNMR.js +1 -0
  165. package/dist/standalone/chunk-LKHUVEHX.js +1 -0
  166. package/dist/standalone/chunk-LPOKAJT4.js +4 -0
  167. package/dist/standalone/chunk-MZEK4SGD.js +1 -0
  168. package/dist/standalone/chunk-NCCUM26H.js +1 -0
  169. package/dist/standalone/chunk-O62HJZV3.js +1 -0
  170. package/dist/standalone/chunk-OTJOI23O.js +62 -0
  171. package/dist/standalone/chunk-P2NBOUGZ.js +1 -0
  172. package/dist/standalone/chunk-P4J6XNG3.js +1 -0
  173. package/dist/standalone/chunk-PGDWFWH5.js +1 -0
  174. package/dist/standalone/chunk-PR2SE2MD.js +1 -0
  175. package/dist/standalone/chunk-PTTDIYGP.js +1 -0
  176. package/dist/standalone/chunk-PWDMXMRD.js +1 -0
  177. package/dist/standalone/chunk-Q34MSC2F.js +1 -0
  178. package/dist/standalone/chunk-Q5WXTZWX.js +1 -0
  179. package/dist/standalone/chunk-QC5HCNJZ.js +4 -0
  180. package/dist/standalone/chunk-QJKRHZYV.js +1 -0
  181. package/dist/standalone/chunk-R43KHQDA.js +1 -0
  182. package/dist/standalone/chunk-RC2K5RBE.js +1 -0
  183. package/dist/standalone/chunk-RE6UWCMG.js +1 -0
  184. package/dist/standalone/chunk-RUP3M2GF.js +3 -0
  185. package/dist/standalone/chunk-SA6MBPBL.js +1 -0
  186. package/dist/standalone/{chunk-BJGBHGK3.js → chunk-SEDZDNQF.js} +1 -1
  187. package/dist/standalone/chunk-SKHEGARW.js +1 -0
  188. package/dist/standalone/chunk-SKJZDOHG.js +1 -0
  189. package/dist/standalone/chunk-SNDYNCAA.js +1 -0
  190. package/dist/standalone/chunk-SZUHZ2OG.js +1 -0
  191. package/dist/standalone/chunk-TAE2H7PU.js +1 -0
  192. package/dist/standalone/chunk-TEIBKU46.js +1 -0
  193. package/dist/standalone/chunk-TO6NLVFD.js +1 -0
  194. package/dist/standalone/chunk-TYTJDFX2.js +1 -0
  195. package/dist/standalone/{chunk-LXULVPEM.js → chunk-UDZY7MKE.js} +3 -3
  196. package/dist/standalone/chunk-UHHTEBC3.js +1 -0
  197. package/dist/standalone/chunk-UNDFOYRI.js +1 -0
  198. package/dist/standalone/chunk-UNN4CESU.js +1 -0
  199. package/dist/standalone/chunk-UNXX5GQH.js +1 -0
  200. package/dist/standalone/{chunk-ZHVTQ37P.js → chunk-UREY4GLG.js} +1 -1
  201. package/dist/standalone/chunk-UWF5DOGV.js +1 -0
  202. package/dist/standalone/chunk-UY2Y5CXB.js +1 -0
  203. package/dist/standalone/{chunk-VLXV72QE.js → chunk-UZYGEOWY.js} +1 -1
  204. package/dist/standalone/chunk-V66TSUKV.js +1 -0
  205. package/dist/standalone/chunk-VEFNSN7P.js +1 -0
  206. package/dist/standalone/chunk-VUJGR4PB.js +1 -0
  207. package/dist/standalone/chunk-VUXJER3D.js +1 -0
  208. package/dist/standalone/chunk-W572365D.js +1 -0
  209. package/dist/standalone/chunk-WYFLGXZ3.js +3 -0
  210. package/dist/standalone/chunk-XDKFPBIL.js +1 -0
  211. package/dist/standalone/chunk-XRKCGQM2.js +1 -0
  212. package/dist/standalone/chunk-YNBJ6ICE.js +1 -0
  213. package/dist/standalone/chunk-YQ5PILIJ.js +1 -0
  214. package/dist/standalone/chunk-YT7VXQVX.js +1 -0
  215. package/dist/standalone/chunk-Z7MUQMLE.js +1 -0
  216. package/dist/standalone/chunk-ZFWEPGWG.js +1 -0
  217. package/dist/standalone/chunk-ZMFZRGAN.js +1 -0
  218. package/dist/standalone/studio.js +9 -214
  219. package/package.json +4 -4
  220. package/dist/packem_shared/ADMIN_FUNCTIONS-P2UzJscH.js +0 -62
  221. package/dist/packem_shared/ApiDocsPanel-DNDpeR5O.js +0 -842
  222. package/dist/packem_shared/ApiReferencePanel-ChlRsAXU.js +0 -230
  223. package/dist/packem_shared/CommandPalette-BpkopP5f.js +0 -373
  224. package/dist/packem_shared/ConfirmButton-C2eVi2Qv.js +0 -59
  225. package/dist/packem_shared/ConnectionBadge-B2DDM2Tn.js +0 -111
  226. package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js +0 -50
  227. package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-DjF0h-gA.js +0 -89
  228. package/dist/packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js +0 -27
  229. package/dist/packem_shared/DataBrowser-obTn4sKX.js +0 -4493
  230. package/dist/packem_shared/DataFilters-B1Q7mrt7.js +0 -253
  231. package/dist/packem_shared/ErrorBoundary-BzAApI7J.js +0 -66
  232. package/dist/packem_shared/GlobalDataBrowser-BCaohHZ5.js +0 -293
  233. package/dist/packem_shared/HomePanel-DCRj3hGB.js +0 -14
  234. package/dist/packem_shared/OpenRpcReferencePanel-CIeQE1aE.js +0 -192
  235. package/dist/packem_shared/STUDIO_ROOT_CLASS-D12gX2dV.js +0 -3
  236. package/dist/packem_shared/ScheduledJobs-BQzQo84k.js +0 -262
  237. package/dist/packem_shared/ShardInput-CZnpHILL.js +0 -107
  238. package/dist/packem_shared/Studio-DnlPCbID.js +0 -16
  239. package/dist/packem_shared/StudioApp-CzqlB4zO.js +0 -708
  240. package/dist/packem_shared/StudioI18nProvider-B-tDCZIi.js +0 -48
  241. package/dist/packem_shared/advisor-view-D95sN-wO.js +0 -159
  242. package/dist/packem_shared/aggregateMetrics-D4nUHEKU.js +0 -108
  243. package/dist/packem_shared/alert-CdAET2K_.js +0 -68
  244. package/dist/packem_shared/badge-B2PKA1-5.js +0 -49
  245. package/dist/packem_shared/bar-chart-DSwcWIRy.js +0 -3246
  246. package/dist/packem_shared/browser-storage-L4gOP5gJ.js +0 -105
  247. package/dist/packem_shared/button-BhsN2uZH.js +0 -49
  248. package/dist/packem_shared/card-F2vH_aj2.js +0 -175
  249. package/dist/packem_shared/cf-links-SIbyi4Y1.js +0 -8
  250. package/dist/packem_shared/checkbox-UNkzAxl-.js +0 -63
  251. package/dist/packem_shared/data-grid-BywzWfek.js +0 -183
  252. package/dist/packem_shared/data-view-params-Cd6yRVbv.js +0 -96
  253. package/dist/packem_shared/dropdown-menu-WY4B_eJO.js +0 -280
  254. package/dist/packem_shared/empty-state-DY_oe0k6.js +0 -98
  255. package/dist/packem_shared/error-alert-D9uIFJUS.js +0 -114
  256. package/dist/packem_shared/grid-features-ZOLhHKrR.js +0 -809
  257. package/dist/packem_shared/home-panel-BRAA2UlM.js +0 -1889
  258. package/dist/packem_shared/input-XH4r1Pt1.js +0 -53
  259. package/dist/packem_shared/internal-DzHCc2Rq.js +0 -131
  260. package/dist/packem_shared/label-D8ykjn5J.js +0 -46
  261. package/dist/packem_shared/live-status-FZ0psC1z.js +0 -44
  262. package/dist/packem_shared/log-fields-jEH83H2G.js +0 -18
  263. package/dist/packem_shared/modal-shell-hyaJvIJ6.js +0 -100
  264. package/dist/packem_shared/reference-view-DfXN7oWP.js +0 -2127
  265. package/dist/packem_shared/result-chart-Bf9mbCIo.js +0 -119
  266. package/dist/packem_shared/scroll-area-DLhcy-ml.js +0 -93
  267. package/dist/packem_shared/select-D9OwHEch.js +0 -273
  268. package/dist/packem_shared/shard-history-AxiJ1WPP.js +0 -16
  269. package/dist/packem_shared/skeleton-CGhL0p20.js +0 -45
  270. package/dist/packem_shared/sparkline-BnA1kC9X.js +0 -93
  271. package/dist/packem_shared/storage-tier-CL98eOvn.js +0 -85
  272. package/dist/packem_shared/studio-8QSXbZ98.js +0 -4192
  273. package/dist/packem_shared/table-DsCa9Qp9.js +0 -246
  274. package/dist/packem_shared/table-list-sidebar-gCE17v9B.js +0 -842
  275. package/dist/packem_shared/textarea-D3gaCU_-.js +0 -46
  276. package/dist/packem_shared/trace-handoff-CGolF3KS.js +0 -38
  277. package/dist/packem_shared/use-admin-query-C7JNuQp-.js +0 -106
  278. package/dist/packem_shared/use-async-submit-rnSk_jXl.js +0 -91
  279. package/dist/packem_shared/useDebounced-Dxncpg6z.js +0 -32
  280. package/dist/packem_shared/utils-B05Dmz_H.js +0 -8
  281. package/dist/packem_shared/virtual-rect-CVMUskSm.js +0 -10
  282. package/dist/standalone/chunk-2K47A3P6.js +0 -1
  283. package/dist/standalone/chunk-2MLA6WFH.js +0 -1
  284. package/dist/standalone/chunk-2NGUNNGW.js +0 -1
  285. package/dist/standalone/chunk-2TJVFKD2.js +0 -1
  286. package/dist/standalone/chunk-2YTF6LJ6.js +0 -1
  287. package/dist/standalone/chunk-3GXGLNKW.js +0 -1
  288. package/dist/standalone/chunk-3HGNPZBN.js +0 -1
  289. package/dist/standalone/chunk-3LJEGSMK.js +0 -11
  290. package/dist/standalone/chunk-3OA7PECS.js +0 -6
  291. package/dist/standalone/chunk-4PC7IXNY.js +0 -1
  292. package/dist/standalone/chunk-56XQYNUJ.js +0 -1
  293. package/dist/standalone/chunk-5OIBXYZM.js +0 -1
  294. package/dist/standalone/chunk-5QT5JRXD.js +0 -3
  295. package/dist/standalone/chunk-6RLPR7PL.js +0 -1
  296. package/dist/standalone/chunk-6V74EUPK.js +0 -1
  297. package/dist/standalone/chunk-7EE33WLB.js +0 -1
  298. package/dist/standalone/chunk-7TJJXVSE.js +0 -1
  299. package/dist/standalone/chunk-AHILM3ZP.js +0 -1
  300. package/dist/standalone/chunk-AN4RKMKW.js +0 -1
  301. package/dist/standalone/chunk-APSSZB6Z.js +0 -1
  302. package/dist/standalone/chunk-AXNGWSBM.js +0 -1
  303. package/dist/standalone/chunk-AXZILWRM.js +0 -1
  304. package/dist/standalone/chunk-C7RHEBOH.js +0 -1
  305. package/dist/standalone/chunk-CKSHCYGC.js +0 -2
  306. package/dist/standalone/chunk-CSWIYOB3.js +0 -1
  307. package/dist/standalone/chunk-D3VAON25.js +0 -1
  308. package/dist/standalone/chunk-DDLQN67F.js +0 -1
  309. package/dist/standalone/chunk-DGHW5JG5.js +0 -1
  310. package/dist/standalone/chunk-DMCSOTAE.js +0 -3
  311. package/dist/standalone/chunk-E3BKETAS.js +0 -1
  312. package/dist/standalone/chunk-E3OXNN6O.js +0 -1
  313. package/dist/standalone/chunk-E6BOGDIS.js +0 -1
  314. package/dist/standalone/chunk-F2YMCQ6B.js +0 -1
  315. package/dist/standalone/chunk-F7GE4X2U.js +0 -1
  316. package/dist/standalone/chunk-FAVUOGJR.js +0 -1
  317. package/dist/standalone/chunk-FXP6256Q.js +0 -1
  318. package/dist/standalone/chunk-G6CTAYHJ.js +0 -1
  319. package/dist/standalone/chunk-GTM65MVX.js +0 -1
  320. package/dist/standalone/chunk-H42W62SE.js +0 -1
  321. package/dist/standalone/chunk-HTF5ZX4I.js +0 -8
  322. package/dist/standalone/chunk-HV7G6DFP.js +0 -5
  323. package/dist/standalone/chunk-I2PS4L74.js +0 -1
  324. package/dist/standalone/chunk-IYHPYY4A.js +0 -1
  325. package/dist/standalone/chunk-J6J54MBP.js +0 -1
  326. package/dist/standalone/chunk-J7OGP4NN.js +0 -1
  327. package/dist/standalone/chunk-JSEXCW5Q.js +0 -1
  328. package/dist/standalone/chunk-JZLGLG4T.js +0 -1
  329. package/dist/standalone/chunk-KEGAWN6Y.js +0 -1
  330. package/dist/standalone/chunk-KZ6INM5M.js +0 -1
  331. package/dist/standalone/chunk-L2LN3MK4.js +0 -4
  332. package/dist/standalone/chunk-LT3FH6MW.js +0 -1
  333. package/dist/standalone/chunk-LZUWZBPE.js +0 -1
  334. package/dist/standalone/chunk-M4JM3TOY.js +0 -1
  335. package/dist/standalone/chunk-MLA5ZAEB.js +0 -1
  336. package/dist/standalone/chunk-MRBI5HNQ.js +0 -1
  337. package/dist/standalone/chunk-N5XX4HOL.js +0 -6
  338. package/dist/standalone/chunk-N7SVJOHN.js +0 -1
  339. package/dist/standalone/chunk-NKFXMDOD.js +0 -1
  340. package/dist/standalone/chunk-NPSNKFHE.js +0 -1
  341. package/dist/standalone/chunk-O3NAGRTR.js +0 -1
  342. package/dist/standalone/chunk-O7FVPUCO.js +0 -1
  343. package/dist/standalone/chunk-OKQXTLFX.js +0 -1
  344. package/dist/standalone/chunk-OXHHSUXO.js +0 -1
  345. package/dist/standalone/chunk-QAFAJBAW.js +0 -1
  346. package/dist/standalone/chunk-QAIM6KWT.js +0 -1
  347. package/dist/standalone/chunk-QCPMTB6W.js +0 -1
  348. package/dist/standalone/chunk-QQ2LOSZL.js +0 -1
  349. package/dist/standalone/chunk-QVIPA6UJ.js +0 -1
  350. package/dist/standalone/chunk-QVUQXJCT.js +0 -4
  351. package/dist/standalone/chunk-R2GMHLJY.js +0 -1
  352. package/dist/standalone/chunk-RD5UG2YL.js +0 -1
  353. package/dist/standalone/chunk-RJTIP3WF.js +0 -1
  354. package/dist/standalone/chunk-RRCPZMC2.js +0 -22
  355. package/dist/standalone/chunk-SHERR7ZP.js +0 -1
  356. package/dist/standalone/chunk-SOC5CY3F.js +0 -1
  357. package/dist/standalone/chunk-SS7JLF2I.js +0 -4
  358. package/dist/standalone/chunk-SWWYUGPL.js +0 -2
  359. package/dist/standalone/chunk-TAD43CG5.js +0 -1
  360. package/dist/standalone/chunk-TTXRHJUP.js +0 -4
  361. package/dist/standalone/chunk-UK64ZSUW.js +0 -1
  362. package/dist/standalone/chunk-UKDHGVOC.js +0 -1
  363. package/dist/standalone/chunk-UPNTMJFF.js +0 -1
  364. package/dist/standalone/chunk-V43BLH4J.js +0 -1
  365. package/dist/standalone/chunk-VL23Y44O.js +0 -4
  366. package/dist/standalone/chunk-VXM5H542.js +0 -4
  367. package/dist/standalone/chunk-WMDH2CIZ.js +0 -1
  368. package/dist/standalone/chunk-WVTPZ6CM.js +0 -1
  369. package/dist/standalone/chunk-XN6QYJQ6.js +0 -13
  370. package/dist/standalone/chunk-XNJNSCLM.js +0 -1
  371. package/dist/standalone/chunk-Y4U6CC22.js +0 -1
  372. package/dist/standalone/chunk-Y572GMZE.js +0 -1
  373. package/dist/standalone/chunk-Y7PD5KP4.js +0 -76
  374. package/dist/standalone/chunk-YFIPHCEC.js +0 -1
  375. package/dist/standalone/chunk-YJXOWLFJ.js +0 -1
  376. package/dist/standalone/chunk-YNN6NFRZ.js +0 -1
  377. package/dist/standalone/chunk-YUGHRVPD.js +0 -1
  378. package/dist/standalone/chunk-ZIGWVHCS.js +0 -1
  379. package/dist/standalone/chunk-ZPP2KOR4.js +0 -1
  380. package/dist/standalone/chunk-ZPUO7FNI.js +0 -1
  381. /package/dist/standalone/{chunk-TEWVD66F.js → chunk-GXZAXNZI.js} +0 -0
@@ -1,842 +0,0 @@
1
- import { c } from 'react/compiler-runtime';
2
- import { useT } from './DEFAULT_LOCALE-CiX4W7Kr.js';
3
- import { jsxDEV } from 'react/jsx-dev-runtime';
4
- import { useState, useRef, useMemo } from 'react';
5
- import { f as fireAndForget, e as errorMessage } from './internal-DzHCc2Rq.js';
6
- import { useVirtualizer } from '@tanstack/react-virtual';
7
- import { c as cn } from './utils-B05Dmz_H.js';
8
- import { f as flooredRectObserver } from './virtual-rect-CVMUskSm.js';
9
-
10
- const formatValue = (value) => {
11
- if (value === null || value === void 0) {
12
- return "∅";
13
- }
14
- if (value === "") {
15
- return "(empty)";
16
- }
17
- if (typeof value === "object") {
18
- return JSON.stringify(value);
19
- }
20
- return String(value);
21
- };
22
- const FacetSection = (t0) => {
23
- const $ = c(32);
24
- const {
25
- column,
26
- onFacetFilter,
27
- state
28
- } = t0;
29
- const t = useT();
30
- let t1;
31
- if ($[0] !== column || $[1] !== onFacetFilter || $[2] !== state.result?.values) {
32
- t1 = (event) => {
33
- const index = Number(event.currentTarget.dataset.index);
34
- const entry = state.result?.values[index];
35
- if (entry !== void 0) {
36
- onFacetFilter(column, entry.value);
37
- }
38
- };
39
- $[0] = column;
40
- $[1] = onFacetFilter;
41
- $[2] = state.result?.values;
42
- $[3] = t1;
43
- } else {
44
- t1 = $[3];
45
- }
46
- const onValueClick = t1;
47
- const t2 = `db-facet-${column}`;
48
- let t3;
49
- if ($[4] !== column) {
50
- t3 = /* @__PURE__ */ jsxDEV("span", {
51
- className: "font-medium text-foreground",
52
- children: column
53
- }, void 0, false);
54
- $[4] = column;
55
- $[5] = t3;
56
- } else {
57
- t3 = $[5];
58
- }
59
- let t4;
60
- if ($[6] !== state.loading || $[7] !== state.result || $[8] !== t) {
61
- t4 = state.loading && state.result === null && /* @__PURE__ */ jsxDEV("span", {
62
- className: "text-muted-foreground",
63
- children: t("Loading…")
64
- }, void 0, false);
65
- $[6] = state.loading;
66
- $[7] = state.result;
67
- $[8] = t;
68
- $[9] = t4;
69
- } else {
70
- t4 = $[9];
71
- }
72
- let t5;
73
- if ($[10] !== state.error) {
74
- t5 = state.error !== null && /* @__PURE__ */ jsxDEV("span", {
75
- className: "text-destructive",
76
- role: "alert",
77
- children: state.error
78
- }, void 0, false);
79
- $[10] = state.error;
80
- $[11] = t5;
81
- } else {
82
- t5 = $[11];
83
- }
84
- let t6;
85
- if ($[12] !== state.result?.values) {
86
- t6 = state.result?.values ?? [];
87
- $[12] = state.result?.values;
88
- $[13] = t6;
89
- } else {
90
- t6 = $[13];
91
- }
92
- let t7;
93
- if ($[14] !== column || $[15] !== onValueClick || $[16] !== t6) {
94
- let t82;
95
- if ($[18] !== column || $[19] !== onValueClick) {
96
- t82 = (entry_0, index_0) => /* @__PURE__ */ jsxDEV("button", {
97
- className: "flex items-center justify-between gap-2 rounded px-1 py-0.5 text-left text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",
98
- "data-index": index_0,
99
- "data-testid": `db-facet-value-${column}`,
100
- onClick: onValueClick,
101
- type: "button",
102
- children: [/* @__PURE__ */ jsxDEV("span", {
103
- className: "truncate",
104
- children: formatValue(entry_0.value)
105
- }, void 0, false), /* @__PURE__ */ jsxDEV("span", {
106
- className: "shrink-0 tabular-nums text-foreground/70",
107
- children: entry_0.count
108
- }, void 0, false)]
109
- }, formatValue(entry_0.value), true);
110
- $[18] = column;
111
- $[19] = onValueClick;
112
- $[20] = t82;
113
- } else {
114
- t82 = $[20];
115
- }
116
- t7 = t6.map(t82);
117
- $[14] = column;
118
- $[15] = onValueClick;
119
- $[16] = t6;
120
- $[17] = t7;
121
- } else {
122
- t7 = $[17];
123
- }
124
- let t8;
125
- if ($[21] !== column || $[22] !== state.result || $[23] !== t) {
126
- t8 = state.result?.truncated === true && /* @__PURE__ */ jsxDEV("span", {
127
- className: "text-muted-foreground",
128
- "data-testid": `db-facet-truncated-${column}`,
129
- children: t("Showing the {n} most common values.", {
130
- n: state.result.values.length
131
- })
132
- }, void 0, false);
133
- $[21] = column;
134
- $[22] = state.result;
135
- $[23] = t;
136
- $[24] = t8;
137
- } else {
138
- t8 = $[24];
139
- }
140
- let t9;
141
- if ($[25] !== t2 || $[26] !== t3 || $[27] !== t4 || $[28] !== t5 || $[29] !== t7 || $[30] !== t8) {
142
- t9 = /* @__PURE__ */ jsxDEV("section", {
143
- className: "flex flex-col gap-1",
144
- "data-testid": t2,
145
- children: [t3, t4, t5, t7, t8]
146
- }, void 0, true);
147
- $[25] = t2;
148
- $[26] = t3;
149
- $[27] = t4;
150
- $[28] = t5;
151
- $[29] = t7;
152
- $[30] = t8;
153
- $[31] = t9;
154
- } else {
155
- t9 = $[31];
156
- }
157
- return t9;
158
- };
159
- const DataFacets = (t0) => {
160
- const $ = c(26);
161
- const {
162
- columns,
163
- facets,
164
- onFacetFilter,
165
- onToggleFacet
166
- } = t0;
167
- const t = useT();
168
- let t1;
169
- if ($[0] !== onToggleFacet) {
170
- t1 = (event) => {
171
- const {
172
- column
173
- } = event.currentTarget.dataset;
174
- if (column !== void 0) {
175
- onToggleFacet(column);
176
- }
177
- };
178
- $[0] = onToggleFacet;
179
- $[1] = t1;
180
- } else {
181
- t1 = $[1];
182
- }
183
- const toggle = t1;
184
- if (columns.length === 0) {
185
- return null;
186
- }
187
- let t2;
188
- if ($[2] !== t) {
189
- t2 = t("Facets");
190
- $[2] = t;
191
- $[3] = t2;
192
- } else {
193
- t2 = $[3];
194
- }
195
- let t3;
196
- if ($[4] !== t2) {
197
- t3 = /* @__PURE__ */ jsxDEV("span", {
198
- className: "font-mono text-[11px] tracking-wide uppercase text-muted-foreground",
199
- children: t2
200
- }, void 0, false);
201
- $[4] = t2;
202
- $[5] = t3;
203
- } else {
204
- t3 = $[5];
205
- }
206
- let t4;
207
- if ($[6] !== columns || $[7] !== facets || $[8] !== toggle) {
208
- let t52;
209
- if ($[10] !== facets || $[11] !== toggle) {
210
- t52 = (column_0) => /* @__PURE__ */ jsxDEV("button", {
211
- "aria-pressed": column_0 in facets,
212
- className: "rounded border border-border px-1.5 py-0.5 text-muted-foreground transition-colors hover:bg-accent aria-pressed:bg-accent aria-pressed:text-accent-foreground",
213
- "data-column": column_0,
214
- "data-testid": `db-facet-toggle-${column_0}`,
215
- onClick: toggle,
216
- type: "button",
217
- children: column_0
218
- }, column_0, false);
219
- $[10] = facets;
220
- $[11] = toggle;
221
- $[12] = t52;
222
- } else {
223
- t52 = $[12];
224
- }
225
- t4 = columns.map(t52);
226
- $[6] = columns;
227
- $[7] = facets;
228
- $[8] = toggle;
229
- $[9] = t4;
230
- } else {
231
- t4 = $[9];
232
- }
233
- let t5;
234
- if ($[13] !== t4) {
235
- t5 = /* @__PURE__ */ jsxDEV("div", {
236
- className: "flex flex-wrap gap-1",
237
- children: t4
238
- }, void 0, false);
239
- $[13] = t4;
240
- $[14] = t5;
241
- } else {
242
- t5 = $[14];
243
- }
244
- let t6;
245
- if ($[15] !== t3 || $[16] !== t5) {
246
- t6 = /* @__PURE__ */ jsxDEV("div", {
247
- className: "flex flex-col gap-1.5",
248
- children: [t3, t5]
249
- }, void 0, true);
250
- $[15] = t3;
251
- $[16] = t5;
252
- $[17] = t6;
253
- } else {
254
- t6 = $[17];
255
- }
256
- let t7;
257
- if ($[18] !== facets) {
258
- t7 = Object.entries(facets);
259
- $[18] = facets;
260
- $[19] = t7;
261
- } else {
262
- t7 = $[19];
263
- }
264
- let t8;
265
- if ($[20] !== onFacetFilter || $[21] !== t7) {
266
- t8 = t7.map((t92) => {
267
- const [column_1, state] = t92;
268
- return /* @__PURE__ */ jsxDEV(FacetSection, {
269
- column: column_1,
270
- onFacetFilter,
271
- state
272
- }, column_1, false);
273
- });
274
- $[20] = onFacetFilter;
275
- $[21] = t7;
276
- $[22] = t8;
277
- } else {
278
- t8 = $[22];
279
- }
280
- let t9;
281
- if ($[23] !== t6 || $[24] !== t8) {
282
- t9 = /* @__PURE__ */ jsxDEV("aside", {
283
- className: "flex w-56 shrink-0 flex-col gap-3 overflow-auto border-l border-border p-3 text-xs",
284
- "data-testid": "db-facets",
285
- children: [t6, t8]
286
- }, void 0, true);
287
- $[23] = t6;
288
- $[24] = t8;
289
- $[25] = t9;
290
- } else {
291
- t9 = $[25];
292
- }
293
- return t9;
294
- };
295
-
296
- const PAGE_SIZE_OPTIONS = [25, 50, 100, 250];
297
- const PageSizeSelect = (t0) => {
298
- const $ = c(18);
299
- const {
300
- onChange,
301
- options,
302
- prefix,
303
- value
304
- } = t0;
305
- const t = useT();
306
- let t1;
307
- if ($[0] !== onChange) {
308
- t1 = (event) => {
309
- onChange(Number.parseInt(event.target.value, 10));
310
- };
311
- $[0] = onChange;
312
- $[1] = t1;
313
- } else {
314
- t1 = $[1];
315
- }
316
- const onSelect = t1;
317
- const t2 = `${prefix}-page-size`;
318
- let t3;
319
- if ($[2] !== t) {
320
- t3 = t("Rows per page");
321
- $[2] = t;
322
- $[3] = t3;
323
- } else {
324
- t3 = $[3];
325
- }
326
- let t4;
327
- if ($[4] !== t3) {
328
- t4 = /* @__PURE__ */ jsxDEV("span", {
329
- children: t3
330
- }, void 0, false);
331
- $[4] = t3;
332
- $[5] = t4;
333
- } else {
334
- t4 = $[5];
335
- }
336
- const t5 = `${prefix}-page-size`;
337
- const t6 = `${prefix}-page-size`;
338
- let t7;
339
- if ($[6] !== options) {
340
- t7 = options.map(_temp);
341
- $[6] = options;
342
- $[7] = t7;
343
- } else {
344
- t7 = $[7];
345
- }
346
- let t8;
347
- if ($[8] !== onSelect || $[9] !== t5 || $[10] !== t6 || $[11] !== t7 || $[12] !== value) {
348
- t8 = /* @__PURE__ */ jsxDEV("select", {
349
- className: "h-6 rounded-md border border-border bg-background px-1 tabular-nums outline-none focus-visible:border-ring",
350
- "data-testid": t5,
351
- id: t6,
352
- onChange: onSelect,
353
- value,
354
- children: t7
355
- }, void 0, false);
356
- $[8] = onSelect;
357
- $[9] = t5;
358
- $[10] = t6;
359
- $[11] = t7;
360
- $[12] = value;
361
- $[13] = t8;
362
- } else {
363
- t8 = $[13];
364
- }
365
- let t9;
366
- if ($[14] !== t2 || $[15] !== t4 || $[16] !== t8) {
367
- t9 = /* @__PURE__ */ jsxDEV("label", {
368
- className: "flex items-center gap-1.5",
369
- htmlFor: t2,
370
- children: [t4, t8]
371
- }, void 0, true);
372
- $[14] = t2;
373
- $[15] = t4;
374
- $[16] = t8;
375
- $[17] = t9;
376
- } else {
377
- t9 = $[17];
378
- }
379
- return t9;
380
- };
381
- const PageJump = (t0) => {
382
- const $ = c(25);
383
- const {
384
- onJump,
385
- page,
386
- pages,
387
- prefix
388
- } = t0;
389
- const t = useT();
390
- let t1;
391
- if ($[0] !== onJump || $[1] !== pages) {
392
- t1 = (raw) => {
393
- const next = Number.parseInt(raw, 10);
394
- if (!Number.isNaN(next)) {
395
- onJump(Math.min(Math.max(1, next), Math.max(1, pages)));
396
- }
397
- };
398
- $[0] = onJump;
399
- $[1] = pages;
400
- $[2] = t1;
401
- } else {
402
- t1 = $[2];
403
- }
404
- const commit = t1;
405
- let t2;
406
- if ($[3] !== commit) {
407
- t2 = (event) => {
408
- if (event.key === "Enter") {
409
- commit(event.currentTarget.value);
410
- }
411
- };
412
- $[3] = commit;
413
- $[4] = t2;
414
- } else {
415
- t2 = $[4];
416
- }
417
- const onKeyDown = t2;
418
- let t3;
419
- if ($[5] !== commit) {
420
- t3 = (event_0) => {
421
- commit(event_0.currentTarget.value);
422
- };
423
- $[5] = commit;
424
- $[6] = t3;
425
- } else {
426
- t3 = $[6];
427
- }
428
- const onBlur = t3;
429
- let t4;
430
- if ($[7] !== t) {
431
- t4 = t("Page");
432
- $[7] = t;
433
- $[8] = t4;
434
- } else {
435
- t4 = $[8];
436
- }
437
- let t5;
438
- if ($[9] !== t) {
439
- t5 = t("Page");
440
- $[9] = t;
441
- $[10] = t5;
442
- } else {
443
- t5 = $[10];
444
- }
445
- const t6 = `${prefix}-page-jump`;
446
- const t7 = Math.max(1, pages);
447
- let t8;
448
- if ($[11] !== onBlur || $[12] !== onKeyDown || $[13] !== page || $[14] !== t5 || $[15] !== t6 || $[16] !== t7) {
449
- t8 = /* @__PURE__ */ jsxDEV("input", {
450
- "aria-label": t5,
451
- className: "h-6 w-12 rounded-md border border-border bg-background px-1 text-center tabular-nums outline-none focus-visible:border-ring",
452
- "data-testid": t6,
453
- defaultValue: page,
454
- max: t7,
455
- min: 1,
456
- onBlur,
457
- onKeyDown,
458
- type: "number"
459
- }, page, false);
460
- $[11] = onBlur;
461
- $[12] = onKeyDown;
462
- $[13] = page;
463
- $[14] = t5;
464
- $[15] = t6;
465
- $[16] = t7;
466
- $[17] = t8;
467
- } else {
468
- t8 = $[17];
469
- }
470
- let t9;
471
- if ($[18] !== pages || $[19] !== t) {
472
- t9 = t("of {pages}", {
473
- pages
474
- });
475
- $[18] = pages;
476
- $[19] = t;
477
- $[20] = t9;
478
- } else {
479
- t9 = $[20];
480
- }
481
- let t10;
482
- if ($[21] !== t4 || $[22] !== t8 || $[23] !== t9) {
483
- t10 = /* @__PURE__ */ jsxDEV("span", {
484
- className: "flex items-center gap-1.5 tabular-nums",
485
- children: [t4, t8, t9]
486
- }, void 0, true);
487
- $[21] = t4;
488
- $[22] = t8;
489
- $[23] = t9;
490
- $[24] = t10;
491
- } else {
492
- t10 = $[24];
493
- }
494
- return t10;
495
- };
496
- const GridPagination = ({
497
- hasNext,
498
- hasPrevious,
499
- onJumpToPage,
500
- onNext,
501
- onPageSizeChange,
502
- onPrevious,
503
- pageSize,
504
- pageSizeOptions = PAGE_SIZE_OPTIONS,
505
- prefix,
506
- rangeEnd,
507
- rangeStart,
508
- total
509
- }) => {
510
- const t = useT();
511
- const buttonClass = "rounded-md border border-border px-2.5 py-1 text-xs font-medium text-foreground outline-none transition-colors hover:bg-accent focus-visible:bg-accent disabled:pointer-events-none disabled:opacity-50";
512
- const pages = pageSize !== void 0 && pageSize > 0 ? Math.max(1, Math.ceil(total / pageSize)) : 1;
513
- const page = pageSize !== void 0 && pageSize > 0 ? Math.floor(Math.max(0, rangeStart - 1) / pageSize) + 1 : 1;
514
- return /* @__PURE__ */ jsxDEV("div", {
515
- className: "flex w-full items-center justify-between gap-3 text-xs text-muted-foreground",
516
- children: [/* @__PURE__ */ jsxDEV("div", {
517
- className: "flex items-center gap-3",
518
- children: [pageSize !== void 0 && onPageSizeChange !== void 0 && /* @__PURE__ */ jsxDEV(PageSizeSelect, {
519
- onChange: onPageSizeChange,
520
- options: pageSizeOptions,
521
- prefix,
522
- value: pageSize
523
- }, void 0, false), /* @__PURE__ */ jsxDEV("span", {
524
- className: "tabular-nums",
525
- "data-testid": `${prefix}-page-info`,
526
- children: t("{rangeStart}-{rangeEnd} of {total}", {
527
- rangeEnd,
528
- rangeStart,
529
- total
530
- })
531
- }, void 0, false)]
532
- }, void 0, true), /* @__PURE__ */ jsxDEV("div", {
533
- className: "flex items-center gap-3",
534
- children: [/* @__PURE__ */ jsxDEV("button", {
535
- className: buttonClass,
536
- "data-testid": `${prefix}-prev`,
537
- disabled: !hasPrevious,
538
- onClick: onPrevious,
539
- type: "button",
540
- children: t("Previous")
541
- }, void 0, false), pageSize !== void 0 && onJumpToPage !== void 0 && /* @__PURE__ */ jsxDEV(PageJump, {
542
- onJump: onJumpToPage,
543
- page,
544
- pages,
545
- prefix
546
- }, void 0, false), /* @__PURE__ */ jsxDEV("button", {
547
- className: buttonClass,
548
- "data-testid": `${prefix}-next`,
549
- disabled: !hasNext,
550
- onClick: onNext,
551
- type: "button",
552
- children: t("Next")
553
- }, void 0, false)]
554
- }, void 0, true)]
555
- }, void 0, true);
556
- };
557
- function _temp(option) {
558
- return /* @__PURE__ */ jsxDEV("option", {
559
- value: option,
560
- children: option
561
- }, option, false);
562
- }
563
-
564
- const useFacets = () => {
565
- const [facets, setFacets] = useState({});
566
- const facetsRef = useRef(facets);
567
- facetsRef.current = facets;
568
- const fetchSeq = useRef({});
569
- const fetchFacet = async (column, fetcher) => {
570
- const seq = (fetchSeq.current[column] ?? 0) + 1;
571
- fetchSeq.current[column] = seq;
572
- setFacets((current) => column in current ? {
573
- ...current,
574
- [column]: {
575
- error: null,
576
- loading: true,
577
- result: current[column]?.result ?? null
578
- }
579
- } : current);
580
- try {
581
- const result = await fetcher(column);
582
- if (fetchSeq.current[column] !== seq) {
583
- return;
584
- }
585
- setFacets((current_1) => column in current_1 ? {
586
- ...current_1,
587
- [column]: {
588
- error: null,
589
- loading: false,
590
- result
591
- }
592
- } : current_1);
593
- } catch (error) {
594
- if (fetchSeq.current[column] !== seq) {
595
- return;
596
- }
597
- setFacets((current_0) => column in current_0 ? {
598
- ...current_0,
599
- [column]: {
600
- error: errorMessage(error),
601
- loading: false,
602
- result: null
603
- }
604
- } : current_0);
605
- }
606
- };
607
- const toggleFacet = (column_0, fetcher_0) => {
608
- if (column_0 in facetsRef.current) {
609
- setFacets((current_2) => Object.fromEntries(Object.entries(current_2).filter(([name]) => name !== column_0)));
610
- return;
611
- }
612
- setFacets((current_3) => {
613
- return {
614
- ...current_3,
615
- [column_0]: {
616
- error: null,
617
- loading: true,
618
- result: null
619
- }
620
- };
621
- });
622
- if (fetcher_0 !== null) {
623
- fireAndForget(fetchFacet(column_0, fetcher_0));
624
- }
625
- };
626
- const refetchFacets = (fetcher_1) => {
627
- for (const column_1 of Object.keys(facetsRef.current)) {
628
- fireAndForget(fetchFacet(column_1, fetcher_1));
629
- }
630
- };
631
- const clearFacets = () => {
632
- setFacets({});
633
- facetsRef.current = {};
634
- };
635
- return {
636
- clearFacets,
637
- facets,
638
- facetsRef,
639
- refetchFacets,
640
- toggleFacet
641
- };
642
- };
643
-
644
- const TABLE_ROW_HEIGHT = 34;
645
- const TABLE_LIST_VIEWPORT = 600;
646
- const TableListButton = (t0) => {
647
- const $ = c(21);
648
- const {
649
- item,
650
- onSelect,
651
- prefix,
652
- selected,
653
- start
654
- } = t0;
655
- let t1;
656
- if ($[0] !== item.name || $[1] !== onSelect) {
657
- t1 = () => {
658
- onSelect(item.name);
659
- };
660
- $[0] = item.name;
661
- $[1] = onSelect;
662
- $[2] = t1;
663
- } else {
664
- t1 = $[2];
665
- }
666
- const onClick = t1;
667
- const t2 = `translateY(${String(start)}px)`;
668
- let t3;
669
- if ($[3] !== t2) {
670
- t3 = {
671
- insetInline: 0,
672
- position: "absolute",
673
- top: 0,
674
- transform: t2
675
- };
676
- $[3] = t2;
677
- $[4] = t3;
678
- } else {
679
- t3 = $[4];
680
- }
681
- const style = t3;
682
- const t4 = selected ? "bg-accent font-medium text-accent-foreground" : "text-foreground";
683
- let t5;
684
- if ($[5] !== t4) {
685
- t5 = cn("flex w-full items-center justify-between gap-2 rounded-md px-2 py-1.5 text-start text-sm outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent", t4);
686
- $[5] = t4;
687
- $[6] = t5;
688
- } else {
689
- t5 = $[6];
690
- }
691
- const t6 = `${prefix}-table-${item.name}`;
692
- let t7;
693
- if ($[7] !== item.name) {
694
- t7 = /* @__PURE__ */ jsxDEV("span", {
695
- className: "truncate",
696
- children: item.name
697
- }, void 0, false);
698
- $[7] = item.name;
699
- $[8] = t7;
700
- } else {
701
- t7 = $[8];
702
- }
703
- let t8;
704
- if ($[9] !== item.rowCount) {
705
- t8 = /* @__PURE__ */ jsxDEV("span", {
706
- className: "shrink-0 rounded bg-muted px-1.5 text-xs tabular-nums text-muted-foreground",
707
- children: item.rowCount
708
- }, void 0, false);
709
- $[9] = item.rowCount;
710
- $[10] = t8;
711
- } else {
712
- t8 = $[10];
713
- }
714
- let t9;
715
- if ($[11] !== onClick || $[12] !== selected || $[13] !== t5 || $[14] !== t6 || $[15] !== t7 || $[16] !== t8) {
716
- t9 = /* @__PURE__ */ jsxDEV("button", {
717
- "aria-pressed": selected,
718
- className: t5,
719
- "data-testid": t6,
720
- onClick,
721
- type: "button",
722
- children: [t7, t8]
723
- }, void 0, true);
724
- $[11] = onClick;
725
- $[12] = selected;
726
- $[13] = t5;
727
- $[14] = t6;
728
- $[15] = t7;
729
- $[16] = t8;
730
- $[17] = t9;
731
- } else {
732
- t9 = $[17];
733
- }
734
- let t10;
735
- if ($[18] !== style || $[19] !== t9) {
736
- t10 = /* @__PURE__ */ jsxDEV("li", {
737
- style,
738
- children: t9
739
- }, void 0, false);
740
- $[18] = style;
741
- $[19] = t9;
742
- $[20] = t10;
743
- } else {
744
- t10 = $[20];
745
- }
746
- return t10;
747
- };
748
- const TableListSidebar = ({
749
- header,
750
- onReload,
751
- onSelect,
752
- prefix,
753
- reloadLabel,
754
- selected,
755
- tables
756
- }) => {
757
- const t = useT();
758
- const [query, setQuery] = useState("");
759
- const scrollRef = useRef(null);
760
- const onQueryChange = (event) => {
761
- setQuery(event.target.value);
762
- };
763
- const filtered = useMemo(() => {
764
- const needle = query.trim().toLowerCase();
765
- return needle === "" ? tables : tables.filter((item) => item.name.toLowerCase().includes(needle));
766
- }, [query, tables]);
767
- const virtualizer = useVirtualizer({
768
- count: filtered.length,
769
- estimateSize: () => TABLE_ROW_HEIGHT,
770
- getScrollElement: () => scrollRef.current,
771
- initialRect: {
772
- height: TABLE_LIST_VIEWPORT,
773
- width: 240
774
- },
775
- observeElementRect: (instance, callback) => flooredRectObserver(instance, callback, TABLE_LIST_VIEWPORT),
776
- overscan: 12
777
- });
778
- const virtualRows = virtualizer.getVirtualItems();
779
- const trackStyle = {
780
- height: filtered.length * TABLE_ROW_HEIGHT
781
- };
782
- return /* @__PURE__ */ jsxDEV("aside", {
783
- className: "flex h-full w-60 shrink-0 flex-col border-e border-border bg-sidebar",
784
- "data-testid": `${prefix}-table-list`,
785
- children: [header, /* @__PURE__ */ jsxDEV("div", {
786
- className: "flex h-9 shrink-0 items-center justify-between gap-2 border-b border-border px-3",
787
- children: [/* @__PURE__ */ jsxDEV("span", {
788
- className: "font-mono text-[11px] tracking-wide uppercase text-muted-foreground",
789
- children: t("Tables")
790
- }, void 0, false), onReload !== void 0 && /* @__PURE__ */ jsxDEV("button", {
791
- "aria-label": reloadLabel ?? t("Refresh"),
792
- className: "flex size-6 items-center justify-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-accent hover:text-foreground focus-visible:bg-accent",
793
- "data-testid": `${prefix}-load-tables`,
794
- onClick: onReload,
795
- title: reloadLabel ?? t("Refresh"),
796
- type: "button",
797
- children: /* @__PURE__ */ jsxDEV("svg", {
798
- "aria-hidden": "true",
799
- className: "size-3.5",
800
- fill: "none",
801
- stroke: "currentColor",
802
- strokeLinecap: "round",
803
- strokeLinejoin: "round",
804
- strokeWidth: 1.6,
805
- viewBox: "0 0 24 24",
806
- children: /* @__PURE__ */ jsxDEV("path", {
807
- d: "M4 12a8 8 0 0 1 13.7-5.6L20 8M20 4v4h-4M20 12a8 8 0 0 1-13.7 5.6L4 16m0 4v-4h4"
808
- }, void 0, false)
809
- }, void 0, false)
810
- }, void 0, false)]
811
- }, void 0, true), /* @__PURE__ */ jsxDEV("div", {
812
- className: "shrink-0 border-b border-border p-2",
813
- children: /* @__PURE__ */ jsxDEV("input", {
814
- className: "h-7 w-full rounded-md border border-border bg-background px-2 text-xs outline-none placeholder:text-muted-foreground focus-visible:border-ring",
815
- "data-testid": `${prefix}-table-search`,
816
- onChange: onQueryChange,
817
- placeholder: t("search table…"),
818
- type: "search",
819
- value: query
820
- }, void 0, false)
821
- }, void 0, false), /* @__PURE__ */ jsxDEV("ul", {
822
- className: "relative flex-1 overflow-y-auto p-1.5",
823
- "data-testid": `${prefix}-table-list-rows`,
824
- ref: scrollRef,
825
- children: [/* @__PURE__ */ jsxDEV("li", {
826
- "aria-hidden": "true",
827
- style: trackStyle
828
- }, void 0, false), virtualRows.map((vrow) => {
829
- const item_0 = filtered[vrow.index];
830
- return item_0 === void 0 ? null : /* @__PURE__ */ jsxDEV(TableListButton, {
831
- item: item_0,
832
- onSelect,
833
- prefix,
834
- selected: selected === item_0.name,
835
- start: vrow.start
836
- }, item_0.name, false);
837
- })]
838
- }, void 0, true)]
839
- }, void 0, true);
840
- };
841
-
842
- export { DataFacets as D, GridPagination as G, TableListSidebar as T, useFacets as u };