@daeryun/dr_components 0.9.66 → 0.9.68
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/components/Daeryuntalk/ChatConversation.jsx +6 -4
- package/dist/components/Daeryuntalk/ChatConversation.tsx +3 -3
- package/dist/components/Daeryuntalk/HistoryView.jsx +2 -3
- package/dist/components/Daeryuntalk/HistoryView.tsx +2 -2
- package/dist/components/Daeryuntalk/HomeView.jsx +5 -3
- package/dist/components/Daeryuntalk/HomeView.tsx +3 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -19,7 +19,6 @@ import ChatConversationHeader from './ChatConversationItem/ChatConversationHeade
|
|
|
19
19
|
import ChatLoading from './ChatItem/ChatLoading';
|
|
20
20
|
import { useWindowSize } from './_hooks/useWindowSize';
|
|
21
21
|
import TypingComp from './ChatItem/TypingComp';
|
|
22
|
-
import { useHoverScrollbar } from './_hooks/useHoverScrollbar';
|
|
23
22
|
const ChatConversation = ({ onBackClick, onChatNew, isActive, isMobile, onClose, isHash }) => {
|
|
24
23
|
var _a, _b;
|
|
25
24
|
const { getNextMessageList, isNextPage, inquiryStatus, messages, isLoading, inquiryMainData, messageObject, workFlowBack, workFlowStack, chatInquiryNumber, isTyping } = useDaeryuntalk();
|
|
@@ -38,7 +37,7 @@ const ChatConversation = ({ onBackClick, onChatNew, isActive, isMobile, onClose,
|
|
|
38
37
|
// 이후
|
|
39
38
|
const messagesContainerRef = useRef(null);
|
|
40
39
|
const messagesEndRef = useRef(null);
|
|
41
|
-
const { style: hoverStyle } = useHoverScrollbar(messagesContainerRef);
|
|
40
|
+
// const { style: hoverStyle } = useHoverScrollbar(messagesContainerRef);
|
|
42
41
|
useEffect(() => {
|
|
43
42
|
var _a;
|
|
44
43
|
if (!mobileBottomRef.current || !pcBottomRef.current)
|
|
@@ -220,11 +219,14 @@ const ChatConversation = ({ onBackClick, onChatNew, isActive, isMobile, onClose,
|
|
|
220
219
|
{/* 여기서 isMpblie일때 위에 2개 헤더부분이랑 아래 메시지 입력이랑 높이를 빼서 넣어야한ㄷ */}
|
|
221
220
|
<div ref={messagesContainerRef} className={`
|
|
222
221
|
${isMobile ? `${isLoading ? ' pb-[50px]' : ''} mx-[20px] overflow-y-auto ` : 'flex- ml-[20px] mr-[5px] xs:pb-[100px] '} overlay-scrollbar overflow-auto pt-[20px]
|
|
223
|
-
`} style={
|
|
222
|
+
`} style={{
|
|
223
|
+
height: isMobile
|
|
224
224
|
? `calc(100vh - ${bottomHeight}px - ${((_a = headerRef.current) === null || _a === void 0 ? void 0 : _a.offsetHeight) || 0}px)`
|
|
225
225
|
: bottomHeight && headerRef.current
|
|
226
226
|
? `calc(100% - ${bottomHeight}px - ${(_b = headerRef.current) === null || _b === void 0 ? void 0 : _b.offsetHeight}px)`
|
|
227
|
-
: '100%'
|
|
227
|
+
: '100%' // fallback
|
|
228
|
+
// ...(!isMobile ? hoverStyle : {})
|
|
229
|
+
}}>
|
|
228
230
|
{messages.length === 0 ? (<div className="dr_talk_body_medium2 flex h-full flex-col items-center justify-center text-center text-drTalkGrayscale1">
|
|
229
231
|
<p>문의하실 내용을 입력해 주세요.</p>
|
|
230
232
|
<p className="mt-2 text-sm">24시간 운영하고 있습니다.</p>
|
|
@@ -65,7 +65,7 @@ const ChatConversation: React.FC<ChatConversationProps> = ({
|
|
|
65
65
|
const messagesContainerRef = useRef<HTMLDivElement>(null);
|
|
66
66
|
const messagesEndRef = useRef<HTMLDivElement>(null);
|
|
67
67
|
|
|
68
|
-
const { style: hoverStyle } = useHoverScrollbar(messagesContainerRef);
|
|
68
|
+
// const { style: hoverStyle } = useHoverScrollbar(messagesContainerRef);
|
|
69
69
|
|
|
70
70
|
useEffect(() => {
|
|
71
71
|
if (!mobileBottomRef.current || !pcBottomRef.current) return;
|
|
@@ -307,8 +307,8 @@ const ChatConversation: React.FC<ChatConversationProps> = ({
|
|
|
307
307
|
? `calc(100vh - ${bottomHeight}px - ${headerRef.current?.offsetHeight || 0}px)`
|
|
308
308
|
: bottomHeight && headerRef.current
|
|
309
309
|
? `calc(100% - ${bottomHeight}px - ${headerRef.current?.offsetHeight}px)`
|
|
310
|
-
: '100%'
|
|
311
|
-
...(!isMobile ? hoverStyle : {})
|
|
310
|
+
: '100%' // fallback
|
|
311
|
+
// ...(!isMobile ? hoverStyle : {})
|
|
312
312
|
}}
|
|
313
313
|
>
|
|
314
314
|
{messages.length === 0 ? (
|
|
@@ -8,10 +8,9 @@ import { useScrollShadow } from './_hooks/useScrollShadow';
|
|
|
8
8
|
import ShadowBox from './_ui/ShadowBox';
|
|
9
9
|
import CloseSvgIcon from '../../asset/images/daeryuntalk/close.svg';
|
|
10
10
|
import { formatTimestamp } from './_lib/utils';
|
|
11
|
-
import { useHoverScrollbar } from './_hooks/useHoverScrollbar';
|
|
12
11
|
const HistoryView = ({ onBackClick, onChatHistoryClick, onNewChatClick, isAuthenticated, historyLit, goGetHistoryList, isMobile, onClose, isHash, handleGoRequestPhone, handleGoHistoryPhoneAuth }) => {
|
|
13
12
|
const { containerRef, isScroll, isBottom, checkScroll } = useScrollShadow();
|
|
14
|
-
const { style: hoverStyle } = useHoverScrollbar(containerRef);
|
|
13
|
+
// const { style: hoverStyle } = useHoverScrollbar(containerRef);
|
|
15
14
|
useEffect(() => {
|
|
16
15
|
checkScroll();
|
|
17
16
|
}, [historyLit]);
|
|
@@ -39,7 +38,7 @@ const HistoryView = ({ onBackClick, onChatHistoryClick, onNewChatClick, isAuthen
|
|
|
39
38
|
{!isAuthenticated ? (<AuthForm goGetHistoryList={goGetHistoryList} handleGoRequestPhone={handleGoRequestPhone} handleGoHistoryPhoneAuth={handleGoHistoryPhoneAuth}/>) : (<>
|
|
40
39
|
{/* 스크롤 가능한 컨텐츠 영역 */}
|
|
41
40
|
<div className="relative w-full flex-1 overflow-hidden">
|
|
42
|
-
<div ref={containerRef} className={`${isMobile ? 'overflow-y-auto px-[20px] ' : ' pl-[20px] pr-[5px] '} h-full pb-[20px] pt-[24px] `}
|
|
41
|
+
<div ref={containerRef} className={`${isMobile ? 'overflow-y-auto px-[20px] ' : ' pl-[20px] pr-[5px] '} h-full pb-[20px] pt-[24px] `}>
|
|
43
42
|
{hasHistories ? (historyLit === null || historyLit === void 0 ? void 0 : historyLit.map((history, index) => (<div key={`${history.chat_inquiry_number}-${index}`} className={`cursor-pointer border-b border-drTalkGrayscale4 px-[12px] py-[18px] hover:bg-gray-50`} onClick={() => onChatHistoryClick(history.chat_inquiry_number)}>
|
|
44
43
|
<div className="flex items-center justify-between">
|
|
45
44
|
<div className={`flex flex-row items-center gap-[10px]`}>
|
|
@@ -39,7 +39,7 @@ const HistoryView: React.FC<HistoryViewProps> = ({
|
|
|
39
39
|
handleGoHistoryPhoneAuth
|
|
40
40
|
}) => {
|
|
41
41
|
const { containerRef, isScroll, isBottom, checkScroll } = useScrollShadow<HTMLDivElement>();
|
|
42
|
-
const { style: hoverStyle } = useHoverScrollbar(containerRef);
|
|
42
|
+
// const { style: hoverStyle } = useHoverScrollbar(containerRef);
|
|
43
43
|
|
|
44
44
|
useEffect(() => {
|
|
45
45
|
checkScroll();
|
|
@@ -90,7 +90,7 @@ const HistoryView: React.FC<HistoryViewProps> = ({
|
|
|
90
90
|
<div
|
|
91
91
|
ref={containerRef}
|
|
92
92
|
className={`${isMobile ? 'overflow-y-auto px-[20px] ' : ' pl-[20px] pr-[5px] '} h-full pb-[20px] pt-[24px] `}
|
|
93
|
-
style={{ ...(!isMobile ? hoverStyle : {}) }}
|
|
93
|
+
// style={{ ...(!isMobile ? hoverStyle : {}) }}
|
|
94
94
|
>
|
|
95
95
|
{hasHistories ? (
|
|
96
96
|
historyLit?.map((history, index) => (
|
|
@@ -10,7 +10,6 @@ import DaeryuntalkIntro from '../../asset/images/daeryuntalk/daeryuntalk_home_bg
|
|
|
10
10
|
import CloseSvgIcon from '../../asset/images/daeryuntalk/close.svg';
|
|
11
11
|
import { useScrollShadow } from './_hooks/useScrollShadow';
|
|
12
12
|
import Button3 from './_ui/buttons/Button3';
|
|
13
|
-
import { useHoverScrollbar } from './_hooks/useHoverScrollbar';
|
|
14
13
|
import { useWindowSize } from './_hooks/useWindowSize';
|
|
15
14
|
const HomeView = ({ inquiryMainData, isLoading, handleStartChat, isMobile, onClose, isHash }) => {
|
|
16
15
|
const { containerRef, isScroll, isBottom, checkScroll, isScrolling } = useScrollShadow();
|
|
@@ -18,7 +17,7 @@ const HomeView = ({ inquiryMainData, isLoading, handleStartChat, isMobile, onClo
|
|
|
18
17
|
const [contentHeight, setContentHeight] = useState(210);
|
|
19
18
|
const currentHeightRef = useRef(210);
|
|
20
19
|
const prevWrapperHeightRef = useRef(null);
|
|
21
|
-
const { style: hoverStyle } = useHoverScrollbar(containerRef);
|
|
20
|
+
// const { style: hoverStyle } = useHoverScrollbar(containerRef);
|
|
22
21
|
const browserSize = useWindowSize();
|
|
23
22
|
useEffect(() => {
|
|
24
23
|
const updateContentHeight = () => {
|
|
@@ -136,7 +135,10 @@ const HomeView = ({ inquiryMainData, isLoading, handleStartChat, isMobile, onClo
|
|
|
136
135
|
<section className={` flex h-full flex-col rounded-[12px] bg-white px-[16px] py-[24px] sm:h-fit ${isMobile ? 'w-full' : ' justify-between xs:justify-start '}`} style={{ boxShadow: '0px 4px 10px 0px #00000026' }}>
|
|
137
136
|
{/* 해당 컴포넌트의 최상위 부모와 브라우저 상단과 닿았을 때 우선적으로 해당 부분의 높이가 먼저 줄어들게 하고 싶다*/}
|
|
138
137
|
<div className="relative">
|
|
139
|
-
<div ref={containerRef} className={`flex min-h-[80px] flex-col ${isMobile ? 'overflow-y-auto ' : ''} overlay-scrollbar`} style={
|
|
138
|
+
<div ref={containerRef} className={`flex min-h-[80px] flex-col ${isMobile ? 'overflow-y-auto ' : ''} overlay-scrollbar`} style={{
|
|
139
|
+
maxHeight: `${contentHeight}px`
|
|
140
|
+
// ...(!isMobile ? hoverStyle : {})
|
|
141
|
+
}}>
|
|
140
142
|
<div className="flex items-center gap-[10px]">
|
|
141
143
|
{(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"/>)}
|
|
142
144
|
<h2 className="dr_talk_title_small text-drTalkBlack">
|
|
@@ -32,7 +32,7 @@ const HomeView = ({ inquiryMainData, isLoading, handleStartChat, isMobile, onClo
|
|
|
32
32
|
const [contentHeight, setContentHeight] = useState<number>(210);
|
|
33
33
|
const currentHeightRef = useRef(210);
|
|
34
34
|
const prevWrapperHeightRef = useRef<number | null>(null);
|
|
35
|
-
const { style: hoverStyle } = useHoverScrollbar(containerRef);
|
|
35
|
+
// const { style: hoverStyle } = useHoverScrollbar(containerRef);
|
|
36
36
|
const browserSize = useWindowSize();
|
|
37
37
|
|
|
38
38
|
useEffect(() => {
|
|
@@ -185,8 +185,8 @@ const HomeView = ({ inquiryMainData, isLoading, handleStartChat, isMobile, onClo
|
|
|
185
185
|
ref={containerRef}
|
|
186
186
|
className={`flex min-h-[80px] flex-col ${isMobile ? 'overflow-y-auto ' : ''} overlay-scrollbar`}
|
|
187
187
|
style={{
|
|
188
|
-
maxHeight: `${contentHeight}px
|
|
189
|
-
...(!isMobile ? hoverStyle : {})
|
|
188
|
+
maxHeight: `${contentHeight}px`
|
|
189
|
+
// ...(!isMobile ? hoverStyle : {})
|
|
190
190
|
}}
|
|
191
191
|
>
|
|
192
192
|
<div className="flex items-center gap-[10px]">
|