@seamly/web-ui 20.0.0-beta.4 → 20.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/build/dist/lib/index.debug.js +19 -30
  2. package/build/dist/lib/index.debug.min.js +1 -1
  3. package/build/dist/lib/index.debug.min.js.LICENSE.txt +0 -4
  4. package/build/dist/lib/index.js +147 -141
  5. package/build/dist/lib/index.min.js +1 -1
  6. package/build/dist/lib/standalone.js +163 -157
  7. package/build/dist/lib/standalone.min.js +1 -1
  8. package/build/dist/lib/style-guide.js +123 -92
  9. package/build/dist/lib/style-guide.min.js +1 -1
  10. package/build/dist/lib/styles.css +1 -1
  11. package/package.json +1 -2
  12. package/src/javascripts/api/index.js +19 -10
  13. package/src/javascripts/api/producer.js +5 -3
  14. package/src/javascripts/domains/app/actions.js +23 -1
  15. package/src/javascripts/domains/config/hooks.js +17 -0
  16. package/src/javascripts/domains/config/index.js +0 -1
  17. package/src/javascripts/domains/config/reducer.js +4 -0
  18. package/src/javascripts/domains/store/index.js +1 -5
  19. package/src/javascripts/lib/engine/index.js +2 -1
  20. package/src/javascripts/style-guide/components/app.js +8 -4
  21. package/src/javascripts/style-guide/components/static-core.js +19 -2
  22. package/src/javascripts/style-guide/components/view.js +16 -3
  23. package/src/javascripts/style-guide/states.js +42 -41
  24. package/src/javascripts/style-guide/style-guide-engine.js +14 -1
  25. package/src/javascripts/ui/components/conversation/event/event-participant.js +10 -7
  26. package/src/javascripts/ui/components/conversation/event/participant.js +3 -3
  27. package/src/javascripts/ui/components/layout/agent-info.js +7 -11
  28. package/src/javascripts/ui/components/layout/chat-frame.js +1 -1
  29. package/src/javascripts/ui/components/layout/pre-chat-messages.js +2 -8
  30. package/src/javascripts/ui/components/suggestions/index.js +0 -1
  31. package/src/javascripts/ui/components/suggestions/suggestions-list.js +1 -1
  32. package/src/javascripts/ui/components/view/inline-view.js +6 -1
  33. package/src/javascripts/ui/components/view/window-view/index.js +2 -2
  34. package/src/javascripts/ui/components/view/window-view/window-open-button.js +7 -7
  35. package/src/javascripts/ui/utils/seamly-utils.js +9 -2
  36. package/src/stylesheets/3-chat/_chat.scss +10 -25
  37. package/src/stylesheets/5-components/_chat-status.scss +1 -5
  38. package/src/stylesheets/5-components/_conversation.scss +1 -1
  39. package/src/stylesheets/5-components/_disclaimer.scss +1 -5
  40. package/src/stylesheets/5-components/_interrupt.scss +21 -2
  41. package/src/stylesheets/5-components/_message-body.scss +23 -1
  42. package/src/stylesheets/5-components/_message.scss +4 -0
  43. package/src/stylesheets/5-components/_options.scss +0 -8
  44. package/src/stylesheets/5-components/_pre-chat-messages.scss +22 -19
  45. package/src/stylesheets/5-components/_suggestions.scss +3 -9
  46. package/src/stylesheets/5-components/_unstarted.scss +20 -40
  47. package/src/stylesheets/7-deprecated/5-components/_message.scss +1 -1
  48. package/src/stylesheets/7-deprecated/5-components/_modal.scss +1 -1
  49. package/src/stylesheets/style-guide.scss +1 -1
  50. package/src/javascripts/domains/config/middleware.js +0 -22
@@ -8,17 +8,32 @@
8
8
  background: $white;
9
9
  }
10
10
 
11
+ &.#{$n}-app--layout-inline.#{$n}-app--collapsed .#{$n}-interrupt {
12
+ position: static;
13
+ width: 100%;
14
+ border-radius: $borderradius;
15
+
16
+ @include media('>desktop') {
17
+ width: 67%;
18
+ }
19
+ }
20
+
11
21
  .#{$n}-interrupt__body {
12
22
  display: flex;
13
23
  flex: 1 1 auto;
14
24
  flex-direction: column;
15
- align-items: center;
25
+ align-items: left;
16
26
  justify-content: center;
17
- margin: $spacer * 0.5;
18
27
  padding: $spacer * 2;
28
+ text-align: left;
29
+ }
30
+
31
+ .#{$n}-chat .#{$n}-interrupt__body {
32
+ margin: $spacer * 0.5;
19
33
  }
20
34
 
21
35
  .#{$n}-interrupt__title {
36
+ margin: 0 0 $spacer;
22
37
  font-size: $fontsize-default;
23
38
  font-weight: bold;
24
39
  }
@@ -26,6 +41,10 @@
26
41
  .#{$n}-interrupt__message {
27
42
  margin-bottom: $spacer * 2;
28
43
  font-size: $fontsize-default;
44
+
45
+ &:last-child {
46
+ margin-bottom: 0;
47
+ }
29
48
  }
30
49
 
31
50
  .#{$n}-interrupt__actions {
@@ -17,6 +17,28 @@
17
17
  }
18
18
  }
19
19
 
20
+ .#{$n}-unstarted-wrapper.#{$n}-unstarted-wrapper--window .#{$n}-message__body {
21
+ margin-left: auto;
22
+ padding: $spacer * 0.5 $spacer * 0.75;
23
+ border: $thin-border solid $white;
24
+ border-radius: $borderradius;
25
+ background-color: $threadlist-agent-text-bgcolor;
26
+ font-size: $fontsize-medium;
27
+ }
28
+
29
+ .#{$n}-unstarted-wrapper--continue .#{$n}-message__body {
30
+ transform: scale(0);
31
+ transform-origin: 100% 100%;
32
+ transition: transform $transition, opacity $transition;
33
+ opacity: 0;
34
+ }
35
+
36
+ .#{$n}-unstarted-wrapper--continue.#{$n}-transition--in .#{$n}-message__body {
37
+ transform: scale(1);
38
+ transition: transform $transition-delay, opacity $transition-delay;
39
+ opacity: 1;
40
+ }
41
+
20
42
  .#{$n}-conversation__item--source-info .#{$n}-message__body {
21
43
  flex: 0 0 100%;
22
44
  width: 100%;
@@ -82,7 +104,7 @@
82
104
  }
83
105
  }
84
106
 
85
- .cvco-message--source-user .#{$n}-message__body a {
107
+ .#{$n}-message--source-user .#{$n}-message__body a {
86
108
  color: $white;
87
109
  }
88
110
 
@@ -5,6 +5,10 @@
5
5
  width: 80%;
6
6
  }
7
7
 
8
+ .#{$n}-unstarted-wrapper--window .#{$n}-message {
9
+ width: 100%;
10
+ }
11
+
8
12
  .#{$n}-message.#{$n}-message--type-suggestions {
9
13
  width: 100%;
10
14
  }
@@ -13,10 +13,6 @@
13
13
  margin-right: auto;
14
14
  }
15
15
 
16
- &.#{$n}-app--collapsed .#{$n}-chat__options {
17
- display: none;
18
- }
19
-
20
16
  .#{$n}-chat__options__button {
21
17
  display: flex;
22
18
  align-items: center;
@@ -25,10 +21,6 @@
25
21
  border-radius: $borderradius-small;
26
22
  }
27
23
 
28
- &.#{$n}-app--collapsed .#{$n}-chat__options-button {
29
- display: none;
30
- }
31
-
32
24
  .#{$n}-chat__options__button .#{$n}-icon {
33
25
  flex: 0 0 $iconsize-small;
34
26
  width: $iconsize-small;
@@ -5,30 +5,33 @@
5
5
  padding: 0;
6
6
  }
7
7
 
8
- &.#{$n}-app--layout-window .#{$n}-pre-chat-messages {
9
- position: fixed;
10
- z-index: $z-index;
11
- right: $spacer;
12
- bottom: $spacer + $avatarsize-large;
13
- max-width: calc(100% - #{$spacer * 2});
8
+ .#{$n}-unstarted-wrapper .#{$n}-pre-chat-messages {
9
+ display: none;
10
+ }
11
+
12
+ .#{$n}-unstarted-wrapper.#{$n}-transition--visible .#{$n}-pre-chat-messages {
13
+ display: block;
14
+ }
14
15
 
15
- @include media('>phablet-l') {
16
- max-width: $spacer * 14;
17
- }
16
+ .#{$n}-unstarted-wrapper--inline .#{$n}-pre-chat-messages {
17
+ transition: opacity $transition;
18
+ opacity: 0;
18
19
  }
19
20
 
20
- .#{$n}-pre-chat-messages__message {
21
- margin-bottom: $spacer * 0.5;
21
+ .#{$n}-unstarted-wrapper--inline.#{$n}-transition--in .#{$n}-pre-chat-messages {
22
+ transition: opacity $transition-delay;
23
+ opacity: 1;
22
24
  }
23
25
 
24
- &.#{$n}-app--layout-window .#{$n}-pre-chat-messages .#{$n}-message {
25
- width: 100%;
26
+ .#{$n}-unstarted-wrapper--window .#{$n}-pre-chat-messages {
27
+ transform: scale(0);
28
+ transform-origin: 100% 100%;
29
+ transition: transform $transition, opacity $transition;
30
+ opacity: 0;
26
31
  }
27
32
 
28
- &.#{$n}-app--layout-window .#{$n}-pre-chat-messages .#{$n}-message__body {
29
- padding: $spacer * 0.5 $spacer * 0.75;
30
- border: $thin-border solid $white;
31
- border-radius: $borderradius;
32
- background-color: $threadlist-agent-text-bgcolor;
33
- font-size: $fontsize-medium;
33
+ .#{$n}-unstarted-wrapper--window.#{$n}-transition--in .#{$n}-pre-chat-messages {
34
+ transform: scale(1);
35
+ transition: transform $transition-delay, opacity $transition-delay;
36
+ opacity: 1;
34
37
  }
@@ -4,7 +4,7 @@
4
4
  overscroll-behavior: contain;
5
5
  }
6
6
 
7
- &.#{$n}-app--layout-inline .#{$n}-chat > .#{$n}-suggestions {
7
+ .#{$n}-chat--layout-inline > .#{$n}-suggestions {
8
8
  flex-direction: column;
9
9
  max-height: $chat-suggestions-maxheight;
10
10
  padding: $spacer;
@@ -61,10 +61,7 @@
61
61
  overscroll-behavior: contain;
62
62
  }
63
63
 
64
- &.#{$n}-app--layout-inline
65
- .#{$n}-chat
66
- > .#{$n}-suggestions
67
- .#{$n}-suggestions__list {
64
+ .#{$n}-chat--layout-inline > .#{$n}-suggestions .#{$n}-suggestions__list {
68
65
  flex: 1 1 100%;
69
66
  flex-direction: column;
70
67
  flex-wrap: nowrap;
@@ -80,10 +77,7 @@
80
77
  margin: 0 $spacer * 0.25 $spacer * 0.25 0;
81
78
  }
82
79
 
83
- &.#{$n}-app--layout-inline
84
- .#{$n}-chat
85
- > .#{$n}-suggestions
86
- .#{$n}-suggestions-item {
80
+ .#{$n}-chat--layout-inline > .#{$n}-suggestions .#{$n}-suggestions-item {
87
81
  width: 100%;
88
82
  margin-right: 0;
89
83
  }
@@ -1,56 +1,36 @@
1
- .#{$n}-unstarted-wrapper {
1
+ .#{$n}-unstarted-wrapper:empty {
2
2
  display: none;
3
- width: 100%;
4
- overflow: hidden;
5
- transition: margin $transition, max-height $transition;
6
3
  }
7
4
 
8
- &.#{$n}-app--layout-inline .#{$n}-unstarted-wrapper {
5
+ .#{$n}-unstarted-wrapper--window {
6
+ position: fixed;
7
+ z-index: $z-index;
8
+ right: $spacer * 1.5;
9
+ bottom: $spacer * 1.5 + $avatarsize-large;
10
+ max-width: calc(100% - #{$spacer * 3});
11
+
12
+ @include media('>phablet-l') {
13
+ max-width: $spacer * 14;
14
+ }
15
+ }
16
+
17
+ .#{$n}-unstarted-wrapper--inline {
18
+ display: none;
19
+ width: 100%;
9
20
  max-height: 0;
21
+ overflow: hidden;
22
+ transition: margin $transition, max-height $transition;
10
23
 
11
24
  @include media('>desktop') {
12
25
  width: 67%;
13
26
  }
14
27
  }
15
28
 
16
- .#{$n}-unstarted-wrapper.#{$n}-transition--visible {
29
+ .#{$n}-unstarted-wrapper--inline.#{$n}-transition--visible {
17
30
  display: block;
18
-
19
- &:empty {
20
- display: none;
21
- }
22
31
  }
23
32
 
24
- &.#{$n}-app--layout-inline .#{$n}-unstarted-wrapper.#{$n}-transition--in {
33
+ .#{$n}-unstarted-wrapper--inline.#{$n}-transition--in {
25
34
  max-height: $spacer * 30;
26
35
  margin-bottom: $spacer;
27
36
  }
28
-
29
- .#{$n}-unstarted-wrapper .#{$n}-pre-chat-messages,
30
- .#{$n}-unstarted-wrapper .#{$n}-cvco-suggestions {
31
- display: none;
32
- transition: transform $transition, opacity $transition;
33
- opacity: 0;
34
- }
35
-
36
- .#{$n}-unstarted-wrapper.#{$n}-transition--visible .#{$n}-pre-chat-messages,
37
- .#{$n}-unstarted-wrapper.#{$n}-transition--visible .#{$n}-cvco-suggestions {
38
- display: block;
39
- }
40
-
41
- .#{$n}-unstarted-wrapper.#{$n}-transition--in .#{$n}-pre-chat-messages,
42
- .#{$n}-unstarted-wrapper.#{$n}-transition--in .#{$n}-cvco-suggestions {
43
- transition: transform $transition-delay, opacity $transition-delay;
44
- opacity: 1;
45
- }
46
-
47
- &.#{$n}-app--layout-window .#{$n}-pre-chat-messages {
48
- transform: scale(0);
49
- transform-origin: 100% 100%;
50
- }
51
-
52
- &.#{$n}-app--layout-window
53
- .#{$n}-unstarted-wrapper.#{$n}-transition--in
54
- .#{$n}-pre-chat-messages {
55
- transform: scale(1);
56
- }
@@ -193,7 +193,7 @@ $avatar-size: $badge-touch-size;
193
193
  }
194
194
  }
195
195
 
196
- &.cvco-message--source-user .#{$n}-message__body {
196
+ &.#{$n}-message--source-user .#{$n}-message__body {
197
197
  a {
198
198
  color: $white;
199
199
  }
@@ -132,7 +132,7 @@ $button-transition: $transition;
132
132
  background-color: $brand3;
133
133
  }
134
134
 
135
- &:hover .cvco-icon svg path {
135
+ &:hover .#{$n}-icon svg path {
136
136
  fill: $white;
137
137
  }
138
138
  }
@@ -11,7 +11,7 @@
11
11
  margin: 0 0 4rem;
12
12
  }
13
13
 
14
- .chat-inline h2 {
14
+ .chat-inline > h2 {
15
15
  @media only screen and (max-width: 800px) {
16
16
  padding-left: 1rem;
17
17
  }
@@ -1,22 +0,0 @@
1
- import * as Actions from './actions'
2
- import { seamlyActions } from '../../ui/utils/seamly-utils'
3
-
4
- export default function createMiddleware() {
5
- return ({ dispatch }) =>
6
- (next) =>
7
- (action) => {
8
- const result = next(action)
9
-
10
- switch (action.type) {
11
- case String(Actions.initialize):
12
- case String(Actions.update):
13
- if (action?.config?.defaults?.agentName) {
14
- dispatch({
15
- type: seamlyActions.SET_HEADER_SUB_TITLE,
16
- title: action?.config?.defaults?.agentName,
17
- })
18
- }
19
- }
20
- return result
21
- }
22
- }