@galaxy-io/filament-ui 0.9.0 → 0.11.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/api/queries/pipeline_versions.d.ts +5 -0
- package/dist/components/connections/ConnectorPreviewChip.d.ts +7 -0
- package/dist/components/connections/ConnectorPreviewChip.js +11 -0
- package/dist/gen/ingestion/v1/connectors_pb.d.ts +11 -30
- package/dist/gen/ingestion/v1/connectors_pb.js +2 -24
- package/dist/gen/ingestion/v1/pipelines_pb.d.ts +29 -0
- package/dist/gen/ingestion/v1/pipelines_pb.js +17 -12
- package/dist/module/commands.js +1 -1
- package/dist/pages/connections/ConnectionsPage.js +5 -1
- package/dist/pages/connections/components/card/ConnectionCard.d.ts +1 -0
- package/dist/pages/connections/components/card/ConnectionCard.js +9 -4
- package/dist/pages/connections/components/create/select/CreateConnectionSelectorCard.js +9 -4
- package/dist/pages/connections/components/create/select/CreateConnectionSelectorSidebar.js +2 -2
- package/dist/pages/connections/components/create/select/hooks/useCreateConnectionSelectorCatalog.js +1 -1
- package/dist/pages/connections/components/create/types.d.ts +1 -3
- package/dist/pages/connections/components/create/types.js +1 -3
- package/dist/pages/connections/components/create/utils.js +2 -3
- package/dist/pages/connections/components/form/ConnectionForm.js +2 -3
- package/dist/pages/connections/components/form/ConnectionFormPreviewAlert.d.ts +10 -0
- package/dist/pages/connections/components/form/{ConnectionFormMaturityAlert.js → ConnectionFormPreviewAlert.js} +5 -8
- package/dist/pages/connections/constants.d.ts +0 -3
- package/dist/pages/connections/constants.js +3 -23
- package/dist/pages/pipelines/canvas/constants.d.ts +1 -0
- package/dist/pages/pipelines/canvas/constants.js +2 -1
- package/dist/pages/pipelines/canvas/graph/diff.js +4 -1
- package/dist/pages/pipelines/canvas/graph/serialize.js +1 -0
- package/dist/pages/pipelines/canvas/hooks/usePipelineCanvasEdgeResources.d.ts +2 -1
- package/dist/pages/pipelines/canvas/hooks/usePipelineCanvasEdgeResources.js +2 -0
- package/dist/pages/pipelines/canvas/hooks/usePipelineCanvasPanelResourceOptions.d.ts +1 -0
- package/dist/pages/pipelines/canvas/hooks/usePipelineCanvasPanelResourceOptions.js +2 -1
- package/dist/pages/pipelines/canvas/panel/overview/resource/PipelineCanvasPanelResourceDetail.js +29 -5
- package/dist/pages/pipelines/canvas/panel/overview/resource/PipelineCanvasPanelResourcePartitionsSection.d.ts +11 -0
- package/dist/pages/pipelines/canvas/panel/overview/resource/PipelineCanvasPanelResourcePartitionsSection.js +35 -0
- package/dist/pages/pipelines/canvas/routes/PipelineCanvasRoutesRowControls.js +10 -3
- package/dist/pages/pipelines/canvas/types.d.ts +1 -0
- package/dist/pages/pipelines/canvas/utils.d.ts +2 -1
- package/dist/pages/pipelines/canvas/utils.js +2 -1
- package/dist/pages/pipelines/components/create/CreatePipelineModalProvider.d.ts +2 -1
- package/dist/pages/pipelines/components/create/CreatePipelineModalProvider.js +4 -0
- package/dist/pages/pipelines/components/create/actions.d.ts +11 -2
- package/dist/pages/pipelines/components/create/actions.js +1 -0
- package/dist/pages/pipelines/components/create/hooks/useCreatePipelineResources.js +9 -3
- package/dist/pages/pipelines/components/create/reducer.js +16 -0
- package/dist/pages/pipelines/components/create/rows.js +9 -1
- package/dist/pages/pipelines/components/create/serialize.js +8 -2
- package/dist/pages/pipelines/components/create/steps/components/CreatePipelineModalResourcesColumnsPane.js +90 -31
- package/dist/pages/pipelines/components/create/steps/components/CreatePipelineModalResourcesPaneSection.d.ts +9 -0
- package/dist/pages/pipelines/components/create/steps/components/CreatePipelineModalResourcesPaneSection.js +78 -0
- package/dist/pages/pipelines/components/create/types.d.ts +4 -1
- package/dist/pages/pipelines/components/create/utils.js +1 -0
- package/dist/pages/pipelines/components/header/PipelinePageSaveIssues.js +12 -9
- package/dist/pages/pipelines/components/resource/PipelineResourcePartitionsChip.d.ts +7 -0
- package/dist/pages/pipelines/components/resource/PipelineResourcePartitionsChip.js +11 -0
- package/dist/pages/pipelines/components/resource/PipelineResourcePartitionsTable.d.ts +11 -0
- package/dist/pages/pipelines/components/resource/PipelineResourcePartitionsTable.js +45 -0
- package/dist/pages/pipelines/components/resource/types.d.ts +6 -2
- package/dist/pages/pipelines/components/resource/types.js +1 -0
- package/dist/pages/pipelines/components/resource/utils.d.ts +11 -2
- package/dist/pages/pipelines/components/resource/utils.js +7 -2
- package/dist/styles.css +3 -0
- package/package.json +3 -3
- package/dist/pages/connections/components/form/ConnectionFormMaturityAlert.d.ts +0 -11
|
@@ -1,21 +1,29 @@
|
|
|
1
|
+
import { ReadMode } from "../../../../../../gen/ingestion/v1/common_pb.js";
|
|
1
2
|
import BaseHeader, { BaseHeaderSize } from "../../../../../../components/BaseHeader.js";
|
|
2
3
|
import { useCreatePipelineModalActions, useCreatePipelineModalState } from "../../CreatePipelineModalProvider.js";
|
|
3
4
|
import PipelineResourceColumnsChip from "../../../resource/PipelineResourceColumnsChip.js";
|
|
4
5
|
import CreatePipelineModalResourcesColumnsPaneFooter from "./CreatePipelineModalResourcesColumnsPaneFooter.js";
|
|
6
|
+
import CreatePipelineModalResourcesPaneSection from "./CreatePipelineModalResourcesPaneSection.js";
|
|
5
7
|
import PipelineResourceColumnsTable from "../../../resource/PipelineResourceColumnsTable.js";
|
|
6
|
-
import
|
|
8
|
+
import PipelineResourcePartitionsChip from "../../../resource/PipelineResourcePartitionsChip.js";
|
|
9
|
+
import PipelineResourcePartitionsTable from "../../../resource/PipelineResourcePartitionsTable.js";
|
|
10
|
+
import { ColumnsIcon, FlowArrowIcon, SquaresFourIcon } from "@phosphor-icons/react";
|
|
7
11
|
import { useState } from "react";
|
|
8
12
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
9
13
|
import Flex, { AlignItems, FlexDirection } from "@galaxy-io/dls/layout/Flex";
|
|
10
14
|
import Box from "@galaxy-io/dls/layout/Box";
|
|
15
|
+
import FlexItem from "@galaxy-io/dls/layout/FlexItem";
|
|
11
16
|
import { FontFamily } from "@galaxy-io/dls/theme/enums";
|
|
12
17
|
import SearchInput from "@galaxy-io/dls/inputs/SearchInput";
|
|
13
18
|
import Divider from "@galaxy-io/dls/layout/Divider";
|
|
19
|
+
import ScrollArea from "@galaxy-io/dls/layout/ScrollArea";
|
|
14
20
|
//#region src/pages/pipelines/components/create/steps/components/CreatePipelineModalResourcesColumnsPane.tsx
|
|
15
21
|
var CreatePipelineModalResourcesColumnsPane = ({ row, onClose }) => {
|
|
16
22
|
const { activeSinkId, hasReadLevers } = useCreatePipelineModalState();
|
|
17
|
-
const { setResourceColumns } = useCreatePipelineModalActions();
|
|
23
|
+
const { setResourceColumns, setResourcePartitions } = useCreatePipelineModalActions();
|
|
18
24
|
const [search, setSearch] = useState("");
|
|
25
|
+
const [partitionSearch, setPartitionSearch] = useState("");
|
|
26
|
+
const hasPartitions = row.partitions.length > 0 && row.readMode !== ReadMode.INCREMENTAL;
|
|
19
27
|
return /* @__PURE__ */ jsx(Box, {
|
|
20
28
|
width: 440,
|
|
21
29
|
height: "100%",
|
|
@@ -37,42 +45,93 @@ var CreatePipelineModalResourcesColumnsPane = ({ row, onClose }) => {
|
|
|
37
45
|
family: FontFamily.MONO,
|
|
38
46
|
icon: FlowArrowIcon,
|
|
39
47
|
size: BaseHeaderSize.MEDIUM,
|
|
40
|
-
actions: [/* @__PURE__ */ jsx(PipelineResourceColumnsChip, {
|
|
41
|
-
selectedCount: row.selectedColumns.length,
|
|
42
|
-
totalCount: row.columns.length
|
|
43
|
-
}, "columns")],
|
|
44
48
|
onClose
|
|
45
49
|
})
|
|
46
50
|
}),
|
|
47
51
|
/* @__PURE__ */ jsx(Divider, {}),
|
|
48
|
-
/* @__PURE__ */ jsx(
|
|
49
|
-
padding: 8,
|
|
50
|
-
children: /* @__PURE__ */ jsx(SearchInput, {
|
|
51
|
-
value: search,
|
|
52
|
-
onChange: setSearch,
|
|
53
|
-
placeholder: "Search columns...",
|
|
54
|
-
ariaLabel: "Search columns",
|
|
55
|
-
fillWidth: true
|
|
56
|
-
})
|
|
57
|
-
}),
|
|
58
|
-
/* @__PURE__ */ jsx(Divider, {}),
|
|
59
|
-
/* @__PURE__ */ jsx(Flex, {
|
|
60
|
-
direction: FlexDirection.COLUMN,
|
|
52
|
+
/* @__PURE__ */ jsx(FlexItem, {
|
|
61
53
|
grow: 1,
|
|
62
54
|
basis: 0,
|
|
63
55
|
minHeight: 0,
|
|
64
|
-
children: /* @__PURE__ */ jsx(
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
56
|
+
children: /* @__PURE__ */ jsx(ScrollArea, { children: /* @__PURE__ */ jsxs(Flex, {
|
|
57
|
+
direction: FlexDirection.COLUMN,
|
|
58
|
+
gap: 8,
|
|
59
|
+
padding: 12,
|
|
60
|
+
children: [/* @__PURE__ */ jsxs(CreatePipelineModalResourcesPaneSection, {
|
|
61
|
+
icon: ColumnsIcon,
|
|
62
|
+
header: "Columns",
|
|
63
|
+
trailing: /* @__PURE__ */ jsx(PipelineResourceColumnsChip, {
|
|
64
|
+
selectedCount: row.selectedColumns.length,
|
|
65
|
+
totalCount: row.columns.length
|
|
66
|
+
}),
|
|
67
|
+
children: [
|
|
68
|
+
/* @__PURE__ */ jsx(Box, {
|
|
69
|
+
padding: 8,
|
|
70
|
+
children: /* @__PURE__ */ jsx(SearchInput, {
|
|
71
|
+
value: search,
|
|
72
|
+
onChange: setSearch,
|
|
73
|
+
placeholder: "Search columns...",
|
|
74
|
+
ariaLabel: "Search columns",
|
|
75
|
+
fillWidth: true
|
|
76
|
+
})
|
|
77
|
+
}),
|
|
78
|
+
/* @__PURE__ */ jsx(Divider, {}),
|
|
79
|
+
/* @__PURE__ */ jsx(Flex, {
|
|
80
|
+
direction: FlexDirection.COLUMN,
|
|
81
|
+
shrink: 1,
|
|
82
|
+
minHeight: 0,
|
|
83
|
+
children: /* @__PURE__ */ jsx(PipelineResourceColumnsTable, {
|
|
84
|
+
columns: row.columns,
|
|
85
|
+
selected: row.selectedColumns,
|
|
86
|
+
locked: row.lockedColumns,
|
|
87
|
+
isDisabled: !row.isSelected,
|
|
88
|
+
search,
|
|
89
|
+
onChange: (columns) => setResourceColumns({
|
|
90
|
+
sinkId: activeSinkId,
|
|
91
|
+
resource: row.name,
|
|
92
|
+
columns
|
|
93
|
+
})
|
|
94
|
+
})
|
|
95
|
+
})
|
|
96
|
+
]
|
|
97
|
+
}), hasPartitions && /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsxs(CreatePipelineModalResourcesPaneSection, {
|
|
98
|
+
icon: SquaresFourIcon,
|
|
99
|
+
header: "Partitions",
|
|
100
|
+
trailing: /* @__PURE__ */ jsx(PipelineResourcePartitionsChip, {
|
|
101
|
+
selectedCount: row.selectedPartitions.length,
|
|
102
|
+
totalCount: row.partitions.length
|
|
103
|
+
}),
|
|
104
|
+
children: [
|
|
105
|
+
/* @__PURE__ */ jsx(Box, {
|
|
106
|
+
padding: 8,
|
|
107
|
+
children: /* @__PURE__ */ jsx(SearchInput, {
|
|
108
|
+
value: partitionSearch,
|
|
109
|
+
onChange: setPartitionSearch,
|
|
110
|
+
placeholder: "Search partitions...",
|
|
111
|
+
ariaLabel: "Search partitions",
|
|
112
|
+
fillWidth: true
|
|
113
|
+
})
|
|
114
|
+
}),
|
|
115
|
+
/* @__PURE__ */ jsx(Divider, {}),
|
|
116
|
+
/* @__PURE__ */ jsx(Flex, {
|
|
117
|
+
direction: FlexDirection.COLUMN,
|
|
118
|
+
shrink: 1,
|
|
119
|
+
minHeight: 0,
|
|
120
|
+
children: /* @__PURE__ */ jsx(PipelineResourcePartitionsTable, {
|
|
121
|
+
partitions: row.partitions,
|
|
122
|
+
search: partitionSearch,
|
|
123
|
+
selected: row.selectedPartitions,
|
|
124
|
+
isDisabled: !row.isSelected,
|
|
125
|
+
onChange: (partitions) => setResourcePartitions({
|
|
126
|
+
sinkId: activeSinkId,
|
|
127
|
+
resource: row.name,
|
|
128
|
+
partitions
|
|
129
|
+
})
|
|
130
|
+
})
|
|
131
|
+
})
|
|
132
|
+
]
|
|
133
|
+
}) })]
|
|
134
|
+
}) })
|
|
76
135
|
}),
|
|
77
136
|
hasReadLevers && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Divider, {}), /* @__PURE__ */ jsx(CreatePipelineModalResourcesColumnsPaneFooter, { row })] })
|
|
78
137
|
]
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FC, PropsWithChildren, ReactNode } from 'react';
|
|
2
|
+
import { Icon as PhosphorIcon } from '@phosphor-icons/react';
|
|
3
|
+
interface CreatePipelineModalResourcesPaneSectionProps {
|
|
4
|
+
icon: PhosphorIcon;
|
|
5
|
+
header: string;
|
|
6
|
+
trailing: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
declare const CreatePipelineModalResourcesPaneSection: FC<PropsWithChildren<CreatePipelineModalResourcesPaneSectionProps>>;
|
|
9
|
+
export default CreatePipelineModalResourcesPaneSection;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { CaretDownIcon, CaretUpIcon } from "@phosphor-icons/react";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import Flex, { AlignItems, FlexDirection } from "@galaxy-io/dls/layout/Flex";
|
|
6
|
+
import { t } from "@galaxy-io/dls/theme/tokens/t";
|
|
7
|
+
import Text, { TextSize, TextWeight } from "@galaxy-io/dls/text/Text";
|
|
8
|
+
import FlexItem from "@galaxy-io/dls/layout/FlexItem";
|
|
9
|
+
import Icon, { IconVariant } from "@galaxy-io/dls/icons/Icon";
|
|
10
|
+
import { styled } from "@linaria/react";
|
|
11
|
+
import Divider from "@galaxy-io/dls/layout/Divider";
|
|
12
|
+
//#region src/pages/pipelines/components/create/steps/components/CreatePipelineModalResourcesPaneSection.tsx
|
|
13
|
+
var CreatePipelineModalResourcesPaneSectionIsland = /*#__PURE__*/ styled("div")({
|
|
14
|
+
name: "CreatePipelineModalResourcesPaneSectionIsland",
|
|
15
|
+
class: "filament-CreatePipelineModalResourcesPaneSection-CreatePipelineModalResourcesPaneSectionIsland-c1w1vqzw",
|
|
16
|
+
propsAsIs: false
|
|
17
|
+
});
|
|
18
|
+
var _exp5 = () => ({ $isOpen }) => $isOpen ? "1fr" : "0fr";
|
|
19
|
+
var _exp6 = () => ({ $isOpen }) => $isOpen ? "visible" : "hidden";
|
|
20
|
+
var _exp8 = () => ({ $isOpen }) => $isOpen ? "0s" : t.duration.base;
|
|
21
|
+
var CreatePipelineModalResourcesPaneSectionBody = /*#__PURE__*/ styled("div")({
|
|
22
|
+
name: "CreatePipelineModalResourcesPaneSectionBody",
|
|
23
|
+
class: "filament-CreatePipelineModalResourcesPaneSection-CreatePipelineModalResourcesPaneSectionBody-c146pte1",
|
|
24
|
+
propsAsIs: false,
|
|
25
|
+
vars: {
|
|
26
|
+
"c146pte1-0": [_exp5()],
|
|
27
|
+
"c146pte1-1": [_exp6()],
|
|
28
|
+
"c146pte1-2": [_exp8()]
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
var CreatePipelineModalResourcesPaneSectionToggle = /*#__PURE__*/ styled("button")({
|
|
32
|
+
name: "CreatePipelineModalResourcesPaneSectionToggle",
|
|
33
|
+
class: "filament-CreatePipelineModalResourcesPaneSection-CreatePipelineModalResourcesPaneSectionToggle-c1xznl66",
|
|
34
|
+
propsAsIs: false
|
|
35
|
+
});
|
|
36
|
+
var CreatePipelineModalResourcesPaneSection = ({ icon, header, trailing, children }) => {
|
|
37
|
+
const [isOpen, setIsOpen] = useState(true);
|
|
38
|
+
return /* @__PURE__ */ jsxs(CreatePipelineModalResourcesPaneSectionIsland, { children: [/* @__PURE__ */ jsx(CreatePipelineModalResourcesPaneSectionToggle, {
|
|
39
|
+
type: "button",
|
|
40
|
+
"aria-expanded": isOpen,
|
|
41
|
+
onClick: () => setIsOpen(!isOpen),
|
|
42
|
+
children: /* @__PURE__ */ jsxs(Flex, {
|
|
43
|
+
alignItems: AlignItems.CENTER,
|
|
44
|
+
gap: 8,
|
|
45
|
+
children: [
|
|
46
|
+
/* @__PURE__ */ jsx(Icon, {
|
|
47
|
+
component: icon,
|
|
48
|
+
size: 15,
|
|
49
|
+
variant: IconVariant.SECONDARY
|
|
50
|
+
}),
|
|
51
|
+
/* @__PURE__ */ jsx(FlexItem, {
|
|
52
|
+
grow: 1,
|
|
53
|
+
children: /* @__PURE__ */ jsx(Text, {
|
|
54
|
+
size: TextSize.BODY_MD,
|
|
55
|
+
weight: TextWeight.MEDIUM,
|
|
56
|
+
children: header
|
|
57
|
+
})
|
|
58
|
+
}),
|
|
59
|
+
trailing,
|
|
60
|
+
/* @__PURE__ */ jsx(Icon, {
|
|
61
|
+
component: isOpen ? CaretUpIcon : CaretDownIcon,
|
|
62
|
+
size: 12,
|
|
63
|
+
variant: IconVariant.SECONDARY
|
|
64
|
+
})
|
|
65
|
+
]
|
|
66
|
+
})
|
|
67
|
+
}), /* @__PURE__ */ jsx(CreatePipelineModalResourcesPaneSectionBody, {
|
|
68
|
+
$isOpen: isOpen,
|
|
69
|
+
children: /* @__PURE__ */ jsxs(Flex, {
|
|
70
|
+
direction: FlexDirection.COLUMN,
|
|
71
|
+
minHeight: 0,
|
|
72
|
+
overflow: "hidden",
|
|
73
|
+
children: [/* @__PURE__ */ jsx(Divider, {}), children]
|
|
74
|
+
})
|
|
75
|
+
})] });
|
|
76
|
+
};
|
|
77
|
+
//#endregion
|
|
78
|
+
export { CreatePipelineModalResourcesPaneSection as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExecutionMode, ReadMode, ReplicationMode, WriteMode } from '../../../../gen/ingestion/v1/common_pb';
|
|
2
2
|
import { Connection } from '../../../../gen/ingestion/v1/connections_pb';
|
|
3
|
-
import { Resource, ResourceColumn } from '../../../../gen/ingestion/v1/connectors_pb';
|
|
3
|
+
import { Resource, ResourceColumn, ResourceColumns } from '../../../../gen/ingestion/v1/connectors_pb';
|
|
4
4
|
import { Pipeline } from '../../../../gen/ingestion/v1/pipelines_pb';
|
|
5
5
|
import { PipelineNodeConfig } from '../node/types';
|
|
6
6
|
import { PipelineNotifier } from '../notifier/types';
|
|
@@ -23,6 +23,7 @@ export interface CreatePipelineModalState {
|
|
|
23
23
|
resourceReadModes: Record<Connection["id"], Record<Resource["name"], ReadMode>>;
|
|
24
24
|
resourceCursors: Record<Connection["id"], Record<Resource["name"], ResourceColumn["name"]>>;
|
|
25
25
|
resourceColumns: Record<Connection["id"], Record<Resource["name"], ResourceColumn["name"][]>>;
|
|
26
|
+
resourcePartitions: Record<Connection["id"], Record<Resource["name"], ResourceColumns["partitions"]>>;
|
|
26
27
|
resourceWriteModes: Record<Connection["id"], Record<Resource["name"], WriteMode>>;
|
|
27
28
|
sinkWriteModes: Record<Connection["id"], WriteMode>;
|
|
28
29
|
nodeConfigs: Record<Connection["id"], PipelineNodeConfig>;
|
|
@@ -50,6 +51,8 @@ export interface CreatePipelineModalResourceRow {
|
|
|
50
51
|
selectedColumns: ResourceColumn["name"][];
|
|
51
52
|
lockedColumns: ResourceColumn["name"][];
|
|
52
53
|
isColumnSelectable: boolean;
|
|
54
|
+
partitions: ResourceColumns["partitions"];
|
|
55
|
+
selectedPartitions: ResourceColumns["partitions"];
|
|
53
56
|
status?: PipelineResourceStatus;
|
|
54
57
|
}
|
|
55
58
|
export interface CreatePipelineModalSinkRow {
|
|
@@ -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
|
})]
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import Chip, { ChipSize, ChipVariant } from "@galaxy-io/dls/chips/Chip";
|
|
3
|
+
//#region src/pages/pipelines/components/resource/PipelineResourcePartitionsChip.tsx
|
|
4
|
+
var PipelineResourcePartitionsChip = ({ selectedCount, totalCount }) => /* @__PURE__ */ jsx(Chip, {
|
|
5
|
+
label: `${selectedCount} of ${totalCount}`,
|
|
6
|
+
tooltip: "Partitions to backfill. Changes stream from every partition.",
|
|
7
|
+
size: ChipSize.SMALL,
|
|
8
|
+
variant: selectedCount === totalCount ? ChipVariant.TERTIARY : ChipVariant.PRIMARY
|
|
9
|
+
});
|
|
10
|
+
//#endregion
|
|
11
|
+
export { PipelineResourcePartitionsChip as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ResourceColumns } from '../../../../gen/ingestion/v1/connectors_pb';
|
|
3
|
+
interface PipelineResourcePartitionsTableProps {
|
|
4
|
+
partitions: ResourceColumns["partitions"];
|
|
5
|
+
selected: ResourceColumns["partitions"];
|
|
6
|
+
isDisabled: boolean;
|
|
7
|
+
search?: string;
|
|
8
|
+
onChange: (selected: ResourceColumns["partitions"]) => void;
|
|
9
|
+
}
|
|
10
|
+
declare const PipelineResourcePartitionsTable: FC<PipelineResourcePartitionsTableProps>;
|
|
11
|
+
export default PipelineResourcePartitionsTable;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { MagnifyingGlassIcon } from "@phosphor-icons/react";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import Text, { TextSize } from "@galaxy-io/dls/text/Text";
|
|
5
|
+
import { FontFamily } from "@galaxy-io/dls/theme/enums";
|
|
6
|
+
import { isSearchMatch } from "@galaxy-io/dls/utils/search";
|
|
7
|
+
import EmptyLayout, { EmptyLayoutSize } from "@galaxy-io/dls/layout/EmptyLayout";
|
|
8
|
+
import InfiniteTable, { InfiniteTableSize } from "@galaxy-io/dls/table/InfiniteTable";
|
|
9
|
+
//#region src/pages/pipelines/components/resource/PipelineResourcePartitionsTable.tsx
|
|
10
|
+
var RESOURCE_PARTITION_TABLE_COLUMNS = [{
|
|
11
|
+
id: "name",
|
|
12
|
+
header: "Partition",
|
|
13
|
+
isRowHeader: true,
|
|
14
|
+
cell: ({ row }) => /* @__PURE__ */ jsx(Text, {
|
|
15
|
+
size: TextSize.BODY_SM,
|
|
16
|
+
family: FontFamily.MONO,
|
|
17
|
+
lineClamp: 1,
|
|
18
|
+
children: row.name
|
|
19
|
+
})
|
|
20
|
+
}];
|
|
21
|
+
var PipelineResourcePartitionsTable = ({ partitions, selected, isDisabled, search = "", onChange }) => {
|
|
22
|
+
const rows = useMemo(() => partitions.filter((name) => isSearchMatch(search, name)).map((name) => ({ name })), [partitions, search]);
|
|
23
|
+
const handleChange = (next) => {
|
|
24
|
+
const visible = new Set(rows.map((row) => row.name));
|
|
25
|
+
onChange(partitions.filter((name) => next.includes(name) || !visible.has(name) && selected.includes(name)));
|
|
26
|
+
};
|
|
27
|
+
return /* @__PURE__ */ jsx(InfiniteTable, {
|
|
28
|
+
ariaLabel: "Partitions",
|
|
29
|
+
columns: RESOURCE_PARTITION_TABLE_COLUMNS,
|
|
30
|
+
data: rows,
|
|
31
|
+
getRowId: (row) => row.name,
|
|
32
|
+
size: InfiniteTableSize.SMALL,
|
|
33
|
+
inset: 4,
|
|
34
|
+
value: selected,
|
|
35
|
+
onChange: isDisabled ? void 0 : handleChange,
|
|
36
|
+
emptyState: /* @__PURE__ */ jsx(EmptyLayout, {
|
|
37
|
+
size: EmptyLayoutSize.SMALL,
|
|
38
|
+
icon: MagnifyingGlassIcon,
|
|
39
|
+
header: "No partitions match your search"
|
|
40
|
+
}),
|
|
41
|
+
isSelectable: true
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
//#endregion
|
|
45
|
+
export { PipelineResourcePartitionsTable as default };
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import { Resource } from '../../../../gen/ingestion/v1/connectors_pb';
|
|
1
|
+
import { Resource, ResourceColumns } from '../../../../gen/ingestion/v1/connectors_pb';
|
|
2
2
|
import { CanvasNode } from '../../canvas/types';
|
|
3
3
|
export declare enum PipelineResourceStatusField {
|
|
4
4
|
READ_MODE = "readMode",
|
|
5
5
|
CURSOR = "cursor",
|
|
6
6
|
WRITE_MODE = "writeMode",
|
|
7
|
-
COLUMNS = "columns"
|
|
7
|
+
COLUMNS = "columns",
|
|
8
|
+
PARTITIONS = "partitions"
|
|
9
|
+
}
|
|
10
|
+
export interface PipelineResourcePartitionRow {
|
|
11
|
+
name: ResourceColumns["partitions"][number];
|
|
8
12
|
}
|
|
9
13
|
export interface PipelineResourceStatus {
|
|
10
14
|
resource: Resource["name"];
|
|
@@ -4,6 +4,7 @@ var PipelineResourceStatusField = /* @__PURE__ */ function(PipelineResourceStatu
|
|
|
4
4
|
PipelineResourceStatusField["CURSOR"] = "cursor";
|
|
5
5
|
PipelineResourceStatusField["WRITE_MODE"] = "writeMode";
|
|
6
6
|
PipelineResourceStatusField["COLUMNS"] = "columns";
|
|
7
|
+
PipelineResourceStatusField["PARTITIONS"] = "partitions";
|
|
7
8
|
return PipelineResourceStatusField;
|
|
8
9
|
}({});
|
|
9
10
|
//#endregion
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SelectOption } from '@galaxy-io/dls/inputs/SelectInput';
|
|
2
2
|
import { ReadMode, WriteMode } from '../../../../gen/ingestion/v1/common_pb';
|
|
3
|
-
import { Resource, ResourceColumn } from '../../../../gen/ingestion/v1/connectors_pb';
|
|
4
|
-
import { ResourceColumnSelection } from '../../../../gen/ingestion/v1/pipelines_pb';
|
|
3
|
+
import { Resource, ResourceColumn, ResourceColumns } from '../../../../gen/ingestion/v1/connectors_pb';
|
|
4
|
+
import { ResourceColumnSelection, ResourcePartitionSelection } from '../../../../gen/ingestion/v1/pipelines_pb';
|
|
5
5
|
import { PipelineResourceStatus } from './types';
|
|
6
6
|
export declare const getReadModeSelectOptions: (modes: ReadMode[], selected: ReadMode) => SelectOption[];
|
|
7
7
|
export declare const getWriteModeSelectOptions: (modes: WriteMode[], selected: WriteMode) => SelectOption[];
|
|
@@ -26,6 +26,15 @@ export declare const createResourceColumnSelections: ({ resource, selected, colu
|
|
|
26
26
|
selected: ResourceColumn["name"][];
|
|
27
27
|
columns: ResourceColumn[];
|
|
28
28
|
}) => ResourceColumnSelection[];
|
|
29
|
+
export declare const getEffectivePartitionSelection: ({ stored, partitions, }: {
|
|
30
|
+
stored: ResourcePartitionSelection["partitions"] | undefined;
|
|
31
|
+
partitions: ResourceColumns["partitions"];
|
|
32
|
+
}) => ResourceColumns["partitions"];
|
|
33
|
+
export declare const createResourcePartitionSelections: ({ resource, selected, partitions, }: {
|
|
34
|
+
resource: Resource["name"];
|
|
35
|
+
selected: ResourceColumns["partitions"];
|
|
36
|
+
partitions: ResourceColumns["partitions"];
|
|
37
|
+
}) => ResourcePartitionSelection[];
|
|
29
38
|
export declare const addColumnToSelections: (selections: ResourceColumnSelection[], resource: Resource["name"], column: ResourceColumn["name"]) => ResourceColumnSelection[];
|
|
30
39
|
export declare const getDefaultReadMode: ({ columns, readModeOptions, managedIncremental, fallback, }: {
|
|
31
40
|
columns: ResourceColumn[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReadMode, WriteMode } from "../../../../gen/ingestion/v1/common_pb.js";
|
|
2
2
|
import { createEnumSelectOptions } from "../../../../utils/select.js";
|
|
3
|
-
import { ResourceColumnSelectionSchema } from "../../../../gen/ingestion/v1/pipelines_pb.js";
|
|
3
|
+
import { ResourceColumnSelectionSchema, ResourcePartitionSelectionSchema } from "../../../../gen/ingestion/v1/pipelines_pb.js";
|
|
4
4
|
import { READ_MODE_TO_LABEL_MAP, WRITE_MODE_TO_LABEL_MAP } from "../create/constants.js";
|
|
5
5
|
import { READ_MODE_TO_WRITE_MODES_MAP } from "./constants.js";
|
|
6
6
|
import { PipelineResourceStatusField } from "./types.js";
|
|
@@ -38,6 +38,11 @@ var createResourceColumnSelections = ({ resource, selected, columns }) => select
|
|
|
38
38
|
resource,
|
|
39
39
|
columns: selected
|
|
40
40
|
})];
|
|
41
|
+
var getEffectivePartitionSelection = ({ stored, partitions }) => stored === void 0 ? partitions : partitions.filter((name) => stored.includes(name));
|
|
42
|
+
var createResourcePartitionSelections = ({ resource, selected, partitions }) => selected.length === partitions.length ? [] : [create(ResourcePartitionSelectionSchema, {
|
|
43
|
+
resource,
|
|
44
|
+
partitions: selected
|
|
45
|
+
})];
|
|
41
46
|
var addColumnToSelections = (selections, resource, column) => column === "" ? selections : selections.map((selection) => selection.resource === resource && !selection.columns.includes(column) ? create(ResourceColumnSelectionSchema, {
|
|
42
47
|
resource,
|
|
43
48
|
columns: [...selection.columns, column]
|
|
@@ -72,4 +77,4 @@ var getPipelineResourceStatus = ({ resource, readMode, readModeOptions, cursorFi
|
|
|
72
77
|
};
|
|
73
78
|
};
|
|
74
79
|
//#endregion
|
|
75
|
-
export { addColumnToSelections, createResourceColumnSelections, getCompatibleWriteModes, getCursorOptions, getCursorSelectOptions, getDefaultCursor, getDefaultReadMode, getEffectiveColumnSelection, getLockedColumnNames, getPipelineResourceStatus, getReadModeSelectOptions, getRecommendedCursor, getSharedModes, getWriteModeSelectOptions };
|
|
80
|
+
export { addColumnToSelections, createResourceColumnSelections, createResourcePartitionSelections, getCompatibleWriteModes, getCursorOptions, getCursorSelectOptions, getDefaultCursor, getDefaultReadMode, getEffectiveColumnSelection, getEffectivePartitionSelection, getLockedColumnNames, getPipelineResourceStatus, getReadModeSelectOptions, getRecommendedCursor, getSharedModes, getWriteModeSelectOptions };
|
package/dist/styles.css
CHANGED
|
@@ -7,6 +7,9 @@
|
|
|
7
7
|
.filament-IconTile-TileWrapper-tykbckc{width:var(--tykbckc-0);height:var(--tykbckc-0);display:flex;align-items:center;justify-content:center;flex-shrink:0;border:1px solid var(--gx-color-border-primary);border-radius:var(--gx-radius-md);}
|
|
8
8
|
.filament-CreatePipelineModalConnectionRowFrame-CreatePipelineModalConnectionRowFrame-cl5let1{display:flex;align-items:center;gap:var(--gx-space-8);padding:var(--gx-space-8);flex-shrink:0;border-radius:var(--gx-radius-md);cursor:var(--cl5let1-0);}.filament-CreatePipelineModalConnectionRowFrame-CreatePipelineModalConnectionRowFrame-cl5let1:hover{background-color:var(--cl5let1-1);}
|
|
9
9
|
.filament-CreatePipelineModalConnectionRow-RowControlWrapper-rv9curh{display:flex;align-items:center;flex-shrink:0;pointer-events:none;}
|
|
10
|
+
.filament-CreatePipelineModalResourcesPaneSection-CreatePipelineModalResourcesPaneSectionIsland-c1w1vqzw{display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--gx-color-border-primary);border-radius:var(--gx-radius-lg);background-color:var(--gx-color-background-secondary);}
|
|
11
|
+
.filament-CreatePipelineModalResourcesPaneSection-CreatePipelineModalResourcesPaneSectionBody-c146pte1{display:grid;grid-template-rows:var(--c146pte1-0);visibility:var(--c146pte1-1);transition:grid-template-rows var(--gx-duration-base) ease-in-out,visibility 0s linear var(--c146pte1-2);}@media (prefers-reduced-motion: reduce){.filament-CreatePipelineModalResourcesPaneSection-CreatePipelineModalResourcesPaneSectionBody-c146pte1{transition:none;}}
|
|
12
|
+
.filament-CreatePipelineModalResourcesPaneSection-CreatePipelineModalResourcesPaneSectionToggle-c1xznl66{appearance:none;background:none;border:0;padding:0;margin:0;font:inherit;color:inherit;cursor:pointer;width:100%;min-height:40px;flex-shrink:0;padding:0 var(--gx-space-12);cursor:pointer;transition:background-color var(--gx-duration-fast);}.filament-CreatePipelineModalResourcesPaneSection-CreatePipelineModalResourcesPaneSectionToggle-c1xznl66:focus-visible{outline:1px solid var(--gx-color-border-focused);outline-offset:1px;}.filament-CreatePipelineModalResourcesPaneSection-CreatePipelineModalResourcesPaneSectionToggle-c1xznl66:focus:not(:focus-visible){outline:none;}.filament-CreatePipelineModalResourcesPaneSection-CreatePipelineModalResourcesPaneSectionToggle-c1xznl66:hover{background-color:var(--gx-color-background-hovered);}
|
|
10
13
|
.filament-EmptyGraphicGhostBar-EmptyGraphicGhostBar-e1loui4w{width:var(--e1loui4w-0);height:12px;background-color:var(--gx-color-background-secondary);border-radius:var(--gx-radius-sm);}
|
|
11
14
|
.filament-EmptyGraphicGhostTileFallback-EmptyGraphicGhostTileFallback-e9h9bvp{width:24px;height:24px;background-color:var(--gx-color-background-secondary);border:1px solid var(--gx-color-border-primary);border-radius:var(--gx-radius-md);}
|
|
12
15
|
.filament-EmptyGraphicGhostTile-EmptyGraphicGhostTile-e1yzbkrz{display:flex;opacity:0.3;}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galaxy-io/filament-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.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",
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import { ConnectorKind } from '../../../../gen/ingestion/v1/common_pb';
|
|
3
|
-
import { ConnectorMaturity, ConnectorSpec } from '../../../../gen/ingestion/v1/connectors_pb';
|
|
4
|
-
interface ConnectionFormMaturityAlertProps {
|
|
5
|
-
connectorName: ConnectorSpec["name"];
|
|
6
|
-
connectorKind: ConnectorKind;
|
|
7
|
-
connectorMaturity: ConnectorMaturity;
|
|
8
|
-
connectorApiVersion: ConnectorSpec["apiVersion"];
|
|
9
|
-
}
|
|
10
|
-
declare const ConnectionFormMaturityAlert: FC<ConnectionFormMaturityAlertProps>;
|
|
11
|
-
export default ConnectionFormMaturityAlert;
|