@seamly/web-ui 24.0.0-beta.7 → 24.0.0-beta.9
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/index.debug.js +14 -2
- 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 +14 -2
- 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 +14 -2
- 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 +15 -5
- 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 +14 -2
- 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/style-guide/components/static-core.tsx +3 -3
- package/src/javascripts/ui/components/core/seamly-instance-functions-loader.ts +17 -1
package/package.json
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
SeamlyEventBusContext,
|
|
8
8
|
SeamlyLiveRegionContext,
|
|
9
9
|
SeamlyStoreProvider,
|
|
10
|
+
SeamlyActivityMonitor,
|
|
10
11
|
SeamlyFileUpload,
|
|
11
12
|
} from '@seamly/web-ui'
|
|
12
13
|
import appReducer from 'domains/app/slice'
|
|
@@ -29,7 +30,6 @@ import {
|
|
|
29
30
|
} from 'domains/store/store.types'
|
|
30
31
|
import translationReducer from 'domains/translations/slice'
|
|
31
32
|
import visibilityReducer from 'domains/visibility/slice'
|
|
32
|
-
import SeamlyActivityEventContext from 'ui/components/core/seamly-activity-event-context'
|
|
33
33
|
import type API from 'api'
|
|
34
34
|
|
|
35
35
|
const bareApi = {
|
|
@@ -140,9 +140,9 @@ const SeamlyStaticCore: FC<StaticCoreProps> = ({
|
|
|
140
140
|
<SeamlyApiContext.Provider value={bareApi}>
|
|
141
141
|
<SeamlyLiveRegionContext.Provider value={liveMsgRef.current}>
|
|
142
142
|
<ComponentFilter>
|
|
143
|
-
<
|
|
143
|
+
<SeamlyActivityMonitor>
|
|
144
144
|
<SeamlyFileUpload>{children}</SeamlyFileUpload>
|
|
145
|
-
</
|
|
145
|
+
</SeamlyActivityMonitor>
|
|
146
146
|
</ComponentFilter>
|
|
147
147
|
</SeamlyLiveRegionContext.Provider>
|
|
148
148
|
</SeamlyApiContext.Provider>
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
useSeamlyCommands,
|
|
16
16
|
useSeamlyConversationUrl,
|
|
17
17
|
useSeamlyLayoutMode,
|
|
18
|
+
useSeamlyResumeConversationPrompt,
|
|
18
19
|
useSeamlyUnreadCount,
|
|
19
20
|
} from 'ui/hooks/seamly-hooks'
|
|
20
21
|
import { actionTypes, sourceTypes } from 'ui/utils/seamly-utils'
|
|
@@ -46,6 +47,8 @@ const SeamlyInstanceFunctionsLoader = () => {
|
|
|
46
47
|
const currentVisibility = useRef(visible)
|
|
47
48
|
const eventBus = useSeamlyEventBusContext()
|
|
48
49
|
const api = useSeamlyApiContext()
|
|
50
|
+
const { hasPrompt, continueChat } = useSeamlyResumeConversationPrompt()
|
|
51
|
+
const hasResumeConversationPrompt = useRef(hasPrompt)
|
|
49
52
|
const unreadCount = useSeamlyUnreadCount()
|
|
50
53
|
const previousUnreadCount = useRef<number | null>(null)
|
|
51
54
|
const previousVisibilityState = useRef<VisibilityOptions>(null)
|
|
@@ -58,11 +61,16 @@ const SeamlyInstanceFunctionsLoader = () => {
|
|
|
58
61
|
|
|
59
62
|
useEffect(() => {
|
|
60
63
|
currentVisibility.current = visible
|
|
61
|
-
|
|
64
|
+
hasResumeConversationPrompt.current = hasPrompt
|
|
65
|
+
}, [hasPrompt, visible])
|
|
62
66
|
|
|
63
67
|
useSeamlyInstanceFunction(
|
|
64
68
|
'askText',
|
|
65
69
|
(text) => {
|
|
70
|
+
if (hasResumeConversationPrompt.current) {
|
|
71
|
+
continueChat()
|
|
72
|
+
}
|
|
73
|
+
|
|
66
74
|
sendMessage({ body: text })
|
|
67
75
|
},
|
|
68
76
|
[api.send],
|
|
@@ -75,6 +83,7 @@ const SeamlyInstanceFunctionsLoader = () => {
|
|
|
75
83
|
},
|
|
76
84
|
[api.send],
|
|
77
85
|
)
|
|
86
|
+
|
|
78
87
|
useSeamlyInstanceFunction('getVisibility', (callback) => {
|
|
79
88
|
if (callback) {
|
|
80
89
|
callback(currentVisibility.current)
|
|
@@ -84,6 +93,7 @@ const SeamlyInstanceFunctionsLoader = () => {
|
|
|
84
93
|
)
|
|
85
94
|
}
|
|
86
95
|
})
|
|
96
|
+
|
|
87
97
|
useSeamlyInstanceFunction(
|
|
88
98
|
'setVisibility',
|
|
89
99
|
(args: VisibilityOptions | VisibilityActionArgs) => {
|
|
@@ -102,6 +112,7 @@ const SeamlyInstanceFunctionsLoader = () => {
|
|
|
102
112
|
},
|
|
103
113
|
[config.api],
|
|
104
114
|
)
|
|
115
|
+
|
|
105
116
|
useSeamlyInstanceFunction(
|
|
106
117
|
'sendCustomAction',
|
|
107
118
|
(actionType, body) => {
|
|
@@ -109,6 +120,7 @@ const SeamlyInstanceFunctionsLoader = () => {
|
|
|
109
120
|
},
|
|
110
121
|
[api.send],
|
|
111
122
|
)
|
|
123
|
+
|
|
112
124
|
useSeamlyInstanceFunction(
|
|
113
125
|
'setTopic',
|
|
114
126
|
({ name, fallbackMessage, message, userTriggered }) => {
|
|
@@ -116,6 +128,10 @@ const SeamlyInstanceFunctionsLoader = () => {
|
|
|
116
128
|
dispatch(updateConfig({ showSuggestions: false }))
|
|
117
129
|
}
|
|
118
130
|
|
|
131
|
+
if (hasResumeConversationPrompt.current) {
|
|
132
|
+
continueChat()
|
|
133
|
+
}
|
|
134
|
+
|
|
119
135
|
if (name && fallbackMessage) {
|
|
120
136
|
sendAction({
|
|
121
137
|
type: actionTypes.setTopic,
|