@chat21/chat21-web-widget 5.0.56-rc.1 → 5.0.56-rc.3
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 +13 -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 +4 -63
- 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 +1 -2
- 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 +1 -14
- 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 +1 -1
- 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/chatbot-panel.html +4 -0
- package/src/assets/twp/index.html +2 -57
- 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 +46 -118
- 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
|
@@ -36,13 +36,6 @@ export class FormTextareaComponent implements OnInit {
|
|
|
36
36
|
if(this.stylesMap && this.stylesMap.get('foregroundColor')) this.elementRef.nativeElement.style.setProperty('--foregroundColor', this.stylesMap.get('foregroundColor'));
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
// ngOnChanges(changes: SimpleChange){
|
|
40
|
-
// if(this.hasSubmitted){
|
|
41
|
-
// this.input.nativeElement.classList.add('is-focused')
|
|
42
|
-
// this.setFormStyle()
|
|
43
|
-
// }
|
|
44
|
-
// }
|
|
45
|
-
|
|
46
39
|
onFocusOut(){
|
|
47
40
|
this.input.nativeElement.classList.remove('is-focused')
|
|
48
41
|
}
|
|
@@ -73,9 +66,6 @@ export class FormTextareaComponent implements OnInit {
|
|
|
73
66
|
}
|
|
74
67
|
}
|
|
75
68
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
69
|
setFormStyle(){
|
|
80
70
|
if(this.form.controls[this.controlName].hasError('pattern') ||
|
|
81
71
|
this.form.controls[this.controlName].hasError('required') ||
|
|
@@ -16,7 +16,6 @@ onFocus="document.querySelector('[start-focus-chat21-prechat-form]').focus()">
|
|
|
16
16
|
<svg role="img" aria-labelledby="altIconTitle" [ngStyle]="{'fill': g.themeForegroundColor }" xmlns="http://www.w3.org/2000/svg" width="20px" height="20px" viewBox="0 0 24 24">
|
|
17
17
|
<path fill="none" d="M0 0h24v24H0V0z"/>
|
|
18
18
|
<path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/>
|
|
19
|
-
<!-- <title id="altIconTitle">{{BUTTON_CLOSE_CHAT}}</title> -->
|
|
20
19
|
</svg>
|
|
21
20
|
</button>
|
|
22
21
|
</div>
|
|
@@ -26,7 +25,6 @@ onFocus="document.querySelector('[start-focus-chat21-prechat-form]').focus()">
|
|
|
26
25
|
<div class="c21-header-content">
|
|
27
26
|
<!-- TITLE HEADER -->
|
|
28
27
|
<div class="c21-title" [ngStyle]="{'color': g.themeForegroundColor}">
|
|
29
|
-
<!-- <span>{{g.LABEL_SELECT_TOPIC}}</span> -->
|
|
30
28
|
</div>
|
|
31
29
|
</div>
|
|
32
30
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import '../../../sass/variables';
|
|
1
|
+
// @import '../../../sass/variables';
|
|
2
2
|
// @import '../../../sass/normalize.css';
|
|
3
3
|
|
|
4
4
|
#chat21-prechat-form {
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
margin: 10px 10px 0px 10px;
|
|
83
83
|
}
|
|
84
84
|
.text-danger {
|
|
85
|
-
color:
|
|
85
|
+
color: var(--danger);
|
|
86
86
|
font-size: 1em;
|
|
87
87
|
min-height: 20px;
|
|
88
88
|
background-color: #ffffff;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { FormBuilder,
|
|
1
|
+
import { AfterViewInit, Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
|
|
2
|
+
import { FormBuilder, FormGroup } from '@angular/forms';
|
|
3
3
|
import { Globals } from 'src/app/utils/globals';
|
|
4
4
|
import { AppStorageService } from 'src/chat21-core/providers/abstract/app-storage.service';
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import 'src/app/sass/variables';
|
|
1
|
+
// @import 'src/app/sass/variables';
|
|
2
2
|
// @import '../../../sass/normalize.css';
|
|
3
3
|
|
|
4
4
|
|
|
@@ -184,10 +184,10 @@
|
|
|
184
184
|
border-radius: 16px; //3px;
|
|
185
185
|
font-size: 1.4em;
|
|
186
186
|
line-height: 1.4;
|
|
187
|
-
color:
|
|
187
|
+
color: var(--black);
|
|
188
188
|
overflow: hidden;
|
|
189
|
-
-webkit-box-shadow: 0 4px 15px 0
|
|
190
|
-
|
|
189
|
+
-webkit-box-shadow: 0 4px 15px 0 var(--trasp-light-black), 0 1px 2px 0 var(--trasp-light-black);
|
|
190
|
+
box-shadow: 0 4px 15px 0 var(--trasp-light-black), 0 1px 2px 0 var(--trasp-light-black);
|
|
191
191
|
z-index: 20;
|
|
192
192
|
text-align: left;
|
|
193
193
|
|
|
@@ -262,7 +262,7 @@
|
|
|
262
262
|
padding: 0;
|
|
263
263
|
// margin: 5px 0;
|
|
264
264
|
position: absolute;
|
|
265
|
-
color:
|
|
265
|
+
color: var(--gray);
|
|
266
266
|
top: 0;
|
|
267
267
|
left: 20px; //60px;
|
|
268
268
|
// right: 60px;
|
|
@@ -273,7 +273,7 @@
|
|
|
273
273
|
text-decoration: none;
|
|
274
274
|
cursor: pointer;
|
|
275
275
|
display: inline-block;
|
|
276
|
-
color:
|
|
276
|
+
color: var(--gray);
|
|
277
277
|
font-size: 1.1em;
|
|
278
278
|
font-weight: 500;
|
|
279
279
|
line-height: 22px;
|
|
@@ -304,7 +304,7 @@
|
|
|
304
304
|
.build_version {
|
|
305
305
|
display: none;
|
|
306
306
|
font-size: 1em;
|
|
307
|
-
color:
|
|
307
|
+
color: var(--gray);
|
|
308
308
|
position: absolute;
|
|
309
309
|
bottom: 0px;
|
|
310
310
|
right: 40px; //10px;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AfterViewInit, Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild, ViewEncapsulation } from '@angular/core';
|
|
2
2
|
import { CustomTranslateService } from 'src/chat21-core/providers/custom-translate.service';
|
|
3
3
|
import { ConversationModel } from '../../../chat21-core/models/conversation';
|
|
4
4
|
import { LoggerService } from '../../../chat21-core/providers/abstract/logger.service';
|
|
@@ -6,9 +6,6 @@ import { LoggerInstance } from '../../../chat21-core/providers/logger/loggerInst
|
|
|
6
6
|
import { convertColorToRGBA } from '../../../chat21-core/utils/utils';
|
|
7
7
|
import { Globals } from '../../utils/globals';
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
9
|
@Component({
|
|
13
10
|
selector: 'chat-home',
|
|
14
11
|
templateUrl: './home.component.html',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import 'src/app/sass/variables';
|
|
1
|
+
// @import 'src/app/sass/variables';
|
|
2
2
|
// @import '../../../sass/normalize.css';
|
|
3
3
|
|
|
4
4
|
#c21-app-list-conversations{
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
.c21-header{
|
|
13
|
-
color:
|
|
13
|
+
color: var(--dark-gray);
|
|
14
14
|
height: auto;
|
|
15
15
|
position: relative;
|
|
16
16
|
min-height: 40px; //50px;
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
// padding: 17px 24px 11px 5px;
|
|
34
34
|
padding: 0px 5px;
|
|
35
35
|
float: right;
|
|
36
|
-
fill:
|
|
36
|
+
fill: var(--blue);
|
|
37
37
|
button {
|
|
38
38
|
width: 40px;
|
|
39
39
|
height: 40px;
|
|
40
40
|
svg {
|
|
41
|
-
fill:
|
|
41
|
+
fill: var(--icon-fill-color);
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
button:hover {
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
text-align: left;
|
|
148
148
|
.c21-last-time {
|
|
149
149
|
font-size: 0.8em;
|
|
150
|
-
color:
|
|
150
|
+
color: var(--gray);
|
|
151
151
|
float: right;
|
|
152
152
|
display: block;
|
|
153
153
|
padding: 0;
|
|
@@ -231,7 +231,7 @@
|
|
|
231
231
|
height: auto;
|
|
232
232
|
position: relative;
|
|
233
233
|
// padding: 10px 0 10px 0;
|
|
234
|
-
border-top: 0px solid
|
|
234
|
+
border-top: 0px solid var(--light-gray);
|
|
235
235
|
display: flex; //inline-block;
|
|
236
236
|
align-items: center;
|
|
237
237
|
justify-content: center;
|
|
@@ -276,7 +276,7 @@
|
|
|
276
276
|
font-size: 1.2em;
|
|
277
277
|
line-height: 10px;
|
|
278
278
|
border-radius: 50%;
|
|
279
|
-
background-color:
|
|
279
|
+
background-color: var(--blue);
|
|
280
280
|
color: white;
|
|
281
281
|
font-weight: bold;
|
|
282
282
|
padding: 0px;
|
|
@@ -1,26 +1,24 @@
|
|
|
1
1
|
|
|
2
|
-
import { Component,
|
|
2
|
+
import { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';
|
|
3
3
|
|
|
4
|
-
import { Subscription } from 'rxjs'
|
|
4
|
+
import { Subscription } from 'rxjs';
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
import { Globals } from '../../utils/globals';
|
|
8
|
-
import {
|
|
8
|
+
import { avatarPlaceholder, convertMessage, setColorFromString } from '../../utils/utils';
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
// models
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
import {HumanizeDurationLanguage, HumanizeDuration} from 'humanize-duration-ts';
|
|
12
|
+
import { HumanizeDuration, HumanizeDurationLanguage } from 'humanize-duration-ts';
|
|
13
|
+
import { TranslatorService } from 'src/app/providers/translator.service';
|
|
14
|
+
import { WaitingService } from 'src/app/providers/waiting.service';
|
|
16
15
|
import { ImageRepoService } from 'src/chat21-core/providers/abstract/image-repo.service';
|
|
17
16
|
import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
|
|
18
|
-
import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
|
|
19
|
-
import { TranslatorService } from 'src/app/providers/translator.service';
|
|
20
|
-
import { CustomTranslateService } from 'src/chat21-core/providers/custom-translate.service';
|
|
21
17
|
import { ChatManager } from 'src/chat21-core/providers/chat-manager';
|
|
18
|
+
import { CustomTranslateService } from 'src/chat21-core/providers/custom-translate.service';
|
|
19
|
+
import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
|
|
22
20
|
import { UserAgent } from 'src/models/userAgent';
|
|
23
|
-
import {
|
|
21
|
+
import { ConversationModel } from '../../../chat21-core/models/conversation';
|
|
24
22
|
|
|
25
23
|
|
|
26
24
|
@Component({
|
|
@@ -120,7 +118,6 @@ export class HomeConversationsComponent implements OnInit, OnDestroy {
|
|
|
120
118
|
this.logger.debug('initialize: ListConversationsComponent');
|
|
121
119
|
this.initTranslations();
|
|
122
120
|
|
|
123
|
-
//this.senderId = this.g.senderId;
|
|
124
121
|
this.tenant = this.g.tenant;
|
|
125
122
|
this.LABEL_START_NW_CONV = this.g.LABEL_START_NW_CONV; // IN THE TEMPLATE REPLACED LABEL_START_NW_CONV WITH g.LABEL_START_NW_CONV
|
|
126
123
|
this.listConversations = [];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import 'src/app/sass/variables';
|
|
1
|
+
// @import 'src/app/sass/variables';
|
|
2
2
|
|
|
3
3
|
:host .c21-avatar-image ::ng-deep > chat-avatar-image {
|
|
4
4
|
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
|
|
62
62
|
|
|
63
63
|
.messages {
|
|
64
|
-
border-radius:
|
|
64
|
+
border-radius: var(--border-radius-bubble-message);
|
|
65
65
|
padding: 0;
|
|
66
66
|
word-wrap: break-word;
|
|
67
67
|
|
|
@@ -284,7 +284,7 @@
|
|
|
284
284
|
}
|
|
285
285
|
|
|
286
286
|
/* ==================== MOBILE VERSION ==================== */
|
|
287
|
-
@media (max-width: 451px) {
|
|
287
|
+
// @media (max-width: 451px) {
|
|
288
288
|
// #messagePreview {
|
|
289
289
|
// .boxButtons {
|
|
290
290
|
// display: block;
|
|
@@ -298,4 +298,4 @@
|
|
|
298
298
|
// animation: none;
|
|
299
299
|
// }
|
|
300
300
|
// }
|
|
301
|
-
}
|
|
301
|
+
// }
|
|
@@ -1,20 +1,17 @@
|
|
|
1
|
+
import { AfterViewInit, Component, EventEmitter, Input, OnDestroy, OnInit, Output, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { Subscription } from 'rxjs';
|
|
1
3
|
import { MessageModel } from './../../../chat21-core/models/message';
|
|
2
|
-
import { UserModel } from './../../../chat21-core/models/user';
|
|
3
4
|
import { EventsService } from './../../providers/events.service';
|
|
4
|
-
import { Component, OnInit, Output, OnDestroy, AfterViewInit, EventEmitter, Input, SimpleChanges } from '@angular/core';
|
|
5
|
-
import { Subscription } from 'rxjs';
|
|
6
5
|
// services
|
|
7
6
|
import { Globals } from 'src/app/utils/globals';
|
|
8
7
|
|
|
9
8
|
// utils
|
|
10
|
-
import { popupUrl, isPopupUrl, strip_tags } from '../../utils/utils';
|
|
11
9
|
|
|
12
10
|
import { MIN_WIDTH_IMAGES } from 'src/app/utils/constants';
|
|
13
11
|
import { ConversationModel } from 'src/chat21-core/models/conversation';
|
|
14
|
-
import { conversationToMessage, isEmojii, isImage } from 'src/chat21-core/utils/utils-message';
|
|
15
|
-
import { ImageRepoService } from 'src/chat21-core/providers/abstract/image-repo.service';
|
|
16
|
-
import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
|
|
17
12
|
import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
|
|
13
|
+
import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
|
|
14
|
+
import { conversationToMessage, isEmojii } from 'src/chat21-core/utils/utils-message';
|
|
18
15
|
|
|
19
16
|
|
|
20
17
|
@Component({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AfterViewInit, Component, ElementRef, EventEmitter, OnInit, Output, ViewChild } from '@angular/core';
|
|
2
2
|
import { Globals } from '../../utils/globals';
|
|
3
3
|
|
|
4
|
-
import {
|
|
5
|
-
import { AppStorageService } from '../../../chat21-core/providers/abstract/app-storage.service';
|
|
4
|
+
import { animate, style, transition, trigger } from '@angular/animations';
|
|
6
5
|
import { convertColorToRGBA } from 'src/chat21-core/utils/utils';
|
|
6
|
+
import { AppStorageService } from '../../../chat21-core/providers/abstract/app-storage.service';
|
|
7
7
|
// vedi: https://angular.io/guide/animations
|
|
8
8
|
|
|
9
9
|
@Component({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import 'src/app/sass/variables';
|
|
1
|
+
// @import 'src/app/sass/variables';
|
|
2
2
|
// @import '../../../sass/normalize.css';
|
|
3
3
|
|
|
4
4
|
#c21-app-list-all-conversations {
|
|
@@ -190,7 +190,7 @@
|
|
|
190
190
|
cursor: pointer;
|
|
191
191
|
-webkit-appearance: initial;
|
|
192
192
|
border: none;
|
|
193
|
-
border-bottom: 1px solid
|
|
193
|
+
border-bottom: 1px solid var(--light-gray);
|
|
194
194
|
background-color: #ffffff;
|
|
195
195
|
text-align: left;
|
|
196
196
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Component,
|
|
1
|
+
import { AfterViewInit, Component, ElementRef, EventEmitter, Input, IterableDiffers, OnDestroy, OnInit, Output, ViewChild } from '@angular/core';
|
|
2
2
|
import { Subscription } from 'rxjs';
|
|
3
3
|
|
|
4
4
|
// services
|
|
5
|
+
import { LoggerInstance } from 'src//chat21-core/providers/logger/loggerInstance';
|
|
5
6
|
import { Globals } from 'src/app/utils/globals';
|
|
6
|
-
import {
|
|
7
|
+
import { compareValues, convertMessage } from 'src/app/utils/utils';
|
|
7
8
|
import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
|
|
8
|
-
import { LoggerInstance } from 'src//chat21-core/providers/logger/loggerInstance';
|
|
9
9
|
import { CustomTranslateService } from 'src/chat21-core/providers/custom-translate.service';
|
|
10
10
|
|
|
11
11
|
// models
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
</div>
|
|
10
10
|
</div>
|
|
11
11
|
<div class="c21-right-conv">
|
|
12
|
-
<div class="c21-last-time">{{conversation?.timestamp |
|
|
12
|
+
<div class="c21-last-time">{{conversation?.timestamp | dateAgo}}</div>
|
|
13
13
|
<div class="truncate c21-name">{{conversation?.sender_fullname }}</div>
|
|
14
14
|
|
|
15
15
|
<!-- --- IMAGE PREVIEW ICON ---- -->
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import 'src/app/sass/variables';
|
|
1
|
+
// @import 'src/app/sass/variables';
|
|
2
2
|
|
|
3
3
|
:host .c21-msg ::ng-deep > a > img {
|
|
4
4
|
max-width: 24% !important;
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
text-align: left;
|
|
93
93
|
.c21-last-time {
|
|
94
94
|
font-size: 0.8em;
|
|
95
|
-
color:
|
|
95
|
+
color: var(--gray);
|
|
96
96
|
float: right;
|
|
97
97
|
display: block;
|
|
98
98
|
padding: 0;
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
font-size: 1.2em;
|
|
177
177
|
line-height: 10px;
|
|
178
178
|
border-radius: 50%;
|
|
179
|
-
background-color:
|
|
179
|
+
background-color: var(--blue);
|
|
180
180
|
color: white;
|
|
181
181
|
font-weight: bold;
|
|
182
182
|
padding: 0px;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { TranslateService } from '@ngx-translate/core';
|
|
3
|
-
import { Component, EventEmitter, Input, IterableChangeRecord, IterableChanges, IterableDiffers, KeyValueDiffers, OnInit, Output, SimpleChanges } from '@angular/core';
|
|
1
|
+
import { Component, EventEmitter, Input, IterableDiffers, OnInit, Output, SimpleChanges } from '@angular/core';
|
|
4
2
|
import { ConversationModel } from '../../../chat21-core/models/conversation';
|
|
5
|
-
import { setColorFromString, avatarPlaceholder, convertMessage} from '../../utils/utils';
|
|
6
|
-
import { ImageRepoService } from '../../../chat21-core/providers/abstract/image-repo.service';
|
|
7
3
|
import { LoggerService } from '../../../chat21-core/providers/abstract/logger.service';
|
|
8
4
|
import { LoggerInstance } from '../../../chat21-core/providers/logger/loggerInstance';
|
|
9
|
-
import
|
|
5
|
+
import { avatarPlaceholder, convertMessage, setColorFromString } from '../../utils/utils';
|
|
6
|
+
|
|
10
7
|
@Component({
|
|
11
8
|
selector: 'chat-list-conversations',
|
|
12
9
|
templateUrl: './list-conversations.component.html',
|
|
@@ -14,9 +14,7 @@
|
|
|
14
14
|
</div>
|
|
15
15
|
<div *ngIf="g.isOpenMenuOptions" class="modal-menu-options">
|
|
16
16
|
<div class="">
|
|
17
|
-
|
|
18
|
-
<div *ngIf="g.signInWithCustomToken && g.userFullname" class="label-menu-welcome">{{g.userFullname}}</div>
|
|
19
|
-
|
|
17
|
+
|
|
20
18
|
<div class="c21-button" (click)="toggleSound()">
|
|
21
19
|
<svg *ngIf="!g.soundEnabled" aria-labelledby="altIconTitle" class="icon-menu" xmlns="http://www.w3.org/2000/svg"
|
|
22
20
|
width="20" height="20" viewBox="0 0 24 24">
|
|
@@ -43,11 +41,6 @@
|
|
|
43
41
|
<span *ngIf="g.isLogged && g.showLogoutOption" class="label-menu-item"> {{g.LOGOUT}}</span>
|
|
44
42
|
</div>
|
|
45
43
|
<div class="c21-button build_version_menu">
|
|
46
|
-
<!-- <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" class="icon-menu">
|
|
47
|
-
<path d="M0 0h24v24H0z" fill="none"/>
|
|
48
|
-
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"/>
|
|
49
|
-
<title id="altIconTitle">{{g.LOGOUT}}</title>
|
|
50
|
-
</svg> -->
|
|
51
44
|
<span class="label-menu-item"> {{g.BUILD_VERSION}}</span>
|
|
52
45
|
</div>
|
|
53
46
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import 'src/app/sass/variables';
|
|
1
|
+
// @import 'src/app/sass/variables';
|
|
2
2
|
|
|
3
3
|
#c21-menu-options{
|
|
4
4
|
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
right: 0px;
|
|
42
42
|
}
|
|
43
43
|
.button-menu-options svg {
|
|
44
|
-
fill:
|
|
44
|
+
fill: var(--icon-fill-color);
|
|
45
45
|
display: none;
|
|
46
46
|
}
|
|
47
47
|
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
.build_version_menu {
|
|
78
|
-
color:
|
|
78
|
+
color: var(--gray);
|
|
79
79
|
justify-content: center;
|
|
80
80
|
font-size: 1em;
|
|
81
81
|
}
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
margin: 0 10px 0px 10px;
|
|
126
126
|
}
|
|
127
127
|
.icon-menu {
|
|
128
|
-
fill:
|
|
128
|
+
fill: var(--icon-fill-color);
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
#c21-options-menu .label-menu-item {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component,
|
|
1
|
+
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
|
2
2
|
import { Globals } from 'src/app/utils/globals';
|
|
3
3
|
import { convertColorToRGBA } from 'src/chat21-core/utils/utils';
|
|
4
4
|
|
|
@@ -46,8 +46,7 @@
|
|
|
46
46
|
<!-- <div *ngIf="message.type == 'text'"> -->
|
|
47
47
|
|
|
48
48
|
|
|
49
|
-
<div *ngIf="message?.text" tooltip="{{message.timestamp |
|
|
50
|
-
|
|
49
|
+
<div *ngIf="message?.text" tooltip="{{message.timestamp | dateAgo}} ({{message.timestamp | date:'shortDate'}} {{message.timestamp | date:'HH:mm:ss'}})">
|
|
51
50
|
|
|
52
51
|
<!-- [htmlEnabled]="(message?.type==='html')? true : false" -->
|
|
53
52
|
<chat-text *ngIf="message?.type !=='html'"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
@import 'src/app/sass/variables';
|
|
1
|
+
// @import 'src/app/sass/variables';
|
|
2
2
|
/* ====== SET MESSAGES ====== */
|
|
3
3
|
|
|
4
4
|
.messages {
|
|
5
|
-
border-radius:
|
|
5
|
+
border-radius: var(--border-radius-bubble-message);
|
|
6
6
|
padding: 0;
|
|
7
7
|
word-wrap: break-word;
|
|
8
8
|
// padding: 14px;
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
img {
|
|
32
|
-
border-radius:
|
|
32
|
+
border-radius: var(--border-radius-bubble-message);
|
|
33
33
|
padding: 3px;
|
|
34
34
|
margin-bottom: 0px;
|
|
35
35
|
max-width: calc(100% - 6px);
|
|
@@ -3,10 +3,9 @@ import { DomSanitizer } from '@angular/platform-browser';
|
|
|
3
3
|
import { MessageModel } from 'src/chat21-core/models/message';
|
|
4
4
|
import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
|
|
5
5
|
import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
|
|
6
|
-
import { MESSAGE_TYPE_MINE, MESSAGE_TYPE_OTHERS } from 'src/chat21-core/utils/constants';
|
|
6
|
+
import { MAX_WIDTH_IMAGES, MESSAGE_TYPE_MINE, MESSAGE_TYPE_OTHERS, MIN_WIDTH_IMAGES } from 'src/chat21-core/utils/constants';
|
|
7
7
|
import { convertColorToRGBA } from 'src/chat21-core/utils/utils';
|
|
8
8
|
import { isFile, isFrame, isImage, messageType } from 'src/chat21-core/utils/utils-message';
|
|
9
|
-
import { MAX_WIDTH_IMAGES, MIN_WIDTH_IMAGES} from 'src/chat21-core/utils/constants';
|
|
10
9
|
import { getColorBck } from 'src/chat21-core/utils/utils-user';
|
|
11
10
|
|
|
12
11
|
@Component({
|
|
@@ -142,18 +141,6 @@ export class BubbleMessageComponent implements OnInit {
|
|
|
142
141
|
this.onElementRendered.emit({element: event.element, status: event.status})
|
|
143
142
|
}
|
|
144
143
|
|
|
145
|
-
|
|
146
|
-
// printMessage(message, messageEl, component) {
|
|
147
|
-
// const messageOBJ = { message: message, sanitizer: this.sanitizer, messageEl: messageEl, component: component}
|
|
148
|
-
// this.onBeforeMessageRender.emit(messageOBJ)
|
|
149
|
-
// const messageText = message.text;
|
|
150
|
-
// this.onAfterMessageRender.emit(messageOBJ)
|
|
151
|
-
// // this.triggerBeforeMessageRender(message, messageEl, component);
|
|
152
|
-
// // const messageText = message.text;
|
|
153
|
-
// // this.triggerAfterMessageRender(message, messageEl, component);
|
|
154
|
-
// return messageText;
|
|
155
|
-
// }
|
|
156
|
-
|
|
157
144
|
// ========= END:: event emitter function ============//
|
|
158
145
|
|
|
159
146
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
@import 'src/app/sass/variables';
|
|
2
2
|
|
|
3
3
|
:host {
|
|
4
|
-
--backgroundColor: #{
|
|
5
|
-
--textColor: #{
|
|
6
|
-
--hoverBackgroundColor: #{
|
|
7
|
-
--hoverTextColor: #{
|
|
8
|
-
--buttonFontSize: #{
|
|
9
|
-
--max-width: #{
|
|
4
|
+
--backgroundColor: #{var(--blue)};
|
|
5
|
+
--textColor: #{var(--bck-msg-sent)};
|
|
6
|
+
--hoverBackgroundColor: #{var(--bck-msg-sent)};
|
|
7
|
+
--hoverTextColor: #{var(--blue)};
|
|
8
|
+
--buttonFontSize: #{var(--button-in-msg-font-size)};
|
|
9
|
+
--max-width: #{var(--button-in-msg-max-width)};
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
.button-in-msg {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
@import 'src/app/sass/variables';
|
|
1
|
+
// @import 'src/app/sass/variables';
|
|
2
2
|
|
|
3
3
|
:host {
|
|
4
|
-
--backgroundColor: #{
|
|
5
|
-
--textColor: #{
|
|
6
|
-
--hoverBackgroundColor: #{
|
|
7
|
-
--hoverTextColor: #{
|
|
8
|
-
--buttonFontSize: #{
|
|
9
|
-
--max-width: #{
|
|
4
|
+
--backgroundColor: #{var(--blue)};
|
|
5
|
+
--textColor: #{var(--bck-msg-sent)};
|
|
6
|
+
--hoverBackgroundColor: #{var(--bck-msg-sent)};
|
|
7
|
+
--hoverTextColor: #{var(--blue)};
|
|
8
|
+
--buttonFontSize: #{var(--button-in-msg-font-size)};
|
|
9
|
+
--max-width: #{var(--button-in-msg-max-width)};
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
.button-in-msg {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
@import 'src/app/sass/variables';
|
|
1
|
+
// @import 'src/app/sass/variables';
|
|
2
2
|
|
|
3
3
|
:host {
|
|
4
|
-
--backgroundColor: #{
|
|
5
|
-
--textColor: #{
|
|
6
|
-
--hoverBackgroundColor: #{
|
|
7
|
-
--hoverTextColor: #{
|
|
8
|
-
--buttonFontSize: #{
|
|
9
|
-
--max-width: #{
|
|
4
|
+
--backgroundColor: #{var(--blue)};
|
|
5
|
+
--textColor: #{var(--bck-msg-sent)};
|
|
6
|
+
--hoverBackgroundColor: #{var(--bck-msg-sent)};
|
|
7
|
+
--hoverTextColor: #{var(--blue)};
|
|
8
|
+
--buttonFontSize: #{var(--button-in-msg-font-size)};
|
|
9
|
+
--max-width: #{var(--button-in-msg-max-width)};
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
transform: scale(1.05);
|
|
44
44
|
.icon-button-action {
|
|
45
45
|
svg {
|
|
46
|
-
fill:
|
|
46
|
+
fill: var(--black);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
|
|
2
1
|
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
|
2
|
+
import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
|
|
3
3
|
|
|
4
4
|
@Component({
|
|
5
5
|
selector: 'chat-frame',
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
@import 'src/app/sass/variables';
|
|
1
|
+
// @import 'src/app/sass/variables';
|
|
2
2
|
|
|
3
3
|
:root {
|
|
4
|
-
--themeColor: #{
|
|
5
|
-
--foregroundColor: #{
|
|
6
|
-
--buttonFontSize: #{
|
|
4
|
+
--themeColor: #{var(--blue)};
|
|
5
|
+
--foregroundColor: #{var(--col-msg-sent)};
|
|
6
|
+
--buttonFontSize: #{var(--button-in-msg-font-size)};
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Component, ElementRef, Input, OnInit, SimpleChange, SimpleChanges, ViewChild, ViewEncapsulation } from '@angular/core';
|
|
1
|
+
import { Component, ElementRef, Input, OnInit, SimpleChanges, ViewChild } from '@angular/core';
|
|
3
2
|
|
|
4
3
|
@Component({
|
|
5
4
|
selector: 'chat-html',
|