@memori.ai/memori-react 8.11.0 → 8.12.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 +50 -0
- package/dist/components/AgeVerificationModal/AgeVerificationModal.css +41 -14
- package/dist/components/AgeVerificationModal/AgeVerificationModal.js +2 -2
- package/dist/components/AgeVerificationModal/AgeVerificationModal.js.map +1 -1
- package/dist/components/Auth/Auth.js +36 -8
- package/dist/components/Auth/Auth.js.map +1 -1
- package/dist/components/Avatar/AvatarView/AvatarComponent/positionControls/positionControls.css +2 -2
- package/dist/components/Chat/Chat.js +2 -2
- package/dist/components/Chat/Chat.js.map +1 -1
- package/dist/components/ChatBubble/ChatBubble.css +81 -13
- package/dist/components/ChatBubble/ChatBubble.js +86 -19
- package/dist/components/ChatBubble/ChatBubble.js.map +1 -1
- package/dist/components/ChatHistoryDrawer/ChatHistory.css +5 -1
- package/dist/components/ChatInputs/ChatInputs.d.ts +1 -0
- package/dist/components/ChatInputs/ChatInputs.js +8 -3
- package/dist/components/ChatInputs/ChatInputs.js.map +1 -1
- package/dist/components/DateSelector/DateSelector.css +125 -104
- package/dist/components/DateSelector/DateSelector.d.ts +1 -1
- package/dist/components/DateSelector/DateSelector.js +110 -52
- package/dist/components/DateSelector/DateSelector.js.map +1 -1
- package/dist/components/Header/Header.js +1 -1
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/LoginDrawer/LoginDrawer.css +37 -5
- package/dist/components/LoginDrawer/LoginDrawer.d.ts +1 -2
- package/dist/components/LoginDrawer/LoginDrawer.js +2 -9
- package/dist/components/LoginDrawer/LoginDrawer.js.map +1 -1
- package/dist/components/MediaWidget/MediaWidget.css +4 -0
- package/dist/components/MemoriArtifactSystem/components/ArtifactActions/ArtifactActions.js +1 -1
- package/dist/components/MemoriArtifactSystem/components/ArtifactActions/ArtifactActions.js.map +1 -1
- package/dist/components/MemoriArtifactSystem/components/ArtifactActions/components/CopyButtonWithDropdown.js +1 -1
- package/dist/components/MemoriArtifactSystem/components/ArtifactActions/components/CopyButtonWithDropdown.js.map +1 -1
- package/dist/components/MemoriArtifactSystem/components/ArtifactActions/components/CopyMenuItem.js +3 -0
- package/dist/components/MemoriArtifactSystem/components/ArtifactActions/components/CopyMenuItem.js.map +1 -1
- package/dist/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.js +2 -2
- package/dist/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.js.map +1 -1
- package/dist/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.css +16 -7
- package/dist/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.js +6 -4
- package/dist/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.js.map +1 -1
- package/dist/components/MemoriWidget/MemoriWidget.js +69 -25
- package/dist/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/dist/components/UploadButton/UploadButton.js +2 -0
- package/dist/components/UploadButton/UploadButton.js.map +1 -1
- package/dist/components/UploadButton/UploadImages/UploadImages.js +2 -2
- package/dist/components/UploadButton/UploadImages/UploadImages.js.map +1 -1
- package/dist/components/ui/Drawer.css +8 -0
- package/dist/components/ui/Drawer.d.ts +2 -0
- package/dist/components/ui/Drawer.js +2 -2
- package/dist/components/ui/Drawer.js.map +1 -1
- package/dist/components/ui/Tooltip.css +49 -1
- package/dist/components/ui/Tooltip.d.ts +1 -1
- package/dist/locales/de.json +6 -1
- package/dist/locales/en.json +9 -1
- package/dist/locales/es.json +6 -1
- package/dist/locales/fr.json +5 -1
- package/dist/locales/it.json +8 -1
- package/dist/styles.css +3 -2
- package/esm/components/AgeVerificationModal/AgeVerificationModal.css +41 -14
- package/esm/components/AgeVerificationModal/AgeVerificationModal.js +2 -2
- package/esm/components/AgeVerificationModal/AgeVerificationModal.js.map +1 -1
- package/esm/components/Auth/Auth.js +36 -8
- package/esm/components/Auth/Auth.js.map +1 -1
- package/esm/components/Avatar/AvatarView/AvatarComponent/positionControls/positionControls.css +2 -2
- package/esm/components/Chat/Chat.js +2 -2
- package/esm/components/Chat/Chat.js.map +1 -1
- package/esm/components/ChatBubble/ChatBubble.css +81 -13
- package/esm/components/ChatBubble/ChatBubble.js +87 -20
- package/esm/components/ChatBubble/ChatBubble.js.map +1 -1
- package/esm/components/ChatHistoryDrawer/ChatHistory.css +5 -1
- package/esm/components/ChatInputs/ChatInputs.d.ts +1 -0
- package/esm/components/ChatInputs/ChatInputs.js +8 -3
- package/esm/components/ChatInputs/ChatInputs.js.map +1 -1
- package/esm/components/DateSelector/DateSelector.css +125 -104
- package/esm/components/DateSelector/DateSelector.d.ts +1 -1
- package/esm/components/DateSelector/DateSelector.js +111 -52
- package/esm/components/DateSelector/DateSelector.js.map +1 -1
- package/esm/components/Header/Header.js +1 -1
- package/esm/components/Header/Header.js.map +1 -1
- package/esm/components/LoginDrawer/LoginDrawer.css +37 -5
- package/esm/components/LoginDrawer/LoginDrawer.d.ts +1 -2
- package/esm/components/LoginDrawer/LoginDrawer.js +2 -9
- package/esm/components/LoginDrawer/LoginDrawer.js.map +1 -1
- package/esm/components/MediaWidget/MediaWidget.css +4 -0
- package/esm/components/MemoriArtifactSystem/components/ArtifactActions/ArtifactActions.js +1 -1
- package/esm/components/MemoriArtifactSystem/components/ArtifactActions/ArtifactActions.js.map +1 -1
- package/esm/components/MemoriArtifactSystem/components/ArtifactActions/components/CopyButtonWithDropdown.js +1 -1
- package/esm/components/MemoriArtifactSystem/components/ArtifactActions/components/CopyButtonWithDropdown.js.map +1 -1
- package/esm/components/MemoriArtifactSystem/components/ArtifactActions/components/CopyMenuItem.js +3 -0
- package/esm/components/MemoriArtifactSystem/components/ArtifactActions/components/CopyMenuItem.js.map +1 -1
- package/esm/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.js +2 -2
- package/esm/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.js.map +1 -1
- package/esm/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.css +16 -7
- package/esm/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.js +6 -4
- package/esm/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.js.map +1 -1
- package/esm/components/MemoriWidget/MemoriWidget.js +69 -25
- package/esm/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/esm/components/UploadButton/UploadButton.js +2 -0
- package/esm/components/UploadButton/UploadButton.js.map +1 -1
- package/esm/components/UploadButton/UploadImages/UploadImages.js +2 -2
- package/esm/components/UploadButton/UploadImages/UploadImages.js.map +1 -1
- package/esm/components/ui/Drawer.css +8 -0
- package/esm/components/ui/Drawer.d.ts +2 -0
- package/esm/components/ui/Drawer.js +2 -2
- package/esm/components/ui/Drawer.js.map +1 -1
- package/esm/components/ui/Tooltip.css +49 -1
- package/esm/components/ui/Tooltip.d.ts +1 -1
- package/esm/locales/de.json +6 -1
- package/esm/locales/en.json +9 -1
- package/esm/locales/es.json +6 -1
- package/esm/locales/fr.json +5 -1
- package/esm/locales/it.json +8 -1
- package/esm/styles.css +3 -2
- package/package.json +2 -2
- package/src/components/AgeVerificationModal/AgeVerificationModal.css +41 -14
- package/src/components/AgeVerificationModal/AgeVerificationModal.tsx +3 -1
- package/src/components/Auth/Auth.tsx +55 -11
- package/src/components/Avatar/Avatar.stories.tsx +3 -0
- package/src/components/Avatar/AvatarView/AvatarComponent/positionControls/positionControls.css +2 -2
- package/src/components/Chat/Chat.stories.tsx +16 -2
- package/src/components/Chat/Chat.tsx +2 -1
- package/src/components/Chat/__snapshots__/Chat.test.tsx.snap +1030 -30
- package/src/components/ChatBubble/ChatBubble.css +81 -13
- package/src/components/ChatBubble/ChatBubble.stories.tsx +16 -2
- package/src/components/ChatBubble/ChatBubble.test.tsx +17 -0
- package/src/components/ChatBubble/ChatBubble.tsx +144 -31
- package/src/components/ChatBubble/__snapshots__/ChatBubble.test.tsx.snap +304 -8
- package/src/components/ChatHistoryDrawer/ChatHistory.css +5 -1
- package/src/components/ChatInputs/ChatInputs.tsx +14 -1
- package/src/components/DateSelector/DateSelector.css +125 -104
- package/src/components/DateSelector/DateSelector.stories.tsx +1 -1
- package/src/components/DateSelector/DateSelector.test.tsx +137 -23
- package/src/components/DateSelector/DateSelector.tsx +203 -177
- package/src/components/Header/Header.stories.tsx +5 -1
- package/src/components/Header/Header.tsx +1 -1
- package/src/components/Header/__snapshots__/Header.test.tsx.snap +1 -1
- package/src/components/LoginDrawer/LoginDrawer.css +37 -5
- package/src/components/LoginDrawer/LoginDrawer.stories.tsx +0 -1
- package/src/components/LoginDrawer/LoginDrawer.test.tsx +0 -1
- package/src/components/LoginDrawer/LoginDrawer.tsx +0 -19
- package/src/components/MediaWidget/MediaWidget.css +4 -0
- package/src/components/MemoriArtifactSystem/ArtifactDrawer.stories.tsx +996 -204
- package/src/components/MemoriArtifactSystem/components/ArtifactActions/ArtifactActions.tsx +2 -2
- package/src/components/MemoriArtifactSystem/components/ArtifactActions/components/CopyButtonWithDropdown.tsx +1 -1
- package/src/components/MemoriArtifactSystem/components/ArtifactActions/components/CopyMenuItem.tsx +3 -0
- package/src/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.tsx +56 -54
- package/src/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.css +16 -7
- package/src/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.tsx +12 -3
- package/src/components/MemoriWidget/MemoriWidget.stories.tsx +6 -3
- package/src/components/MemoriWidget/MemoriWidget.tsx +123 -48
- package/src/components/UploadButton/UploadButton.tsx +2 -0
- package/src/components/UploadButton/UploadImages/UploadImages.tsx +3 -2
- package/src/components/layouts/FullBody/FullBody.stories.tsx +9 -10
- package/src/components/layouts/Totem/Totem.stories.tsx +8 -9
- package/src/components/layouts/ZoomedFullBody/ZoomedFullBody.stories.tsx +8 -9
- package/src/components/layouts/layouts.stories.tsx +10 -9
- package/src/components/ui/Drawer.css +8 -0
- package/src/components/ui/Drawer.tsx +16 -12
- package/src/components/ui/Tooltip.css +49 -1
- package/src/components/ui/Tooltip.tsx +1 -1
- package/src/index.stories.tsx +18 -0
- package/src/locales/de.json +6 -1
- package/src/locales/en.json +9 -1
- package/src/locales/es.json +6 -1
- package/src/locales/fr.json +5 -1
- package/src/locales/it.json +8 -1
- package/src/mocks/data.ts +4 -2
- package/src/styles.css +3 -2
- package/src/components/SignupForm/SignupForm.test.tsx +0 -40
- package/src/components/SignupForm/SignupForm.tsx +0 -457
- package/src/components/SignupForm/__snapshots__/SignupForm.test.tsx.snap +0 -247
|
@@ -9,7 +9,7 @@ import { ArtifactProvider } from '../../MemoriArtifactSystem/context/ArtifactCon
|
|
|
9
9
|
|
|
10
10
|
const meta: Meta = {
|
|
11
11
|
title: 'General/Layouts/FullBody',
|
|
12
|
-
component: (args: Props) => <Memori {...args}
|
|
12
|
+
component: (args: Props) => <Memori {...args} />,
|
|
13
13
|
argTypes: {},
|
|
14
14
|
parameters: {
|
|
15
15
|
controls: { expanded: true },
|
|
@@ -32,14 +32,13 @@ const Template: Story<Props> = args => (
|
|
|
32
32
|
|
|
33
33
|
const DefaultLayout = Template.bind({});
|
|
34
34
|
DefaultLayout.args = {
|
|
35
|
-
|
|
35
|
+
emoriName: 'Layout Storybook',
|
|
36
36
|
ownerUserName: 'andrea.patini',
|
|
37
|
-
memoriID: '
|
|
38
|
-
ownerUserID: '
|
|
39
|
-
tenantID: '
|
|
40
|
-
engineURL: 'https://engine.memori.ai/memori/v2',
|
|
41
|
-
apiURL: 'https://backend.memori.ai/api/v2',
|
|
42
|
-
baseURL: 'https://www.aisuru.com',
|
|
37
|
+
memoriID: 'ae20fc5a-cc15-4db9-b7dd-2cd4a621b85e',
|
|
38
|
+
ownerUserID: '91dbc9ba-b684-4fbe-9828-b5980af6cda9',
|
|
39
|
+
tenantID: 'aisuru-staging.aclambda.online',
|
|
40
|
+
engineURL: 'https://engine-staging.memori.ai/memori/v2',
|
|
41
|
+
apiURL: 'https://backend-staging.memori.ai/api/v2',
|
|
43
42
|
layout: 'FULL_CHAT',
|
|
44
43
|
uiLang: 'IT',
|
|
45
44
|
spokenLang: 'IT',
|
|
@@ -63,7 +62,7 @@ export const FullBodyWithFullBodyAvatar = Template.bind({});
|
|
|
63
62
|
FullBodyWithFullBodyAvatar.args = {
|
|
64
63
|
...DefaultLayout.args,
|
|
65
64
|
avatar3DURL:
|
|
66
|
-
'https://assets.memori.ai/api/v2/asset/
|
|
65
|
+
'https://assets-staging.memori.ai/api/v2/asset/c0bb0d40-aebf-4e58-bfa0-45a4d7935153.glb#1763646903757',
|
|
67
66
|
integration: {
|
|
68
67
|
...baseIntegration,
|
|
69
68
|
customData: JSON.stringify({
|
|
@@ -75,7 +74,7 @@ FullBodyWithFullBodyAvatar.args = {
|
|
|
75
74
|
multilanguage: true,
|
|
76
75
|
avatar: 'readyplayerme-full',
|
|
77
76
|
avatarURL:
|
|
78
|
-
'https://assets.memori.ai/api/v2/asset/
|
|
77
|
+
'https://assets-staging.memori.ai/api/v2/asset/c0bb0d40-aebf-4e58-bfa0-45a4d7935153.glb#1763646903757',
|
|
79
78
|
name: 'Layout Storybook',
|
|
80
79
|
showShare: true,
|
|
81
80
|
}),
|
|
@@ -32,14 +32,13 @@ const Template: Story<Props> = args => (
|
|
|
32
32
|
|
|
33
33
|
const DefaultLayout = Template.bind({});
|
|
34
34
|
DefaultLayout.args = {
|
|
35
|
-
|
|
35
|
+
emoriName: 'Layout Storybook',
|
|
36
36
|
ownerUserName: 'andrea.patini',
|
|
37
|
-
memoriID: '
|
|
38
|
-
ownerUserID: '
|
|
39
|
-
tenantID: '
|
|
40
|
-
engineURL: 'https://engine.memori.ai/memori/v2',
|
|
41
|
-
apiURL: 'https://backend.memori.ai/api/v2',
|
|
42
|
-
baseURL: 'https://www.aisuru.com',
|
|
37
|
+
memoriID: 'ae20fc5a-cc15-4db9-b7dd-2cd4a621b85e',
|
|
38
|
+
ownerUserID: '91dbc9ba-b684-4fbe-9828-b5980af6cda9',
|
|
39
|
+
tenantID: 'aisuru-staging.aclambda.online',
|
|
40
|
+
engineURL: 'https://engine-staging.memori.ai/memori/v2',
|
|
41
|
+
apiURL: 'https://backend-staging.memori.ai/api/v2',
|
|
43
42
|
layout: 'FULL_CHAT',
|
|
44
43
|
uiLang: 'IT',
|
|
45
44
|
spokenLang: 'IT',
|
|
@@ -63,7 +62,7 @@ export const TotemWithFullBodyAvatar = Template.bind({});
|
|
|
63
62
|
TotemWithFullBodyAvatar.args = {
|
|
64
63
|
...DefaultLayout.args,
|
|
65
64
|
avatar3DURL:
|
|
66
|
-
'https://assets.memori.ai/api/v2/asset/
|
|
65
|
+
'https://assets-staging.memori.ai/api/v2/asset/c0bb0d40-aebf-4e58-bfa0-45a4d7935153.glb#1763646903757',
|
|
67
66
|
integration: {
|
|
68
67
|
...baseIntegration,
|
|
69
68
|
customData: JSON.stringify({
|
|
@@ -75,7 +74,7 @@ TotemWithFullBodyAvatar.args = {
|
|
|
75
74
|
multilanguage: true,
|
|
76
75
|
avatar: 'readyplayerme-full',
|
|
77
76
|
avatarURL:
|
|
78
|
-
'https://assets.memori.ai/api/v2/asset/
|
|
77
|
+
'https://assets-staging.memori.ai/api/v2/asset/c0bb0d40-aebf-4e58-bfa0-45a4d7935153.glb#1763646903757',
|
|
79
78
|
name: 'Layout Storybook',
|
|
80
79
|
showShare: true,
|
|
81
80
|
}),
|
|
@@ -32,14 +32,13 @@ const Template: Story<Props> = args => (
|
|
|
32
32
|
|
|
33
33
|
const DefaultLayout = Template.bind({});
|
|
34
34
|
DefaultLayout.args = {
|
|
35
|
-
|
|
35
|
+
emoriName: 'Layout Storybook',
|
|
36
36
|
ownerUserName: 'andrea.patini',
|
|
37
|
-
memoriID: '
|
|
38
|
-
ownerUserID: '
|
|
39
|
-
tenantID: '
|
|
40
|
-
engineURL: 'https://engine.memori.ai/memori/v2',
|
|
41
|
-
apiURL: 'https://backend.memori.ai/api/v2',
|
|
42
|
-
baseURL: 'https://www.aisuru.com',
|
|
37
|
+
memoriID: 'ae20fc5a-cc15-4db9-b7dd-2cd4a621b85e',
|
|
38
|
+
ownerUserID: '91dbc9ba-b684-4fbe-9828-b5980af6cda9',
|
|
39
|
+
tenantID: 'aisuru-staging.aclambda.online',
|
|
40
|
+
engineURL: 'https://engine-staging.memori.ai/memori/v2',
|
|
41
|
+
apiURL: 'https://backend-staging.memori.ai/api/v2',
|
|
43
42
|
layout: 'FULL_CHAT',
|
|
44
43
|
uiLang: 'IT',
|
|
45
44
|
spokenLang: 'IT',
|
|
@@ -63,7 +62,7 @@ export const ZoomedFullBodyWithFullBodyAvatar = Template.bind({});
|
|
|
63
62
|
ZoomedFullBodyWithFullBodyAvatar.args = {
|
|
64
63
|
...DefaultLayout.args,
|
|
65
64
|
avatar3DURL:
|
|
66
|
-
'https://assets.memori.ai/api/v2/asset/
|
|
65
|
+
'https://assets-staging.memori.ai/api/v2/asset/c0bb0d40-aebf-4e58-bfa0-45a4d7935153.glb#1763646903757',
|
|
67
66
|
integration: {
|
|
68
67
|
...baseIntegration,
|
|
69
68
|
customData: JSON.stringify({
|
|
@@ -75,7 +74,7 @@ ZoomedFullBodyWithFullBodyAvatar.args = {
|
|
|
75
74
|
multilanguage: true,
|
|
76
75
|
avatar: 'readyplayerme-full',
|
|
77
76
|
avatarURL:
|
|
78
|
-
'https://assets.memori.ai/api/v2/asset/
|
|
77
|
+
'https://assets-staging.memori.ai/api/v2/asset/c0bb0d40-aebf-4e58-bfa0-45a4d7935153.glb#1763646903757',
|
|
79
78
|
name: 'Layout Storybook',
|
|
80
79
|
showShare: true,
|
|
81
80
|
}),
|
|
@@ -11,7 +11,7 @@ import { ArtifactProvider } from '../MemoriArtifactSystem/context/ArtifactContex
|
|
|
11
11
|
|
|
12
12
|
const meta: Meta = {
|
|
13
13
|
title: 'General/Layouts',
|
|
14
|
-
component: (args: Props) => <Memori {...args}
|
|
14
|
+
component: (args: Props) => <Memori {...args} />,
|
|
15
15
|
argTypes: {},
|
|
16
16
|
parameters: {
|
|
17
17
|
controls: { expanded: true },
|
|
@@ -36,19 +36,20 @@ const DefaultLayout = Template.bind({});
|
|
|
36
36
|
DefaultLayout.args = {
|
|
37
37
|
memoriName: 'Layout Storybook',
|
|
38
38
|
ownerUserName: 'andrea.patini',
|
|
39
|
-
memoriID: '
|
|
40
|
-
ownerUserID: '
|
|
41
|
-
tenantID: '
|
|
42
|
-
engineURL: 'https://engine.memori.ai/memori/v2',
|
|
43
|
-
apiURL: 'https://backend.memori.ai/api/v2',
|
|
44
|
-
|
|
45
|
-
layout: 'FULL_CHAT',
|
|
39
|
+
memoriID: 'ae20fc5a-cc15-4db9-b7dd-2cd4a621b85e',
|
|
40
|
+
ownerUserID: '91dbc9ba-b684-4fbe-9828-b5980af6cda9',
|
|
41
|
+
tenantID: 'aisuru-staging.aclambda.online',
|
|
42
|
+
engineURL: 'https://engine-staging.memori.ai/memori/v2',
|
|
43
|
+
apiURL: 'https://backend-staging.memori.ai/api/v2',
|
|
44
|
+
layout: 'FULLPAGE',
|
|
46
45
|
uiLang: 'IT',
|
|
47
46
|
spokenLang: 'IT',
|
|
48
47
|
integrationID: '0b1256c1-530c-4e67-aef8-36667c8887bb',
|
|
49
48
|
autoStart: false,
|
|
50
49
|
sessionID: '' as string | undefined,
|
|
51
|
-
|
|
50
|
+
showUpload: true,
|
|
51
|
+
showReasoning: false,
|
|
52
|
+
showLogin: true
|
|
52
53
|
};
|
|
53
54
|
|
|
54
55
|
|
|
@@ -40,13 +40,15 @@ export interface Props {
|
|
|
40
40
|
confirmDialogMessage?: string;
|
|
41
41
|
showBackdrop?: boolean;
|
|
42
42
|
preventBackdropClose?: boolean;
|
|
43
|
+
enterDuration?: string;
|
|
44
|
+
leaveDuration?: string;
|
|
43
45
|
}
|
|
44
46
|
|
|
45
47
|
const Drawer: FC<Props> = ({
|
|
46
48
|
title,
|
|
47
49
|
open = false,
|
|
48
50
|
data,
|
|
49
|
-
onClose = () => {},
|
|
51
|
+
onClose = () => { },
|
|
50
52
|
children,
|
|
51
53
|
width = '80%',
|
|
52
54
|
footer,
|
|
@@ -63,6 +65,8 @@ const Drawer: FC<Props> = ({
|
|
|
63
65
|
confirmDialogTitle,
|
|
64
66
|
confirmDialogMessage,
|
|
65
67
|
preventBackdropClose = false,
|
|
68
|
+
enterDuration = 'duration-300',
|
|
69
|
+
leaveDuration = 'duration-200',
|
|
66
70
|
}: Props) => {
|
|
67
71
|
const [originalData, setOriginalData] = useState<any>(null);
|
|
68
72
|
const [confirmDialogOpen, setConfirmDialogOpen] = useState(false);
|
|
@@ -120,19 +124,19 @@ const Drawer: FC<Props> = ({
|
|
|
120
124
|
<Transition appear show={open} as={React.Fragment}>
|
|
121
125
|
<Dialog
|
|
122
126
|
open={open}
|
|
123
|
-
onClose={preventBackdropClose ? () => {} : handleClose}
|
|
127
|
+
onClose={preventBackdropClose ? () => { } : handleClose}
|
|
124
128
|
className={cx('memori-drawer', className)}
|
|
125
129
|
>
|
|
126
130
|
{showBackdrop && (
|
|
127
131
|
<Transition.Child
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
132
|
+
as={React.Fragment}
|
|
133
|
+
enter="ease-out duration-300"
|
|
134
|
+
enterFrom="opacity-0"
|
|
135
|
+
enterTo="opacity-100"
|
|
136
|
+
leave="ease-in duration-200"
|
|
137
|
+
leaveFrom="opacity-100"
|
|
138
|
+
leaveTo="opacity-0"
|
|
139
|
+
>
|
|
136
140
|
<div className="memori-drawer--backdrop" />
|
|
137
141
|
</Transition.Child>
|
|
138
142
|
)}
|
|
@@ -141,10 +145,10 @@ const Drawer: FC<Props> = ({
|
|
|
141
145
|
<Transition.Child
|
|
142
146
|
static
|
|
143
147
|
as={React.Fragment}
|
|
144
|
-
enter=
|
|
148
|
+
enter={`ease-out ${enterDuration}`}
|
|
145
149
|
enterFrom={animated ? 'max-w-0 opacity-0' : 'opacity-0'}
|
|
146
150
|
enterTo="max-w-80 opacity-100"
|
|
147
|
-
leave=
|
|
151
|
+
leave={`ease-in ${leaveDuration}`}
|
|
148
152
|
leaveFrom="max-w-80 opacity-100"
|
|
149
153
|
leaveTo={animated ? 'max-w-0 opacity-0' : 'opacity-0'}
|
|
150
154
|
>
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
.memori-tooltip {
|
|
4
4
|
position: relative;
|
|
5
|
+
z-index: 1000;
|
|
5
6
|
display: inline-block;
|
|
6
7
|
}
|
|
7
8
|
|
|
8
9
|
.memori-tooltip--content {
|
|
9
10
|
position: absolute;
|
|
10
|
-
z-index:
|
|
11
|
+
z-index: 1000;
|
|
11
12
|
top: 50%;
|
|
12
13
|
left: 100%;
|
|
13
14
|
display: none;
|
|
@@ -47,6 +48,7 @@
|
|
|
47
48
|
transition: 0.3s;
|
|
48
49
|
}
|
|
49
50
|
|
|
51
|
+
|
|
50
52
|
.memori-tooltip.memori-tooltip--align-left .memori-tooltip--content::before {
|
|
51
53
|
right: -15px;
|
|
52
54
|
left: auto;
|
|
@@ -113,3 +115,49 @@
|
|
|
113
115
|
.memori-tooltip.memori-tooltip--disabled {
|
|
114
116
|
cursor: not-allowed;
|
|
115
117
|
}
|
|
118
|
+
|
|
119
|
+
.memori-tooltip.memori-tooltip--align-bottomLeft .memori-tooltip--content,
|
|
120
|
+
.memori-tooltip.memori-tooltip--align-bottomRight .memori-tooltip--content {
|
|
121
|
+
top: 100%;
|
|
122
|
+
right: initial;
|
|
123
|
+
left: 50%;
|
|
124
|
+
margin: initial;
|
|
125
|
+
margin-top: 15px;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.memori-tooltip.memori-tooltip--align-bottomLeft .memori-tooltip--content::before {
|
|
129
|
+
z-index: 1001;
|
|
130
|
+
top: -15px;
|
|
131
|
+
bottom: initial;
|
|
132
|
+
left: 66%;
|
|
133
|
+
border-color: transparent transparent rgba(0, 0, 0, 0.8) transparent;
|
|
134
|
+
margin-top: 0px;
|
|
135
|
+
margin-bottom: initial;
|
|
136
|
+
margin-left: 5px;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.memori-tooltip.memori-tooltip--align-bottomRight .memori-tooltip--content::before {
|
|
140
|
+
z-index: 1001;
|
|
141
|
+
top: -15px;
|
|
142
|
+
right: 10px;
|
|
143
|
+
bottom: initial;
|
|
144
|
+
left: auto;
|
|
145
|
+
border-color: transparent transparent rgba(0, 0, 0, 0.8) transparent;
|
|
146
|
+
margin-top: -5px;
|
|
147
|
+
margin-right: 5px;
|
|
148
|
+
margin-bottom: initial;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.memori-tooltip.memori-tooltip--align-bottomLeft:not(.memori-tooltip--disabled).memori-tooltip--visible
|
|
152
|
+
.memori-tooltip--content,
|
|
153
|
+
.memori-tooltip.memori-tooltip--align-bottomLeft:not(.memori-tooltip--disabled):not(.memori-tooltip--visible):hover
|
|
154
|
+
.memori-tooltip--content {
|
|
155
|
+
transform: translateX(-73%);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.memori-tooltip.memori-tooltip--align-bottomRight:not(.memori-tooltip--disabled).memori-tooltip--visible
|
|
159
|
+
.memori-tooltip--content,
|
|
160
|
+
.memori-tooltip.memori-tooltip--align-bottomRight:not(.memori-tooltip--disabled):not(.memori-tooltip--visible):hover
|
|
161
|
+
.memori-tooltip--content {
|
|
162
|
+
transform: translateX(33%);
|
|
163
|
+
}
|
|
@@ -4,7 +4,7 @@ import cx from 'classnames';
|
|
|
4
4
|
export interface Props {
|
|
5
5
|
content: string | JSX.Element | React.ReactNode;
|
|
6
6
|
className?: string;
|
|
7
|
-
align?: 'left' | 'right' | 'topLeft' | 'topRight';
|
|
7
|
+
align?: 'left' | 'right' | 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
children: React.ReactNode;
|
|
10
10
|
visible?: boolean;
|
package/src/index.stories.tsx
CHANGED
|
@@ -100,3 +100,21 @@ WithUpload.args = {
|
|
|
100
100
|
showUpload: true,
|
|
101
101
|
};
|
|
102
102
|
|
|
103
|
+
export const WithPrivateAgent = Template.bind({});
|
|
104
|
+
WithPrivateAgent.args = {
|
|
105
|
+
memoriName: 'Test Private',
|
|
106
|
+
ownerUserName: 'Andrea-Patini',
|
|
107
|
+
memoriID: 'c58cd5f9-43c4-4a3b-9fb6-56aedf58ff7a',
|
|
108
|
+
ownerUserID: '91dbc9ba-b684-4fbe-9828-b5980af6cda9',
|
|
109
|
+
tenantID: 'aisuru-staging.aclambda.online',
|
|
110
|
+
apiURL: 'https://backend-staging.memori.ai/api/v2',
|
|
111
|
+
engineURL: 'https://engine-staging.memori.ai/memori/v2',
|
|
112
|
+
baseURL: 'https://aisuru-staging.aclambda.online',
|
|
113
|
+
uiLang: 'EN',
|
|
114
|
+
spokenLang: 'IT',
|
|
115
|
+
layout: 'FULLPAGE',
|
|
116
|
+
multilingual: true,
|
|
117
|
+
showSettings: true,
|
|
118
|
+
showShare: true,
|
|
119
|
+
integrationID: '19f95abe-3493-4568-971d-14471480e5bc',
|
|
120
|
+
};
|
package/src/locales/de.json
CHANGED
|
@@ -24,7 +24,9 @@
|
|
|
24
24
|
"last_7_days": "Letzte 7 Tage",
|
|
25
25
|
"last_30_days": "Letzte 30 Tage",
|
|
26
26
|
"missingData": "Fehlende Informationen",
|
|
27
|
+
"date": "Geburtsdatum",
|
|
27
28
|
"day": "Tag",
|
|
29
|
+
"copied": "Kopiert!",
|
|
28
30
|
"month": "Monat",
|
|
29
31
|
"year": "Jahr",
|
|
30
32
|
"createdAt": "Erstellungsdatum",
|
|
@@ -106,6 +108,8 @@
|
|
|
106
108
|
"tokens": "Token",
|
|
107
109
|
"addToken": "Token hinzufügen",
|
|
108
110
|
"usePassword": "Passwort verwenden",
|
|
111
|
+
"passwordRequired": "Passwort erforderlich",
|
|
112
|
+
"invalidCredentials": "Ungültige Zugangsdaten",
|
|
109
113
|
"atLeast": "Mindestens"
|
|
110
114
|
},
|
|
111
115
|
"widget": {
|
|
@@ -342,7 +346,8 @@
|
|
|
342
346
|
"termsOfService": "Nutzungsbedingungen",
|
|
343
347
|
"pAndCUAccepted": "Ich akzeptiere die Nutzungsbedingungen von Deep Thought",
|
|
344
348
|
"editAccount": "Konto bearbeiten",
|
|
345
|
-
"save": "Speichern"
|
|
349
|
+
"save": "Speichern",
|
|
350
|
+
"successfullyLoggedIn": "{{username}} hat sich erfolgreich angemeldet"
|
|
346
351
|
},
|
|
347
352
|
"chatLogs": {
|
|
348
353
|
"anyMessage": "Jede Nachricht",
|
package/src/locales/en.json
CHANGED
|
@@ -25,8 +25,13 @@
|
|
|
25
25
|
"last_7_days": "Last 7 days",
|
|
26
26
|
"last_30_days": "Last 30 days",
|
|
27
27
|
"month": "Month",
|
|
28
|
+
"copied": "Copied!",
|
|
28
29
|
"year": "Year",
|
|
30
|
+
"dayPlaceholder": "DD",
|
|
31
|
+
"monthPlaceholder": "MM",
|
|
32
|
+
"yearPlaceholder": "YYYY",
|
|
29
33
|
"createdAt": "Creation date",
|
|
34
|
+
"date": "Birth date",
|
|
30
35
|
"selected": "Selected",
|
|
31
36
|
"page": "page",
|
|
32
37
|
"actions": "Actions",
|
|
@@ -105,6 +110,8 @@
|
|
|
105
110
|
"tokens": "Tokens",
|
|
106
111
|
"addToken": "Add token",
|
|
107
112
|
"usePassword": "Use password",
|
|
113
|
+
"passwordRequired": "Password required",
|
|
114
|
+
"invalidCredentials": "Invalid credentials",
|
|
108
115
|
"atLeast": "At least"
|
|
109
116
|
},
|
|
110
117
|
"widget": {
|
|
@@ -406,7 +413,8 @@
|
|
|
406
413
|
"termsStatus": "Terms Status",
|
|
407
414
|
"enabled": "Enabled",
|
|
408
415
|
"disabled": "Disabled",
|
|
409
|
-
"advancedFeatures": "Advanced Features"
|
|
416
|
+
"advancedFeatures": "Advanced Features",
|
|
417
|
+
"successfullyLoggedIn": "{{username}} has successfully logged in"
|
|
410
418
|
},
|
|
411
419
|
"chatLogs": {
|
|
412
420
|
"anyMessage": "Any message",
|
package/src/locales/es.json
CHANGED
|
@@ -24,7 +24,9 @@
|
|
|
24
24
|
"yesterday": "Ayer",
|
|
25
25
|
"last_7_days": "Últimos 7 días",
|
|
26
26
|
"last_30_days": "Últimos 30 días",
|
|
27
|
+
"date": "Fecha de nacimiento",
|
|
27
28
|
"month": "Mes",
|
|
29
|
+
"copied": "¡Copiado!",
|
|
28
30
|
"missingData": "Información faltante",
|
|
29
31
|
"year": "Año",
|
|
30
32
|
"createdAt": "Fecha de creación",
|
|
@@ -106,6 +108,8 @@
|
|
|
106
108
|
"tokens": "Fichas",
|
|
107
109
|
"addToken": "Agregar token",
|
|
108
110
|
"usePassword": "Usar contraseña",
|
|
111
|
+
"passwordRequired": "Contraseña obligatoria",
|
|
112
|
+
"invalidCredentials": "Credenciales no válidas",
|
|
109
113
|
"atLeast": "Al menos"
|
|
110
114
|
},
|
|
111
115
|
"widget": {
|
|
@@ -369,7 +373,8 @@
|
|
|
369
373
|
"termsOfService": "Términos de servicio",
|
|
370
374
|
"pAndCUAccepted": "Acepto los términos de servicio sobre Deep Thought",
|
|
371
375
|
"editAccount": "Editar cuenta",
|
|
372
|
-
"save": "Ahorrar"
|
|
376
|
+
"save": "Ahorrar",
|
|
377
|
+
"successfullyLoggedIn": "{{username}} ha iniciado sesión correctamente"
|
|
373
378
|
},
|
|
374
379
|
"chatLogs": {
|
|
375
380
|
"anyMessage": "Cualquier mensaje",
|
package/src/locales/fr.json
CHANGED
|
@@ -24,8 +24,10 @@
|
|
|
24
24
|
"createdAt": "Date de création",
|
|
25
25
|
"all": "Tous",
|
|
26
26
|
"today": "Aujourd'hui",
|
|
27
|
+
"date": "Date de naissance",
|
|
27
28
|
"yesterday": "Hier",
|
|
28
29
|
"last_7_days": "7 derniers jours",
|
|
30
|
+
"copied": "Copié !",
|
|
29
31
|
"missingData": "Informations manquantes",
|
|
30
32
|
"last_30_days": "30 derniers jours",
|
|
31
33
|
"selected": "Choisi",
|
|
@@ -104,6 +106,7 @@
|
|
|
104
106
|
"useRecoveryTokens": "Utiliser des jetons de récupération",
|
|
105
107
|
"tokens": "Jetons",
|
|
106
108
|
"addToken": "Ajouter un jeton",
|
|
109
|
+
"invalidCredentials": "Identifiants invalides",
|
|
107
110
|
"usePassword": "Utiliser le mot de passe",
|
|
108
111
|
"atLeast": "Au moins"
|
|
109
112
|
},
|
|
@@ -378,7 +381,8 @@
|
|
|
378
381
|
"termsOfService": "Conditions d'utilisation",
|
|
379
382
|
"pAndCUAccepted": "J'accepte les conditions d'utilisation de Deep Thought",
|
|
380
383
|
"editAccount": "Modifier le compte",
|
|
381
|
-
"save": "Sauvegarder"
|
|
384
|
+
"save": "Sauvegarder",
|
|
385
|
+
"successfullyLoggedIn": "{{username}} s'est connecté avec succès"
|
|
382
386
|
},
|
|
383
387
|
"chatLogs": {
|
|
384
388
|
"anyMessage": "Tout message",
|
package/src/locales/it.json
CHANGED
|
@@ -21,14 +21,19 @@
|
|
|
21
21
|
"day": "Giorno",
|
|
22
22
|
"month": "Mese",
|
|
23
23
|
"year": "Anno",
|
|
24
|
+
"dayPlaceholder": "GG",
|
|
25
|
+
"monthPlaceholder": "MM",
|
|
26
|
+
"yearPlaceholder": "AAAA",
|
|
24
27
|
"createdAt": "Data creazione",
|
|
25
28
|
"selected": "Selezionati",
|
|
26
29
|
"page": "pagina",
|
|
27
30
|
"actions": "Azioni",
|
|
28
31
|
"next": "Successivo",
|
|
29
32
|
"all": "Tutti",
|
|
33
|
+
"copied": "Copiato!",
|
|
30
34
|
"today": "Oggi",
|
|
31
35
|
"yesterday": "Ieri",
|
|
36
|
+
"date": "Data di nascita",
|
|
32
37
|
"last_7_days": "Ultimi 7 giorni",
|
|
33
38
|
"last_30_days": "Ultimi 30 giorni",
|
|
34
39
|
"previous": "Precedente",
|
|
@@ -106,6 +111,7 @@
|
|
|
106
111
|
"tokens": "Token",
|
|
107
112
|
"addToken": "Aggiungi token",
|
|
108
113
|
"usePassword": "Utilizza la password",
|
|
114
|
+
"invalidCredentials": "Credenziali non valide",
|
|
109
115
|
"atLeast": "Almeno"
|
|
110
116
|
},
|
|
111
117
|
"widget": {
|
|
@@ -406,7 +412,8 @@
|
|
|
406
412
|
"termsOfService": "i termini del servizio",
|
|
407
413
|
"pAndCUAccepted": "Accetto le condizioni di utilizzo relative a Pensiero Profondo",
|
|
408
414
|
"editAccount": "Modifica account",
|
|
409
|
-
"save": "Salva"
|
|
415
|
+
"save": "Salva",
|
|
416
|
+
"successfullyLoggedIn": "{{username}} ha effettuato l'accesso con successo"
|
|
410
417
|
},
|
|
411
418
|
"chatLogs": {
|
|
412
419
|
"atLeast": "Almeno {{count}} messaggi",
|
package/src/mocks/data.ts
CHANGED
|
@@ -474,7 +474,8 @@ export const historyWithAIGeneratedMessages: Message[] = [
|
|
|
474
474
|
timestamp: '2021-03-01T12:00:00.000Z',
|
|
475
475
|
},
|
|
476
476
|
{
|
|
477
|
-
text: 'Sa. Sa. Prova',
|
|
477
|
+
text: 'Sa. Sa. Prova. Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
|
|
478
|
+
generatedByAI: true,
|
|
478
479
|
timestamp: '2021-03-01T12:00:00.000Z',
|
|
479
480
|
},
|
|
480
481
|
{
|
|
@@ -504,8 +505,9 @@ export const historyWithAIGeneratedMessages: Message[] = [
|
|
|
504
505
|
timestamp: '2021-03-01T12:00:00.000Z',
|
|
505
506
|
},
|
|
506
507
|
{
|
|
507
|
-
text: 'Arrivederci.',
|
|
508
|
+
text: 'Arrivederci. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
|
|
508
509
|
timestamp: '2021-03-01T12:00:00.000Z',
|
|
510
|
+
generatedByAI: true,
|
|
509
511
|
contextVars: {
|
|
510
512
|
TEST: 'test',
|
|
511
513
|
},
|
package/src/styles.css
CHANGED
|
@@ -89,7 +89,8 @@ body.sb-show-main #root,
|
|
|
89
89
|
#storybook-docs,
|
|
90
90
|
.memori-widget {
|
|
91
91
|
--memori-font-family: 'Lexend Deca Variable', 'Lexend Deca', sans-serif;
|
|
92
|
-
--memori-primary:
|
|
92
|
+
--memori-primary-rgb: 130, 70, 175;
|
|
93
|
+
--memori-primary: rgb(var(--memori-primary-rgb));
|
|
93
94
|
--memori-primary-text: #fff;
|
|
94
95
|
--memori-inner-content-pad: 1rem;
|
|
95
96
|
--memori-inner-bg: transparent;
|
|
@@ -123,4 +124,4 @@ body.sb-show-main #root,
|
|
|
123
124
|
.mobile-hidden {
|
|
124
125
|
display: none;
|
|
125
126
|
}
|
|
126
|
-
}
|
|
127
|
+
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render } from '@testing-library/react';
|
|
3
|
-
import SignupForm from './SignupForm';
|
|
4
|
-
import { tenant } from '../../mocks/data';
|
|
5
|
-
import memoriApiClient from '@memori.ai/memori-api-client';
|
|
6
|
-
|
|
7
|
-
beforeEach(() => {
|
|
8
|
-
// @ts-ignore
|
|
9
|
-
window.IntersectionObserver = jest.fn(() => ({
|
|
10
|
-
observe: jest.fn(),
|
|
11
|
-
unobserve: jest.fn(),
|
|
12
|
-
disconnect: jest.fn(),
|
|
13
|
-
takeRecords: jest.fn(),
|
|
14
|
-
}));
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
it('renders SignupForm unchanged', () => {
|
|
18
|
-
const { container } = render(
|
|
19
|
-
<SignupForm
|
|
20
|
-
apiClient={memoriApiClient()}
|
|
21
|
-
tenant={tenant}
|
|
22
|
-
onLogin={jest.fn()}
|
|
23
|
-
goToLogin={jest.fn()}
|
|
24
|
-
/>
|
|
25
|
-
);
|
|
26
|
-
expect(container).toMatchSnapshot();
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
it('renders SignupForm on otp form unchanged', () => {
|
|
30
|
-
const { container } = render(
|
|
31
|
-
<SignupForm
|
|
32
|
-
apiClient={memoriApiClient()}
|
|
33
|
-
tenant={tenant}
|
|
34
|
-
onLogin={jest.fn()}
|
|
35
|
-
goToLogin={jest.fn()}
|
|
36
|
-
__TEST__waitingForOtp
|
|
37
|
-
/>
|
|
38
|
-
);
|
|
39
|
-
expect(container).toMatchSnapshot();
|
|
40
|
-
});
|