@galaxy-io/filament-ui 0.2.0 → 0.3.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/dist/components/connections/ConnectorNameChips.d.ts +8 -0
- package/dist/components/connections/ConnectorNameChips.js +34 -0
- package/dist/module/hooks.d.ts +1 -1
- package/dist/module/routes.d.ts +1 -1
- package/dist/module/schemas.d.ts +1 -2
- package/dist/module/schemas.js +1 -2
- package/dist/pages/connections/components/drawer/ConnectionDrawer.js +4 -27
- package/dist/pages/pipelines/PipelineCanvasPage.js +2 -1
- package/dist/pages/pipelines/canvas/PipelineCanvasControls.js +2 -5
- package/dist/pages/pipelines/canvas/PipelineCanvasFlow.js +10 -12
- package/dist/pages/pipelines/canvas/constants.d.ts +3 -1
- package/dist/pages/pipelines/canvas/constants.js +11 -1
- package/dist/pages/pipelines/canvas/hooks/usePipelineCanvasSelection.d.ts +2 -3
- package/dist/pages/pipelines/canvas/hooks/usePipelineCanvasSelection.js +6 -13
- package/dist/pages/pipelines/canvas/hooks/usePipelineCanvasSelectionReveal.js +11 -12
- package/dist/pages/pipelines/canvas/panel/PipelineCanvasPanel.js +8 -35
- package/dist/pages/pipelines/canvas/panel/PipelineCanvasPanelColumn.d.ts +3 -0
- package/dist/pages/pipelines/canvas/panel/PipelineCanvasPanelColumn.js +63 -0
- package/dist/pages/pipelines/canvas/panel/PipelineCanvasPanelHeader.d.ts +5 -3
- package/dist/pages/pipelines/canvas/panel/PipelineCanvasPanelHeader.js +21 -14
- package/dist/pages/pipelines/canvas/panel/PipelineCanvasPanelLayout.d.ts +3 -0
- package/dist/pages/pipelines/canvas/panel/PipelineCanvasPanelLayout.js +28 -0
- package/dist/pages/pipelines/canvas/panel/PipelineCanvasPanelOpenButton.d.ts +3 -0
- package/dist/pages/pipelines/canvas/panel/PipelineCanvasPanelOpenButton.js +18 -0
- package/dist/pages/pipelines/canvas/panel/activity/PipelineCanvasPanelActivity.d.ts +5 -1
- package/dist/pages/pipelines/canvas/panel/activity/PipelineCanvasPanelActivity.js +19 -19
- package/dist/pages/pipelines/canvas/panel/activity/PipelineCanvasPanelActivityHeader.d.ts +7 -0
- package/dist/pages/pipelines/canvas/panel/activity/PipelineCanvasPanelActivityHeader.js +41 -0
- package/dist/pages/pipelines/canvas/panel/activity/PipelineCanvasPanelActivityLine.js +2 -2
- package/dist/pages/pipelines/canvas/panel/activity/constants.d.ts +5 -0
- package/dist/pages/pipelines/canvas/panel/activity/constants.js +8 -0
- package/dist/pages/pipelines/canvas/panel/activity/hooks/usePipelineCanvasPanelActivityRunIds.d.ts +1 -0
- package/dist/pages/pipelines/canvas/panel/activity/hooks/usePipelineCanvasPanelActivityRunIds.js +14 -0
- package/dist/pages/pipelines/canvas/panel/activity/hooks/usePipelineCanvasPanelActivityStickToBottom.d.ts +2 -0
- package/dist/pages/pipelines/canvas/panel/activity/hooks/usePipelineCanvasPanelActivityStickToBottom.js +57 -0
- package/dist/pages/pipelines/canvas/panel/activity/utils.d.ts +1 -0
- package/dist/pages/pipelines/canvas/panel/activity/utils.js +6 -1
- package/dist/pages/pipelines/canvas/panel/constants.d.ts +13 -5
- package/dist/pages/pipelines/canvas/panel/constants.js +7 -1
- package/dist/pages/pipelines/canvas/panel/overview/node/PipelineCanvasPanelNodeDetail.js +7 -2
- package/dist/pages/pipelines/canvas/panel/overview/resource/PipelineCanvasPanelResourceDetail.js +1 -0
- package/dist/pages/pipelines/canvas/panel/overview/resource/PipelineCanvasPanelResourceSection.js +1 -1
- package/dist/pages/pipelines/canvas/routes/PipelineCanvasRoutes.js +4 -5
- package/dist/pages/pipelines/canvas/routes/PipelineCanvasRoutesList.js +1 -0
- package/dist/pages/pipelines/canvas/routes/PipelineCanvasRoutesToolbar.js +3 -1
- package/dist/pages/pipelines/canvas/routes/constants.d.ts +1 -0
- package/dist/pages/pipelines/canvas/utils.d.ts +0 -3
- package/dist/pages/pipelines/canvas/utils.js +1 -11
- package/dist/pages/pipelines/components/header/PipelinePageEditActions.js +1 -2
- package/dist/pages/pipelines/components/header/PipelinePageRunActions.js +1 -7
- package/dist/styles.css +6 -6
- package/package.json +3 -3
- package/dist/pages/pipelines/canvas/panel/PipelineCanvasPanelTabHeader.d.ts +0 -3
- package/dist/pages/pipelines/canvas/panel/PipelineCanvasPanelTabHeader.js +0 -35
- package/dist/pages/pipelines/canvas/panel/types.d.ts +0 -4
- package/dist/pages/pipelines/canvas/panel/types.js +0 -8
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { Connection } from '../../gen/ingestion/v1/connections_pb';
|
|
3
|
+
interface ConnectorNameChipsProps {
|
|
4
|
+
connector: Connection["connector"];
|
|
5
|
+
kind: Connection["kind"];
|
|
6
|
+
}
|
|
7
|
+
declare const ConnectorNameChips: FC<ConnectorNameChipsProps>;
|
|
8
|
+
export default ConnectorNameChips;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { GetConnectorRequestSchema } from "../../gen/ingestion/v1/connectors_pb.js";
|
|
2
|
+
import { formatConnectorName, getConnectorFamilyName, getConnectorVariantName } from "./utils.js";
|
|
3
|
+
import { useGetConnectorQuery } from "../../api/queries/connectors.js";
|
|
4
|
+
import { create } from "@bufbuild/protobuf";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import Flex, { AlignItems } from "@galaxy-io/dls/layout/Flex";
|
|
7
|
+
import Chip, { ChipSize, ChipVariant } from "@galaxy-io/dls/chips/Chip";
|
|
8
|
+
//#region src/components/connections/ConnectorNameChips.tsx
|
|
9
|
+
var ConnectorNameChips = ({ connector, kind }) => {
|
|
10
|
+
const { data } = useGetConnectorQuery({
|
|
11
|
+
input: create(GetConnectorRequestSchema, {
|
|
12
|
+
connector,
|
|
13
|
+
kind
|
|
14
|
+
}),
|
|
15
|
+
options: { enabled: connector !== "" }
|
|
16
|
+
});
|
|
17
|
+
const variant = getConnectorVariantName(connector);
|
|
18
|
+
return /* @__PURE__ */ jsxs(Flex, {
|
|
19
|
+
alignItems: AlignItems.CENTER,
|
|
20
|
+
gap: 8,
|
|
21
|
+
minWidth: 0,
|
|
22
|
+
children: [/* @__PURE__ */ jsx(Chip, {
|
|
23
|
+
label: data?.connector ? formatConnectorName(data.connector) : getConnectorFamilyName(connector),
|
|
24
|
+
variant: ChipVariant.SECONDARY,
|
|
25
|
+
size: ChipSize.SMALL
|
|
26
|
+
}), variant && /* @__PURE__ */ jsx(Chip, {
|
|
27
|
+
label: variant,
|
|
28
|
+
variant: ChipVariant.SECONDARY,
|
|
29
|
+
size: ChipSize.SMALL
|
|
30
|
+
})]
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
//#endregion
|
|
34
|
+
export { ConnectorNameChips as default };
|
package/dist/module/hooks.d.ts
CHANGED
|
@@ -58,7 +58,7 @@ export declare const usePipelineCanvasSearch: () => {
|
|
|
58
58
|
node?: string | undefined;
|
|
59
59
|
resource?: string | undefined;
|
|
60
60
|
showPanel?: boolean | undefined;
|
|
61
|
-
|
|
61
|
+
showActivity?: boolean | undefined;
|
|
62
62
|
view?: import('../pages/pipelines/canvas/types').PipelineCanvasView | undefined;
|
|
63
63
|
sinks?: string[] | undefined;
|
|
64
64
|
};
|
package/dist/module/routes.d.ts
CHANGED
|
@@ -59,7 +59,7 @@ export declare const pipelineCanvasRouteOptions: FilamentRouteComponents & {
|
|
|
59
59
|
node: import('zod').ZodCatch<import('zod').ZodOptional<import('zod').ZodString>>;
|
|
60
60
|
resource: import('zod').ZodCatch<import('zod').ZodOptional<import('zod').ZodString>>;
|
|
61
61
|
showPanel: import('zod').ZodCatch<import('zod').ZodOptional<import('zod').ZodBoolean>>;
|
|
62
|
-
|
|
62
|
+
showActivity: import('zod').ZodCatch<import('zod').ZodOptional<import('zod').ZodBoolean>>;
|
|
63
63
|
view: import('zod').ZodCatch<import('zod').ZodOptional<import('zod').ZodEnum<typeof import('../pages/pipelines/canvas/types').PipelineCanvasView>>>;
|
|
64
64
|
sinks: import('zod').ZodCatch<import('zod').ZodOptional<import('zod').ZodArray<import('zod').ZodString>>>;
|
|
65
65
|
}, import('zod/v4/core').$strip>;
|
package/dist/module/schemas.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ import { RunStatus } from '../gen/ingestion/v1/runs_pb';
|
|
|
4
4
|
import { SortBy, SortOrder } from '../gen/ingestion/v1/sorting_pb';
|
|
5
5
|
import { MetricDimension } from '../gen/metrics/v1/metrics_pb';
|
|
6
6
|
import { ObservabilityRunsView, ObservabilityThroughputView, ObservabilityTimeframe, ObservabilityUsageView } from '../pages/observability/types';
|
|
7
|
-
import { PipelineCanvasPanelTab } from '../pages/pipelines/canvas/panel/types';
|
|
8
7
|
import { PipelineCanvasView } from '../pages/pipelines/canvas/types';
|
|
9
8
|
import { SettingsTeamView } from '../pages/settings/types';
|
|
10
9
|
import { Flow } from './types';
|
|
@@ -60,7 +59,7 @@ export declare const pipelineCanvasSearchSchema: z.ZodObject<{
|
|
|
60
59
|
node: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
61
60
|
resource: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
62
61
|
showPanel: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
63
|
-
|
|
62
|
+
showActivity: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
64
63
|
view: z.ZodCatch<z.ZodOptional<z.ZodEnum<typeof PipelineCanvasView>>>;
|
|
65
64
|
sinks: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
66
65
|
}, z.core.$strip>;
|
package/dist/module/schemas.js
CHANGED
|
@@ -3,7 +3,6 @@ import { SortBy, SortOrder } from "../gen/ingestion/v1/sorting_pb.js";
|
|
|
3
3
|
import { RunStatus } from "../gen/ingestion/v1/runs_pb.js";
|
|
4
4
|
import { ObservabilityRunsView, ObservabilityThroughputView, ObservabilityTimeframe, ObservabilityUsageView } from "../pages/observability/types.js";
|
|
5
5
|
import { MetricDimension } from "../gen/metrics/v1/metrics_pb.js";
|
|
6
|
-
import { PipelineCanvasPanelTab } from "../pages/pipelines/canvas/panel/types.js";
|
|
7
6
|
import { PipelineCanvasView } from "../pages/pipelines/canvas/types.js";
|
|
8
7
|
import { SettingsTeamView } from "../pages/settings/types.js";
|
|
9
8
|
import { Flow } from "./types.js";
|
|
@@ -44,7 +43,7 @@ var pipelineCanvasSearchSchema = z.object({
|
|
|
44
43
|
node: z.string().optional().catch(void 0),
|
|
45
44
|
resource: z.string().optional().catch(void 0),
|
|
46
45
|
showPanel: z.boolean().optional().catch(void 0),
|
|
47
|
-
|
|
46
|
+
showActivity: z.boolean().optional().catch(void 0),
|
|
48
47
|
view: z.enum(PipelineCanvasView).optional().catch(void 0),
|
|
49
48
|
sinks: z.array(z.string()).optional().catch(void 0)
|
|
50
49
|
});
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { IS_DEBUG } from "../../../../constants.js";
|
|
2
|
-
import { GetConnectorRequestSchema } from "../../../../gen/ingestion/v1/connectors_pb.js";
|
|
3
|
-
import { formatConnectorName, getConnectorFamilyName, getConnectorVariantName } from "../../../../components/connections/utils.js";
|
|
4
|
-
import { useGetConnectorQuery } from "../../../../api/queries/connectors.js";
|
|
5
2
|
import ConnectionKindChip from "../../../../components/connections/ConnectionKindChip.js";
|
|
6
3
|
import { isNotFoundError } from "../../../../utils/errors.js";
|
|
7
4
|
import { createGetConnectionInput, useGetConnectionQuery } from "../../../../api/queries/connections.js";
|
|
8
5
|
import { useOverlaySession } from "../../../../hooks/useOverlaySession.js";
|
|
6
|
+
import ConnectorNameChips from "../../../../components/connections/ConnectorNameChips.js";
|
|
9
7
|
import KeyValueList from "../../../../components/KeyValueList.js";
|
|
10
8
|
import KeyValueListRow from "../../../../components/KeyValueListRow.js";
|
|
11
9
|
import ConnectionDrawerActions from "./ConnectionDrawerActions.js";
|
|
@@ -16,11 +14,9 @@ import ConnectionDrawerPipelines from "./ConnectionDrawerPipelines.js";
|
|
|
16
14
|
import { KeyIcon, LinkBreakIcon, SlidersIcon } from "@phosphor-icons/react";
|
|
17
15
|
import Button, { ButtonSize, ButtonVariant } from "@galaxy-io/dls/buttons/Button";
|
|
18
16
|
import ErrorLayout from "@galaxy-io/dls/layout/ErrorLayout";
|
|
19
|
-
import { create } from "@bufbuild/protobuf";
|
|
20
17
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
21
18
|
import PendingLayout from "@galaxy-io/dls/layout/PendingLayout";
|
|
22
19
|
import Flex, { AlignItems, FlexDirection } from "@galaxy-io/dls/layout/Flex";
|
|
23
|
-
import Chip, { ChipSize, ChipVariant } from "@galaxy-io/dls/chips/Chip";
|
|
24
20
|
import Text, { TextSize, TextVariant } from "@galaxy-io/dls/text/Text";
|
|
25
21
|
import { FontFamily } from "@galaxy-io/dls/theme/enums";
|
|
26
22
|
import CopyButton from "@galaxy-io/dls/buttons/CopyButton";
|
|
@@ -36,15 +32,6 @@ var ConnectionDrawer = ({ connectionId, isOpen, onClose }) => {
|
|
|
36
32
|
}
|
|
37
33
|
});
|
|
38
34
|
const connection = data?.connection;
|
|
39
|
-
const { data: connectorData } = useGetConnectorQuery({
|
|
40
|
-
input: create(GetConnectorRequestSchema, {
|
|
41
|
-
connector: connection?.connector ?? "",
|
|
42
|
-
kind: connection?.kind
|
|
43
|
-
}),
|
|
44
|
-
options: { enabled: !!connection }
|
|
45
|
-
});
|
|
46
|
-
const connector = connectorData?.connector;
|
|
47
|
-
const connectorVariant = connection && getConnectorVariantName(connection.connector);
|
|
48
35
|
const renderContent = () => {
|
|
49
36
|
if (isError) {
|
|
50
37
|
const isNotFound = isNotFoundError(error);
|
|
@@ -94,19 +81,9 @@ var ConnectionDrawer = ({ connectionId, isOpen, onClose }) => {
|
|
|
94
81
|
}),
|
|
95
82
|
/* @__PURE__ */ jsx(KeyValueListRow, {
|
|
96
83
|
label: "Connector",
|
|
97
|
-
value: /* @__PURE__ */
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
minWidth: 0,
|
|
101
|
-
children: [/* @__PURE__ */ jsx(Chip, {
|
|
102
|
-
label: connector ? formatConnectorName(connector) : getConnectorFamilyName(connection.connector),
|
|
103
|
-
variant: ChipVariant.SECONDARY,
|
|
104
|
-
size: ChipSize.SMALL
|
|
105
|
-
}), connectorVariant && /* @__PURE__ */ jsx(Chip, {
|
|
106
|
-
label: connectorVariant,
|
|
107
|
-
variant: ChipVariant.SECONDARY,
|
|
108
|
-
size: ChipSize.SMALL
|
|
109
|
-
})]
|
|
84
|
+
value: /* @__PURE__ */ jsx(ConnectorNameChips, {
|
|
85
|
+
connector: connection.connector,
|
|
86
|
+
kind: connection.kind
|
|
110
87
|
})
|
|
111
88
|
}),
|
|
112
89
|
/* @__PURE__ */ jsx(KeyValueListRow, {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PipelineCanvasView } from "./canvas/types.js";
|
|
2
2
|
import { usePipelineCanvasSelection } from "./canvas/hooks/usePipelineCanvasSelection.js";
|
|
3
3
|
import PipelineCanvasFlow from "./canvas/PipelineCanvasFlow.js";
|
|
4
|
+
import PipelineCanvasPanelLayout from "./canvas/panel/PipelineCanvasPanelLayout.js";
|
|
4
5
|
import PipelineCanvasRoutes from "./canvas/routes/PipelineCanvasRoutes.js";
|
|
5
6
|
/* empty css */
|
|
6
7
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -14,7 +15,7 @@ var PipelineCanvasPageWrapper = /*#__PURE__*/ styled("div")({
|
|
|
14
15
|
});
|
|
15
16
|
var PipelineCanvasPage = () => {
|
|
16
17
|
const { view } = usePipelineCanvasSelection();
|
|
17
|
-
return /* @__PURE__ */ jsx(PipelineCanvasPageWrapper, { children: match(view).with(PipelineCanvasView.ROUTES, () => /* @__PURE__ */ jsx(PipelineCanvasRoutes, {})).with(PipelineCanvasView.CANVAS, () => /* @__PURE__ */ jsx(PipelineCanvasFlow, {})).exhaustive() });
|
|
18
|
+
return /* @__PURE__ */ jsx(PipelineCanvasPageWrapper, { children: /* @__PURE__ */ jsx(PipelineCanvasPanelLayout, { children: match(view).with(PipelineCanvasView.ROUTES, () => /* @__PURE__ */ jsx(PipelineCanvasRoutes, {})).with(PipelineCanvasView.CANVAS, () => /* @__PURE__ */ jsx(PipelineCanvasFlow, {})).exhaustive() }) });
|
|
18
19
|
};
|
|
19
20
|
//#endregion
|
|
20
21
|
export { PipelineCanvasPage as default };
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { PIPELINE_CANVAS_FIT_MIN_ZOOM } from "./constants.js";
|
|
1
|
+
import { PIPELINE_CANVAS_FIT_MIN_ZOOM, PIPELINE_CANVAS_FIT_PADDING } from "./constants.js";
|
|
2
2
|
import { getGraphBounds, getPlaceholderNodes, mapNodesToStackedPositions } from "./graph/layout.js";
|
|
3
|
-
import { getPipelineCanvasFitPadding } from "./utils.js";
|
|
4
3
|
import { usePipelineCanvasActions, usePipelineCanvasReadOnly, usePipelineCanvasState } from "./providers/canvas/PipelineCanvasProvider.js";
|
|
5
|
-
import { usePipelineCanvasSelection } from "./hooks/usePipelineCanvasSelection.js";
|
|
6
4
|
/* empty css */
|
|
7
5
|
import { ArrowCounterClockwiseIcon, MinusIcon, PlusIcon } from "@phosphor-icons/react";
|
|
8
6
|
import Button, { ButtonSize, ButtonVariant } from "@galaxy-io/dls/buttons/Button";
|
|
@@ -24,7 +22,6 @@ var PipelineCanvasControls = () => {
|
|
|
24
22
|
const state = usePipelineCanvasState();
|
|
25
23
|
const isReadOnly = usePipelineCanvasReadOnly();
|
|
26
24
|
const { setNodes } = usePipelineCanvasActions();
|
|
27
|
-
const { showPanel } = usePipelineCanvasSelection();
|
|
28
25
|
const handleResetView = () => {
|
|
29
26
|
let repositioned = state.nodes;
|
|
30
27
|
if (!isReadOnly) {
|
|
@@ -33,7 +30,7 @@ var PipelineCanvasControls = () => {
|
|
|
33
30
|
}
|
|
34
31
|
const bounds = getGraphBounds([...repositioned, ...getPlaceholderNodes(repositioned, isReadOnly)]);
|
|
35
32
|
if (bounds.width === 0) return;
|
|
36
|
-
setViewport(getViewportForBounds(bounds, width, height, PIPELINE_CANVAS_FIT_MIN_ZOOM, 1,
|
|
33
|
+
setViewport(getViewportForBounds(bounds, width, height, PIPELINE_CANVAS_FIT_MIN_ZOOM, 1, PIPELINE_CANVAS_FIT_PADDING));
|
|
37
34
|
};
|
|
38
35
|
return /* @__PURE__ */ jsx(ControlsWrapper, { children: /* @__PURE__ */ jsxs(ButtonGroup, {
|
|
39
36
|
isAttached: true,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PipelineCanvasNodeType } from "./types.js";
|
|
2
|
-
import { PIPELINE_CANVAS_EDGE_TYPE, PIPELINE_CANVAS_PAN_ON_DRAG, PIPELINE_CANVAS_SNAP_GRID } from "./constants.js";
|
|
2
|
+
import { PIPELINE_CANVAS_EDGE_TYPE, PIPELINE_CANVAS_FIT_VIEW_OPTIONS, PIPELINE_CANVAS_PAN_ON_DRAG, PIPELINE_CANVAS_SNAP_GRID } from "./constants.js";
|
|
3
3
|
import { getPlaceholderNodes } from "./graph/layout.js";
|
|
4
|
-
import {
|
|
4
|
+
import { isConnectionNode, mapEdgesToStyledEdges, mapElementsToSelected } from "./utils.js";
|
|
5
5
|
import { canConnectEdge, expandConnection } from "./graph/rules.js";
|
|
6
6
|
import { usePipelineCanvasActions, usePipelineCanvasReadOnly, usePipelineCanvasState } from "./providers/canvas/PipelineCanvasProvider.js";
|
|
7
7
|
import { usePipelineCanvasValidation } from "./hooks/usePipelineCanvasValidation.js";
|
|
@@ -17,7 +17,7 @@ import PipelineCanvasControls from "./PipelineCanvasControls.js";
|
|
|
17
17
|
import PipelineCanvasEditWidget from "./PipelineCanvasEditWidget.js";
|
|
18
18
|
import PipelineCanvasSelectionReveal from "./PipelineCanvasSelectionReveal.js";
|
|
19
19
|
import PipelineCanvasViewSwitcher from "./PipelineCanvasViewSwitcher.js";
|
|
20
|
-
import
|
|
20
|
+
import PipelineCanvasPanelOpenButton from "./panel/PipelineCanvasPanelOpenButton.js";
|
|
21
21
|
/* empty css */
|
|
22
22
|
import { useCallback, useMemo } from "react";
|
|
23
23
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -37,9 +37,9 @@ var FlowWrapper = /*#__PURE__*/ styled("div")({
|
|
|
37
37
|
class: "filament-PipelineCanvasFlow-FlowWrapper-f19lsdo4",
|
|
38
38
|
propsAsIs: false
|
|
39
39
|
});
|
|
40
|
-
var
|
|
41
|
-
name: "
|
|
42
|
-
class: "filament-PipelineCanvasFlow-
|
|
40
|
+
var FlowToolbar = /*#__PURE__*/ styled("div")({
|
|
41
|
+
name: "FlowToolbar",
|
|
42
|
+
class: "filament-PipelineCanvasFlow-FlowToolbar-f179xgkm",
|
|
43
43
|
propsAsIs: false
|
|
44
44
|
});
|
|
45
45
|
var PipelineCanvasFlow = () => {
|
|
@@ -48,7 +48,7 @@ var PipelineCanvasFlow = () => {
|
|
|
48
48
|
const { applyNodeChanges, applyEdgeChanges, connect } = usePipelineCanvasActions();
|
|
49
49
|
const isReadOnly = usePipelineCanvasReadOnly();
|
|
50
50
|
const sourceResources = usePipelineCanvasSourceNodeResources();
|
|
51
|
-
const { selectedNodeId, selectedResourceId,
|
|
51
|
+
const { selectedNodeId, selectedResourceId, selectNode, selectResource, clearSelection } = usePipelineCanvasSelection();
|
|
52
52
|
const onNodesChange = useCallback((changes) => {
|
|
53
53
|
if (isReadOnly) return;
|
|
54
54
|
const applicable = filterSelectionChanges(changes);
|
|
@@ -80,7 +80,6 @@ var PipelineCanvasFlow = () => {
|
|
|
80
80
|
state.nodes,
|
|
81
81
|
isReadOnly
|
|
82
82
|
]);
|
|
83
|
-
const fitViewOptions = useMemo(() => getPipelineCanvasFitViewOptions(showPanel), [showPanel]);
|
|
84
83
|
const isRunning = usePipelineCanvasIsRunning();
|
|
85
84
|
const { invalidEdgeIds } = usePipelineCanvasValidation();
|
|
86
85
|
const styledEdges = useMemo(() => mapEdgesToStyledEdges(selectedEdges, selectedNodes, theme, isRunning, invalidEdgeIds), [
|
|
@@ -111,7 +110,7 @@ var PipelineCanvasFlow = () => {
|
|
|
111
110
|
snapToGrid: true,
|
|
112
111
|
snapGrid: PIPELINE_CANVAS_SNAP_GRID,
|
|
113
112
|
fitView: true,
|
|
114
|
-
fitViewOptions,
|
|
113
|
+
fitViewOptions: PIPELINE_CANVAS_FIT_VIEW_OPTIONS,
|
|
115
114
|
deleteKeyCode: isReadOnly ? null : ["Backspace", "Delete"],
|
|
116
115
|
proOptions: { hideAttribution: true },
|
|
117
116
|
children: [
|
|
@@ -138,9 +137,8 @@ var PipelineCanvasFlow = () => {
|
|
|
138
137
|
})
|
|
139
138
|
]
|
|
140
139
|
}),
|
|
141
|
-
/* @__PURE__ */
|
|
142
|
-
!isReadOnly && /* @__PURE__ */ jsx(PipelineCanvasEditWidget, {})
|
|
143
|
-
/* @__PURE__ */ jsx(PipelineCanvasPanel, {})
|
|
140
|
+
/* @__PURE__ */ jsxs(FlowToolbar, { children: [/* @__PURE__ */ jsx(PipelineCanvasViewSwitcher, {}), /* @__PURE__ */ jsx(PipelineCanvasPanelOpenButton, {})] }),
|
|
141
|
+
!isReadOnly && /* @__PURE__ */ jsx(PipelineCanvasEditWidget, {})
|
|
144
142
|
] });
|
|
145
143
|
};
|
|
146
144
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Icon as PhosphorIcon } from '@phosphor-icons/react';
|
|
2
|
-
import { HandleType, Position } from '@xyflow/react';
|
|
2
|
+
import { FitViewOptions, HandleType, Position } from '@xyflow/react';
|
|
3
3
|
import { Space } from '@galaxy-io/dls/theme/enums';
|
|
4
4
|
import { ConnectorKind } from '../../../gen/ingestion/v1/common_pb';
|
|
5
5
|
import { PipelineCanvasEditMode } from './providers/canvas/types';
|
|
@@ -8,6 +8,8 @@ export declare const PIPELINE_CANVAS_FIT_MIN_ZOOM = 0.5;
|
|
|
8
8
|
export declare const PIPELINE_CANVAS_FIT_MAX_ZOOM = 1;
|
|
9
9
|
export declare const PIPELINE_CANVAS_FIT_INSET_Y = 48;
|
|
10
10
|
export declare const PIPELINE_CANVAS_FIT_INSET_LEFT = 80;
|
|
11
|
+
export declare const PIPELINE_CANVAS_FIT_PADDING: NonNullable<FitViewOptions["padding"]>;
|
|
12
|
+
export declare const PIPELINE_CANVAS_FIT_VIEW_OPTIONS: FitViewOptions;
|
|
11
13
|
export declare const PIPELINE_CANVAS_REVEAL_DURATION = 300;
|
|
12
14
|
export declare const PIPELINE_CANVAS_REVEAL_ZOOM = 1.15;
|
|
13
15
|
export declare const PIPELINE_CANVAS_SNAP_GRID: [number, number];
|
|
@@ -5,6 +5,16 @@ import { FlowArrowIcon, PlusIcon, TreeStructureIcon } from "@phosphor-icons/reac
|
|
|
5
5
|
import { Position } from "@xyflow/react";
|
|
6
6
|
//#region src/pages/pipelines/canvas/constants.ts
|
|
7
7
|
var PIPELINE_CANVAS_FIT_MIN_ZOOM = .5;
|
|
8
|
+
var PIPELINE_CANVAS_FIT_PADDING = {
|
|
9
|
+
top: `48px`,
|
|
10
|
+
bottom: `48px`,
|
|
11
|
+
left: `80px`,
|
|
12
|
+
right: `48px`
|
|
13
|
+
};
|
|
14
|
+
var PIPELINE_CANVAS_FIT_VIEW_OPTIONS = {
|
|
15
|
+
padding: PIPELINE_CANVAS_FIT_PADDING,
|
|
16
|
+
maxZoom: 1
|
|
17
|
+
};
|
|
8
18
|
var PIPELINE_CANVAS_REVEAL_ZOOM = 1.15;
|
|
9
19
|
var PIPELINE_CANVAS_SNAP_GRID = [20, 20];
|
|
10
20
|
var PIPELINE_CANVAS_PAN_ON_DRAG = [
|
|
@@ -60,4 +70,4 @@ var PIPELINE_CANVAS_VIEW_TO_ICON_MAP = {
|
|
|
60
70
|
[PipelineCanvasView.ROUTES]: FlowArrowIcon
|
|
61
71
|
};
|
|
62
72
|
//#endregion
|
|
63
|
-
export { CONNECTOR_KIND_TO_HANDLE_ID_MAP, CONNECTOR_KIND_TO_HANDLE_TYPE_MAP, CONNECTOR_KIND_TO_NODE_TYPE_MAP, CONNECTOR_KIND_TO_NORMALIZED_KIND_MAP, CONNECTOR_KIND_TO_XYFLOW_POSITION_MAP, PIPELINE_CANVAS_EDGE_TYPE, PIPELINE_CANVAS_EDGE_Z_INDEX, PIPELINE_CANVAS_EDIT_MODE_TO_ICON_MAP, PIPELINE_CANVAS_FIT_MIN_ZOOM, PIPELINE_CANVAS_NODE_SINK_HANDLE_ID, PIPELINE_CANVAS_NODE_SOURCE_HANDLE_ID, PIPELINE_CANVAS_NODE_TYPE_TO_CONNECTOR_KIND_MAP, PIPELINE_CANVAS_NODE_TYPE_TO_COUNTERPART_TYPE_MAP, PIPELINE_CANVAS_PAN_ON_DRAG, PIPELINE_CANVAS_REVEAL_ZOOM, PIPELINE_CANVAS_SNAP_GRID, PIPELINE_CANVAS_VIEW_TO_ICON_MAP, PIPELINE_CANVAS_VIEW_TO_LABEL_MAP };
|
|
73
|
+
export { CONNECTOR_KIND_TO_HANDLE_ID_MAP, CONNECTOR_KIND_TO_HANDLE_TYPE_MAP, CONNECTOR_KIND_TO_NODE_TYPE_MAP, CONNECTOR_KIND_TO_NORMALIZED_KIND_MAP, CONNECTOR_KIND_TO_XYFLOW_POSITION_MAP, PIPELINE_CANVAS_EDGE_TYPE, PIPELINE_CANVAS_EDGE_Z_INDEX, PIPELINE_CANVAS_EDIT_MODE_TO_ICON_MAP, PIPELINE_CANVAS_FIT_MIN_ZOOM, PIPELINE_CANVAS_FIT_PADDING, PIPELINE_CANVAS_FIT_VIEW_OPTIONS, PIPELINE_CANVAS_NODE_SINK_HANDLE_ID, PIPELINE_CANVAS_NODE_SOURCE_HANDLE_ID, PIPELINE_CANVAS_NODE_TYPE_TO_CONNECTOR_KIND_MAP, PIPELINE_CANVAS_NODE_TYPE_TO_COUNTERPART_TYPE_MAP, PIPELINE_CANVAS_PAN_ON_DRAG, PIPELINE_CANVAS_REVEAL_ZOOM, PIPELINE_CANVAS_SNAP_GRID, PIPELINE_CANVAS_VIEW_TO_ICON_MAP, PIPELINE_CANVAS_VIEW_TO_LABEL_MAP };
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { PipelineCanvasPanelTab } from '../panel/types';
|
|
2
1
|
import { CanvasEdge, CanvasNode, PipelineCanvasView } from '../types';
|
|
3
2
|
export declare const usePipelineCanvasSelection: () => {
|
|
4
3
|
selectedNodeId: string | undefined;
|
|
5
4
|
selectedResourceId: string | undefined;
|
|
6
5
|
showPanel: boolean;
|
|
7
|
-
|
|
6
|
+
showActivity: boolean;
|
|
8
7
|
view: PipelineCanvasView;
|
|
9
8
|
sinkIds: string[];
|
|
10
9
|
selectNode: (nodeId: CanvasNode["id"]) => undefined;
|
|
11
10
|
selectResource: (edgeId: CanvasEdge["id"]) => undefined;
|
|
12
11
|
clearSelection: () => undefined;
|
|
13
12
|
setShowPanel: (nextShowPanel: boolean) => undefined;
|
|
14
|
-
|
|
13
|
+
setShowActivity: (nextShowActivity: boolean) => undefined;
|
|
15
14
|
setView: (nextView: PipelineCanvasView) => undefined;
|
|
16
15
|
setSinkIds: (nextSinkIds: CanvasNode["id"][]) => undefined;
|
|
17
16
|
};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { PipelineCanvasPanelTab } from "../panel/types.js";
|
|
2
1
|
import { PipelineCanvasView } from "../types.js";
|
|
3
2
|
import { useFilamentSearchUpdate, usePipelineCanvasSearch } from "../../../../module/hooks.js";
|
|
4
3
|
import { useMemo } from "react";
|
|
5
4
|
//#region src/pages/pipelines/canvas/hooks/usePipelineCanvasSelection.ts
|
|
6
5
|
var usePipelineCanvasSelection = () => {
|
|
7
|
-
const { node, resource, showPanel,
|
|
6
|
+
const { node, resource, showPanel, showActivity, view, sinks } = usePipelineCanvasSearch();
|
|
8
7
|
const updateSearch = useFilamentSearchUpdate();
|
|
9
8
|
return useMemo(() => {
|
|
10
9
|
const setSearch = (patch, replace = true) => void updateSearch((prev) => ({
|
|
@@ -15,31 +14,25 @@ var usePipelineCanvasSelection = () => {
|
|
|
15
14
|
selectedNodeId: node,
|
|
16
15
|
selectedResourceId: resource,
|
|
17
16
|
showPanel: showPanel ?? false,
|
|
18
|
-
|
|
17
|
+
showActivity: showActivity ?? false,
|
|
19
18
|
view: view ?? PipelineCanvasView.CANVAS,
|
|
20
19
|
sinkIds: sinks ?? [],
|
|
21
20
|
selectNode: (nodeId) => setSearch({
|
|
22
21
|
node: nodeId,
|
|
23
22
|
resource: void 0,
|
|
24
|
-
showPanel: true
|
|
25
|
-
tab: void 0
|
|
23
|
+
showPanel: true
|
|
26
24
|
}),
|
|
27
25
|
selectResource: (edgeId) => setSearch({
|
|
28
26
|
node: void 0,
|
|
29
27
|
resource: edgeId,
|
|
30
|
-
showPanel: true
|
|
31
|
-
tab: void 0
|
|
28
|
+
showPanel: true
|
|
32
29
|
}),
|
|
33
30
|
clearSelection: () => setSearch({
|
|
34
31
|
node: void 0,
|
|
35
32
|
resource: void 0
|
|
36
33
|
}),
|
|
37
34
|
setShowPanel: (nextShowPanel) => setSearch({ showPanel: nextShowPanel || void 0 }),
|
|
38
|
-
|
|
39
|
-
tab: nextTab === PipelineCanvasPanelTab.OVERVIEW ? void 0 : nextTab,
|
|
40
|
-
node: void 0,
|
|
41
|
-
resource: void 0
|
|
42
|
-
}),
|
|
35
|
+
setShowActivity: (nextShowActivity) => setSearch({ showActivity: nextShowActivity || void 0 }),
|
|
43
36
|
setView: (nextView) => setSearch({ view: nextView === PipelineCanvasView.CANVAS ? void 0 : nextView }, false),
|
|
44
37
|
setSinkIds: (nextSinkIds) => setSearch({ sinks: nextSinkIds.length ? nextSinkIds : void 0 })
|
|
45
38
|
};
|
|
@@ -48,7 +41,7 @@ var usePipelineCanvasSelection = () => {
|
|
|
48
41
|
node,
|
|
49
42
|
resource,
|
|
50
43
|
showPanel,
|
|
51
|
-
|
|
44
|
+
showActivity,
|
|
52
45
|
view,
|
|
53
46
|
sinks
|
|
54
47
|
]);
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { PIPELINE_CANVAS_FIT_MIN_ZOOM, PIPELINE_CANVAS_REVEAL_ZOOM } from "../constants.js";
|
|
2
|
-
import { getPipelineCanvasFitPadding } from "../utils.js";
|
|
1
|
+
import { PIPELINE_CANVAS_FIT_MIN_ZOOM, PIPELINE_CANVAS_FIT_PADDING, PIPELINE_CANVAS_REVEAL_ZOOM } from "../constants.js";
|
|
3
2
|
import { usePipelineCanvasSelection } from "./usePipelineCanvasSelection.js";
|
|
4
3
|
import { useEffect } from "react";
|
|
5
|
-
import { getViewportForBounds, useReactFlow,
|
|
4
|
+
import { getViewportForBounds, useReactFlow, useStore } from "@xyflow/react";
|
|
6
5
|
//#region src/pages/pipelines/canvas/hooks/usePipelineCanvasSelectionReveal.ts
|
|
7
6
|
var usePipelineCanvasSelectionReveal = () => {
|
|
8
7
|
const { getViewport, setViewport, getInternalNode, getEdge, getNodes, getNodesBounds } = useReactFlow();
|
|
9
|
-
const
|
|
8
|
+
const width = useStore((s) => s.width);
|
|
9
|
+
const height = useStore((s) => s.height);
|
|
10
10
|
const { selectedNodeId, selectedResourceId, showPanel } = usePipelineCanvasSelection();
|
|
11
11
|
useEffect(() => {
|
|
12
|
-
const { width, height } = store.getState();
|
|
13
12
|
if (!width || !height) return;
|
|
14
13
|
const edge = selectedResourceId ? getEdge(selectedResourceId) : void 0;
|
|
15
14
|
const selectedIds = selectedNodeId ? [selectedNodeId] : edge ? [edge.source, edge.target] : [];
|
|
@@ -18,16 +17,15 @@ var usePipelineCanvasSelectionReveal = () => {
|
|
|
18
17
|
if (nodeIds.some((nodeId) => !getInternalNode(nodeId)?.measured.width)) return;
|
|
19
18
|
const bounds = getNodesBounds(nodeIds);
|
|
20
19
|
if (!showPanel || !selectedIds.length) {
|
|
21
|
-
setViewport(getViewportForBounds(bounds, width, height, PIPELINE_CANVAS_FIT_MIN_ZOOM, 1,
|
|
20
|
+
setViewport(getViewportForBounds(bounds, width, height, PIPELINE_CANVAS_FIT_MIN_ZOOM, 1, PIPELINE_CANVAS_FIT_PADDING), { duration: 300 });
|
|
22
21
|
return;
|
|
23
22
|
}
|
|
24
23
|
const { zoom } = getViewport();
|
|
25
|
-
const
|
|
26
|
-
const maxFitZoom = Math.min((panelLeft - 160) / bounds.width, (height - 96) / bounds.height);
|
|
24
|
+
const maxFitZoom = Math.min((width - 160) / bounds.width, (height - 96) / bounds.height);
|
|
27
25
|
const targetZoom = Math.max(PIPELINE_CANVAS_FIT_MIN_ZOOM, Math.min(Math.max(zoom, PIPELINE_CANVAS_REVEAL_ZOOM), maxFitZoom));
|
|
28
26
|
setViewport({
|
|
29
|
-
x: (80 +
|
|
30
|
-
y:
|
|
27
|
+
x: (80 + width) / 2 - (bounds.x + bounds.width / 2) * targetZoom,
|
|
28
|
+
y: height / 2 - (bounds.y + bounds.height / 2) * targetZoom,
|
|
31
29
|
zoom: targetZoom
|
|
32
30
|
}, {
|
|
33
31
|
duration: 300,
|
|
@@ -37,13 +35,14 @@ var usePipelineCanvasSelectionReveal = () => {
|
|
|
37
35
|
selectedNodeId,
|
|
38
36
|
selectedResourceId,
|
|
39
37
|
showPanel,
|
|
38
|
+
width,
|
|
39
|
+
height,
|
|
40
40
|
getEdge,
|
|
41
41
|
getInternalNode,
|
|
42
42
|
getNodes,
|
|
43
43
|
getNodesBounds,
|
|
44
44
|
getViewport,
|
|
45
|
-
setViewport
|
|
46
|
-
store
|
|
45
|
+
setViewport
|
|
47
46
|
]);
|
|
48
47
|
};
|
|
49
48
|
//#endregion
|
|
@@ -1,58 +1,31 @@
|
|
|
1
|
-
import { PipelineCanvasPanelTab } from "./types.js";
|
|
2
1
|
import { isConnectionNode } from "../utils.js";
|
|
3
2
|
import { usePipelineCanvasState } from "../providers/canvas/PipelineCanvasProvider.js";
|
|
4
3
|
import { usePipelineCanvasSelection } from "../hooks/usePipelineCanvasSelection.js";
|
|
5
|
-
import
|
|
4
|
+
import PipelineCanvasPanelHeader from "./PipelineCanvasPanelHeader.js";
|
|
6
5
|
import PipelineCanvasPanelNodeDetail from "./overview/node/PipelineCanvasPanelNodeDetail.js";
|
|
7
6
|
import PipelineCanvasPanelOverview from "./overview/PipelineCanvasPanelOverview.js";
|
|
8
7
|
import PipelineCanvasPanelResourceDetail from "./overview/resource/PipelineCanvasPanelResourceDetail.js";
|
|
9
|
-
import PipelineCanvasPanelTabHeader from "./PipelineCanvasPanelTabHeader.js";
|
|
10
|
-
import { SidebarSimpleIcon } from "@phosphor-icons/react";
|
|
11
|
-
import Button, { ButtonSize, ButtonVariant } from "@galaxy-io/dls/buttons/Button";
|
|
12
8
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
13
9
|
import Flex, { FlexDirection } from "@galaxy-io/dls/layout/Flex";
|
|
14
|
-
import { match } from "ts-pattern";
|
|
15
10
|
import Box, { BoxVariant } from "@galaxy-io/dls/layout/Box";
|
|
16
|
-
import { Radius } from "@galaxy-io/dls/theme/enums";
|
|
17
11
|
//#region src/pages/pipelines/canvas/panel/PipelineCanvasPanel.tsx
|
|
18
12
|
var PipelineCanvasPanel = () => {
|
|
19
13
|
const state = usePipelineCanvasState();
|
|
20
|
-
const { selectedNodeId, selectedResourceId,
|
|
21
|
-
if (!showPanel) return /* @__PURE__ */ jsx(Box, {
|
|
22
|
-
position: "absolute",
|
|
23
|
-
inset: {
|
|
24
|
-
top: 16,
|
|
25
|
-
right: 16
|
|
26
|
-
},
|
|
27
|
-
padding: [8, 12],
|
|
28
|
-
children: /* @__PURE__ */ jsx(Button, {
|
|
29
|
-
icon: SidebarSimpleIcon,
|
|
30
|
-
variant: ButtonVariant.SECONDARY,
|
|
31
|
-
size: ButtonSize.SMALL,
|
|
32
|
-
onClick: () => setShowPanel(true),
|
|
33
|
-
ariaLabel: "Open configuration panel",
|
|
34
|
-
tooltip: "Open configuration panel"
|
|
35
|
-
})
|
|
36
|
-
});
|
|
14
|
+
const { selectedNodeId, selectedResourceId, setShowPanel } = usePipelineCanvasSelection();
|
|
37
15
|
const selectedNode = state.nodes.filter(isConnectionNode).find((node) => node.id === selectedNodeId);
|
|
38
16
|
const selectedEdge = state.edges.find((edge) => edge.id === selectedResourceId);
|
|
39
17
|
const renderContent = () => {
|
|
40
18
|
if (selectedNode) return /* @__PURE__ */ jsx(PipelineCanvasPanelNodeDetail, { node: selectedNode }, selectedNode.id);
|
|
41
19
|
if (selectedEdge) return /* @__PURE__ */ jsx(PipelineCanvasPanelResourceDetail, { edge: selectedEdge }, selectedEdge.id);
|
|
42
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(
|
|
20
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(PipelineCanvasPanelHeader, {
|
|
21
|
+
title: "Overview",
|
|
22
|
+
onClose: () => setShowPanel(false),
|
|
23
|
+
hasDivider: true
|
|
24
|
+
}), /* @__PURE__ */ jsx(PipelineCanvasPanelOverview, {})] });
|
|
43
25
|
};
|
|
44
26
|
return /* @__PURE__ */ jsx(Box, {
|
|
45
|
-
position: "absolute",
|
|
46
|
-
inset: {
|
|
47
|
-
top: 16,
|
|
48
|
-
right: 16,
|
|
49
|
-
bottom: 16
|
|
50
|
-
},
|
|
51
|
-
width: 540,
|
|
52
27
|
variant: BoxVariant.PRIMARY,
|
|
53
|
-
|
|
54
|
-
radius: Radius.LG,
|
|
55
|
-
overflow: "hidden",
|
|
28
|
+
height: "100%",
|
|
56
29
|
children: /* @__PURE__ */ jsx(Flex, {
|
|
57
30
|
direction: FlexDirection.COLUMN,
|
|
58
31
|
height: "100%",
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { usePipelineCanvasSelection } from "../hooks/usePipelineCanvasSelection.js";
|
|
2
|
+
import { PIPELINE_CANVAS_PANEL_ACTIVITY_STORAGE_KEY, PIPELINE_CANVAS_PANEL_VIEW_ID } from "./constants.js";
|
|
3
|
+
import { usePipelineCanvasPanelActivityRunIds } from "./activity/hooks/usePipelineCanvasPanelActivityRunIds.js";
|
|
4
|
+
import PipelineCanvasPanelActivity from "./activity/PipelineCanvasPanelActivity.js";
|
|
5
|
+
import PipelineCanvasPanelActivityHeader from "./activity/PipelineCanvasPanelActivityHeader.js";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import Flex, { FlexDirection } from "@galaxy-io/dls/layout/Flex";
|
|
8
|
+
import Box, { BoxVariant } from "@galaxy-io/dls/layout/Box";
|
|
9
|
+
import FlexItem from "@galaxy-io/dls/layout/FlexItem";
|
|
10
|
+
import { Orientation } from "@galaxy-io/dls/theme/enums";
|
|
11
|
+
import Divider from "@galaxy-io/dls/layout/Divider";
|
|
12
|
+
import ResizablePanels, { ResizablePanel } from "@galaxy-io/dls/layout/ResizablePanels";
|
|
13
|
+
//#region src/pages/pipelines/canvas/panel/PipelineCanvasPanelColumn.tsx
|
|
14
|
+
var PipelineCanvasPanelColumn = ({ children }) => {
|
|
15
|
+
const { showActivity, setShowActivity } = usePipelineCanvasSelection();
|
|
16
|
+
const runIds = usePipelineCanvasPanelActivityRunIds();
|
|
17
|
+
const header = /* @__PURE__ */ jsx(PipelineCanvasPanelActivityHeader, {
|
|
18
|
+
isOpen: showActivity,
|
|
19
|
+
onToggle: () => setShowActivity(!showActivity)
|
|
20
|
+
});
|
|
21
|
+
return /* @__PURE__ */ jsxs(Flex, {
|
|
22
|
+
direction: FlexDirection.COLUMN,
|
|
23
|
+
height: "100%",
|
|
24
|
+
children: [/* @__PURE__ */ jsx(FlexItem, {
|
|
25
|
+
grow: 1,
|
|
26
|
+
minHeight: 0,
|
|
27
|
+
children: /* @__PURE__ */ jsxs(ResizablePanels, {
|
|
28
|
+
orientation: Orientation.VERTICAL,
|
|
29
|
+
hasDividers: true,
|
|
30
|
+
storageKey: PIPELINE_CANVAS_PANEL_ACTIVITY_STORAGE_KEY,
|
|
31
|
+
children: [/* @__PURE__ */ jsx(ResizablePanel, {
|
|
32
|
+
id: PIPELINE_CANVAS_PANEL_VIEW_ID,
|
|
33
|
+
min: 240,
|
|
34
|
+
children: /* @__PURE__ */ jsx(Box, {
|
|
35
|
+
position: "relative",
|
|
36
|
+
height: "100%",
|
|
37
|
+
children
|
|
38
|
+
})
|
|
39
|
+
}), showActivity && /* @__PURE__ */ jsx(ResizablePanel, {
|
|
40
|
+
id: "pipeline-canvas-activity",
|
|
41
|
+
ariaLabel: "Activity",
|
|
42
|
+
defaultValue: 320,
|
|
43
|
+
min: 160,
|
|
44
|
+
max: 640,
|
|
45
|
+
children: /* @__PURE__ */ jsx(Box, {
|
|
46
|
+
variant: BoxVariant.PRIMARY,
|
|
47
|
+
height: "100%",
|
|
48
|
+
children: /* @__PURE__ */ jsxs(Flex, {
|
|
49
|
+
direction: FlexDirection.COLUMN,
|
|
50
|
+
height: "100%",
|
|
51
|
+
children: [header, /* @__PURE__ */ jsx(PipelineCanvasPanelActivity, { runIds })]
|
|
52
|
+
})
|
|
53
|
+
})
|
|
54
|
+
})]
|
|
55
|
+
})
|
|
56
|
+
}), !showActivity && /* @__PURE__ */ jsxs(Box, {
|
|
57
|
+
variant: BoxVariant.PRIMARY,
|
|
58
|
+
children: [/* @__PURE__ */ jsx(Divider, {}), header]
|
|
59
|
+
})]
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
//#endregion
|
|
63
|
+
export { PipelineCanvasPanelColumn as default };
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { ComponentProps, FC } from 'react';
|
|
1
|
+
import { ComponentProps, FC, ReactNode } from 'react';
|
|
2
2
|
import { default as BaseHeader } from '../../../../components/BaseHeader';
|
|
3
3
|
interface PipelineCanvasPanelHeaderProps {
|
|
4
4
|
title: string;
|
|
5
5
|
description?: string;
|
|
6
6
|
icon?: ComponentProps<typeof BaseHeader>["icon"];
|
|
7
|
-
tile?:
|
|
7
|
+
tile?: ReactNode;
|
|
8
|
+
actions?: ReactNode[];
|
|
9
|
+
hasDivider?: boolean;
|
|
8
10
|
onBack?: () => void;
|
|
9
|
-
onClose
|
|
11
|
+
onClose?: () => void;
|
|
10
12
|
onDelete?: () => void;
|
|
11
13
|
}
|
|
12
14
|
declare const PipelineCanvasPanelHeader: FC<PipelineCanvasPanelHeaderProps>;
|