Skip to content

Commit

Permalink
move components into lib/components
Browse files Browse the repository at this point in the history
  • Loading branch information
plmrry committed Aug 15, 2023
1 parent 99b2f0c commit 6f8f7bb
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 32 deletions.
1 change: 1 addition & 0 deletions flatfront-astro/src/lib/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*copy*
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { CatalogCellID, FilterCellID, TableCellID } from "./types";
import type { CatalogCellID, FilterCellID, TableCellID } from "../types";

import React from "react";

Expand All @@ -17,8 +17,8 @@ import {
is_catalog_cell_id,
log,
Providers,
} from "./shared";
import * as stores from "./stores";
} from "../shared";
import * as stores from "../stores";
import Table from "./Table";
import { FieldCard, FilterCard } from "./FieldCard";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { FieldMetadata, FilterValueRaw } from "./types";
import type { FieldMetadata, FilterValueRaw } from "../types";

import React from "react";

Expand All @@ -14,8 +14,8 @@ import {
set_filter_value,
format,
Select,
} from "./shared";
import * as stores from "./stores";
} from "../shared";
import * as stores from "../stores";
import Katex from "./Katex";

export function FieldCard(): React.JSX.Element {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import type { TopResponseEntry } from "./types";
import type { TopResponseEntry } from "../types";

import React from "react";

import { Switch } from "@headlessui/react";
import * as d3 from "d3";

import * as stores from "./stores";
import * as stores from "../stores";
import {
dispatch_action,
LabeledSelect,
log,
useStore,
CellWrapper,
} from "./shared";
} from "../shared";

export default function GlobalControls(): React.JSX.Element {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,30 +1,16 @@
import type {
Action,
CellAction,
CellID,
CatalogMetadataWrapper,
Filters,
DataRequestBody,
DataResponse,
CatalogHierarchyNode,
CatalogMetadataQuery,
CatalogResponse,
Datum,
PlotControlAction,
} from "./types";
import type { PlotControlAction } from "../types";

import Highcharts from "highcharts";
import HighchartsReact from "highcharts-react-official";
import * as stores from "./stores";
import * as stores from "../stores";
import {
LabeledSelect,
dispatch_action,
useCellID,
usePlotID,
useData,
useStore,
log,
} from "./shared";
} from "../shared";

export function Scatterplot() {
const cell_id = useCellID();
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type {
CatalogHierarchyNode,
FieldMetadata,
Datum,
} from "./types";
} from "../types";

import type {
ColumnDef,
Expand All @@ -18,7 +18,6 @@ import {
useReactTable,
} from "@tanstack/react-table";

import { log } from "./shared";
import Katex from "./Katex";

export default function Table({
Expand Down
3 changes: 1 addition & 2 deletions flatfront-astro/src/lib/stores.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type {
Action,
CatalogHierarchyNode,
CatalogMetadataQuery,
CatalogMetadataWrapper,
CatalogResponse,
Cell,
Expand All @@ -24,7 +23,7 @@ import type {
QueryObserverResult,
QueryObserverOptions,
} from "@tanstack/query-core";
import type { Readable, Writable } from "svelte/store";
import type { Readable } from "svelte/store";

import { QueryClient } from "@tanstack/query-core";
import { QueryObserver } from "@tanstack/query-core";
Expand Down
4 changes: 2 additions & 2 deletions flatfront-astro/src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import "../lib/globals.css";
import "highcharts/css/highcharts.css";
import App from "../lib/App";
import App from "../lib/components/App";
---

<html lang="en" class="dark">
Expand All @@ -15,4 +15,4 @@ import App from "../lib/App";
<body class="bg-light-0 dark:bg-dark-0 text-light-text dark:text-dark-text">
<App client:only="react" />
</body>
</html>
</html>

0 comments on commit 6f8f7bb

Please sign in to comment.