@seamly/web-ui 24.0.0-beta.2 → 24.0.0-beta.4
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/build/dist/lib/components.js +2 -1
- package/build/dist/lib/components.js.map +1 -1
- package/build/dist/lib/hooks.js +2 -1
- package/build/dist/lib/hooks.js.map +1 -1
- package/build/dist/lib/hooks.min.js +1 -1
- package/build/dist/lib/hooks.min.js.map +1 -1
- package/build/dist/lib/index.debug.js +17 -24
- package/build/dist/lib/index.debug.js.map +1 -1
- package/build/dist/lib/index.debug.min.js +1 -1
- package/build/dist/lib/index.debug.min.js.map +1 -1
- package/build/dist/lib/index.js +17 -24
- package/build/dist/lib/index.js.map +1 -1
- package/build/dist/lib/index.min.js +1 -1
- package/build/dist/lib/index.min.js.map +1 -1
- package/build/dist/lib/standalone.js +17 -24
- package/build/dist/lib/standalone.js.map +1 -1
- package/build/dist/lib/standalone.min.js +1 -1
- package/build/dist/lib/standalone.min.js.map +1 -1
- package/build/dist/lib/style-guide.js +17 -24
- package/build/dist/lib/style-guide.js.map +1 -1
- package/build/dist/lib/style-guide.min.js +1 -1
- package/build/dist/lib/style-guide.min.js.map +1 -1
- package/build/dist/lib/utils.js +17 -24
- package/build/dist/lib/utils.js.map +1 -1
- package/build/dist/lib/utils.min.js +1 -1
- package/build/dist/lib/utils.min.js.map +1 -1
- package/package.json +1 -1
- package/src/javascripts/ui/components/core/seamly-event-subscriber.ts +20 -24
- package/src/javascripts/ui/hooks/use-seamly-chat.ts +2 -1
package/package.json
CHANGED
|
@@ -45,30 +45,6 @@ const SeamlyEventSubscriber = () => {
|
|
|
45
45
|
const { initCountdown, endCountdown } = useSeamlyIdleDetachCountdown()
|
|
46
46
|
const { emitEvent } = useSeamlyCommands()
|
|
47
47
|
|
|
48
|
-
useEffect(() => {
|
|
49
|
-
if (conversation.socket) {
|
|
50
|
-
const { onError, onOpen } = conversation
|
|
51
|
-
onError((err) => {
|
|
52
|
-
const seamlyOfflineError = new SeamlyOfflineError(err)
|
|
53
|
-
dispatch(
|
|
54
|
-
setInterrupt({
|
|
55
|
-
name: seamlyOfflineError.name,
|
|
56
|
-
message: seamlyOfflineError.message,
|
|
57
|
-
langKey: seamlyOfflineError.langKey,
|
|
58
|
-
originalEvent: seamlyOfflineError.originalEvent,
|
|
59
|
-
originalError: seamlyOfflineError.originalError,
|
|
60
|
-
}),
|
|
61
|
-
)
|
|
62
|
-
|
|
63
|
-
dispatch(clearEvents())
|
|
64
|
-
})
|
|
65
|
-
|
|
66
|
-
onOpen(() => {
|
|
67
|
-
dispatch(clearInterrupt())
|
|
68
|
-
})
|
|
69
|
-
}
|
|
70
|
-
}, [conversation, conversation.socket, dispatch])
|
|
71
|
-
|
|
72
48
|
useEffect(() => {
|
|
73
49
|
if (conversation.socket) {
|
|
74
50
|
conversation.onConnection(({ currentState }) => {
|
|
@@ -87,8 +63,28 @@ const SeamlyEventSubscriber = () => {
|
|
|
87
63
|
|
|
88
64
|
return true
|
|
89
65
|
}
|
|
66
|
+
|
|
90
67
|
return false
|
|
91
68
|
})
|
|
69
|
+
|
|
70
|
+
conversation.onError((err) => {
|
|
71
|
+
const seamlyOfflineError = new SeamlyOfflineError(err)
|
|
72
|
+
dispatch(
|
|
73
|
+
setInterrupt({
|
|
74
|
+
name: seamlyOfflineError.name,
|
|
75
|
+
message: seamlyOfflineError.message,
|
|
76
|
+
langKey: seamlyOfflineError.langKey,
|
|
77
|
+
originalEvent: seamlyOfflineError.originalEvent,
|
|
78
|
+
originalError: seamlyOfflineError.originalError,
|
|
79
|
+
}),
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
dispatch(clearEvents())
|
|
83
|
+
})
|
|
84
|
+
|
|
85
|
+
conversation.onOpen(() => {
|
|
86
|
+
dispatch(clearInterrupt())
|
|
87
|
+
})
|
|
92
88
|
}
|
|
93
89
|
}, [conversation, conversation.socket, dispatch])
|
|
94
90
|
|
|
@@ -45,7 +45,8 @@ const useSeamlyChat = () => {
|
|
|
45
45
|
useEffect(() => {
|
|
46
46
|
// This is needed to reset the ref to allow connect and start to happen again.
|
|
47
47
|
// Mostly due to Interrupt situations and a reset being called.
|
|
48
|
-
|
|
48
|
+
// Only do this in case both are `false` (reset does this), because the websocket itself will automatically try to reconnect.
|
|
49
|
+
if (!apiConfigReady && !apiConnected) {
|
|
49
50
|
connectCalled.current = false
|
|
50
51
|
}
|
|
51
52
|
}, [apiConfigReady, apiConnected])
|