@memori.ai/memori-react 7.0.3 → 7.0.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.
@@ -347,29 +347,6 @@ exports[`renders Chat on X2a state unchanged 1`] = `
347
347
  disabled=""
348
348
  id="chat-fieldset"
349
349
  >
350
- <div
351
- class="memori-send-on-enter-menu"
352
- data-headlessui-state=""
353
- >
354
- <button
355
- aria-expanded="false"
356
- aria-haspopup="true"
357
- class="memori-button memori-button--circle memori-button--icon-only memori-share-button--button memori--conversation-button"
358
- data-headlessui-state=""
359
- id="headlessui-menu-button-:re:"
360
- type="button"
361
- >
362
- <div
363
- class="memori-button--icon"
364
- >
365
- <span
366
- style="display: block; width: 1rem; height: 1rem;"
367
- >
368
-
369
- </span>
370
- </div>
371
- </button>
372
- </div>
373
350
  <div
374
351
  class="memori-chat-textarea"
375
352
  data-testid="chat-textarea"
@@ -811,29 +788,6 @@ exports[`renders Chat on X3 state unchanged 1`] = `
811
788
  disabled=""
812
789
  id="chat-fieldset"
813
790
  >
814
- <div
815
- class="memori-send-on-enter-menu"
816
- data-headlessui-state=""
817
- >
818
- <button
819
- aria-expanded="false"
820
- aria-haspopup="true"
821
- class="memori-button memori-button--circle memori-button--icon-only memori-share-button--button memori--conversation-button"
822
- data-headlessui-state=""
823
- id="headlessui-menu-button-:rc:"
824
- type="button"
825
- >
826
- <div
827
- class="memori-button--icon"
828
- >
829
- <span
830
- style="display: block; width: 1rem; height: 1rem;"
831
- >
832
-
833
- </span>
834
- </div>
835
- </button>
836
- </div>
837
791
  <div
838
792
  class="memori-chat-textarea memori-chat-textarea--disabled"
839
793
  data-testid="chat-textarea"
@@ -1213,29 +1167,6 @@ exports[`renders Chat unchanged 1`] = `
1213
1167
  class="memori-chat-inputs"
1214
1168
  id="chat-fieldset"
1215
1169
  >
1216
- <div
1217
- class="memori-send-on-enter-menu"
1218
- data-headlessui-state=""
1219
- >
1220
- <button
1221
- aria-expanded="false"
1222
- aria-haspopup="true"
1223
- class="memori-button memori-button--circle memori-button--icon-only memori-share-button--button memori--conversation-button"
1224
- data-headlessui-state=""
1225
- id="headlessui-menu-button-:r0:"
1226
- type="button"
1227
- >
1228
- <div
1229
- class="memori-button--icon"
1230
- >
1231
- <span
1232
- style="display: block; width: 1rem; height: 1rem;"
1233
- >
1234
-
1235
- </span>
1236
- </div>
1237
- </button>
1238
- </div>
1239
1170
  <div
1240
1171
  class="memori-chat-textarea"
1241
1172
  data-testid="chat-textarea"
@@ -1644,29 +1575,6 @@ exports[`renders Chat with context vars unchanged 1`] = `
1644
1575
  class="memori-chat-inputs"
1645
1576
  id="chat-fieldset"
1646
1577
  >
1647
- <div
1648
- class="memori-send-on-enter-menu"
1649
- data-headlessui-state=""
1650
- >
1651
- <button
1652
- aria-expanded="false"
1653
- aria-haspopup="true"
1654
- class="memori-button memori-button--circle memori-button--icon-only memori-share-button--button memori--conversation-button"
1655
- data-headlessui-state=""
1656
- id="headlessui-menu-button-:ra:"
1657
- type="button"
1658
- >
1659
- <div
1660
- class="memori-button--icon"
1661
- >
1662
- <span
1663
- style="display: block; width: 1rem; height: 1rem;"
1664
- >
1665
-
1666
- </span>
1667
- </div>
1668
- </button>
1669
- </div>
1670
1578
  <div
1671
1579
  class="memori-chat-textarea"
1672
1580
  data-testid="chat-textarea"
@@ -2021,29 +1929,6 @@ exports[`renders Chat with custom user avatar as react element unchanged 1`] = `
2021
1929
  class="memori-chat-inputs"
2022
1930
  id="chat-fieldset"
2023
1931
  >
2024
- <div
2025
- class="memori-send-on-enter-menu"
2026
- data-headlessui-state=""
2027
- >
2028
- <button
2029
- aria-expanded="false"
2030
- aria-haspopup="true"
2031
- class="memori-button memori-button--circle memori-button--icon-only memori-share-button--button memori--conversation-button"
2032
- data-headlessui-state=""
2033
- id="headlessui-menu-button-:rk:"
2034
- type="button"
2035
- >
2036
- <div
2037
- class="memori-button--icon"
2038
- >
2039
- <span
2040
- style="display: block; width: 1rem; height: 1rem;"
2041
- >
2042
-
2043
- </span>
2044
- </div>
2045
- </button>
2046
- </div>
2047
1932
  <div
2048
1933
  class="memori-chat-textarea"
2049
1934
  data-testid="chat-textarea"
@@ -2404,29 +2289,6 @@ exports[`renders Chat with custom user avatar unchanged 1`] = `
2404
2289
  class="memori-chat-inputs"
2405
2290
  id="chat-fieldset"
2406
2291
  >
2407
- <div
2408
- class="memori-send-on-enter-menu"
2409
- data-headlessui-state=""
2410
- >
2411
- <button
2412
- aria-expanded="false"
2413
- aria-haspopup="true"
2414
- class="memori-button memori-button--circle memori-button--icon-only memori-share-button--button memori--conversation-button"
2415
- data-headlessui-state=""
2416
- id="headlessui-menu-button-:ri:"
2417
- type="button"
2418
- >
2419
- <div
2420
- class="memori-button--icon"
2421
- >
2422
- <span
2423
- style="display: block; width: 1rem; height: 1rem;"
2424
- >
2425
-
2426
- </span>
2427
- </div>
2428
- </button>
2429
- </div>
2430
2292
  <div
2431
2293
  class="memori-chat-textarea"
2432
2294
  data-testid="chat-textarea"
@@ -2840,29 +2702,6 @@ exports[`renders Chat with dates unchanged 1`] = `
2840
2702
  class="memori-chat-inputs"
2841
2703
  id="chat-fieldset"
2842
2704
  >
2843
- <div
2844
- class="memori-send-on-enter-menu"
2845
- data-headlessui-state=""
2846
- >
2847
- <button
2848
- aria-expanded="false"
2849
- aria-haspopup="true"
2850
- class="memori-button memori-button--circle memori-button--icon-only memori-share-button--button memori--conversation-button"
2851
- data-headlessui-state=""
2852
- id="headlessui-menu-button-:r8:"
2853
- type="button"
2854
- >
2855
- <div
2856
- class="memori-button--icon"
2857
- >
2858
- <span
2859
- style="display: block; width: 1rem; height: 1rem;"
2860
- >
2861
-
2862
- </span>
2863
- </div>
2864
- </button>
2865
- </div>
2866
2705
  <div
2867
2706
  class="memori-chat-textarea"
2868
2707
  data-testid="chat-textarea"
@@ -3267,29 +3106,6 @@ exports[`renders Chat with hints unchanged 1`] = `
3267
3106
  class="memori-chat-inputs"
3268
3107
  id="chat-fieldset"
3269
3108
  >
3270
- <div
3271
- class="memori-send-on-enter-menu"
3272
- data-headlessui-state=""
3273
- >
3274
- <button
3275
- aria-expanded="false"
3276
- aria-haspopup="true"
3277
- class="memori-button memori-button--circle memori-button--icon-only memori-share-button--button memori--conversation-button"
3278
- data-headlessui-state=""
3279
- id="headlessui-menu-button-:r4:"
3280
- type="button"
3281
- >
3282
- <div
3283
- class="memori-button--icon"
3284
- >
3285
- <span
3286
- style="display: block; width: 1rem; height: 1rem;"
3287
- >
3288
-
3289
- </span>
3290
- </div>
3291
- </button>
3292
- </div>
3293
3109
  <div
3294
3110
  class="memori-chat-textarea"
3295
3111
  data-testid="chat-textarea"
@@ -4069,29 +3885,6 @@ exports[`renders Chat with media unchanged 1`] = `
4069
3885
  class="memori-chat-inputs"
4070
3886
  id="chat-fieldset"
4071
3887
  >
4072
- <div
4073
- class="memori-send-on-enter-menu"
4074
- data-headlessui-state=""
4075
- >
4076
- <button
4077
- aria-expanded="false"
4078
- aria-haspopup="true"
4079
- class="memori-button memori-button--circle memori-button--icon-only memori-share-button--button memori--conversation-button"
4080
- data-headlessui-state=""
4081
- id="headlessui-menu-button-:r6:"
4082
- type="button"
4083
- >
4084
- <div
4085
- class="memori-button--icon"
4086
- >
4087
- <span
4088
- style="display: block; width: 1rem; height: 1rem;"
4089
- >
4090
-
4091
- </span>
4092
- </div>
4093
- </button>
4094
- </div>
4095
3888
  <div
4096
3889
  class="memori-chat-textarea"
4097
3890
  data-testid="chat-textarea"
@@ -4491,29 +4284,6 @@ exports[`renders Chat with memori typing unchanged 1`] = `
4491
4284
  class="memori-chat-inputs"
4492
4285
  id="chat-fieldset"
4493
4286
  >
4494
- <div
4495
- class="memori-send-on-enter-menu"
4496
- data-headlessui-state=""
4497
- >
4498
- <button
4499
- aria-expanded="false"
4500
- aria-haspopup="true"
4501
- class="memori-button memori-button--circle memori-button--icon-only memori-share-button--button memori--conversation-button"
4502
- data-headlessui-state=""
4503
- id="headlessui-menu-button-:r2:"
4504
- type="button"
4505
- >
4506
- <div
4507
- class="memori-button--icon"
4508
- >
4509
- <span
4510
- style="display: block; width: 1rem; height: 1rem;"
4511
- >
4512
-
4513
- </span>
4514
- </div>
4515
- </button>
4516
- </div>
4517
4287
  <div
4518
4288
  class="memori-chat-textarea"
4519
4289
  data-testid="chat-textarea"
@@ -4874,29 +4644,6 @@ exports[`renders Chat with user unchanged 1`] = `
4874
4644
  class="memori-chat-inputs"
4875
4645
  id="chat-fieldset"
4876
4646
  >
4877
- <div
4878
- class="memori-send-on-enter-menu"
4879
- data-headlessui-state=""
4880
- >
4881
- <button
4882
- aria-expanded="false"
4883
- aria-haspopup="true"
4884
- class="memori-button memori-button--circle memori-button--icon-only memori-share-button--button memori--conversation-button"
4885
- data-headlessui-state=""
4886
- id="headlessui-menu-button-:rg:"
4887
- type="button"
4888
- >
4889
- <div
4890
- class="memori-button--icon"
4891
- >
4892
- <span
4893
- style="display: block; width: 1rem; height: 1rem;"
4894
- >
4895
-
4896
- </span>
4897
- </div>
4898
- </button>
4899
- </div>
4900
4647
  <div
4901
4648
  class="memori-chat-textarea"
4902
4649
  data-testid="chat-textarea"
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { DialogState } from '@memori.ai/memori-api-client/dist/types';
3
- import SendOnEnterMenu from '../SendOnEnterMenu/SendOnEnterMenu';
3
+ // import SendOnEnterMenu from '../SendOnEnterMenu/SendOnEnterMenu';
4
4
  import ChatTextArea from '../ChatTextArea/ChatTextArea';
5
5
  import Button from '../ui/Button';
6
6
  import { useTranslation } from 'react-i18next';
@@ -34,8 +34,6 @@ export interface Props {
34
34
 
35
35
  const ChatInputs: React.FC<Props> = ({
36
36
  dialogState,
37
- sendOnEnter = 'click',
38
- setSendOnEnter,
39
37
  userMessage = '',
40
38
  onChangeUserMessage,
41
39
  sendMessage,
@@ -65,10 +63,10 @@ const ChatInputs: React.FC<Props> = ({
65
63
  disabled={!dialogState?.acceptsMedia}
66
64
  />
67
65
  )*/}
68
- <SendOnEnterMenu
66
+ {/*<SendOnEnterMenu
69
67
  sendOnEnter={sendOnEnter}
70
68
  setSendOnEnter={setSendOnEnter}
71
- />
69
+ />*/}
72
70
  <ChatTextArea
73
71
  value={userMessage}
74
72
  onChange={onChangeUserMessage}
@@ -7,29 +7,6 @@ exports[`renders ChatInputs disabled unchanged 1`] = `
7
7
  disabled=""
8
8
  id="chat-fieldset"
9
9
  >
10
- <div
11
- class="memori-send-on-enter-menu"
12
- data-headlessui-state=""
13
- >
14
- <button
15
- aria-expanded="false"
16
- aria-haspopup="true"
17
- class="memori-button memori-button--circle memori-button--icon-only memori-share-button--button memori--conversation-button"
18
- data-headlessui-state=""
19
- id="headlessui-menu-button-:ra:"
20
- type="button"
21
- >
22
- <div
23
- class="memori-button--icon"
24
- >
25
- <span
26
- style="display: block; width: 1rem; height: 1rem;"
27
- >
28
-
29
- </span>
30
- </div>
31
- </button>
32
- </div>
33
10
  <div
34
11
  class="memori-chat-textarea memori-chat-textarea--disabled"
35
12
  data-testid="chat-textarea"
@@ -134,29 +111,6 @@ exports[`renders ChatInputs listening unchanged 1`] = `
134
111
  class="memori-chat-inputs"
135
112
  id="chat-fieldset"
136
113
  >
137
- <div
138
- class="memori-send-on-enter-menu"
139
- data-headlessui-state=""
140
- >
141
- <button
142
- aria-expanded="false"
143
- aria-haspopup="true"
144
- class="memori-button memori-button--circle memori-button--icon-only memori-share-button--button memori--conversation-button"
145
- data-headlessui-state=""
146
- id="headlessui-menu-button-:r6:"
147
- type="button"
148
- >
149
- <div
150
- class="memori-button--icon"
151
- >
152
- <span
153
- style="display: block; width: 1rem; height: 1rem;"
154
- >
155
-
156
- </span>
157
- </div>
158
- </button>
159
- </div>
160
114
  <div
161
115
  class="memori-chat-textarea"
162
116
  data-testid="chat-textarea"
@@ -260,29 +214,6 @@ exports[`renders ChatInputs on instruct unchanged 1`] = `
260
214
  class="memori-chat-inputs"
261
215
  id="chat-fieldset"
262
216
  >
263
- <div
264
- class="memori-send-on-enter-menu"
265
- data-headlessui-state=""
266
- >
267
- <button
268
- aria-expanded="false"
269
- aria-haspopup="true"
270
- class="memori-button memori-button--circle memori-button--icon-only memori-share-button--button memori--conversation-button"
271
- data-headlessui-state=""
272
- id="headlessui-menu-button-:r4:"
273
- type="button"
274
- >
275
- <div
276
- class="memori-button--icon"
277
- >
278
- <span
279
- style="display: block; width: 1rem; height: 1rem;"
280
- >
281
-
282
- </span>
283
- </div>
284
- </button>
285
- </div>
286
217
  <div
287
218
  class="memori-chat-textarea"
288
219
  data-testid="chat-textarea"
@@ -386,29 +317,6 @@ exports[`renders ChatInputs unchanged 1`] = `
386
317
  class="memori-chat-inputs"
387
318
  id="chat-fieldset"
388
319
  >
389
- <div
390
- class="memori-send-on-enter-menu"
391
- data-headlessui-state=""
392
- >
393
- <button
394
- aria-expanded="false"
395
- aria-haspopup="true"
396
- class="memori-button memori-button--circle memori-button--icon-only memori-share-button--button memori--conversation-button"
397
- data-headlessui-state=""
398
- id="headlessui-menu-button-:r0:"
399
- type="button"
400
- >
401
- <div
402
- class="memori-button--icon"
403
- >
404
- <span
405
- style="display: block; width: 1rem; height: 1rem;"
406
- >
407
-
408
- </span>
409
- </div>
410
- </button>
411
- </div>
412
320
  <div
413
321
  class="memori-chat-textarea"
414
322
  data-testid="chat-textarea"
@@ -511,29 +419,6 @@ exports[`renders ChatInputs with user message unchanged 1`] = `
511
419
  class="memori-chat-inputs"
512
420
  id="chat-fieldset"
513
421
  >
514
- <div
515
- class="memori-send-on-enter-menu"
516
- data-headlessui-state=""
517
- >
518
- <button
519
- aria-expanded="false"
520
- aria-haspopup="true"
521
- class="memori-button memori-button--circle memori-button--icon-only memori-share-button--button memori--conversation-button"
522
- data-headlessui-state=""
523
- id="headlessui-menu-button-:r2:"
524
- type="button"
525
- >
526
- <div
527
- class="memori-button--icon"
528
- >
529
- <span
530
- style="display: block; width: 1rem; height: 1rem;"
531
- >
532
-
533
- </span>
534
- </div>
535
- </button>
536
- </div>
537
422
  <div
538
423
  class="memori-chat-textarea"
539
424
  data-testid="chat-textarea"
@@ -637,29 +522,6 @@ exports[`renders ChatInputs without microphone button unchanged 1`] = `
637
522
  class="memori-chat-inputs"
638
523
  id="chat-fieldset"
639
524
  >
640
- <div
641
- class="memori-send-on-enter-menu"
642
- data-headlessui-state=""
643
- >
644
- <button
645
- aria-expanded="false"
646
- aria-haspopup="true"
647
- class="memori-button memori-button--circle memori-button--icon-only memori-share-button--button memori--conversation-button"
648
- data-headlessui-state=""
649
- id="headlessui-menu-button-:r8:"
650
- type="button"
651
- >
652
- <div
653
- class="memori-button--icon"
654
- >
655
- <span
656
- style="display: block; width: 1rem; height: 1rem;"
657
- >
658
-
659
- </span>
660
- </div>
661
- </button>
662
- </div>
663
525
  <div
664
526
  class="memori-chat-textarea"
665
527
  data-testid="chat-textarea"
@@ -4,7 +4,7 @@
4
4
  box-sizing: border-box;
5
5
  flex: 1 0 auto;
6
6
  margin-right: 0.5rem;
7
- margin-left: 0.5rem;
7
+ /* margin-left: 0.5rem; */
8
8
  }
9
9
 
10
10
  .memori-chat-textarea--inner {
@@ -78,11 +78,15 @@ button.memori-chat-textarea--expand-button:focus {
78
78
  outline: none;
79
79
  }
80
80
 
81
- .memori-chat-textarea:not(.memori-chat-textarea--disabled) .memori-chat-textarea--inner:focus .memori-chat-textarea--expand-button,
82
- .memori-chat-textarea:not(.memori-chat-textarea--disabled) .memori-chat-textarea--inner:focus-within .memori-chat-textarea--expand-button {
81
+ .memori-chat-textarea:not(.memori-chat-textarea--disabled)
82
+ .memori-chat-textarea--inner:focus
83
+ .memori-chat-textarea--expand-button,
84
+ .memori-chat-textarea:not(.memori-chat-textarea--disabled)
85
+ .memori-chat-textarea--inner:focus-within
86
+ .memori-chat-textarea--expand-button {
83
87
  opacity: 1;
84
88
  }
85
89
 
86
90
  .memori-chat-textarea:not(.memori-chat-textarea--disabled) .memori-chat-textarea-inner:focus-within {
87
91
  box-shadow: 0 0.2rem 0.33rem #b5b6c4;
88
- }
92
+ }
@@ -2176,16 +2176,9 @@ const MemoriWidget = ({
2176
2176
  'keypress'
2177
2177
  );
2178
2178
  useEffect(() => {
2179
- const stored = getLocalConfig<'keypress' | 'click'>(
2180
- 'sendOnEnter',
2181
- 'keypress'
2182
- );
2183
2179
  if (window.innerWidth <= 768) setSendOnEnter('click');
2184
- else setSendOnEnter(stored);
2180
+ else setSendOnEnter('keypress');
2185
2181
  }, []);
2186
- useEffect(() => {
2187
- setLocalConfig('sendOnEnter', sendOnEnter);
2188
- }, [sendOnEnter]);
2189
2182
 
2190
2183
  /**
2191
2184
  * Attachments
@@ -2,7 +2,6 @@ export const keys: { [key: string]: string } = {
2
2
  muteSpeaker: '@memori:muteSpeaker',
3
3
  microphoneMode: '@memori:microphoneMode',
4
4
  continuousSpeechTimeout: '@memori:continuousSpeechTimeout',
5
- sendOnEnter: '@memori:sendOnEnter',
6
5
  birthDate: '@memori:birthDate',
7
6
  controlsPosition: '@memori:controlsPosition',
8
7
  hideEmissions: '@memori:hideEmissions',