Changed folder structure; all Calendar logic now in src/Calendar
This commit is contained in:
parent
f65a4f119f
commit
904a9c0691
@ -1,5 +1,5 @@
|
||||
import EventGrouping from "./EventGrouping";
|
||||
import { Event, Groups } from "../types";
|
||||
import { Event, Groups } from "../../types";
|
||||
import {
|
||||
add,
|
||||
differenceInCalendarDays,
|
||||
@ -1,4 +1,4 @@
|
||||
import { Event, Groups } from "../types";
|
||||
import { Event, Groups } from "../../types";
|
||||
|
||||
export default abstract class EventGrouping {
|
||||
protected readonly sortedEvents: Event[];
|
||||
@ -1,5 +1,5 @@
|
||||
import EventGrouping from "./EventGrouping";
|
||||
import { Event, Groups } from "../types";
|
||||
import { Event, Groups } from "../../types";
|
||||
import {
|
||||
add,
|
||||
differenceInCalendarMonths,
|
||||
@ -1,5 +1,5 @@
|
||||
import EventGrouping from "./EventGrouping";
|
||||
import { Event, Groups } from "../types";
|
||||
import { Event, Groups } from "../../types";
|
||||
import {
|
||||
add,
|
||||
differenceInCalendarWeeks,
|
||||
@ -1,5 +1,5 @@
|
||||
import EventGrouping from "./EventGrouping";
|
||||
import { Event, Groups } from "../types";
|
||||
import { Event, Groups } from "../../types";
|
||||
import {
|
||||
add,
|
||||
differenceInCalendarYears,
|
||||
@ -1,4 +1,4 @@
|
||||
import { Event as EventType } from "../types";
|
||||
import { Event as EventType } from "../../types";
|
||||
|
||||
export default class Event implements EventType {
|
||||
date: Date;
|
||||
@ -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;
|
||||
@ -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(
|
||||
@ -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";
|
||||
|
||||
@ -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";
|
||||
|
||||
@ -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";
|
||||
|
||||
@ -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";
|
||||
|
||||
@ -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";
|
||||
|
||||
@ -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";
|
||||
|
||||
@ -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";
|
||||
|
||||
@ -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";
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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", () => {
|
||||
@ -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", () => {
|
||||
@ -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", () => {
|
||||
@ -1,4 +1,4 @@
|
||||
const Events = require("./index").default;
|
||||
const Events = require("../../Events").default;
|
||||
|
||||
const mockEventsAllValid = [
|
||||
{
|
||||
@ -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 };
|
||||
@ -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 };
|
||||
Loading…
x
Reference in New Issue
Block a user