@memori.ai/memori-react 2.22.0 → 3.0.0-rc.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/dist/I18nWrapper.d.ts +6 -0
- package/dist/I18nWrapper.js +9 -0
- package/dist/I18nWrapper.js.map +1 -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/ChatTextArea/ChatTextArea.js +3 -1
- package/dist/components/ChatTextArea/ChatTextArea.js.map +1 -1
- package/dist/components/ImageUpload/ImageUpload.js +3 -1
- package/dist/components/ImageUpload/ImageUpload.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/i18n.d.ts +1 -1
- package/dist/i18n.js +4 -4
- package/dist/i18n.js.map +1 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/locales/en.json +2 -0
- package/dist/locales/it.json +2 -0
- package/esm/I18nWrapper.d.ts +6 -0
- package/esm/I18nWrapper.js +6 -0
- package/esm/I18nWrapper.js.map +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/ChatTextArea/ChatTextArea.js +3 -1
- package/esm/components/ChatTextArea/ChatTextArea.js.map +1 -1
- package/esm/components/ImageUpload/ImageUpload.js +3 -1
- package/esm/components/ImageUpload/ImageUpload.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/i18n.d.ts +1 -1
- package/esm/i18n.js +3 -3
- package/esm/i18n.js.map +1 -1
- package/esm/index.js +8 -3
- package/esm/index.js.map +1 -1
- package/esm/locales/en.json +2 -0
- package/esm/locales/it.json +2 -0
- package/package.json +2 -2
- package/src/I18nWrapper.tsx +13 -0
- package/src/components/AgeVerificationModal/AgeVerificationModal.stories.tsx +6 -1
- package/src/components/AttachmentLinkModal/AttachmentLinkModal.stories.tsx +6 -1
- package/src/components/AttachmentMediaModal/AttachmentMediaModal.stories.tsx +6 -1
- package/src/components/Auth/Auth.stories.tsx +16 -11
- package/src/components/Avatar/Avatar.stories.tsx +28 -25
- package/src/components/AvatarView/AvatarView.stories.tsx +8 -5
- package/src/components/Blob/Blob.stories.tsx +6 -3
- package/src/components/BlockedMemoriBadge/BlockedMemoriBadge.stories.tsx +6 -1
- package/src/components/ChangeMode/ChangeMode.stories.tsx +9 -6
- package/src/components/Chat/Chat.stories.tsx +8 -5
- package/src/components/Chat/Chat.tsx +4 -0
- package/src/components/Chat/__snapshots__/Chat.test.tsx.snap +55 -0
- package/src/components/ChatBubble/ChatBubble.stories.tsx +34 -2
- 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/ChatInputs/ChatInputs.stories.tsx +13 -10
- package/src/components/ChatInputs/__snapshots__/ChatInputs.test.tsx.snap +6 -0
- package/src/components/ChatTextArea/ChatTextArea.stories.tsx +6 -3
- package/src/components/ChatTextArea/ChatTextArea.tsx +5 -0
- package/src/components/ChatTextArea/__snapshots__/ChatTextArea.test.tsx.snap +3 -0
- package/src/components/CompletionProviderStatus/CompletionProviderStatus.stories.tsx +6 -1
- package/src/components/DateSelector/DateSelector.stories.tsx +6 -2
- package/src/components/ExportHistoryButton/ExportHistoryButton.stories.tsx +11 -6
- package/src/components/FeedbackButtons/FeedbackButtons.stories.tsx +6 -2
- package/src/components/Header/Header.stories.tsx +4 -3
- package/src/components/ImageUpload/ImageUpload.stories.tsx +6 -2
- package/src/components/ImageUpload/ImageUpload.tsx +5 -2
- package/src/components/MediaWidget/LinkItemWidget.stories.tsx +6 -1
- package/src/components/MediaWidget/MediaItemWidget.stories.tsx +6 -1
- package/src/components/MediaWidget/MediaWidget.stories.tsx +6 -1
- package/src/components/MemoriWidget/MemoriWidget.stories.tsx +6 -2
- package/src/components/MemoriWidget/MemoriWidget.tsx +38 -0
- package/src/components/MicrophoneButton/MicrophoneButton.stories.tsx +11 -8
- package/src/components/SendOnEnterMenu/SendOnEnterMenu.stories.tsx +17 -13
- package/src/components/SettingsDrawer/SettingsDrawer.stories.tsx +11 -7
- package/src/components/ShareButton/ShareButton.stories.tsx +11 -4
- package/src/components/Snippet/Snippet.stories.tsx +12 -9
- package/src/components/StartPanel/StartPanel.css +12 -0
- package/src/components/StartPanel/StartPanel.stories.tsx +32 -6
- 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/Typing/Typing.stories.tsx +6 -2
- package/src/components/UploadMenu/UploadMenu.stories.tsx +16 -13
- 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/i18n.ts +4 -3
- package/src/index.tsx +12 -4
- package/src/locales/en.json +2 -0
- package/src/locales/it.json +2 -0
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;AAMnC,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAC3D,OAAO,YAEN,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;
|
|
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,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AY,EAAE,SAAS,CAAC,IAAI;IAC5B,SAAS,EAAE,SAAS,CAAC,MAAM;IAC3B,gCAAgC,EAAE,SAAS,CAAC,MAAM;IAClD,aAAa,EAAE,SAAS,CAAC,IAAI;IAC7B,cAAc,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC;IACjD,mBAAmB,EAAE,SAAS,CAAC,IAAI;IACnC,kBAAkB,EAAE,SAAS,CAAC,GAAG;IACjC,UAAU,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC;CACnE,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
package/esm/locales/en.json
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"delete": "Delete",
|
|
13
13
|
"loading": "Loading",
|
|
14
14
|
"expand": "Expand",
|
|
15
|
+
"collapse": "Collapse",
|
|
15
16
|
"fullscreenEnter": "Enter fullscreen",
|
|
16
17
|
"fullscreenExit": "Exit fullscreen",
|
|
17
18
|
"center": "Center",
|
|
@@ -34,6 +35,7 @@
|
|
|
34
35
|
"completionProviderDown": "This Twin is integrated with a generative AI from {{provider}}, but it is currently unavailable. Try again later.",
|
|
35
36
|
"completionProviderFallbackName": "an external provider",
|
|
36
37
|
"completionProviderCheckStatusPage": "Check status page",
|
|
38
|
+
"boardOfExperts": "Board of experts",
|
|
37
39
|
"birthDate": "Birth date",
|
|
38
40
|
"birthDateHelper": "We ask for your birth date only to enable or disable functionalities that have age restrictions",
|
|
39
41
|
"underage": "You must be at least {{age}} years old to sign up.",
|
package/esm/locales/it.json
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"delete": "Elimina",
|
|
13
13
|
"loading": "Caricamento",
|
|
14
14
|
"expand": "Espandi",
|
|
15
|
+
"collapse": "Riduci",
|
|
15
16
|
"fullscreenEnter": "Passa a schermo intero",
|
|
16
17
|
"fullscreenExit": "Esci da schermo intero",
|
|
17
18
|
"center": "Centro",
|
|
@@ -34,6 +35,7 @@
|
|
|
34
35
|
"completionProviderDown": "Questo Twin è integrato con una IA generativa di {{provider}}, ma al momento non è disponibile. Riprova più tardi.",
|
|
35
36
|
"completionProviderFallbackName": "un provider esterno",
|
|
36
37
|
"completionProviderCheckStatusPage": "Vedi pagina di stato",
|
|
38
|
+
"boardOfExperts": "Gruppo di esperti",
|
|
37
39
|
"birthDate": "Data di nascita",
|
|
38
40
|
"birthDateHelper": "Ti chiediamo la data di nascita esclusivamente per abilitare o disabilitare le funzionalità che hanno restrizioni in base all'età",
|
|
39
41
|
"underage": "Devi avere almeno {{age}} anni per registrarti.",
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "
|
|
2
|
+
"version": "3.0.0-rc.0",
|
|
3
3
|
"name": "@memori.ai/memori-react",
|
|
4
4
|
"author": "Memori Srl",
|
|
5
5
|
"main": "dist/index.js",
|
|
@@ -283,7 +283,7 @@
|
|
|
283
283
|
"dependencies": {
|
|
284
284
|
"@fontsource/exo-2": "^4.5.10",
|
|
285
285
|
"@headlessui/react": "1.7.4",
|
|
286
|
-
"@memori.ai/memori-api-client": "^2.
|
|
286
|
+
"@memori.ai/memori-api-client": "^2.6.1",
|
|
287
287
|
"@react-three/drei": "8.20.2",
|
|
288
288
|
"@react-three/fiber": "7.0.25",
|
|
289
289
|
"antd": "4.18.9",
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { I18nextProvider } from 'react-i18next';
|
|
3
|
+
import i18n from './i18n';
|
|
4
|
+
|
|
5
|
+
export interface Props {
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const I18nWrapper = ({ children }: Props) => (
|
|
10
|
+
<I18nextProvider i18n={i18n}>{children}</I18nextProvider>
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
export default I18nWrapper;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Meta, Story } from '@storybook/react';
|
|
3
|
+
import I18nWrapper from '../../I18nWrapper';
|
|
3
4
|
import AgeVerificationModal, { Props } from './AgeVerificationModal';
|
|
4
5
|
|
|
5
6
|
import './AgeVerificationModal.css';
|
|
@@ -15,7 +16,11 @@ const meta: Meta = {
|
|
|
15
16
|
|
|
16
17
|
export default meta;
|
|
17
18
|
|
|
18
|
-
const Template: Story<Props> = args =>
|
|
19
|
+
const Template: Story<Props> = args => (
|
|
20
|
+
<I18nWrapper>
|
|
21
|
+
<AgeVerificationModal {...args} />
|
|
22
|
+
</I18nWrapper>
|
|
23
|
+
);
|
|
19
24
|
|
|
20
25
|
// By passing using the Args format for exported stories, you can control the props for a component for reuse in a test
|
|
21
26
|
// https://storybook.js.org/docs/react/workflows/unit-testing
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Meta, Story } from '@storybook/react';
|
|
3
|
+
import I18nWrapper from '../../I18nWrapper';
|
|
3
4
|
import AttachmentLinkModal, { Props } from './AttachmentLinkModal';
|
|
4
5
|
|
|
5
6
|
import './AttachmentLinkModal.css';
|
|
@@ -15,7 +16,11 @@ const meta: Meta = {
|
|
|
15
16
|
|
|
16
17
|
export default meta;
|
|
17
18
|
|
|
18
|
-
const Template: Story<Props> = args =>
|
|
19
|
+
const Template: Story<Props> = args => (
|
|
20
|
+
<I18nWrapper>
|
|
21
|
+
<AttachmentLinkModal {...args} />
|
|
22
|
+
</I18nWrapper>
|
|
23
|
+
);
|
|
19
24
|
|
|
20
25
|
// By passing using the Args format for exported stories, you can control the props for a component for reuse in a test
|
|
21
26
|
// https://storybook.js.org/docs/react/workflows/unit-testing
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { Meta, Story } from '@storybook/react';
|
|
3
3
|
import AttachmentMediaModal, { Props } from './AttachmentMediaModal';
|
|
4
4
|
import memoriAPIClient from '@memori.ai/memori-api-client';
|
|
5
|
+
import I18nWrapper from '../../I18nWrapper';
|
|
5
6
|
import { Asset } from '@memori.ai/memori-api-client/dist/types';
|
|
6
7
|
|
|
7
8
|
const client = memoriAPIClient();
|
|
@@ -17,7 +18,11 @@ const meta: Meta = {
|
|
|
17
18
|
|
|
18
19
|
export default meta;
|
|
19
20
|
|
|
20
|
-
const Template: Story<Props> = args =>
|
|
21
|
+
const Template: Story<Props> = args => (
|
|
22
|
+
<I18nWrapper>
|
|
23
|
+
<AttachmentMediaModal {...args} />
|
|
24
|
+
</I18nWrapper>
|
|
25
|
+
);
|
|
21
26
|
|
|
22
27
|
// By passing using the Args format for exported stories, you can control the props for a component for reuse in a test
|
|
23
28
|
// https://storybook.js.org/docs/react/workflows/unit-testing
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
2
|
import { Meta, Story } from '@storybook/react';
|
|
3
|
+
import I18nWrapper from '../../I18nWrapper';
|
|
3
4
|
import AuthWidget, { Props } from './Auth';
|
|
4
5
|
|
|
5
6
|
import './Auth.css';
|
|
@@ -33,11 +34,13 @@ const Template: Story<Props> = args => {
|
|
|
33
34
|
);
|
|
34
35
|
|
|
35
36
|
return (
|
|
36
|
-
<
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
<I18nWrapper>
|
|
38
|
+
<AuthWidget
|
|
39
|
+
{...args}
|
|
40
|
+
pwdOrTokens={pwdOrTokens}
|
|
41
|
+
setPwdOrTokens={setPwdOrTokens}
|
|
42
|
+
/>
|
|
43
|
+
</I18nWrapper>
|
|
41
44
|
);
|
|
42
45
|
};
|
|
43
46
|
|
|
@@ -47,12 +50,14 @@ const TemplateWithModal: Story<Props> = args => {
|
|
|
47
50
|
);
|
|
48
51
|
|
|
49
52
|
return (
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
<I18nWrapper>
|
|
54
|
+
<AuthWidget
|
|
55
|
+
{...args}
|
|
56
|
+
withModal
|
|
57
|
+
pwdOrTokens={pwdOrTokens}
|
|
58
|
+
setPwdOrTokens={setPwdOrTokens}
|
|
59
|
+
/>
|
|
60
|
+
</I18nWrapper>
|
|
56
61
|
);
|
|
57
62
|
};
|
|
58
63
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Meta, Story } from '@storybook/react';
|
|
3
3
|
import { memori, tenant, integration } from '../../mocks/data';
|
|
4
|
+
import I18nWrapper from '../../I18nWrapper';
|
|
4
5
|
import Avatar, { Props } from './Avatar';
|
|
5
6
|
|
|
6
7
|
import './Avatar.css';
|
|
@@ -30,32 +31,34 @@ const Template: Story<Props> = args => {
|
|
|
30
31
|
);
|
|
31
32
|
|
|
32
33
|
return (
|
|
33
|
-
<
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
>
|
|
42
|
-
<Avatar
|
|
43
|
-
{...args}
|
|
44
|
-
integrationConfig={
|
|
45
|
-
args.integrationConfig
|
|
46
|
-
? {
|
|
47
|
-
...args.integrationConfig,
|
|
48
|
-
avatarURL:
|
|
49
|
-
args.integrationConfig.avatarURL?.split('#')?.[0] +
|
|
50
|
-
`#${new Date(Date.now()).toISOString()}`,
|
|
51
|
-
}
|
|
52
|
-
: undefined
|
|
34
|
+
<I18nWrapper>
|
|
35
|
+
<div
|
|
36
|
+
style={
|
|
37
|
+
args.integrationConfig?.avatar === 'customglb' ||
|
|
38
|
+
args.integrationConfig?.avatar === 'readyplayerme' ||
|
|
39
|
+
args.integrationConfig?.avatar === 'readyplayerme-full'
|
|
40
|
+
? {}
|
|
41
|
+
: { marginTop: '20vw' }
|
|
53
42
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
43
|
+
>
|
|
44
|
+
<Avatar
|
|
45
|
+
{...args}
|
|
46
|
+
integrationConfig={
|
|
47
|
+
args.integrationConfig
|
|
48
|
+
? {
|
|
49
|
+
...args.integrationConfig,
|
|
50
|
+
avatarURL:
|
|
51
|
+
args.integrationConfig.avatarURL?.split('#')?.[0] +
|
|
52
|
+
`#${new Date(Date.now()).toISOString()}`,
|
|
53
|
+
}
|
|
54
|
+
: undefined
|
|
55
|
+
}
|
|
56
|
+
avatar3dVisible={avatar3dVisible}
|
|
57
|
+
setAvatar3dVisible={setAvatar3dVisible}
|
|
58
|
+
key={Date.now()}
|
|
59
|
+
/>
|
|
60
|
+
</div>
|
|
61
|
+
</I18nWrapper>
|
|
59
62
|
);
|
|
60
63
|
};
|
|
61
64
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Meta, Story } from '@storybook/react';
|
|
3
|
+
import I18nWrapper from '../../I18nWrapper';
|
|
3
4
|
import AvatarView, { Props } from './index';
|
|
4
5
|
|
|
5
6
|
const meta: Meta = {
|
|
@@ -67,11 +68,13 @@ const Template: Story<Props> = args => {
|
|
|
67
68
|
}, []);
|
|
68
69
|
|
|
69
70
|
return hydrated ? (
|
|
70
|
-
<
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
71
|
+
<I18nWrapper>
|
|
72
|
+
<AvatarView
|
|
73
|
+
{...args}
|
|
74
|
+
url={args.url + `#${new Date(Date.now()).toISOString()}`}
|
|
75
|
+
key={Date.now()}
|
|
76
|
+
/>
|
|
77
|
+
</I18nWrapper>
|
|
75
78
|
) : (
|
|
76
79
|
<></>
|
|
77
80
|
);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Meta, Story } from '@storybook/react';
|
|
3
|
+
import I18nWrapper from '../../I18nWrapper';
|
|
3
4
|
import Blob, { Props } from './Blob';
|
|
4
5
|
import './Blob.css';
|
|
5
6
|
|
|
@@ -26,9 +27,11 @@ const meta: Meta = {
|
|
|
26
27
|
export default meta;
|
|
27
28
|
|
|
28
29
|
const Template: Story<Props> = args => (
|
|
29
|
-
<
|
|
30
|
-
<
|
|
31
|
-
|
|
30
|
+
<I18nWrapper>
|
|
31
|
+
<div style={{ marginTop: '20vw' }}>
|
|
32
|
+
<Blob {...args} />
|
|
33
|
+
</div>
|
|
34
|
+
</I18nWrapper>
|
|
32
35
|
);
|
|
33
36
|
|
|
34
37
|
// By passing using the Args format for exported stories, you can control the props for a component for reuse in a test
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Meta, Story } from '@storybook/react';
|
|
3
|
+
import I18nWrapper from '../../I18nWrapper';
|
|
3
4
|
import BlockedMemoriBadge, { Props } from './BlockedMemoriBadge';
|
|
4
5
|
|
|
5
6
|
import './BlockedMemoriBadge.css';
|
|
@@ -15,7 +16,11 @@ const meta: Meta = {
|
|
|
15
16
|
|
|
16
17
|
export default meta;
|
|
17
18
|
|
|
18
|
-
const Template: Story<Props> = args =>
|
|
19
|
+
const Template: Story<Props> = args => (
|
|
20
|
+
<I18nWrapper>
|
|
21
|
+
<BlockedMemoriBadge {...args} />
|
|
22
|
+
</I18nWrapper>
|
|
23
|
+
);
|
|
19
24
|
|
|
20
25
|
// By passing using the Args format for exported stories, you can control the props for a component for reuse in a test
|
|
21
26
|
// https://storybook.js.org/docs/react/workflows/unit-testing
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Meta, Story } from '@storybook/react';
|
|
3
|
+
import I18nWrapper from '../../I18nWrapper';
|
|
3
4
|
import ChangeMode, { Props } from './ChangeMode';
|
|
4
5
|
|
|
5
6
|
import './ChangeMode.css';
|
|
@@ -25,12 +26,14 @@ const Template: Story<Props> = args => {
|
|
|
25
26
|
const [instruct, setInstruct] = React.useState(args.instruct);
|
|
26
27
|
|
|
27
28
|
return (
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
<I18nWrapper>
|
|
30
|
+
<ChangeMode
|
|
31
|
+
{...args}
|
|
32
|
+
canInstruct
|
|
33
|
+
instruct={instruct}
|
|
34
|
+
onChangeMode={mode => setInstruct(mode === 'instruct')}
|
|
35
|
+
/>
|
|
36
|
+
</I18nWrapper>
|
|
34
37
|
);
|
|
35
38
|
};
|
|
36
39
|
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
sessionID,
|
|
10
10
|
dialogState as dialogStateWithHints,
|
|
11
11
|
} from '../../mocks/data';
|
|
12
|
+
import I18nWrapper from '../../I18nWrapper';
|
|
12
13
|
import Chat, { Props } from './Chat';
|
|
13
14
|
|
|
14
15
|
import './Chat.css';
|
|
@@ -33,11 +34,13 @@ const Template: Story<Props> = args => {
|
|
|
33
34
|
const [userMessage, setUserMessage] = useState(args.userMessage);
|
|
34
35
|
|
|
35
36
|
return (
|
|
36
|
-
<
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
<I18nWrapper>
|
|
38
|
+
<Chat
|
|
39
|
+
{...args}
|
|
40
|
+
userMessage={userMessage}
|
|
41
|
+
onChangeUserMessage={setUserMessage}
|
|
42
|
+
/>
|
|
43
|
+
</I18nWrapper>
|
|
41
44
|
);
|
|
42
45
|
};
|
|
43
46
|
|
|
@@ -2,6 +2,7 @@ import React, { useEffect, memo } from 'react';
|
|
|
2
2
|
import cx from 'classnames';
|
|
3
3
|
import {
|
|
4
4
|
DialogState,
|
|
5
|
+
ExpertReference,
|
|
5
6
|
Memori,
|
|
6
7
|
Message,
|
|
7
8
|
Tenant,
|
|
@@ -62,6 +63,7 @@ export interface Props {
|
|
|
62
63
|
layout: MemoriProps['layout'];
|
|
63
64
|
userAvatar?: MemoriProps['userAvatar'];
|
|
64
65
|
user?: User;
|
|
66
|
+
experts?: ExpertReference[];
|
|
65
67
|
}
|
|
66
68
|
|
|
67
69
|
const Chat: React.FC<Props> = ({
|
|
@@ -103,6 +105,7 @@ const Chat: React.FC<Props> = ({
|
|
|
103
105
|
customMediaRenderer,
|
|
104
106
|
user,
|
|
105
107
|
userAvatar,
|
|
108
|
+
experts,
|
|
106
109
|
}) => {
|
|
107
110
|
const scrollToBottom = () => {
|
|
108
111
|
setTimeout(() => {
|
|
@@ -207,6 +210,7 @@ const Chat: React.FC<Props> = ({
|
|
|
207
210
|
}
|
|
208
211
|
user={user}
|
|
209
212
|
userAvatar={userAvatar}
|
|
213
|
+
experts={experts}
|
|
210
214
|
/>
|
|
211
215
|
{showDates && !!message.timestamp && (
|
|
212
216
|
<small
|