@memori.ai/memori-react 8.10.1 → 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 +16 -0
- package/dist/components/MediaWidget/MediaItemWidget.js +40 -5
- package/dist/components/MediaWidget/MediaItemWidget.js.map +1 -1
- package/esm/components/MediaWidget/MediaItemWidget.js +40 -5
- package/esm/components/MediaWidget/MediaItemWidget.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Chat/__snapshots__/Chat.test.tsx.snap +6 -6
- package/src/components/MediaWidget/MediaItemWidget.stories.tsx +69 -0
- package/src/components/MediaWidget/MediaItemWidget.tsx +66 -18
- package/src/components/MediaWidget/__snapshots__/MediaItemWidget.test.tsx.snap +10 -10
- package/src/components/MediaWidget/__snapshots__/MediaWidget.test.tsx.snap +2 -2
- 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 -326
|
@@ -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
|
+
|