@seamly/web-ui 19.1.3 → 20.0.0-beta.3
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/build/dist/lib/components.js +2 -1
- package/build/dist/lib/components.min.js +1 -1
- package/build/dist/lib/index.debug.js +188 -111
- package/build/dist/lib/index.debug.min.js +1 -1
- package/build/dist/lib/index.debug.min.js.LICENSE.txt +48 -20
- package/build/dist/lib/index.js +11764 -11970
- package/build/dist/lib/index.min.js +1 -1
- package/build/dist/lib/index.min.js.LICENSE.txt +0 -5
- package/build/dist/lib/standalone.js +7131 -7333
- package/build/dist/lib/standalone.min.js +1 -1
- package/build/dist/lib/standalone.min.js.LICENSE.txt +0 -5
- package/build/dist/lib/style-guide.js +2117 -2007
- package/build/dist/lib/style-guide.min.js +1 -1
- package/build/dist/lib/styles.css +1 -1
- package/package.json +1 -2
- package/src/.DS_Store +0 -0
- package/src/icons/icon_file-32.svg +1 -1
- package/src/javascripts/api/index.js +48 -37
- package/src/javascripts/config.js +1 -5
- package/src/javascripts/domains/app/actions.js +22 -5
- package/src/javascripts/domains/config/actions.js +3 -0
- package/src/javascripts/domains/config/reducer.js +9 -0
- package/src/javascripts/domains/forms/hooks.js +3 -1
- package/src/javascripts/domains/forms/provider.js +12 -0
- package/src/javascripts/domains/forms/reducer.js +2 -0
- package/src/javascripts/domains/i18n/hooks.js +2 -1
- package/src/javascripts/domains/i18n/reducer.js +2 -0
- package/src/javascripts/domains/interrupt/reducer.js +2 -2
- package/src/javascripts/domains/options/middleware.js +15 -31
- package/src/javascripts/domains/store/index.js +2 -1
- package/src/javascripts/domains/store/state-reducer.js +3 -8
- package/src/javascripts/domains/translations/components/options-dialog/form.js +1 -1
- package/src/javascripts/domains/translations/components/options-dialog/index.js +15 -1
- package/src/javascripts/domains/translations/reducer.js +2 -0
- package/src/javascripts/domains/visibility/actions.js +1 -1
- package/src/javascripts/domains/visibility/hooks.js +10 -8
- package/src/javascripts/domains/visibility/utils.js +1 -2
- package/src/javascripts/index.js +7 -2
- package/src/javascripts/lib/css.js +7 -1
- package/src/javascripts/lib/engine/index.js +4 -3
- package/src/javascripts/lib/external-api/index.js +38 -29
- package/src/javascripts/package/components.js +2 -1
- package/src/javascripts/style-guide/components/app.js +4 -4
- package/src/javascripts/style-guide/components/static-core.js +9 -3
- package/src/javascripts/style-guide/components/view.js +0 -1
- package/src/javascripts/style-guide/states.js +468 -348
- package/src/javascripts/ui/components/chat-app.js +1 -1
- package/src/javascripts/ui/components/conversation/component-filter.js +6 -0
- package/src/javascripts/ui/components/conversation/event/carousel-component/index.js +8 -1
- package/src/javascripts/ui/components/conversation/event/carousel-message/components/slide.js +2 -3
- package/src/javascripts/ui/components/conversation/event/conversation-suggestions.js +70 -0
- package/src/javascripts/ui/components/conversation/event/participant.js +2 -5
- package/src/javascripts/ui/components/conversation/event/splash.js +26 -0
- package/src/javascripts/ui/components/conversation/event/text.js +1 -2
- package/src/javascripts/ui/components/core/seamly-core.js +12 -9
- package/src/javascripts/ui/components/core/seamly-event-subscriber.js +4 -10
- package/src/javascripts/ui/components/core/seamly-instance-functions-loader.js +1 -8
- package/src/javascripts/ui/components/entry/entry-container.js +5 -3
- package/src/javascripts/ui/components/entry/text-entry/index.js +7 -1
- package/src/javascripts/ui/components/entry/text-entry/text-entry-form.js +5 -1
- package/src/javascripts/ui/components/entry/toggle-button.js +4 -2
- package/src/javascripts/ui/components/entry/upload/file-upload-form.js +1 -1
- package/src/javascripts/ui/components/form-controls/error.js +6 -2
- package/src/javascripts/ui/components/form-controls/form.js +26 -3
- package/src/javascripts/ui/components/layout/app-frame.js +24 -15
- package/src/javascripts/ui/components/layout/chat-frame.js +0 -2
- package/src/javascripts/ui/components/layout/deprecated-app-frame.js +86 -0
- package/src/javascripts/ui/components/layout/modal-wrapper.js +0 -80
- package/src/javascripts/ui/components/layout/pre-chat-messages.js +45 -0
- package/src/javascripts/ui/components/options/options-frame.js +9 -4
- package/src/javascripts/ui/components/options/options.js +1 -4
- package/src/javascripts/ui/components/options/transcript/index.js +15 -1
- package/src/javascripts/ui/components/options/transcript/transcript-form.js +1 -1
- package/src/javascripts/ui/components/suggestions/index.js +174 -0
- package/src/javascripts/ui/components/suggestions/suggestions-item.js +40 -0
- package/src/javascripts/ui/components/suggestions/suggestions-list.js +24 -0
- package/src/javascripts/ui/components/view/app-view.js +21 -0
- package/src/javascripts/ui/components/view/deprecated-view.js +32 -0
- package/src/javascripts/ui/components/view/index.js +27 -0
- package/src/javascripts/ui/components/view/inline-view.js +45 -0
- package/src/javascripts/ui/components/view/window-view/collapse-button.js +20 -0
- package/src/javascripts/ui/components/view/window-view/index.js +82 -0
- package/src/javascripts/ui/components/view/window-view/window-open-button.js +68 -0
- package/src/javascripts/ui/components/widgets/lightbox.js +7 -2
- package/src/javascripts/ui/hooks/component-helper-hooks.js +0 -9
- package/src/javascripts/ui/hooks/seamly-hooks.js +0 -1
- package/src/javascripts/ui/hooks/seamly-state-hooks.js +28 -4
- package/src/javascripts/ui/hooks/use-seamly-chat.js +12 -3
- package/src/javascripts/ui/hooks/use-seamly-commands.js +4 -31
- package/src/javascripts/ui/utils/seamly-utils.js +2 -14
- package/src/stylesheets/1-settings/_animations.scss +0 -6
- package/src/stylesheets/1-settings/_config.scss +34 -35
- package/src/stylesheets/2-tools/_functions.scss +0 -5
- package/src/stylesheets/2-tools/_mixins.scss +4 -16
- package/src/stylesheets/3-app/_app.scss +78 -135
- package/src/stylesheets/4-base/_a11y.scss +0 -3
- package/src/stylesheets/4-base/_elements.scss +0 -11
- package/src/stylesheets/4-base/_formelements.scss +4 -14
- package/src/stylesheets/5-components/_avatar.scss +2 -44
- package/src/stylesheets/5-components/_buttons.scss +6 -45
- package/src/stylesheets/5-components/_chat-status.scss +14 -38
- package/src/stylesheets/5-components/_choice-prompt.scss +33 -2
- package/src/stylesheets/5-components/_collapse-button.scss +16 -0
- package/src/stylesheets/5-components/_conversation.scss +26 -2
- package/src/stylesheets/5-components/_disclaimer.scss +10 -12
- package/src/stylesheets/5-components/_divider.scss +7 -4
- package/src/stylesheets/5-components/_error.scss +19 -9
- package/src/stylesheets/5-components/_form.scss +9 -0
- package/src/stylesheets/5-components/_icon.scss +10 -1
- package/src/stylesheets/5-components/_idle.scss +0 -8
- package/src/stylesheets/5-components/_input.scss +14 -20
- package/src/stylesheets/5-components/_interrupt.scss +0 -2
- package/src/stylesheets/5-components/_loader.scss +0 -32
- package/src/stylesheets/5-components/_message-author.scss +40 -0
- package/src/stylesheets/5-components/_message-body.scss +194 -0
- package/src/stylesheets/5-components/_message-card.scss +55 -0
- package/src/stylesheets/5-components/_message-carousel.scss +143 -0
- package/src/stylesheets/5-components/_message-count.scss +11 -28
- package/src/stylesheets/5-components/_message-cta.scss +23 -0
- package/src/stylesheets/5-components/_message-info.scss +11 -0
- package/src/stylesheets/5-components/_message-translation-info.scss +17 -0
- package/src/stylesheets/5-components/_message.scss +13 -364
- package/src/stylesheets/5-components/_modal.scss +28 -58
- package/src/stylesheets/5-components/_notification.scss +0 -5
- package/src/stylesheets/5-components/_options.scss +27 -42
- package/src/stylesheets/5-components/_pre-chat-messages.scss +30 -0
- package/src/stylesheets/5-components/_prompt.scss +0 -8
- package/src/stylesheets/5-components/_skip-link.scss +3 -3
- package/src/stylesheets/5-components/_suggestions.scss +96 -0
- package/src/stylesheets/5-components/_unstarted.scss +50 -0
- package/src/stylesheets/5-components/_upload.scss +26 -28
- package/src/stylesheets/5-components/_window-open-button.scss +39 -0
- package/src/stylesheets/6-webui-only/_hover.scss +151 -0
- package/src/stylesheets/6-webui-only/_scrollbar.scss +31 -0
- package/src/stylesheets/7-deprecated/1-settings/_animations.scss +43 -0
- package/src/stylesheets/7-deprecated/1-settings/_config.scss +105 -0
- package/src/stylesheets/7-deprecated/2-tools/_functions.scss +22 -0
- package/src/stylesheets/7-deprecated/2-tools/_mixins.scss +77 -0
- package/src/stylesheets/7-deprecated/3-app/_app.scss +214 -0
- package/src/stylesheets/7-deprecated/4-base/_a11y.scss +14 -0
- package/src/stylesheets/7-deprecated/4-base/_elements.scss +21 -0
- package/src/stylesheets/7-deprecated/4-base/_formelements.scss +57 -0
- package/src/stylesheets/{5-components → 7-deprecated/5-components}/_agent-info.scss +0 -0
- package/src/stylesheets/7-deprecated/5-components/_avatar.scss +64 -0
- package/src/stylesheets/7-deprecated/5-components/_buttons.scss +94 -0
- package/src/stylesheets/{5-components → 7-deprecated/5-components}/_card.scss +0 -0
- package/src/stylesheets/{5-components → 7-deprecated/5-components}/_carousel.scss +0 -0
- package/src/stylesheets/7-deprecated/5-components/_character-limit.scss +36 -0
- package/src/stylesheets/{5-components/_cobrowsing.scss → 7-deprecated/5-components/_chat-status.scss} +18 -16
- package/src/stylesheets/7-deprecated/5-components/_choice-prompt.scss +27 -0
- package/src/stylesheets/7-deprecated/5-components/_collapse-button.scss +17 -0
- package/src/stylesheets/7-deprecated/5-components/_conversation.scss +44 -0
- package/src/stylesheets/7-deprecated/5-components/_disclaimer.scss +36 -0
- package/src/stylesheets/7-deprecated/5-components/_divider.scss +91 -0
- package/src/stylesheets/7-deprecated/5-components/_error.scss +34 -0
- package/src/stylesheets/{5-components → 7-deprecated/5-components}/_faq.scss +8 -3
- package/src/stylesheets/{5-components → 7-deprecated/5-components}/_header-controls.scss +0 -0
- package/src/stylesheets/7-deprecated/5-components/_icon.scss +4 -0
- package/src/stylesheets/7-deprecated/5-components/_idle.scss +61 -0
- package/src/stylesheets/7-deprecated/5-components/_input.scss +78 -0
- package/src/stylesheets/7-deprecated/5-components/_interrupt.scss +35 -0
- package/src/stylesheets/7-deprecated/5-components/_loader.scss +78 -0
- package/src/stylesheets/7-deprecated/5-components/_message-count.scss +41 -0
- package/src/stylesheets/7-deprecated/5-components/_message.scss +385 -0
- package/src/stylesheets/7-deprecated/5-components/_modal.scss +138 -0
- package/src/stylesheets/7-deprecated/5-components/_notification.scss +20 -0
- package/src/stylesheets/7-deprecated/5-components/_options.scss +284 -0
- package/src/stylesheets/7-deprecated/5-components/_prompt.scss +44 -0
- package/src/stylesheets/7-deprecated/5-components/_skip-link.scss +21 -0
- package/src/stylesheets/{5-components → 7-deprecated/5-components}/_svg-graphic.scss +0 -0
- package/src/stylesheets/7-deprecated/5-components/_upload.scss +213 -0
- package/src/stylesheets/deprecated-view.scss +64 -0
- package/src/stylesheets/styles-webui-only.scss +3 -0
- package/src/stylesheets/styles.scss +15 -25
- package/webpack/config.common.js +7 -1
- package/webpack/config.site.js +4 -0
- package/webpack/config.test.js +1 -0
- package/webpack/defaults.js +5 -0
- package/src/javascripts/ui/components/conversation/event/hooks/use-text-rendering.js +0 -35
- package/src/javascripts/ui/components/layout/view.js +0 -36
- package/src/javascripts/ui/components/options/cobrowsing.js +0 -110
- package/src/javascripts/ui/components/warnings/cobrowsing-active-frame.js +0 -29
- package/src/javascripts/ui/components/warnings/cobrowsing-active.js +0 -33
- package/src/stylesheets/5-components/_modal_mode.scss +0 -108
|
@@ -40,7 +40,6 @@ const baseState = {
|
|
|
40
40
|
historyLoaded: false,
|
|
41
41
|
skiplinkTargetId: randomId(),
|
|
42
42
|
optionsButtonId: randomId(),
|
|
43
|
-
cobrowseContainerId: randomId(),
|
|
44
43
|
serviceData: {},
|
|
45
44
|
options: {
|
|
46
45
|
features: {},
|
|
@@ -66,7 +65,7 @@ const participantInfo = {
|
|
|
66
65
|
'e65fa8dc-97ab-4711-8fec-82bae6461aa2': {
|
|
67
66
|
avatar,
|
|
68
67
|
id: 'e65fa8dc-97ab-4711-8fec-82bae6461aa2',
|
|
69
|
-
introduction: "You're now talking to
|
|
68
|
+
introduction: "You're now talking to Mrs. Bot gimme a minit",
|
|
70
69
|
name: 'Mrs. Bot',
|
|
71
70
|
service: {
|
|
72
71
|
expose: { map: {}, version: 2 },
|
|
@@ -78,7 +77,7 @@ const participantInfo = {
|
|
|
78
77
|
},
|
|
79
78
|
'e65fa8dc-97ab-4711-8fec-82bae6461aa3': {
|
|
80
79
|
id: 'e65fa8dc-97ab-4711-8fec-82bae6461aa3',
|
|
81
|
-
introduction: "You're now talking to
|
|
80
|
+
introduction: "You're now talking to Mrs. Bot gimme a minit",
|
|
82
81
|
name: 'Mrs. Bot',
|
|
83
82
|
service: {
|
|
84
83
|
expose: { map: {}, version: 2 },
|
|
@@ -174,7 +173,6 @@ const infoMessage = {
|
|
|
174
173
|
body: {
|
|
175
174
|
text: 'This is a system generated info message',
|
|
176
175
|
type: 'text',
|
|
177
|
-
variables: {},
|
|
178
176
|
},
|
|
179
177
|
fromClient: false,
|
|
180
178
|
id: randomId(),
|
|
@@ -217,7 +215,7 @@ const participantMessage = {
|
|
|
217
215
|
participant: {
|
|
218
216
|
avatar,
|
|
219
217
|
id: 'e65fa8dc-97ab-4711-8fec-82bae6461aa2',
|
|
220
|
-
introduction: "You're now talking to
|
|
218
|
+
introduction: "You're now talking to Mrs. Bot gimme a minit",
|
|
221
219
|
name: 'Mrs. Bot',
|
|
222
220
|
service: {
|
|
223
221
|
expose: { map: {}, version: 2 },
|
|
@@ -241,7 +239,7 @@ const participantMessageDefaultIcon = {
|
|
|
241
239
|
messageStatus: 'received',
|
|
242
240
|
participant: {
|
|
243
241
|
id: 'e65fa8dc-97ab-4711-8fec-82bae6461aa3',
|
|
244
|
-
introduction: "You're now talking to
|
|
242
|
+
introduction: "You're now talking to Mrs. Bot gimme a minit",
|
|
245
243
|
name: 'Mrs. Bot',
|
|
246
244
|
service: {
|
|
247
245
|
expose: { map: {}, version: 2 },
|
|
@@ -263,7 +261,6 @@ const getCustomMessage = ({ type, data, text }) => ({
|
|
|
263
261
|
type,
|
|
264
262
|
text,
|
|
265
263
|
data,
|
|
266
|
-
variables: {},
|
|
267
264
|
},
|
|
268
265
|
participant: 'e65fa8dc-97ab-4711-8fec-82bae6461aa2',
|
|
269
266
|
service: {
|
|
@@ -287,7 +284,6 @@ const shortTextMessage = {
|
|
|
287
284
|
body: {
|
|
288
285
|
text: 'What do you want to do?',
|
|
289
286
|
type: 'text',
|
|
290
|
-
variables: {},
|
|
291
287
|
},
|
|
292
288
|
fromClient: false,
|
|
293
289
|
fromHistory: true,
|
|
@@ -305,6 +301,19 @@ const shortTextMessage = {
|
|
|
305
301
|
},
|
|
306
302
|
}
|
|
307
303
|
|
|
304
|
+
const splashMessage = {
|
|
305
|
+
type: 'message',
|
|
306
|
+
payload: {
|
|
307
|
+
type: 'splash',
|
|
308
|
+
id: randomId(),
|
|
309
|
+
body: {
|
|
310
|
+
text: 'Example splash message ✨',
|
|
311
|
+
type: 'text',
|
|
312
|
+
variables: {},
|
|
313
|
+
},
|
|
314
|
+
},
|
|
315
|
+
}
|
|
316
|
+
|
|
308
317
|
const ctaMessage = {
|
|
309
318
|
type: 'message',
|
|
310
319
|
payload: {
|
|
@@ -336,7 +345,6 @@ const longTextMessage = {
|
|
|
336
345
|
body: {
|
|
337
346
|
text: 'What do you want to do? This is a really long message from a bot that has a lot to say about a lot of things. Currently I am contemplating my own bot existence and constantly asking myself who I am. What do you want to do? This is a really long message from a bot that has a lot to say about a lot of things. Currently I am contemplating my own bot existence and constantly asking myself who I am. What do you want to do? This is a really long message from a bot that has a lot to say about a lot of things. Currently I am contemplating my own bot existence and constantly asking myself who I am.',
|
|
338
347
|
type: 'text',
|
|
339
|
-
variables: {},
|
|
340
348
|
},
|
|
341
349
|
fromClient: false,
|
|
342
350
|
fromHistory: true,
|
|
@@ -360,7 +368,6 @@ const textMessageBoldItalicUnderline = {
|
|
|
360
368
|
body: {
|
|
361
369
|
text: 'Bubble with **bold** *italic* <u>underline</u>',
|
|
362
370
|
type: 'text',
|
|
363
|
-
variables: {},
|
|
364
371
|
},
|
|
365
372
|
fromClient: false,
|
|
366
373
|
fromHistory: true,
|
|
@@ -382,24 +389,8 @@ const textMessageWithLinks = {
|
|
|
382
389
|
type: 'message',
|
|
383
390
|
payload: {
|
|
384
391
|
body: {
|
|
385
|
-
text: '
|
|
392
|
+
text: '<a href="https://google.com" data-link-id="1">Link in same window</a> and <a href="https://google.com" data-link-id="2" target="_blank">link in new window</a> embedded in text',
|
|
386
393
|
type: 'text',
|
|
387
|
-
variables: {
|
|
388
|
-
link_1: {
|
|
389
|
-
id: '1',
|
|
390
|
-
name: 'Link in same window',
|
|
391
|
-
newTab: false,
|
|
392
|
-
type: 'link',
|
|
393
|
-
url: 'https://google.com',
|
|
394
|
-
},
|
|
395
|
-
link_2: {
|
|
396
|
-
id: '2',
|
|
397
|
-
name: 'link in new window',
|
|
398
|
-
newTab: true,
|
|
399
|
-
type: 'link',
|
|
400
|
-
url: 'https://google.com',
|
|
401
|
-
},
|
|
402
|
-
},
|
|
403
394
|
},
|
|
404
395
|
fromClient: false,
|
|
405
396
|
fromHistory: true,
|
|
@@ -421,17 +412,8 @@ const textMessageWithLongLink = {
|
|
|
421
412
|
type: 'message',
|
|
422
413
|
payload: {
|
|
423
414
|
body: {
|
|
424
|
-
text: 'Here is a long link
|
|
415
|
+
text: 'Here is a long link <a href="https://google.com" data-link-id="1">click me click me please click me yoohoooo please please click me here I am click me now what are you waiting for click me now now now now now click meeeeeeeeeeeeee</a> embedded in text',
|
|
425
416
|
type: 'text',
|
|
426
|
-
variables: {
|
|
427
|
-
link_1: {
|
|
428
|
-
id: '1',
|
|
429
|
-
name: 'click me click me please click me yoohoooo please please click me here I am click me now what are you waiting for click me now now now now now click meeeeeeeeeeeeee',
|
|
430
|
-
newTab: false,
|
|
431
|
-
type: 'link',
|
|
432
|
-
url: 'https://google.com',
|
|
433
|
-
},
|
|
434
|
-
},
|
|
435
417
|
},
|
|
436
418
|
fromClient: false,
|
|
437
419
|
fromHistory: true,
|
|
@@ -455,7 +437,6 @@ const textMesageWithBullets = {
|
|
|
455
437
|
body: {
|
|
456
438
|
text: '<ul>\n<li>Bullets</li>\n<li>bullets</li>\n<li>bullets</li>\n</ul>\n',
|
|
457
439
|
type: 'text',
|
|
458
|
-
variables: {},
|
|
459
440
|
},
|
|
460
441
|
fromClient: false,
|
|
461
442
|
fromHistory: true,
|
|
@@ -563,11 +544,6 @@ const choicePromptMessage = {
|
|
|
563
544
|
text: 'T-Dialog',
|
|
564
545
|
type: 'choice',
|
|
565
546
|
},
|
|
566
|
-
{
|
|
567
|
-
id: '3555079c-6f60-45e1-82c7-5d5832634a3f',
|
|
568
|
-
text: 'Escalation - Cobrowser',
|
|
569
|
-
type: 'choice',
|
|
570
|
-
},
|
|
571
547
|
{
|
|
572
548
|
id: 'a8ba3ce8-3324-4e7a-accc-944ff78ac890',
|
|
573
549
|
text: 'Customers',
|
|
@@ -615,7 +591,6 @@ const userMessage = {
|
|
|
615
591
|
body: {
|
|
616
592
|
text: 'This is what the user typed',
|
|
617
593
|
type: 'text',
|
|
618
|
-
variables: {},
|
|
619
594
|
},
|
|
620
595
|
fromClient: true,
|
|
621
596
|
fromHistory: true,
|
|
@@ -634,7 +609,6 @@ const userMessageLong = {
|
|
|
634
609
|
body: {
|
|
635
610
|
text: 'This is what the user typed. And sometimes the user has quite a lot to say and then we get longer lines that need to wrap well and not break the styling so here goes with just such a line right here!!',
|
|
636
611
|
type: 'text',
|
|
637
|
-
variables: {},
|
|
638
612
|
},
|
|
639
613
|
fromClient: true,
|
|
640
614
|
fromHistory: true,
|
|
@@ -735,15 +709,55 @@ const translationsSlice = {
|
|
|
735
709
|
containerId: randomId(),
|
|
736
710
|
}
|
|
737
711
|
|
|
712
|
+
const suggestions = [
|
|
713
|
+
{
|
|
714
|
+
id: '1',
|
|
715
|
+
question: 'Invoices',
|
|
716
|
+
categories: ['mixed', 'short'],
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
id: '2',
|
|
720
|
+
question: 'Temporary subscription pause',
|
|
721
|
+
categories: ['mixed', 'medium'],
|
|
722
|
+
},
|
|
723
|
+
{
|
|
724
|
+
id: '3',
|
|
725
|
+
question: 'Cancellation',
|
|
726
|
+
categories: ['mixed', 'short'],
|
|
727
|
+
},
|
|
728
|
+
{
|
|
729
|
+
id: '4',
|
|
730
|
+
question: 'Apps',
|
|
731
|
+
categories: ['mixed', 'medium'],
|
|
732
|
+
},
|
|
733
|
+
{
|
|
734
|
+
id: '5',
|
|
735
|
+
question: 'At what date will my subscription end?',
|
|
736
|
+
categories: ['mixed', 'long'],
|
|
737
|
+
},
|
|
738
|
+
{
|
|
739
|
+
id: 'A',
|
|
740
|
+
question: 'Quotes',
|
|
741
|
+
categories: ['short'],
|
|
742
|
+
},
|
|
743
|
+
{
|
|
744
|
+
id: 'B',
|
|
745
|
+
question: 'How to get in touch with us',
|
|
746
|
+
categories: ['long'],
|
|
747
|
+
},
|
|
748
|
+
]
|
|
749
|
+
|
|
738
750
|
const categoryKeys = {
|
|
739
751
|
unstarted: 'unstarted',
|
|
740
752
|
messages: 'messages',
|
|
741
753
|
errors: 'errors',
|
|
742
754
|
uploads: 'uploads',
|
|
755
|
+
faq: 'faq',
|
|
743
756
|
features: 'features',
|
|
744
757
|
options: 'options',
|
|
745
|
-
|
|
746
|
-
|
|
758
|
+
suggestions: 'suggestions',
|
|
759
|
+
minimizedWindow: 'minimizedWindow',
|
|
760
|
+
minimizedInline: 'minimizedInline',
|
|
747
761
|
translations: 'translations',
|
|
748
762
|
}
|
|
749
763
|
|
|
@@ -764,6 +778,10 @@ export const categories = {
|
|
|
764
778
|
heading: 'File uploads',
|
|
765
779
|
description: '',
|
|
766
780
|
},
|
|
781
|
+
[categoryKeys.faq]: {
|
|
782
|
+
heading: 'FAQ',
|
|
783
|
+
description: '',
|
|
784
|
+
},
|
|
767
785
|
[categoryKeys.features]: {
|
|
768
786
|
heading: 'Other features',
|
|
769
787
|
description: '',
|
|
@@ -772,11 +790,18 @@ export const categories = {
|
|
|
772
790
|
heading: 'Options',
|
|
773
791
|
description: '',
|
|
774
792
|
},
|
|
775
|
-
[categoryKeys.
|
|
776
|
-
heading: '
|
|
793
|
+
[categoryKeys.suggestions]: {
|
|
794
|
+
heading: 'Suggestions',
|
|
795
|
+
description: '',
|
|
796
|
+
},
|
|
797
|
+
[categoryKeys.minimizedWindow]: {
|
|
798
|
+
heading: 'Minimized window',
|
|
799
|
+
desciption: '',
|
|
800
|
+
},
|
|
801
|
+
[categoryKeys.minimizedInline]: {
|
|
802
|
+
heading: 'Minimized Inline',
|
|
777
803
|
description: '',
|
|
778
804
|
},
|
|
779
|
-
[categoryKeys.minimized]: { heading: 'Minimized window', desciption: '' },
|
|
780
805
|
[categoryKeys.translations]: {
|
|
781
806
|
heading: 'Translations',
|
|
782
807
|
description: '',
|
|
@@ -838,6 +863,189 @@ const cardTopic = {
|
|
|
838
863
|
},
|
|
839
864
|
}
|
|
840
865
|
|
|
866
|
+
const faq = {
|
|
867
|
+
faqEmptyList: {
|
|
868
|
+
category: categoryKeys.faq,
|
|
869
|
+
headingText: 'Empty FAQ list',
|
|
870
|
+
description: '',
|
|
871
|
+
...baseState,
|
|
872
|
+
config: {
|
|
873
|
+
...baseState.config,
|
|
874
|
+
showFaq: true,
|
|
875
|
+
},
|
|
876
|
+
serviceData: {
|
|
877
|
+
suggestion: {
|
|
878
|
+
body: [],
|
|
879
|
+
},
|
|
880
|
+
},
|
|
881
|
+
},
|
|
882
|
+
faqList: {
|
|
883
|
+
category: categoryKeys.faq,
|
|
884
|
+
headingText: 'FAQ list',
|
|
885
|
+
description: '',
|
|
886
|
+
...baseState,
|
|
887
|
+
|
|
888
|
+
config: {
|
|
889
|
+
...baseState.config,
|
|
890
|
+
showFaq: true,
|
|
891
|
+
},
|
|
892
|
+
serviceData: {
|
|
893
|
+
suggestion: {
|
|
894
|
+
body: [
|
|
895
|
+
{
|
|
896
|
+
id: 1,
|
|
897
|
+
question: 'Lorem ipsum dolor sit amet',
|
|
898
|
+
categories: ['short'],
|
|
899
|
+
},
|
|
900
|
+
{
|
|
901
|
+
id: 2,
|
|
902
|
+
question:
|
|
903
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.',
|
|
904
|
+
categories: ['short'],
|
|
905
|
+
},
|
|
906
|
+
{
|
|
907
|
+
id: 3,
|
|
908
|
+
question:
|
|
909
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam',
|
|
910
|
+
categories: ['short'],
|
|
911
|
+
},
|
|
912
|
+
],
|
|
913
|
+
},
|
|
914
|
+
},
|
|
915
|
+
},
|
|
916
|
+
faqListLong: {
|
|
917
|
+
category: categoryKeys.faq,
|
|
918
|
+
headingText: 'Long FAQ list',
|
|
919
|
+
description: '',
|
|
920
|
+
...baseState,
|
|
921
|
+
config: {
|
|
922
|
+
...baseState.config,
|
|
923
|
+
showFaq: true,
|
|
924
|
+
},
|
|
925
|
+
serviceData: {
|
|
926
|
+
suggestion: {
|
|
927
|
+
body: [
|
|
928
|
+
{
|
|
929
|
+
id: 1,
|
|
930
|
+
question: 'Lorem ipsum dolor sit amet',
|
|
931
|
+
categories: ['long'],
|
|
932
|
+
},
|
|
933
|
+
{
|
|
934
|
+
id: 2,
|
|
935
|
+
question:
|
|
936
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.',
|
|
937
|
+
categories: ['long'],
|
|
938
|
+
},
|
|
939
|
+
{
|
|
940
|
+
id: 3,
|
|
941
|
+
question:
|
|
942
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam',
|
|
943
|
+
categories: ['long'],
|
|
944
|
+
},
|
|
945
|
+
{
|
|
946
|
+
id: 4,
|
|
947
|
+
question:
|
|
948
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed',
|
|
949
|
+
categories: ['long'],
|
|
950
|
+
},
|
|
951
|
+
{
|
|
952
|
+
id: 5,
|
|
953
|
+
question: 'Lorem ipsum dolor sit amet',
|
|
954
|
+
categories: ['long'],
|
|
955
|
+
},
|
|
956
|
+
{
|
|
957
|
+
id: 6,
|
|
958
|
+
question:
|
|
959
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.',
|
|
960
|
+
categories: ['long'],
|
|
961
|
+
},
|
|
962
|
+
{
|
|
963
|
+
id: 7,
|
|
964
|
+
question:
|
|
965
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam',
|
|
966
|
+
categories: ['long'],
|
|
967
|
+
},
|
|
968
|
+
{
|
|
969
|
+
id: 8,
|
|
970
|
+
question:
|
|
971
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed',
|
|
972
|
+
categories: ['long'],
|
|
973
|
+
},
|
|
974
|
+
{
|
|
975
|
+
id: 9,
|
|
976
|
+
question: 'Lorem ipsum dolor sit amet',
|
|
977
|
+
categories: ['long'],
|
|
978
|
+
},
|
|
979
|
+
{
|
|
980
|
+
id: 10,
|
|
981
|
+
question:
|
|
982
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.',
|
|
983
|
+
categories: ['long'],
|
|
984
|
+
},
|
|
985
|
+
{
|
|
986
|
+
id: 11,
|
|
987
|
+
question:
|
|
988
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam',
|
|
989
|
+
categories: ['long'],
|
|
990
|
+
},
|
|
991
|
+
{
|
|
992
|
+
id: 12,
|
|
993
|
+
question:
|
|
994
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed',
|
|
995
|
+
categories: ['long'],
|
|
996
|
+
},
|
|
997
|
+
{
|
|
998
|
+
id: 13,
|
|
999
|
+
question: 'Lorem ipsum dolor sit amet',
|
|
1000
|
+
categories: ['long'],
|
|
1001
|
+
},
|
|
1002
|
+
{
|
|
1003
|
+
id: 14,
|
|
1004
|
+
question:
|
|
1005
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.',
|
|
1006
|
+
categories: ['long'],
|
|
1007
|
+
},
|
|
1008
|
+
{
|
|
1009
|
+
id: 15,
|
|
1010
|
+
question:
|
|
1011
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam',
|
|
1012
|
+
categories: ['long'],
|
|
1013
|
+
},
|
|
1014
|
+
{
|
|
1015
|
+
id: 16,
|
|
1016
|
+
question:
|
|
1017
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed',
|
|
1018
|
+
categories: ['long'],
|
|
1019
|
+
},
|
|
1020
|
+
{
|
|
1021
|
+
id: 17,
|
|
1022
|
+
question: 'Lorem ipsum dolor sit amet',
|
|
1023
|
+
categories: ['long'],
|
|
1024
|
+
},
|
|
1025
|
+
{
|
|
1026
|
+
id: 18,
|
|
1027
|
+
question:
|
|
1028
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.',
|
|
1029
|
+
categories: ['long'],
|
|
1030
|
+
},
|
|
1031
|
+
{
|
|
1032
|
+
id: 19,
|
|
1033
|
+
question:
|
|
1034
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam',
|
|
1035
|
+
categories: ['long'],
|
|
1036
|
+
},
|
|
1037
|
+
{
|
|
1038
|
+
id: 20,
|
|
1039
|
+
question:
|
|
1040
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed',
|
|
1041
|
+
categories: ['long'],
|
|
1042
|
+
},
|
|
1043
|
+
],
|
|
1044
|
+
},
|
|
1045
|
+
},
|
|
1046
|
+
},
|
|
1047
|
+
}
|
|
1048
|
+
|
|
841
1049
|
const standardState = {
|
|
842
1050
|
base: {
|
|
843
1051
|
category: categoryKeys.unstarted,
|
|
@@ -973,7 +1181,6 @@ const standardState = {
|
|
|
973
1181
|
body: {
|
|
974
1182
|
text: 'Long ago when a dialog started',
|
|
975
1183
|
type: 'text',
|
|
976
|
-
variables: {},
|
|
977
1184
|
},
|
|
978
1185
|
},
|
|
979
1186
|
},
|
|
@@ -1035,7 +1242,6 @@ const standardState = {
|
|
|
1035
1242
|
body: {
|
|
1036
1243
|
text: 'Long ago when a dialog started',
|
|
1037
1244
|
type: 'text',
|
|
1038
|
-
variables: {},
|
|
1039
1245
|
},
|
|
1040
1246
|
},
|
|
1041
1247
|
},
|
|
@@ -1048,7 +1254,6 @@ const standardState = {
|
|
|
1048
1254
|
body: {
|
|
1049
1255
|
text: 'Above me should be a time indicator showing the full date',
|
|
1050
1256
|
type: 'text',
|
|
1051
|
-
variables: {},
|
|
1052
1257
|
},
|
|
1053
1258
|
},
|
|
1054
1259
|
},
|
|
@@ -1061,7 +1266,6 @@ const standardState = {
|
|
|
1061
1266
|
body: {
|
|
1062
1267
|
text: 'Another message',
|
|
1063
1268
|
type: 'text',
|
|
1064
|
-
variables: {},
|
|
1065
1269
|
},
|
|
1066
1270
|
},
|
|
1067
1271
|
},
|
|
@@ -1074,7 +1278,6 @@ const standardState = {
|
|
|
1074
1278
|
body: {
|
|
1075
1279
|
text: 'And another message',
|
|
1076
1280
|
type: 'text',
|
|
1077
|
-
variables: {},
|
|
1078
1281
|
},
|
|
1079
1282
|
},
|
|
1080
1283
|
},
|
|
@@ -1087,7 +1290,6 @@ const standardState = {
|
|
|
1087
1290
|
body: {
|
|
1088
1291
|
text: 'Above me should be a time indicator showing "yesterday"',
|
|
1089
1292
|
type: 'text',
|
|
1090
|
-
variables: {},
|
|
1091
1293
|
},
|
|
1092
1294
|
},
|
|
1093
1295
|
},
|
|
@@ -1100,7 +1302,6 @@ const standardState = {
|
|
|
1100
1302
|
body: {
|
|
1101
1303
|
text: 'Another message',
|
|
1102
1304
|
type: 'text',
|
|
1103
|
-
variables: {},
|
|
1104
1305
|
},
|
|
1105
1306
|
},
|
|
1106
1307
|
},
|
|
@@ -1113,7 +1314,6 @@ const standardState = {
|
|
|
1113
1314
|
body: {
|
|
1114
1315
|
text: 'And another message',
|
|
1115
1316
|
type: 'text',
|
|
1116
|
-
variables: {},
|
|
1117
1317
|
},
|
|
1118
1318
|
},
|
|
1119
1319
|
},
|
|
@@ -1126,7 +1326,6 @@ const standardState = {
|
|
|
1126
1326
|
body: {
|
|
1127
1327
|
text: 'Above me should be a time indicator showing me the dialog continues today',
|
|
1128
1328
|
type: 'text',
|
|
1129
|
-
variables: {},
|
|
1130
1329
|
},
|
|
1131
1330
|
},
|
|
1132
1331
|
},
|
|
@@ -1202,9 +1401,15 @@ const standardState = {
|
|
|
1202
1401
|
headingText: `Chat status bar`,
|
|
1203
1402
|
description: '',
|
|
1204
1403
|
...baseState,
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1404
|
+
translations: {
|
|
1405
|
+
...translationsSlice,
|
|
1406
|
+
currentLocale: 'nl',
|
|
1407
|
+
isActive: true,
|
|
1408
|
+
isAvailable: true,
|
|
1409
|
+
languages: [
|
|
1410
|
+
{ locale: 'nl', nativeName: 'Dutch' },
|
|
1411
|
+
{ locale: 'en', nativeName: 'English' },
|
|
1412
|
+
],
|
|
1208
1413
|
},
|
|
1209
1414
|
},
|
|
1210
1415
|
characterLimit: {
|
|
@@ -1368,7 +1573,7 @@ const standardState = {
|
|
|
1368
1573
|
...baseState,
|
|
1369
1574
|
options: {
|
|
1370
1575
|
...baseState.options,
|
|
1371
|
-
features: {
|
|
1576
|
+
features: { sendTranscript: { enabled: true } },
|
|
1372
1577
|
},
|
|
1373
1578
|
},
|
|
1374
1579
|
optionsSingleTriggerUnavailable: {
|
|
@@ -1378,7 +1583,7 @@ const standardState = {
|
|
|
1378
1583
|
...baseState,
|
|
1379
1584
|
options: {
|
|
1380
1585
|
...baseState.options,
|
|
1381
|
-
features: {
|
|
1586
|
+
features: { sendTranscript: { enabled: false } },
|
|
1382
1587
|
},
|
|
1383
1588
|
},
|
|
1384
1589
|
optionsMultiple: {
|
|
@@ -1407,270 +1612,42 @@ const standardState = {
|
|
|
1407
1612
|
},
|
|
1408
1613
|
},
|
|
1409
1614
|
},
|
|
1410
|
-
|
|
1615
|
+
optionSendTranscript: {
|
|
1411
1616
|
category: categoryKeys.options,
|
|
1412
|
-
headingText: '
|
|
1413
|
-
description: '',
|
|
1617
|
+
headingText: 'Send transcript option',
|
|
1618
|
+
description: 'Press submit to view error message',
|
|
1414
1619
|
...baseState,
|
|
1415
1620
|
options: {
|
|
1416
1621
|
...baseState.options,
|
|
1417
|
-
optionActive: '
|
|
1622
|
+
optionActive: 'sendTranscript',
|
|
1418
1623
|
panelActive: true,
|
|
1419
1624
|
features: {
|
|
1420
|
-
cobrowsing: { enabled: true },
|
|
1421
1625
|
sendTranscript: { enabled: true },
|
|
1422
1626
|
},
|
|
1423
1627
|
},
|
|
1424
1628
|
},
|
|
1425
|
-
|
|
1426
|
-
category: categoryKeys.
|
|
1427
|
-
headingText: '
|
|
1629
|
+
translationsAvailable: {
|
|
1630
|
+
category: categoryKeys.translations,
|
|
1631
|
+
headingText: 'Show translations available',
|
|
1632
|
+
description: '',
|
|
1633
|
+
...baseState,
|
|
1634
|
+
translations: {
|
|
1635
|
+
...translationsSlice,
|
|
1636
|
+
isAvailable: true,
|
|
1637
|
+
languages: [
|
|
1638
|
+
{ locale: 'nl', nativeName: 'Dutch' },
|
|
1639
|
+
{ locale: 'en', nativeName: 'English' },
|
|
1640
|
+
],
|
|
1641
|
+
},
|
|
1642
|
+
},
|
|
1643
|
+
translationsAvailableWithOptions: {
|
|
1644
|
+
category: categoryKeys.translations,
|
|
1645
|
+
headingText: 'Show translations available with other options available',
|
|
1428
1646
|
description: '',
|
|
1429
1647
|
...baseState,
|
|
1430
1648
|
options: {
|
|
1431
1649
|
...baseState.options,
|
|
1432
|
-
optionActive: 'cobrowsing',
|
|
1433
|
-
panelActive: true,
|
|
1434
|
-
userSelectedOptions: { cobrowsing: true },
|
|
1435
1650
|
features: {
|
|
1436
|
-
cobrowsing: { enabled: true },
|
|
1437
|
-
sendTranscript: { enabled: true },
|
|
1438
|
-
},
|
|
1439
|
-
},
|
|
1440
|
-
},
|
|
1441
|
-
optionCobrowseUnavailable: {
|
|
1442
|
-
category: categoryKeys.options,
|
|
1443
|
-
headingText: 'Cobrowse option unavailable',
|
|
1444
|
-
description: '',
|
|
1445
|
-
...baseState,
|
|
1446
|
-
options: {
|
|
1447
|
-
...baseState.options,
|
|
1448
|
-
optionActive: 'cobrowsing',
|
|
1449
|
-
panelActive: true,
|
|
1450
|
-
features: {
|
|
1451
|
-
cobrowsing: { enabled: false },
|
|
1452
|
-
sendTranscript: { enabled: true },
|
|
1453
|
-
},
|
|
1454
|
-
},
|
|
1455
|
-
},
|
|
1456
|
-
optionSendTranscript: {
|
|
1457
|
-
category: categoryKeys.options,
|
|
1458
|
-
headingText: 'Send transcript option',
|
|
1459
|
-
description: 'Press submit to view error message',
|
|
1460
|
-
...baseState,
|
|
1461
|
-
options: {
|
|
1462
|
-
...baseState.options,
|
|
1463
|
-
optionActive: 'sendTranscript',
|
|
1464
|
-
panelActive: true,
|
|
1465
|
-
features: {
|
|
1466
|
-
cobrowsing: { enabled: true },
|
|
1467
|
-
sendTranscript: { enabled: true },
|
|
1468
|
-
},
|
|
1469
|
-
},
|
|
1470
|
-
},
|
|
1471
|
-
faqEmptyList: {
|
|
1472
|
-
category: categoryKeys.faq,
|
|
1473
|
-
headingText: 'Empty FAQ list',
|
|
1474
|
-
description: '',
|
|
1475
|
-
...baseState,
|
|
1476
|
-
config: {
|
|
1477
|
-
...baseState.config,
|
|
1478
|
-
showFaq: true,
|
|
1479
|
-
},
|
|
1480
|
-
serviceData: {
|
|
1481
|
-
suggestion: {
|
|
1482
|
-
body: [],
|
|
1483
|
-
},
|
|
1484
|
-
},
|
|
1485
|
-
},
|
|
1486
|
-
faqList: {
|
|
1487
|
-
category: categoryKeys.faq,
|
|
1488
|
-
headingText: 'FAQ list',
|
|
1489
|
-
description: '',
|
|
1490
|
-
...baseState,
|
|
1491
|
-
|
|
1492
|
-
config: {
|
|
1493
|
-
...baseState.config,
|
|
1494
|
-
showFaq: true,
|
|
1495
|
-
},
|
|
1496
|
-
serviceData: {
|
|
1497
|
-
suggestion: {
|
|
1498
|
-
body: [
|
|
1499
|
-
{
|
|
1500
|
-
id: 1,
|
|
1501
|
-
question: 'Lorem ipsum dolor sit amet',
|
|
1502
|
-
categories: ['short'],
|
|
1503
|
-
},
|
|
1504
|
-
{
|
|
1505
|
-
id: 2,
|
|
1506
|
-
question:
|
|
1507
|
-
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.',
|
|
1508
|
-
categories: ['short'],
|
|
1509
|
-
},
|
|
1510
|
-
{
|
|
1511
|
-
id: 3,
|
|
1512
|
-
question:
|
|
1513
|
-
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam',
|
|
1514
|
-
categories: ['short'],
|
|
1515
|
-
},
|
|
1516
|
-
],
|
|
1517
|
-
},
|
|
1518
|
-
},
|
|
1519
|
-
},
|
|
1520
|
-
faqListLong: {
|
|
1521
|
-
category: categoryKeys.faq,
|
|
1522
|
-
headingText: 'Long FAQ list',
|
|
1523
|
-
description: '',
|
|
1524
|
-
...baseState,
|
|
1525
|
-
config: {
|
|
1526
|
-
...baseState.config,
|
|
1527
|
-
showFaq: true,
|
|
1528
|
-
},
|
|
1529
|
-
serviceData: {
|
|
1530
|
-
suggestion: {
|
|
1531
|
-
body: [
|
|
1532
|
-
{
|
|
1533
|
-
id: 1,
|
|
1534
|
-
question: 'Lorem ipsum dolor sit amet',
|
|
1535
|
-
categories: ['long'],
|
|
1536
|
-
},
|
|
1537
|
-
{
|
|
1538
|
-
id: 2,
|
|
1539
|
-
question:
|
|
1540
|
-
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.',
|
|
1541
|
-
categories: ['long'],
|
|
1542
|
-
},
|
|
1543
|
-
{
|
|
1544
|
-
id: 3,
|
|
1545
|
-
question:
|
|
1546
|
-
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam',
|
|
1547
|
-
categories: ['long'],
|
|
1548
|
-
},
|
|
1549
|
-
{
|
|
1550
|
-
id: 4,
|
|
1551
|
-
question:
|
|
1552
|
-
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed',
|
|
1553
|
-
categories: ['long'],
|
|
1554
|
-
},
|
|
1555
|
-
{
|
|
1556
|
-
id: 5,
|
|
1557
|
-
question: 'Lorem ipsum dolor sit amet',
|
|
1558
|
-
categories: ['long'],
|
|
1559
|
-
},
|
|
1560
|
-
{
|
|
1561
|
-
id: 6,
|
|
1562
|
-
question:
|
|
1563
|
-
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.',
|
|
1564
|
-
categories: ['long'],
|
|
1565
|
-
},
|
|
1566
|
-
{
|
|
1567
|
-
id: 7,
|
|
1568
|
-
question:
|
|
1569
|
-
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam',
|
|
1570
|
-
categories: ['long'],
|
|
1571
|
-
},
|
|
1572
|
-
{
|
|
1573
|
-
id: 8,
|
|
1574
|
-
question:
|
|
1575
|
-
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed',
|
|
1576
|
-
categories: ['long'],
|
|
1577
|
-
},
|
|
1578
|
-
{
|
|
1579
|
-
id: 9,
|
|
1580
|
-
question: 'Lorem ipsum dolor sit amet',
|
|
1581
|
-
categories: ['long'],
|
|
1582
|
-
},
|
|
1583
|
-
{
|
|
1584
|
-
id: 10,
|
|
1585
|
-
question:
|
|
1586
|
-
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.',
|
|
1587
|
-
categories: ['long'],
|
|
1588
|
-
},
|
|
1589
|
-
{
|
|
1590
|
-
id: 11,
|
|
1591
|
-
question:
|
|
1592
|
-
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam',
|
|
1593
|
-
categories: ['long'],
|
|
1594
|
-
},
|
|
1595
|
-
{
|
|
1596
|
-
id: 12,
|
|
1597
|
-
question:
|
|
1598
|
-
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed',
|
|
1599
|
-
categories: ['long'],
|
|
1600
|
-
},
|
|
1601
|
-
{
|
|
1602
|
-
id: 13,
|
|
1603
|
-
question: 'Lorem ipsum dolor sit amet',
|
|
1604
|
-
categories: ['long'],
|
|
1605
|
-
},
|
|
1606
|
-
{
|
|
1607
|
-
id: 14,
|
|
1608
|
-
question:
|
|
1609
|
-
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.',
|
|
1610
|
-
categories: ['long'],
|
|
1611
|
-
},
|
|
1612
|
-
{
|
|
1613
|
-
id: 15,
|
|
1614
|
-
question:
|
|
1615
|
-
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam',
|
|
1616
|
-
categories: ['long'],
|
|
1617
|
-
},
|
|
1618
|
-
{
|
|
1619
|
-
id: 16,
|
|
1620
|
-
question:
|
|
1621
|
-
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed',
|
|
1622
|
-
categories: ['long'],
|
|
1623
|
-
},
|
|
1624
|
-
{
|
|
1625
|
-
id: 17,
|
|
1626
|
-
question: 'Lorem ipsum dolor sit amet',
|
|
1627
|
-
categories: ['long'],
|
|
1628
|
-
},
|
|
1629
|
-
{
|
|
1630
|
-
id: 18,
|
|
1631
|
-
question:
|
|
1632
|
-
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.',
|
|
1633
|
-
categories: ['long'],
|
|
1634
|
-
},
|
|
1635
|
-
{
|
|
1636
|
-
id: 19,
|
|
1637
|
-
question:
|
|
1638
|
-
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam',
|
|
1639
|
-
categories: ['long'],
|
|
1640
|
-
},
|
|
1641
|
-
{
|
|
1642
|
-
id: 20,
|
|
1643
|
-
question:
|
|
1644
|
-
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed',
|
|
1645
|
-
categories: ['long'],
|
|
1646
|
-
},
|
|
1647
|
-
],
|
|
1648
|
-
},
|
|
1649
|
-
},
|
|
1650
|
-
},
|
|
1651
|
-
translationsAvailable: {
|
|
1652
|
-
category: categoryKeys.translations,
|
|
1653
|
-
headingText: 'Show translations available',
|
|
1654
|
-
description: '',
|
|
1655
|
-
...baseState,
|
|
1656
|
-
translations: {
|
|
1657
|
-
...translationsSlice,
|
|
1658
|
-
isAvailable: true,
|
|
1659
|
-
languages: [
|
|
1660
|
-
{ locale: 'nl', nativeName: 'Dutch' },
|
|
1661
|
-
{ locale: 'en', nativeName: 'English' },
|
|
1662
|
-
],
|
|
1663
|
-
},
|
|
1664
|
-
},
|
|
1665
|
-
translationsAvailableWithOptions: {
|
|
1666
|
-
category: categoryKeys.translations,
|
|
1667
|
-
headingText: 'Show translations available with other options available',
|
|
1668
|
-
description: '',
|
|
1669
|
-
...baseState,
|
|
1670
|
-
options: {
|
|
1671
|
-
...baseState.options,
|
|
1672
|
-
features: {
|
|
1673
|
-
cobrowsing: { enabled: true },
|
|
1674
1651
|
sendTranscript: { enabled: true },
|
|
1675
1652
|
},
|
|
1676
1653
|
},
|
|
@@ -1754,9 +1731,167 @@ const standardState = {
|
|
|
1754
1731
|
},
|
|
1755
1732
|
}
|
|
1756
1733
|
|
|
1757
|
-
const
|
|
1734
|
+
const inlineInterface = {
|
|
1735
|
+
minimizedInline: {
|
|
1736
|
+
category: categoryKeys.minimizedInline,
|
|
1737
|
+
headingText: 'Inline minimized',
|
|
1738
|
+
description: '',
|
|
1739
|
+
inline: {
|
|
1740
|
+
...baseState,
|
|
1741
|
+
config: {
|
|
1742
|
+
...baseState.config,
|
|
1743
|
+
layoutMode: 'inline',
|
|
1744
|
+
},
|
|
1745
|
+
visibility: {
|
|
1746
|
+
...baseState.visibility,
|
|
1747
|
+
visibility: visibilityStates.minimized,
|
|
1748
|
+
},
|
|
1749
|
+
},
|
|
1750
|
+
},
|
|
1751
|
+
minimizedInlinePrechat: {
|
|
1752
|
+
category: categoryKeys.minimizedInline,
|
|
1753
|
+
headingText: 'Inline minimized with pre-chat messages',
|
|
1754
|
+
description: '',
|
|
1755
|
+
inline: {
|
|
1756
|
+
...baseState,
|
|
1757
|
+
config: {
|
|
1758
|
+
...baseState.config,
|
|
1759
|
+
layoutMode: 'inline',
|
|
1760
|
+
preChatEvents: [splashMessage],
|
|
1761
|
+
},
|
|
1762
|
+
visibility: {
|
|
1763
|
+
...baseState.visibility,
|
|
1764
|
+
visibility: visibilityStates.minimized,
|
|
1765
|
+
},
|
|
1766
|
+
},
|
|
1767
|
+
},
|
|
1768
|
+
minimizedInlinePrechatSuggestions: {
|
|
1769
|
+
category: categoryKeys.minimizedInline,
|
|
1770
|
+
headingText: 'Inline minimized with pre-chat messages & suggestions',
|
|
1771
|
+
description: '',
|
|
1772
|
+
inline: {
|
|
1773
|
+
...baseState,
|
|
1774
|
+
config: {
|
|
1775
|
+
...baseState.config,
|
|
1776
|
+
layoutMode: 'inline',
|
|
1777
|
+
preChatEvents: [splashMessage],
|
|
1778
|
+
},
|
|
1779
|
+
serviceData: {
|
|
1780
|
+
suggestion: {
|
|
1781
|
+
body: suggestions,
|
|
1782
|
+
},
|
|
1783
|
+
},
|
|
1784
|
+
visibility: {
|
|
1785
|
+
...baseState.visibility,
|
|
1786
|
+
visibility: visibilityStates.minimized,
|
|
1787
|
+
},
|
|
1788
|
+
},
|
|
1789
|
+
},
|
|
1790
|
+
inlineWithSuggestions: {
|
|
1791
|
+
category: categoryKeys.suggestions,
|
|
1792
|
+
headingText: 'Suggestions',
|
|
1793
|
+
description: '',
|
|
1794
|
+
inline: {
|
|
1795
|
+
...baseState,
|
|
1796
|
+
config: {
|
|
1797
|
+
...baseState.config,
|
|
1798
|
+
layoutMode: 'inline',
|
|
1799
|
+
showFaq: true,
|
|
1800
|
+
},
|
|
1801
|
+
visibility: {
|
|
1802
|
+
...baseState.visibility,
|
|
1803
|
+
visibility: visibilityStates.open,
|
|
1804
|
+
},
|
|
1805
|
+
serviceData: {
|
|
1806
|
+
suggestion: {
|
|
1807
|
+
body: suggestions,
|
|
1808
|
+
},
|
|
1809
|
+
},
|
|
1810
|
+
},
|
|
1811
|
+
},
|
|
1812
|
+
}
|
|
1813
|
+
|
|
1814
|
+
const standardWindowStates = {
|
|
1815
|
+
minimizedWindow: {
|
|
1816
|
+
category: categoryKeys.minimizedWindow,
|
|
1817
|
+
headingText: 'Unstarted minimized',
|
|
1818
|
+
description: '',
|
|
1819
|
+
window: {
|
|
1820
|
+
...baseState,
|
|
1821
|
+
config: { ...baseState.config, layoutMode: 'window' },
|
|
1822
|
+
visibility: {
|
|
1823
|
+
...baseState.visibility,
|
|
1824
|
+
visibility: visibilityStates.minimized,
|
|
1825
|
+
},
|
|
1826
|
+
},
|
|
1827
|
+
},
|
|
1828
|
+
minimizedWindowStarted: {
|
|
1829
|
+
category: categoryKeys.minimizedWindow,
|
|
1830
|
+
headingText: 'Started minimized',
|
|
1831
|
+
description: '',
|
|
1832
|
+
window: {
|
|
1833
|
+
...baseState,
|
|
1834
|
+
config: { ...baseState.config, layoutMode: 'window' },
|
|
1835
|
+
visibility: {
|
|
1836
|
+
...baseState.visibility,
|
|
1837
|
+
visibility: visibilityStates.minimized,
|
|
1838
|
+
},
|
|
1839
|
+
participantInfo,
|
|
1840
|
+
headerTitles,
|
|
1841
|
+
},
|
|
1842
|
+
},
|
|
1843
|
+
minimizedWindowStartedUnread: {
|
|
1844
|
+
category: categoryKeys.minimizedWindow,
|
|
1845
|
+
headingText: 'Minimized with unread messages',
|
|
1846
|
+
description: '',
|
|
1847
|
+
window: {
|
|
1848
|
+
...baseState,
|
|
1849
|
+
config: { ...baseState.config, layoutMode: 'window' },
|
|
1850
|
+
visibility: {
|
|
1851
|
+
...baseState.visibility,
|
|
1852
|
+
visibility: visibilityStates.minimized,
|
|
1853
|
+
},
|
|
1854
|
+
participantInfo,
|
|
1855
|
+
headerTitles,
|
|
1856
|
+
unreadEvents: 12,
|
|
1857
|
+
},
|
|
1858
|
+
},
|
|
1859
|
+
}
|
|
1860
|
+
|
|
1861
|
+
const newInterface = {
|
|
1862
|
+
suggestionsMessage: {
|
|
1863
|
+
category: categoryKeys.messages,
|
|
1864
|
+
headingText: 'Suggestions message',
|
|
1865
|
+
description: '',
|
|
1866
|
+
...baseState,
|
|
1867
|
+
events: [
|
|
1868
|
+
{
|
|
1869
|
+
type: 'service_data',
|
|
1870
|
+
payload: {
|
|
1871
|
+
type: 'suggestion',
|
|
1872
|
+
body: suggestions,
|
|
1873
|
+
},
|
|
1874
|
+
},
|
|
1875
|
+
],
|
|
1876
|
+
},
|
|
1877
|
+
}
|
|
1878
|
+
|
|
1879
|
+
const buildStandardState = (
|
|
1880
|
+
layoutModes,
|
|
1881
|
+
customComponentEventBodies = [],
|
|
1882
|
+
isNewInterface,
|
|
1883
|
+
) => {
|
|
1758
1884
|
const intermediateState = {
|
|
1759
|
-
...
|
|
1885
|
+
...(isNewInterface
|
|
1886
|
+
? {
|
|
1887
|
+
...standardState,
|
|
1888
|
+
fullConversation: {
|
|
1889
|
+
...standardState.fullConversation,
|
|
1890
|
+
events: [splashMessage, ...standardState.fullConversation.events],
|
|
1891
|
+
},
|
|
1892
|
+
}
|
|
1893
|
+
: standardState),
|
|
1894
|
+
...(isNewInterface ? newInterface : faq),
|
|
1760
1895
|
...customComponentEventBodies.reduce((acc, eventBody) => {
|
|
1761
1896
|
const { key, headingText, description, body } = eventBody
|
|
1762
1897
|
return {
|
|
@@ -1793,54 +1928,39 @@ const buildStandardState = (layoutModes, customComponentEventBodies = []) => {
|
|
|
1793
1928
|
}, {})
|
|
1794
1929
|
}
|
|
1795
1930
|
|
|
1796
|
-
export const
|
|
1931
|
+
export const getDeprecatedStateObj = (
|
|
1932
|
+
layoutModes,
|
|
1933
|
+
customComponentEventBodies,
|
|
1934
|
+
) => ({
|
|
1797
1935
|
...buildStandardState(layoutModes, customComponentEventBodies),
|
|
1936
|
+
...(layoutModes.indexOf('window') !== -1 ? standardWindowStates : {}),
|
|
1937
|
+
})
|
|
1938
|
+
|
|
1939
|
+
export const getStateObj = (layoutModes, customComponentEventBodies) => ({
|
|
1940
|
+
...buildStandardState(layoutModes, customComponentEventBodies, true),
|
|
1798
1941
|
...(layoutModes.indexOf('window') !== -1
|
|
1799
1942
|
? {
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1943
|
+
...standardWindowStates,
|
|
1944
|
+
minimizedWindowPrechat: {
|
|
1945
|
+
category: categoryKeys.minimizedWindow,
|
|
1946
|
+
headingText: 'Minimized with pre-chat messages',
|
|
1803
1947
|
description: '',
|
|
1804
1948
|
window: {
|
|
1805
1949
|
...baseState,
|
|
1806
|
-
config: {
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1950
|
+
config: {
|
|
1951
|
+
...baseState.config,
|
|
1952
|
+
layoutMode: 'window',
|
|
1953
|
+
preChatEvents: [splashMessage],
|
|
1810
1954
|
},
|
|
1811
|
-
},
|
|
1812
|
-
},
|
|
1813
|
-
minimizedStarted: {
|
|
1814
|
-
category: categoryKeys.minimized,
|
|
1815
|
-
headingText: 'Started minimized',
|
|
1816
|
-
description: '',
|
|
1817
|
-
window: {
|
|
1818
|
-
...baseState,
|
|
1819
|
-
config: { ...baseState.config, layoutMode: 'window' },
|
|
1820
|
-
visibility: {
|
|
1821
|
-
...baseState.visibility,
|
|
1822
|
-
visibility: visibilityStates.minimized,
|
|
1823
|
-
},
|
|
1824
|
-
participantInfo,
|
|
1825
|
-
headerTitles,
|
|
1826
|
-
},
|
|
1827
|
-
},
|
|
1828
|
-
minimizedStartedUnread: {
|
|
1829
|
-
category: categoryKeys.minimized,
|
|
1830
|
-
headingText: 'Minimized with unread messages',
|
|
1831
|
-
description: '',
|
|
1832
|
-
window: {
|
|
1833
|
-
...baseState,
|
|
1834
|
-
config: { ...baseState.config, layoutMode: 'window' },
|
|
1835
1955
|
visibility: {
|
|
1836
1956
|
...baseState.visibility,
|
|
1837
1957
|
visibility: visibilityStates.minimized,
|
|
1838
1958
|
},
|
|
1839
1959
|
participantInfo,
|
|
1840
1960
|
headerTitles,
|
|
1841
|
-
unreadEvents: 12,
|
|
1842
1961
|
},
|
|
1843
1962
|
},
|
|
1844
1963
|
}
|
|
1845
1964
|
: {}),
|
|
1965
|
+
...inlineInterface,
|
|
1846
1966
|
})
|