Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🪟 🧹 Move CatalogTree from views to components/connection #18185

Merged
merged 1 commit into from
Oct 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ import { SyncSchemaField, SyncSchemaFieldObject, SyncSchemaStream, traverseSchem
import { DestinationSyncMode, SyncMode } from "core/request/AirbyteClient";
import { useBulkEditService } from "hooks/services/BulkEdit/BulkEditService";
import { useConnectionFormService } from "hooks/services/ConnectionForm/ConnectionFormService";
import { SUPPORTED_MODES } from "views/Connection/ConnectionForm/formConfig";

import { SUPPORTED_MODES } from "../../ConnectionForm/formConfig";
import { ArrowCell, CheckboxCell, HeaderCell } from "../styles";
import { flatten, getPathType } from "../utils";
import styles from "./BulkHeader.module.scss";
import { pathDisplayName, PathPopout } from "./PathPopout";
import { ArrowCell, CheckboxCell, HeaderCell } from "./styles";
import { SyncSettingsDropdown } from "./SyncSettingsDropdown";
import { flatten, getPathType } from "./utils";

const ActionCell = styled.div`
display: flex;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use "../../../scss/colors";
@use "scss/colors";

.streamFieldTableContainer {
margin-left: 85px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ import { DropDownOptionDataItem } from "components/ui/DropDown";

import { SyncSchemaField, SyncSchemaFieldObject, SyncSchemaStream } from "core/domain/catalog";
import { traverseSchemaToField } from "core/domain/catalog/fieldUtil";
import { useDestinationNamespace } from "hooks/connection/useDestinationNamespace";
import { useConnectionFormService } from "hooks/services/ConnectionForm/ConnectionFormService";
import { equal, naturalComparatorBy } from "utils/objects";
import { ConnectionFormValues, SUPPORTED_MODES } from "views/Connection/ConnectionForm/formConfig";

import {
AirbyteStreamConfiguration,
DestinationSyncMode,
NamespaceDefinitionType,
SyncMode,
} from "../../../core/request/AirbyteClient";
} from "core/request/AirbyteClient";
import { useDestinationNamespace } from "hooks/connection/useDestinationNamespace";
import { useConnectionFormService } from "hooks/services/ConnectionForm/ConnectionFormService";
import { equal, naturalComparatorBy } from "utils/objects";
import { ConnectionFormValues, SUPPORTED_MODES } from "views/Connection/ConnectionForm/formConfig";

import styles from "./CatalogSection.module.scss";
import { StreamFieldTable } from "./StreamFieldTable";
import { StreamHeader } from "./StreamHeader";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import { BulkEditServiceProvider } from "hooks/services/BulkEdit/BulkEditService
import { useConnectionFormService } from "hooks/services/ConnectionForm/ConnectionFormService";
import { naturalComparatorBy } from "utils/objects";

import { BulkHeader } from "./BulkHeader";
import { CatalogTreeBody } from "./CatalogTreeBody";
import { CatalogTreeHeader } from "./CatalogTreeHeader";
import { CatalogTreeSearch } from "./CatalogTreeSearch";
import { CatalogTreeSubheader } from "./CatalogTreeSubheader";
import { BulkHeader } from "./components/BulkHeader";

interface CatalogTreeProps {
streams: SyncSchemaStream[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import { AirbyteStreamConfiguration } from "core/request/AirbyteClient";
import { equal } from "utils/objects";
import { useTranslateDataType } from "utils/useTranslateDataType";

import DataTypeCell from "./components/DataTypeCell";
import { pathDisplayName } from "./components/PathPopout";
import DataTypeCell from "./DataTypeCell";
import { pathDisplayName } from "./PathPopout";
import { NameContainer } from "./styles";

interface FieldRowProps {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@use "../../../../scss/colors";
@use "../../../../scss/variables";
@use "scss/colors";
@use "scss/variables";

.arrow {
color: colors.$grey-300;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import React from "react";
import styled from "styled-components";

import { SyncSchemaField, SyncSchemaFieldObject } from "core/domain/catalog";
import { AirbyteStreamConfiguration } from "core/request/AirbyteClient";

import { AirbyteStreamConfiguration } from "../../../core/request/AirbyteClient";
import { pathDisplayName } from "./components/PathPopout";
import { TreeRowWrapper } from "./components/TreeRowWrapper";
import { FieldHeader } from "./FieldHeader";
import { FieldRow } from "./FieldRow";
import { pathDisplayName } from "./PathPopout";
import { TreeRowWrapper } from "./TreeRowWrapper";

const RowsContainer = styled.div`
background: ${({ theme }) => theme.whiteColor};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@use "../../../scss/colors";
@use "../../../scss/variables";
@use "scss/colors";
@use "scss/variables";
@forward "./CatalogTreeBody.module.scss";

.icon {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ import { Path, SyncSchemaField, SyncSchemaStream } from "core/domain/catalog";
import { DestinationSyncMode, SyncMode } from "core/request/AirbyteClient";
import { useBulkEditSelect } from "hooks/services/BulkEdit/BulkEditService";

import { Arrow as ArrowBlock } from "./components/Arrow";
import { IndexerType, PathPopout } from "./components/PathPopout";
import { SyncSettingsDropdown } from "./components/SyncSettingsDropdown";
import { Arrow as ArrowBlock } from "./Arrow";
import { IndexerType, PathPopout } from "./PathPopout";
import styles from "./StreamHeader.module.scss";
import { ArrowCell, HeaderCell } from "./styles";
import { SyncSettingsDropdown } from "./SyncSettingsDropdown";

const EmptyField = styled.span`
color: ${({ theme }) => theme.greyColor40};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { SyncSchemaField } from "core/domain/catalog";

import { IndexerType } from "./components/PathPopout";
import { IndexerType } from "./PathPopout";

export const flatten = (fArr: SyncSchemaField[], arr: SyncSchemaField[] = []): SyncSchemaField[] =>
fArr.reduce<SyncSchemaField[]>((acc, f) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import { FieldProps } from "formik";
import React, { useCallback } from "react";
import { FormattedMessage } from "react-intl";

import { CatalogTree } from "components/connection/CatalogTree";
import { Text } from "components/ui/Text";

import { SyncSchemaStream } from "core/domain/catalog";
import { DestinationSyncMode } from "core/request/AirbyteClient";
import { useConnectionFormService } from "hooks/services/ConnectionForm/ConnectionFormService";
import { CatalogTree } from "views/Connection/CatalogTree";

import styles from "./SyncCatalogField.module.scss";

Expand Down