@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.
@@ -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]`}>
@@ -84,7 +84,6 @@ const ChatMessage: React.FC<ChatMessageProps> = ({
84
84
  const isAuthForm = hasForm(message);
85
85
  const isRichForm = hasRichForm(message);
86
86
  const isFile = hasFileArray(message);
87
- console.log('inquiryStatus', inquiryStatus);
88
87
 
89
88
  // 파일이 있는경우
90
89
  if (isFile) {
@@ -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="dr_talk_body_medium2 line-clamp-2 w-[calc(100%-24px)] text-drTalkGrayscale2 ">
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 className="dr_talk_body_medium2 line-clamp-2 w-[calc(100%-24px)] text-drTalkGrayscale2 ">
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} max-h-[72px] min-h-[36px] w-full overflow-hidden rounded-md border !text-black dark:text-white `}/>
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} max-h-[72px] min-h-[36px] w-full overflow-hidden rounded-md border !text-black dark:text-white `}
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
  }
@@ -253,6 +253,7 @@ export function connectWebSocket(wsUrl, token, isOpen, setIsConnected, onMessage
253
253
  setupSocketHandlers(newSocket);
254
254
  }
255
255
  catch (error) {
256
+ console.log('socket error', error);
256
257
  setIsConnected(false);
257
258
  }
258
259
  }
@@ -314,6 +314,7 @@ export function connectWebSocket(
314
314
  // 새 소켓에 핸들러 등록
315
315
  setupSocketHandlers(newSocket);
316
316
  } catch (error) {
317
+ console.log('socket error', error);
317
318
  setIsConnected(false);
318
319
  }
319
320
  } else {
@@ -1,3 +1,6 @@
1
1
  import React from 'react';
2
- declare const ShadowBox: () => React.JSX.Element;
2
+ interface IShadowBox {
3
+ className?: string;
4
+ }
5
+ declare const ShadowBox: ({ className }: IShadowBox) => React.JSX.Element;
3
6
  export default ShadowBox;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- const ShadowBox = () => {
3
- return (<div 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)]"/>);
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
- const ShadowBox = () => {
3
+ interface IShadowBox {
4
+ className?: string;
5
+ }
6
+ const ShadowBox = ({ className = '' }: IShadowBox) => {
4
7
  return (
5
- <div 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)]" />
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
 
@@ -2267,6 +2267,10 @@ video {
2267
2267
  aspect-ratio: 16 / 9;
2268
2268
  }
2269
2269
 
2270
+ .\!h-\[5px\] {
2271
+ height: 5px !important;
2272
+ }
2273
+
2270
2274
  .\!h-\[83px\] {
2271
2275
  height: 83px !important;
2272
2276
  }