@daeryun/dr_components 0.2.5 → 0.2.7
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/dist/asset/images/pdfPrintCopyLink/pdf.svg +17 -0
- package/dist/asset/images/pdfPrintCopyLink/print.svg +19 -0
- package/dist/asset/images/pdfPrintCopyLink/share.svg +15 -0
- package/dist/components/Loader/Loader.d.ts +5 -0
- package/dist/components/Loader/Loader.jsx +8 -0
- package/dist/components/Loader/Loader.stories.d.ts +9 -0
- package/dist/components/Loader/Loader.stories.jsx +22 -0
- package/dist/components/Loader/Loader.stories.tsx +32 -0
- package/dist/components/Loader/Loader.tsx +18 -0
- package/dist/components/PdfPrintCopyLink/PdfPrintCopyLink.d.ts +6 -0
- package/dist/components/PdfPrintCopyLink/PdfPrintCopyLink.jsx +99 -0
- package/dist/components/PdfPrintCopyLink/PdfPrintCopyLink.stories.d.ts +8 -0
- package/dist/components/PdfPrintCopyLink/PdfPrintCopyLink.stories.jsx +16 -0
- package/dist/components/PdfPrintCopyLink/PdfPrintCopyLink.stories.tsx +24 -0
- package/dist/components/PdfPrintCopyLink/PdfPrintCopyLink.tsx +115 -0
- package/dist/components/ViewMoreSection/ViewMoreSection.jsx +1 -1
- package/dist/components/ViewMoreSection/ViewMoreSection.tsx +1 -1
- package/dist/styles/globals.css +105 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%" viewBox="0 0 42 42">
|
|
2
|
+
<defs>
|
|
3
|
+
<clipPath id="clip-path">
|
|
4
|
+
<rect id="사각형_1511" data-name="사각형 1511" width="42" height="42" transform="translate(1521 436)" fill="current"/>
|
|
5
|
+
</clipPath>
|
|
6
|
+
</defs>
|
|
7
|
+
<g id="pdf" transform="translate(-1521 -436)" clip-path="url(#clip-path)">
|
|
8
|
+
<g id="pdf_네이비_" data-name="pdf(네이비)" transform="translate(1341.029 329)">
|
|
9
|
+
<path id="패스_3851" data-name="패스 3851" d="M63.215,51.2h-38.1a1.507,1.507,0,1,1,0-3.013h38.1a1.507,1.507,0,1,1,0,3.013" transform="translate(156.359 96.909)" fill="current"/>
|
|
10
|
+
<g id="그룹_204956" data-name="그룹 204956" transform="translate(-57.814)">
|
|
11
|
+
<path id="패스_3849" data-name="패스 3849" d="M37.1,47.831a1.507,1.507,0,0,1-1.507-1.507V38.107a1.507,1.507,0,0,1,3.014,0v8.217A1.507,1.507,0,0,1,37.1,47.831" transform="translate(221.879 94.489)" fill="current"/>
|
|
12
|
+
<path id="패스_3850" data-name="패스 3850" d="M37.117,47.825h0a1.509,1.509,0,0,1-1.066-.441l-3.688-3.69a1.507,1.507,0,1,1,2.131-2.131l2.623,2.623,2.624-2.623a1.507,1.507,0,0,1,2.131,2.131l-3.689,3.69a1.511,1.511,0,0,1-1.066.441" transform="translate(221.862 95.582)" fill="current"/>
|
|
13
|
+
</g>
|
|
14
|
+
<text id="PDF-2" data-name="PDF" transform="translate(200.971 127)" fill="current" font-size="19" font-family="SUIT-Heavy, SUIT" font-weight="800"><tspan x="-18.972" y="0">PDF</tspan></text>
|
|
15
|
+
</g>
|
|
16
|
+
</g>
|
|
17
|
+
</svg>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%" viewBox="0 0 42 42">
|
|
2
|
+
<defs>
|
|
3
|
+
<clipPath id="clip-path">
|
|
4
|
+
<rect id="사각형_1512" data-name="사각형 1512" width="42" height="42" transform="translate(1568 436)" fill="current"/>
|
|
5
|
+
</clipPath>
|
|
6
|
+
<clipPath id="clip-path-2">
|
|
7
|
+
<rect id="사각형_1501" data-name="사각형 1501" width="29.406" height="33.921" transform="translate(0 0)" fill="none" stroke="#6c6c6c" stroke-width="1"/>
|
|
8
|
+
</clipPath>
|
|
9
|
+
</defs>
|
|
10
|
+
<g id="print" transform="translate(-1568 -436)" clip-path="url(#clip-path)">
|
|
11
|
+
<g id="프린트" transform="translate(1574 440)">
|
|
12
|
+
<g id="그룹_204953" data-name="그룹 204953" clip-path="url(#clip-path-2)">
|
|
13
|
+
<path id="패스_3900" data-name="패스 3900" d="M4.477,27.627H3.18A2.18,2.18,0,0,1,1,25.447V14.391a2.18,2.18,0,0,1,2.18-2.18H26.225a2.18,2.18,0,0,1,2.18,2.18V25.447a2.18,2.18,0,0,1-2.18,2.18H25.187" fill="none" stroke="current" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
|
14
|
+
<rect id="사각형_1500" data-name="사각형 1500" width="18.374" height="11.211" transform="translate(5.516 1)" fill="none" stroke="current" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
|
15
|
+
<path id="패스_3901" data-name="패스 3901" d="M23.89,21.71H5.516L3.647,32.921H25.759Z" fill="none" stroke="current" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
|
16
|
+
</g>
|
|
17
|
+
</g>
|
|
18
|
+
</g>
|
|
19
|
+
</svg>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%" viewBox="0 0 42 42">
|
|
2
|
+
<defs>
|
|
3
|
+
<clipPath id="clip-path">
|
|
4
|
+
<rect id="사각형_1513" data-name="사각형 1513" width="42" height="42" transform="translate(1615 436)" fill="current"/>
|
|
5
|
+
</clipPath>
|
|
6
|
+
</defs>
|
|
7
|
+
<g id="share" transform="translate(-1615 -436)" clip-path="url(#clip-path)">
|
|
8
|
+
<g id="공유" transform="translate(1608.788 429.992)">
|
|
9
|
+
<path id="패스_3836" data-name="패스 3836" d="M2772.1,1387l-18.113,13.052,18.113,13.5" transform="translate(-2735.109 -1373.206)" fill="none" stroke="current" stroke-width="1.5"/>
|
|
10
|
+
<circle id="타원_23" data-name="타원 23" cx="4.5" cy="4.5" r="4.5" transform="translate(31.212 9.008)" fill="current"/>
|
|
11
|
+
<circle id="타원_24" data-name="타원 24" cx="4.5" cy="4.5" r="4.5" transform="translate(31.212 36.008)" fill="current"/>
|
|
12
|
+
<circle id="타원_25" data-name="타원 25" cx="4.5" cy="4.5" r="4.5" transform="translate(14.212 22.008)" fill="current"/>
|
|
13
|
+
</g>
|
|
14
|
+
</g>
|
|
15
|
+
</svg>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
const Loader = (props) => {
|
|
3
|
+
return (<div aria-label={'로딩중'} tabIndex={-1} className={' flex items-center justify-center ' +
|
|
4
|
+
(props.fullScreen ? ' fixed right-0 top-0 z-[10000] h-[100vh] w-[100vw] bg-black bg-opacity-20 ' : ' ')}>
|
|
5
|
+
<div className="h-16 w-16 animate-spin rounded-full border-4 border-solid border-primary border-t-transparent"></div>
|
|
6
|
+
</div>);
|
|
7
|
+
};
|
|
8
|
+
export default Loader;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Loader from './Loader';
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
import '../../styles/globals.css';
|
|
4
|
+
import '../../styles/font_style.css';
|
|
5
|
+
declare const meta: Meta<typeof Loader>;
|
|
6
|
+
export default meta;
|
|
7
|
+
type Story = StoryObj<typeof meta>;
|
|
8
|
+
export declare const Default: Story;
|
|
9
|
+
export declare const FullScreenLoader: Story;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import Loader from './Loader';
|
|
2
|
+
import '../../styles/globals.css';
|
|
3
|
+
import '../../styles/font_style.css';
|
|
4
|
+
const meta = {
|
|
5
|
+
component: Loader,
|
|
6
|
+
title: 'Loader'
|
|
7
|
+
};
|
|
8
|
+
export default meta;
|
|
9
|
+
export const Default = {
|
|
10
|
+
render: args => {
|
|
11
|
+
return (<div className={'font-[SUIT]'}>
|
|
12
|
+
<Loader {...args}/>
|
|
13
|
+
</div>);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
export const FullScreenLoader = {
|
|
17
|
+
render: args => {
|
|
18
|
+
return (<div className={'font-[SUIT]'}>
|
|
19
|
+
<Loader fullScreen/>
|
|
20
|
+
</div>);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import Loader from './Loader';
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
import '../../styles/globals.css';
|
|
4
|
+
import '../../styles/font_style.css';
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof Loader> = {
|
|
7
|
+
component: Loader,
|
|
8
|
+
title: 'Loader'
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export default meta;
|
|
12
|
+
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
|
|
15
|
+
export const Default: Story = {
|
|
16
|
+
render: args => {
|
|
17
|
+
return (
|
|
18
|
+
<div className={'font-[SUIT]'}>
|
|
19
|
+
<Loader {...args} />
|
|
20
|
+
</div>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
export const FullScreenLoader: Story = {
|
|
25
|
+
render: args => {
|
|
26
|
+
return (
|
|
27
|
+
<div className={'font-[SUIT]'}>
|
|
28
|
+
<Loader fullScreen />
|
|
29
|
+
</div>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
const Loader = (props: { fullScreen?: boolean }) => {
|
|
4
|
+
return (
|
|
5
|
+
<div
|
|
6
|
+
aria-label={'로딩중'}
|
|
7
|
+
tabIndex={-1}
|
|
8
|
+
className={
|
|
9
|
+
' flex items-center justify-center ' +
|
|
10
|
+
(props.fullScreen ? ' fixed right-0 top-0 z-[10000] h-[100vh] w-[100vw] bg-black bg-opacity-20 ' : ' ')
|
|
11
|
+
}
|
|
12
|
+
>
|
|
13
|
+
<div className="h-16 w-16 animate-spin rounded-full border-4 border-solid border-primary border-t-transparent"></div>
|
|
14
|
+
</div>
|
|
15
|
+
);
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export default Loader;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import React, { useState } from 'react';
|
|
11
|
+
import axios from 'axios';
|
|
12
|
+
import Print from '../../asset/images/pdfPrintCopyLink/print.svg';
|
|
13
|
+
import Pdf from '../../asset/images/pdfPrintCopyLink/pdf.svg';
|
|
14
|
+
import Share from '../../asset/images/pdfPrintCopyLink/share.svg';
|
|
15
|
+
import Loader from '../Loader/Loader';
|
|
16
|
+
const PdfPrintCopyLink = (props) => {
|
|
17
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
18
|
+
const [clickFlag, setClickFlag] = useState({
|
|
19
|
+
pdf: false,
|
|
20
|
+
print: false,
|
|
21
|
+
link: false
|
|
22
|
+
});
|
|
23
|
+
const handleGetPdf = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
24
|
+
if (typeof window != 'undefined') {
|
|
25
|
+
setIsLoading(true);
|
|
26
|
+
const response = yield axios.post('https://iy3yc7orql.execute-api.ap-northeast-2.amazonaws.com/html2pdf', {
|
|
27
|
+
target_url: window.location.href,
|
|
28
|
+
target_sel: '.daum-wm-content',
|
|
29
|
+
file_name: props.fileName
|
|
30
|
+
});
|
|
31
|
+
if (response.status != 200) {
|
|
32
|
+
alert('오류가 발생하였습니다. 잠시후 다시 시도해주세요.');
|
|
33
|
+
setIsLoading(false);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const pdfUrl = response.data.pdf_link;
|
|
37
|
+
const a = document.createElement('a');
|
|
38
|
+
a.href = pdfUrl;
|
|
39
|
+
document.body.appendChild(a);
|
|
40
|
+
a.click();
|
|
41
|
+
setTimeout(() => {
|
|
42
|
+
window.URL.revokeObjectURL(pdfUrl);
|
|
43
|
+
document.body.removeChild(a);
|
|
44
|
+
}, 1000);
|
|
45
|
+
setIsLoading(false);
|
|
46
|
+
}
|
|
47
|
+
setClickFlag(Object.assign(Object.assign({}, clickFlag), { pdf: true }));
|
|
48
|
+
});
|
|
49
|
+
const handlePrint = () => {
|
|
50
|
+
var _a;
|
|
51
|
+
if (typeof window != 'undefined') {
|
|
52
|
+
setClickFlag(Object.assign(Object.assign({}, clickFlag), { print: true }));
|
|
53
|
+
if (props.printRef) {
|
|
54
|
+
let printContents = (_a = props.printRef) === null || _a === void 0 ? void 0 : _a.current;
|
|
55
|
+
if (printContents === null) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const headElement = document.head;
|
|
59
|
+
const printWindow = window.open('', '_blank');
|
|
60
|
+
if (printWindow) {
|
|
61
|
+
printWindow.document.write('<html lang="ko">');
|
|
62
|
+
printWindow.document.write(headElement.outerHTML);
|
|
63
|
+
printWindow.document.write('<body>');
|
|
64
|
+
printWindow.document.write(printContents.outerHTML);
|
|
65
|
+
printWindow.document.write('</body></html>');
|
|
66
|
+
setTimeout(() => {
|
|
67
|
+
printWindow.print();
|
|
68
|
+
printWindow.document.close();
|
|
69
|
+
}, 1000);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
window.print();
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
const handleCopyLink = () => {
|
|
78
|
+
if (navigator.clipboard && typeof window != 'undefined') {
|
|
79
|
+
setClickFlag(Object.assign(Object.assign({}, clickFlag), { link: true }));
|
|
80
|
+
navigator.clipboard
|
|
81
|
+
.writeText(window.location.href)
|
|
82
|
+
.then(() => {
|
|
83
|
+
alert('현재 주소가 복사되었습니다');
|
|
84
|
+
})
|
|
85
|
+
.catch(() => {
|
|
86
|
+
alert('오류가 발생했습니다. 다시 시도해주세요.');
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
return (<div className={'mt-[14px] flex w-full cursor-pointer items-center justify-end sm:mb-[10px] sm:mt-[32px]'}>
|
|
91
|
+
{isLoading ? <Loader fullScreen/> : <></>}
|
|
92
|
+
<Pdf className={'h-[38px] w-[38px] max-sm:h-7 max-sm:w-7 ' + (clickFlag.pdf ? ' fill-[#0D2B4F]' : ' fill-[#6c6c6c]')} onClick={handleGetPdf}/>
|
|
93
|
+
<Print className={'ml-2 h-10 w-10 cursor-pointer fill-[#6c6c6c] stroke-[#6c6c6c] max-sm:ml-[7px] max-sm:h-8 max-sm:w-8 ' +
|
|
94
|
+
(clickFlag.print ? ' fill-[#0D2B4F] stroke-[#0D2B4F] ' : ' fill-[#6c6c6c] stroke-[#6c6c6c] ')} onClick={handlePrint}/>
|
|
95
|
+
<Share className={'h-10 w-10 cursor-pointer max-sm:h-8 max-sm:w-8 ' +
|
|
96
|
+
(clickFlag.link ? ' fill-[#0D2B4F] stroke-[#0D2B4F] ' : ' fill-[#6c6c6c] stroke-[#6c6c6c] ')} onClick={handleCopyLink}/>
|
|
97
|
+
</div>);
|
|
98
|
+
};
|
|
99
|
+
export default PdfPrintCopyLink;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import PdfPrintCopyLink from './PdfPrintCopyLink';
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
import '../../styles/globals.css';
|
|
4
|
+
import '../../styles/font_style.css';
|
|
5
|
+
declare const meta: Meta<typeof PdfPrintCopyLink>;
|
|
6
|
+
export default meta;
|
|
7
|
+
type Story = StoryObj<typeof meta>;
|
|
8
|
+
export declare const Default: Story;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import PdfPrintCopyLink from './PdfPrintCopyLink';
|
|
2
|
+
import '../../styles/globals.css';
|
|
3
|
+
import '../../styles/font_style.css';
|
|
4
|
+
const meta = {
|
|
5
|
+
component: PdfPrintCopyLink,
|
|
6
|
+
title: 'PdfPrintCopyLink'
|
|
7
|
+
};
|
|
8
|
+
export default meta;
|
|
9
|
+
export const Default = {
|
|
10
|
+
render: args => {
|
|
11
|
+
return (<div className={'font-[SUIT]'}>
|
|
12
|
+
<PdfPrintCopyLink {...args}/>
|
|
13
|
+
</div>);
|
|
14
|
+
},
|
|
15
|
+
args: { fileName: '' }
|
|
16
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import PdfPrintCopyLink from './PdfPrintCopyLink';
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
import '../../styles/globals.css';
|
|
4
|
+
import '../../styles/font_style.css';
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof PdfPrintCopyLink> = {
|
|
7
|
+
component: PdfPrintCopyLink,
|
|
8
|
+
title: 'PdfPrintCopyLink'
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export default meta;
|
|
12
|
+
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
|
|
15
|
+
export const Default: Story = {
|
|
16
|
+
render: args => {
|
|
17
|
+
return (
|
|
18
|
+
<div className={'font-[SUIT]'}>
|
|
19
|
+
<PdfPrintCopyLink {...args} />
|
|
20
|
+
</div>
|
|
21
|
+
);
|
|
22
|
+
},
|
|
23
|
+
args: { fileName: '' }
|
|
24
|
+
};
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import axios from 'axios';
|
|
3
|
+
import Print from '../../asset/images/pdfPrintCopyLink/print.svg';
|
|
4
|
+
import Pdf from '../../asset/images/pdfPrintCopyLink/pdf.svg';
|
|
5
|
+
import Share from '../../asset/images/pdfPrintCopyLink/share.svg';
|
|
6
|
+
import Loader from '../Loader/Loader';
|
|
7
|
+
|
|
8
|
+
const PdfPrintCopyLink = (props: { fileName: string; printRef?: React.RefObject<any> }) => {
|
|
9
|
+
const [isLoading, setIsLoading] = useState<boolean>(false);
|
|
10
|
+
const [clickFlag, setClickFlag] = useState<{ print: boolean; pdf: boolean; link: boolean }>({
|
|
11
|
+
pdf: false,
|
|
12
|
+
print: false,
|
|
13
|
+
link: false
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const handleGetPdf = async () => {
|
|
17
|
+
if (typeof window != 'undefined') {
|
|
18
|
+
setIsLoading(true);
|
|
19
|
+
const response = await axios.post('https://iy3yc7orql.execute-api.ap-northeast-2.amazonaws.com/html2pdf', {
|
|
20
|
+
target_url: window.location.href,
|
|
21
|
+
target_sel: '.daum-wm-content',
|
|
22
|
+
file_name: props.fileName
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
if (response.status != 200) {
|
|
26
|
+
alert('오류가 발생하였습니다. 잠시후 다시 시도해주세요.');
|
|
27
|
+
setIsLoading(false);
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
const pdfUrl = response.data.pdf_link;
|
|
31
|
+
const a = document.createElement('a');
|
|
32
|
+
a.href = pdfUrl;
|
|
33
|
+
document.body.appendChild(a);
|
|
34
|
+
a.click();
|
|
35
|
+
setTimeout(() => {
|
|
36
|
+
window.URL.revokeObjectURL(pdfUrl);
|
|
37
|
+
document.body.removeChild(a);
|
|
38
|
+
}, 1000);
|
|
39
|
+
setIsLoading(false);
|
|
40
|
+
}
|
|
41
|
+
setClickFlag({ ...clickFlag, pdf: true });
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const handlePrint = () => {
|
|
45
|
+
if (typeof window != 'undefined') {
|
|
46
|
+
setClickFlag({ ...clickFlag, print: true });
|
|
47
|
+
|
|
48
|
+
if (props.printRef) {
|
|
49
|
+
let printContents = props.printRef?.current;
|
|
50
|
+
if (printContents === null) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
const headElement = document.head;
|
|
54
|
+
const printWindow = window.open('', '_blank');
|
|
55
|
+
|
|
56
|
+
if (printWindow) {
|
|
57
|
+
printWindow.document.write('<html lang="ko">');
|
|
58
|
+
printWindow.document.write(headElement.outerHTML);
|
|
59
|
+
printWindow.document.write('<body>');
|
|
60
|
+
printWindow.document.write(printContents.outerHTML);
|
|
61
|
+
printWindow.document.write('</body></html>');
|
|
62
|
+
|
|
63
|
+
setTimeout(() => {
|
|
64
|
+
printWindow.print();
|
|
65
|
+
printWindow.document.close();
|
|
66
|
+
}, 1000);
|
|
67
|
+
}
|
|
68
|
+
} else {
|
|
69
|
+
window.print();
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
const handleCopyLink = () => {
|
|
75
|
+
if (navigator.clipboard && typeof window != 'undefined') {
|
|
76
|
+
setClickFlag({ ...clickFlag, link: true });
|
|
77
|
+
navigator.clipboard
|
|
78
|
+
.writeText(window.location.href)
|
|
79
|
+
.then(() => {
|
|
80
|
+
alert('현재 주소가 복사되었습니다');
|
|
81
|
+
})
|
|
82
|
+
.catch(() => {
|
|
83
|
+
alert('오류가 발생했습니다. 다시 시도해주세요.');
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
return (
|
|
89
|
+
<div className={'mt-[14px] flex w-full cursor-pointer items-center justify-end sm:mb-[10px] sm:mt-[32px]'}>
|
|
90
|
+
{isLoading ? <Loader fullScreen /> : <></>}
|
|
91
|
+
<Pdf
|
|
92
|
+
className={
|
|
93
|
+
'h-[38px] w-[38px] max-sm:h-7 max-sm:w-7 ' + (clickFlag.pdf ? ' fill-[#0D2B4F]' : ' fill-[#6c6c6c]')
|
|
94
|
+
}
|
|
95
|
+
onClick={handleGetPdf}
|
|
96
|
+
/>
|
|
97
|
+
<Print
|
|
98
|
+
className={
|
|
99
|
+
'ml-2 h-10 w-10 cursor-pointer fill-[#6c6c6c] stroke-[#6c6c6c] max-sm:ml-[7px] max-sm:h-8 max-sm:w-8 ' +
|
|
100
|
+
(clickFlag.print ? ' fill-[#0D2B4F] stroke-[#0D2B4F] ' : ' fill-[#6c6c6c] stroke-[#6c6c6c] ')
|
|
101
|
+
}
|
|
102
|
+
onClick={handlePrint}
|
|
103
|
+
/>
|
|
104
|
+
<Share
|
|
105
|
+
className={
|
|
106
|
+
'h-10 w-10 cursor-pointer max-sm:h-8 max-sm:w-8 ' +
|
|
107
|
+
(clickFlag.link ? ' fill-[#0D2B4F] stroke-[#0D2B4F] ' : ' fill-[#6c6c6c] stroke-[#6c6c6c] ')
|
|
108
|
+
}
|
|
109
|
+
onClick={handleCopyLink}
|
|
110
|
+
/>
|
|
111
|
+
</div>
|
|
112
|
+
);
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
export default PdfPrintCopyLink;
|
|
@@ -77,7 +77,7 @@ const ViewMoreSection = (props) => {
|
|
|
77
77
|
|
|
78
78
|
{props.moreViewList.map((list, index) => {
|
|
79
79
|
return (<Link href={list.link} className={'moreView-box group relative h-[340px] flex-1 cursor-pointer border border-solid border-[#E2E2E2] bg-white px-[39px] py-[50px] hover:text-white ' +
|
|
80
|
-
' transition-[background-color,color] ' +
|
|
80
|
+
' transition-[background-color,color,border-color] ' +
|
|
81
81
|
//1400px
|
|
82
82
|
' max-xxl:h-[300px] max-xxl:px-[25px] max-xxl:py-[35px] ' +
|
|
83
83
|
//타블렛
|
|
@@ -159,7 +159,7 @@ const ViewMoreSection = (props: IViewMoreSectionTypes) => {
|
|
|
159
159
|
href={list.link}
|
|
160
160
|
className={
|
|
161
161
|
'moreView-box group relative h-[340px] flex-1 cursor-pointer border border-solid border-[#E2E2E2] bg-white px-[39px] py-[50px] hover:text-white ' +
|
|
162
|
-
' transition-[background-color,color] ' +
|
|
162
|
+
' transition-[background-color,color,border-color] ' +
|
|
163
163
|
//1400px
|
|
164
164
|
' max-xxl:h-[300px] max-xxl:px-[25px] max-xxl:py-[35px] ' +
|
|
165
165
|
//타블렛
|
package/dist/styles/globals.css
CHANGED
|
@@ -770,6 +770,10 @@ video {
|
|
|
770
770
|
z-index: 50;
|
|
771
771
|
}
|
|
772
772
|
|
|
773
|
+
.z-\[10000\] {
|
|
774
|
+
z-index: 10000;
|
|
775
|
+
}
|
|
776
|
+
|
|
773
777
|
.z-\[101\] {
|
|
774
778
|
z-index: 101;
|
|
775
779
|
}
|
|
@@ -888,6 +892,10 @@ video {
|
|
|
888
892
|
margin-left: 4rem;
|
|
889
893
|
}
|
|
890
894
|
|
|
895
|
+
.ml-2 {
|
|
896
|
+
margin-left: 0.5rem;
|
|
897
|
+
}
|
|
898
|
+
|
|
891
899
|
.ml-4 {
|
|
892
900
|
margin-left: 1rem;
|
|
893
901
|
}
|
|
@@ -936,6 +944,10 @@ video {
|
|
|
936
944
|
margin-top: 11.14px;
|
|
937
945
|
}
|
|
938
946
|
|
|
947
|
+
.mt-\[14px\] {
|
|
948
|
+
margin-top: 14px;
|
|
949
|
+
}
|
|
950
|
+
|
|
939
951
|
.mt-\[18px\] {
|
|
940
952
|
margin-top: 18px;
|
|
941
953
|
}
|
|
@@ -1012,6 +1024,14 @@ video {
|
|
|
1012
1024
|
height: 83px !important;
|
|
1013
1025
|
}
|
|
1014
1026
|
|
|
1027
|
+
.h-10 {
|
|
1028
|
+
height: 2.5rem;
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
.h-16 {
|
|
1032
|
+
height: 4rem;
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1015
1035
|
.h-20 {
|
|
1016
1036
|
height: 5rem;
|
|
1017
1037
|
}
|
|
@@ -1257,6 +1277,14 @@ video {
|
|
|
1257
1277
|
width: 50%;
|
|
1258
1278
|
}
|
|
1259
1279
|
|
|
1280
|
+
.w-10 {
|
|
1281
|
+
width: 2.5rem;
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1284
|
+
.w-16 {
|
|
1285
|
+
width: 4rem;
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1260
1288
|
.w-20 {
|
|
1261
1289
|
width: 5rem;
|
|
1262
1290
|
}
|
|
@@ -1273,6 +1301,10 @@ video {
|
|
|
1273
1301
|
width: 100px;
|
|
1274
1302
|
}
|
|
1275
1303
|
|
|
1304
|
+
.w-\[100vw\] {
|
|
1305
|
+
width: 100vw;
|
|
1306
|
+
}
|
|
1307
|
+
|
|
1276
1308
|
.w-\[10em\] {
|
|
1277
1309
|
width: 10em;
|
|
1278
1310
|
}
|
|
@@ -1665,6 +1697,16 @@ video {
|
|
|
1665
1697
|
animation: fadeIn 0.15s;
|
|
1666
1698
|
}
|
|
1667
1699
|
|
|
1700
|
+
@keyframes spin {
|
|
1701
|
+
to {
|
|
1702
|
+
transform: rotate(360deg);
|
|
1703
|
+
}
|
|
1704
|
+
}
|
|
1705
|
+
|
|
1706
|
+
.animate-spin {
|
|
1707
|
+
animation: spin 1s linear infinite;
|
|
1708
|
+
}
|
|
1709
|
+
|
|
1668
1710
|
.cursor-default {
|
|
1669
1711
|
cursor: default;
|
|
1670
1712
|
}
|
|
@@ -1942,6 +1984,10 @@ video {
|
|
|
1942
1984
|
border-width: 1px;
|
|
1943
1985
|
}
|
|
1944
1986
|
|
|
1987
|
+
.border-4 {
|
|
1988
|
+
border-width: 4px;
|
|
1989
|
+
}
|
|
1990
|
+
|
|
1945
1991
|
.border-\[1px\] {
|
|
1946
1992
|
border-width: 1px;
|
|
1947
1993
|
}
|
|
@@ -2020,6 +2066,11 @@ video {
|
|
|
2020
2066
|
border-color: rgb(0 0 0 / var(--tw-border-opacity));
|
|
2021
2067
|
}
|
|
2022
2068
|
|
|
2069
|
+
.border-primary {
|
|
2070
|
+
--tw-border-opacity: 1;
|
|
2071
|
+
border-color: rgb(60 80 224 / var(--tw-border-opacity));
|
|
2072
|
+
}
|
|
2073
|
+
|
|
2023
2074
|
.border-white {
|
|
2024
2075
|
--tw-border-opacity: 1;
|
|
2025
2076
|
border-color: rgb(255 255 255 / var(--tw-border-opacity));
|
|
@@ -2030,6 +2081,10 @@ video {
|
|
|
2030
2081
|
border-bottom-color: rgb(242 242 242 / var(--tw-border-opacity));
|
|
2031
2082
|
}
|
|
2032
2083
|
|
|
2084
|
+
.border-t-transparent {
|
|
2085
|
+
border-top-color: transparent;
|
|
2086
|
+
}
|
|
2087
|
+
|
|
2033
2088
|
.\!bg-\[\#285FA7\] {
|
|
2034
2089
|
--tw-bg-opacity: 1 !important;
|
|
2035
2090
|
background-color: rgb(40 95 167 / var(--tw-bg-opacity)) !important;
|
|
@@ -2147,6 +2202,10 @@ video {
|
|
|
2147
2202
|
--tw-bg-opacity: 1;
|
|
2148
2203
|
}
|
|
2149
2204
|
|
|
2205
|
+
.bg-opacity-20 {
|
|
2206
|
+
--tw-bg-opacity: 0.2;
|
|
2207
|
+
}
|
|
2208
|
+
|
|
2150
2209
|
.bg-opacity-50 {
|
|
2151
2210
|
--tw-bg-opacity: 0.5;
|
|
2152
2211
|
}
|
|
@@ -2175,6 +2234,22 @@ video {
|
|
|
2175
2234
|
fill: #fff !important;
|
|
2176
2235
|
}
|
|
2177
2236
|
|
|
2237
|
+
.fill-\[\#0D2B4F\] {
|
|
2238
|
+
fill: #0D2B4F;
|
|
2239
|
+
}
|
|
2240
|
+
|
|
2241
|
+
.fill-\[\#6c6c6c\] {
|
|
2242
|
+
fill: #6c6c6c;
|
|
2243
|
+
}
|
|
2244
|
+
|
|
2245
|
+
.stroke-\[\#0D2B4F\] {
|
|
2246
|
+
stroke: #0D2B4F;
|
|
2247
|
+
}
|
|
2248
|
+
|
|
2249
|
+
.stroke-\[\#6c6c6c\] {
|
|
2250
|
+
stroke: #6c6c6c;
|
|
2251
|
+
}
|
|
2252
|
+
|
|
2178
2253
|
.object-contain {
|
|
2179
2254
|
-o-object-fit: contain;
|
|
2180
2255
|
object-fit: contain;
|
|
@@ -3007,8 +3082,8 @@ video {
|
|
|
3007
3082
|
transition-duration: 150ms;
|
|
3008
3083
|
}
|
|
3009
3084
|
|
|
3010
|
-
.transition-\[background-color\2c color\] {
|
|
3011
|
-
transition-property: background-color,color;
|
|
3085
|
+
.transition-\[background-color\2c color\2c border-color\] {
|
|
3086
|
+
transition-property: background-color,color,border-color;
|
|
3012
3087
|
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
3013
3088
|
transition-duration: 150ms;
|
|
3014
3089
|
}
|
|
@@ -5312,10 +5387,22 @@ body {
|
|
|
5312
5387
|
margin-bottom: 80px;
|
|
5313
5388
|
}
|
|
5314
5389
|
|
|
5390
|
+
.max-sm\:ml-\[7px\] {
|
|
5391
|
+
margin-left: 7px;
|
|
5392
|
+
}
|
|
5393
|
+
|
|
5315
5394
|
.max-sm\:block {
|
|
5316
5395
|
display: block;
|
|
5317
5396
|
}
|
|
5318
5397
|
|
|
5398
|
+
.max-sm\:h-7 {
|
|
5399
|
+
height: 1.75rem;
|
|
5400
|
+
}
|
|
5401
|
+
|
|
5402
|
+
.max-sm\:h-8 {
|
|
5403
|
+
height: 2rem;
|
|
5404
|
+
}
|
|
5405
|
+
|
|
5319
5406
|
.max-sm\:h-\[25px\] {
|
|
5320
5407
|
height: 25px;
|
|
5321
5408
|
}
|
|
@@ -5336,6 +5423,14 @@ body {
|
|
|
5336
5423
|
height: 100%;
|
|
5337
5424
|
}
|
|
5338
5425
|
|
|
5426
|
+
.max-sm\:w-7 {
|
|
5427
|
+
width: 1.75rem;
|
|
5428
|
+
}
|
|
5429
|
+
|
|
5430
|
+
.max-sm\:w-8 {
|
|
5431
|
+
width: 2rem;
|
|
5432
|
+
}
|
|
5433
|
+
|
|
5339
5434
|
.max-sm\:w-\[100\%\] {
|
|
5340
5435
|
width: 100%;
|
|
5341
5436
|
}
|
|
@@ -6013,6 +6108,14 @@ body {
|
|
|
6013
6108
|
top: 5px;
|
|
6014
6109
|
}
|
|
6015
6110
|
|
|
6111
|
+
.sm\:mb-\[10px\] {
|
|
6112
|
+
margin-bottom: 10px;
|
|
6113
|
+
}
|
|
6114
|
+
|
|
6115
|
+
.sm\:mt-\[32px\] {
|
|
6116
|
+
margin-top: 32px;
|
|
6117
|
+
}
|
|
6118
|
+
|
|
6016
6119
|
.sm\:grid {
|
|
6017
6120
|
display: grid;
|
|
6018
6121
|
}
|