@chat21/chat21-web-widget 5.0.55 → 5.0.56-rc.2
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/.github/workflows/build.yml +1 -0
- package/CHANGELOG.md +16 -0
- package/angular.json +6 -7
- package/package.json +5 -4
- package/src/app/app.component.html +1 -11
- package/src/app/app.component.scss +12 -13
- package/src/app/app.component.spec.ts +0 -2
- package/src/app/app.component.ts +29 -35
- package/src/app/app.module.ts +4 -5
- package/src/app/component/conversation-detail/conversation/conversation.component.html +1 -10
- package/src/app/component/conversation-detail/conversation/conversation.component.scss +5 -428
- package/src/app/component/conversation-detail/conversation/conversation.component.ts +23 -25
- package/src/app/component/conversation-detail/conversation-content/conversation-content.component.html +7 -66
- package/src/app/component/conversation-detail/conversation-content/conversation-content.component.scss +11 -81
- package/src/app/component/conversation-detail/conversation-content/conversation-content.component.spec.ts +0 -3
- package/src/app/component/conversation-detail/conversation-content/conversation-content.component.ts +6 -6
- package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.html +7 -32
- package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.scss +11 -11
- package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.ts +8 -8
- package/src/app/component/conversation-detail/conversation-header/conversation-header.component.html +4 -25
- package/src/app/component/conversation-detail/conversation-header/conversation-header.component.scss +5 -5
- package/src/app/component/conversation-detail/conversation-header/conversation-header.component.ts +4 -88
- package/src/app/component/conversation-detail/conversation-internal-frame/conversation-internal-frame.component.html +7 -16
- package/src/app/component/conversation-detail/conversation-internal-frame/conversation-internal-frame.component.ts +2 -26
- package/src/app/component/conversation-detail/conversation-preview/conversation-preview.component.html +1 -11
- package/src/app/component/conversation-detail/conversation-preview/conversation-preview.component.scss +5 -5
- package/src/app/component/conversation-detail/conversation-preview/conversation-preview.component.ts +2 -19
- package/src/app/component/eyeeye-catcher-card/eyeeye-catcher-card.component.html +10 -42
- package/src/app/component/eyeeye-catcher-card/eyeeye-catcher-card.component.scss +1 -2
- package/src/app/component/eyeeye-catcher-card/eyeeye-catcher-card.component.ts +2 -3
- package/src/app/component/form/form-builder/form-builder.component.html +0 -1
- package/src/app/component/form/form-builder/form-builder.component.scss +1 -1
- package/src/app/component/form/form-builder/form-builder.component.ts +4 -5
- package/src/app/component/form/inputs/form-checkbox/form-checkbox.component.scss +1 -2
- package/src/app/component/form/inputs/form-checkbox/form-checkbox.component.ts +2 -3
- package/src/app/component/form/inputs/form-label/form-label.component.ts +0 -1
- package/src/app/component/form/inputs/form-text/form-text.component.scss +3 -13
- package/src/app/component/form/inputs/form-text/form-text.component.ts +1 -2
- package/src/app/component/form/inputs/form-textarea/form-textarea.component.html +0 -13
- package/src/app/component/form/inputs/form-textarea/form-textarea.component.scss +4 -4
- package/src/app/component/form/inputs/form-textarea/form-textarea.component.ts +0 -10
- package/src/app/component/form/prechat-form/prechat-form.component.html +0 -2
- package/src/app/component/form/prechat-form/prechat-form.component.scss +2 -2
- package/src/app/component/form/prechat-form/prechat-form.component.ts +2 -2
- package/src/app/component/home/home.component.scss +7 -7
- package/src/app/component/home/home.component.ts +1 -4
- package/src/app/component/home-conversations/home-conversations.component.scss +7 -7
- package/src/app/component/home-conversations/home-conversations.component.ts +9 -12
- package/src/app/component/last-message/last-message.component.scss +4 -4
- package/src/app/component/last-message/last-message.component.ts +4 -7
- package/src/app/component/launcher-button/launcher-button.component.ts +3 -3
- package/src/app/component/list-all-conversations/list-all-conversations.component.scss +2 -2
- package/src/app/component/list-all-conversations/list-all-conversations.component.ts +3 -3
- package/src/app/component/list-conversations/list-conversations.component.html +1 -1
- package/src/app/component/list-conversations/list-conversations.component.scss +3 -3
- package/src/app/component/list-conversations/list-conversations.component.ts +3 -6
- package/src/app/component/menu-options/menu-options.component.html +1 -8
- package/src/app/component/menu-options/menu-options.component.scss +4 -4
- package/src/app/component/menu-options/menu-options.component.ts +1 -1
- package/src/app/component/message/bubble-message/bubble-message.component.html +3 -4
- package/src/app/component/message/bubble-message/bubble-message.component.scss +3 -3
- package/src/app/component/message/bubble-message/bubble-message.component.spec.ts +0 -2
- package/src/app/component/message/bubble-message/bubble-message.component.ts +10 -15
- package/src/app/component/message/buttons/action-button/action-button.component.scss +6 -6
- package/src/app/component/message/buttons/link-button/link-button.component.scss +7 -7
- package/src/app/component/message/buttons/text-button/text-button.component.scss +8 -8
- package/src/app/component/message/frame/frame.component.scss +1 -1
- package/src/app/component/message/frame/frame.component.ts +1 -1
- package/src/app/component/message/html/html.component.scss +4 -4
- package/src/app/component/message/html/html.component.ts +1 -2
- package/src/app/component/message/image/image.component.scss +1 -1
- package/src/app/component/message/image/image.component.ts +2 -3
- package/src/app/component/message/info-message/info-message.component.html +2 -1
- package/src/app/component/message/info-message/info-message.component.scss +6 -6
- package/src/app/component/message/like-unlike/like-unlike.component.scss +1 -1
- package/src/app/component/message/like-unlike/like-unlike.component.ts +2 -2
- package/src/app/component/message/text/text.component.scss +2 -2
- package/src/app/component/message/text/text.component.ts +1 -1
- package/src/app/component/message-attachment/message-attachment.component.ts +1 -1
- package/src/app/component/selection-department/selection-department.component.scss +6 -6
- package/src/app/component/selection-department/selection-department.component.ts +2 -2
- package/src/app/component/send-button/send-button.component.ts +1 -2
- package/src/app/component/star-rating-widget/star-rating-widget.component.scss +6 -6
- package/src/app/component/star-rating-widget/star-rating-widget.component.ts +2 -2
- package/src/app/pipe/date-ago.pipe.spec.ts +8 -0
- package/src/app/pipe/date-ago.pipe.ts +42 -0
- package/src/app/providers/app-config.service.ts +0 -1
- package/src/app/providers/global-settings.service.ts +3 -31
- package/src/app/providers/star-rating-widget.service.ts +4 -4
- package/src/app/providers/translator.service.ts +3 -11
- package/src/app/providers/waiting.service.ts +2 -2
- package/src/app/sass/_variables.scss +29 -26
- package/src/app/utils/globals.ts +4 -34
- package/src/app/utils/rules.ts +5 -7
- package/src/app/utils/utils.ts +47 -37
- package/src/assets/i18n/en.json +0 -2
- package/src/assets/i18n/es.json +0 -2
- package/src/assets/i18n/fr.json +0 -2
- package/src/assets/i18n/it.json +0 -2
- package/src/assets/twp/index.html +6 -60
- package/src/chat21-core/providers/firebase/firebase-archivedconversations-handler.ts +15 -23
- package/src/chat21-core/providers/firebase/firebase-auth-service.ts +21 -20
- package/src/chat21-core/providers/firebase/firebase-conversation-handler.ts +15 -13
- package/src/chat21-core/providers/firebase/firebase-conversations-handler.ts +16 -23
- package/src/chat21-core/providers/firebase/firebase-groups-handler.ts +15 -11
- package/src/chat21-core/providers/firebase/firebase-image-repo.ts +13 -4
- package/src/chat21-core/providers/firebase/firebase-init-service.ts +3 -3
- package/src/chat21-core/providers/firebase/firebase-notifications.ts +11 -9
- package/src/chat21-core/providers/firebase/firebase-presence.service.ts +14 -11
- package/src/chat21-core/providers/firebase/firebase-typing.service.ts +17 -11
- package/src/chat21-core/providers/firebase/firebase-upload.service.ts +12 -9
- package/src/chat21-core/providers/localSessionStorage.ts +2 -15
- package/src/chat21-core/providers/mqtt/chat-service.ts +12 -2
- package/src/chat21-core/providers/mqtt/mqtt-archivedconversations-handler.ts +1 -34
- package/src/chat21-core/providers/mqtt/mqtt-auth-service.ts +4 -6
- package/src/chat21-core/providers/mqtt/mqtt-conversations-handler.ts +1 -11
- package/src/chat21-core/providers/mqtt/mqtt-notifications.ts +13 -7
- package/src/chat21-core/providers/mqtt/mqtt-presence.service.ts +3 -3
- package/src/chat21-core/providers/mqtt/mqtt-typing.service.ts +3 -3
- package/src/chat21-core/providers/tiledesk/tiledesk-auth.service.ts +0 -1
- package/src/chat21-core/utils/user-typing/user-typing.component.scss +3 -3
- package/src/chat21-core/utils/utils.ts +47 -163
- package/src/launch.js +42 -12
- package/src/models/message.ts +0 -23
- package/src/test-new.html +0 -6
- package/src/app/providers/settings-saver.service.spec.ts +0 -17
- package/src/app/providers/settings-saver.service.ts +0 -56
- package/src/app/providers/storage.service.spec.ts +0 -16
- package/src/app/providers/storage.service.ts +0 -220
- package/src/app/utils/translations.ts +0 -122
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
// $f21ico-schedule: image-url('f21ico-schedule.svg', false, false);
|
|
2
2
|
// $f21ico-done: image-url('../assets/images/f21ico-done.svg', false, false);
|
|
3
3
|
// $f21ico-done_all: image-url('../assets/images/f21ico-done_all.svg', false, false);
|
|
4
|
-
@import 'src/app/sass/variables';
|
|
4
|
+
// @import 'src/app/sass/variables';
|
|
5
5
|
// @import '../../../sass/normalize.css';
|
|
6
6
|
|
|
7
7
|
:host {
|
|
8
|
-
--themeColor:
|
|
9
|
-
--foregroundColor:
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
#scroll-me {
|
|
13
|
-
scroll-behavior: smooth;
|
|
14
|
-
}
|
|
15
|
-
#scroll-me.withoutAnimation {
|
|
16
|
-
scroll-behavior: unset;
|
|
8
|
+
--themeColor: var(--bck-msg-sent);
|
|
9
|
+
--foregroundColor: var(--col-msg-sent);
|
|
17
10
|
}
|
|
18
11
|
|
|
19
12
|
// ============= CSS #chat21-conversation-component ================= //
|
|
@@ -33,384 +26,6 @@
|
|
|
33
26
|
left: 0px;
|
|
34
27
|
right: 0px;
|
|
35
28
|
bottom: 0px;
|
|
36
|
-
// border: 0.1px solid lightgray;
|
|
37
|
-
.c21-title {
|
|
38
|
-
position: absolute;
|
|
39
|
-
left: 50px;
|
|
40
|
-
right: 100px;
|
|
41
|
-
display: flex;
|
|
42
|
-
align-items: center;
|
|
43
|
-
width: auto;
|
|
44
|
-
height: 42px;
|
|
45
|
-
padding: 0px;
|
|
46
|
-
margin: 5px 0px;
|
|
47
|
-
font-size: 1.6em;
|
|
48
|
-
font-weight: 500;
|
|
49
|
-
white-space: nowrap;
|
|
50
|
-
overflow: hidden;
|
|
51
|
-
text-overflow: ellipsis;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.titleText {
|
|
55
|
-
position: relative;
|
|
56
|
-
line-height: 40px;
|
|
57
|
-
text-align: left;
|
|
58
|
-
font-size: 1em;
|
|
59
|
-
}
|
|
60
|
-
.avatar-project {
|
|
61
|
-
position: relative;
|
|
62
|
-
padding: 0;
|
|
63
|
-
margin: 0;
|
|
64
|
-
margin: 0 10px 0 0;
|
|
65
|
-
float: left;
|
|
66
|
-
height: 42px;
|
|
67
|
-
width: 42px;
|
|
68
|
-
line-height: 42px;
|
|
69
|
-
}
|
|
70
|
-
.avatar-placeholder {
|
|
71
|
-
font-size: 16px;
|
|
72
|
-
}
|
|
73
|
-
.avatar-image {
|
|
74
|
-
max-width: 30px;
|
|
75
|
-
max-height: 30px;
|
|
76
|
-
margin: 6px;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/* SET ICON AVATAR */
|
|
80
|
-
.c21-icon-avatar {
|
|
81
|
-
position: relative;
|
|
82
|
-
padding: 0;
|
|
83
|
-
margin: 0;
|
|
84
|
-
height: 40px;
|
|
85
|
-
width: 40px;
|
|
86
|
-
min-height: 40px;
|
|
87
|
-
min-width: 40px;
|
|
88
|
-
line-height: 40px;
|
|
89
|
-
border-radius: 50%;
|
|
90
|
-
overflow: hidden;
|
|
91
|
-
background-color: #ffffff;
|
|
92
|
-
.c21-avatar-placeholder {
|
|
93
|
-
position: absolute;
|
|
94
|
-
top: 0;
|
|
95
|
-
left: 0;
|
|
96
|
-
width: 100%;
|
|
97
|
-
height: 100%;
|
|
98
|
-
border-radius: 50%;
|
|
99
|
-
text-align: center;
|
|
100
|
-
font-size: 1.4em;
|
|
101
|
-
color: #ffffff;
|
|
102
|
-
font-weight: 500;
|
|
103
|
-
}
|
|
104
|
-
.c21-avatar-image {
|
|
105
|
-
position: absolute;
|
|
106
|
-
top: 0;
|
|
107
|
-
left: 0;
|
|
108
|
-
width: 100%;
|
|
109
|
-
height: 100%;
|
|
110
|
-
margin: 0;
|
|
111
|
-
background-repeat: no-repeat;
|
|
112
|
-
background-position: center;
|
|
113
|
-
background-size: cover;
|
|
114
|
-
border-radius: 50%;
|
|
115
|
-
}
|
|
116
|
-
.c21-avatar-image img{
|
|
117
|
-
max-width: 100%;
|
|
118
|
-
width: 100%;
|
|
119
|
-
height: 100%;
|
|
120
|
-
min-width: 25px;
|
|
121
|
-
min-height: 25px;
|
|
122
|
-
object-fit: cover;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
/* SET SCROLLBAR */
|
|
127
|
-
// ============= CSS c21-header ================= //
|
|
128
|
-
.c21-header {
|
|
129
|
-
position: fixed;
|
|
130
|
-
left: 0px;
|
|
131
|
-
right: 0px;
|
|
132
|
-
.c21-header-container{
|
|
133
|
-
.c21-header-content {
|
|
134
|
-
.c21-header-writing{
|
|
135
|
-
position: absolute;
|
|
136
|
-
left: 40px;
|
|
137
|
-
right: 40px;
|
|
138
|
-
bottom: 3px;
|
|
139
|
-
width: auto;
|
|
140
|
-
text-align: center;
|
|
141
|
-
margin: 0px;
|
|
142
|
-
padding: 0px;
|
|
143
|
-
font-size: 1.1em;
|
|
144
|
-
color: #ffffff;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.rowMsg{
|
|
151
|
-
position: relative;
|
|
152
|
-
height: auto;
|
|
153
|
-
display: block;
|
|
154
|
-
}
|
|
155
|
-
// .c21-header-button:hover {
|
|
156
|
-
// background-color: rgba(0, 0, 0, 0.4);
|
|
157
|
-
// border-radius: 20px;
|
|
158
|
-
// height: 40px;
|
|
159
|
-
// width: 40px;
|
|
160
|
-
// margin: 5px 10px;
|
|
161
|
-
// }
|
|
162
|
-
|
|
163
|
-
// ============= CSS c21-body ================= //
|
|
164
|
-
.c21-body {
|
|
165
|
-
// -webkit-box-shadow: inset 0 10px 10px -10px rgba(0,0,0,0.4);
|
|
166
|
-
// -moz-box-shadow: inset 0 10px 10px -10px rgba(0,0,0,0.4);
|
|
167
|
-
// box-shadow: inset 0 10px 10px -10px rgba(0,0,0,0.4);
|
|
168
|
-
position: fixed;
|
|
169
|
-
.c21-body-container {
|
|
170
|
-
// .c21-body-header {
|
|
171
|
-
// .chat21-header-modal-select {
|
|
172
|
-
// font-family: 'Google Sans', sans-serif !important;
|
|
173
|
-
// padding: 0px;
|
|
174
|
-
// background-color: #b9b9b921;
|
|
175
|
-
// margin: 8px;
|
|
176
|
-
// line-height: 1.2em;
|
|
177
|
-
// color: #616161;
|
|
178
|
-
// font-size: 15px;
|
|
179
|
-
// text-align: center;
|
|
180
|
-
// word-wrap: break-word;
|
|
181
|
-
// border-radius: 8px;
|
|
182
|
-
// }
|
|
183
|
-
// .chat21-header-modal-select-more-of-one-dept {
|
|
184
|
-
// position: relative;
|
|
185
|
-
// height: auto;
|
|
186
|
-
// padding: 10px;
|
|
187
|
-
// margin: 30px 0 0 0;
|
|
188
|
-
// }
|
|
189
|
-
// } // end .chat21-sheet-header
|
|
190
|
-
|
|
191
|
-
// .c21-body-content {
|
|
192
|
-
// /* no conflict
|
|
193
|
-
// https://stackoverflow.com/questions/28556520/jquery-widget-css-conflicts-with-third-party-site */
|
|
194
|
-
// /** CONTENT **/
|
|
195
|
-
// .chat21-sheet-content {
|
|
196
|
-
// position: absolute;
|
|
197
|
-
// top: 0;
|
|
198
|
-
// right: 0;
|
|
199
|
-
// left: 0;
|
|
200
|
-
// bottom: 43px;
|
|
201
|
-
// overflow: hidden;
|
|
202
|
-
// .time{
|
|
203
|
-
// margin-bottom: 20px;
|
|
204
|
-
// }
|
|
205
|
-
// /* ====== SET SCROLLBAR ====== */
|
|
206
|
-
// .chat21-conversation-parts-container {
|
|
207
|
-
// height: 100%;
|
|
208
|
-
// overflow-y: hidden;
|
|
209
|
-
// }
|
|
210
|
-
|
|
211
|
-
// #c21-contentScroll{
|
|
212
|
-
// position: absolute;
|
|
213
|
-
// left: 0px;
|
|
214
|
-
// right: 10px;
|
|
215
|
-
// padding: 10px;
|
|
216
|
-
// // display: none;
|
|
217
|
-
// opacity: 0;
|
|
218
|
-
// -webkit-transition: opacity 0.5s; /* Safari */
|
|
219
|
-
// transition: opacity 0.5s;
|
|
220
|
-
// transition-timing-function: ease-in;
|
|
221
|
-
// }
|
|
222
|
-
// .chat21-conversation-parts-container::-webkit-scrollbar {
|
|
223
|
-
// width: 8px;
|
|
224
|
-
// background-color: #00000000!important;
|
|
225
|
-
// }
|
|
226
|
-
// .chat21-conversation-parts-container::-webkit-scrollbar-track {
|
|
227
|
-
// -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.1);
|
|
228
|
-
// background-color: #00000000!important;
|
|
229
|
-
// }
|
|
230
|
-
// .chat21-conversation-parts-container::-webkit-scrollbar-thumb {
|
|
231
|
-
// border-radius: 6px!important;
|
|
232
|
-
// -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.0);
|
|
233
|
-
// background-color: #00000040!important;
|
|
234
|
-
// }
|
|
235
|
-
// #scroll-me {
|
|
236
|
-
// height: 100%;
|
|
237
|
-
// width: 100%;
|
|
238
|
-
// overflow-y: auto;
|
|
239
|
-
// overflow-x: hidden;
|
|
240
|
-
// position: absolute;
|
|
241
|
-
// top: 0;
|
|
242
|
-
// right: 0;
|
|
243
|
-
// }
|
|
244
|
-
// #scroll-me:hover {
|
|
245
|
-
// &::-webkit-scrollbar-thumb {
|
|
246
|
-
// background: #777777;
|
|
247
|
-
// }
|
|
248
|
-
// }
|
|
249
|
-
// .msg_container {
|
|
250
|
-
// overflow: hidden;
|
|
251
|
-
// display: flex;
|
|
252
|
-
// opacity: 0px;
|
|
253
|
-
// }
|
|
254
|
-
// /* ====== SET MESSAGES ====== */
|
|
255
|
-
// .messages {
|
|
256
|
-
// border-radius: 8px;
|
|
257
|
-
// padding: 0;
|
|
258
|
-
// word-wrap: break-word;
|
|
259
|
-
// // padding: 14px;
|
|
260
|
-
// // padding: 6px 6px 6px 6px;
|
|
261
|
-
// // box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
|
|
262
|
-
// // -webkit-animation: heartbeat 1.5s ease-in-out both;
|
|
263
|
-
// // animation: heartbeat 1.5s ease-in-out both;
|
|
264
|
-
|
|
265
|
-
// p {
|
|
266
|
-
// font-size: 1.4em;
|
|
267
|
-
// margin: 0;
|
|
268
|
-
// padding: 14px;
|
|
269
|
-
// font-style: normal;
|
|
270
|
-
// letter-spacing: normal;
|
|
271
|
-
// font-stretch: normal;
|
|
272
|
-
// font-variant: normal;
|
|
273
|
-
// font-weight: 300;
|
|
274
|
-
// overflow: hidden;
|
|
275
|
-
// }
|
|
276
|
-
// img {
|
|
277
|
-
// border-radius: 8px;
|
|
278
|
-
// padding: 3px;
|
|
279
|
-
// margin-bottom: 0px;
|
|
280
|
-
// max-width: calc(100% - 6px);
|
|
281
|
-
// width: auto;
|
|
282
|
-
// height: auto;
|
|
283
|
-
// object-fit: cover;
|
|
284
|
-
// }
|
|
285
|
-
// .message_innerhtml {
|
|
286
|
-
// margin: 0px;
|
|
287
|
-
// // padding: 0px 14px;
|
|
288
|
-
// &.marked{
|
|
289
|
-
// padding:8px;
|
|
290
|
-
// margin-block-start: -1em!important;
|
|
291
|
-
// margin-block-end: -1em!important;
|
|
292
|
-
// }
|
|
293
|
-
|
|
294
|
-
// .text-message {
|
|
295
|
-
// padding-top: 14px;
|
|
296
|
-
// }
|
|
297
|
-
// }
|
|
298
|
-
|
|
299
|
-
// }
|
|
300
|
-
// /* send message */
|
|
301
|
-
// .base_sent {
|
|
302
|
-
// align-items: flex-end;
|
|
303
|
-
// justify-content: flex-end;
|
|
304
|
-
// padding: 2px 0px 4px 40px;
|
|
305
|
-
|
|
306
|
-
// .msg_sent {
|
|
307
|
-
// background-color: var(--themeColor);
|
|
308
|
-
// color: var(--foregroundColor);
|
|
309
|
-
// margin-right: 0;
|
|
310
|
-
// margin-left: 4px;
|
|
311
|
-
// max-width: calc(100% - 30px);
|
|
312
|
-
// min-width: 14px;
|
|
313
|
-
// }
|
|
314
|
-
// .message_innerhtml {
|
|
315
|
-
// padding: 8px;
|
|
316
|
-
// }
|
|
317
|
-
// .emoticon {
|
|
318
|
-
// background-color: transparent!important;
|
|
319
|
-
// font-size: 4em;
|
|
320
|
-
// .message_innerhtml {
|
|
321
|
-
// padding: 0;
|
|
322
|
-
// margin: 0;
|
|
323
|
-
// }
|
|
324
|
-
// }
|
|
325
|
-
|
|
326
|
-
// .status-message {
|
|
327
|
-
// width: 16px;
|
|
328
|
-
// height: 16px;
|
|
329
|
-
// margin-left: 4px;
|
|
330
|
-
// .icon {
|
|
331
|
-
// width: 13px;
|
|
332
|
-
// height: 13px;
|
|
333
|
-
// background-repeat: no-repeat;
|
|
334
|
-
// background-position: center;
|
|
335
|
-
// background-size: cover;
|
|
336
|
-
// overflow-x: hidden;
|
|
337
|
-
// }
|
|
338
|
-
// .c21-ico-schedule {
|
|
339
|
-
// background-image: url("../../../../assets/images/f21ico-schedule.svg");
|
|
340
|
-
// }
|
|
341
|
-
// .c21-ico-done {
|
|
342
|
-
// background-image: url("../../../../assets/images/f21ico-done.svg");
|
|
343
|
-
// }
|
|
344
|
-
// .c21-ico-done_all {
|
|
345
|
-
// background-image: url("../../../../assets/images/f21ico-done_all.svg");
|
|
346
|
-
// }
|
|
347
|
-
// }
|
|
348
|
-
|
|
349
|
-
// }
|
|
350
|
-
|
|
351
|
-
// /** recive message **/
|
|
352
|
-
// .base_receive {
|
|
353
|
-
// padding: 0px 0px 6px 0px;
|
|
354
|
-
// /* avatar */
|
|
355
|
-
// .content-avatar {
|
|
356
|
-
// position: relative;
|
|
357
|
-
// border-radius: 50%;
|
|
358
|
-
// width: 28px;
|
|
359
|
-
// height: 28px;
|
|
360
|
-
// margin-right: 6px;
|
|
361
|
-
|
|
362
|
-
// .profile_image{
|
|
363
|
-
// position: relative;
|
|
364
|
-
// width: 25px;
|
|
365
|
-
// height: 25px;
|
|
366
|
-
// border-radius: 50%;
|
|
367
|
-
// overflow: hidden;
|
|
368
|
-
// background-color: #ffffff;
|
|
369
|
-
// border: 1px solid #e2e2e2;
|
|
370
|
-
// }
|
|
371
|
-
// .profile_image img{
|
|
372
|
-
// max-width: 100%;
|
|
373
|
-
// width: 100%;
|
|
374
|
-
// height: 100%;
|
|
375
|
-
// min-width: 25px;
|
|
376
|
-
// min-height: 25px;
|
|
377
|
-
// object-fit: cover;
|
|
378
|
-
// }
|
|
379
|
-
// }
|
|
380
|
-
// /* message */
|
|
381
|
-
// .msg_receive {
|
|
382
|
-
// background-color: $light-white;
|
|
383
|
-
// color: $black;
|
|
384
|
-
// // max-width: 260px;
|
|
385
|
-
// max-width: calc(100% - 70px);
|
|
386
|
-
// min-width: 14px;
|
|
387
|
-
// margin: 0 20px 4px 10px;
|
|
388
|
-
// height: fit-content;
|
|
389
|
-
// width: auto;
|
|
390
|
-
// }
|
|
391
|
-
// .message_innerhtml {
|
|
392
|
-
// padding: 14px;
|
|
393
|
-
// }
|
|
394
|
-
// .emoticon {
|
|
395
|
-
// background-color: transparent!important;
|
|
396
|
-
// font-size: 4em;
|
|
397
|
-
// .message_innerhtml {
|
|
398
|
-
// padding: 0;
|
|
399
|
-
// margin: 0;
|
|
400
|
-
// }
|
|
401
|
-
// }
|
|
402
|
-
// }
|
|
403
|
-
|
|
404
|
-
// .message_sender_fullname{
|
|
405
|
-
// font-size: 1em;
|
|
406
|
-
// color: $gray;
|
|
407
|
-
// margin: 0 auto 4px auto;
|
|
408
|
-
// }
|
|
409
|
-
|
|
410
|
-
// } // end .chat21-sheet-content
|
|
411
|
-
// } // end .c21-body-content
|
|
412
|
-
} // end .c21-body-container
|
|
413
|
-
}
|
|
414
29
|
}
|
|
415
30
|
|
|
416
31
|
/* ================== CSS chat21-footer ==================== */
|
|
@@ -445,13 +60,13 @@
|
|
|
445
60
|
z-index: 1;
|
|
446
61
|
cursor: pointer;
|
|
447
62
|
background-color: #ffffff;
|
|
448
|
-
border: 1px solid
|
|
63
|
+
border: 1px solid var(--trasp-light-gray);
|
|
449
64
|
// -webkit-box-shadow: 0 3px 2px $trasp-light-black;
|
|
450
65
|
// box-shadow: 0 3px 2px $trasp-light-black;
|
|
451
66
|
text-align: center;
|
|
452
67
|
svg {
|
|
453
68
|
margin: auto;
|
|
454
|
-
fill:
|
|
69
|
+
fill: var(--gray);
|
|
455
70
|
}
|
|
456
71
|
}
|
|
457
72
|
#chat21-buttonToBottom:hover {
|
|
@@ -487,44 +102,6 @@
|
|
|
487
102
|
}
|
|
488
103
|
}
|
|
489
104
|
|
|
490
|
-
/* ==================== OPTION MENU CONTAINER ==================== */
|
|
491
|
-
#c21-options-menu {
|
|
492
|
-
width: auto;
|
|
493
|
-
height: auto;
|
|
494
|
-
min-height: 40px;
|
|
495
|
-
min-width: 100px;
|
|
496
|
-
max-width: 80%;
|
|
497
|
-
position: absolute;
|
|
498
|
-
z-index: 10;
|
|
499
|
-
top: 40px;
|
|
500
|
-
right: 15px;
|
|
501
|
-
border-radius: 6px;
|
|
502
|
-
font-size: 1.2em;
|
|
503
|
-
line-height: normal;
|
|
504
|
-
overflow: hidden;
|
|
505
|
-
border: 1px solid #d7d7d7;
|
|
506
|
-
background-color: #ffffff;
|
|
507
|
-
padding: 10px 0px 10px 0px;
|
|
508
|
-
.c21-header-button {
|
|
509
|
-
padding: 6px 10px 6px 10px;
|
|
510
|
-
display: flex;
|
|
511
|
-
align-items: center;
|
|
512
|
-
}
|
|
513
|
-
.c21-header-button:hover {
|
|
514
|
-
background-color: whitesmoke;
|
|
515
|
-
cursor: pointer;
|
|
516
|
-
}
|
|
517
|
-
.label-menu-item{
|
|
518
|
-
line-height: 20px;
|
|
519
|
-
position: relative;
|
|
520
|
-
margin: 0 10px 0px 10px;
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
105
|
/* ==================== MOBILE VERSION ==================== */
|
|
529
106
|
@media (max-width: 451px) {
|
|
530
107
|
#chat21-conversation-component {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { EventsService } from './../../../providers/events.service';
|
|
2
1
|
import { ChatManager } from 'src/chat21-core/providers/chat-manager';
|
|
2
|
+
import { EventsService } from './../../../providers/events.service';
|
|
3
3
|
|
|
4
4
|
import { ConversationFooterComponent } from './../conversation-footer/conversation-footer.component';
|
|
5
5
|
|
|
6
6
|
// tslint:disable-next-line:max-line-length
|
|
7
|
-
import {
|
|
8
|
-
import { Subscription } from 'rxjs';
|
|
7
|
+
import { AfterViewInit, ChangeDetectorRef, Component, ElementRef, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core';
|
|
9
8
|
|
|
10
9
|
import {
|
|
11
10
|
CHANNEL_TYPE_DIRECT, CHANNEL_TYPE_GROUP, TYPE_MSG_TEXT,
|
|
@@ -17,36 +16,35 @@ import {
|
|
|
17
16
|
import { MessageModel } from 'src/chat21-core/models/message';
|
|
18
17
|
|
|
19
18
|
// utils
|
|
20
|
-
import {
|
|
19
|
+
import { isPopupUrl } from 'src/app/utils/utils';
|
|
21
20
|
import { v4 as uuidv4 } from 'uuid';
|
|
22
21
|
|
|
23
22
|
|
|
24
23
|
// Import the resized event model
|
|
25
24
|
|
|
26
|
-
import {DomSanitizer} from '@angular/platform-browser';
|
|
25
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
27
26
|
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import { ConversationContentComponent } from '../conversation-content/conversation-content.component';
|
|
34
|
-
import { ConversationsHandlerService } from 'src/chat21-core/providers/abstract/conversations-handler.service';
|
|
35
|
-
import { ArchivedConversationsHandlerService } from 'src/chat21-core/providers/abstract/archivedconversations-handler.service';
|
|
27
|
+
import { Subject } from 'rxjs';
|
|
28
|
+
import { takeUntil } from 'rxjs/operators';
|
|
29
|
+
import { AppConfigService } from 'src/app/providers/app-config.service';
|
|
30
|
+
import { StarRatingWidgetService } from 'src/app/providers/star-rating-widget.service';
|
|
31
|
+
import { Globals } from 'src/app/utils/globals';
|
|
36
32
|
import { ConversationModel } from 'src/chat21-core/models/conversation';
|
|
37
33
|
import { AppStorageService } from 'src/chat21-core/providers/abstract/app-storage.service';
|
|
34
|
+
import { ArchivedConversationsHandlerService } from 'src/chat21-core/providers/abstract/archivedconversations-handler.service';
|
|
35
|
+
import { ConversationHandlerBuilderService } from 'src/chat21-core/providers/abstract/conversation-handler-builder.service';
|
|
36
|
+
import { ConversationHandlerService } from 'src/chat21-core/providers/abstract/conversation-handler.service';
|
|
37
|
+
import { ConversationsHandlerService } from 'src/chat21-core/providers/abstract/conversations-handler.service';
|
|
38
38
|
import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
|
|
39
|
-
import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
|
|
40
|
-
import { takeUntil } from 'rxjs/operators';
|
|
41
|
-
import { Subject } from 'rxjs';
|
|
42
39
|
import { TypingService } from 'src/chat21-core/providers/abstract/typing.service';
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import { StarRatingWidgetService } from 'src/app/providers/star-rating-widget.service';
|
|
40
|
+
import { CustomTranslateService } from 'src/chat21-core/providers/custom-translate.service';
|
|
41
|
+
import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
|
|
46
42
|
import { TiledeskRequestsService } from 'src/chat21-core/providers/tiledesk/tiledesk-requests.service';
|
|
47
|
-
import moment from 'moment';
|
|
48
|
-
import { isUserBanned } from 'src/chat21-core/utils/utils-message';
|
|
49
43
|
import { LIVE_PAGE } from 'src/chat21-core/utils/constants';
|
|
44
|
+
import { getDateDifference, popupUrl } from 'src/chat21-core/utils/utils';
|
|
45
|
+
import { isUserBanned } from 'src/chat21-core/utils/utils-message';
|
|
46
|
+
import { AppComponent } from '../../../app.component';
|
|
47
|
+
import { ConversationContentComponent } from '../conversation-content/conversation-content.component';
|
|
50
48
|
// import { TranslateService } from '@ngx-translate/core';
|
|
51
49
|
|
|
52
50
|
@Component({
|
|
@@ -337,14 +335,14 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
|
|
|
337
335
|
/**
|
|
338
336
|
* do per scontato che this.userId esiste!!!
|
|
339
337
|
*/
|
|
340
|
-
initAll() {
|
|
338
|
+
async initAll() {
|
|
341
339
|
|
|
342
340
|
this.logger.debug('[CONV-COMP] ------ 2: setConversation ------ ');
|
|
343
341
|
this.setConversation();
|
|
344
342
|
|
|
345
343
|
this.logger.debug('[CONV-COMP] ------ 3: connectConversation ------ ');
|
|
346
344
|
// this.connectConversation();
|
|
347
|
-
this.initConversationHandler();
|
|
345
|
+
await this.initConversationHandler();
|
|
348
346
|
|
|
349
347
|
this.logger.debug('[CONV-COMP] ------ 4: initializeChatManager ------ ');
|
|
350
348
|
//this.initializeChatManager();
|
|
@@ -549,7 +547,7 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
|
|
|
549
547
|
* carico messaggi
|
|
550
548
|
* attendo x sec se nn arrivano messaggi visualizzo msg welcome
|
|
551
549
|
*/
|
|
552
|
-
initConversationHandler() {
|
|
550
|
+
async initConversationHandler() {
|
|
553
551
|
const tenant = this.g.tenant;
|
|
554
552
|
this.messages = [];
|
|
555
553
|
//TODO-GAB: da sistemare loggedUser in firebase-conversation-handler.service
|
|
@@ -561,7 +559,7 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
|
|
|
561
559
|
this.logger.debug('[CONV-COMP] DETTAGLIO CONV - handler **************', handler, this.conversationWith);
|
|
562
560
|
if (!handler) {
|
|
563
561
|
this.conversationHandlerService = this.conversationHandlerBuilderService.build();
|
|
564
|
-
this.conversationHandlerService.initialize(
|
|
562
|
+
await this.conversationHandlerService.initialize(
|
|
565
563
|
this.conversationWith,
|
|
566
564
|
conversationWithFullname,
|
|
567
565
|
loggedUser,
|