@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.
- package/CHANGELOG.md +4 -61
- package/README.md +2 -2
- package/package.json +2 -2
- package/src/app/app.component.html +1 -7
- package/src/app/app.component.scss +2 -18
- package/src/app/app.component.ts +15 -73
- package/src/app/app.module.ts +1 -3
- package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.ts +1 -8
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +23 -75
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +85 -162
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +2 -39
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +19 -7
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.scss +10 -6
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.spec.ts +2 -2
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +25 -16
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.html +1 -5
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.scss +15 -22
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.ts +5 -25
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.html +1 -2
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.scss +15 -14
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.ts +5 -24
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.html +1 -6
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.scss +13 -12
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.ts +5 -26
- package/src/app/chatlib/conversation-detail/message/html/html.component.ts +1 -0
- package/src/app/chatlib/conversation-detail/message/info-message/info-message.component.scss +2 -2
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.html +6 -16
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.scss +3 -1
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.ts +0 -2
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +52 -78
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.scss +20 -62
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +10 -14
- package/src/app/components/canned-response/canned-response.component.html +5 -5
- package/src/app/components/canned-response/canned-response.component.scss +1 -1
- package/src/app/components/canned-response/canned-response.component.ts +0 -1
- package/src/app/components/contacts-directory/contacts-directory.component.html +26 -22
- package/src/app/components/contacts-directory/contacts-directory.component.scss +6 -8
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.html +3 -0
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.scss +21 -0
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.spec.ts +24 -0
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.ts +14 -0
- package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.html +54 -0
- package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.scss +98 -0
- 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
- package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.ts +84 -0
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.html +30 -0
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.scss +83 -0
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.spec.ts +24 -0
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.ts +68 -0
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.html +3 -0
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.scss +10 -0
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.spec.ts +24 -0
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.ts +14 -0
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +42 -61
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +61 -98
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +25 -9
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +5 -6
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +4 -4
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +83 -4
- package/src/app/components/conversation-detail/option-header/option-header.component.html +13 -0
- package/src/app/components/conversation-detail/option-header/option-header.component.scss +0 -0
- 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
- 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
- package/src/app/components/conversation-info/info-content/info-content.component.html +1 -2
- package/src/app/components/conversation-info/info-content/info-content.component.ts +2 -3
- package/src/app/components/conversation-info/info-direct/info-direct.component.html +9 -1
- package/src/app/components/conversation-info/info-direct/info-direct.component.ts +2 -0
- package/src/app/components/conversation-info/info-group/info-group.component.html +108 -44
- package/src/app/components/conversation-info/info-group/info-group.component.scss +61 -101
- package/src/app/components/conversation-info/info-group/info-group.component.ts +0 -1
- package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.html → ddp-header/ddp-header.component.html} +3 -3
- package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.scss → ddp-header/ddp-header.component.scss} +4 -16
- package/src/app/components/{navbar/navbar.component.spec.ts → ddp-header/ddp-header.component.spec.ts} +6 -6
- package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.ts → ddp-header/ddp-header.component.ts} +16 -7
- package/src/app/components/project-item/project-item.component.html +149 -98
- package/src/app/components/project-item/project-item.component.scss +35 -42
- package/src/app/components/project-item/project-item.component.ts +4 -16
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +3 -3
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +7 -2
- package/src/app/components/utils/user-presence/user-presence.component.html +2 -7
- package/src/app/components/utils/user-presence/user-presence.component.scss +18 -35
- package/src/app/components/utils/user-presence/user-presence.component.ts +10 -6
- package/src/app/pages/contacts-directory/contacts-directory.page.html +1 -1
- package/src/app/pages/contacts-directory/contacts-directory.page.scss +0 -41
- package/src/app/pages/contacts-directory/contacts-directory.page.ts +0 -2
- package/src/app/pages/conversation-detail/conversation-detail.module.ts +8 -0
- package/src/app/pages/conversation-detail/conversation-detail.page.html +23 -40
- package/src/app/pages/conversation-detail/conversation-detail.page.scss +250 -40
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +84 -190
- package/src/app/pages/conversations-list/conversations-list.page.html +8 -11
- package/src/app/pages/conversations-list/conversations-list.page.scss +2 -11
- package/src/app/pages/conversations-list/conversations-list.page.ts +22 -25
- package/src/app/pages/create-canned-response/create-canned-response.page.ts +13 -13
- package/src/app/pages/loader-preview/loader-preview.page.html +1 -1
- package/src/app/pages/loader-preview/loader-preview.page.scss +0 -4
- package/src/app/pages/loader-preview/loader-preview.page.ts +2 -1
- package/src/app/pages/profile-info/profile-info.page.html +4 -2
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.html +1 -1
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.scss +0 -42
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.ts +0 -1
- package/src/app/services/canned-responses/canned-responses.service.ts +0 -26
- package/src/app/services/tiledesk/tiledesk.service.ts +25 -1
- package/src/app/shared/shared.module.ts +33 -24
- package/src/assets/i18n/ar.json +265 -278
- package/src/assets/i18n/az.json +1 -14
- package/src/assets/i18n/de.json +2 -15
- package/src/assets/i18n/en.json +2 -15
- package/src/assets/i18n/es.json +2 -15
- package/src/assets/i18n/fr.json +1 -14
- package/src/assets/i18n/it.json +1 -14
- package/src/assets/i18n/kk.json +2 -15
- package/src/assets/i18n/pt.json +2 -15
- package/src/assets/i18n/ru.json +1 -14
- package/src/assets/i18n/sr.json +264 -277
- package/src/assets/i18n/sv.json +2 -15
- package/src/assets/i18n/tr.json +2 -15
- package/src/assets/i18n/uk.json +2 -15
- package/src/assets/i18n/uz.json +1 -14
- package/src/chat21-core/models/conversation.ts +1 -0
- package/src/chat21-core/providers/firebase/firebase-typing.service.ts +9 -7
- package/src/chat21-core/utils/constants.ts +1 -5
- package/src/chat21-core/utils/user-typing/user-typing.component.html +5 -8
- package/src/chat21-core/utils/user-typing/user-typing.component.scss +17 -87
- package/src/chat21-core/utils/user-typing/user-typing.component.ts +94 -12
- package/src/chat21-core/utils/utils.ts +10 -38
- package/src/global.scss +57 -48
- package/src/index.html +2 -2
- package/src/variables.scss +10 -30
- package/deploy_amazon_beta.sh +0 -29
- package/deploy_amazon_prod.sh +0 -30
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component_2.html +0 -116
- package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.html +0 -12
- package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.scss +0 -14
- package/src/app/components/navbar/navbar.component.html +0 -103
- package/src/app/components/navbar/navbar.component.scss +0 -249
- package/src/app/components/navbar/navbar.component.ts +0 -189
- package/src/app/services/projects/projects.service.spec.ts +0 -12
- package/src/app/services/projects/projects.service.ts +0 -43
- package/src/assets/sounds/wheep-wheep.mp3 +0 -0
- package/src/chat21-core/models/projects.ts +0 -27
- package/src/chat21-core/utils/convertRequestToConversation.ts +0 -41
package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.ts
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { Component, OnInit, Input } from '@angular/core';
|
|
2
|
+
import { MessageModel } from 'src/chat21-core/models/message';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
// utils
|
|
7
|
+
import {
|
|
8
|
+
popupUrl,
|
|
9
|
+
urlify,
|
|
10
|
+
isPopupUrl,
|
|
11
|
+
stripTags
|
|
12
|
+
} from 'src/chat21-core/utils/utils';
|
|
13
|
+
|
|
14
|
+
import {
|
|
15
|
+
getSizeImg
|
|
16
|
+
} from 'src/chat21-core/utils/utils-message';
|
|
17
|
+
|
|
18
|
+
import {
|
|
19
|
+
MSG_STATUS_SENT,
|
|
20
|
+
MSG_STATUS_RETURN_RECEIPT,
|
|
21
|
+
MAX_WIDTH_IMAGES
|
|
22
|
+
} from 'src/chat21-core/utils/constants';
|
|
23
|
+
|
|
24
|
+
@Component({
|
|
25
|
+
selector: 'app-bubble-my-message',
|
|
26
|
+
templateUrl: './bubble-my-message.component.html',
|
|
27
|
+
styleUrls: ['./bubble-my-message.component.scss'],
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
export class BubbleMyMessageComponent implements OnInit {
|
|
31
|
+
@Input() message: MessageModel;
|
|
32
|
+
@Input() isFirstMessage = true;
|
|
33
|
+
|
|
34
|
+
// utils functions
|
|
35
|
+
popupUrl = popupUrl;
|
|
36
|
+
urlify = urlify;
|
|
37
|
+
isPopupUrl = isPopupUrl;
|
|
38
|
+
stripTags = stripTags;
|
|
39
|
+
|
|
40
|
+
// utils-message functions
|
|
41
|
+
getSizeImg = getSizeImg;
|
|
42
|
+
|
|
43
|
+
MSG_STATUS_SENT = MSG_STATUS_SENT;
|
|
44
|
+
MSG_STATUS_RETURN_RECEIPT = MSG_STATUS_RETURN_RECEIPT;
|
|
45
|
+
MAX_WIDTH_IMAGES = MAX_WIDTH_IMAGES;
|
|
46
|
+
|
|
47
|
+
constructor() { }
|
|
48
|
+
|
|
49
|
+
ngOnInit() {
|
|
50
|
+
// console.log('msg::::', JSON.stringify(this.message));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** */
|
|
54
|
+
showButtonInfo() {
|
|
55
|
+
//console.log('showButtonInfo');
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* apro il menu delle opzioni
|
|
60
|
+
* (metodo richiamato da html)
|
|
61
|
+
* alla chiusura controllo su quale opzione ho premuto e attivo l'azione corrispondete
|
|
62
|
+
*/
|
|
63
|
+
presentPopover(event, msg) {
|
|
64
|
+
// console.log('presentPopover');
|
|
65
|
+
// let popover = this.popoverCtrl.create(PopoverPage, { typePopup: TYPE_POPUP_DETAIL_MESSAGE, message: msg });
|
|
66
|
+
// popover.present({
|
|
67
|
+
// ev: event
|
|
68
|
+
// });
|
|
69
|
+
// /**
|
|
70
|
+
// *
|
|
71
|
+
// */
|
|
72
|
+
// popover.onDidDismiss((data: string) => {
|
|
73
|
+
// console.log(" ********* data::: ", data);
|
|
74
|
+
// if (data == 'logOut') {
|
|
75
|
+
// //this.logOut();
|
|
76
|
+
// }
|
|
77
|
+
// else if (data == 'ProfilePage') {
|
|
78
|
+
// if (this.chatManager.getLoggedUser()) {
|
|
79
|
+
// this.navCtrl.push(ProfilePage);
|
|
80
|
+
// }
|
|
81
|
+
// }
|
|
82
|
+
// });
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<div class="message message-other" [class.first-message]="isFirstMessage">
|
|
2
|
+
|
|
3
|
+
<span class="button-info" [ngClass]="message.uid" (click)="presentPopover($event, message)"></span>
|
|
4
|
+
|
|
5
|
+
<div class="bubble-message"
|
|
6
|
+
[class.image]="message.type == 'image'"
|
|
7
|
+
[class.no-text]="!message.text"
|
|
8
|
+
(mouseover)="showButtonInfo()">
|
|
9
|
+
|
|
10
|
+
<div *ngIf="isChannelTypeGroup(channelType)" class="message-sender-fullname" [style.color]="getColorBck(message.sender_fullname)">{{message.sender_fullname}}</div>
|
|
11
|
+
|
|
12
|
+
<div *ngIf="isImage(message);" (click)="popupUrl(message.metadata.src,'windowName')">
|
|
13
|
+
<img class="message-content message-content-image" [src]="message.metadata.src" [width]="getSizeImg(message).width" [height]="getSizeImg(message).height" />
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<div *ngIf="isFile(message);" class="message-content message-content-text" [innerHTML]="urlify(message.metadata.src, message.metadata.name)"></div>
|
|
17
|
+
|
|
18
|
+
<!-- <div *ngIf="message.type == 'text'"> -->
|
|
19
|
+
<div *ngIf="isPopupUrl(message.text); then contentPopup else contentNewTab">here is ignored</div>
|
|
20
|
+
<ng-template #contentPopup>
|
|
21
|
+
<div style="text-decoration: underline; padding:8px; cursor: pointer;" (click)="popupUrl(message.text,'windowName')">{{stripTags(message.text)}}contentOther</div>
|
|
22
|
+
</ng-template>
|
|
23
|
+
<ng-template #contentNewTab>
|
|
24
|
+
<div class="message-content message-content-text" [innerHTML]="message.text"></div>
|
|
25
|
+
</ng-template>
|
|
26
|
+
<!-- </div> -->
|
|
27
|
+
<div class="timestamp-message right">{{message.timestamp | date: 'H:mm'}}</div>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
</div>
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
.message {
|
|
2
|
+
.bubble-message {
|
|
3
|
+
position: relative;
|
|
4
|
+
border-radius: 15px;
|
|
5
|
+
font-size: 15px;
|
|
6
|
+
//padding: 5px 10px 10px 10px;
|
|
7
|
+
display: block;
|
|
8
|
+
width: auto;
|
|
9
|
+
max-width: 80%;
|
|
10
|
+
line-height: 1.34;
|
|
11
|
+
direction: ltr;
|
|
12
|
+
padding: 0px;
|
|
13
|
+
.message-content-image {
|
|
14
|
+
border-radius: 15px 6px 0px 0px;
|
|
15
|
+
}
|
|
16
|
+
.message-content.message-content-text{
|
|
17
|
+
padding: 5px 20px 5px 10px;
|
|
18
|
+
}
|
|
19
|
+
&.no-text {
|
|
20
|
+
line-height: 0;
|
|
21
|
+
.message-content-image {
|
|
22
|
+
border-radius: 15px 6px 6px 0px;
|
|
23
|
+
}
|
|
24
|
+
.message-content.message-content-text{
|
|
25
|
+
padding: 0px;
|
|
26
|
+
height: 0px;
|
|
27
|
+
}
|
|
28
|
+
.timestamp-message {
|
|
29
|
+
background-color: #00000045;
|
|
30
|
+
padding: 4px;
|
|
31
|
+
color: white;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
&.image{
|
|
35
|
+
max-width: 300px;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
.message-content:after {
|
|
39
|
+
content: "\00a0\00a0\00a0\00a0\00a0\00a0";
|
|
40
|
+
}
|
|
41
|
+
.timestamp-message {
|
|
42
|
+
font-size: 10px;
|
|
43
|
+
padding: 0px;
|
|
44
|
+
position: absolute;
|
|
45
|
+
bottom: 0px;
|
|
46
|
+
right: 6px;
|
|
47
|
+
line-height: 15px;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
.message-other {
|
|
51
|
+
width: 100%;
|
|
52
|
+
margin-top: 4px;
|
|
53
|
+
.bubble-message {
|
|
54
|
+
background-color: var(--light-gray);
|
|
55
|
+
color: var(--black);
|
|
56
|
+
margin-left: 24px;
|
|
57
|
+
float: left;
|
|
58
|
+
border-top-left-radius: 6px;
|
|
59
|
+
border-bottom-left-radius: 6px;
|
|
60
|
+
}
|
|
61
|
+
.message-sender-fullname {
|
|
62
|
+
margin: 0;
|
|
63
|
+
font-size: 15px;
|
|
64
|
+
color: var(--basic-gray);
|
|
65
|
+
font-weight: bold;
|
|
66
|
+
display: none;
|
|
67
|
+
}
|
|
68
|
+
.timestamp-message {
|
|
69
|
+
color: var(--basic-gray);
|
|
70
|
+
bottom: 2px;
|
|
71
|
+
right: 10px;
|
|
72
|
+
}
|
|
73
|
+
&.first-message {
|
|
74
|
+
margin-top: 10px;
|
|
75
|
+
.bubble-message {
|
|
76
|
+
border-top-left-radius: 12px;
|
|
77
|
+
border-bottom-left-radius: 0px;
|
|
78
|
+
}
|
|
79
|
+
.message-sender-fullname {
|
|
80
|
+
display: block;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
import { IonicModule } from '@ionic/angular';
|
|
3
|
+
|
|
4
|
+
import { BubbleOthersMessageComponent } from './bubble-others-message.component';
|
|
5
|
+
|
|
6
|
+
describe('BubbleOthersMessageComponent', () => {
|
|
7
|
+
let component: BubbleOthersMessageComponent;
|
|
8
|
+
let fixture: ComponentFixture<BubbleOthersMessageComponent>;
|
|
9
|
+
|
|
10
|
+
beforeEach(async(() => {
|
|
11
|
+
TestBed.configureTestingModule({
|
|
12
|
+
declarations: [ BubbleOthersMessageComponent ],
|
|
13
|
+
imports: [IonicModule.forRoot()]
|
|
14
|
+
}).compileComponents();
|
|
15
|
+
|
|
16
|
+
fixture = TestBed.createComponent(BubbleOthersMessageComponent);
|
|
17
|
+
component = fixture.componentInstance;
|
|
18
|
+
fixture.detectChanges();
|
|
19
|
+
}));
|
|
20
|
+
|
|
21
|
+
it('should create', () => {
|
|
22
|
+
expect(component).toBeTruthy();
|
|
23
|
+
});
|
|
24
|
+
});
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { Component, OnInit, Input } from '@angular/core';
|
|
2
|
+
import { MessageModel } from 'src/chat21-core/models/message';
|
|
3
|
+
// utils
|
|
4
|
+
import {
|
|
5
|
+
popupUrl,
|
|
6
|
+
urlify,
|
|
7
|
+
isPopupUrl,
|
|
8
|
+
stripTags
|
|
9
|
+
} from 'src/chat21-core/utils/utils';
|
|
10
|
+
|
|
11
|
+
import {
|
|
12
|
+
getColorBck
|
|
13
|
+
} from 'src/chat21-core/utils/utils-user';
|
|
14
|
+
|
|
15
|
+
import {
|
|
16
|
+
isImage,
|
|
17
|
+
isFile,
|
|
18
|
+
isInfo,
|
|
19
|
+
getSizeImg,
|
|
20
|
+
isChannelTypeGroup
|
|
21
|
+
} from 'src/chat21-core/utils/utils-message';
|
|
22
|
+
|
|
23
|
+
import {
|
|
24
|
+
MSG_STATUS_SENT,
|
|
25
|
+
MSG_STATUS_RETURN_RECEIPT
|
|
26
|
+
} from 'src/chat21-core/utils/constants';
|
|
27
|
+
|
|
28
|
+
@Component({
|
|
29
|
+
selector: 'app-bubble-others-message',
|
|
30
|
+
templateUrl: './bubble-others-message.component.html',
|
|
31
|
+
styleUrls: ['./bubble-others-message.component.scss'],
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
export class BubbleOthersMessageComponent implements OnInit {
|
|
36
|
+
@Input() message: MessageModel;
|
|
37
|
+
@Input() isFirstMessage = true;
|
|
38
|
+
@Input() channelType: string;
|
|
39
|
+
|
|
40
|
+
// utils functions
|
|
41
|
+
popupUrl = popupUrl;
|
|
42
|
+
urlify = urlify;
|
|
43
|
+
isPopupUrl = isPopupUrl;
|
|
44
|
+
getColorBck = getColorBck;
|
|
45
|
+
stripTags = stripTags;
|
|
46
|
+
|
|
47
|
+
// utils-message functions
|
|
48
|
+
isImage = isImage;
|
|
49
|
+
isFile = isFile;
|
|
50
|
+
isInfo = isInfo;
|
|
51
|
+
getSizeImg = getSizeImg;
|
|
52
|
+
isChannelTypeGroup = isChannelTypeGroup;
|
|
53
|
+
|
|
54
|
+
MSG_STATUS_SENT = MSG_STATUS_SENT;
|
|
55
|
+
MSG_STATUS_RETURN_RECEIPT = MSG_STATUS_RETURN_RECEIPT;
|
|
56
|
+
|
|
57
|
+
constructor() { }
|
|
58
|
+
|
|
59
|
+
ngOnInit() {}
|
|
60
|
+
|
|
61
|
+
showButtonInfo() {
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
presentPopover(event, msg) {
|
|
65
|
+
// console.log('presentPopover');
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
import { IonicModule } from '@ionic/angular';
|
|
3
|
+
|
|
4
|
+
import { BubbleSystemMessageComponent } from './bubble-system-message.component';
|
|
5
|
+
|
|
6
|
+
describe('BubbleSystemMessageComponent', () => {
|
|
7
|
+
let component: BubbleSystemMessageComponent;
|
|
8
|
+
let fixture: ComponentFixture<BubbleSystemMessageComponent>;
|
|
9
|
+
|
|
10
|
+
beforeEach(async(() => {
|
|
11
|
+
TestBed.configureTestingModule({
|
|
12
|
+
declarations: [ BubbleSystemMessageComponent ],
|
|
13
|
+
imports: [IonicModule.forRoot()]
|
|
14
|
+
}).compileComponents();
|
|
15
|
+
|
|
16
|
+
fixture = TestBed.createComponent(BubbleSystemMessageComponent);
|
|
17
|
+
component = fixture.componentInstance;
|
|
18
|
+
fixture.detectChanges();
|
|
19
|
+
}));
|
|
20
|
+
|
|
21
|
+
it('should create', () => {
|
|
22
|
+
expect(component).toBeTruthy();
|
|
23
|
+
});
|
|
24
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Component, OnInit, Input } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Component({
|
|
4
|
+
selector: 'app-bubble-system-message',
|
|
5
|
+
templateUrl: './bubble-system-message.component.html',
|
|
6
|
+
styleUrls: ['./bubble-system-message.component.scss'],
|
|
7
|
+
})
|
|
8
|
+
export class BubbleSystemMessageComponent implements OnInit {
|
|
9
|
+
@Input() messageText = '';
|
|
10
|
+
constructor() { }
|
|
11
|
+
|
|
12
|
+
ngOnInit() {}
|
|
13
|
+
|
|
14
|
+
}
|
|
@@ -1,73 +1,51 @@
|
|
|
1
|
-
<ion-header no-border class="ion-no-border"
|
|
2
|
-
<ion-toolbar
|
|
1
|
+
<ion-header no-border class="ion-no-border">
|
|
2
|
+
<ion-toolbar>
|
|
3
3
|
<ion-buttons slot="start" style="height:60px" *ngIf="isMobile">
|
|
4
4
|
<!-- (click)="pushPage('conversations-list')" defaultHref="/conversations-list" -->
|
|
5
5
|
<ion-back-button style="display: block;" text="" (click)="goBackToConversationList()">
|
|
6
6
|
</ion-back-button>
|
|
7
7
|
</ion-buttons>
|
|
8
8
|
|
|
9
|
-
<ion-title>
|
|
9
|
+
<ion-title [class.info-open]="openInfoConversation || openInfoMessage">
|
|
10
10
|
|
|
11
|
-
<div *ngIf="conversationAvatar" class="avatar-and-typing-wpr"
|
|
11
|
+
<div *ngIf="conversationAvatar" class="avatar-and-typing-wpr" >
|
|
12
12
|
<!-- [ngStyle] = "{ 'left': platformName === 'ios' ? '55px' : '' }" -->
|
|
13
|
-
<div class="avatar-container"
|
|
13
|
+
<div *ngIf="conversationAvatar" class="avatar-container" (click)="onOpenCloseInfoConversation()" style="cursor: pointer"
|
|
14
|
+
[ngClass]="{ 'avatar-container-ios': platformName === 'ios' }">
|
|
14
15
|
<app-avatar-profile
|
|
15
16
|
[itemAvatar]=conversationAvatar>
|
|
16
17
|
</app-avatar-profile>
|
|
17
18
|
</div>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
[
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
<!-- [ngStyle] = "{ 'left': platformName === 'ios' ? '63px' : '' }" -->
|
|
29
|
-
<!-- <div *ngIf="isDirect" class="user-presence" [ngClass]="{ 'user-presence-ios': platformName === 'ios' }">
|
|
30
|
-
<app-user-presence
|
|
31
|
-
[idUser]=conversationAvatar.conversation_with
|
|
32
|
-
[translationMap]=translationsMap
|
|
33
|
-
[borderColor]=borderColor
|
|
34
|
-
[fontColor]=fontColor>
|
|
35
|
-
</app-user-presence>
|
|
36
|
-
</div> -->
|
|
37
|
-
|
|
38
|
-
<div class="subtitle-info">
|
|
39
|
-
<div class="conversation_project">
|
|
40
|
-
<!-- DIRECT CONV -->
|
|
41
|
-
<div *ngIf="isDirect">
|
|
42
|
-
<app-user-presence
|
|
43
|
-
[idUser]="conversationAvatar.conversation_with"
|
|
44
|
-
[isMobile]="isMobile"
|
|
45
|
-
[translationMap]="translationsMap">
|
|
46
|
-
</app-user-presence>
|
|
47
|
-
<!-- <svg xmlns="http://www.w3.org/2000/svg" height="15" width="15" viewBox="0 0 24 24" fill="#000000"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>
|
|
48
|
-
<span class="truncate">{{translationsMap.get('DIRECT_CHAT')}}</span> -->
|
|
49
|
-
</div>
|
|
50
|
-
<!-- GROUP CONV -->
|
|
51
|
-
<div *ngIf="conversationUid?.startsWith(TYPE_GROUP)">
|
|
52
|
-
<svg xmlns="http://www.w3.org/2000/svg" height="15" width="15" viewBox="0 0 24 24" fill="#000000"><path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"/></svg>
|
|
53
|
-
<span class="truncate">{{translationsMap.get('GROUP_CHAT')}}</span>
|
|
54
|
-
</div>
|
|
55
|
-
<!-- SUPPORT-GROUP CONV -->
|
|
56
|
-
<div *ngIf="conversationUid?.startsWith(TYPE_SUPPORT_GROUP)">
|
|
57
|
-
<svg xmlns="http://www.w3.org/2000/svg" data-v-78d18411="" width="15" height="15" fill="none" viewBox="0 0 24 24" class="inbox-icon"><path d="M22.002 12C22.002 6.477 17.524 2 12 2 6.476 1.999 2 6.477 2 12.001c0 5.186 3.947 9.45 9.001 9.952V20.11c-.778-.612-1.478-1.905-1.939-3.61h1.94V15H8.737a18.969 18.969 0 0 1-.135-5h6.794c.068.64.105 1.31.105 2h1.5c0-.684-.033-1.353-.095-2h3.358c.154.64.237 1.31.237 2h1.5ZM4.786 16.5h2.722l.102.396c.317 1.17.748 2.195 1.27 3.015a8.532 8.532 0 0 1-4.094-3.41ZM3.736 10h3.358a20.847 20.847 0 0 0-.095 2c0 1.043.075 2.051.217 3H4.043a8.483 8.483 0 0 1-.544-3c0-.682.08-1.347.232-1.983L3.736 10Zm5.122-5.902.023-.008C8.16 5.222 7.611 6.748 7.298 8.5H4.25c.905-2 2.56-3.587 4.608-4.402Zm3.026-.594L12 3.5l.126.006c1.262.126 2.48 2.125 3.045 4.995H8.83c.568-2.878 1.79-4.88 3.055-4.996Zm3.343.76-.107-.174.291.121a8.533 8.533 0 0 1 4.339 4.29h-3.048c-.298-1.665-.806-3.125-1.475-4.237Z M12 19a1 1 0 0 0 1 1h3v2h-.5a.5.5 0 1 0 0 1h4a.5.5 0 0 0 0-1H19v-2h3a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1h-9a1 1 0 0 0-1 1v5Z" fill="currentColor"/></svg>
|
|
58
|
-
<span *ngIf="conversationAvatar?.project_name" class="truncate">{{conversationAvatar?.project_name}}</span>
|
|
59
|
-
<span *ngIf="!conversationAvatar?.project_name" class="truncate">{{conversationAvatar?.projectId}}</span>
|
|
60
|
-
</div>
|
|
61
|
-
</div>
|
|
19
|
+
<!-- [ngStyle] = "{ 'left': platformName === 'ios' ? '63px' : '' }" -->
|
|
20
|
+
<div *ngIf="isDirect" class="user-presence" [ngClass]="{ 'user-presence-ios': platformName === 'ios' }">
|
|
21
|
+
<app-user-presence
|
|
22
|
+
[idUser]=conversationAvatar.conversation_with
|
|
23
|
+
[translationMap]=translationMap
|
|
24
|
+
[borderColor]=borderColor
|
|
25
|
+
[fontColor]=fontColor>
|
|
26
|
+
</app-user-presence>
|
|
27
|
+
</div>
|
|
62
28
|
|
|
63
|
-
|
|
29
|
+
<div *ngIf="conversationAvatar" class="user-typing">
|
|
30
|
+
<app-user-typing
|
|
31
|
+
[idConversation]=conversationAvatar.uid
|
|
32
|
+
[idCurrentUser]=idLoggedUser
|
|
33
|
+
[isDirect]=isDirect
|
|
34
|
+
[translationMap]=translationMap
|
|
35
|
+
[color]=fontColor
|
|
36
|
+
[membersConversation]=membersConversation>
|
|
37
|
+
</app-user-typing>
|
|
64
38
|
</div>
|
|
65
|
-
|
|
66
39
|
|
|
67
|
-
|
|
40
|
+
</div>
|
|
41
|
+
<!-- [ngClass] = "{ 'tile-info-with-ios': platformName === 'ios' ? '82px' : ''82px'' }" -->
|
|
42
|
+
<!-- (click)="onOpenCloseInfoConversation()" -->
|
|
43
|
+
<div *ngIf="conversationAvatar" class="tile-info-with"
|
|
44
|
+
[ngClass]="{ 'tile-info-with-ios': platformName === 'ios' }">
|
|
45
|
+
<span class="tile-username">{{ conversationAvatar.conversation_with_fullname | truncate:50 }} </span>
|
|
46
|
+
<!-- <span class="tile-username">{{ conversation_with_fullname }} </span> -->
|
|
68
47
|
|
|
69
48
|
</div>
|
|
70
|
-
|
|
71
49
|
|
|
72
50
|
<!-- <div *ngIf="conversationWithFullname" class="tile-info-with" (click)="onOpenCloseInfoConversation()">
|
|
73
51
|
<span class="tile-username">{{ conversationWithFullname }} </span>
|
|
@@ -82,20 +60,23 @@
|
|
|
82
60
|
<span style="text-transform: capitalize; margin-left: 5px;"> {{ 'Crea ticket' | translate}} </span>
|
|
83
61
|
</ion-button> -->
|
|
84
62
|
|
|
85
|
-
<ion-button *ngIf="conversationUid?.startsWith('support-group') && conv_type !== 'archived'" ion-button fill="clear" size="small"
|
|
86
|
-
|
|
63
|
+
<ion-button *ngIf="conversationUid?.startsWith('support-group') && conv_type !== 'archived'" ion-button fill="clear" color="primary" size="small"
|
|
64
|
+
(click)="closeConversation()" [ngClass]="{'resolve-conv-margin-right': !isMobile}" [disabled]="conv_closed === true">
|
|
87
65
|
<!-- <ion-icon slot="icon-only" name="alert-circle-outline"></ion-icon> -->
|
|
88
66
|
<ion-icon name="archive-outline"></ion-icon>
|
|
89
67
|
<!-- <ion-icon slot="icon-only" name="information-outline"></ion-icon> -->
|
|
90
|
-
<span style="text-transform: capitalize; margin-left: 5px;"> {{
|
|
68
|
+
<span style="text-transform: capitalize; margin-left: 5px;"> {{ 'Resolve' | translate}} </span>
|
|
91
69
|
</ion-button>
|
|
92
70
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
71
|
+
<ion-button *ngIf="!openInfoConversation" ion-button fill="clear" (click)="onOpenCloseInfoConversation()">
|
|
72
|
+
<!-- <ion-icon slot="icon-only" name="alert-circle-outline"></ion-icon> -->
|
|
73
|
+
<ion-icon slot="icon-only" name="information-circle-outline"></ion-icon>
|
|
74
|
+
<!-- <ion-icon slot="icon-only" name="information-outline"></ion-icon> -->
|
|
75
|
+
|
|
76
|
+
</ion-button>
|
|
77
|
+
<ion-button *ngIf="openInfoConversation" ion-button fill="clear" (click)="onOpenCloseInfoConversation()">
|
|
97
78
|
<ion-icon slot="icon-only" name="close-circle-outline"></ion-icon>
|
|
98
|
-
</ion-button>
|
|
79
|
+
</ion-button>
|
|
99
80
|
|
|
100
81
|
</ion-buttons>
|
|
101
82
|
|