@kindly/react-chat 2.41.4 → 2.41.5
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/.storybook/main.js +2 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +16 -17
- package/stories/screens.stories/Chat/DateTime.stories.jsx +136 -0
- package/stories/screens.stories/Chat/FormStates.stories.jsx +186 -24
- package/stories/screens.stories/Chat/index.stories.jsx +33 -35
|
@@ -37,6 +37,11 @@ export default {
|
|
|
37
37
|
},
|
|
38
38
|
};
|
|
39
39
|
|
|
40
|
+
const todayTime = new Date();
|
|
41
|
+
todayTime.setHours(13);
|
|
42
|
+
todayTime.setMinutes(37);
|
|
43
|
+
const created = todayTime.toISOString();
|
|
44
|
+
|
|
40
45
|
const defaultParameters = {
|
|
41
46
|
botSettings: defaultBotSettings,
|
|
42
47
|
initialStateModifier: {
|
|
@@ -61,12 +66,12 @@ const defaultParameters = {
|
|
|
61
66
|
exchange_type: 'greeting',
|
|
62
67
|
exchange_id: '1',
|
|
63
68
|
reply_type: 'STANDARD',
|
|
64
|
-
created
|
|
69
|
+
created,
|
|
65
70
|
id: '1',
|
|
66
71
|
},
|
|
67
72
|
{
|
|
68
73
|
id: '2',
|
|
69
|
-
created
|
|
74
|
+
created,
|
|
70
75
|
message: 'What is the meaning of life?',
|
|
71
76
|
status: null,
|
|
72
77
|
},
|
|
@@ -86,11 +91,11 @@ const defaultParameters = {
|
|
|
86
91
|
exchange_type: 'usersays',
|
|
87
92
|
exchange_id: '3',
|
|
88
93
|
title: 'The meaning of life',
|
|
89
|
-
created
|
|
94
|
+
created,
|
|
90
95
|
id: '3',
|
|
91
96
|
},
|
|
92
97
|
],
|
|
93
|
-
messageSentTime: '
|
|
98
|
+
messageSentTime: '2020-12-01T12:00:00.000Z',
|
|
94
99
|
lastMessageSeen: {
|
|
95
100
|
id: '3',
|
|
96
101
|
index: 3,
|
|
@@ -143,7 +148,7 @@ BotIsTyping.parameters = {
|
|
|
143
148
|
chatMessages: [
|
|
144
149
|
{
|
|
145
150
|
id: '2',
|
|
146
|
-
created
|
|
151
|
+
created,
|
|
147
152
|
message: 'What is the meaning of life?',
|
|
148
153
|
status: null,
|
|
149
154
|
},
|
|
@@ -201,12 +206,11 @@ HiddenInput.parameters = {
|
|
|
201
206
|
label: 'Click here to continue',
|
|
202
207
|
value: 'clicked',
|
|
203
208
|
index: 0,
|
|
204
|
-
|
|
205
|
-
updated_at: '2022-06-11T20:14:06.291003Z',
|
|
209
|
+
created,
|
|
206
210
|
is_active: true,
|
|
207
211
|
},
|
|
208
212
|
],
|
|
209
|
-
created
|
|
213
|
+
created,
|
|
210
214
|
title: 'noinput',
|
|
211
215
|
chatbubble_hide_input_field: true,
|
|
212
216
|
},
|
|
@@ -236,42 +240,42 @@ MultilineBotMessage.parameters = {
|
|
|
236
240
|
from_bot: true,
|
|
237
241
|
sender: 'BOT',
|
|
238
242
|
message: MESSAGES.single,
|
|
239
|
-
created
|
|
243
|
+
created,
|
|
240
244
|
id: '1',
|
|
241
245
|
},
|
|
242
246
|
{
|
|
243
247
|
from_bot: true,
|
|
244
248
|
sender: 'BOT',
|
|
245
249
|
message: MESSAGES.double,
|
|
246
|
-
created
|
|
250
|
+
created,
|
|
247
251
|
id: '2',
|
|
248
252
|
},
|
|
249
253
|
{
|
|
250
254
|
from_bot: true,
|
|
251
255
|
sender: 'BOT',
|
|
252
256
|
message: MESSAGES.multi,
|
|
253
|
-
created
|
|
257
|
+
created,
|
|
254
258
|
id: '3',
|
|
255
259
|
},
|
|
256
260
|
{
|
|
257
261
|
from_bot: false,
|
|
258
262
|
sender: 'USER',
|
|
259
263
|
message: MESSAGES.single,
|
|
260
|
-
created
|
|
264
|
+
created,
|
|
261
265
|
id: '1',
|
|
262
266
|
},
|
|
263
267
|
{
|
|
264
268
|
from_bot: false,
|
|
265
269
|
sender: 'USER',
|
|
266
270
|
message: MESSAGES.double,
|
|
267
|
-
created
|
|
271
|
+
created,
|
|
268
272
|
id: '2',
|
|
269
273
|
},
|
|
270
274
|
{
|
|
271
275
|
from_bot: false,
|
|
272
276
|
sender: 'USER',
|
|
273
277
|
message: MESSAGES.multi,
|
|
274
|
-
created
|
|
278
|
+
created,
|
|
275
279
|
id: '3',
|
|
276
280
|
},
|
|
277
281
|
],
|
|
@@ -341,19 +345,19 @@ GroupsOfMessages.parameters = {
|
|
|
341
345
|
chatMessages: [
|
|
342
346
|
{
|
|
343
347
|
id: '1',
|
|
344
|
-
created
|
|
348
|
+
created,
|
|
345
349
|
message: 'Hipp',
|
|
346
350
|
status: null,
|
|
347
351
|
},
|
|
348
352
|
{
|
|
349
353
|
id: '2',
|
|
350
|
-
created
|
|
354
|
+
created,
|
|
351
355
|
message: 'Hipp',
|
|
352
356
|
status: null,
|
|
353
357
|
},
|
|
354
358
|
{
|
|
355
359
|
id: '3',
|
|
356
|
-
created
|
|
360
|
+
created,
|
|
357
361
|
message: 'Hurra!',
|
|
358
362
|
status: null,
|
|
359
363
|
},
|
|
@@ -362,21 +366,21 @@ GroupsOfMessages.parameters = {
|
|
|
362
366
|
from_bot: true,
|
|
363
367
|
sender: 'BOT',
|
|
364
368
|
message: 'Hipp',
|
|
365
|
-
created
|
|
369
|
+
created,
|
|
366
370
|
},
|
|
367
371
|
{
|
|
368
372
|
id: '5',
|
|
369
373
|
from_bot: true,
|
|
370
374
|
sender: 'BOT',
|
|
371
375
|
message: 'Hipp',
|
|
372
|
-
created
|
|
376
|
+
created,
|
|
373
377
|
},
|
|
374
378
|
{
|
|
375
379
|
id: '6',
|
|
376
380
|
from_bot: true,
|
|
377
381
|
sender: 'BOT',
|
|
378
382
|
message: 'Hurra!',
|
|
379
|
-
created
|
|
383
|
+
created,
|
|
380
384
|
},
|
|
381
385
|
],
|
|
382
386
|
},
|
|
@@ -400,7 +404,7 @@ HandoverRequested.parameters = {
|
|
|
400
404
|
chatMessages: [
|
|
401
405
|
{
|
|
402
406
|
id: '1',
|
|
403
|
-
created
|
|
407
|
+
created,
|
|
404
408
|
message: 'Could I please talk with a human person?',
|
|
405
409
|
status: null,
|
|
406
410
|
},
|
|
@@ -459,7 +463,7 @@ Checkbox.parameters = {
|
|
|
459
463
|
is_active: true,
|
|
460
464
|
},
|
|
461
465
|
],
|
|
462
|
-
created
|
|
466
|
+
created,
|
|
463
467
|
},
|
|
464
468
|
],
|
|
465
469
|
},
|
|
@@ -475,7 +479,7 @@ Fallback.parameters = {
|
|
|
475
479
|
chatMessages: [
|
|
476
480
|
{
|
|
477
481
|
id: '0',
|
|
478
|
-
created
|
|
482
|
+
created,
|
|
479
483
|
message: 'What does recursive mean?',
|
|
480
484
|
status: null,
|
|
481
485
|
},
|
|
@@ -512,7 +516,7 @@ Fallback.parameters = {
|
|
|
512
516
|
],
|
|
513
517
|
},
|
|
514
518
|
],
|
|
515
|
-
created
|
|
519
|
+
created,
|
|
516
520
|
},
|
|
517
521
|
{
|
|
518
522
|
from_bot: true,
|
|
@@ -523,7 +527,7 @@ Fallback.parameters = {
|
|
|
523
527
|
exchange_type: 'fallback',
|
|
524
528
|
title: '🙅 [Fallback suggestion dismissed by user]',
|
|
525
529
|
handler: 'FALLBACK',
|
|
526
|
-
created
|
|
530
|
+
created,
|
|
527
531
|
id: '2',
|
|
528
532
|
},
|
|
529
533
|
],
|
|
@@ -553,7 +557,7 @@ VideoEmbed.args = {
|
|
|
553
557
|
message_format: 'txt',
|
|
554
558
|
video_source: videoSourceList.find((videoSourceMap) => videoSourceMap[0] === videoSource)[1],
|
|
555
559
|
title: 'embed',
|
|
556
|
-
created
|
|
560
|
+
created,
|
|
557
561
|
},
|
|
558
562
|
],
|
|
559
563
|
},
|
|
@@ -638,7 +642,7 @@ ImageGallery.args = {
|
|
|
638
642
|
].slice(0, imageQuantity),
|
|
639
643
|
image_carousel_size: imageCarouselSize,
|
|
640
644
|
title: 'Image Gallery',
|
|
641
|
-
created
|
|
645
|
+
created,
|
|
642
646
|
},
|
|
643
647
|
],
|
|
644
648
|
},
|
|
@@ -700,7 +704,6 @@ Slider.parameters = {
|
|
|
700
704
|
language_code: 'en',
|
|
701
705
|
label: 'Choose a value between 1 and 42',
|
|
702
706
|
index: 0,
|
|
703
|
-
created_at: '2022-06-15T19:03:46.186406Z',
|
|
704
707
|
slider_details: {
|
|
705
708
|
id: '1',
|
|
706
709
|
from_value: 1,
|
|
@@ -718,10 +721,9 @@ Slider.parameters = {
|
|
|
718
721
|
label: 'Submit',
|
|
719
722
|
value: '1',
|
|
720
723
|
index: 1,
|
|
721
|
-
created_at: '2022-06-15T19:03:46.186495Z',
|
|
722
724
|
},
|
|
723
725
|
],
|
|
724
|
-
created
|
|
726
|
+
created,
|
|
725
727
|
title: 'slider',
|
|
726
728
|
id: '1',
|
|
727
729
|
},
|
|
@@ -752,8 +754,6 @@ LeaveContactDetails.parameters = {
|
|
|
752
754
|
label: 'Call us',
|
|
753
755
|
value: '69420',
|
|
754
756
|
index: 0,
|
|
755
|
-
created_at: '2022-06-11T19:49:29.870793Z',
|
|
756
|
-
updated_at: '2022-06-11T19:49:29.871010Z',
|
|
757
757
|
is_active: true,
|
|
758
758
|
},
|
|
759
759
|
{
|
|
@@ -763,8 +763,6 @@ LeaveContactDetails.parameters = {
|
|
|
763
763
|
label: 'Email us',
|
|
764
764
|
value: "contact@kindly.ai?subject=Email%20from%20storybook&body=Don't%20send%20that!",
|
|
765
765
|
index: 1,
|
|
766
|
-
created_at: '2022-06-11T19:49:29.870865Z',
|
|
767
|
-
updated_at: '2022-06-11T19:49:29.871033Z',
|
|
768
766
|
is_active: true,
|
|
769
767
|
email_details: {
|
|
770
768
|
id: '1',
|
|
@@ -788,7 +786,7 @@ LeaveContactDetails.parameters = {
|
|
|
788
786
|
},
|
|
789
787
|
],
|
|
790
788
|
title: 'Contacts',
|
|
791
|
-
created
|
|
789
|
+
created,
|
|
792
790
|
},
|
|
793
791
|
],
|
|
794
792
|
},
|