@galaxy-io/filament-ui 0.9.0 → 0.10.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/pages/pipelines/canvas/constants.d.ts +1 -0
- package/dist/pages/pipelines/canvas/constants.js +2 -1
- package/dist/pages/pipelines/canvas/panel/overview/resource/PipelineCanvasPanelResourceDetail.js +4 -3
- package/dist/pages/pipelines/canvas/routes/PipelineCanvasRoutesRowControls.js +10 -3
- package/dist/pages/pipelines/canvas/utils.d.ts +2 -1
- package/dist/pages/pipelines/canvas/utils.js +2 -1
- package/dist/pages/pipelines/components/header/PipelinePageSaveIssues.js +12 -9
- package/package.json +3 -3
|
@@ -33,6 +33,7 @@ export declare const CONNECTOR_KIND_TO_NORMALIZED_KIND_MAP: Record<ConnectorKind
|
|
|
33
33
|
export declare const PIPELINE_CANVAS_NODE_TYPE_TO_CONNECTOR_KIND_MAP: Record<PipelineCanvasNodeType, ConnectorKind>;
|
|
34
34
|
export declare const PIPELINE_CANVAS_NODE_TYPE_TO_COUNTERPART_TYPE_MAP: Record<PipelineCanvasNodeType.SOURCE | PipelineCanvasNodeType.SINK, PipelineCanvasNodeType.SOURCE | PipelineCanvasNodeType.SINK>;
|
|
35
35
|
export declare const PIPELINE_CANVAS_EDGE_TYPE = "pipeline";
|
|
36
|
+
export declare const PIPELINE_CANVAS_EDGE_WRITE_MODE_FIELD = "write_mode";
|
|
36
37
|
export declare const PIPELINE_CANVAS_EDGE_Z_INDEX = 2000;
|
|
37
38
|
export declare const PIPELINE_CANVAS_OVERLAY_Z_INDEX = 2001;
|
|
38
39
|
export declare const PIPELINE_CANVAS_VIEW_TO_LABEL_MAP: Record<PipelineCanvasView, string>;
|
|
@@ -58,6 +58,7 @@ var PIPELINE_CANVAS_NODE_TYPE_TO_COUNTERPART_TYPE_MAP = {
|
|
|
58
58
|
[PipelineCanvasNodeType.SINK]: PipelineCanvasNodeType.SOURCE
|
|
59
59
|
};
|
|
60
60
|
var PIPELINE_CANVAS_EDGE_TYPE = "pipeline";
|
|
61
|
+
var PIPELINE_CANVAS_EDGE_WRITE_MODE_FIELD = "write_mode";
|
|
61
62
|
var PIPELINE_CANVAS_EDGE_Z_INDEX = 2e3;
|
|
62
63
|
var PIPELINE_CANVAS_VIEW_TO_LABEL_MAP = {
|
|
63
64
|
[PipelineCanvasView.CANVAS]: "Canvas",
|
|
@@ -68,4 +69,4 @@ var PIPELINE_CANVAS_VIEW_TO_ICON_MAP = {
|
|
|
68
69
|
[PipelineCanvasView.ROUTES]: FlowArrowIcon
|
|
69
70
|
};
|
|
70
71
|
//#endregion
|
|
71
|
-
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_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_NO_RUNS, PIPELINE_CANVAS_PAN_ON_DRAG, PIPELINE_CANVAS_REVEAL_ZOOM, PIPELINE_CANVAS_SNAP_GRID, PIPELINE_CANVAS_SOURCE_NODE_EXPECTED_HEIGHT, PIPELINE_CANVAS_VIEW_TO_ICON_MAP, PIPELINE_CANVAS_VIEW_TO_LABEL_MAP };
|
|
72
|
+
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_WRITE_MODE_FIELD, PIPELINE_CANVAS_EDGE_Z_INDEX, PIPELINE_CANVAS_EDIT_MODE_TO_ICON_MAP, PIPELINE_CANVAS_FIT_MIN_ZOOM, PIPELINE_CANVAS_FIT_PADDING, 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_NO_RUNS, PIPELINE_CANVAS_PAN_ON_DRAG, PIPELINE_CANVAS_REVEAL_ZOOM, PIPELINE_CANVAS_SNAP_GRID, PIPELINE_CANVAS_SOURCE_NODE_EXPECTED_HEIGHT, PIPELINE_CANVAS_VIEW_TO_ICON_MAP, PIPELINE_CANVAS_VIEW_TO_LABEL_MAP };
|
package/dist/pages/pipelines/canvas/panel/overview/resource/PipelineCanvasPanelResourceDetail.js
CHANGED
|
@@ -4,7 +4,8 @@ import KeyValueList from "../../../../../../components/KeyValueList.js";
|
|
|
4
4
|
import KeyValueListRow from "../../../../../../components/KeyValueListRow.js";
|
|
5
5
|
import { PipelineResourceStatusField } from "../../../../components/resource/types.js";
|
|
6
6
|
import { createResourceColumnSelections, getEffectiveColumnSelection, getLockedColumnNames } from "../../../../components/resource/utils.js";
|
|
7
|
-
import
|
|
7
|
+
import "../../../constants.js";
|
|
8
|
+
import { getDefaultDestinationResource, getEdgeFieldError, getEdgeResourceStatus } from "../../../utils.js";
|
|
8
9
|
import { usePipelineCanvasActions, usePipelineCanvasReadOnly } from "../../../providers/canvas/PipelineCanvasProvider.js";
|
|
9
10
|
import { usePipelineCanvasSelection } from "../../../hooks/usePipelineCanvasSelection.js";
|
|
10
11
|
import PipelineCanvasPanelSection from "../../PipelineCanvasPanelSection.js";
|
|
@@ -91,7 +92,7 @@ var PipelineCanvasPanelResourceDetail = ({ edge }) => {
|
|
|
91
92
|
lockedColumnNames
|
|
92
93
|
]);
|
|
93
94
|
const selectedColumns = useMemo(() => (columns ?? NO_COLUMNS).filter((column) => selectedColumnNames.includes(column.name)), [columns, selectedColumnNames]);
|
|
94
|
-
const columnsError = verdict
|
|
95
|
+
const columnsError = getEdgeFieldError(verdict, PipelineResourceStatusField.COLUMNS);
|
|
95
96
|
const handleColumnsChange = (next) => setEdgeConfig(edge.id, {
|
|
96
97
|
readMode: configuredReadMode,
|
|
97
98
|
writeMode: configuredWriteMode,
|
|
@@ -194,7 +195,7 @@ var PipelineCanvasPanelResourceDetail = ({ edge }) => {
|
|
|
194
195
|
},
|
|
195
196
|
placeholder: "Select a write mode...",
|
|
196
197
|
isDisabled: isReadOnly || isLoading,
|
|
197
|
-
error: getFieldError(PipelineResourceStatusField.WRITE_MODE),
|
|
198
|
+
error: getFieldError(PipelineResourceStatusField.WRITE_MODE) ?? getEdgeFieldError(verdict, "write_mode"),
|
|
198
199
|
variant: SelectInputVariant.TERTIARY,
|
|
199
200
|
fillWidth: true
|
|
200
201
|
}),
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ReadMode, WriteMode } from "../../../../gen/ingestion/v1/common_pb.js";
|
|
2
2
|
import { getEnumSelectValue, mapOptionIdToEnum } from "../../../../utils/select.js";
|
|
3
3
|
import { getCursorSelectOptions } from "../../components/resource/utils.js";
|
|
4
|
-
import {
|
|
4
|
+
import { PIPELINE_CANVAS_EDGE_WRITE_MODE_FIELD } from "../constants.js";
|
|
5
|
+
import { getEdgeFieldError, getEdgeModeOptions, getEdgeResourceStatus } from "../utils.js";
|
|
5
6
|
import { usePipelineCanvasReadOnly } from "../providers/canvas/PipelineCanvasProvider.js";
|
|
6
7
|
import { usePipelineCanvasEdgeConfig } from "../hooks/usePipelineCanvasEdgeConfig.js";
|
|
7
8
|
import { usePipelineCanvasEdgeResources } from "../hooks/usePipelineCanvasEdgeResources.js";
|
|
@@ -41,7 +42,12 @@ var PipelineCanvasRoutesRowControls = ({ route, children }) => {
|
|
|
41
42
|
writeMode,
|
|
42
43
|
cursor
|
|
43
44
|
});
|
|
44
|
-
const
|
|
45
|
+
const writeModeError = getEdgeFieldError(route.verdict, PIPELINE_CANVAS_EDGE_WRITE_MODE_FIELD);
|
|
46
|
+
const issues = [
|
|
47
|
+
...route.issues,
|
|
48
|
+
...status?.isBlocking ? [status.message] : [],
|
|
49
|
+
...writeModeError !== void 0 ? [writeModeError] : []
|
|
50
|
+
];
|
|
45
51
|
const warnings = status && !status.isBlocking ? [status.message] : [];
|
|
46
52
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
47
53
|
/* @__PURE__ */ jsxs(ControlsGroup, {
|
|
@@ -101,7 +107,8 @@ var PipelineCanvasRoutesRowControls = ({ route, children }) => {
|
|
|
101
107
|
variant: SelectInputVariant.SECONDARY,
|
|
102
108
|
size: SelectInputSize.SMALL,
|
|
103
109
|
placeholder: "Write mode...",
|
|
104
|
-
isDisabled: isReadOnly
|
|
110
|
+
isDisabled: isReadOnly,
|
|
111
|
+
isError: writeModeError !== void 0
|
|
105
112
|
})
|
|
106
113
|
})
|
|
107
114
|
})
|
|
@@ -3,7 +3,7 @@ import { Theme } from '@galaxy-io/dls/theme/tokens/types';
|
|
|
3
3
|
import { EdgeValidation } from '../../../gen/ingestion/v1/capabilities_pb';
|
|
4
4
|
import { ReadMode, WriteMode } from '../../../gen/ingestion/v1/common_pb';
|
|
5
5
|
import { Connection } from '../../../gen/ingestion/v1/connections_pb';
|
|
6
|
-
import { ResourceColumn } from '../../../gen/ingestion/v1/connectors_pb';
|
|
6
|
+
import { ResourceColumn, ValidationError } from '../../../gen/ingestion/v1/connectors_pb';
|
|
7
7
|
import { PipelineEdge } from '../../../gen/ingestion/v1/pipelines_pb';
|
|
8
8
|
import { RunInfo } from '../../../gen/ingestion/v1/runs_pb';
|
|
9
9
|
import { PipelineFlowEndpoints } from '../../../components/pipelines/utils';
|
|
@@ -17,6 +17,7 @@ export interface PipelineCanvasEdgeModeOptions {
|
|
|
17
17
|
effectiveWriteMode: WriteMode;
|
|
18
18
|
}
|
|
19
19
|
export declare const getEdgeModeOptions: (verdict: EdgeValidation | undefined, hasReadLevers: boolean) => PipelineCanvasEdgeModeOptions;
|
|
20
|
+
export declare const getEdgeFieldError: (verdict: EdgeValidation | undefined, field: ValidationError["field"]) => ValidationError["message"] | undefined;
|
|
20
21
|
type PipelineCanvasEdgeStatusResources = Pick<PipelineCanvasEdgeResources, "hasReadLevers" | "resource" | "columns" | "cursorOptions" | "isManagedIncremental" | "hasPrimaryKey">;
|
|
21
22
|
interface PipelineCanvasEdgeStatusConfig {
|
|
22
23
|
verdict: EdgeValidation | undefined;
|
|
@@ -10,6 +10,7 @@ var getEdgeModeOptions = (verdict, hasReadLevers) => ({
|
|
|
10
10
|
effectiveReadMode: verdict?.effectiveReadMode ?? ReadMode.UNSPECIFIED,
|
|
11
11
|
effectiveWriteMode: verdict?.effectiveWriteMode ?? WriteMode.UNSPECIFIED
|
|
12
12
|
});
|
|
13
|
+
var getEdgeFieldError = (verdict, field) => verdict?.errors.find((error) => error.field === field)?.message;
|
|
13
14
|
var getEdgeResourceStatus = ({ hasReadLevers, resource, columns, cursorOptions, isManagedIncremental, hasPrimaryKey }, { verdict, readMode, writeMode, cursor }) => {
|
|
14
15
|
if (!hasReadLevers || verdict === void 0 || resource === "") return void 0;
|
|
15
16
|
return getPipelineResourceStatus({
|
|
@@ -74,4 +75,4 @@ var mapCanvasNodesToFlowEndpoints = (nodes) => ({
|
|
|
74
75
|
var isConnectionNode = (node) => node.type === PipelineCanvasNodeType.SOURCE || node.type === PipelineCanvasNodeType.SINK;
|
|
75
76
|
var isPipelineCanvasConnectionDisabled = (connection, isSourceDisabled) => isSourceDisabled && connection.kind === ConnectorKind.SOURCE;
|
|
76
77
|
//#endregion
|
|
77
|
-
export { getDefaultDestinationResource, getEdgeModeOptions, getEdgeResourceStatus, getPipelineCanvasRevealBounds, getTransformStepCount, isConnectionNode, isPipelineCanvasConnectionDisabled, isPipelineCanvasRouteRunning, mapCanvasNodesToFlowEndpoints, mapEdgesToStyledEdges, mapElementsToSelected };
|
|
78
|
+
export { getDefaultDestinationResource, getEdgeFieldError, getEdgeModeOptions, getEdgeResourceStatus, getPipelineCanvasRevealBounds, getTransformStepCount, isConnectionNode, isPipelineCanvasConnectionDisabled, isPipelineCanvasRouteRunning, mapCanvasNodesToFlowEndpoints, mapEdgesToStyledEdges, mapElementsToSelected };
|
|
@@ -27,25 +27,28 @@ var PipelinePageSaveIssues = ({ issues, onSelectResource }) => {
|
|
|
27
27
|
disabled: edgeId === void 0,
|
|
28
28
|
onClick: edgeId === void 0 ? void 0 : () => onSelectResource(edgeId),
|
|
29
29
|
children: /* @__PURE__ */ jsxs(Flex, {
|
|
30
|
-
alignItems: AlignItems.
|
|
30
|
+
alignItems: AlignItems.START,
|
|
31
31
|
justifyContent: JustifyContent.SPACE_BETWEEN,
|
|
32
32
|
gap: 16,
|
|
33
33
|
fillWidth: true,
|
|
34
34
|
children: [/* @__PURE__ */ jsxs(Flex, {
|
|
35
35
|
gap: 8,
|
|
36
|
-
alignItems: AlignItems.
|
|
37
|
-
|
|
38
|
-
children: [/* @__PURE__ */ jsx(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
alignItems: AlignItems.START,
|
|
37
|
+
minWidth: 0,
|
|
38
|
+
children: [/* @__PURE__ */ jsx(Flex, {
|
|
39
|
+
height: 20,
|
|
40
|
+
shrink: 0,
|
|
41
|
+
alignItems: AlignItems.CENTER,
|
|
42
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
43
|
+
component: PIPELINE_PAGE_SAVE_ISSUE_KIND_TO_ICON_MAP[issue.kind],
|
|
44
|
+
size: 16,
|
|
45
|
+
variant: IconVariant.SECONDARY
|
|
46
|
+
})
|
|
42
47
|
}), /* @__PURE__ */ jsx(FlexItem, {
|
|
43
48
|
shrink: 1,
|
|
44
49
|
minWidth: 0,
|
|
45
|
-
overflow: "hidden",
|
|
46
50
|
children: /* @__PURE__ */ jsx(Text, {
|
|
47
51
|
size: TextSize.BODY_MD,
|
|
48
|
-
lineClamp: 1,
|
|
49
52
|
children: issue[PIPELINE_PAGE_SAVE_ISSUE_KIND_TO_LABEL_FIELD_MAP[issue.kind]]
|
|
50
53
|
})
|
|
51
54
|
})]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galaxy-io/filament-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Filament's web UI as a Galaxy module a host app mounts",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
"@codemirror/view": "^6.43.1",
|
|
114
114
|
"@connectrpc/connect": "^2.1.0",
|
|
115
115
|
"@connectrpc/connect-query": "^2.1.1",
|
|
116
|
-
"@galaxy-io/dls": "^2.13.
|
|
116
|
+
"@galaxy-io/dls": "^2.13.4",
|
|
117
117
|
"@lezer/highlight": "^1.2.3",
|
|
118
118
|
"@tanstack/react-query": "^5.90.12",
|
|
119
119
|
"@tanstack/react-router": "^1.141.2",
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
"@connectrpc/connect": "^2.1.0",
|
|
142
142
|
"@connectrpc/connect-query": "^2.1.1",
|
|
143
143
|
"@connectrpc/connect-web": "^2.1.0",
|
|
144
|
-
"@galaxy-io/dls": "^2.13.
|
|
144
|
+
"@galaxy-io/dls": "^2.13.4",
|
|
145
145
|
"@lezer/highlight": "^1.2.3",
|
|
146
146
|
"@tanstack/react-query": "^5.90.12",
|
|
147
147
|
"@tanstack/react-router": "^1.141.2",
|