@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.
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -43
- package/dist/mount.js +1 -27
- package/dist/packem_chunks/ApiTab.js +1 -251
- package/dist/packem_chunks/AuditPanel.js +1 -200
- package/dist/packem_chunks/DeploymentHealthPanel.js +1 -664
- package/dist/packem_chunks/ExportImportPanel.js +3 -198
- package/dist/packem_chunks/FileBrowser.js +4 -2955
- package/dist/packem_chunks/FunctionRunner.js +1 -326
- package/dist/packem_chunks/FunctionStatsPanel.js +1 -377
- package/dist/packem_chunks/HealthPanel.js +1 -648
- package/dist/packem_chunks/InsightsPanel.js +1 -462
- package/dist/packem_chunks/LogsPanel.js +1 -1303
- package/dist/packem_chunks/MailPanel.js +2 -353
- package/dist/packem_chunks/MetricsPanel.js +1 -1960
- package/dist/packem_chunks/MigrationsPanel.js +1 -239
- package/dist/packem_chunks/NotificationsPanel.js +1 -306
- package/dist/packem_chunks/PitrPanel.js +1 -252
- package/dist/packem_chunks/SchemaViewer.js +1 -2512
- package/dist/packem_chunks/SecurityAdvisorPanel.js +1 -95
- package/dist/packem_chunks/SettingsPanel.js +1 -391
- package/dist/packem_chunks/SqlEditorPanel.js +4 -2340
- package/dist/packem_chunks/TableEditor.js +1 -290
- package/dist/packem_chunks/agents-panel.js +1 -326
- package/dist/packem_chunks/analytics-panel.js +1 -261
- package/dist/packem_chunks/auth-audit-panel.js +1 -247
- package/dist/packem_chunks/auth-config-panel.js +1 -365
- package/dist/packem_chunks/auth-sessions-panel.js +1 -175
- package/dist/packem_chunks/containers-panel.js +1 -261
- package/dist/packem_chunks/dashboards-panel.js +1 -781
- package/dist/packem_chunks/fanout-panel.js +1 -482
- package/dist/packem_chunks/flags-panel.js +1 -176
- package/dist/packem_chunks/issues-panel.js +1 -427
- package/dist/packem_chunks/kv-browser.js +1 -1896
- package/dist/packem_chunks/log-drains-panel.js +4 -273
- package/dist/packem_chunks/organizations-panel.js +1 -3209
- package/dist/packem_chunks/payments-panel.js +1 -213
- package/dist/packem_chunks/permissions-panel.js +1 -805
- package/dist/packem_chunks/queues-panel.js +1 -1075
- package/dist/packem_chunks/rls-panel.js +1 -315
- package/dist/packem_chunks/schedule-panel.js +1 -831
- package/dist/packem_chunks/sparkline.js +1 -79
- package/dist/packem_chunks/storage-rules-panel.js +1 -140
- package/dist/packem_chunks/subscriptions-panel.js +1 -238
- package/dist/packem_chunks/sync-client-panel.js +1 -0
- package/dist/packem_chunks/traces-panel.js +1 -747
- package/dist/packem_chunks/users-panel.js +1 -1731
- package/dist/packem_chunks/vector-browser.js +1 -281
- package/dist/packem_chunks/workflows-panel.js +1 -562
- package/dist/packem_shared/ADMIN_FUNCTIONS-BYNSbBVE.js +1 -0
- package/dist/packem_shared/ApiDocsPanel-eJYZlylw.js +2 -0
- package/dist/packem_shared/ApiReferencePanel-C42v1jr6.js +1 -0
- package/dist/packem_shared/CommandPalette-CVIaY3j8.js +1 -0
- package/dist/packem_shared/ConfirmButton-CTL3f3kr.js +1 -0
- package/dist/packem_shared/ConnectionBadge-DOk0CQWo.js +1 -0
- package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-BCC8_4BQ.js +1 -0
- package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-B-hcFVoi.js +1 -0
- package/dist/packem_shared/DEFAULT_LOCALE-BZ4NojpD.js +1 -0
- package/dist/packem_shared/DataBrowser-B8J5lHjP.js +1 -0
- package/dist/packem_shared/DataFilters-Csb30F0C.js +1 -0
- package/dist/packem_shared/ErrorBoundary-DvzYskH7.js +1 -0
- package/dist/packem_shared/GlobalDataBrowser-RLJ6NvOs.js +1 -0
- package/dist/packem_shared/HomePanel-DL1HupAN.js +1 -0
- package/dist/packem_shared/OpenRpcReferencePanel-sGsIgYWj.js +1 -0
- package/dist/packem_shared/STUDIO_ROOT_CLASS-C6MccdVk.js +1 -0
- package/dist/packem_shared/ScheduledJobs-DUbo6epc.js +1 -0
- package/dist/packem_shared/ShardInput-BVn2iCU0.js +1 -0
- package/dist/packem_shared/Studio-BWBclm_C.js +1 -0
- package/dist/packem_shared/StudioApp-BFm73yVr.js +1 -0
- package/dist/packem_shared/StudioI18nProvider-CZ5h4nrV.js +1 -0
- package/dist/packem_shared/advisor-view-DaCX9Jy5.js +1 -0
- package/dist/packem_shared/aggregateMetrics-BNfajLa2.js +1 -0
- package/dist/packem_shared/alert-CVcOFuDR.js +1 -0
- package/dist/packem_shared/badge-BbuuAio7.js +1 -0
- package/dist/packem_shared/bar-chart-AryFCeoa.js +9 -0
- package/dist/packem_shared/browser-storage-xjTyMKY0.js +1 -0
- package/dist/packem_shared/button-BkCrNcAs.js +1 -0
- package/dist/packem_shared/card-CIDGUN6K.js +1 -0
- package/dist/packem_shared/cf-links-gbDy51nR.js +1 -0
- package/dist/packem_shared/checkbox-StT4Gob6.js +1 -0
- package/dist/packem_shared/data-grid-BMBKzMEJ.js +1 -0
- package/dist/packem_shared/data-view-params-C8T3bW1z.js +1 -0
- package/dist/packem_shared/dropdown-menu-C3RQ_HlW.js +2 -0
- package/dist/packem_shared/empty-state-Cg7t_8qu.js +1 -0
- package/dist/packem_shared/error-alert-B59DnrDI.js +1 -0
- package/dist/packem_shared/grid-features-uZCUj955.js +6 -0
- package/dist/packem_shared/home-panel-B-8BCffw.js +3 -0
- package/dist/packem_shared/input-JHu63lTv.js +1 -0
- package/dist/packem_shared/internal-AtZ4bTal.js +2 -0
- package/dist/packem_shared/label-6uP1obNF.js +1 -0
- package/dist/packem_shared/live-status-CGW2JHf_.js +1 -0
- package/dist/packem_shared/log-fields-CoL3hsIQ.js +1 -0
- package/dist/packem_shared/modal-shell-CUwwWC2o.js +1 -0
- package/dist/packem_shared/reference-view-KvhektwF.js +12 -0
- package/dist/packem_shared/result-chart-CwKhhKM0.js +1 -0
- package/dist/packem_shared/scroll-area-DTEq6Jec.js +2 -0
- package/dist/packem_shared/select-Bul-DeII.js +2 -0
- package/dist/packem_shared/shard-history-DMEW5VBE.js +1 -0
- package/dist/packem_shared/skeleton-C1wQ9M5t.js +1 -0
- package/dist/packem_shared/sparkline-DtcZoU48.js +1 -0
- package/dist/packem_shared/storage-tier-DznqOf-q.js +1 -0
- package/dist/packem_shared/studio-BHA7hnI3.js +2 -0
- package/dist/packem_shared/table-DdJBrClo.js +2 -0
- package/dist/packem_shared/table-list-sidebar-CMCcNALK.js +1 -0
- package/dist/packem_shared/textarea-Bu2-jKAs.js +1 -0
- package/dist/packem_shared/trace-handoff-Dw7mwjxu.js +1 -0
- package/dist/packem_shared/use-admin-query-Di3fLE8H.js +1 -0
- package/dist/packem_shared/use-async-submit-H68GHPz8.js +1 -0
- package/dist/packem_shared/useDebounced-Ihdiid_k.js +1 -0
- package/dist/packem_shared/utils-bhneXptQ.js +1 -0
- package/dist/packem_shared/virtual-rect-1o1veP7R.js +1 -0
- package/dist/standalone/chunk-23HKRH5H.js +13 -0
- package/dist/standalone/chunk-2A4RKII2.js +1 -0
- package/dist/standalone/chunk-3DTM4GI5.js +1 -0
- package/dist/standalone/chunk-3MHKT76P.js +1 -0
- package/dist/standalone/chunk-46IB4C4Q.js +1 -0
- package/dist/standalone/chunk-4AYEV5UN.js +1 -0
- package/dist/standalone/chunk-4FNHHFWR.js +1 -0
- package/dist/standalone/chunk-6CLVIOCB.js +1 -0
- package/dist/standalone/chunk-6I62RSI5.js +1 -0
- package/dist/standalone/chunk-6OKDCV7J.js +1 -0
- package/dist/standalone/chunk-6P7HIPUE.js +1 -0
- package/dist/standalone/chunk-6UYILUSX.js +1 -0
- package/dist/standalone/chunk-725RLB7D.js +1 -0
- package/dist/standalone/chunk-7AZZ7OJO.js +1 -0
- package/dist/standalone/chunk-7CRLAMGB.js +1 -0
- package/dist/standalone/chunk-7Z5QEFR4.js +2 -0
- package/dist/standalone/chunk-AGVJJQFL.js +1 -0
- package/dist/standalone/chunk-AKTGRZXN.js +1 -0
- package/dist/standalone/chunk-BAIN7UJ4.js +1 -0
- package/dist/standalone/chunk-BHWSIIDT.js +1 -0
- package/dist/standalone/{chunk-L7SK4ZZD.js → chunk-C4O5UR4Y.js} +1 -1
- package/dist/standalone/chunk-C4VURT57.js +1 -0
- package/dist/standalone/chunk-CKO3F55C.js +4 -0
- package/dist/standalone/chunk-CVMRZUF5.js +4 -0
- package/dist/standalone/chunk-CWWGDW4V.js +1 -0
- package/dist/standalone/chunk-CYET4BRZ.js +1 -0
- package/dist/standalone/chunk-CZEUVNCQ.js +1 -0
- package/dist/standalone/chunk-FXFK4M4E.js +1 -0
- package/dist/standalone/chunk-FYAJPWE7.js +1 -0
- package/dist/standalone/chunk-GS7OBQO5.js +1 -0
- package/dist/standalone/chunk-GTXVH7I5.js +1 -0
- package/dist/standalone/chunk-H6SIM4BT.js +1 -0
- package/dist/standalone/chunk-H6WOFY6A.js +8 -0
- package/dist/standalone/chunk-HA34GYEX.js +1 -0
- package/dist/standalone/chunk-HMIOF5GV.js +1 -0
- package/dist/standalone/chunk-HY46NTNW.js +6 -0
- package/dist/standalone/chunk-IBCKC2BO.js +1 -0
- package/dist/standalone/chunk-ICKBVXPP.js +1 -0
- package/dist/standalone/chunk-IE4ROTQD.js +1 -0
- package/dist/standalone/chunk-IYYTWZ2E.js +2 -0
- package/dist/standalone/chunk-J2LMP2A7.js +1 -0
- package/dist/standalone/chunk-JC6WYIHM.js +1 -0
- package/dist/standalone/chunk-JKPK25JO.js +1 -0
- package/dist/standalone/chunk-JLFCXBNQ.js +1 -0
- package/dist/standalone/chunk-JRWBGR5B.js +1 -0
- package/dist/standalone/chunk-K5PFWU5J.js +1 -0
- package/dist/standalone/chunk-KJTLW5W2.js +11 -0
- package/dist/standalone/{chunk-HBGS4SEX.js → chunk-KLLYGWNF.js} +9 -9
- package/dist/standalone/chunk-KNN3ZEQ7.js +1 -0
- package/dist/standalone/{chunk-4QHKBC77.js → chunk-KOC5KV3E.js} +1 -1
- package/dist/standalone/chunk-KSRXMTBV.js +1 -0
- package/dist/standalone/chunk-KYCAYNXM.js +1 -0
- package/dist/standalone/chunk-KZ2YUNMR.js +1 -0
- package/dist/standalone/chunk-LKHUVEHX.js +1 -0
- package/dist/standalone/chunk-LPOKAJT4.js +4 -0
- package/dist/standalone/chunk-MZEK4SGD.js +1 -0
- package/dist/standalone/chunk-NCCUM26H.js +1 -0
- package/dist/standalone/chunk-O62HJZV3.js +1 -0
- package/dist/standalone/chunk-OTJOI23O.js +62 -0
- package/dist/standalone/chunk-P2NBOUGZ.js +1 -0
- package/dist/standalone/chunk-P4J6XNG3.js +1 -0
- package/dist/standalone/chunk-PGDWFWH5.js +1 -0
- package/dist/standalone/chunk-PR2SE2MD.js +1 -0
- package/dist/standalone/chunk-PTTDIYGP.js +1 -0
- package/dist/standalone/chunk-PWDMXMRD.js +1 -0
- package/dist/standalone/chunk-Q34MSC2F.js +1 -0
- package/dist/standalone/chunk-Q5WXTZWX.js +1 -0
- package/dist/standalone/chunk-QC5HCNJZ.js +4 -0
- package/dist/standalone/chunk-QJKRHZYV.js +1 -0
- package/dist/standalone/chunk-R43KHQDA.js +1 -0
- package/dist/standalone/chunk-RC2K5RBE.js +1 -0
- package/dist/standalone/chunk-RE6UWCMG.js +1 -0
- package/dist/standalone/chunk-RUP3M2GF.js +3 -0
- package/dist/standalone/chunk-SA6MBPBL.js +1 -0
- package/dist/standalone/{chunk-BJGBHGK3.js → chunk-SEDZDNQF.js} +1 -1
- package/dist/standalone/chunk-SKHEGARW.js +1 -0
- package/dist/standalone/chunk-SKJZDOHG.js +1 -0
- package/dist/standalone/chunk-SNDYNCAA.js +1 -0
- package/dist/standalone/chunk-SZUHZ2OG.js +1 -0
- package/dist/standalone/chunk-TAE2H7PU.js +1 -0
- package/dist/standalone/chunk-TEIBKU46.js +1 -0
- package/dist/standalone/chunk-TO6NLVFD.js +1 -0
- package/dist/standalone/chunk-TYTJDFX2.js +1 -0
- package/dist/standalone/{chunk-LXULVPEM.js → chunk-UDZY7MKE.js} +3 -3
- package/dist/standalone/chunk-UHHTEBC3.js +1 -0
- package/dist/standalone/chunk-UNDFOYRI.js +1 -0
- package/dist/standalone/chunk-UNN4CESU.js +1 -0
- package/dist/standalone/chunk-UNXX5GQH.js +1 -0
- package/dist/standalone/{chunk-ZHVTQ37P.js → chunk-UREY4GLG.js} +1 -1
- package/dist/standalone/chunk-UWF5DOGV.js +1 -0
- package/dist/standalone/chunk-UY2Y5CXB.js +1 -0
- package/dist/standalone/{chunk-VLXV72QE.js → chunk-UZYGEOWY.js} +1 -1
- package/dist/standalone/chunk-V66TSUKV.js +1 -0
- package/dist/standalone/chunk-VEFNSN7P.js +1 -0
- package/dist/standalone/chunk-VUJGR4PB.js +1 -0
- package/dist/standalone/chunk-VUXJER3D.js +1 -0
- package/dist/standalone/chunk-W572365D.js +1 -0
- package/dist/standalone/chunk-WYFLGXZ3.js +3 -0
- package/dist/standalone/chunk-XDKFPBIL.js +1 -0
- package/dist/standalone/chunk-XRKCGQM2.js +1 -0
- package/dist/standalone/chunk-YNBJ6ICE.js +1 -0
- package/dist/standalone/chunk-YQ5PILIJ.js +1 -0
- package/dist/standalone/chunk-YT7VXQVX.js +1 -0
- package/dist/standalone/chunk-Z7MUQMLE.js +1 -0
- package/dist/standalone/chunk-ZFWEPGWG.js +1 -0
- package/dist/standalone/chunk-ZMFZRGAN.js +1 -0
- package/dist/standalone/studio.js +9 -214
- package/package.json +4 -4
- package/dist/packem_shared/ADMIN_FUNCTIONS-P2UzJscH.js +0 -62
- package/dist/packem_shared/ApiDocsPanel-DNDpeR5O.js +0 -842
- package/dist/packem_shared/ApiReferencePanel-ChlRsAXU.js +0 -230
- package/dist/packem_shared/CommandPalette-BpkopP5f.js +0 -373
- package/dist/packem_shared/ConfirmButton-C2eVi2Qv.js +0 -59
- package/dist/packem_shared/ConnectionBadge-B2DDM2Tn.js +0 -111
- package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js +0 -50
- package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-DjF0h-gA.js +0 -89
- package/dist/packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js +0 -27
- package/dist/packem_shared/DataBrowser-obTn4sKX.js +0 -4493
- package/dist/packem_shared/DataFilters-B1Q7mrt7.js +0 -253
- package/dist/packem_shared/ErrorBoundary-BzAApI7J.js +0 -66
- package/dist/packem_shared/GlobalDataBrowser-BCaohHZ5.js +0 -293
- package/dist/packem_shared/HomePanel-DCRj3hGB.js +0 -14
- package/dist/packem_shared/OpenRpcReferencePanel-CIeQE1aE.js +0 -192
- package/dist/packem_shared/STUDIO_ROOT_CLASS-D12gX2dV.js +0 -3
- package/dist/packem_shared/ScheduledJobs-BQzQo84k.js +0 -262
- package/dist/packem_shared/ShardInput-CZnpHILL.js +0 -107
- package/dist/packem_shared/Studio-DnlPCbID.js +0 -16
- package/dist/packem_shared/StudioApp-CzqlB4zO.js +0 -708
- package/dist/packem_shared/StudioI18nProvider-B-tDCZIi.js +0 -48
- package/dist/packem_shared/advisor-view-D95sN-wO.js +0 -159
- package/dist/packem_shared/aggregateMetrics-D4nUHEKU.js +0 -108
- package/dist/packem_shared/alert-CdAET2K_.js +0 -68
- package/dist/packem_shared/badge-B2PKA1-5.js +0 -49
- package/dist/packem_shared/bar-chart-DSwcWIRy.js +0 -3246
- package/dist/packem_shared/browser-storage-L4gOP5gJ.js +0 -105
- package/dist/packem_shared/button-BhsN2uZH.js +0 -49
- package/dist/packem_shared/card-F2vH_aj2.js +0 -175
- package/dist/packem_shared/cf-links-SIbyi4Y1.js +0 -8
- package/dist/packem_shared/checkbox-UNkzAxl-.js +0 -63
- package/dist/packem_shared/data-grid-BywzWfek.js +0 -183
- package/dist/packem_shared/data-view-params-Cd6yRVbv.js +0 -96
- package/dist/packem_shared/dropdown-menu-WY4B_eJO.js +0 -280
- package/dist/packem_shared/empty-state-DY_oe0k6.js +0 -98
- package/dist/packem_shared/error-alert-D9uIFJUS.js +0 -114
- package/dist/packem_shared/grid-features-ZOLhHKrR.js +0 -809
- package/dist/packem_shared/home-panel-BRAA2UlM.js +0 -1889
- package/dist/packem_shared/input-XH4r1Pt1.js +0 -53
- package/dist/packem_shared/internal-DzHCc2Rq.js +0 -131
- package/dist/packem_shared/label-D8ykjn5J.js +0 -46
- package/dist/packem_shared/live-status-FZ0psC1z.js +0 -44
- package/dist/packem_shared/log-fields-jEH83H2G.js +0 -18
- package/dist/packem_shared/modal-shell-hyaJvIJ6.js +0 -100
- package/dist/packem_shared/reference-view-DfXN7oWP.js +0 -2127
- package/dist/packem_shared/result-chart-Bf9mbCIo.js +0 -119
- package/dist/packem_shared/scroll-area-DLhcy-ml.js +0 -93
- package/dist/packem_shared/select-D9OwHEch.js +0 -273
- package/dist/packem_shared/shard-history-AxiJ1WPP.js +0 -16
- package/dist/packem_shared/skeleton-CGhL0p20.js +0 -45
- package/dist/packem_shared/sparkline-BnA1kC9X.js +0 -93
- package/dist/packem_shared/storage-tier-CL98eOvn.js +0 -85
- package/dist/packem_shared/studio-8QSXbZ98.js +0 -4192
- package/dist/packem_shared/table-DsCa9Qp9.js +0 -246
- package/dist/packem_shared/table-list-sidebar-gCE17v9B.js +0 -842
- package/dist/packem_shared/textarea-D3gaCU_-.js +0 -46
- package/dist/packem_shared/trace-handoff-CGolF3KS.js +0 -38
- package/dist/packem_shared/use-admin-query-C7JNuQp-.js +0 -106
- package/dist/packem_shared/use-async-submit-rnSk_jXl.js +0 -91
- package/dist/packem_shared/useDebounced-Dxncpg6z.js +0 -32
- package/dist/packem_shared/utils-B05Dmz_H.js +0 -8
- package/dist/packem_shared/virtual-rect-CVMUskSm.js +0 -10
- package/dist/standalone/chunk-2K47A3P6.js +0 -1
- package/dist/standalone/chunk-2MLA6WFH.js +0 -1
- package/dist/standalone/chunk-2NGUNNGW.js +0 -1
- package/dist/standalone/chunk-2TJVFKD2.js +0 -1
- package/dist/standalone/chunk-2YTF6LJ6.js +0 -1
- package/dist/standalone/chunk-3GXGLNKW.js +0 -1
- package/dist/standalone/chunk-3HGNPZBN.js +0 -1
- package/dist/standalone/chunk-3LJEGSMK.js +0 -11
- package/dist/standalone/chunk-3OA7PECS.js +0 -6
- package/dist/standalone/chunk-4PC7IXNY.js +0 -1
- package/dist/standalone/chunk-56XQYNUJ.js +0 -1
- package/dist/standalone/chunk-5OIBXYZM.js +0 -1
- package/dist/standalone/chunk-5QT5JRXD.js +0 -3
- package/dist/standalone/chunk-6RLPR7PL.js +0 -1
- package/dist/standalone/chunk-6V74EUPK.js +0 -1
- package/dist/standalone/chunk-7EE33WLB.js +0 -1
- package/dist/standalone/chunk-7TJJXVSE.js +0 -1
- package/dist/standalone/chunk-AHILM3ZP.js +0 -1
- package/dist/standalone/chunk-AN4RKMKW.js +0 -1
- package/dist/standalone/chunk-APSSZB6Z.js +0 -1
- package/dist/standalone/chunk-AXNGWSBM.js +0 -1
- package/dist/standalone/chunk-AXZILWRM.js +0 -1
- package/dist/standalone/chunk-C7RHEBOH.js +0 -1
- package/dist/standalone/chunk-CKSHCYGC.js +0 -2
- package/dist/standalone/chunk-CSWIYOB3.js +0 -1
- package/dist/standalone/chunk-D3VAON25.js +0 -1
- package/dist/standalone/chunk-DDLQN67F.js +0 -1
- package/dist/standalone/chunk-DGHW5JG5.js +0 -1
- package/dist/standalone/chunk-DMCSOTAE.js +0 -3
- package/dist/standalone/chunk-E3BKETAS.js +0 -1
- package/dist/standalone/chunk-E3OXNN6O.js +0 -1
- package/dist/standalone/chunk-E6BOGDIS.js +0 -1
- package/dist/standalone/chunk-F2YMCQ6B.js +0 -1
- package/dist/standalone/chunk-F7GE4X2U.js +0 -1
- package/dist/standalone/chunk-FAVUOGJR.js +0 -1
- package/dist/standalone/chunk-FXP6256Q.js +0 -1
- package/dist/standalone/chunk-G6CTAYHJ.js +0 -1
- package/dist/standalone/chunk-GTM65MVX.js +0 -1
- package/dist/standalone/chunk-H42W62SE.js +0 -1
- package/dist/standalone/chunk-HTF5ZX4I.js +0 -8
- package/dist/standalone/chunk-HV7G6DFP.js +0 -5
- package/dist/standalone/chunk-I2PS4L74.js +0 -1
- package/dist/standalone/chunk-IYHPYY4A.js +0 -1
- package/dist/standalone/chunk-J6J54MBP.js +0 -1
- package/dist/standalone/chunk-J7OGP4NN.js +0 -1
- package/dist/standalone/chunk-JSEXCW5Q.js +0 -1
- package/dist/standalone/chunk-JZLGLG4T.js +0 -1
- package/dist/standalone/chunk-KEGAWN6Y.js +0 -1
- package/dist/standalone/chunk-KZ6INM5M.js +0 -1
- package/dist/standalone/chunk-L2LN3MK4.js +0 -4
- package/dist/standalone/chunk-LT3FH6MW.js +0 -1
- package/dist/standalone/chunk-LZUWZBPE.js +0 -1
- package/dist/standalone/chunk-M4JM3TOY.js +0 -1
- package/dist/standalone/chunk-MLA5ZAEB.js +0 -1
- package/dist/standalone/chunk-MRBI5HNQ.js +0 -1
- package/dist/standalone/chunk-N5XX4HOL.js +0 -6
- package/dist/standalone/chunk-N7SVJOHN.js +0 -1
- package/dist/standalone/chunk-NKFXMDOD.js +0 -1
- package/dist/standalone/chunk-NPSNKFHE.js +0 -1
- package/dist/standalone/chunk-O3NAGRTR.js +0 -1
- package/dist/standalone/chunk-O7FVPUCO.js +0 -1
- package/dist/standalone/chunk-OKQXTLFX.js +0 -1
- package/dist/standalone/chunk-OXHHSUXO.js +0 -1
- package/dist/standalone/chunk-QAFAJBAW.js +0 -1
- package/dist/standalone/chunk-QAIM6KWT.js +0 -1
- package/dist/standalone/chunk-QCPMTB6W.js +0 -1
- package/dist/standalone/chunk-QQ2LOSZL.js +0 -1
- package/dist/standalone/chunk-QVIPA6UJ.js +0 -1
- package/dist/standalone/chunk-QVUQXJCT.js +0 -4
- package/dist/standalone/chunk-R2GMHLJY.js +0 -1
- package/dist/standalone/chunk-RD5UG2YL.js +0 -1
- package/dist/standalone/chunk-RJTIP3WF.js +0 -1
- package/dist/standalone/chunk-RRCPZMC2.js +0 -22
- package/dist/standalone/chunk-SHERR7ZP.js +0 -1
- package/dist/standalone/chunk-SOC5CY3F.js +0 -1
- package/dist/standalone/chunk-SS7JLF2I.js +0 -4
- package/dist/standalone/chunk-SWWYUGPL.js +0 -2
- package/dist/standalone/chunk-TAD43CG5.js +0 -1
- package/dist/standalone/chunk-TTXRHJUP.js +0 -4
- package/dist/standalone/chunk-UK64ZSUW.js +0 -1
- package/dist/standalone/chunk-UKDHGVOC.js +0 -1
- package/dist/standalone/chunk-UPNTMJFF.js +0 -1
- package/dist/standalone/chunk-V43BLH4J.js +0 -1
- package/dist/standalone/chunk-VL23Y44O.js +0 -4
- package/dist/standalone/chunk-VXM5H542.js +0 -4
- package/dist/standalone/chunk-WMDH2CIZ.js +0 -1
- package/dist/standalone/chunk-WVTPZ6CM.js +0 -1
- package/dist/standalone/chunk-XN6QYJQ6.js +0 -13
- package/dist/standalone/chunk-XNJNSCLM.js +0 -1
- package/dist/standalone/chunk-Y4U6CC22.js +0 -1
- package/dist/standalone/chunk-Y572GMZE.js +0 -1
- package/dist/standalone/chunk-Y7PD5KP4.js +0 -76
- package/dist/standalone/chunk-YFIPHCEC.js +0 -1
- package/dist/standalone/chunk-YJXOWLFJ.js +0 -1
- package/dist/standalone/chunk-YNN6NFRZ.js +0 -1
- package/dist/standalone/chunk-YUGHRVPD.js +0 -1
- package/dist/standalone/chunk-ZIGWVHCS.js +0 -1
- package/dist/standalone/chunk-ZPP2KOR4.js +0 -1
- package/dist/standalone/chunk-ZPUO7FNI.js +0 -1
- /package/dist/standalone/{chunk-TEWVD66F.js → chunk-GXZAXNZI.js} +0 -0
|
@@ -1,239 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useState, useEffect } from 'react';
|
|
3
|
-
import { ConfirmButton } from '../packem_shared/ConfirmButton-C2eVi2Qv.js';
|
|
4
|
-
import { E as ErrorAlert } from '../packem_shared/error-alert-D9uIFJUS.js';
|
|
5
|
-
import { L as LiveError } from '../packem_shared/live-status-FZ0psC1z.js';
|
|
6
|
-
import { ShardInput } from '../packem_shared/ShardInput-CZnpHILL.js';
|
|
7
|
-
import { B as Badge } from '../packem_shared/badge-B2PKA1-5.js';
|
|
8
|
-
import { B as Button } from '../packem_shared/button-BhsN2uZH.js';
|
|
9
|
-
import { C as Card, a as CardContent } from '../packem_shared/card-F2vH_aj2.js';
|
|
10
|
-
import { E as EmptyState } from '../packem_shared/empty-state-DY_oe0k6.js';
|
|
11
|
-
import { I as Input } from '../packem_shared/input-XH4r1Pt1.js';
|
|
12
|
-
import { L as Label } from '../packem_shared/label-D8ykjn5J.js';
|
|
13
|
-
import { T as Table, a as TableHeader, b as TableRow, c as TableHead, d as TableBody, e as TableCell } from '../packem_shared/table-DsCa9Qp9.js';
|
|
14
|
-
import { u as useAdminQuery } from '../packem_shared/use-admin-query-C7JNuQp-.js';
|
|
15
|
-
import useDebounced from '../packem_shared/useDebounced-Dxncpg6z.js';
|
|
16
|
-
import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
17
|
-
import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-P2UzJscH.js';
|
|
18
|
-
import { i as formatTimestamp, f as fireAndForget, c as callOptions, e as errorMessage, a as adminRef } from '../packem_shared/internal-DzHCc2Rq.js';
|
|
19
|
-
import { r as recordShard } from '../packem_shared/shard-history-AxiJ1WPP.js';
|
|
20
|
-
import { jsxDEV } from 'react/jsx-dev-runtime';
|
|
21
|
-
|
|
22
|
-
const RUN_MIGRATION = adminRef(ADMIN_FUNCTIONS.runMigration);
|
|
23
|
-
const MigrationsPanel = ({
|
|
24
|
-
initialShardKey
|
|
25
|
-
}) => {
|
|
26
|
-
const client = useLunora();
|
|
27
|
-
const t = useT();
|
|
28
|
-
const [shardKey, setShardKey] = useState(initialShardKey ?? "");
|
|
29
|
-
const [migrationId, setMigrationId] = useState("");
|
|
30
|
-
const [direction, setDirection] = useState("up");
|
|
31
|
-
const [dryRun, setDryRun] = useState(true);
|
|
32
|
-
const [running, setRunning] = useState(false);
|
|
33
|
-
const [runResult, setRunResult] = useState(null);
|
|
34
|
-
const [runError, setRunError] = useState(null);
|
|
35
|
-
const debouncedShard = useDebounced(shardKey.trim(), 400);
|
|
36
|
-
const shardSettled = shardKey.trim() === debouncedShard;
|
|
37
|
-
const statusQuery = useAdminQuery(ADMIN_FUNCTIONS.migrationStatus, {}, {
|
|
38
|
-
live: true,
|
|
39
|
-
shardKey: debouncedShard
|
|
40
|
-
});
|
|
41
|
-
const rows = statusQuery.data?.migrations ?? null;
|
|
42
|
-
const statusError = statusQuery.error;
|
|
43
|
-
const {
|
|
44
|
-
errorSource: statusErrorSource,
|
|
45
|
-
liveError
|
|
46
|
-
} = statusQuery;
|
|
47
|
-
useEffect(() => {
|
|
48
|
-
if (statusQuery.data !== void 0) {
|
|
49
|
-
recordShard(debouncedShard);
|
|
50
|
-
}
|
|
51
|
-
}, [statusQuery.data, debouncedShard]);
|
|
52
|
-
const run = async () => {
|
|
53
|
-
const id = migrationId.trim();
|
|
54
|
-
if (id === "") {
|
|
55
|
-
setRunError(t("Enter a migration id"));
|
|
56
|
-
setRunResult(null);
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
setRunning(true);
|
|
60
|
-
setRunError(null);
|
|
61
|
-
try {
|
|
62
|
-
const result = await client.query(RUN_MIGRATION, {
|
|
63
|
-
direction,
|
|
64
|
-
dryRun,
|
|
65
|
-
id
|
|
66
|
-
}, callOptions(shardKey));
|
|
67
|
-
setRunResult(result);
|
|
68
|
-
statusQuery.refetch();
|
|
69
|
-
} catch (error) {
|
|
70
|
-
setRunResult(null);
|
|
71
|
-
setRunError(errorMessage(error));
|
|
72
|
-
} finally {
|
|
73
|
-
setRunning(false);
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
const runMigration = () => {
|
|
77
|
-
fireAndForget(run());
|
|
78
|
-
};
|
|
79
|
-
const onIdChange = (event) => {
|
|
80
|
-
setMigrationId(event.target.value);
|
|
81
|
-
};
|
|
82
|
-
const onDirectionChange = (event_0) => {
|
|
83
|
-
setDirection(event_0.target.value === "down" ? "down" : "up");
|
|
84
|
-
};
|
|
85
|
-
const onDryRunChange = (event_1) => {
|
|
86
|
-
setDryRun(event_1.target.checked);
|
|
87
|
-
};
|
|
88
|
-
return /* @__PURE__ */ jsxDEV("div", {
|
|
89
|
-
className: "flex flex-col gap-3",
|
|
90
|
-
"data-testid": "lunora-migrations",
|
|
91
|
-
children: [/* @__PURE__ */ jsxDEV("div", {
|
|
92
|
-
className: "flex flex-wrap items-center gap-2",
|
|
93
|
-
children: [/* @__PURE__ */ jsxDEV(ShardInput, {
|
|
94
|
-
onChange: setShardKey,
|
|
95
|
-
testId: "mg-shard-input",
|
|
96
|
-
value: shardKey
|
|
97
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(LiveError, {
|
|
98
|
-
message: liveError,
|
|
99
|
-
prefix: "mg"
|
|
100
|
-
}, void 0, false)]
|
|
101
|
-
}, void 0, true), statusError !== null && /* @__PURE__ */ jsxDEV(ErrorAlert, {
|
|
102
|
-
error: statusErrorSource,
|
|
103
|
-
testId: "mg-status-error"
|
|
104
|
-
}, void 0, false), rows !== null && rows.length === 0 && /* @__PURE__ */ jsxDEV(EmptyState, {
|
|
105
|
-
description: t("Data migrations you run against this shard will be tracked here."),
|
|
106
|
-
icon: /* @__PURE__ */ jsxDEV("svg", {
|
|
107
|
-
"aria-hidden": "true",
|
|
108
|
-
fill: "none",
|
|
109
|
-
stroke: "currentColor",
|
|
110
|
-
strokeLinecap: "round",
|
|
111
|
-
strokeLinejoin: "round",
|
|
112
|
-
strokeWidth: 1.6,
|
|
113
|
-
viewBox: "0 0 24 24",
|
|
114
|
-
children: /* @__PURE__ */ jsxDEV("path", {
|
|
115
|
-
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"
|
|
116
|
-
}, void 0, false)
|
|
117
|
-
}, void 0, false),
|
|
118
|
-
testId: "mg-empty",
|
|
119
|
-
title: t("No migrations have run on this shard.")
|
|
120
|
-
}, void 0, false), rows !== null && rows.length > 0 && /* @__PURE__ */ jsxDEV(Card, {
|
|
121
|
-
className: "overflow-hidden py-0",
|
|
122
|
-
children: /* @__PURE__ */ jsxDEV(CardContent, {
|
|
123
|
-
className: "px-0",
|
|
124
|
-
children: /* @__PURE__ */ jsxDEV(Table, {
|
|
125
|
-
"data-testid": "mg-table",
|
|
126
|
-
children: [/* @__PURE__ */ jsxDEV(TableHeader, {
|
|
127
|
-
children: /* @__PURE__ */ jsxDEV(TableRow, {
|
|
128
|
-
children: [/* @__PURE__ */ jsxDEV(TableHead, {
|
|
129
|
-
children: t("id")
|
|
130
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
131
|
-
children: t("direction")
|
|
132
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
133
|
-
children: t("status")
|
|
134
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
135
|
-
children: t("processed")
|
|
136
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
137
|
-
children: t("changed")
|
|
138
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
139
|
-
children: t("updated")
|
|
140
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
141
|
-
children: t("error")
|
|
142
|
-
}, void 0, false)]
|
|
143
|
-
}, void 0, true)
|
|
144
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableBody, {
|
|
145
|
-
children: rows.map((row) => /* @__PURE__ */ jsxDEV(TableRow, {
|
|
146
|
-
"data-testid": `mg-row-${row.id}`,
|
|
147
|
-
children: [/* @__PURE__ */ jsxDEV(TableCell, {
|
|
148
|
-
children: row.id
|
|
149
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
150
|
-
children: row.direction
|
|
151
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
152
|
-
children: /* @__PURE__ */ jsxDEV(Badge, {
|
|
153
|
-
variant: "secondary",
|
|
154
|
-
children: row.status
|
|
155
|
-
}, void 0, false)
|
|
156
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
157
|
-
children: row.processed
|
|
158
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
159
|
-
children: row.changed
|
|
160
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
161
|
-
children: formatTimestamp(row.updatedAt)
|
|
162
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
163
|
-
children: row.error ?? ""
|
|
164
|
-
}, void 0, false)]
|
|
165
|
-
}, row.id, true))
|
|
166
|
-
}, void 0, false)]
|
|
167
|
-
}, void 0, true)
|
|
168
|
-
}, void 0, false)
|
|
169
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV("div", {
|
|
170
|
-
className: "flex flex-col gap-2 rounded-xl border border-border bg-card p-3 shadow-xs",
|
|
171
|
-
children: [/* @__PURE__ */ jsxDEV(Label, {
|
|
172
|
-
children: t("Run migration")
|
|
173
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV("div", {
|
|
174
|
-
className: "flex flex-wrap items-center gap-2",
|
|
175
|
-
children: [/* @__PURE__ */ jsxDEV(Input, {
|
|
176
|
-
"aria-label": t("Migration id"),
|
|
177
|
-
className: "w-auto",
|
|
178
|
-
"data-testid": "mg-id-input",
|
|
179
|
-
onChange: onIdChange,
|
|
180
|
-
placeholder: t("migration id"),
|
|
181
|
-
value: migrationId
|
|
182
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV("select", {
|
|
183
|
-
"aria-label": t("Direction"),
|
|
184
|
-
className: "flex h-9 rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
185
|
-
"data-testid": "mg-direction",
|
|
186
|
-
onChange: onDirectionChange,
|
|
187
|
-
value: direction,
|
|
188
|
-
children: [/* @__PURE__ */ jsxDEV("option", {
|
|
189
|
-
value: "up",
|
|
190
|
-
children: t("up")
|
|
191
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV("option", {
|
|
192
|
-
value: "down",
|
|
193
|
-
children: t("down")
|
|
194
|
-
}, void 0, false)]
|
|
195
|
-
}, void 0, true), /* @__PURE__ */ jsxDEV(Label, {
|
|
196
|
-
className: "flex items-center gap-1.5",
|
|
197
|
-
htmlFor: "mg-dry-run",
|
|
198
|
-
children: [/* @__PURE__ */ jsxDEV("input", {
|
|
199
|
-
checked: dryRun,
|
|
200
|
-
className: "size-4 accent-primary",
|
|
201
|
-
"data-testid": "mg-dry-run",
|
|
202
|
-
id: "mg-dry-run",
|
|
203
|
-
onChange: onDryRunChange,
|
|
204
|
-
type: "checkbox"
|
|
205
|
-
}, void 0, false), t("Dry run")]
|
|
206
|
-
}, void 0, true), dryRun ? /* @__PURE__ */ jsxDEV(Button, {
|
|
207
|
-
"data-testid": "mg-run",
|
|
208
|
-
disabled: running || !shardSettled,
|
|
209
|
-
onClick: runMigration,
|
|
210
|
-
size: "sm",
|
|
211
|
-
type: "button",
|
|
212
|
-
children: running ? t("Running…") : t("Run")
|
|
213
|
-
}, void 0, false) : (
|
|
214
|
-
// A real (non-dry-run) migration mutates rows — guard it.
|
|
215
|
-
/* @__PURE__ */ jsxDEV(ConfirmButton, {
|
|
216
|
-
confirmLabel: running ? t("Running…") : t("Run migration?"),
|
|
217
|
-
disabled: running || !shardSettled,
|
|
218
|
-
onConfirm: runMigration,
|
|
219
|
-
testId: "mg-run",
|
|
220
|
-
children: t("Run")
|
|
221
|
-
}, void 0, false)
|
|
222
|
-
)]
|
|
223
|
-
}, void 0, true)]
|
|
224
|
-
}, void 0, true), runError !== null && /* @__PURE__ */ jsxDEV("pre", {
|
|
225
|
-
className: "text-sm text-destructive whitespace-pre-wrap",
|
|
226
|
-
"data-testid": "mg-run-error",
|
|
227
|
-
role: "alert",
|
|
228
|
-
children: runError
|
|
229
|
-
}, void 0, false), runResult !== null && /* @__PURE__ */ jsxDEV("p", {
|
|
230
|
-
className: "text-sm text-muted-foreground",
|
|
231
|
-
"data-testid": "mg-run-result",
|
|
232
|
-
children: [runResult.dryRun ? t("Dry run: ") : "", t("{status} — processed", {
|
|
233
|
-
status: runResult.status
|
|
234
|
-
}), runResult.processed, t(", changed"), runResult.changed]
|
|
235
|
-
}, void 0, true)]
|
|
236
|
-
}, void 0, true);
|
|
237
|
-
};
|
|
238
|
-
|
|
239
|
-
export { MigrationsPanel };
|
|
1
|
+
import{useLunora as z}from"@lunora/react";import{useState as a,useEffect as O}from"react";import{ConfirmButton as P}from"../packem_shared/ConfirmButton-CTL3f3kr.js";import{E as q}from"../packem_shared/error-alert-B59DnrDI.js";import{L as H}from"../packem_shared/live-status-CGW2JHf_.js";import{ShardInput as U}from"../packem_shared/ShardInput-BVn2iCU0.js";import{g as W}from"../packem_shared/badge-BbuuAio7.js";import{u as _}from"../packem_shared/button-BkCrNcAs.js";import{c as G,u as J}from"../packem_shared/card-CIDGUN6K.js";import{E as Q}from"../packem_shared/empty-state-Cg7t_8qu.js";import{u as V}from"../packem_shared/input-JHu63lTv.js";import{p as $}from"../packem_shared/label-6uP1obNF.js";import{n as X,d as Y,m as k,p as n,f as Z,u as o}from"../packem_shared/table-DdJBrClo.js";import{K as rr}from"../packem_shared/use-admin-query-Di3fLE8H.js";import er from"../packem_shared/useDebounced-Ihdiid_k.js";import{useT as tr}from"../packem_shared/DEFAULT_LOCALE-BZ4NojpD.js";import{ADMIN_FUNCTIONS as R}from"../packem_shared/ADMIN_FUNCTIONS-BYNSbBVE.js";import{i as ir,f as ar,c as nr,e as or,a as dr}from"../packem_shared/internal-AtZ4bTal.js";import{r as sr}from"../packem_shared/shard-history-DMEW5VBE.js";import{jsxs as i,jsx as r}from"react/jsx-runtime";const lr=dr(R.runMigration),Er=({initialShardKey:C})=>{const L=z(),e=tr(),[c,M]=a(C??""),[v,S]=a(""),[x,E]=a("up"),[h,I]=a(!0),[m,y]=a(!1),[s,p]=a(null),[b,g]=a(null),u=er(c.trim(),400),w=c.trim()===u,d=rr(R.migrationStatus,{},{live:!0,shardKey:u}),l=d.data?.migrations??null,D=d.error,{errorSource:A,liveError:j}=d;O(()=>{d.data!==void 0&&sr(u)},[d.data,u]);const K=async()=>{const t=v.trim();if(t===""){g(e("Enter a migration id")),p(null);return}y(!0),g(null);try{const f=await L.query(lr,{direction:x,dryRun:h,id:t},nr(c));p(f),d.refetch()}catch(f){p(null),g(or(f))}finally{y(!1)}},N=()=>{ar(K())},T=t=>{S(t.target.value)},B=t=>{E(t.target.value==="down"?"down":"up")},F=t=>{I(t.target.checked)};return i("div",{className:"flex flex-col gap-3","data-testid":"lunora-migrations",children:[i("div",{className:"flex flex-wrap items-center gap-2",children:[r(U,{onChange:M,testId:"mg-shard-input",value:c}),r(H,{message:j,prefix:"mg"})]}),D!==null&&r(q,{error:A,testId:"mg-status-error"}),l!==null&&l.length===0&&r(Q,{description:e("Data migrations you run against this shard will be tracked here."),icon:r("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:r("path",{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"})}),testId:"mg-empty",title:e("No migrations have run on this shard.")}),l!==null&&l.length>0&&r(G,{className:"overflow-hidden py-0",children:r(J,{className:"px-0",children:i(X,{"data-testid":"mg-table",children:[r(Y,{children:i(k,{children:[r(n,{children:e("id")}),r(n,{children:e("direction")}),r(n,{children:e("status")}),r(n,{children:e("processed")}),r(n,{children:e("changed")}),r(n,{children:e("updated")}),r(n,{children:e("error")})]})}),r(Z,{children:l.map(t=>i(k,{"data-testid":`mg-row-${t.id}`,children:[r(o,{children:t.id}),r(o,{children:t.direction}),r(o,{children:r(W,{variant:"secondary",children:t.status})}),r(o,{children:t.processed}),r(o,{children:t.changed}),r(o,{children:ir(t.updatedAt)}),r(o,{children:t.error??""})]},t.id))})]})})}),i("div",{className:"flex flex-col gap-2 rounded-xl border border-border bg-card p-3 shadow-xs",children:[r($,{children:e("Run migration")}),i("div",{className:"flex flex-wrap items-center gap-2",children:[r(V,{"aria-label":e("Migration id"),className:"w-auto","data-testid":"mg-id-input",onChange:T,placeholder:e("migration id"),value:v}),i("select",{"aria-label":e("Direction"),className:"flex h-9 rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring","data-testid":"mg-direction",onChange:B,value:x,children:[r("option",{value:"up",children:e("up")}),r("option",{value:"down",children:e("down")})]}),i($,{className:"flex items-center gap-1.5",htmlFor:"mg-dry-run",children:[r("input",{checked:h,className:"size-4 accent-primary","data-testid":"mg-dry-run",id:"mg-dry-run",onChange:F,type:"checkbox"}),e("Dry run")]}),h?r(_,{"data-testid":"mg-run",disabled:m||!w,onClick:N,size:"sm",type:"button",children:e(m?"Running…":"Run")}):r(P,{confirmLabel:e(m?"Running…":"Run migration?"),disabled:m||!w,onConfirm:N,testId:"mg-run",children:e("Run")})]})]}),b!==null&&r("pre",{className:"text-sm text-destructive whitespace-pre-wrap","data-testid":"mg-run-error",role:"alert",children:b}),s!==null&&i("p",{className:"text-sm text-muted-foreground","data-testid":"mg-run-result",children:[s.dryRun?e("Dry run: "):"",e("{status} — processed",{status:s.status}),s.processed,e(", changed"),s.changed]})]})};export{Er as MigrationsPanel};
|
|
@@ -1,306 +1 @@
|
|
|
1
|
-
import { c } from
|
|
2
|
-
import { useState } from 'react';
|
|
3
|
-
import { E as ErrorAlert } from '../packem_shared/error-alert-D9uIFJUS.js';
|
|
4
|
-
import { B as Badge } from '../packem_shared/badge-B2PKA1-5.js';
|
|
5
|
-
import { B as Button } from '../packem_shared/button-BhsN2uZH.js';
|
|
6
|
-
import { C as Card, a as CardContent } from '../packem_shared/card-F2vH_aj2.js';
|
|
7
|
-
import { E as EmptyState } from '../packem_shared/empty-state-DY_oe0k6.js';
|
|
8
|
-
import { I as Input } from '../packem_shared/input-XH4r1Pt1.js';
|
|
9
|
-
import { T as Table, a as TableHeader, b as TableRow, c as TableHead, d as TableBody, e as TableCell } from '../packem_shared/table-DsCa9Qp9.js';
|
|
10
|
-
import { u as useAdminQuery } from '../packem_shared/use-admin-query-C7JNuQp-.js';
|
|
11
|
-
import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
12
|
-
import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-P2UzJscH.js';
|
|
13
|
-
import { i as formatTimestamp } from '../packem_shared/internal-DzHCc2Rq.js';
|
|
14
|
-
import { jsxDEV } from 'react/jsx-dev-runtime';
|
|
15
|
-
|
|
16
|
-
const statusVariant = (status) => {
|
|
17
|
-
if (status === "ok") {
|
|
18
|
-
return "success";
|
|
19
|
-
}
|
|
20
|
-
if (status === "failed") {
|
|
21
|
-
return "destructive";
|
|
22
|
-
}
|
|
23
|
-
if (status === "expired") {
|
|
24
|
-
return "warning";
|
|
25
|
-
}
|
|
26
|
-
return "secondary";
|
|
27
|
-
};
|
|
28
|
-
const deviceTarget = (device) => device.endpoint ?? device.id;
|
|
29
|
-
const NotificationsPanel = () => {
|
|
30
|
-
const $ = c(38);
|
|
31
|
-
const t = useT();
|
|
32
|
-
const [kind, setKind] = useState("all");
|
|
33
|
-
const [search, setSearch] = useState("");
|
|
34
|
-
let t0;
|
|
35
|
-
if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
36
|
-
t0 = {};
|
|
37
|
-
$[0] = t0;
|
|
38
|
-
} else {
|
|
39
|
-
t0 = $[0];
|
|
40
|
-
}
|
|
41
|
-
const {
|
|
42
|
-
data,
|
|
43
|
-
error,
|
|
44
|
-
errorSource,
|
|
45
|
-
isLoading,
|
|
46
|
-
refetch
|
|
47
|
-
} = useAdminQuery(ADMIN_FUNCTIONS.listPushSubscriptions, t0);
|
|
48
|
-
let t1;
|
|
49
|
-
if ($[1] !== data?.subscriptions || $[2] !== error || $[3] !== errorSource || $[4] !== isLoading || $[5] !== kind || $[6] !== refetch || $[7] !== search || $[8] !== t) {
|
|
50
|
-
const devices = data?.subscriptions ?? [];
|
|
51
|
-
const needle = search.trim().toLowerCase();
|
|
52
|
-
const filtered = devices.filter((device) => {
|
|
53
|
-
if (kind !== "all" && device.kind !== kind) {
|
|
54
|
-
return false;
|
|
55
|
-
}
|
|
56
|
-
if (needle === "") {
|
|
57
|
-
return true;
|
|
58
|
-
}
|
|
59
|
-
return `${deviceTarget(device)} ${device.userId ?? ""}`.toLowerCase().includes(needle);
|
|
60
|
-
});
|
|
61
|
-
let t2;
|
|
62
|
-
if ($[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
63
|
-
t2 = (event) => {
|
|
64
|
-
setSearch(event.target.value);
|
|
65
|
-
};
|
|
66
|
-
$[10] = t2;
|
|
67
|
-
} else {
|
|
68
|
-
t2 = $[10];
|
|
69
|
-
}
|
|
70
|
-
const onSearchChange = t2;
|
|
71
|
-
let t3;
|
|
72
|
-
if ($[11] !== refetch) {
|
|
73
|
-
t3 = () => {
|
|
74
|
-
refetch();
|
|
75
|
-
};
|
|
76
|
-
$[11] = refetch;
|
|
77
|
-
$[12] = t3;
|
|
78
|
-
} else {
|
|
79
|
-
t3 = $[12];
|
|
80
|
-
}
|
|
81
|
-
const onRefresh = t3;
|
|
82
|
-
let t4;
|
|
83
|
-
if ($[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
84
|
-
t4 = ["all", "web-push", "fcm"];
|
|
85
|
-
$[13] = t4;
|
|
86
|
-
} else {
|
|
87
|
-
t4 = $[13];
|
|
88
|
-
}
|
|
89
|
-
const kinds = t4;
|
|
90
|
-
let t5;
|
|
91
|
-
if ($[14] !== kind || $[15] !== t) {
|
|
92
|
-
t5 = /* @__PURE__ */ jsxDEV("div", {
|
|
93
|
-
className: "flex items-center gap-1",
|
|
94
|
-
"data-testid": "nt-kind-filter",
|
|
95
|
-
role: "tablist",
|
|
96
|
-
children: kinds.map((value) => /* @__PURE__ */ jsxDEV(Button, {
|
|
97
|
-
"aria-selected": kind === value,
|
|
98
|
-
"data-testid": `nt-kind-${value}`,
|
|
99
|
-
onClick: () => {
|
|
100
|
-
setKind(value);
|
|
101
|
-
},
|
|
102
|
-
role: "tab",
|
|
103
|
-
size: "sm",
|
|
104
|
-
type: "button",
|
|
105
|
-
variant: kind === value ? "secondary" : "ghost",
|
|
106
|
-
children: value === "all" ? t("All") : value
|
|
107
|
-
}, value, false))
|
|
108
|
-
}, void 0, false);
|
|
109
|
-
$[14] = kind;
|
|
110
|
-
$[15] = t;
|
|
111
|
-
$[16] = t5;
|
|
112
|
-
} else {
|
|
113
|
-
t5 = $[16];
|
|
114
|
-
}
|
|
115
|
-
let t6;
|
|
116
|
-
if ($[17] !== t) {
|
|
117
|
-
t6 = t("Filter devices");
|
|
118
|
-
$[17] = t;
|
|
119
|
-
$[18] = t6;
|
|
120
|
-
} else {
|
|
121
|
-
t6 = $[18];
|
|
122
|
-
}
|
|
123
|
-
let t7;
|
|
124
|
-
if ($[19] !== t) {
|
|
125
|
-
t7 = t("filter endpoint, user");
|
|
126
|
-
$[19] = t;
|
|
127
|
-
$[20] = t7;
|
|
128
|
-
} else {
|
|
129
|
-
t7 = $[20];
|
|
130
|
-
}
|
|
131
|
-
let t8;
|
|
132
|
-
if ($[21] !== search || $[22] !== t6 || $[23] !== t7) {
|
|
133
|
-
t8 = /* @__PURE__ */ jsxDEV(Input, {
|
|
134
|
-
"aria-label": t6,
|
|
135
|
-
className: "h-8 w-56",
|
|
136
|
-
"data-testid": "nt-search",
|
|
137
|
-
onChange: onSearchChange,
|
|
138
|
-
placeholder: t7,
|
|
139
|
-
value: search
|
|
140
|
-
}, void 0, false);
|
|
141
|
-
$[21] = search;
|
|
142
|
-
$[22] = t6;
|
|
143
|
-
$[23] = t7;
|
|
144
|
-
$[24] = t8;
|
|
145
|
-
} else {
|
|
146
|
-
t8 = $[24];
|
|
147
|
-
}
|
|
148
|
-
let t9;
|
|
149
|
-
if ($[25] !== t) {
|
|
150
|
-
t9 = t("Refresh");
|
|
151
|
-
$[25] = t;
|
|
152
|
-
$[26] = t9;
|
|
153
|
-
} else {
|
|
154
|
-
t9 = $[26];
|
|
155
|
-
}
|
|
156
|
-
let t10;
|
|
157
|
-
if ($[27] !== onRefresh || $[28] !== t9) {
|
|
158
|
-
t10 = /* @__PURE__ */ jsxDEV(Button, {
|
|
159
|
-
className: "ml-auto",
|
|
160
|
-
"data-testid": "nt-refresh",
|
|
161
|
-
onClick: onRefresh,
|
|
162
|
-
size: "sm",
|
|
163
|
-
type: "button",
|
|
164
|
-
variant: "outline",
|
|
165
|
-
children: t9
|
|
166
|
-
}, void 0, false);
|
|
167
|
-
$[27] = onRefresh;
|
|
168
|
-
$[28] = t9;
|
|
169
|
-
$[29] = t10;
|
|
170
|
-
} else {
|
|
171
|
-
t10 = $[29];
|
|
172
|
-
}
|
|
173
|
-
const t11 = devices.length > 0 && /* @__PURE__ */ jsxDEV(Badge, {
|
|
174
|
-
"data-testid": "nt-count",
|
|
175
|
-
variant: "secondary",
|
|
176
|
-
children: t("{count} devices", {
|
|
177
|
-
count: devices.length
|
|
178
|
-
})
|
|
179
|
-
}, void 0, false);
|
|
180
|
-
let t12;
|
|
181
|
-
if ($[30] !== t10 || $[31] !== t11 || $[32] !== t5 || $[33] !== t8) {
|
|
182
|
-
t12 = /* @__PURE__ */ jsxDEV("div", {
|
|
183
|
-
className: "flex flex-wrap items-center gap-2",
|
|
184
|
-
children: [t5, t8, t10, t11]
|
|
185
|
-
}, void 0, true);
|
|
186
|
-
$[30] = t10;
|
|
187
|
-
$[31] = t11;
|
|
188
|
-
$[32] = t5;
|
|
189
|
-
$[33] = t8;
|
|
190
|
-
$[34] = t12;
|
|
191
|
-
} else {
|
|
192
|
-
t12 = $[34];
|
|
193
|
-
}
|
|
194
|
-
let t13;
|
|
195
|
-
if ($[35] !== error || $[36] !== errorSource) {
|
|
196
|
-
t13 = error !== null && /* @__PURE__ */ jsxDEV(ErrorAlert, {
|
|
197
|
-
error: errorSource,
|
|
198
|
-
testId: "nt-error"
|
|
199
|
-
}, void 0, false);
|
|
200
|
-
$[35] = error;
|
|
201
|
-
$[36] = errorSource;
|
|
202
|
-
$[37] = t13;
|
|
203
|
-
} else {
|
|
204
|
-
t13 = $[37];
|
|
205
|
-
}
|
|
206
|
-
t1 = /* @__PURE__ */ jsxDEV("div", {
|
|
207
|
-
className: "flex flex-col gap-4",
|
|
208
|
-
"data-testid": "lunora-notifications",
|
|
209
|
-
children: [t12, t13, error === null && !isLoading && filtered.length === 0 && /* @__PURE__ */ jsxDEV(EmptyState, {
|
|
210
|
-
description: t("Registered Web Push / FCM devices appear here. Configure lunora/notify.ts with defineNotify({ store }) and register a device with ctx.push.register(...)."),
|
|
211
|
-
icon: /* @__PURE__ */ jsxDEV("svg", {
|
|
212
|
-
"aria-hidden": "true",
|
|
213
|
-
fill: "none",
|
|
214
|
-
stroke: "currentColor",
|
|
215
|
-
strokeLinecap: "round",
|
|
216
|
-
strokeLinejoin: "round",
|
|
217
|
-
strokeWidth: 1.6,
|
|
218
|
-
viewBox: "0 0 24 24",
|
|
219
|
-
children: /* @__PURE__ */ jsxDEV("path", {
|
|
220
|
-
d: "M15 17h5l-1.4-1.4A2 2 0 0 1 18 14.2V11a6 6 0 0 0-4-5.7V5a2 2 0 1 0-4 0v.3A6 6 0 0 0 6 11v3.2a2 2 0 0 1-.6 1.4L4 17h5m6 0v1a3 3 0 1 1-6 0v-1m6 0H9"
|
|
221
|
-
}, void 0, false)
|
|
222
|
-
}, void 0, false),
|
|
223
|
-
testId: "nt-empty",
|
|
224
|
-
title: t("No registered devices.")
|
|
225
|
-
}, void 0, false), filtered.length > 0 && /* @__PURE__ */ jsxDEV(Card, {
|
|
226
|
-
className: "overflow-hidden py-0",
|
|
227
|
-
children: /* @__PURE__ */ jsxDEV(CardContent, {
|
|
228
|
-
className: "max-h-[30rem] overflow-auto px-0",
|
|
229
|
-
children: /* @__PURE__ */ jsxDEV(Table, {
|
|
230
|
-
"data-testid": "nt-table",
|
|
231
|
-
children: [/* @__PURE__ */ jsxDEV(TableHeader, {
|
|
232
|
-
children: /* @__PURE__ */ jsxDEV(TableRow, {
|
|
233
|
-
children: [/* @__PURE__ */ jsxDEV(TableHead, {
|
|
234
|
-
children: t("kind")
|
|
235
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
236
|
-
children: t("endpoint")
|
|
237
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
238
|
-
children: t("user")
|
|
239
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
240
|
-
children: t("last seen")
|
|
241
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
242
|
-
children: t("status")
|
|
243
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
|
|
244
|
-
children: t("error")
|
|
245
|
-
}, void 0, false)]
|
|
246
|
-
}, void 0, true)
|
|
247
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableBody, {
|
|
248
|
-
children: filtered.map((device_0) => {
|
|
249
|
-
const target = deviceTarget(device_0);
|
|
250
|
-
return /* @__PURE__ */ jsxDEV(TableRow, {
|
|
251
|
-
"data-testid": "nt-row",
|
|
252
|
-
children: [/* @__PURE__ */ jsxDEV(TableCell, {
|
|
253
|
-
children: /* @__PURE__ */ jsxDEV(Badge, {
|
|
254
|
-
variant: "outline",
|
|
255
|
-
children: device_0.kind
|
|
256
|
-
}, void 0, false)
|
|
257
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
258
|
-
className: "max-w-[28ch] truncate font-mono text-xs",
|
|
259
|
-
title: target,
|
|
260
|
-
children: target
|
|
261
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
262
|
-
className: "max-w-[16ch] truncate font-mono text-xs",
|
|
263
|
-
children: device_0.userId ?? /* @__PURE__ */ jsxDEV("span", {
|
|
264
|
-
className: "text-muted-foreground",
|
|
265
|
-
children: "—"
|
|
266
|
-
}, void 0, false)
|
|
267
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
268
|
-
className: "text-muted-foreground tabular-nums",
|
|
269
|
-
children: formatTimestamp(device_0.lastSeenAt, "—")
|
|
270
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
271
|
-
children: /* @__PURE__ */ jsxDEV(Badge, {
|
|
272
|
-
"data-testid": `nt-status-${device_0.id}`,
|
|
273
|
-
variant: statusVariant(device_0.lastStatus),
|
|
274
|
-
children: device_0.lastStatus ?? t("n/a")
|
|
275
|
-
}, void 0, false)
|
|
276
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
|
|
277
|
-
className: "max-w-[28ch] truncate font-mono text-xs text-muted-foreground",
|
|
278
|
-
title: device_0.lastError ?? void 0,
|
|
279
|
-
children: device_0.lastError ?? /* @__PURE__ */ jsxDEV("span", {
|
|
280
|
-
className: "text-muted-foreground",
|
|
281
|
-
children: "—"
|
|
282
|
-
}, void 0, false)
|
|
283
|
-
}, void 0, false)]
|
|
284
|
-
}, device_0.id, true);
|
|
285
|
-
})
|
|
286
|
-
}, void 0, false)]
|
|
287
|
-
}, void 0, true)
|
|
288
|
-
}, void 0, false)
|
|
289
|
-
}, void 0, false)]
|
|
290
|
-
}, void 0, true);
|
|
291
|
-
$[1] = data?.subscriptions;
|
|
292
|
-
$[2] = error;
|
|
293
|
-
$[3] = errorSource;
|
|
294
|
-
$[4] = isLoading;
|
|
295
|
-
$[5] = kind;
|
|
296
|
-
$[6] = refetch;
|
|
297
|
-
$[7] = search;
|
|
298
|
-
$[8] = t;
|
|
299
|
-
$[9] = t1;
|
|
300
|
-
} else {
|
|
301
|
-
t1 = $[9];
|
|
302
|
-
}
|
|
303
|
-
return t1;
|
|
304
|
-
};
|
|
305
|
-
|
|
306
|
-
export { NotificationsPanel };
|
|
1
|
+
import{c as W}from"react/compiler-runtime";import{useState as T}from"react";import{E as B}from"../packem_shared/error-alert-B59DnrDI.js";import{g as _}from"../packem_shared/badge-BbuuAio7.js";import{u as z}from"../packem_shared/button-BkCrNcAs.js";import{c as K,u as O}from"../packem_shared/card-CIDGUN6K.js";import{E as U}from"../packem_shared/empty-state-Cg7t_8qu.js";import{u as q}from"../packem_shared/input-JHu63lTv.js";import{n as G,d as J,m as F,p as h,f as Q,u as f}from"../packem_shared/table-DdJBrClo.js";import{K as X}from"../packem_shared/use-admin-query-Di3fLE8H.js";import{useT as Y}from"../packem_shared/DEFAULT_LOCALE-BZ4NojpD.js";import{ADMIN_FUNCTIONS as Z}from"../packem_shared/ADMIN_FUNCTIONS-BYNSbBVE.js";import{i as ee}from"../packem_shared/internal-AtZ4bTal.js";import{jsx as t,jsxs as x}from"react/jsx-runtime";const te=e=>e==="ok"?"success":e==="failed"?"destructive":e==="expired"?"warning":"secondary",P=e=>e.endpoint??e.id,ve=()=>{const e=W(38),r=Y(),[i,R]=T("all"),[s,V]=T("");let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g={},e[0]=g):g=e[0];const{data:S,error:o,errorSource:p,isLoading:C,refetch:v}=X(Z.listPushSubscriptions,g);let N;if(e[1]!==S?.subscriptions||e[2]!==o||e[3]!==p||e[4]!==C||e[5]!==i||e[6]!==v||e[7]!==s||e[8]!==r){const A=S?.subscriptions??[],j=s.trim().toLowerCase(),E=A.filter(a=>i!=="all"&&a.kind!==i?!1:j===""?!0:`${P(a)} ${a.userId??""}`.toLowerCase().includes(j));let b;e[10]===Symbol.for("react.memo_cache_sentinel")?(b=a=>{V(a.target.value)},e[10]=b):b=e[10];const D=b;let w;e[11]!==v?(w=()=>{v()},e[11]=v,e[12]=w):w=e[12];const I=w;let y;e[13]===Symbol.for("react.memo_cache_sentinel")?(y=["all","web-push","fcm"],e[13]=y):y=e[13];const H=y;let l;e[14]!==i||e[15]!==r?(l=t("div",{className:"flex items-center gap-1","data-testid":"nt-kind-filter",role:"tablist",children:H.map(a=>t(z,{"aria-selected":i===a,"data-testid":`nt-kind-${a}`,onClick:()=>{R(a)},role:"tab",size:"sm",type:"button",variant:i===a?"secondary":"ghost",children:a==="all"?r("All"):a},a))}),e[14]=i,e[15]=r,e[16]=l):l=e[16];let n;e[17]!==r?(n=r("Filter devices"),e[17]=r,e[18]=n):n=e[18];let c;e[19]!==r?(c=r("filter endpoint, user"),e[19]=r,e[20]=c):c=e[20];let d;e[21]!==s||e[22]!==n||e[23]!==c?(d=t(q,{"aria-label":n,className:"h-8 w-56","data-testid":"nt-search",onChange:D,placeholder:c,value:s}),e[21]=s,e[22]=n,e[23]=c,e[24]=d):d=e[24];let m;e[25]!==r?(m=r("Refresh"),e[25]=r,e[26]=m):m=e[26];let u;e[27]!==I||e[28]!==m?(u=t(z,{className:"ml-auto","data-testid":"nt-refresh",onClick:I,size:"sm",type:"button",variant:"outline",children:m}),e[27]=I,e[28]=m,e[29]=u):u=e[29];const L=A.length>0&&t(_,{"data-testid":"nt-count",variant:"secondary",children:r("{count} devices",{count:A.length})});let $;e[30]!==u||e[31]!==L||e[32]!==l||e[33]!==d?($=x("div",{className:"flex flex-wrap items-center gap-2",children:[l,d,u,L]}),e[30]=u,e[31]=L,e[32]=l,e[33]=d,e[34]=$):$=e[34];let k;e[35]!==o||e[36]!==p?(k=o!==null&&t(B,{error:p,testId:"nt-error"}),e[35]=o,e[36]=p,e[37]=k):k=e[37],N=x("div",{className:"flex flex-col gap-4","data-testid":"lunora-notifications",children:[$,k,o===null&&!C&&E.length===0&&t(U,{description:r("Registered Web Push / FCM devices appear here. Configure lunora/notify.ts with defineNotify({ store }) and register a device with ctx.push.register(...)."),icon:t("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:t("path",{d:"M15 17h5l-1.4-1.4A2 2 0 0 1 18 14.2V11a6 6 0 0 0-4-5.7V5a2 2 0 1 0-4 0v.3A6 6 0 0 0 6 11v3.2a2 2 0 0 1-.6 1.4L4 17h5m6 0v1a3 3 0 1 1-6 0v-1m6 0H9"})}),testId:"nt-empty",title:r("No registered devices.")}),E.length>0&&t(K,{className:"overflow-hidden py-0",children:t(O,{className:"max-h-[30rem] overflow-auto px-0",children:x(G,{"data-testid":"nt-table",children:[t(J,{children:x(F,{children:[t(h,{children:r("kind")}),t(h,{children:r("endpoint")}),t(h,{children:r("user")}),t(h,{children:r("last seen")}),t(h,{children:r("status")}),t(h,{children:r("error")})]})}),t(Q,{children:E.map(a=>{const M=P(a);return x(F,{"data-testid":"nt-row",children:[t(f,{children:t(_,{variant:"outline",children:a.kind})}),t(f,{className:"max-w-[28ch] truncate font-mono text-xs",title:M,children:M}),t(f,{className:"max-w-[16ch] truncate font-mono text-xs",children:a.userId??t("span",{className:"text-muted-foreground",children:"—"})}),t(f,{className:"text-muted-foreground tabular-nums",children:ee(a.lastSeenAt,"—")}),t(f,{children:t(_,{"data-testid":`nt-status-${a.id}`,variant:te(a.lastStatus),children:a.lastStatus??r("n/a")})}),t(f,{className:"max-w-[28ch] truncate font-mono text-xs text-muted-foreground",title:a.lastError??void 0,children:a.lastError??t("span",{className:"text-muted-foreground",children:"—"})})]},a.id)})})]})})})]}),e[1]=S?.subscriptions,e[2]=o,e[3]=p,e[4]=C,e[5]=i,e[6]=v,e[7]=s,e[8]=r,e[9]=N}else N=e[9];return N};export{ve as NotificationsPanel};
|