Skip to content

Commit

Permalink
Fix compile errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenh committed Aug 21, 2023
1 parent 4141e04 commit 5933fca
Show file tree
Hide file tree
Showing 13 changed files with 28 additions and 31 deletions.
2 changes: 1 addition & 1 deletion src/components/Filters/Filters.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
Filters,
GridColumn,
GridDataRow,
GridTable,
GridTableUnsafe as GridTable,
multiFilter,
numberRangeFilter,
simpleHeader,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Layout/Layout.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
FullBleed,
GridColumn,
GridDataRow,
GridTable,
GridTableUnsafe as GridTable,
PreventBrowserScroll,
ScrollableContent,
ScrollableParent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { withBeamDecorator, zeroTo } from "src/utils/sb";
import { Css } from "../../../Css";
import { Button } from "../../Button";
import { IconButton } from "../../IconButton";
import { GridColumn, GridDataRow, GridTable, SimpleHeaderAndData } from "../../Table";
import { GridColumn, GridDataRow, GridTableUnsafe as GridTable, SimpleHeaderAndData } from "../../Table";
import { FullBleed } from "../FullBleed";
import { PreventBrowserScroll } from "../PreventBrowserScroll";
import { ScrollableContent } from "../ScrollableContent";
Expand Down
8 changes: 7 additions & 1 deletion src/components/Modal/TestModalContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@ import { ScrollableContent, ScrollableParent } from "src/components/Layout";
import { ModalBody, ModalFooter, ModalHeader } from "src/components/Modal/Modal";
import { useModal } from "src/components/Modal/useModal";
import { useSnackbar } from "src/components/Snackbar";
import { GridColumn, GridDataRow, GridTable, simpleHeader, SimpleHeaderAndData } from "src/components/Table";
import {
GridColumn,
GridDataRow,
GridTableUnsafe as GridTable,
simpleHeader,
SimpleHeaderAndData,
} from "src/components/Table";
import { Tag } from "src/components/Tag";
import { Css } from "src/Css";
import { jan1 } from "src/forms/formStateDomain";
Expand Down
2 changes: 1 addition & 1 deletion src/components/SuperDrawer/SuperDrawer.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ReactNode, useEffect, useRef } from "react";
import {
Button,
GridColumn,
GridTable,
GridTableUnsafe as GridTable,
ModalBody,
ModalFooter,
ModalHeader,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Table/GridTable.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
GridColumn,
GridDataRow,
GridRowLookup,
GridTable,
GridTableUnsafe as GridTable,
Icon,
IconButton,
numericColumn,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Table/Table.qa.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Button } from "src";
import { Chips } from "src/components/Chips";
import { Icon } from "src/components/Icon";
import { GridDataRow } from "src/components/Table/components/Row";
import { GridSortConfig, GridTable, GridTableProps } from "src/components/Table/GridTable";
import { GridSortConfig, GridTableProps, GridTableUnsafe as GridTable } from "src/components/Table/GridTable";
import { useGridTableApi } from "src/components/Table/GridTableApi";
import { TableActions } from "src/components/Table/TableActions";
import { getTableStyles } from "src/components/Table/TableStyles";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Meta } from "@storybook/react";
import { EditColumnsButton } from "src/components/Table/components/EditColumnsButton";
import { GridTable } from "src/components/Table/GridTable";
import { GridTableUnsafe as GridTable } from "src/components/Table/GridTable";
import { useGridTableApi } from "src/components/Table/GridTableApi";
import { GridColumn } from "src/components/Table/types";
import { simpleHeader, SimpleHeaderAndData } from "src/components/Table/utils/simpleHelpers";
Expand Down
2 changes: 1 addition & 1 deletion src/components/Table/components/EditColumnsButton.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { MutableRefObject } from "react";
import { EditColumnsButton } from "src/components/Table/components/EditColumnsButton";
import { GridTable } from "src/components/Table/GridTable";
import { GridTableUnsafe as GridTable } from "src/components/Table/GridTable";
import { GridTableApi, useGridTableApi } from "src/components/Table/GridTableApi";
import { GridColumn } from "src/components/Table/types";
import { column } from "src/components/Table/utils/columns";
Expand Down
2 changes: 1 addition & 1 deletion src/components/Table/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ export { TableState, TableStateContext } from "src/components/Table/utils/TableS
export type { SelectedState, SortOn, SortState } from "src/components/Table/utils/TableState";
export * from "src/components/Table/utils/utils";
export * from "src/components/Table/utils/visitor";
export { GridTable, setDefaultStyle, setGridTableDefaults } from "./GridTable";
export { GridTable, GridTableUnsafe, setDefaultStyle, setGridTableDefaults } from "./GridTable";
export type { GridSortConfig, GridTableDefaults, GridTableProps, setRunningInJest } from "./GridTable";
12 changes: 2 additions & 10 deletions src/forms/FormStateApp.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
import { ObjectConfig, ObjectState, required, useFormState } from "@homebound/form-state";
import { Observer } from "mobx-react";
import { useMemo, useState } from "react";
import {
Button,
GridColumn,
GridDataRow,
GridTable,
IconButton,
simpleHeader,
SimpleHeaderAndData,
} from "src/components";
import { Button, GridColumn, GridTable, IconButton, simpleHeader, SimpleHeaderAndData } from "src/components";
import { Css } from "src/Css";
import {
BoundDateField,
Expand Down Expand Up @@ -58,7 +50,7 @@ export function FormStateApp() {
});

const columns = useMemo(() => createColumns(formState), [formState]);
const rows: GridDataRow<Row>[] = useComputed(
const rows = useComputed(
() => [simpleHeader, ...formState.books.rows.map((data) => ({ kind: "data" as const, id: data.id.value!, data }))],
[],
);
Expand Down
12 changes: 2 additions & 10 deletions src/forms/StepperFormApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,7 @@ import { ObjectConfig, ObjectState, required, useFormState } from "@homebound/fo
import { reaction } from "mobx";
import { Observer } from "mobx-react";
import { useCallback, useEffect, useMemo, useState } from "react";
import {
Button,
GridColumn,
GridDataRow,
GridTable,
IconButton,
simpleHeader,
SimpleHeaderAndData,
} from "src/components";
import { Button, GridColumn, GridTable, IconButton, simpleHeader, SimpleHeaderAndData } from "src/components";
import { Step, Stepper } from "src/components/Stepper";
import { Css } from "src/Css";
import { BoundDateField } from "src/forms/BoundDateField";
Expand Down Expand Up @@ -126,7 +118,7 @@ function AuthorDetails({ formState, onNext }: { formState: FormValue; onNext: Vo

function BookList({ formState, onNext, onBack }: { formState: FormValue; onNext: VoidFunction; onBack: VoidFunction }) {
const columns = useMemo(() => createColumns(formState), [formState]);
const rows: GridDataRow<Row>[] = useComputed(
const rows = useComputed(
() => [simpleHeader, ...formState.books.rows.map((data) => ({ kind: "data" as const, id: data.id.value!, data }))],
[],
);
Expand Down
9 changes: 8 additions & 1 deletion src/inputs/SelectField.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@ import { action } from "@storybook/addon-actions";
import { Meta } from "@storybook/react";
import { within } from "@storybook/testing-library";
import { useState } from "react";
import { GridColumn, GridTable, Icon, IconKey, simpleHeader, SimpleHeaderAndData } from "src/components";
import {
GridColumn,
GridTableUnsafe as GridTable,
Icon,
IconKey,
simpleHeader,
SimpleHeaderAndData,
} from "src/components";
import { Css } from "src/Css";
import { SelectField, SelectFieldProps } from "src/inputs/SelectField";
import { Value } from "src/inputs/Value";
Expand Down

0 comments on commit 5933fca

Please sign in to comment.