@pplancq/react-template 2.9.0 → 2.10.1
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/CHANGELOG.md +59 -0
- package/mise.toml +2 -2
- package/mocks/browser.ts +1 -1
- package/mocks/fixtures/user.ts +14 -14
- package/mocks/handlers/userHandlers.ts +3 -3
- package/mocks/server.ts +1 -1
- package/package.json +29 -30
- package/playwright.config.ts +3 -3
- package/src/app/App.tsx +5 -5
- package/src/app/AppHTMLElement.tsx +4 -4
- package/src/app/README.md +2 -2
- package/src/app/assets/css/index.ts +2 -2
- package/src/app/assets/css/reset.css +6 -6
- package/src/app/config/queryClientConfig.ts +1 -1
- package/src/app/config/serviceContainer.ts +2 -2
- package/src/app/providers/Providers/Providers.tsx +5 -5
- package/src/app/providers/QueryClientProvider/QueryClientProvider.tsx +3 -3
- package/src/app/providers/ServiceProvider/ServiceContext.ts +2 -2
- package/src/app/providers/ServiceProvider/ServiceProvider.tsx +4 -4
- package/src/app/routing/Router.tsx +2 -2
- package/src/app/routing/appRoutes.ts +1 -1
- package/src/app/routing/routes.tsx +3 -3
- package/src/demo/README.md +5 -4
- package/src/demo/application/dtos/ArchitecturePrinciple.ts +1 -1
- package/src/demo/application/use-cases/GetArchitecturePrinciplesUseCase.ts +3 -3
- package/src/demo/application/use-cases/GetArchitecturePrinciplesUseCaseInterface.ts +1 -1
- package/src/demo/application/use-cases/GetDemoUsersUseCase.ts +3 -3
- package/src/demo/application/use-cases/GetDemoUsersUseCaseInterface.ts +1 -1
- package/src/demo/domain/repositories/ArchitecturePrincipleRepositoryInterface.d.ts +1 -1
- package/src/demo/domain/repositories/DemoUserRepositoryInterface.d.ts +1 -1
- package/src/demo/infrastructure/repositories/HttpDemoUserRepository.ts +5 -5
- package/src/demo/infrastructure/repositories/StaticArchitecturePrincipleRepository.ts +14 -14
- package/src/demo/serviceDemo.ts +14 -13
- package/src/demo/serviceIdentifiers.ts +4 -4
- package/src/demo/ui/components/DemoFooter/DemoFooter.tsx +5 -5
- package/src/demo/ui/components/DemoFooter/index.ts +1 -1
- package/src/demo/ui/components/DemoHeader/DemoHeader.module.css +2 -2
- package/src/demo/ui/components/DemoHeader/DemoHeader.tsx +10 -10
- package/src/demo/ui/components/DemoHeader/index.ts +1 -1
- package/src/demo/ui/components/DemoNavigation/DemoNavigation.module.css +2 -2
- package/src/demo/ui/components/DemoNavigation/DemoNavigation.tsx +4 -4
- package/src/demo/ui/components/DemoNavigation/index.ts +1 -1
- package/src/demo/ui/components/Input/Input.module.scss +2 -2
- package/src/demo/ui/components/Input/Input.tsx +3 -3
- package/src/demo/ui/components/Input/index.ts +1 -1
- package/src/demo/ui/components/Logo/Logo.tsx +2 -2
- package/src/demo/ui/components/Logo/index.ts +1 -1
- package/src/demo/ui/components/NavLink/NavLink.tsx +3 -3
- package/src/demo/ui/components/NavLink/index.ts +1 -1
- package/src/demo/ui/components/TextInput/TextInput.tsx +3 -3
- package/src/demo/ui/components/TextInput/index.ts +1 -1
- package/src/demo/ui/forms/ProfileForm/ProfileForm.module.scss +1 -1
- package/src/demo/ui/forms/ProfileForm/ProfileForm.tsx +9 -9
- package/src/demo/ui/forms/ProfileForm/index.ts +1 -1
- package/src/demo/ui/hooks/useDemoUsersQuery/useDemoUsersQuery.ts +5 -5
- package/src/demo/ui/layouts/DemoLayout/DemoLayout.tsx +4 -4
- package/src/demo/ui/layouts/MainTemplate/MainTemplate.module.css +3 -3
- package/src/demo/ui/layouts/MainTemplate/MainTemplate.tsx +2 -2
- package/src/demo/ui/layouts/MainTemplate/index.ts +1 -1
- package/src/demo/ui/pages/DemoHome/DemoHome.module.scss +24 -24
- package/src/demo/ui/pages/DemoHome/DemoHome.tsx +6 -6
- package/src/demo/ui/pages/DependencyInjectionDemo/DependencyInjectionDemo.module.scss +5 -5
- package/src/demo/ui/pages/DependencyInjectionDemo/DependencyInjectionDemo.tsx +5 -5
- package/src/demo/ui/pages/ReactHookFormDemo/ReactHookFormDemo.module.scss +4 -4
- package/src/demo/ui/pages/ReactHookFormDemo/ReactHookFormDemo.tsx +4 -4
- package/src/demo/ui/pages/ReactQueryDemo/ReactQueryDemo.module.scss +5 -5
- package/src/demo/ui/pages/ReactQueryDemo/ReactQueryDemo.tsx +3 -3
- package/src/demo/ui/routing/demoAppRoutes.ts +4 -4
- package/src/demo/ui/routing/demoRoutes.tsx +8 -8
- package/src/main.ts +5 -5
- package/src/react-app-env.d.ts +1 -1
- package/src/shared/infrastructure/http/constant.ts +8 -8
- package/src/shared/infrastructure/http/fetchApi.ts +3 -3
- package/src/shared/ui/hooks/useService/useService.ts +4 -4
- package/tests/e2e/demo.test.ts +17 -0
- package/tests/e2e/fixture/playwright.fixture.ts +15 -0
- package/tests/{utils → e2e/utils}/createNetworkFixture.ts +2 -2
- package/tests/{utils → e2e/utils}/createTestWithCoverageFixture.ts +8 -8
- package/tests/{utils → e2e/utils}/playwright.globalSetup.ts +4 -4
- package/tests/{utils → e2e/utils}/playwright.globalTeardown.ts +3 -3
- package/{src/app/__tests__ → tests/unit/app}/AppHTMLElement.test.tsx +14 -14
- package/tests/unit/demo/ui/components/DemoFooter/Footer.test.tsx +15 -0
- package/tests/unit/demo/ui/components/DemoHeader/Header.test.tsx +15 -0
- package/tests/unit/demo/ui/components/Logo/Logo.test.tsx +12 -0
- package/tsconfig.json +1 -1
- package/vitest.config.mts +1 -1
- package/postcss.config.mjs +0 -5
- package/src/demo/ui/components/DemoFooter/__tests__/Footer.test.tsx +0 -15
- package/src/demo/ui/components/DemoHeader/__tests__/Header.test.tsx +0 -15
- package/src/demo/ui/components/Logo/__tests__/Logo.test.tsx +0 -12
- package/tests/demo.test.ts +0 -17
- package/tests/fixture/playwright.fixture.ts +0 -15
- /package/{src/demo/ui/components/DemoFooter/__tests__ → tests/unit/demo/ui/components/DemoFooter}/__snapshots__/Footer.test.tsx.snap +0 -0
- /package/{src/demo/ui/components/DemoHeader/__tests__ → tests/unit/demo/ui/components/DemoHeader}/__snapshots__/Header.test.tsx.snap +0 -0
package/src/demo/serviceDemo.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import type {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import { ContainerModule } from
|
|
10
|
-
import { DEMO_SERVICES } from
|
|
1
|
+
import { GetArchitecturePrinciplesUseCase } from "@Demo/application/use-cases/GetArchitecturePrinciplesUseCase";
|
|
2
|
+
import type { GetArchitecturePrinciplesUseCaseInterface } from "@Demo/application/use-cases/GetArchitecturePrinciplesUseCaseInterface";
|
|
3
|
+
import { GetDemoUsersUseCase } from "@Demo/application/use-cases/GetDemoUsersUseCase";
|
|
4
|
+
import type { GetDemoUsersUseCaseInterface } from "@Demo/application/use-cases/GetDemoUsersUseCaseInterface";
|
|
5
|
+
import type { ArchitecturePrincipleRepositoryInterface } from "@Demo/domain/repositories/ArchitecturePrincipleRepositoryInterface";
|
|
6
|
+
import type { DemoUserRepositoryInterface } from "@Demo/domain/repositories/DemoUserRepositoryInterface";
|
|
7
|
+
import { HttpDemoUserRepository } from "@Demo/infrastructure/repositories/HttpDemoUserRepository";
|
|
8
|
+
import { StaticArchitecturePrincipleRepository } from "@Demo/infrastructure/repositories/StaticArchitecturePrincipleRepository";
|
|
9
|
+
import { ContainerModule } from "inversify";
|
|
10
|
+
import { DEMO_SERVICES } from "./serviceIdentifiers";
|
|
11
11
|
|
|
12
|
-
export const serviceDemo: ContainerModule = new ContainerModule(options => {
|
|
12
|
+
export const serviceDemo: ContainerModule = new ContainerModule((options) => {
|
|
13
13
|
options
|
|
14
14
|
.bind<DemoUserRepositoryInterface>(DEMO_SERVICES.DemoUserRepository)
|
|
15
15
|
.toDynamicValue(() => new HttpDemoUserRepository())
|
|
@@ -18,7 +18,8 @@ export const serviceDemo: ContainerModule = new ContainerModule(options => {
|
|
|
18
18
|
options
|
|
19
19
|
.bind<GetDemoUsersUseCaseInterface>(DEMO_SERVICES.GetDemoUsersUseCase)
|
|
20
20
|
.toDynamicValue(
|
|
21
|
-
services =>
|
|
21
|
+
(services) =>
|
|
22
|
+
new GetDemoUsersUseCase(services.get<DemoUserRepositoryInterface>(DEMO_SERVICES.DemoUserRepository)),
|
|
22
23
|
)
|
|
23
24
|
.inSingletonScope();
|
|
24
25
|
|
|
@@ -30,7 +31,7 @@ export const serviceDemo: ContainerModule = new ContainerModule(options => {
|
|
|
30
31
|
options
|
|
31
32
|
.bind<GetArchitecturePrinciplesUseCaseInterface>(DEMO_SERVICES.GetArchitecturePrinciplesUseCase)
|
|
32
33
|
.toDynamicValue(
|
|
33
|
-
services =>
|
|
34
|
+
(services) =>
|
|
34
35
|
new GetArchitecturePrinciplesUseCase(
|
|
35
36
|
services.get<ArchitecturePrincipleRepositoryInterface>(DEMO_SERVICES.ArchitecturePrincipleRepository),
|
|
36
37
|
),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export const DEMO_SERVICES = Object.freeze({
|
|
2
|
-
DemoUserRepository: Symbol.for(
|
|
3
|
-
GetDemoUsersUseCase: Symbol.for(
|
|
4
|
-
ArchitecturePrincipleRepository: Symbol.for(
|
|
5
|
-
GetArchitecturePrinciplesUseCase: Symbol.for(
|
|
2
|
+
DemoUserRepository: Symbol.for("Demo.DemoUserRepository"),
|
|
3
|
+
GetDemoUsersUseCase: Symbol.for("Demo.GetDemoUsersUseCase"),
|
|
4
|
+
ArchitecturePrincipleRepository: Symbol.for("Demo.ArchitecturePrincipleRepository"),
|
|
5
|
+
GetArchitecturePrinciplesUseCase: Symbol.for("Demo.GetArchitecturePrinciplesUseCase"),
|
|
6
6
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import logo from
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { Link } from
|
|
1
|
+
import logo from "@Demo/ui/assets/images/logo.png";
|
|
2
|
+
import { Logo } from "@Demo/ui/components/Logo/Logo";
|
|
3
|
+
import { demoAppRoutes } from "@Demo/ui/routing/demoAppRoutes";
|
|
4
|
+
import { Link } from "react-router";
|
|
5
5
|
|
|
6
|
-
import classes from
|
|
6
|
+
import classes from "./DemoFooter.module.css";
|
|
7
7
|
|
|
8
8
|
export const DemoFooter = () => {
|
|
9
9
|
return (
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { DemoFooter } from
|
|
1
|
+
export { DemoFooter } from "./DemoFooter";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import logo from
|
|
2
|
-
import { DemoNavigation } from
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { Link } from
|
|
1
|
+
import logo from "@Demo/ui/assets/images/logo.png";
|
|
2
|
+
import { DemoNavigation } from "@Demo/ui/components/DemoNavigation/DemoNavigation";
|
|
3
|
+
import { Logo } from "@Demo/ui/components/Logo/Logo";
|
|
4
|
+
import { demoAppRoutes } from "@Demo/ui/routing/demoAppRoutes";
|
|
5
|
+
import { Link } from "react-router";
|
|
6
6
|
|
|
7
|
-
import classes from
|
|
7
|
+
import classes from "./DemoHeader.module.css";
|
|
8
8
|
|
|
9
9
|
export const DemoHeader = () => {
|
|
10
10
|
return (
|
|
@@ -14,10 +14,10 @@ export const DemoHeader = () => {
|
|
|
14
14
|
</Link>
|
|
15
15
|
<DemoNavigation
|
|
16
16
|
links={[
|
|
17
|
-
{ label:
|
|
18
|
-
{ label:
|
|
19
|
-
{ label:
|
|
20
|
-
{ label:
|
|
17
|
+
{ label: "Overview", url: demoAppRoutes.home },
|
|
18
|
+
{ label: "React Query", url: demoAppRoutes.reactQuery },
|
|
19
|
+
{ label: "React Hook Form", url: demoAppRoutes.reactHookForm },
|
|
20
|
+
{ label: "Dependency Injection", url: demoAppRoutes.dependencyInjection },
|
|
21
21
|
]}
|
|
22
22
|
/>
|
|
23
23
|
</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { DemoHeader } from
|
|
1
|
+
export { DemoHeader } from "./DemoHeader";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { NavLink } from
|
|
2
|
-
import { useId } from
|
|
3
|
-
import classes from
|
|
1
|
+
import { NavLink } from "@Demo/ui/components/NavLink/NavLink";
|
|
2
|
+
import { useId } from "react";
|
|
3
|
+
import classes from "./DemoNavigation.module.css";
|
|
4
4
|
|
|
5
5
|
type DemoNavigationProps = {
|
|
6
6
|
links: { label: string; url: string }[];
|
|
@@ -12,7 +12,7 @@ export const DemoNavigation = ({ links }: DemoNavigationProps) => {
|
|
|
12
12
|
return (
|
|
13
13
|
<nav>
|
|
14
14
|
<ul className={classes.navList}>
|
|
15
|
-
{links.map(link => (
|
|
15
|
+
{links.map((link) => (
|
|
16
16
|
<li key={`${id} ${link.label} ${link.url}`}>
|
|
17
17
|
<NavLink to={link.url} className={classes.a}>
|
|
18
18
|
{link.label}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { DemoNavigation } from
|
|
1
|
+
export { DemoNavigation } from "./DemoNavigation";
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
%inputStyle {
|
|
9
|
-
margin: 10px;
|
|
10
9
|
padding: 10px;
|
|
10
|
+
margin: 10px;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.inputStyle {
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
border-radius: 2px;
|
|
22
22
|
|
|
23
23
|
&:focus {
|
|
24
|
-
border: 2px solid red;
|
|
25
24
|
outline: none !important;
|
|
25
|
+
border: 2px solid red;
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { forwardRef, InputHTMLAttributes, useId } from
|
|
2
|
-
import classes from
|
|
1
|
+
import { forwardRef, InputHTMLAttributes, useId } from "react";
|
|
2
|
+
import classes from "./Input.module.scss";
|
|
3
3
|
|
|
4
4
|
interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
5
5
|
label: string;
|
|
@@ -24,4 +24,4 @@ export const Input = forwardRef<HTMLInputElement, InputProps>(({ label, hasError
|
|
|
24
24
|
);
|
|
25
25
|
});
|
|
26
26
|
|
|
27
|
-
Input.displayName =
|
|
27
|
+
Input.displayName = "Input";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Input } from
|
|
1
|
+
export { Input } from "./Input";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import classes from
|
|
1
|
+
import classes from "./Logo.module.css";
|
|
2
2
|
|
|
3
3
|
type LogoProps = {
|
|
4
4
|
src: string;
|
|
@@ -6,6 +6,6 @@ type LogoProps = {
|
|
|
6
6
|
size?: string;
|
|
7
7
|
};
|
|
8
8
|
|
|
9
|
-
export const Logo = ({ src, alt, size =
|
|
9
|
+
export const Logo = ({ src, alt, size = "80px" }: LogoProps) => {
|
|
10
10
|
return <img className={classes.logoStyle} style={{ width: size }} src={src} alt={alt} />;
|
|
11
11
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Logo } from
|
|
1
|
+
export { Logo } from "./Logo";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ComponentProps } from
|
|
2
|
-
import { NavLink as RouterNavLink } from
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import { NavLink as RouterNavLink } from "react-router";
|
|
3
3
|
|
|
4
4
|
type NavLinkProps = ComponentProps<typeof RouterNavLink>;
|
|
5
5
|
|
|
6
6
|
export const NavLink = ({ className, ...props }: NavLinkProps) => (
|
|
7
|
-
<RouterNavLink {...props} className={[className].filter(Boolean).join(
|
|
7
|
+
<RouterNavLink {...props} className={[className].filter(Boolean).join(" ")} />
|
|
8
8
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { NavLink } from
|
|
1
|
+
export { NavLink } from "./NavLink";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Input } from
|
|
2
|
-
import type { InputHTMLAttributes } from
|
|
3
|
-
import { type FieldError, useFormContext } from
|
|
1
|
+
import { Input } from "@Demo/ui/components/Input/Input";
|
|
2
|
+
import type { InputHTMLAttributes } from "react";
|
|
3
|
+
import { type FieldError, useFormContext } from "react-hook-form";
|
|
4
4
|
|
|
5
5
|
interface TextInputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
6
6
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { TextInput } from
|
|
1
|
+
export { TextInput } from "./TextInput";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { ProfileFormValues } from
|
|
2
|
-
import { TextInput } from
|
|
3
|
-
import { yupResolver } from
|
|
4
|
-
import { FormProvider, type SubmitHandler, useForm } from
|
|
5
|
-
import * as yup from
|
|
6
|
-
import classes from
|
|
1
|
+
import type { ProfileFormValues } from "@Demo/application/dtos/ProfileFormValues";
|
|
2
|
+
import { TextInput } from "@Demo/ui/components/TextInput/TextInput";
|
|
3
|
+
import { yupResolver } from "@hookform/resolvers/yup";
|
|
4
|
+
import { FormProvider, type SubmitHandler, useForm } from "react-hook-form";
|
|
5
|
+
import * as yup from "yup";
|
|
6
|
+
import classes from "./ProfileForm.module.scss";
|
|
7
7
|
|
|
8
8
|
type ProfileFormProps = {
|
|
9
9
|
onSubmit: SubmitHandler<ProfileFormValues>;
|
|
@@ -11,9 +11,9 @@ type ProfileFormProps = {
|
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
const schema = yup.object().shape({
|
|
14
|
-
mail: yup.string().email(
|
|
15
|
-
firstName: yup.string().required(
|
|
16
|
-
lastName: yup.string().required(
|
|
14
|
+
mail: yup.string().email("Check the mail pattern").required("This field is required"),
|
|
15
|
+
firstName: yup.string().required("This field is required"),
|
|
16
|
+
lastName: yup.string().required("This field is required"),
|
|
17
17
|
});
|
|
18
18
|
|
|
19
19
|
export const ProfileForm = ({ onSubmit, resetForm }: ProfileFormProps) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ProfileForm } from
|
|
1
|
+
export { ProfileForm } from "./ProfileForm";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import type { GetDemoUsersUseCaseInterface } from
|
|
2
|
-
import { DEMO_SERVICES } from
|
|
3
|
-
import { useService } from
|
|
4
|
-
import { useQuery } from
|
|
1
|
+
import type { GetDemoUsersUseCaseInterface } from "@Demo/application/use-cases/GetDemoUsersUseCaseInterface";
|
|
2
|
+
import { DEMO_SERVICES } from "@Demo/serviceIdentifiers";
|
|
3
|
+
import { useService } from "@Shared/ui/hooks/useService/useService";
|
|
4
|
+
import { useQuery } from "@tanstack/react-query";
|
|
5
5
|
|
|
6
6
|
export const useDemoUsersQuery = () => {
|
|
7
7
|
const getDemoUsersUseCase = useService<GetDemoUsersUseCaseInterface>(DEMO_SERVICES.GetDemoUsersUseCase);
|
|
8
8
|
|
|
9
9
|
return useQuery({
|
|
10
|
-
queryKey: [
|
|
10
|
+
queryKey: ["demo-users"],
|
|
11
11
|
queryFn: () => getDemoUsersUseCase.execute(),
|
|
12
12
|
});
|
|
13
13
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DemoFooter } from
|
|
2
|
-
import { DemoHeader } from
|
|
3
|
-
import { MainTemplate } from
|
|
4
|
-
import { Outlet } from
|
|
1
|
+
import { DemoFooter } from "@Demo/ui/components/DemoFooter/DemoFooter";
|
|
2
|
+
import { DemoHeader } from "@Demo/ui/components/DemoHeader/DemoHeader";
|
|
3
|
+
import { MainTemplate } from "@Demo/ui/layouts/MainTemplate/MainTemplate";
|
|
4
|
+
import { Outlet } from "react-router";
|
|
5
5
|
|
|
6
6
|
export const DemoLayout = () => {
|
|
7
7
|
return (
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
.mainTemplateStyle {
|
|
2
2
|
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
3
|
flex-direction: column;
|
|
4
|
+
min-height: 100%;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
.header {
|
|
8
8
|
display: flex;
|
|
9
|
-
|
|
9
|
+
gap: 16px;
|
|
10
10
|
align-items: center;
|
|
11
11
|
justify-content: space-between;
|
|
12
|
-
|
|
12
|
+
padding: 16px;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
.main {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { PropsWithChildren, ReactNode } from
|
|
1
|
+
import type { PropsWithChildren, ReactNode } from "react";
|
|
2
2
|
|
|
3
|
-
import classes from
|
|
3
|
+
import classes from "./MainTemplate.module.css";
|
|
4
4
|
|
|
5
5
|
type MainTemplateProps = {
|
|
6
6
|
headerProps: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { MainTemplate } from
|
|
1
|
+
export { MainTemplate } from "./MainTemplate";
|
|
@@ -4,52 +4,52 @@
|
|
|
4
4
|
|
|
5
5
|
.container {
|
|
6
6
|
display: flex;
|
|
7
|
-
padding-top: 32px;
|
|
8
7
|
flex-direction: column;
|
|
9
8
|
align-items: center;
|
|
10
9
|
justify-content: center;
|
|
10
|
+
padding-top: 32px;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.bigTitleStyle {
|
|
14
14
|
font-family: sans-serif;
|
|
15
15
|
font-size: 40px;
|
|
16
16
|
font-weight: 400;
|
|
17
|
-
|
|
17
|
+
color: #00008f;
|
|
18
18
|
text-align: center;
|
|
19
19
|
text-transform: uppercase;
|
|
20
|
-
|
|
20
|
+
letter-spacing: 1px;
|
|
21
21
|
|
|
22
22
|
span {
|
|
23
23
|
display: grid;
|
|
24
|
-
margin-top: 5px;
|
|
25
|
-
grid-template-columns: 1fr max-content 1fr;
|
|
26
24
|
grid-template-rows: 27px 0;
|
|
27
|
-
|
|
25
|
+
grid-template-columns: 1fr max-content 1fr;
|
|
28
26
|
gap: 20px;
|
|
27
|
+
align-items: center;
|
|
28
|
+
margin-top: 5px;
|
|
29
29
|
font-family: Raleway, sans-serif;
|
|
30
30
|
font-size: 15px;
|
|
31
31
|
font-weight: 500;
|
|
32
|
-
|
|
32
|
+
color: #444;
|
|
33
33
|
text-transform: uppercase;
|
|
34
34
|
word-spacing: 1px;
|
|
35
|
-
|
|
35
|
+
letter-spacing: 2px;
|
|
36
36
|
|
|
37
37
|
&::before {
|
|
38
38
|
display: block;
|
|
39
39
|
height: 5px;
|
|
40
|
+
content: "";
|
|
41
|
+
background-color: #f8f8f8;
|
|
40
42
|
border-top: 1px solid #ccc;
|
|
41
43
|
border-bottom: 1px solid #ccc;
|
|
42
|
-
background-color: #f8f8f8;
|
|
43
|
-
content: '';
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
&::after {
|
|
47
47
|
display: block;
|
|
48
48
|
height: 5px;
|
|
49
|
+
content: " ";
|
|
50
|
+
background-color: #f8f8f8;
|
|
49
51
|
border-top: 1px solid #ccc;
|
|
50
52
|
border-bottom: 1px solid #ccc;
|
|
51
|
-
background-color: #f8f8f8;
|
|
52
|
-
content: ' ';
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
}
|
|
@@ -69,12 +69,12 @@
|
|
|
69
69
|
|
|
70
70
|
.titleStyle {
|
|
71
71
|
position: relative;
|
|
72
|
-
margin-left: 8px;
|
|
73
72
|
padding-bottom: 10px;
|
|
73
|
+
margin-left: 8px;
|
|
74
74
|
font-size: 20px;
|
|
75
75
|
font-weight: 500;
|
|
76
|
-
letter-spacing: 0;
|
|
77
76
|
line-height: 1.5em;
|
|
77
|
+
letter-spacing: 0;
|
|
78
78
|
|
|
79
79
|
&::before {
|
|
80
80
|
position: absolute;
|
|
@@ -82,8 +82,8 @@
|
|
|
82
82
|
left: 0;
|
|
83
83
|
width: 55px;
|
|
84
84
|
height: 5px;
|
|
85
|
+
content: "";
|
|
85
86
|
background-color: #111;
|
|
86
|
-
content: '';
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
&::after {
|
|
@@ -93,8 +93,8 @@
|
|
|
93
93
|
width: 95%;
|
|
94
94
|
max-width: 255px;
|
|
95
95
|
height: 1px;
|
|
96
|
+
content: "";
|
|
96
97
|
background-color: #333;
|
|
97
|
-
content: '';
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
|
|
@@ -118,10 +118,10 @@
|
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
.a {
|
|
121
|
+
color: #00008f;
|
|
122
|
+
text-transform: uppercase;
|
|
121
123
|
letter-spacing: 4px;
|
|
122
124
|
text-decoration: none;
|
|
123
|
-
text-transform: uppercase;
|
|
124
|
-
color: #00008f;
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
.a:hover {
|
|
@@ -132,8 +132,8 @@ table,
|
|
|
132
132
|
th,
|
|
133
133
|
td {
|
|
134
134
|
padding: 6px;
|
|
135
|
-
border: 1px solid black;
|
|
136
135
|
font-family: sans-serif;
|
|
136
|
+
border: 1px solid black;
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
.tableWrapper {
|
|
@@ -151,11 +151,11 @@ table {
|
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
.infoSection {
|
|
154
|
+
padding: 16px;
|
|
154
155
|
margin: 16px;
|
|
155
156
|
margin-bottom: 20px;
|
|
156
|
-
padding: 16px;
|
|
157
|
-
border-radius: 8px;
|
|
158
157
|
background-color: #f5f5f5;
|
|
158
|
+
border-radius: 8px;
|
|
159
159
|
box-shadow: 0 4px 8px rgb(0 0 0 / 10%);
|
|
160
160
|
|
|
161
161
|
&:hover {
|
|
@@ -164,8 +164,8 @@ table {
|
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
ul {
|
|
167
|
-
margin: 0;
|
|
168
167
|
padding: 0;
|
|
168
|
+
margin: 0;
|
|
169
169
|
list-style-type: none;
|
|
170
170
|
}
|
|
171
171
|
|
|
@@ -176,8 +176,8 @@ li {
|
|
|
176
176
|
|
|
177
177
|
code {
|
|
178
178
|
padding: 2px 5px;
|
|
179
|
-
|
|
180
|
-
font-family: 'Courier New', monospace;
|
|
179
|
+
font-family: "Courier New", monospace;
|
|
181
180
|
font-size: 14px;
|
|
182
181
|
background-color: #f8f9fa;
|
|
182
|
+
border-radius: 4px;
|
|
183
183
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import image from
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import classes from
|
|
1
|
+
import image from "@Demo/ui/assets/images/templatePlugins.png";
|
|
2
|
+
import { NavLink } from "@Demo/ui/components/NavLink/NavLink";
|
|
3
|
+
import { demoAppRoutes } from "@Demo/ui/routing/demoAppRoutes";
|
|
4
|
+
import classes from "./DemoHome.module.scss";
|
|
5
5
|
|
|
6
6
|
export const DemoHome = () => {
|
|
7
7
|
return (
|
|
@@ -18,8 +18,8 @@ export const DemoHome = () => {
|
|
|
18
18
|
<span className={classes.centredText}>
|
|
19
19
|
<p className={classes.paragraphStyle}>
|
|
20
20
|
This template now starts from a <span className={classes.highlight}>Clean Architecture</span> inspired
|
|
21
|
-
structure with a dedicated <span className={classes.boldText}>app</span> bootstrap layer, a{
|
|
22
|
-
<span className={classes.boldText}>shared</span> common layer, and a{
|
|
21
|
+
structure with a dedicated <span className={classes.boldText}>app</span> bootstrap layer, a{" "}
|
|
22
|
+
<span className={classes.boldText}>shared</span> common layer, and a{" "}
|
|
23
23
|
<span className={classes.boldText}>demo</span> bounded context.
|
|
24
24
|
</p>
|
|
25
25
|
<p className={classes.paragraphStyle}>
|
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
.fieldsetStyle {
|
|
6
|
-
margin-top: 24px;
|
|
7
6
|
padding: 16px;
|
|
7
|
+
margin-top: 24px;
|
|
8
8
|
border: 1px solid black;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
.title {
|
|
12
12
|
padding-top: 16px;
|
|
13
13
|
font-size: 20px;
|
|
14
|
-
letter-spacing: 4px;
|
|
15
|
-
text-align: center;
|
|
16
14
|
color: #00008f;
|
|
15
|
+
text-align: center;
|
|
16
|
+
letter-spacing: 4px;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
.tableWrapper {
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
padding-top: 16px;
|
|
25
25
|
padding-bottom: 16px;
|
|
26
26
|
font-size: 20px;
|
|
27
|
-
letter-spacing: 4px;
|
|
28
|
-
text-align: center;
|
|
29
27
|
color: #00008f;
|
|
28
|
+
text-align: center;
|
|
29
|
+
letter-spacing: 4px;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
.lineStyle {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { GetArchitecturePrinciplesUseCaseInterface } from
|
|
2
|
-
import { DEMO_SERVICES } from
|
|
3
|
-
import { useService } from
|
|
4
|
-
import classes from
|
|
1
|
+
import type { GetArchitecturePrinciplesUseCaseInterface } from "@Demo/application/use-cases/GetArchitecturePrinciplesUseCaseInterface";
|
|
2
|
+
import { DEMO_SERVICES } from "@Demo/serviceIdentifiers";
|
|
3
|
+
import { useService } from "@Shared/ui/hooks/useService/useService";
|
|
4
|
+
import classes from "./DependencyInjectionDemo.module.scss";
|
|
5
5
|
|
|
6
6
|
export const DependencyInjectionDemo = () => {
|
|
7
7
|
const getArchitecturePrinciplesUseCase = useService<GetArchitecturePrinciplesUseCaseInterface>(
|
|
@@ -31,7 +31,7 @@ export const DependencyInjectionDemo = () => {
|
|
|
31
31
|
</tr>
|
|
32
32
|
</thead>
|
|
33
33
|
<tbody>
|
|
34
|
-
{architecturePrinciples.map(principle => (
|
|
34
|
+
{architecturePrinciples.map((principle) => (
|
|
35
35
|
<tr key={`${principle.layer}-${principle.title}`}>
|
|
36
36
|
<td>{principle.layer}</td>
|
|
37
37
|
<td>{principle.title}</td>
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
.title {
|
|
10
10
|
padding-top: 16px;
|
|
11
11
|
font-size: 20px;
|
|
12
|
-
letter-spacing: 4px;
|
|
13
|
-
text-align: center;
|
|
14
12
|
color: #00008f;
|
|
13
|
+
text-align: center;
|
|
14
|
+
letter-spacing: 4px;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
.lineStyle {
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
|
|
25
25
|
.profileSectionStyle {
|
|
26
26
|
display: flex;
|
|
27
|
-
padding-top: 16px;
|
|
28
|
-
padding-bottom: 16px;
|
|
29
27
|
flex-flow: row wrap;
|
|
30
28
|
align-items: center;
|
|
31
29
|
justify-content: space-around;
|
|
30
|
+
padding-top: 16px;
|
|
31
|
+
padding-bottom: 16px;
|
|
32
32
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { ProfileFormValues } from
|
|
2
|
-
import { ProfileForm } from
|
|
3
|
-
import { useState } from
|
|
1
|
+
import type { ProfileFormValues } from "@Demo/application/dtos/ProfileFormValues";
|
|
2
|
+
import { ProfileForm } from "@Demo/ui/forms/ProfileForm/ProfileForm";
|
|
3
|
+
import { useState } from "react";
|
|
4
4
|
|
|
5
|
-
import classes from
|
|
5
|
+
import classes from "./ReactHookFormDemo.module.scss";
|
|
6
6
|
|
|
7
7
|
export const ReactHookFormDemo = () => {
|
|
8
8
|
const [profileData, setProfileData] = useState<ProfileFormValues>();
|