@edu-tosel/design 1.0.187 → 1.0.189
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/_test/interface/Property.d.ts +1 -1
- package/_test/interface/Property.js +1 -0
- package/layout/template/Transcript/Theme.d.ts +1 -0
- package/layout/template/Transcript/Theme.js +1 -0
- package/layout/template/Transcript/design/Transcript.design.d.ts +8 -7
- package/layout/template/Transcript/design/Transcript.design.js +21 -160
- package/layout/template/Transcript/design/TranscriptAdvanced.design.d.ts +5 -1
- package/layout/template/Transcript/design/TranscriptAdvanced.design.js +18 -5
- package/layout/template/Transcript/design/atom/CardTitle.d.ts +3 -1
- package/layout/template/Transcript/design/atom/CardTitle.js +5 -3
- package/layout/template/Transcript/design/atom/GetStyleFromLevel.d.ts +2 -0
- package/layout/template/Transcript/design/atom/GetStyleFromLevel.js +4 -0
- package/layout/template/Transcript/design/atom/LevelToStyleMap.d.ts +6 -0
- package/layout/template/Transcript/design/atom/LevelToStyleMap.js +37 -0
- package/layout/template/Transcript/design/molecule/BarGraph.d.ts +3 -1
- package/layout/template/Transcript/design/molecule/BarGraph.js +15 -5
- package/layout/template/Transcript/design/molecule/CircularGauge.d.ts +9 -0
- package/layout/template/Transcript/design/molecule/CircularGauge.js +50 -0
- package/layout/template/Transcript/design/molecule/LevelIndex.d.ts +3 -0
- package/layout/template/Transcript/design/molecule/LevelIndex.js +14 -0
- package/layout/template/Transcript/design/organism/BarCardCol.d.ts +6 -0
- package/layout/template/Transcript/design/organism/BarCardCol.js +24 -0
- package/layout/template/Transcript/design/organism/BarCardRow.d.ts +6 -0
- package/layout/template/Transcript/design/organism/BarCardRow.js +24 -0
- package/layout/template/Transcript/design/organism/HonorCard.d.ts +4 -0
- package/layout/template/Transcript/design/organism/HonorCard.js +21 -0
- package/layout/template/Transcript/design/organism/IdCard.d.ts +4 -0
- package/layout/template/Transcript/design/organism/IdCard.js +57 -0
- package/layout/template/Transcript/design/{Organism/BarCardRow.d.ts → organism/PerformanceCard.d.ts} +2 -1
- package/layout/template/Transcript/design/organism/PerformanceCard.js +25 -0
- package/layout/template/Transcript/design/organism/ResultGaugeCard.d.ts +6 -0
- package/layout/template/Transcript/design/organism/ResultGaugeCard.js +19 -0
- package/layout/template/Transcript/design/{Organism/BarCardCol.d.ts → organism/ScoreCard.d.ts} +1 -1
- package/layout/template/Transcript/design/organism/ScoreCard.js +11 -0
- package/layout/template/Transcript/index.d.ts +3 -0
- package/layout/template/Transcript/index.js +2 -0
- package/layout/template/home/layout/Footer.js +4 -3
- package/package.json +1 -1
- package/version.txt +1 -1
- package/layout/template/Transcript/design/Organism/BarCardCol.js +0 -30
- package/layout/template/Transcript/design/Organism/BarCardRow.js +0 -30
- package/layout/template/Transcript/design/atom/IdCard.d.ts +0 -12
- package/layout/template/Transcript/design/atom/IdCard.js +0 -74
- package/layout/template/Transcript/design/atom/ScriptStyle.d.ts +0 -0
- package/layout/template/Transcript/design/atom/ScriptStyle.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type Theme = "green" | "red";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { TranscriptProps } from "./Transcript";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
export declare const EXAM_TYPE: {
|
|
3
|
+
readonly REG: "REG";
|
|
4
|
+
readonly CMP: "CMP";
|
|
5
|
+
readonly IST: "IST";
|
|
6
|
+
readonly OLY: "OLY";
|
|
7
|
+
};
|
|
8
|
+
export type EXAM_TYPE = (typeof EXAM_TYPE)[keyof typeof EXAM_TYPE];
|
|
9
|
+
export declare function getStringfromType(ExamType: EXAM_TYPE): string;
|
|
4
10
|
declare const _default: import("react").ForwardRefExoticComponent<{
|
|
5
11
|
props: TranscriptProps;
|
|
6
12
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
13
|
export default _default;
|
|
8
|
-
export declare const LevelToStyleMap: Record<Level, {
|
|
9
|
-
name: string;
|
|
10
|
-
bgcolor: string;
|
|
11
|
-
textcolor: string;
|
|
12
|
-
}>;
|
|
@@ -1,14 +1,27 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
3
|
import { paperSize } from "../../../../style/size";
|
|
4
|
-
import { LineBreaks } from "../../../../text";
|
|
5
4
|
import { cn } from "../../../../util";
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
5
|
+
import IdCard from "./organism/IdCard";
|
|
6
|
+
import { BarCardRow } from "./organism/BarCardRow";
|
|
7
|
+
import ScoreCard from "./organism/ScoreCard";
|
|
8
|
+
import HonorCard from "./organism/HonorCard";
|
|
9
|
+
import ResultGaugeCard from "./organism/ResultGaugeCard";
|
|
10
|
+
import PerformanceCard from "./organism/PerformanceCard";
|
|
11
|
+
export const EXAM_TYPE = {
|
|
12
|
+
REG: "REG",
|
|
13
|
+
CMP: "CMP",
|
|
14
|
+
IST: "IST",
|
|
15
|
+
OLY: "OLY",
|
|
16
|
+
};
|
|
17
|
+
const examTypeMap = {
|
|
18
|
+
REG: "정기시험",
|
|
19
|
+
IST: "기관시험",
|
|
20
|
+
CMP: "경시대회",
|
|
21
|
+
};
|
|
22
|
+
export function getStringfromType(ExamType) {
|
|
23
|
+
return examTypeMap[ExamType] || "Unknown";
|
|
24
|
+
}
|
|
12
25
|
function TranscriptDesign({ props }, ref) {
|
|
13
26
|
const { info, result, data } = props;
|
|
14
27
|
const container = {
|
|
@@ -23,158 +36,6 @@ function TranscriptDesign({ props }, ref) {
|
|
|
23
36
|
spacings: "px-5 py-2",
|
|
24
37
|
backgrounds: "bg-gradient-to-r from-crimson-burgundy to-green-dark",
|
|
25
38
|
};
|
|
26
|
-
return (_jsxs("div", { ref: ref, className: cn(container), children: [_jsxs("div", { className: cn(headerBox), children: [_jsx("img", { src: "images/logos/logo-tosel-white.svg", alt: "", className: "h-10" }), _jsxs("div", { className: "text-white font-bold text-base", children: [getStringfromType(info.examType), " \uC131\uC801\uD45C"] })] }), _jsx(IdCard, { info: info }), _jsxs("div", { className: "flex flex-col gap-5 xs:flex-row mt-5 items-stretch", children: [_jsx(
|
|
39
|
+
return (_jsxs("div", { ref: ref, className: cn(container), children: [_jsxs("div", { className: cn(headerBox), children: [_jsx("img", { src: "images/logos/logo-tosel-white.svg", alt: "", className: "h-10" }), _jsxs("div", { className: "text-white font-bold text-base", children: [getStringfromType(info.examType), " \uC131\uC801\uD45C"] })] }), _jsx(IdCard, { info: info }), _jsxs("div", { className: "flex flex-col gap-5 xs:flex-row mt-5 items-stretch", children: [_jsx(ResultGaugeCard, { result: result, theme: "green" }), _jsx(HonorCard, { result: result })] }), _jsx(PerformanceCard, { data: data, info: info }), _jsx(ScoreCard, { data: data }), _jsx(BarCardRow, { data: data, theme: "green" })] }));
|
|
27
40
|
}
|
|
28
41
|
export default forwardRef(TranscriptDesign);
|
|
29
|
-
function ResultCard({ result }) {
|
|
30
|
-
const cardWrapper = {
|
|
31
|
-
displays: "flex flex-col self-auto flex-[2] md:flex-[1] overflow-hidden",
|
|
32
|
-
sizes: "w-full h-fit rounded-lg",
|
|
33
|
-
backgrounds: "bg-white shadow-main",
|
|
34
|
-
// animations: "duration-300 hover:scale-105 hover:shadow-green",
|
|
35
|
-
};
|
|
36
|
-
const cardTitle = {
|
|
37
|
-
display: "flex flex-row justify-center items-center",
|
|
38
|
-
sizes: "h-7 w-full",
|
|
39
|
-
bg: "bg-green-dark",
|
|
40
|
-
textStyles: "text-white font-medium text-sm",
|
|
41
|
-
};
|
|
42
|
-
return (_jsxs("div", { className: cn(cardWrapper, printBoxStyles), children: [_jsxs("div", { className: cn(cardTitle), children: [_jsx("div", { className: "w-full text-center h-full flex justify-center items-center", children: "\uCDE8\uB4DD \uC810\uC218" }), _jsx("div", { className: "w-0.5 h-7 bg-white" }), _jsx("div", { className: "w-full text-center h-full flex justify-center items-center", children: "\uC778\uC99D \uB4F1\uAE09" })] }), _jsxs("div", { className: "flex flex-row gap-10 p-5", children: [_jsx(CircularGauge, { score: result.score, maxScore: 100, isGrade: false }), _jsx(CircularGauge, { score: result.grade, maxScore: 9, isGrade: true })] })] }));
|
|
43
|
-
}
|
|
44
|
-
const CircularGauge = ({ score, maxScore, isGrade }) => {
|
|
45
|
-
const pieStyles = {
|
|
46
|
-
cx: "50%",
|
|
47
|
-
cy: "50%",
|
|
48
|
-
innerRadius: "70%",
|
|
49
|
-
outerRadius: "90%",
|
|
50
|
-
cornerRadius: 6,
|
|
51
|
-
dataKey: "value",
|
|
52
|
-
nameKey: "name",
|
|
53
|
-
};
|
|
54
|
-
const cellStyles = {
|
|
55
|
-
stroke: "rgba(255, 255, 255, 0)",
|
|
56
|
-
};
|
|
57
|
-
const scoreText = {
|
|
58
|
-
displays: "absolute flex justify-center items-center",
|
|
59
|
-
positions: "top-0 left-0",
|
|
60
|
-
sizes: "w-full h-full",
|
|
61
|
-
textStyles: "font-bold text-gray-medium text-2xl",
|
|
62
|
-
printOptions: "print:text-gray-dark",
|
|
63
|
-
};
|
|
64
|
-
const preparePieChartData = () => {
|
|
65
|
-
const mainScore = score;
|
|
66
|
-
const remainingScore = maxScore - mainScore;
|
|
67
|
-
if (isGrade) {
|
|
68
|
-
return [
|
|
69
|
-
{ name: "Score", value: remainingScore - 1 },
|
|
70
|
-
{ name: "Grade", value: mainScore - 1 },
|
|
71
|
-
];
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
74
|
-
return [
|
|
75
|
-
{ name: "Score", value: mainScore },
|
|
76
|
-
{ name: "Remaining", value: remainingScore },
|
|
77
|
-
];
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
return (_jsxs("div", { className: "w-full aspect-ratio-1/1 flex items-center justify-center relative", children: [_jsx("div", { className: "absolute top-0 left-0 w-full aspect-ratio-1/1", children: _jsx(ResponsiveContainer, { width: "100%", height: "100%", aspect: 1, children: _jsx(PieChart, { children: _jsx(Pie, { data: [{ name: "Background", value: 100 }], cx: "50%", cy: "50%", innerRadius: "70%", outerRadius: "90%", fill: "rgba(128, 128, 128, 0.2)" // 회색 배경 색상
|
|
81
|
-
, dataKey: "value", stroke: "rgb(255,255,255,0)", animationDuration: 0 }) }) }) }), _jsx("div", { className: "absolute top-0 left-0 w-full aspect-ratio-1/1 opacity-0 print:opacity-100", children: _jsx(ResponsiveContainer, { width: "100%", height: "100%", aspect: 1, children: _jsx(PieChart, { children: _jsxs(Pie, { data: preparePieChartData(), ...pieStyles, animationDuration: 0, children: [_jsx(Cell, { fill: "#105652", ...cellStyles, style: {
|
|
82
|
-
filter: "drop-shadow(0px 3px 5px rgba(16, 86, 82, 0.38))",
|
|
83
|
-
} }), _jsx(Cell, { fill: "rgba(255, 255, 255, 0)", ...cellStyles })] }) }) }) }), _jsx(ResponsiveContainer, { width: "100%", height: "100%", aspect: 1, children: _jsx(PieChart, { children: _jsxs(Pie, { data: preparePieChartData(), ...pieStyles, children: [_jsx(Cell, { fill: "#105652", ...cellStyles, style: {
|
|
84
|
-
filter: "drop-shadow(0px 3px 5px rgba(16, 86, 82, 0.38))",
|
|
85
|
-
} }), _jsx(Cell, { fill: "rgba(255, 255, 255, 0)", ...cellStyles })] }) }) }), _jsx("div", { className: cn(scoreText), children: score })] }));
|
|
86
|
-
};
|
|
87
|
-
function HonorCard({ result }) {
|
|
88
|
-
const cardWrapper = {
|
|
89
|
-
displays: "flex flex-col self-stretch flex-[1] relative",
|
|
90
|
-
sizes: "w-full rounded-lg overflow-hidden",
|
|
91
|
-
backgrounds: "bg-white shadow-main",
|
|
92
|
-
animations: "duration-300 hover:scale-105 hover:shadow-green",
|
|
93
|
-
};
|
|
94
|
-
const cardTitle = {
|
|
95
|
-
display: "flex flex-row justify-center items-center",
|
|
96
|
-
sizes: "h-7 shrink-0 w-full",
|
|
97
|
-
bg: "bg-green-light",
|
|
98
|
-
textStyles: "text-green-dark font-medium text-sm",
|
|
99
|
-
};
|
|
100
|
-
return (_jsxs("div", { className: cn(cardWrapper, printBoxStyles), onClick: () => (window.location.href = `https://www.tosel.org/HallofFame/main`), children: [_jsx("div", { className: cn(cardTitle), children: _jsx("div", { className: "w-full text-center h-fit", children: "\uBA85\uC608\uC758 \uC804\uB2F9" }) }), _jsxs("div", { className: "w-full h-full flex flex-row px-5 gap-x-5", children: [_jsxs("div", { className: "flex flex-[1] flex-col w-full justify-center items-center xs:hidden md:flex", children: [_jsx("div", { className: "text-gray-dark font-bold text-xl", children: "\uBA85\uC608\uC758 \uC804\uB2F9" }), _jsx("div", { className: "text-gray-medium font-medium text-sm", children: "Hall of Fame" })] }), _jsx("div", { className: "flex w-full flex-[1] py-4 xs:py-0", children: _jsx(SVG.HallofFame, { isHonor: result.isHonor }) })] }), _jsx("div", { className: "pb-3 px-5 text-center text-xs", children: result.isHonor
|
|
101
|
-
? "축하합니다! 명예의 전당에 등재되었습니다"
|
|
102
|
-
: "아쉽게도 명예의 전당에 오르지 못했습니다." })] }));
|
|
103
|
-
}
|
|
104
|
-
function PerformanceCard({ data, info, }) {
|
|
105
|
-
const cardWrapper = {
|
|
106
|
-
displays: "flex flex-col relative",
|
|
107
|
-
sizes: "w-full rounded-lg overflow-hidden",
|
|
108
|
-
backgrounds: "bg-white shadow-main",
|
|
109
|
-
sapcings: "mt-5",
|
|
110
|
-
};
|
|
111
|
-
const cardTitle = {
|
|
112
|
-
display: "flex flex-row justify-center items-center",
|
|
113
|
-
sizes: "h-7 shrink-0 w-full",
|
|
114
|
-
bg: "bg-green-light",
|
|
115
|
-
textStyles: "text-green-dark font-medium text-sm",
|
|
116
|
-
};
|
|
117
|
-
const scriptStyling = {
|
|
118
|
-
display: "justify-start items-start",
|
|
119
|
-
sizes: "w-full h-fit",
|
|
120
|
-
textStyles: "text-xs font-medium text-black break-keep",
|
|
121
|
-
};
|
|
122
|
-
return (_jsxs("div", { className: cn(cardWrapper, printBoxStyles), children: [_jsx("div", { className: cn(cardTitle), children: _jsx("div", { className: "w-full text-center h-fit", children: "Performance Evaluation" }) }), _jsxs("div", { className: "w-full h-full flex flex-col gap-5 p-5", children: [_jsxs("div", { className: "flex flex-col flex-[3]", children: [_jsx(LineBreaks, { texts: data.script.performanceEvaluation, className: cn(scriptStyling) }), _jsx("div", { className: cn(scriptStyling, "text-green-dark"), children: "\uB098\uC758 \uC804\uAD6D \uC9C0\uD45C\uAC00 \uAD81\uAE08\uD558\uB2E4\uBA74? QR\uB85C \uC790\uC138\uD788 \uC54C\uC544\uBCF4\uC138\uC694!" })] }), _jsx("div", { className: "w-full flex flex-col flex-[2] justify-center items-center", children: _jsx(LevelRow, { transcriptLevel: info.level }) })] })] }));
|
|
123
|
-
}
|
|
124
|
-
function LevelRow({ transcriptLevel }) {
|
|
125
|
-
const levels = ["CC", "PS", "ST", "BA", "JR", "HJ", "AD"];
|
|
126
|
-
const isSM = useResponsive("sm");
|
|
127
|
-
return (_jsx("div", { className: "flex flex-row w-full h-fit justify-center items-center", children: levels.map((level) => {
|
|
128
|
-
const { name, bgcolor, textcolor } = LevelToStyleMap[level];
|
|
129
|
-
const isHighlighted = level === transcriptLevel;
|
|
130
|
-
return (_jsx("div", { className: `px-2 py-1 text-xs text-center font-medium $ ${isHighlighted
|
|
131
|
-
? "bg-green-dark text-white w-fit shrink-0 rounded-md"
|
|
132
|
-
: "w-full text-green-dark/70"}`, children: isSM ? name : isHighlighted ? name : level }, level));
|
|
133
|
-
}) }));
|
|
134
|
-
}
|
|
135
|
-
function ScoreCard({ data }) {
|
|
136
|
-
const cellAnimation = {
|
|
137
|
-
animations: "hover:bg-green-light/50 hover:text-green-dark duration-300",
|
|
138
|
-
};
|
|
139
|
-
return (_jsx("div", { className: "overflow-auto w-full scrollbar-hidden rounded-lg mt-5 print:border print:border-gray-medium/70 cursor-default shadow-main print:shadow-none", children: _jsxs("div", { className: "min-w-[172mm] w-full", children: [_jsxs("div", { className: "flex bg-gradient-to-r from-green-dark to-crimson-burgundy text-white font-medium text-sm", children: [_jsx("div", { className: "text-center print:static sticky left-0 bg-green-dark p-2 flex-[3] font-black", children: "\uC131\uC801\uD45C" }), _jsx("div", { className: "p-2 flex-[2] text-center", children: "\uCD1D\uC810" }), _jsx("div", { className: "p-2 flex-[2] text-center", children: "\uB0B4 \uC810\uC218" }), _jsx("div", { className: "p-2 flex-[3] text-center", children: "\uC804\uAD6D\uD3C9\uADE0" }), _jsx("div", { className: "p-2 flex-[3] text-center", children: "\uC9C0\uC5ED\uD3C9\uADE0" }), _jsx("div", { className: "p-2 flex-[3] text-center", children: "\uB3D9\uC77C\uD559\uB144" }), _jsx("div", { className: "p-2 flex-[3] text-center", children: "10% \uD3C9\uADE0" }), _jsx("div", { className: "p-2 flex-[3] text-center", children: "30% \uD3C9\uADE0" })] }), _jsxs("div", { className: "flex bg-white/60 font-medium text-sm text-gray-medium ", children: [_jsx("div", { className: "sticky left-0 bg-white/90 p-2 flex-[3] text-center text-gray-dark border-green-dark border-r-1", children: "Section1" }), _jsx("div", { className: cn("p-2 flex-[2] text-center", cellAnimation), children: data.analysis.total.section1.toFixed(1) }), _jsx("div", { className: "p-2 flex-[2] text-center text-green-dark font-bold bg-green-light", children: data.analysis.user.section1.toFixed(1) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: data.analysis.nationalAverage.section1.toFixed(2) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: data.analysis.localAverage.section1.toFixed(2) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: data.analysis.ageAverage.section1.toFixed(2) }), _jsx("div", { className: "p-2 flex-[3] text-center border-green-dark border-l-1" }), _jsx("div", { className: "p-2 flex-[3] text-center" })] }), _jsxs("div", { className: "flex bg-white/60 font-medium text-sm text-gray-medium ", children: [_jsx("div", { className: "sticky left-0 bg-white/90 p-2 flex-[3] text-center text-gray-dark border-green-dark border-r-1", children: "Section2" }), _jsx("div", { className: cn("p-2 flex-[2] text-center", cellAnimation), children: data.analysis.total.section2.toFixed(1) }), _jsx("div", { className: "p-2 flex-[2] text-center text-green-dark font-bold bg-green-light", children: data.analysis.user.section2.toFixed(1) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: data.analysis.nationalAverage.section2.toFixed(2) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: data.analysis.localAverage.section2.toFixed(2) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: data.analysis.ageAverage.section2.toFixed(2) }), _jsx("div", { className: "p-2 flex-[3] text-center border-green-dark border-l-1 font-bold", children: data.analysis["10percentageAverage"].toFixed(2) }), _jsx("div", { className: "p-2 flex-[3] text-center font-bold", children: data.analysis["30percentageAverage"].toFixed(2) })] }), _jsxs("div", { className: "flex bg-white/60 font-medium text-sm text-gray-medium ", children: [_jsx("div", { className: "sticky left-0 bg-white/90 p-2 flex-[3] text-center text-gray-dark border-green-dark border-r-1", children: "total" }), _jsx("div", { className: cn("p-2 flex-[2] text-center", cellAnimation), children: (data.analysis.total.section1 + data.analysis.total.section2).toFixed(1) }), _jsx("div", { className: "p-2 flex-[2] text-center text-green-dark font-bold bg-green-light", children: (data.analysis.user.section1 + data.analysis.user.section2).toFixed(1) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: (data.analysis.nationalAverage.section1 +
|
|
140
|
-
data.analysis.nationalAverage.section2).toFixed(2) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: (data.analysis.localAverage.section1 +
|
|
141
|
-
data.analysis.localAverage.section2).toFixed(2) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: (data.analysis.ageAverage.section1 +
|
|
142
|
-
data.analysis.ageAverage.section2).toFixed(2) }), _jsx("div", { className: "p-2 flex-[3] text-center border-green-dark border-l-1" }), _jsx("div", { className: "p-2 flex-[3] text-center " })] })] }) }));
|
|
143
|
-
}
|
|
144
|
-
export const LevelToStyleMap = {
|
|
145
|
-
CC: {
|
|
146
|
-
name: "Cocoon",
|
|
147
|
-
bgcolor: "bg-co-green-light",
|
|
148
|
-
textcolor: "text-co-green",
|
|
149
|
-
},
|
|
150
|
-
PS: {
|
|
151
|
-
name: "Pre-Starter",
|
|
152
|
-
bgcolor: "bg-ps-pink-light",
|
|
153
|
-
textcolor: "text-ps-pink",
|
|
154
|
-
},
|
|
155
|
-
ST: {
|
|
156
|
-
name: "Starter",
|
|
157
|
-
bgcolor: "bg-st-orange-light",
|
|
158
|
-
textcolor: "text-st-orange",
|
|
159
|
-
},
|
|
160
|
-
BA: {
|
|
161
|
-
name: "Basic",
|
|
162
|
-
bgcolor: "bg-ba-yellow-light",
|
|
163
|
-
textcolor: "text-ba-yellow",
|
|
164
|
-
},
|
|
165
|
-
JR: {
|
|
166
|
-
name: "Junior",
|
|
167
|
-
bgcolor: "bg-jr-blue-light",
|
|
168
|
-
textcolor: "text-jr-blue",
|
|
169
|
-
},
|
|
170
|
-
HJ: {
|
|
171
|
-
name: "High Junior",
|
|
172
|
-
bgcolor: "bg-hj-blue-light",
|
|
173
|
-
textcolor: "text-hj-blue",
|
|
174
|
-
},
|
|
175
|
-
AD: {
|
|
176
|
-
name: "Advanced",
|
|
177
|
-
bgcolor: "bg-gray-light",
|
|
178
|
-
textcolor: "text-gray-dark",
|
|
179
|
-
},
|
|
180
|
-
};
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { TranscriptProps } from "./Transcript";
|
|
2
|
+
declare const _default: import("react").ForwardRefExoticComponent<{
|
|
3
|
+
props: TranscriptProps;
|
|
4
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
|
+
export default _default;
|
|
@@ -1,10 +1,23 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
2
3
|
import { paperSize } from "../../../../style/size";
|
|
3
4
|
import { cn } from "../../../../util";
|
|
4
|
-
|
|
5
|
+
import IdCard from "./organism/IdCard";
|
|
6
|
+
import { BarCardCol } from "./organism/BarCardCol";
|
|
7
|
+
function TranscriptDesign({ props }, ref) {
|
|
8
|
+
const { info, result, data } = props;
|
|
5
9
|
const container = {
|
|
6
|
-
|
|
7
|
-
backgrounds: "bg-white",
|
|
10
|
+
printSize: paperSize.a4,
|
|
11
|
+
backgrounds: "print:bg-white",
|
|
12
|
+
sizes: "w-full max-w-[210mm]",
|
|
13
|
+
textStyles: "break-keep",
|
|
8
14
|
};
|
|
9
|
-
|
|
15
|
+
const headerBox = {
|
|
16
|
+
display: "flex flex-row flex-wrap justify-between items-center",
|
|
17
|
+
sizes: "w-full h-fit rounded-md",
|
|
18
|
+
spacings: "px-5 py-2",
|
|
19
|
+
backgrounds: "bg-gradient-to-r from-crimson-burgundy to-green-dark",
|
|
20
|
+
};
|
|
21
|
+
return (_jsxs("div", { ref: ref, className: cn(container), children: [_jsxs("div", { className: cn(headerBox), children: [_jsx("img", { src: "https://resource.tosel.co.kr/images/header-logo2.png", alt: "\uD1A0\uC140 \uB85C\uACE0", className: "h-10 py-1" }), _jsx("div", { className: "text-white font-bold text-base", children: "Official Score Report" })] }), _jsx(IdCard, { info: info }), _jsx(BarCardCol, { data: data, theme: "red" })] }));
|
|
10
22
|
}
|
|
23
|
+
export default forwardRef(TranscriptDesign);
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from "../../../../../util";
|
|
3
|
-
export function CardTitle({ title }) {
|
|
3
|
+
export default function CardTitle({ title, theme, }) {
|
|
4
4
|
const cardTitle = {
|
|
5
5
|
display: "flex flex-row justify-center items-center",
|
|
6
6
|
sizes: "h-7 shrink-0 w-full",
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
theme: theme == "green"
|
|
8
|
+
? "text-green-dark bg-green-light"
|
|
9
|
+
: "text-crimson-burgundy bg-crimson-burgundy/10",
|
|
10
|
+
textStyles: "font-medium text-sm",
|
|
9
11
|
};
|
|
10
12
|
return _jsx("div", { className: cn(cardTitle), children: title });
|
|
11
13
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export const LevelToStyleMap = {
|
|
2
|
+
CC: {
|
|
3
|
+
name: "Cocoon",
|
|
4
|
+
bgcolor: "bg-co-green-light",
|
|
5
|
+
textcolor: "text-co-green",
|
|
6
|
+
},
|
|
7
|
+
PS: {
|
|
8
|
+
name: "Pre-Starter",
|
|
9
|
+
bgcolor: "bg-ps-pink-light",
|
|
10
|
+
textcolor: "text-ps-pink",
|
|
11
|
+
},
|
|
12
|
+
ST: {
|
|
13
|
+
name: "Starter",
|
|
14
|
+
bgcolor: "bg-st-orange-light",
|
|
15
|
+
textcolor: "text-st-orange",
|
|
16
|
+
},
|
|
17
|
+
BA: {
|
|
18
|
+
name: "Basic",
|
|
19
|
+
bgcolor: "bg-ba-yellow-light",
|
|
20
|
+
textcolor: "text-ba-yellow",
|
|
21
|
+
},
|
|
22
|
+
JR: {
|
|
23
|
+
name: "Junior",
|
|
24
|
+
bgcolor: "bg-jr-blue-light",
|
|
25
|
+
textcolor: "text-jr-blue",
|
|
26
|
+
},
|
|
27
|
+
HJ: {
|
|
28
|
+
name: "High Junior",
|
|
29
|
+
bgcolor: "bg-hj-blue-light",
|
|
30
|
+
textcolor: "text-hj-blue",
|
|
31
|
+
},
|
|
32
|
+
AD: {
|
|
33
|
+
name: "Advanced",
|
|
34
|
+
bgcolor: "bg-crimson-burgundy/10",
|
|
35
|
+
textcolor: "text-crimson-burgundy",
|
|
36
|
+
},
|
|
37
|
+
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { Theme } from "../../Theme";
|
|
1
2
|
interface SectionBarProps {
|
|
2
3
|
title: string;
|
|
3
4
|
score: number;
|
|
4
5
|
subScore?: number;
|
|
5
6
|
total: number;
|
|
6
7
|
scale?: number;
|
|
8
|
+
theme: Theme;
|
|
7
9
|
}
|
|
8
|
-
export declare function BarGraph({ score, subScore, total, title, scale, }: SectionBarProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function BarGraph({ score, subScore, total, title, scale, theme, }: SectionBarProps): import("react/jsx-runtime").JSX.Element;
|
|
9
11
|
export {};
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useEffect, useState } from "react";
|
|
3
3
|
import { usePageLoaded } from "../../../../../hook";
|
|
4
4
|
import { cn } from "../../../../../util";
|
|
5
|
-
export function BarGraph({ score, subScore, total, title, scale, }) {
|
|
5
|
+
export function BarGraph({ score, subScore, total, title, scale, theme, }) {
|
|
6
6
|
const isLoaded = usePageLoaded();
|
|
7
7
|
const [currentWidth, setCurrentWidth] = useState(0);
|
|
8
8
|
const widthPercentage = (score / total) * 100;
|
|
@@ -42,13 +42,23 @@ export function BarGraph({ score, subScore, total, title, scale, }) {
|
|
|
42
42
|
const scoreTag = {
|
|
43
43
|
sizes: "h-5 w-10 rounded-md",
|
|
44
44
|
position: "-translate-x-14 -translate-y-2",
|
|
45
|
-
backgrounds: "bg-white border-2
|
|
46
|
-
textStyles: "font-bold text-xs text-center
|
|
45
|
+
backgrounds: "bg-white border-2",
|
|
46
|
+
textStyles: "font-bold text-xs text-center",
|
|
47
|
+
colors: theme == "green"
|
|
48
|
+
? "text-green-dark border-green-dark"
|
|
49
|
+
: "text-crimson-burgundy border-crimson-burgundy",
|
|
47
50
|
};
|
|
48
51
|
const subScoreTag = {
|
|
49
52
|
sizes: "h-5 w-fit rounded-md flex flex-row gap-2",
|
|
50
53
|
position: "-translate-x-30 translate-y-6",
|
|
51
54
|
};
|
|
55
|
+
const graphTitle = {
|
|
56
|
+
displays: "absolute",
|
|
57
|
+
position: "-translate-y-12",
|
|
58
|
+
sizes: "w-full h-fit",
|
|
59
|
+
textSytls: "font-bold text-sm text-center",
|
|
60
|
+
colors: theme == "green" ? "text-green-dark" : "text-crimson-burgundy",
|
|
61
|
+
};
|
|
52
62
|
// 눈금 배열 생성
|
|
53
63
|
const scaleTicks = scale
|
|
54
64
|
? Array.from({ length: total / scale + 1 }, (_, index) => index * scale)
|
|
@@ -57,9 +67,9 @@ export function BarGraph({ score, subScore, total, title, scale, }) {
|
|
|
57
67
|
width: `${widthPercentage}%`,
|
|
58
68
|
} }) }), _jsx("div", { className: cn(barFill, "opacity-100 print:opacity-0"), style: {
|
|
59
69
|
width: `${currentWidth}%`,
|
|
60
|
-
} }), _jsx("div", { className:
|
|
70
|
+
} }), _jsx("div", { className: cn(graphTitle), children: title })] }), _jsx("div", { className: "absolute flex w-full h-full justify-between items-center p-5 text-sm text-gray-medium -translate-y-5", children: scaleTicks && scaleTicks.map((tick) => _jsx("div", { children: tick }, tick)) }), _jsx("div", { className: "absolute flex w-full h-full justify-start items-center", style: {
|
|
61
71
|
transform: `translateX(${widthPercentage}%)`,
|
|
62
72
|
}, children: _jsx("div", { className: cn(scoreTag), children: score.toFixed(1) }) }), subScore && (_jsx("div", { className: "absolute flex w-full h-full justify-start items-center", style: {
|
|
63
73
|
transform: `translateX(${subScorePercentage}%)`,
|
|
64
|
-
}, children: _jsxs("div", { className: cn(subScoreTag), children: [_jsx("div", { className: "font-medium text-xs text-center text-gray-dark", children: "\uC804\uCCB4\uD3C9\uADE0:" }), _jsx("div", { className: "font-medium text-xs text-center text-gray-dark", children: subScore.toFixed(2) }), _jsx("div", { className: "text-green-dark", children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", className: "size-4", children: _jsx("path", { fillRule: "evenodd", d: "M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm.53 5.47a.75.75 0 0 0-1.06 0l-3 3a.75.75 0 1 0 1.06 1.06l1.72-1.72v5.69a.75.75 0 0 0 1.5 0v-5.69l1.72 1.72a.75.75 0 1 0 1.06-1.06l-3-3Z", clipRule: "evenodd" }) }) })] }) }))] }) }));
|
|
74
|
+
}, children: _jsxs("div", { className: cn(subScoreTag), children: [_jsx("div", { className: "font-medium text-xs text-center text-gray-dark", children: "\uC804\uCCB4\uD3C9\uADE0:" }), _jsx("div", { className: "font-medium text-xs text-center text-gray-dark", children: subScore.toFixed(2) }), _jsx("div", { className: theme == "green" ? "text-green-dark" : "text-crimson-burgundy", children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", className: "size-4", children: _jsx("path", { fillRule: "evenodd", d: "M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm.53 5.47a.75.75 0 0 0-1.06 0l-3 3a.75.75 0 1 0 1.06 1.06l1.72-1.72v5.69a.75.75 0 0 0 1.5 0v-5.69l1.72 1.72a.75.75 0 1 0 1.06-1.06l-3-3Z", clipRule: "evenodd" }) }) })] }) }))] }) }));
|
|
65
75
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Theme } from "../../Theme";
|
|
2
|
+
interface GaugeProps {
|
|
3
|
+
score: number;
|
|
4
|
+
maxScore: number;
|
|
5
|
+
isGrade?: boolean;
|
|
6
|
+
theme: Theme;
|
|
7
|
+
}
|
|
8
|
+
export declare const CircularGauge: ({ score, maxScore, isGrade, theme, }: GaugeProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Cell, Pie, PieChart, ResponsiveContainer } from "recharts";
|
|
3
|
+
import { cn } from "../../../../../util";
|
|
4
|
+
export const CircularGauge = ({ score, maxScore, isGrade, theme, }) => {
|
|
5
|
+
const pieStyles = {
|
|
6
|
+
cx: "50%",
|
|
7
|
+
cy: "50%",
|
|
8
|
+
innerRadius: "70%",
|
|
9
|
+
outerRadius: "90%",
|
|
10
|
+
cornerRadius: 6,
|
|
11
|
+
dataKey: "value",
|
|
12
|
+
nameKey: "name",
|
|
13
|
+
};
|
|
14
|
+
const cellStyles = {
|
|
15
|
+
stroke: "rgba(255, 255, 255, 0)",
|
|
16
|
+
};
|
|
17
|
+
const scoreText = {
|
|
18
|
+
displays: "absolute flex justify-center items-center",
|
|
19
|
+
positions: "top-0 left-0",
|
|
20
|
+
sizes: "w-full h-full",
|
|
21
|
+
textStyles: "font-bold text-gray-medium text-2xl",
|
|
22
|
+
printOptions: "print:text-gray-dark",
|
|
23
|
+
};
|
|
24
|
+
const preparePieChartData = () => {
|
|
25
|
+
const mainScore = score;
|
|
26
|
+
const remainingScore = maxScore - mainScore;
|
|
27
|
+
if (isGrade) {
|
|
28
|
+
return [
|
|
29
|
+
{ name: "Score", value: remainingScore - 1 },
|
|
30
|
+
{ name: "Grade", value: mainScore - 1 },
|
|
31
|
+
];
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
return [
|
|
35
|
+
{ name: "Score", value: mainScore },
|
|
36
|
+
{ name: "Remaining", value: remainingScore },
|
|
37
|
+
];
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
return (_jsxs("div", { className: "w-full aspect-ratio-1/1 flex items-center justify-center relative", children: [_jsx("div", { className: "absolute top-0 left-0 w-full aspect-ratio-1/1", children: _jsx(ResponsiveContainer, { width: "100%", height: "100%", aspect: 1, children: _jsx(PieChart, { children: _jsx(Pie, { data: [{ name: "Background", value: 100 }], cx: "50%", cy: "50%", innerRadius: "70%", outerRadius: "90%", fill: "rgba(128, 128, 128, 0.2)" // 회색 배경 색상
|
|
41
|
+
, dataKey: "value", stroke: "rgb(255,255,255,0)", animationDuration: 0 }) }) }) }), _jsx("div", { className: "absolute top-0 left-0 w-full aspect-ratio-1/1 opacity-0 print:opacity-100", children: _jsx(ResponsiveContainer, { width: "100%", height: "100%", aspect: 1, children: _jsx(PieChart, { children: _jsxs(Pie, { data: preparePieChartData(), ...pieStyles, animationDuration: 0, children: [_jsx(Cell, { fill: theme == "green" ? "#105652" : "#910023", ...cellStyles, style: {
|
|
42
|
+
filter: theme == "green"
|
|
43
|
+
? "drop-shadow(0px 3px 5px rgba(16, 86, 82, 0.38))"
|
|
44
|
+
: "drop-shadow(0px 3px 5px rgba(145, 0, 35, 0.38))",
|
|
45
|
+
} }), _jsx(Cell, { fill: "rgba(255, 255, 255, 0)", ...cellStyles })] }) }) }) }), _jsx(ResponsiveContainer, { width: "100%", height: "100%", aspect: 1, children: _jsx(PieChart, { children: _jsxs(Pie, { data: preparePieChartData(), ...pieStyles, children: [_jsx(Cell, { fill: theme == "green" ? "#105652" : "#910023", ...cellStyles, style: {
|
|
46
|
+
filter: theme == "green"
|
|
47
|
+
? "drop-shadow(0px 3px 5px rgba(16, 86, 82, 0.38))"
|
|
48
|
+
: "drop-shadow(0px 3px 5px rgba(145, 0, 35, 0.38))",
|
|
49
|
+
} }), _jsx(Cell, { fill: "rgba(255, 255, 255, 0)", ...cellStyles })] }) }) }), _jsx("div", { className: cn(scoreText), children: score })] }));
|
|
50
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useResponsive } from "../../../../../hook";
|
|
3
|
+
import { LevelToStyleMap } from "../atom/LevelToStyleMap";
|
|
4
|
+
export default function LevelIndex({ transcriptLevel, }) {
|
|
5
|
+
const levels = ["CC", "PS", "ST", "BA", "JR", "HJ", "AD"];
|
|
6
|
+
const isSM = useResponsive("sm");
|
|
7
|
+
return (_jsx("div", { className: "flex flex-row w-full h-fit justify-center items-center", children: levels.map((level) => {
|
|
8
|
+
const { name, bgcolor, textcolor } = LevelToStyleMap[level];
|
|
9
|
+
const isHighlighted = level === transcriptLevel;
|
|
10
|
+
return (_jsx("div", { className: `px-2 py-1 text-xs text-center font-medium $ ${isHighlighted
|
|
11
|
+
? "bg-green-dark text-white w-fit shrink-0 rounded-md"
|
|
12
|
+
: "w-full text-green-dark/70"}`, children: isSM ? name : isHighlighted ? name : level }, level));
|
|
13
|
+
}) }));
|
|
14
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../../../../util";
|
|
3
|
+
import CardTitle from "../atom/CardTitle";
|
|
4
|
+
import { printBoxStyles } from "../atom/PrintBoxStyles";
|
|
5
|
+
import { BarGraph } from "../molecule/BarGraph";
|
|
6
|
+
export function BarCardCol({ data, theme, }) {
|
|
7
|
+
const cardWrapper = {
|
|
8
|
+
displays: "flex flex-col relative",
|
|
9
|
+
sizes: "w-full rounded-lg overflow-hidden",
|
|
10
|
+
backgrounds: "bg-white shadow-main",
|
|
11
|
+
sapcings: "mt-5",
|
|
12
|
+
};
|
|
13
|
+
const SectionWrapper = {
|
|
14
|
+
display: "flex flex-col items-center justify-center",
|
|
15
|
+
sizes: "h-full w-full",
|
|
16
|
+
};
|
|
17
|
+
const ScriptStyles = {
|
|
18
|
+
displays: "flex justify-center items-center align-center",
|
|
19
|
+
spacings: "p-5",
|
|
20
|
+
sizes: "w-full h-full",
|
|
21
|
+
textStyles: "text-sm break-keep",
|
|
22
|
+
};
|
|
23
|
+
return (_jsxs("div", { className: cn(cardWrapper, printBoxStyles), children: [_jsx(CardTitle, { title: "Grade and Average Score", theme: theme }), _jsxs("div", { className: "flex sm:flex-row flex-col sm:mt-0 mt-5", children: [_jsxs("div", { className: cn(SectionWrapper), children: [_jsx(BarGraph, { title: "section1", score: data.analysis.user.section1, total: 50, subScore: data.analysis.nationalAverage.section1, scale: 10, theme: theme }), _jsx("div", { className: cn(ScriptStyles), children: data.script.section1 })] }), _jsxs("div", { className: cn(SectionWrapper), children: [_jsx(BarGraph, { title: "section2", score: data.analysis.user.section2, total: 50, subScore: data.analysis.nationalAverage.section2, scale: 10, theme: theme }), _jsx("div", { className: cn(ScriptStyles), children: data.script.section2 })] })] })] }));
|
|
24
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../../../../util";
|
|
3
|
+
import CardTitle from "../atom/CardTitle";
|
|
4
|
+
import { printBoxStyles } from "../atom/PrintBoxStyles";
|
|
5
|
+
import { BarGraph } from "../molecule/BarGraph";
|
|
6
|
+
export function BarCardRow({ data, theme, }) {
|
|
7
|
+
const cardWrapper = {
|
|
8
|
+
displays: "flex flex-col relative",
|
|
9
|
+
sizes: "w-full rounded-lg overflow-hidden",
|
|
10
|
+
backgrounds: "bg-white shadow-main",
|
|
11
|
+
sapcings: "mt-5",
|
|
12
|
+
};
|
|
13
|
+
const SectionWrapper = {
|
|
14
|
+
display: "flex sm:flex-row flex-col items-center justify-center",
|
|
15
|
+
sizes: "h-full w-full",
|
|
16
|
+
};
|
|
17
|
+
const ScriptStyles = {
|
|
18
|
+
displays: "flex justify-center items-center align-center",
|
|
19
|
+
spacings: "p-5",
|
|
20
|
+
sizes: "w-full h-full",
|
|
21
|
+
textStyles: "text-sm break-keep",
|
|
22
|
+
};
|
|
23
|
+
return (_jsxs("div", { className: cn(cardWrapper, printBoxStyles), children: [_jsx(CardTitle, { title: "Grade and Average Score", theme: theme }), _jsxs("div", { className: "flex flex-col sm:mt-0 mt-5", children: [_jsxs("div", { className: cn(SectionWrapper), children: [_jsx(BarGraph, { title: "section1", score: data.analysis.user.section1, total: 50, subScore: data.analysis.nationalAverage.section1, scale: 10, theme: theme }), _jsx("div", { className: cn(ScriptStyles), children: data.script.section1 })] }), _jsxs("div", { className: cn(SectionWrapper), children: [_jsx(BarGraph, { title: "section2", score: data.analysis.user.section2, total: 50, subScore: data.analysis.nationalAverage.section2, scale: 10, theme: theme }), _jsx("div", { className: cn(ScriptStyles), children: data.script.section2 })] })] })] }));
|
|
24
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import SVG from "../../../../../asset/SVG";
|
|
3
|
+
import { cn } from "../../../../../util";
|
|
4
|
+
import { printBoxStyles } from "../atom/PrintBoxStyles";
|
|
5
|
+
export default function HonorCard({ result, }) {
|
|
6
|
+
const cardWrapper = {
|
|
7
|
+
displays: "flex flex-col self-stretch flex-[1] relative",
|
|
8
|
+
sizes: "w-full rounded-lg overflow-hidden",
|
|
9
|
+
backgrounds: "bg-white shadow-main",
|
|
10
|
+
animations: "duration-300 hover:scale-105 hover:shadow-green",
|
|
11
|
+
};
|
|
12
|
+
const cardTitle = {
|
|
13
|
+
display: "flex flex-row justify-center items-center",
|
|
14
|
+
sizes: "h-7 shrink-0 w-full",
|
|
15
|
+
bg: "bg-green-light",
|
|
16
|
+
textStyles: "text-green-dark font-medium text-sm",
|
|
17
|
+
};
|
|
18
|
+
return (_jsxs("div", { className: cn(cardWrapper, printBoxStyles), onClick: () => (window.location.href = `https://www.tosel.org/HallofFame/main`), children: [_jsx("div", { className: cn(cardTitle), children: _jsx("div", { className: "w-full text-center h-fit", children: "\uBA85\uC608\uC758 \uC804\uB2F9" }) }), _jsxs("div", { className: "w-full h-full flex flex-row px-5 gap-x-5", children: [_jsxs("div", { className: "flex flex-[1] flex-col w-full justify-center items-center xs:hidden md:flex", children: [_jsx("div", { className: "text-gray-dark font-bold text-xl", children: "\uBA85\uC608\uC758 \uC804\uB2F9" }), _jsx("div", { className: "text-gray-medium font-medium text-sm", children: "Hall of Fame" })] }), _jsx("div", { className: "flex w-full flex-[1] py-4 xs:py-0", children: _jsx(SVG.HallofFame, { isHonor: result.isHonor }) })] }), _jsx("div", { className: "pb-3 px-5 text-center text-xs", children: result.isHonor
|
|
19
|
+
? "축하합니다! 명예의 전당에 등재되었습니다"
|
|
20
|
+
: "아쉽게도 명예의 전당에 오르지 못했습니다." })] }));
|
|
21
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { useResponsive } from "../../../../../hook";
|
|
4
|
+
import { cn, copyToClipboard } from "../../../../../util";
|
|
5
|
+
import QRCode from "react-qr-code";
|
|
6
|
+
import { GetStyleFromLevel } from "../atom/GetStyleFromLevel";
|
|
7
|
+
export default function IdCard({ info }) {
|
|
8
|
+
const [isExpanded, setIsExpanded] = useState(false);
|
|
9
|
+
const togglecard = () => setIsExpanded(!isExpanded);
|
|
10
|
+
//반응형 info 카드 height 문제로 눌러서 자세히 보기 차후 구현 예정
|
|
11
|
+
const isXS = useResponsive("xs");
|
|
12
|
+
const cardWrapper = {
|
|
13
|
+
displays: "flex flex-col self-auto overflow-hidden",
|
|
14
|
+
sizes: "w-full rounded-lg h-fit",
|
|
15
|
+
backgrounds: "bg-white shadow-main",
|
|
16
|
+
spacings: "p-3",
|
|
17
|
+
printOptions: "print:bg-white print:shadow-none",
|
|
18
|
+
};
|
|
19
|
+
const imgBox = {
|
|
20
|
+
displays: "relative shrink-0 overflow-hidden",
|
|
21
|
+
sizes: "h-30 aspect-7/9 rounded-lg",
|
|
22
|
+
backgrounds: info.imgSrc ?? "bg-jr-blue-light",
|
|
23
|
+
outlines: "border-2 border-slate-200",
|
|
24
|
+
};
|
|
25
|
+
const qrBox = {
|
|
26
|
+
displays: "shrink-0 hidden sm:block relative overflow-hidden",
|
|
27
|
+
sizes: "h-30 p-2 aspect-square rounded-lg",
|
|
28
|
+
textStyles: "text-jr-blue",
|
|
29
|
+
backgrounds: "print:border-2 print:border-green-dark",
|
|
30
|
+
groupAction: info.qrSrc && "group duration-300 hover:scale-110 bg-white",
|
|
31
|
+
};
|
|
32
|
+
const copyButtonWrapper = {
|
|
33
|
+
display: "absolute flex justify-center items-center",
|
|
34
|
+
positions: "top-0 left-0",
|
|
35
|
+
sizes: "h-full w-full backdrop-blur-sm",
|
|
36
|
+
graphics: "opacity-0 bg-white/80 ",
|
|
37
|
+
animations: "duration-300 group-hover:opacity-100",
|
|
38
|
+
};
|
|
39
|
+
const copyButton = {
|
|
40
|
+
displays: "flex justify-center items-center",
|
|
41
|
+
sizes: "w-20 h-8 rounded-lg",
|
|
42
|
+
colors: "bg-green-light border border-green-dark",
|
|
43
|
+
textStyles: "text-xs text-green-dark font-medium text-center",
|
|
44
|
+
animations: "hover:bg-green-dark hover:text-white duration-300 cursor-pointer",
|
|
45
|
+
};
|
|
46
|
+
const levelTag = {
|
|
47
|
+
display: "flex justify-center items-center",
|
|
48
|
+
textStyles: "text-center",
|
|
49
|
+
variableStyle: `text-center text-xs font-bold ${GetStyleFromLevel(info.level, "textcolor")}`,
|
|
50
|
+
backgrounds: GetStyleFromLevel(info.level, "bgcolor"),
|
|
51
|
+
sizes: isXS
|
|
52
|
+
? "rounded-md w-fit h-fit px-2 py-1"
|
|
53
|
+
: "rounded-md w-full h-full",
|
|
54
|
+
printOptions: "print:w-fit print:h-fit print:px-2 print:py-1",
|
|
55
|
+
};
|
|
56
|
+
return (_jsxs("div", { className: "flex flex-row w-full h-fit mt-5 gap-5", children: [_jsxs("div", { className: cn(cardWrapper), children: [_jsxs("div", { className: "flex flex-row justify-between items-center pb-1 w-full h-fit border-b-2 border-green-dark", children: [_jsxs("div", { className: "flex flex-col", children: [_jsxs("div", { className: "flex flex-[3] text-sm truncate font-bold text-green-dark", children: [info.name, " ", info.nickname && _jsxs("span", { children: [" \u00A0/ ", info.nickname] })] }), _jsx("div", { className: "flex flex-[1] text-sm", children: info.birthday })] }), _jsx("div", { className: "w-fit h-full xs:block hidden", children: _jsx("div", { className: cn(levelTag), children: GetStyleFromLevel(info.level, "name") }) })] }), _jsxs("div", { className: "flex flex-col xs:flex-row w-full h-fit mt-2", children: [_jsxs("div", { className: "flex flex-[3] text-sm truncate", children: [_jsx("div", { className: "flex flex-[2] text-green-dark font-bold", children: "\uC218\uD5D8\uBC88\uD638:" }), _jsx("div", { className: "flex flex-[3]", children: info.code })] }), _jsxs("div", { className: "flex flex-[3] text-sm truncate", children: [_jsx("div", { className: "flex flex-[2] text-green-dark font-bold", children: "\uC2DC\uD5D8\uC77C:" }), _jsx("div", { className: "flex flex-[3]", children: info.examDate })] })] }), _jsxs("div", { className: "flex flex-col xs:flex-row w-full h-fit", children: [_jsxs("div", { className: "flex flex-[3] text-sm truncate", children: [_jsx("div", { className: "flex flex-[2] text-green-dark font-bold", children: "\uC720\uD6A8\uAE30\uAC04:" }), _jsx("div", { className: "flex flex-[3]", children: info.examValidAt })] }), _jsxs("div", { className: "flex flex-[3] text-sm truncate", children: [_jsx("div", { className: "flex flex-[2] text-green-dark font-bold", children: "\uC2DC\uD5D8\uD68C\uCC28:" }), _jsx("div", { className: "flex flex-[3]", children: info.examName })] })] })] }), _jsxs("div", { className: cn(qrBox), children: [!info.qrSrc && (_jsx("div", { className: "absolute top-0 left-0 w-full h-full flex justify-center items-center", children: _jsx("img", { src: "https://resource.tosel.co.kr/images/logo-itc-classic.png", alt: "" }) })), info.qrSrc && (_jsxs(_Fragment, { children: [_jsx(QRCode, { value: info.qrSrc, className: "w-full h-full" }), _jsx("div", { className: "absolute top-0 left-0 w-full h-full flex justify-center items-center ", children: _jsx("img", { src: "/images/img-favicon-main.png", alt: "", className: "size-8" }) }), _jsx("div", { className: cn(copyButtonWrapper), children: _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx("div", { className: "flex justify-center items-center ", children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", className: "size-6 stroke-green-dark", children: _jsx("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25" }) }) }), _jsx("div", { className: cn(copyButton), onClick: () => copyToClipboard(info.qrSrc), children: "\uACF5\uC720\uD558\uAE30" })] }) })] }))] }), _jsxs("div", { className: "flex flex-col shrink-0", children: [_jsxs("div", { className: cn(imgBox), children: [_jsx("img", { src: info.imgSrc, alt: "", className: "object-cover w-full h-auto" }), _jsx("div", { className: "absolute w-full h-full flex items-center justify-center", children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", className: "size-6 stroke-jr-blue/50", children: _jsx("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" }) }) })] }), !isXS && (_jsx("div", { className: "w-full h-full mt-3 flex", children: _jsx("div", { className: "w-full h-full block xs:hidden", children: _jsx("div", { className: cn(levelTag), children: GetStyleFromLevel(info.level, "name") }) }) }))] })] }));
|
|
57
|
+
}
|
package/layout/template/Transcript/design/{Organism/BarCardRow.d.ts → organism/PerformanceCard.d.ts}
RENAMED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { TranscriptProps } from "../Transcript";
|
|
2
|
-
export
|
|
2
|
+
export default function PerformanceCard({ data, info, }: {
|
|
3
3
|
data: TranscriptProps["data"];
|
|
4
|
+
info: TranscriptProps["info"];
|
|
4
5
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { LineBreaks } from "@edu-tosel/design";
|
|
3
|
+
import { cn } from "../../../../../util";
|
|
4
|
+
import { printBoxStyles } from "../atom/PrintBoxStyles";
|
|
5
|
+
import LevelIndex from "../molecule/LevelIndex";
|
|
6
|
+
export default function PerformanceCard({ data, info, }) {
|
|
7
|
+
const cardWrapper = {
|
|
8
|
+
displays: "flex flex-col relative",
|
|
9
|
+
sizes: "w-full rounded-lg overflow-hidden",
|
|
10
|
+
backgrounds: "bg-white shadow-main",
|
|
11
|
+
sapcings: "mt-5",
|
|
12
|
+
};
|
|
13
|
+
const cardTitle = {
|
|
14
|
+
display: "flex flex-row justify-center items-center",
|
|
15
|
+
sizes: "h-7 shrink-0 w-full",
|
|
16
|
+
bg: "bg-green-light",
|
|
17
|
+
textStyles: "text-green-dark font-medium text-sm",
|
|
18
|
+
};
|
|
19
|
+
const scriptStyling = {
|
|
20
|
+
display: "justify-start items-start",
|
|
21
|
+
sizes: "w-full h-fit",
|
|
22
|
+
textStyles: "text-xs font-medium text-black break-keep",
|
|
23
|
+
};
|
|
24
|
+
return (_jsxs("div", { className: cn(cardWrapper, printBoxStyles), children: [_jsx("div", { className: cn(cardTitle), children: _jsx("div", { className: "w-full text-center h-fit", children: "Performance Evaluation" }) }), _jsxs("div", { className: "w-full h-full flex flex-col gap-5 p-5", children: [_jsxs("div", { className: "flex flex-col flex-[3]", children: [_jsx(LineBreaks, { texts: data.script.performanceEvaluation, className: cn(scriptStyling) }), _jsx("div", { className: cn(scriptStyling, "text-green-dark"), children: "\uB098\uC758 \uC804\uAD6D \uC9C0\uD45C\uAC00 \uAD81\uAE08\uD558\uB2E4\uBA74? QR\uB85C \uC790\uC138\uD788 \uC54C\uC544\uBCF4\uC138\uC694!" })] }), _jsx("div", { className: "w-full flex flex-col flex-[2] justify-center items-center", children: _jsx(LevelIndex, { transcriptLevel: info.level }) })] })] }));
|
|
25
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../../../../util";
|
|
3
|
+
import { printBoxStyles } from "../atom/PrintBoxStyles";
|
|
4
|
+
import { CircularGauge } from "../molecule/CircularGauge";
|
|
5
|
+
export default function ResultGaugeCard({ result, theme, }) {
|
|
6
|
+
const cardWrapper = {
|
|
7
|
+
displays: "flex flex-col self-auto flex-[2] md:flex-[1] overflow-hidden",
|
|
8
|
+
sizes: "w-full h-fit rounded-lg",
|
|
9
|
+
backgrounds: "bg-white shadow-main",
|
|
10
|
+
// animations: "duration-300 hover:scale-105 hover:shadow-green",
|
|
11
|
+
};
|
|
12
|
+
const cardTitle = {
|
|
13
|
+
display: "flex flex-row justify-center items-center",
|
|
14
|
+
sizes: "h-7 w-full",
|
|
15
|
+
bg: "bg-green-dark",
|
|
16
|
+
textStyles: "text-white font-medium text-sm",
|
|
17
|
+
};
|
|
18
|
+
return (_jsxs("div", { className: cn(cardWrapper, printBoxStyles), children: [_jsxs("div", { className: cn(cardTitle), children: [_jsx("div", { className: "w-full text-center h-full flex justify-center items-center", children: "\uCDE8\uB4DD \uC810\uC218" }), _jsx("div", { className: "w-0.5 h-7 bg-white" }), _jsx("div", { className: "w-full text-center h-full flex justify-center items-center", children: "\uC778\uC99D \uB4F1\uAE09" })] }), _jsxs("div", { className: "flex flex-row gap-10 p-5", children: [_jsx(CircularGauge, { score: result.score, maxScore: 100, isGrade: false, theme: theme }), _jsx(CircularGauge, { score: result.grade, maxScore: 9, isGrade: true, theme: theme })] })] }));
|
|
19
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../../../../util";
|
|
3
|
+
export default function ScoreCard({ data }) {
|
|
4
|
+
const cellAnimation = {
|
|
5
|
+
animations: "hover:bg-green-light/50 hover:text-green-dark duration-300",
|
|
6
|
+
};
|
|
7
|
+
return (_jsx("div", { className: "overflow-auto w-full scrollbar-hidden rounded-lg mt-5 print:border print:border-gray-medium/70 cursor-default shadow-main print:shadow-none", children: _jsxs("div", { className: "min-w-[172mm] w-full", children: [_jsxs("div", { className: "flex bg-gradient-to-r from-green-dark to-crimson-burgundy text-white font-medium text-sm", children: [_jsx("div", { className: "text-center print:static sticky left-0 bg-green-dark p-2 flex-[3] font-black", children: "\uC131\uC801\uD45C" }), _jsx("div", { className: "p-2 flex-[2] text-center", children: "\uCD1D\uC810" }), _jsx("div", { className: "p-2 flex-[2] text-center", children: "\uB0B4 \uC810\uC218" }), _jsx("div", { className: "p-2 flex-[3] text-center", children: "\uC804\uAD6D\uD3C9\uADE0" }), _jsx("div", { className: "p-2 flex-[3] text-center", children: "\uC9C0\uC5ED\uD3C9\uADE0" }), _jsx("div", { className: "p-2 flex-[3] text-center", children: "\uB3D9\uC77C\uD559\uB144" }), _jsx("div", { className: "p-2 flex-[3] text-center", children: "10% \uD3C9\uADE0" }), _jsx("div", { className: "p-2 flex-[3] text-center", children: "30% \uD3C9\uADE0" })] }), _jsxs("div", { className: "flex bg-white/60 font-medium text-sm text-gray-medium ", children: [_jsx("div", { className: "sticky left-0 bg-white/90 p-2 flex-[3] text-center text-gray-dark border-green-dark border-r-1", children: "Section1" }), _jsx("div", { className: cn("p-2 flex-[2] text-center", cellAnimation), children: data.analysis.total.section1.toFixed(1) }), _jsx("div", { className: "p-2 flex-[2] text-center text-green-dark font-bold bg-green-light", children: data.analysis.user.section1.toFixed(1) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: data.analysis.nationalAverage.section1.toFixed(2) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: data.analysis.localAverage.section1.toFixed(2) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: data.analysis.ageAverage.section1.toFixed(2) }), _jsx("div", { className: "p-2 flex-[3] text-center border-green-dark border-l-1" }), _jsx("div", { className: "p-2 flex-[3] text-center" })] }), _jsxs("div", { className: "flex bg-white/60 font-medium text-sm text-gray-medium ", children: [_jsx("div", { className: "sticky left-0 bg-white/90 p-2 flex-[3] text-center text-gray-dark border-green-dark border-r-1", children: "Section2" }), _jsx("div", { className: cn("p-2 flex-[2] text-center", cellAnimation), children: data.analysis.total.section2.toFixed(1) }), _jsx("div", { className: "p-2 flex-[2] text-center text-green-dark font-bold bg-green-light", children: data.analysis.user.section2.toFixed(1) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: data.analysis.nationalAverage.section2.toFixed(2) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: data.analysis.localAverage.section2.toFixed(2) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: data.analysis.ageAverage.section2.toFixed(2) }), _jsx("div", { className: "p-2 flex-[3] text-center border-green-dark border-l-1 font-bold", children: data.analysis["10percentageAverage"].toFixed(2) }), _jsx("div", { className: "p-2 flex-[3] text-center font-bold", children: data.analysis["30percentageAverage"].toFixed(2) })] }), _jsxs("div", { className: "flex bg-white/60 font-medium text-sm text-gray-medium ", children: [_jsx("div", { className: "sticky left-0 bg-white/90 p-2 flex-[3] text-center text-gray-dark border-green-dark border-r-1", children: "total" }), _jsx("div", { className: cn("p-2 flex-[2] text-center", cellAnimation), children: (data.analysis.total.section1 + data.analysis.total.section2).toFixed(1) }), _jsx("div", { className: "p-2 flex-[2] text-center text-green-dark font-bold bg-green-light", children: (data.analysis.user.section1 + data.analysis.user.section2).toFixed(1) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: (data.analysis.nationalAverage.section1 +
|
|
8
|
+
data.analysis.nationalAverage.section2).toFixed(2) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: (data.analysis.localAverage.section1 +
|
|
9
|
+
data.analysis.localAverage.section2).toFixed(2) }), _jsx("div", { className: cn("p-2 flex-[3] text-center", cellAnimation), children: (data.analysis.ageAverage.section1 +
|
|
10
|
+
data.analysis.ageAverage.section2).toFixed(2) }), _jsx("div", { className: "p-2 flex-[3] text-center border-green-dark border-l-1" }), _jsx("div", { className: "p-2 flex-[3] text-center " })] })] }) }));
|
|
11
|
+
}
|
|
@@ -4,5 +4,8 @@ declare const Transcript: {
|
|
|
4
4
|
Paper: import("react").ForwardRefExoticComponent<{
|
|
5
5
|
props: import("./design/Transcript").TranscriptProps;
|
|
6
6
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
+
AdvancePaper: import("react").ForwardRefExoticComponent<{
|
|
8
|
+
props: import("./design/Transcript").TranscriptProps;
|
|
9
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
10
|
};
|
|
8
11
|
export default Transcript;
|
|
@@ -46,9 +46,10 @@ const buttons = [
|
|
|
46
46
|
// {
|
|
47
47
|
// title: "이용약관",
|
|
48
48
|
// },
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
{
|
|
50
|
+
title: "GLOBAL",
|
|
51
|
+
onClick: () => (window.location.href = "https://new.tosel.org/global"),
|
|
52
|
+
},
|
|
52
53
|
{
|
|
53
54
|
title: "FAQ",
|
|
54
55
|
onClick: () => (window.location.href =
|
package/package.json
CHANGED
package/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.189
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from "../../../../../util";
|
|
3
|
-
import { CardTitle } from "../atom/CardTitle";
|
|
4
|
-
import { printBoxStyles } from "../atom/PrintBoxStyles";
|
|
5
|
-
import { BarGraph } from "../molecule/BarGraph";
|
|
6
|
-
export function BarCardRow({ data }) {
|
|
7
|
-
const cardWrapper = {
|
|
8
|
-
displays: "flex flex-col relative",
|
|
9
|
-
sizes: "w-full rounded-lg overflow-hidden",
|
|
10
|
-
backgrounds: "bg-white shadow-main",
|
|
11
|
-
sapcings: "mt-5",
|
|
12
|
-
};
|
|
13
|
-
const cardTitle = {
|
|
14
|
-
display: "flex flex-row justify-center items-center",
|
|
15
|
-
sizes: "h-7 shrink-0 w-full",
|
|
16
|
-
bg: "bg-green-light",
|
|
17
|
-
textStyles: "text-green-dark font-medium text-sm",
|
|
18
|
-
};
|
|
19
|
-
const SectionWrapper = {
|
|
20
|
-
display: "flex flex-row sm:flex-col items-center justify-center",
|
|
21
|
-
sizes: "h-full w-full",
|
|
22
|
-
};
|
|
23
|
-
const ScriptStyles = {
|
|
24
|
-
displays: "flex justify-center items-center align-center",
|
|
25
|
-
spacings: "p-5",
|
|
26
|
-
sizes: "w-full h-full",
|
|
27
|
-
textStyles: "text-sm break-keep",
|
|
28
|
-
};
|
|
29
|
-
return (_jsxs("div", { className: cn(cardWrapper, printBoxStyles), children: [_jsx(CardTitle, { title: "Grade and Average Score" }), _jsxs("div", { className: "flex flex-col sm:mt-0 mt-5", children: [_jsxs("div", { className: cn(SectionWrapper), children: [_jsx(BarGraph, { title: "section1", score: data.analysis.user.section1, total: 50, subScore: data.analysis.nationalAverage.section1, scale: 10 }), _jsx("div", { className: cn(ScriptStyles), children: data.script.section1 })] }), _jsxs("div", { className: cn(SectionWrapper), children: [_jsx(BarGraph, { title: "section2", score: data.analysis.user.section2, total: 50, subScore: data.analysis.nationalAverage.section2, scale: 10 }), _jsx("div", { className: cn(ScriptStyles), children: data.script.section2 })] })] })] }));
|
|
30
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from "../../../../../util";
|
|
3
|
-
import { CardTitle } from "../atom/CardTitle";
|
|
4
|
-
import { printBoxStyles } from "../atom/PrintBoxStyles";
|
|
5
|
-
import { BarGraph } from "../molecule/BarGraph";
|
|
6
|
-
export function BarCardRow({ data }) {
|
|
7
|
-
const cardWrapper = {
|
|
8
|
-
displays: "flex flex-col relative",
|
|
9
|
-
sizes: "w-full rounded-lg overflow-hidden",
|
|
10
|
-
backgrounds: "bg-white shadow-main",
|
|
11
|
-
sapcings: "mt-5",
|
|
12
|
-
};
|
|
13
|
-
const cardTitle = {
|
|
14
|
-
display: "flex flex-row justify-center items-center",
|
|
15
|
-
sizes: "h-7 shrink-0 w-full",
|
|
16
|
-
bg: "bg-green-light",
|
|
17
|
-
textStyles: "text-green-dark font-medium text-sm",
|
|
18
|
-
};
|
|
19
|
-
const SectionWrapper = {
|
|
20
|
-
display: "flex sm:flex-row flex-col items-center justify-center",
|
|
21
|
-
sizes: "h-full w-full",
|
|
22
|
-
};
|
|
23
|
-
const ScriptStyles = {
|
|
24
|
-
displays: "flex justify-center items-center align-center",
|
|
25
|
-
spacings: "p-5",
|
|
26
|
-
sizes: "w-full h-full",
|
|
27
|
-
textStyles: "text-sm break-keep",
|
|
28
|
-
};
|
|
29
|
-
return (_jsxs("div", { className: cn(cardWrapper, printBoxStyles), children: [_jsx(CardTitle, { title: "Grade and Average Score" }), _jsxs("div", { className: "flex flex-col sm:mt-0 mt-5", children: [_jsxs("div", { className: cn(SectionWrapper), children: [_jsx(BarGraph, { title: "section1", score: data.analysis.user.section1, total: 50, subScore: data.analysis.nationalAverage.section1, scale: 10 }), _jsx("div", { className: cn(ScriptStyles), children: data.script.section1 })] }), _jsxs("div", { className: cn(SectionWrapper), children: [_jsx(BarGraph, { title: "section2", score: data.analysis.user.section2, total: 50, subScore: data.analysis.nationalAverage.section2, scale: 10 }), _jsx("div", { className: cn(ScriptStyles), children: data.script.section2 })] })] })] }));
|
|
30
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { TranscriptProps } from "../Transcript";
|
|
2
|
-
export declare const EXAM_TYPE: {
|
|
3
|
-
readonly REG: "REG";
|
|
4
|
-
readonly CMP: "CMP";
|
|
5
|
-
readonly IST: "IST";
|
|
6
|
-
readonly OLY: "OLY";
|
|
7
|
-
};
|
|
8
|
-
export type EXAM_TYPE = (typeof EXAM_TYPE)[keyof typeof EXAM_TYPE];
|
|
9
|
-
export declare function getStringfromType(ExamType: EXAM_TYPE): string;
|
|
10
|
-
export default function IdCard({ info }: {
|
|
11
|
-
info: TranscriptProps["info"];
|
|
12
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from "react";
|
|
3
|
-
import { useResponsive } from "../../../../../hook";
|
|
4
|
-
import { cn, copyToClipboard } from "../../../../../util";
|
|
5
|
-
import { LevelToStyleMap } from "../Transcript.design";
|
|
6
|
-
import QRCode from "react-qr-code";
|
|
7
|
-
export const EXAM_TYPE = {
|
|
8
|
-
REG: "REG",
|
|
9
|
-
CMP: "CMP",
|
|
10
|
-
IST: "IST",
|
|
11
|
-
OLY: "OLY",
|
|
12
|
-
};
|
|
13
|
-
function getStylefromLevel(level, field) {
|
|
14
|
-
return LevelToStyleMap[level]?.[field] || "Unknown";
|
|
15
|
-
}
|
|
16
|
-
const examTypeMap = {
|
|
17
|
-
REG: "정기시험",
|
|
18
|
-
IST: "기관시험",
|
|
19
|
-
CMP: "경시대회",
|
|
20
|
-
};
|
|
21
|
-
export function getStringfromType(ExamType) {
|
|
22
|
-
return examTypeMap[ExamType] || "Unknown";
|
|
23
|
-
}
|
|
24
|
-
export default function IdCard({ info }) {
|
|
25
|
-
const [isExpanded, setIsExpanded] = useState(false);
|
|
26
|
-
const togglecard = () => setIsExpanded(!isExpanded);
|
|
27
|
-
//반응형 info 카드 height 문제로 눌러서 자세히 보기 차후 구현 예정
|
|
28
|
-
const isXS = useResponsive("xs");
|
|
29
|
-
const cardWrapper = {
|
|
30
|
-
displays: "flex flex-col self-auto overflow-hidden",
|
|
31
|
-
sizes: "w-full rounded-lg h-fit",
|
|
32
|
-
backgrounds: "bg-white shadow-main",
|
|
33
|
-
spacings: "p-3",
|
|
34
|
-
printOptions: "print:bg-white print:shadow-none",
|
|
35
|
-
};
|
|
36
|
-
const imgBox = {
|
|
37
|
-
displays: "relative shrink-0 overflow-hidden",
|
|
38
|
-
sizes: "h-30 aspect-7/9 rounded-lg",
|
|
39
|
-
backgrounds: info.imgSrc ?? "bg-jr-blue-light",
|
|
40
|
-
outlines: "border-2 border-slate-200",
|
|
41
|
-
};
|
|
42
|
-
const qrBox = {
|
|
43
|
-
displays: "shrink-0 hidden sm:block relative overflow-hidden",
|
|
44
|
-
sizes: "h-30 p-2 aspect-square rounded-lg",
|
|
45
|
-
textStyles: "text-jr-blue",
|
|
46
|
-
backgrounds: "bg-white print:border-2 print:border-green-dark",
|
|
47
|
-
groupAction: "group duration-300 hover:scale-110",
|
|
48
|
-
};
|
|
49
|
-
const copyButtonWrapper = {
|
|
50
|
-
display: "absolute flex justify-center items-center",
|
|
51
|
-
positions: "top-0 left-0",
|
|
52
|
-
sizes: "h-full w-full backdrop-blur-sm",
|
|
53
|
-
graphics: "opacity-0 bg-white/80 ",
|
|
54
|
-
animations: "duration-300 group-hover:opacity-100",
|
|
55
|
-
};
|
|
56
|
-
const copyButton = {
|
|
57
|
-
displays: "flex justify-center items-center",
|
|
58
|
-
sizes: "w-20 h-8 rounded-lg",
|
|
59
|
-
colors: "bg-green-light border border-green-dark",
|
|
60
|
-
textStyles: "text-xs text-green-dark font-medium text-center",
|
|
61
|
-
animations: "hover:bg-green-dark hover:text-white duration-300 cursor-pointer",
|
|
62
|
-
};
|
|
63
|
-
const levelTag = {
|
|
64
|
-
display: "flex justify-center items-center",
|
|
65
|
-
textStyles: "text-center",
|
|
66
|
-
variableStyle: `text-center text-xs font-bold ${getStylefromLevel(info.level, "textcolor")}`,
|
|
67
|
-
backgrounds: getStylefromLevel(info.level, "bgcolor"),
|
|
68
|
-
sizes: isXS
|
|
69
|
-
? "rounded-md w-fit h-fit px-2 py-1"
|
|
70
|
-
: "rounded-md w-full h-full",
|
|
71
|
-
printOptions: "print:w-fit print:h-fit print:px-2 print:py-1",
|
|
72
|
-
};
|
|
73
|
-
return (_jsxs("div", { className: "flex flex-row w-full h-fit mt-5 gap-5", children: [_jsxs("div", { className: cn(cardWrapper), children: [_jsxs("div", { className: "flex flex-row justify-between items-center pb-1 w-full h-fit border-b-2 border-green-dark", children: [_jsxs("div", { className: "flex flex-col", children: [_jsxs("div", { className: "flex flex-[3] text-sm truncate font-bold text-green-dark", children: [info.name, " ", info.nickname && _jsxs("span", { children: [" \u00A0/ ", info.nickname] })] }), _jsx("div", { className: "flex flex-[1] text-sm", children: info.birthday })] }), _jsx("div", { className: "w-fit h-full xs:block hidden", children: _jsx("div", { className: cn(levelTag), children: getStylefromLevel(info.level, "name") }) })] }), _jsx("div", {}), _jsxs("div", { className: "flex flex-col xs:flex-row w-full h-fit mt-2", children: [_jsxs("div", { className: "flex flex-[3] text-sm truncate", children: [_jsx("div", { className: "flex flex-[2] text-green-dark", children: "\uC218\uD5D8\uBC88\uD638:" }), _jsx("div", { className: "flex flex-[3]", children: info.code })] }), _jsxs("div", { className: "flex flex-[3] text-sm truncate", children: [_jsx("div", { className: "flex flex-[2] text-green-dark", children: "\uC2DC\uD5D8\uC77C:" }), _jsx("div", { className: "flex flex-[3]", children: info.examDate })] })] }), _jsxs("div", { className: "flex flex-col xs:flex-row w-full h-fit", children: [_jsxs("div", { className: "flex flex-[3] text-sm truncate", children: [_jsx("div", { className: "flex flex-[2] text-green-dark", children: "\uC720\uD6A8\uAE30\uAC04:" }), _jsx("div", { className: "flex flex-[3]", children: info.examValidAt })] }), _jsxs("div", { className: "flex flex-[3] text-sm truncate", children: [_jsx("div", { className: "flex flex-[2] text-green-dark", children: "\uC2DC\uD5D8\uD68C\uCC28:" }), _jsx("div", { className: "flex flex-[3]", children: info.examName })] })] })] }), _jsxs("div", { className: cn(qrBox), children: [info.qrSrc && _jsx(QRCode, { value: info.qrSrc, className: "w-full h-full" }), _jsx("div", { className: "absolute top-0 left-0 w-full h-full flex justify-center items-center ", children: _jsx("img", { src: "/images/img-favicon-main.png", alt: "", className: "size-8" }) }), info.qrSrc && (_jsx("div", { className: cn(copyButtonWrapper), children: _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx("div", { className: "flex justify-center items-center ", children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", className: "size-6 stroke-green-dark", children: _jsx("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25" }) }) }), _jsx("div", { className: cn(copyButton), onClick: () => copyToClipboard(info.qrSrc), children: "\uACF5\uC720\uD558\uAE30" })] }) }))] }), _jsxs("div", { className: "flex flex-col shrink-0", children: [_jsxs("div", { className: cn(imgBox), children: [_jsx("img", { src: info.imgSrc, alt: "", className: "object-cover w-full h-auto" }), _jsx("div", { className: "absolute w-full h-full flex items-center justify-center", children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", className: "size-6 stroke-jr-blue/50", children: _jsx("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" }) }) })] }), !isXS && (_jsx("div", { className: "w-full h-full mt-3 flex", children: _jsx("div", { className: "w-full h-full block xs:hidden", children: _jsx("div", { className: cn(levelTag), children: getStylefromLevel(info.level, "name") }) }) }))] })] }));
|
|
74
|
-
}
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|