diff --git a/src/EventGrouping/DayGrouping.ts b/src/Calendar/EventGrouping/DayGrouping.ts similarity index 95% rename from src/EventGrouping/DayGrouping.ts rename to src/Calendar/EventGrouping/DayGrouping.ts index 7e0ccf1..ff28943 100644 --- a/src/EventGrouping/DayGrouping.ts +++ b/src/Calendar/EventGrouping/DayGrouping.ts @@ -1,5 +1,5 @@ import EventGrouping from "./EventGrouping"; -import { Event, Groups } from "../types"; +import { Event, Groups } from "../../types"; import { add, differenceInCalendarDays, diff --git a/src/EventGrouping/EventGrouping.ts b/src/Calendar/EventGrouping/EventGrouping.ts similarity index 93% rename from src/EventGrouping/EventGrouping.ts rename to src/Calendar/EventGrouping/EventGrouping.ts index 27930b6..78d05b0 100644 --- a/src/EventGrouping/EventGrouping.ts +++ b/src/Calendar/EventGrouping/EventGrouping.ts @@ -1,4 +1,4 @@ -import { Event, Groups } from "../types"; +import { Event, Groups } from "../../types"; export default abstract class EventGrouping { protected readonly sortedEvents: Event[]; diff --git a/src/EventGrouping/MonthGrouping.ts b/src/Calendar/EventGrouping/MonthGrouping.ts similarity index 95% rename from src/EventGrouping/MonthGrouping.ts rename to src/Calendar/EventGrouping/MonthGrouping.ts index 322857c..481f162 100644 --- a/src/EventGrouping/MonthGrouping.ts +++ b/src/Calendar/EventGrouping/MonthGrouping.ts @@ -1,5 +1,5 @@ import EventGrouping from "./EventGrouping"; -import { Event, Groups } from "../types"; +import { Event, Groups } from "../../types"; import { add, differenceInCalendarMonths, diff --git a/src/EventGrouping/WeekGrouping.ts b/src/Calendar/EventGrouping/WeekGrouping.ts similarity index 95% rename from src/EventGrouping/WeekGrouping.ts rename to src/Calendar/EventGrouping/WeekGrouping.ts index 6c028de..49a322d 100644 --- a/src/EventGrouping/WeekGrouping.ts +++ b/src/Calendar/EventGrouping/WeekGrouping.ts @@ -1,5 +1,5 @@ import EventGrouping from "./EventGrouping"; -import { Event, Groups } from "../types"; +import { Event, Groups } from "../../types"; import { add, differenceInCalendarWeeks, diff --git a/src/EventGrouping/YearGrouping.ts b/src/Calendar/EventGrouping/YearGrouping.ts similarity index 95% rename from src/EventGrouping/YearGrouping.ts rename to src/Calendar/EventGrouping/YearGrouping.ts index c7c5a8a..0e8f8b5 100644 --- a/src/EventGrouping/YearGrouping.ts +++ b/src/Calendar/EventGrouping/YearGrouping.ts @@ -1,5 +1,5 @@ import EventGrouping from "./EventGrouping"; -import { Event, Groups } from "../types"; +import { Event, Groups } from "../../types"; import { add, differenceInCalendarYears, diff --git a/src/Events/Event.ts b/src/Calendar/Events/Event.ts similarity index 87% rename from src/Events/Event.ts rename to src/Calendar/Events/Event.ts index 4c82272..f156f1b 100644 --- a/src/Events/Event.ts +++ b/src/Calendar/Events/Event.ts @@ -1,4 +1,4 @@ -import { Event as EventType } from "../types"; +import { Event as EventType } from "../../types"; export default class Event implements EventType { date: Date; diff --git a/src/Events/index.ts b/src/Calendar/Events/index.ts similarity index 100% rename from src/Events/index.ts rename to src/Calendar/Events/index.ts diff --git a/src/HtmlRenderer/Abstract/GroupRenderer.ts b/src/Calendar/HtmlRenderer/Abstract/GroupRenderer.ts similarity index 96% rename from src/HtmlRenderer/Abstract/GroupRenderer.ts rename to src/Calendar/HtmlRenderer/Abstract/GroupRenderer.ts index 1896a34..419b12e 100644 --- a/src/HtmlRenderer/Abstract/GroupRenderer.ts +++ b/src/Calendar/HtmlRenderer/Abstract/GroupRenderer.ts @@ -1,5 +1,5 @@ -import { Event } from "../../types"; -import { generateRandomColor } from "../../utilities"; +import { Event } from "../../../types"; +import { generateRandomColor } from "../../../utilities"; export default abstract class GroupRenderer { protected container: HTMLDivElement; diff --git a/src/HtmlRenderer/Abstract/Renderer.ts b/src/Calendar/HtmlRenderer/Abstract/Renderer.ts similarity index 95% rename from src/HtmlRenderer/Abstract/Renderer.ts rename to src/Calendar/HtmlRenderer/Abstract/Renderer.ts index 5cbfc28..bb8af93 100644 --- a/src/HtmlRenderer/Abstract/Renderer.ts +++ b/src/Calendar/HtmlRenderer/Abstract/Renderer.ts @@ -1,5 +1,5 @@ import EventGrouping from "../../EventGrouping/EventGrouping"; -import { Event } from "../../types"; +import { Event } from "../../../types"; export default abstract class Renderer { protected abstract renderGroups( diff --git a/src/HtmlRenderer/Day/GroupDayRenderer.ts b/src/Calendar/HtmlRenderer/Day/GroupDayRenderer.ts similarity index 89% rename from src/HtmlRenderer/Day/GroupDayRenderer.ts rename to src/Calendar/HtmlRenderer/Day/GroupDayRenderer.ts index 3dc0294..350b890 100644 --- a/src/HtmlRenderer/Day/GroupDayRenderer.ts +++ b/src/Calendar/HtmlRenderer/Day/GroupDayRenderer.ts @@ -1,5 +1,5 @@ -import { Event } from "../../types"; -import { DayGrouping } from "../../EventGrouping"; +import { Event } from "../../../types"; +import DayGrouping from "../../EventGrouping/DayGrouping"; import GroupRenderer from "../Abstract/GroupRenderer"; diff --git a/src/HtmlRenderer/Day/index.ts b/src/Calendar/HtmlRenderer/Day/index.ts similarity index 82% rename from src/HtmlRenderer/Day/index.ts rename to src/Calendar/HtmlRenderer/Day/index.ts index 91b6069..08c90f4 100644 --- a/src/HtmlRenderer/Day/index.ts +++ b/src/Calendar/HtmlRenderer/Day/index.ts @@ -1,5 +1,5 @@ -import { Event } from "../../types"; -import { DayGrouping } from "../../EventGrouping"; +import { Event } from "../../../types"; +import DayGrouping from "../../EventGrouping/DayGrouping"; import Renderer from "../Abstract/Renderer"; import GroupDayRenderer from "./GroupDayRenderer"; diff --git a/src/HtmlRenderer/Month/GroupMonthRenderer.ts b/src/Calendar/HtmlRenderer/Month/GroupMonthRenderer.ts similarity index 90% rename from src/HtmlRenderer/Month/GroupMonthRenderer.ts rename to src/Calendar/HtmlRenderer/Month/GroupMonthRenderer.ts index 5a78e5d..f9e0c43 100644 --- a/src/HtmlRenderer/Month/GroupMonthRenderer.ts +++ b/src/Calendar/HtmlRenderer/Month/GroupMonthRenderer.ts @@ -1,5 +1,5 @@ -import { Event } from "../../types"; -import { MonthGrouping } from "../../EventGrouping"; +import { Event } from "../../../types"; +import MonthGrouping from "../../EventGrouping/MonthGrouping"; import GroupRenderer from "../Abstract/GroupRenderer"; diff --git a/src/HtmlRenderer/Month/index.ts b/src/Calendar/HtmlRenderer/Month/index.ts similarity index 82% rename from src/HtmlRenderer/Month/index.ts rename to src/Calendar/HtmlRenderer/Month/index.ts index 75d0006..6803e17 100644 --- a/src/HtmlRenderer/Month/index.ts +++ b/src/Calendar/HtmlRenderer/Month/index.ts @@ -1,5 +1,5 @@ -import { Event } from "../../types"; -import { MonthGrouping } from "../../EventGrouping"; +import { Event } from "../../../types"; +import MonthGrouping from "../../EventGrouping/MonthGrouping"; import Renderer from "../Abstract/Renderer"; import GroupMonthRenderer from "./GroupMonthRenderer"; diff --git a/src/HtmlRenderer/Week/GroupWeekRenderer.ts b/src/Calendar/HtmlRenderer/Week/GroupWeekRenderer.ts similarity index 89% rename from src/HtmlRenderer/Week/GroupWeekRenderer.ts rename to src/Calendar/HtmlRenderer/Week/GroupWeekRenderer.ts index 51d5c24..2059f05 100644 --- a/src/HtmlRenderer/Week/GroupWeekRenderer.ts +++ b/src/Calendar/HtmlRenderer/Week/GroupWeekRenderer.ts @@ -1,5 +1,5 @@ -import { Event } from "../../types"; -import { WeekGrouping } from "../../EventGrouping"; +import { Event } from "../../../types"; +import WeekGrouping from "../../EventGrouping/WeekGrouping"; import GroupRenderer from "../Abstract/GroupRenderer"; diff --git a/src/HtmlRenderer/Week/index.ts b/src/Calendar/HtmlRenderer/Week/index.ts similarity index 82% rename from src/HtmlRenderer/Week/index.ts rename to src/Calendar/HtmlRenderer/Week/index.ts index df56f1a..ecafce2 100644 --- a/src/HtmlRenderer/Week/index.ts +++ b/src/Calendar/HtmlRenderer/Week/index.ts @@ -1,5 +1,5 @@ -import { Event } from "../../types"; -import { WeekGrouping } from "../../EventGrouping"; +import { Event } from "../../../types"; +import WeekGrouping from "../../EventGrouping/WeekGrouping"; import Renderer from "../Abstract/Renderer"; import GroupWeekRenderer from "./GroupWeekRenderer"; diff --git a/src/HtmlRenderer/Year/GroupYearRenderer.ts b/src/Calendar/HtmlRenderer/Year/GroupYearRenderer.ts similarity index 87% rename from src/HtmlRenderer/Year/GroupYearRenderer.ts rename to src/Calendar/HtmlRenderer/Year/GroupYearRenderer.ts index 19dfaad..b5a5ea5 100644 --- a/src/HtmlRenderer/Year/GroupYearRenderer.ts +++ b/src/Calendar/HtmlRenderer/Year/GroupYearRenderer.ts @@ -1,5 +1,5 @@ -import { Event } from "../../types"; -import { YearGrouping } from "../../EventGrouping"; +import { Event } from "../../../types"; +import YearGrouping from "../../EventGrouping/YearGrouping"; import GroupRenderer from "../Abstract/GroupRenderer"; diff --git a/src/HtmlRenderer/Year/index.ts b/src/Calendar/HtmlRenderer/Year/index.ts similarity index 82% rename from src/HtmlRenderer/Year/index.ts rename to src/Calendar/HtmlRenderer/Year/index.ts index e7bb6bf..26ff7b6 100644 --- a/src/HtmlRenderer/Year/index.ts +++ b/src/Calendar/HtmlRenderer/Year/index.ts @@ -1,5 +1,5 @@ -import { Event } from "../../types"; -import { YearGrouping } from "../../EventGrouping"; +import { Event } from "../../../types"; +import YearGrouping from "../../EventGrouping/YearGrouping"; import Renderer from "../Abstract/Renderer"; import GroupYearRenderer from "./GroupYearRenderer"; diff --git a/src/Calendar/index.ts b/src/Calendar/index.ts index 9786ab4..50fa8a5 100644 --- a/src/Calendar/index.ts +++ b/src/Calendar/index.ts @@ -1,17 +1,13 @@ import { GroupTypes } from "../types"; -import Events from "../Events/"; -import { - DayGrouping, - MonthGrouping, - WeekGrouping, - YearGrouping, -} from "../EventGrouping"; -import { - DayRenderer, - MonthRenderer, - WeekRenderer, - YearRenderer, -} from "../HtmlRenderer"; +import Events from "./Events/"; +import DayGrouping from "./EventGrouping/DayGrouping"; +import MonthGrouping from "./EventGrouping/MonthGrouping"; +import WeekGrouping from "./EventGrouping/MonthGrouping"; +import YearGrouping from "./EventGrouping/YearGrouping"; +import DayRenderer from "./HtmlRenderer/Day"; +import MonthRenderer from "./HtmlRenderer/Month"; +import WeekRenderer from "./HtmlRenderer/Week"; +import YearRenderer from "./HtmlRenderer/Year"; export default class Calendar { public readonly jsonContent: object; diff --git a/src/EventGrouping/tests/DayGrouping.test.ts b/src/Calendar/tests/EventGrouping/DayGrouping.test.ts similarity index 78% rename from src/EventGrouping/tests/DayGrouping.test.ts rename to src/Calendar/tests/EventGrouping/DayGrouping.test.ts index 1026497..40fb8e3 100644 --- a/src/EventGrouping/tests/DayGrouping.test.ts +++ b/src/Calendar/tests/EventGrouping/DayGrouping.test.ts @@ -1,5 +1,5 @@ -const { GroupTypes } = require("../../types"); -const DayGrouping = require("../DayGrouping").default; +const { GroupTypes } = require("../../../types"); +const DayGrouping = require("../../EventGrouping/DayGrouping").default; const mockSortedEvents = require("./mockSortedEvents").default; describe("groupEventsByDay should", () => { diff --git a/src/EventGrouping/tests/MonthGrouping.test.ts b/src/Calendar/tests/EventGrouping/MonthGrouping.test.ts similarity index 78% rename from src/EventGrouping/tests/MonthGrouping.test.ts rename to src/Calendar/tests/EventGrouping/MonthGrouping.test.ts index 65e7839..f6025ad 100644 --- a/src/EventGrouping/tests/MonthGrouping.test.ts +++ b/src/Calendar/tests/EventGrouping/MonthGrouping.test.ts @@ -1,5 +1,5 @@ -const { GroupTypes } = require("../../types"); -const MonthGrouping = require("../MonthGrouping").default; +const { GroupTypes } = require("../../../types"); +const MonthGrouping = require("../../EventGrouping/MonthGrouping").default; const mockSortedEvents = require("./mockSortedEvents").default; describe("groupEventsByMonth should", () => { diff --git a/src/EventGrouping/tests/WeekGrouping.test.ts b/src/Calendar/tests/EventGrouping/WeekGrouping.test.ts similarity index 78% rename from src/EventGrouping/tests/WeekGrouping.test.ts rename to src/Calendar/tests/EventGrouping/WeekGrouping.test.ts index c1d96a3..fc27d45 100644 --- a/src/EventGrouping/tests/WeekGrouping.test.ts +++ b/src/Calendar/tests/EventGrouping/WeekGrouping.test.ts @@ -1,5 +1,5 @@ -const { GroupTypes } = require("../../types"); -const WeekGrouping = require("../WeekGrouping").default; +const { GroupTypes } = require("../../../types"); +const WeekGrouping = require("../../EventGrouping/WeekGrouping").default; const mockSortedEvents = require("./mockSortedEvents").default; describe("groupEventsByWeek should", () => { diff --git a/src/EventGrouping/tests/mockSortedEvents.ts b/src/Calendar/tests/EventGrouping/mockSortedEvents.ts similarity index 100% rename from src/EventGrouping/tests/mockSortedEvents.ts rename to src/Calendar/tests/EventGrouping/mockSortedEvents.ts diff --git a/src/Events/index.test.ts b/src/Calendar/tests/Events/index.test.ts similarity index 96% rename from src/Events/index.test.ts rename to src/Calendar/tests/Events/index.test.ts index a975684..a7a0dd9 100644 --- a/src/Events/index.test.ts +++ b/src/Calendar/tests/Events/index.test.ts @@ -1,4 +1,4 @@ -const Events = require("./index").default; +const Events = require("../../Events").default; const mockEventsAllValid = [ { diff --git a/src/EventGrouping/index.ts b/src/EventGrouping/index.ts deleted file mode 100644 index 30ecee1..0000000 --- a/src/EventGrouping/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -import DayGrouping from "./DayGrouping"; -import WeekGrouping from "./WeekGrouping"; -import MonthGrouping from "./MonthGrouping"; -import YearGrouping from "./YearGrouping"; - -export { DayGrouping, WeekGrouping, MonthGrouping, YearGrouping }; diff --git a/src/HtmlRenderer/index.ts b/src/HtmlRenderer/index.ts deleted file mode 100644 index 8e96693..0000000 --- a/src/HtmlRenderer/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -import DayRenderer from "./Day"; -import WeekRenderer from "./Week"; -import MonthRenderer from "./Month"; -import YearRenderer from "./Year"; - -export { DayRenderer, WeekRenderer, MonthRenderer, YearRenderer };