@edu-tosel/design 1.0.158 → 1.0.160
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/README.md +42 -42
- package/asset/SVG.d.ts +3 -3
- package/asset/SVG.tsx +29 -29
- package/asset/html/gomito-promotion.html +116 -116
- package/asset/html/speaking-series-promotion.html +58 -58
- package/asset/sizes.d.ts +1 -1
- package/asset/sizes.ts +202 -202
- package/asset/svg/Close.tsx +32 -32
- package/asset/svg/Direction.tsx +76 -76
- package/asset/svg/Email.tsx +20 -20
- package/asset/svg/Eye.tsx +48 -48
- package/asset/svg/Icon.tsx +195 -195
- package/asset/svg/Image.tsx +24 -24
- package/asset/svg/Notification.tsx +34 -34
- package/asset/svg/Operation.tsx +130 -130
- package/asset/svg/Phone.tsx +20 -20
- package/asset/svg/Profile.tsx +27 -27
- package/asset/svg/Symbol.tsx +60 -60
- package/asset/svg/TOSEL.tsx +63 -63
- package/card/design/InfoCard.design.js +4 -4
- package/globals.css +269 -269
- package/interface/Card.d.ts +1 -0
- package/layout/index.d.ts +1 -0
- package/layout/index.js +1 -0
- package/layout/template/Event/One.js +37 -34
- package/layout/template/MonthlyProgressReport/Layout.d.ts +4 -0
- package/layout/template/MonthlyProgressReport/Layout.js +52 -0
- package/layout/template/MonthlyProgressReport/Report.d.ts +11 -4
- package/layout/template/MonthlyProgressReport/Report.js +50 -33
- package/layout/template/MonthlyProgressReport/index.d.ts +5 -2
- package/layout/template/MonthlyProgressReport/index.js +2 -0
- package/layout/template/Row.d.ts +3 -3
- package/layout/template/Ticket/Layout.d.ts +5 -0
- package/layout/template/Ticket/Layout.js +48 -0
- package/layout/template/Ticket/Ticket.d.ts +18 -0
- package/layout/template/Ticket/Ticket.js +13 -0
- package/layout/template/Ticket/index.d.ts +5 -0
- package/layout/template/Ticket/index.js +5 -0
- package/layout/template/dashboard/mypage/Profile.d.ts +2 -2
- package/layout/template/home/layout/Footer.js +1 -1
- package/layout/template/home/layout/Navigation.d.ts +2 -1
- package/layout/template/home/layout/Navigation.js +66 -18
- package/package.json +2 -1
- package/tailwind.config.ts +675 -675
- package/util/compareDates.js +10 -10
- package/version.txt +1 -1
- package/widget/design/Label.design.js +1 -0
- package/widget/template/Label.d.ts +1 -1
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useRef } from "react";
|
|
3
|
+
import { cn } from "../../../util";
|
|
4
|
+
import { Label } from "../../../widget";
|
|
5
|
+
import Action from "../Action";
|
|
6
|
+
import ModalProvider from "../../../modal/design/Modal.design";
|
|
7
|
+
import { useActionStore } from "../../../store";
|
|
8
|
+
import { useReactToPrint } from "react-to-print";
|
|
9
|
+
import MonthlyProgressReport from ".";
|
|
10
|
+
export default function Layout({ props }) {
|
|
11
|
+
const { setModal } = useActionStore();
|
|
12
|
+
const container = {
|
|
13
|
+
displays: "flex flex-col justify-center items-center",
|
|
14
|
+
fonts: "font-pretendard-var",
|
|
15
|
+
sizes: "w-full min-h-screen",
|
|
16
|
+
};
|
|
17
|
+
const header = {
|
|
18
|
+
displays: "flex justify-end gap-3.5",
|
|
19
|
+
sizes: "w-full max-w-[297mm]",
|
|
20
|
+
};
|
|
21
|
+
const ref = useRef(null);
|
|
22
|
+
const handlePrint = useReactToPrint({
|
|
23
|
+
content: () => ref.current,
|
|
24
|
+
});
|
|
25
|
+
return (_jsx("div", { className: cn(container), children: _jsxs(Action.Show, { actions: [
|
|
26
|
+
[
|
|
27
|
+
"whatIsMPR",
|
|
28
|
+
_jsx(ModalProvider, { titles: {
|
|
29
|
+
title: "Monthly Progress Report",
|
|
30
|
+
subtitle: [
|
|
31
|
+
"MPR에서 학생들의 학습 성취도를 확인할 수 있습니다.",
|
|
32
|
+
"토셀 랩의 커리큘럼으로 학습 능력을 끌어올리세요!",
|
|
33
|
+
],
|
|
34
|
+
}, children: _jsx("div", { className: "flex justify-center items-center w-full h-80", children: _jsx("img", { src: "/images/progress/mock.png", className: "w-full h-full" }) }) }),
|
|
35
|
+
],
|
|
36
|
+
], children: [_jsxs("div", { className: cn(header), children: [_jsx(Label.Button, { title: "MPR\uC774\uB780?", option: {
|
|
37
|
+
width: "xs",
|
|
38
|
+
height: "xs",
|
|
39
|
+
background: "bg-blue-navy",
|
|
40
|
+
text: "text-white",
|
|
41
|
+
}, onClick: () => setModal("whatIsMPR") }), _jsx(Label.Button, { title: "\uAD50\uC7AC \uB77C\uC778\uC5C5", option: {
|
|
42
|
+
width: "xs",
|
|
43
|
+
height: "xs",
|
|
44
|
+
background: "bg-blue-navy",
|
|
45
|
+
text: "text-white",
|
|
46
|
+
}, onClick: () => window.open("https://smartstore.naver.com/tosel/shoppingstory/detail?id=5001356529&page=1") }), _jsx(Label.Button, { title: "\uCD9C\uB825\uD558\uAE30", option: {
|
|
47
|
+
width: "xs",
|
|
48
|
+
height: "xs",
|
|
49
|
+
background: "bg-blue-navy",
|
|
50
|
+
text: "text-white",
|
|
51
|
+
}, onClick: handlePrint })] }), _jsx(MonthlyProgressReport.Report, { ref: ref, props: props })] }) }));
|
|
52
|
+
}
|
|
@@ -19,18 +19,25 @@ export interface Result {
|
|
|
19
19
|
answers: number[];
|
|
20
20
|
userId: number;
|
|
21
21
|
}
|
|
22
|
-
interface ProgressReportProps {
|
|
22
|
+
export interface ProgressReportProps {
|
|
23
23
|
studentInfo: {
|
|
24
24
|
name: string;
|
|
25
25
|
birthday: string;
|
|
26
26
|
belong?: string;
|
|
27
27
|
academy?: string;
|
|
28
|
+
image: string;
|
|
28
29
|
};
|
|
29
|
-
results: Result[];
|
|
30
30
|
recentResult: Result & {
|
|
31
31
|
examName: string;
|
|
32
32
|
};
|
|
33
|
+
results: {
|
|
34
|
+
date: number;
|
|
35
|
+
score: number;
|
|
36
|
+
}[];
|
|
33
37
|
comment: string | string[];
|
|
38
|
+
commentType?: "director" | "tosel";
|
|
34
39
|
}
|
|
35
|
-
|
|
36
|
-
|
|
40
|
+
declare const _default: import("react").ForwardRefExoticComponent<{
|
|
41
|
+
props: ProgressReportProps;
|
|
42
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
43
|
+
export default _default;
|
|
@@ -3,13 +3,15 @@ import { InfoCard } from "../../../card";
|
|
|
3
3
|
import CardDesign from "../../../card/design/Card.design";
|
|
4
4
|
import { LineBreaks } from "../../../text";
|
|
5
5
|
import { cn } from "../../../util";
|
|
6
|
-
import { ResponsiveContainer,
|
|
6
|
+
import { ResponsiveContainer, PieChart, Pie, Cell, LineChart, XAxis, YAxis, Line, Legend, } from "recharts";
|
|
7
7
|
import moment from "moment-timezone";
|
|
8
|
-
|
|
8
|
+
import { forwardRef } from "react";
|
|
9
|
+
function ProgressReport({ props, }, ref) {
|
|
10
|
+
const { studentInfo, recentResult, comment, results, commentType = "tosel", } = props;
|
|
9
11
|
const container = {
|
|
10
12
|
displays: "flex justify-between ",
|
|
11
13
|
sizes: "w-[297mm] h-[210mm]",
|
|
12
|
-
boundaries: "
|
|
14
|
+
boundaries: " px-10 pt-7 pb-9",
|
|
13
15
|
fonts: "font-pretendard-var",
|
|
14
16
|
};
|
|
15
17
|
const leftBody = {
|
|
@@ -18,6 +20,7 @@ export default function ProgressReport({ studentInfo, recentResult, comment, })
|
|
|
18
20
|
const rightBody = {
|
|
19
21
|
displays: "flex flex-col",
|
|
20
22
|
};
|
|
23
|
+
// 계산 함수 (50점 만점 기준)
|
|
21
24
|
const calculate = (result, type) => {
|
|
22
25
|
const section1 = Object.values(result.report)
|
|
23
26
|
.slice(0, 4)
|
|
@@ -34,47 +37,61 @@ export default function ProgressReport({ studentInfo, recentResult, comment, })
|
|
|
34
37
|
return section2;
|
|
35
38
|
return total;
|
|
36
39
|
};
|
|
37
|
-
const
|
|
38
|
-
|
|
40
|
+
const preparePieChartData = (result, type) => {
|
|
41
|
+
const sectionScore = calculate(result, type);
|
|
42
|
+
const maxScore = 50; // 만점
|
|
43
|
+
const remainingScore = maxScore - sectionScore;
|
|
44
|
+
return [
|
|
45
|
+
{ name: "Score", value: sectionScore },
|
|
46
|
+
{ name: "Remaining", value: remainingScore },
|
|
47
|
+
];
|
|
48
|
+
};
|
|
49
|
+
const sectionWrapper = {
|
|
50
|
+
displays: "relative flex items-center justify-center overflow-visible",
|
|
39
51
|
sizes: "aspect-square ",
|
|
40
|
-
|
|
41
|
-
|
|
52
|
+
fonts: "text-4xl font-bold text-blue-navy",
|
|
53
|
+
};
|
|
54
|
+
const pieTray = {
|
|
55
|
+
displays: "absolute left-0 top-0",
|
|
56
|
+
sizes: "h-full w-full",
|
|
57
|
+
};
|
|
58
|
+
const gradientId = "gradient1";
|
|
59
|
+
const gradientDefinition = (_jsx("defs", { children: _jsxs("linearGradient", { id: gradientId, x1: "0%", y1: "0%", x2: "100%", y2: "100%", children: [_jsx("stop", { offset: "0%", style: { stopColor: "#82ca9d", stopOpacity: 1 } }), _jsx("stop", { offset: "100%", style: { stopColor: "#8884d8", stopOpacity: 1 } })] }) }));
|
|
60
|
+
const pieStyles = {
|
|
61
|
+
cx: "50%",
|
|
62
|
+
cy: "50%",
|
|
63
|
+
innerRadius: 35,
|
|
64
|
+
outerRadius: 49,
|
|
65
|
+
dataKey: "value",
|
|
66
|
+
nameKey: "name",
|
|
67
|
+
};
|
|
68
|
+
const cellStyles = {
|
|
69
|
+
stroke: "rgba(255, 255, 255, 0)",
|
|
42
70
|
};
|
|
43
|
-
return (_jsxs("div", { className: cn(container), children: [_jsxs("div", { className: cn(leftBody), children: [_jsxs("div", { className: "flex flex-col text-blue-navy pl-4 border-l-4 border-blue-navy", children: [_jsx("div", { className: "flex items-center", children: _jsx("img", { src: "/images/logos/lab-spiral.png", alt: "lab" }) }), _jsx("div", { className: "text-2xl leading-tight font-bold", children: "
|
|
71
|
+
return (_jsxs("div", { ref: ref, className: cn(container), children: [_jsxs("div", { className: cn(leftBody), children: [_jsxs("div", { className: "flex flex-col text-blue-navy pl-4 border-l-4 border-blue-navy", children: [_jsx("div", { className: "flex items-center", children: _jsx("img", { src: "/images/logos/lab-spiral.png", alt: "lab" }) }), _jsx("div", { className: "text-2xl leading-tight font-bold", children: "Monthly Progress Report" })] }), _jsxs("div", { className: "flex flex-col justify-between h-full", children: [_jsx(InfoCard.Student, { titles: {
|
|
44
72
|
title: studentInfo.name,
|
|
45
73
|
subtitle: studentInfo.birthday,
|
|
46
|
-
}, image:
|
|
74
|
+
}, image: studentInfo.image, data: {
|
|
47
75
|
belong: studentInfo.belong,
|
|
48
76
|
academy: studentInfo.academy,
|
|
49
77
|
}, option: {
|
|
50
|
-
boundary: "border-2 border-
|
|
78
|
+
boundary: "border-2 border-slate-300",
|
|
79
|
+
titleColor: "text-blue-navy",
|
|
51
80
|
} }), _jsx("div", { className: "h-96", children: _jsxs(CardDesign, { option: {
|
|
52
81
|
height: "full",
|
|
53
|
-
boundary: "border-2 border-
|
|
54
|
-
}, children: [_jsxs("div", { className: "flex flex-col justify-center border-b-
|
|
82
|
+
boundary: "border-2 border-slate-300 pt-5 px-6 pb-6",
|
|
83
|
+
}, children: [_jsxs("div", { className: "flex flex-col justify-center border-b-2 border-blue-navy pb-2.5", children: [_jsx("div", { className: " text-lg font-bold text-blue-navy", children: "\uCD5C\uADFC \uC2DC\uD5D8" }), _jsx("div", { children: recentResult.examName })] }), _jsxs("div", { className: "flex flex-col gap-y-7.5 absolute bottom-0 w-full px-3.5", children: [_jsxs("div", { className: "flex gap-x-12 justify-between w-full", children: [_jsxs("div", { className: "flex-1", children: [_jsx("div", { className: "text-center mb-3.5 text-lg font-bold text-blue-navy", children: "Section I" }), _jsxs("div", { className: cn(sectionWrapper), children: [_jsx("div", { className: cn(pieTray), children: _jsx(ResponsiveContainer, { children: _jsxs(PieChart, { children: [gradientDefinition, _jsxs(Pie, { data: preparePieChartData(recentResult, "section1"), ...pieStyles, children: [_jsx(Cell, { fill: `url(#${gradientId})`, ...cellStyles }), _jsx(Cell, { fill: "rgba(255, 255, 255, 0)", ...cellStyles })] })] }) }) }), calculate(recentResult, "section1")] })] }), _jsxs("div", { className: "flex-1", children: [_jsx("div", { className: "text-center mb-3.5 text-lg font-bold text-blue-navy", children: "Section II" }), _jsxs("div", { className: cn(sectionWrapper), children: [_jsx("div", { className: cn(pieTray), children: _jsx(ResponsiveContainer, { children: _jsxs(PieChart, { children: [gradientDefinition, _jsxs(Pie, { data: preparePieChartData(recentResult, "section2"), ...pieStyles, children: [_jsx(Cell, { fill: `url(#${gradientId})`, ...cellStyles }), _jsx(Cell, { fill: "rgba(255, 255, 255, 0)", ...cellStyles })] })] }) }) }), calculate(recentResult, "section2")] })] })] }), _jsxs("div", { className: "flex gap-x-2 justify-end items-end font-bold text-blue-navy", children: [_jsx("div", { className: "text-xl", children: "total" }), _jsx("div", { className: "text-5xl leading-none ", children: calculate(recentResult) })] })] })] }) })] })] }), _jsxs("div", { className: cn(rightBody), children: [_jsx("div", { className: "h-12 flex justify-end text-blue-navy font-bold", children: _jsx("div", { children: moment(new Date()).format("YYYY-MM-DD HH:mm:ss") }) }), _jsxs("div", { className: "flex flex-col justify-between h-full", children: [_jsx("div", { className: "h-88", children: _jsx(CardDesign, { option: {
|
|
55
84
|
width: "xl",
|
|
56
85
|
height: "full",
|
|
57
|
-
boundary: "border-2 border-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
{
|
|
64
|
-
date: "2024-03-02",
|
|
65
|
-
score: 45,
|
|
66
|
-
},
|
|
67
|
-
// {
|
|
68
|
-
// date: "2024-03-03",
|
|
69
|
-
// score: 47,
|
|
70
|
-
// },
|
|
71
|
-
// {
|
|
72
|
-
// date: "2024-03-04",
|
|
73
|
-
// score: 53,
|
|
74
|
-
// },
|
|
75
|
-
], children: [_jsx(XAxis, { dataKey: "date" }), _jsx(YAxis, { dataKey: "score", scale: "log", domain: ["auto", "auto"] }), _jsx(Line, { type: "monotone", name: "Monthly Test", dataKey: "score", stroke: "#173A8B", fill: "#173A8B" }), _jsx(Legend, {})] }) }) }) }), _jsx("div", { className: "h-72", children: _jsxs(CardDesign, { option: {
|
|
86
|
+
boundary: "border-2 border-slate-300 pt-8 pr-8",
|
|
87
|
+
background: "bg-slate-200",
|
|
88
|
+
}, children: _jsx(ResponsiveContainer, { width: "100%", height: "100%", className: "absolute left-0 bottom-0", children: _jsxs(LineChart, { data: results.map((result) => ({
|
|
89
|
+
...result,
|
|
90
|
+
date: moment.unix(result.date).format("YY-MM-DD"),
|
|
91
|
+
})), children: [_jsx(XAxis, { dataKey: "date" }), _jsx(YAxis, { dataKey: "score", scale: "log", domain: ["auto", "auto"] }), _jsx(Line, { type: "monotone", name: "Monthly Test", dataKey: "score", stroke: "#173A8B", fill: "#173A8B" }), _jsx(Legend, {})] }) }) }) }), _jsx("div", { className: "h-72", children: _jsxs(CardDesign, { option: {
|
|
76
92
|
width: "xl",
|
|
77
93
|
height: "full",
|
|
78
|
-
boundary: "border-2 border-
|
|
79
|
-
}, children: [
|
|
94
|
+
boundary: "border-2 border-slate-300 p-5",
|
|
95
|
+
}, children: [_jsxs("div", { className: "flex text-blue-navy font-bold text-lg", children: [_jsx("div", { children: commentType === "director" ? "원장님" : "TOSEL Lab" }), _jsx("div", { children: "\uC758 \uCF54\uBA58\uD2B8" })] }), _jsx("div", { className: "h-52 overflow-y-scroll scrollbar-hidden text-sm mt-2.5", children: _jsx(LineBreaks, { texts: comment }) })] }) })] })] })] }));
|
|
80
96
|
}
|
|
97
|
+
export default forwardRef(ProgressReport);
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Layout from "./Layout";
|
|
2
2
|
declare const MonthlyProgressReport: {
|
|
3
|
-
Report:
|
|
3
|
+
Report: import("react").ForwardRefExoticComponent<{
|
|
4
|
+
props: import("./Report").ProgressReportProps;
|
|
5
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
|
+
Layout: typeof Layout;
|
|
4
7
|
};
|
|
5
8
|
export default MonthlyProgressReport;
|
package/layout/template/Row.d.ts
CHANGED
|
@@ -3,9 +3,9 @@ declare function Row<T>({ item, dataField, onClick, buttons, dot }: RowProps<T>)
|
|
|
3
3
|
declare namespace Row {
|
|
4
4
|
var Board: <T>({ item, dataField, onClick, buttons, dot, option, }: RowProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
var Card: <T>({ item, dataField, stateAction, onClick, buttons, height, noPadding, noHover, dot, option, }: RowProps<T> & {
|
|
6
|
-
height?: string
|
|
7
|
-
noPadding?: boolean
|
|
8
|
-
noHover?: boolean
|
|
6
|
+
height?: string;
|
|
7
|
+
noPadding?: boolean;
|
|
8
|
+
noHover?: boolean;
|
|
9
9
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
}
|
|
11
11
|
export default Row;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useReactToPrint } from "react-to-print";
|
|
3
|
+
import { cn } from "../../../util";
|
|
4
|
+
import { Label } from "../../../widget";
|
|
5
|
+
import Ticket from "./Ticket";
|
|
6
|
+
import { useRef } from "react";
|
|
7
|
+
export default function Layout({ exam, name, birthday, level, code, }) {
|
|
8
|
+
const container = {
|
|
9
|
+
displays: "flex justify-center items-center",
|
|
10
|
+
sizes: "w-full min-h-screen",
|
|
11
|
+
};
|
|
12
|
+
const body = {
|
|
13
|
+
positions: "relative",
|
|
14
|
+
displays: "flex gap-x-3.5",
|
|
15
|
+
};
|
|
16
|
+
const ref = useRef(null);
|
|
17
|
+
const handlePrint = useReactToPrint({
|
|
18
|
+
content: () => ref.current,
|
|
19
|
+
});
|
|
20
|
+
return (_jsx("div", { className: cn(container), children: _jsxs("div", { className: cn(body), children: [_jsx(Ticket, { ref: ref, props: {
|
|
21
|
+
exam,
|
|
22
|
+
name,
|
|
23
|
+
birthday,
|
|
24
|
+
level,
|
|
25
|
+
code,
|
|
26
|
+
} }), _jsxs("div", { children: [_jsx(Label.Button, { title: "OMR \uC778\uC1C4", onClick: () => { }, option: {
|
|
27
|
+
width: "sm",
|
|
28
|
+
height: "xs",
|
|
29
|
+
background: "bg-green-dark",
|
|
30
|
+
text: "text-white",
|
|
31
|
+
} }), _jsx(Label.Button, { title: "\uC9C0\uB3C4\uB85C \uBCF4\uAE30", onClick: () => { }, option: {
|
|
32
|
+
width: "sm",
|
|
33
|
+
height: "xs",
|
|
34
|
+
background: "bg-green-dark",
|
|
35
|
+
text: "text-white",
|
|
36
|
+
} }), _jsx(Label.Button, { title: "\uC790\uC138\uD788 \uBCF4\uAE30", onClick: () => { }, option: {
|
|
37
|
+
width: "sm",
|
|
38
|
+
height: "xs",
|
|
39
|
+
background: "bg-green-dark",
|
|
40
|
+
text: "text-white",
|
|
41
|
+
} }), _jsx(Label.Button, { title: "\uC218\uD5D8\uD45C \uCD9C\uB825\uD558\uAE30", onClick: handlePrint, option: {
|
|
42
|
+
width: "md",
|
|
43
|
+
height: "sm",
|
|
44
|
+
background: "bg-white",
|
|
45
|
+
boundary: "border-2 border-green-dark",
|
|
46
|
+
text: "text-green-dark",
|
|
47
|
+
} })] })] }) }));
|
|
48
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface TicketProps {
|
|
2
|
+
exam: {
|
|
3
|
+
title: string;
|
|
4
|
+
hall: string;
|
|
5
|
+
room: string;
|
|
6
|
+
date: string;
|
|
7
|
+
startedAt: number;
|
|
8
|
+
endedAt: number;
|
|
9
|
+
};
|
|
10
|
+
name: string;
|
|
11
|
+
birthday: string;
|
|
12
|
+
level: string;
|
|
13
|
+
code: string;
|
|
14
|
+
}
|
|
15
|
+
declare const _default: import("react").ForwardRefExoticComponent<{
|
|
16
|
+
props: TicketProps;
|
|
17
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { cn } from "../../../util";
|
|
4
|
+
import moment from "moment-timezone";
|
|
5
|
+
function Ticket({ props }, ref) {
|
|
6
|
+
const { title, date, startedAt, endedAt } = props.exam;
|
|
7
|
+
const container = {
|
|
8
|
+
sizes: "w-[340px] h-[700px]",
|
|
9
|
+
boundaries: "border-2",
|
|
10
|
+
};
|
|
11
|
+
return (_jsxs("div", { ref: ref, className: cn(container), children: [_jsx("div", { className: "text-xl font-bold", children: title }), _jsx("div", { className: "text-sm", children: date }), _jsx("div", { className: "text-sm", children: moment.unix(startedAt).format("YYYY-MM-DD") }), _jsx("div", { className: "text-sm", children: moment.unix(startedAt).format("YYYY년 MM월 DD일") })] }));
|
|
12
|
+
}
|
|
13
|
+
export default forwardRef(Ticket);
|
|
@@ -13,8 +13,8 @@ declare function Profile({ name, birthday, image, modify }: ProfileProps): impor
|
|
|
13
13
|
declare namespace Profile {
|
|
14
14
|
var Detail: ({ titles, infos, toggle, }: {
|
|
15
15
|
titles: Titles;
|
|
16
|
-
infos?: Info[]
|
|
17
|
-
toggle?: State<boolean
|
|
16
|
+
infos?: Info[];
|
|
17
|
+
toggle?: State<boolean>;
|
|
18
18
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
19
19
|
var Preview: ({ image, username, email, }: {
|
|
20
20
|
username: string;
|
|
@@ -40,7 +40,7 @@ export default function Footer() {
|
|
|
40
40
|
const socialIconControl = {
|
|
41
41
|
siezes: "h-6",
|
|
42
42
|
};
|
|
43
|
-
return (_jsx("div", { className: cn(container), children: _jsxs("div", { className: cn(body), children: [_jsxs("div", { className: cn(logoWrapper), children: [_jsx("img", { className: cn(svgController), src: "/images/logos/logo-tosel-main.svg", alt: "" }), _jsx("img", { className: cn(svgController), src: "/images/logos/logo-itc-main.svg", alt: "" })] }), _jsxs("div", { className: "flex flex-wrap justify-between items-center border-b-1 border-gray-dark pb-4 mt-5 font-medium gap-y-1", children: [_jsx("div", { children: "Copyright TOSEL. \u24D2 All Rights Reserved." }), _jsx("div", { className: "flex gap-5", children: buttons.map((button, index) => (_jsxs("div", { onClick: button.onClick, className: "cursor-default", children: [button.title, " "] }, index))) })] }), _jsxs("div", { className: cn(infoSet), children: [_jsx("div", { className: cn(infoTitle), children: "\uACE0\uAC1D\uBB38\uC758" }), _jsxs("div", { className: cn(info), children: ["\uB300\uD45C\uBC88\uD638 | 02-923-0505", _jsx("br", {}), " \uAC1C\uC778\uBB38\uC758 | tosel_cs@tosel.co.kr ", _jsx("br", {}), "\uB2E8\uCCB4\uBB38\uC758 | tosel_academy@tosel.co.kr"] })] }), _jsxs("div", { className: cn(infoSet), children: [_jsx("div", { className: cn(infoTitle), children: "\uAD6D\uC81C\uD1A0\uC140\uC704\uC6D0\uD68C" }), _jsxs("div", { className: cn(info), children: ["\uC6F9\uC11C\uBE44\uC2A4: \uC8FC\uC2DD\uD68C\uC0AC \uC5D0\uB4C0\uD1A0\uC140 | \uD1B5\uC2E0\uD310\uB9E4\uC5C5\uC2E0\uACE0\uBC88\uD638: \uC81C 2012-\uC11C\uC6B8\uC131\uBD81-0083\uD638", _jsx("br", {}), " \uC11C\uC6B8\uC2DC \uC131\uBD81\uAD6C \uC548\uC554\uB85C 145 \uACE0\uB824\uB300\uD559\uAD50 \uB77C\uC774\uC2DC\uC6C0 4\uCE35", _jsx("br", {}), " Lyceum Korea University, 145 Anam Ro, Seongbuk-Gu, Seoul, Korea 02841"] })] }), _jsxs("div", { className: cn(iconWrapper), children: [_jsx("a", { onClick: () => (location.href = "https://blog.naver.com/ebs1503"), children: _jsx("div", { className: cn(iconBox), children: _jsx("img", { className: cn(socialIconControl), src: "/images/logos/naver.svg", alt: "" }) }) }), _jsx("a", { onClick: () => (location.href = "https://www.instagram.com/tosel_official/"), children: _jsx("div", { className: cn(iconBox), children: _jsx("img", { className: cn(socialIconControl), src: "/images/logos/instagram.svg", alt: "" }) }) }), _jsx("a", { onClick: () => (location.href = "https://www.youtube.com/@tosel_official"), children: _jsx("div", { className: cn(iconBox), children: _jsx("img", { className: cn(socialIconControl), src: "/images/logos/youtube.svg", alt: "" }) }) })] })] }) }));
|
|
43
|
+
return (_jsx("div", { className: cn(container), children: _jsxs("div", { className: cn(body), children: [_jsxs("div", { className: cn(logoWrapper), children: [_jsx("img", { className: cn(svgController), src: "/images/logos/logo-tosel-main.svg", alt: "" }), _jsx("img", { className: cn(svgController), src: "/images/logos/logo-itc-main.svg", alt: "" })] }), _jsxs("div", { className: "flex flex-wrap justify-between items-center border-b-1 border-gray-dark pb-4 mt-5 font-medium gap-y-1", children: [_jsx("div", { children: "Copyright TOSEL. \u24D2 All Rights Reserved." }), _jsx("div", { className: "flex gap-5", children: buttons.map((button, index) => (_jsxs("div", { onClick: button.onClick, className: "cursor-default", children: [button.title, " "] }, index))) })] }), _jsxs("div", { className: cn(infoSet), children: [_jsx("div", { className: cn(infoTitle), children: "\uACE0\uAC1D\uBB38\uC758" }), _jsxs("div", { className: cn(info), children: ["\uB300\uD45C\uBC88\uD638 | 02-923-0505", _jsx("br", {}), " \uAC1C\uC778\uBB38\uC758 | tosel_cs@tosel.co.kr ", _jsx("br", {}), "\uB2E8\uCCB4\uBB38\uC758 | tosel_academy@tosel.co.kr"] })] }), _jsxs("div", { className: cn(infoSet), children: [_jsx("div", { className: cn(infoTitle), children: "\uAD6D\uC81C\uD1A0\uC140\uC704\uC6D0\uD68C" }), _jsxs("div", { className: cn(info), children: ["\uC0AC\uC5C5\uC790 \uB4F1\uB85D\uBC88\uD638 : 209-81-55585 | \uB300\uD45C : \uC624\uC2B9\uC5F0 ", _jsx("br", {}), "\uC6F9\uC11C\uBE44\uC2A4: \uC8FC\uC2DD\uD68C\uC0AC \uC5D0\uB4C0\uD1A0\uC140 | \uD1B5\uC2E0\uD310\uB9E4\uC5C5\uC2E0\uACE0\uBC88\uD638: \uC81C 2012-\uC11C\uC6B8\uC131\uBD81-0083\uD638", _jsx("br", {}), " \uC11C\uC6B8\uC2DC \uC131\uBD81\uAD6C \uC548\uC554\uB85C 145 \uACE0\uB824\uB300\uD559\uAD50 \uB77C\uC774\uC2DC\uC6C0 4\uCE35", _jsx("br", {}), " Lyceum Korea University, 145 Anam Ro, Seongbuk-Gu, Seoul, Korea 02841"] })] }), _jsxs("div", { className: cn(iconWrapper), children: [_jsx("a", { onClick: () => (location.href = "https://blog.naver.com/ebs1503"), children: _jsx("div", { className: cn(iconBox), children: _jsx("img", { className: cn(socialIconControl), src: "/images/logos/naver.svg", alt: "" }) }) }), _jsx("a", { onClick: () => (location.href = "https://www.instagram.com/tosel_official/"), children: _jsx("div", { className: cn(iconBox), children: _jsx("img", { className: cn(socialIconControl), src: "/images/logos/instagram.svg", alt: "" }) }) }), _jsx("a", { onClick: () => (location.href = "https://www.youtube.com/@tosel_official"), children: _jsx("div", { className: cn(iconBox), children: _jsx("img", { className: cn(socialIconControl), src: "/images/logos/youtube.svg", alt: "" }) }) })] })] }) }));
|
|
44
44
|
}
|
|
45
45
|
const buttons = [
|
|
46
46
|
// {
|
|
@@ -46,14 +46,13 @@ export default function Navigation({ browser, calendar, notice, event, }) {
|
|
|
46
46
|
positions: "fixed top-0 left-0 z-40 ",
|
|
47
47
|
sizes: "h-screen w-[400px]",
|
|
48
48
|
boundaries: "md:pl-[56px]",
|
|
49
|
-
styles: "
|
|
49
|
+
styles: "bg-black/20 backdrop-blur-sm",
|
|
50
50
|
shadows: "shadow-main",
|
|
51
51
|
};
|
|
52
52
|
const itemBody = {
|
|
53
|
-
positions: "absolute bottom-16 md:static md:bottom-auto ",
|
|
54
|
-
sizes: "w-full md:w-[
|
|
55
|
-
|
|
56
|
-
styles: "bg-white overflow-hidden",
|
|
53
|
+
positions: "absolute bottom-16 md:static md:bottom-auto md:flex md:flex-col",
|
|
54
|
+
sizes: "w-full md:w-[400px] h-80 md:h-screen",
|
|
55
|
+
styles: "bg-white ",
|
|
57
56
|
};
|
|
58
57
|
const iconWrapper = {
|
|
59
58
|
displays: "flex justify-center items-center",
|
|
@@ -67,8 +66,15 @@ export default function Navigation({ browser, calendar, notice, event, }) {
|
|
|
67
66
|
leave: { width: "0%" },
|
|
68
67
|
config: { duration: isMobile ? 100 : 0 },
|
|
69
68
|
});
|
|
69
|
+
const scrollTitleWrapper = {
|
|
70
|
+
displays: "w-full h-fit",
|
|
71
|
+
spacings: "p-5",
|
|
72
|
+
};
|
|
73
|
+
const scrollTitle = {
|
|
74
|
+
textStyles: "text-lg font-bold text-green-dark",
|
|
75
|
+
};
|
|
70
76
|
return (_jsxs(_Fragment, { children: [overlayCoverTransition((styles, item) => item && (_jsxs(animated.div, { style: styles, className: "bg-white h-screen fixed top-0 left-0 z-40 flex flex-col justify-center items-center overflow-hidden gap-y-14 ", children: [_jsx("img", { src: "/images/logos/tosel.png", alt: "tosel", width: 368.56, height: 80.07 }), _jsx("div", { children: "dashboard loading..." })] }))), overlayPopTransition((styles, item) => type &&
|
|
71
|
-
item && (_jsx(animated.div, { style: styles, className: cn(itemContainer), children: _jsxs("div", { className: cn(itemBody), children: [_jsx("div", { className: "
|
|
77
|
+
item && (_jsx(animated.div, { style: styles, className: cn(itemContainer), children: _jsxs("div", { className: cn(itemBody), onClick: (e) => e.stopPropagation(), children: [_jsx("div", { className: cn(scrollTitleWrapper), children: _jsx("div", { className: cn(scrollTitle), children: navigationTypeString[type] }) }), _jsx(NavigationItem, { type: type, calendar: calendar, notice: notice, event: event })] }) }))), _jsx("div", { className: "fixed bottom-0 md:top-1/2 md:-translate-y-1/2 flex justify-center items-center z-45", children: _jsxs("div", { onClick: (e) => e.stopPropagation(), className: cn(container), children: [_jsx("div", { className: cn(iconWrapper), onClick: () => handleOpen("calendar"), children: _jsx(SVG.Icon.Calendar, { size: isMobile ? "md" : "lg" }) }), _jsx("div", { className: cn(iconWrapper), onClick: () => handleOpen("notification"), children: _jsx(SVG.Icon.Notification, { size: isMobile ? "md" : "lg" }) }), _jsx("div", { className: cn(iconWrapper), onClick: () => handleOpen("search"), children: _jsx(SVG.Icon.Search, { size: isMobile ? "md" : "lg" }) }), _jsx("div", { className: cn(iconWrapper), onClick: () => handleOpen("browser"), children: _jsx(SVG.Icon.Browser, { size: isMobile ? "md" : "lg" }) }), _jsx("div", { className: cn(iconWrapper), onClick: () => handleOpen("event"), children: _jsx(SVG.Icon.Event, { size: isMobile ? "md" : "lg" }) })] }) })] }));
|
|
72
78
|
}
|
|
73
79
|
const navigationTypeString = {
|
|
74
80
|
calendar: "시험 접수 일정",
|
|
@@ -76,12 +82,30 @@ const navigationTypeString = {
|
|
|
76
82
|
event: "이벤트",
|
|
77
83
|
};
|
|
78
84
|
function NavigationItem({ type, calendar, notice, event, }) {
|
|
79
|
-
|
|
80
|
-
|
|
85
|
+
//scroll action
|
|
86
|
+
const container = {
|
|
87
|
+
displays: "relative flex flex-row md:flex-col",
|
|
88
|
+
sizss: "h-full",
|
|
89
|
+
scrollActions: "scrollbar-hidden overflow-x-scroll md:overflow-y-scroll snap-x md:snap-none",
|
|
90
|
+
spacings: "p-5 gap-5 scroll-pl-5",
|
|
91
|
+
};
|
|
92
|
+
//card title styling
|
|
93
|
+
const titleWrapper = {
|
|
94
|
+
displays: "flex flex-row justify-between",
|
|
95
|
+
sizes: "w-full h-fit",
|
|
96
|
+
};
|
|
97
|
+
const titleText = {
|
|
98
|
+
textstyles: "font-bold text-base text-gray-dark",
|
|
81
99
|
};
|
|
82
|
-
const
|
|
83
|
-
displays: "",
|
|
84
|
-
sizes: "",
|
|
100
|
+
const tag = {
|
|
101
|
+
displays: "flex flex-row px-2 py-0.5",
|
|
102
|
+
sizes: "w-fit h-fit rounded-md",
|
|
103
|
+
textstyles: "font-medium text-xs text-white",
|
|
104
|
+
};
|
|
105
|
+
const CardBox = {
|
|
106
|
+
displays: "flex flex-row",
|
|
107
|
+
sizes: "w-[360px] h-[fit] rounded-[8px]",
|
|
108
|
+
spacings: "p-5",
|
|
85
109
|
};
|
|
86
110
|
const dateWrapper = {
|
|
87
111
|
displays: "flex flex-row gap-3",
|
|
@@ -90,16 +114,40 @@ function NavigationItem({ type, calendar, notice, event, }) {
|
|
|
90
114
|
textStyles: "font-bold font-pretendar-var font-sm font-gray-dark",
|
|
91
115
|
spacings: "leading-normal",
|
|
92
116
|
};
|
|
93
|
-
const
|
|
94
|
-
styles: "relative mt-[34px] scrollbar-hidden flex flex-row md:flex-col gap-y-[15px] md:h-screen overflow-x-scroll md:overflow-y-scroll",
|
|
95
|
-
};
|
|
117
|
+
const iconWrapper = {};
|
|
96
118
|
const item = {
|
|
97
|
-
displays: "flex-shrink-0 flex flex-col md:justify-
|
|
119
|
+
displays: "flex-shrink-0 flex flex-col md:justify-start snap-start",
|
|
98
120
|
};
|
|
121
|
+
const [currentTime, setCurrentTime] = useState(new Date());
|
|
122
|
+
const [scheduleState, setScheduleState] = useState(calendar.schedules.map(() => ({
|
|
123
|
+
isBeforeStart: false,
|
|
124
|
+
dDayStart: "",
|
|
125
|
+
isBeforeEnd: false,
|
|
126
|
+
dDayEnd: "",
|
|
127
|
+
})));
|
|
128
|
+
useEffect(() => {
|
|
129
|
+
const interval = setInterval(() => {
|
|
130
|
+
setCurrentTime(new Date());
|
|
131
|
+
}, 1000);
|
|
132
|
+
return () => clearInterval(interval);
|
|
133
|
+
}, []);
|
|
134
|
+
useEffect(() => {
|
|
135
|
+
const updatedScheduleState = calendar.schedules.map(({ applyStart, applyEnd }) => {
|
|
136
|
+
const startInfo = compareDates(applyStart);
|
|
137
|
+
const endInfo = compareDates(applyEnd);
|
|
138
|
+
return {
|
|
139
|
+
isBeforeStart: startInfo.isBefore,
|
|
140
|
+
dDayStart: startInfo.dDay,
|
|
141
|
+
isBeforeEnd: endInfo.isBefore,
|
|
142
|
+
dDayEnd: endInfo.dDay,
|
|
143
|
+
};
|
|
144
|
+
});
|
|
145
|
+
setScheduleState(updatedScheduleState);
|
|
146
|
+
}, [currentTime, calendar.schedules]);
|
|
99
147
|
if (type === "calendar")
|
|
100
|
-
return (_jsx("div", { className: cn(container), children: calendar.schedules.map(({
|
|
101
|
-
const {
|
|
102
|
-
return (
|
|
148
|
+
return (_jsx("div", { className: cn(container), children: calendar.schedules.map(({ applyEnd, title, onClick }, index) => {
|
|
149
|
+
const { isBeforeStart, dDayStart, isBeforeEnd, dDayEnd } = scheduleState[index];
|
|
150
|
+
return (_jsxs("div", { onClick: onClick, className: cn(item, "w-[360px] h-[184px] rounded-[8px] p-5 bg-gray-light/30 border-1 border-gray-light"), children: [_jsxs("div", { className: cn(titleWrapper), children: [_jsx("div", { className: cn(titleText), children: title }), _jsx("div", { children: isBeforeStart ? (_jsxs("div", { className: cn(tag, "bg-red-burgundy"), children: ["\uC811\uC218\uAE4C\uC9C0 ", dDayStart] })) : isBeforeEnd ? (_jsx("div", { className: cn(tag, "bg-green-dark"), children: "\uC811\uC218\uC911" })) : (_jsx("div", { className: cn(tag, "bg-gray-medium/30"), children: "\uB9C8\uAC10" })) })] }), !isBeforeStart && isBeforeEnd ? (_jsxs("div", { className: "text-xs", children: ["\uC811\uC218 \uB9C8\uAC10\uAE4C\uC9C0 ", dDayEnd] })) : (""), _jsx("div", { children: _jsx("div", { className: "text-[16px] font-bold text-gray-dark", children: convertDateToString(applyEnd) }) })] }));
|
|
103
151
|
}) }));
|
|
104
152
|
if (type === "notification")
|
|
105
153
|
return (_jsx("div", { className: cn(container), children: notice.announcements.map(({ title, date, description, onClick }) => (_jsxs("div", { onClick: onClick, className: cn(item, "h-[140px] box-shadow rounded-[10px] p-7.5"), children: [_jsxs("div", { children: [_jsx("div", { className: "text-[15px] text-gray-medium", children: date }), _jsx("div", { className: "text-[20px] font-bold text-gray-dark", children: title })] }), _jsx(LineBreaks, { texts: description, className: "text-gray-dark text-[18px]" })] }))) }));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edu-tosel/design",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.160",
|
|
4
4
|
"description": "UI components for International TOSEL Committee",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jsx",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"react-lottie-player": "^1.5.6",
|
|
31
31
|
"react-router-dom": "^6.21.3",
|
|
32
32
|
"react-spring": "^9.7.3",
|
|
33
|
+
"react-to-print": "^2.15.1",
|
|
33
34
|
"react-transition-group": "^4.4.5",
|
|
34
35
|
"react-youtube": "^10.1.0",
|
|
35
36
|
"recharts": "^2.11.0",
|