@dudousxd/nestjs-catalog-react 0.35.0 → 0.36.0
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/README.md +1 -0
- package/dist/AccessConsole.js +14 -14
- package/dist/FlowView.js +1 -1
- package/dist/GovernanceTimeline.js +5 -3
- package/dist/ObjectExplorer.js +15 -13
- package/dist/TraceExplorer.d.ts +3 -2
- package/dist/TraceExplorer.js +19 -11
- package/dist/context.d.ts +47 -21
- package/dist/context.js +47 -15
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/routes.d.ts +3 -2
- package/dist/routes.js +4 -4
- package/dist/search-console.d.ts +2 -2
- package/dist/search-console.js +5 -5
- package/dist/workflow/runs.js +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -132,6 +132,7 @@ These routes on top of the pipeline base path, listed by `pipelineRoutes()`:
|
|
|
132
132
|
| `POST {base}/workflows/:id/run` | execute, optionally carrying `expectShrink` |
|
|
133
133
|
| `PUT {base}/workflows/:id/schedule` | set the cron and whether it runs at all |
|
|
134
134
|
| `POST {base}/workflows/:id/nodes/:nodeId/discover` | ask one source what its columns are |
|
|
135
|
+
| `GET {base}/runs` | the newest runs, `filter[connector]=id` and `size`; answers `{ data }` |
|
|
135
136
|
|
|
136
137
|
**A connector is not one of them.** It is what a published graph runs as: minted
|
|
137
138
|
by `publish`, disabled by `unpublish`, removed with the graph, and there is no
|
package/dist/AccessConsole.js
CHANGED
|
@@ -21,14 +21,14 @@ function PeopleSearch({ value, onChange, }) {
|
|
|
21
21
|
* of UI on, because an operator who reads it as complete concludes somebody has
|
|
22
22
|
* no access when they were merely on the next page.
|
|
23
23
|
*/
|
|
24
|
-
function PageBar({ page,
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
24
|
+
function PageBar({ page, onPage, busy, }) {
|
|
25
|
+
const { total, perPage, currentPage, lastPage } = page.meta;
|
|
26
|
+
const offset = (currentPage - 1) * perPage;
|
|
27
|
+
const shown = page.data.length;
|
|
28
|
+
const first = total === 0 ? 0 : offset + 1;
|
|
29
|
+
const last = offset + shown;
|
|
30
|
+
const hasMore = currentPage < lastPage;
|
|
31
|
+
return (_jsxs("div", { className: cn('mt-3 flex items-center justify-between text-xs', MUTED), children: [_jsx("span", { children: total === 0 ? 'No people' : `Showing ${first}–${last} of ${total.toLocaleString()}` }), (currentPage > 1 || hasMore) && (_jsxs("span", { className: "flex gap-2", children: [_jsx("button", { type: "button", disabled: currentPage <= 1 || busy, onClick: () => onPage(Math.max(1, currentPage - 1)), className: "disabled:opacity-40", children: "Previous" }), _jsx("button", { type: "button", disabled: !hasMore || busy, onClick: () => onPage(currentPage + 1), className: "disabled:opacity-40", children: "Next" })] }))] }));
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
34
|
* One page answering the two questions a shared catalog creates: which
|
|
@@ -52,10 +52,10 @@ export function AccessConsole({ identity, onSignOut, signOutPending, canAddPeopl
|
|
|
52
52
|
// what it will return regardless of what is asked for. The key carries the
|
|
53
53
|
// query so a search does not read a previous search's page from the cache.
|
|
54
54
|
const [search, setSearch] = useState('');
|
|
55
|
-
const [
|
|
55
|
+
const [page, setPage] = useState(1);
|
|
56
56
|
const people = useQuery({
|
|
57
|
-
queryKey: [...catalogQueryKeys.people, { search,
|
|
58
|
-
queryFn: () => client.listPeople({ ...(search ? { search } : {}),
|
|
57
|
+
queryKey: [...catalogQueryKeys.people, { search, page }],
|
|
58
|
+
queryFn: () => client.listPeople({ ...(search ? { search } : {}), page }),
|
|
59
59
|
staleTime: 30_000,
|
|
60
60
|
// The count and the page it describes must not be shown apart. Without
|
|
61
61
|
// this, typing into the search blanks the list to a spinner and then shows
|
|
@@ -67,11 +67,11 @@ export function AccessConsole({ identity, onSignOut, signOutPending, canAddPeopl
|
|
|
67
67
|
setSearch(next);
|
|
68
68
|
// Back to the first page. Staying on page 3 of the previous
|
|
69
69
|
// search shows an empty list for a search that has matches.
|
|
70
|
-
|
|
70
|
+
setPage(1);
|
|
71
71
|
} }), mayAdminister && _jsx(AddPerson, {}), people.isPending && _jsx(Placeholder, { children: "Reading people\u2026" }), people.isError && (_jsx(Failed, { message: people.error instanceof Error
|
|
72
72
|
? people.error.message
|
|
73
|
-
: 'Could not read the people list.', onRetry: () => people.refetch() })), people.data?.
|
|
74
|
-
(search ? (_jsxs(Placeholder, { children: ["Nobody matches \u201C", search, "\u201D."] })) : (_jsx(Placeholder, { children: "Nobody can sign in yet. Seed the first administrator from the environment before anybody can reach this console as a person." }))), people.data &&
|
|
73
|
+
: 'Could not read the people list.', onRetry: () => people.refetch() })), people.data?.data.map((person) => (_jsx(PersonCard, { person: person }, person.email))), people.data?.data.length === 0 &&
|
|
74
|
+
(search ? (_jsxs(Placeholder, { children: ["Nobody matches \u201C", search, "\u201D."] })) : (_jsx(Placeholder, { children: "Nobody can sign in yet. Seed the first administrator from the environment before anybody can reach this console as a person." }))), people.data && _jsx(PageBar, { page: people.data, onPage: setPage, busy: people.isFetching })] }), _jsxs(Section, { title: "Applications", note: "Provisioned by an operator \u2014 a console that could hand grants out is one that stops leaving a trail.", children: [applications.isPending && _jsx(Placeholder, { children: "Reading applications\u2026" }), applications.isError && (_jsx(Failed, { message: applications.error instanceof Error
|
|
75
75
|
? applications.error.message
|
|
76
76
|
: 'Could not read the application list.', onRetry: () => applications.refetch() })), applications.data?.map((principal) => (_jsx(PrincipalCard, { principal: principal }, principal.id))), applications.data?.length === 0 && (_jsx(Placeholder, { children: "No applications are provisioned." }))] })] }) }));
|
|
77
77
|
}
|
package/dist/FlowView.js
CHANGED
|
@@ -28,7 +28,7 @@ export function FlowView() {
|
|
|
28
28
|
});
|
|
29
29
|
const { data: events = [], isLoading } = useQuery({
|
|
30
30
|
queryKey: ['catalog', 'flow-events'],
|
|
31
|
-
queryFn: () => client.listEvents({
|
|
31
|
+
queryFn: () => client.listEvents({ size: 500 }).then((page) => page.data),
|
|
32
32
|
refetchInterval: 20_000,
|
|
33
33
|
});
|
|
34
34
|
const lanes = useMemo(() => buildLanes(snapshot?.types ?? [], events), [snapshot, events]);
|
|
@@ -38,11 +38,13 @@ export function GovernanceTimeline({ traceSource, } = {}) {
|
|
|
38
38
|
const [principal, setPrincipal] = useState('');
|
|
39
39
|
const { data: events = [], isLoading } = useQuery({
|
|
40
40
|
queryKey: ['catalog', 'events', event, principal],
|
|
41
|
-
queryFn: () => client
|
|
41
|
+
queryFn: () => client
|
|
42
|
+
.listEvents({
|
|
42
43
|
event: event || undefined,
|
|
43
44
|
principalId: principal || undefined,
|
|
44
|
-
|
|
45
|
-
})
|
|
45
|
+
size: 200,
|
|
46
|
+
})
|
|
47
|
+
.then((page) => page.data),
|
|
46
48
|
refetchInterval: 15_000,
|
|
47
49
|
});
|
|
48
50
|
const principals = useMemo(() => [...new Set(events.map((e) => e.principalId).filter(Boolean))], [events]);
|
package/dist/ObjectExplorer.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { coerceFilterValue,
|
|
2
|
+
import { coerceFilterValue, filterOperatorTakesValue } from '@dudousxd/nestjs-catalog/client';
|
|
3
3
|
import { useQuery } from '@tanstack/react-query';
|
|
4
4
|
import { ArrowLeft, ChevronDown, ChevronLeft, ChevronRight, History, Search, X, } from 'lucide-react';
|
|
5
5
|
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
@@ -146,19 +146,19 @@ export function ObjectExplorer({ type: typeProp, pageSize = 25, backHref, backLa
|
|
|
146
146
|
// than restarting its timer on every render. Back to page one whenever the
|
|
147
147
|
// filters change: page 7 of an unfiltered table is very often past the end of
|
|
148
148
|
// a filtered one, and a page past the end reads as "nothing matches".
|
|
149
|
-
const apply = useCallback((
|
|
150
|
-
setApplied(
|
|
149
|
+
const apply = useCallback((ready) => {
|
|
150
|
+
setApplied(ready);
|
|
151
151
|
setPage(1);
|
|
152
152
|
}, []);
|
|
153
153
|
const params = useMemo(() => ({
|
|
154
154
|
page,
|
|
155
155
|
size: pageSize,
|
|
156
156
|
search: debouncedSearch || undefined,
|
|
157
|
-
sort,
|
|
158
|
-
dir,
|
|
157
|
+
// The list API's sort: one column, `-` for descending.
|
|
158
|
+
sort: sort ? `${dir === 'desc' ? '-' : ''}${sort}` : undefined,
|
|
159
159
|
// Omitted rather than sent empty, so a screen with no filters asks the
|
|
160
160
|
// same question it always did.
|
|
161
|
-
|
|
161
|
+
filters: applied.length > 0 ? applied : undefined,
|
|
162
162
|
snapshot: snapshotId || undefined,
|
|
163
163
|
}), [page, pageSize, debouncedSearch, sort, dir, applied, snapshotId]);
|
|
164
164
|
const { data, isFetching, error } = useQuery({
|
|
@@ -240,10 +240,10 @@ export function ObjectExplorer({ type: typeProp, pageSize = 25, backHref, backLa
|
|
|
240
240
|
// The stale border is not decoration: the banner is at the top of a
|
|
241
241
|
// scrolling page, and somebody who came back to this tab after
|
|
242
242
|
// lunch may only ever see the grid.
|
|
243
|
-
stale ? 'border-amber-400 dark:border-amber-500/60' : RULE, PANEL, isFetching && 'opacity-60'), children: [_jsx(DataTable, { data: data?.
|
|
243
|
+
stale ? 'border-amber-400 dark:border-amber-500/60' : RULE, PANEL, isFetching && 'opacity-60'), children: [_jsx(DataTable, { data: data?.data ?? [], columns: columns, getRowId: (row, index) => String(row[selectedType?.primaryKey[0] ?? 'id'] ?? index), sort: { by: sort ?? null, dir, onSort: toggleSort }, numeric: (id) => numericColumns.has(id) }), data && data.data.length === 0 && (_jsx(EmptyState, { type: selectedType, search: debouncedSearch, filtered: applied.length > 0, onClear: () => {
|
|
244
244
|
setSearch('');
|
|
245
245
|
setFilters([]);
|
|
246
|
-
} }))] })), data && _jsx(Pager, { page: data.
|
|
246
|
+
} }))] })), data && _jsx(Pager, { page: data.meta.currentPage, pages: data.meta.lastPage, onPage: setPage })] })] }));
|
|
247
247
|
}
|
|
248
248
|
/**
|
|
249
249
|
* The line under the title: the physical table, the row count, the columns.
|
|
@@ -254,7 +254,7 @@ export function ObjectExplorer({ type: typeProp, pageSize = 25, backHref, backLa
|
|
|
254
254
|
* different facts and only one of them is worth reacting to.
|
|
255
255
|
*/
|
|
256
256
|
function tableCaption(type, data) {
|
|
257
|
-
const rows = data ? `${data.total.toLocaleString()} rows` : '…';
|
|
257
|
+
const rows = data ? `${data.meta.total.toLocaleString()} rows` : '…';
|
|
258
258
|
return `${type?.tableName} · ${rows} · ${data?.columns.length ?? 0} columns from the catalog`;
|
|
259
259
|
}
|
|
260
260
|
/** The one control that searches every text column at once. */
|
|
@@ -330,17 +330,19 @@ function useSelectedType(types, typeProp) {
|
|
|
330
330
|
* it. A filter can only have been built out of a column that had already arrived.
|
|
331
331
|
*/
|
|
332
332
|
function useAppliedFilters(filters, columns, onApplied) {
|
|
333
|
-
const
|
|
333
|
+
const ready = useMemo(() => {
|
|
334
334
|
const byName = new Map((columns ?? []).map((column) => [column.name, column]));
|
|
335
335
|
return filters
|
|
336
336
|
.filter((filter) => filterIsReady(filter, byName.get(filter.property)))
|
|
337
|
-
.map((filter) =>
|
|
337
|
+
.map((filter) => filterOperatorTakesValue(filter.op)
|
|
338
|
+
? { property: filter.property, op: filter.op, value: filter.value ?? '' }
|
|
339
|
+
: { property: filter.property, op: filter.op });
|
|
338
340
|
}, [filters, columns]);
|
|
339
341
|
// One string, so the debounce below depends on a value rather than on an array
|
|
340
342
|
// identity that is new on every render.
|
|
341
|
-
const key =
|
|
343
|
+
const key = JSON.stringify(ready);
|
|
342
344
|
useEffect(() => {
|
|
343
|
-
const timer = setTimeout(() => onApplied(
|
|
345
|
+
const timer = setTimeout(() => onApplied(JSON.parse(key)), 250);
|
|
344
346
|
return () => clearTimeout(timer);
|
|
345
347
|
// `onApplied` has to be stable — a callback with a new identity every render
|
|
346
348
|
// would restart this timer on every render and never fire. The caller wraps it
|
package/dist/TraceExplorer.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { CatalogTrace,
|
|
1
|
+
import type { CatalogTrace, CatalogTracePage } from '@dudousxd/nestjs-catalog';
|
|
2
2
|
import { Upload } from 'lucide-react';
|
|
3
|
+
import { type TraceListQuery } from './context.js';
|
|
3
4
|
/**
|
|
4
5
|
* Where this screen gets its traces.
|
|
5
6
|
*
|
|
@@ -9,7 +10,7 @@ import { Upload } from 'lucide-react';
|
|
|
9
10
|
* differently from the app around it is a console nobody trusts.
|
|
10
11
|
*/
|
|
11
12
|
export interface CatalogTraceSource {
|
|
12
|
-
listTraces(query:
|
|
13
|
+
listTraces(query: TraceListQuery): Promise<CatalogTracePage>;
|
|
13
14
|
/**
|
|
14
15
|
* One trace, with the payloads the list leaves in the database.
|
|
15
16
|
*
|
package/dist/TraceExplorer.js
CHANGED
|
@@ -47,21 +47,29 @@ function toTraceList(value) {
|
|
|
47
47
|
if (typeof value !== 'object' || value === null) {
|
|
48
48
|
throw new Error('The trace endpoint answered with something that is not a trace list.');
|
|
49
49
|
}
|
|
50
|
-
const rawTraces = Reflect.get(value, '
|
|
50
|
+
const rawTraces = Reflect.get(value, 'data');
|
|
51
51
|
if (!Array.isArray(rawTraces)) {
|
|
52
52
|
throw new Error('The trace endpoint answered without a list of traces.');
|
|
53
53
|
}
|
|
54
54
|
const rawUnlinked = Reflect.get(value, 'unlinked');
|
|
55
55
|
const traces = rawTraces.filter(isTrace);
|
|
56
|
+
const rawMeta = Reflect.get(value, 'meta');
|
|
57
|
+
const meta = typeof rawMeta === 'object' && rawMeta !== null ? rawMeta : {};
|
|
58
|
+
// The server's own count when it sent one. Falling back to the page length
|
|
59
|
+
// is a deliberate under-claim: "showing 25 of 25" is wrong but harmless,
|
|
60
|
+
// where a fabricated larger total would put a page nobody can reach behind
|
|
61
|
+
// a control that promises one.
|
|
62
|
+
const total = numberOr(Reflect.get(meta, 'total'), traces.length);
|
|
63
|
+
const perPage = Math.max(1, numberOr(Reflect.get(meta, 'perPage'), traces.length || 1));
|
|
56
64
|
return {
|
|
57
|
-
traces,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
+
data: traces,
|
|
66
|
+
meta: {
|
|
67
|
+
total,
|
|
68
|
+
perPage,
|
|
69
|
+
currentPage: numberOr(Reflect.get(meta, 'currentPage'), 1),
|
|
70
|
+
lastPage: numberOr(Reflect.get(meta, 'lastPage'), Math.max(1, Math.ceil(total / perPage))),
|
|
71
|
+
firstPage: 1,
|
|
72
|
+
},
|
|
65
73
|
unlinked: Array.isArray(rawUnlinked) ? rawUnlinked.filter(isAuditEvent) : [],
|
|
66
74
|
unlinkedTotal: numberOr(Reflect.get(value, 'unlinkedTotal'), 0),
|
|
67
75
|
clockResolutionMs: numberOr(Reflect.get(value, 'clockResolutionMs'), 1),
|
|
@@ -230,7 +238,7 @@ export function TraceExplorer({ source } = {}) {
|
|
|
230
238
|
const { data, isLoading, isFetching, error, refetch } = useQuery({
|
|
231
239
|
queryKey: ['catalog', 'traces', outcome],
|
|
232
240
|
queryFn: () => traces
|
|
233
|
-
? traces.listTraces({ outcome: outcome || undefined,
|
|
241
|
+
? traces.listTraces({ outcome: outcome || undefined, size: 50 })
|
|
234
242
|
: Promise.reject(new Error('No trace source')),
|
|
235
243
|
enabled: traces !== undefined,
|
|
236
244
|
// Short, because a running trace is the case this screen exists for and a
|
|
@@ -244,7 +252,7 @@ export function TraceExplorer({ source } = {}) {
|
|
|
244
252
|
// throws. Nested providers are a no-op, so the shared case costs nothing.
|
|
245
253
|
return (_jsx(TooltipProvider, { children: _jsxs("div", { className: "space-y-4", children: [_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [OUTCOME_FILTERS.map((filter) => (_jsx("button", { type: "button", onClick: () => setOutcome(filter.id), className: cn('rounded-md border px-2.5 py-1 text-xs transition-colors', filter.id === outcome
|
|
246
254
|
? 'border-zinc-400 bg-zinc-100 text-zinc-950 dark:border-zinc-600 dark:bg-zinc-800 dark:text-zinc-50'
|
|
247
|
-
: cn(RULE, 'hover:bg-zinc-50 dark:hover:bg-zinc-800/60', MUTED)), children: filter.label }, filter.id || 'all'))), _jsx(Tooltip, { content: "Re-read the trail now", children: _jsx("button", { type: "button", onClick: () => void refetch(), "aria-label": "Refresh traces", className: cn('ml-auto rounded-md border p-1.5 transition-colors', RULE, 'hover:bg-zinc-50 dark:hover:bg-zinc-800/60'), children: _jsx(RefreshCw, { size: 13, className: cn(isFetching && 'animate-spin') }) }) })] }), isLoading && (_jsx("p", { className: cn('py-10 text-center font-mono text-sm', MUTED), children: "Reassembling the trail\u2026" })), error && (_jsx("p", { className: cn('rounded-lg border border-red-300 bg-red-50 px-4 py-3 text-sm text-red-700', 'dark:border-red-900 dark:bg-red-950/40 dark:text-red-300'), children: error instanceof Error ? error.message : String(error) })), data && data.
|
|
255
|
+
: cn(RULE, 'hover:bg-zinc-50 dark:hover:bg-zinc-800/60', MUTED)), children: filter.label }, filter.id || 'all'))), _jsx(Tooltip, { content: "Re-read the trail now", children: _jsx("button", { type: "button", onClick: () => void refetch(), "aria-label": "Refresh traces", className: cn('ml-auto rounded-md border p-1.5 transition-colors', RULE, 'hover:bg-zinc-50 dark:hover:bg-zinc-800/60'), children: _jsx(RefreshCw, { size: 13, className: cn(isFetching && 'animate-spin') }) }) })] }), isLoading && (_jsx("p", { className: cn('py-10 text-center font-mono text-sm', MUTED), children: "Reassembling the trail\u2026" })), error && (_jsx("p", { className: cn('rounded-lg border border-red-300 bg-red-50 px-4 py-3 text-sm text-red-700', 'dark:border-red-900 dark:bg-red-950/40 dark:text-red-300'), children: error instanceof Error ? error.message : String(error) })), data && data.data.length === 0 && (_jsx("p", { className: cn('rounded-lg border border-dashed px-4 py-12 text-center text-sm', RULE, MUTED), children: "No trace matches. Every trace is one snapshot id \u2014 publish something, or run a connector, and its whole story appears here." })), _jsx("div", { className: "space-y-2", children: (data?.data ?? []).map((trace) => (_jsx(TraceCard, { trace: trace, source: traces, expanded: open === trace.id, onToggle: () => setOpen(open === trace.id ? null : trace.id) }, trace.id))) }), data && data.meta.total > data.data.length && (_jsxs("p", { className: cn('text-center font-mono text-[10px]', MUTED), children: ["Showing ", data.data.length, " of ", data.meta.total, " traces."] })), data && data.unlinked.length > 0 && _jsx(Unlinked, { list: data.unlinked })] }) }));
|
|
248
256
|
}
|
|
249
257
|
/**
|
|
250
258
|
* The steps of one expanded trace.
|
package/dist/context.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CallableWorkflowRef, CatalogAuditEvent, CatalogConnection, CatalogConnector, CatalogObjectPage, CatalogQueryRelation, CatalogQueryResult, CatalogReusableNode, CatalogRevision,
|
|
1
|
+
import type { CallableWorkflowRef, CatalogAuditEvent, CatalogConnection, CatalogConnector, CatalogObjectPage, CatalogQueryRelation, CatalogQueryResult, CatalogReusableNode, CatalogRevision, CatalogSearchResponse, CatalogSnapshot, CatalogTrace, CatalogTraceOutcome, CatalogTracePage, CatalogTransform, ConnectionCheck, ConnectorRun, Dashboard, DashboardCard, DeleteReconciliation, LoadExpectation, LoadExpectationInput, ObjectQueryParams, OffsetPage, PropertyPatch, ResolvedLoadExpectation, ReusableNodeBody, RowCountBound, SaveQueryInput, SavedQuery, SnapshotRef, StoredLoadExpectation, TransformLanguage, TransformMode, TransformResult, TypePatch } from '@dudousxd/nestjs-catalog/client';
|
|
2
2
|
import { type ReactNode } from 'react';
|
|
3
3
|
import type { EmbeddedChartPayload, EmbeddedDashboardPayload } from './embed/payload.js';
|
|
4
4
|
import { type PeopleQuery } from './routes.js';
|
|
@@ -383,13 +383,37 @@ export interface CatalogPrincipalSummary {
|
|
|
383
383
|
lastSeenAt: string | null;
|
|
384
384
|
ownedTypes: string[];
|
|
385
385
|
}
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
386
|
+
/**
|
|
387
|
+
* One page of people, in the Aviary offset list envelope. `meta.total` is how
|
|
388
|
+
* many match, ignoring the page.
|
|
389
|
+
*/
|
|
390
|
+
export type CatalogPeoplePage = OffsetPage<CatalogPersonSummary>;
|
|
391
|
+
/**
|
|
392
|
+
* What the audit feed can be narrowed by. Sent as `filter[event]`,
|
|
393
|
+
* `filter[type]`, `filter[principal]` and `filter[occurredAt][gte]`.
|
|
394
|
+
*/
|
|
395
|
+
export interface AuditEventFilters {
|
|
396
|
+
event?: string;
|
|
397
|
+
typeName?: string;
|
|
398
|
+
principalId?: string;
|
|
399
|
+
/** ISO timestamp; events at or after it. */
|
|
400
|
+
since?: string;
|
|
392
401
|
}
|
|
402
|
+
/** `GET events`: the newest `size` events, newest first. */
|
|
403
|
+
export interface EventListQuery extends AuditEventFilters {
|
|
404
|
+
size?: number;
|
|
405
|
+
}
|
|
406
|
+
/** `GET events/traces`: one offset page of traces. */
|
|
407
|
+
export interface TraceListQuery extends AuditEventFilters {
|
|
408
|
+
/** One outcome, or any of several. Sent as `filter[outcome]=a,b`. */
|
|
409
|
+
outcome?: CatalogTraceOutcome | CatalogTraceOutcome[];
|
|
410
|
+
page?: number;
|
|
411
|
+
size?: number;
|
|
412
|
+
}
|
|
413
|
+
/** The `filter[...]` query parameters for the audit filters. Empty values are left out. */
|
|
414
|
+
export declare function auditFilterParams(query: AuditEventFilters & {
|
|
415
|
+
outcome?: TraceListQuery['outcome'];
|
|
416
|
+
}): Record<string, string>;
|
|
393
417
|
/** A person: signs in, and acts through an application that caps them. */
|
|
394
418
|
export interface CatalogPersonSummary {
|
|
395
419
|
email: string;
|
|
@@ -461,11 +485,12 @@ export interface CatalogClient {
|
|
|
461
485
|
* would live in whichever screen was written last — see the block above
|
|
462
486
|
* `CatalogService.search`, which makes the argument where the code is.
|
|
463
487
|
*
|
|
464
|
-
* `
|
|
465
|
-
* is asked for, and the answer carries `total` and `truncated`
|
|
466
|
-
* say "50 of 312" rather than implying the list it
|
|
488
|
+
* `size` is the caller's request and the server's decision: it caps whatever
|
|
489
|
+
* is asked for, and the answer carries `total` and `truncated` beside the hits
|
|
490
|
+
* in `data`, so a screen can say "50 of 312" rather than implying the list it
|
|
491
|
+
* drew is the list.
|
|
467
492
|
*/
|
|
468
|
-
search(term: string,
|
|
493
|
+
search(term: string, size?: number): Promise<CatalogSearchResponse>;
|
|
469
494
|
workspaceCapabilities(): Promise<{
|
|
470
495
|
workspace: boolean;
|
|
471
496
|
query: boolean;
|
|
@@ -549,12 +574,10 @@ export interface CatalogClient {
|
|
|
549
574
|
*/
|
|
550
575
|
embedChart(id: string): Promise<EmbeddedChartPayload>;
|
|
551
576
|
embedDashboard(id: string): Promise<EmbeddedDashboardPayload>;
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
limit?: number;
|
|
557
|
-
}): Promise<CatalogAuditEvent[]>;
|
|
577
|
+
/** The newest events, newest first, as `{ data }` — the feed has no pages. */
|
|
578
|
+
listEvents(query: EventListQuery): Promise<{
|
|
579
|
+
data: CatalogAuditEvent[];
|
|
580
|
+
}>;
|
|
558
581
|
/**
|
|
559
582
|
* The same events, grouped into one causal story each.
|
|
560
583
|
*
|
|
@@ -562,7 +585,7 @@ export interface CatalogClient {
|
|
|
562
585
|
* happened recently" and a trace answers "what happened during that load",
|
|
563
586
|
* and collapsing the two would cost the first question its answer.
|
|
564
587
|
*/
|
|
565
|
-
listTraces(query:
|
|
588
|
+
listTraces(query: TraceListQuery): Promise<CatalogTracePage>;
|
|
566
589
|
/**
|
|
567
590
|
* One trace, with the event payloads `listTraces` leaves behind.
|
|
568
591
|
*
|
|
@@ -674,7 +697,10 @@ export interface CatalogClient {
|
|
|
674
697
|
* having done nothing.
|
|
675
698
|
*/
|
|
676
699
|
publishType(name: string, schema: unknown): Promise<unknown>;
|
|
677
|
-
|
|
700
|
+
/** The newest runs, optionally of one connector, as `{ data }`. */
|
|
701
|
+
listRuns(connectorId?: string, size?: number): Promise<{
|
|
702
|
+
data: ConnectorRun[];
|
|
703
|
+
}>;
|
|
678
704
|
/**
|
|
679
705
|
* What one type promises about deletes and row counts, resolved.
|
|
680
706
|
*
|
|
@@ -946,7 +972,7 @@ export declare function useCatalogClient(): CatalogClient;
|
|
|
946
972
|
export declare const catalogQueryKeys: {
|
|
947
973
|
all: readonly ["nestjs-catalog"];
|
|
948
974
|
snapshot: readonly ["nestjs-catalog", "snapshot"];
|
|
949
|
-
objects: (type: string, params: ObjectQueryParams) => readonly ["nestjs-catalog", "objects", string,
|
|
975
|
+
objects: (type: string, params: ObjectQueryParams) => readonly ["nestjs-catalog", "objects", string, import("@dudousxd/nestjs-catalog").CatalogObjectListParams];
|
|
950
976
|
/**
|
|
951
977
|
* A type's loads, keyed by type and NOT by the read's parameters.
|
|
952
978
|
*
|
|
@@ -966,7 +992,7 @@ export declare const catalogQueryKeys: {
|
|
|
966
992
|
* reload should invalidate `catalogQueryKeys.all`, which is what that prefix
|
|
967
993
|
* is for.
|
|
968
994
|
*/
|
|
969
|
-
search: (term: string,
|
|
995
|
+
search: (term: string, size?: number) => readonly ["nestjs-catalog", "search", string, number | null];
|
|
970
996
|
/**
|
|
971
997
|
* The pipeline keys are nested under one prefix so a host — or a screen that
|
|
972
998
|
* just ran a pipeline — can invalidate the whole of it at once. Running one
|
package/dist/context.js
CHANGED
|
@@ -1,7 +1,34 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { catalogRoutes } from '@dudousxd/nestjs-catalog/client';
|
|
2
|
+
import { catalogRoutes, objectQueryParams } from '@dudousxd/nestjs-catalog/client';
|
|
3
3
|
import { createContext, useContext, useMemo } from 'react';
|
|
4
4
|
import { DEFAULT_ACCESS_BASE_PATH, DEFAULT_PIPELINE_BASE_PATH, DEFAULT_PUBLISH_BASE_PATH, accessRoutes, embedRoutes, pipelineRoutes, } from './routes.js';
|
|
5
|
+
/** The `filter[...]` query parameters for the audit filters. Empty values are left out. */
|
|
6
|
+
export function auditFilterParams(query) {
|
|
7
|
+
const out = {};
|
|
8
|
+
if (query.event)
|
|
9
|
+
out['filter[event]'] = query.event;
|
|
10
|
+
if (query.typeName)
|
|
11
|
+
out['filter[type]'] = query.typeName;
|
|
12
|
+
if (query.principalId)
|
|
13
|
+
out['filter[principal]'] = query.principalId;
|
|
14
|
+
if (query.since)
|
|
15
|
+
out['filter[occurredAt][gte]'] = query.since;
|
|
16
|
+
const outcomes = query.outcome === undefined
|
|
17
|
+
? []
|
|
18
|
+
: Array.isArray(query.outcome)
|
|
19
|
+
? query.outcome
|
|
20
|
+
: [query.outcome];
|
|
21
|
+
if (outcomes.length > 0)
|
|
22
|
+
out['filter[outcome]'] = outcomes.join(',');
|
|
23
|
+
return out;
|
|
24
|
+
}
|
|
25
|
+
/** Page params, omitted when unset so a transport never sends `size=`. */
|
|
26
|
+
function pageParams(query) {
|
|
27
|
+
return {
|
|
28
|
+
...(query.page === undefined ? {} : { page: query.page }),
|
|
29
|
+
...(query.size === undefined ? {} : { size: query.size }),
|
|
30
|
+
};
|
|
31
|
+
}
|
|
5
32
|
const CatalogContext = createContext(null);
|
|
6
33
|
export function CatalogProvider({ transport, pipelineBasePath = DEFAULT_PIPELINE_BASE_PATH, publishBasePath = DEFAULT_PUBLISH_BASE_PATH, accessBasePath = DEFAULT_ACCESS_BASE_PATH, children, }) {
|
|
7
34
|
const client = useMemo(() => {
|
|
@@ -9,23 +36,19 @@ export function CatalogProvider({ transport, pipelineBasePath = DEFAULT_PIPELINE
|
|
|
9
36
|
const access = accessRoutes(accessBasePath);
|
|
10
37
|
return {
|
|
11
38
|
snapshot: () => transport.get(catalogRoutes.snapshot()),
|
|
12
|
-
objects: (type, params) => transport.get(catalogRoutes.objects(type),
|
|
13
|
-
...params,
|
|
14
|
-
}),
|
|
39
|
+
objects: (type, params) => transport.get(catalogRoutes.objects(type), objectQueryParams(params)),
|
|
15
40
|
snapshots: (type) => transport.get(catalogRoutes.snapshots(type)),
|
|
16
41
|
patchType: (name, patch) => transport.patch(catalogRoutes.type(name), patch),
|
|
17
42
|
patchProperty: (name, property, patch) => transport.patch(catalogRoutes.property(name, property), patch),
|
|
18
43
|
reset: () => transport.post(catalogRoutes.reset()),
|
|
19
44
|
queryRelations: () => transport.get(catalogRoutes.queryRelations()),
|
|
20
45
|
runQuery: (input) => transport.post(catalogRoutes.query(), input),
|
|
21
|
-
// `
|
|
46
|
+
// `size` is omitted rather than sent undefined when nobody asked for
|
|
22
47
|
// one, for the reason `listRuns` states below: a transport that
|
|
23
|
-
// serialises `
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
q: term,
|
|
28
|
-
...(limit === undefined ? {} : { limit }),
|
|
48
|
+
// serialises `size=` hands the server an empty string.
|
|
49
|
+
search: (term, size) => transport.get(catalogRoutes.search(), {
|
|
50
|
+
search: term,
|
|
51
|
+
...pageParams({ size }),
|
|
29
52
|
}),
|
|
30
53
|
workspaceCapabilities: () => transport.get(catalogRoutes.workspaceCapabilities()),
|
|
31
54
|
listSavedQueries: () => transport.get(catalogRoutes.savedQueries()),
|
|
@@ -49,8 +72,14 @@ export function CatalogProvider({ transport, pipelineBasePath = DEFAULT_PIPELINE
|
|
|
49
72
|
deleteDashboard: (id) => transport.delete(catalogRoutes.dashboard(id)),
|
|
50
73
|
embedChart: (id) => transport.get(embedRoutes.chart(id)),
|
|
51
74
|
embedDashboard: (id) => transport.get(embedRoutes.dashboard(id)),
|
|
52
|
-
listEvents: (query) => transport.get(catalogRoutes.events(), {
|
|
53
|
-
|
|
75
|
+
listEvents: (query) => transport.get(catalogRoutes.events(), {
|
|
76
|
+
...auditFilterParams(query),
|
|
77
|
+
...pageParams(query),
|
|
78
|
+
}),
|
|
79
|
+
listTraces: (query) => transport.get(catalogRoutes.traces(), {
|
|
80
|
+
...auditFilterParams(query),
|
|
81
|
+
...pageParams(query),
|
|
82
|
+
}),
|
|
54
83
|
getTrace: (id) => transport.get(catalogRoutes.trace(id)),
|
|
55
84
|
pipelineCapabilities: () => transport.get(pipeline.capabilities()),
|
|
56
85
|
listCallableWorkflows: () => transport.get(pipeline.callableWorkflows()),
|
|
@@ -73,7 +102,10 @@ export function CatalogProvider({ transport, pipelineBasePath = DEFAULT_PIPELINE
|
|
|
73
102
|
// named, because a transport that serialises `connector=` turns "every
|
|
74
103
|
// run" into "runs of the connector whose id is the empty string", which
|
|
75
104
|
// is an empty list that looks like a system that has never run anything.
|
|
76
|
-
listRuns: (connectorId) => transport.get(pipeline.runs(),
|
|
105
|
+
listRuns: (connectorId, size) => transport.get(pipeline.runs(), {
|
|
106
|
+
...(connectorId ? { 'filter[connector]': connectorId } : {}),
|
|
107
|
+
...pageParams({ size }),
|
|
108
|
+
}),
|
|
77
109
|
loadExpectation: (typeName) => transport.get(pipeline.loadExpectation(typeName)),
|
|
78
110
|
setLoadExpectation: (typeName, input) => {
|
|
79
111
|
if (!transport.put) {
|
|
@@ -181,7 +213,7 @@ export const catalogQueryKeys = {
|
|
|
181
213
|
* reload should invalidate `catalogQueryKeys.all`, which is what that prefix
|
|
182
214
|
* is for.
|
|
183
215
|
*/
|
|
184
|
-
search: (term,
|
|
216
|
+
search: (term, size) => ['nestjs-catalog', 'search', term, size ?? null],
|
|
185
217
|
/**
|
|
186
218
|
* The pipeline keys are nested under one prefix so a host — or a screen that
|
|
187
219
|
* just ran a pipeline — can invalidate the whole of it at once. Running one
|
package/dist/index.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export { WORKFLOW_NAME } from './workflow/name.js';
|
|
|
29
29
|
export { checkShapes, type ShapeKnowledge, type SourceColumn, type SourceShape, type TargetProperty, type TargetShape, } from './workflow/shape.js';
|
|
30
30
|
export { canConnect, type ConnectionVerdict, edgeId, hasBlockingProblem, problemsByNode, type ValidateOptions, validateWorkflow, type WorkflowDraft, type WorkflowProblem, type WorkflowProblemCode, type WorkflowProblemLevel, wouldCycle, } from './workflow/validate.js';
|
|
31
31
|
export { attachTransformIds, buildWorkflowTemplate, type EnrichOptions, enrichWithLookup, fanOutTypes, type FanOutOptions, type FanOutTarget, FILE_DROP_KINDS, type FileDropOptions, joinSources, type JoinOptions, loadFileDrop, type PeriodicFullReloadOptions, periodicFullReload, planIsRunnable, planToWorkflowInput, refuseUnusableColumnNames, RELOAD_CADENCE_IDS, RELOAD_CADENCES, type ReloadCadence, replicateTable, type ReplicateTableOptions, SOURCE_KINDS, type TemplateDeclaration, type TemplateExpectation, type TemplateOutcome, type TemplatePlan, type TemplateRefusal, type TemplateRefusalCode, type TemplateRequest, type TemplateSchedule, type TemplateTransformRequest, withinMsFor, WORKFLOW_TEMPLATE_IDS, WORKFLOW_TEMPLATES, type WorkflowTemplateId, type WorkflowTemplateMeta, } from './workflow/templates.js';
|
|
32
|
-
export { type CatalogClient, type CatalogIdentity, type CatalogRevision, type CatalogPeoplePage, type CatalogPersonRole, type CatalogPersonSummary, type CatalogPrincipalSummary, CatalogProvider, type CatalogProviderProps, type CatalogTransport, type ConnectionInput, type ConnectionUse, catalogQueryKeys, type DeleteReconciliation, type LoadExpectation, type LoadExpectationInput, type ResolvedLoadExpectation, type RowCountBound, type StoredLoadExpectation, type PersonInput, type PersonUpsertResult, type PipelineCapabilities, type CallableWorkflowList, type ScheduledWorkflow, type TransformInput, type ListedReusableNode, type ReusableNodeInput, type ReusableNodeUsage, type SavedNodeAsReusable, type WorkflowReleaseInput, type WorkflowRunOptions, type WorkflowScheduleInput, useCatalogClient, } from './context.js';
|
|
32
|
+
export { type CatalogClient, type CatalogIdentity, type CatalogRevision, type CatalogPeoplePage, type AuditEventFilters, auditFilterParams, type EventListQuery, type TraceListQuery, type CatalogPersonRole, type CatalogPersonSummary, type CatalogPrincipalSummary, CatalogProvider, type CatalogProviderProps, type CatalogTransport, type ConnectionInput, type ConnectionUse, catalogQueryKeys, type DeleteReconciliation, type LoadExpectation, type LoadExpectationInput, type ResolvedLoadExpectation, type RowCountBound, type StoredLoadExpectation, type PersonInput, type PersonUpsertResult, type PipelineCapabilities, type CallableWorkflowList, type ScheduledWorkflow, type TransformInput, type ListedReusableNode, type ReusableNodeInput, type ReusableNodeUsage, type SavedNodeAsReusable, type WorkflowReleaseInput, type WorkflowRunOptions, type WorkflowScheduleInput, useCatalogClient, } from './context.js';
|
|
33
33
|
export { type AccessRoutes, accessRoutes, DEFAULT_ACCESS_BASE_PATH, DEFAULT_PIPELINE_BASE_PATH, DEFAULT_PUBLISH_BASE_PATH, embedRoutes, type PeopleQuery, type PipelineRoutes, pipelineRoutes, } from './routes.js';
|
|
34
34
|
export { ConfirmDialog } from './ui/dialog.js';
|
|
35
35
|
export { FieldGroup, TextAreaField, TextField } from './ui/field.js';
|
package/dist/index.js
CHANGED
|
@@ -137,7 +137,7 @@ export { canConnect, edgeId, hasBlockingProblem, problemsByNode, validateWorkflo
|
|
|
137
137
|
// what it would decide — without installing a canvas to do it. Whether a screen
|
|
138
138
|
// then draws the result is the canvas's business, not the template's.
|
|
139
139
|
export { attachTransformIds, buildWorkflowTemplate, enrichWithLookup, fanOutTypes, FILE_DROP_KINDS, joinSources, loadFileDrop, periodicFullReload, planIsRunnable, planToWorkflowInput, refuseUnusableColumnNames, RELOAD_CADENCE_IDS, RELOAD_CADENCES, replicateTable, SOURCE_KINDS, withinMsFor, WORKFLOW_TEMPLATE_IDS, WORKFLOW_TEMPLATES, } from './workflow/templates.js';
|
|
140
|
-
export { CatalogProvider, catalogQueryKeys, useCatalogClient, } from './context.js';
|
|
140
|
+
export { auditFilterParams, CatalogProvider, catalogQueryKeys, useCatalogClient, } from './context.js';
|
|
141
141
|
// The paths behind the pipeline and access screens, exported so a host can
|
|
142
142
|
// mount those endpoints wherever it likes and tell the provider where they are.
|
|
143
143
|
// See routes.ts for why they are here rather than in the server package.
|
package/dist/routes.d.ts
CHANGED
|
@@ -328,9 +328,10 @@ export interface AccessRoutes {
|
|
|
328
328
|
*/
|
|
329
329
|
people(query?: PeopleQuery): string;
|
|
330
330
|
}
|
|
331
|
+
/** `search`, plus the Aviary offset paging params `page` (1-based) and `size`. */
|
|
331
332
|
export interface PeopleQuery {
|
|
332
333
|
search?: string;
|
|
333
|
-
|
|
334
|
-
|
|
334
|
+
page?: number;
|
|
335
|
+
size?: number;
|
|
335
336
|
}
|
|
336
337
|
export declare function accessRoutes(basePath?: string): AccessRoutes;
|
package/dist/routes.js
CHANGED
|
@@ -170,10 +170,10 @@ export function accessRoutes(basePath = DEFAULT_ACCESS_BASE_PATH) {
|
|
|
170
170
|
const params = new URLSearchParams();
|
|
171
171
|
if (query?.search)
|
|
172
172
|
params.set('search', query.search);
|
|
173
|
-
if (query?.
|
|
174
|
-
params.set('
|
|
175
|
-
if (query?.
|
|
176
|
-
params.set('
|
|
173
|
+
if (query?.page !== undefined)
|
|
174
|
+
params.set('page', String(query.page));
|
|
175
|
+
if (query?.size !== undefined)
|
|
176
|
+
params.set('size', String(query.size));
|
|
177
177
|
const search = params.toString();
|
|
178
178
|
return search ? `${base}/people?${search}` : `${base}/people`;
|
|
179
179
|
},
|
package/dist/search-console.d.ts
CHANGED
|
@@ -14,10 +14,10 @@ export interface CatalogSearchProps {
|
|
|
14
14
|
/** Where a dashboard opens. Omit to render dashboard rows as plain rows. */
|
|
15
15
|
dashboardHref?: (id: string) => string;
|
|
16
16
|
/** How many rows to ask for. The server caps whatever this says. */
|
|
17
|
-
|
|
17
|
+
size?: number;
|
|
18
18
|
placeholder?: string;
|
|
19
19
|
/** Heading copy, so the host can call this whatever its users call it. */
|
|
20
20
|
title?: string;
|
|
21
21
|
eyebrow?: string;
|
|
22
22
|
}
|
|
23
|
-
export declare function CatalogSearch({ explorerHref, savedQueryHref, dashboardHref,
|
|
23
|
+
export declare function CatalogSearch({ explorerHref, savedQueryHref, dashboardHref, size, placeholder, title, eyebrow, }: CatalogSearchProps): import("react").JSX.Element;
|
package/dist/search-console.js
CHANGED
|
@@ -66,7 +66,7 @@ const RANK_TONE = {
|
|
|
66
66
|
* is not instant, and above the interval at which anybody types.
|
|
67
67
|
*/
|
|
68
68
|
const DEBOUNCE_MS = 200;
|
|
69
|
-
export function CatalogSearch({ explorerHref, savedQueryHref, dashboardHref,
|
|
69
|
+
export function CatalogSearch({ explorerHref, savedQueryHref, dashboardHref, size, placeholder = 'A type, a column, a report — whatever you remember', title = 'Search', eyebrow = 'Across the catalog', }) {
|
|
70
70
|
const client = useCatalogClient();
|
|
71
71
|
const [term, setTerm] = useState('');
|
|
72
72
|
const [debounced, setDebounced] = useState('');
|
|
@@ -76,8 +76,8 @@ export function CatalogSearch({ explorerHref, savedQueryHref, dashboardHref, lim
|
|
|
76
76
|
}, [term]);
|
|
77
77
|
const trimmed = debounced.trim();
|
|
78
78
|
const { data, isFetching, isError } = useQuery({
|
|
79
|
-
queryKey: catalogQueryKeys.search(trimmed,
|
|
80
|
-
queryFn: () => client.search(trimmed,
|
|
79
|
+
queryKey: catalogQueryKeys.search(trimmed, size),
|
|
80
|
+
queryFn: () => client.search(trimmed, size),
|
|
81
81
|
// An empty box asks nothing. The route answers an empty term with an empty
|
|
82
82
|
// result rather than a 400, so this is politeness rather than protection —
|
|
83
83
|
// but a request fired on mount, before anybody has typed, is a request the
|
|
@@ -89,7 +89,7 @@ export function CatalogSearch({ explorerHref, savedQueryHref, dashboardHref, lim
|
|
|
89
89
|
staleTime: 15_000,
|
|
90
90
|
});
|
|
91
91
|
const grouped = useMemo(() => {
|
|
92
|
-
const hits = data?.
|
|
92
|
+
const hits = data?.data ?? [];
|
|
93
93
|
return KIND_ORDER.map((kind) => [kind, hits.filter((hit) => hit.kind === kind)]).filter(([, rows]) => rows.length > 0);
|
|
94
94
|
}, [data]);
|
|
95
95
|
function hrefFor(hit) {
|
|
@@ -103,7 +103,7 @@ export function CatalogSearch({ explorerHref, savedQueryHref, dashboardHref, lim
|
|
|
103
103
|
return savedQueryHref?.(hit.id);
|
|
104
104
|
return dashboardHref?.(hit.id);
|
|
105
105
|
}
|
|
106
|
-
return (_jsxs("div", { className: "mx-auto flex h-full max-w-3xl flex-col px-6 py-8", children: [_jsxs("header", { className: "shrink-0", children: [_jsx("p", { className: cn('font-mono text-[10px] uppercase tracking-[0.14em]', MUTED), children: eyebrow }), _jsx("h2", { className: "mt-1 text-2xl font-semibold tracking-tight", children: title })] }), _jsxs("div", { className: "relative mt-5 shrink-0", children: [_jsx(Search, { size: 14, className: cn('pointer-events-none absolute right-2.5 top-[1.9rem] z-10', MUTED) }), _jsx(TextField, { label: "Search the catalog", value: term, onChange: setTerm, placeholder: placeholder })] }), _jsxs("div", { className: "mt-4 min-h-0 flex-1 overflow-y-auto", children: [_jsx(Status, { term: trimmed, isError: isError, isFetching: isFetching, total: data?.total, shown: data?.
|
|
106
|
+
return (_jsxs("div", { className: "mx-auto flex h-full max-w-3xl flex-col px-6 py-8", children: [_jsxs("header", { className: "shrink-0", children: [_jsx("p", { className: cn('font-mono text-[10px] uppercase tracking-[0.14em]', MUTED), children: eyebrow }), _jsx("h2", { className: "mt-1 text-2xl font-semibold tracking-tight", children: title })] }), _jsxs("div", { className: "relative mt-5 shrink-0", children: [_jsx(Search, { size: 14, className: cn('pointer-events-none absolute right-2.5 top-[1.9rem] z-10', MUTED) }), _jsx(TextField, { label: "Search the catalog", value: term, onChange: setTerm, placeholder: placeholder })] }), _jsxs("div", { className: "mt-4 min-h-0 flex-1 overflow-y-auto", children: [_jsx(Status, { term: trimmed, isError: isError, isFetching: isFetching, total: data?.total, shown: data?.data.length, truncated: data?.truncated }), grouped.map(([kind, rows]) => (_jsxs("section", { className: "mb-5", children: [_jsxs("div", { className: cn('flex items-baseline justify-between border-b px-1 pb-1', RULE), children: [_jsx("span", { className: cn('font-mono text-[10px] uppercase tracking-[0.14em]', MUTED), children: KIND_LABEL[kind] }), _jsx("span", { className: cn('font-mono text-[10px]', MUTED), children: rows.length })] }), rows.map((hit) => (_jsx(Row, { hit: hit, href: hrefFor(hit) }, `${hit.kind}:${hit.typeName ?? ''}:${hit.id}`)))] }, kind)))] })] }));
|
|
107
107
|
}
|
|
108
108
|
/**
|
|
109
109
|
* The line above the results, which has four things to say and must not confuse
|
package/dist/workflow/runs.js
CHANGED
|
@@ -60,7 +60,7 @@ function RecentRuns({ connectorId, transforms, }) {
|
|
|
60
60
|
const [comparing, setComparing] = useState(null);
|
|
61
61
|
const { data: runs = [] } = useQuery({
|
|
62
62
|
queryKey: catalogQueryKeys.runs(connectorId),
|
|
63
|
-
queryFn: () => client.listRuns(connectorId),
|
|
63
|
+
queryFn: () => client.listRuns(connectorId).then((page) => page.data),
|
|
64
64
|
});
|
|
65
65
|
const only = transforms.length === 1 ? transforms[0] : undefined;
|
|
66
66
|
if (runs.length === 0) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dudousxd/nestjs-catalog-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.36.0",
|
|
4
4
|
"description": "Ready-made React screens for @dudousxd/nestjs-catalog — a model manager and a generic object explorer you can drop into your own app shell.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Davide Carvalho",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@dnd-kit/core": ">=6",
|
|
55
55
|
"@dnd-kit/sortable": ">=10",
|
|
56
56
|
"@dnd-kit/utilities": ">=3",
|
|
57
|
-
"@dudousxd/nestjs-catalog": ">=0.
|
|
57
|
+
"@dudousxd/nestjs-catalog": ">=0.36.0",
|
|
58
58
|
"@tanstack/react-query": ">=5",
|
|
59
59
|
"@tanstack/react-table": ">=9",
|
|
60
60
|
"@tiptap/core": ">=3",
|
|
@@ -103,8 +103,8 @@
|
|
|
103
103
|
"@visx/shape": "4.0.1-alpha.0",
|
|
104
104
|
"@xyflow/react": "12.11.6",
|
|
105
105
|
"clsx": "2.1.1",
|
|
106
|
-
"d3-array": "3.2.
|
|
107
|
-
"d3-shape": "3.2.
|
|
106
|
+
"d3-array": "3.2.5",
|
|
107
|
+
"d3-shape": "3.2.1",
|
|
108
108
|
"lucide-react": "0.577.0",
|
|
109
109
|
"motion": "12.43.0",
|
|
110
110
|
"react": "19.3.1",
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
"tailwind-merge": "3.7.0",
|
|
114
114
|
"tiptap-markdown": "0.9.0",
|
|
115
115
|
"typescript": "5.9.3",
|
|
116
|
-
"@dudousxd/nestjs-catalog": "0.
|
|
116
|
+
"@dudousxd/nestjs-catalog": "0.36.0"
|
|
117
117
|
},
|
|
118
118
|
"dependencies": {
|
|
119
119
|
"clsx": "2.1.1",
|