@daeryun/dr_components 1.1.15 → 1.1.17
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/asset/images/daeryuntalk/active_checkbox_blue.png +0 -0
- package/dist/asset/images/daeryuntalk/non_active_checkbox.png +0 -0
- package/dist/components/Daeryuntalk/ChatConversation.d.ts +2 -0
- package/dist/components/Daeryuntalk/ChatConversation.jsx +13 -5
- package/dist/components/Daeryuntalk/ChatConversation.tsx +23 -5
- package/dist/components/Daeryuntalk/ChatHomeView.jsx +2 -3
- package/dist/components/Daeryuntalk/ChatHomeView.tsx +2 -1
- package/dist/components/Daeryuntalk/ChatInput.d.ts +2 -0
- package/dist/components/Daeryuntalk/ChatInput.jsx +7 -7
- package/dist/components/Daeryuntalk/ChatInput.tsx +30 -19
- package/dist/components/Daeryuntalk/ChatItem/AgeCheckBox.d.ts +6 -0
- package/dist/components/Daeryuntalk/ChatItem/AgeCheckBox.jsx +18 -0
- package/dist/components/Daeryuntalk/ChatItem/AgeCheckBox.tsx +26 -0
- package/dist/components/Daeryuntalk/ChatItem/ChatPrivacyAuth.jsx +7 -8
- package/dist/components/Daeryuntalk/ChatItem/ChatPrivacyAuth.tsx +7 -7
- package/dist/components/Daeryuntalk/DaeryuntalkContext.d.ts +4 -0
- package/dist/components/Daeryuntalk/DaeryuntalkContext.jsx +15 -6
- package/dist/components/Daeryuntalk/DaeryuntalkContext.tsx +20 -7
- package/dist/components/Daeryuntalk/NoticeMessage.jsx +14 -5
- package/dist/components/Daeryuntalk/NoticeMessage.tsx +15 -5
- package/dist/components/Daeryuntalk/Tiptap/DisabledInput.d.ts +6 -0
- package/dist/components/Daeryuntalk/Tiptap/DisabledInput.jsx +17 -0
- package/dist/components/Daeryuntalk/Tiptap/DisabledInput.tsx +28 -0
- package/dist/components/Daeryuntalk/_api/daeryuntalk/index.d.ts +2 -0
- package/dist/components/Daeryuntalk/_api/daeryuntalk/index.js +24 -0
- package/dist/components/Daeryuntalk/_api/daeryuntalk/index.ts +32 -0
- package/dist/components/Daeryuntalk/_api/daeryuntalk/type/response.d.ts +2 -0
- package/dist/components/Daeryuntalk/_api/daeryuntalk/type/response.ts +5 -0
- package/dist/components/Daeryuntalk/_enums/ags_check_status.d.ts +5 -0
- package/dist/components/Daeryuntalk/_enums/ags_check_status.js +9 -0
- package/dist/components/Daeryuntalk/_enums/ags_check_status.ts +9 -0
- package/dist/components/Daeryuntalk/_hooks/talkprovider/useChatHandler.d.ts +4 -1
- package/dist/components/Daeryuntalk/_hooks/talkprovider/useChatHandler.js +49 -23
- package/dist/components/Daeryuntalk/_hooks/talkprovider/useChatHandler.ts +52 -14
- package/dist/components/Daeryuntalk/_hooks/talkprovider/useFullURL.jsx +4 -12
- package/dist/components/Daeryuntalk/_hooks/talkprovider/useFullURL.tsx +6 -13
- package/dist/components/Daeryuntalk/_hooks/talkprovider/useSocketEventHandler.d.ts +3 -1
- package/dist/components/Daeryuntalk/_hooks/talkprovider/useSocketEventHandler.js +9 -5
- package/dist/components/Daeryuntalk/_hooks/talkprovider/useSocketEventHandler.ts +9 -1
- package/dist/components/Daeryuntalk/_hooks/talkprovider/useWorkFlow.ts +1 -1
- package/dist/components/Daeryuntalk/_ui/buttons/Button4.d.ts +10 -0
- package/dist/components/Daeryuntalk/_ui/buttons/Button4.jsx +12 -0
- package/dist/components/Daeryuntalk/_ui/buttons/Button4.tsx +29 -0
- package/dist/components/Daeryuntalk/_ui/checkboxs/CheckBox2.d.ts +8 -0
- package/dist/components/Daeryuntalk/_ui/checkboxs/CheckBox2.jsx +20 -0
- package/dist/components/Daeryuntalk/_ui/checkboxs/CheckBox2.tsx +47 -0
- package/dist/components/page/SuccessNew/components/SuccessCase.jsx +20 -23
- package/dist/components/page/SuccessNew/components/SuccessCase.tsx +1 -1
- package/dist/styles/globals.css +45 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -7,7 +7,8 @@ import {
|
|
|
7
7
|
generateChatInquiry,
|
|
8
8
|
getChatInquiryDetailNew,
|
|
9
9
|
getChatInquiryMessageList,
|
|
10
|
-
sendChatMessage
|
|
10
|
+
sendChatMessage,
|
|
11
|
+
ageCheckUpdate
|
|
11
12
|
} from '../../_api';
|
|
12
13
|
import { convertApiMessageObjectToUiMessageObject, convertApiMessageToUiMessage } from '../../_lib';
|
|
13
14
|
import { IChatInquiryMainDataResponse } from '../../_api/daeryuntalk/type/response';
|
|
@@ -17,6 +18,7 @@ import { useDaeryunTalkToast } from '../../Toast/DaeryuntalkToastProvider';
|
|
|
17
18
|
import { useFullURL } from './useFullURL';
|
|
18
19
|
import { getErrorMessageMap } from '../../_enums/error';
|
|
19
20
|
import { consoleFn } from '../../_lib/utils';
|
|
21
|
+
import { AgeCheckStatusEnums } from '../../_enums/ags_check_status';
|
|
20
22
|
|
|
21
23
|
interface props {
|
|
22
24
|
setIsLoading: Dispatch<SetStateAction<boolean>>;
|
|
@@ -30,6 +32,7 @@ interface props {
|
|
|
30
32
|
setWorkFlowStack: Dispatch<SetStateAction<string[]>>;
|
|
31
33
|
setInquiryMainData: Dispatch<SetStateAction<IChatInquiryMainDataResponse | null>>;
|
|
32
34
|
centerCode: string;
|
|
35
|
+
setAgeCheckStatus: Dispatch<SetStateAction<AgeCheckStatusEnums | null>>;
|
|
33
36
|
}
|
|
34
37
|
|
|
35
38
|
export const useChatHandler = ({
|
|
@@ -43,7 +46,8 @@ export const useChatHandler = ({
|
|
|
43
46
|
setIsNextPage,
|
|
44
47
|
setWorkFlowStack,
|
|
45
48
|
setInquiryMainData,
|
|
46
|
-
centerCode
|
|
49
|
+
centerCode,
|
|
50
|
+
setAgeCheckStatus
|
|
47
51
|
}: props) => {
|
|
48
52
|
const toast = useDaeryunTalkToast();
|
|
49
53
|
const fullUrl = useFullURL();
|
|
@@ -239,6 +243,10 @@ export const useChatHandler = ({
|
|
|
239
243
|
if (detailResponse.data?.chat_inquiry_state_code) {
|
|
240
244
|
setInquiryStatus(detailResponse.data.chat_inquiry_state_code);
|
|
241
245
|
}
|
|
246
|
+
// 해당 문의 연령 체크
|
|
247
|
+
if (detailResponse.data?.age_consent_state_code) {
|
|
248
|
+
setAgeCheckStatus(detailResponse.data.age_consent_state_code);
|
|
249
|
+
}
|
|
242
250
|
// 해당 문의 오브젝트
|
|
243
251
|
if (detailResponse.data?.object_expose_info) {
|
|
244
252
|
const uiObject = convertApiMessageObjectToUiMessageObject(detailResponse.data);
|
|
@@ -358,6 +366,10 @@ export const useChatHandler = ({
|
|
|
358
366
|
if (detailResponse.data?.chat_inquiry_state_code) {
|
|
359
367
|
setInquiryStatus(detailResponse.data.chat_inquiry_state_code);
|
|
360
368
|
}
|
|
369
|
+
// 해당 문의 연령 체크
|
|
370
|
+
if (detailResponse.data?.age_consent_state_code) {
|
|
371
|
+
setAgeCheckStatus(detailResponse.data.age_consent_state_code);
|
|
372
|
+
}
|
|
361
373
|
// 워크플로우 스택 업데이트
|
|
362
374
|
if (detailResponse.data?.work_flow_progress_stack) {
|
|
363
375
|
setWorkFlowStack(detailResponse.data?.work_flow_progress_stack ?? []);
|
|
@@ -456,25 +468,28 @@ export const useChatHandler = ({
|
|
|
456
468
|
async (data: { chatInquiryNumber: string; messageNumber: string; name: string; cellPhoneNumber: string }) => {
|
|
457
469
|
const { chatInquiryNumber, messageNumber, name, cellPhoneNumber } = data;
|
|
458
470
|
|
|
459
|
-
if (!chatInquiryNumber) {
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
}
|
|
471
|
+
// if (!chatInquiryNumber) {
|
|
472
|
+
// toast.error('채팅 개인 정보 업데이트: 문의 번호가 없음');
|
|
473
|
+
// return;
|
|
474
|
+
// }
|
|
463
475
|
|
|
464
|
-
|
|
465
|
-
|
|
476
|
+
// console.log('chatInquiryNumber', chatInquiryNumber);
|
|
477
|
+
|
|
478
|
+
|
|
479
|
+
if (!cellPhoneNumber) {
|
|
480
|
+
toast.error('이름과 휴대폰 번호를 입력해 주세요');
|
|
466
481
|
return;
|
|
467
482
|
}
|
|
468
483
|
|
|
469
484
|
if (!name) {
|
|
470
|
-
toast.error('
|
|
485
|
+
toast.error('이름과 휴대폰 번호를 입력해 주세요');
|
|
471
486
|
return;
|
|
472
487
|
}
|
|
473
488
|
|
|
474
|
-
if (!cellPhoneNumber) {
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
}
|
|
489
|
+
// if (!cellPhoneNumber) {
|
|
490
|
+
// toast.error('채팅 개인 정보 업데이트: 메시지 번호 없음');
|
|
491
|
+
// return;
|
|
492
|
+
// }
|
|
478
493
|
|
|
479
494
|
try {
|
|
480
495
|
setIsLoading?.(true);
|
|
@@ -543,6 +558,28 @@ export const useChatHandler = ({
|
|
|
543
558
|
[chatInquiryNumber]
|
|
544
559
|
);
|
|
545
560
|
|
|
561
|
+
const ageConfirm = useCallback(
|
|
562
|
+
async (
|
|
563
|
+
chatInquiryNumber: string,
|
|
564
|
+
ageConsentStateCode: AgeCheckStatusEnums
|
|
565
|
+
) => {
|
|
566
|
+
try {
|
|
567
|
+
const response = await ageCheckUpdate(chatInquiryNumber, ageConsentStateCode);
|
|
568
|
+
|
|
569
|
+
if (!(response.result_info.result_cd === 'OK' || response.result_info.result_type_cd === 'OK')) {
|
|
570
|
+
toast.error(getErrorMessageMap(response));
|
|
571
|
+
return;
|
|
572
|
+
}
|
|
573
|
+
setAgeCheckStatus(ageConsentStateCode);
|
|
574
|
+
return response;
|
|
575
|
+
} catch (error: any) {
|
|
576
|
+
console.error(`[연령 확인 실패]:`, error);
|
|
577
|
+
} finally {
|
|
578
|
+
}
|
|
579
|
+
},
|
|
580
|
+
[]
|
|
581
|
+
);
|
|
582
|
+
|
|
546
583
|
return {
|
|
547
584
|
attendRoomByHistory,
|
|
548
585
|
startChat,
|
|
@@ -552,6 +589,7 @@ export const useChatHandler = ({
|
|
|
552
589
|
workFlowBack,
|
|
553
590
|
chatUserUpdate,
|
|
554
591
|
getNextMessageList,
|
|
555
|
-
startSelectedChat
|
|
592
|
+
startSelectedChat,
|
|
593
|
+
ageConfirm
|
|
556
594
|
};
|
|
557
595
|
};
|
|
@@ -3,20 +3,12 @@ import { useEffect, useState } from 'react';
|
|
|
3
3
|
export function useFullURL() {
|
|
4
4
|
const pathname = usePathname();
|
|
5
5
|
const searchParams = useSearchParams();
|
|
6
|
-
const [fullUrl, setFullUrl] = useState(
|
|
7
|
-
if (typeof window !== 'undefined') {
|
|
8
|
-
const origin = window.location.origin;
|
|
9
|
-
const query = searchParams.toString();
|
|
10
|
-
const hash = window.location.hash;
|
|
11
|
-
return origin + pathname + (query ? `?${query}` : '') + hash;
|
|
12
|
-
}
|
|
13
|
-
return '';
|
|
14
|
-
});
|
|
6
|
+
const [fullUrl, setFullUrl] = useState('');
|
|
15
7
|
useEffect(() => {
|
|
16
8
|
if (typeof window !== 'undefined') {
|
|
17
|
-
const origin = window.location.origin;
|
|
18
|
-
const query = searchParams.toString();
|
|
19
|
-
const hash = window.location.hash;
|
|
9
|
+
const origin = window.location.origin; // https://example.com
|
|
10
|
+
const query = searchParams.toString(); // scrollToMsg=true
|
|
11
|
+
const hash = window.location.hash; // #1234 or ''
|
|
20
12
|
const fullPath = origin + pathname + (query ? `?${query}` : '') + hash;
|
|
21
13
|
setFullUrl(fullPath);
|
|
22
14
|
}
|
|
@@ -4,23 +4,16 @@ import { useEffect, useState } from 'react';
|
|
|
4
4
|
export function useFullURL() {
|
|
5
5
|
const pathname = usePathname();
|
|
6
6
|
const searchParams = useSearchParams();
|
|
7
|
-
|
|
8
|
-
const [fullUrl, setFullUrl] = useState(() => {
|
|
9
|
-
if (typeof window !== 'undefined') {
|
|
10
|
-
const origin = window.location.origin;
|
|
11
|
-
const query = searchParams.toString();
|
|
12
|
-
const hash = window.location.hash;
|
|
13
|
-
return origin + pathname + (query ? `?${query}` : '') + hash;
|
|
14
|
-
}
|
|
15
|
-
return '';
|
|
16
|
-
});
|
|
7
|
+
const [fullUrl, setFullUrl] = useState('');
|
|
17
8
|
|
|
18
9
|
useEffect(() => {
|
|
19
10
|
if (typeof window !== 'undefined') {
|
|
20
|
-
const origin = window.location.origin;
|
|
21
|
-
const query = searchParams.toString();
|
|
22
|
-
const hash = window.location.hash;
|
|
11
|
+
const origin = window.location.origin; // https://example.com
|
|
12
|
+
const query = searchParams.toString(); // scrollToMsg=true
|
|
13
|
+
const hash = window.location.hash; // #1234 or ''
|
|
14
|
+
|
|
23
15
|
const fullPath = origin + pathname + (query ? `?${query}` : '') + hash;
|
|
16
|
+
|
|
24
17
|
setFullUrl(fullPath);
|
|
25
18
|
}
|
|
26
19
|
}, [pathname, searchParams]);
|
|
@@ -3,6 +3,7 @@ import { Message } from '../../_types/message';
|
|
|
3
3
|
import { History, IChatInquiryMainDataResponse } from '../../_api/daeryuntalk/type/response';
|
|
4
4
|
import { MessageObject } from '../../_types/message_object';
|
|
5
5
|
import { ViewState } from '../../ChatHomeView';
|
|
6
|
+
import { AgeCheckStatusEnums } from '../../_enums/ags_check_status';
|
|
6
7
|
interface props {
|
|
7
8
|
setIsConnected: Dispatch<SetStateAction<boolean | null>>;
|
|
8
9
|
setIsLoading: Dispatch<SetStateAction<boolean>>;
|
|
@@ -26,8 +27,9 @@ interface props {
|
|
|
26
27
|
setIsNextPage: Dispatch<SetStateAction<boolean | null>>;
|
|
27
28
|
setInitialLoading: Dispatch<SetStateAction<boolean | null>>;
|
|
28
29
|
setChatInquiryNumber: Dispatch<SetStateAction<string | null>>;
|
|
30
|
+
setAgeCheckStatus: Dispatch<SetStateAction<AgeCheckStatusEnums | null>>;
|
|
29
31
|
}
|
|
30
|
-
export declare const useSocketEventHandler: ({ setIsConnected, setIsLoading, setMessages, setInquiryMainData, socketRef, setWorkFlowStack, setMessageObject, setInquiryStatus, setHistoryList, historyList, inquiryMainData, isMobile, setIsAuthenticated, setIsTyping, onClose, centerCode, setPreviewState, setIsUserExpried, chatInquiryNumber, setIsNextPage, setInitialLoading, setChatInquiryNumber }: props) => {
|
|
32
|
+
export declare const useSocketEventHandler: ({ setIsConnected, setIsLoading, setMessages, setInquiryMainData, socketRef, setWorkFlowStack, setMessageObject, setInquiryStatus, setHistoryList, historyList, inquiryMainData, isMobile, setIsAuthenticated, setIsTyping, onClose, centerCode, setPreviewState, setIsUserExpried, chatInquiryNumber, setIsNextPage, setInitialLoading, setChatInquiryNumber, setAgeCheckStatus }: props) => {
|
|
31
33
|
initializeDaeryuntalk: (hashValue: string | null, isOpen: boolean, centerCode: string, version?: string) => Promise<import("../../_api/daeryuntalk/type/response").IDaeryunTalkResponseWrapper<IChatInquiryMainDataResponse> | import("../../_api/daeryuntalk/type/response").IDaeryunTalkResponseWrapper<import("../../_api/daeryuntalk/type/response").ChatInquiryCreateDataResponse> | import("../../_api/daeryuntalk/type/response").IDaeryunTalkResponseWrapper<import("../../_api/daeryuntalk/type/response").ChatInquiryDetailDataResponse> | import("../../_api/daeryuntalk/type/response").IDaeryunTalkResponseWrapper<import("../../_api/daeryuntalk/type/response").ChatInquiryMessageListDataResponse> | null | undefined>;
|
|
32
34
|
sendInquiryWatching: (chatInquiryNumber: string) => void;
|
|
33
35
|
retryInquiryMain: (channelNumber: string) => Promise<import("../../_api/daeryuntalk/type/response").IDaeryunTalkResponseWrapper<IChatInquiryMainDataResponse>>;
|
|
@@ -16,7 +16,7 @@ import { useDaeryunTalkToast } from '../../Toast/DaeryuntalkToastProvider';
|
|
|
16
16
|
import { getErrorMessageMap } from '../../_enums/error';
|
|
17
17
|
import { consoleFn } from '../../_lib/utils';
|
|
18
18
|
import { useFullURL } from './useFullURL';
|
|
19
|
-
export const useSocketEventHandler = ({ setIsConnected, setIsLoading, setMessages, setInquiryMainData, socketRef, setWorkFlowStack, setMessageObject, setInquiryStatus, setHistoryList, historyList, inquiryMainData, isMobile, setIsAuthenticated, setIsTyping, onClose, centerCode, setPreviewState, setIsUserExpried, chatInquiryNumber, setIsNextPage, setInitialLoading, setChatInquiryNumber }) => {
|
|
19
|
+
export const useSocketEventHandler = ({ setIsConnected, setIsLoading, setMessages, setInquiryMainData, socketRef, setWorkFlowStack, setMessageObject, setInquiryStatus, setHistoryList, historyList, inquiryMainData, isMobile, setIsAuthenticated, setIsTyping, onClose, centerCode, setPreviewState, setIsUserExpried, chatInquiryNumber, setIsNextPage, setInitialLoading, setChatInquiryNumber, setAgeCheckStatus }) => {
|
|
20
20
|
var _a;
|
|
21
21
|
const typingBlockRef = useRef(null);
|
|
22
22
|
const typingTimeoutRef = useRef(null);
|
|
@@ -377,7 +377,7 @@ export const useSocketEventHandler = ({ setIsConnected, setIsLoading, setMessage
|
|
|
377
377
|
};
|
|
378
378
|
// Daeryuntalk API 초기화 메소드
|
|
379
379
|
const initializeDaeryuntalk = useCallback((hashValue, isOpen, centerCode, version) => __awaiter(void 0, void 0, void 0, function* () {
|
|
380
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
380
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
|
381
381
|
if (userExpiredRef.current) {
|
|
382
382
|
consoleFn('유저 만료 상태로 초기화 X');
|
|
383
383
|
return;
|
|
@@ -474,13 +474,17 @@ export const useSocketEventHandler = ({ setIsConnected, setIsLoading, setMessage
|
|
|
474
474
|
const uiObject = convertApiMessageObjectToUiMessageObject(detailResponse.data);
|
|
475
475
|
setMessageObject(uiObject);
|
|
476
476
|
}
|
|
477
|
+
// 해당 문의 연령 체크
|
|
478
|
+
if ((_t = detailResponse.data) === null || _t === void 0 ? void 0 : _t.age_consent_state_code) {
|
|
479
|
+
setAgeCheckStatus(detailResponse.data.age_consent_state_code);
|
|
480
|
+
}
|
|
477
481
|
// 해당 문의 상태
|
|
478
|
-
if ((
|
|
482
|
+
if ((_u = detailResponse.data) === null || _u === void 0 ? void 0 : _u.chat_inquiry_state_code) {
|
|
479
483
|
setInquiryStatus(detailResponse.data.chat_inquiry_state_code);
|
|
480
484
|
}
|
|
481
485
|
// 워크플로우 스택 업데이트
|
|
482
|
-
if ((
|
|
483
|
-
setWorkFlowStack((
|
|
486
|
+
if ((_v = detailResponse.data) === null || _v === void 0 ? void 0 : _v.work_flow_progress_stack) {
|
|
487
|
+
setWorkFlowStack((_x = (_w = detailResponse.data) === null || _w === void 0 ? void 0 : _w.work_flow_progress_stack) !== null && _x !== void 0 ? _x : []);
|
|
484
488
|
}
|
|
485
489
|
setInquiryMainData(Object.assign(Object.assign({}, inquiryData.data), { progress_inquiry_number: chatNumber }));
|
|
486
490
|
if (socket) {
|
|
@@ -23,6 +23,7 @@ import { getErrorMessageMap } from '../../_enums/error';
|
|
|
23
23
|
import { ViewState } from '../../ChatHomeView';
|
|
24
24
|
import { consoleFn } from '../../_lib/utils';
|
|
25
25
|
import { useFullURL } from './useFullURL';
|
|
26
|
+
import { AgeCheckStatusEnums } from '../../_enums/ags_check_status';
|
|
26
27
|
|
|
27
28
|
interface props {
|
|
28
29
|
setIsConnected: Dispatch<SetStateAction<boolean | null>>;
|
|
@@ -47,6 +48,7 @@ interface props {
|
|
|
47
48
|
setIsNextPage: Dispatch<SetStateAction<boolean | null>>;
|
|
48
49
|
setInitialLoading: Dispatch<SetStateAction<boolean | null>>;
|
|
49
50
|
setChatInquiryNumber: Dispatch<SetStateAction<string | null>>;
|
|
51
|
+
setAgeCheckStatus: Dispatch<SetStateAction<AgeCheckStatusEnums | null>>;
|
|
50
52
|
}
|
|
51
53
|
|
|
52
54
|
export const useSocketEventHandler = ({
|
|
@@ -71,7 +73,8 @@ export const useSocketEventHandler = ({
|
|
|
71
73
|
chatInquiryNumber,
|
|
72
74
|
setIsNextPage,
|
|
73
75
|
setInitialLoading,
|
|
74
|
-
setChatInquiryNumber
|
|
76
|
+
setChatInquiryNumber,
|
|
77
|
+
setAgeCheckStatus
|
|
75
78
|
}: props) => {
|
|
76
79
|
|
|
77
80
|
const typingBlockRef = useRef<NodeJS.Timeout | null>(null);
|
|
@@ -634,6 +637,11 @@ export const useSocketEventHandler = ({
|
|
|
634
637
|
setMessageObject(uiObject);
|
|
635
638
|
}
|
|
636
639
|
|
|
640
|
+
// 해당 문의 연령 체크
|
|
641
|
+
if (detailResponse.data?.age_consent_state_code) {
|
|
642
|
+
setAgeCheckStatus(detailResponse.data.age_consent_state_code);
|
|
643
|
+
}
|
|
644
|
+
|
|
637
645
|
// 해당 문의 상태
|
|
638
646
|
if (detailResponse.data?.chat_inquiry_state_code) {
|
|
639
647
|
setInquiryStatus(detailResponse.data.chat_inquiry_state_code);
|
|
@@ -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,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,20 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Image from 'next/image';
|
|
4
|
+
import CheckActiveIconBlue from '../../../../asset/images/daeryuntalk/active_checkbox_blue.png';
|
|
5
|
+
import CheckNoneActiveIconBlue from '../../../../asset/images/daeryuntalk/non_active_checkbox.png';
|
|
6
|
+
const CheckBox2 = ({ title, checked, onChange }) => {
|
|
7
|
+
return (<label className="flex cursor-pointer flex-row items-center gap-[4px]">
|
|
8
|
+
{/* 실제 체크박스는 숨김 */}
|
|
9
|
+
<input type="checkbox" checked={checked} onChange={onChange} className="hidden"/>
|
|
10
|
+
|
|
11
|
+
{/* 커스텀 체크박스 (두 이미지를 겹치고 opacity 전환) */}
|
|
12
|
+
<div className="relative h-[13.5px] w-[13.5px]">
|
|
13
|
+
<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'}`}/>
|
|
14
|
+
<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'}`}/>
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
<span className="dr_talk_body_medium2 text-black">{title}</span>
|
|
18
|
+
</label>);
|
|
19
|
+
};
|
|
20
|
+
export default CheckBox2;
|
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
return (
|
|
16
|
+
<label className="flex cursor-pointer flex-row items-center gap-[4px]">
|
|
17
|
+
{/* 실제 체크박스는 숨김 */}
|
|
18
|
+
<input type="checkbox" checked={checked} onChange={onChange} className="hidden" />
|
|
19
|
+
|
|
20
|
+
{/* 커스텀 체크박스 (두 이미지를 겹치고 opacity 전환) */}
|
|
21
|
+
<div className="relative h-[13.5px] w-[13.5px]">
|
|
22
|
+
<Image
|
|
23
|
+
src={CheckActiveIconBlue}
|
|
24
|
+
alt="check active icon blue"
|
|
25
|
+
width={1000}
|
|
26
|
+
height={1000}
|
|
27
|
+
className={`absolute left-0 top-0 h-[13.5px] w-[13.5px] transition-opacity duration-200 ${
|
|
28
|
+
checked ? 'opacity-100' : 'opacity-0'
|
|
29
|
+
}`}
|
|
30
|
+
/>
|
|
31
|
+
<Image
|
|
32
|
+
src={CheckNoneActiveIconBlue}
|
|
33
|
+
alt="check none active icon blue"
|
|
34
|
+
width={1000}
|
|
35
|
+
height={1000}
|
|
36
|
+
className={`absolute left-0 top-0 h-[13.5px] w-[13.5px] transition-opacity duration-200 ${
|
|
37
|
+
checked ? 'opacity-0' : 'opacity-100'
|
|
38
|
+
}`}
|
|
39
|
+
/>
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
<span className="dr_talk_body_medium2 text-black">{title}</span>
|
|
43
|
+
</label>
|
|
44
|
+
);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export default CheckBox2;
|
|
@@ -30,35 +30,32 @@ export const SuccessCase = ({ successData }) => {
|
|
|
30
30
|
</span>
|
|
31
31
|
|
|
32
32
|
<span className={'mt-[30px] flex flex-col gap-3 '}>
|
|
33
|
-
{successData === null || successData === void 0 ? void 0 : successData.map(i => {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
//768px
|
|
41
|
-
'max-md:text-[18px]'}>
|
|
33
|
+
{successData === null || successData === void 0 ? void 0 : successData.map(i => (<Link href={i.domain ? i.domain + `success_new/${i.type_idx}` : '/success_new/' + i.type_idx} key={'/success_new/' + i.type_idx} target={i.domain ? '_blank' : ''} className={'flex w-fit items-start gap-[10px] text-[20px] font-medium tracking-[-0.4px] hover:text-[#285FA7] ' +
|
|
34
|
+
//1500px
|
|
35
|
+
'max-3xl:text-[18px] ' +
|
|
36
|
+
//1280px
|
|
37
|
+
'max-xl:text-[20px] ' +
|
|
38
|
+
//768px
|
|
39
|
+
'max-md:text-[18px]'}>
|
|
42
40
|
<IconDot className={'mt-3 inline shrink-0 ' +
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
//1500px
|
|
42
|
+
'max-3xl:mt-[9px]'}/>
|
|
45
43
|
<div className={''}>
|
|
46
44
|
{i.tag_title.includes('|')
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
? i.tag_title.split('|')[1]
|
|
46
|
+
: i.tag_title.includes(']')
|
|
47
|
+
? i.tag_title.split(']')[1]
|
|
48
|
+
: ''}
|
|
51
49
|
|
|
52
50
|
<IconArrow aria-label={'새창열림'} className={'mb-[5px] ml-2 inline h-[10px] w-[10px] ' +
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
51
|
+
//1500px
|
|
52
|
+
'max-3xl:h-[9px] max-3xl:w-[9px] ' +
|
|
53
|
+
//1280px
|
|
54
|
+
'max-xl:mb-[3px] max-xl:h-[10px] max-xl:w-[10px] ' +
|
|
55
|
+
//1500px
|
|
56
|
+
'max-md:mb-[7px] max-md:h-[9px] max-md:w-[9px] '}/>
|
|
59
57
|
</div>
|
|
60
|
-
</Link>)
|
|
61
|
-
})}
|
|
58
|
+
</Link>))}
|
|
62
59
|
</span>
|
|
63
60
|
</div>);
|
|
64
61
|
};
|
|
@@ -57,7 +57,7 @@ export const SuccessCase = ({ successData }: { successData: ISuccessTypes[] }) =
|
|
|
57
57
|
<span className={'mt-[30px] flex flex-col gap-3 '}>
|
|
58
58
|
{successData?.map(i => (
|
|
59
59
|
<Link
|
|
60
|
-
href={
|
|
60
|
+
href={i.domain ? i.domain + `success_new/${i.type_idx}` : '/success_new/' + i.type_idx}
|
|
61
61
|
key={'/success_new/' + i.type_idx}
|
|
62
62
|
target={i.domain ? '_blank' : ''}
|
|
63
63
|
className={
|
package/dist/styles/globals.css
CHANGED
|
@@ -2288,6 +2288,10 @@ html {
|
|
|
2288
2288
|
height: 34px !important;
|
|
2289
2289
|
}
|
|
2290
2290
|
|
|
2291
|
+
.\!h-\[50px\] {
|
|
2292
|
+
height: 50px !important;
|
|
2293
|
+
}
|
|
2294
|
+
|
|
2291
2295
|
.\!h-\[5px\] {
|
|
2292
2296
|
height: 5px !important;
|
|
2293
2297
|
}
|
|
@@ -2938,6 +2942,10 @@ html {
|
|
|
2938
2942
|
max-height: fit-content !important;
|
|
2939
2943
|
}
|
|
2940
2944
|
|
|
2945
|
+
.max-h-\[108px\] {
|
|
2946
|
+
max-height: 108px;
|
|
2947
|
+
}
|
|
2948
|
+
|
|
2941
2949
|
.max-h-\[1200px\] {
|
|
2942
2950
|
max-height: 1200px;
|
|
2943
2951
|
}
|
|
@@ -3211,6 +3219,10 @@ html {
|
|
|
3211
3219
|
width: 13.16px;
|
|
3212
3220
|
}
|
|
3213
3221
|
|
|
3222
|
+
.w-\[13\.5px\] {
|
|
3223
|
+
width: 13.5px;
|
|
3224
|
+
}
|
|
3225
|
+
|
|
3214
3226
|
.w-\[130px\] {
|
|
3215
3227
|
width: 130px;
|
|
3216
3228
|
}
|
|
@@ -3784,6 +3796,10 @@ html {
|
|
|
3784
3796
|
min-width: 177px;
|
|
3785
3797
|
}
|
|
3786
3798
|
|
|
3799
|
+
.min-w-\[18px\] {
|
|
3800
|
+
min-width: 18px;
|
|
3801
|
+
}
|
|
3802
|
+
|
|
3787
3803
|
.min-w-\[230px\] {
|
|
3788
3804
|
min-width: 230px;
|
|
3789
3805
|
}
|
|
@@ -6020,6 +6036,11 @@ html {
|
|
|
6020
6036
|
background-color: rgb(59 130 246 / var(--tw-bg-opacity, 1));
|
|
6021
6037
|
}
|
|
6022
6038
|
|
|
6039
|
+
.bg-drTalkBtnActive1 {
|
|
6040
|
+
--tw-bg-opacity: 1;
|
|
6041
|
+
background-color: rgb(53 76 198 / var(--tw-bg-opacity, 1));
|
|
6042
|
+
}
|
|
6043
|
+
|
|
6023
6044
|
.bg-drTalkBtnActive2 {
|
|
6024
6045
|
--tw-bg-opacity: 1;
|
|
6025
6046
|
background-color: rgb(46 56 91 / var(--tw-bg-opacity, 1));
|
|
@@ -6183,6 +6204,10 @@ html {
|
|
|
6183
6204
|
--tw-bg-opacity: 55%;
|
|
6184
6205
|
}
|
|
6185
6206
|
|
|
6207
|
+
.\!bg-gradient-to-t {
|
|
6208
|
+
background-image: linear-gradient(to top, var(--tw-gradient-stops)) !important;
|
|
6209
|
+
}
|
|
6210
|
+
|
|
6186
6211
|
.bg-\[linear-gradient\(90deg\2c _\#3482F6_0\%\2c _\#A358FB_30\%\2c _\#E73B6A_55\%\2c _\#ED4914_100\%\)\] {
|
|
6187
6212
|
background-image: linear-gradient(90deg, #3482F6 0%, #A358FB 30%, #E73B6A 55%, #ED4914 100%);
|
|
6188
6213
|
}
|
|
@@ -6223,6 +6248,12 @@ html {
|
|
|
6223
6248
|
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
|
|
6224
6249
|
}
|
|
6225
6250
|
|
|
6251
|
+
.from-\[\#F7F7F7\]\/90 {
|
|
6252
|
+
--tw-gradient-from: rgb(247 247 247 / 0.9) var(--tw-gradient-from-position);
|
|
6253
|
+
--tw-gradient-to: rgb(247 247 247 / 0) var(--tw-gradient-to-position);
|
|
6254
|
+
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
|
|
6255
|
+
}
|
|
6256
|
+
|
|
6226
6257
|
.from-\[\#eeeeee\] {
|
|
6227
6258
|
--tw-gradient-from: #eeeeee var(--tw-gradient-from-position);
|
|
6228
6259
|
--tw-gradient-to: rgb(238 238 238 / 0) var(--tw-gradient-to-position);
|
|
@@ -6267,6 +6298,10 @@ html {
|
|
|
6267
6298
|
--tw-gradient-stops: var(--tw-gradient-from), #E73B6A var(--tw-gradient-via-position), var(--tw-gradient-to);
|
|
6268
6299
|
}
|
|
6269
6300
|
|
|
6301
|
+
.\!to-\[\#F7F7F7\]\/0 {
|
|
6302
|
+
--tw-gradient-to: rgb(247 247 247 / 0) var(--tw-gradient-to-position) !important;
|
|
6303
|
+
}
|
|
6304
|
+
|
|
6270
6305
|
.to-\[\#35FFF84D\] {
|
|
6271
6306
|
--tw-gradient-to: #35FFF84D var(--tw-gradient-to-position);
|
|
6272
6307
|
}
|
|
@@ -6706,6 +6741,11 @@ html {
|
|
|
6706
6741
|
padding-right: 60px;
|
|
6707
6742
|
}
|
|
6708
6743
|
|
|
6744
|
+
.px-\[6px\] {
|
|
6745
|
+
padding-left: 6px;
|
|
6746
|
+
padding-right: 6px;
|
|
6747
|
+
}
|
|
6748
|
+
|
|
6709
6749
|
.px-\[88px\] {
|
|
6710
6750
|
padding-left: 88px;
|
|
6711
6751
|
padding-right: 88px;
|
|
@@ -9953,6 +9993,11 @@ body {
|
|
|
9953
9993
|
background-color: rgb(210 210 210 / var(--tw-bg-opacity, 1));
|
|
9954
9994
|
}
|
|
9955
9995
|
|
|
9996
|
+
.disabled\:bg-drTalkGrayscale3:disabled {
|
|
9997
|
+
--tw-bg-opacity: 1;
|
|
9998
|
+
background-color: rgb(194 194 194 / var(--tw-bg-opacity, 1));
|
|
9999
|
+
}
|
|
10000
|
+
|
|
9956
10001
|
.disabled\:text-\[\#606060\]:disabled {
|
|
9957
10002
|
--tw-text-opacity: 1;
|
|
9958
10003
|
color: rgb(96 96 96 / var(--tw-text-opacity, 1));
|