@memori.ai/memori-react 2.16.1 → 2.17.0
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/CHANGELOG.md +18 -0
- package/README.md +18 -16
- package/dist/components/Chat/Chat.js +1 -1
- package/dist/components/Chat/Chat.js.map +1 -1
- package/dist/components/ChatBubble/ChatBubble.d.ts +1 -0
- package/dist/components/ChatBubble/ChatBubble.js +2 -2
- package/dist/components/ChatBubble/ChatBubble.js.map +1 -1
- package/dist/components/MemoriWidget/MemoriWidget.d.ts +4 -3
- package/dist/components/MemoriWidget/MemoriWidget.js +18 -10
- package/dist/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/dist/components/layouts/WebsiteAssistant.d.ts +4 -0
- package/dist/components/layouts/WebsiteAssistant.js +31 -0
- package/dist/components/layouts/WebsiteAssistant.js.map +1 -0
- package/dist/components/layouts/WebsiteAssistant.test.d.ts +1 -0
- package/dist/components/layouts/WebsiteAssistant.test.js +25 -0
- package/dist/components/layouts/WebsiteAssistant.test.js.map +1 -0
- package/dist/components/layouts/chat.css +2 -2
- package/dist/components/layouts/totem.css +2 -2
- package/dist/components/layouts/website-assistant.css +353 -0
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/styles.css +2 -1
- package/esm/components/Chat/Chat.js +1 -1
- package/esm/components/Chat/Chat.js.map +1 -1
- package/esm/components/ChatBubble/ChatBubble.d.ts +1 -0
- package/esm/components/ChatBubble/ChatBubble.js +2 -2
- package/esm/components/ChatBubble/ChatBubble.js.map +1 -1
- package/esm/components/MemoriWidget/MemoriWidget.d.ts +4 -3
- package/esm/components/MemoriWidget/MemoriWidget.js +18 -10
- package/esm/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/esm/components/layouts/WebsiteAssistant.d.ts +4 -0
- package/esm/components/layouts/WebsiteAssistant.js +28 -0
- package/esm/components/layouts/WebsiteAssistant.js.map +1 -0
- package/esm/components/layouts/WebsiteAssistant.test.d.ts +1 -0
- package/esm/components/layouts/WebsiteAssistant.test.js +22 -0
- package/esm/components/layouts/WebsiteAssistant.test.js.map +1 -0
- package/esm/components/layouts/chat.css +2 -2
- package/esm/components/layouts/totem.css +2 -2
- package/esm/components/layouts/website-assistant.css +353 -0
- package/esm/index.js +7 -1
- package/esm/index.js.map +1 -1
- package/esm/styles.css +2 -1
- package/package.json +1 -1
- package/src/components/Chat/Chat.tsx +1 -0
- package/src/components/Chat/__snapshots__/Chat.test.tsx.snap +24 -0
- package/src/components/ChatBubble/ChatBubble.tsx +5 -1
- package/src/components/MemoriWidget/MemoriWidget.tsx +40 -12
- package/src/components/layouts/WebsiteAssistant.test.tsx +31 -0
- package/src/components/layouts/WebsiteAssistant.tsx +124 -0
- package/src/components/layouts/__snapshots__/WebsiteAssistant.test.tsx.snap +60 -0
- package/src/components/layouts/chat.css +2 -2
- package/src/components/layouts/layouts.stories.tsx +109 -0
- package/src/components/layouts/totem.css +2 -2
- package/src/components/layouts/website-assistant.css +353 -0
- package/src/index.tsx +7 -1
- package/src/styles.css +2 -1
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
.memori-website_assistant--trigger {
|
|
2
|
+
position: fixed;
|
|
3
|
+
right: 0.5em;
|
|
4
|
+
bottom: 0.5em;
|
|
5
|
+
display: flex;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.memori-website_assistant--trigger-button {
|
|
9
|
+
position: relative;
|
|
10
|
+
width: 120px;
|
|
11
|
+
height: 120px;
|
|
12
|
+
padding: 1em;
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@media (max-width: 600px) {
|
|
17
|
+
.memori-website_assistant--trigger-button {
|
|
18
|
+
width: 80px;
|
|
19
|
+
height: 80px;
|
|
20
|
+
padding: 1em;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.memori-website_assistant--close-button-wrapper {
|
|
25
|
+
position: absolute;
|
|
26
|
+
z-index: 1;
|
|
27
|
+
top: 0;
|
|
28
|
+
left: 0;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.memori-website_assistant--trigger-button .memori-blob {
|
|
32
|
+
position: relative !important;
|
|
33
|
+
top: 50% !important;
|
|
34
|
+
left: 50% !important;
|
|
35
|
+
display: block;
|
|
36
|
+
width: 100%;
|
|
37
|
+
height: 100%;
|
|
38
|
+
margin: 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.memori-website_assistant--trigger-button .memori-blob .mainDiv {
|
|
42
|
+
width: 120px !important;
|
|
43
|
+
height: 120px !important;
|
|
44
|
+
box-shadow: 0 0 0.5em 0.2em rgba(0, 0, 0, 0.85) inset, 0 0 0.15em 0 rgba(255, 255, 255, 0.85);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
@media (max-width: 768px) {
|
|
49
|
+
.memori-website_assistant--trigger-button .memori-blob {
|
|
50
|
+
min-height: 0;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.memori-website_assistant--trigger-button .memori-blob figure {
|
|
54
|
+
position: absolute;
|
|
55
|
+
transform: translate(-50%, -50%);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.memori-website_assistant--trigger-button .memori-blob .mainDiv:nth-of-type(1) {
|
|
59
|
+
--memori-blob-x: -53%;
|
|
60
|
+
--memori-blob-y: -53%;
|
|
61
|
+
--memori-blob-t: 37;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.memori-website_assistant--trigger-button .memori-blob .mainDiv:nth-of-type(2) {
|
|
65
|
+
--memori-blob-x: -47%;
|
|
66
|
+
--memori-blob-y: -52%;
|
|
67
|
+
--memori-blob-t: 58;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.memori-website_assistant--trigger-button .memori-blob .mainDiv:nth-of-type(3) {
|
|
71
|
+
--memori-blob-x: -45%;
|
|
72
|
+
--memori-blob-y: -50%;
|
|
73
|
+
--memori-blob-t: 46;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.memori-website_assistant--trigger-button .memori-blob .mainDiv:nth-of-type(4) {
|
|
77
|
+
--memori-blob-x: -53%;
|
|
78
|
+
--memori-blob-y: -45%;
|
|
79
|
+
--memori-blob-t: 72;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.memori-website_assistant--trigger-button .memori-blob .mainDiv:nth-of-type(5) {
|
|
83
|
+
--memori-blob-x: -55%;
|
|
84
|
+
--memori-blob-y: -45%;
|
|
85
|
+
--memori-blob-t: 62;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@media (max-width: 600px) {
|
|
90
|
+
.memori-website_assistant--trigger-button .memori-blob .mainDiv {
|
|
91
|
+
width: 80px !important;
|
|
92
|
+
height: 80px !important;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.memori-website_assistant--trigger-button .memori-blob figure {
|
|
97
|
+
width: 65%;
|
|
98
|
+
border-radius: 0;
|
|
99
|
+
opacity: 0.75;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.memori-website_assistant-layout .memori--powered-by {
|
|
103
|
+
top: 7.5px;
|
|
104
|
+
right: auto;
|
|
105
|
+
bottom: auto;
|
|
106
|
+
left: 45px;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.memori-widget.memori-layout-website_assistant {
|
|
110
|
+
font-size: 14px;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.memori-widget.memori-layout-website_assistant .memori-website_assistant--collapsed,
|
|
114
|
+
.memori-widget.memori-layout-website_assistant .memori-website_assistant--expanded {
|
|
115
|
+
position: fixed;
|
|
116
|
+
right: 0;
|
|
117
|
+
bottom: 0;
|
|
118
|
+
width: 30vw !important;
|
|
119
|
+
min-width: 320px !important;
|
|
120
|
+
max-width: 100vw;
|
|
121
|
+
height: 100% !important;
|
|
122
|
+
max-height: 0;
|
|
123
|
+
transition: all 0.3s ease-in-out;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.memori-widget.memori-layout-website_assistant .memori-website_assistant--expanded {
|
|
127
|
+
max-height: 60vh !important;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
@media (max-width: 600px) {
|
|
132
|
+
.memori-widget.memori-layout-website_assistant .memori-website_assistant--expanded {
|
|
133
|
+
max-height: 80vh;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.memori-widget.memori-layout-website_assistant .memori--global-background {
|
|
138
|
+
background: none;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.memori-widget .memori-spin.memori-website_assistant-layout {
|
|
142
|
+
display: flex;
|
|
143
|
+
height: 100%;
|
|
144
|
+
flex-direction: column;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.memori-website_assistant-layout--header {
|
|
148
|
+
position: absolute;
|
|
149
|
+
top: 0;
|
|
150
|
+
right: 0;
|
|
151
|
+
text-align: right;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.memori-header--button--fullscreen {
|
|
155
|
+
display: none;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.memori-website_assistant-layout--avatar {
|
|
159
|
+
flex: 1;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.memori-website_assistant-layout--avatar .memori--avatar-wrapper {
|
|
163
|
+
position: absolute;
|
|
164
|
+
z-index: 0;
|
|
165
|
+
top: 0;
|
|
166
|
+
left: 0;
|
|
167
|
+
overflow: hidden;
|
|
168
|
+
width: 100%;
|
|
169
|
+
height: 100%;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.memori-website_assistant-layout--avatar .memori--blob-container {
|
|
173
|
+
display: block;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
@media (max-width: 480px) {
|
|
177
|
+
.memori-website_assistant-layout--avatar .memori--blob-container {
|
|
178
|
+
display: block;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
@media (max-width: 870px) {
|
|
183
|
+
.memori-website_assistant-layout--avatar .memori--blob-container {
|
|
184
|
+
display: block;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.memori-website_assistant-layout .memori-header {
|
|
189
|
+
position: relative;
|
|
190
|
+
z-index: 100;
|
|
191
|
+
display: inline-flex;
|
|
192
|
+
width: auto;
|
|
193
|
+
height: auto;
|
|
194
|
+
flex-direction: column;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.memori-website_assistant-layout .memori-header .memori-share-button,
|
|
198
|
+
.memori-website_assistant-layout .memori-header .memori-header--button+.memori-header--button {
|
|
199
|
+
margin-top: 0.25rem;
|
|
200
|
+
margin-left: 0;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.memori-website_assistant-layout .memori-chat--cover {
|
|
204
|
+
display: none;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.memori-website_assistant-layout .memori--cover {
|
|
208
|
+
padding: 0;
|
|
209
|
+
background: none;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.memori-chat--bubble-initial+.memori-chat--bubble-container {
|
|
213
|
+
margin-top: auto;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.memori-website_assistant-layout--avatar .memori--avatar-wrapper>div {
|
|
217
|
+
overflow: visible !important;
|
|
218
|
+
/* width: 100% !important;
|
|
219
|
+
height: 100% !important; */
|
|
220
|
+
width: auto !important;
|
|
221
|
+
height: 90% !important;
|
|
222
|
+
max-height: 90%;
|
|
223
|
+
border-radius: 0;
|
|
224
|
+
transform: scale(1.7) translate(0px, 10vh);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.memori-website_assistant-layout--avatar .memori--avatar-wrapper canvas {
|
|
228
|
+
width: auto !important;
|
|
229
|
+
max-width: 100%;
|
|
230
|
+
height: 100% !important;
|
|
231
|
+
max-height: 100%;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.memori-website_assistant-layout--controls {
|
|
235
|
+
position: relative;
|
|
236
|
+
z-index: 5;
|
|
237
|
+
display: flex;
|
|
238
|
+
height: calc(100% - 45px);
|
|
239
|
+
flex-direction: column;
|
|
240
|
+
justify-content: flex-end;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.memori-website_assistant-layout--controls .memori-chat--history,
|
|
244
|
+
.memori-website_assistant-layout--controls .memori-chat--content {
|
|
245
|
+
background: transparent;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.memori-website_assistant-layout--controls .memori-chat--history {
|
|
249
|
+
padding: 0;
|
|
250
|
+
margin-top: 0;
|
|
251
|
+
-webkit-backdrop-filter: none;
|
|
252
|
+
backdrop-filter: none;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.memori-website_assistant-layout--controls .memori-chat--content {
|
|
256
|
+
padding: 0;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.memori-website_assistant-layout--controls .memori-chat--content .memori-chat--bubble-container:first-of-type {
|
|
260
|
+
margin-top: auto;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.memori-website_assistant-layout--controls .memori--start-panel,
|
|
264
|
+
.memori-website_assistant-layout--controls .memori-chat--wrapper {
|
|
265
|
+
width: 100%;
|
|
266
|
+
max-width: 800px;
|
|
267
|
+
padding: 1rem;
|
|
268
|
+
margin: 0 auto;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.memori-website_assistant-layout--controls .memori-chat--wrapper {
|
|
272
|
+
height: calc(100% - 1rem);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.memori-website_assistant-layout--controls .memori--start-panel {
|
|
276
|
+
margin: 1rem;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
@media (max-width: 870px) {
|
|
280
|
+
|
|
281
|
+
.memori-website_assistant-layout--controls .memori--start-panel,
|
|
282
|
+
.memori-website_assistant-layout--controls .memori-chat--wrapper {
|
|
283
|
+
width: 100%;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.memori-website_assistant-layout--controls .memori-chat--wrapper {
|
|
287
|
+
padding: 0;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
@media (max-width: 480px) {
|
|
292
|
+
.memori-website_assistant-layout .memori-send-on-enter-menu {
|
|
293
|
+
display: none;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.memori-website_assistant-layout .memori-header--button-settings {
|
|
297
|
+
display: none;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.memori-website_assistant-layout .memori--avatar-toggle {
|
|
302
|
+
display: none;
|
|
303
|
+
width: 100%;
|
|
304
|
+
justify-content: center;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.memori-website_assistant-layout .memori--title,
|
|
308
|
+
.memori-website_assistant-layout .memori--description,
|
|
309
|
+
.memori-website_assistant-layout .memori--needsPosition {
|
|
310
|
+
color: var(--memori-text-color);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.memori-website_assistant-layout .memori--global-background-image {
|
|
314
|
+
background: none;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.memori-widget.memori-layout-website_assistant.memori--hide-emissions .memori-website_assistant-layout--controls .memori-chat--bubble-container:not(.memori-chat--bubble-from-user),
|
|
318
|
+
.memori-widget.memori-layout-website_assistant.memori--hide-emissions.memori--with-speechkey .memori-website_assistant-layout--controls .memori-chat--bubble-container:not(.memori-chat--bubble-from-user) {
|
|
319
|
+
display: none;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.memori-website_assistant-layout--avatar .memori-blob {
|
|
323
|
+
z-index: 2;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.memori-website_assistant-layout--avatar .memori--avatar-wrapper>div canvas+div {
|
|
327
|
+
position: absolute !important;
|
|
328
|
+
width: 100%;
|
|
329
|
+
height: 100%;
|
|
330
|
+
transform: none !important;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.memori-website_assistant-layout--avatar .memori--avatar-wrapper .avatar-loader {
|
|
334
|
+
display: flex;
|
|
335
|
+
width: 100%;
|
|
336
|
+
height: 100%;
|
|
337
|
+
align-items: center;
|
|
338
|
+
justify-content: center;
|
|
339
|
+
transform: none !important;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.memori-website_assistant-layout--avatar .memori--avatar-wrapper .avatar-loader figure {
|
|
343
|
+
text-align: center;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
.memori-website_assistant-layout--avatar .memori--avatar-wrapper .avatar-loader .memori-spin--spinner {
|
|
347
|
+
background: none;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.memori-website_assistant-layout .memori--description-text,
|
|
351
|
+
.memori-website_assistant-layout .memori--translation-toggle {
|
|
352
|
+
display: none;
|
|
353
|
+
}
|
package/esm/index.js
CHANGED
|
@@ -110,7 +110,13 @@ Memori.propTypes = {
|
|
|
110
110
|
showShare: PropTypes.bool,
|
|
111
111
|
showSettings: PropTypes.bool,
|
|
112
112
|
showInstruct: PropTypes.bool,
|
|
113
|
-
layout: PropTypes.oneOf([
|
|
113
|
+
layout: PropTypes.oneOf([
|
|
114
|
+
'DEFAULT',
|
|
115
|
+
'FULLPAGE',
|
|
116
|
+
'TOTEM',
|
|
117
|
+
'WEBSITE_ASSISTANT',
|
|
118
|
+
'CHAT',
|
|
119
|
+
]),
|
|
114
120
|
height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
115
121
|
baseURL: PropTypes.string,
|
|
116
122
|
apiURL: PropTypes.string,
|
package/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAChE,OAAO,SAAS,MAAM,YAAY,CAAC;AAKnC,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AC,CAAC;IACrC,UAAU,EAAE,SAAS,CAAC,MAAM;IAC5B,SAAS,EAAE,SAAS,CAAC,MAAM;IAC3B,gCAAgC,EAAE,SAAS,CAAC,MAAM;IAClD,aAAa,EAAE,SAAS,CAAC,IAAI;CAC9B,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
package/esm/styles.css
CHANGED
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
@import url('https://fonts.bunny.net/css?family=exo-2:200,400,700');
|
|
42
42
|
|
|
43
43
|
@import url('./components/layouts/totem.css');
|
|
44
|
+
@import url('./components/layouts/website-assistant.css');
|
|
44
45
|
@import url('./components/layouts/chat.css');
|
|
45
46
|
|
|
46
47
|
.sr-only {
|
|
@@ -84,4 +85,4 @@ body.sb-show-main #root,
|
|
|
84
85
|
--memori-modal--width: 100%;
|
|
85
86
|
--memori-modal--width--md: 80%;
|
|
86
87
|
--memori-error-color: #ff4d4f;
|
|
87
|
-
}
|
|
88
|
+
}
|
package/package.json
CHANGED
|
@@ -16,6 +16,9 @@ exports[`renders Chat on X2a state unchanged 1`] = `
|
|
|
16
16
|
<div
|
|
17
17
|
class="memori-chat--cover"
|
|
18
18
|
/>
|
|
19
|
+
<div
|
|
20
|
+
class="memori-chat--bubble-initial"
|
|
21
|
+
/>
|
|
19
22
|
<div
|
|
20
23
|
class="memori-chat--bubble-container"
|
|
21
24
|
>
|
|
@@ -423,6 +426,9 @@ exports[`renders Chat on X3 state unchanged 1`] = `
|
|
|
423
426
|
<div
|
|
424
427
|
class="memori-chat--cover"
|
|
425
428
|
/>
|
|
429
|
+
<div
|
|
430
|
+
class="memori-chat--bubble-initial"
|
|
431
|
+
/>
|
|
426
432
|
<div
|
|
427
433
|
class="memori-chat--bubble-container"
|
|
428
434
|
>
|
|
@@ -863,6 +869,9 @@ exports[`renders Chat unchanged 1`] = `
|
|
|
863
869
|
<div
|
|
864
870
|
class="memori-chat--cover"
|
|
865
871
|
/>
|
|
872
|
+
<div
|
|
873
|
+
class="memori-chat--bubble-initial"
|
|
874
|
+
/>
|
|
866
875
|
<div
|
|
867
876
|
class="memori-chat--bubble-container"
|
|
868
877
|
>
|
|
@@ -1239,6 +1248,9 @@ exports[`renders Chat with context vars unchanged 1`] = `
|
|
|
1239
1248
|
<div
|
|
1240
1249
|
class="memori-chat--cover"
|
|
1241
1250
|
/>
|
|
1251
|
+
<div
|
|
1252
|
+
class="memori-chat--bubble-initial"
|
|
1253
|
+
/>
|
|
1242
1254
|
<div
|
|
1243
1255
|
class="memori-chat--bubble-container"
|
|
1244
1256
|
>
|
|
@@ -1645,6 +1657,9 @@ exports[`renders Chat with dates unchanged 1`] = `
|
|
|
1645
1657
|
<div
|
|
1646
1658
|
class="memori-chat--cover"
|
|
1647
1659
|
/>
|
|
1660
|
+
<div
|
|
1661
|
+
class="memori-chat--bubble-initial"
|
|
1662
|
+
/>
|
|
1648
1663
|
<div
|
|
1649
1664
|
class="memori-chat--bubble-container"
|
|
1650
1665
|
>
|
|
@@ -2056,6 +2071,9 @@ exports[`renders Chat with hints unchanged 1`] = `
|
|
|
2056
2071
|
<div
|
|
2057
2072
|
class="memori-chat--cover"
|
|
2058
2073
|
/>
|
|
2074
|
+
<div
|
|
2075
|
+
class="memori-chat--bubble-initial"
|
|
2076
|
+
/>
|
|
2059
2077
|
<div
|
|
2060
2078
|
class="memori-chat--bubble-container"
|
|
2061
2079
|
>
|
|
@@ -2458,6 +2476,9 @@ exports[`renders Chat with media unchanged 1`] = `
|
|
|
2458
2476
|
<div
|
|
2459
2477
|
class="memori-chat--cover"
|
|
2460
2478
|
/>
|
|
2479
|
+
<div
|
|
2480
|
+
class="memori-chat--bubble-initial"
|
|
2481
|
+
/>
|
|
2461
2482
|
<div
|
|
2462
2483
|
class="memori-chat--bubble-container"
|
|
2463
2484
|
>
|
|
@@ -3235,6 +3256,9 @@ exports[`renders Chat with memori typing unchanged 1`] = `
|
|
|
3235
3256
|
<div
|
|
3236
3257
|
class="memori-chat--cover"
|
|
3237
3258
|
/>
|
|
3259
|
+
<div
|
|
3260
|
+
class="memori-chat--bubble-initial"
|
|
3261
|
+
/>
|
|
3238
3262
|
<div
|
|
3239
3263
|
class="memori-chat--bubble-container"
|
|
3240
3264
|
>
|
|
@@ -22,6 +22,7 @@ export interface Props {
|
|
|
22
22
|
showFeedback?: boolean;
|
|
23
23
|
simulateUserPrompt?: (msg: string) => void;
|
|
24
24
|
showAIicon?: boolean;
|
|
25
|
+
isFirst?: boolean;
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
const ChatBubble: React.FC<Props> = ({
|
|
@@ -33,12 +34,15 @@ const ChatBubble: React.FC<Props> = ({
|
|
|
33
34
|
showFeedback,
|
|
34
35
|
simulateUserPrompt,
|
|
35
36
|
showAIicon = true,
|
|
37
|
+
isFirst = false,
|
|
36
38
|
}) => {
|
|
37
39
|
const { t } = useTranslation();
|
|
38
40
|
|
|
39
41
|
return (
|
|
40
42
|
<>
|
|
41
|
-
{message.initial
|
|
43
|
+
{(message.initial || isFirst) && (
|
|
44
|
+
<div className="memori-chat--bubble-initial" />
|
|
45
|
+
)}
|
|
42
46
|
<Transition
|
|
43
47
|
show
|
|
44
48
|
appear
|
|
@@ -56,6 +56,7 @@ import PoweredBy from '../PoweredBy/PoweredBy';
|
|
|
56
56
|
import FullPageLayout from '../layouts/FullPage';
|
|
57
57
|
import TotemLayout from '../layouts/Totem';
|
|
58
58
|
import ChatLayout from '../layouts/Chat';
|
|
59
|
+
import WebsiteAssistantLayout from '../layouts/WebsiteAssistant';
|
|
59
60
|
|
|
60
61
|
// Helpers / Utils
|
|
61
62
|
import { getTranslation } from '../../helpers/translations';
|
|
@@ -100,6 +101,7 @@ type MemoriTextEnteredEvent = CustomEvent<{
|
|
|
100
101
|
hidden?: boolean;
|
|
101
102
|
typingText?: string;
|
|
102
103
|
useLoaderTextAsMsg?: boolean;
|
|
104
|
+
hasBatchQueued?: boolean;
|
|
103
105
|
}>;
|
|
104
106
|
|
|
105
107
|
const typeMessage = (
|
|
@@ -107,7 +109,8 @@ const typeMessage = (
|
|
|
107
109
|
waitForPrevious = true,
|
|
108
110
|
hidden = false,
|
|
109
111
|
typingText?: string,
|
|
110
|
-
useLoaderTextAsMsg = false
|
|
112
|
+
useLoaderTextAsMsg = false,
|
|
113
|
+
hasBatchQueued = false
|
|
111
114
|
) => {
|
|
112
115
|
const e: MemoriTextEnteredEvent = new CustomEvent('MemoriTextEntered', {
|
|
113
116
|
detail: {
|
|
@@ -116,6 +119,7 @@ const typeMessage = (
|
|
|
116
119
|
hidden,
|
|
117
120
|
typingText,
|
|
118
121
|
useLoaderTextAsMsg,
|
|
122
|
+
hasBatchQueued,
|
|
119
123
|
},
|
|
120
124
|
});
|
|
121
125
|
|
|
@@ -125,9 +129,17 @@ const typeMessageHidden = (
|
|
|
125
129
|
message: string,
|
|
126
130
|
waitForPrevious = true,
|
|
127
131
|
typingText?: string,
|
|
128
|
-
useLoaderTextAsMsg = false
|
|
132
|
+
useLoaderTextAsMsg = false,
|
|
133
|
+
hasBatchQueued = false
|
|
129
134
|
) =>
|
|
130
|
-
typeMessage(
|
|
135
|
+
typeMessage(
|
|
136
|
+
message,
|
|
137
|
+
waitForPrevious,
|
|
138
|
+
true,
|
|
139
|
+
typingText,
|
|
140
|
+
useLoaderTextAsMsg,
|
|
141
|
+
hasBatchQueued
|
|
142
|
+
);
|
|
131
143
|
|
|
132
144
|
const typeBatchMessages = (
|
|
133
145
|
messages: {
|
|
@@ -193,7 +205,8 @@ const typeBatchMessages = (
|
|
|
193
205
|
step.waitForPrevious,
|
|
194
206
|
step.hidden,
|
|
195
207
|
step.typingText,
|
|
196
|
-
step.useLoaderTextAsMsg
|
|
208
|
+
step.useLoaderTextAsMsg,
|
|
209
|
+
!next.done
|
|
197
210
|
);
|
|
198
211
|
} else if (areInputsDisabled()) {
|
|
199
212
|
reEnableInputs();
|
|
@@ -277,7 +290,7 @@ export interface Props {
|
|
|
277
290
|
memoriLang?: string;
|
|
278
291
|
multilingual?: boolean;
|
|
279
292
|
integration?: Integration;
|
|
280
|
-
layout?: 'DEFAULT' | 'FULLPAGE' | 'TOTEM' | 'CHAT';
|
|
293
|
+
layout?: 'DEFAULT' | 'FULLPAGE' | 'TOTEM' | 'CHAT' | 'WEBSITE_ASSISTANT';
|
|
281
294
|
customLayout?: React.FC<LayoutProps>;
|
|
282
295
|
showShare?: boolean;
|
|
283
296
|
showInstruct?: boolean;
|
|
@@ -519,7 +532,8 @@ const MemoriWidget = ({
|
|
|
519
532
|
translatedText?: string,
|
|
520
533
|
hidden: boolean = false,
|
|
521
534
|
typingText?: string,
|
|
522
|
-
useLoaderTextAsMsg = false
|
|
535
|
+
useLoaderTextAsMsg = false,
|
|
536
|
+
hasBatchQueued = false
|
|
523
537
|
) => {
|
|
524
538
|
const sessionID =
|
|
525
539
|
newSessionId ||
|
|
@@ -673,9 +687,9 @@ const MemoriWidget = ({
|
|
|
673
687
|
});
|
|
674
688
|
}
|
|
675
689
|
|
|
676
|
-
if (
|
|
677
|
-
setMemoriTyping(false);
|
|
690
|
+
if (!hasBatchQueued) {
|
|
678
691
|
setTypingText(undefined);
|
|
692
|
+
setMemoriTyping(false);
|
|
679
693
|
}
|
|
680
694
|
};
|
|
681
695
|
|
|
@@ -968,12 +982,14 @@ const MemoriWidget = ({
|
|
|
968
982
|
text: currentState.emission,
|
|
969
983
|
media: currentState.media,
|
|
970
984
|
fromUser: false,
|
|
985
|
+
initial: true,
|
|
971
986
|
},
|
|
972
987
|
])
|
|
973
988
|
: pushMessage({
|
|
974
989
|
text: currentState.emission,
|
|
975
990
|
media: currentState.media,
|
|
976
991
|
fromUser: false,
|
|
992
|
+
initial: true,
|
|
977
993
|
});
|
|
978
994
|
}
|
|
979
995
|
}
|
|
@@ -1477,7 +1493,10 @@ const MemoriWidget = ({
|
|
|
1477
1493
|
};
|
|
1478
1494
|
|
|
1479
1495
|
const speak = (text: string): void => {
|
|
1480
|
-
if (!AZURE_COGNITIVE_SERVICES_TTS_KEY)
|
|
1496
|
+
if (!AZURE_COGNITIVE_SERVICES_TTS_KEY || preview) {
|
|
1497
|
+
emitEndSpeakEvent();
|
|
1498
|
+
return;
|
|
1499
|
+
}
|
|
1481
1500
|
stopListening();
|
|
1482
1501
|
// stopAudio();
|
|
1483
1502
|
|
|
@@ -2124,8 +2143,14 @@ const MemoriWidget = ({
|
|
|
2124
2143
|
// to use in integrations or snippets
|
|
2125
2144
|
const memoriTextEnteredHandler = useCallback(
|
|
2126
2145
|
(e: MemoriTextEnteredEvent) => {
|
|
2127
|
-
const {
|
|
2128
|
-
|
|
2146
|
+
const {
|
|
2147
|
+
text,
|
|
2148
|
+
waitForPrevious,
|
|
2149
|
+
hidden,
|
|
2150
|
+
typingText,
|
|
2151
|
+
useLoaderTextAsMsg,
|
|
2152
|
+
hasBatchQueued,
|
|
2153
|
+
} = e.detail;
|
|
2129
2154
|
|
|
2130
2155
|
if (text) {
|
|
2131
2156
|
// wait to finish reading previous emission
|
|
@@ -2148,7 +2173,8 @@ const MemoriWidget = ({
|
|
|
2148
2173
|
undefined,
|
|
2149
2174
|
hidden,
|
|
2150
2175
|
typingText,
|
|
2151
|
-
useLoaderTextAsMsg
|
|
2176
|
+
useLoaderTextAsMsg,
|
|
2177
|
+
hasBatchQueued
|
|
2152
2178
|
);
|
|
2153
2179
|
}
|
|
2154
2180
|
}
|
|
@@ -2623,6 +2649,8 @@ const MemoriWidget = ({
|
|
|
2623
2649
|
? ChatLayout
|
|
2624
2650
|
: selectedLayout === 'FULLPAGE'
|
|
2625
2651
|
? FullPageLayout
|
|
2652
|
+
: selectedLayout === 'WEBSITE_ASSISTANT'
|
|
2653
|
+
? WebsiteAssistantLayout
|
|
2626
2654
|
: FullPageLayout;
|
|
2627
2655
|
|
|
2628
2656
|
return (
|