@chat21/chat21-ionic 3.0.80-rc.1 → 3.0.80

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 (141) hide show
  1. package/CHANGELOG.md +4 -61
  2. package/README.md +2 -2
  3. package/package.json +2 -2
  4. package/src/app/app.component.html +1 -7
  5. package/src/app/app.component.scss +2 -18
  6. package/src/app/app.component.ts +15 -73
  7. package/src/app/app.module.ts +1 -3
  8. package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.ts +1 -8
  9. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +23 -75
  10. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +85 -162
  11. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +2 -39
  12. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +19 -7
  13. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.scss +10 -6
  14. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.spec.ts +2 -2
  15. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +25 -16
  16. package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.html +1 -5
  17. package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.scss +15 -22
  18. package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.ts +5 -25
  19. package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.html +1 -2
  20. package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.scss +15 -14
  21. package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.ts +5 -24
  22. package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.html +1 -6
  23. package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.scss +13 -12
  24. package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.ts +5 -26
  25. package/src/app/chatlib/conversation-detail/message/html/html.component.ts +1 -0
  26. package/src/app/chatlib/conversation-detail/message/info-message/info-message.component.scss +2 -2
  27. package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.html +6 -16
  28. package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.scss +3 -1
  29. package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.ts +0 -2
  30. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +52 -78
  31. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.scss +20 -62
  32. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +10 -14
  33. package/src/app/components/canned-response/canned-response.component.html +5 -5
  34. package/src/app/components/canned-response/canned-response.component.scss +1 -1
  35. package/src/app/components/canned-response/canned-response.component.ts +0 -1
  36. package/src/app/components/contacts-directory/contacts-directory.component.html +26 -22
  37. package/src/app/components/contacts-directory/contacts-directory.component.scss +6 -8
  38. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.html +3 -0
  39. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.scss +21 -0
  40. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.spec.ts +24 -0
  41. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.ts +14 -0
  42. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.html +54 -0
  43. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.scss +98 -0
  44. package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.spec.ts → conversation-detail/bubble-my-message/bubble-my-message.component.spec.ts} +6 -6
  45. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.ts +84 -0
  46. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.html +30 -0
  47. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.scss +83 -0
  48. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.spec.ts +24 -0
  49. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.ts +68 -0
  50. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.html +3 -0
  51. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.scss +10 -0
  52. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.spec.ts +24 -0
  53. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.ts +14 -0
  54. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +42 -61
  55. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +61 -98
  56. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +25 -9
  57. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +5 -6
  58. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +4 -4
  59. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +83 -4
  60. package/src/app/components/conversation-detail/option-header/option-header.component.html +13 -0
  61. package/src/app/components/conversation-detail/option-header/option-header.component.scss +0 -0
  62. package/src/app/components/{conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.spec.ts → conversation-detail/option-header/option-header.component.spec.ts} +5 -5
  63. package/src/app/components/{conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.ts → conversation-detail/option-header/option-header.component.ts} +4 -5
  64. package/src/app/components/conversation-info/info-content/info-content.component.html +1 -2
  65. package/src/app/components/conversation-info/info-content/info-content.component.ts +2 -3
  66. package/src/app/components/conversation-info/info-direct/info-direct.component.html +9 -1
  67. package/src/app/components/conversation-info/info-direct/info-direct.component.ts +2 -0
  68. package/src/app/components/conversation-info/info-group/info-group.component.html +108 -44
  69. package/src/app/components/conversation-info/info-group/info-group.component.scss +61 -101
  70. package/src/app/components/conversation-info/info-group/info-group.component.ts +0 -1
  71. package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.html → ddp-header/ddp-header.component.html} +3 -3
  72. package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.scss → ddp-header/ddp-header.component.scss} +4 -16
  73. package/src/app/components/{navbar/navbar.component.spec.ts → ddp-header/ddp-header.component.spec.ts} +6 -6
  74. package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.ts → ddp-header/ddp-header.component.ts} +16 -7
  75. package/src/app/components/project-item/project-item.component.html +149 -98
  76. package/src/app/components/project-item/project-item.component.scss +35 -42
  77. package/src/app/components/project-item/project-item.component.ts +4 -16
  78. package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +3 -3
  79. package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +7 -2
  80. package/src/app/components/utils/user-presence/user-presence.component.html +2 -7
  81. package/src/app/components/utils/user-presence/user-presence.component.scss +18 -35
  82. package/src/app/components/utils/user-presence/user-presence.component.ts +10 -6
  83. package/src/app/pages/contacts-directory/contacts-directory.page.html +1 -1
  84. package/src/app/pages/contacts-directory/contacts-directory.page.scss +0 -41
  85. package/src/app/pages/contacts-directory/contacts-directory.page.ts +0 -2
  86. package/src/app/pages/conversation-detail/conversation-detail.module.ts +8 -0
  87. package/src/app/pages/conversation-detail/conversation-detail.page.html +23 -40
  88. package/src/app/pages/conversation-detail/conversation-detail.page.scss +250 -40
  89. package/src/app/pages/conversation-detail/conversation-detail.page.ts +84 -190
  90. package/src/app/pages/conversations-list/conversations-list.page.html +8 -11
  91. package/src/app/pages/conversations-list/conversations-list.page.scss +2 -11
  92. package/src/app/pages/conversations-list/conversations-list.page.ts +22 -25
  93. package/src/app/pages/create-canned-response/create-canned-response.page.ts +13 -13
  94. package/src/app/pages/loader-preview/loader-preview.page.html +1 -1
  95. package/src/app/pages/loader-preview/loader-preview.page.scss +0 -4
  96. package/src/app/pages/loader-preview/loader-preview.page.ts +2 -1
  97. package/src/app/pages/profile-info/profile-info.page.html +4 -2
  98. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.html +1 -1
  99. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.scss +0 -42
  100. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.ts +0 -1
  101. package/src/app/services/canned-responses/canned-responses.service.ts +0 -26
  102. package/src/app/services/tiledesk/tiledesk.service.ts +25 -1
  103. package/src/app/shared/shared.module.ts +33 -24
  104. package/src/assets/i18n/ar.json +265 -278
  105. package/src/assets/i18n/az.json +1 -14
  106. package/src/assets/i18n/de.json +2 -15
  107. package/src/assets/i18n/en.json +2 -15
  108. package/src/assets/i18n/es.json +2 -15
  109. package/src/assets/i18n/fr.json +1 -14
  110. package/src/assets/i18n/it.json +1 -14
  111. package/src/assets/i18n/kk.json +2 -15
  112. package/src/assets/i18n/pt.json +2 -15
  113. package/src/assets/i18n/ru.json +1 -14
  114. package/src/assets/i18n/sr.json +264 -277
  115. package/src/assets/i18n/sv.json +2 -15
  116. package/src/assets/i18n/tr.json +2 -15
  117. package/src/assets/i18n/uk.json +2 -15
  118. package/src/assets/i18n/uz.json +1 -14
  119. package/src/chat21-core/models/conversation.ts +1 -0
  120. package/src/chat21-core/providers/firebase/firebase-typing.service.ts +9 -7
  121. package/src/chat21-core/utils/constants.ts +1 -5
  122. package/src/chat21-core/utils/user-typing/user-typing.component.html +5 -8
  123. package/src/chat21-core/utils/user-typing/user-typing.component.scss +17 -87
  124. package/src/chat21-core/utils/user-typing/user-typing.component.ts +94 -12
  125. package/src/chat21-core/utils/utils.ts +10 -38
  126. package/src/global.scss +57 -48
  127. package/src/index.html +2 -2
  128. package/src/variables.scss +10 -30
  129. package/deploy_amazon_beta.sh +0 -29
  130. package/deploy_amazon_prod.sh +0 -30
  131. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component_2.html +0 -116
  132. package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.html +0 -12
  133. package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.scss +0 -14
  134. package/src/app/components/navbar/navbar.component.html +0 -103
  135. package/src/app/components/navbar/navbar.component.scss +0 -249
  136. package/src/app/components/navbar/navbar.component.ts +0 -189
  137. package/src/app/services/projects/projects.service.spec.ts +0 -12
  138. package/src/app/services/projects/projects.service.ts +0 -43
  139. package/src/assets/sounds/wheep-wheep.mp3 +0 -0
  140. package/src/chat21-core/models/projects.ts +0 -27
  141. package/src/chat21-core/utils/convertRequestToConversation.ts +0 -41
@@ -33,59 +33,6 @@
33
33
  }
34
34
  }
35
35
 
36
- .manage_conversation_info_container{
37
- height: 34px;
38
- display: flex;
39
- -webkit-box-align: center;
40
- align-items: center;
41
- position: fixed;
42
- transition: transform 300ms ease-in-out 0s;
43
- transform: translate(0px);
44
- right: 300px;
45
- top: 60px;
46
- z-index:10;
47
- background: linear-gradient(to right, rgba(226, 232, 239, 0) 128px, rgb(226, 232, 239) 128px);
48
-
49
- &.close{
50
- right: 0px;
51
- &:not(.mobile){
52
- top: calc(60px + var(--padding-conversation-detail));
53
- }
54
- }
55
-
56
- &.mobile{
57
- right: 0px;
58
- }
59
- &:not(.mobile):not(.close){
60
- right: calc(300px + var(--padding-conversation-detail));
61
- top: calc(60px + var(--padding-conversation-detail));
62
- }
63
- &::before{
64
- content: "";
65
- width: 102px;
66
- height: 34px;
67
- background-image: url(data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjM0IiB2aWV3Qm94PSIwIDAgMTAyIDM0IiB3aWR0aD0iMTAyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogICAgPHBhdGggZD0ibTEwMiAwaC0xMDJsLjA3MTQwOC40MTk3NTNjMTEuMzE5MTkyLS4wMTU1NTggMjIuMjg4MTkyIDMuOTIwMzM3IDMxLjAxMjA5MiAxMS4xMjc2NDdsNy40ODk0IDYuNTAyIDEuNjUwOCAxLjQyMjkgNi42OTU1IDUuNzhjNi41Mzc0IDUuNjQwNSAxNC44ODU3IDguNzQ1MSAyMy41MjI3IDguNzQ3N2gzMS41NTQxeiIKICAgICAgICAgIGZpbGw9IiNlMmU4ZWYiLz4KPC9zdmc+);
68
- position: relative;
69
- left: 50px;
70
- z-index: -1;
71
- }
72
-
73
- ion-button {
74
- text-transform: unset;
75
- color: var(--basic-blue);
76
- &:hover {
77
- --background-hover: transparent;
78
- text-decoration: underline;
79
- text-decoration-color: var(--basic-blue);
80
- }
81
- }
82
-
83
- ion-icon{
84
- margin: 5px;
85
- }
86
- }
87
-
88
-
89
36
  ion-item {
90
37
  --padding-end: 0px;
91
38
  --inner-padding-end: 0px;
@@ -113,33 +60,12 @@ ion-item {
113
60
 
114
61
  .message_sender_fullname {
115
62
  font-size: 0.9em;
116
- margin: 0px 10px 0px 10px;
63
+ margin: 0 0 1px 10px;
117
64
  // color: var(--gray);
118
65
  font-weight: 500;
119
66
  color: #080f1a;
120
67
  }
121
68
 
122
- .typing_container{
123
- display:flex;
124
- align-items: center;
125
-
126
- user-typing {
127
- text-align: right;
128
- }
129
- .typing_info{
130
- color: var(--basic-gray);
131
- margin-left: 10px;
132
- font-size: 12px;
133
- animation: blinker 1s linear infinite;
134
-
135
- @keyframes blinker {
136
- 50% {
137
- opacity: 0;
138
- }
139
- }
140
- }
141
- }
142
-
143
69
  .messages {
144
70
  border-radius: 18px;
145
71
  padding: 0;
@@ -156,16 +82,12 @@ ion-item {
156
82
  align-items: flex-end;
157
83
  justify-content: flex-end;
158
84
  // padding: 2px 0px 4px 40px;
159
- padding: 0px 0px 6px 40px;
160
-
161
- &:hover .message-date-hover, &:hover .btn-add-msg{
162
- display: block;
163
- }
164
-
85
+ padding: 2px 0px 14px 40px; // edited to display the date at the bottom of the "message bubble"
165
86
  .msg_sent {
166
87
  background-color: var(--bubble-blue);
167
88
  color: var(--col-msg-sent);
168
- margin: 0px 0px 0px 0px;
89
+ margin-right: 4px;
90
+ margin-left: 4px;
169
91
  max-width: calc(100% - 70px);
170
92
  min-width: 14px;
171
93
  border-top-right-radius: 8px;
@@ -190,17 +112,8 @@ ion-item {
190
112
 
191
113
  /** recive message **/
192
114
  .base_receive {
193
- padding: 0px 20px 6px 0px;
194
- .message-date{
195
- color: #647491;
196
- font-size: 12px;
197
- align-self: center;
198
- }
199
-
200
-
201
- &:hover .message-date-hover, &:hover .btn-add-msg{
202
- display: block;
203
- }
115
+ // padding: 0px 0px 6px 0px;
116
+ padding: 0px 0px 15px 0px; // edited to display the date at the bottom of the "message bubble"
204
117
  /* avatar */
205
118
  .content-avatar {
206
119
  position: relative;
@@ -229,12 +142,12 @@ ion-item {
229
142
  }
230
143
  /* message */
231
144
  .msg_receive {
232
- background-color: var(--bck-msg-received);
233
- color: var(--col-msg-received);
145
+ background-color: var(--light-white);
146
+ color: #1a1a1a;
234
147
  // max-width: 260px;
235
148
  max-width: calc(100% - 70px);
236
149
  min-width: 14px;
237
- margin: 0 0px 0px 10px;
150
+ margin: 0 20px 4px 10px;
238
151
  height: fit-content;
239
152
  width: auto;
240
153
  border-top-left-radius: 8px;
@@ -254,93 +167,63 @@ ion-item {
254
167
  .has-metadata {
255
168
  max-width: 100% !important;
256
169
  }
257
-
258
170
  }
259
171
 
260
- .message-date-hover{
261
- color: #647491;
262
- font-size: 12px;
263
- align-self: center;
264
-
265
- display: none;
266
-
267
- }
268
-
269
- .btn-add-msg {
270
- border-radius: 50%;
271
- --padding-end: 7px;
272
- --padding-start: 7px;
273
- box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.13);
274
- display: none;
275
- align-self: center;
276
- margin: 0px 5px;
277
-
278
- ion-icon{
279
- font-size: 1.2em;
280
- color: var(--basic-blue)
281
- }
282
-
283
- .add-canned-response-add-icon{
284
- color: var(--basic-blue);
285
- cursor: pointer;
286
- position: relative;
287
- top: 6px;
288
- left: -6px;
289
- font-size: 9px;
290
- }
172
+ .time {
173
+ margin-bottom: 20px;
291
174
  }
292
175
 
293
- /* LOADING */
294
- /*http://tobiasahlin.com/spinkit/*/
295
- #chat21-spinner {
296
- display: none;
297
- width: 70px;
176
+ // Loading Spinner
177
+ .spinner {
178
+ // margin: 100px auto 0;
179
+ width: 90px;
298
180
  min-height: 20px;
299
- margin: 20px auto 0;
181
+ padding: 7px;
300
182
  text-align: center;
301
183
  }
302
- #chat21-spinner.active {
303
- display: block;
304
- }
305
- #chat21-spinner > div {
306
- width: 12px;
307
- height: 12px;
308
- background-color: var(--bubble-blue);
184
+
185
+ .spinner > div {
186
+ width: 10px;
187
+ height: 10px;
188
+ background-color: rgb(255, 255, 255);
189
+
309
190
  border-radius: 100%;
310
191
  display: inline-block;
311
192
  -webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both;
312
193
  animation: sk-bouncedelay 1.4s infinite ease-in-out both;
313
194
  }
314
- #chat21-spinner .chat21-bounce1 {
195
+
196
+ .spinner .bounce1 {
315
197
  -webkit-animation-delay: -0.32s;
316
198
  animation-delay: -0.32s;
317
199
  }
318
- #chat21-spinner .chat21-bounce2 {
200
+
201
+ .spinner .bounce2 {
319
202
  -webkit-animation-delay: -0.16s;
320
203
  animation-delay: -0.16s;
321
204
  }
322
- #chat21-spinner span {
323
- display: block;
324
- margin: 0.5em 0 0 0;
325
- color: var(--col-msg-sent);
326
- /* text-transform: uppercase; */
327
- font-family: 'Roboto', sans-serif;
328
- -webkit-animation: pulse 2000ms linear infinite;
329
- -moz-animation: pulse 2000ms linear infinite;
330
- animation: pulse 2000ms linear infinite;
331
- text-align: center;
332
- }
205
+
333
206
  @-webkit-keyframes sk-bouncedelay {
334
- 0%, 80%, 100% { -webkit-transform: scale(0) }
335
- 40% { -webkit-transform: scale(1.0) }
207
+ 0%,
208
+ 80%,
209
+ 100% {
210
+ -webkit-transform: scale(0);
211
+ }
212
+ 40% {
213
+ -webkit-transform: scale(1);
214
+ }
336
215
  }
216
+
337
217
  @keyframes sk-bouncedelay {
338
- 0%, 80%, 100% {
339
- -webkit-transform: scale(0);
340
- transform: scale(0);
341
- } 40% {
342
- -webkit-transform: scale(1.0);
343
- transform: scale(1.0);
218
+ 0%,
219
+ 80%,
220
+ 100% {
221
+ -webkit-transform: scale(0);
222
+ transform: scale(0);
223
+ }
224
+ 40% {
225
+ -webkit-transform: scale(1);
226
+ transform: scale(1);
344
227
  }
345
228
  }
346
229
 
@@ -362,6 +245,28 @@ ion-item {
362
245
  // left: -26px;
363
246
  }
364
247
 
248
+ :host .base_receive .msg_receive ::ng-deep div > div > div > ion-button.canned {
249
+ display: none;
250
+ position: absolute;
251
+ top: -3px;
252
+ right: -31px;
253
+ }
254
+
255
+ :host .base_receive .msg_receive ::ng-deep div > div > div >ion-button.emoji {
256
+ display: none;
257
+ position: absolute;
258
+ top: -3px;
259
+ right: -51px;
260
+ }
261
+
262
+ // :host .base_receive .msg_receive:hover ::ng-deep div > div > ion-button {
263
+ :host .base_receive:hover .msg_receive ::ng-deep div > div > div > ion-button {
264
+ display: block;
265
+ // position: absolute;
266
+ // top: -11px;
267
+ // left: 91px;
268
+ }
269
+
365
270
  // ---------------------------------------------------------
366
271
  // Long date divider
367
272
  // ---------------------------------------------------------
@@ -390,6 +295,24 @@ ion-item {
390
295
  color: #64748b;
391
296
  }
392
297
 
298
+ // ---------------------------------------------------------
299
+ // message date
300
+ // ---------------------------------------------------------
301
+ :host .base_sent .msg_sent ::ng-deep div > div > div > .message-date {
302
+ position: absolute;
303
+ bottom: -11px;
304
+ color: #64748b;
305
+ font-size: 10px;
306
+ right: 0px;
307
+ }
308
+
309
+ :host .base_receive .msg_receive ::ng-deep div > div > .message-date {
310
+ position: absolute;
311
+ bottom: -11px;
312
+ color: #64748b;
313
+ font-size: 10px;
314
+ left: 0px;
315
+ }
393
316
  // ---------------------------------------------------------
394
317
  // emoticon
395
318
  // ---------------------------------------------------------
@@ -1,6 +1,5 @@
1
- import { MessageModel } from 'src/chat21-core/models/message';
2
1
  import { ConversationContentComponent } from '../conversation-content/conversation-content.component';
3
- import { ChangeDetectorRef, Component, Input, OnInit, Output, EventEmitter, SimpleChange, SimpleChanges } from '@angular/core';
2
+ import { ChangeDetectorRef, Component, Input, OnInit, Output, EventEmitter } from '@angular/core';
4
3
 
5
4
 
6
5
  import { MESSAGE_TYPE_INFO, MESSAGE_TYPE_MINE, MESSAGE_TYPE_OTHERS } from 'src/chat21-core/utils/constants';
@@ -14,8 +13,6 @@ import { TiledeskAuthService } from 'src/chat21-core/providers/tiledesk/tiledesk
14
13
  import { TranslateService } from '@ngx-translate/core';
15
14
  import * as moment from 'moment';
16
15
  import { AppConfigProvider } from 'src/app/services/app-config';
17
- import { ModalController } from '@ionic/angular';
18
- import { CreateCannedResponsePage } from 'src/app/pages/create-canned-response/create-canned-response.page';
19
16
  @Component({
20
17
  selector: 'ion-conversation-detail',
21
18
  templateUrl: './ion-conversation-detail.component.html',
@@ -27,17 +24,14 @@ export class IonConversationDetailComponent extends ConversationContentComponent
27
24
  @Input() channelType: string;
28
25
  @Input() areVisibleCAR: boolean;
29
26
  @Input() supportMode: boolean;
30
- @Input() isMobile: boolean;
31
27
  @Output() onElementRendered = new EventEmitter<{element: string, status: boolean}>();
32
28
  @Output() onAddUploadingBubble = new EventEmitter<boolean>();
33
- @Output() onOpenCloseInfoConversation = new EventEmitter<boolean>();
34
-
29
+
35
30
  public public_Key: any
36
31
  public uploadProgress: number = 100
37
32
  public fileType: any
38
33
  public browserLang: string;
39
34
  public addAsCannedResponseTooltipText: string;
40
- public openInfoConversation: boolean = true;
41
35
  isImage = isImage;
42
36
  isFile = isFile;
43
37
  isFrame = isFrame;
@@ -64,7 +58,6 @@ export class IonConversationDetailComponent extends ConversationContentComponent
64
58
  public tiledeskAuthService: TiledeskAuthService,
65
59
  private translate: TranslateService,
66
60
  public appConfigProvider: AppConfigProvider,
67
- public modalController: ModalController,
68
61
  ) {
69
62
  super(cdref, uploadService)
70
63
 
@@ -73,11 +66,6 @@ export class IonConversationDetailComponent extends ConversationContentComponent
73
66
  ngOnInit() {
74
67
  this.listenToUploadFileProgress();
75
68
  this.setMomentLocaleAndGetTranslation();
76
-
77
- }
78
-
79
- ngOnChanges(changes: SimpleChanges){
80
- this.isMobile? this.openInfoConversation = false: null;
81
69
  }
82
70
 
83
71
 
@@ -148,11 +136,6 @@ export class IonConversationDetailComponent extends ConversationContentComponent
148
136
  this.onElementRendered.emit(event)
149
137
  }
150
138
 
151
- onOpenCloseInfoConversationFN(){
152
- this.openInfoConversation = !this.openInfoConversation
153
- this.onOpenCloseInfoConversation.emit(this.openInfoConversation)
154
- }
155
-
156
139
  /**
157
140
  * Track by function for ngFor loops
158
141
  *
@@ -164,24 +147,4 @@ export class IonConversationDetailComponent extends ConversationContentComponent
164
147
  // console.log('[CONVS-DETAIL][ION-CONVS-DETAIL] - trackByFn item', item)
165
148
  return item.uid || index;
166
149
  }
167
-
168
-
169
- async presentCreateCannedResponseModal(message: MessageModel): Promise<any> {
170
- this.logger.log('[BUBBLE-MESSAGE] PRESENT CREATE CANNED RESPONSE MODAL ')
171
- const attributes = {
172
- message: message,
173
- }
174
- const modal: HTMLIonModalElement = await this.modalController.create({
175
- component: CreateCannedResponsePage,
176
- componentProps: attributes,
177
- swipeToClose: false,
178
- backdropDismiss: false,
179
- })
180
- modal.onDidDismiss().then((dataReturned: any) => {
181
- //
182
- this.logger.log('[BUBBLE-MESSAGE] ', dataReturned.data)
183
- })
184
-
185
- return await modal.present()
186
- }
187
150
  }
@@ -7,12 +7,6 @@
7
7
 
8
8
 
9
9
  <div>
10
-
11
- <div *ngIf="messageType(MESSAGE_TYPE_OTHERS, message) && !isSameSender"
12
- [style.color]="convertColorToRGBA(fontColor, 65)"
13
- [ngStyle]="{'margin': (isImage(message) || isFrame(message))? '10px 16px 0px 16px': '10px 8px 0px 8px'}" class="message_sender_fullname">
14
- {{message?.sender_fullname}}
15
- </div>
16
10
  <!-- message type:: image -->
17
11
  <!-- <div *ngIf="message.type == 'image' && message.metadata" [ngStyle] = "{ 'max-width': getSizeImg(message).width, 'max-height': getSizeImg(message).height }">
18
12
  <img class="message-contentX message-content-imageX" [src]="message.metadata.src" />
@@ -49,10 +43,14 @@
49
43
 
50
44
  <!-- [tooltip]="timeTooltipLeft" [options]="tooltipOptions" placement="left" content-type="template" (click)="handleTooltipEvents($event)" -->
51
45
  <div *ngIf="message?.text">
46
+ <span class="message-date"> {{message.timestamp | date:'HH:mm' }} </span>
47
+ <!-- <ng-template #timeTooltipLeft>
48
+ <span> {{message.timestamp | amCalendar }} </span>
49
+ </ng-template> -->
52
50
 
53
51
  <chat-text *ngIf="message?.type !=='html'"
54
52
  [text]="message?.text"
55
- [color]="fontColor"
53
+ [color]="textColor"
56
54
  [message]="message"
57
55
  (onBeforeMessageRender)="returnOnBeforeMessageRender($event)"
58
56
  (onAfterMessageRender)="returnOnAfterMessageRender($event)">
@@ -62,6 +60,20 @@
62
60
  [htmlText]="message?.text">
63
61
  </chat-html>
64
62
 
63
+ <ng-container *ngIf="areVisibleCAR && supportMode">
64
+ <ion-button shape="round" size="small" class="btn-add-msg canned" ion-button fill="clear"
65
+ (click)="presentCreateCannedResponseModal()" tooltip="{{addAsCannedResponseTooltipText}}"
66
+ [options]="tooltipOptions" placement="bottom">
67
+ <ion-icon slot="icon-only" name="flash-outline" style="font-size: 1em;"> </ion-icon>
68
+ </ion-button>
69
+ </ng-container>
70
+ <!-- <ng-container *ngIf="supportMode">
71
+ <ion-button shape="round" size="small" class="btn-add-msg emoji" ion-button fill="clear"
72
+ (click)="presentEmojiiModal()" tooltip="{{addAsCannedResponseTooltipText}}"
73
+ [options]="tooltipOptions" placement="bottom">
74
+ <ion-icon slot="icon-only" name="happy-outline" style="font-size: 1em;"> </ion-icon>
75
+ </ion-button>
76
+ </ng-container> -->
65
77
  </div>
66
78
  </div>
67
79
 
@@ -11,11 +11,6 @@
11
11
  // -webkit-animation: heartbeat 1.5s ease-in-out both;
12
12
  // animation: heartbeat 1.5s ease-in-out both;
13
13
 
14
- .message_sender_fullname{
15
- font-size: 12px;
16
- font-weight: 600;
17
- }
18
-
19
14
  p {
20
15
  font-size: 1.4em;
21
16
  margin: 0;
@@ -53,7 +48,16 @@
53
48
 
54
49
  }
55
50
  // > .button-native
56
-
51
+ .btn-add-msg {
52
+ border-radius: 50%;
53
+ --padding-end: 7px;
54
+ --padding-start: 7px;
55
+ box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.6);
56
+
57
+ ion-icon{
58
+ font-size: 1.2em;
59
+ }
60
+ }
57
61
 
58
62
 
59
63
 
@@ -50,7 +50,7 @@ describe('BubbleMessageComponent', () => {
50
50
  isSender: false
51
51
  }
52
52
  component.message = messages
53
- component.fontColor = 'black'
53
+ component.textColor = 'black'
54
54
  fixture.detectChanges()
55
55
  const textChild = fixture.debugElement.query(By.css('chat-text'))
56
56
  textChild.properties.text
@@ -76,7 +76,7 @@ describe('BubbleMessageComponent', () => {
76
76
  isSender: false
77
77
  }
78
78
  component.message = messages
79
- component.fontColor = 'black'
79
+ component.textColor = 'black'
80
80
  fixture.detectChanges()
81
81
  const textChild = fixture.debugElement.query(By.css('chat-text'))
82
82
  expect(textChild.properties.text).toEqual(messages.text)
@@ -1,16 +1,15 @@
1
1
  import { Component, ElementRef, EventEmitter, Input, OnChanges, OnInit, Output } from '@angular/core';
2
2
  import { DomSanitizer } from '@angular/platform-browser';
3
3
  import { MessageModel } from 'src/chat21-core/models/message';
4
- import { MAX_WIDTH_IMAGES, MESSAGE_TYPE_MINE, MESSAGE_TYPE_OTHERS, MIN_WIDTH_IMAGES } from 'src/chat21-core/utils/constants';
4
+ import { MAX_WIDTH_IMAGES, MIN_WIDTH_IMAGES } from 'src/chat21-core/utils/constants';
5
5
  import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
6
- import { isFile, isFrame, isImage, messageType } from 'src/chat21-core/utils/utils-message';
6
+ import { isFile, isFrame, isImage } from 'src/chat21-core/utils/utils-message';
7
7
  import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
8
8
  import { TranslateService } from '@ngx-translate/core';
9
9
  import { TiledeskAuthService } from 'src/chat21-core/providers/tiledesk/tiledesk-auth.service';
10
10
  import * as moment from 'moment';
11
11
  import { CreateCannedResponsePage } from 'src/app/pages/create-canned-response/create-canned-response.page'
12
12
  import { ModalController } from '@ionic/angular';
13
- import { convertColorToRGBA } from 'src/chat21-core/utils/utils';
14
13
  @Component({
15
14
  selector: 'chat-bubble-message',
16
15
  templateUrl: './bubble-message.component.html',
@@ -19,25 +18,16 @@ import { convertColorToRGBA } from 'src/chat21-core/utils/utils';
19
18
  export class BubbleMessageComponent implements OnInit, OnChanges {
20
19
 
21
20
  @Input() message: MessageModel;
22
- @Input() isSameSender: boolean;
23
- @Input() fontColor: string;
24
- @Input() fontSize: string;
25
- @Input() fontFamily: string;
21
+ @Input() textColor: string;
22
+ @Input() areVisibleCAR: boolean;
23
+ @Input() supportMode: boolean;
26
24
  @Output() onBeforeMessageRender = new EventEmitter();
27
25
  @Output() onAfterMessageRender = new EventEmitter();
28
26
  @Output() onElementRendered = new EventEmitter<{element: string, status: boolean}>();
29
27
  isImage = isImage;
30
28
  isFile = isFile;
31
29
  isFrame = isFrame;
32
- convertColorToRGBA = convertColorToRGBA
33
-
34
- // ========== begin:: check message type functions ======= //
35
- messageType = messageType;
36
-
37
- MESSAGE_TYPE_MINE = MESSAGE_TYPE_MINE;
38
- MESSAGE_TYPE_OTHERS = MESSAGE_TYPE_OTHERS;
39
- // ========== end:: check message type functions ======= //
40
-
30
+ @Input() addAsCannedResponseTooltipText : string;
41
31
  public browserLang: string;
42
32
 
43
33
  tooltipOptions = {
@@ -204,6 +194,25 @@ export class BubbleMessageComponent implements OnInit, OnChanges {
204
194
  this.onElementRendered.emit({element: event.element, status: event.status})
205
195
  }
206
196
 
197
+ async presentCreateCannedResponseModal(): Promise<any> {
198
+ this.logger.log('[BUBBLE-MESSAGE] PRESENT CREATE CANNED RESPONSE MODAL ')
199
+ const attributes = {
200
+ message: this.message,
201
+ }
202
+ const modal: HTMLIonModalElement = await this.modalController.create({
203
+ component: CreateCannedResponsePage,
204
+ componentProps: attributes,
205
+ swipeToClose: false,
206
+ backdropDismiss: false,
207
+ })
208
+ modal.onDidDismiss().then((dataReturned: any) => {
209
+ //
210
+ this.logger.log('[BUBBLE-MESSAGE] ', dataReturned.data)
211
+ })
212
+
213
+ return await modal.present()
214
+ }
215
+
207
216
 
208
217
  // printMessage(message, messageEl, component) {
209
218
  // const messageOBJ = { message: message, sanitizer: this.sanitizer, messageEl: messageEl, component: component}
@@ -1,7 +1,3 @@
1
- <div #actionButton id="actionButton" class="button-in-msg action"
2
- title="{{button?.value}}"
3
- (click)="actionButtonAction()"
4
- (mouseover)="onMouseOver($event)"
5
- (mouseout)="onMouseOut($event)">
1
+ <div #actionButton id="actionButton" class="button-in-msg action" (click)="actionButtonAction()" title="{{button?.value}}">
6
2
  {{button.value}}
7
3
  </div>
@@ -1,11 +1,12 @@
1
1
  // @import '../../../../../sass/variables';
2
2
 
3
3
  div {
4
- --backgroundColor: --basic-blue;
5
- --textColor: --bck-msg-sent;
6
- --hoverBackgroundColor: --bck-msg-sent;
7
- --hoverTextColor: --basic-blue;
8
- --buttonFontSize: --button-in-msg-font-size;
4
+ --bck-msg-sent: #62a8ea;
5
+ --col-msg-sent:#ffffff;
6
+ --light-white: #f7f7f7;
7
+ --black: #1a1a1a;
8
+ --gray: #aaaaaa;
9
+ --blue: rgb(42, 106, 193);
9
10
  }
10
11
 
11
12
  .button-in-msg {
@@ -14,32 +15,32 @@ div {
14
15
  max-width: 300px;
15
16
  min-width: inherit;
16
17
  cursor: pointer;
17
- border: 1px solid var(--textColor);
18
+ border: 1px solid var(--blue);
18
19
  border-radius: 20px;
19
20
  margin: 3px;
20
- background: var(--backgroundColor);
21
+ background: transparent;
21
22
  overflow: hidden;
22
23
  font-family: 'Muli', sans-serif;
23
- font-size: var(--buttonFontSize);
24
+ font-size: 15px;
24
25
  -o-text-overflow: ellipsis;
25
26
  text-overflow: ellipsis;
26
27
  white-space: nowrap;
27
28
  letter-spacing: -0.24px;
28
29
  -webkit-font-smoothing: antialiased;
29
- color: var(--textColor);
30
+ color: var(--blue);
30
31
  line-height: 16px;
31
32
  }
32
33
 
33
34
  .action {
34
- background: var(--backgroundColor);
35
+ background: white;
35
36
  transition: background-color .6s ease;
36
37
  &:focus,
37
38
  &:hover {
38
- color: var(--hoverTextColor);
39
- background: var(--hoverBackgroundColor);
39
+ color: white;
40
+ background: var(--blue);
40
41
  .icon-button-action {
41
42
  svg {
42
- fill: var(--hoverTextColor);
43
+ fill: white;
43
44
  }
44
45
  }
45
46
  }
@@ -79,12 +80,4 @@ div {
79
80
  // height: 200px;
80
81
  // }
81
82
  // }
82
- }
83
-
84
-
85
- .disabled {
86
- // border: 1px solid #999999;
87
- // background-color: #cccccc;
88
- // color: #666666;
89
- pointer-events: none;
90
- }
83
+ }