@chat21/chat21-ionic 3.0.80 → 3.0.81-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/CHANGELOG.md +75 -3
- package/README.md +2 -2
- package/angular.json +1 -0
- package/deploy_amazon_beta.sh +29 -0
- package/deploy_amazon_prod.sh +30 -0
- package/package.json +2 -2
- package/src/app/app.component.html +7 -1
- package/src/app/app.component.scss +18 -2
- package/src/app/app.component.ts +113 -17
- package/src/app/app.module.ts +3 -1
- package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.ts +8 -1
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +77 -23
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +168 -86
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +39 -2
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +11 -24
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.scss +6 -10
- 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 +16 -25
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.html +5 -1
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.scss +22 -15
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.ts +25 -5
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.html +2 -1
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.scss +14 -15
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.ts +24 -5
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.html +6 -1
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.scss +12 -13
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.ts +26 -5
- package/src/app/chatlib/conversation-detail/message/frame/frame.component.html +8 -2
- package/src/app/chatlib/conversation-detail/message/frame/frame.component.scss +36 -0
- package/src/app/chatlib/conversation-detail/message/frame/frame.component.ts +2 -2
- package/src/app/chatlib/conversation-detail/message/html/html.component.ts +0 -1
- package/src/app/chatlib/conversation-detail/message/image/image.component.html +1 -1
- package/src/app/chatlib/conversation-detail/message/image/image.component.scss +17 -5
- package/src/app/chatlib/conversation-detail/message/image/image.component.ts +1 -1
- package/src/app/chatlib/conversation-detail/message/info-message/info-message.component.scss +3 -2
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.html +16 -6
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.scss +1 -3
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.ts +2 -0
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +78 -52
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.scss +62 -20
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +14 -10
- package/src/app/components/canned-response/canned-response.component.html +9 -8
- package/src/app/components/canned-response/canned-response.component.scss +24 -2
- package/src/app/components/canned-response/canned-response.component.ts +5 -5
- package/src/app/components/contacts-directory/contacts-directory.component.html +22 -26
- package/src/app/components/contacts-directory/contacts-directory.component.scss +8 -6
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +61 -42
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +98 -61
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +9 -25
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component_2.html +116 -0
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +8 -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 +25 -87
- package/src/app/components/conversation-info/info-content/info-content.component.html +2 -1
- package/src/app/components/conversation-info/info-content/info-content.component.ts +3 -2
- package/src/app/components/conversation-info/info-direct/info-direct.component.html +1 -9
- package/src/app/components/conversation-info/info-direct/info-direct.component.ts +0 -2
- package/src/app/components/conversation-info/info-group/info-group.component.html +44 -108
- package/src/app/components/conversation-info/info-group/info-group.component.scss +101 -61
- package/src/app/components/conversation-info/info-group/info-group.component.ts +1 -0
- package/src/app/components/{ddp-header/ddp-header.component.html → conversations-list/header-conversations-list/header-conversations-list.component.html} +3 -3
- package/src/app/components/{ddp-header/ddp-header.component.scss → conversations-list/header-conversations-list/header-conversations-list.component.scss} +16 -4
- package/src/app/components/{conversation-detail/bubble-my-message/bubble-my-message.component.spec.ts → conversations-list/header-conversations-list/header-conversations-list.component.spec.ts} +6 -6
- package/src/app/components/{ddp-header/ddp-header.component.ts → conversations-list/header-conversations-list/header-conversations-list.component.ts} +7 -16
- package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.html +12 -0
- package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.scss +14 -0
- package/src/app/components/{conversation-detail/option-header/option-header.component.spec.ts → conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.spec.ts} +5 -5
- package/src/app/components/{conversation-detail/option-header/option-header.component.ts → conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.ts} +5 -4
- package/src/app/components/navbar/navbar.component.html +103 -0
- package/src/app/components/navbar/navbar.component.scss +249 -0
- package/src/app/components/{ddp-header/ddp-header.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.html +98 -149
- package/src/app/components/project-item/project-item.component.scss +42 -35
- package/src/app/components/project-item/project-item.component.ts +16 -4
- 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 +2 -7
- package/src/app/components/utils/user-presence/user-presence.component.html +7 -2
- package/src/app/components/utils/user-presence/user-presence.component.scss +35 -18
- package/src/app/components/utils/user-presence/user-presence.component.ts +6 -10
- package/src/app/pages/contacts-directory/contacts-directory.page.html +1 -1
- package/src/app/pages/contacts-directory/contacts-directory.page.scss +41 -0
- package/src/app/pages/contacts-directory/contacts-directory.page.ts +2 -0
- package/src/app/pages/conversation-detail/conversation-detail.module.ts +0 -8
- package/src/app/pages/conversation-detail/conversation-detail.page.html +40 -23
- package/src/app/pages/conversation-detail/conversation-detail.page.scss +40 -250
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +184 -117
- package/src/app/pages/conversations-list/conversations-list.page.html +11 -8
- package/src/app/pages/conversations-list/conversations-list.page.scss +11 -2
- package/src/app/pages/conversations-list/conversations-list.page.ts +25 -22
- 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 +4 -0
- package/src/app/pages/loader-preview/loader-preview.page.ts +1 -2
- package/src/app/pages/profile-info/profile-info.page.html +2 -4
- 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 +2 -26
- package/src/app/shared/shared.module.ts +24 -33
- package/src/assets/i18n/ar.json +278 -265
- package/src/assets/i18n/az.json +14 -1
- package/src/assets/i18n/de.json +15 -2
- package/src/assets/i18n/en.json +15 -2
- package/src/assets/i18n/es.json +15 -2
- package/src/assets/i18n/fr.json +14 -1
- package/src/assets/i18n/it.json +14 -1
- package/src/assets/i18n/kk.json +15 -2
- package/src/assets/i18n/pt.json +15 -2
- package/src/assets/i18n/ru.json +14 -1
- package/src/assets/i18n/sr.json +277 -264
- package/src/assets/i18n/sv.json +15 -2
- package/src/assets/i18n/tr.json +15 -2
- package/src/assets/i18n/uk.json +15 -2
- package/src/assets/i18n/uz.json +14 -1
- package/src/assets/js/chat21client.js +177 -149
- package/src/assets/sounds/interface-start.mp3 +0 -0
- package/src/assets/sounds/wheep-wheep.mp3 +0 -0
- package/src/chat-config-native-mqtt.json +5 -1
- package/src/chat21-core/models/conversation.ts +0 -1
- package/src/chat21-core/models/projects.ts +27 -0
- package/src/chat21-core/providers/firebase/firebase-typing.service.ts +7 -9
- package/src/chat21-core/utils/constants.ts +6 -1
- package/src/chat21-core/utils/convertRequestToConversation.ts +41 -0
- package/src/chat21-core/utils/user-typing/user-typing.component.html +8 -5
- package/src/chat21-core/utils/user-typing/user-typing.component.scss +87 -17
- package/src/chat21-core/utils/user-typing/user-typing.component.ts +12 -94
- package/src/chat21-core/utils/utils.ts +38 -10
- package/src/global.scss +52 -56
- package/src/index.html +2 -2
- package/src/variables.scss +30 -10
- 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
- package/src/app/components/conversation-detail/option-header/option-header.component.html +0 -13
- package/src/app/components/conversation-detail/option-header/option-header.component.scss +0 -0
package/src/index.html
CHANGED
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
<!-- <script src="https://unpkg.com/mqtt@4.1.0/dist/mqtt.min.js"></script> -->
|
|
34
34
|
<!-- <script src="./assets/js/watchToConnectionAtStartUp.js"></script> -->
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
|
|
37
37
|
<!-- segment analytics -->
|
|
38
38
|
<script>
|
|
39
39
|
!function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware"];analytics.factory=function(e){return function(){var t=Array.prototype.slice.call(arguments);t.unshift(e);analytics.push(t);return analytics}};for(var e=0;e<analytics.methods.length;e++){var key=analytics.methods[e];analytics[key]=analytics.factory(key)}analytics.load=function(key,e){var t=document.createElement("script");t.type="text/javascript";t.async=!0;t.src="https://cdn.segment.com/analytics.js/v1/" + key + "/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(t,n);analytics._loadOptions=e};analytics._writeKey="qaTU0wG6VH6xPAhOzD2kneI70Txg1fTB";;analytics.SNIPPET_VERSION="4.15.3";
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
analytics.page();
|
|
42
42
|
}}();
|
|
43
43
|
</script>
|
|
44
|
-
|
|
44
|
+
|
|
45
45
|
<!-- add to homescreen for ios -->
|
|
46
46
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
47
47
|
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
|
package/src/variables.scss
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
body {
|
|
2
2
|
/* Color palette */
|
|
3
3
|
--white: #ffffff;
|
|
4
4
|
--black: #000000;
|
|
@@ -7,27 +7,47 @@
|
|
|
7
7
|
--basic-green: #0A7D41;
|
|
8
8
|
--dark-green: #005f3b;
|
|
9
9
|
--light-green: #8cc841;
|
|
10
|
-
|
|
11
10
|
--light-gray: #F2F2F2;
|
|
12
11
|
--basic-gray: #666666;
|
|
13
12
|
--dark-gray: #363636;
|
|
14
|
-
|
|
15
|
-
|
|
16
13
|
--light-blue: #C9E4F6;
|
|
17
14
|
--basic-blue: #2a69c1;
|
|
18
15
|
--bubble-blue: rgb(0, 153, 255);
|
|
19
|
-
|
|
20
|
-
--bubble-privateMsg: rgb(254, 214, 168);
|
|
21
|
-
--bubble-privateMsgColor: rgb(47, 57, 65);
|
|
16
|
+
|
|
22
17
|
|
|
23
18
|
--basic-yellow: #FFC627;
|
|
24
19
|
--basic-red: #EB1E23;
|
|
25
20
|
|
|
26
|
-
--bck-msg-sent: #
|
|
21
|
+
--bck-msg-sent: #2a6ac1;
|
|
27
22
|
--col-msg-sent:#ffffff;
|
|
23
|
+
|
|
24
|
+
--bck-msg-received: #f0f2f7;
|
|
25
|
+
--col-msg-received: #06132b;
|
|
26
|
+
|
|
27
|
+
--bubble-lightyellow: rgb(255, 247, 237);
|
|
28
|
+
--bubble-privateMsg: rgb(254, 214, 168);
|
|
29
|
+
--bubble-privateMsgColor: rgb(47, 57, 65);
|
|
30
|
+
|
|
28
31
|
--light-white: #f7f7f7;
|
|
29
32
|
--black: #1a1a1a;
|
|
30
33
|
--gray: #aaaaaa;
|
|
31
34
|
|
|
32
|
-
|
|
33
|
-
|
|
35
|
+
--header-height: 60px;
|
|
36
|
+
--list-bkg-color: #f8fafc;
|
|
37
|
+
--list-bkg-color-selected: rgba(24, 119, 242, 0.12); //rgba(24, 119, 242, 0.04);
|
|
38
|
+
|
|
39
|
+
--button-in-msg-font-size: 15px;
|
|
40
|
+
--buttonBackgroundColor: #ffffff;
|
|
41
|
+
--buttonTextColor: #2a6ac1;
|
|
42
|
+
--buttonHoverBackgroundColor: #2a6ac1;
|
|
43
|
+
--buttonHoverTextColor: #ffffff;
|
|
44
|
+
|
|
45
|
+
--padding-conversation-detail: 10px;
|
|
46
|
+
|
|
47
|
+
--border-radius-item: 16px;
|
|
48
|
+
--border-radius-content: 16px;
|
|
49
|
+
|
|
50
|
+
--sidebar-width: 60px;
|
|
51
|
+
--nav-bar-heigth: 60px;
|
|
52
|
+
|
|
53
|
+
}
|
package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.scss
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
.row-day {
|
|
2
|
-
padding: 0 10px;
|
|
3
|
-
text-align: center;
|
|
4
|
-
width: 100%;
|
|
5
|
-
margin-top: 15px;
|
|
6
|
-
margin-bottom: 5px;
|
|
7
|
-
}
|
|
8
|
-
.header-day {
|
|
9
|
-
background-color: var(--transparent);
|
|
10
|
-
padding-top: 4px;
|
|
11
|
-
padding-bottom: 4px;
|
|
12
|
-
padding-left: 12px;
|
|
13
|
-
padding-right: 12px;
|
|
14
|
-
vertical-align: middle;
|
|
15
|
-
border-radius: 13px;
|
|
16
|
-
font-size: 14px;
|
|
17
|
-
font-weight: bold;
|
|
18
|
-
color: var(--basic-gray);
|
|
19
|
-
display: inline-block;
|
|
20
|
-
}
|
|
21
|
-
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
import { IonicModule } from '@ionic/angular';
|
|
3
|
-
|
|
4
|
-
import { BubbleDayMessageComponent } from './bubble-day-message.component';
|
|
5
|
-
|
|
6
|
-
describe('BubbleDayMessageComponent', () => {
|
|
7
|
-
let component: BubbleDayMessageComponent;
|
|
8
|
-
let fixture: ComponentFixture<BubbleDayMessageComponent>;
|
|
9
|
-
|
|
10
|
-
beforeEach(async(() => {
|
|
11
|
-
TestBed.configureTestingModule({
|
|
12
|
-
declarations: [ BubbleDayMessageComponent ],
|
|
13
|
-
imports: [IonicModule.forRoot()]
|
|
14
|
-
}).compileComponents();
|
|
15
|
-
|
|
16
|
-
fixture = TestBed.createComponent(BubbleDayMessageComponent);
|
|
17
|
-
component = fixture.componentInstance;
|
|
18
|
-
fixture.detectChanges();
|
|
19
|
-
}));
|
|
20
|
-
|
|
21
|
-
it('should create', () => {
|
|
22
|
-
expect(component).toBeTruthy();
|
|
23
|
-
});
|
|
24
|
-
});
|
package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Component, OnInit, Input } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Component({
|
|
4
|
-
selector: 'app-bubble-day-message',
|
|
5
|
-
templateUrl: './bubble-day-message.component.html',
|
|
6
|
-
styleUrls: ['./bubble-day-message.component.scss'],
|
|
7
|
-
})
|
|
8
|
-
export class BubbleDayMessageComponent implements OnInit {
|
|
9
|
-
@Input() messageDate = '';
|
|
10
|
-
constructor() { }
|
|
11
|
-
|
|
12
|
-
ngOnInit() {}
|
|
13
|
-
|
|
14
|
-
}
|
package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.html
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
<div class="message message-my" [class.first-message]="isFirstMessage" >
|
|
2
|
-
|
|
3
|
-
<div class="bubble-message"
|
|
4
|
-
[class.image]="message.type == 'image'"
|
|
5
|
-
[class.no-text]="!message.text"
|
|
6
|
-
(mouseover)="showButtonInfo()">
|
|
7
|
-
<span class="buttonInfo" (click)="presentPopover($event, message)"> </span>
|
|
8
|
-
|
|
9
|
-
<div *ngIf="message.type == 'image';"
|
|
10
|
-
(click)="popupUrl(message.metadata.src,'windowName')"
|
|
11
|
-
>
|
|
12
|
-
<img
|
|
13
|
-
class="message-content message-content-image"
|
|
14
|
-
[src]="message.metadata.src"
|
|
15
|
-
[width]="getSizeImg(message).width"
|
|
16
|
-
[height]="getSizeImg(message).height" />
|
|
17
|
-
</div>
|
|
18
|
-
|
|
19
|
-
<div *ngIf="message.type == 'file';" class="message-content message-content-text"
|
|
20
|
-
[innerHTML]="urlify(message.metadata.src, message.metadata.name)"
|
|
21
|
-
></div>
|
|
22
|
-
|
|
23
|
-
<div>
|
|
24
|
-
|
|
25
|
-
<!-- <div *ngIf="message.type == 'text'"> -->
|
|
26
|
-
<div *ngIf="isPopupUrl(message.text); then contentPopup else contentNewTab">here is ignored</div>
|
|
27
|
-
<ng-template #contentPopup>
|
|
28
|
-
<div style="text-decoration: underline; padding:8px; cursor: pointer;" (click)="popupUrl(message.text,'windowName')">{{stripTags(message.text)}}</div>
|
|
29
|
-
</ng-template>
|
|
30
|
-
<ng-template #contentNewTab>
|
|
31
|
-
<div class="message-content message-content-text" [innerHTML]="message.text"></div>
|
|
32
|
-
</ng-template>
|
|
33
|
-
<!-- </div> -->
|
|
34
|
-
|
|
35
|
-
</div>
|
|
36
|
-
|
|
37
|
-
<div class="timestamp-message right">{{message.timestamp | date: 'H:mm'}}</div>
|
|
38
|
-
</div>
|
|
39
|
-
|
|
40
|
-
<div class="attribute-message">
|
|
41
|
-
<div class="status-message">
|
|
42
|
-
<span *ngIf="!message.status" class="material-icons">
|
|
43
|
-
<ion-icon name="time-outline"></ion-icon>
|
|
44
|
-
</span>
|
|
45
|
-
<span *ngIf="message.status==MSG_STATUS_SENT" class="material-icons">
|
|
46
|
-
<ion-icon name="checkmark-outline"></ion-icon>
|
|
47
|
-
</span>
|
|
48
|
-
<span *ngIf="message.status==MSG_STATUS_RETURN_RECEIPT" class="material-icons">
|
|
49
|
-
<ion-icon name="checkmark-done-outline"></ion-icon>
|
|
50
|
-
</span>
|
|
51
|
-
</div>
|
|
52
|
-
</div>
|
|
53
|
-
|
|
54
|
-
</div>
|
package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.scss
DELETED
|
@@ -1,98 +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
|
-
&.no-text {
|
|
17
|
-
line-height: 0;
|
|
18
|
-
.message-content-image {
|
|
19
|
-
border-radius: 15px 6px 0px 15px;
|
|
20
|
-
}
|
|
21
|
-
.message-content.message-content-text{
|
|
22
|
-
padding: 0px;
|
|
23
|
-
height: 0px;
|
|
24
|
-
}
|
|
25
|
-
.timestamp-message {
|
|
26
|
-
background-color: #00000045;
|
|
27
|
-
padding: 4px;
|
|
28
|
-
color: white;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
&.image{
|
|
32
|
-
max-width: 300px;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
.message-content:after {
|
|
40
|
-
content: "\00a0\00a0\00a0\00a0\00a0\00a0";
|
|
41
|
-
}
|
|
42
|
-
.timestamp-message {
|
|
43
|
-
font-size: 10px;
|
|
44
|
-
padding: 0px;
|
|
45
|
-
position: absolute;
|
|
46
|
-
bottom: 2px;
|
|
47
|
-
right: 6px;
|
|
48
|
-
line-height: 15px;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
.message-my {
|
|
52
|
-
width: 100%;
|
|
53
|
-
margin-top: 4px;
|
|
54
|
-
.message-content.message-content-text{
|
|
55
|
-
color: var(--white)!important;
|
|
56
|
-
padding: 5px 20px 5px 10px;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
.bubble-message {
|
|
61
|
-
background-color: var(--bubble-blue);
|
|
62
|
-
color: white;
|
|
63
|
-
margin-right: 24px;
|
|
64
|
-
float: right;
|
|
65
|
-
border-top-right-radius: 6px;
|
|
66
|
-
border-bottom-right-radius: 6px;
|
|
67
|
-
}
|
|
68
|
-
&.first-message {
|
|
69
|
-
margin-top: 10px;
|
|
70
|
-
.bubble-message {
|
|
71
|
-
border-top-right-radius: 12px;
|
|
72
|
-
border-bottom-right-radius: 0px;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
.timestamp-message {
|
|
76
|
-
color: var(--white);
|
|
77
|
-
}
|
|
78
|
-
.attribute-message {
|
|
79
|
-
position: absolute;
|
|
80
|
-
width: 100%;
|
|
81
|
-
background-color: transparent;
|
|
82
|
-
bottom: 0;
|
|
83
|
-
right: 0;
|
|
84
|
-
.status-message {
|
|
85
|
-
position: absolute;
|
|
86
|
-
top: 0;
|
|
87
|
-
right: 0;
|
|
88
|
-
width: 15px;
|
|
89
|
-
.material-icons {
|
|
90
|
-
font-size: 15px;
|
|
91
|
-
color: var(--basic-blue);
|
|
92
|
-
position: absolute;
|
|
93
|
-
bottom: 4px;
|
|
94
|
-
right: 2px;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.ts
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -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
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<ion-header no-border class="ion-no-border">
|
|
2
|
-
<ion-toolbar>
|
|
3
|
-
|
|
4
|
-
<ion-buttons slot="start">
|
|
5
|
-
<ion-button ion-button (click)="onBackButtonHandler()">
|
|
6
|
-
<ion-icon slot="icon-only" name="arrow-back-outline"></ion-icon>
|
|
7
|
-
</ion-button>
|
|
8
|
-
</ion-buttons>
|
|
9
|
-
|
|
10
|
-
<ion-title> {{headerTitle}}</ion-title>
|
|
11
|
-
|
|
12
|
-
</ion-toolbar>
|
|
13
|
-
</ion-header>
|
|
File without changes
|