@chat21/chat21-ionic 3.0.79-rc.1 → 3.0.79-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/CHANGELOG.md +14 -0
- package/README.md +1 -0
- package/env.sample +1 -0
- package/package.json +1 -1
- package/src/app/app.component.html +7 -1
- package/src/app/app.component.scss +16 -1
- package/src/app/app.component.ts +182 -11
- package/src/app/app.module.ts +3 -1
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +37 -12
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +55 -50
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +24 -0
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +0 -18
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.scss +1 -10
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +1 -22
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.scss +1 -3
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.scss +1 -0
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +1 -2
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +8 -5
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +6 -5
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +3 -82
- package/src/app/components/conversations-list/header-conversations-list/header-conversations-list.component.html +1 -1
- package/src/app/components/navbar/navbar.component.html +103 -0
- package/src/app/components/navbar/navbar.component.scss +249 -0
- package/src/app/components/{conversation-detail/bubble-my-message/bubble-my-message.component.spec.ts → navbar/navbar.component.spec.ts} +6 -6
- package/src/app/components/navbar/navbar.component.ts +189 -0
- package/src/app/components/project-item/project-item.component.ts +11 -1
- package/src/app/pages/contacts-directory/contacts-directory.page.scss +1 -1
- package/src/app/pages/conversation-detail/conversation-detail.module.ts +0 -8
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +71 -2
- package/src/app/pages/conversations-list/conversations-list.page.scss +1 -0
- package/src/app/pages/conversations-list/conversations-list.page.ts +51 -22
- package/src/app/pages/create-canned-response/create-canned-response.page.ts +13 -13
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.html +1 -1
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.scss +42 -0
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.ts +1 -0
- package/src/app/services/canned-responses/canned-responses.service.ts +26 -0
- package/src/app/services/projects/projects.service.spec.ts +12 -0
- package/src/app/services/projects/projects.service.ts +43 -0
- package/src/app/services/tiledesk/tiledesk.service.ts +1 -25
- package/src/app/shared/shared.module.ts +3 -12
- package/src/assets/i18n/ar.json +10 -2
- package/src/assets/i18n/az.json +9 -1
- package/src/assets/i18n/de.json +10 -2
- package/src/assets/i18n/en.json +10 -2
- package/src/assets/i18n/es.json +10 -2
- package/src/assets/i18n/fr.json +9 -1
- package/src/assets/i18n/it.json +9 -1
- package/src/assets/i18n/kk.json +10 -2
- package/src/assets/i18n/pt.json +10 -2
- package/src/assets/i18n/ru.json +9 -1
- package/src/assets/i18n/sr.json +277 -269
- package/src/assets/i18n/sv.json +10 -2
- package/src/assets/i18n/tr.json +10 -2
- package/src/assets/i18n/uk.json +10 -2
- package/src/assets/i18n/uz.json +9 -1
- package/src/assets/sounds/wheep-wheep.mp3 +0 -0
- package/src/chat-config-mqtt-localhost.json +1 -0
- package/src/chat-config-native-mqtt.json +1 -0
- package/src/chat-config-pre.json +2 -1
- package/src/chat-config-template.json +1 -0
- package/src/chat-config.json +1 -0
- package/src/chat21-core/models/conversation.ts +0 -1
- package/src/chat21-core/models/projects.ts +27 -0
- package/src/chat21-core/utils/constants.ts +1 -1
- package/src/chat21-core/utils/convertRequestToConversation.ts +41 -0
- package/src/global.scss +1 -13
- package/src/index.html +6 -47
- package/src/variables.scss +5 -2
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.html +0 -3
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.scss +0 -21
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.spec.ts +0 -24
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.ts +0 -14
- package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.html +0 -54
- package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.scss +0 -98
- package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.ts +0 -84
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.html +0 -30
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.scss +0 -83
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.spec.ts +0 -24
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.ts +0 -68
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.html +0 -3
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.scss +0 -10
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.spec.ts +0 -24
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.ts +0 -14
|
@@ -1,30 +0,0 @@
|
|
|
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>
|
|
@@ -1,83 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
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
|
-
});
|
|
@@ -1,68 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
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
|
-
});
|
|
@@ -1,14 +0,0 @@
|
|
|
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
|
-
}
|