@daeryun/dr_components 0.8.84 → 0.8.85
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/ChatMessage.jsx +0 -1
- package/dist/components/Daeryuntalk/ChatMessage.tsx +0 -1
- package/dist/components/Daeryuntalk/HistoryView.jsx +1 -1
- package/dist/components/Daeryuntalk/HistoryView.tsx +3 -1
- package/dist/components/Daeryuntalk/Tiptap/Tiptap.jsx +3 -4
- package/dist/components/Daeryuntalk/Tiptap/Tiptap.tsx +3 -3
- package/dist/components/Daeryuntalk/_api/daeryuntalk/index.js +1 -0
- package/dist/components/Daeryuntalk/_api/daeryuntalk/index.ts +1 -0
- package/dist/components/Daeryuntalk/_ui/ShadowBox.d.ts +4 -1
- package/dist/components/Daeryuntalk/_ui/ShadowBox.jsx +2 -2
- package/dist/components/Daeryuntalk/_ui/ShadowBox.tsx +7 -2
- package/dist/styles/globals.css +4 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -53,7 +53,6 @@ const ChatMessage = ({ message, object, handelObjectBack, chatInquiryNumber, wor
|
|
|
53
53
|
const isAuthForm = hasForm(message);
|
|
54
54
|
const isRichForm = hasRichForm(message);
|
|
55
55
|
const isFile = hasFileArray(message);
|
|
56
|
-
console.log('inquiryStatus', inquiryStatus);
|
|
57
56
|
// 파일이 있는경우
|
|
58
57
|
if (isFile) {
|
|
59
58
|
return (<div className={`flex flex-col gap-[10px]`}>
|
|
@@ -51,7 +51,7 @@ const HistoryView = ({ onBackClick, onChatHistoryClick, onNewChatClick, isAuthen
|
|
|
51
51
|
</span>
|
|
52
52
|
</div>
|
|
53
53
|
<div className=" mt-[10px] flex items-center justify-between">
|
|
54
|
-
<p className=
|
|
54
|
+
<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)] `}>
|
|
55
55
|
{history.recent_message_content}
|
|
56
56
|
</p>
|
|
57
57
|
<LinkRight width={18} height={18} className="flex-shrink-0"/>
|
|
@@ -112,7 +112,9 @@ const HistoryView: React.FC<HistoryViewProps> = ({
|
|
|
112
112
|
</span>
|
|
113
113
|
</div>
|
|
114
114
|
<div className=" mt-[10px] flex items-center justify-between">
|
|
115
|
-
<p
|
|
115
|
+
<p
|
|
116
|
+
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)] `}
|
|
117
|
+
>
|
|
116
118
|
{history.recent_message_content}
|
|
117
119
|
</p>
|
|
118
120
|
<LinkRight width={18} height={18} className="flex-shrink-0" />
|
|
@@ -5,7 +5,6 @@ import HardBreak from '@tiptap/extension-hard-break'; // 추가
|
|
|
5
5
|
import Document from '@tiptap/extension-document';
|
|
6
6
|
import Paragraph from '@tiptap/extension-paragraph';
|
|
7
7
|
import Text from '@tiptap/extension-text';
|
|
8
|
-
import ShadowBox from '../_ui/ShadowBox';
|
|
9
8
|
const Tiptap = forwardRef(({ onChange, placeholder = '메시지를 입력해 주세요.', onEnterKeyPress, onKeyDown, contentClassName = '' }, ref) => {
|
|
10
9
|
const containerRef = useRef(null);
|
|
11
10
|
const [isScroll, setIsScroll] = useState(false);
|
|
@@ -40,7 +39,7 @@ const Tiptap = forwardRef(({ onChange, placeholder = '메시지를 입력해 주
|
|
|
40
39
|
},
|
|
41
40
|
editorProps: {
|
|
42
41
|
attributes: {
|
|
43
|
-
class: `dr_talk_body_medium2 focus:outline-none overflow-y-auto resize-none pt-[6px] pb-[4px] break-words whitespace-pre-wrap word-wrap break-word overflow-wrap-anywhere no-scrollbar `
|
|
42
|
+
class: `max-h-[72px] min-h-[36px] overflow-auto dr_talk_body_medium2 focus:outline-none overflow-y-auto resize-none pt-[6px] pb-[4px] break-words whitespace-pre-wrap word-wrap break-word overflow-wrap-anywhere no-scrollbar `
|
|
44
43
|
},
|
|
45
44
|
handleKeyDown: (view, event) => {
|
|
46
45
|
const isMobile = /Mobi|Android/i.test(navigator.userAgent); // 모바일 여부 판별
|
|
@@ -121,9 +120,9 @@ const Tiptap = forwardRef(({ onChange, placeholder = '메시지를 입력해 주
|
|
|
121
120
|
return null;
|
|
122
121
|
return (<div className={`relative w-full `}>
|
|
123
122
|
<div ref={containerRef} className={`w-full`}>
|
|
124
|
-
<EditorContent editor={editor} tabIndex={0} className={`${contentClassName}
|
|
123
|
+
<EditorContent editor={editor} tabIndex={0} className={`${contentClassName} w-full rounded-md border !text-black dark:text-white `}/>
|
|
125
124
|
</div>
|
|
126
|
-
{isScroll && !isBottom && <ShadowBox />}
|
|
125
|
+
{/*{isScroll && !isBottom && <ShadowBox className={`!h-[5px]`} />}*/}
|
|
127
126
|
</div>);
|
|
128
127
|
});
|
|
129
128
|
Tiptap.displayName = 'Tiptap';
|
|
@@ -64,7 +64,7 @@ const Tiptap = forwardRef<TiptapEditorRef, TiptapProps>(
|
|
|
64
64
|
},
|
|
65
65
|
editorProps: {
|
|
66
66
|
attributes: {
|
|
67
|
-
class: `dr_talk_body_medium2 focus:outline-none overflow-y-auto resize-none pt-[6px] pb-[4px] break-words whitespace-pre-wrap word-wrap break-word overflow-wrap-anywhere no-scrollbar `
|
|
67
|
+
class: `max-h-[72px] min-h-[36px] overflow-auto dr_talk_body_medium2 focus:outline-none overflow-y-auto resize-none pt-[6px] pb-[4px] break-words whitespace-pre-wrap word-wrap break-word overflow-wrap-anywhere no-scrollbar `
|
|
68
68
|
},
|
|
69
69
|
handleKeyDown: (view, event) => {
|
|
70
70
|
const isMobile = /Mobi|Android/i.test(navigator.userAgent); // 모바일 여부 판별
|
|
@@ -157,10 +157,10 @@ const Tiptap = forwardRef<TiptapEditorRef, TiptapProps>(
|
|
|
157
157
|
<EditorContent
|
|
158
158
|
editor={editor}
|
|
159
159
|
tabIndex={0}
|
|
160
|
-
className={`${contentClassName}
|
|
160
|
+
className={`${contentClassName} w-full rounded-md border !text-black dark:text-white `}
|
|
161
161
|
/>
|
|
162
162
|
</div>
|
|
163
|
-
{isScroll && !isBottom && <ShadowBox />}
|
|
163
|
+
{/*{isScroll && !isBottom && <ShadowBox className={`!h-[5px]`} />}*/}
|
|
164
164
|
</div>
|
|
165
165
|
);
|
|
166
166
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
const ShadowBox = () => {
|
|
3
|
-
return (<div className=
|
|
2
|
+
const ShadowBox = ({ className = '' }) => {
|
|
3
|
+
return (<div className={`${className} absolute bottom-0 left-0 z-[10] h-[50px] w-full bg-gradient-to-t from-[rgba(255,255,255,1)] to-[rgba(255,255,255,0)]`}/>);
|
|
4
4
|
};
|
|
5
5
|
export default ShadowBox;
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
interface IShadowBox {
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
const ShadowBox = ({ className = '' }: IShadowBox) => {
|
|
4
7
|
return (
|
|
5
|
-
<div
|
|
8
|
+
<div
|
|
9
|
+
className={`${className} absolute bottom-0 left-0 z-[10] h-[50px] w-full bg-gradient-to-t from-[rgba(255,255,255,1)] to-[rgba(255,255,255,0)]`}
|
|
10
|
+
/>
|
|
6
11
|
);
|
|
7
12
|
};
|
|
8
13
|
|