@pioneer-platform/pioneer 1.0.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.
Files changed (81) hide show
  1. package/LICENSE +24 -0
  2. package/README.md +204 -0
  3. package/es/assets/chat-icon.svg +1 -0
  4. package/es/assets/close-icon.png +0 -0
  5. package/es/assets/image.png +0 -0
  6. package/es/assets/logo-no-bg.svg +1 -0
  7. package/es/assets/paperclip-icon.png +0 -0
  8. package/es/assets/sounds/notification.mp3 +0 -0
  9. package/es/components/ChatWindow.js +59 -0
  10. package/es/components/Header.js +20 -0
  11. package/es/components/Launcher.js +96 -0
  12. package/es/components/LauncherNew.js +130 -0
  13. package/es/components/MessageList.js +22 -0
  14. package/es/components/Messages/EmojiMessage.js +7 -0
  15. package/es/components/Messages/FileMessage.js +10 -0
  16. package/es/components/Messages/TextMessage.js +12 -0
  17. package/es/components/Messages/index.js +40 -0
  18. package/es/components/PinMessage.js +42 -0
  19. package/es/components/UserInput.js +190 -0
  20. package/es/components/emoji-picker/EmojiPicker.js +34 -0
  21. package/es/components/emoji-picker/emojiData.json +1 -0
  22. package/es/components/icons/EmojiIcon.js +36 -0
  23. package/es/components/icons/FileIcon.js +36 -0
  24. package/es/components/icons/SendIcon.js +38 -0
  25. package/es/components/popups/PopupWindow.js +51 -0
  26. package/es/index.js +4 -0
  27. package/es/messageTypes.js +12 -0
  28. package/es/styles/chat-window.css +55 -0
  29. package/es/styles/emojiPicker.css +38 -0
  30. package/es/styles/header.css +53 -0
  31. package/es/styles/index.js +8 -0
  32. package/es/styles/launcher.css +87 -0
  33. package/es/styles/message.css +88 -0
  34. package/es/styles/pin-message.css +24 -0
  35. package/es/styles/popup-window.css +61 -0
  36. package/es/styles/user-input.css +140 -0
  37. package/lib/assets/chat-icon.svg +1 -0
  38. package/lib/assets/close-icon.png +0 -0
  39. package/lib/assets/image.png +0 -0
  40. package/lib/assets/logo-no-bg.svg +1 -0
  41. package/lib/assets/paperclip-icon.png +0 -0
  42. package/lib/assets/sounds/notification.mp3 +0 -0
  43. package/lib/components/ChatWindow.js +66 -0
  44. package/lib/components/Header.js +27 -0
  45. package/lib/components/Launcher.js +105 -0
  46. package/lib/components/LauncherNew.js +139 -0
  47. package/lib/components/MessageList.js +31 -0
  48. package/lib/components/Messages/EmojiMessage.js +14 -0
  49. package/lib/components/Messages/FileMessage.js +17 -0
  50. package/lib/components/Messages/TextMessage.js +19 -0
  51. package/lib/components/Messages/index.js +47 -0
  52. package/lib/components/PinMessage.js +49 -0
  53. package/lib/components/UserInput.js +199 -0
  54. package/lib/components/emoji-picker/EmojiPicker.js +41 -0
  55. package/lib/components/emoji-picker/emojiData.json +1 -0
  56. package/lib/components/icons/EmojiIcon.js +43 -0
  57. package/lib/components/icons/FileIcon.js +44 -0
  58. package/lib/components/icons/SendIcon.js +46 -0
  59. package/lib/components/popups/PopupWindow.js +59 -0
  60. package/lib/index.js +7 -0
  61. package/lib/messageTypes.js +14 -0
  62. package/lib/styles/chat-window.css +55 -0
  63. package/lib/styles/emojiPicker.css +38 -0
  64. package/lib/styles/header.css +53 -0
  65. package/lib/styles/index.js +10 -0
  66. package/lib/styles/launcher.css +87 -0
  67. package/lib/styles/message.css +88 -0
  68. package/lib/styles/pin-message.css +24 -0
  69. package/lib/styles/popup-window.css +61 -0
  70. package/lib/styles/user-input.css +140 -0
  71. package/package.json +53 -0
  72. package/umd/chat-icon.f032be1d.svg +1 -0
  73. package/umd/close-icon.3faa3158.png +0 -0
  74. package/umd/image.6779a2a6.png +0 -0
  75. package/umd/logo-no-bg.4d881dc9.svg +1 -0
  76. package/umd/main.8da8d3c4.css +5 -0
  77. package/umd/main.8da8d3c4.css.map +1 -0
  78. package/umd/notification.aa8f8c40.mp3 +0 -0
  79. package/umd/pioneer.js +6684 -0
  80. package/umd/pioneer.min.js +11 -0
  81. package/umd/pioneer.min.js.map +1 -0
@@ -0,0 +1,12 @@
1
+ var MESSAGE_TYPES = {
2
+ CLIENT: {
3
+ NEW_VISITOR: 'client.new_visitor',
4
+ MESSAGE: 'client.message',
5
+ RETURNING_VISITOR: 'client.returning_visitor'
6
+ },
7
+ BROKER: {
8
+ VISITOR_ID: 'broker.visitor_id',
9
+ MESSAGE: 'broker.message'
10
+ }
11
+ };
12
+ module.exports = MESSAGE_TYPES;
@@ -0,0 +1,55 @@
1
+ .sc-chat-window {
2
+ width: 370px;
3
+ height: calc(100% - 120px);
4
+ max-height: 590px;
5
+ position: fixed;
6
+ right: 25px;
7
+ bottom: 10px;
8
+ box-sizing: border-box;
9
+ box-shadow: 0px 7px 40px 2px rgba(148, 149, 150, 0.3);
10
+ background: white;
11
+ display: flex;
12
+ flex-direction: column;
13
+ justify-content: space-between;
14
+ transition: 0.3s ease-in-out;
15
+ border-radius: 10px;
16
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
17
+ }
18
+
19
+ .sc-chat-window.closed {
20
+ opacity: 0;
21
+ visibility: hidden;
22
+ bottom: 30px;
23
+ }
24
+
25
+ .sc-message-list {
26
+ height: 80%;
27
+ overflow-y: auto;
28
+ background-color: white;
29
+ background-size: 100%;
30
+ padding: 40px 0px;
31
+ }
32
+
33
+ .sc-message--me {
34
+ text-align: right;
35
+ }
36
+ .sc-message--them {
37
+ text-align: left;
38
+ }
39
+
40
+ @media (max-width: 450px) {
41
+ .sc-chat-window {
42
+ width: 100%;
43
+ height: 100%;
44
+ max-height: 100%;
45
+ right: 0px;
46
+ bottom: 0px;
47
+ border-radius: 0px;
48
+ }
49
+ .sc-chat-window {
50
+ transition: 0.1s ease-in-out;
51
+ }
52
+ .sc-chat-window.closed {
53
+ bottom: 0px;
54
+ }
55
+ }
@@ -0,0 +1,38 @@
1
+ .sc-emoji-picker {
2
+ overflow: auto;
3
+ width: 100%;
4
+ max-height: calc(100% - 40px);
5
+ box-sizing: border-box;
6
+ padding: 15px;
7
+ }
8
+
9
+ .sc-emoji-picker--category {
10
+ display: flex;
11
+ flex-direction: row;
12
+ flex-wrap: wrap;
13
+ }
14
+
15
+ .sc-emoji-picker--category-title {
16
+ min-width: 100%;
17
+ color: #b8c3ca;
18
+ font-weight: 200;
19
+ font-size: 13px;
20
+ margin: 5px;
21
+ letter-spacing: 1px;
22
+ }
23
+
24
+ .sc-emoji-picker--emoji {
25
+ margin: 5px;
26
+ width: 30px;
27
+ line-height: 30px;
28
+ text-align: center;
29
+ cursor: pointer;
30
+ vertical-align: middle;
31
+ font-size: 28px;
32
+ transition: transform 60ms ease-out,-webkit-transform 60ms ease-out;
33
+ transition-delay: 60ms;
34
+ }
35
+
36
+ .sc-emoji-picker--emoji:hover {
37
+ transform: scale(1.4);
38
+ }
@@ -0,0 +1,53 @@
1
+ .sc-header {
2
+ background: #f39314;
3
+ min-height: 75px;
4
+ border-top-left-radius: 9px;
5
+ border-top-right-radius: 9px;
6
+ color: white;
7
+ padding: 10px;
8
+ box-shadow: 0 1px 4px rgba(0,0,0,.2);
9
+ position: relative;
10
+ box-sizing: border-box;
11
+ display: flex;
12
+ }
13
+
14
+ .sc-header--img {
15
+ border-radius: 50%;
16
+ align-self: center;
17
+ padding: 10px;
18
+ }
19
+
20
+ .sc-header--team-name {
21
+ align-self: center;
22
+ padding: 10px;
23
+ flex: 1;
24
+ user-select: none;
25
+ border-radius: 5px;
26
+ }
27
+
28
+ .sc-header--close-button {
29
+ width: 40px;
30
+ align-self: center;
31
+ height: 40px;
32
+ margin-right: 10px;
33
+ box-sizing: border-box;
34
+ cursor: pointer;
35
+ border-radius: 5px;
36
+ }
37
+
38
+ .sc-header--close-button:hover {
39
+ background: #ed8701;
40
+ }
41
+
42
+ .sc-header--close-button img {
43
+ width: 100%;
44
+ height: 100%;
45
+ padding: 13px;
46
+ box-sizing: border-box;
47
+ }
48
+
49
+ @media (max-width: 450px) {
50
+ .sc-header {
51
+ border-radius: 0px;
52
+ }
53
+ }
@@ -0,0 +1,8 @@
1
+ import './emojiPicker.css';
2
+ import './chat-window.css';
3
+ import './launcher.css';
4
+ import './header.css';
5
+ import './message.css';
6
+ import './user-input.css';
7
+ import './popup-window.css';
8
+ import './pin-message.css';
@@ -0,0 +1,87 @@
1
+ .sc-launcher {
2
+ width: 60px;
3
+ height: 60px;
4
+ background-color: #f39314;
5
+ background-position: center;
6
+ background-repeat: no-repeat;
7
+ position: fixed;
8
+ right: 25px;
9
+ bottom: 25px;
10
+ border-radius: 50%;
11
+ box-shadow: none;
12
+ transition: box-shadow 0.2s ease-in-out;
13
+ }
14
+
15
+ .sc-launcher:before {
16
+ content: '';
17
+ position: relative;
18
+ display: block;
19
+ width: 60px;
20
+ height: 60px;
21
+ border-radius: 50%;
22
+ transition: box-shadow 0.2s ease-in-out;
23
+ }
24
+
25
+ .sc-launcher.opened {
26
+ visibility: hidden;
27
+ }
28
+
29
+ .sc-launcher .sc-open-icon,
30
+ .sc-launcher .sc-closed-icon {
31
+ width: 60px;
32
+ height: 60px;
33
+ position: fixed;
34
+ right: 25px;
35
+ bottom: 25px;
36
+ transition: opacity 100ms ease-in-out, transform 100ms ease-in-out;
37
+ }
38
+
39
+ .sc-launcher .sc-closed-icon {
40
+ transition: opacity 100ms ease-in-out, transform 100ms ease-in-out;
41
+ width: 60px;
42
+ height: 60px;
43
+
44
+ }
45
+
46
+ .sc-launcher .sc-open-icon {
47
+ padding: 20px;
48
+ box-sizing: border-box;
49
+ opacity: 0;
50
+ }
51
+
52
+ .sc-launcher.opened .sc-open-icon {
53
+ transform: rotate(-90deg);
54
+ opacity: 1;
55
+ }
56
+
57
+ .sc-launcher.opened .sc-closed-icon {
58
+ transform: rotate(-90deg);
59
+ opacity: 0;
60
+ }
61
+
62
+ .sc-launcher.opened:before {
63
+ box-shadow: 0px 0px 400px 250px rgba(148, 149, 150, 0.2);
64
+ }
65
+
66
+ .sc-launcher:hover {
67
+ box-shadow: 0 0px 27px 1.5px rgba(0,0,0,0.2);
68
+ }
69
+
70
+ .sc-new-messages-count {
71
+ position: absolute;
72
+ top: -3px;
73
+ left: 41px;
74
+ display: flex;
75
+ justify-content: center;
76
+ flex-direction: column;
77
+ border-radius: 50%;
78
+ width: 22px;
79
+ height: 22px;
80
+ background: #ff4646;
81
+ color: white;
82
+ text-align: center;
83
+ margin: auto;
84
+ font-size: 12px;
85
+ font-weight: 500;
86
+ box-shadow: -1px 1px 2px rgba(0, 0, 0, 0.3);
87
+ }
@@ -0,0 +1,88 @@
1
+ .sc-message {
2
+ width: 300px;
3
+ margin: auto;
4
+ padding-bottom: 10px;
5
+ display: flex;
6
+ }
7
+
8
+ .sc-message--content {
9
+ width: 100%;
10
+ display: flex;
11
+ }
12
+
13
+ .sc-message--content.sent {
14
+ justify-content: flex-end;
15
+ }
16
+
17
+ .sc-message--content.sent .sc-message--avatar {
18
+ display: none;
19
+ }
20
+
21
+ .sc-message--avatar {
22
+ background-image: url(https://d13yacurqjgara.cloudfront.net/assets/avatar-default-aa2eab7684294781f93bc99ad394a0eb3249c5768c21390163c9f55ea8ef83a4.gif);
23
+ background-repeat: no-repeat;
24
+ background-size: 100%;
25
+ background-position: center;
26
+ min-width: 30px;
27
+ min-height: 30px;
28
+ border-radius: 50%;
29
+ align-self: center;
30
+ margin-right: 15px;
31
+ }
32
+
33
+ .sc-message--text {
34
+ padding: 17px 20px;
35
+ border-radius: 6px;
36
+ font-weight: 300;
37
+ font-size: 14px;
38
+ line-height: 1.4;
39
+ white-space: pre-wrap;
40
+ -webkit-font-smoothing: subpixel-antialiased;
41
+ word-wrap: break-word;
42
+ width: calc(100% - 90px);
43
+ }
44
+
45
+ .sc-message--content.sent .sc-message--text {
46
+ color: white;
47
+ background-color: #f39314;
48
+ max-width: calc(100% - 120px);
49
+ word-wrap: break-word;
50
+ }
51
+
52
+ .sc-message--content.received .sc-message--text {
53
+ color: #263238;
54
+ background-color: #f4f7f9;
55
+ margin-right: 40px;
56
+ }
57
+
58
+ .sc-message--emoji {
59
+ font-size: 40px;
60
+ }
61
+
62
+ .sc-message--file {
63
+ background: white;
64
+ border: solid 1px #CCCDD1;
65
+ padding: 15px 20px;
66
+ border-radius: 5px;
67
+ display: flex;
68
+ font-weight: 300;
69
+ font-size: 14px;
70
+ line-height: 1.4;
71
+ cursor: pointer;
72
+ text-decoration: none;
73
+ }
74
+
75
+ .sc-message--file p {
76
+ margin: 0px 0px 0px 10px;
77
+ color: rgba(86, 88, 103, 0.6);
78
+ }
79
+
80
+ .sc-message--file .sc-user-input--file-icon:hover path {
81
+ fill: rgba(86, 88, 103, 0.3);
82
+ }
83
+
84
+ @media (max-width: 450px) {
85
+ .sc-message {
86
+ width: 80%;
87
+ }
88
+ }
@@ -0,0 +1,24 @@
1
+ .sc-pin--message {
2
+ display: flex;
3
+ padding: 5px;
4
+ background-color: #f4f7f9;
5
+ cursor: pointer;
6
+ }
7
+
8
+ .sc-pin--message--img {
9
+ border-radius: 15px;
10
+ align-self: center;
11
+ width: 45px;
12
+ height: 45px;
13
+ padding: 5px;
14
+ }
15
+
16
+ .sc-pin--message--desc {
17
+ padding: 10px;
18
+ font-size: 12px;
19
+ }
20
+
21
+ .sc-pin--message--title {
22
+ font-size: 16px;
23
+ margin-bottom: 2px;
24
+ }
@@ -0,0 +1,61 @@
1
+ .sc-popup-window {
2
+ position: relative;
3
+ width: 150px;
4
+ }
5
+
6
+ .sc-popup-window--cointainer {
7
+ position: absolute;
8
+ bottom: 20px;
9
+ right: 100px;
10
+ width: 330px;
11
+ max-height: 260px;
12
+ height: 260px;
13
+ box-shadow: 0px 7px 40px 2px rgba(148, 149, 150, 0.3);
14
+ background: white;
15
+ border-radius: 10px;
16
+ outline: none;
17
+ transition: 0.2s ease-in-out;
18
+ z-index: 1;
19
+ padding: 0px 5px 5px 5px;
20
+ box-sizing: border-box;
21
+ }
22
+
23
+ .sc-popup-window--cointainer.closed {
24
+ opacity: 0;
25
+ visibility: hidden;
26
+ bottom: 14px;
27
+ }
28
+
29
+ .sc-popup-window--cointainer:after {
30
+ content: "";
31
+ width: 14px;
32
+ height: 14px;
33
+ background: white;
34
+ position: absolute;
35
+ z-index: -1;
36
+ bottom: -6px;
37
+ right: 28px;
38
+ transform: rotate(45deg);
39
+ border-radius: 2px;
40
+ }
41
+
42
+ .sc-popup-window--search {
43
+ width: 290px;
44
+ box-sizing: border-box;
45
+ margin: auto;
46
+ display: block;
47
+ border-width: 0px 0px 1px 0px;
48
+ color: #565867;
49
+ padding-left: 25px;
50
+ height: 40px;
51
+ font-size: 14px;
52
+ background-image: url(https://js.intercomcdn.com/images/search@2x.32fca88e.png);
53
+ background-size: 16px 16px;
54
+ background-repeat: no-repeat;
55
+ background-position: 0 12px;
56
+ outline: none;
57
+ }
58
+
59
+ .sc-popup-window--search::placeholder {
60
+ color: #C1C7CD;
61
+ }
@@ -0,0 +1,140 @@
1
+ .sc-user-input {
2
+ min-height: 55px;
3
+ margin: 0px;
4
+ position: relative;
5
+ bottom: 0;
6
+ display: flex;
7
+ background-color: #f4f7f9;
8
+ border-bottom-left-radius: 10px;
9
+ border-bottom-right-radius: 10px;
10
+ transition: background-color .2s ease,box-shadow .2s ease;
11
+ }
12
+
13
+
14
+ .sc-user-input--text {
15
+ width: 300px;
16
+ resize: none;
17
+ border: none;
18
+ outline: none;
19
+ border-bottom-left-radius: 10px;
20
+ box-sizing: border-box;
21
+ padding: 18px;
22
+ font-size: 15px;
23
+ font-weight: 400;
24
+ line-height: 1.33;
25
+ white-space: pre-wrap;
26
+ word-wrap: break-word;
27
+ color: #565867;
28
+ -webkit-font-smoothing: antialiased;
29
+ max-height: 200px;
30
+ overflow: scroll;
31
+ bottom: 0;
32
+ overflow-x: hidden;
33
+ overflow-y: auto;
34
+ }
35
+
36
+ .sc-user-input--text:empty:before {
37
+ content: attr(placeholder);
38
+ display: block; /* For Firefox */
39
+ color: rgba(86, 88, 103, 0.3);
40
+ outline: none;
41
+ }
42
+
43
+ .sc-user-input--buttons {
44
+ width: 100px;
45
+ position: absolute;
46
+ right: 10px;
47
+ height: 100%;
48
+ display: flex;
49
+ justify-content: flex-end;
50
+ }
51
+
52
+ .sc-user-input--button:first-of-type {
53
+ width: 40px;
54
+ }
55
+
56
+ .sc-user-input--button {
57
+ width: 30px;
58
+ height: 55px;
59
+ display: flex;
60
+ flex-direction: column;
61
+ justify-content: center;
62
+ }
63
+
64
+ .sc-user-input--button button {
65
+ cursor: pointer;
66
+ }
67
+
68
+ .sc-user-input--buttons input[type="file"] {
69
+ display: none;
70
+ }
71
+
72
+ .sc-user-input--picker-wrapper {
73
+ display: flex;
74
+ flex-direction: column;
75
+ }
76
+
77
+ .sc-user-input.active {
78
+ box-shadow: none;
79
+ background-color: white;
80
+ box-shadow: 0px -5px 20px 0px rgba(150, 165, 190, 0.2);
81
+ }
82
+
83
+ .sc-user-input--file-icon,
84
+ .sc-user-input--send-icon {
85
+ height: 20px;
86
+ width: 20px;
87
+ cursor: pointer;
88
+ align-self: center;
89
+ outline: none;
90
+ }
91
+
92
+ .sc-user-input--file-icon path,
93
+ .sc-user-input--send-icon path {
94
+ fill: rgba(86, 88, 103, 0.3);
95
+ }
96
+
97
+ .sc-user-input--file-icon:hover path,
98
+ .sc-user-input--send-icon:hover path {
99
+ fill: rgba(86, 88, 103, 1);
100
+ }
101
+
102
+ .sc-user-input--emoji-icon-wrapper,
103
+ .sc-user-input--send-icon-wrapper,
104
+ .sc-user-input--file-icon-wrapper {
105
+ background: none;
106
+ border: none;
107
+ padding: 2px;
108
+ margin: 0px;
109
+ display: flex;
110
+ flex-direction: column;
111
+ justify-content: center;
112
+ }
113
+
114
+ .sc-user-input--send-icon-wrapper,
115
+ .sc-user-input--file-icon-wrapper {
116
+ flex-direction: row;
117
+ }
118
+
119
+ .sc-user-input--emoji-icon-wrapper:focus {
120
+ outline: none;
121
+ }
122
+
123
+ .sc-user-input--emoji-icon {
124
+ height: 18px;
125
+ cursor: pointer;
126
+ align-self: center;
127
+ }
128
+
129
+ .sc-user-input--emoji-icon path, .sc-user-input--emoji-icon circle {
130
+ fill: rgba(86, 88, 103, 0.3);
131
+ }
132
+
133
+ .sc-user-input--emoji-icon-wrapper:focus .sc-user-input--emoji-icon path,
134
+ .sc-user-input--emoji-icon-wrapper:focus .sc-user-input--emoji-icon circle,
135
+ .sc-user-input--emoji-icon.active path,
136
+ .sc-user-input--emoji-icon.active circle,
137
+ .sc-user-input--emoji-icon:hover path,
138
+ .sc-user-input--emoji-icon:hover circle {
139
+ fill: rgba(86, 88, 103, 1);
140
+ }
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-4749.48 -5020 35.036 35.036"><defs><style>.a{fill:none;}.b{fill:#4e8cff;}.c{clip-path:url(#a);}.d{fill:#fff;}.e{fill:#eff4f9;}</style><clipPath id="a"><path class="a" d="M0-399.479H17.555v17.555H0Z" transform="translate(0 399.479)"/></clipPath></defs><g transform="translate(-4886 -5075)"><circle class="b" cx="17.518" cy="17.518" r="17.518" transform="translate(136.52 55)"/><g transform="translate(145.13 64)"><g class="c"><g transform="translate(0 0)"><path class="d" d="M-381.924-190.962a8.778,8.778,0,0,0-8.778-8.778,8.778,8.778,0,0,0-8.778,8.778,8.745,8.745,0,0,0,2.26,5.879v1.442c0,.8.492,1.457,1.1,1.457h5.83a.843.843,0,0,0,.183-.02,8.778,8.778,0,0,0,8.184-8.757" transform="translate(399.479 199.74)"/></g><g transform="translate(0 0)"><path class="e" d="M-68.763-194.079a9.292,9.292,0,0,1,6.38-8.888c-.252-.022-.506-.033-.763-.033a8.774,8.774,0,0,0-8.778,8.778A9.508,9.508,0,0,0-69.7-188.3c.005,0,0,.009,0,.01-.311.352-1.924,2.849.021,2.849h2.25c-1.23-.022,1.263-2.107.269-3.494a8.225,8.225,0,0,1-1.6-5.141" transform="translate(71.924 203)"/></g></g></g></g></svg>
Binary file
Binary file
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-4749.48 -5020 35.036 35.036"><defs><style>.a{fill:none;}.b{fill:#4e8cff;}.c{clip-path:url(#a);}.d{fill:#fff;}.e{fill:#eff4f9;}</style><clipPath id="a"><path class="a" d="M0-399.479H17.555v17.555H0Z" transform="translate(0 399.479)"/></clipPath></defs><g transform="translate(-4886 -5075)"><g transform="translate(145.13 64)"><g class="c"><g transform="translate(0 0)"><path class="d" d="M-381.924-190.962a8.778,8.778,0,0,0-8.778-8.778,8.778,8.778,0,0,0-8.778,8.778,8.745,8.745,0,0,0,2.26,5.879v1.442c0,.8.492,1.457,1.1,1.457h5.83a.843.843,0,0,0,.183-.02,8.778,8.778,0,0,0,8.184-8.757" transform="translate(399.479 199.74)"/></g><g transform="translate(0 0)"><path class="e" d="M-68.763-194.079a9.292,9.292,0,0,1,6.38-8.888c-.252-.022-.506-.033-.763-.033a8.774,8.774,0,0,0-8.778,8.778A9.508,9.508,0,0,0-69.7-188.3c.005,0,0,.009,0,.01-.311.352-1.924,2.849.021,2.849h2.25c-1.23-.022,1.263-2.107.269-3.494a8.225,8.225,0,0,1-1.6-5.141" transform="translate(71.924 203)"/></g></g></g></g></svg>
Binary file
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports["default"] = void 0;
5
+ var _react = _interopRequireDefault(require("react"));
6
+ var _propTypes = _interopRequireDefault(require("prop-types"));
7
+ var _classnames = _interopRequireDefault(require("classnames"));
8
+ var _MessageList = _interopRequireDefault(require("./MessageList"));
9
+ var _UserInput = _interopRequireDefault(require("./UserInput"));
10
+ var _Header = _interopRequireDefault(require("./Header"));
11
+ var _PinMessage = _interopRequireDefault(require("./PinMessage"));
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
+ function ChatWindow(props) {
14
+ var isOpen = props.isOpen,
15
+ onClose = props.onClose,
16
+ agentProfile = props.agentProfile,
17
+ showEmoji = props.showEmoji,
18
+ fileUpload = props.fileUpload,
19
+ messageList = props.messageList,
20
+ onUserInputSubmit = props.onUserInputSubmit,
21
+ onFilesSelected = props.onFilesSelected,
22
+ pinMessage = props.pinMessage,
23
+ onPinMessage = props.onPinMessage,
24
+ placeholder = props.placeholder;
25
+ var teamName = agentProfile.teamName,
26
+ imageUrl = agentProfile.imageUrl;
27
+ return /*#__PURE__*/_react["default"].createElement("div", {
28
+ className: (0, _classnames["default"])('sc-chat-window', {
29
+ 'opened': isOpen
30
+ }, {
31
+ 'closed': !isOpen
32
+ })
33
+ }, /*#__PURE__*/_react["default"].createElement(_Header["default"], {
34
+ teamName: teamName,
35
+ imageUrl: imageUrl,
36
+ onClose: onClose
37
+ }), pinMessage && /*#__PURE__*/_react["default"].createElement(_PinMessage["default"], {
38
+ pinMessage: pinMessage,
39
+ onPinMessage: onPinMessage
40
+ }), /*#__PURE__*/_react["default"].createElement(_MessageList["default"], {
41
+ messages: messageList,
42
+ imageUrl: imageUrl
43
+ }), /*#__PURE__*/_react["default"].createElement(_UserInput["default"], {
44
+ onSubmit: onUserInputSubmit,
45
+ onFilesSelected: onFilesSelected,
46
+ showEmoji: showEmoji,
47
+ fileUpload: fileUpload,
48
+ placeholder: placeholder
49
+ }));
50
+ }
51
+ ChatWindow.propTypes = process.env.NODE_ENV !== "production" ? {
52
+ isOpen: _propTypes["default"].bool.isRequired,
53
+ onClose: _propTypes["default"].func.isRequired,
54
+ agentProfile: _propTypes["default"].object.isRequired,
55
+ showEmoji: _propTypes["default"].bool,
56
+ fileUpload: _propTypes["default"].bool,
57
+ messageList: _propTypes["default"].array,
58
+ onUserInputSubmit: _propTypes["default"].func.isRequired,
59
+ onFilesSelected: _propTypes["default"].func,
60
+ pinMessage: _propTypes["default"].object,
61
+ onPinMessage: _propTypes["default"].func,
62
+ placeholder: _propTypes["default"].string
63
+ } : {};
64
+ var _default = ChatWindow;
65
+ exports["default"] = _default;
66
+ module.exports = exports.default;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports["default"] = void 0;
5
+ var _react = _interopRequireDefault(require("react"));
6
+ var _closeIcon = _interopRequireDefault(require("./../assets/close-icon.png"));
7
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
8
+ function Header(props) {
9
+ return /*#__PURE__*/_react["default"].createElement("div", {
10
+ className: "sc-header"
11
+ }, /*#__PURE__*/_react["default"].createElement("img", {
12
+ className: "sc-header--img",
13
+ src: props.imageUrl,
14
+ alt: ""
15
+ }), /*#__PURE__*/_react["default"].createElement("div", {
16
+ className: "sc-header--team-name"
17
+ }, " ", props.teamName, " "), /*#__PURE__*/_react["default"].createElement("div", {
18
+ className: "sc-header--close-button",
19
+ onClick: props.onClose
20
+ }, /*#__PURE__*/_react["default"].createElement("img", {
21
+ src: _closeIcon["default"],
22
+ alt: ""
23
+ })));
24
+ }
25
+ var _default = Header;
26
+ exports["default"] = _default;
27
+ module.exports = exports.default;