@hot-updater/console 1.0.0-rc.2 → 1.0.0-rc.21
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/.output/nitro.json +1 -1
- package/.output/public/assets/ConsoleFeatureUnavailable-D0LPL1Gy.js +1 -0
- package/.output/public/assets/HashValueDisplay-BmuB4FW-.js +1 -0
- package/.output/public/assets/InsightsInfo--v4SC07c.js +1 -0
- package/.output/public/assets/InsightsPageHeader-dU83CAQY.js +1 -0
- package/.output/public/assets/NotFoundPage-B5mhGG2a.js +1 -0
- package/.output/public/assets/api-D-vOVlQ4.js +1 -0
- package/.output/public/assets/api-keys-Csh8ARKU.js +1 -0
- package/.output/public/assets/api-keys-OMPUoA_A.js +1 -0
- package/.output/public/assets/arrow-left-Bwq9X1eS.js +1 -0
- package/.output/public/assets/arrow-up-right-BkOVn4if.js +1 -0
- package/.output/public/assets/card-C_7d6O9a.js +1 -0
- package/.output/public/assets/console-features-api-C1jRZTGw.js +1 -0
- package/.output/public/assets/dialog-DE8wFN_P.js +1 -0
- package/.output/public/assets/dist-C7ENGzpS.js +1 -0
- package/.output/public/assets/empty-CVd5NlQD.js +1 -0
- package/.output/public/assets/field-C06q1iC9.js +1 -0
- package/.output/public/assets/index-BeWlQtO6.js +11 -0
- package/.output/public/assets/input-group-Bi61biIA.js +1 -0
- package/.output/public/assets/insights-BjnAtC0f.js +2 -0
- package/.output/public/assets/insights-D86m11yH.js +42 -0
- package/.output/public/assets/insights-DpYstMoY.js +1 -0
- package/.output/public/assets/insights-recovery-rpc-BIm5_ALc.js +1 -0
- package/.output/public/assets/insights-search-KIF7mRtB.js +1 -0
- package/.output/public/assets/insights-usage-rpc-VHj8vyBt.js +1 -0
- package/.output/public/assets/insights_.distribution-ADcrX48c.js +2 -0
- package/.output/public/assets/insights_.distribution-CuuJUN6Y.js +1 -0
- package/.output/public/assets/insights_.distribution-DJRjuXsO.js +1 -0
- package/.output/public/assets/installations-BSBBzqWs.js +2 -0
- package/.output/public/assets/installations-DqIE6WcO.js +1 -0
- package/.output/public/assets/installations-UsELbDvw.js +1 -0
- package/.output/public/assets/loader-circle-CnCBxzHp.js +1 -0
- package/.output/public/assets/mutation-Csp7xUNh.js +1 -0
- package/.output/public/assets/preload-helper-B-cOmpLH.js +1 -0
- package/.output/public/assets/refresh-cw-FF1NtzlQ.js +1 -0
- package/.output/public/assets/routes-CoN9XHP_.js +2 -0
- package/.output/public/assets/routes-DT1jB0Zi.js +1 -0
- package/.output/public/assets/sidebar-D8mJRF15.js +3 -0
- package/.output/public/assets/styles-Bwt7v6U5.css +2 -0
- package/.output/public/assets/table-WBgfvgXg.js +1 -0
- package/.output/public/assets/useCompositeListItem-CloBmDwn.js +1 -0
- package/.output/public/assets/useMutation-DO8cvsTx.js +1 -0
- package/.output/public/assets/useOpenInteractionType-ReGr9GzJ.js +1 -0
- package/.output/public/assets/valueToPercent-BvPAi4bP.js +1 -0
- package/.output/server/{__23tanstack-start-server-fn-resolver-B7ioJhtE.mjs → __23tanstack-start-server-fn-resolver-DMRD4e4f.mjs} +51 -47
- package/.output/server/_libs/@base-ui/react+[...].mjs +7044 -3622
- package/.output/server/_libs/@reduxjs/toolkit+[...].mjs +1554 -0
- package/.output/server/_libs/@tanstack/react-router+[...].mjs +3803 -4023
- package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +141 -98
- package/.output/server/_libs/d3-array.mjs +231 -0
- package/.output/server/_libs/d3-color.mjs +330 -0
- package/.output/server/_libs/d3-format.mjs +252 -0
- package/.output/server/_libs/d3-interpolate.mjs +207 -0
- package/.output/server/_libs/d3-path.mjs +77 -0
- package/.output/server/_libs/d3-scale+[...].mjs +1907 -0
- package/.output/server/_libs/d3-shape.mjs +818 -0
- package/.output/server/_libs/decimal.js-light.mjs +884 -0
- package/.output/server/_libs/es-toolkit.mjs +1159 -0
- package/.output/server/_libs/eventemitter3.mjs +236 -0
- package/.output/server/_libs/immer.mjs +532 -0
- package/.output/server/_libs/lucide-react.mjs +46 -32
- package/.output/server/_libs/next-themes.mjs +2 -2
- package/.output/server/_libs/react-redux+[...].mjs +205 -0
- package/.output/server/_libs/recharts+[...].mjs +14350 -0
- package/.output/server/_libs/sonner.mjs +2 -2
- package/.output/server/_libs/tanstack__history.mjs +68 -41
- package/.output/server/_libs/tanstack__query-core.mjs +1618 -309
- package/.output/server/_libs/tanstack__react-query.mjs +262 -22
- package/.output/server/_libs/verkit.mjs +99 -1
- package/.output/server/_runtime.mjs +10 -1
- package/.output/server/_ssr/ConsoleFeatureUnavailable-Du7jNPNS.mjs +58 -0
- package/.output/server/_ssr/{HashValueDisplay-DwpGLfrl.mjs → HashValueDisplay-GQvFkXoi.mjs} +3 -3
- package/.output/server/_ssr/InsightsInfo-Do7QSaFR.mjs +37 -0
- package/.output/server/_ssr/InsightsPageHeader-DSUWUWRc.mjs +154 -0
- package/.output/server/_ssr/NotFoundPage-DsF4Vrhg.mjs +37 -0
- package/.output/server/_ssr/api-BEiVs0H7.mjs +203 -0
- package/.output/server/_ssr/api-keys-BrvBWGRf.mjs +5 -0
- package/.output/server/_ssr/{api-keys-CZeTPQys.mjs → api-keys-K5v32nf7.mjs} +49 -9
- package/.output/server/_ssr/api-keys-rpc-B96bBllm.mjs +52 -0
- package/.output/server/_ssr/api-rpc-DcUe280B.mjs +296 -0
- package/.output/server/_ssr/{auth-rpc-DUaeOWKK.mjs → auth-rpc-C68W56DP.mjs} +6 -6
- package/.output/server/_ssr/auth.server-DM1J6NwR.mjs +5712 -0
- package/.output/server/_ssr/bundleActivity-CpuY9CTP.mjs +19 -0
- package/.output/server/_ssr/card-CPAEKx0w.mjs +49 -0
- package/.output/server/_ssr/config-nsIcsHh8.mjs +15 -0
- package/.output/server/_ssr/config.server-DDCZk3Sq.mjs +36 -0
- package/.output/server/_ssr/console-access-Da-2Qd7q.mjs +17 -0
- package/.output/server/_ssr/console-features-Dzu2iUGD.mjs +55 -0
- package/.output/server/_ssr/console-features-api-xAsSgFa_.mjs +43 -0
- package/.output/server/_ssr/console-features-rpc-qARGpB24.mjs +19 -0
- package/.output/server/_ssr/{createServerFn-B2hcXoPM.mjs → createMiddleware-BdBf_ezN.mjs} +67 -56
- package/.output/server/_ssr/{createServerRpc-DB29C_5p.mjs → createServerRpc-B_y2lrwA.mjs} +2 -2
- package/.output/server/_ssr/{databaseJsonValue-d6I3nAS4.mjs → databaseJsonValue-Bhxciy7Z.mjs} +28 -5
- package/.output/server/_ssr/databaseRows-DwMAjaF8.mjs +74 -0
- package/.output/server/_ssr/{dialog-DS-nw-pA.mjs → dialog-q__BJ7mQ.mjs} +2 -2
- package/.output/server/_ssr/{dist-CyzPaI5v.mjs → dist-Cxo9ghYv.mjs} +140 -6
- package/.output/server/_ssr/{downloadBundle-CNnYxYO2.mjs → downloadBundle-BW9I-pMQ.mjs} +10 -10
- package/.output/server/_ssr/empty-DcBTAooP.mjs +49 -0
- package/.output/server/_ssr/{empty-plugin-adapters-B5QvGpEl.mjs → empty-plugin-adapters-CYdinE-i.mjs} +1 -1
- package/.output/server/_ssr/{table-CnZmon_Z.mjs → field-QCDBVpXA.mjs} +63 -51
- package/.output/server/_ssr/getBundleChildren-DIAGCF4a.mjs +22 -0
- package/.output/server/_ssr/{input-group-BpsnmvZw.mjs → input-group-hCk2nUoU.mjs} +2 -2
- package/.output/server/_ssr/insights-BfBO0RFr.mjs +1238 -0
- package/.output/server/_ssr/insights-DsAU3-TB.mjs +14 -0
- package/.output/server/_ssr/insights-RIfg447W.mjs +5 -0
- package/.output/server/_ssr/insights-api-CDn-QQHU.mjs +105 -0
- package/.output/server/_ssr/insights-failures-BBGMhuUr.mjs +44 -0
- package/.output/server/_ssr/insights-failures-rpc-rA2dctK2.mjs +21 -0
- package/.output/server/_ssr/insights-recovery-Dpk6Mfb9.mjs +28 -0
- package/.output/server/_ssr/insights-recovery-rpc-BCaF-xSd.mjs +46 -0
- package/.output/server/_ssr/insights-recovery-rpc-CcgYyUHk.mjs +20 -0
- package/.output/server/_ssr/{insights-rpc-38DujK0G.mjs → insights-rpc-keycmwzw.mjs} +22 -14
- package/.output/server/_ssr/insights-search-BRg5VsNe.mjs +25 -0
- package/.output/server/_ssr/insights-usage-cbw9n2Fq.mjs +29 -0
- package/.output/server/_ssr/insights-usage-rpc-BKgV1QDf.mjs +29 -0
- package/.output/server/_ssr/insights-usage-rpc-D-JYachy.mjs +41 -0
- package/.output/server/_ssr/insightsRecovery-B7oMc8d8.mjs +45 -0
- package/.output/server/_ssr/insightsUsage-Oa7kk5ek.mjs +56 -0
- package/.output/server/_ssr/insights_.distribution-BIqOqRW0.mjs +335 -0
- package/.output/server/_ssr/insights_.distribution-CuUrDa7P.mjs +5 -0
- package/.output/server/_ssr/insights_.distribution-RT_6x_ud.mjs +14 -0
- package/.output/server/_ssr/{installations-DiVKEF5T.mjs → installations-BO5CjX2z.mjs} +517 -54
- package/.output/server/_ssr/installations-BjaHiIfh.mjs +5 -0
- package/.output/server/_ssr/installations-Dt5luA-N.mjs +69 -0
- package/.output/server/_ssr/listReleases-BitHzOYB.mjs +79 -0
- package/.output/server/_ssr/releaseManagement-B3e7I8J9.mjs +11 -0
- package/.output/server/_ssr/{router-B9wG_9f8.mjs → router-DfVAixxe.mjs} +135 -139
- package/.output/server/_ssr/{routes-D7Yh_jfj.mjs → routes-C6LstNp8.mjs} +176 -455
- package/.output/server/_ssr/routes-Q3Uhmwwz.mjs +292 -0
- package/.output/server/_ssr/runtime.server-fL0o6I2b.mjs +1459 -0
- package/.output/server/_ssr/schema-BKY9SqaY.mjs +25 -0
- package/.output/server/_ssr/select-CUlInmjk.mjs +107 -0
- package/.output/server/_ssr/server-C43wq9ft.mjs +8330 -0
- package/.output/server/_ssr/{createSsrRpc-DjWNJ0uc.mjs → sidebar-DKbx2ach.mjs} +117 -63
- package/.output/server/_ssr/ssr.mjs +1 -1
- package/.output/server/_ssr/start-BXUOv_n8.mjs +4 -0
- package/.output/server/_ssr/table-NGWV8B-S.mjs +53 -0
- package/.output/server/_ssr/updateFailures-Jwe2Baab.mjs +24 -0
- package/.output/server/_ssr/{uuidv7-D0QFkPL_.mjs → uuidv7-C8bwiZr8.mjs} +2 -2
- package/.output/server/_tanstack-start-manifest_v-WQ5qGn8n.mjs +124 -0
- package/.output/server/index.mjs +267 -162
- package/LICENSE +13 -14
- package/README.md +82 -72
- package/lib/index.d.mts +23 -11
- package/lib/vite-internal.mjs +13 -3
- package/lib/vite.d.mts +2 -0
- package/package.json +14 -14
- package/src/components/AppSidebar.tsx +100 -71
- package/src/components/ConsoleAccessPage.tsx +5 -1
- package/src/components/ConsoleFeatureUnavailable.tsx +80 -0
- package/src/components/NotFoundPage.tsx +7 -7
- package/src/components/features/FeatureSlots.tsx +99 -0
- package/src/components/features/api-keys/apiKeysFeatureUi.tsx +15 -0
- package/src/components/features/bundles/BundleMetadata.tsx +8 -5
- package/src/components/features/bundles/RolloutCohortsDialog.tsx +1 -1
- package/src/components/features/channels/ChannelManagementDialog.tsx +2 -5
- package/src/components/features/insights/AppUsage.tsx +370 -0
- package/src/components/features/insights/EstimatedCount.tsx +18 -0
- package/src/components/features/insights/EventDetails.tsx +117 -37
- package/src/components/features/insights/EventHistoryCard.tsx +112 -26
- package/src/components/features/insights/EventHistoryList.tsx +2 -2
- package/src/components/features/insights/InsightsControls.tsx +265 -102
- package/src/components/features/insights/InsightsErrorAlert.tsx +14 -1
- package/src/components/features/insights/InsightsInfo.tsx +48 -0
- package/src/components/features/insights/InsightsOverview.tsx +176 -173
- package/src/components/features/insights/InsightsPageHeader.tsx +35 -20
- package/src/components/features/insights/InsightsPeriodSelector.tsx +89 -0
- package/src/components/features/insights/InstallationHistoryCard.tsx +52 -10
- package/src/components/features/insights/InstallationMatchesCard.tsx +1 -1
- package/src/components/features/insights/ReleaseActivity.tsx +188 -0
- package/src/components/features/insights/ReportingDevicesSummary.tsx +65 -0
- package/src/components/features/insights/UpdateFailures.tsx +319 -0
- package/src/components/features/insights/insightsFeatureUi.tsx +35 -0
- package/src/components/features/releases/ReleaseEditorSheet.tsx +30 -7
- package/src/components/ui/card.tsx +1 -1
- package/src/components/ui/empty.tsx +101 -0
- package/src/components/ui/scroll-area.tsx +52 -0
- package/src/components/ui/sidebar.tsx +22 -29
- package/src/components/ui/tabs.tsx +81 -0
- package/src/index.ts +26 -19
- package/src/lib/api-keys-api.ts +0 -28
- package/src/lib/api-keys-rpc.ts +27 -38
- package/src/lib/api-rpc.ts +189 -266
- package/src/lib/api.ts +19 -102
- package/src/lib/bundle-activity.ts +31 -0
- package/src/lib/console-access.ts +20 -0
- package/src/lib/console-features-api.ts +68 -0
- package/src/lib/console-features-rpc.ts +13 -0
- package/src/lib/console-features.ts +91 -0
- package/src/lib/insights-api.ts +37 -1
- package/src/lib/insights-failures-rpc.ts +21 -0
- package/src/lib/insights-failures.ts +129 -0
- package/src/lib/insights-recovery-rpc.ts +51 -0
- package/src/lib/insights-recovery.ts +68 -0
- package/src/lib/insights-retention.ts +21 -0
- package/src/lib/insights-rpc.ts +30 -12
- package/src/lib/insights-search.ts +58 -0
- package/src/lib/insights-usage-rpc.ts +29 -0
- package/src/lib/insights-usage.ts +74 -0
- package/src/lib/insights-view.ts +38 -2
- package/src/lib/scroll-restoration.ts +21 -0
- package/src/lib/server/adminInsights.ts +124 -0
- package/src/lib/server/auth.server.ts +13 -5
- package/src/lib/server/bundleActivity.ts +37 -0
- package/src/lib/server/config.server.ts +21 -74
- package/src/lib/server/console-feature-apis.ts +59 -0
- package/src/lib/server/console-runtime.server.ts +82 -38
- package/src/lib/server/downloadBundle.ts +16 -15
- package/src/lib/server/getBundleChildren.ts +31 -122
- package/src/lib/server/insightsRecovery.ts +55 -0
- package/src/lib/server/insightsUsage.ts +63 -0
- package/src/lib/server/listReleases.ts +109 -44
- package/src/lib/server/releaseReachability.ts +8 -7
- package/src/lib/server/runtime.server.ts +120 -31
- package/src/lib/server/updateFailures.ts +31 -0
- package/src/routeTree.gen.ts +44 -44
- package/src/router.tsx +3 -2
- package/src/routes/-installations-search.ts +32 -8
- package/src/routes/-releases-search.ts +76 -29
- package/src/routes/__root.tsx +10 -4
- package/src/routes/api/bundles/$bundleId/download.ts +2 -5
- package/src/routes/api-keys.tsx +5 -2
- package/src/routes/index.tsx +167 -104
- package/src/routes/insights.tsx +100 -59
- package/src/routes/insights_.distribution.tsx +398 -0
- package/src/routes/installations.tsx +98 -41
- package/src/vite-internal.ts +15 -3
- package/src/vite.ts +2 -0
- package/.output/public/assets/HashValueDisplay-CB0Eskit.js +0 -1
- package/.output/public/assets/InsightsPageHeader-Car5LNiZ.js +0 -1
- package/.output/public/assets/api-keys-BzKocqRy.js +0 -1
- package/.output/public/assets/api-keys-api-BHcODB7q.js +0 -1
- package/.output/public/assets/card-Dhr_eFYj.js +0 -1
- package/.output/public/assets/chart-no-axes-combined-Dy4WJv2U.js +0 -1
- package/.output/public/assets/composite-Bp98A0Ld.js +0 -1
- package/.output/public/assets/createServerFn-CA8fs7QD.js +0 -3
- package/.output/public/assets/dialog-CUTrcPlB.js +0 -1
- package/.output/public/assets/dist-C_NydL0e.js +0 -1
- package/.output/public/assets/index-DdAz-CXv.js +0 -10
- package/.output/public/assets/input-group-cSOG4wh_.js +0 -1
- package/.output/public/assets/insights-C0PBSZ-n.js +0 -1
- package/.output/public/assets/installations-CE33wgbY.js +0 -2
- package/.output/public/assets/installations-CStZja8x.js +0 -1
- package/.output/public/assets/lazyRouteComponent-Ccp3bwBY.js +0 -1
- package/.output/public/assets/link-CI8idAUi.js +0 -1
- package/.output/public/assets/loader-circle-BoxLrsOu.js +0 -1
- package/.output/public/assets/preload-helper-CQ36nxok.js +0 -1
- package/.output/public/assets/refresh-cw-Bqc72UZG.js +0 -1
- package/.output/public/assets/routes-DGVXdzpw.js +0 -2
- package/.output/public/assets/routes-DTlwOr8I.js +0 -1
- package/.output/public/assets/shield-check-uK3MHWJZ.js +0 -1
- package/.output/public/assets/signing-CMf4aqDO.js +0 -1
- package/.output/public/assets/styles-BCvbtKsm.css +0 -2
- package/.output/public/assets/table-2vcV89QB.js +0 -1
- package/.output/public/assets/useCompositeListItem-CHLITE_4.js +0 -1
- package/.output/public/assets/x-DCd0j8c6.js +0 -1
- package/.output/server/_ssr/InsightsPageHeader-Df4Brj8u.mjs +0 -484
- package/.output/server/_ssr/api-keys-api-BUPQVSpk.mjs +0 -60
- package/.output/server/_ssr/api-keys-rpc-Cs7tS5_j.mjs +0 -136
- package/.output/server/_ssr/api-rpc-tAupfGQm.mjs +0 -1399
- package/.output/server/_ssr/auth.server-DW71WzsD.mjs +0 -47
- package/.output/server/_ssr/bundle-signing-rpc-BhnBw0-d.mjs +0 -16
- package/.output/server/_ssr/bundle-signing.server-C4NW5mWx.mjs +0 -12
- package/.output/server/_ssr/card-BRiPmi0C.mjs +0 -108
- package/.output/server/_ssr/config-Dv8qLDZ0.mjs +0 -13
- package/.output/server/_ssr/config.server-afDuAwaG.mjs +0 -368
- package/.output/server/_ssr/databaseRows-5bCRTxm-.mjs +0 -126
- package/.output/server/_ssr/deleteBundle-BTGwBgzx.mjs +0 -66
- package/.output/server/_ssr/getBundleChildren-C0vh4ZvE.mjs +0 -50
- package/.output/server/_ssr/insights-BdS364Xu.mjs +0 -460
- package/.output/server/_ssr/insightsContract-fjJDBeEE.mjs +0 -303
- package/.output/server/_ssr/installations-CtA59MQG.mjs +0 -29
- package/.output/server/_ssr/routes-CKrrS2q2.mjs +0 -37
- package/.output/server/_ssr/runtime.server-DacU1TBV.mjs +0 -438
- package/.output/server/_ssr/server-D_C2rMzf.mjs +0 -7468
- package/.output/server/_ssr/signing-Dz1WkZOf.mjs +0 -133
- package/.output/server/_ssr/start-DpViQGnt.mjs +0 -4
- package/.output/server/_tanstack-start-manifest_v-2MjTyxil.mjs +0 -97
- package/src/components/features/insights/InsightsBundleReports.tsx +0 -51
- package/src/components/features/signing/BundleSigningPage.tsx +0 -139
- package/src/lib/bundle-signing-api.ts +0 -14
- package/src/lib/bundle-signing-rpc.ts +0 -16
- package/src/lib/server/bundle-signing.server.ts +0 -23
- package/src/lib/server/deleteBundle.ts +0 -145
- package/src/routes/signing.tsx +0 -37
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createFileRoute,
|
|
3
3
|
useElementScrollRestoration,
|
|
4
|
+
useLocation,
|
|
4
5
|
} from "@tanstack/react-router";
|
|
5
6
|
import { ArrowLeft } from "lucide-react";
|
|
6
7
|
import { useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
7
8
|
|
|
9
|
+
import { ConsoleFeatureUnavailable } from "@/components/ConsoleFeatureUnavailable";
|
|
8
10
|
import { EventHistoryCard } from "@/components/features/insights/EventHistoryCard";
|
|
9
11
|
import { InsightsPageHeader } from "@/components/features/insights/InsightsPageHeader";
|
|
10
12
|
import { InstallationHistoryCard } from "@/components/features/insights/InstallationHistoryCard";
|
|
@@ -15,15 +17,20 @@ import {
|
|
|
15
17
|
} from "@/components/features/insights/InstallationPageHeader";
|
|
16
18
|
import { Button } from "@/components/ui/button";
|
|
17
19
|
import { Card, CardContent } from "@/components/ui/card";
|
|
20
|
+
import { requireConsoleFeature } from "@/lib/console-features-api";
|
|
18
21
|
import {
|
|
19
22
|
useInsightsEventsQuery,
|
|
20
23
|
useInsightsInstallationEventsQuery,
|
|
21
24
|
useInsightsInstallationQuery,
|
|
22
25
|
useInsightsInstallationsQuery,
|
|
26
|
+
useInsightsRetention,
|
|
23
27
|
} from "@/lib/insights-api";
|
|
28
|
+
import { formatDays } from "@/lib/insights-retention";
|
|
29
|
+
import { DEFAULT_EVENT_RANGE, eventRangeBounds } from "@/lib/insights-view";
|
|
24
30
|
|
|
25
31
|
import {
|
|
26
|
-
|
|
32
|
+
type InsightsPaginationState,
|
|
33
|
+
installationsScrollRestorationKey,
|
|
27
34
|
validateInstallationsSearch,
|
|
28
35
|
} from "./-installations-search";
|
|
29
36
|
|
|
@@ -40,30 +47,50 @@ const popCursor = (stack: readonly string[]) => ({
|
|
|
40
47
|
});
|
|
41
48
|
|
|
42
49
|
export const Route = createFileRoute("/installations")({
|
|
50
|
+
beforeLoad: ({ context }) =>
|
|
51
|
+
requireConsoleFeature(context.queryClient, "insights"),
|
|
52
|
+
notFoundComponent: ConsoleFeatureUnavailable,
|
|
43
53
|
component: InstallationsPage,
|
|
54
|
+
staticData: { scrollRestorationKey: installationsScrollRestorationKey },
|
|
44
55
|
validateSearch: validateInstallationsSearch,
|
|
45
56
|
});
|
|
46
57
|
|
|
47
58
|
function InstallationsPage() {
|
|
48
59
|
const search = Route.useSearch();
|
|
49
60
|
const navigate = Route.useNavigate();
|
|
61
|
+
const retention = useInsightsRetention();
|
|
50
62
|
const [draftQuery, setDraftQuery] = useState(search.query ?? "");
|
|
51
63
|
const [initialEventsBefore] = useState(freshBefore);
|
|
52
64
|
const [initialHistoryBefore] = useState(freshBefore);
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
65
|
+
const pagination = useLocation({
|
|
66
|
+
select: (location) => location.state.insightsPagination,
|
|
67
|
+
});
|
|
68
|
+
const eventsBack = pagination?.eventsBack ?? [];
|
|
69
|
+
const searchBack = pagination?.searchBack ?? [];
|
|
70
|
+
const historyBack = pagination?.historyBack ?? [];
|
|
56
71
|
const query = search.query?.trim() ?? "";
|
|
57
72
|
const hasSearchQuery = query.length > 0;
|
|
58
73
|
const hasSelection = search.installId !== undefined;
|
|
59
74
|
const hasLookup = hasSearchQuery || hasSelection;
|
|
60
75
|
const eventsBefore = search.eventsBefore ?? initialEventsBefore;
|
|
76
|
+
const eventsRange = search.eventsRange ?? DEFAULT_EVENT_RANGE;
|
|
61
77
|
const historyBefore = search.historyBefore ?? initialHistoryBefore;
|
|
62
78
|
|
|
63
|
-
const updateSearch = (
|
|
79
|
+
const updateSearch = (
|
|
80
|
+
next: Partial<typeof search>,
|
|
81
|
+
replace = false,
|
|
82
|
+
nextPagination: InsightsPaginationState = {},
|
|
83
|
+
) => {
|
|
64
84
|
void navigate({
|
|
65
85
|
to: "/installations",
|
|
66
86
|
search: { ...search, ...next },
|
|
87
|
+
state: (previous) => ({
|
|
88
|
+
...previous,
|
|
89
|
+
insightsPagination: {
|
|
90
|
+
...previous.insightsPagination,
|
|
91
|
+
...nextPagination,
|
|
92
|
+
},
|
|
93
|
+
}),
|
|
67
94
|
replace,
|
|
68
95
|
});
|
|
69
96
|
};
|
|
@@ -86,9 +113,9 @@ function InstallationsPage() {
|
|
|
86
113
|
|
|
87
114
|
const events = useInsightsEventsQuery(
|
|
88
115
|
{
|
|
89
|
-
|
|
116
|
+
...eventRangeBounds(eventsRange, eventsBefore),
|
|
90
117
|
cursor: search.eventsCursor,
|
|
91
|
-
limit:
|
|
118
|
+
limit: 20,
|
|
92
119
|
},
|
|
93
120
|
!hasLookup,
|
|
94
121
|
);
|
|
@@ -104,7 +131,6 @@ function InstallationsPage() {
|
|
|
104
131
|
useEffect(() => {
|
|
105
132
|
const firstInstallId = matches.data?.data[0]?.installId;
|
|
106
133
|
if (!hasSearchQuery || hasSelection || firstInstallId === undefined) return;
|
|
107
|
-
setHistoryBack([]);
|
|
108
134
|
updateSearch(
|
|
109
135
|
{
|
|
110
136
|
historyBefore: freshBefore(),
|
|
@@ -112,6 +138,7 @@ function InstallationsPage() {
|
|
|
112
138
|
installId: firstInstallId,
|
|
113
139
|
},
|
|
114
140
|
true,
|
|
141
|
+
{ historyBack: [] },
|
|
115
142
|
);
|
|
116
143
|
}, [hasSearchQuery, hasSelection, matches.data?.data]);
|
|
117
144
|
|
|
@@ -141,7 +168,7 @@ function InstallationsPage() {
|
|
|
141
168
|
const scrollRef = useRef<HTMLDivElement>(null);
|
|
142
169
|
const scrollEntry = useElementScrollRestoration({
|
|
143
170
|
id: scrollRestorationId,
|
|
144
|
-
getKey:
|
|
171
|
+
getKey: installationsScrollRestorationKey,
|
|
145
172
|
});
|
|
146
173
|
useLayoutEffect(() => {
|
|
147
174
|
if (!hasLookup && !events.isLoading && scrollRef.current) {
|
|
@@ -151,15 +178,17 @@ function InstallationsPage() {
|
|
|
151
178
|
|
|
152
179
|
const clearLookup = () => {
|
|
153
180
|
setDraftQuery("");
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
181
|
+
updateSearch(
|
|
182
|
+
{
|
|
183
|
+
historyBefore: undefined,
|
|
184
|
+
historyCursor: undefined,
|
|
185
|
+
installId: undefined,
|
|
186
|
+
query: undefined,
|
|
187
|
+
searchCursor: undefined,
|
|
188
|
+
},
|
|
189
|
+
false,
|
|
190
|
+
{ historyBack: [], searchBack: [] },
|
|
191
|
+
);
|
|
163
192
|
};
|
|
164
193
|
const installationLookup = (
|
|
165
194
|
<InstallationSearchPanel
|
|
@@ -172,15 +201,17 @@ function InstallationsPage() {
|
|
|
172
201
|
clearLookup();
|
|
173
202
|
return;
|
|
174
203
|
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
204
|
+
updateSearch(
|
|
205
|
+
{
|
|
206
|
+
historyBefore: undefined,
|
|
207
|
+
historyCursor: undefined,
|
|
208
|
+
installId: undefined,
|
|
209
|
+
query: nextQuery,
|
|
210
|
+
searchCursor: undefined,
|
|
211
|
+
},
|
|
212
|
+
false,
|
|
213
|
+
{ historyBack: [], searchBack: [] },
|
|
214
|
+
);
|
|
184
215
|
}}
|
|
185
216
|
/>
|
|
186
217
|
);
|
|
@@ -213,45 +244,60 @@ function InstallationsPage() {
|
|
|
213
244
|
) : null}
|
|
214
245
|
{!hasLookup ? (
|
|
215
246
|
<EventHistoryCard
|
|
247
|
+
description={`Downloads, applies, recoveries, and update failures, newest first, kept for ${formatDays(retention.rawDays)}. A launch without an update counts in App usage and in its installation's latest report.`}
|
|
216
248
|
error={events.error}
|
|
217
249
|
eventsLocation={{
|
|
218
250
|
eventsBefore,
|
|
219
251
|
eventsCursor: search.eventsCursor,
|
|
252
|
+
eventsRange: search.eventsRange,
|
|
220
253
|
}}
|
|
221
254
|
history={events.data}
|
|
222
255
|
isFetching={events.isFetching}
|
|
223
256
|
isLoading={events.isLoading}
|
|
224
257
|
onNext={() => {
|
|
225
258
|
if (!events.data?.nextCursor) return;
|
|
226
|
-
setEventsBack(pushCursor(eventsBack, search.eventsCursor));
|
|
227
259
|
updateSearch(
|
|
228
260
|
{
|
|
229
261
|
eventsCursor: events.data.nextCursor,
|
|
230
262
|
},
|
|
231
263
|
true,
|
|
264
|
+
{ eventsBack: pushCursor(eventsBack, search.eventsCursor) },
|
|
232
265
|
);
|
|
233
266
|
}}
|
|
234
267
|
onPrevious={() => {
|
|
235
268
|
const previous = popCursor(eventsBack);
|
|
236
|
-
setEventsBack(previous.stack);
|
|
237
269
|
updateSearch(
|
|
238
270
|
{
|
|
239
271
|
eventsCursor: previous.cursor,
|
|
240
272
|
},
|
|
241
273
|
true,
|
|
274
|
+
{ eventsBack: previous.stack },
|
|
275
|
+
);
|
|
276
|
+
}}
|
|
277
|
+
onRangeChange={(range) => {
|
|
278
|
+
updateSearch(
|
|
279
|
+
{
|
|
280
|
+
eventsBefore: freshBefore(),
|
|
281
|
+
eventsCursor: undefined,
|
|
282
|
+
eventsRange: range,
|
|
283
|
+
},
|
|
284
|
+
false,
|
|
285
|
+
{ eventsBack: [] },
|
|
242
286
|
);
|
|
243
287
|
}}
|
|
244
288
|
onRefresh={() => {
|
|
245
|
-
setEventsBack([]);
|
|
246
289
|
updateSearch(
|
|
247
290
|
{
|
|
248
291
|
eventsBefore: freshBefore(),
|
|
249
292
|
eventsCursor: undefined,
|
|
250
293
|
},
|
|
251
294
|
true,
|
|
295
|
+
{ eventsBack: [] },
|
|
252
296
|
);
|
|
253
297
|
}}
|
|
254
298
|
pageNumber={eventsBack.length + 1}
|
|
299
|
+
range={eventsRange}
|
|
300
|
+
rawDays={retention.rawDays}
|
|
255
301
|
>
|
|
256
302
|
{installationLookup}
|
|
257
303
|
</EventHistoryCard>
|
|
@@ -266,33 +312,38 @@ function InstallationsPage() {
|
|
|
266
312
|
error={matches.error}
|
|
267
313
|
onNext={() => {
|
|
268
314
|
if (!matches.data?.nextCursor) return;
|
|
269
|
-
setSearchBack(pushCursor(searchBack, search.searchCursor));
|
|
270
315
|
updateSearch(
|
|
271
316
|
{
|
|
272
317
|
installId: undefined,
|
|
273
318
|
searchCursor: matches.data.nextCursor,
|
|
274
319
|
},
|
|
275
320
|
true,
|
|
321
|
+
{
|
|
322
|
+
searchBack: pushCursor(searchBack, search.searchCursor),
|
|
323
|
+
},
|
|
276
324
|
);
|
|
277
325
|
}}
|
|
278
326
|
onPrevious={() => {
|
|
279
327
|
const previous = popCursor(searchBack);
|
|
280
|
-
setSearchBack(previous.stack);
|
|
281
328
|
updateSearch(
|
|
282
329
|
{
|
|
283
330
|
installId: undefined,
|
|
284
331
|
searchCursor: previous.cursor,
|
|
285
332
|
},
|
|
286
333
|
true,
|
|
334
|
+
{ searchBack: previous.stack },
|
|
287
335
|
);
|
|
288
336
|
}}
|
|
289
337
|
onSelect={(installId) => {
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
338
|
+
updateSearch(
|
|
339
|
+
{
|
|
340
|
+
historyBefore: freshBefore(),
|
|
341
|
+
historyCursor: undefined,
|
|
342
|
+
installId,
|
|
343
|
+
},
|
|
344
|
+
false,
|
|
345
|
+
{ historyBack: [] },
|
|
346
|
+
);
|
|
296
347
|
}}
|
|
297
348
|
pageNumber={searchBack.length + 1}
|
|
298
349
|
results={matches.data}
|
|
@@ -305,35 +356,41 @@ function InstallationsPage() {
|
|
|
305
356
|
isLoading={history.isLoading || selectedInstallation.isLoading}
|
|
306
357
|
onNext={() => {
|
|
307
358
|
if (!history.data?.nextCursor) return;
|
|
308
|
-
setHistoryBack(pushCursor(historyBack, search.historyCursor));
|
|
309
359
|
updateSearch(
|
|
310
360
|
{
|
|
311
361
|
historyCursor: history.data.nextCursor,
|
|
312
362
|
},
|
|
313
363
|
true,
|
|
364
|
+
{
|
|
365
|
+
historyBack: pushCursor(
|
|
366
|
+
historyBack,
|
|
367
|
+
search.historyCursor,
|
|
368
|
+
),
|
|
369
|
+
},
|
|
314
370
|
);
|
|
315
371
|
}}
|
|
316
372
|
onPrevious={() => {
|
|
317
373
|
const previous = popCursor(historyBack);
|
|
318
|
-
setHistoryBack(previous.stack);
|
|
319
374
|
updateSearch(
|
|
320
375
|
{
|
|
321
376
|
historyCursor: previous.cursor,
|
|
322
377
|
},
|
|
323
378
|
true,
|
|
379
|
+
{ historyBack: previous.stack },
|
|
324
380
|
);
|
|
325
381
|
}}
|
|
326
382
|
onRefresh={() => {
|
|
327
|
-
setHistoryBack([]);
|
|
328
383
|
updateSearch(
|
|
329
384
|
{
|
|
330
385
|
historyBefore: freshBefore(),
|
|
331
386
|
historyCursor: undefined,
|
|
332
387
|
},
|
|
333
388
|
true,
|
|
389
|
+
{ historyBack: [] },
|
|
334
390
|
);
|
|
335
391
|
}}
|
|
336
392
|
pageNumber={historyBack.length + 1}
|
|
393
|
+
retention={retention}
|
|
337
394
|
selectedEvent={selectedEvent}
|
|
338
395
|
selectedInstallId={search.installId}
|
|
339
396
|
/>
|
package/src/vite-internal.ts
CHANGED
|
@@ -70,7 +70,7 @@ const createConsoleModulesPlugin = (mode: ConsoleModuleMode): Plugin => {
|
|
|
70
70
|
);
|
|
71
71
|
configFile = resolveFromRoot(
|
|
72
72
|
root,
|
|
73
|
-
mode.options.config ?? "
|
|
73
|
+
mode.options.config ?? "console.config.ts",
|
|
74
74
|
);
|
|
75
75
|
|
|
76
76
|
writeFileIfChanged(
|
|
@@ -128,15 +128,27 @@ const createConsoleModulesPlugin = (mode: ConsoleModuleMode): Plugin => {
|
|
|
128
128
|
|
|
129
129
|
if (id === resolvedVirtualConfigModuleId) {
|
|
130
130
|
if (mode.type === "local") {
|
|
131
|
+
// hot-updater.config.ts's database, storage, and plugins, as the
|
|
132
|
+
// CLI loads them.
|
|
131
133
|
return [
|
|
132
134
|
'import { loadConfig } from "@hot-updater/cli-tools";',
|
|
133
135
|
"export default async () => {",
|
|
134
136
|
" const config = await loadConfig(null);",
|
|
137
|
+
" if (config.database === undefined) {",
|
|
138
|
+
" throw new Error(",
|
|
139
|
+
' "Set database in hot-updater.config.ts: the database your server runs on, such as d1Database(...), or standaloneRepository({ baseUrl }) to reach a self-hosted server through its admin API.",',
|
|
140
|
+
" );",
|
|
141
|
+
" }",
|
|
142
|
+
" if (config.storage === undefined) {",
|
|
143
|
+
" throw new Error(",
|
|
144
|
+
' "Set storage in hot-updater.config.ts: where your server stores bundles, which the console reads, such as r2Storage(...).",',
|
|
145
|
+
" );",
|
|
146
|
+
" }",
|
|
135
147
|
" return {",
|
|
136
|
-
" console: { gitUrl: config.console.gitUrl },",
|
|
137
148
|
" database: config.database,",
|
|
138
|
-
" signing: config.signing,",
|
|
139
149
|
" storage: config.storage,",
|
|
150
|
+
" plugins: config.plugins,",
|
|
151
|
+
" console: { gitUrl: config.console.gitUrl },",
|
|
140
152
|
" };",
|
|
141
153
|
"};",
|
|
142
154
|
].join("\n");
|
package/src/vite.ts
CHANGED
|
@@ -3,7 +3,9 @@ import type { PluginOption } from "vite";
|
|
|
3
3
|
import { createHostedConsolePlugins } from "./vite-internal";
|
|
4
4
|
|
|
5
5
|
export interface HotUpdaterConsolePluginOptions {
|
|
6
|
+
/** The console's auth module, `console.auth.ts` by default. */
|
|
6
7
|
readonly auth?: string;
|
|
8
|
+
/** The module whose default export is `defineConsoleConfig(...)`, `console.config.ts` by default. */
|
|
7
9
|
readonly config?: string;
|
|
8
10
|
}
|
|
9
11
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Gn as e,Zn as t,_ as n,g as r,xn as i,y as a}from"./createServerFn-CA8fs7QD.js";import{n as o}from"./dist-C_NydL0e.js";var s=e(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),c=e(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),l=t(),u=(e,t=12)=>e.length>t?`${e.slice(0,Math.max(1,t-4))}…${e.slice(-4)}`:e;function d({value:e,maxLength:t=12,className:s,buttonClassName:c}){let d=e.length>t,f=u(e,t),p=async()=>{try{await navigator.clipboard.writeText(e),o.success(`Copied to clipboard`,{description:e})}catch{o.error(`Failed to copy value`)}},m=e=>{e.preventDefault(),e.stopPropagation(),p()},h=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),e.stopPropagation(),p())},g=(0,l.jsx)(`span`,{translate:`no`,className:i(`font-mono text-xs tabular-nums whitespace-nowrap`,s),children:f});return(0,l.jsxs)(r,{children:[(0,l.jsx)(a,{render:(0,l.jsx)(`button`,{type:`button`,"aria-label":`Copy full value: ${e}`,translate:`no`,className:i(`ring-ring/30 bg-muted/40 border-border/70 inline-flex min-w-0 max-w-full cursor-pointer items-center rounded-md border px-1.5 py-0.5 align-top shadow-xs outline-none transition-[background-color,border-color,transform,box-shadow]`,`hover:bg-muted/70 active:scale-[0.98] active:bg-muted/85 focus-visible:ring-[2px]`,`touch-manipulation select-none motion-reduce:transition-none motion-reduce:active:scale-100`,!d&&`cursor-copy`,c),onClick:m,onKeyDown:h}),children:g}),(0,l.jsx)(n,{hidden:!d,children:(0,l.jsx)(`p`,{translate:`no`,className:`break-all font-mono text-xs tabular-nums`,children:e})})]})}export{s as i,u as n,c as r,d as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Dr as e,Gn as t,Jn as n,Wn as r,Zn as i,_r as a,bn as o,gn as s,kr as c,m as l,t as u,yn as d}from"./createServerFn-CA8fs7QD.js";import{t as f}from"./link-CI8idAUi.js";import{t as p}from"./chart-no-axes-combined-Dy4WJv2U.js";import{a as m,i as h,n as g,o as _,p as v,r as y,t as b}from"./table-2vcV89QB.js";import{i as ee,r as te,t as x}from"./HashValueDisplay-CB0Eskit.js";import{t as S}from"./refresh-cw-Bqc72UZG.js";import{a as C,c as w,d as T,n as E,o as D,s as ne,t as re,u as ie}from"./card-Dhr_eFYj.js";var ae=t(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),O=t(`arrow-up-right`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),k=t(`package-check`,[[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`path`,{d:`m16 17 2 2 4-4`,key:`uh5qu3`}],[`path`,{d:`M21 11.127V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.729l7 4a2 2 0 0 0 2 .001l1.32-.753`,key:`kpkbpo`}],[`path`,{d:`M3.29 7 12 12l8.71-5`,key:`19ckod`}],[`path`,{d:`m7.5 4.27 8.997 5.148`,key:`9yrvtv`}]]),A=u({method:`GET`}).handler(a(`ff00311d412c8cdfa8ad5b0ba1eb6aa7471d0cc12170e6cc645deb91603d42dd`)),j=u({method:`GET`}).handler(a(`d4c50f40701055145f24873dc90f3c55a5494457a6a03a743339b2ac4545eb19`)),M=u({method:`GET`}).handler(a(`3c04bc6624be6dfdd80cf96819f9c6d0455e59a7bb4c0374b6afb0162ffd15b0`)),N=u({method:`GET`}).handler(a(`6726f1ed9eda1f0cb4c1f1ad1023faee435ddcfd0b7c55ef08ca7f2f7f577370`)),P=u({method:`GET`}).handler(a(`735c501f6d5ea81a445ff2b6b2ea6a1b589e3c6f63a465a881822c80ae71e7d1`)),F=3e4,I={reportingInstallations:e=>[`insights`,`reporting-installations`,e],events:e=>[`insights`,`events`,e],installations:e=>[`insights`,`installations`,e],installation:e=>[`insights`,`installation`,e],installationEvents:e=>[`insights`,`installation-events`,e]},L=e=>n({queryKey:I.reportingInstallations(e),queryFn:()=>A({data:e}),refetchOnWindowFocus:!0,staleTime:F}),R=(e,t)=>n({queryKey:I.events(e),queryFn:()=>j({data:e}),enabled:t,refetchOnWindowFocus:!0,staleTime:F}),z=(e,t)=>n({queryKey:I.installations(e),queryFn:()=>P({data:e}),enabled:t&&e.identity.length>0,staleTime:F}),B=(e,t)=>n({queryKey:I.installation(e),queryFn:()=>N({data:{installId:e}}),enabled:t&&e.length>0,staleTime:F}),V=(e,t)=>n({queryKey:I.installationEvents(e),queryFn:()=>M({data:e}),enabled:t&&e.installId.length>0,refetchOnWindowFocus:!0,staleTime:F}),H=c(e(),1),U=i(),W={UPDATE_APPLIED:{label:`Bundle applied`,variant:`success`,icon:v},RECOVERED:{label:`Recovered`,variant:`warning`,icon:te},RELEASE_ADOPTED:{label:`Bundle adopted`,variant:`success`,icon:k},UNCHANGED:{label:`Activity reported`,variant:`secondary`,icon:ae}};function G(){let[e,t]=(0,H.useState)(`UTC`);return(0,H.useEffect)(()=>{t(Intl.DateTimeFormat().resolvedOptions().timeZone)},[]),new Intl.DateTimeFormat(`en`,{timeZone:e,timeZoneName:`shortOffset`,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hourCycle:`h23`})}function K(e,t){let n=Object.fromEntries(t.formatToParts(new Date(e)).map(({type:e,value:t})=>[e,t])),r=n.timeZoneName===`GMT`?`GMT+0`:n.timeZoneName;return`${n.year}/${n.month}/${n.day} ${n.hour}:${n.minute}:${n.second} ${r}`}function q({value:e,formatter:t,touch:n=!1}){let r=new Date(e),i=K(e,t);return(0,U.jsxs)(`details`,{className:`group/time`,children:[(0,U.jsx)(`summary`,{className:`cursor-pointer list-none rounded-md outline-none focus-visible:ring-2 focus-visible:ring-ring/30 [&::-webkit-details-marker]:hidden ${n?`flex min-h-11 items-center`:``}`,children:(0,U.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,U.jsx)(`time`,{dateTime:r.toISOString(),className:`whitespace-nowrap`,children:i}),(0,U.jsx)(ee,{"aria-hidden":`true`,className:`size-3 text-muted-foreground group-open/time:rotate-180`})]})}),(0,U.jsx)(`p`,{className:`mt-2 text-muted-foreground`,children:r.toISOString().replace(`T`,` `).replace(`Z`,` UTC`)})]})}function J({type:e}){let t=W[e],n=t.icon;return(0,U.jsxs)(ne,{variant:t.variant,className:`gap-1 whitespace-nowrap [&_svg]:size-3`,title:e===`UNCHANGED`?`App activity reported on the current bundle without a bundle transition.`:e===`RELEASE_ADOPTED`?`A different release was adopted without changing the bundle.`:void 0,children:[(0,U.jsx)(n,{"aria-hidden":`true`}),t.label]})}function Y({event:e,touch:t=!1}){return(0,U.jsxs)(`dl`,{className:`grid grid-cols-[auto_minmax(0,1fr)] items-center gap-x-2 gap-y-2`,children:[e.fromBundleId?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`dt`,{className:`text-muted-foreground`,children:`From`}),(0,U.jsx)(`dd`,{children:(0,U.jsx)(x,{value:e.fromBundleId,buttonClassName:t?`min-h-11 px-3`:void 0})})]}):null,(0,U.jsx)(`dt`,{className:`text-muted-foreground`,children:e.type===`UNCHANGED`?`Current`:`To`}),(0,U.jsx)(`dd`,{children:(0,U.jsx)(x,{value:e.toBundleId,buttonClassName:t?`min-h-11 px-3`:void 0})})]})}function X({events:e,formatter:t,renderIdentity:n}){return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`p`,{className:`px-4 pb-2 text-xs text-muted-foreground sm:px-6`,children:`Time in your browser zone`}),(0,U.jsx)(`ol`,{"aria-label":`Events`,className:`divide-y border-y`,children:e.map(e=>(0,U.jsxs)(`li`,{className:`flex min-w-0 flex-col gap-3 px-4 py-4 sm:px-6`,children:[(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-x-4 gap-y-1`,children:[(0,U.jsx)(J,{type:e.type}),(0,U.jsx)(`div`,{className:`text-xs tabular-nums`,children:(0,U.jsx)(q,{value:e.receivedAtMs,formatter:t,touch:!0})})]}),n?.(e),(0,U.jsxs)(`dl`,{className:`flex flex-wrap gap-x-2 gap-y-1 text-sm`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`dt`,{className:`sr-only`,children:`App`}),(0,U.jsxs)(`dd`,{children:[e.platform===`ios`?`iOS`:`Android`,` `,e.appVersion]})]}),(0,U.jsxs)(`div`,{className:`min-w-0 text-muted-foreground`,children:[(0,U.jsx)(`dt`,{className:`sr-only`,children:`Channel`}),(0,U.jsx)(`dd`,{className:`wrap-anywhere`,children:e.channel})]})]}),(0,U.jsx)(`div`,{className:`text-xs`,"aria-label":`Bundle`,children:(0,U.jsx)(Y,{event:e,touch:!0})})]},e.id))})]})}function Z({fallbackTitle:e}){return(0,U.jsxs)(w,{variant:`destructive`,children:[(0,U.jsx)(r,{"aria-hidden":`true`}),(0,U.jsx)(T,{children:e}),(0,U.jsx)(ie,{children:`Refresh to try again. If this keeps happening, check your Insights provider connection.`})]})}function Q({hasPrevious:e,label:t,nextCursor:n,onNext:r,onPrevious:i,pageLength:a,pageNumber:o}){return(0,U.jsxs)(`nav`,{"aria-label":`${t} pagination`,className:`flex flex-wrap items-center justify-between gap-3 border-t px-4 py-3 sm:px-6`,children:[(0,U.jsxs)(`span`,{className:`text-xs text-muted-foreground tabular-nums`,children:[`Page `,o,` · `,a.toLocaleString(),` rows`]}),(0,U.jsxs)(`div`,{className:`flex gap-2`,children:[(0,U.jsx)(d,{className:`h-11 min-w-11 px-3 lg:h-8 lg:min-w-0 lg:px-2`,disabled:!e,onClick:i,size:`sm`,type:`button`,variant:`outline`,children:`Previous`}),(0,U.jsx)(d,{className:`h-11 min-w-11 px-3 lg:h-8 lg:min-w-0 lg:px-2`,disabled:n===null,onClick:r,size:`sm`,type:`button`,variant:`outline`,children:`Next`})]})]})}function $({event:e,eventsLocation:t,touch:n=!1}){return(0,U.jsxs)(`div`,{className:n?`flex min-w-0 flex-wrap items-center justify-between gap-2`:`flex min-w-0 flex-col items-start gap-2`,children:[(0,U.jsxs)(f,{className:o({className:n?`-ml-2 h-auto min-h-11 min-w-0 flex-1 justify-start gap-2 whitespace-normal text-sm`:`-ml-2 max-w-full justify-start`,size:`sm`,variant:`ghost`}),to:`/installations`,search:{...t,query:e.installId||void 0,installId:e.installId},"aria-label":`View history for ${e.userId??e.username??`anonymous installation`} (${e.installId})`,children:[(0,U.jsx)(`span`,{className:n?`min-w-0 text-left wrap-anywhere`:`truncate`,children:e.userId??e.username??`Anonymous installation`}),(0,U.jsx)(O,{"aria-hidden":`true`,"data-icon":`inline-end`})]}),(0,U.jsx)(x,{value:e.installId,maxLength:13,buttonClassName:n?`min-h-11 px-3`:void 0})]})}function oe({children:e,error:t,eventsLocation:n,history:r,isFetching:i,isLoading:a,onNext:o,onPrevious:c,onRefresh:l,pageNumber:u,title:f=`All events`}){let p=G(),v=u>1;return(0,U.jsxs)(re,{className:`@container min-w-0 shadow-sm`,"aria-busy":i,children:[(0,U.jsxs)(C,{className:`gap-4 p-4 sm:p-6`,children:[(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,U.jsx)(D,{children:(0,U.jsx)(`h2`,{children:f})}),(0,U.jsxs)(d,{className:`h-11 lg:h-8`,disabled:i,onClick:l,size:`lg`,variant:`outline`,children:[(0,U.jsx)(S,{"aria-hidden":`true`,"data-icon":`inline-start`}),`Refresh`]})]}),e]}),(0,U.jsx)(E,{className:`min-w-0 p-0`,children:a?(0,U.jsxs)(`div`,{className:`flex flex-col gap-4 p-6`,role:`status`,"aria-label":`Loading events`,children:[(0,U.jsx)(s,{className:`h-12 w-full`}),(0,U.jsx)(s,{className:`h-12 w-full`}),(0,U.jsx)(s,{className:`h-12 w-full`})]}):t?(0,U.jsx)(`div`,{className:`px-6 pb-6`,children:(0,U.jsx)(Z,{error:t,fallbackTitle:`Event history unavailable`})}):r?(0,U.jsxs)(U.Fragment,{children:[r.data.length>0?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`div`,{className:`@[58rem]:hidden`,children:(0,U.jsx)(X,{events:r.data,formatter:p,renderIdentity:e=>(0,U.jsx)($,{event:e,eventsLocation:n,touch:!0})})}),(0,U.jsx)(`div`,{className:`hidden @[58rem]:block`,children:(0,U.jsxs)(b,{className:`min-w-4xl table-fixed`,children:[(0,U.jsx)(m,{children:(0,U.jsxs)(_,{className:`[&>th]:px-4 sm:[&>th]:px-6`,children:[(0,U.jsx)(h,{className:`w-64`,children:`Time`}),(0,U.jsx)(h,{className:`w-48`,children:`Event`}),(0,U.jsx)(h,{className:`w-48`,children:`User / installation`}),(0,U.jsx)(h,{className:`w-32`,children:`App`}),(0,U.jsx)(h,{className:`w-52`,children:`Bundle`})]})}),(0,U.jsx)(g,{children:r.data.map(e=>(0,U.jsxs)(_,{className:`[&>td]:px-4 [&>td]:py-4 [&>td]:align-top sm:[&>td]:px-6`,children:[(0,U.jsx)(y,{className:`whitespace-normal text-xs tabular-nums`,children:(0,U.jsx)(q,{value:e.receivedAtMs,formatter:p})}),(0,U.jsx)(y,{children:(0,U.jsx)(J,{type:e.type})}),(0,U.jsx)(y,{children:(0,U.jsx)($,{event:e,eventsLocation:n})}),(0,U.jsx)(y,{className:`whitespace-normal text-xs`,children:(0,U.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,U.jsxs)(`span`,{children:[e.platform===`ios`?`iOS`:`Android`,` `,e.appVersion]}),(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:e.channel})]})}),(0,U.jsx)(y,{className:`whitespace-normal text-xs`,children:(0,U.jsx)(Y,{event:e})})]},e.id))})]})})]}):(0,U.jsx)(`div`,{className:`px-6 pb-6 text-sm text-muted-foreground`,children:v||r.nextCursor?`No events on this page`:f===`All events`?`No events recorded yet`:`No matching reports in this period`}),r.data.length>0||v||r.nextCursor?(0,U.jsx)(Q,{hasPrevious:v,label:f,nextCursor:r.nextCursor,onNext:o,onPrevious:c,pageLength:r.data.length,pageNumber:u}):null]}):null})]})}function se({view:e}){return(0,U.jsxs)(`header`,{className:`sticky top-0 z-10 flex shrink-0 flex-wrap items-center gap-3 border-b bg-background px-3 py-3 sm:bg-card/70 sm:px-4 sm:backdrop-blur-sm`,children:[(0,U.jsx)(l,{className:`-ml-1 size-11 lg:size-7`}),(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,U.jsx)(p,{"aria-hidden":`true`,className:`size-3.5 text-muted-foreground`}),(0,U.jsx)(`h1`,{className:`text-sm font-medium`,children:`Insights`})]}),(0,U.jsxs)(`nav`,{"aria-label":`Insights views`,className:`ml-auto flex gap-1`,children:[(0,U.jsx)(f,{"aria-current":e===`overview`?`page`:void 0,className:o({className:`h-11 px-3 lg:h-8 lg:px-2.5`,size:`lg`,variant:e===`overview`?`secondary`:`ghost`}),to:`/insights`,children:`Overview`}),(0,U.jsx)(f,{"aria-current":e===`events`?`page`:void 0,className:o({className:`h-11 px-3 lg:h-8 lg:px-2.5`,size:`lg`,variant:e===`events`?`secondary`:`ghost`}),to:`/installations`,children:`Events`})]})]})}export{X as a,J as c,V as d,B as f,O as h,Z as i,G as l,L as m,oe as n,Y as o,z as p,Q as r,q as s,se as t,R as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Dr as e,Gn as t,Wn as n,Zn as r,gn as i,kr as a,m as o,vn as s,yn as c}from"./createServerFn-CA8fs7QD.js";import{t as l}from"./loader-circle-BoxLrsOu.js";import{a as u,c as ee,d,i as f,l as p,n as m,o as h,p as g,r as _,s as v,t as y,u as b}from"./table-2vcV89QB.js";import{a as te,i as ne,o as x,r as S}from"./api-keys-api-BHcODB7q.js";import{N as C,_ as w,a as T,d as E,f as D,g as O,h as k,i as A,l as j,m as M,n as N,o as P,p as F,r as I,t as re,u as L,v as R}from"./dialog-CUTrcPlB.js";import{t as z}from"./refresh-cw-Bqc72UZG.js";import{n as B}from"./dist-C_NydL0e.js";import{a as V,c as H,d as U,l as W,n as G,o as K,s as q,t as J,u as Y}from"./card-Dhr_eFYj.js";var X=t(`clipboard`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}]]),Z=t(`shield-off`,[[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71`,key:`1jlk70`}],[`path`,{d:`M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264`,key:`18rp1v`}]]),Q=a(e(),1),$=r(),ie=e=>new Date(e).toISOString().slice(0,10);function ae(){let[e,t]=(0,Q.useState)(!1),[n,r]=(0,Q.useState)(``),[i,a]=(0,Q.useState)(null),o=ne(),u=n.trim(),f=u.length>64?`Name must be 64 characters or fewer.`:null,m=()=>{r(``),a(null),o.reset()},h=e=>{t(e),e||m()};return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(c,{onClick:()=>t(!0),children:[(0,$.jsx)(C,{"data-icon":`inline-start`}),`Create API key`]}),(0,$.jsx)(re,{open:e,onOpenChange:h,children:(0,$.jsxs)(N,{showCloseButton:i===null,children:[(0,$.jsxs)(T,{children:[(0,$.jsx)(P,{children:i===null?`Create API key`:`Save your API key`}),(0,$.jsx)(I,{children:i===null?`Name the app or environment that will use this key.`:`This key is shown once. Store it securely before closing.`})]}),i===null?(0,$.jsxs)(`form`,{onSubmit:async e=>{if(e.preventDefault(),!(u.length===0||f!==null))try{a((await o.mutateAsync(u)).apiKey),B.success(`API key created`)}catch(e){B.error(e instanceof Error?e.message:`Unable to create API key`)}},children:[(0,$.jsx)(b,{children:(0,$.jsxs)(v,{"data-invalid":f!==null||void 0,children:[(0,$.jsx)(d,{htmlFor:`api-key-name`,children:`Name`}),(0,$.jsx)(s,{id:`api-key-name`,autoComplete:`off`,maxLength:65,onChange:e=>r(e.target.value),placeholder:`Production app`,value:n}),(0,$.jsx)(ee,{children:`Use a name you can identify before revoking the key.`}),(0,$.jsx)(p,{children:f})]})}),(0,$.jsx)(A,{className:`mt-4`,children:(0,$.jsxs)(c,{disabled:o.isPending||u.length===0||f!==null,type:`submit`,children:[o.isPending?(0,$.jsx)(l,{"data-icon":`inline-start`,className:`animate-spin`}):(0,$.jsx)(x,{"data-icon":`inline-start`}),`Create API key`]})})]}):(0,$.jsxs)(b,{children:[(0,$.jsxs)(v,{children:[(0,$.jsx)(d,{htmlFor:`created-api-key`,children:`API key`}),(0,$.jsxs)(`div`,{className:`flex gap-2`,children:[(0,$.jsx)(s,{id:`created-api-key`,className:`font-mono`,readOnly:!0,value:i}),(0,$.jsxs)(c,{onClick:async()=>{if(i!==null)try{await navigator.clipboard.writeText(i),B.success(`API key copied`)}catch{B.error(`Unable to copy API key`)}},type:`button`,variant:`outline`,children:[(0,$.jsx)(X,{"data-icon":`inline-start`}),`Copy`]})]})]}),(0,$.jsx)(A,{children:(0,$.jsxs)(c,{onClick:()=>h(!1),children:[(0,$.jsx)(g,{"data-icon":`inline-start`}),`Done`]})})]})]})})]})}function oe({record:e}){let[t,n]=(0,Q.useState)(!1),r=te(),i=async t=>{t.preventDefault();try{await r.mutateAsync(e.id),n(!1),B.success(`API key revoked`)}catch(e){B.error(e instanceof Error?e.message:`Unable to revoke API key`)}};return(0,$.jsxs)(j,{open:t,onOpenChange:e=>{r.isPending||n(e)},children:[(0,$.jsxs)(R,{render:(0,$.jsx)(c,{size:`sm`,variant:`ghost`}),children:[(0,$.jsx)(Z,{"data-icon":`inline-start`}),`Revoke`]}),(0,$.jsxs)(D,{children:[(0,$.jsxs)(k,{children:[(0,$.jsx)(O,{children:(0,$.jsx)(Z,{})}),(0,$.jsxs)(w,{children:[`Revoke `,e.name,`?`]}),(0,$.jsxs)(F,{children:[`Apps using `,e.prefix,`… will immediately lose OTA update and insights access. This action cannot be undone.`]})]}),(0,$.jsxs)(M,{children:[(0,$.jsx)(E,{disabled:r.isPending,children:`Cancel`}),(0,$.jsx)(L,{disabled:r.isPending,onClick:e=>void i(e),variant:`destructive`,children:`Revoke API key`})]})]})]})}function se(){let e=S();return(0,$.jsxs)(J,{className:`overflow-hidden shadow-sm`,children:[(0,$.jsxs)(V,{className:`flex-row items-center justify-between space-y-0 border-b px-4 py-3`,children:[(0,$.jsx)(K,{className:`text-sm`,children:(0,$.jsx)(`h2`,{children:`API keys`})}),(0,$.jsx)(ae,{})]}),(0,$.jsx)(G,{className:`p-0`,children:e.isError?(0,$.jsx)(`div`,{className:`p-4`,children:(0,$.jsxs)(H,{variant:`destructive`,children:[(0,$.jsx)(n,{}),(0,$.jsx)(U,{children:`API keys couldn't be loaded`}),(0,$.jsx)(Y,{children:`Check your connection and try again.`}),(0,$.jsx)(W,{children:(0,$.jsxs)(c,{onClick:()=>void e.refetch(),size:`xs`,variant:`outline`,children:[(0,$.jsx)(z,{"data-icon":`inline-start`}),`Retry`]})})]})}):(0,$.jsxs)(y,{"aria-label":`API keys`,className:`table-fixed`,children:[(0,$.jsx)(u,{children:(0,$.jsxs)(h,{children:[(0,$.jsx)(f,{children:`Key`}),(0,$.jsx)(f,{className:`w-32`,children:`Created`}),(0,$.jsx)(f,{className:`w-24 text-right`,children:(0,$.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,$.jsx)(m,{children:e.isLoading?Array.from({length:3},(e,t)=>(0,$.jsxs)(h,{children:[(0,$.jsxs)(_,{className:`space-y-2 py-3`,children:[t===0?(0,$.jsx)(`span`,{className:`sr-only`,children:`Loading API keys`}):null,(0,$.jsx)(i,{className:`h-3.5 w-32`}),(0,$.jsx)(i,{className:`h-3 w-20`})]}),(0,$.jsx)(_,{children:(0,$.jsx)(i,{className:`h-3.5 w-20`})}),(0,$.jsx)(_,{children:(0,$.jsx)(i,{className:`ml-auto h-6 w-16`})})]},t)):e.data?.length===0?(0,$.jsx)(h,{children:(0,$.jsx)(_,{colSpan:3,className:`h-40 text-center text-muted-foreground`,children:(0,$.jsxs)(`div`,{className:`mx-auto flex max-w-xs flex-col items-center gap-2`,children:[(0,$.jsx)(x,{className:`size-5`}),(0,$.jsx)(`p`,{className:`font-medium text-foreground`,children:`No API keys`}),(0,$.jsx)(`p`,{children:`Create an API key to connect an app.`})]})})}):e.data?.map(e=>(0,$.jsxs)(h,{className:e.revoked_at_ms===null?void 0:`text-muted-foreground`,children:[(0,$.jsx)(_,{className:`whitespace-normal py-3`,children:(0,$.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,$.jsx)(`p`,{className:`break-words font-medium text-foreground`,children:e.name}),(0,$.jsxs)(`p`,{className:`font-mono text-xs text-muted-foreground`,children:[e.prefix,`…`]})]})}),(0,$.jsx)(_,{className:`text-xs text-muted-foreground`,children:(0,$.jsx)(`time`,{dateTime:new Date(e.created_at_ms).toISOString(),children:ie(e.created_at_ms)})}),(0,$.jsx)(_,{className:`text-right`,children:e.revoked_at_ms===null?(0,$.jsx)(oe,{record:e}):(0,$.jsx)(q,{variant:`outline`,children:`Revoked`})})]},e.id))})]})})]})}function ce(){return(0,$.jsxs)(`div`,{className:`flex h-svh min-h-0 flex-col`,children:[(0,$.jsxs)(`header`,{className:`sticky top-0 z-10 flex shrink-0 flex-wrap items-center gap-x-3 gap-y-1 border-b bg-background px-3 py-3 sm:min-h-12 sm:flex-nowrap sm:bg-card/70 sm:px-4 sm:backdrop-blur-sm`,children:[(0,$.jsx)(o,{className:`-ml-1`}),(0,$.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,$.jsx)(x,{"aria-hidden":`true`,className:`size-3.5 text-muted-foreground`}),(0,$.jsx)(`h1`,{className:`text-sm font-medium`,children:`API keys`})]}),(0,$.jsx)(`p`,{className:`basis-full pl-9 text-xs text-muted-foreground sm:basis-auto sm:pl-0`,children:`API keys can download OTA updates and submit insights only.`})]}),(0,$.jsx)(`div`,{className:`min-h-0 min-w-0 flex-1 overflow-y-auto bg-muted/5 p-3 sm:p-6`,children:(0,$.jsx)(`div`,{className:`mx-auto w-full max-w-5xl`,children:(0,$.jsx)(se,{})})})]})}export{ce as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Gn as e,Jn as t,Xn as n,_r as r,br as i,t as a}from"./createServerFn-CA8fs7QD.js";import{n as o}from"./loader-circle-BoxLrsOu.js";var s=e(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),c=a({method:`GET`}).handler(r(`29665ce3a33cde2eb2ee082694288db269438f62f3a4d0a005dec3256e0f15c1`)),l=a({method:`GET`}).handler(r(`2c7f3cdb9bd3cab2c026a48abdc84c362db0362924a08679052a325640aec56b`)),u=a({method:`POST`}).handler(r(`68a2d94ee016be64936401f5eba60ab08a47ff373e1cf9de48e4413336e6034b`)),d=a({method:`POST`}).handler(r(`a1cb80b19ca72a64fb631ca28ebb9b6941db245983de082d5dd3203ec2eef795`)),f={capability:[`api-keys`,`capability`],list:[`api-keys`,`list`]},p=()=>({queryKey:f.capability,queryFn:()=>c(),staleTime:1/0}),m=()=>t(p()),h=async e=>{if(!(await e.ensureQueryData(p())).apiKeys)throw i({to:`/`,search:{},replace:!0})},g=()=>t({queryKey:f.list,queryFn:()=>l()}),_=()=>{let e=n();return o({mutationFn:e=>u({data:{name:e}}),onSuccess:async()=>{await e.invalidateQueries({queryKey:f.list})}})},v=()=>{let e=n();return o({mutationFn:e=>d({data:{id:e}}),onSuccess:async()=>{await e.invalidateQueries({queryKey:f.list})}})};export{v as a,_ as i,m as n,s as o,g as r,h as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Dr as e,Nn as t,Pn as n,Un as r,Zn as i,xn as a}from"./createServerFn-CA8fs7QD.js";e();var o=i(),s=t(`group/alert relative grid w-full gap-0.5 rounded-lg border px-2 py-1.5 text-left text-xs/relaxed has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-1.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-3.5`,{variants:{variant:{default:`bg-card text-card-foreground`,destructive:`bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current`}},defaultVariants:{variant:`default`}});function c({className:e,variant:t,...n}){return(0,o.jsx)(`div`,{"data-slot":`alert`,role:`alert`,className:a(s({variant:t}),e),...n})}function l({className:e,...t}){return(0,o.jsx)(`div`,{"data-slot":`alert-title`,className:a(`font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground`,e),...t})}function u({className:e,...t}){return(0,o.jsx)(`div`,{"data-slot":`alert-description`,className:a(`text-xs/relaxed text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4`,e),...t})}function d({className:e,...t}){return(0,o.jsx)(`div`,{"data-slot":`alert-action`,className:a(`absolute top-1.5 right-2`,e),...t})}var f=t(`inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2`,{variants:{variant:{default:`border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80`,secondary:`border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80`,success:`border-success/20 bg-success/10 text-success`,warning:`border-warning/20 bg-warning/10 text-warning`,destructive:`border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80`,outline:`text-foreground`}},defaultVariants:{variant:`default`}});function p({className:e,variant:t=`default`,render:i,...o}){return n({defaultTagName:`span`,props:r({className:a(f({variant:t}),e)},o),render:i,state:{slot:`badge`,variant:t}})}function m({className:e,...t}){return(0,o.jsx)(`div`,{"data-slot":`card`,className:a(`rounded-xl border bg-card text-card-foreground shadow`,e),...t})}function h({className:e,...t}){return(0,o.jsx)(`div`,{"data-slot":`card-header`,className:a(`flex flex-col space-y-1.5 p-6`,e),...t})}function g({className:e,...t}){return(0,o.jsx)(`div`,{"data-slot":`card-title`,className:a(`font-semibold leading-none tracking-tight`,e),...t})}function _({className:e,...t}){return(0,o.jsx)(`div`,{"data-slot":`card-description`,className:a(`text-sm text-muted-foreground`,e),...t})}function v({className:e,...t}){return(0,o.jsx)(`div`,{"data-slot":`card-content`,className:a(`p-6 pt-0`,e),...t})}function y({className:e,...t}){return(0,o.jsx)(`div`,{"data-slot":`card-footer`,className:a(`flex items-center p-6 pt-0`,e),...t})}export{h as a,c,l as d,y as i,d as l,v as n,g as o,_ as r,p as s,m as t,u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Gn as e}from"./createServerFn-CA8fs7QD.js";var t=e(`chart-no-axes-combined`,[[`path`,{d:`M12 16v5`,key:`zza2cw`}],[`path`,{d:`M16 14v7`,key:`1g90b9`}],[`path`,{d:`M20 10v11`,key:`1iqoj0`}],[`path`,{d:`m22 3-8.646 8.646a.5.5 0 0 1-.708 0L9.354 8.354a.5.5 0 0 0-.707 0L2 15`,key:`1fw8x9`}],[`path`,{d:`M4 18v3`,key:`1yp0dc`}],[`path`,{d:`M8 14v7`,key:`n3cwzv`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{An as e}from"./createServerFn-CA8fs7QD.js";var t=`ArrowUp`,n=`ArrowDown`,r=`ArrowLeft`,i=`ArrowRight`,a=`Home`,o=`PageUp`,s=`PageDown`,c=new Set([r,i]),l=new Set([r,i,a,`End`]),u=new Set([t,n]),d=new Set([t,n,a,`End`]),f=new Set([...c,...u]),p=new Set([...f,a,`End`]),m=new Set([`Shift`,`Control`,`Alt`,`Meta`]);function h(t){return e(t)&&t.tagName===`INPUT`}function g(t){return!!(h(t)&&t.selectionStart!=null||e(t)&&t.tagName===`TEXTAREA`)}function _(e,t,n,r){if(!e||!t||!t.scrollTo)return;let i=e.scrollLeft,a=e.scrollTop,o=e.clientWidth<e.scrollWidth,s=e.clientHeight<e.scrollHeight;if(o&&r!==`vertical`){let r=v(e,t,`left`),a=y(e),o=y(t);n===`ltr`&&(r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight?i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight:r-o.scrollMarginLeft<e.scrollLeft+a.scrollPaddingLeft&&(i=r-o.scrollMarginLeft-a.scrollPaddingLeft)),n===`rtl`&&(r-o.scrollMarginRight<e.scrollLeft+a.scrollPaddingLeft?i=r-o.scrollMarginLeft-a.scrollPaddingLeft:r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight&&(i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight))}if(s&&r!==`horizontal`){let n=v(e,t,`top`),r=y(e),i=y(t);n-i.scrollMarginTop<e.scrollTop+r.scrollPaddingTop?a=n-i.scrollMarginTop-r.scrollPaddingTop:n+t.offsetHeight+i.scrollMarginBottom>e.scrollTop+e.clientHeight-r.scrollPaddingBottom&&(a=n+t.offsetHeight+i.scrollMarginBottom-e.clientHeight+r.scrollPaddingBottom)}e.scrollTo({left:i,top:a,behavior:`auto`})}function v(e,t,n){let r=n===`left`?`offsetLeft`:`offsetTop`,i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);)t=t.offsetParent;return i}function y(e){let t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}export{t as a,c,s as d,o as f,_ as g,g as h,i,l,d as m,f as n,p as o,u as p,r,a as s,n as t,m as u};
|