@seamly/web-ui 20.0.0-beta.2 → 20.0.0-beta.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/build/dist/lib/components.js +1 -1
- package/build/dist/lib/components.min.js +1 -1
- package/build/dist/lib/deprecated-view.css +1 -0
- package/build/dist/lib/deprecated-view.js +1 -0
- package/build/dist/lib/index.debug.js +95 -61
- package/build/dist/lib/index.debug.min.js +1 -1
- package/build/dist/lib/index.debug.min.js.LICENSE.txt +24 -12
- package/build/dist/lib/style-guide.js +305 -97
- package/build/dist/lib/style-guide.min.js +1 -1
- package/build/dist/lib/styles-default-implementation.css +1 -0
- package/build/dist/lib/styles-default-implementation.js +1 -0
- package/build/dist/lib/styles.css +1 -1
- package/package.json +8 -7
- package/src/.DS_Store +0 -0
- package/src/javascripts/api/index.js +19 -10
- package/src/javascripts/api/producer.js +5 -3
- package/src/javascripts/domains/translations/components/options-button.js +1 -1
- package/src/javascripts/index.js +2 -2
- package/src/javascripts/lib/engine/index.js +2 -1
- package/src/javascripts/lib/parse-body.js +1 -1
- package/src/javascripts/package/components.js +1 -1
- package/src/javascripts/style-guide/components/app.js +3 -3
- package/src/javascripts/style-guide/states.js +345 -69
- package/src/javascripts/style-guide/style-guide-engine.js +1 -0
- package/src/javascripts/ui/components/app-options/index.js +9 -3
- package/src/javascripts/ui/components/conversation/conversation.js +1 -1
- package/src/javascripts/ui/components/conversation/event/carousel-message/index.js +3 -1
- package/src/javascripts/ui/components/conversation/event/conversation-suggestions.js +12 -3
- package/src/javascripts/ui/components/conversation/event/hooks/use-text-rendering.js +35 -0
- package/src/javascripts/ui/components/conversation/event/participant.js +5 -2
- package/src/javascripts/ui/components/conversation/event/splash.js +2 -1
- package/src/javascripts/ui/components/conversation/event/text.js +2 -1
- package/src/javascripts/ui/components/entry/{toggle-button.js → deprecated-toggle-button.js} +0 -0
- package/src/javascripts/ui/components/entry/entry-container.js +1 -1
- package/src/javascripts/ui/components/faq/faq.js +162 -0
- package/src/javascripts/ui/components/layout/chat-frame.js +1 -1
- package/src/javascripts/ui/components/layout/chat.js +62 -0
- package/src/javascripts/ui/components/layout/{app-frame.js → deprecated-app-frame.js} +10 -24
- package/src/javascripts/ui/components/layout/header.js +1 -1
- package/src/javascripts/ui/components/layout/pre-chat-messages.js +2 -8
- package/src/javascripts/ui/components/options/options-button.js +2 -2
- package/src/javascripts/ui/components/suggestions/index.js +2 -3
- package/src/javascripts/ui/components/suggestions/suggestions-list.js +1 -1
- package/src/javascripts/ui/components/view/app-view.js +3 -3
- package/src/javascripts/ui/components/view/deprecated-view.js +6 -4
- package/src/javascripts/ui/components/view/index.js +61 -5
- package/src/javascripts/ui/components/view/inline-view.js +15 -4
- package/src/javascripts/ui/components/view/window-view/index.js +5 -5
- package/src/stylesheets/1-settings/_config.scss +6 -6
- package/src/stylesheets/{3-app/_app.scss → 3-chat/_chat.scss} +22 -35
- package/src/stylesheets/5-components/_chat-status.scss +1 -5
- package/src/stylesheets/5-components/_conversation.scss +3 -3
- package/src/stylesheets/5-components/_disclaimer.scss +2 -6
- package/src/stylesheets/5-components/_error.scss +20 -10
- package/src/stylesheets/5-components/_interrupt.scss +21 -2
- package/src/stylesheets/5-components/_message-body.scss +23 -1
- package/src/stylesheets/5-components/_message-count.scss +1 -0
- package/src/stylesheets/5-components/_message.scss +4 -0
- package/src/stylesheets/5-components/_modal.scss +2 -2
- package/src/stylesheets/5-components/_options.scss +6 -14
- package/src/stylesheets/5-components/_pre-chat-messages.scss +24 -17
- package/src/stylesheets/5-components/_suggestions.scss +6 -6
- package/src/stylesheets/5-components/_unstarted.scss +22 -36
- package/src/stylesheets/6-default-implementation/_hover.scss +153 -0
- package/src/stylesheets/{6-webui-only → 6-default-implementation}/_scrollbar.scss +1 -1
- package/src/stylesheets/7-deprecated/3-app/_app.scss +8 -8
- package/src/stylesheets/7-deprecated/5-components/_error.scss +19 -9
- package/src/stylesheets/7-deprecated/5-components/_input.scss +1 -1
- package/src/stylesheets/7-deprecated/5-components/_message.scss +1 -1
- package/src/stylesheets/7-deprecated/5-components/_modal.scss +1 -1
- package/src/stylesheets/7-deprecated/5-components/_options.scss +8 -10
- package/src/stylesheets/style-guide.scss +1 -1
- package/src/stylesheets/styles-default-implementation.scss +3 -0
- package/src/stylesheets/styles.scss +8 -9
- package/webpack/config.common.js +7 -1
- package/webpack/config.package.js +9 -1
- package/webpack/config.test.js +1 -0
- package/webpack/defaults.js +3 -6
- package/CHANGELOG.md +0 -625
- package/build/dist/lib/index.js +0 -25513
- package/build/dist/lib/index.min.js +0 -2
- package/build/dist/lib/index.min.js.LICENSE.txt +0 -9
- package/build/dist/lib/standalone.js +0 -34474
- package/build/dist/lib/standalone.min.js +0 -2
- package/build/dist/lib/standalone.min.js.LICENSE.txt +0 -4
- package/src/javascripts/ui/components/layout/modal-wrapper.js +0 -0
- package/src/stylesheets/6-webui-only/_hover.scss +0 -151
- package/src/stylesheets/styles-webui-only.scss +0 -3
|
@@ -1553,12 +1553,12 @@ const selectEventsWithSuggestion = createSelector(seamly_state_hooks_selectState
|
|
|
1553
1553
|
return [...events, suggestionsEvent];
|
|
1554
1554
|
});
|
|
1555
1555
|
const selectEvents = createSelector(selectEventsWithSuggestion, selectConfig, (events, config) => {
|
|
1556
|
-
var _config$messages
|
|
1556
|
+
var _config$messages;
|
|
1557
1557
|
|
|
1558
1558
|
const {
|
|
1559
1559
|
enabled,
|
|
1560
1560
|
threshold
|
|
1561
|
-
} = (
|
|
1561
|
+
} = (config === null || config === void 0 ? void 0 : (_config$messages = config.messages) === null || _config$messages === void 0 ? void 0 : _config$messages.timeIndicator) ?? {};
|
|
1562
1562
|
|
|
1563
1563
|
if (!enabled) {
|
|
1564
1564
|
return events;
|
|
@@ -1940,8 +1940,8 @@ function utils_validate(values, schema = {}) {
|
|
|
1940
1940
|
validations = [validations];
|
|
1941
1941
|
}
|
|
1942
1942
|
|
|
1943
|
-
for (let i = 0;
|
|
1944
|
-
var
|
|
1943
|
+
for (let i = 0; i < ((_validations = validations) === null || _validations === void 0 ? void 0 : _validations.length) ?? 0; i++) {
|
|
1944
|
+
var _validations;
|
|
1945
1945
|
|
|
1946
1946
|
if (!validations[i].fn(values[key], validations[i].compareValue)) {
|
|
1947
1947
|
errors[key] = validations[i].errorText;
|
|
@@ -2267,9 +2267,7 @@ function updateFormControl(state, formId, name, controlState) {
|
|
|
2267
2267
|
formId,
|
|
2268
2268
|
persistData
|
|
2269
2269
|
}) => {
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
const formState = persistData ? (_state$formId2 = state[formId]) !== null && _state$formId2 !== void 0 ? _state$formId2 : reducer_objectSpread(reducer_objectSpread({}, initialFormState), {}, {
|
|
2270
|
+
const formState = persistData ? state[formId] ?? reducer_objectSpread(reducer_objectSpread({}, initialFormState), {}, {
|
|
2273
2271
|
persistData
|
|
2274
2272
|
}) : reducer_objectSpread(reducer_objectSpread({}, initialFormState), {}, {
|
|
2275
2273
|
persistData
|
|
@@ -5687,7 +5685,7 @@ function TranslationsOptionButton() {
|
|
|
5687
5685
|
})
|
|
5688
5686
|
}), _jsxs("button", {
|
|
5689
5687
|
type: "button",
|
|
5690
|
-
className: className(['button', 'button--secondary', '
|
|
5688
|
+
className: className(['button', 'button--secondary', 'chat__options__button']),
|
|
5691
5689
|
id: toggleButtonId,
|
|
5692
5690
|
onClick: handleToggleClick,
|
|
5693
5691
|
onKeyDown: handleToggleKeyDown,
|
|
@@ -6099,7 +6097,7 @@ const participantInfo = {
|
|
|
6099
6097
|
'e65fa8dc-97ab-4711-8fec-82bae6461aa2': {
|
|
6100
6098
|
avatar,
|
|
6101
6099
|
id: 'e65fa8dc-97ab-4711-8fec-82bae6461aa2',
|
|
6102
|
-
introduction: "You're now talking to
|
|
6100
|
+
introduction: "You're now talking to {{name}} gimme a minit",
|
|
6103
6101
|
name: 'Mrs. Bot',
|
|
6104
6102
|
service: {
|
|
6105
6103
|
expose: {
|
|
@@ -6114,7 +6112,7 @@ const participantInfo = {
|
|
|
6114
6112
|
},
|
|
6115
6113
|
'e65fa8dc-97ab-4711-8fec-82bae6461aa3': {
|
|
6116
6114
|
id: 'e65fa8dc-97ab-4711-8fec-82bae6461aa3',
|
|
6117
|
-
introduction: "You're now talking to
|
|
6115
|
+
introduction: "You're now talking to {{name}} gimme a minit",
|
|
6118
6116
|
name: 'Mrs. Bot',
|
|
6119
6117
|
service: {
|
|
6120
6118
|
expose: {
|
|
@@ -6215,7 +6213,8 @@ const infoMessage = {
|
|
|
6215
6213
|
payload: {
|
|
6216
6214
|
body: {
|
|
6217
6215
|
text: 'This is a system generated info message',
|
|
6218
|
-
type: 'text'
|
|
6216
|
+
type: 'text',
|
|
6217
|
+
variables: {}
|
|
6219
6218
|
},
|
|
6220
6219
|
fromClient: false,
|
|
6221
6220
|
id: (0,web_ui_namespaceObject.randomId)(),
|
|
@@ -6268,7 +6267,7 @@ const participantMessage = {
|
|
|
6268
6267
|
participant: {
|
|
6269
6268
|
avatar,
|
|
6270
6269
|
id: 'e65fa8dc-97ab-4711-8fec-82bae6461aa2',
|
|
6271
|
-
introduction: "You're now talking to
|
|
6270
|
+
introduction: "You're now talking to {{name}} gimme a minit",
|
|
6272
6271
|
name: 'Mrs. Bot',
|
|
6273
6272
|
service: {
|
|
6274
6273
|
expose: {
|
|
@@ -6294,7 +6293,7 @@ const participantMessageDefaultIcon = {
|
|
|
6294
6293
|
messageStatus: 'received',
|
|
6295
6294
|
participant: {
|
|
6296
6295
|
id: 'e65fa8dc-97ab-4711-8fec-82bae6461aa3',
|
|
6297
|
-
introduction: "You're now talking to
|
|
6296
|
+
introduction: "You're now talking to {{name}} gimme a minit",
|
|
6298
6297
|
name: 'Mrs. Bot',
|
|
6299
6298
|
service: {
|
|
6300
6299
|
expose: {
|
|
@@ -6322,7 +6321,8 @@ const getCustomMessage = ({
|
|
|
6322
6321
|
body: {
|
|
6323
6322
|
type,
|
|
6324
6323
|
text,
|
|
6325
|
-
data
|
|
6324
|
+
data,
|
|
6325
|
+
variables: {}
|
|
6326
6326
|
},
|
|
6327
6327
|
participant: 'e65fa8dc-97ab-4711-8fec-82bae6461aa2',
|
|
6328
6328
|
service: {
|
|
@@ -6347,7 +6347,8 @@ const shortTextMessage = {
|
|
|
6347
6347
|
payload: {
|
|
6348
6348
|
body: {
|
|
6349
6349
|
text: 'What do you want to do?',
|
|
6350
|
-
type: 'text'
|
|
6350
|
+
type: 'text',
|
|
6351
|
+
variables: {}
|
|
6351
6352
|
},
|
|
6352
6353
|
fromClient: false,
|
|
6353
6354
|
fromHistory: true,
|
|
@@ -6411,7 +6412,8 @@ const longTextMessage = {
|
|
|
6411
6412
|
payload: {
|
|
6412
6413
|
body: {
|
|
6413
6414
|
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.',
|
|
6414
|
-
type: 'text'
|
|
6415
|
+
type: 'text',
|
|
6416
|
+
variables: {}
|
|
6415
6417
|
},
|
|
6416
6418
|
fromClient: false,
|
|
6417
6419
|
fromHistory: true,
|
|
@@ -6435,7 +6437,8 @@ const textMessageBoldItalicUnderline = {
|
|
|
6435
6437
|
payload: {
|
|
6436
6438
|
body: {
|
|
6437
6439
|
text: 'Bubble with **bold** *italic* <u>underline</u>',
|
|
6438
|
-
type: 'text'
|
|
6440
|
+
type: 'text',
|
|
6441
|
+
variables: {}
|
|
6439
6442
|
},
|
|
6440
6443
|
fromClient: false,
|
|
6441
6444
|
fromHistory: true,
|
|
@@ -6460,8 +6463,24 @@ const textMessageWithLinks = {
|
|
|
6460
6463
|
type: 'message',
|
|
6461
6464
|
payload: {
|
|
6462
6465
|
body: {
|
|
6463
|
-
text: '
|
|
6464
|
-
type: 'text'
|
|
6466
|
+
text: '{{link_1}} and {{link_2}} embedded in text',
|
|
6467
|
+
type: 'text',
|
|
6468
|
+
variables: {
|
|
6469
|
+
link_1: {
|
|
6470
|
+
id: '1',
|
|
6471
|
+
name: 'Link in same window',
|
|
6472
|
+
newTab: false,
|
|
6473
|
+
type: 'link',
|
|
6474
|
+
url: 'https://google.com'
|
|
6475
|
+
},
|
|
6476
|
+
link_2: {
|
|
6477
|
+
id: '2',
|
|
6478
|
+
name: 'link in new window',
|
|
6479
|
+
newTab: true,
|
|
6480
|
+
type: 'link',
|
|
6481
|
+
url: 'https://google.com'
|
|
6482
|
+
}
|
|
6483
|
+
}
|
|
6465
6484
|
},
|
|
6466
6485
|
fromClient: false,
|
|
6467
6486
|
fromHistory: true,
|
|
@@ -6486,8 +6505,17 @@ const textMessageWithLongLink = {
|
|
|
6486
6505
|
type: 'message',
|
|
6487
6506
|
payload: {
|
|
6488
6507
|
body: {
|
|
6489
|
-
text: 'Here is a long link
|
|
6490
|
-
type: 'text'
|
|
6508
|
+
text: 'Here is a long link {{link_1}} embedded in text',
|
|
6509
|
+
type: 'text',
|
|
6510
|
+
variables: {
|
|
6511
|
+
link_1: {
|
|
6512
|
+
id: '1',
|
|
6513
|
+
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',
|
|
6514
|
+
newTab: false,
|
|
6515
|
+
type: 'link',
|
|
6516
|
+
url: 'https://google.com'
|
|
6517
|
+
}
|
|
6518
|
+
}
|
|
6491
6519
|
},
|
|
6492
6520
|
fromClient: false,
|
|
6493
6521
|
fromHistory: true,
|
|
@@ -6513,7 +6541,8 @@ const textMesageWithBullets = {
|
|
|
6513
6541
|
payload: {
|
|
6514
6542
|
body: {
|
|
6515
6543
|
text: '<ul>\n<li>Bullets</li>\n<li>bullets</li>\n<li>bullets</li>\n</ul>\n',
|
|
6516
|
-
type: 'text'
|
|
6544
|
+
type: 'text',
|
|
6545
|
+
variables: {}
|
|
6517
6546
|
},
|
|
6518
6547
|
fromClient: false,
|
|
6519
6548
|
fromHistory: true,
|
|
@@ -6674,7 +6703,8 @@ const userMessage = {
|
|
|
6674
6703
|
payload: {
|
|
6675
6704
|
body: {
|
|
6676
6705
|
text: 'This is what the user typed',
|
|
6677
|
-
type: 'text'
|
|
6706
|
+
type: 'text',
|
|
6707
|
+
variables: {}
|
|
6678
6708
|
},
|
|
6679
6709
|
fromClient: true,
|
|
6680
6710
|
fromHistory: true,
|
|
@@ -6691,7 +6721,8 @@ const userMessageLong = {
|
|
|
6691
6721
|
payload: {
|
|
6692
6722
|
body: {
|
|
6693
6723
|
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!!',
|
|
6694
|
-
type: 'text'
|
|
6724
|
+
type: 'text',
|
|
6725
|
+
variables: {}
|
|
6695
6726
|
},
|
|
6696
6727
|
fromClient: true,
|
|
6697
6728
|
fromHistory: true,
|
|
@@ -6812,6 +6843,7 @@ const categoryKeys = {
|
|
|
6812
6843
|
messages: 'messages',
|
|
6813
6844
|
errors: 'errors',
|
|
6814
6845
|
uploads: 'uploads',
|
|
6846
|
+
faq: 'faq',
|
|
6815
6847
|
features: 'features',
|
|
6816
6848
|
options: 'options',
|
|
6817
6849
|
suggestions: 'suggestions',
|
|
@@ -6836,6 +6868,10 @@ const categories = {
|
|
|
6836
6868
|
heading: 'File uploads',
|
|
6837
6869
|
description: ''
|
|
6838
6870
|
},
|
|
6871
|
+
[categoryKeys.faq]: {
|
|
6872
|
+
heading: 'FAQ',
|
|
6873
|
+
description: ''
|
|
6874
|
+
},
|
|
6839
6875
|
[categoryKeys.features]: {
|
|
6840
6876
|
heading: 'Other features',
|
|
6841
6877
|
description: ''
|
|
@@ -6911,6 +6947,142 @@ const cardTopic = {
|
|
|
6911
6947
|
}
|
|
6912
6948
|
}
|
|
6913
6949
|
};
|
|
6950
|
+
const faq = {
|
|
6951
|
+
faqEmptyList: states_objectSpread(states_objectSpread({
|
|
6952
|
+
category: categoryKeys.faq,
|
|
6953
|
+
headingText: 'Empty FAQ list',
|
|
6954
|
+
description: ''
|
|
6955
|
+
}, baseState), {}, {
|
|
6956
|
+
config: states_objectSpread(states_objectSpread({}, baseState.config), {}, {
|
|
6957
|
+
showFaq: true
|
|
6958
|
+
}),
|
|
6959
|
+
serviceData: {
|
|
6960
|
+
suggestion: {
|
|
6961
|
+
body: []
|
|
6962
|
+
}
|
|
6963
|
+
}
|
|
6964
|
+
}),
|
|
6965
|
+
faqList: states_objectSpread(states_objectSpread({
|
|
6966
|
+
category: categoryKeys.faq,
|
|
6967
|
+
headingText: 'FAQ list',
|
|
6968
|
+
description: ''
|
|
6969
|
+
}, baseState), {}, {
|
|
6970
|
+
config: states_objectSpread(states_objectSpread({}, baseState.config), {}, {
|
|
6971
|
+
showFaq: true
|
|
6972
|
+
}),
|
|
6973
|
+
serviceData: {
|
|
6974
|
+
suggestion: {
|
|
6975
|
+
body: [{
|
|
6976
|
+
id: 1,
|
|
6977
|
+
question: 'Lorem ipsum dolor sit amet',
|
|
6978
|
+
categories: ['short']
|
|
6979
|
+
}, {
|
|
6980
|
+
id: 2,
|
|
6981
|
+
question: '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.',
|
|
6982
|
+
categories: ['short']
|
|
6983
|
+
}, {
|
|
6984
|
+
id: 3,
|
|
6985
|
+
question: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam',
|
|
6986
|
+
categories: ['short']
|
|
6987
|
+
}]
|
|
6988
|
+
}
|
|
6989
|
+
}
|
|
6990
|
+
}),
|
|
6991
|
+
faqListLong: states_objectSpread(states_objectSpread({
|
|
6992
|
+
category: categoryKeys.faq,
|
|
6993
|
+
headingText: 'Long FAQ list',
|
|
6994
|
+
description: ''
|
|
6995
|
+
}, baseState), {}, {
|
|
6996
|
+
config: states_objectSpread(states_objectSpread({}, baseState.config), {}, {
|
|
6997
|
+
showFaq: true
|
|
6998
|
+
}),
|
|
6999
|
+
serviceData: {
|
|
7000
|
+
suggestion: {
|
|
7001
|
+
body: [{
|
|
7002
|
+
id: 1,
|
|
7003
|
+
question: 'Lorem ipsum dolor sit amet',
|
|
7004
|
+
categories: ['long']
|
|
7005
|
+
}, {
|
|
7006
|
+
id: 2,
|
|
7007
|
+
question: '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.',
|
|
7008
|
+
categories: ['long']
|
|
7009
|
+
}, {
|
|
7010
|
+
id: 3,
|
|
7011
|
+
question: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam',
|
|
7012
|
+
categories: ['long']
|
|
7013
|
+
}, {
|
|
7014
|
+
id: 4,
|
|
7015
|
+
question: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed',
|
|
7016
|
+
categories: ['long']
|
|
7017
|
+
}, {
|
|
7018
|
+
id: 5,
|
|
7019
|
+
question: 'Lorem ipsum dolor sit amet',
|
|
7020
|
+
categories: ['long']
|
|
7021
|
+
}, {
|
|
7022
|
+
id: 6,
|
|
7023
|
+
question: '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.',
|
|
7024
|
+
categories: ['long']
|
|
7025
|
+
}, {
|
|
7026
|
+
id: 7,
|
|
7027
|
+
question: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam',
|
|
7028
|
+
categories: ['long']
|
|
7029
|
+
}, {
|
|
7030
|
+
id: 8,
|
|
7031
|
+
question: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed',
|
|
7032
|
+
categories: ['long']
|
|
7033
|
+
}, {
|
|
7034
|
+
id: 9,
|
|
7035
|
+
question: 'Lorem ipsum dolor sit amet',
|
|
7036
|
+
categories: ['long']
|
|
7037
|
+
}, {
|
|
7038
|
+
id: 10,
|
|
7039
|
+
question: '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.',
|
|
7040
|
+
categories: ['long']
|
|
7041
|
+
}, {
|
|
7042
|
+
id: 11,
|
|
7043
|
+
question: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam',
|
|
7044
|
+
categories: ['long']
|
|
7045
|
+
}, {
|
|
7046
|
+
id: 12,
|
|
7047
|
+
question: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed',
|
|
7048
|
+
categories: ['long']
|
|
7049
|
+
}, {
|
|
7050
|
+
id: 13,
|
|
7051
|
+
question: 'Lorem ipsum dolor sit amet',
|
|
7052
|
+
categories: ['long']
|
|
7053
|
+
}, {
|
|
7054
|
+
id: 14,
|
|
7055
|
+
question: '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.',
|
|
7056
|
+
categories: ['long']
|
|
7057
|
+
}, {
|
|
7058
|
+
id: 15,
|
|
7059
|
+
question: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam',
|
|
7060
|
+
categories: ['long']
|
|
7061
|
+
}, {
|
|
7062
|
+
id: 16,
|
|
7063
|
+
question: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed',
|
|
7064
|
+
categories: ['long']
|
|
7065
|
+
}, {
|
|
7066
|
+
id: 17,
|
|
7067
|
+
question: 'Lorem ipsum dolor sit amet',
|
|
7068
|
+
categories: ['long']
|
|
7069
|
+
}, {
|
|
7070
|
+
id: 18,
|
|
7071
|
+
question: '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.',
|
|
7072
|
+
categories: ['long']
|
|
7073
|
+
}, {
|
|
7074
|
+
id: 19,
|
|
7075
|
+
question: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam',
|
|
7076
|
+
categories: ['long']
|
|
7077
|
+
}, {
|
|
7078
|
+
id: 20,
|
|
7079
|
+
question: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed',
|
|
7080
|
+
categories: ['long']
|
|
7081
|
+
}]
|
|
7082
|
+
}
|
|
7083
|
+
}
|
|
7084
|
+
})
|
|
7085
|
+
};
|
|
6914
7086
|
const standardState = {
|
|
6915
7087
|
base: states_objectSpread(states_objectSpread({
|
|
6916
7088
|
category: categoryKeys.unstarted,
|
|
@@ -6928,7 +7100,7 @@ const standardState = {
|
|
|
6928
7100
|
serviceInfo: {
|
|
6929
7101
|
activeServiceSessionId: '3942159e-9878-469e-9120-f44fd6be0f35'
|
|
6930
7102
|
},
|
|
6931
|
-
events: [
|
|
7103
|
+
events: [participantMessage, infoMessage, shortTextMessage, states_objectSpread(states_objectSpread({}, choicePromptMessage), {}, {
|
|
6932
7104
|
payload: states_objectSpread(states_objectSpread({}, choicePromptMessage.payload), {}, {
|
|
6933
7105
|
id: `${choicePromptMessage.payload.id}XXX`
|
|
6934
7106
|
})
|
|
@@ -7007,7 +7179,8 @@ const standardState = {
|
|
|
7007
7179
|
id: (0,web_ui_namespaceObject.randomId)(),
|
|
7008
7180
|
body: {
|
|
7009
7181
|
text: 'Long ago when a dialog started',
|
|
7010
|
-
type: 'text'
|
|
7182
|
+
type: 'text',
|
|
7183
|
+
variables: {}
|
|
7011
7184
|
}
|
|
7012
7185
|
})
|
|
7013
7186
|
}, participantMessage, participantMessageDefaultIcon, newTopicDivider, transcriptInfoMessage, ...[newTranslationDividerStart, newTranslationDividerStop].map(addTranslationData), infoMessage]
|
|
@@ -7051,7 +7224,8 @@ const standardState = {
|
|
|
7051
7224
|
id: (0,web_ui_namespaceObject.randomId)(),
|
|
7052
7225
|
body: {
|
|
7053
7226
|
text: 'Long ago when a dialog started',
|
|
7054
|
-
type: 'text'
|
|
7227
|
+
type: 'text',
|
|
7228
|
+
variables: {}
|
|
7055
7229
|
}
|
|
7056
7230
|
})
|
|
7057
7231
|
}, {
|
|
@@ -7061,7 +7235,8 @@ const standardState = {
|
|
|
7061
7235
|
id: (0,web_ui_namespaceObject.randomId)(),
|
|
7062
7236
|
body: {
|
|
7063
7237
|
text: 'Above me should be a time indicator showing the full date',
|
|
7064
|
-
type: 'text'
|
|
7238
|
+
type: 'text',
|
|
7239
|
+
variables: {}
|
|
7065
7240
|
}
|
|
7066
7241
|
})
|
|
7067
7242
|
}, {
|
|
@@ -7071,7 +7246,8 @@ const standardState = {
|
|
|
7071
7246
|
id: (0,web_ui_namespaceObject.randomId)(),
|
|
7072
7247
|
body: {
|
|
7073
7248
|
text: 'Another message',
|
|
7074
|
-
type: 'text'
|
|
7249
|
+
type: 'text',
|
|
7250
|
+
variables: {}
|
|
7075
7251
|
}
|
|
7076
7252
|
})
|
|
7077
7253
|
}, {
|
|
@@ -7081,7 +7257,8 @@ const standardState = {
|
|
|
7081
7257
|
id: (0,web_ui_namespaceObject.randomId)(),
|
|
7082
7258
|
body: {
|
|
7083
7259
|
text: 'And another message',
|
|
7084
|
-
type: 'text'
|
|
7260
|
+
type: 'text',
|
|
7261
|
+
variables: {}
|
|
7085
7262
|
}
|
|
7086
7263
|
})
|
|
7087
7264
|
}, {
|
|
@@ -7091,7 +7268,8 @@ const standardState = {
|
|
|
7091
7268
|
id: (0,web_ui_namespaceObject.randomId)(),
|
|
7092
7269
|
body: {
|
|
7093
7270
|
text: 'Above me should be a time indicator showing "yesterday"',
|
|
7094
|
-
type: 'text'
|
|
7271
|
+
type: 'text',
|
|
7272
|
+
variables: {}
|
|
7095
7273
|
}
|
|
7096
7274
|
})
|
|
7097
7275
|
}, {
|
|
@@ -7101,7 +7279,8 @@ const standardState = {
|
|
|
7101
7279
|
id: (0,web_ui_namespaceObject.randomId)(),
|
|
7102
7280
|
body: {
|
|
7103
7281
|
text: 'Another message',
|
|
7104
|
-
type: 'text'
|
|
7282
|
+
type: 'text',
|
|
7283
|
+
variables: {}
|
|
7105
7284
|
}
|
|
7106
7285
|
})
|
|
7107
7286
|
}, {
|
|
@@ -7111,7 +7290,8 @@ const standardState = {
|
|
|
7111
7290
|
id: (0,web_ui_namespaceObject.randomId)(),
|
|
7112
7291
|
body: {
|
|
7113
7292
|
text: 'And another message',
|
|
7114
|
-
type: 'text'
|
|
7293
|
+
type: 'text',
|
|
7294
|
+
variables: {}
|
|
7115
7295
|
}
|
|
7116
7296
|
})
|
|
7117
7297
|
}, {
|
|
@@ -7121,7 +7301,8 @@ const standardState = {
|
|
|
7121
7301
|
id: (0,web_ui_namespaceObject.randomId)(),
|
|
7122
7302
|
body: {
|
|
7123
7303
|
text: 'Above me should be a time indicator showing me the dialog continues today',
|
|
7124
|
-
type: 'text'
|
|
7304
|
+
type: 'text',
|
|
7305
|
+
variables: {}
|
|
7125
7306
|
}
|
|
7126
7307
|
})
|
|
7127
7308
|
}]
|
|
@@ -7155,19 +7336,6 @@ const standardState = {
|
|
|
7155
7336
|
}
|
|
7156
7337
|
}]
|
|
7157
7338
|
}),
|
|
7158
|
-
suggestionsMessage: states_objectSpread(states_objectSpread({
|
|
7159
|
-
category: categoryKeys.messages,
|
|
7160
|
-
headingText: 'Suggestions message',
|
|
7161
|
-
description: ''
|
|
7162
|
-
}, baseState), {}, {
|
|
7163
|
-
events: [{
|
|
7164
|
-
type: 'service_data',
|
|
7165
|
-
payload: {
|
|
7166
|
-
type: 'suggestion',
|
|
7167
|
-
body: suggestions
|
|
7168
|
-
}
|
|
7169
|
-
}]
|
|
7170
|
-
}),
|
|
7171
7339
|
errorWithAction: states_objectSpread(states_objectSpread({
|
|
7172
7340
|
// Important: This cannot pick up the language files so the text is hard set here.
|
|
7173
7341
|
category: categoryKeys.errors,
|
|
@@ -7622,11 +7790,92 @@ const inlineInterface = {
|
|
|
7622
7790
|
}
|
|
7623
7791
|
}
|
|
7624
7792
|
})
|
|
7793
|
+
},
|
|
7794
|
+
minimizedInlineWithError: {
|
|
7795
|
+
category: categoryKeys.minimizedInline,
|
|
7796
|
+
headingText: 'Inline minimized with error',
|
|
7797
|
+
description: '',
|
|
7798
|
+
inline: states_objectSpread(states_objectSpread({}, baseState), {}, {
|
|
7799
|
+
config: states_objectSpread(states_objectSpread({}, baseState.config), {}, {
|
|
7800
|
+
layoutMode: 'inline'
|
|
7801
|
+
}),
|
|
7802
|
+
visibility: states_objectSpread(states_objectSpread({}, baseState.visibility), {}, {
|
|
7803
|
+
visibility: web_ui_namespaceObject.visibilityStates.minimized
|
|
7804
|
+
}),
|
|
7805
|
+
interrupt: {
|
|
7806
|
+
error: new web_ui_namespaceObject.SeamlyOfflineError()
|
|
7807
|
+
}
|
|
7808
|
+
})
|
|
7809
|
+
}
|
|
7810
|
+
};
|
|
7811
|
+
const standardWindowStates = {
|
|
7812
|
+
minimizedWindow: {
|
|
7813
|
+
category: categoryKeys.minimizedWindow,
|
|
7814
|
+
headingText: 'Unstarted minimized',
|
|
7815
|
+
description: '',
|
|
7816
|
+
window: states_objectSpread(states_objectSpread({}, baseState), {}, {
|
|
7817
|
+
config: states_objectSpread(states_objectSpread({}, baseState.config), {}, {
|
|
7818
|
+
layoutMode: 'window'
|
|
7819
|
+
}),
|
|
7820
|
+
visibility: states_objectSpread(states_objectSpread({}, baseState.visibility), {}, {
|
|
7821
|
+
visibility: web_ui_namespaceObject.visibilityStates.minimized
|
|
7822
|
+
})
|
|
7823
|
+
})
|
|
7824
|
+
},
|
|
7825
|
+
minimizedWindowStarted: {
|
|
7826
|
+
category: categoryKeys.minimizedWindow,
|
|
7827
|
+
headingText: 'Started minimized',
|
|
7828
|
+
description: '',
|
|
7829
|
+
window: states_objectSpread(states_objectSpread({}, baseState), {}, {
|
|
7830
|
+
config: states_objectSpread(states_objectSpread({}, baseState.config), {}, {
|
|
7831
|
+
layoutMode: 'window'
|
|
7832
|
+
}),
|
|
7833
|
+
visibility: states_objectSpread(states_objectSpread({}, baseState.visibility), {}, {
|
|
7834
|
+
visibility: web_ui_namespaceObject.visibilityStates.minimized
|
|
7835
|
+
}),
|
|
7836
|
+
participantInfo,
|
|
7837
|
+
headerTitles
|
|
7838
|
+
})
|
|
7839
|
+
},
|
|
7840
|
+
minimizedWindowStartedUnread: {
|
|
7841
|
+
category: categoryKeys.minimizedWindow,
|
|
7842
|
+
headingText: 'Minimized with unread messages',
|
|
7843
|
+
description: '',
|
|
7844
|
+
window: states_objectSpread(states_objectSpread({}, baseState), {}, {
|
|
7845
|
+
config: states_objectSpread(states_objectSpread({}, baseState.config), {}, {
|
|
7846
|
+
layoutMode: 'window'
|
|
7847
|
+
}),
|
|
7848
|
+
visibility: states_objectSpread(states_objectSpread({}, baseState.visibility), {}, {
|
|
7849
|
+
visibility: web_ui_namespaceObject.visibilityStates.minimized
|
|
7850
|
+
}),
|
|
7851
|
+
participantInfo,
|
|
7852
|
+
headerTitles,
|
|
7853
|
+
unreadEvents: 12
|
|
7854
|
+
})
|
|
7625
7855
|
}
|
|
7626
7856
|
};
|
|
7857
|
+
const newInterface = {
|
|
7858
|
+
suggestionsMessage: states_objectSpread(states_objectSpread({
|
|
7859
|
+
category: categoryKeys.messages,
|
|
7860
|
+
headingText: 'Suggestions message',
|
|
7861
|
+
description: ''
|
|
7862
|
+
}, baseState), {}, {
|
|
7863
|
+
events: [{
|
|
7864
|
+
type: 'service_data',
|
|
7865
|
+
payload: {
|
|
7866
|
+
type: 'suggestion',
|
|
7867
|
+
body: suggestions
|
|
7868
|
+
}
|
|
7869
|
+
}]
|
|
7870
|
+
})
|
|
7871
|
+
};
|
|
7627
7872
|
|
|
7628
|
-
const buildStandardState = (layoutModes, customComponentEventBodies = []) => {
|
|
7629
|
-
const intermediateState = states_objectSpread(states_objectSpread({},
|
|
7873
|
+
const buildStandardState = (layoutModes, customComponentEventBodies = [], isNewInterface) => {
|
|
7874
|
+
const intermediateState = states_objectSpread(states_objectSpread(states_objectSpread({}, isNewInterface ? states_objectSpread(states_objectSpread({}, standardState), {}, {
|
|
7875
|
+
fullConversation: states_objectSpread(states_objectSpread({}, standardState.fullConversation), {}, {
|
|
7876
|
+
events: [splashMessage, ...standardState.fullConversation.events]
|
|
7877
|
+
})
|
|
7878
|
+
}) : standardState), isNewInterface ? newInterface : faq), customComponentEventBodies.reduce((acc, eventBody) => {
|
|
7630
7879
|
const {
|
|
7631
7880
|
key,
|
|
7632
7881
|
headingText,
|
|
@@ -7670,51 +7919,8 @@ const buildStandardState = (layoutModes, customComponentEventBodies = []) => {
|
|
|
7670
7919
|
}, {});
|
|
7671
7920
|
};
|
|
7672
7921
|
|
|
7673
|
-
const
|
|
7674
|
-
|
|
7675
|
-
category: categoryKeys.minimizedWindow,
|
|
7676
|
-
headingText: 'Unstarted minimized',
|
|
7677
|
-
description: '',
|
|
7678
|
-
window: states_objectSpread(states_objectSpread({}, baseState), {}, {
|
|
7679
|
-
config: states_objectSpread(states_objectSpread({}, baseState.config), {}, {
|
|
7680
|
-
layoutMode: 'window'
|
|
7681
|
-
}),
|
|
7682
|
-
visibility: states_objectSpread(states_objectSpread({}, baseState.visibility), {}, {
|
|
7683
|
-
visibility: web_ui_namespaceObject.visibilityStates.minimized
|
|
7684
|
-
})
|
|
7685
|
-
})
|
|
7686
|
-
},
|
|
7687
|
-
minimizedWindowStarted: {
|
|
7688
|
-
category: categoryKeys.minimizedWindow,
|
|
7689
|
-
headingText: 'Started minimized',
|
|
7690
|
-
description: '',
|
|
7691
|
-
window: states_objectSpread(states_objectSpread({}, baseState), {}, {
|
|
7692
|
-
config: states_objectSpread(states_objectSpread({}, baseState.config), {}, {
|
|
7693
|
-
layoutMode: 'window'
|
|
7694
|
-
}),
|
|
7695
|
-
visibility: states_objectSpread(states_objectSpread({}, baseState.visibility), {}, {
|
|
7696
|
-
visibility: web_ui_namespaceObject.visibilityStates.minimized
|
|
7697
|
-
}),
|
|
7698
|
-
participantInfo,
|
|
7699
|
-
headerTitles
|
|
7700
|
-
})
|
|
7701
|
-
},
|
|
7702
|
-
minimizedWindowStartedUnread: {
|
|
7703
|
-
category: categoryKeys.minimizedWindow,
|
|
7704
|
-
headingText: 'Minimized with unread messages',
|
|
7705
|
-
description: '',
|
|
7706
|
-
window: states_objectSpread(states_objectSpread({}, baseState), {}, {
|
|
7707
|
-
config: states_objectSpread(states_objectSpread({}, baseState.config), {}, {
|
|
7708
|
-
layoutMode: 'window'
|
|
7709
|
-
}),
|
|
7710
|
-
visibility: states_objectSpread(states_objectSpread({}, baseState.visibility), {}, {
|
|
7711
|
-
visibility: web_ui_namespaceObject.visibilityStates.minimized
|
|
7712
|
-
}),
|
|
7713
|
-
participantInfo,
|
|
7714
|
-
headerTitles,
|
|
7715
|
-
unreadEvents: 12
|
|
7716
|
-
})
|
|
7717
|
-
},
|
|
7922
|
+
const getDeprecatedStateObj = (layoutModes, customComponentEventBodies) => states_objectSpread(states_objectSpread({}, buildStandardState(layoutModes, customComponentEventBodies)), layoutModes.indexOf('window') !== -1 ? standardWindowStates : {});
|
|
7923
|
+
const getStateObj = (layoutModes, customComponentEventBodies) => states_objectSpread(states_objectSpread(states_objectSpread({}, buildStandardState(layoutModes, customComponentEventBodies, true)), layoutModes.indexOf('window') !== -1 ? states_objectSpread(states_objectSpread({}, standardWindowStates), {}, {
|
|
7718
7924
|
minimizedWindowPrechat: {
|
|
7719
7925
|
category: categoryKeys.minimizedWindow,
|
|
7720
7926
|
headingText: 'Minimized with pre-chat messages',
|
|
@@ -7731,7 +7937,7 @@ const getStateObj = (layoutModes, customComponentEventBodies) => states_objectSp
|
|
|
7731
7937
|
headerTitles
|
|
7732
7938
|
})
|
|
7733
7939
|
}
|
|
7734
|
-
} : {}), inlineInterface);
|
|
7940
|
+
}) : {}), inlineInterface);
|
|
7735
7941
|
;// CONCATENATED MODULE: ./src/javascripts/style-guide/components/links.js
|
|
7736
7942
|
const links_excluded = ["headingText", "descriptionId", "description"];
|
|
7737
7943
|
|
|
@@ -7875,8 +8081,9 @@ const StyleGuideApp = ({
|
|
|
7875
8081
|
stateUpdateCallback,
|
|
7876
8082
|
customMessageEventBodies
|
|
7877
8083
|
} = styleGuideConfig;
|
|
8084
|
+
const stateObjFunc = config.isDeprecated ? getDeprecatedStateObj : getStateObj;
|
|
7878
8085
|
const [mainState] = (0,hooks_namespaceObject.useState)(() => {
|
|
7879
|
-
const mainStateObj =
|
|
8086
|
+
const mainStateObj = stateObjFunc(styleGuideConfig.showLayoutModes || ['inline', 'window'], customMessageEventBodies);
|
|
7880
8087
|
return Object.keys(mainStateObj).reduce((acc, key) => app_objectSpread(app_objectSpread({}, acc), {}, {
|
|
7881
8088
|
[key]: app_objectSpread(app_objectSpread({}, mainStateObj[key]), {}, {
|
|
7882
8089
|
descriptionId: (0,web_ui_namespaceObject.randomId)()
|
|
@@ -8053,7 +8260,8 @@ class SeamlyStyleGuideInstance extends web_ui_namespaceObject.Engine {
|
|
|
8053
8260
|
|
|
8054
8261
|
const api = new web_ui_namespaceObject.API({
|
|
8055
8262
|
namespace: this.config.namespace,
|
|
8056
|
-
config: this.config.api
|
|
8263
|
+
config: this.config.api,
|
|
8264
|
+
context: this.config.context
|
|
8057
8265
|
});
|
|
8058
8266
|
api.URLS = {
|
|
8059
8267
|
translations: `/client/${this.config.api.key}/translations/{version}/{locale}.json`
|