@dudousxd/nestjs-catalog-react 0.34.2 → 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.d.ts +1 -1
- package/dist/AccessConsole.js +19 -19
- package/dist/CatalogManager.js +11 -11
- package/dist/ConnectionPanel.js +9 -9
- package/dist/CoverageLedger.js +1 -1
- package/dist/DashboardBoard.js +10 -10
- package/dist/EditableField.js +1 -1
- package/dist/FlowView.js +4 -4
- package/dist/GovernanceTimeline.d.ts +1 -1
- package/dist/GovernanceTimeline.js +10 -8
- package/dist/LoadExpectationSection.js +6 -6
- package/dist/LoadedBySection.d.ts +1 -1
- package/dist/LoadedBySection.js +4 -4
- package/dist/ObjectExplorer.js +20 -18
- package/dist/PipelineConsole.js +9 -9
- package/dist/QueryConsole.js +7 -7
- package/dist/SavedQueryPanel.js +7 -7
- package/dist/TraceExplorer.d.ts +3 -2
- package/dist/TraceExplorer.js +22 -14
- package/dist/TransformEditor.js +8 -8
- package/dist/WorkflowCanvas.js +30 -30
- package/dist/charts/bklit/area-chart-loading.d.ts +2 -2
- package/dist/charts/bklit/area-chart-loading.js +4 -4
- package/dist/charts/bklit/area-chart.d.ts +3 -3
- package/dist/charts/bklit/area-chart.js +7 -7
- package/dist/charts/bklit/area-gradient-defs.d.ts +1 -1
- package/dist/charts/bklit/area-gradient-defs.js +1 -1
- package/dist/charts/bklit/area.d.ts +4 -4
- package/dist/charts/bklit/area.js +11 -11
- package/dist/charts/bklit/bar-chart-loading.d.ts +1 -1
- package/dist/charts/bklit/bar-chart-loading.js +1 -1
- package/dist/charts/bklit/bar-chart.d.ts +2 -2
- package/dist/charts/bklit/bar-chart.js +12 -12
- package/dist/charts/bklit/bar-squares.d.ts +1 -1
- package/dist/charts/bklit/bar-squares.js +5 -5
- package/dist/charts/bklit/bar-x-axis.js +2 -2
- package/dist/charts/bklit/bar-y-axis.js +2 -2
- package/dist/charts/bklit/bar.js +4 -4
- package/dist/charts/bklit/chart-context.d.ts +4 -4
- package/dist/charts/bklit/chart-context.js +1 -1
- package/dist/charts/bklit/chart-loading-label.js +3 -3
- package/dist/charts/bklit/chart-reveal-clip.js +1 -1
- package/dist/charts/bklit/grid.js +3 -3
- package/dist/charts/bklit/highlight-segment-bounds.d.ts +2 -2
- package/dist/charts/bklit/line-chart-loading.d.ts +2 -2
- package/dist/charts/bklit/line-chart-loading.js +4 -4
- package/dist/charts/bklit/line-chart.d.ts +3 -3
- package/dist/charts/bklit/line-chart.js +6 -6
- package/dist/charts/bklit/line-loading-pulse.d.ts +1 -1
- package/dist/charts/bklit/line-loading-pulse.js +3 -3
- package/dist/charts/bklit/line-series-terminal-marker.js +2 -2
- package/dist/charts/bklit/line.d.ts +4 -4
- package/dist/charts/bklit/line.js +11 -11
- package/dist/charts/bklit/loading-sweep.js +2 -2
- package/dist/charts/bklit/motion-utils.js +1 -1
- package/dist/charts/bklit/pattern-area.js +1 -1
- package/dist/charts/bklit/pattern-preset.js +1 -1
- package/dist/charts/bklit/projection-config.d.ts +1 -1
- package/dist/charts/bklit/projection-config.js +3 -3
- package/dist/charts/bklit/projection-line-end-marker.d.ts +1 -1
- package/dist/charts/bklit/projection-line-end-marker.js +1 -1
- package/dist/charts/bklit/projection-line.d.ts +1 -1
- package/dist/charts/bklit/projection-line.js +2 -2
- package/dist/charts/bklit/reference-area-config.js +1 -1
- package/dist/charts/bklit/reference-area-registration-context.d.ts +1 -1
- package/dist/charts/bklit/series-dash-tail-overlay.js +2 -2
- package/dist/charts/bklit/series-highlight-layer.js +3 -3
- package/dist/charts/bklit/series-hover-dim.js +2 -2
- package/dist/charts/bklit/series-markers.d.ts +1 -1
- package/dist/charts/bklit/series-markers.js +4 -4
- package/dist/charts/bklit/series-point-marker.js +1 -1
- package/dist/charts/bklit/time-series-chart-shell.d.ts +2 -2
- package/dist/charts/bklit/time-series-chart-shell.js +20 -20
- package/dist/charts/bklit/tooltip/chart-tooltip.d.ts +4 -4
- package/dist/charts/bklit/tooltip/chart-tooltip.js +8 -8
- package/dist/charts/bklit/tooltip/index.d.ts +6 -6
- package/dist/charts/bklit/tooltip/index.js +6 -6
- package/dist/charts/bklit/tooltip/tooltip-box.d.ts +1 -1
- package/dist/charts/bklit/tooltip/tooltip-box.js +3 -3
- package/dist/charts/bklit/tooltip/tooltip-content.js +1 -1
- package/dist/charts/bklit/tooltip/tooltip-dot.d.ts +1 -1
- package/dist/charts/bklit/tooltip/tooltip-dot.js +2 -2
- package/dist/charts/bklit/tooltip/tooltip-indicator.d.ts +2 -2
- package/dist/charts/bklit/tooltip/tooltip-indicator.js +3 -3
- package/dist/charts/bklit/use-animated-series-path.js +2 -2
- package/dist/charts/bklit/use-animated-y-domains.d.ts +2 -2
- package/dist/charts/bklit/use-animated-y-domains.js +2 -2
- package/dist/charts/bklit/use-chart-interaction.d.ts +1 -1
- package/dist/charts/bklit/use-chart-interaction.js +2 -2
- package/dist/charts/bklit/use-chart-phase-orchestrator.d.ts +1 -1
- package/dist/charts/bklit/use-chart-phase-orchestrator.js +1 -1
- package/dist/charts/bklit/use-grid-shimmer.js +1 -1
- package/dist/charts/bklit/use-highlight-segment.js +3 -3
- package/dist/charts/bklit/use-mount-progress.js +1 -1
- package/dist/charts/bklit/x-axis.js +5 -5
- package/dist/charts/bklit/y-axis-scales.d.ts +1 -1
- package/dist/charts/bklit/y-domain-utils.d.ts +2 -2
- package/dist/charts/bklit/y-domain-utils.js +2 -2
- package/dist/charts/bklit.d.ts +1 -1
- package/dist/charts/bklit.js +11 -11
- package/dist/charts/body.js +4 -4
- package/dist/charts/components/shimmering-text.js +1 -1
- package/dist/charts/css.d.ts +2 -2
- package/dist/charts/css.js +1 -1
- package/dist/charts/recharts.d.ts +1 -1
- package/dist/charts/recharts.js +2 -2
- package/dist/charts/skeleton.js +1 -1
- package/dist/connection-form.js +3 -3
- package/dist/context.d.ts +50 -24
- package/dist/context.js +48 -16
- package/dist/diff/RevisionDiff.d.ts +1 -1
- package/dist/diff/RevisionDiff.js +7 -7
- package/dist/embed/EmbeddedChart.d.ts +2 -2
- package/dist/embed/EmbeddedChart.js +4 -4
- package/dist/embed/EmbeddedDashboard.d.ts +2 -2
- package/dist/embed/EmbeddedDashboard.js +6 -6
- package/dist/embed/actions.d.ts +1 -1
- package/dist/embed/actions.js +2 -2
- package/dist/embed/chart-card.d.ts +2 -2
- package/dist/embed/chart-card.js +7 -7
- package/dist/embed/index.d.ts +5 -5
- package/dist/embed/index.js +4 -4
- package/dist/embed/slots.js +1 -1
- package/dist/export/index.d.ts +6 -6
- package/dist/export/index.js +6 -6
- package/dist/export/pdf.d.ts +2 -2
- package/dist/export/pdf.js +2 -2
- package/dist/export/png.d.ts +1 -1
- package/dist/export/png.js +1 -1
- package/dist/export/serialize.js +1 -1
- package/dist/export/use-pdf-export.d.ts +2 -2
- package/dist/export/use-pdf-export.js +3 -3
- package/dist/export/use-png-export.d.ts +1 -1
- package/dist/export/use-png-export.js +1 -1
- package/dist/index.d.ts +46 -46
- package/dist/index.js +46 -46
- package/dist/routes.d.ts +3 -2
- package/dist/routes.js +4 -4
- package/dist/schema-discovery.js +2 -2
- package/dist/search-console.d.ts +2 -2
- package/dist/search-console.js +8 -8
- package/dist/sharing.js +2 -2
- package/dist/source-connection.d.ts +1 -1
- package/dist/source-connection.js +6 -6
- package/dist/source-fields.d.ts +2 -2
- package/dist/source-fields.js +6 -6
- package/dist/ui/button.js +1 -1
- package/dist/ui/chart.js +1 -1
- package/dist/ui/code-editor.d.ts +2 -2
- package/dist/ui/code-editor.js +2 -2
- package/dist/ui/combobox.js +1 -1
- package/dist/ui/data-table.js +1 -1
- package/dist/ui/dialog.js +1 -1
- package/dist/ui/field.js +1 -1
- package/dist/ui/rich-text-field.js +2 -2
- package/dist/ui/select.js +1 -1
- package/dist/ui/sheet.js +2 -2
- package/dist/ui/switch.js +1 -1
- package/dist/ui/tabs.js +1 -1
- package/dist/ui/tooltip.js +1 -1
- package/dist/workflow/canvas-menu.d.ts +1 -1
- package/dist/workflow/canvas-menu.js +4 -4
- package/dist/workflow/create.d.ts +1 -1
- package/dist/workflow/create.js +4 -4
- package/dist/workflow/edges.d.ts +1 -1
- package/dist/workflow/edges.js +1 -1
- package/dist/workflow/graph.d.ts +2 -2
- package/dist/workflow/graph.js +2 -2
- package/dist/workflow/history.d.ts +1 -1
- package/dist/workflow/history.js +6 -6
- package/dist/workflow/index.d.ts +4 -4
- package/dist/workflow/index.js +4 -4
- package/dist/workflow/lifecycle.d.ts +2 -2
- package/dist/workflow/lifecycle.js +8 -8
- package/dist/workflow/menu.d.ts +2 -2
- package/dist/workflow/menu.js +3 -3
- package/dist/workflow/nodes.d.ts +2 -2
- package/dist/workflow/nodes.js +3 -3
- package/dist/workflow/place.d.ts +1 -1
- package/dist/workflow/place.js +1 -1
- package/dist/workflow/removal.d.ts +1 -1
- package/dist/workflow/removal.js +1 -1
- package/dist/workflow/runs.js +6 -6
- package/dist/workflow/shape.d.ts +1 -1
- package/dist/workflow/shape.js +1 -1
- package/dist/workflow/validate.d.ts +1 -1
- package/dist/workflow/validate.js +3 -3
- package/dist/workflow/wiring.d.ts +1 -1
- package/dist/workflow/wiring.js +4 -4
- package/package.json +9 -6
package/dist/charts/recharts.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Area, AreaChart, Bar, BarChart, CartesianGrid, Line, LineChart, XAxis, YAxis, } from 'recharts';
|
|
3
|
-
import { ChartContainer, ChartLegend, ChartLegendContent, ChartTooltip, ChartTooltipContent, } from '../ui/chart';
|
|
4
|
-
import { seriesFrom } from './registry';
|
|
3
|
+
import { ChartContainer, ChartLegend, ChartLegendContent, ChartTooltip, ChartTooltipContent, } from '../ui/chart.js';
|
|
4
|
+
import { seriesFrom } from './registry.js';
|
|
5
5
|
/**
|
|
6
6
|
* The shadcn/ui chart renderer.
|
|
7
7
|
*
|
package/dist/charts/skeleton.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from '../cn';
|
|
2
|
+
import { cn } from '../cn.js';
|
|
3
3
|
/** Deterministic, so the skeleton does not reshuffle on every render. */
|
|
4
4
|
function heights(count) {
|
|
5
5
|
const pattern = [0.55, 0.8, 0.42, 0.95, 0.62, 0.74, 0.35, 0.86, 0.5, 0.68];
|
package/dist/connection-form.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { CONNECTOR_KINDS, REDACTED_SECRET } from '@dudousxd/nestjs-catalog/client';
|
|
3
3
|
import { CircleCheck, CircleX } from 'lucide-react';
|
|
4
|
-
import { cn } from './cn';
|
|
5
|
-
import { FieldGroup, TextField } from './ui/field';
|
|
6
|
-
import { Switch } from './ui/switch';
|
|
4
|
+
import { cn } from './cn.js';
|
|
5
|
+
import { FieldGroup, TextField } from './ui/field.js';
|
|
6
|
+
import { Switch } from './ui/switch.js';
|
|
7
7
|
/**
|
|
8
8
|
* Describing where a *shared address* lives, in one place.
|
|
9
9
|
*
|
package/dist/context.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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
|
-
import type { EmbeddedChartPayload, EmbeddedDashboardPayload } from './embed/payload';
|
|
4
|
-
import { type PeopleQuery } from './routes';
|
|
5
|
-
import type { CatalogWorkflow, CatalogWorkflowRelease, StorageAvailability, WorkflowDurability, WorkflowInput, WorkflowRun } from './workflow/model';
|
|
3
|
+
import type { EmbeddedChartPayload, EmbeddedDashboardPayload } from './embed/payload.js';
|
|
4
|
+
import { type PeopleQuery } from './routes.js';
|
|
5
|
+
import type { CatalogWorkflow, CatalogWorkflowRelease, StorageAvailability, WorkflowDurability, WorkflowInput, WorkflowRun } from './workflow/model.js';
|
|
6
6
|
/**
|
|
7
7
|
* How these screens talk to the server.
|
|
8
8
|
*
|
|
@@ -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
|
-
import { DEFAULT_ACCESS_BASE_PATH, DEFAULT_PIPELINE_BASE_PATH, DEFAULT_PUBLISH_BASE_PATH, accessRoutes, embedRoutes, pipelineRoutes, } from './routes';
|
|
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
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CatalogCodeLanguage } from '../ui/code-languages';
|
|
1
|
+
import type { CatalogCodeLanguage } from '../ui/code-languages.js';
|
|
2
2
|
/** Which of the two editable things in this catalog is being compared. */
|
|
3
3
|
export type RevisionSubjectKind = 'transform' | 'saved-query';
|
|
4
4
|
export interface RevisionSubject {
|
|
@@ -5,13 +5,13 @@ import { MultiFileDiff } from '@pierre/diffs/react';
|
|
|
5
5
|
import { useQuery } from '@tanstack/react-query';
|
|
6
6
|
import { GitCompare, History } from 'lucide-react';
|
|
7
7
|
import { useMemo, useState } from 'react';
|
|
8
|
-
import { cn } from '../cn';
|
|
9
|
-
import { catalogQueryKeys, useCatalogClient } from '../context';
|
|
10
|
-
import { Button } from '../ui/button';
|
|
11
|
-
import { codeOptions } from '../ui/code-editor';
|
|
12
|
-
import { useCodeThemeType } from '../ui/code-theme';
|
|
13
|
-
import { SelectField } from '../ui/select';
|
|
14
|
-
import { Sheet } from '../ui/sheet';
|
|
8
|
+
import { cn } from '../cn.js';
|
|
9
|
+
import { catalogQueryKeys, useCatalogClient } from '../context.js';
|
|
10
|
+
import { Button } from '../ui/button.js';
|
|
11
|
+
import { codeOptions } from '../ui/code-editor.js';
|
|
12
|
+
import { useCodeThemeType } from '../ui/code-theme.js';
|
|
13
|
+
import { SelectField } from '../ui/select.js';
|
|
14
|
+
import { Sheet } from '../ui/sheet.js';
|
|
15
15
|
/**
|
|
16
16
|
* Why a load came out different from the last one.
|
|
17
17
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { EmbedActions } from './actions';
|
|
2
|
-
import { type EmbedFailureSlot, type EmbedLoadingSlot } from './slots';
|
|
1
|
+
import type { EmbedActions } from './actions.js';
|
|
2
|
+
import { type EmbedFailureSlot, type EmbedLoadingSlot } from './slots.js';
|
|
3
3
|
/**
|
|
4
4
|
* One shared chart, for a host application's own page.
|
|
5
5
|
*
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useQuery } from '@tanstack/react-query';
|
|
3
|
-
import { cn } from '../cn';
|
|
4
|
-
import { catalogQueryKeys, useCatalogClient } from '../context';
|
|
5
|
-
import { EmbeddedChartCard } from './chart-card';
|
|
6
|
-
import { renderFailure, renderLoading, } from './slots';
|
|
3
|
+
import { cn } from '../cn.js';
|
|
4
|
+
import { catalogQueryKeys, useCatalogClient } from '../context.js';
|
|
5
|
+
import { EmbeddedChartCard } from './chart-card.js';
|
|
6
|
+
import { renderFailure, renderLoading, } from './slots.js';
|
|
7
7
|
export function EmbeddedChart({ chartId, actions, loading, failure, height = 200, className, }) {
|
|
8
8
|
const client = useCatalogClient();
|
|
9
9
|
const { data, isPending, error } = useQuery({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import type { EmbedActions } from './actions';
|
|
3
|
-
import { type EmbedFailureSlot, type EmbedLoadingSlot } from './slots';
|
|
2
|
+
import type { EmbedActions } from './actions.js';
|
|
3
|
+
import { type EmbedFailureSlot, type EmbedLoadingSlot } from './slots.js';
|
|
4
4
|
/**
|
|
5
5
|
* A whole shared dashboard, in a host application's own page.
|
|
6
6
|
*
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useQuery } from '@tanstack/react-query';
|
|
3
|
-
import { CHART_GRID, chartSpan } from '../charts/grid';
|
|
4
|
-
import { cn } from '../cn';
|
|
5
|
-
import { catalogQueryKeys, useCatalogClient } from '../context';
|
|
6
|
-
import { EmbeddedChartCard } from './chart-card';
|
|
7
|
-
import { chartsInLayoutOrder } from './payload';
|
|
8
|
-
import { renderFailure, renderLoading, } from './slots';
|
|
3
|
+
import { CHART_GRID, chartSpan } from '../charts/grid.js';
|
|
4
|
+
import { cn } from '../cn.js';
|
|
5
|
+
import { catalogQueryKeys, useCatalogClient } from '../context.js';
|
|
6
|
+
import { EmbeddedChartCard } from './chart-card.js';
|
|
7
|
+
import { chartsInLayoutOrder } from './payload.js';
|
|
8
|
+
import { renderFailure, renderLoading, } from './slots.js';
|
|
9
9
|
export function EmbeddedDashboard({ dashboardId, actions, loading, failure, height = 200, empty, className, }) {
|
|
10
10
|
const client = useCatalogClient();
|
|
11
11
|
const { data, isPending, error } = useQuery({
|
package/dist/embed/actions.d.ts
CHANGED
package/dist/embed/actions.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { usePdfExport } from '../export/use-pdf-export';
|
|
2
|
-
import { useHasExportableSvg } from '../export/use-png-export';
|
|
1
|
+
import { usePdfExport } from '../export/use-pdf-export.js';
|
|
2
|
+
import { useHasExportableSvg } from '../export/use-png-export.js';
|
|
3
3
|
/**
|
|
4
4
|
* Every action, in the order a toolbar draws them.
|
|
5
5
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type EmbedActions } from './actions';
|
|
2
|
-
import type { EmbeddedChartPayload } from './payload';
|
|
1
|
+
import { type EmbedActions } from './actions.js';
|
|
2
|
+
import type { EmbeddedChartPayload } from './payload.js';
|
|
3
3
|
/**
|
|
4
4
|
* One embedded chart, drawn from a payload that has already arrived.
|
|
5
5
|
*
|
package/dist/embed/chart-card.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Download, FileDown, ImageDown } from 'lucide-react';
|
|
3
3
|
import { useRef } from 'react';
|
|
4
|
-
import { ChartBody } from '../charts/body';
|
|
5
|
-
import { cn } from '../cn';
|
|
6
|
-
import { useCatalogClient } from '../context';
|
|
7
|
-
import { usePdfExport } from '../export/use-pdf-export';
|
|
8
|
-
import { usePngExport } from '../export/use-png-export';
|
|
9
|
-
import { useAvailableEmbedActions } from './actions';
|
|
10
|
-
import { resultFromEmbed } from './payload';
|
|
4
|
+
import { ChartBody } from '../charts/body.js';
|
|
5
|
+
import { cn } from '../cn.js';
|
|
6
|
+
import { useCatalogClient } from '../context.js';
|
|
7
|
+
import { usePdfExport } from '../export/use-pdf-export.js';
|
|
8
|
+
import { usePngExport } from '../export/use-png-export.js';
|
|
9
|
+
import { useAvailableEmbedActions } from './actions.js';
|
|
10
|
+
import { resultFromEmbed } from './payload.js';
|
|
11
11
|
const MUTED = 'text-zinc-400 dark:text-zinc-500';
|
|
12
12
|
/**
|
|
13
13
|
* One embedded chart, drawn from a payload that has already arrived.
|
package/dist/embed/index.d.ts
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* same drawing code (`charts/body.tsx`), and differ in exactly one way: nothing
|
|
6
6
|
* here can change anything. See `actions.ts` for what that rules out and why.
|
|
7
7
|
*/
|
|
8
|
-
export { EMBED_ACTIONS, type EmbedAction, type EmbedActions, resolveEmbedActions, } from './actions';
|
|
9
|
-
export { EmbeddedChart, type EmbeddedChartProps } from './EmbeddedChart';
|
|
10
|
-
export { EmbeddedDashboard, type EmbeddedDashboardProps } from './EmbeddedDashboard';
|
|
11
|
-
export { chartsInLayoutOrder, type EmbeddedChartPayload, type EmbeddedDashboardPayload, } from './payload';
|
|
12
|
-
export type { EmbedFailureSlot, EmbedLoadingSlot } from './slots';
|
|
8
|
+
export { EMBED_ACTIONS, type EmbedAction, type EmbedActions, resolveEmbedActions, } from './actions.js';
|
|
9
|
+
export { EmbeddedChart, type EmbeddedChartProps } from './EmbeddedChart.js';
|
|
10
|
+
export { EmbeddedDashboard, type EmbeddedDashboardProps } from './EmbeddedDashboard.js';
|
|
11
|
+
export { chartsInLayoutOrder, type EmbeddedChartPayload, type EmbeddedDashboardPayload, } from './payload.js';
|
|
12
|
+
export type { EmbedFailureSlot, EmbedLoadingSlot } from './slots.js';
|
package/dist/embed/index.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* same drawing code (`charts/body.tsx`), and differ in exactly one way: nothing
|
|
6
6
|
* here can change anything. See `actions.ts` for what that rules out and why.
|
|
7
7
|
*/
|
|
8
|
-
export { EMBED_ACTIONS, resolveEmbedActions, } from './actions';
|
|
9
|
-
export { EmbeddedChart } from './EmbeddedChart';
|
|
10
|
-
export { EmbeddedDashboard } from './EmbeddedDashboard';
|
|
11
|
-
export { chartsInLayoutOrder, } from './payload';
|
|
8
|
+
export { EMBED_ACTIONS, resolveEmbedActions, } from './actions.js';
|
|
9
|
+
export { EmbeddedChart } from './EmbeddedChart.js';
|
|
10
|
+
export { EmbeddedDashboard } from './EmbeddedDashboard.js';
|
|
11
|
+
export { chartsInLayoutOrder, } from './payload.js';
|
package/dist/embed/slots.js
CHANGED
package/dist/export/index.d.ts
CHANGED
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
* real dimensions, and where nobody registered one there is no PDF action at
|
|
14
14
|
* all — the rule `registeredChartLibraries()` already follows.
|
|
15
15
|
*/
|
|
16
|
-
export { collectCustomProperties, resolveCssVariables, THEME_CUSTOM_PROPERTIES, } from './css-variables';
|
|
17
|
-
export { type ExportBackground, resolveAncestorBackground, resolveSvgSize, type SerializedSvg, type SerializeSvgOptions, serializeSvg, svgToDataUri, } from './serialize';
|
|
18
|
-
export { defaultPngFilename, downloadSvgAsPng, findExportableSvg, type PngExportOptions, rasteriseSerializedSvg, resolveScale, svgToPngBlob, triggerDownload, } from './png';
|
|
19
|
-
export { canRasterise, type PngExport, type PngExportTarget, useHasExportableSvg, usePngExport, type UsePngExportOptions, } from './use-png-export';
|
|
20
|
-
export { buildChartPdfSource, type ChartPdfExporter, type ChartPdfSource, exportSvgAsPdf, getPdfExporter, type PdfSourceOptions, registerPdfExporter, subscribeToPdfExporter, type SvgRasteriser, } from './pdf';
|
|
21
|
-
export { type PdfExport, usePdfExport, type UsePdfExportOptions, } from './use-pdf-export';
|
|
16
|
+
export { collectCustomProperties, resolveCssVariables, THEME_CUSTOM_PROPERTIES, } from './css-variables.js';
|
|
17
|
+
export { type ExportBackground, resolveAncestorBackground, resolveSvgSize, type SerializedSvg, type SerializeSvgOptions, serializeSvg, svgToDataUri, } from './serialize.js';
|
|
18
|
+
export { defaultPngFilename, downloadSvgAsPng, findExportableSvg, type PngExportOptions, rasteriseSerializedSvg, resolveScale, svgToPngBlob, triggerDownload, } from './png.js';
|
|
19
|
+
export { canRasterise, type PngExport, type PngExportTarget, useHasExportableSvg, usePngExport, type UsePngExportOptions, } from './use-png-export.js';
|
|
20
|
+
export { buildChartPdfSource, type ChartPdfExporter, type ChartPdfSource, exportSvgAsPdf, getPdfExporter, type PdfSourceOptions, registerPdfExporter, subscribeToPdfExporter, type SvgRasteriser, } from './pdf.js';
|
|
21
|
+
export { type PdfExport, usePdfExport, type UsePdfExportOptions, } from './use-pdf-export.js';
|
package/dist/export/index.js
CHANGED
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
* real dimensions, and where nobody registered one there is no PDF action at
|
|
14
14
|
* all — the rule `registeredChartLibraries()` already follows.
|
|
15
15
|
*/
|
|
16
|
-
export { collectCustomProperties, resolveCssVariables, THEME_CUSTOM_PROPERTIES, } from './css-variables';
|
|
17
|
-
export { resolveAncestorBackground, resolveSvgSize, serializeSvg, svgToDataUri, } from './serialize';
|
|
18
|
-
export { defaultPngFilename, downloadSvgAsPng, findExportableSvg, rasteriseSerializedSvg, resolveScale, svgToPngBlob, triggerDownload, } from './png';
|
|
19
|
-
export { canRasterise, useHasExportableSvg, usePngExport, } from './use-png-export';
|
|
20
|
-
export { buildChartPdfSource, exportSvgAsPdf, getPdfExporter, registerPdfExporter, subscribeToPdfExporter, } from './pdf';
|
|
21
|
-
export { usePdfExport, } from './use-pdf-export';
|
|
16
|
+
export { collectCustomProperties, resolveCssVariables, THEME_CUSTOM_PROPERTIES, } from './css-variables.js';
|
|
17
|
+
export { resolveAncestorBackground, resolveSvgSize, serializeSvg, svgToDataUri, } from './serialize.js';
|
|
18
|
+
export { defaultPngFilename, downloadSvgAsPng, findExportableSvg, rasteriseSerializedSvg, resolveScale, svgToPngBlob, triggerDownload, } from './png.js';
|
|
19
|
+
export { canRasterise, useHasExportableSvg, usePngExport, } from './use-png-export.js';
|
|
20
|
+
export { buildChartPdfSource, exportSvgAsPdf, getPdfExporter, registerPdfExporter, subscribeToPdfExporter, } from './pdf.js';
|
|
21
|
+
export { usePdfExport, } from './use-pdf-export.js';
|
package/dist/export/pdf.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type PngExportOptions } from './png';
|
|
2
|
-
import { type SerializedSvg } from './serialize';
|
|
1
|
+
import { type PngExportOptions } from './png.js';
|
|
2
|
+
import { type SerializedSvg } from './serialize.js';
|
|
3
3
|
/**
|
|
4
4
|
* PDF export, as a seam the host fills rather than a dependency this package takes.
|
|
5
5
|
*
|
package/dist/export/pdf.js
CHANGED
package/dist/export/png.d.ts
CHANGED
package/dist/export/png.js
CHANGED
package/dist/export/serialize.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { THEME_CUSTOM_PROPERTIES, collectCustomProperties, resolveCssVariables, } from './css-variables';
|
|
1
|
+
import { THEME_CUSTOM_PROPERTIES, collectCustomProperties, resolveCssVariables, } from './css-variables.js';
|
|
2
2
|
/**
|
|
3
3
|
* Turning a live chart `<svg>` into standalone markup that renders the same.
|
|
4
4
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type ChartPdfSource, type PdfSourceOptions } from './pdf';
|
|
2
|
-
import { type PngExportTarget } from './use-png-export';
|
|
1
|
+
import { type ChartPdfSource, type PdfSourceOptions } from './pdf.js';
|
|
2
|
+
import { type PngExportTarget } from './use-png-export.js';
|
|
3
3
|
/**
|
|
4
4
|
* The PDF action, as a toolbar actually needs it.
|
|
5
5
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useCallback, useEffect, useRef, useState, useSyncExternalStore } from 'react';
|
|
2
|
-
import { exportSvgAsPdf, getPdfExporter, subscribeToPdfExporter, } from './pdf';
|
|
3
|
-
import { findExportableSvg } from './png';
|
|
4
|
-
import { canRasterise, toExportError, unwrapExportTarget, useHasExportableSvg, } from './use-png-export';
|
|
2
|
+
import { exportSvgAsPdf, getPdfExporter, subscribeToPdfExporter, } from './pdf.js';
|
|
3
|
+
import { findExportableSvg } from './png.js';
|
|
4
|
+
import { canRasterise, toExportError, unwrapExportTarget, useHasExportableSvg, } from './use-png-export.js';
|
|
5
5
|
export function usePdfExport(target, options = {}) {
|
|
6
6
|
const [exporting, setExporting] = useState(false);
|
|
7
7
|
const [error, setError] = useState(null);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
2
|
-
import { defaultPngFilename, downloadSvgAsPng, findExportableSvg, svgToPngBlob, } from './png';
|
|
2
|
+
import { defaultPngFilename, downloadSvgAsPng, findExportableSvg, svgToPngBlob, } from './png.js';
|
|
3
3
|
/**
|
|
4
4
|
* The element behind a target, whichever of the two forms it came in.
|
|
5
5
|
*
|