@kindly/react-chat 2.48.2 → 2.48.4
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/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +40 -40
- package/.storybook/main.js +0 -56
- package/.storybook/preview.js +0 -119
- package/stories/.eslintrc +0 -11
- package/stories/assets/settingsJson.js +0 -472
- package/stories/decorators/withContainer.js +0 -13
- package/stories/decorators/withProvider.js +0 -22
- package/stories/screens.stories/Chat/Composer.stories.jsx +0 -174
- package/stories/screens.stories/Chat/DateTime.stories.jsx +0 -136
- package/stories/screens.stories/Chat/FormStates.stories.jsx +0 -669
- package/stories/screens.stories/Chat/ImageCarousel.stories.jsx +0 -203
- package/stories/screens.stories/Chat/Notifications.stories.jsx +0 -184
- package/stories/screens.stories/Chat/TypingIndicator.stories.jsx +0 -143
- package/stories/screens.stories/Chat/index.stories.jsx +0 -798
- package/stories/screens.stories/ClosedButton.stories.jsx +0 -99
- package/stories/screens.stories/Feedback.stories.jsx +0 -108
- package/stories/screens.stories/Nudge.stories.jsx +0 -123
- package/stories/screens.stories/Options.stories.jsx +0 -220
- package/stories/screens.stories/PushGreeting.stories.jsx +0 -81
- package/stories/screens.stories/StartChat.stories.jsx +0 -109
- package/stories/utils/wait.js +0 -2
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { chromaticViewports } from '../../.storybook/preview';
|
|
4
|
-
import KindlyChatButton from '../../src/features/KindlyChatButton/KindlyChatButton';
|
|
5
|
-
import settingsJSON from '../assets/settingsJson';
|
|
6
|
-
import withContainer from '../decorators/withContainer';
|
|
7
|
-
import withMockProvider from '../decorators/withProvider';
|
|
8
|
-
|
|
9
|
-
const defaultBotSettings = {
|
|
10
|
-
welcomePage: settingsJSON.welcome_page,
|
|
11
|
-
feedbackForm: settingsJSON.feedback_form,
|
|
12
|
-
maintenanceAlert: settingsJSON.maintenance_alert,
|
|
13
|
-
...settingsJSON.settings,
|
|
14
|
-
...settingsJSON,
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
function Template(args, context) {
|
|
18
|
-
return <KindlyChatButton {...args} {...context} />;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export default {
|
|
22
|
-
title: 'Screen/StartChat',
|
|
23
|
-
component: KindlyChatButton,
|
|
24
|
-
decorators: [withContainer, withMockProvider],
|
|
25
|
-
parameters: {
|
|
26
|
-
botSettings: defaultBotSettings,
|
|
27
|
-
initialStateModifier: {
|
|
28
|
-
chatbubble: {
|
|
29
|
-
active: true,
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export const Regular = Template.bind({});
|
|
36
|
-
Regular.parameters = { chromatic: { viewports: chromaticViewports } };
|
|
37
|
-
|
|
38
|
-
export const WithLanguageChoice = Template.bind({});
|
|
39
|
-
WithLanguageChoice.parameters = {
|
|
40
|
-
botSettings: {
|
|
41
|
-
...defaultBotSettings,
|
|
42
|
-
languages: [
|
|
43
|
-
{
|
|
44
|
-
code: 'en',
|
|
45
|
-
name: 'English',
|
|
46
|
-
active: true,
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
code: 'nb',
|
|
50
|
-
name: 'Norsk (bokmål)',
|
|
51
|
-
active: true,
|
|
52
|
-
},
|
|
53
|
-
],
|
|
54
|
-
},
|
|
55
|
-
initialStateModifier: {
|
|
56
|
-
chatbubble: {
|
|
57
|
-
active: true,
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
export const WithPicture = Template.bind({});
|
|
63
|
-
WithPicture.parameters = {
|
|
64
|
-
botSettings: {
|
|
65
|
-
...defaultBotSettings,
|
|
66
|
-
welcomePage: {
|
|
67
|
-
...defaultBotSettings.welcomePage,
|
|
68
|
-
image: 'https://i.imgur.com/wcfVY0C.png',
|
|
69
|
-
type: 'PICTURE',
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
initialStateModifier: {
|
|
73
|
-
chatbubble: {
|
|
74
|
-
active: true,
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
export const TextLeftToRight = Template.bind({});
|
|
80
|
-
TextLeftToRight.parameters = {
|
|
81
|
-
botSettings: {
|
|
82
|
-
...defaultBotSettings,
|
|
83
|
-
text_right_to_left: true,
|
|
84
|
-
languages: [
|
|
85
|
-
{
|
|
86
|
-
code: 'ar',
|
|
87
|
-
name: 'Arabic',
|
|
88
|
-
active: true,
|
|
89
|
-
},
|
|
90
|
-
],
|
|
91
|
-
welcomePage: {
|
|
92
|
-
...defaultBotSettings.welcomePage,
|
|
93
|
-
header: {
|
|
94
|
-
en: 'مرحبا ، مرحبا بكم في chatbot لدينا!',
|
|
95
|
-
},
|
|
96
|
-
text: {
|
|
97
|
-
en: '<p>تم تدريب chatbot الخاص بنا على الإجابة عن الأسئلة المتعلقة بمنتجنا ، ولكنه يتعلم باستمرار. حاول أن تجعل أسئلتك دقيقة قدر الإمكان. لا تزود برنامج الدردشة الآلي بأي معلومات شخصية.</p>',
|
|
98
|
-
},
|
|
99
|
-
start_button: {
|
|
100
|
-
en: 'ابدأ الدردشة',
|
|
101
|
-
},
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
initialStateModifier: {
|
|
105
|
-
chatbubble: {
|
|
106
|
-
active: true,
|
|
107
|
-
},
|
|
108
|
-
},
|
|
109
|
-
};
|
package/stories/utils/wait.js
DELETED