Skip to content

Commit

Permalink
refactor: split containers module into smaller modules
Browse files Browse the repository at this point in the history
  • Loading branch information
PupoSDC committed Feb 10, 2024
1 parent 9de49dc commit 048c82d
Show file tree
Hide file tree
Showing 249 changed files with 652 additions and 486 deletions.
12 changes: 11 additions & 1 deletion apps/docs/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,17 @@
"sourceRoot": "apps/docs",
"projectType": "application",
"tags": [],
"implicitDependencies": ["react-components", "react-containers"],
"implicitDependencies": [
"react-components",
"react-games",
"react-markdown",
"react-theme",
"next-analytics",
"next-public",
"next-question-bank",
"next-tests",
"next-user"
],
"targets": {
"dev": {
"executor": "@nx/storybook:storybook",
Expand Down
2 changes: 1 addition & 1 deletion apps/next-app/pages/404.page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { default as OpenInNewIcon } from "@mui/icons-material/OpenInNewOutlined";
import { Link, Button, Stack } from "@mui/joy";
import { LayoutPublic } from "@chair-flight/next/public";
import { Ups, AppHead } from "@chair-flight/react/components";
import { LayoutPublic } from "@chair-flight/react/containers";
import type { NextPage } from "next";

const PageNotFound: NextPage = () => {
Expand Down
5 changes: 3 additions & 2 deletions apps/next-app/pages/_app.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
import {
AnalyticsProvider,
AnalyticsPageLogger,
} from "@chair-flight/react/analytics";
import { ThemeProvider, Toaster } from "@chair-flight/react/components";
} from "@chair-flight/next/analytics";
import { Toaster } from "@chair-flight/react/components";
import { ThemeProvider } from "@chair-flight/react/theme";
import { trpc } from "@chair-flight/trpc/client";
import type { AppProps } from "next/app";
import type { FunctionComponent } from "react";
Expand Down
2 changes: 1 addition & 1 deletion apps/next-app/pages/analytics/index.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { GlobalStyles, Sheet, Typography } from "@mui/joy";
import { LineChart } from "@mui/x-charts/LineChart";
import { PieChart } from "@mui/x-charts/PieChart";
import { DateTime } from "luxon";
import { BlogIndex, LayoutPublic } from "@chair-flight/next/public";
import { AppHead, BackgroundFadedImage } from "@chair-flight/react/components";
import { BlogIndex, LayoutPublic } from "@chair-flight/react/containers";
import { trpc } from "@chair-flight/trpc/client";
import { staticHandler } from "@chair-flight/trpc/server";
import type { NextPage } from "next";
Expand Down
2 changes: 1 addition & 1 deletion apps/next-app/pages/blog/[postId].page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as fs from "node:fs/promises";
import { BlogPost, LayoutPublic } from "@chair-flight/next/public";
import { AppHead, BackgroundFadedImage } from "@chair-flight/react/components";
import { BlogPost, LayoutPublic } from "@chair-flight/react/containers";
import { trpc } from "@chair-flight/trpc/client";
import { staticHandler, staticPathsHandler } from "@chair-flight/trpc/server";
import type { NextPage } from "next";
Expand Down
2 changes: 1 addition & 1 deletion apps/next-app/pages/blog/index.page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as fs from "node:fs/promises";
import { BlogIndex, LayoutPublic } from "@chair-flight/next/public";
import { AppHead, BackgroundFadedImage } from "@chair-flight/react/components";
import { BlogIndex, LayoutPublic } from "@chair-flight/react/containers";
import { staticHandler } from "@chair-flight/trpc/server";
import type { NextPage } from "next";

Expand Down
8 changes: 4 additions & 4 deletions apps/next-app/pages/index.page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import * as fs from "node:fs/promises";
import { useState } from "react";
import { LayoutPublic, HeroWelcome } from "@chair-flight/next/public";
import {
AppHead,
BackgroundSlidingImages,
ThemeOverrideColorScheme,
} from "@chair-flight/react/components";
import { LayoutPublic, OverviewWelcome } from "@chair-flight/react/containers";
import { ThemeOverrideColorScheme } from "@chair-flight/react/theme";
import { staticHandler } from "@chair-flight/trpc/server";
import type { QuestionBankName } from "@chair-flight/core/question-bank";
import type { NextPage } from "next";
Expand All @@ -20,7 +20,7 @@ export const Page: NextPage = () => {
>
<ThemeOverrideColorScheme questionBank={questionBank} />
<AppHead />
<OverviewWelcome
<HeroWelcome
headerHeight={48}
questionBank={questionBank}
onQuestionBankChanged={setQuestionBank}
Expand All @@ -30,7 +30,7 @@ export const Page: NextPage = () => {
};

export const getStaticProps = staticHandler(async ({ helper }) => {
await OverviewWelcome.getData({ helper, params: {} });
await HeroWelcome.getData({ helper, params: {} });
return { props: {} };
}, fs);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as fs from "node:fs/promises";
import { LayoutModule, AnnexSearch } from "@chair-flight/next/question-bank";
import { AppHead } from "@chair-flight/react/components";
import { LayoutModule, AnnexSearch } from "@chair-flight/react/containers";
import { staticHandler, staticPathsHandler } from "@chair-flight/trpc/server";
import type { QuestionBankName } from "@chair-flight/core/question-bank";
import type { Breadcrumbs } from "@chair-flight/react/containers";
import type { Breadcrumbs } from "@chair-flight/next/question-bank";
import type { NextPage } from "next";

type PageProps = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ import {
Typography,
useTheme,
} from "@mui/joy";
import { DocContent, LayoutModule } from "@chair-flight/next/question-bank";
import {
AppHead,
useDisclose,
useMediaQuery,
} from "@chair-flight/react/components";
import { DocContent, LayoutModule } from "@chair-flight/react/containers";
import { trpc } from "@chair-flight/trpc/client";
import { staticHandler, staticPathsHandler } from "@chair-flight/trpc/server";
import type { QuestionBankName } from "@chair-flight/core/question-bank";
import type { Breadcrumbs } from "@chair-flight/react/containers";
import type { Breadcrumbs } from "@chair-flight/next/question-bank";
import type { NextPage } from "next";

type PageProps = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as fs from "node:fs/promises";
import { DocSearch, LayoutModule } from "@chair-flight/next/question-bank";
import { AppHead } from "@chair-flight/react/components";
import { DocSearch, LayoutModule } from "@chair-flight/react/containers";
import { staticHandler, staticPathsHandler } from "@chair-flight/trpc/server";
import type { QuestionBankName } from "@chair-flight/core/question-bank";
import type { Breadcrumbs } from "@chair-flight/react/containers";
import type { Breadcrumbs } from "@chair-flight/next/question-bank";
import type { NextPage } from "next";

type PageProps = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { getRandomId } from "@chair-flight/base/utils";
import { FlashcardTest, LayoutModule } from "@chair-flight/next/question-bank";
import { AppHead } from "@chair-flight/react/components";
import { FlashcardTest, LayoutModule } from "@chair-flight/react/containers";
import { ssrHandler } from "@chair-flight/trpc/server";
import type { QuestionBankName } from "@chair-flight/core/question-bank";
import type { Breadcrumbs } from "@chair-flight/react/containers";
import type { Breadcrumbs } from "@chair-flight/next/question-bank";
import type { NextPage } from "next";

type PageProps = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as fs from "node:fs/promises";
import { FlashcardList, LayoutModule } from "@chair-flight/next/question-bank";
import { AppHead } from "@chair-flight/react/components";
import { FlashcardList, LayoutModule } from "@chair-flight/react/containers";
import { staticHandler, staticPathsHandler } from "@chair-flight/trpc/server";
import type { QuestionBankName } from "@chair-flight/core/question-bank";
import type { Breadcrumbs } from "@chair-flight/react/containers";
import type { Breadcrumbs } from "@chair-flight/next/question-bank";
import type { NextPage } from "next";

type PageProps = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import * as fs from "node:fs/promises";
import { Typography, Box } from "@mui/joy";
import { AppHead } from "@chair-flight/react/components";
import {
FlashcardCollectionList,
LayoutModule,
} from "@chair-flight/react/containers";
} from "@chair-flight/next/question-bank";
import { AppHead } from "@chair-flight/react/components";
import { staticHandler } from "@chair-flight/trpc/server";
import type { QuestionBankName } from "@chair-flight/core/question-bank";
import type { Breadcrumbs } from "@chair-flight/react/containers";
import type { Breadcrumbs } from "@chair-flight/next/question-bank";
import type { GetStaticPaths, NextPage } from "next";

type PageParams = {
Expand Down
7 changes: 5 additions & 2 deletions apps/next-app/pages/modules/[questionBank]/index.page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import * as fs from "node:fs/promises";
import {
LayoutModule,
OverviewModules,
} from "@chair-flight/next/question-bank";
import { AppHead } from "@chair-flight/react/components";
import { LayoutModule, OverviewModules } from "@chair-flight/react/containers";
import { staticHandler } from "@chair-flight/trpc/server";
import type { QuestionBankName } from "@chair-flight/core/question-bank";
import type { Breadcrumbs } from "@chair-flight/react/containers";
import type { Breadcrumbs } from "@chair-flight/next/question-bank";
import type { GetStaticPaths, NextPage } from "next";

type PageProps = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { default as LinkIcon } from "@mui/icons-material/ChevronRightOutlined";
import { Divider, Link, Sheet, Stack, Typography } from "@mui/joy";
import { AppHead } from "@chair-flight/react/components";
import {
LayoutModule,
LearningObjectiveOverview,
LearningObjectiveQuestions,
LearningObjectiveTree,
} from "@chair-flight/react/containers";
} from "@chair-flight/next/question-bank";
import { AppHead } from "@chair-flight/react/components";
import { ssrHandler } from "@chair-flight/trpc/server";
import type { QuestionBankName } from "@chair-flight/core/question-bank";
import type { Breadcrumbs } from "@chair-flight/react/containers";
import type { Breadcrumbs } from "@chair-flight/next/question-bank";
import type { NextPage } from "next";

type PageParams = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { AppHead } from "@chair-flight/react/components";
import {
LayoutModule,
LearningObjectiveQuestions,
} from "@chair-flight/react/containers";
} from "@chair-flight/next/question-bank";
import { AppHead } from "@chair-flight/react/components";
import { ssrHandler } from "@chair-flight/trpc/server";
import type { QuestionBankName } from "@chair-flight/core/question-bank";
import type { Breadcrumbs } from "@chair-flight/react/containers";
import type { Breadcrumbs } from "@chair-flight/next/question-bank";
import type { NextPage } from "next";

type PageParams = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { AppHead } from "@chair-flight/react/components";
import {
LayoutModule,
LearningObjectiveTree,
} from "@chair-flight/react/containers";
} from "@chair-flight/next/question-bank";
import { AppHead } from "@chair-flight/react/components";
import { ssrHandler } from "@chair-flight/trpc/server";
import type { QuestionBankName } from "@chair-flight/core/question-bank";
import type { Breadcrumbs } from "@chair-flight/react/containers";
import type { Breadcrumbs } from "@chair-flight/next/question-bank";
import type { NextPage } from "next";

type PageParams = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import * as fs from "node:fs/promises";
import { AppHead } from "@chair-flight/react/components";
import {
LayoutModule,
LearningObjectivesSearch,
} from "@chair-flight/react/containers";
} from "@chair-flight/next/question-bank";
import { AppHead } from "@chair-flight/react/components";
import { staticHandler } from "@chair-flight/trpc/server";
import type { QuestionBankName } from "@chair-flight/core/question-bank";
import type { Breadcrumbs } from "@chair-flight/react/containers";
import type { Breadcrumbs } from "@chair-flight/next/question-bank";
import type { GetStaticPaths, NextPage } from "next";

type PageProps = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { useRouter } from "next/router";
import { Box, Tab, TabList, TabPanel, Tabs, tabClasses } from "@mui/joy";
import { getRandomId } from "@chair-flight/base/utils";
import { AppHead } from "@chair-flight/react/components";
import {
LayoutModule,
QuestionExplanation,
QuestionMeta,
QuestionStandAlone,
} from "@chair-flight/react/containers";
} from "@chair-flight/next/question-bank";
import { AppHead } from "@chair-flight/react/components";
import { ssrHandler } from "@chair-flight/trpc/server";
import type { QuestionBankName } from "@chair-flight/core/question-bank";
import type { Breadcrumbs } from "@chair-flight/react/containers";
import type { Breadcrumbs } from "@chair-flight/next/question-bank";
import type { NextPage } from "next";

type QueryParams = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
tabClasses,
tabPanelClasses,
} from "@mui/joy";
import { AppHead } from "@chair-flight/react/components";
import {
LayoutModule,
QuestionEditorAnnexes,
Expand All @@ -18,10 +17,11 @@ import {
QuestionEditorPreview,
QuestionEditorRelatedQuestions,
QuestionEditorVariant,
} from "@chair-flight/react/containers";
} from "@chair-flight/next/question-bank";
import { AppHead } from "@chair-flight/react/components";
import { ssrHandler } from "@chair-flight/trpc/server";
import type { QuestionBankName } from "@chair-flight/core/question-bank";
import type { Breadcrumbs } from "@chair-flight/react/containers";
import type { Breadcrumbs } from "@chair-flight/next/question-bank";
import type { NextPage } from "next";

type PageParams = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import * as fs from "node:fs/promises";
import { AppHead } from "@chair-flight/react/components";
import {
LayoutModule,
QuestionEditorManager,
} from "@chair-flight/react/containers";
} from "@chair-flight/next/question-bank";
import { AppHead } from "@chair-flight/react/components";
import { staticHandler } from "@chair-flight/trpc/server";
import type { QuestionBankName } from "@chair-flight/core/question-bank";
import type { Breadcrumbs } from "@chair-flight/react/containers";
import type { Breadcrumbs } from "@chair-flight/next/question-bank";
import type { GetStaticPaths, NextPage } from "next";

type PageProps = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import * as fs from "node:fs/promises";
import { Box, Divider, Stack, Typography } from "@mui/joy";
import { AppHead } from "@chair-flight/react/components";
import {
LayoutModule,
QuestionEditorDiff,
QuestionEditorManager,
QuestionEditorSubmitForm,
} from "@chair-flight/react/containers";
} from "@chair-flight/next/question-bank";
import { AppHead } from "@chair-flight/react/components";
import { staticHandler } from "@chair-flight/trpc/server";
import type { QuestionBankName } from "@chair-flight/core/question-bank";
import type { Breadcrumbs } from "@chair-flight/react/containers";
import type { Breadcrumbs } from "@chair-flight/next/question-bank";
import type { GetStaticPaths, NextPage } from "next";

type PageProps = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as fs from "node:fs/promises";
import { LayoutModule, QuestionSearch } from "@chair-flight/next/question-bank";
import { AppHead } from "@chair-flight/react/components";
import { LayoutModule, QuestionSearch } from "@chair-flight/react/containers";
import { staticHandler } from "@chair-flight/trpc/server";
import type { QuestionBankName } from "@chair-flight/core/question-bank";
import type { Breadcrumbs } from "@chair-flight/react/containers";
import type { Breadcrumbs } from "@chair-flight/next/question-bank";
import type { GetStaticPaths, NextPage } from "next";

type PageProps = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import * as fs from "node:fs/promises";
import { MissingPathParameter } from "@chair-flight/base/errors";
import { LayoutModule } from "@chair-flight/next/question-bank";
import { UserSettings } from "@chair-flight/next/user";
import { AppHead } from "@chair-flight/react/components";
import { LayoutModule, UserSettings } from "@chair-flight/react/containers";
import { staticHandler } from "@chair-flight/trpc/server";
import type { QuestionBankName } from "@chair-flight/core/question-bank";
import type { Breadcrumbs } from "@chair-flight/react/containers";
import type { Breadcrumbs } from "@chair-flight/next/question-bank";
import type { GetStaticPaths, NextPage } from "next";

type PageProps = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import { useRouter } from "next/router";
import { UserBugReport } from "libs/react/containers/src/user/user-bug-report";
import {
AppHead,
ThemeOverrideColorScheme,
} from "@chair-flight/react/components";
import { TestExam } from "@chair-flight/react/containers";
import { TestExam } from "@chair-flight/next/tests";
import { UserBugReport } from "@chair-flight/next/user";
import { AppHead } from "@chair-flight/react/components";
import { ThemeOverrideColorScheme } from "@chair-flight/react/theme";
import { ssrHandler } from "@chair-flight/trpc/server";
import type { QuestionBankName } from "@chair-flight/core/question-bank";
import type { NextPage } from "next";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { MissingPathParameter } from "@chair-flight/base/errors";
import { LayoutModule } from "@chair-flight/next/question-bank";
import { TestReview } from "@chair-flight/next/tests";
import { AppHead } from "@chair-flight/react/components";
import { LayoutModule, TestReview } from "@chair-flight/react/containers";
import { ssrHandler } from "@chair-flight/trpc/server";
import type { QuestionBankName } from "@chair-flight/core/question-bank";
import type { Breadcrumbs } from "@chair-flight/react/containers";
import type { Breadcrumbs } from "@chair-flight/next/question-bank";
import type { NextPage } from "next";

type Props = {
Expand Down
Loading

0 comments on commit 048c82d

Please sign in to comment.