@daeryun/dr_components 1.2.18 → 1.2.19
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/cjs/tsconfig-cjs.tsbuildinfo +1 -1
- package/dist/components/Daeryuntalk/ChatButton.jsx +1 -1
- package/dist/components/Daeryuntalk/ChatButton.tsx +1 -1
- package/dist/components/Daeryuntalk/ChatWidget.d.ts +1 -0
- package/dist/components/Daeryuntalk/ChatWidget.jsx +114 -31
- package/dist/components/Daeryuntalk/ChatWidget.tsx +120 -37
- package/dist/components/Daeryuntalk/Viewer/TbPcViewer.tsx +0 -9
- package/dist/components/Daeryuntalk/index.jsx +17 -1
- package/dist/components/Daeryuntalk/index.tsx +26 -2
- package/dist/components/DaeryuntalkBackup/ChatButton.d.ts +11 -0
- package/dist/components/DaeryuntalkBackup/ChatButton.jsx +123 -0
- package/dist/components/DaeryuntalkBackup/ChatButton.tsx +157 -0
- package/dist/components/DaeryuntalkBackup/ChatConversation.d.ts +21 -0
- package/dist/components/DaeryuntalkBackup/ChatConversation.jsx +259 -0
- package/dist/components/DaeryuntalkBackup/ChatConversation.tsx +390 -0
- package/dist/components/DaeryuntalkBackup/ChatConversationItem/ChatConversationHeader.d.ts +16 -0
- package/dist/components/DaeryuntalkBackup/ChatConversationItem/ChatConversationHeader.jsx +50 -0
- package/dist/components/DaeryuntalkBackup/ChatConversationItem/ChatConversationHeader.tsx +108 -0
- package/dist/components/DaeryuntalkBackup/ChatHomeView.d.ts +14 -0
- package/dist/components/DaeryuntalkBackup/ChatHomeView.jsx +147 -0
- package/dist/components/DaeryuntalkBackup/ChatHomeView.tsx +262 -0
- package/dist/components/DaeryuntalkBackup/ChatInput.d.ts +8 -0
- package/dist/components/DaeryuntalkBackup/ChatInput.jsx +64 -0
- package/dist/components/DaeryuntalkBackup/ChatInput.tsx +98 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/AgeCheckBox.d.ts +6 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/AgeCheckBox.jsx +19 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/AgeCheckBox.tsx +27 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/ChatFile.d.ts +10 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/ChatFile.jsx +165 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/ChatFile.tsx +244 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/ChatLoading.d.ts +6 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/ChatLoading.jsx +12 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/ChatLoading.tsx +25 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/ChatPrivacyAuth.d.ts +8 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/ChatPrivacyAuth.jsx +100 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/ChatPrivacyAuth.tsx +135 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/ChatWrapper.d.ts +8 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/ChatWrapper.jsx +14 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/ChatWrapper.tsx +26 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/RichText.d.ts +7 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/RichText.jsx +37 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/RichText.tsx +45 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/TimeWrapper.d.ts +9 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/TimeWrapper.jsx +10 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/TimeWrapper.tsx +21 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/TypingComp.d.ts +3 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/TypingComp.jsx +34 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/TypingComp.tsx +43 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/WorkFlowAuthForm.d.ts +8 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/WorkFlowAuthForm.jsx +20 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/WorkFlowAuthForm.tsx +32 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/WorkFlowClickData.d.ts +7 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/WorkFlowClickData.jsx +21 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/WorkFlowClickData.tsx +37 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/WorkFlowImg.d.ts +9 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/WorkFlowImg.jsx +178 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/WorkFlowImg.tsx +233 -0
- package/dist/components/DaeryuntalkBackup/ChatMessage.d.ts +20 -0
- package/dist/components/DaeryuntalkBackup/ChatMessage.jsx +198 -0
- package/dist/components/DaeryuntalkBackup/ChatMessage.tsx +295 -0
- package/dist/components/DaeryuntalkBackup/ChatObject/FieldWorkObject.d.ts +9 -0
- package/dist/components/DaeryuntalkBackup/ChatObject/FieldWorkObject.jsx +39 -0
- package/dist/components/DaeryuntalkBackup/ChatObject/FieldWorkObject.tsx +75 -0
- package/dist/components/DaeryuntalkBackup/ChatObject/ObjectBack.d.ts +7 -0
- package/dist/components/DaeryuntalkBackup/ChatObject/ObjectBack.jsx +20 -0
- package/dist/components/DaeryuntalkBackup/ChatObject/ObjectBack.tsx +39 -0
- package/dist/components/DaeryuntalkBackup/ChatObject/ObjectButton.d.ts +10 -0
- package/dist/components/DaeryuntalkBackup/ChatObject/ObjectButton.jsx +138 -0
- package/dist/components/DaeryuntalkBackup/ChatObject/ObjectButton.tsx +177 -0
- package/dist/components/DaeryuntalkBackup/ChatWidget.d.ts +13 -0
- package/dist/components/DaeryuntalkBackup/ChatWidget.jsx +154 -0
- package/dist/components/DaeryuntalkBackup/ChatWidget.tsx +221 -0
- package/dist/components/DaeryuntalkBackup/DaeryuntalkContext.d.ts +103 -0
- package/dist/components/DaeryuntalkBackup/DaeryuntalkContext.jsx +207 -0
- package/dist/components/DaeryuntalkBackup/DaeryuntalkContext.tsx +350 -0
- package/dist/components/DaeryuntalkBackup/DateSeparator.d.ts +6 -0
- package/dist/components/DaeryuntalkBackup/DateSeparator.jsx +14 -0
- package/dist/components/DaeryuntalkBackup/DateSeparator.tsx +24 -0
- package/dist/components/DaeryuntalkBackup/FixedErrorBox.d.ts +7 -0
- package/dist/components/DaeryuntalkBackup/FixedErrorBox.jsx +34 -0
- package/dist/components/DaeryuntalkBackup/FixedErrorBox.tsx +73 -0
- package/dist/components/DaeryuntalkBackup/History/AuthForm.d.ts +10 -0
- package/dist/components/DaeryuntalkBackup/History/AuthForm.jsx +157 -0
- package/dist/components/DaeryuntalkBackup/History/AuthForm.tsx +206 -0
- package/dist/components/DaeryuntalkBackup/HistoryView.d.ts +19 -0
- package/dist/components/DaeryuntalkBackup/HistoryView.jsx +94 -0
- package/dist/components/DaeryuntalkBackup/HistoryView.tsx +182 -0
- package/dist/components/DaeryuntalkBackup/HomeView.d.ts +12 -0
- package/dist/components/DaeryuntalkBackup/HomeView.jsx +178 -0
- package/dist/components/DaeryuntalkBackup/HomeView.tsx +261 -0
- package/dist/components/DaeryuntalkBackup/NavigationFooter.d.ts +11 -0
- package/dist/components/DaeryuntalkBackup/NavigationFooter.jsx +44 -0
- package/dist/components/DaeryuntalkBackup/NavigationFooter.tsx +98 -0
- package/dist/components/DaeryuntalkBackup/NoticeMessage.d.ts +7 -0
- package/dist/components/DaeryuntalkBackup/NoticeMessage.jsx +40 -0
- package/dist/components/DaeryuntalkBackup/NoticeMessage.tsx +60 -0
- package/dist/components/DaeryuntalkBackup/Tiptap/DisabledInput.d.ts +6 -0
- package/dist/components/DaeryuntalkBackup/Tiptap/DisabledInput.jsx +17 -0
- package/dist/components/DaeryuntalkBackup/Tiptap/DisabledInput.tsx +28 -0
- package/dist/components/DaeryuntalkBackup/Tiptap/Tiptap.d.ts +20 -0
- package/dist/components/DaeryuntalkBackup/Tiptap/Tiptap.jsx +130 -0
- package/dist/components/DaeryuntalkBackup/Tiptap/Tiptap.tsx +181 -0
- package/dist/components/DaeryuntalkBackup/Toast/DaeryuntalkToastProvider.d.ts +23 -0
- package/dist/components/DaeryuntalkBackup/Toast/DaeryuntalkToastProvider.jsx +40 -0
- package/dist/components/DaeryuntalkBackup/Toast/DaeryuntalkToastProvider.tsx +70 -0
- package/dist/components/DaeryuntalkBackup/Toast/Toast.d.ts +11 -0
- package/dist/components/DaeryuntalkBackup/Toast/Toast.jsx +64 -0
- package/dist/components/DaeryuntalkBackup/Toast/Toast.tsx +98 -0
- package/dist/components/DaeryuntalkBackup/Toast/ToastRender.d.ts +1 -0
- package/dist/components/DaeryuntalkBackup/Toast/ToastRender.jsx +22 -0
- package/dist/components/DaeryuntalkBackup/Toast/ToastRender.tsx +30 -0
- package/dist/components/DaeryuntalkBackup/Viewer/ImageViewer.d.ts +9 -0
- package/dist/components/DaeryuntalkBackup/Viewer/ImageViewer.jsx +98 -0
- package/dist/components/DaeryuntalkBackup/Viewer/ImageViewer.tsx +138 -0
- package/dist/components/DaeryuntalkBackup/Viewer/MobileViewer.d.ts +18 -0
- package/dist/components/DaeryuntalkBackup/Viewer/MobileViewer.jsx +104 -0
- package/dist/components/DaeryuntalkBackup/Viewer/MobileViewer.tsx +182 -0
- package/dist/components/DaeryuntalkBackup/Viewer/TbPcViewer.d.ts +24 -0
- package/dist/components/DaeryuntalkBackup/Viewer/TbPcViewer.jsx +141 -0
- package/dist/components/DaeryuntalkBackup/Viewer/TbPcViewer.tsx +278 -0
- package/dist/components/DaeryuntalkBackup/ViewportHandler.d.ts +6 -0
- package/dist/components/DaeryuntalkBackup/ViewportHandler.jsx +25 -0
- package/dist/components/DaeryuntalkBackup/ViewportHandler.tsx +32 -0
- package/dist/components/DaeryuntalkBackup/_api/daeryuntalk/index.d.ts +177 -0
- package/dist/components/DaeryuntalkBackup/_api/daeryuntalk/index.js +801 -0
- package/dist/components/DaeryuntalkBackup/_api/daeryuntalk/index.ts +1097 -0
- package/dist/components/DaeryuntalkBackup/_api/daeryuntalk/type/response.d.ts +131 -0
- package/dist/components/DaeryuntalkBackup/_api/daeryuntalk/type/response.js +1 -0
- package/dist/components/DaeryuntalkBackup/_api/daeryuntalk/type/response.ts +159 -0
- package/dist/components/DaeryuntalkBackup/_api/index.d.ts +6 -0
- package/dist/components/DaeryuntalkBackup/_api/index.js +6 -0
- package/dist/components/DaeryuntalkBackup/_api/index.ts +7 -0
- package/dist/components/DaeryuntalkBackup/_enums/ags_check_status.d.ts +5 -0
- package/dist/components/DaeryuntalkBackup/_enums/ags_check_status.js +9 -0
- package/dist/components/DaeryuntalkBackup/_enums/ags_check_status.ts +9 -0
- package/dist/components/DaeryuntalkBackup/_enums/ask-status.d.ts +13 -0
- package/dist/components/DaeryuntalkBackup/_enums/ask-status.js +25 -0
- package/dist/components/DaeryuntalkBackup/_enums/ask-status.ts +26 -0
- package/dist/components/DaeryuntalkBackup/_enums/error.d.ts +109 -0
- package/dist/components/DaeryuntalkBackup/_enums/error.js +254 -0
- package/dist/components/DaeryuntalkBackup/_enums/error.ts +289 -0
- package/dist/components/DaeryuntalkBackup/_enums/message_type.d.ts +6 -0
- package/dist/components/DaeryuntalkBackup/_enums/message_type.js +13 -0
- package/dist/components/DaeryuntalkBackup/_enums/message_type.ts +13 -0
- package/dist/components/DaeryuntalkBackup/_enums/sender_type.d.ts +8 -0
- package/dist/components/DaeryuntalkBackup/_enums/sender_type.js +16 -0
- package/dist/components/DaeryuntalkBackup/_enums/sender_type.ts +16 -0
- package/dist/components/DaeryuntalkBackup/_enums/socket_type.d.ts +34 -0
- package/dist/components/DaeryuntalkBackup/_enums/socket_type.js +46 -0
- package/dist/components/DaeryuntalkBackup/_enums/socket_type.ts +56 -0
- package/dist/components/DaeryuntalkBackup/_enums/template.d.ts +32 -0
- package/dist/components/DaeryuntalkBackup/_enums/template.js +76 -0
- package/dist/components/DaeryuntalkBackup/_enums/template.ts +81 -0
- package/dist/components/DaeryuntalkBackup/_enums/work_flow_object_expose.d.ts +33 -0
- package/dist/components/DaeryuntalkBackup/_enums/work_flow_object_expose.js +66 -0
- package/dist/components/DaeryuntalkBackup/_enums/work_flow_object_expose.ts +71 -0
- package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useChatHandler.d.ts +48 -0
- package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useChatHandler.js +465 -0
- package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useChatHandler.ts +595 -0
- package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useFullURL.d.ts +1 -0
- package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useFullURL.jsx +15 -0
- package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useFullURL.tsx +17 -0
- package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useHistoryHandler.d.ts +24 -0
- package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useHistoryHandler.js +112 -0
- package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useHistoryHandler.ts +144 -0
- package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useSocketEventHandler.d.ts +44 -0
- package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useSocketEventHandler.js +534 -0
- package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useSocketEventHandler.ts +706 -0
- package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useViewerHook.d.ts +8 -0
- package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useViewerHook.js +18 -0
- package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useViewerHook.ts +23 -0
- package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useWorkFlow.d.ts +9 -0
- package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useWorkFlow.js +109 -0
- package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useWorkFlow.ts +121 -0
- package/dist/components/DaeryuntalkBackup/_hooks/useHoverScrollbar.d.ts +12 -0
- package/dist/components/DaeryuntalkBackup/_hooks/useHoverScrollbar.js +48 -0
- package/dist/components/DaeryuntalkBackup/_hooks/useHoverScrollbar.ts +73 -0
- package/dist/components/DaeryuntalkBackup/_hooks/useScrollShadow.d.ts +7 -0
- package/dist/components/DaeryuntalkBackup/_hooks/useScrollShadow.js +42 -0
- package/dist/components/DaeryuntalkBackup/_hooks/useScrollShadow.ts +52 -0
- package/dist/components/DaeryuntalkBackup/_hooks/useWindowSize.d.ts +6 -0
- package/dist/components/DaeryuntalkBackup/_hooks/useWindowSize.js +20 -0
- package/dist/components/DaeryuntalkBackup/_hooks/useWindowSize.ts +30 -0
- package/dist/components/DaeryuntalkBackup/_hooks/view/useChatSocketState.d.ts +2 -0
- package/dist/components/DaeryuntalkBackup/_hooks/view/useChatSocketState.js +26 -0
- package/dist/components/DaeryuntalkBackup/_hooks/view/useChatSocketState.ts +43 -0
- package/dist/components/DaeryuntalkBackup/_hooks/view/useHistoryView.d.ts +27 -0
- package/dist/components/DaeryuntalkBackup/_hooks/view/useHistoryView.js +80 -0
- package/dist/components/DaeryuntalkBackup/_hooks/view/useHistoryView.ts +101 -0
- package/dist/components/DaeryuntalkBackup/_hooks/view/useHomeView.d.ts +18 -0
- package/dist/components/DaeryuntalkBackup/_hooks/view/useHomeView.js +66 -0
- package/dist/components/DaeryuntalkBackup/_hooks/view/useHomeView.ts +75 -0
- package/dist/components/DaeryuntalkBackup/_lib/index.d.ts +7 -0
- package/dist/components/DaeryuntalkBackup/_lib/index.js +103 -0
- package/dist/components/DaeryuntalkBackup/_lib/index.ts +136 -0
- package/dist/components/DaeryuntalkBackup/_lib/utils.d.ts +17 -0
- package/dist/components/DaeryuntalkBackup/_lib/utils.js +94 -0
- package/dist/components/DaeryuntalkBackup/_lib/utils.ts +119 -0
- package/dist/components/DaeryuntalkBackup/_types/message.d.ts +92 -0
- package/dist/components/DaeryuntalkBackup/_types/message.js +25 -0
- package/dist/components/DaeryuntalkBackup/_types/message.ts +156 -0
- package/dist/components/DaeryuntalkBackup/_types/message_object.d.ts +17 -0
- package/dist/components/DaeryuntalkBackup/_types/message_object.js +1 -0
- package/dist/components/DaeryuntalkBackup/_types/message_object.ts +18 -0
- package/dist/components/DaeryuntalkBackup/_types/socket/workflow.d.ts +15 -0
- package/dist/components/DaeryuntalkBackup/_types/socket/workflow.js +1 -0
- package/dist/components/DaeryuntalkBackup/_types/socket/workflow.ts +15 -0
- package/dist/components/DaeryuntalkBackup/_ui/ShadowBox.d.ts +6 -0
- package/dist/components/DaeryuntalkBackup/_ui/ShadowBox.jsx +5 -0
- package/dist/components/DaeryuntalkBackup/_ui/ShadowBox.tsx +15 -0
- package/dist/components/DaeryuntalkBackup/_ui/buttons/Button1.d.ts +10 -0
- package/dist/components/DaeryuntalkBackup/_ui/buttons/Button1.jsx +12 -0
- package/dist/components/DaeryuntalkBackup/_ui/buttons/Button1.tsx +29 -0
- package/dist/components/DaeryuntalkBackup/_ui/buttons/Button2.d.ts +10 -0
- package/dist/components/DaeryuntalkBackup/_ui/buttons/Button2.jsx +12 -0
- package/dist/components/DaeryuntalkBackup/_ui/buttons/Button2.tsx +29 -0
- package/dist/components/DaeryuntalkBackup/_ui/buttons/Button3.d.ts +10 -0
- package/dist/components/DaeryuntalkBackup/_ui/buttons/Button3.jsx +12 -0
- package/dist/components/DaeryuntalkBackup/_ui/buttons/Button3.tsx +29 -0
- package/dist/components/DaeryuntalkBackup/_ui/buttons/Button4.d.ts +10 -0
- package/dist/components/DaeryuntalkBackup/_ui/buttons/Button4.jsx +12 -0
- package/dist/components/DaeryuntalkBackup/_ui/buttons/Button4.tsx +29 -0
- package/dist/components/DaeryuntalkBackup/_ui/checkboxs/CheckBox1.d.ts +8 -0
- package/dist/components/DaeryuntalkBackup/_ui/checkboxs/CheckBox1.jsx +15 -0
- package/dist/components/DaeryuntalkBackup/_ui/checkboxs/CheckBox1.tsx +38 -0
- package/dist/components/DaeryuntalkBackup/_ui/checkboxs/CheckBox2.d.ts +8 -0
- package/dist/components/DaeryuntalkBackup/_ui/checkboxs/CheckBox2.jsx +21 -0
- package/dist/components/DaeryuntalkBackup/_ui/checkboxs/CheckBox2.tsx +50 -0
- package/dist/components/DaeryuntalkBackup/_ui/inputs/Input1.d.ts +12 -0
- package/dist/components/DaeryuntalkBackup/_ui/inputs/Input1.jsx +9 -0
- package/dist/components/DaeryuntalkBackup/_ui/inputs/Input1.tsx +39 -0
- package/dist/components/DaeryuntalkBackup/_ui/inputs/Input2.d.ts +13 -0
- package/dist/components/DaeryuntalkBackup/_ui/inputs/Input2.jsx +10 -0
- package/dist/components/DaeryuntalkBackup/_ui/inputs/Input2.tsx +43 -0
- package/dist/components/DaeryuntalkBackup/index.d.ts +8 -0
- package/dist/components/DaeryuntalkBackup/index.jsx +190 -0
- package/dist/components/DaeryuntalkBackup/index.tsx +261 -0
- package/dist/components/common/integrate/index.d.ts +1 -1
- package/dist/styles/globals.css +415 -410
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import React, { useRef } from 'react';
|
|
2
|
+
import { formatDateToKorean } from '../_lib/utils';
|
|
3
|
+
import Image from 'next/image';
|
|
4
|
+
import { Swiper, SwiperSlide } from 'swiper/react';
|
|
5
|
+
import 'swiper/css';
|
|
6
|
+
import 'swiper/css/navigation';
|
|
7
|
+
const MobileViewer = ({ imageViewerMessage, handleDownload, currentIndex, setCurrentIndex, currentImage, closeImageViewer, previewImages, setRotation, setZoomLevel }) => {
|
|
8
|
+
const thumbSwiperRef = useRef(null);
|
|
9
|
+
const s3Url = process.env.NEXT_PUBLIC_S3_URL;
|
|
10
|
+
const DaeryunLogoIcon = `${s3Url}/daeryuntalk/daeryun-logo.svg`;
|
|
11
|
+
const DownloadIcon = `${s3Url}/daeryuntalk/download.svg`;
|
|
12
|
+
const CloseIcon = `${s3Url}/daeryuntalk/viewer/close.svg`;
|
|
13
|
+
return (<div className={`md2:hidden`}>
|
|
14
|
+
<div className="flex h-[68px] w-full items-center justify-between bg-black/90 p-[20px] text-white">
|
|
15
|
+
<div className="flex w-[calc(100%-88px)] gap-[10px]">
|
|
16
|
+
<div className={`flex items-start gap-[10px] `}>
|
|
17
|
+
<div className="flex-shrink-0 rounded-full">
|
|
18
|
+
<div className="relative h-full w-full">
|
|
19
|
+
<Image src={DaeryunLogoIcon} alt="대륜 로고" width={28} height={28}/>
|
|
20
|
+
{/* <DaeryunLogoIcon width={28} height={28} /> */}
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
<div className={`flex flex-col text-drTalkWhite`}>
|
|
25
|
+
<div className={`dr_talk_subtitle_medium2 flex h-[28px] items-center justify-center`}>
|
|
26
|
+
법무법인(유한)대륜
|
|
27
|
+
</div>
|
|
28
|
+
<span className={'dr_talk_subtitle_small2'}>
|
|
29
|
+
{formatDateToKorean((imageViewerMessage === null || imageViewerMessage === void 0 ? void 0 : imageViewerMessage.createdAt.toString()) || '')}
|
|
30
|
+
</span>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
<div className={`flex flex-row items-center justify-center gap-[20px] `}>
|
|
34
|
+
<button onClick={handleDownload}>
|
|
35
|
+
<Image src={DownloadIcon} alt="다운로드" width={24} height={24} className="bg-transparent text-white"/>
|
|
36
|
+
{/* <DownloadIcon className="h-6 w-6 bg-transparent text-white" /> */}
|
|
37
|
+
</button>
|
|
38
|
+
<div>ㅣ</div>
|
|
39
|
+
<button onClick={closeImageViewer} className="">
|
|
40
|
+
<Image src={CloseIcon} alt="닫기" width={24} height={24} className="h-6 w-6"/>
|
|
41
|
+
{/* <CloseIcon className="h-6 w-6" /> */}
|
|
42
|
+
</button>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
{/* 해당 공간은 중앙 배치 및 화면작아지면 스크롤 */}
|
|
46
|
+
|
|
47
|
+
<div className={`mx-[20px] flex h-[calc(100dvh-68px-155px)] flex-col items-center justify-center overflow-auto`}>
|
|
48
|
+
<div className="group relative flex h-full w-full items-center justify-center overflow-auto">
|
|
49
|
+
<Swiper spaceBetween={2} slidesPerView={1} initialSlide={currentIndex} onSlideChange={swiper => {
|
|
50
|
+
setCurrentIndex(swiper.activeIndex);
|
|
51
|
+
setRotation(0);
|
|
52
|
+
setZoomLevel(3);
|
|
53
|
+
}} onSwiper={swiper => {
|
|
54
|
+
thumbSwiperRef.current = swiper;
|
|
55
|
+
}} allowTouchMove={previewImages.length > 1} className="!h-full w-full">
|
|
56
|
+
{previewImages.map((img, idx) => (<SwiperSlide key={idx} className="flex !h-full items-center justify-center">
|
|
57
|
+
<div className="relative flex h-full w-full items-center justify-center">
|
|
58
|
+
<Image src={img.url} alt={img.file.name} width={500} height={500} className="h-auto max-h-full w-auto max-w-full rounded-[20px] object-contain" unoptimized/>
|
|
59
|
+
</div>
|
|
60
|
+
</SwiperSlide>))}
|
|
61
|
+
</Swiper>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
{/*<div*/}
|
|
65
|
+
{/* className={`mx-[20px] flex h-[calc(100dvh-68px-155px)] flex-col items-center justify-center overflow-auto`}*/}
|
|
66
|
+
{/*>*/}
|
|
67
|
+
{/* <div className="group relative flex items-center justify-center overflow-auto">*/}
|
|
68
|
+
{/* <div className="relative h-auto max-h-[500px] w-full">*/}
|
|
69
|
+
{/* <Image*/}
|
|
70
|
+
{/* src={currentImage.url}*/}
|
|
71
|
+
{/* alt={currentImage.file.name}*/}
|
|
72
|
+
{/* width={500}*/}
|
|
73
|
+
{/* height={500}*/}
|
|
74
|
+
{/* className="h-auto w-full rounded-[20px] object-contain"*/}
|
|
75
|
+
{/* unoptimized*/}
|
|
76
|
+
{/* />*/}
|
|
77
|
+
{/* </div>*/}
|
|
78
|
+
{/* </div>*/}
|
|
79
|
+
{/*</div>*/}
|
|
80
|
+
{/* Thumbnail Preview */}
|
|
81
|
+
<div className="relative m-auto flex max-w-[350px] items-center justify-center px-[20px] pb-[65px] pt-[40px]">
|
|
82
|
+
{previewImages.length > 1 ? (<Swiper spaceBetween={10} slidesPerView={Math.min(previewImages.length, 5)} watchSlidesProgress allowTouchMove>
|
|
83
|
+
{previewImages.map((img, idx) => (<SwiperSlide key={idx} className={`!w-fit`}>
|
|
84
|
+
<div onClick={() => {
|
|
85
|
+
var _a;
|
|
86
|
+
setCurrentIndex(idx);
|
|
87
|
+
setRotation(0);
|
|
88
|
+
setZoomLevel(3);
|
|
89
|
+
(_a = thumbSwiperRef.current) === null || _a === void 0 ? void 0 : _a.slideTo(idx); // 👈 스와이퍼 이동
|
|
90
|
+
}} className={`
|
|
91
|
+
relative
|
|
92
|
+
h-[50px] w-[50px] cursor-pointer overflow-hidden rounded-[10px] border-[1px]
|
|
93
|
+
${idx === currentIndex ? 'border-white' : 'opacity-50 hover:border-white hover:opacity-100'}
|
|
94
|
+
`}>
|
|
95
|
+
{/*<div className={`absolute left-0 top-0 bg-yellow-200 !text-black`}>{idx}</div>*/}
|
|
96
|
+
|
|
97
|
+
<Image src={img.file.thumbnailUrl} alt={img.file.name} width={200} height={200} className="h-full w-full object-cover" unoptimized/>
|
|
98
|
+
</div>
|
|
99
|
+
</SwiperSlide>))}
|
|
100
|
+
</Swiper>) : (<div></div>)}
|
|
101
|
+
</div>
|
|
102
|
+
</div>);
|
|
103
|
+
};
|
|
104
|
+
export default MobileViewer;
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import React, { Dispatch, SetStateAction, useRef } from 'react';
|
|
2
|
+
import { formatDateToKorean } from '../_lib/utils';
|
|
3
|
+
import { Message } from '../_types/message';
|
|
4
|
+
import Image from 'next/image';
|
|
5
|
+
import { PreviewImage } from './ImageViewer';
|
|
6
|
+
import { Swiper, SwiperSlide } from 'swiper/react';
|
|
7
|
+
import { Swiper as SwiperClass } from 'swiper';
|
|
8
|
+
import 'swiper/css';
|
|
9
|
+
import 'swiper/css/navigation';
|
|
10
|
+
// 이미지
|
|
11
|
+
// import DaeryunLogoIcon from '../../../asset/images/daeryuntalk/daeryun-logo.svg';
|
|
12
|
+
// import DownloadIcon from '../../../asset/images/daeryuntalk/download.svg';
|
|
13
|
+
// import CloseIcon from '../../../asset/images/daeryuntalk/viewer/close.svg';
|
|
14
|
+
interface IMobileViewerProps {
|
|
15
|
+
imageViewerMessage?: Message | null;
|
|
16
|
+
handleDownload: () => void;
|
|
17
|
+
currentIndex: number;
|
|
18
|
+
setCurrentIndex: Dispatch<SetStateAction<number>>;
|
|
19
|
+
currentImage: PreviewImage;
|
|
20
|
+
closeImageViewer?: () => void;
|
|
21
|
+
previewImages: PreviewImage[];
|
|
22
|
+
setRotation: Dispatch<SetStateAction<number>>;
|
|
23
|
+
setZoomLevel: Dispatch<SetStateAction<number>>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const MobileViewer = ({
|
|
27
|
+
imageViewerMessage,
|
|
28
|
+
handleDownload,
|
|
29
|
+
currentIndex,
|
|
30
|
+
setCurrentIndex,
|
|
31
|
+
currentImage,
|
|
32
|
+
closeImageViewer,
|
|
33
|
+
previewImages,
|
|
34
|
+
setRotation,
|
|
35
|
+
setZoomLevel
|
|
36
|
+
}: IMobileViewerProps) => {
|
|
37
|
+
const thumbSwiperRef = useRef<SwiperClass | null>(null);
|
|
38
|
+
const s3Url = process.env.NEXT_PUBLIC_S3_URL;
|
|
39
|
+
const DaeryunLogoIcon = `${s3Url}/daeryuntalk/daeryun-logo.svg`;
|
|
40
|
+
const DownloadIcon = `${s3Url}/daeryuntalk/download.svg`;
|
|
41
|
+
const CloseIcon = `${s3Url}/daeryuntalk/viewer/close.svg`;
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<div className={`md2:hidden`}>
|
|
45
|
+
<div className="flex h-[68px] w-full items-center justify-between bg-black/90 p-[20px] text-white">
|
|
46
|
+
<div className="flex w-[calc(100%-88px)] gap-[10px]">
|
|
47
|
+
<div className={`flex items-start gap-[10px] `}>
|
|
48
|
+
<div className="flex-shrink-0 rounded-full">
|
|
49
|
+
<div className="relative h-full w-full">
|
|
50
|
+
<Image src={DaeryunLogoIcon} alt="대륜 로고" width={28} height={28} />
|
|
51
|
+
{/* <DaeryunLogoIcon width={28} height={28} /> */}
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
<div className={`flex flex-col text-drTalkWhite`}>
|
|
56
|
+
<div className={`dr_talk_subtitle_medium2 flex h-[28px] items-center justify-center`}>
|
|
57
|
+
법무법인(유한)대륜
|
|
58
|
+
</div>
|
|
59
|
+
<span className={'dr_talk_subtitle_small2'}>
|
|
60
|
+
{formatDateToKorean(imageViewerMessage?.createdAt.toString() || '')}
|
|
61
|
+
</span>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
<div className={`flex flex-row items-center justify-center gap-[20px] `}>
|
|
65
|
+
<button onClick={handleDownload}>
|
|
66
|
+
<Image
|
|
67
|
+
src={DownloadIcon}
|
|
68
|
+
alt="다운로드"
|
|
69
|
+
width={24}
|
|
70
|
+
height={24}
|
|
71
|
+
className="bg-transparent text-white"
|
|
72
|
+
/>
|
|
73
|
+
{/* <DownloadIcon className="h-6 w-6 bg-transparent text-white" /> */}
|
|
74
|
+
</button>
|
|
75
|
+
<div>ㅣ</div>
|
|
76
|
+
<button onClick={closeImageViewer} className="">
|
|
77
|
+
<Image src={CloseIcon} alt="닫기" width={24} height={24} className="h-6 w-6" />
|
|
78
|
+
{/* <CloseIcon className="h-6 w-6" /> */}
|
|
79
|
+
</button>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
{/* 해당 공간은 중앙 배치 및 화면작아지면 스크롤 */}
|
|
83
|
+
|
|
84
|
+
<div
|
|
85
|
+
className={`mx-[20px] flex h-[calc(100dvh-68px-155px)] flex-col items-center justify-center overflow-auto`}
|
|
86
|
+
>
|
|
87
|
+
<div className="group relative flex h-full w-full items-center justify-center overflow-auto">
|
|
88
|
+
<Swiper
|
|
89
|
+
spaceBetween={2}
|
|
90
|
+
slidesPerView={1}
|
|
91
|
+
initialSlide={currentIndex}
|
|
92
|
+
onSlideChange={swiper => {
|
|
93
|
+
setCurrentIndex(swiper.activeIndex);
|
|
94
|
+
setRotation(0);
|
|
95
|
+
setZoomLevel(3);
|
|
96
|
+
}}
|
|
97
|
+
onSwiper={swiper => {
|
|
98
|
+
thumbSwiperRef.current = swiper;
|
|
99
|
+
}}
|
|
100
|
+
allowTouchMove={previewImages.length > 1}
|
|
101
|
+
className="!h-full w-full"
|
|
102
|
+
>
|
|
103
|
+
{previewImages.map((img, idx) => (
|
|
104
|
+
<SwiperSlide key={idx} className="flex !h-full items-center justify-center">
|
|
105
|
+
<div className="relative flex h-full w-full items-center justify-center">
|
|
106
|
+
<Image
|
|
107
|
+
src={img.url}
|
|
108
|
+
alt={img.file.name}
|
|
109
|
+
width={500}
|
|
110
|
+
height={500}
|
|
111
|
+
className="h-auto max-h-full w-auto max-w-full rounded-[20px] object-contain"
|
|
112
|
+
unoptimized
|
|
113
|
+
/>
|
|
114
|
+
</div>
|
|
115
|
+
</SwiperSlide>
|
|
116
|
+
))}
|
|
117
|
+
</Swiper>
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
{/*<div*/}
|
|
121
|
+
{/* className={`mx-[20px] flex h-[calc(100dvh-68px-155px)] flex-col items-center justify-center overflow-auto`}*/}
|
|
122
|
+
{/*>*/}
|
|
123
|
+
{/* <div className="group relative flex items-center justify-center overflow-auto">*/}
|
|
124
|
+
{/* <div className="relative h-auto max-h-[500px] w-full">*/}
|
|
125
|
+
{/* <Image*/}
|
|
126
|
+
{/* src={currentImage.url}*/}
|
|
127
|
+
{/* alt={currentImage.file.name}*/}
|
|
128
|
+
{/* width={500}*/}
|
|
129
|
+
{/* height={500}*/}
|
|
130
|
+
{/* className="h-auto w-full rounded-[20px] object-contain"*/}
|
|
131
|
+
{/* unoptimized*/}
|
|
132
|
+
{/* />*/}
|
|
133
|
+
{/* </div>*/}
|
|
134
|
+
{/* </div>*/}
|
|
135
|
+
{/*</div>*/}
|
|
136
|
+
{/* Thumbnail Preview */}
|
|
137
|
+
<div className="relative m-auto flex max-w-[350px] items-center justify-center px-[20px] pb-[65px] pt-[40px]">
|
|
138
|
+
{previewImages.length > 1 ? (
|
|
139
|
+
<Swiper
|
|
140
|
+
spaceBetween={10}
|
|
141
|
+
slidesPerView={Math.min(previewImages.length, 5)}
|
|
142
|
+
watchSlidesProgress
|
|
143
|
+
allowTouchMove
|
|
144
|
+
>
|
|
145
|
+
{previewImages.map((img, idx) => (
|
|
146
|
+
<SwiperSlide key={idx} className={`!w-fit`}>
|
|
147
|
+
<div
|
|
148
|
+
onClick={() => {
|
|
149
|
+
setCurrentIndex(idx);
|
|
150
|
+
setRotation(0);
|
|
151
|
+
setZoomLevel(3);
|
|
152
|
+
thumbSwiperRef.current?.slideTo(idx); // 👈 스와이퍼 이동
|
|
153
|
+
}}
|
|
154
|
+
className={`
|
|
155
|
+
relative
|
|
156
|
+
h-[50px] w-[50px] cursor-pointer overflow-hidden rounded-[10px] border-[1px]
|
|
157
|
+
${idx === currentIndex ? 'border-white' : 'opacity-50 hover:border-white hover:opacity-100'}
|
|
158
|
+
`}
|
|
159
|
+
>
|
|
160
|
+
{/*<div className={`absolute left-0 top-0 bg-yellow-200 !text-black`}>{idx}</div>*/}
|
|
161
|
+
|
|
162
|
+
<Image
|
|
163
|
+
src={img.file.thumbnailUrl}
|
|
164
|
+
alt={img.file.name}
|
|
165
|
+
width={200}
|
|
166
|
+
height={200}
|
|
167
|
+
className="h-full w-full object-cover"
|
|
168
|
+
unoptimized
|
|
169
|
+
/>
|
|
170
|
+
</div>
|
|
171
|
+
</SwiperSlide>
|
|
172
|
+
))}
|
|
173
|
+
</Swiper>
|
|
174
|
+
) : (
|
|
175
|
+
<div></div>
|
|
176
|
+
)}
|
|
177
|
+
</div>
|
|
178
|
+
</div>
|
|
179
|
+
);
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
export default MobileViewer;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React, { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import { Message } from '../_types/message';
|
|
3
|
+
import { PreviewImage } from './ImageViewer';
|
|
4
|
+
import 'swiper/css';
|
|
5
|
+
import 'swiper/css/navigation';
|
|
6
|
+
interface ITbPcViewerProps {
|
|
7
|
+
imageViewerMessage?: Message | null;
|
|
8
|
+
handleDownload: () => void;
|
|
9
|
+
currentIndex: number;
|
|
10
|
+
setCurrentIndex: Dispatch<SetStateAction<number>>;
|
|
11
|
+
rotation: number;
|
|
12
|
+
currentZoom: number;
|
|
13
|
+
currentImage: PreviewImage;
|
|
14
|
+
closeImageViewer?: () => void;
|
|
15
|
+
previewImages: PreviewImage[];
|
|
16
|
+
setRotation: Dispatch<SetStateAction<number>>;
|
|
17
|
+
setZoomLevel: Dispatch<SetStateAction<number>>;
|
|
18
|
+
rotateImage: () => void;
|
|
19
|
+
zoomIn: () => void;
|
|
20
|
+
zoomOut: () => void;
|
|
21
|
+
zoomLevel: number;
|
|
22
|
+
}
|
|
23
|
+
declare const TbPcViewer: ({ imageViewerMessage, handleDownload, currentIndex, setCurrentIndex, rotation, currentZoom, currentImage, closeImageViewer, previewImages, setRotation, setZoomLevel, rotateImage, zoomIn, zoomOut, zoomLevel }: ITbPcViewerProps) => React.JSX.Element;
|
|
24
|
+
export default TbPcViewer;
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ZOOM_LEVELS } from './ImageViewer';
|
|
3
|
+
import Image from 'next/image';
|
|
4
|
+
import { formatDateToKorean } from '../_lib/utils';
|
|
5
|
+
import { Swiper, SwiperSlide } from 'swiper/react';
|
|
6
|
+
import 'swiper/css';
|
|
7
|
+
import 'swiper/css/navigation';
|
|
8
|
+
const TbPcViewer = ({ imageViewerMessage, handleDownload, currentIndex, setCurrentIndex, rotation, currentZoom, currentImage, closeImageViewer, previewImages, setRotation, setZoomLevel, rotateImage, zoomIn, zoomOut, zoomLevel }) => {
|
|
9
|
+
var _a;
|
|
10
|
+
const s3Url = process.env.NEXT_PUBLIC_S3_URL;
|
|
11
|
+
const rotateCCWIcon = `${s3Url}/daeryuntalk/viewer/rotate.svg`;
|
|
12
|
+
const zoomOutIcon = `${s3Url}/daeryuntalk/viewer/zoom-out.svg`;
|
|
13
|
+
const zoomInIcon = `${s3Url}/daeryuntalk/viewer/zoom-in.svg`;
|
|
14
|
+
const downloadIcon = `${s3Url}/daeryuntalk/download.svg`;
|
|
15
|
+
const closeIcon = `${s3Url}/daeryuntalk/viewer/close.svg`;
|
|
16
|
+
const moveSwipingIcon = `${s3Url}/daeryuntalk/viewer/move-button.svg`;
|
|
17
|
+
const daeryunLogoIcon = `${s3Url}/daeryuntalk/daeryun-logo.svg`;
|
|
18
|
+
return (<div className={`hidden md2:block`}>
|
|
19
|
+
<div className={`flex h-[100dvh] flex-col items-center justify-center gap-[60px] px-[88px]`}>
|
|
20
|
+
{/* Main Image + Toolbar */}
|
|
21
|
+
<div className="group relative flex max-h-[80vh] max-w-[90vw] items-center justify-center md2:w-[800px] ">
|
|
22
|
+
{/* 고정된 위치의 좌측 네비게이션 버튼 */}
|
|
23
|
+
<button onClick={() => setCurrentIndex(prev => prev - 1)} disabled={currentIndex < 1} className={`${currentIndex < 1 ? ' disabled:pointer-events-none disabled:opacity-30 ' : ' hover:scale-110 '} absolute top-1/2 z-20 -translate-y-1/2 rotate-180 text-white transition-transform md2:-left-[48px] lg:-left-[68px]`}>
|
|
24
|
+
<Image src={moveSwipingIcon} alt="이동" width={48} height={48} className="h-full w-full text-white"/>
|
|
25
|
+
</button>
|
|
26
|
+
|
|
27
|
+
{/* 고정된 위치의 우측 네비게이션 버튼 */}
|
|
28
|
+
<button disabled={currentIndex >= previewImages.length - 1} onClick={() => setCurrentIndex(prev => prev + 1)} className={`
|
|
29
|
+
${currentIndex >= previewImages.length - 1 ? ' disabled:opacity-30 ' : ' hover:scale-110 '}
|
|
30
|
+
absolute top-1/2 z-20 -translate-y-1/2 text-white transition-transform md2:-right-[48px] lg:-right-[68px]
|
|
31
|
+
`}>
|
|
32
|
+
<Image src={moveSwipingIcon} alt="이동" width={48} height={48} className="h-full w-full text-white"/>
|
|
33
|
+
</button>
|
|
34
|
+
|
|
35
|
+
{/* 고정된 위치의 닫기 버튼 */}
|
|
36
|
+
<button onClick={closeImageViewer} className="absolute right-[20px] top-[20px] z-20 transition-transform hover:scale-110">
|
|
37
|
+
<Image src={closeIcon} alt="닫기" width={24} height={24} className="h-6 w-6 text-white"/>
|
|
38
|
+
</button>
|
|
39
|
+
|
|
40
|
+
{/* 이미지 컨테이너 */}
|
|
41
|
+
<div className={`
|
|
42
|
+
no-scrollbar relative flex h-[500px] w-full min-w-[calc(100dvw-160px)] items-center justify-center overflow-auto rounded-[20px]
|
|
43
|
+
bg-black/50 md2:min-w-[800px]
|
|
44
|
+
`}>
|
|
45
|
+
{/*min-w-[320px]*/}
|
|
46
|
+
<div className="relative overflow-hidden rounded-[20px]" style={{
|
|
47
|
+
transform: `rotate(${rotation}deg) scale(${currentZoom / 100})`,
|
|
48
|
+
transformOrigin: 'center center',
|
|
49
|
+
transition: 'transform 0.2s ease'
|
|
50
|
+
}}>
|
|
51
|
+
<Image src={(currentImage === null || currentImage === void 0 ? void 0 : currentImage.url) || ''} alt={((_a = currentImage === null || currentImage === void 0 ? void 0 : currentImage.file) === null || _a === void 0 ? void 0 : _a.name) || ''} width={100} height={100} className="h-auto max-h-[500px] w-full max-w-[684px] object-contain" unoptimized/>
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
{/* Hover Toolbar - 이미지 하단에 고정 */}
|
|
55
|
+
<div className="absolute bottom-0 left-1/2 w-full -translate-x-1/2 opacity-100 transition-opacity duration-300 md2:opacity-0 md2:group-hover:opacity-100">
|
|
56
|
+
<div className="mx-auto flex flex-col items-center justify-between gap-[5px] rounded-b-[20px] bg-black/70 p-[20px] text-white md2:h-[68px] md2:flex-row">
|
|
57
|
+
<div className="flex items-center gap-[20px]">
|
|
58
|
+
<div className={`flex items-center gap-[10px]`}>
|
|
59
|
+
<div className="flex-shrink-0 rounded-full">
|
|
60
|
+
<div className="relative h-full w-full">
|
|
61
|
+
<Image src={daeryunLogoIcon} alt="대륜 로고" width={28} height={28}/>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
<div className={`dr_talk_subtitle_medium text-drTalkWhite`}>
|
|
65
|
+
법무법인(유한)대륜
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
<div className={`text-drTalkWhite`}>|</div>
|
|
69
|
+
<span className={'dr_talk_body_medium2 text-drTalkWhite'}>
|
|
70
|
+
{formatDateToKorean((imageViewerMessage === null || imageViewerMessage === void 0 ? void 0 : imageViewerMessage.createdAt.toString()) || '')}
|
|
71
|
+
</span>
|
|
72
|
+
</div>
|
|
73
|
+
<div className={`flex flex-row gap-[20px]`}>
|
|
74
|
+
<button onClick={rotateImage} className="transition-transform hover:scale-110">
|
|
75
|
+
<Image src={rotateCCWIcon} alt="회전" width={24} height={24} className="h-6 w-6 text-white"/>
|
|
76
|
+
</button>
|
|
77
|
+
<button onClick={zoomOut} disabled={zoomLevel === 0} className={`
|
|
78
|
+
${zoomLevel === 0
|
|
79
|
+
? 'cursor-not-allowed opacity-50'
|
|
80
|
+
: 'hover:scale-110 hover:opacity-80'} transition-all`}>
|
|
81
|
+
<Image src={zoomOutIcon} alt="확대" width={24} height={24} className="h-6 w-6 text-white"/>
|
|
82
|
+
</button>
|
|
83
|
+
<button onClick={zoomIn} disabled={zoomLevel === ZOOM_LEVELS.length - 1} className={`${zoomLevel === ZOOM_LEVELS.length - 1
|
|
84
|
+
? 'cursor-not-allowed opacity-50'
|
|
85
|
+
: 'hover:scale-110 hover:opacity-80'} transition-all`}>
|
|
86
|
+
<Image src={zoomInIcon} alt="확대" width={24} height={24} className="h-6 w-6 text-white"/>
|
|
87
|
+
</button>
|
|
88
|
+
<button onClick={handleDownload} className="transition-transform hover:scale-110">
|
|
89
|
+
<Image src={downloadIcon} alt="다운로드" width={24} height={24} className="bg-transparent text-white"/>
|
|
90
|
+
</button>
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
{/* Hover Toolbar - 이미지 하단에 끝 */}
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
|
|
98
|
+
{/* Thumbnail Preview - 고정된 위치 */}
|
|
99
|
+
{previewImages.length > 1 && (<div className="flex w-full max-w-[90vw] flex-row justify-center gap-[10px] overflow-x-auto px-[20px] md2:max-w-[570px] ">
|
|
100
|
+
<Swiper spaceBetween={10}
|
|
101
|
+
// slidesPerView={Math.min(previewImages.length, 5)}
|
|
102
|
+
slidesPerView={Math.min(previewImages.length, 5)} watchSlidesProgress allowTouchMove>
|
|
103
|
+
{previewImages.map((img, idx) => (<SwiperSlide key={idx} className={`!w-fit`}>
|
|
104
|
+
<div onClick={() => {
|
|
105
|
+
setCurrentIndex(idx);
|
|
106
|
+
setRotation(0);
|
|
107
|
+
setZoomLevel(3);
|
|
108
|
+
}} className={`
|
|
109
|
+
h-[60px] w-[96px] shrink-0 cursor-pointer overflow-hidden rounded-[10px] border-[1px]
|
|
110
|
+
${idx === currentIndex ? 'border-white' : 'border-transparent opacity-50 hover:opacity-100'}
|
|
111
|
+
`}>
|
|
112
|
+
<Image src={img.file.thumbnailUrl} alt={img.file.name} width={96} height={60} className="h-full w-full object-cover" unoptimized/>
|
|
113
|
+
</div>
|
|
114
|
+
</SwiperSlide>))}
|
|
115
|
+
</Swiper>
|
|
116
|
+
{/*{previewImages.map((img, idx) => (*/}
|
|
117
|
+
{/* <div*/}
|
|
118
|
+
{/* key={img.file.fileNumber}*/}
|
|
119
|
+
{/* onClick={() => {*/}
|
|
120
|
+
{/* setCurrentIndex(idx);*/}
|
|
121
|
+
{/* setRotation(0);*/}
|
|
122
|
+
{/* setZoomLevel(3);*/}
|
|
123
|
+
{/* }}*/}
|
|
124
|
+
{/* className={`h-[60px] w-[96px] shrink-0 cursor-pointer overflow-hidden rounded-[10px] border-[1px]*/}
|
|
125
|
+
{/* ${idx === currentIndex ? 'border-white' : 'border-transparent opacity-50 hover:opacity-100'}`}*/}
|
|
126
|
+
{/* >*/}
|
|
127
|
+
{/* <Image*/}
|
|
128
|
+
{/* src={img.file.thumbnailUrl}*/}
|
|
129
|
+
{/* alt={img.file.name}*/}
|
|
130
|
+
{/* width={96}*/}
|
|
131
|
+
{/* height={60}*/}
|
|
132
|
+
{/* className="h-full w-full object-cover"*/}
|
|
133
|
+
{/* unoptimized*/}
|
|
134
|
+
{/* />*/}
|
|
135
|
+
{/* </div>*/}
|
|
136
|
+
{/*))}*/}
|
|
137
|
+
</div>)}
|
|
138
|
+
</div>
|
|
139
|
+
</div>);
|
|
140
|
+
};
|
|
141
|
+
export default TbPcViewer;
|