@lunora/studio 1.0.0-alpha.4 → 1.0.0-alpha.41
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/LICENSE.md +6 -0
- package/__assets__/package-og.svg +1 -1
- package/dist/index.d.ts +33 -18
- package/dist/index.js +29 -29
- package/dist/mount.d.ts +1 -1
- package/dist/mount.js +3 -2
- package/dist/{packem_shared/ApiTab-W3no0KOj.js → packem_chunks/ApiTab.js} +5 -5
- package/dist/{packem_shared/AuditPanel-Bq4o_IqT.js → packem_chunks/AuditPanel.js} +29 -41
- package/dist/{packem_shared/ExportImportPanel-dxY56TDF.js → packem_chunks/ExportImportPanel.js} +16 -11
- package/dist/{packem_shared/FileBrowser-Dhy4zES8.js → packem_chunks/FileBrowser.js} +15 -15
- package/dist/{packem_shared/FunctionRunner--fQJRPAD.js → packem_chunks/FunctionRunner.js} +10 -10
- package/dist/{packem_shared/FunctionStatsPanel-BjRUA_G3.js → packem_chunks/FunctionStatsPanel.js} +153 -208
- package/dist/{packem_shared/HealthPanel-PxclMWmA.js → packem_chunks/HealthPanel.js} +37 -29
- package/dist/{packem_shared/InsightsPanel-CWS_C-xW.js → packem_chunks/InsightsPanel.js} +108 -69
- package/dist/{packem_shared/LogsPanel-CTW8CFcM.js → packem_chunks/LogsPanel.js} +46 -58
- package/dist/{packem_shared/MailPanel-BwkvfIHF.js → packem_chunks/MailPanel.js} +45 -139
- package/dist/{packem_shared/MetricsPanel-BLuOhZQ4.js → packem_chunks/MetricsPanel.js} +41 -322
- package/dist/{packem_shared/MigrationsPanel-DT3lnwHF.js → packem_chunks/MigrationsPanel.js} +44 -51
- package/dist/{packem_shared/PitrPanel-CdErL7EJ.js → packem_chunks/PitrPanel.js} +9 -9
- package/dist/{packem_shared/SchemaViewer-LJDcmNIO.js → packem_chunks/SchemaViewer.js} +17 -16
- package/dist/{packem_shared/SecurityAdvisorPanel-C_ETsPih.js → packem_chunks/SecurityAdvisorPanel.js} +47 -31
- package/dist/packem_chunks/SettingsPanel.js +391 -0
- package/dist/{packem_shared/sql-editor-panel-BFRpzj6r.js → packem_chunks/SqlEditorPanel.js} +158 -387
- package/dist/{packem_shared/TableEditor-ChfUOZec.js → packem_chunks/TableEditor.js} +10 -68
- package/dist/packem_chunks/analytics-panel.js +261 -0
- package/dist/packem_chunks/auth-config-panel.js +365 -0
- package/dist/packem_chunks/auth-sessions-panel.js +175 -0
- package/dist/packem_chunks/containers-panel.js +247 -0
- package/dist/packem_chunks/dashboards-panel.js +780 -0
- package/dist/packem_chunks/fanout-panel.js +482 -0
- package/dist/packem_chunks/flags-panel.js +176 -0
- package/dist/packem_chunks/kv-browser.js +1896 -0
- package/dist/packem_chunks/log-drains-panel.js +273 -0
- package/dist/packem_chunks/organizations-panel.js +3178 -0
- package/dist/packem_chunks/payments-panel.js +186 -0
- package/dist/packem_chunks/permissions-panel.js +805 -0
- package/dist/packem_chunks/queues-panel.js +1075 -0
- package/dist/packem_chunks/rls-panel.js +315 -0
- package/dist/packem_chunks/schedule-panel.js +831 -0
- package/dist/packem_chunks/sparkline.js +79 -0
- package/dist/packem_chunks/storage-rules-panel.js +140 -0
- package/dist/packem_chunks/subscriptions-panel.js +238 -0
- package/dist/packem_chunks/users-panel.js +1731 -0
- package/dist/packem_chunks/vector-browser.js +281 -0
- package/dist/packem_chunks/workflows-panel.js +562 -0
- package/dist/packem_shared/{ADMIN_FUNCTIONS-DmBqMZ-z.js → ADMIN_FUNCTIONS-BHHJi3Gb.js} +7 -0
- package/dist/packem_shared/{ApiDocsPanel-C5-yJ1p7.js → ApiDocsPanel-CBma-lnp.js} +2 -2
- package/dist/packem_shared/{ApiReferencePanel-1vubqG5s.js → ApiReferencePanel-CQM3pPN7.js} +2 -1
- package/dist/packem_shared/{CommandPalette-BtgkBzZI.js → CommandPalette-X2tkbyHk.js} +1 -1
- package/dist/packem_shared/{DataBrowser-CtBe1So9.js → DataBrowser-D2ywrdId.js} +198 -247
- package/dist/packem_shared/{GlobalDataBrowser-BTEmGrph.js → GlobalDataBrowser-BkTPLzAY.js} +37 -66
- package/dist/packem_shared/HomePanel-D1Q9LZgK.js +14 -0
- package/dist/packem_shared/{OpenRpcReferencePanel-vbcYbv3V.js → OpenRpcReferencePanel-Dno-hfDb.js} +2 -1
- package/dist/packem_shared/{ScheduledJobs-CabfKbyM.js → ScheduledJobs-Ctw4jYtU.js} +163 -60
- package/dist/packem_shared/Studio-lJhzDAze.js +16 -0
- package/dist/packem_shared/{StudioApp-CHOZA-z-.js → StudioApp-DiMkupvZ.js} +276 -11
- package/dist/packem_shared/{advisor-view-CGcfMiPq.js → advisor-view-BX8OhG0w.js} +6 -6
- package/dist/packem_shared/alert-CdAET2K_.js +68 -0
- package/dist/packem_shared/{app.d-CCmwDEVs.d.ts → app.d-CNLRTrWw.d.ts} +1 -1
- package/dist/packem_shared/{bar-chart-CzJAgqkp.js → bar-chart-DSwcWIRy.js} +5 -4
- package/dist/packem_shared/browser-storage-BTrX4y3B.js +215 -0
- package/dist/packem_shared/{cf-links-2cktDedA.js → cf-links-BZfRdxSE.js} +1 -1
- package/dist/packem_shared/{data-grid-B5CaV3wS.js → data-grid-CdXztApG.js} +1 -1
- package/dist/packem_shared/data-view-params-Cd6yRVbv.js +96 -0
- package/dist/packem_shared/error-alert-CXjqyGw9.js +114 -0
- package/dist/packem_shared/{grid-features-CzUfqgsM.js → grid-features-BF-KBDFz.js} +131 -163
- package/dist/packem_shared/home-panel-TFcRf9Ui.js +1889 -0
- package/dist/packem_shared/{internal-rXJEAhXS.js → internal-CYcbqMjX.js} +44 -3
- package/dist/packem_shared/modal-shell-hyaJvIJ6.js +100 -0
- package/dist/packem_shared/{reference-view-B4E49Lip.js → reference-view-DUiJcILV.js} +6 -45
- package/dist/packem_shared/scroll-area-DLhcy-ml.js +93 -0
- package/dist/packem_shared/select-UkNYCT3s.js +273 -0
- package/dist/packem_shared/skeleton-CGhL0p20.js +45 -0
- package/dist/packem_shared/{sparkline-10dG-_f0.js → sparkline-BnA1kC9X.js} +1 -1
- package/dist/packem_shared/studio-Dh9UlaF_.js +4015 -0
- package/dist/packem_shared/{table-_RzNvy3R.js → table-DsCa9Qp9.js} +1 -1
- package/dist/packem_shared/{table-list-sidebar-Bg7uzbvC.js → table-list-sidebar-UVIXQJdU.js} +1 -1
- package/dist/packem_shared/use-admin-query-CfHYWx5n.js +106 -0
- package/dist/packem_shared/use-async-submit-DJQiPc-_.js +91 -0
- package/dist/standalone/chunk-25AYY4H7.js +2 -0
- package/dist/standalone/chunk-2ANAF4ZM.js +1 -0
- package/dist/standalone/chunk-2K47A3P6.js +1 -0
- package/dist/standalone/chunk-2NGUNNGW.js +1 -0
- package/dist/standalone/chunk-3CJW6NWG.js +4 -0
- package/dist/standalone/chunk-3OA7PECS.js +6 -0
- package/dist/standalone/chunk-3OIHOXVV.js +1 -0
- package/dist/standalone/chunk-447TAUFD.js +1 -0
- package/dist/standalone/chunk-4QHKBC77.js +1 -0
- package/dist/standalone/chunk-5C4TSNE6.js +1 -0
- package/dist/standalone/chunk-5OIBXYZM.js +1 -0
- package/dist/standalone/chunk-6HSHEMZV.js +76 -0
- package/dist/standalone/chunk-6JIZ34MB.js +3 -0
- package/dist/standalone/chunk-6VO23MMW.js +4 -0
- package/dist/standalone/chunk-7MVSQS7B.js +1 -0
- package/dist/standalone/chunk-7TJJXVSE.js +1 -0
- package/dist/standalone/chunk-7YXOPTWI.js +1 -0
- package/dist/standalone/chunk-AHILM3ZP.js +1 -0
- package/dist/standalone/chunk-BGXOXASQ.js +1 -0
- package/dist/standalone/chunk-BJGBHGK3.js +1 -0
- package/dist/standalone/chunk-BOXSWNXZ.js +1 -0
- package/dist/standalone/chunk-BX5MKYOC.js +1 -0
- package/dist/standalone/chunk-CKSHCYGC.js +2 -0
- package/dist/standalone/chunk-DWDILV2E.js +1 -0
- package/dist/standalone/chunk-E75ANNWX.js +19 -0
- package/dist/standalone/chunk-EQZQOTJY.js +1 -0
- package/dist/standalone/chunk-GTLEWM5Y.js +1 -0
- package/dist/standalone/chunk-GTM65MVX.js +1 -0
- package/dist/standalone/chunk-GUI5GFFI.js +1 -0
- package/dist/standalone/chunk-HN6KJXYQ.js +1 -0
- package/dist/standalone/chunk-HV7G6DFP.js +5 -0
- package/dist/standalone/chunk-HYDJNCGW.js +1 -0
- package/dist/standalone/chunk-HZK5RQHG.js +1 -0
- package/dist/standalone/chunk-IN2SYVJB.js +1 -0
- package/dist/standalone/chunk-IOANPSJN.js +1 -0
- package/dist/standalone/chunk-ISDZPW3V.js +1 -0
- package/dist/standalone/chunk-IXDH4GL5.js +1 -0
- package/dist/standalone/chunk-J6J54MBP.js +1 -0
- package/dist/standalone/chunk-J73VHFCL.js +1 -0
- package/dist/standalone/chunk-JHKMUTIF.js +13 -0
- package/dist/standalone/chunk-JPRH6DPK.js +1 -0
- package/dist/standalone/chunk-JSEXCW5Q.js +1 -0
- package/dist/standalone/chunk-KA5YB3VP.js +1 -0
- package/dist/standalone/chunk-KBB75WNT.js +1 -0
- package/dist/standalone/chunk-KEGAWN6Y.js +1 -0
- package/dist/standalone/chunk-KJJ3WM6H.js +4 -0
- package/dist/standalone/chunk-KQV4NGH3.js +1 -0
- package/dist/standalone/chunk-KSKXW5PX.js +1 -0
- package/dist/standalone/chunk-KUH4P5F5.js +1 -0
- package/dist/standalone/chunk-KYJPPVGB.js +1 -0
- package/dist/standalone/chunk-KZ6INM5M.js +1 -0
- package/dist/standalone/chunk-L2TJVSDQ.js +1 -0
- package/dist/standalone/chunk-L7SK4ZZD.js +1 -0
- package/dist/standalone/chunk-LAK5VSPI.js +1 -0
- package/dist/standalone/chunk-LBN7LPVK.js +1 -0
- package/dist/standalone/chunk-LNZIB2MD.js +1 -0
- package/dist/standalone/chunk-MJWVMKQ4.js +6 -0
- package/dist/standalone/chunk-MLZYX5CQ.js +1 -0
- package/dist/standalone/chunk-N2X2OO4V.js +1 -0
- package/dist/standalone/chunk-NGKITPQP.js +13 -0
- package/dist/standalone/chunk-O3NAGRTR.js +1 -0
- package/dist/standalone/chunk-OZACQNKG.js +1 -0
- package/dist/standalone/chunk-PNDNXS5Z.js +1 -0
- package/dist/standalone/chunk-Q7DMUTUE.js +1 -0
- package/dist/standalone/chunk-QAFAJBAW.js +1 -0
- package/dist/standalone/chunk-QBAT52GB.js +1 -0
- package/dist/standalone/chunk-RHZ4M2NZ.js +1 -0
- package/dist/standalone/chunk-RRCPZMC2.js +22 -0
- package/dist/standalone/chunk-SEU5V7I6.js +1 -0
- package/dist/standalone/chunk-TAD43CG5.js +1 -0
- package/dist/standalone/chunk-TBMYIZIO.js +1 -0
- package/dist/standalone/chunk-TDZ44E5I.js +4 -0
- package/dist/standalone/chunk-THNBTMUF.js +1 -0
- package/dist/standalone/chunk-TIQISBGK.js +1 -0
- package/dist/standalone/chunk-TMYVNQ66.js +1 -0
- package/dist/standalone/chunk-TQ36RWOP.js +1 -0
- package/dist/standalone/chunk-UGUEC6BC.js +1 -0
- package/dist/standalone/chunk-UJB2LEI4.js +4 -0
- package/dist/standalone/chunk-UK64ZSUW.js +1 -0
- package/dist/standalone/chunk-UKDJ4H7I.js +1 -0
- package/dist/standalone/chunk-VLXV72QE.js +1 -0
- package/dist/standalone/chunk-VON7JUPG.js +1 -0
- package/dist/standalone/chunk-W3JK4YWR.js +1 -0
- package/dist/standalone/chunk-W3SHEIAL.js +3 -0
- package/dist/standalone/chunk-WI7GWFEG.js +1 -0
- package/dist/standalone/chunk-WIHXMNUY.js +1 -0
- package/dist/standalone/chunk-WLDVXVI2.js +1 -0
- package/dist/standalone/chunk-XLXNLJ4N.js +1 -0
- package/dist/standalone/chunk-XNJNSCLM.js +1 -0
- package/dist/standalone/chunk-YAECF5LW.js +1 -0
- package/dist/standalone/chunk-YBGC4PPD.js +1 -0
- package/dist/standalone/chunk-YJAPWSDC.js +4 -0
- package/dist/standalone/chunk-ZEJB6DXU.js +8 -0
- package/dist/standalone/chunk-ZFNBPAIZ.js +1 -0
- package/dist/standalone/chunk-ZHVTQ37P.js +1 -0
- package/dist/standalone/chunk-ZIGWVHCS.js +1 -0
- package/dist/standalone/chunk-ZPP2KOR4.js +1 -0
- package/dist/standalone/chunk-ZPUO7FNI.js +1 -0
- package/dist/standalone/studio.js +104 -246
- package/dist/styles.css +2 -2
- package/package.json +15 -13
- package/dist/packem_shared/HomePanel-Cw16stjq.js +0 -1273
- package/dist/packem_shared/SettingsPanel-C0uLRf5P.js +0 -176
- package/dist/packem_shared/SqlEditorPanel-CguV7otm.js +0 -13
- package/dist/packem_shared/Studio-DFWAlcuf.js +0 -33
- package/dist/packem_shared/studio-Bj8psK1c.js +0 -10303
- package/dist/packem_shared/use-live-admin-Dq6g3daN.js +0 -73
- package/dist/packem_shared/use-live-shard-seed-Cuk3dnH0.js +0 -76
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { useLunora } from '@lunora/react';
|
|
2
2
|
import { useState, useRef, useCallback, useEffect } from 'react';
|
|
3
3
|
import { E as EmptyState } from './empty-state-DY_oe0k6.js';
|
|
4
|
-
import { T as Table, a as TableHeader, b as TableRow, c as TableHead, d as TableBody, e as TableCell } from './table-
|
|
4
|
+
import { T as Table, a as TableHeader, b as TableRow, c as TableHead, d as TableBody, e as TableCell } from './table-DsCa9Qp9.js';
|
|
5
|
+
import { a as useClientQuery } from './use-admin-query-CfHYWx5n.js';
|
|
5
6
|
import { useAutoRefresh } from './DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js';
|
|
6
7
|
import { useT } from './DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { G as GridContainer, C as CellValue } from './data-grid-B5CaV3wS.js';
|
|
8
|
+
import { C as CLOUDFLARE_D1_URL } from './cf-links-BZfRdxSE.js';
|
|
9
|
+
import { u as useFacets, T as TableListSidebar, G as GridPagination, D as DataFacets } from './table-list-sidebar-UVIXQJdU.js';
|
|
10
|
+
import { G as GridContainer, C as CellValue } from './data-grid-CdXztApG.js';
|
|
11
11
|
import { jsxDEV } from 'react/jsx-dev-runtime';
|
|
12
12
|
|
|
13
13
|
const DEFAULT_PAGE_SIZE = 50;
|
|
@@ -37,13 +37,9 @@ const GlobalDataBrowser = ({
|
|
|
37
37
|
} = {}) => {
|
|
38
38
|
const client = useLunora();
|
|
39
39
|
const t = useT();
|
|
40
|
-
const [tables, setTables] = useState(null);
|
|
41
|
-
const [tablesError, setTablesError] = useState(null);
|
|
42
40
|
const [selectedTable, setSelectedTable] = useState(initialTable ?? null);
|
|
43
41
|
const [offset, setOffset] = useState(0);
|
|
44
42
|
const [pageSize, setPageSize] = useState(initialPageSize);
|
|
45
|
-
const [page, setPage] = useState(null);
|
|
46
|
-
const [pageError, setPageError] = useState(null);
|
|
47
43
|
const [filters, setFilters] = useState([]);
|
|
48
44
|
const filtersRef = useRef(filters);
|
|
49
45
|
filtersRef.current = filters;
|
|
@@ -53,76 +49,53 @@ const GlobalDataBrowser = ({
|
|
|
53
49
|
refetchFacets: refetchFacetsViaHook,
|
|
54
50
|
toggleFacet
|
|
55
51
|
} = useFacets();
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
const result = await client.readGlobalTablePage({
|
|
72
|
-
filters: activeFilters,
|
|
73
|
-
limit,
|
|
74
|
-
offset: nextOffset,
|
|
75
|
-
table
|
|
76
|
-
});
|
|
77
|
-
if (fetchSeqRef.current !== seq) {
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
setPage(result);
|
|
81
|
-
setOffset(nextOffset);
|
|
82
|
-
} catch (error_0) {
|
|
83
|
-
if (fetchSeqRef.current !== seq) {
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
setPage(null);
|
|
87
|
-
setPageError(errorMessage(error_0));
|
|
88
|
-
}
|
|
89
|
-
}, [client, pageSize]);
|
|
90
|
-
const facetFetcher = (table_0, activeFilters_0) => (column) => client.facetGlobalColumn({
|
|
52
|
+
const tablesQuery = useClientQuery(["lunora-global-tables"], () => client.listGlobalTables());
|
|
53
|
+
const tables = tablesQuery.data ?? null;
|
|
54
|
+
const tablesError = tablesQuery.error;
|
|
55
|
+
const pageQuery = useClientQuery(["lunora-global-page", selectedTable ?? "", offset, pageSize, JSON.stringify(filters)], () => client.readGlobalTablePage({
|
|
56
|
+
filters,
|
|
57
|
+
limit: pageSize,
|
|
58
|
+
offset,
|
|
59
|
+
table: selectedTable ?? ""
|
|
60
|
+
}), {
|
|
61
|
+
enabled: selectedTable !== null,
|
|
62
|
+
keepPreviousData: false
|
|
63
|
+
});
|
|
64
|
+
const page = pageQuery.data ?? null;
|
|
65
|
+
const pageError = pageQuery.error;
|
|
66
|
+
const facetFetcher = (table, activeFilters) => (column) => client.facetGlobalColumn({
|
|
91
67
|
column,
|
|
92
|
-
filters:
|
|
93
|
-
table
|
|
68
|
+
filters: activeFilters,
|
|
69
|
+
table
|
|
94
70
|
});
|
|
95
|
-
const refetchFacets = (
|
|
96
|
-
refetchFacetsViaHook(facetFetcher(
|
|
71
|
+
const refetchFacets = (table_0, activeFilters_0) => {
|
|
72
|
+
refetchFacetsViaHook(facetFetcher(table_0, activeFilters_0));
|
|
97
73
|
};
|
|
98
|
-
useEffect(() => {
|
|
99
|
-
fireAndForget(fetchTables());
|
|
100
|
-
}, [fetchTables]);
|
|
101
74
|
useAutoRefresh(() => {
|
|
102
|
-
|
|
75
|
+
tablesQuery.refetch();
|
|
103
76
|
if (selectedTable !== null) {
|
|
104
|
-
|
|
77
|
+
pageQuery.refetch();
|
|
105
78
|
refetchFacets(selectedTable, filtersRef.current);
|
|
106
79
|
}
|
|
107
80
|
}, true);
|
|
108
81
|
const appliedInitialTable = useRef(void 0);
|
|
109
|
-
const selectTable = useCallback((
|
|
110
|
-
setSelectedTable(
|
|
111
|
-
appliedInitialTable.current =
|
|
82
|
+
const selectTable = useCallback((table_1) => {
|
|
83
|
+
setSelectedTable(table_1);
|
|
84
|
+
appliedInitialTable.current = table_1;
|
|
112
85
|
setFilters([]);
|
|
113
86
|
filtersRef.current = [];
|
|
114
87
|
clearFacets();
|
|
115
|
-
|
|
116
|
-
onSelectTable?.(
|
|
117
|
-
}, [clearFacets,
|
|
88
|
+
setOffset(0);
|
|
89
|
+
onSelectTable?.(table_1);
|
|
90
|
+
}, [clearFacets, onSelectTable]);
|
|
118
91
|
const onToggleFacet = (column_0) => {
|
|
119
92
|
toggleFacet(column_0, selectedTable === null ? null : facetFetcher(selectedTable, filtersRef.current));
|
|
120
93
|
};
|
|
121
94
|
const applyFilters = (next) => {
|
|
122
95
|
setFilters(next);
|
|
123
96
|
filtersRef.current = next;
|
|
97
|
+
setOffset(0);
|
|
124
98
|
if (selectedTable !== null) {
|
|
125
|
-
fireAndForget(fetchPage(selectedTable, 0, pageSize, next));
|
|
126
99
|
refetchFacets(selectedTable, next);
|
|
127
100
|
}
|
|
128
101
|
};
|
|
@@ -146,11 +119,11 @@ const GlobalDataBrowser = ({
|
|
|
146
119
|
selectTable(target);
|
|
147
120
|
});
|
|
148
121
|
}, [initialTable, selectTable]);
|
|
149
|
-
const goToPage = (
|
|
122
|
+
const goToPage = (nextOffset) => {
|
|
150
123
|
if (selectedTable === null) {
|
|
151
124
|
return;
|
|
152
125
|
}
|
|
153
|
-
|
|
126
|
+
setOffset(Math.max(0, nextOffset));
|
|
154
127
|
};
|
|
155
128
|
const total = page?.total ?? 0;
|
|
156
129
|
const hasPrevious = offset > 0;
|
|
@@ -158,7 +131,7 @@ const GlobalDataBrowser = ({
|
|
|
158
131
|
const rangeStart = page === null || page.rows.length === 0 ? 0 : offset + 1;
|
|
159
132
|
const rangeEnd = page === null ? 0 : offset + page.rows.length;
|
|
160
133
|
const reloadTables = () => {
|
|
161
|
-
|
|
134
|
+
tablesQuery.refetch();
|
|
162
135
|
};
|
|
163
136
|
const goPrevious = () => {
|
|
164
137
|
goToPage(offset - pageSize);
|
|
@@ -171,9 +144,7 @@ const GlobalDataBrowser = ({
|
|
|
171
144
|
};
|
|
172
145
|
const changePageSize = (size) => {
|
|
173
146
|
setPageSize(size);
|
|
174
|
-
|
|
175
|
-
fireAndForget(fetchPage(selectedTable, 0, size));
|
|
176
|
-
}
|
|
147
|
+
setOffset(0);
|
|
177
148
|
};
|
|
178
149
|
return /* @__PURE__ */ jsxDEV("div", {
|
|
179
150
|
className: "flex h-full min-w-0",
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import 'react/compiler-runtime';
|
|
2
|
+
import '@tanstack/react-router';
|
|
3
|
+
import 'react';
|
|
4
|
+
import './badge-B2PKA1-5.js';
|
|
5
|
+
import './card-DURq3ElK.js';
|
|
6
|
+
import './empty-state-DY_oe0k6.js';
|
|
7
|
+
import './use-admin-query-CfHYWx5n.js';
|
|
8
|
+
import './DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
9
|
+
import './ADMIN_FUNCTIONS-BHHJi3Gb.js';
|
|
10
|
+
import './internal-CYcbqMjX.js';
|
|
11
|
+
import './utils-B05Dmz_H.js';
|
|
12
|
+
import './DEFAULT_INSIGHT_THRESHOLDS-DjF0h-gA.js';
|
|
13
|
+
export { H as HomePanel } from './home-panel-TFcRf9Ui.js';
|
|
14
|
+
import 'react/jsx-dev-runtime';
|
package/dist/packem_shared/{OpenRpcReferencePanel-vbcYbv3V.js → OpenRpcReferencePanel-Dno-hfDb.js}
RENAMED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { c } from 'react/compiler-runtime';
|
|
2
2
|
import { useLunora } from '@lunora/react';
|
|
3
3
|
import { E as EmptyState } from './empty-state-DY_oe0k6.js';
|
|
4
|
-
import {
|
|
4
|
+
import { S as Skeleton } from './skeleton-CGhL0p20.js';
|
|
5
|
+
import { u as useAdminSpec, R as ReferenceView } from './reference-view-DUiJcILV.js';
|
|
5
6
|
import { useT } from './DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
6
7
|
import { jsxDEV } from 'react/jsx-dev-runtime';
|
|
7
8
|
|
|
@@ -1,79 +1,151 @@
|
|
|
1
|
+
import { c } from 'react/compiler-runtime';
|
|
1
2
|
import { useLunora } from '@lunora/react';
|
|
2
|
-
import { useState,
|
|
3
|
+
import { useState, useEffect } from 'react';
|
|
3
4
|
import { ConfirmButton } from './ConfirmButton-C2eVi2Qv.js';
|
|
4
5
|
import { C as Card, a as CardContent } from './card-DURq3ElK.js';
|
|
5
6
|
import { E as EmptyState } from './empty-state-DY_oe0k6.js';
|
|
6
|
-
import { T as Table, a as TableHeader, b as TableRow, c as TableHead, d as TableBody, e as TableCell } from './table-
|
|
7
|
+
import { T as Table, a as TableHeader, b as TableRow, c as TableHead, d as TableBody, e as TableCell } from './table-DsCa9Qp9.js';
|
|
8
|
+
import { a as useClientQuery } from './use-admin-query-CfHYWx5n.js';
|
|
7
9
|
import { useAutoRefresh } from './DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js';
|
|
8
10
|
import { useT } from './DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
9
|
-
import { f as fireAndForget,
|
|
11
|
+
import { f as fireAndForget, i as formatTimestamp, e as errorMessage } from './internal-CYcbqMjX.js';
|
|
10
12
|
import { jsxDEV } from 'react/jsx-dev-runtime';
|
|
11
13
|
|
|
12
14
|
const formatScheduledFor = (value) => Number.isFinite(value) ? formatTimestamp(value, "—") : "—";
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
const sortByDue = (records) => records.toSorted((a, b) => a.scheduledFor - b.scheduledFor);
|
|
16
|
+
const ScheduledJobs = (t0) => {
|
|
17
|
+
const $ = c(33);
|
|
18
|
+
let t1;
|
|
19
|
+
if ($[0] !== t0) {
|
|
20
|
+
t1 = t0 === void 0 ? {} : t0;
|
|
21
|
+
$[0] = t0;
|
|
22
|
+
$[1] = t1;
|
|
23
|
+
} else {
|
|
24
|
+
t1 = $[1];
|
|
25
|
+
}
|
|
26
|
+
const {
|
|
27
|
+
cancelJob,
|
|
28
|
+
loadJobs
|
|
29
|
+
} = t1;
|
|
17
30
|
const client = useLunora();
|
|
18
31
|
const t = useT();
|
|
19
|
-
const [jobs, setJobs] = useState(null);
|
|
20
|
-
const [error, setError] = useState(null);
|
|
21
|
-
const load = loadJobs ?? (() => client.listScheduledJobs());
|
|
22
|
-
const cancelImpl = useMemo(() => {
|
|
23
|
-
if (cancelJob !== void 0) {
|
|
24
|
-
return cancelJob;
|
|
25
|
-
}
|
|
26
|
-
return loadJobs === void 0 ? (id) => client.cancelScheduledJob(id) : void 0;
|
|
27
|
-
}, [cancelJob, client, loadJobs]);
|
|
28
|
-
const refresh = async () => {
|
|
29
|
-
setError(null);
|
|
30
|
-
try {
|
|
31
|
-
const records = await load();
|
|
32
|
-
setJobs(records.toSorted((a, b) => a.scheduledFor - b.scheduledFor));
|
|
33
|
-
} catch (error_) {
|
|
34
|
-
setJobs(null);
|
|
35
|
-
setError(errorMessage(error_));
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
useEffect(() => {
|
|
39
|
-
fireAndForget(refresh());
|
|
40
|
-
}, []);
|
|
41
32
|
const livePush = loadJobs === void 0;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
33
|
+
let t2;
|
|
34
|
+
if ($[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
35
|
+
t2 = ["lunora-scheduled-jobs"];
|
|
36
|
+
$[2] = t2;
|
|
37
|
+
} else {
|
|
38
|
+
t2 = $[2];
|
|
39
|
+
}
|
|
40
|
+
let t3;
|
|
41
|
+
if ($[3] !== client || $[4] !== loadJobs) {
|
|
42
|
+
t3 = async () => {
|
|
43
|
+
const records = await (loadJobs ?? (() => client.listScheduledJobs()))();
|
|
44
|
+
return sortByDue(records);
|
|
45
|
+
};
|
|
46
|
+
$[3] = client;
|
|
47
|
+
$[4] = loadJobs;
|
|
48
|
+
$[5] = t3;
|
|
49
|
+
} else {
|
|
50
|
+
t3 = $[5];
|
|
51
|
+
}
|
|
52
|
+
const jobsQuery = useClientQuery(t2, t3);
|
|
53
|
+
const [liveJobs, setLiveJobs] = useState(void 0);
|
|
54
|
+
const [liveError, setLiveError] = useState(void 0);
|
|
55
|
+
let t4;
|
|
56
|
+
let t5;
|
|
57
|
+
if ($[6] !== client || $[7] !== livePush) {
|
|
58
|
+
t4 = () => {
|
|
61
59
|
if (!livePush) {
|
|
62
|
-
|
|
60
|
+
return;
|
|
63
61
|
}
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
return client.subscribeScheduledJobs((records_0) => {
|
|
63
|
+
setLiveError(void 0);
|
|
64
|
+
setLiveJobs(sortByDue(records_0));
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
t5 = [livePush, client];
|
|
68
|
+
$[6] = client;
|
|
69
|
+
$[7] = livePush;
|
|
70
|
+
$[8] = t4;
|
|
71
|
+
$[9] = t5;
|
|
72
|
+
} else {
|
|
73
|
+
t4 = $[8];
|
|
74
|
+
t5 = $[9];
|
|
75
|
+
}
|
|
76
|
+
useEffect(t4, t5);
|
|
77
|
+
let t6;
|
|
78
|
+
if ($[10] !== jobsQuery) {
|
|
79
|
+
t6 = () => {
|
|
80
|
+
jobsQuery.refetch();
|
|
81
|
+
};
|
|
82
|
+
$[10] = jobsQuery;
|
|
83
|
+
$[11] = t6;
|
|
84
|
+
} else {
|
|
85
|
+
t6 = $[11];
|
|
86
|
+
}
|
|
87
|
+
useAutoRefresh(t6, !livePush);
|
|
88
|
+
let t7;
|
|
89
|
+
bb0: {
|
|
90
|
+
if (cancelJob !== void 0) {
|
|
91
|
+
t7 = cancelJob;
|
|
92
|
+
break bb0;
|
|
93
|
+
}
|
|
94
|
+
let t82;
|
|
95
|
+
if ($[12] !== client || $[13] !== loadJobs) {
|
|
96
|
+
t82 = loadJobs === void 0 ? (id) => client.cancelScheduledJob(id) : void 0;
|
|
97
|
+
$[12] = client;
|
|
98
|
+
$[13] = loadJobs;
|
|
99
|
+
$[14] = t82;
|
|
100
|
+
} else {
|
|
101
|
+
t82 = $[14];
|
|
66
102
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
103
|
+
t7 = t82;
|
|
104
|
+
}
|
|
105
|
+
const cancelImpl = t7;
|
|
106
|
+
const jobs = liveJobs ?? jobsQuery.data;
|
|
107
|
+
const error = liveError ?? jobsQuery.error;
|
|
108
|
+
let t8;
|
|
109
|
+
if ($[15] !== cancelImpl || $[16] !== jobsQuery || $[17] !== livePush) {
|
|
110
|
+
t8 = async (id_0) => {
|
|
111
|
+
if (cancelImpl === void 0) {
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
setLiveError(void 0);
|
|
115
|
+
try {
|
|
116
|
+
await cancelImpl(id_0);
|
|
117
|
+
if (!livePush) {
|
|
118
|
+
jobsQuery.refetch();
|
|
119
|
+
}
|
|
120
|
+
} catch (t92) {
|
|
121
|
+
const error_ = t92;
|
|
122
|
+
setLiveError(errorMessage(error_));
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
$[15] = cancelImpl;
|
|
126
|
+
$[16] = jobsQuery;
|
|
127
|
+
$[17] = livePush;
|
|
128
|
+
$[18] = t8;
|
|
129
|
+
} else {
|
|
130
|
+
t8 = $[18];
|
|
131
|
+
}
|
|
132
|
+
const cancel = t8;
|
|
133
|
+
let t9;
|
|
134
|
+
if ($[19] !== error) {
|
|
135
|
+
t9 = error !== null && /* @__PURE__ */ jsxDEV("p", {
|
|
72
136
|
className: "text-sm text-destructive",
|
|
73
137
|
"data-testid": "sj-error",
|
|
74
138
|
role: "alert",
|
|
75
139
|
children: error
|
|
76
|
-
}, void 0, false)
|
|
140
|
+
}, void 0, false);
|
|
141
|
+
$[19] = error;
|
|
142
|
+
$[20] = t9;
|
|
143
|
+
} else {
|
|
144
|
+
t9 = $[20];
|
|
145
|
+
}
|
|
146
|
+
let t10;
|
|
147
|
+
if ($[21] !== jobs?.length || $[22] !== t) {
|
|
148
|
+
t10 = jobs?.length === 0 && /* @__PURE__ */ jsxDEV(EmptyState, {
|
|
77
149
|
description: t("Jobs queued with runAfter / runAt will appear here."),
|
|
78
150
|
icon: /* @__PURE__ */ jsxDEV("svg", {
|
|
79
151
|
"aria-hidden": "true",
|
|
@@ -93,7 +165,16 @@ const ScheduledJobs = ({
|
|
|
93
165
|
}, void 0, true),
|
|
94
166
|
testId: "sj-empty",
|
|
95
167
|
title: t("No scheduled jobs.")
|
|
96
|
-
}, void 0, false)
|
|
168
|
+
}, void 0, false);
|
|
169
|
+
$[21] = jobs?.length;
|
|
170
|
+
$[22] = t;
|
|
171
|
+
$[23] = t10;
|
|
172
|
+
} else {
|
|
173
|
+
t10 = $[23];
|
|
174
|
+
}
|
|
175
|
+
let t11;
|
|
176
|
+
if ($[24] !== cancel || $[25] !== cancelImpl || $[26] !== jobs || $[27] !== t) {
|
|
177
|
+
t11 = jobs !== void 0 && jobs.length > 0 && /* @__PURE__ */ jsxDEV(Card, {
|
|
97
178
|
className: "overflow-hidden py-0",
|
|
98
179
|
children: /* @__PURE__ */ jsxDEV(CardContent, {
|
|
99
180
|
className: "px-0",
|
|
@@ -152,8 +233,30 @@ const ScheduledJobs = ({
|
|
|
152
233
|
}, void 0, false)]
|
|
153
234
|
}, void 0, true)
|
|
154
235
|
}, void 0, false)
|
|
155
|
-
}, void 0, false)
|
|
156
|
-
|
|
236
|
+
}, void 0, false);
|
|
237
|
+
$[24] = cancel;
|
|
238
|
+
$[25] = cancelImpl;
|
|
239
|
+
$[26] = jobs;
|
|
240
|
+
$[27] = t;
|
|
241
|
+
$[28] = t11;
|
|
242
|
+
} else {
|
|
243
|
+
t11 = $[28];
|
|
244
|
+
}
|
|
245
|
+
let t12;
|
|
246
|
+
if ($[29] !== t10 || $[30] !== t11 || $[31] !== t9) {
|
|
247
|
+
t12 = /* @__PURE__ */ jsxDEV("div", {
|
|
248
|
+
className: "flex flex-col gap-3",
|
|
249
|
+
"data-testid": "lunora-scheduled-jobs",
|
|
250
|
+
children: [t9, t10, t11]
|
|
251
|
+
}, void 0, true);
|
|
252
|
+
$[29] = t10;
|
|
253
|
+
$[30] = t11;
|
|
254
|
+
$[31] = t9;
|
|
255
|
+
$[32] = t12;
|
|
256
|
+
} else {
|
|
257
|
+
t12 = $[32];
|
|
258
|
+
}
|
|
259
|
+
return t12;
|
|
157
260
|
};
|
|
158
261
|
|
|
159
262
|
export { ScheduledJobs };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import 'react/compiler-runtime';
|
|
2
|
+
import '@tanstack/react-router';
|
|
3
|
+
import 'react';
|
|
4
|
+
export { S as Studio } from './studio-Dh9UlaF_.js';
|
|
5
|
+
import './ErrorBoundary-BzAApI7J.js';
|
|
6
|
+
import './badge-B2PKA1-5.js';
|
|
7
|
+
import './input-XH4r1Pt1.js';
|
|
8
|
+
import './skeleton-CGhL0p20.js';
|
|
9
|
+
import './home-panel-TFcRf9Ui.js';
|
|
10
|
+
import './DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
11
|
+
import './StudioI18nProvider-B-tDCZIi.js';
|
|
12
|
+
import './data-view-params-Cd6yRVbv.js';
|
|
13
|
+
import './internal-CYcbqMjX.js';
|
|
14
|
+
import './utils-B05Dmz_H.js';
|
|
15
|
+
import './CommandPalette-X2tkbyHk.js';
|
|
16
|
+
import 'react/jsx-dev-runtime';
|