@daeryun/dr_components 1.2.13 → 1.2.15

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.
Files changed (88) hide show
  1. package/dist/components/Daeryuntalk/ChatButton.jsx +2 -2
  2. package/dist/components/Daeryuntalk/ChatButton.tsx +2 -2
  3. package/dist/components/Daeryuntalk/ChatConversation.d.ts +2 -0
  4. package/dist/components/Daeryuntalk/ChatConversation.jsx +23 -35
  5. package/dist/components/Daeryuntalk/ChatConversation.tsx +43 -51
  6. package/dist/components/Daeryuntalk/ChatConversationItem/ChatConversationHeader.jsx +12 -9
  7. package/dist/components/Daeryuntalk/ChatConversationItem/ChatConversationHeader.tsx +18 -8
  8. package/dist/components/Daeryuntalk/ChatHomeView.d.ts +5 -1
  9. package/dist/components/Daeryuntalk/ChatHomeView.jsx +5 -6
  10. package/dist/components/Daeryuntalk/ChatHomeView.tsx +28 -13
  11. package/dist/components/Daeryuntalk/ChatInput.jsx +12 -7
  12. package/dist/components/Daeryuntalk/ChatInput.tsx +14 -7
  13. package/dist/components/Daeryuntalk/ChatItem/AgeCheckBox.jsx +1 -0
  14. package/dist/components/Daeryuntalk/ChatItem/AgeCheckBox.tsx +1 -0
  15. package/dist/components/Daeryuntalk/ChatItem/ChatFile.jsx +11 -6
  16. package/dist/components/Daeryuntalk/ChatItem/ChatFile.tsx +19 -5
  17. package/dist/components/Daeryuntalk/ChatItem/ChatLoading.jsx +1 -0
  18. package/dist/components/Daeryuntalk/ChatItem/ChatLoading.tsx +1 -0
  19. package/dist/components/Daeryuntalk/ChatItem/ChatPrivacyAuth.jsx +1 -0
  20. package/dist/components/Daeryuntalk/ChatItem/ChatPrivacyAuth.tsx +1 -0
  21. package/dist/components/Daeryuntalk/ChatItem/ChatWrapper.jsx +1 -0
  22. package/dist/components/Daeryuntalk/ChatItem/ChatWrapper.tsx +1 -0
  23. package/dist/components/Daeryuntalk/ChatItem/RichText.jsx +1 -0
  24. package/dist/components/Daeryuntalk/ChatItem/RichText.tsx +1 -0
  25. package/dist/components/Daeryuntalk/ChatItem/TimeWrapper.jsx +1 -0
  26. package/dist/components/Daeryuntalk/ChatItem/TimeWrapper.tsx +1 -0
  27. package/dist/components/Daeryuntalk/ChatItem/TypingComp.jsx +7 -2
  28. package/dist/components/Daeryuntalk/ChatItem/TypingComp.tsx +7 -3
  29. package/dist/components/Daeryuntalk/ChatItem/WorkFlowAuthForm.jsx +1 -0
  30. package/dist/components/Daeryuntalk/ChatItem/WorkFlowAuthForm.tsx +1 -0
  31. package/dist/components/Daeryuntalk/ChatItem/WorkFlowClickData.jsx +1 -0
  32. package/dist/components/Daeryuntalk/ChatItem/WorkFlowClickData.tsx +1 -0
  33. package/dist/components/Daeryuntalk/ChatItem/WorkFlowImg.jsx +1 -0
  34. package/dist/components/Daeryuntalk/ChatItem/WorkFlowImg.tsx +1 -0
  35. package/dist/components/Daeryuntalk/ChatMessage.jsx +9 -5
  36. package/dist/components/Daeryuntalk/ChatMessage.tsx +11 -4
  37. package/dist/components/Daeryuntalk/ChatObject/FieldWorkObject.jsx +8 -3
  38. package/dist/components/Daeryuntalk/ChatObject/FieldWorkObject.tsx +12 -3
  39. package/dist/components/Daeryuntalk/ChatObject/ObjectBack.jsx +7 -4
  40. package/dist/components/Daeryuntalk/ChatObject/ObjectBack.tsx +13 -3
  41. package/dist/components/Daeryuntalk/ChatObject/ObjectButton.jsx +1 -0
  42. package/dist/components/Daeryuntalk/ChatObject/ObjectButton.tsx +1 -0
  43. package/dist/components/Daeryuntalk/ChatWidget.d.ts +2 -0
  44. package/dist/components/Daeryuntalk/ChatWidget.jsx +50 -5
  45. package/dist/components/Daeryuntalk/ChatWidget.tsx +71 -5
  46. package/dist/components/Daeryuntalk/DateSeparator.jsx +1 -0
  47. package/dist/components/Daeryuntalk/DateSeparator.tsx +1 -0
  48. package/dist/components/Daeryuntalk/History/AuthForm.jsx +1 -0
  49. package/dist/components/Daeryuntalk/History/AuthForm.tsx +1 -0
  50. package/dist/components/Daeryuntalk/HistoryView.jsx +18 -12
  51. package/dist/components/Daeryuntalk/HistoryView.tsx +29 -11
  52. package/dist/components/Daeryuntalk/HomeView.jsx +17 -12
  53. package/dist/components/Daeryuntalk/HomeView.tsx +29 -12
  54. package/dist/components/Daeryuntalk/NavigationFooter.jsx +8 -5
  55. package/dist/components/Daeryuntalk/NavigationFooter.tsx +10 -4
  56. package/dist/components/Daeryuntalk/NoticeMessage.jsx +10 -4
  57. package/dist/components/Daeryuntalk/NoticeMessage.tsx +10 -4
  58. package/dist/components/Daeryuntalk/Tiptap/Tiptap.jsx +1 -0
  59. package/dist/components/Daeryuntalk/Tiptap/Tiptap.tsx +1 -0
  60. package/dist/components/Daeryuntalk/Toast/Toast.jsx +1 -0
  61. package/dist/components/Daeryuntalk/Toast/Toast.tsx +1 -0
  62. package/dist/components/Daeryuntalk/Viewer/MobileViewer.jsx +10 -7
  63. package/dist/components/Daeryuntalk/Viewer/MobileViewer.tsx +19 -6
  64. package/dist/components/Daeryuntalk/Viewer/TbPcViewer.jsx +22 -14
  65. package/dist/components/Daeryuntalk/Viewer/TbPcViewer.tsx +59 -13
  66. package/dist/components/Daeryuntalk/ViewportHandler.jsx +2 -0
  67. package/dist/components/Daeryuntalk/ViewportHandler.tsx +1 -0
  68. package/dist/components/Daeryuntalk/_lib/utils.d.ts +1 -1
  69. package/dist/components/Daeryuntalk/_lib/utils.js +1 -1
  70. package/dist/components/Daeryuntalk/_lib/utils.ts +1 -1
  71. package/dist/components/Daeryuntalk/_ui/checkboxs/CheckBox2.jsx +3 -2
  72. package/dist/components/Daeryuntalk/_ui/checkboxs/CheckBox2.tsx +5 -2
  73. package/dist/components/Daeryuntalk/index.jsx +61 -34
  74. package/dist/components/Daeryuntalk/index.tsx +71 -40
  75. package/dist/components/common/types/map/index.d.ts +1 -0
  76. package/dist/components/common/types/map/index.ts +4 -3
  77. package/dist/components/page/MapPage/MapPage.jsx +1 -1
  78. package/dist/components/page/MapPage/MapPage.stories.jsx +2 -1
  79. package/dist/components/page/MapPage/MapPage.stories.tsx +2 -1
  80. package/dist/components/page/MapPage/MapPage.tsx +1 -1
  81. package/dist/components/page/MapPage/MobileMapKeyDetail.jsx +1 -13
  82. package/dist/components/page/MapPage/MobileMapKeyDetail.tsx +2 -18
  83. package/dist/components/page/MapPage/PcMapKeyDetail.jsx +1 -13
  84. package/dist/components/page/MapPage/PcMapKeyDetail.tsx +2 -19
  85. package/dist/styles/daeryuntalk.css +4 -4
  86. package/dist/styles/globals.css +6 -4
  87. package/dist/tsconfig.tsbuildinfo +1 -1
  88. package/package.json +1 -1
@@ -1,11 +1,40 @@
1
- import React, { useEffect, useRef } from 'react';
1
+ 'use client';
2
+ import React, { useEffect, useRef, useState } from 'react';
2
3
  import ChatHomeView from './ChatHomeView';
3
4
  import ImageViewer from './Viewer/ImageViewer';
4
5
  import { useScrollShadow } from './_hooks/useScrollShadow';
5
- const ChatWidget = ({ isOpen, isMobile, onClose, hashValue, setHashValue, animationState }) => {
6
+ const ChatWidget = ({ isOpen, isMobile, onClose, hashValue, setHashValue, animationState, isMobileSafari = false, androidViewportHeight = 0 }) => {
6
7
  const { containerRef, isScroll, isBottom } = useScrollShadow();
7
8
  const isHash = !!hashValue; // 해쉬 있을 경우
8
9
  const chatWidgetRef = useRef(null);
10
+ // iOS Safari viewport 계산
11
+ const [viewportOffset, setViewportOffset] = useState(0);
12
+ const [viewportHeight, setViewportHeight] = useState(0);
13
+ const [viewState, setViewState] = useState('conversation');
14
+ useEffect(() => {
15
+ var _a, _b;
16
+ if (!isMobileSafari)
17
+ return;
18
+ const updateViewport = () => {
19
+ var _a, _b;
20
+ if (!window.visualViewport)
21
+ return;
22
+ const offset = (_a = window.visualViewport.offsetTop) !== null && _a !== void 0 ? _a : 0;
23
+ const height = (_b = window.visualViewport.height) !== null && _b !== void 0 ? _b : window.innerHeight;
24
+ setViewportOffset(offset);
25
+ setViewportHeight(height);
26
+ };
27
+ updateViewport();
28
+ const onResize = () => updateViewport();
29
+ const onScroll = () => updateViewport();
30
+ (_a = window.visualViewport) === null || _a === void 0 ? void 0 : _a.addEventListener('resize', onResize);
31
+ (_b = window.visualViewport) === null || _b === void 0 ? void 0 : _b.addEventListener('scroll', onScroll);
32
+ return () => {
33
+ var _a, _b;
34
+ (_a = window.visualViewport) === null || _a === void 0 ? void 0 : _a.removeEventListener('resize', onResize);
35
+ (_b = window.visualViewport) === null || _b === void 0 ? void 0 : _b.removeEventListener('scroll', onScroll);
36
+ };
37
+ }, [isMobileSafari]);
9
38
  useEffect(() => {
10
39
  const isScrollableElement = (element) => {
11
40
  const style = window.getComputedStyle(element);
@@ -91,16 +120,32 @@ const ChatWidget = ({ isOpen, isMobile, onClose, hashValue, setHashValue, animat
91
120
  return (<>
92
121
  <ImageViewer />
93
122
 
94
- <div className="relative ">
123
+ <div className="relative">
95
124
  <div ref={chatWidgetRef} className={`
125
+
96
126
  ${isMobile ? `${mobileWrapperCss}` : `${webSmallWrapperCss} ${webTbPCWrapperCss} `}
97
127
  `}>
98
128
  <div ref={containerRef} className={`
99
129
  relative z-[999998]
100
130
  flex h-full flex-col items-center ${isHash ? 'justify-center' : 'justify-end'}
101
131
  ${isMobile ? `${innerMobileWrapperCss}` : `${innerWebSmallWrapperCss} ${innerWebTbPCWrapperCss}`}
102
- `}>
103
- <ChatHomeView hashValue={hashValue} isMobile={isMobile} isHash={isHash} onClose={onClose}/>
132
+ `} style={viewState !== 'conversation' || !isMobile
133
+ ? undefined
134
+ : isMobileSafari
135
+ ? {
136
+ position: 'fixed',
137
+ top: `${viewportOffset}px`,
138
+ left: 0,
139
+ right: 0,
140
+ height: viewportHeight ? `${viewportHeight}px` : '100%',
141
+ maxHeight: viewportHeight ? `${viewportHeight}px` : '100%',
142
+ minHeight: viewportHeight ? `${viewportHeight}px` : '100%'
143
+ }
144
+ : {
145
+ height: `${androidViewportHeight}px`,
146
+ maxHeight: `${androidViewportHeight}px`
147
+ }}>
148
+ <ChatHomeView hashValue={hashValue} isMobile={isMobile} isHash={isHash} onClose={onClose} androidViewportHeight={androidViewportHeight} isMobileSafari={isMobileSafari} viewState={viewState} setViewState={setViewState}/>
104
149
  </div>
105
150
  </div>
106
151
  </div>
@@ -1,5 +1,6 @@
1
- import React, { Dispatch, SetStateAction, useEffect, useRef } from 'react';
2
- import ChatHomeView from './ChatHomeView';
1
+ 'use client';
2
+ import React, { Dispatch, SetStateAction, useEffect, useRef, useState } from 'react';
3
+ import ChatHomeView, { ViewState } from './ChatHomeView';
3
4
  import ImageViewer from './Viewer/ImageViewer';
4
5
  import { useScrollShadow } from './_hooks/useScrollShadow';
5
6
 
@@ -10,6 +11,8 @@ interface ChatWidgetProps {
10
11
  hashValue: string | null;
11
12
  setHashValue: Dispatch<SetStateAction<string | null>>;
12
13
  animationState: string;
14
+ isMobileSafari?: boolean;
15
+ androidViewportHeight?: number;
13
16
  }
14
17
 
15
18
  const ChatWidget: React.FC<ChatWidgetProps> = ({
@@ -18,12 +21,47 @@ const ChatWidget: React.FC<ChatWidgetProps> = ({
18
21
  onClose,
19
22
  hashValue,
20
23
  setHashValue,
21
- animationState
24
+ animationState,
25
+ isMobileSafari = false,
26
+ androidViewportHeight = 0
22
27
  }) => {
23
28
  const { containerRef, isScroll, isBottom } = useScrollShadow<HTMLDivElement>();
24
29
  const isHash = !!hashValue; // 해쉬 있을 경우
25
30
  const chatWidgetRef = useRef<HTMLDivElement>(null);
26
31
 
32
+ // iOS Safari viewport 계산
33
+ const [viewportOffset, setViewportOffset] = useState(0);
34
+ const [viewportHeight, setViewportHeight] = useState(0);
35
+
36
+ const [viewState, setViewState] = useState<ViewState>('conversation');
37
+
38
+ useEffect(() => {
39
+ if (!isMobileSafari) return;
40
+
41
+ const updateViewport = () => {
42
+ if (!window.visualViewport) return;
43
+
44
+ const offset = window.visualViewport.offsetTop ?? 0;
45
+ const height = window.visualViewport.height ?? window.innerHeight;
46
+
47
+ setViewportOffset(offset);
48
+ setViewportHeight(height);
49
+ };
50
+
51
+ updateViewport();
52
+
53
+ const onResize = () => updateViewport();
54
+ const onScroll = () => updateViewport();
55
+
56
+ window.visualViewport?.addEventListener('resize', onResize);
57
+ window.visualViewport?.addEventListener('scroll', onScroll);
58
+
59
+ return () => {
60
+ window.visualViewport?.removeEventListener('resize', onResize);
61
+ window.visualViewport?.removeEventListener('scroll', onScroll);
62
+ };
63
+ }, [isMobileSafari]);
64
+
27
65
  useEffect(() => {
28
66
  const isScrollableElement = (element: Element): boolean => {
29
67
  const style = window.getComputedStyle(element);
@@ -129,10 +167,11 @@ const ChatWidget: React.FC<ChatWidgetProps> = ({
129
167
  <>
130
168
  <ImageViewer />
131
169
 
132
- <div className="relative ">
170
+ <div className="relative">
133
171
  <div
134
172
  ref={chatWidgetRef}
135
173
  className={`
174
+
136
175
  ${isMobile ? `${mobileWrapperCss}` : `${webSmallWrapperCss} ${webTbPCWrapperCss} `}
137
176
  `}
138
177
  >
@@ -143,8 +182,35 @@ const ChatWidget: React.FC<ChatWidgetProps> = ({
143
182
  flex h-full flex-col items-center ${isHash ? 'justify-center' : 'justify-end'}
144
183
  ${isMobile ? `${innerMobileWrapperCss}` : `${innerWebSmallWrapperCss} ${innerWebTbPCWrapperCss}`}
145
184
  `}
185
+ style={
186
+ viewState !== 'conversation' || !isMobile
187
+ ? undefined
188
+ : isMobileSafari
189
+ ? {
190
+ position: 'fixed',
191
+ top: `${viewportOffset}px`,
192
+ left: 0,
193
+ right: 0,
194
+ height: viewportHeight ? `${viewportHeight}px` : '100%',
195
+ maxHeight: viewportHeight ? `${viewportHeight}px` : '100%',
196
+ minHeight: viewportHeight ? `${viewportHeight}px` : '100%'
197
+ }
198
+ : {
199
+ height: `${androidViewportHeight}px`,
200
+ maxHeight: `${androidViewportHeight}px`
201
+ }
202
+ }
146
203
  >
147
- <ChatHomeView hashValue={hashValue} isMobile={isMobile} isHash={isHash} onClose={onClose} />
204
+ <ChatHomeView
205
+ hashValue={hashValue}
206
+ isMobile={isMobile}
207
+ isHash={isHash}
208
+ onClose={onClose}
209
+ androidViewportHeight={androidViewportHeight}
210
+ isMobileSafari={isMobileSafari}
211
+ viewState={viewState}
212
+ setViewState={setViewState}
213
+ />
148
214
  </div>
149
215
  </div>
150
216
  </div>
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  import React from 'react';
2
3
  const DateSeparator = ({ date }) => {
3
4
  const formatDate = (date) => {
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  import React from 'react';
2
3
 
3
4
  type DateSeparatorProps = {
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
3
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
4
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  import React, { useState } from 'react';
2
3
  import Input2 from '../_ui/inputs/Input2';
3
4
  import { formatSecondsToMMSS, nameFilter, onlyNumbers, phoneCheck } from '../_lib/utils';
@@ -4,13 +4,14 @@ import { useScrollShadow } from './_hooks/useScrollShadow';
4
4
  import ShadowBox from './_ui/ShadowBox';
5
5
  import { formatTimestamp } from './_lib/utils';
6
6
  import { useHoverScrollbar } from './_hooks/useHoverScrollbar';
7
- // 이미지
8
- import LinkRight from '../../asset/images/daeryuntalk/link_right.svg';
9
- import EmptyMessage from '../../asset/images/daeryuntalk/empty_message.svg';
10
- import SendIcon from '../../asset/images/daeryuntalk/send.svg';
11
- import CloseSvgIcon from '../../asset/images/daeryuntalk/close.svg';
12
- import PrevIcon from '../../asset/images/daeryuntalk/prev.svg';
7
+ import Image from 'next/image';
13
8
  const HistoryView = ({ onBackClick, onChatHistoryClick, onNewChatClick, isAuthenticated, historyLit, goGetHistoryList, isMobile, onClose, isHash, handleGoRequestPhone, handleGoHistoryPhoneAuth }) => {
9
+ const s3Url = process.env.NEXT_PUBLIC_S3_URL;
10
+ const LinkRight = `${s3Url}/daeryuntalk/link_right.svg`;
11
+ const EmptyMessage = `${s3Url}/daeryuntalk/empty_message.svg`;
12
+ const SendIcon = `${s3Url}/daeryuntalk/send.svg`;
13
+ const CloseSvgIcon = `${s3Url}/daeryuntalk/close.svg`;
14
+ const PrevIcon = `${s3Url}/daeryuntalk/prev.svg`;
14
15
  const { containerRef, isScroll, isBottom, checkScroll } = useScrollShadow();
15
16
  const { style: hoverStyle } = useHoverScrollbar(containerRef);
16
17
  useEffect(() => {
@@ -20,14 +21,15 @@ const HistoryView = ({ onBackClick, onChatHistoryClick, onNewChatClick, isAuthen
20
21
  return (<div className={`
21
22
  no-scrollbar relative w-full rounded-t-[30px]
22
23
  ${isMobile
23
- ? ` flex h-[calc(100%)] flex-col items-center justify-start `
24
+ ? ` flex h-[100%] flex-col items-center justify-start `
24
25
  : ' flex h-[calc(100dvh)] flex-col items-center xs:h-[calc(100vh-165px)] lg:h-[calc(100vh-110px)] ' +
25
26
  ' xs:max-h-[690px] xs:min-h-[320px] '}
26
27
  `}>
27
28
  {/* 헤더 */}
28
29
  <div className={`sub_title top-0 z-10 flex h-[56px] w-full items-center justify-between border-b border-gray-200 p-[16px]`}>
29
30
  <button className="flex h-7 w-7 items-center justify-center" aria-label="이전" onClick={onBackClick}>
30
- <PrevIcon width={28} height={28}/>
31
+ <Image src={PrevIcon} alt="이전" width={28} height={28}/>
32
+ {/* <PrevIcon width={28} height={28} /> */}
31
33
  </button>
32
34
  <div className="flex items-center">
33
35
  <p className=" dr_talk_title_small ">히스토리</p>
@@ -35,7 +37,8 @@ const HistoryView = ({ onBackClick, onChatHistoryClick, onNewChatClick, isAuthen
35
37
  <div
36
38
  // className={`${isHash ? 'pointer-events-none !opacity-0' : ''} ${isMobile ? 'block' : ' xs:pointer-events-none xs:!opacity-0 '} py-[14px] text-drTalkGrayscale2 hover:cursor-pointer`}
37
39
  className={`py-[14px] text-black hover:cursor-pointer`} onClick={onClose}>
38
- <CloseSvgIcon width={28} height={28}/>
40
+ <Image src={CloseSvgIcon} alt="닫기" width={28} height={28}/>
41
+ {/* <CloseSvgIcon width={28} height={28} /> */}
39
42
  </div>
40
43
  </div>
41
44
 
@@ -59,11 +62,13 @@ const HistoryView = ({ onBackClick, onChatHistoryClick, onNewChatClick, isAuthen
59
62
  <p className={`${history.unread_message_count && history.unread_message_count > 0 ? 'text-black' : 'text-drTalkGrayscale2'} dr_talk_body_medium2 line-clamp-2 w-[calc(100%-24px)] `}>
60
63
  {history.recent_message_content}
61
64
  </p>
62
- <LinkRight width={18} height={18} className="flex-shrink-0"/>
65
+ <Image src={LinkRight} alt="링크" width={18} height={18} className="flex-shrink-0"/>
66
+ {/* <LinkRight width={18} height={18} className="flex-shrink-0" /> */}
63
67
  </div>
64
68
  </div>))) : (<div className="flex h-full flex-col items-center justify-center p-4">
65
69
  <div className="mb-4">
66
- <EmptyMessage />
70
+ <Image src={EmptyMessage} alt="빈 메시지" width={82} height={64}/>
71
+ {/* <EmptyMessage /> */}
67
72
  </div>
68
73
  <p className="text-center text-gray-500">
69
74
  이전 대화기록이 없습니다
@@ -80,7 +85,8 @@ const HistoryView = ({ onBackClick, onChatHistoryClick, onNewChatClick, isAuthen
80
85
  {isAuthenticated && (<div className="w-full flex-shrink-0 border-t border-gray-100 bg-white p-4">
81
86
  <button className="flex w-full items-center justify-center gap-2.5 rounded-[25px] bg-[#2E385B] px-6 py-3 text-white" onClick={onNewChatClick}>
82
87
  새 문의하기
83
- <SendIcon width={24} height={24}/>
88
+ <Image src={SendIcon} alt="전송" width={24} height={24}/>
89
+ {/* <SendIcon width={24} height={24} /> */}
84
90
  </button>
85
91
  </div>)}
86
92
  </div>);
@@ -5,13 +5,14 @@ import { useScrollShadow } from './_hooks/useScrollShadow';
5
5
  import ShadowBox from './_ui/ShadowBox';
6
6
  import { formatTimestamp } from './_lib/utils';
7
7
  import { useHoverScrollbar } from './_hooks/useHoverScrollbar';
8
+ import Image from 'next/image';
8
9
 
9
10
  // 이미지
10
- import LinkRight from '../../asset/images/daeryuntalk/link_right.svg';
11
- import EmptyMessage from '../../asset/images/daeryuntalk/empty_message.svg';
12
- import SendIcon from '../../asset/images/daeryuntalk/send.svg';
13
- import CloseSvgIcon from '../../asset/images/daeryuntalk/close.svg';
14
- import PrevIcon from '../../asset/images/daeryuntalk/prev.svg';
11
+ // import LinkRight from '../../asset/images/daeryuntalk/link_right.svg';
12
+ // import EmptyMessage from '../../asset/images/daeryuntalk/empty_message.svg';
13
+ // import SendIcon from '../../asset/images/daeryuntalk/send.svg';
14
+ // import CloseSvgIcon from '../../asset/images/daeryuntalk/close.svg';
15
+ // import PrevIcon from '../../asset/images/daeryuntalk/prev.svg';
15
16
 
16
17
  type HistoryViewProps = {
17
18
  onBackClick: () => void;
@@ -40,6 +41,12 @@ const HistoryView: React.FC<HistoryViewProps> = ({
40
41
  handleGoRequestPhone,
41
42
  handleGoHistoryPhoneAuth
42
43
  }) => {
44
+ const s3Url = process.env.NEXT_PUBLIC_S3_URL;
45
+ const LinkRight = `${s3Url}/daeryuntalk/link_right.svg`;
46
+ const EmptyMessage = `${s3Url}/daeryuntalk/empty_message.svg`;
47
+ const SendIcon = `${s3Url}/daeryuntalk/send.svg`;
48
+ const CloseSvgIcon = `${s3Url}/daeryuntalk/close.svg`;
49
+ const PrevIcon = `${s3Url}/daeryuntalk/prev.svg`;
43
50
  const { containerRef, isScroll, isBottom, checkScroll } = useScrollShadow<HTMLDivElement>();
44
51
  const { style: hoverStyle } = useHoverScrollbar(containerRef);
45
52
 
@@ -55,7 +62,7 @@ const HistoryView: React.FC<HistoryViewProps> = ({
55
62
  no-scrollbar relative w-full rounded-t-[30px]
56
63
  ${
57
64
  isMobile
58
- ? ` flex h-[calc(100%)] flex-col items-center justify-start `
65
+ ? ` flex h-[100%] flex-col items-center justify-start `
59
66
  : ' flex h-[calc(100dvh)] flex-col items-center xs:h-[calc(100vh-165px)] lg:h-[calc(100vh-110px)] ' +
60
67
  ' xs:max-h-[690px] xs:min-h-[320px] '
61
68
  }
@@ -66,7 +73,8 @@ const HistoryView: React.FC<HistoryViewProps> = ({
66
73
  className={`sub_title top-0 z-10 flex h-[56px] w-full items-center justify-between border-b border-gray-200 p-[16px]`}
67
74
  >
68
75
  <button className="flex h-7 w-7 items-center justify-center" aria-label="이전" onClick={onBackClick}>
69
- <PrevIcon width={28} height={28} />
76
+ <Image src={PrevIcon} alt="이전" width={28} height={28} />
77
+ {/* <PrevIcon width={28} height={28} /> */}
70
78
  </button>
71
79
  <div className="flex items-center">
72
80
  <p className=" dr_talk_title_small ">히스토리</p>
@@ -76,7 +84,8 @@ const HistoryView: React.FC<HistoryViewProps> = ({
76
84
  className={`py-[14px] text-black hover:cursor-pointer`}
77
85
  onClick={onClose}
78
86
  >
79
- <CloseSvgIcon width={28} height={28} />
87
+ <Image src={CloseSvgIcon} alt="닫기" width={28} height={28} />
88
+ {/* <CloseSvgIcon width={28} height={28} /> */}
80
89
  </div>
81
90
  </div>
82
91
 
@@ -123,14 +132,22 @@ const HistoryView: React.FC<HistoryViewProps> = ({
123
132
  >
124
133
  {history.recent_message_content}
125
134
  </p>
126
- <LinkRight width={18} height={18} className="flex-shrink-0" />
135
+ <Image
136
+ src={LinkRight}
137
+ alt="링크"
138
+ width={18}
139
+ height={18}
140
+ className="flex-shrink-0"
141
+ />
142
+ {/* <LinkRight width={18} height={18} className="flex-shrink-0" /> */}
127
143
  </div>
128
144
  </div>
129
145
  ))
130
146
  ) : (
131
147
  <div className="flex h-full flex-col items-center justify-center p-4">
132
148
  <div className="mb-4">
133
- <EmptyMessage />
149
+ <Image src={EmptyMessage} alt="빈 메시지" width={82} height={64} />
150
+ {/* <EmptyMessage /> */}
134
151
  </div>
135
152
  <p className="text-center text-gray-500">
136
153
  이전 대화기록이 없습니다
@@ -153,7 +170,8 @@ const HistoryView: React.FC<HistoryViewProps> = ({
153
170
  onClick={onNewChatClick}
154
171
  >
155
172
  새 문의하기
156
- <SendIcon width={24} height={24} />
173
+ <Image src={SendIcon} alt="전송" width={24} height={24} />
174
+ {/* <SendIcon width={24} height={24} /> */}
157
175
  </button>
158
176
  </div>
159
177
  )}
@@ -6,15 +6,15 @@ import { useScrollShadow } from './_hooks/useScrollShadow';
6
6
  import Button3 from './_ui/buttons/Button3';
7
7
  import { useHoverScrollbar } from './_hooks/useHoverScrollbar';
8
8
  import { useWindowSize } from './_hooks/useWindowSize';
9
- // 이미지
10
- import DaeryuntalkIntro from '../../asset/images/daeryuntalk/daeryuntalk_home_bg.png';
11
- import TimeIcon from '../../asset/images/daeryuntalk/time.svg';
12
- import DaeryunLogoIcon from '../../asset/images/daeryuntalk/daeryun-logo.svg';
13
- import SendIcon from '../../asset/images/daeryuntalk/send.svg';
14
- import InfoIcon from '../../asset/images/daeryuntalk/info.svg';
15
- import CloseSvgIcon from '../../asset/images/daeryuntalk/close.svg';
16
9
  const HomeView = ({ inquiryMainData, isLoading, handleStartChat, isMobile, onClose, isHash }) => {
17
10
  const { containerRef, isScroll, isBottom, checkScroll, isScrolling } = useScrollShadow();
11
+ const s3Url = process.env.NEXT_PUBLIC_S3_URL;
12
+ const DaeryuntalkIntro = `${s3Url}/daeryuntalk/daeryuntalk_home_bg.png`;
13
+ const TimeIcon = `${s3Url}/daeryuntalk/time.svg`;
14
+ const DaeryunLogoIcon = `${s3Url}/daeryuntalk/daeryun-logo.svg`;
15
+ const SendIcon = `${s3Url}/daeryuntalk/send.svg`;
16
+ const InfoIcon = `${s3Url}/daeryuntalk/info.svg`;
17
+ const CloseSvgIcon = `${s3Url}/daeryuntalk/close.svg`;
18
18
  const wrapperRef = useRef(null);
19
19
  const [contentHeight, setContentHeight] = useState(210);
20
20
  const currentHeightRef = useRef(210);
@@ -117,11 +117,13 @@ const HomeView = ({ inquiryMainData, isLoading, handleStartChat, isMobile, onClo
117
117
  `}>
118
118
  <header className="z-10 flex h-[56px] w-full justify-between rounded-t-[30px] px-[20px]">
119
119
  <div className="dr_talk_subtitle_small flex items-center gap-[2px] pt-[31.5px] text-drTalkGrayscale1">
120
- <TimeIcon width={20} height={20}/>
120
+ <Image src={TimeIcon} alt="시간" width={20} height={20}/>
121
+ {/* <TimeIcon width={20} height={20} /> */}
121
122
  <span>24시간 운영</span>
122
123
  </div>
123
124
  <div className={`${isHash ? 'pointer-events-none !opacity-0' : ''} ${isMobile ? 'block' : 'xs:pointer-events-none xs:!opacity-0'} py-[14px] text-drTalkGrayscale2 hover:cursor-pointer`} onClick={onClose}>
124
- <CloseSvgIcon width={28} height={28}/>
125
+ <Image src={CloseSvgIcon} alt="닫기" width={28} height={28}/>
126
+ {/* <CloseSvgIcon width={28} height={28} /> */}
125
127
  </div>
126
128
  </header>
127
129
 
@@ -139,7 +141,8 @@ const HomeView = ({ inquiryMainData, isLoading, handleStartChat, isMobile, onClo
139
141
  <div className="relative">
140
142
  <div ref={containerRef} className={`flex min-h-[80px] flex-col overscroll-contain ${isMobile ? 'overflow-y-auto overscroll-contain ' : ''} overlay-scrollbar`} style={Object.assign({ maxHeight: `${contentHeight}px` }, (!isMobile ? hoverStyle : {}))}>
141
143
  <div className="flex items-center gap-[10px]">
142
- {(inquiryMainData === null || inquiryMainData === void 0 ? void 0 : inquiryMainData.channel_logo_image_url) ? (<Image src={inquiryMainData.channel_logo_image_url} alt="로고" width={32} height={32}/>) : (<DaeryunLogoIcon width={24} height={24} className="mr-2"/>)}
144
+ {(inquiryMainData === null || inquiryMainData === void 0 ? void 0 : inquiryMainData.channel_logo_image_url) ? (<Image src={inquiryMainData.channel_logo_image_url} alt="로고" width={32} height={32}/>) : (<Image src={DaeryunLogoIcon} alt="대륜 로고" width={24} height={24} className="mr-2"/>)}
145
+ {/* <DaeryunLogoIcon width={24} height={24} className="mr-2" /> */}
143
146
  <p className="dr_talk_title_small text-drTalkBlack">
144
147
  {(inquiryMainData === null || inquiryMainData === void 0 ? void 0 : inquiryMainData.channel_name) || '법무법인(유한)대륜'}
145
148
  </p>
@@ -155,12 +158,14 @@ const HomeView = ({ inquiryMainData, isLoading, handleStartChat, isMobile, onClo
155
158
  <Button3 className={`w-full`} onClick={handleStartChat} isDisabled={isLoading || !(inquiryMainData === null || inquiryMainData === void 0 ? void 0 : inquiryMainData.channel_number)}>
156
159
  <div className="flex items-center justify-center gap-[4px]">
157
160
  {!(inquiryMainData === null || inquiryMainData === void 0 ? void 0 : inquiryMainData.channel_number) ? (<div>{'로딩 중...'}</div>) : (<div>{isLoading ? '로딩 중...' : '문의하기'}</div>)}
158
- {!isLoading && <SendIcon width={24} height={24}/>}
161
+ {!isLoading && <Image src={SendIcon} alt="전송" width={24} height={24}/>}
162
+ {/* {!isLoading && <SendIcon width={24} height={24} />} */}
159
163
  </div>
160
164
  </Button3>
161
165
 
162
166
  <div className="flex items-center justify-center gap-[4px] pt-[20px]">
163
- <InfoIcon width={20} height={20}/>
167
+ <Image src={InfoIcon} alt="정보" width={20} height={20}/>
168
+ {/* <InfoIcon width={20} height={20} /> */}
164
169
  <span className="dr_talk_body_small1 text-drTalkGrayscale2">
165
170
  {(inquiryMainData === null || inquiryMainData === void 0 ? void 0 : inquiryMainData.answer_speed_message) || '빠르게 답변 받으실 수 있어요'}
166
171
  </span>
@@ -10,12 +10,12 @@ import { useHoverScrollbar } from './_hooks/useHoverScrollbar';
10
10
  import { useWindowSize } from './_hooks/useWindowSize';
11
11
 
12
12
  // 이미지
13
- import DaeryuntalkIntro from '../../asset/images/daeryuntalk/daeryuntalk_home_bg.png';
14
- import TimeIcon from '../../asset/images/daeryuntalk/time.svg';
15
- import DaeryunLogoIcon from '../../asset/images/daeryuntalk/daeryun-logo.svg';
16
- import SendIcon from '../../asset/images/daeryuntalk/send.svg';
17
- import InfoIcon from '../../asset/images/daeryuntalk/info.svg';
18
- import CloseSvgIcon from '../../asset/images/daeryuntalk/close.svg';
13
+ // import DaeryuntalkIntro from '../../asset/images/daeryuntalk/daeryuntalk_home_bg.png';
14
+ // import TimeIcon from '../../asset/images/daeryuntalk/time.svg';
15
+ // import DaeryunLogoIcon from '../../asset/images/daeryuntalk/daeryun-logo.svg';
16
+ // import SendIcon from '../../asset/images/daeryuntalk/send.svg';
17
+ // import InfoIcon from '../../asset/images/daeryuntalk/info.svg';
18
+ // import CloseSvgIcon from '../../asset/images/daeryuntalk/close.svg';
19
19
 
20
20
  interface IHomeViewProps {
21
21
  inquiryMainData: IChatInquiryMainDataResponse | null;
@@ -28,7 +28,13 @@ interface IHomeViewProps {
28
28
 
29
29
  const HomeView = ({ inquiryMainData, isLoading, handleStartChat, isMobile, onClose, isHash }: IHomeViewProps) => {
30
30
  const { containerRef, isScroll, isBottom, checkScroll, isScrolling } = useScrollShadow<HTMLDivElement>();
31
-
31
+ const s3Url = process.env.NEXT_PUBLIC_S3_URL;
32
+ const DaeryuntalkIntro = `${s3Url}/daeryuntalk/daeryuntalk_home_bg.png`;
33
+ const TimeIcon = `${s3Url}/daeryuntalk/time.svg`;
34
+ const DaeryunLogoIcon = `${s3Url}/daeryuntalk/daeryun-logo.svg`;
35
+ const SendIcon = `${s3Url}/daeryuntalk/send.svg`;
36
+ const InfoIcon = `${s3Url}/daeryuntalk/info.svg`;
37
+ const CloseSvgIcon = `${s3Url}/daeryuntalk/close.svg`;
32
38
  const wrapperRef = useRef<HTMLDivElement | null>(null);
33
39
  const [contentHeight, setContentHeight] = useState<number>(210);
34
40
  const currentHeightRef = useRef(210);
@@ -142,14 +148,16 @@ const HomeView = ({ inquiryMainData, isLoading, handleStartChat, isMobile, onClo
142
148
  >
143
149
  <header className="z-10 flex h-[56px] w-full justify-between rounded-t-[30px] px-[20px]">
144
150
  <div className="dr_talk_subtitle_small flex items-center gap-[2px] pt-[31.5px] text-drTalkGrayscale1">
145
- <TimeIcon width={20} height={20} />
151
+ <Image src={TimeIcon} alt="시간" width={20} height={20} />
152
+ {/* <TimeIcon width={20} height={20} /> */}
146
153
  <span>24시간 운영</span>
147
154
  </div>
148
155
  <div
149
156
  className={`${isHash ? 'pointer-events-none !opacity-0' : ''} ${isMobile ? 'block' : 'xs:pointer-events-none xs:!opacity-0'} py-[14px] text-drTalkGrayscale2 hover:cursor-pointer`}
150
157
  onClick={onClose}
151
158
  >
152
- <CloseSvgIcon width={28} height={28} />
159
+ <Image src={CloseSvgIcon} alt="닫기" width={28} height={28} />
160
+ {/* <CloseSvgIcon width={28} height={28} /> */}
153
161
  </div>
154
162
  </header>
155
163
 
@@ -199,8 +207,15 @@ const HomeView = ({ inquiryMainData, isLoading, handleStartChat, isMobile, onClo
199
207
  height={32}
200
208
  />
201
209
  ) : (
202
- <DaeryunLogoIcon width={24} height={24} className="mr-2" />
210
+ <Image
211
+ src={DaeryunLogoIcon}
212
+ alt="대륜 로고"
213
+ width={24}
214
+ height={24}
215
+ className="mr-2"
216
+ />
203
217
  )}
218
+ {/* <DaeryunLogoIcon width={24} height={24} className="mr-2" /> */}
204
219
  <p className="dr_talk_title_small text-drTalkBlack">
205
220
  {inquiryMainData?.channel_name || '법무법인(유한)대륜'}
206
221
  </p>
@@ -224,12 +239,14 @@ const HomeView = ({ inquiryMainData, isLoading, handleStartChat, isMobile, onClo
224
239
  ) : (
225
240
  <div>{isLoading ? '로딩 중...' : '문의하기'}</div>
226
241
  )}
227
- {!isLoading && <SendIcon width={24} height={24} />}
242
+ {!isLoading && <Image src={SendIcon} alt="전송" width={24} height={24} />}
243
+ {/* {!isLoading && <SendIcon width={24} height={24} />} */}
228
244
  </div>
229
245
  </Button3>
230
246
 
231
247
  <div className="flex items-center justify-center gap-[4px] pt-[20px]">
232
- <InfoIcon width={20} height={20} />
248
+ <Image src={InfoIcon} alt="정보" width={20} height={20} />
249
+ {/* <InfoIcon width={20} height={20} /> */}
233
250
  <span className="dr_talk_body_small1 text-drTalkGrayscale2">
234
251
  {inquiryMainData?.answer_speed_message || '빠르게 답변 받으실 수 있어요'}
235
252
  </span>
@@ -1,8 +1,9 @@
1
1
  import React from 'react';
2
- // 이미지
3
- import Home from '../../asset/images/daeryuntalk/home.svg';
4
- import History from '../../asset/images/daeryuntalk/history.svg';
2
+ import Image from 'next/image';
5
3
  const NavigationFooter = ({ activeView, onHomeClick, onHistoryClick, historyList, isAuthenticated }) => {
4
+ const s3Url = process.env.NEXT_PUBLIC_S3_URL;
5
+ const Home = `${s3Url}/daeryuntalk/home.svg`;
6
+ const History = `${s3Url}/daeryuntalk/history.svg`;
6
7
  if (activeView === 'conversation') {
7
8
  return null;
8
9
  }
@@ -10,7 +11,8 @@ const NavigationFooter = ({ activeView, onHomeClick, onHistoryClick, historyList
10
11
  <div className="h-px w-full bg-drTalkGrayscale4" role="separator"></div>
11
12
  <nav className={' flex h-[64px] justify-around px-8 pb-[12px] pt-[8px]'}>
12
13
  <div className={`group flex cursor-pointer flex-col items-center ${activeView === 'home' ? 'text-drTalkCrimson' : 'text-gray-400 hover:text-drTalkCrimson'}`} role="button" tabIndex={0} onClick={onHomeClick}>
13
- <Home width={32} height={32} className=""/>
14
+ <Image src={Home} alt="홈" width={32} height={32} className=""/>
15
+ {/* <Home width={32} height={32} className="" /> */}
14
16
  <span className={`dr_talk_subtitle_small2 ${activeView === 'home'
15
17
  ? 'text-drTalkCrimson'
16
18
  : 'text-drTalkGrayscale3 group-hover:text-drTalkCrimson'}`}>
@@ -28,7 +30,8 @@ const NavigationFooter = ({ activeView, onHomeClick, onHistoryClick, historyList
28
30
  {isHundredOver ? '99+' : unreadCount}
29
31
  </span>) : null;
30
32
  })()}
31
- <History width={32} height={32}/>
33
+ <Image src={History} alt="히스토리" width={32} height={32}/>
34
+ {/* <History width={32} height={32} /> */}
32
35
  <span className={`dr_talk_subtitle_small2 ${activeView === 'history'
33
36
  ? 'text-drTalkCrimson'
34
37
  : 'text-drTalkGrayscale3 group-hover:text-drTalkCrimson'}`}>
@@ -1,9 +1,10 @@
1
1
  import React from 'react';
2
2
  import { History as HisResType } from './_api/daeryuntalk/type/response';
3
+ import Image from 'next/image';
3
4
 
4
5
  // 이미지
5
- import Home from '../../asset/images/daeryuntalk/home.svg';
6
- import History from '../../asset/images/daeryuntalk/history.svg';
6
+ // import Home from '../../asset/images/daeryuntalk/home.svg';
7
+ // import History from '../../asset/images/daeryuntalk/history.svg';
7
8
 
8
9
  type NavigationFooterProps = {
9
10
  activeView: 'home' | 'history' | 'conversation';
@@ -20,6 +21,9 @@ const NavigationFooter: React.FC<NavigationFooterProps> = ({
20
21
  historyList,
21
22
  isAuthenticated
22
23
  }) => {
24
+ const s3Url = process.env.NEXT_PUBLIC_S3_URL;
25
+ const Home = `${s3Url}/daeryuntalk/home.svg`;
26
+ const History = `${s3Url}/daeryuntalk/history.svg`;
23
27
  if (activeView === 'conversation') {
24
28
  return null;
25
29
  }
@@ -35,7 +39,8 @@ const NavigationFooter: React.FC<NavigationFooterProps> = ({
35
39
  tabIndex={0}
36
40
  onClick={onHomeClick}
37
41
  >
38
- <Home width={32} height={32} className="" />
42
+ <Image src={Home} alt="홈" width={32} height={32} className="" />
43
+ {/* <Home width={32} height={32} className="" /> */}
39
44
  <span
40
45
  className={`dr_talk_subtitle_small2 ${
41
46
  activeView === 'home'
@@ -73,7 +78,8 @@ const NavigationFooter: React.FC<NavigationFooterProps> = ({
73
78
  </span>
74
79
  ) : null;
75
80
  })()}
76
- <History width={32} height={32} />
81
+ <Image src={History} alt="히스토리" width={32} height={32} />
82
+ {/* <History width={32} height={32} /> */}
77
83
  <span
78
84
  className={`dr_talk_subtitle_small2 ${
79
85
  activeView === 'history'