@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,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
interface Button2Props {
|
|
4
|
+
onClick?: () => void | Promise<void>;
|
|
5
|
+
type?: 'button' | 'submit' | 'reset';
|
|
6
|
+
className?: string;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
isDisabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const Button2 = ({ onClick, type = 'button', className = '', children, isDisabled = false }: Button2Props) => {
|
|
12
|
+
return (
|
|
13
|
+
<button
|
|
14
|
+
disabled={isDisabled}
|
|
15
|
+
type={type}
|
|
16
|
+
onClick={onClick}
|
|
17
|
+
className={`
|
|
18
|
+
dr_talk_body_small1 h-[40px] rounded-[6px] bg-[#AA1D36]
|
|
19
|
+
text-center text-drTalkWhite
|
|
20
|
+
disabled:bg-drTalkDisabled
|
|
21
|
+
${className}
|
|
22
|
+
`}
|
|
23
|
+
>
|
|
24
|
+
{children}
|
|
25
|
+
</button>
|
|
26
|
+
);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export default Button2;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface Button3Props {
|
|
3
|
+
onClick?: () => void | Promise<void>;
|
|
4
|
+
type?: 'button' | 'submit' | 'reset';
|
|
5
|
+
className?: string;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
isDisabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const Button3: ({ onClick, type, className, children, isDisabled }: Button3Props) => React.JSX.Element;
|
|
10
|
+
export default Button3;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
const Button3 = ({ onClick, type = 'button', className = '', children, isDisabled = false }) => {
|
|
3
|
+
return (<button type={type} onClick={onClick} disabled={isDisabled} className={`
|
|
4
|
+
dr_talk_subtitle_medium
|
|
5
|
+
h-[48px] rounded-[25px] bg-drTalkBtnActive2 text-drTalkWhite
|
|
6
|
+
disabled:cursor-not-allowed disabled:bg-drTalkDisabled
|
|
7
|
+
${className}
|
|
8
|
+
`}>
|
|
9
|
+
{children}
|
|
10
|
+
</button>);
|
|
11
|
+
};
|
|
12
|
+
export default Button3;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
interface Button3Props {
|
|
4
|
+
onClick?: () => void | Promise<void>;
|
|
5
|
+
type?: 'button' | 'submit' | 'reset';
|
|
6
|
+
className?: string;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
isDisabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const Button3 = ({ onClick, type = 'button', className = '', children, isDisabled = false }: Button3Props) => {
|
|
12
|
+
return (
|
|
13
|
+
<button
|
|
14
|
+
type={type}
|
|
15
|
+
onClick={onClick}
|
|
16
|
+
disabled={isDisabled}
|
|
17
|
+
className={`
|
|
18
|
+
dr_talk_subtitle_medium
|
|
19
|
+
h-[48px] rounded-[25px] bg-drTalkBtnActive2 text-drTalkWhite
|
|
20
|
+
disabled:cursor-not-allowed disabled:bg-drTalkDisabled
|
|
21
|
+
${className}
|
|
22
|
+
`}
|
|
23
|
+
>
|
|
24
|
+
{children}
|
|
25
|
+
</button>
|
|
26
|
+
);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export default Button3;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface Button4Props {
|
|
3
|
+
onClick?: () => void | Promise<void>;
|
|
4
|
+
type?: 'button' | 'submit' | 'reset';
|
|
5
|
+
className?: string;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
isDisabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const Button4: ({ onClick, type, className, children, isDisabled }: Button4Props) => React.JSX.Element;
|
|
10
|
+
export default Button4;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
const Button4 = ({ onClick, type = 'button', className = '', children, isDisabled = false }) => {
|
|
3
|
+
return (<button type={type} onClick={onClick} disabled={isDisabled} className={`
|
|
4
|
+
dr_talk_body_medium2 h-[26px]
|
|
5
|
+
rounded-[4px] bg-drTalkBtnActive1 px-[12px] text-drTalkWhite
|
|
6
|
+
disabled:cursor-not-allowed disabled:bg-drTalkGrayscale3
|
|
7
|
+
${className}
|
|
8
|
+
`}>
|
|
9
|
+
{children}
|
|
10
|
+
</button>);
|
|
11
|
+
};
|
|
12
|
+
export default Button4;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
interface Button4Props {
|
|
4
|
+
onClick?: () => void | Promise<void>;
|
|
5
|
+
type?: 'button' | 'submit' | 'reset';
|
|
6
|
+
className?: string;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
isDisabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const Button4 = ({ onClick, type = 'button', className = '', children, isDisabled = false }: Button4Props) => {
|
|
12
|
+
return (
|
|
13
|
+
<button
|
|
14
|
+
type={type}
|
|
15
|
+
onClick={onClick}
|
|
16
|
+
disabled={isDisabled}
|
|
17
|
+
className={`
|
|
18
|
+
dr_talk_body_medium2 h-[26px]
|
|
19
|
+
rounded-[4px] bg-drTalkBtnActive1 px-[12px] text-drTalkWhite
|
|
20
|
+
disabled:cursor-not-allowed disabled:bg-drTalkGrayscale3
|
|
21
|
+
${className}
|
|
22
|
+
`}
|
|
23
|
+
>
|
|
24
|
+
{children}
|
|
25
|
+
</button>
|
|
26
|
+
);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export default Button4;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
const CheckBox1 = ({ title, checked, onChange }) => {
|
|
3
|
+
return (<label className="flex cursor-pointer flex-row items-center gap-[4px]">
|
|
4
|
+
{/* 실제 체크박스는 숨김 */}
|
|
5
|
+
<input type="checkbox" checked={checked} onChange={onChange} className="hidden"/>
|
|
6
|
+
{/* 커스텀 체크박스 */}
|
|
7
|
+
{checked ? (<svg width="13.5" height="13.5" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
8
|
+
<path d="M0.75 0.25H12.75C12.9489 0.25 13.1397 0.329018 13.2803 0.46967C13.421 0.610322 13.5 0.801088 13.5 1V13C13.5 13.1989 13.421 13.3897 13.2803 13.5303C13.1397 13.671 12.9489 13.75 12.75 13.75H0.75C0.551088 13.75 0.360322 13.671 0.21967 13.5303C0.0790176 13.3897 0 13.1989 0 13V1C0 0.801088 0.0790176 0.610322 0.21967 0.46967C0.360322 0.329018 0.551088 0.25 0.75 0.25ZM6.00225 10L11.3048 4.69675L10.245 3.63625L6.00225 7.879L3.8805 5.75725L2.82 6.81775L6.00225 10Z" fill="#2E385B"/>
|
|
9
|
+
</svg>) : (<svg width="13.5" height="13.5" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
10
|
+
<path fillRule="evenodd" clipRule="evenodd" d="M13.75 0.25V13.75H0.25V0.25H13.75ZM12.25 1.75001H1.75001V12.25H12.25V1.75001Z" fill="#2E385B" fillOpacity="0.3"/>
|
|
11
|
+
</svg>)}
|
|
12
|
+
<span className="dr_talk_body_medium2">{title}</span>
|
|
13
|
+
</label>);
|
|
14
|
+
};
|
|
15
|
+
export default CheckBox1;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
interface CheckBox1Props {
|
|
4
|
+
title: string;
|
|
5
|
+
checked: boolean;
|
|
6
|
+
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const CheckBox1: React.FC<CheckBox1Props> = ({ title, checked, onChange }) => {
|
|
10
|
+
return (
|
|
11
|
+
<label className="flex cursor-pointer flex-row items-center gap-[4px]">
|
|
12
|
+
{/* 실제 체크박스는 숨김 */}
|
|
13
|
+
<input type="checkbox" checked={checked} onChange={onChange} className="hidden" />
|
|
14
|
+
{/* 커스텀 체크박스 */}
|
|
15
|
+
{checked ? (
|
|
16
|
+
<svg width="13.5" height="13.5" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
17
|
+
<path
|
|
18
|
+
d="M0.75 0.25H12.75C12.9489 0.25 13.1397 0.329018 13.2803 0.46967C13.421 0.610322 13.5 0.801088 13.5 1V13C13.5 13.1989 13.421 13.3897 13.2803 13.5303C13.1397 13.671 12.9489 13.75 12.75 13.75H0.75C0.551088 13.75 0.360322 13.671 0.21967 13.5303C0.0790176 13.3897 0 13.1989 0 13V1C0 0.801088 0.0790176 0.610322 0.21967 0.46967C0.360322 0.329018 0.551088 0.25 0.75 0.25ZM6.00225 10L11.3048 4.69675L10.245 3.63625L6.00225 7.879L3.8805 5.75725L2.82 6.81775L6.00225 10Z"
|
|
19
|
+
fill="#2E385B"
|
|
20
|
+
/>
|
|
21
|
+
</svg>
|
|
22
|
+
) : (
|
|
23
|
+
<svg width="13.5" height="13.5" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
24
|
+
<path
|
|
25
|
+
fillRule="evenodd"
|
|
26
|
+
clipRule="evenodd"
|
|
27
|
+
d="M13.75 0.25V13.75H0.25V0.25H13.75ZM12.25 1.75001H1.75001V12.25H12.25V1.75001Z"
|
|
28
|
+
fill="#2E385B"
|
|
29
|
+
fillOpacity="0.3"
|
|
30
|
+
/>
|
|
31
|
+
</svg>
|
|
32
|
+
)}
|
|
33
|
+
<span className="dr_talk_body_medium2">{title}</span>
|
|
34
|
+
</label>
|
|
35
|
+
);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export default CheckBox1;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface CheckBox2Props {
|
|
3
|
+
title: string;
|
|
4
|
+
checked: boolean;
|
|
5
|
+
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const CheckBox2: ({ title, checked, onChange }: CheckBox2Props) => React.JSX.Element;
|
|
8
|
+
export default CheckBox2;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Image from 'next/image';
|
|
4
|
+
const CheckBox2 = ({ title, checked, onChange }) => {
|
|
5
|
+
const s3Url = process.env.NEXT_PUBLIC_S3_URL;
|
|
6
|
+
const CheckActiveIconBlue = `${s3Url}/daeryuntalk/active_checkbox_blue.png`;
|
|
7
|
+
const CheckNoneActiveIconBlue = `${s3Url}/daeryuntalk/non_active_checkbox.png`;
|
|
8
|
+
return (<label className="flex cursor-pointer flex-row items-center gap-[4px]">
|
|
9
|
+
{/* 실제 체크박스는 숨김 */}
|
|
10
|
+
<input type="checkbox" checked={checked} onChange={onChange} className="hidden"/>
|
|
11
|
+
|
|
12
|
+
{/* 커스텀 체크박스 (두 이미지를 겹치고 opacity 전환) */}
|
|
13
|
+
<div className="relative h-[13.5px] w-[13.5px]">
|
|
14
|
+
<Image src={CheckActiveIconBlue} alt="check active icon blue" width={1000} height={1000} className={`absolute left-0 top-0 h-[13.5px] w-[13.5px] transition-opacity duration-200 ${checked ? 'opacity-100' : 'opacity-0'}`}/>
|
|
15
|
+
<Image src={CheckNoneActiveIconBlue} alt="check none active icon blue" width={1000} height={1000} className={`absolute left-0 top-0 h-[13.5px] w-[13.5px] transition-opacity duration-200 ${checked ? 'opacity-0' : 'opacity-100'}`}/>
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
<span className="dr_talk_body_medium2 text-black">{title}</span>
|
|
19
|
+
</label>);
|
|
20
|
+
};
|
|
21
|
+
export default CheckBox2;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
import Image from 'next/image';
|
|
5
|
+
// import CheckActiveIconBlue from '../../../../asset/images/daeryuntalk/active_checkbox_blue.png';
|
|
6
|
+
// import CheckNoneActiveIconBlue from '../../../../asset/images/daeryuntalk/non_active_checkbox.png';
|
|
7
|
+
|
|
8
|
+
interface CheckBox2Props {
|
|
9
|
+
title: string;
|
|
10
|
+
checked: boolean;
|
|
11
|
+
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const CheckBox2 = ({ title, checked, onChange }: CheckBox2Props) => {
|
|
15
|
+
const s3Url = process.env.NEXT_PUBLIC_S3_URL;
|
|
16
|
+
const CheckActiveIconBlue = `${s3Url}/daeryuntalk/active_checkbox_blue.png`;
|
|
17
|
+
const CheckNoneActiveIconBlue = `${s3Url}/daeryuntalk/non_active_checkbox.png`;
|
|
18
|
+
return (
|
|
19
|
+
<label className="flex cursor-pointer flex-row items-center gap-[4px]">
|
|
20
|
+
{/* 실제 체크박스는 숨김 */}
|
|
21
|
+
<input type="checkbox" checked={checked} onChange={onChange} className="hidden" />
|
|
22
|
+
|
|
23
|
+
{/* 커스텀 체크박스 (두 이미지를 겹치고 opacity 전환) */}
|
|
24
|
+
<div className="relative h-[13.5px] w-[13.5px]">
|
|
25
|
+
<Image
|
|
26
|
+
src={CheckActiveIconBlue}
|
|
27
|
+
alt="check active icon blue"
|
|
28
|
+
width={1000}
|
|
29
|
+
height={1000}
|
|
30
|
+
className={`absolute left-0 top-0 h-[13.5px] w-[13.5px] transition-opacity duration-200 ${
|
|
31
|
+
checked ? 'opacity-100' : 'opacity-0'
|
|
32
|
+
}`}
|
|
33
|
+
/>
|
|
34
|
+
<Image
|
|
35
|
+
src={CheckNoneActiveIconBlue}
|
|
36
|
+
alt="check none active icon blue"
|
|
37
|
+
width={1000}
|
|
38
|
+
height={1000}
|
|
39
|
+
className={`absolute left-0 top-0 h-[13.5px] w-[13.5px] transition-opacity duration-200 ${
|
|
40
|
+
checked ? 'opacity-0' : 'opacity-100'
|
|
41
|
+
}`}
|
|
42
|
+
/>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<span className="dr_talk_body_medium2 text-black">{title}</span>
|
|
46
|
+
</label>
|
|
47
|
+
);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export default CheckBox2;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface Input1Props {
|
|
3
|
+
value?: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
readOnly?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
type?: string;
|
|
10
|
+
}
|
|
11
|
+
declare const Input1: ({ value, name, readOnly, className, onChange, placeholder, type }: Input1Props) => React.JSX.Element;
|
|
12
|
+
export default Input1;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
const Input1 = ({ value, name, readOnly = false, className = '', onChange, placeholder, type = 'text' }) => {
|
|
3
|
+
return (<input type={type} readOnly={readOnly} name={name} value={value} onChange={onChange} placeholder={placeholder} className={`
|
|
4
|
+
h-[40px] w-full rounded-[6px] border-[1px] border-solid
|
|
5
|
+
border-[#D9D9D9] p-[8px]
|
|
6
|
+
${className}
|
|
7
|
+
`}/>);
|
|
8
|
+
};
|
|
9
|
+
export default Input1;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
interface Input1Props {
|
|
4
|
+
value?: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
readOnly?: boolean;
|
|
7
|
+
className?: string;
|
|
8
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
type?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const Input1 = ({
|
|
14
|
+
value,
|
|
15
|
+
name,
|
|
16
|
+
readOnly = false,
|
|
17
|
+
className = '',
|
|
18
|
+
onChange,
|
|
19
|
+
placeholder,
|
|
20
|
+
type = 'text'
|
|
21
|
+
}: Input1Props) => {
|
|
22
|
+
return (
|
|
23
|
+
<input
|
|
24
|
+
type={type}
|
|
25
|
+
readOnly={readOnly}
|
|
26
|
+
name={name}
|
|
27
|
+
value={value}
|
|
28
|
+
onChange={onChange}
|
|
29
|
+
placeholder={placeholder}
|
|
30
|
+
className={`
|
|
31
|
+
h-[40px] w-full rounded-[6px] border-[1px] border-solid
|
|
32
|
+
border-[#D9D9D9] p-[8px]
|
|
33
|
+
${className}
|
|
34
|
+
`}
|
|
35
|
+
/>
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export default Input1;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface Input2Props {
|
|
3
|
+
value?: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
readOnly?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
type?: string;
|
|
10
|
+
maxLength?: number;
|
|
11
|
+
}
|
|
12
|
+
declare const Input2: ({ value, name, readOnly, className, onChange, placeholder, type, maxLength }: Input2Props) => React.JSX.Element;
|
|
13
|
+
export default Input2;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
const Input2 = ({ value, name, readOnly = false, className = '', onChange, placeholder, type = 'text', maxLength = 99999 }) => {
|
|
3
|
+
return (<input type={type} readOnly={readOnly} name={name} value={value} onChange={onChange} maxLength={maxLength} placeholder={placeholder} className={`
|
|
4
|
+
dr_talk_body_medium2
|
|
5
|
+
h-[40px] w-full rounded-[6px] border-[1px] border-solid
|
|
6
|
+
border-[#D9D9D9] px-[8px] py-[12.5px] placeholder-drTalkGrayscale3 outline-none
|
|
7
|
+
${className}
|
|
8
|
+
`}/>);
|
|
9
|
+
};
|
|
10
|
+
export default Input2;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
interface Input2Props {
|
|
4
|
+
value?: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
readOnly?: boolean;
|
|
7
|
+
className?: string;
|
|
8
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
type?: string;
|
|
11
|
+
maxLength?: number;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const Input2 = ({
|
|
15
|
+
value,
|
|
16
|
+
name,
|
|
17
|
+
readOnly = false,
|
|
18
|
+
className = '',
|
|
19
|
+
onChange,
|
|
20
|
+
placeholder,
|
|
21
|
+
type = 'text',
|
|
22
|
+
maxLength = 99999
|
|
23
|
+
}: Input2Props) => {
|
|
24
|
+
return (
|
|
25
|
+
<input
|
|
26
|
+
type={type}
|
|
27
|
+
readOnly={readOnly}
|
|
28
|
+
name={name}
|
|
29
|
+
value={value}
|
|
30
|
+
onChange={onChange}
|
|
31
|
+
maxLength={maxLength}
|
|
32
|
+
placeholder={placeholder}
|
|
33
|
+
className={`
|
|
34
|
+
dr_talk_body_medium2
|
|
35
|
+
h-[40px] w-full rounded-[6px] border-[1px] border-solid
|
|
36
|
+
border-[#D9D9D9] px-[8px] py-[12.5px] placeholder-drTalkGrayscale3 outline-none
|
|
37
|
+
${className}
|
|
38
|
+
`}
|
|
39
|
+
/>
|
|
40
|
+
);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export default Input2;
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import React, { useEffect, useState } from 'react';
|
|
3
|
+
import ChatButton from './ChatButton';
|
|
4
|
+
import ChatWidget from './ChatWidget';
|
|
5
|
+
import { DaeryuntalkProvider } from './DaeryuntalkContext';
|
|
6
|
+
import { DaeryuntalkToastProvider } from './Toast/DaeryuntalkToastProvider';
|
|
7
|
+
import mobile from 'is-mobile';
|
|
8
|
+
import Head from 'next/head';
|
|
9
|
+
import { usePathname } from 'next/navigation';
|
|
10
|
+
import ViewportHandler from './ViewportHandler';
|
|
11
|
+
import { useWindowSize } from './_hooks/useWindowSize';
|
|
12
|
+
const DaeryuntalkBackup = ({ tel = '1800-7905', centerCode = 'CT0000', bannerHeight = 0 }) => {
|
|
13
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
14
|
+
const [isMobile, setIsMobile] = useState(false);
|
|
15
|
+
const [isMobileSafari, setIsMobileSafari] = useState(false); // ios + 모바일
|
|
16
|
+
const [androidViewportHeight, setAndroidViewportHeight] = useState(0); //
|
|
17
|
+
const pathName = usePathname();
|
|
18
|
+
const windowSize = useWindowSize();
|
|
19
|
+
const isMobileSize = windowSize.width <= 480;
|
|
20
|
+
// const isMobile = mobile();
|
|
21
|
+
const [hashValue, setHashValue] = useState(null);
|
|
22
|
+
const [showCustomTitle, setShowCustomTitle] = useState(false); // ← 추가
|
|
23
|
+
// 상태 관리 (컴포넌트 내부에 추가)
|
|
24
|
+
const [animationState, setAnimationState] = useState('hidden'); // 'hidden', 'entering', 'visible', 'exiting'
|
|
25
|
+
const [currentCenterCode, setCurrentCenterCode] = useState(null);
|
|
26
|
+
const detectIsMobileSafari = () => {
|
|
27
|
+
if (typeof window === 'undefined')
|
|
28
|
+
return false;
|
|
29
|
+
const ua = window.navigator.userAgent;
|
|
30
|
+
const isIOS = /iPhone|iPad|iPod/i.test(ua);
|
|
31
|
+
const isSafari = /Safari/i.test(ua) && !/Chrome/i.test(ua);
|
|
32
|
+
return isIOS && isSafari;
|
|
33
|
+
};
|
|
34
|
+
// 모달 열기 함수
|
|
35
|
+
const openModal = () => {
|
|
36
|
+
setAnimationState('entering');
|
|
37
|
+
setIsOpen(true);
|
|
38
|
+
setTimeout(() => {
|
|
39
|
+
setAnimationState('visible');
|
|
40
|
+
}, 50);
|
|
41
|
+
};
|
|
42
|
+
// 모달 닫기 함수
|
|
43
|
+
const closeModal = () => {
|
|
44
|
+
setAnimationState('exiting');
|
|
45
|
+
setTimeout(() => {
|
|
46
|
+
setAnimationState('hidden');
|
|
47
|
+
setIsOpen(false);
|
|
48
|
+
}, 300);
|
|
49
|
+
};
|
|
50
|
+
const toggleChat = () => {
|
|
51
|
+
if (isOpen) {
|
|
52
|
+
closeModal();
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
openModal();
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
useEffect(() => {
|
|
59
|
+
var _a;
|
|
60
|
+
if (!isMobile) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
if (isMobileSafari) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
const compute = () => {
|
|
67
|
+
var _a;
|
|
68
|
+
const vh = ((_a = window.visualViewport) === null || _a === void 0 ? void 0 : _a.height) || window.innerHeight;
|
|
69
|
+
setAndroidViewportHeight(vh);
|
|
70
|
+
};
|
|
71
|
+
compute();
|
|
72
|
+
window.addEventListener('resize', compute);
|
|
73
|
+
(_a = window.visualViewport) === null || _a === void 0 ? void 0 : _a.addEventListener('resize', compute);
|
|
74
|
+
return () => {
|
|
75
|
+
var _a;
|
|
76
|
+
window.removeEventListener('resize', compute);
|
|
77
|
+
(_a = window.visualViewport) === null || _a === void 0 ? void 0 : _a.removeEventListener('resize', compute);
|
|
78
|
+
};
|
|
79
|
+
}, [isMobile, isMobileSafari]);
|
|
80
|
+
useEffect(() => {
|
|
81
|
+
setIsMobileSafari(detectIsMobileSafari());
|
|
82
|
+
}, []);
|
|
83
|
+
useEffect(() => {
|
|
84
|
+
if (!((isMobileSize || isMobile) && isOpen))
|
|
85
|
+
return;
|
|
86
|
+
const { body, documentElement } = document;
|
|
87
|
+
// 현재 스크롤 위치 저장
|
|
88
|
+
const scrollY = window.scrollY || documentElement.scrollTop || body.scrollTop || 0;
|
|
89
|
+
// 스크롤 완전 고정
|
|
90
|
+
body.style.position = 'fixed';
|
|
91
|
+
body.style.top = `-${scrollY}px`;
|
|
92
|
+
body.style.width = '100%';
|
|
93
|
+
body.style.left = '0';
|
|
94
|
+
body.style.right = '0';
|
|
95
|
+
body.style.overflow = 'hidden';
|
|
96
|
+
return () => {
|
|
97
|
+
body.style.position = '';
|
|
98
|
+
body.style.top = '';
|
|
99
|
+
body.style.width = '';
|
|
100
|
+
body.style.left = '';
|
|
101
|
+
body.style.right = '';
|
|
102
|
+
body.style.overflow = '';
|
|
103
|
+
window.scrollTo(0, scrollY);
|
|
104
|
+
};
|
|
105
|
+
}, [isMobile, isMobileSize, isOpen]);
|
|
106
|
+
useEffect(() => {
|
|
107
|
+
if (typeof window !== 'undefined') {
|
|
108
|
+
setIsMobile(mobile());
|
|
109
|
+
const path = window.location.pathname;
|
|
110
|
+
// const isDaeryuntalkPath =
|
|
111
|
+
// path === '/daeryuntalk' || path === '/daeryuntalk-test' || (isLocal && path === '/chat-test');
|
|
112
|
+
const isDaeryuntalkPath = path === '/daeryuntalk' || path === '/daeryuntalk-test';
|
|
113
|
+
if (isDaeryuntalkPath) {
|
|
114
|
+
setShowCustomTitle(true);
|
|
115
|
+
const hash = window.location.hash;
|
|
116
|
+
const raw = hash ? hash.substring(1) : null;
|
|
117
|
+
if (raw) {
|
|
118
|
+
if (raw.includes('centerCode=')) {
|
|
119
|
+
// 쿼리 스트링 형식 (#token=abc¢erCode=xyz) 파싱
|
|
120
|
+
const params = new URLSearchParams(raw);
|
|
121
|
+
const token = params.get('token');
|
|
122
|
+
const code = params.get('centerCode') || '';
|
|
123
|
+
if (centerCode) {
|
|
124
|
+
setHashValue(token);
|
|
125
|
+
}
|
|
126
|
+
setCurrentCenterCode(code);
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
setHashValue(raw);
|
|
130
|
+
setCurrentCenterCode(centerCode);
|
|
131
|
+
}
|
|
132
|
+
// 해시 제거 (선택 사항)
|
|
133
|
+
// window.history.replaceState(null, '', window.location.pathname + window.location.search);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
setCurrentCenterCode(centerCode);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}, [pathName]);
|
|
141
|
+
useEffect(() => {
|
|
142
|
+
if (isOpen && (isMobile || isMobileSize)) {
|
|
143
|
+
document.body.style.overflow = 'hidden';
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
document.body.style.overflow = '';
|
|
147
|
+
}
|
|
148
|
+
// 컴포넌트가 unmount 될 때도 원복
|
|
149
|
+
return () => {
|
|
150
|
+
document.body.style.overflow = '';
|
|
151
|
+
};
|
|
152
|
+
}, [isOpen, isMobile, isMobileSize]);
|
|
153
|
+
useEffect(() => {
|
|
154
|
+
if (!(isMobile && isOpen)) {
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
document.documentElement.classList.add('drtop-inflow-active');
|
|
158
|
+
return () => document.documentElement.classList.remove('drtop-inflow-active');
|
|
159
|
+
}, [isMobile, isOpen]);
|
|
160
|
+
// ios일 경우 확대영 class 추가
|
|
161
|
+
useEffect(() => {
|
|
162
|
+
const ua = navigator.userAgent;
|
|
163
|
+
const isiOS = /iP(hone|od|ad)/.test(ua);
|
|
164
|
+
const isWebKit = /WebKit/.test(ua) && !/CriOS|FxiOS|OPiOS/.test(ua);
|
|
165
|
+
if (isiOS && isWebKit) {
|
|
166
|
+
document.documentElement.classList.add('ios');
|
|
167
|
+
return () => document.documentElement.classList.remove('ios');
|
|
168
|
+
}
|
|
169
|
+
}, []);
|
|
170
|
+
return (<div className="daeryuntalk-wrapper my-scroll-container">
|
|
171
|
+
{showCustomTitle && (<Head>
|
|
172
|
+
<title>법무법인 (유한)대륜 채팅상담</title>
|
|
173
|
+
</Head>)}
|
|
174
|
+
<style>
|
|
175
|
+
{`
|
|
176
|
+
@media (max-width: 360px) {
|
|
177
|
+
html.drtop-inflow-active #wrap { min-width: 0 !important; }
|
|
178
|
+
}
|
|
179
|
+
`}
|
|
180
|
+
</style>
|
|
181
|
+
<DaeryuntalkToastProvider>
|
|
182
|
+
<ViewportHandler isMobile={isMobile} isDisable={!isOpen || !isMobile}/>
|
|
183
|
+
<DaeryuntalkProvider propsTel={tel} isMobile={isMobile} onClose={closeModal} centerCode={currentCenterCode || ''} isOpen={isOpen}>
|
|
184
|
+
{isMobile ? (isOpen || !currentCenterCode ? null : (<ChatButton isOpen={isOpen} isMobile={isMobile} hashValue={hashValue} onClick={toggleChat}/>)) : !currentCenterCode ? null : (<ChatButton isOpen={isOpen} isMobile={isMobile} hashValue={hashValue} onClick={toggleChat} bannerHeight={bannerHeight}/>)}
|
|
185
|
+
<ChatWidget isOpen={hashValue ? true : isOpen} isMobile={isMobile} onClose={closeModal} hashValue={hashValue} setHashValue={setHashValue} animationState={animationState} isMobileSafari={isMobileSafari} androidViewportHeight={androidViewportHeight}/>
|
|
186
|
+
</DaeryuntalkProvider>
|
|
187
|
+
</DaeryuntalkToastProvider>
|
|
188
|
+
</div>);
|
|
189
|
+
};
|
|
190
|
+
export default DaeryuntalkBackup;
|