@memori.ai/memori-react 8.10.0 → 8.11.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 +24 -0
- package/dist/components/ChatInputs/ChatInputs.js.map +1 -1
- package/dist/components/MediaWidget/MediaItemWidget.js +7 -5
- package/dist/components/MediaWidget/MediaItemWidget.js.map +1 -1
- package/dist/components/MemoriWidget/MemoriWidget.js +1 -5
- package/dist/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/esm/components/ChatInputs/ChatInputs.js.map +1 -1
- package/esm/components/MediaWidget/MediaItemWidget.js +7 -5
- package/esm/components/MediaWidget/MediaItemWidget.js.map +1 -1
- package/esm/components/MemoriWidget/MemoriWidget.js +1 -5
- package/esm/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ChatInputs/ChatInputs.tsx +0 -1
- package/src/components/MediaWidget/MediaItemWidget.stories.tsx +69 -0
- package/src/components/MediaWidget/MediaItemWidget.tsx +6 -12
- package/src/components/MemoriWidget/MemoriWidget.tsx +2 -9
- package/src/components/layouts/FullBody/FullBody.stories.tsx +111 -0
- package/src/components/layouts/Totem/Totem.stories.tsx +132 -0
- package/src/components/layouts/ZoomedFullBody/ZoomedFullBody.stories.tsx +132 -0
- package/src/components/layouts/layouts.stories.tsx +54 -508
- package/src/index.stories.tsx +1 -329
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Meta, Story } from '@storybook/react';
|
|
3
|
+
import { tenant } from '../../../mocks/data';
|
|
4
|
+
import { Props } from '../../MemoriWidget/MemoriWidget';
|
|
5
|
+
import Memori from '../../../index';
|
|
6
|
+
import I18nWrapper from '../../../I18nWrapper';
|
|
7
|
+
import { VisemeProvider } from '../../../context/visemeContext';
|
|
8
|
+
import { ArtifactProvider } from '../../MemoriArtifactSystem/context/ArtifactContext';
|
|
9
|
+
|
|
10
|
+
const meta: Meta = {
|
|
11
|
+
title: 'General/Layouts/FullBody',
|
|
12
|
+
component: (args: Props) => <Memori {...args} engineURL="https://engine.memori.ai" apiURL="https://backend.memori.ai" baseURL="https://www.aisuru.com" />,
|
|
13
|
+
argTypes: {},
|
|
14
|
+
parameters: {
|
|
15
|
+
controls: { expanded: true },
|
|
16
|
+
layout: 'fullscreen',
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export default meta;
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
const Template: Story<Props> = args => (
|
|
24
|
+
<I18nWrapper>
|
|
25
|
+
<ArtifactProvider>
|
|
26
|
+
<VisemeProvider>
|
|
27
|
+
<Memori {...args} />
|
|
28
|
+
</VisemeProvider>
|
|
29
|
+
</ArtifactProvider>
|
|
30
|
+
</I18nWrapper>
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
const DefaultLayout = Template.bind({});
|
|
34
|
+
DefaultLayout.args = {
|
|
35
|
+
memoriName: 'Layout Storybook',
|
|
36
|
+
ownerUserName: 'andrea.patini',
|
|
37
|
+
memoriID: '157860e8-f014-43b3-a7c5-fb4a08c87025',
|
|
38
|
+
ownerUserID: '95753bbe-9e88-4799-ae35-dc060bc11c48',
|
|
39
|
+
tenantID: 'www.aisuru.com',
|
|
40
|
+
engineURL: 'https://engine.memori.ai/memori/v2',
|
|
41
|
+
apiURL: 'https://backend.memori.ai/api/v2',
|
|
42
|
+
baseURL: 'https://www.aisuru.com',
|
|
43
|
+
layout: 'FULL_CHAT',
|
|
44
|
+
uiLang: 'IT',
|
|
45
|
+
spokenLang: 'IT',
|
|
46
|
+
integrationID: '0b1256c1-530c-4e67-aef8-36667c8887bb',
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const baseIntegration = {
|
|
50
|
+
integrationID: '0b1256c1-530c-4e67-aef8-36667c8887bb',
|
|
51
|
+
memoriID: '157860e8-f014-43b3-a7c5-fb4a08c87025',
|
|
52
|
+
type: 'LANDING_EXPERIENCE',
|
|
53
|
+
state: 'NEW',
|
|
54
|
+
deviceEmails: null,
|
|
55
|
+
invocationText: null,
|
|
56
|
+
jobID: null,
|
|
57
|
+
publish: true,
|
|
58
|
+
creationTimestamp: '2022-06-13T14:44:52.833573Z',
|
|
59
|
+
lastChangeTimestamp: '2022-06-13T14:44:52.833573Z',
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export const FullBodyWithFullBodyAvatar = Template.bind({});
|
|
63
|
+
FullBodyWithFullBodyAvatar.args = {
|
|
64
|
+
...DefaultLayout.args,
|
|
65
|
+
avatar3DURL:
|
|
66
|
+
'https://assets.memori.ai/api/v2/asset/692580d6-7b25-4ed0-84ce-82d5f4ac4270.glb#1762875775270',
|
|
67
|
+
integration: {
|
|
68
|
+
...baseIntegration,
|
|
69
|
+
customData: JSON.stringify({
|
|
70
|
+
textColor: '#000000',
|
|
71
|
+
buttonBgColor: '#007eb6',
|
|
72
|
+
buttonTextColor: '#ffffff',
|
|
73
|
+
blurBackground: true,
|
|
74
|
+
innerBgColor: 'light',
|
|
75
|
+
multilanguage: true,
|
|
76
|
+
avatar: 'readyplayerme-full',
|
|
77
|
+
avatarURL:
|
|
78
|
+
'https://assets.memori.ai/api/v2/asset/692580d6-7b25-4ed0-84ce-82d5f4ac4270.glb#1762875775270',
|
|
79
|
+
name: 'Layout Storybook',
|
|
80
|
+
showShare: true,
|
|
81
|
+
}),
|
|
82
|
+
},
|
|
83
|
+
tenant,
|
|
84
|
+
layout: 'FULLPAGE',
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export const FullBodyWithHalfBodyAvatar = Template.bind({});
|
|
88
|
+
FullBodyWithHalfBodyAvatar.args = {
|
|
89
|
+
...DefaultLayout.args,
|
|
90
|
+
avatar3DURL:
|
|
91
|
+
'https://assets.memori.ai/api/v2/asset/acc38f4a-e4c3-4a21-9818-c3d1672820ea.glb#1762875973109',
|
|
92
|
+
integration: {
|
|
93
|
+
...baseIntegration,
|
|
94
|
+
customData: JSON.stringify({
|
|
95
|
+
textColor: '#000000',
|
|
96
|
+
buttonBgColor: '#007eb6',
|
|
97
|
+
buttonTextColor: '#ffffff',
|
|
98
|
+
blurBackground: true,
|
|
99
|
+
innerBgColor: 'light',
|
|
100
|
+
multilanguage: true,
|
|
101
|
+
avatar: 'readyplayerme',
|
|
102
|
+
avatarURL:
|
|
103
|
+
'https://assets.memori.ai/api/v2/asset/acc38f4a-e4c3-4a21-9818-c3d1672820ea.glb#1762875973109',
|
|
104
|
+
name: 'Layout Storybook',
|
|
105
|
+
showShare: true,
|
|
106
|
+
}),
|
|
107
|
+
},
|
|
108
|
+
tenant,
|
|
109
|
+
layout: 'FULLPAGE',
|
|
110
|
+
};
|
|
111
|
+
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Meta, Story } from '@storybook/react';
|
|
3
|
+
import { memori, tenant } from '../../../mocks/data';
|
|
4
|
+
import { Props } from '../../MemoriWidget/MemoriWidget';
|
|
5
|
+
import Memori from '../../../index';
|
|
6
|
+
import I18nWrapper from '../../../I18nWrapper';
|
|
7
|
+
import { VisemeProvider } from '../../../context/visemeContext';
|
|
8
|
+
import { ArtifactProvider } from '../../MemoriArtifactSystem/context/ArtifactContext';
|
|
9
|
+
|
|
10
|
+
const meta: Meta = {
|
|
11
|
+
title: 'General/Layouts/Totem',
|
|
12
|
+
component: (args: Props) => <Memori {...args} engineURL="https://engine.memori.ai" apiURL="https://backend.memori.ai" baseURL="https://www.aisuru.com" />,
|
|
13
|
+
argTypes: {},
|
|
14
|
+
parameters: {
|
|
15
|
+
controls: { expanded: true },
|
|
16
|
+
layout: 'fullscreen',
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export default meta;
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
const Template: Story<Props> = args => (
|
|
24
|
+
<I18nWrapper>
|
|
25
|
+
<ArtifactProvider>
|
|
26
|
+
<VisemeProvider>
|
|
27
|
+
<Memori {...args} />
|
|
28
|
+
</VisemeProvider>
|
|
29
|
+
</ArtifactProvider>
|
|
30
|
+
</I18nWrapper>
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
const DefaultLayout = Template.bind({});
|
|
34
|
+
DefaultLayout.args = {
|
|
35
|
+
memoriName: 'Layout Storybook',
|
|
36
|
+
ownerUserName: 'andrea.patini',
|
|
37
|
+
memoriID: '157860e8-f014-43b3-a7c5-fb4a08c87025',
|
|
38
|
+
ownerUserID: '95753bbe-9e88-4799-ae35-dc060bc11c48',
|
|
39
|
+
tenantID: 'www.aisuru.com',
|
|
40
|
+
engineURL: 'https://engine.memori.ai/memori/v2',
|
|
41
|
+
apiURL: 'https://backend.memori.ai/api/v2',
|
|
42
|
+
baseURL: 'https://www.aisuru.com',
|
|
43
|
+
layout: 'FULL_CHAT',
|
|
44
|
+
uiLang: 'IT',
|
|
45
|
+
spokenLang: 'IT',
|
|
46
|
+
integrationID: '0b1256c1-530c-4e67-aef8-36667c8887bb',
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const baseIntegration = {
|
|
50
|
+
integrationID: '0b1256c1-530c-4e67-aef8-36667c8887bb',
|
|
51
|
+
memoriID: '157860e8-f014-43b3-a7c5-fb4a08c87025',
|
|
52
|
+
type: 'LANDING_EXPERIENCE',
|
|
53
|
+
state: 'NEW',
|
|
54
|
+
deviceEmails: null,
|
|
55
|
+
invocationText: null,
|
|
56
|
+
jobID: null,
|
|
57
|
+
publish: true,
|
|
58
|
+
creationTimestamp: '2022-06-13T14:44:52.833573Z',
|
|
59
|
+
lastChangeTimestamp: '2022-06-13T14:44:52.833573Z',
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export const TotemWithFullBodyAvatar = Template.bind({});
|
|
63
|
+
TotemWithFullBodyAvatar.args = {
|
|
64
|
+
...DefaultLayout.args,
|
|
65
|
+
avatar3DURL:
|
|
66
|
+
'https://assets.memori.ai/api/v2/asset/692580d6-7b25-4ed0-84ce-82d5f4ac4270.glb#1762875775270',
|
|
67
|
+
integration: {
|
|
68
|
+
...baseIntegration,
|
|
69
|
+
customData: JSON.stringify({
|
|
70
|
+
textColor: '#000000',
|
|
71
|
+
buttonBgColor: '#007eb6',
|
|
72
|
+
buttonTextColor: '#ffffff',
|
|
73
|
+
blurBackground: true,
|
|
74
|
+
innerBgColor: 'light',
|
|
75
|
+
multilanguage: true,
|
|
76
|
+
avatar: 'readyplayerme-full',
|
|
77
|
+
avatarURL:
|
|
78
|
+
'https://assets.memori.ai/api/v2/asset/692580d6-7b25-4ed0-84ce-82d5f4ac4270.glb#1762875775270',
|
|
79
|
+
name: 'Layout Storybook',
|
|
80
|
+
showShare: true,
|
|
81
|
+
}),
|
|
82
|
+
},
|
|
83
|
+
tenant,
|
|
84
|
+
layout: 'TOTEM',
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export const TotemWithHalfBodyAvatar = Template.bind({});
|
|
88
|
+
TotemWithHalfBodyAvatar.args = {
|
|
89
|
+
...DefaultLayout.args,
|
|
90
|
+
avatar3DURL:
|
|
91
|
+
'https://assets.memori.ai/api/v2/asset/acc38f4a-e4c3-4a21-9818-c3d1672820ea.glb#1762875973109',
|
|
92
|
+
integration: {
|
|
93
|
+
...baseIntegration,
|
|
94
|
+
customData: JSON.stringify({
|
|
95
|
+
textColor: '#000000',
|
|
96
|
+
buttonBgColor: '#007eb6',
|
|
97
|
+
buttonTextColor: '#ffffff',
|
|
98
|
+
blurBackground: true,
|
|
99
|
+
innerBgColor: 'light',
|
|
100
|
+
multilanguage: true,
|
|
101
|
+
avatar: 'readyplayerme',
|
|
102
|
+
avatarURL:
|
|
103
|
+
'https://assets.memori.ai/api/v2/asset/acc38f4a-e4c3-4a21-9818-c3d1672820ea.glb#1762875973109',
|
|
104
|
+
name: 'Layout Storybook',
|
|
105
|
+
showShare: true,
|
|
106
|
+
}),
|
|
107
|
+
},
|
|
108
|
+
tenant,
|
|
109
|
+
layout: 'TOTEM',
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export const TotemWithDefaultTotem = Template.bind({});
|
|
113
|
+
TotemWithDefaultTotem.args = {
|
|
114
|
+
...DefaultLayout.args,
|
|
115
|
+
integration: {
|
|
116
|
+
...baseIntegration,
|
|
117
|
+
customData: JSON.stringify({
|
|
118
|
+
textColor: '#000000',
|
|
119
|
+
buttonBgColor: '#007eb6',
|
|
120
|
+
buttonTextColor: '#ffffff',
|
|
121
|
+
blurBackground: true,
|
|
122
|
+
innerBgColor: 'light',
|
|
123
|
+
multilanguage: true,
|
|
124
|
+
avatar: 'default_totem',
|
|
125
|
+
name: 'Layout Storybook',
|
|
126
|
+
showShare: true,
|
|
127
|
+
}),
|
|
128
|
+
},
|
|
129
|
+
tenant,
|
|
130
|
+
layout: 'TOTEM',
|
|
131
|
+
};
|
|
132
|
+
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Meta, Story } from '@storybook/react';
|
|
3
|
+
import { memori, tenant } from '../../../mocks/data';
|
|
4
|
+
import { Props } from '../../MemoriWidget/MemoriWidget';
|
|
5
|
+
import Memori from '../../../index';
|
|
6
|
+
import I18nWrapper from '../../../I18nWrapper';
|
|
7
|
+
import { VisemeProvider } from '../../../context/visemeContext';
|
|
8
|
+
import { ArtifactProvider } from '../../MemoriArtifactSystem/context/ArtifactContext';
|
|
9
|
+
|
|
10
|
+
const meta: Meta = {
|
|
11
|
+
title: 'General/Layouts/ZoomedFullBody',
|
|
12
|
+
component: (args: Props) => <Memori {...args} engineURL="https://engine.memori.ai" apiURL="https://backend.memori.ai" baseURL="https://www.aisuru.com" />,
|
|
13
|
+
argTypes: {},
|
|
14
|
+
parameters: {
|
|
15
|
+
controls: { expanded: true },
|
|
16
|
+
layout: 'fullscreen',
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export default meta;
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
const Template: Story<Props> = args => (
|
|
24
|
+
<I18nWrapper>
|
|
25
|
+
<ArtifactProvider>
|
|
26
|
+
<VisemeProvider>
|
|
27
|
+
<Memori {...args} />
|
|
28
|
+
</VisemeProvider>
|
|
29
|
+
</ArtifactProvider>
|
|
30
|
+
</I18nWrapper>
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
const DefaultLayout = Template.bind({});
|
|
34
|
+
DefaultLayout.args = {
|
|
35
|
+
memoriName: 'Layout Storybook',
|
|
36
|
+
ownerUserName: 'andrea.patini',
|
|
37
|
+
memoriID: '157860e8-f014-43b3-a7c5-fb4a08c87025',
|
|
38
|
+
ownerUserID: '95753bbe-9e88-4799-ae35-dc060bc11c48',
|
|
39
|
+
tenantID: 'www.aisuru.com',
|
|
40
|
+
engineURL: 'https://engine.memori.ai/memori/v2',
|
|
41
|
+
apiURL: 'https://backend.memori.ai/api/v2',
|
|
42
|
+
baseURL: 'https://www.aisuru.com',
|
|
43
|
+
layout: 'FULL_CHAT',
|
|
44
|
+
uiLang: 'IT',
|
|
45
|
+
spokenLang: 'IT',
|
|
46
|
+
integrationID: '0b1256c1-530c-4e67-aef8-36667c8887bb',
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const baseIntegration = {
|
|
50
|
+
integrationID: '0b1256c1-530c-4e67-aef8-36667c8887bb',
|
|
51
|
+
memoriID: '157860e8-f014-43b3-a7c5-fb4a08c87025',
|
|
52
|
+
type: 'LANDING_EXPERIENCE',
|
|
53
|
+
state: 'NEW',
|
|
54
|
+
deviceEmails: null,
|
|
55
|
+
invocationText: null,
|
|
56
|
+
jobID: null,
|
|
57
|
+
publish: true,
|
|
58
|
+
creationTimestamp: '2022-06-13T14:44:52.833573Z',
|
|
59
|
+
lastChangeTimestamp: '2022-06-13T14:44:52.833573Z',
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export const ZoomedFullBodyWithFullBodyAvatar = Template.bind({});
|
|
63
|
+
ZoomedFullBodyWithFullBodyAvatar.args = {
|
|
64
|
+
...DefaultLayout.args,
|
|
65
|
+
avatar3DURL:
|
|
66
|
+
'https://assets.memori.ai/api/v2/asset/692580d6-7b25-4ed0-84ce-82d5f4ac4270.glb#1762875775270',
|
|
67
|
+
integration: {
|
|
68
|
+
...baseIntegration,
|
|
69
|
+
customData: JSON.stringify({
|
|
70
|
+
textColor: '#000000',
|
|
71
|
+
buttonBgColor: '#007eb6',
|
|
72
|
+
buttonTextColor: '#ffffff',
|
|
73
|
+
blurBackground: true,
|
|
74
|
+
innerBgColor: 'light',
|
|
75
|
+
multilanguage: true,
|
|
76
|
+
avatar: 'readyplayerme-full',
|
|
77
|
+
avatarURL:
|
|
78
|
+
'https://assets.memori.ai/api/v2/asset/692580d6-7b25-4ed0-84ce-82d5f4ac4270.glb#1762875775270',
|
|
79
|
+
name: 'Layout Storybook',
|
|
80
|
+
showShare: true,
|
|
81
|
+
}),
|
|
82
|
+
},
|
|
83
|
+
tenant,
|
|
84
|
+
layout: 'ZOOMED_FULL_BODY',
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export const ZoomedFullBodyWithHalfBodyAvatar = Template.bind({});
|
|
88
|
+
ZoomedFullBodyWithHalfBodyAvatar.args = {
|
|
89
|
+
...DefaultLayout.args,
|
|
90
|
+
avatar3DURL:
|
|
91
|
+
'https://assets.memori.ai/api/v2/asset/acc38f4a-e4c3-4a21-9818-c3d1672820ea.glb#1762875973109',
|
|
92
|
+
integration: {
|
|
93
|
+
...baseIntegration,
|
|
94
|
+
customData: JSON.stringify({
|
|
95
|
+
textColor: '#000000',
|
|
96
|
+
buttonBgColor: '#007eb6',
|
|
97
|
+
buttonTextColor: '#ffffff',
|
|
98
|
+
blurBackground: true,
|
|
99
|
+
innerBgColor: 'light',
|
|
100
|
+
multilanguage: true,
|
|
101
|
+
avatar: 'readyplayerme',
|
|
102
|
+
avatarURL:
|
|
103
|
+
'https://assets.memori.ai/api/v2/asset/acc38f4a-e4c3-4a21-9818-c3d1672820ea.glb#1762875973109',
|
|
104
|
+
name: 'Layout Storybook',
|
|
105
|
+
showShare: true,
|
|
106
|
+
}),
|
|
107
|
+
},
|
|
108
|
+
tenant,
|
|
109
|
+
layout: 'ZOOMED_FULL_BODY',
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export const ZoomedFullBodyWithDefaultTotem = Template.bind({});
|
|
113
|
+
ZoomedFullBodyWithDefaultTotem.args = {
|
|
114
|
+
...DefaultLayout.args,
|
|
115
|
+
integration: {
|
|
116
|
+
...baseIntegration,
|
|
117
|
+
customData: JSON.stringify({
|
|
118
|
+
textColor: '#000000',
|
|
119
|
+
buttonBgColor: '#007eb6',
|
|
120
|
+
buttonTextColor: '#ffffff',
|
|
121
|
+
blurBackground: true,
|
|
122
|
+
innerBgColor: 'light',
|
|
123
|
+
multilanguage: true,
|
|
124
|
+
avatar: 'default_totem',
|
|
125
|
+
name: 'Layout Storybook',
|
|
126
|
+
showShare: true,
|
|
127
|
+
}),
|
|
128
|
+
},
|
|
129
|
+
tenant,
|
|
130
|
+
layout: 'ZOOMED_FULL_BODY',
|
|
131
|
+
};
|
|
132
|
+
|