@daeryun/dr_components 0.9.5 → 0.9.6
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/ChatHomeView.jsx +12 -6
- package/dist/components/Daeryuntalk/ChatHomeView.tsx +21 -6
- package/dist/components/Daeryuntalk/DaeryuntalkContext.d.ts +5 -0
- package/dist/components/Daeryuntalk/DaeryuntalkContext.jsx +17 -3
- package/dist/components/Daeryuntalk/DaeryuntalkContext.tsx +24 -3
- package/dist/components/Daeryuntalk/FixedErrorBox.jsx +10 -9
- package/dist/components/Daeryuntalk/FixedErrorBox.tsx +12 -13
- package/dist/components/Daeryuntalk/_api/daeryuntalk/index.d.ts +2 -2
- package/dist/components/Daeryuntalk/_api/daeryuntalk/index.js +18 -5
- package/dist/components/Daeryuntalk/_api/daeryuntalk/index.ts +20 -3
- package/dist/components/Daeryuntalk/_enums/error.d.ts +1 -1
- package/dist/components/Daeryuntalk/_enums/error.js +3 -6
- package/dist/components/Daeryuntalk/_enums/error.ts +2 -5
- package/dist/components/Daeryuntalk/_enums/socket_type.d.ts +3 -1
- package/dist/components/Daeryuntalk/_enums/socket_type.js +2 -0
- package/dist/components/Daeryuntalk/_enums/socket_type.ts +4 -1
- package/dist/components/Daeryuntalk/_hooks/talkprovider/useChatHandler.js +3 -3
- package/dist/components/Daeryuntalk/_hooks/talkprovider/useChatHandler.ts +3 -3
- package/dist/components/Daeryuntalk/_hooks/talkprovider/useHistoryHandler.js +5 -4
- package/dist/components/Daeryuntalk/_hooks/talkprovider/useHistoryHandler.ts +5 -4
- package/dist/components/Daeryuntalk/_hooks/talkprovider/useSocketEventHandler.d.ts +4 -1
- package/dist/components/Daeryuntalk/_hooks/talkprovider/useSocketEventHandler.js +15 -4
- package/dist/components/Daeryuntalk/_hooks/talkprovider/useSocketEventHandler.ts +21 -4
- package/dist/components/Daeryuntalk/_hooks/view/useChatSocketState.js +5 -5
- package/dist/components/Daeryuntalk/_hooks/view/useChatSocketState.ts +5 -5
- package/dist/components/Daeryuntalk/_hooks/view/useHistoryView.d.ts +3 -1
- package/dist/components/Daeryuntalk/_hooks/view/useHistoryView.js +8 -4
- package/dist/components/Daeryuntalk/_hooks/view/useHistoryView.ts +11 -5
- package/dist/components/Daeryuntalk/_hooks/view/useHomeView.d.ts +4 -1
- package/dist/components/Daeryuntalk/_hooks/view/useHomeView.js +4 -2
- package/dist/components/Daeryuntalk/_hooks/view/useHomeView.ts +10 -2
- package/dist/styles/globals.css +8 -5
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -15,12 +15,14 @@ interface IHistoryProps {
|
|
|
15
15
|
cellPhoneNumber: string;
|
|
16
16
|
certificationNumber: string;
|
|
17
17
|
}) => any;
|
|
18
|
+
setPreviewState: (state: ViewState) => void;
|
|
18
19
|
}
|
|
19
|
-
export declare const useHistoryView: ({ attendRoomByHistory, startSelectedChat, setViewState, setIsLoading, createNewChat, goRequestPhone, goHistoryPhoneAuth }: IHistoryProps) => {
|
|
20
|
+
export declare const useHistoryView: ({ attendRoomByHistory, startSelectedChat, setViewState, setIsLoading, createNewChat, goRequestPhone, goHistoryPhoneAuth, setPreviewState }: IHistoryProps) => {
|
|
20
21
|
handleChatHistoryClick: (chatNumber: string) => Promise<void>;
|
|
21
22
|
handleNewStartChat: () => Promise<void>;
|
|
22
23
|
handleHistoryClick: () => Promise<void>;
|
|
23
24
|
handleGoRequestPhone: (name: string, cellPhoneNumber: string) => Promise<any>;
|
|
24
25
|
handleGoHistoryPhoneAuth: (name: string, cellPhoneNumber: string, certificationNumber: string) => Promise<any>;
|
|
26
|
+
handleHomeClick: () => void;
|
|
25
27
|
};
|
|
26
28
|
export {};
|
|
@@ -7,9 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
|
|
11
|
-
export const useHistoryView = ({ attendRoomByHistory, startSelectedChat, setViewState, setIsLoading, createNewChat, goRequestPhone, goHistoryPhoneAuth }) => {
|
|
12
|
-
const toast = useDaeryunTalkToast();
|
|
10
|
+
export const useHistoryView = ({ attendRoomByHistory, startSelectedChat, setViewState, setIsLoading, createNewChat, goRequestPhone, goHistoryPhoneAuth, setPreviewState }) => {
|
|
13
11
|
const handleChatHistoryClick = (chatNumber) => __awaiter(void 0, void 0, void 0, function* () {
|
|
14
12
|
var _a, _b;
|
|
15
13
|
try {
|
|
@@ -60,13 +58,19 @@ export const useHistoryView = ({ attendRoomByHistory, startSelectedChat, setView
|
|
|
60
58
|
return res;
|
|
61
59
|
});
|
|
62
60
|
const handleHistoryClick = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
61
|
+
setPreviewState('history');
|
|
63
62
|
setViewState('history');
|
|
64
63
|
});
|
|
64
|
+
const handleHomeClick = () => {
|
|
65
|
+
setPreviewState('home');
|
|
66
|
+
setViewState('home');
|
|
67
|
+
};
|
|
65
68
|
return {
|
|
66
69
|
handleChatHistoryClick,
|
|
67
70
|
handleNewStartChat,
|
|
68
71
|
handleHistoryClick,
|
|
69
72
|
handleGoRequestPhone,
|
|
70
|
-
handleGoHistoryPhoneAuth
|
|
73
|
+
handleGoHistoryPhoneAuth,
|
|
74
|
+
handleHomeClick
|
|
71
75
|
};
|
|
72
76
|
};
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
-
import { useDaeryunTalkToast } from '../../Toast/DaeryuntalkToastProvider';
|
|
3
2
|
import { ViewState } from '../../ChatHomeView';
|
|
4
|
-
import { DEFAULT_API_VERSION } from '../../_api';
|
|
5
3
|
|
|
6
4
|
interface IHistoryProps {
|
|
7
5
|
setIsLoading: Dispatch<SetStateAction<boolean>>;
|
|
@@ -19,6 +17,7 @@ interface IHistoryProps {
|
|
|
19
17
|
cellPhoneNumber: string;
|
|
20
18
|
certificationNumber: string;
|
|
21
19
|
}) => any;
|
|
20
|
+
setPreviewState: (state: ViewState) => void;
|
|
22
21
|
}
|
|
23
22
|
|
|
24
23
|
export const useHistoryView = ({
|
|
@@ -28,9 +27,9 @@ export const useHistoryView = ({
|
|
|
28
27
|
setIsLoading,
|
|
29
28
|
createNewChat,
|
|
30
29
|
goRequestPhone,
|
|
31
|
-
goHistoryPhoneAuth
|
|
30
|
+
goHistoryPhoneAuth,
|
|
31
|
+
setPreviewState
|
|
32
32
|
}: IHistoryProps) => {
|
|
33
|
-
const toast = useDaeryunTalkToast();
|
|
34
33
|
const handleChatHistoryClick = async (chatNumber: string) => {
|
|
35
34
|
try {
|
|
36
35
|
setIsLoading(true);
|
|
@@ -80,14 +79,21 @@ export const useHistoryView = ({
|
|
|
80
79
|
};
|
|
81
80
|
|
|
82
81
|
const handleHistoryClick = async () => {
|
|
82
|
+
setPreviewState('history');
|
|
83
83
|
setViewState('history');
|
|
84
84
|
};
|
|
85
85
|
|
|
86
|
+
const handleHomeClick = () => {
|
|
87
|
+
setPreviewState('home');
|
|
88
|
+
setViewState('home');
|
|
89
|
+
};
|
|
90
|
+
|
|
86
91
|
return {
|
|
87
92
|
handleChatHistoryClick,
|
|
88
93
|
handleNewStartChat,
|
|
89
94
|
handleHistoryClick,
|
|
90
95
|
handleGoRequestPhone,
|
|
91
|
-
handleGoHistoryPhoneAuth
|
|
96
|
+
handleGoHistoryPhoneAuth,
|
|
97
|
+
handleHomeClick
|
|
92
98
|
};
|
|
93
99
|
};
|
|
@@ -7,8 +7,11 @@ interface IHomeProps {
|
|
|
7
7
|
retryInquiryMain: (channelNumber: string) => any;
|
|
8
8
|
inquiryMainData: IChatInquiryMainDataResponse | null;
|
|
9
9
|
startChat: (progressInquiryNumber?: string) => any;
|
|
10
|
+
preViewState: ViewState;
|
|
11
|
+
viewState: ViewState;
|
|
12
|
+
setPreviewState: (state: ViewState) => void;
|
|
10
13
|
}
|
|
11
|
-
export declare const useHomeView: ({ setIsLoading, setViewState, retryInquiryMain, inquiryMainData, startChat }: IHomeProps) => {
|
|
14
|
+
export declare const useHomeView: ({ setIsLoading, setViewState, retryInquiryMain, inquiryMainData, startChat, preViewState, viewState, setPreviewState }: IHomeProps) => {
|
|
12
15
|
handleStartChat: () => Promise<void>;
|
|
13
16
|
handleHashStartChat: () => Promise<void>;
|
|
14
17
|
handleBackToHome: () => void;
|
|
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { useDaeryunTalkToast } from '../../Toast/DaeryuntalkToastProvider';
|
|
11
|
-
export const useHomeView = ({ setIsLoading, setViewState, retryInquiryMain, inquiryMainData, startChat }) => {
|
|
11
|
+
export const useHomeView = ({ setIsLoading, setViewState, retryInquiryMain, inquiryMainData, startChat, preViewState, viewState, setPreviewState }) => {
|
|
12
12
|
const toast = useDaeryunTalkToast();
|
|
13
13
|
const handleStartChat = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
14
14
|
var _a, _b, _c;
|
|
@@ -52,7 +52,9 @@ export const useHomeView = ({ setIsLoading, setViewState, retryInquiryMain, inqu
|
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
54
|
const handleBackToHome = () => {
|
|
55
|
-
|
|
55
|
+
const isDupHis = viewState === 'history' && preViewState === 'history';
|
|
56
|
+
isDupHis && setPreviewState('home');
|
|
57
|
+
setViewState(viewState === 'history' && preViewState === 'history' ? 'home' : (preViewState !== null && preViewState !== void 0 ? preViewState : 'home'));
|
|
56
58
|
};
|
|
57
59
|
return {
|
|
58
60
|
handleStartChat,
|
|
@@ -9,13 +9,19 @@ interface IHomeProps {
|
|
|
9
9
|
retryInquiryMain: (channelNumber: string) => any;
|
|
10
10
|
inquiryMainData: IChatInquiryMainDataResponse | null;
|
|
11
11
|
startChat: (progressInquiryNumber?: string) => any;
|
|
12
|
+
preViewState: ViewState;
|
|
13
|
+
viewState: ViewState;
|
|
14
|
+
setPreviewState: (state: ViewState) => void;
|
|
12
15
|
}
|
|
13
16
|
export const useHomeView = ({
|
|
14
17
|
setIsLoading,
|
|
15
18
|
setViewState,
|
|
16
19
|
retryInquiryMain,
|
|
17
20
|
inquiryMainData,
|
|
18
|
-
startChat
|
|
21
|
+
startChat,
|
|
22
|
+
preViewState,
|
|
23
|
+
viewState,
|
|
24
|
+
setPreviewState
|
|
19
25
|
}: IHomeProps) => {
|
|
20
26
|
const toast = useDaeryunTalkToast();
|
|
21
27
|
const handleStartChat = async () => {
|
|
@@ -54,7 +60,9 @@ export const useHomeView = ({
|
|
|
54
60
|
}
|
|
55
61
|
};
|
|
56
62
|
const handleBackToHome = () => {
|
|
57
|
-
|
|
63
|
+
const isDupHis = viewState === 'history' && preViewState === 'history';
|
|
64
|
+
isDupHis && setPreviewState('home');
|
|
65
|
+
setViewState(viewState === 'history' && preViewState === 'history' ? 'home' : (preViewState ?? 'home'));
|
|
58
66
|
};
|
|
59
67
|
|
|
60
68
|
return {
|
package/dist/styles/globals.css
CHANGED
|
@@ -1090,6 +1090,10 @@ video {
|
|
|
1090
1090
|
bottom: 85px;
|
|
1091
1091
|
}
|
|
1092
1092
|
|
|
1093
|
+
.bottom-\[96px\] {
|
|
1094
|
+
bottom: 96px;
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1093
1097
|
.left-0 {
|
|
1094
1098
|
left: 0px;
|
|
1095
1099
|
}
|
|
@@ -1378,6 +1382,10 @@ video {
|
|
|
1378
1382
|
z-index: 50;
|
|
1379
1383
|
}
|
|
1380
1384
|
|
|
1385
|
+
.z-\[60\] {
|
|
1386
|
+
z-index: 60;
|
|
1387
|
+
}
|
|
1388
|
+
|
|
1381
1389
|
.z-\[900\] {
|
|
1382
1390
|
z-index: 900;
|
|
1383
1391
|
}
|
|
@@ -3706,11 +3714,6 @@ video {
|
|
|
3706
3714
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
3707
3715
|
}
|
|
3708
3716
|
|
|
3709
|
-
.-translate-y-\[96px\] {
|
|
3710
|
-
--tw-translate-y: -96px;
|
|
3711
|
-
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
3712
|
-
}
|
|
3713
|
-
|
|
3714
3717
|
.translate-x-\[-1px\] {
|
|
3715
3718
|
--tw-translate-x: -1px;
|
|
3716
3719
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|