@memori.ai/memori-react 2.22.0 → 2.23.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 +7 -0
- package/dist/components/Chat/Chat.d.ts +2 -1
- package/dist/components/Chat/Chat.js +2 -2
- package/dist/components/Chat/Chat.js.map +1 -1
- package/dist/components/ChatBubble/ChatBubble.d.ts +2 -1
- package/dist/components/ChatBubble/ChatBubble.js +30 -18
- package/dist/components/ChatBubble/ChatBubble.js.map +1 -1
- package/dist/components/ChatBubble/ChatBubble.test.js +22 -0
- package/dist/components/ChatBubble/ChatBubble.test.js.map +1 -1
- package/dist/components/MemoriWidget/MemoriWidget.js +34 -1
- package/dist/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/dist/components/StartPanel/StartPanel.css +12 -0
- package/dist/components/StartPanel/StartPanel.js +2 -1
- package/dist/components/StartPanel/StartPanel.js.map +1 -1
- package/dist/components/StartPanel/StartPanel.test.js +7 -0
- package/dist/components/StartPanel/StartPanel.test.js.map +1 -1
- package/dist/components/icons/Group.d.ts +5 -0
- package/dist/components/icons/Group.js +6 -0
- package/dist/components/icons/Group.js.map +1 -0
- package/dist/helpers/media.js +1 -1
- package/dist/helpers/media.js.map +1 -1
- package/dist/helpers/media.test.js +1 -1
- package/dist/helpers/media.test.js.map +1 -1
- package/dist/locales/en.json +1 -0
- package/dist/locales/it.json +1 -0
- package/esm/components/Chat/Chat.d.ts +2 -1
- package/esm/components/Chat/Chat.js +2 -2
- package/esm/components/Chat/Chat.js.map +1 -1
- package/esm/components/ChatBubble/ChatBubble.d.ts +2 -1
- package/esm/components/ChatBubble/ChatBubble.js +30 -18
- package/esm/components/ChatBubble/ChatBubble.js.map +1 -1
- package/esm/components/ChatBubble/ChatBubble.test.js +22 -0
- package/esm/components/ChatBubble/ChatBubble.test.js.map +1 -1
- package/esm/components/MemoriWidget/MemoriWidget.js +34 -1
- package/esm/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/esm/components/StartPanel/StartPanel.css +12 -0
- package/esm/components/StartPanel/StartPanel.js +2 -1
- package/esm/components/StartPanel/StartPanel.js.map +1 -1
- package/esm/components/StartPanel/StartPanel.test.js +7 -0
- package/esm/components/StartPanel/StartPanel.test.js.map +1 -1
- package/esm/components/icons/Group.d.ts +5 -0
- package/esm/components/icons/Group.js +4 -0
- package/esm/components/icons/Group.js.map +1 -0
- package/esm/helpers/media.js +1 -1
- package/esm/helpers/media.js.map +1 -1
- package/esm/helpers/media.test.js +1 -1
- package/esm/helpers/media.test.js.map +1 -1
- package/esm/locales/en.json +1 -0
- package/esm/locales/it.json +1 -0
- package/package.json +2 -2
- package/src/components/Chat/Chat.tsx +4 -0
- package/src/components/Chat/__snapshots__/Chat.test.tsx.snap +44 -0
- package/src/components/ChatBubble/ChatBubble.stories.tsx +28 -0
- package/src/components/ChatBubble/ChatBubble.test.tsx +32 -0
- package/src/components/ChatBubble/ChatBubble.tsx +37 -9
- package/src/components/ChatBubble/__snapshots__/ChatBubble.test.tsx.snap +82 -0
- package/src/components/MemoriWidget/MemoriWidget.tsx +38 -0
- package/src/components/StartPanel/StartPanel.css +12 -0
- package/src/components/StartPanel/StartPanel.stories.tsx +23 -0
- package/src/components/StartPanel/StartPanel.test.tsx +21 -0
- package/src/components/StartPanel/StartPanel.tsx +12 -2
- package/src/components/StartPanel/__snapshots__/StartPanel.test.tsx.snap +89 -0
- package/src/components/icons/Group.tsx +30 -0
- package/src/helpers/media.test.ts +1 -1
- package/src/helpers/media.ts +1 -1
- package/src/locales/en.json +1 -0
- package/src/locales/it.json +1 -0
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
Asset,
|
|
16
16
|
MemoriSession,
|
|
17
17
|
User,
|
|
18
|
+
ExpertReference,
|
|
18
19
|
} from '@memori.ai/memori-api-client/src/types';
|
|
19
20
|
import {
|
|
20
21
|
SpeakerAudioDestination,
|
|
@@ -411,6 +412,7 @@ const MemoriWidget = ({
|
|
|
411
412
|
postTagChangedEvent,
|
|
412
413
|
getSession,
|
|
413
414
|
getContentQualityIndexes,
|
|
415
|
+
getExpertReferences,
|
|
414
416
|
} = client;
|
|
415
417
|
|
|
416
418
|
const [instruct, setInstruct] = useState(false);
|
|
@@ -635,6 +637,7 @@ const MemoriWidget = ({
|
|
|
635
637
|
if (emission) {
|
|
636
638
|
pushMessage({
|
|
637
639
|
text: emission,
|
|
640
|
+
emitter: currentState.emitter,
|
|
638
641
|
media: currentState.media,
|
|
639
642
|
fromUser: false,
|
|
640
643
|
});
|
|
@@ -663,6 +666,7 @@ const MemoriWidget = ({
|
|
|
663
666
|
if (emission) {
|
|
664
667
|
pushMessage({
|
|
665
668
|
text: emission,
|
|
669
|
+
emitter: currentState.emitter,
|
|
666
670
|
media: currentState.media,
|
|
667
671
|
fromUser: false,
|
|
668
672
|
});
|
|
@@ -698,6 +702,7 @@ const MemoriWidget = ({
|
|
|
698
702
|
if (emission) {
|
|
699
703
|
pushMessage({
|
|
700
704
|
text: emission,
|
|
705
|
+
emitter: currentState.emitter,
|
|
701
706
|
media: currentState.media,
|
|
702
707
|
fromUser: false,
|
|
703
708
|
generatedByAI: !!currentState.completion,
|
|
@@ -757,6 +762,7 @@ const MemoriWidget = ({
|
|
|
757
762
|
if (emission) {
|
|
758
763
|
translatedMsg = {
|
|
759
764
|
text: emission,
|
|
765
|
+
emitter: state.emitter,
|
|
760
766
|
media: state.media,
|
|
761
767
|
fromUser: false,
|
|
762
768
|
};
|
|
@@ -796,6 +802,7 @@ const MemoriWidget = ({
|
|
|
796
802
|
if (t.text.length > 0)
|
|
797
803
|
translatedMsg = {
|
|
798
804
|
text: t.text,
|
|
805
|
+
emitter: state.emitter,
|
|
799
806
|
media: state.media,
|
|
800
807
|
fromUser: false,
|
|
801
808
|
generatedByAI: !!state.completion,
|
|
@@ -1025,6 +1032,7 @@ const MemoriWidget = ({
|
|
|
1025
1032
|
? setHistory([
|
|
1026
1033
|
{
|
|
1027
1034
|
text: currentState.emission,
|
|
1035
|
+
emitter: currentState.emitter,
|
|
1028
1036
|
media: currentState.media,
|
|
1029
1037
|
fromUser: false,
|
|
1030
1038
|
initial: true,
|
|
@@ -1032,6 +1040,7 @@ const MemoriWidget = ({
|
|
|
1032
1040
|
])
|
|
1033
1041
|
: pushMessage({
|
|
1034
1042
|
text: currentState.emission,
|
|
1043
|
+
emitter: currentState.emitter,
|
|
1035
1044
|
media: currentState.media,
|
|
1036
1045
|
fromUser: false,
|
|
1037
1046
|
initial: true,
|
|
@@ -1246,6 +1255,7 @@ const MemoriWidget = ({
|
|
|
1246
1255
|
} else if (emission && emission.length > 0) {
|
|
1247
1256
|
pushMessage({
|
|
1248
1257
|
text: emission,
|
|
1258
|
+
emitter: currentState.emitter,
|
|
1249
1259
|
media: currentState.media,
|
|
1250
1260
|
fromUser: false,
|
|
1251
1261
|
generatedByAI: !!currentState.completion,
|
|
@@ -2141,6 +2151,7 @@ const MemoriWidget = ({
|
|
|
2141
2151
|
if (currentState.emission) {
|
|
2142
2152
|
pushMessage({
|
|
2143
2153
|
text: currentState.emission,
|
|
2154
|
+
emitter: currentState.emitter,
|
|
2144
2155
|
media: currentState.media,
|
|
2145
2156
|
fromUser: false,
|
|
2146
2157
|
});
|
|
@@ -2154,6 +2165,7 @@ const MemoriWidget = ({
|
|
|
2154
2165
|
if (currentState.emission) {
|
|
2155
2166
|
pushMessage({
|
|
2156
2167
|
text: currentState.emission,
|
|
2168
|
+
emitter: currentState.emitter,
|
|
2157
2169
|
media: currentState.media,
|
|
2158
2170
|
fromUser: false,
|
|
2159
2171
|
});
|
|
@@ -2548,6 +2560,29 @@ const MemoriWidget = ({
|
|
|
2548
2560
|
};
|
|
2549
2561
|
}, []);
|
|
2550
2562
|
|
|
2563
|
+
/**
|
|
2564
|
+
* Experts references
|
|
2565
|
+
*/
|
|
2566
|
+
const [experts, setExperts] = useState<ExpertReference[]>();
|
|
2567
|
+
const fetchExperts = useCallback(async () => {
|
|
2568
|
+
if (!sessionId || !memori?.enableBoardOfExperts) return;
|
|
2569
|
+
|
|
2570
|
+
try {
|
|
2571
|
+
const { experts, count, ...resp } = await getExpertReferences(sessionId);
|
|
2572
|
+
|
|
2573
|
+
if (resp.resultCode === 0) {
|
|
2574
|
+
setExperts(experts);
|
|
2575
|
+
} else {
|
|
2576
|
+
console.warn('Error fetching experts', resp);
|
|
2577
|
+
}
|
|
2578
|
+
} catch (err) {
|
|
2579
|
+
console.warn(err);
|
|
2580
|
+
}
|
|
2581
|
+
}, [sessionId, memori?.enableBoardOfExperts]);
|
|
2582
|
+
useEffect(() => {
|
|
2583
|
+
fetchExperts();
|
|
2584
|
+
}, [sessionId, fetchExperts]);
|
|
2585
|
+
|
|
2551
2586
|
const showFullHistory =
|
|
2552
2587
|
showOnlyLastMessages === undefined
|
|
2553
2588
|
? layout !== 'TOTEM' && layout !== 'WEBSITE_ASSISTANT'
|
|
@@ -2676,6 +2711,7 @@ const MemoriWidget = ({
|
|
|
2676
2711
|
customMediaRenderer,
|
|
2677
2712
|
user,
|
|
2678
2713
|
userAvatar,
|
|
2714
|
+
experts,
|
|
2679
2715
|
};
|
|
2680
2716
|
|
|
2681
2717
|
const integrationBackground =
|
|
@@ -2905,6 +2941,7 @@ const MemoriWidget = ({
|
|
|
2905
2941
|
if (currentState.emission) {
|
|
2906
2942
|
pushMessage({
|
|
2907
2943
|
text: currentState.emission,
|
|
2944
|
+
emitter: currentState.emitter,
|
|
2908
2945
|
media: currentState.media,
|
|
2909
2946
|
fromUser: false,
|
|
2910
2947
|
});
|
|
@@ -2962,6 +2999,7 @@ const MemoriWidget = ({
|
|
|
2962
2999
|
if (currentState.emission) {
|
|
2963
3000
|
pushMessage({
|
|
2964
3001
|
text: currentState.emission,
|
|
3002
|
+
emitter: currentState.emitter,
|
|
2965
3003
|
media: currentState.media,
|
|
2966
3004
|
fromUser: false,
|
|
2967
3005
|
});
|
|
@@ -133,6 +133,7 @@
|
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
.memori--completions-enabled,
|
|
136
|
+
.memori--board-of-experts,
|
|
136
137
|
.memori--nsfw {
|
|
137
138
|
position: absolute;
|
|
138
139
|
right: 2.5rem;
|
|
@@ -161,4 +162,15 @@
|
|
|
161
162
|
|
|
162
163
|
.memori--completions-enabled+.memori--nsfw {
|
|
163
164
|
right: 4.75rem;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.memori--board-of-experts {
|
|
168
|
+
right: 0.25rem;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.memori--board-of-experts svg {
|
|
172
|
+
overflow: visible;
|
|
173
|
+
width: 1rem;
|
|
174
|
+
height: 1rem;
|
|
175
|
+
fill: #000;
|
|
164
176
|
}
|
|
@@ -187,6 +187,29 @@ WithAllTheBadges.args = {
|
|
|
187
187
|
onClickStart: () => {},
|
|
188
188
|
};
|
|
189
189
|
|
|
190
|
+
export const BoardOfExpert = Template.bind({});
|
|
191
|
+
BoardOfExpert.args = {
|
|
192
|
+
memori: {
|
|
193
|
+
...memori,
|
|
194
|
+
enableBoardOfExperts: true,
|
|
195
|
+
enableCompletions: true,
|
|
196
|
+
},
|
|
197
|
+
gamificationLevel: {
|
|
198
|
+
points: 61,
|
|
199
|
+
pointsForCurrentBadge: 60,
|
|
200
|
+
badge: '🌍',
|
|
201
|
+
},
|
|
202
|
+
tenant,
|
|
203
|
+
language: 'it',
|
|
204
|
+
userLang: 'en',
|
|
205
|
+
setUserLang: () => {},
|
|
206
|
+
openPositionDrawer: () => {},
|
|
207
|
+
instruct: false,
|
|
208
|
+
sessionId: sessionID,
|
|
209
|
+
clickedStart: false,
|
|
210
|
+
onClickStart: () => {},
|
|
211
|
+
};
|
|
212
|
+
|
|
190
213
|
export const Instruct = Template.bind({});
|
|
191
214
|
Instruct.args = {
|
|
192
215
|
memori,
|
|
@@ -65,6 +65,27 @@ it('renders StartPanel with completions enabled unchanged', () => {
|
|
|
65
65
|
expect(container).toMatchSnapshot();
|
|
66
66
|
});
|
|
67
67
|
|
|
68
|
+
it('renders StartPanel for board of experts unchanged', () => {
|
|
69
|
+
const { container } = render(
|
|
70
|
+
<StartPanel
|
|
71
|
+
memori={{
|
|
72
|
+
...memori,
|
|
73
|
+
enableBoardOfExperts: true,
|
|
74
|
+
}}
|
|
75
|
+
tenant={tenant}
|
|
76
|
+
language="it"
|
|
77
|
+
userLang="en"
|
|
78
|
+
setUserLang={() => {}}
|
|
79
|
+
openPositionDrawer={() => {}}
|
|
80
|
+
instruct={false}
|
|
81
|
+
sessionId={sessionID}
|
|
82
|
+
clickedStart={false}
|
|
83
|
+
onClickStart={() => {}}
|
|
84
|
+
/>
|
|
85
|
+
);
|
|
86
|
+
expect(container).toMatchSnapshot();
|
|
87
|
+
});
|
|
88
|
+
|
|
68
89
|
it('renders StartPanel on instruct unchanged', () => {
|
|
69
90
|
const { container } = render(
|
|
70
91
|
<StartPanel
|
|
@@ -14,6 +14,7 @@ import Translation from '../icons/Translation';
|
|
|
14
14
|
import { chatLanguages } from '../../helpers/constants';
|
|
15
15
|
import BlockedMemoriBadge from '../BlockedMemoriBadge/BlockedMemoriBadge';
|
|
16
16
|
import AI from '../icons/AI';
|
|
17
|
+
import Group from '../icons/Group';
|
|
17
18
|
import CompletionProviderStatus from '../CompletionProviderStatus/CompletionProviderStatus';
|
|
18
19
|
|
|
19
20
|
export interface Props {
|
|
@@ -101,7 +102,7 @@ const StartPanel: React.FC<Props> = ({
|
|
|
101
102
|
})}")`,
|
|
102
103
|
}}
|
|
103
104
|
>
|
|
104
|
-
{!!gamificationLevel?.badge?.length && (
|
|
105
|
+
{!!gamificationLevel?.badge?.length && !memori.enableBoardOfExperts && (
|
|
105
106
|
<div className="memori--gamification-badge">
|
|
106
107
|
<Tooltip
|
|
107
108
|
align="left"
|
|
@@ -119,7 +120,7 @@ const StartPanel: React.FC<Props> = ({
|
|
|
119
120
|
</Tooltip>
|
|
120
121
|
</div>
|
|
121
122
|
)}
|
|
122
|
-
{!!memori.enableCompletions && (
|
|
123
|
+
{!!memori.enableCompletions && !memori.enableBoardOfExperts && (
|
|
123
124
|
<div className="memori--completions-enabled">
|
|
124
125
|
<Tooltip align="left" content={t('completionsEnabled')}>
|
|
125
126
|
<span aria-label={t('completionsEnabled') || 'Completions'}>
|
|
@@ -128,6 +129,15 @@ const StartPanel: React.FC<Props> = ({
|
|
|
128
129
|
</Tooltip>
|
|
129
130
|
</div>
|
|
130
131
|
)}
|
|
132
|
+
{!!memori.enableBoardOfExperts && (
|
|
133
|
+
<div className="memori--board-of-experts">
|
|
134
|
+
<Tooltip align="left" content={t('boardOfExperts')}>
|
|
135
|
+
<span aria-label={t('boardOfExperts') || 'Board of Experts'}>
|
|
136
|
+
<Group />
|
|
137
|
+
</span>
|
|
138
|
+
</Tooltip>
|
|
139
|
+
</div>
|
|
140
|
+
)}
|
|
131
141
|
{!!memori.nsfw && (
|
|
132
142
|
<div className="memori--nsfw">
|
|
133
143
|
<Tooltip align="left" content={t('nsfw')}>
|
|
@@ -1,5 +1,94 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
+
exports[`renders StartPanel for board of experts unchanged 1`] = `
|
|
4
|
+
<div>
|
|
5
|
+
<div
|
|
6
|
+
class="memori--start-panel"
|
|
7
|
+
>
|
|
8
|
+
<div
|
|
9
|
+
class="memori--cover"
|
|
10
|
+
>
|
|
11
|
+
<div
|
|
12
|
+
class="memori--board-of-experts"
|
|
13
|
+
>
|
|
14
|
+
<div
|
|
15
|
+
class="memori-tooltip memori-tooltip--align-left"
|
|
16
|
+
>
|
|
17
|
+
<div
|
|
18
|
+
class="memori-tooltip--content"
|
|
19
|
+
>
|
|
20
|
+
boardOfExperts
|
|
21
|
+
</div>
|
|
22
|
+
<div
|
|
23
|
+
class="memori-tooltip--trigger"
|
|
24
|
+
>
|
|
25
|
+
<span
|
|
26
|
+
aria-label="boardOfExperts"
|
|
27
|
+
>
|
|
28
|
+
<svg
|
|
29
|
+
aria-hidden="true"
|
|
30
|
+
fill="none"
|
|
31
|
+
focusable="false"
|
|
32
|
+
height="16"
|
|
33
|
+
role="img"
|
|
34
|
+
stroke="currentColor"
|
|
35
|
+
stroke-linecap="round"
|
|
36
|
+
stroke-linejoin="round"
|
|
37
|
+
stroke-width="2"
|
|
38
|
+
viewBox="0 0 640 512"
|
|
39
|
+
width="20"
|
|
40
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
41
|
+
>
|
|
42
|
+
<path
|
|
43
|
+
d="M211.2 96a64 64 0 10-128 0 64 64 0 10128 0zM32 256c0 17.7 14.3 32 32 32h85.6c10.1-39.4 38.6-71.5 75.8-86.6-9.7-6-21.2-9.4-33.4-9.4H96c-35.3 0-64 28.7-64 64zm461.6 32H576c17.7 0 32-14.3 32-32 0-35.3-28.7-64-64-64h-96c-11.7 0-22.7 3.1-32.1 8.6 38.1 14.8 67.4 47.3 77.7 87.4zm-102.4-61.6c-6.9-1.6-14.2-2.4-21.6-2.4h-96c-8.5 0-16.7 1.1-24.5 3.1-30.8 8.1-55.6 31.1-66.1 60.9-3.5 10-5.5 20.8-5.5 32 0 17.7 14.3 32 32 32h224c17.7 0 32-14.3 32-32 0-11.2-1.9-22-5.5-32-10.8-30.7-36.8-54.2-68.9-61.6zM563.2 96a64 64 0 10-128 0 64 64 0 10128 0zm-241.6 96a80 80 0 100-160 80 80 0 100 160zM32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32h576c17.7 0 32-14.3 32-32s-14.3-32-32-32H32z"
|
|
44
|
+
/>
|
|
45
|
+
</svg>
|
|
46
|
+
</span>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
<picture
|
|
52
|
+
class="memori--avatar"
|
|
53
|
+
>
|
|
54
|
+
<source
|
|
55
|
+
src="https://app.twincreator.com/images/twincreator/square_logo.png"
|
|
56
|
+
/>
|
|
57
|
+
<img
|
|
58
|
+
alt="Memori"
|
|
59
|
+
src="https://app.twincreator.com/images/twincreator/square_logo.png"
|
|
60
|
+
/>
|
|
61
|
+
</picture>
|
|
62
|
+
<h2
|
|
63
|
+
class="memori--title"
|
|
64
|
+
>
|
|
65
|
+
Memori
|
|
66
|
+
</h2>
|
|
67
|
+
<div
|
|
68
|
+
class="memori--description"
|
|
69
|
+
>
|
|
70
|
+
<p>
|
|
71
|
+
<span
|
|
72
|
+
class="memori--description-text"
|
|
73
|
+
>
|
|
74
|
+
Lorem ipsum.
|
|
75
|
+
</span>
|
|
76
|
+
</p>
|
|
77
|
+
<button
|
|
78
|
+
class="memori-button memori-button--primary memori-button--rounded memori-button--padded memori--start-button"
|
|
79
|
+
>
|
|
80
|
+
write_and_speak.tryMeButton
|
|
81
|
+
</button>
|
|
82
|
+
<p
|
|
83
|
+
class="memori--start-description"
|
|
84
|
+
>
|
|
85
|
+
write_and_speak.pageTryMeExplanation
|
|
86
|
+
</p>
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
`;
|
|
91
|
+
|
|
3
92
|
exports[`renders StartPanel on instruct unchanged 1`] = `
|
|
4
93
|
<div>
|
|
5
94
|
<div
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
const Group = ({
|
|
4
|
+
className,
|
|
5
|
+
title,
|
|
6
|
+
}: {
|
|
7
|
+
className?: string;
|
|
8
|
+
title?: string;
|
|
9
|
+
}) => (
|
|
10
|
+
<svg
|
|
11
|
+
{...(!title ? { 'aria-hidden': 'true' } : {})}
|
|
12
|
+
focusable="false"
|
|
13
|
+
role="img"
|
|
14
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
15
|
+
fill="none"
|
|
16
|
+
stroke="currentColor"
|
|
17
|
+
strokeLinecap="round"
|
|
18
|
+
strokeLinejoin="round"
|
|
19
|
+
strokeWidth="2"
|
|
20
|
+
width="20"
|
|
21
|
+
height="16"
|
|
22
|
+
viewBox="0 0 640 512"
|
|
23
|
+
className={className}
|
|
24
|
+
aria-label={title}
|
|
25
|
+
>
|
|
26
|
+
<path d="M211.2 96a64 64 0 10-128 0 64 64 0 10128 0zM32 256c0 17.7 14.3 32 32 32h85.6c10.1-39.4 38.6-71.5 75.8-86.6-9.7-6-21.2-9.4-33.4-9.4H96c-35.3 0-64 28.7-64 64zm461.6 32H576c17.7 0 32-14.3 32-32 0-35.3-28.7-64-64-64h-96c-11.7 0-22.7 3.1-32.1 8.6 38.1 14.8 67.4 47.3 77.7 87.4zm-102.4-61.6c-6.9-1.6-14.2-2.4-21.6-2.4h-96c-8.5 0-16.7 1.1-24.5 3.1-30.8 8.1-55.6 31.1-66.1 60.9-3.5 10-5.5 20.8-5.5 32 0 17.7 14.3 32 32 32h224c17.7 0 32-14.3 32-32 0-11.2-1.9-22-5.5-32-10.8-30.7-36.8-54.2-68.9-61.6zM563.2 96a64 64 0 10-128 0 64 64 0 10128 0zm-241.6 96a80 80 0 100-160 80 80 0 100 160zM32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32h576c17.7 0 32-14.3 32-32s-14.3-32-32-32H32z"></path>
|
|
27
|
+
</svg>
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
export default Group;
|
|
@@ -12,7 +12,7 @@ describe('Media URL helper', () => {
|
|
|
12
12
|
baseURL: 'https://twin.memori.ai',
|
|
13
13
|
apiURL: 'https://backend.memori.ai/api/v2',
|
|
14
14
|
})
|
|
15
|
-
).toBe('https://twin.memori.ai/images/memoriAvatar.png');
|
|
15
|
+
).toBe('https://twin.memori.ai/images/memoriAvatar.png?v=20231208');
|
|
16
16
|
});
|
|
17
17
|
it('Get default cover URL with no url', async () => {
|
|
18
18
|
expect(
|
package/src/helpers/media.ts
CHANGED
|
@@ -16,7 +16,7 @@ export const getResourceUrl = ({
|
|
|
16
16
|
let defaultUri =
|
|
17
17
|
type === 'cover'
|
|
18
18
|
? `${baseURL}/images/memoriCover.png`
|
|
19
|
-
: `${baseURL}/images/memoriAvatar.png`;
|
|
19
|
+
: `${baseURL}/images/memoriAvatar.png?v=20231208`;
|
|
20
20
|
|
|
21
21
|
try {
|
|
22
22
|
if (!resourceURI || resourceURI.length === 0) {
|
package/src/locales/en.json
CHANGED
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"completionProviderDown": "This Twin is integrated with a generative AI from {{provider}}, but it is currently unavailable. Try again later.",
|
|
35
35
|
"completionProviderFallbackName": "an external provider",
|
|
36
36
|
"completionProviderCheckStatusPage": "Check status page",
|
|
37
|
+
"boardOfExperts": "Board of experts",
|
|
37
38
|
"birthDate": "Birth date",
|
|
38
39
|
"birthDateHelper": "We ask for your birth date only to enable or disable functionalities that have age restrictions",
|
|
39
40
|
"underage": "You must be at least {{age}} years old to sign up.",
|
package/src/locales/it.json
CHANGED
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"completionProviderDown": "Questo Twin è integrato con una IA generativa di {{provider}}, ma al momento non è disponibile. Riprova più tardi.",
|
|
35
35
|
"completionProviderFallbackName": "un provider esterno",
|
|
36
36
|
"completionProviderCheckStatusPage": "Vedi pagina di stato",
|
|
37
|
+
"boardOfExperts": "Gruppo di esperti",
|
|
37
38
|
"birthDate": "Data di nascita",
|
|
38
39
|
"birthDateHelper": "Ti chiediamo la data di nascita esclusivamente per abilitare o disabilitare le funzionalità che hanno restrizioni in base all'età",
|
|
39
40
|
"underage": "Devi avere almeno {{age}} anni per registrarti.",
|