@chat21/chat21-ionic 3.0.58 → 3.0.59-rc15
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 +69 -0
- package/README.md +9 -0
- package/config.xml +11 -2
- package/env.sample +2 -0
- package/package.json +1 -1
- package/resources/Android/splash/drawable-land-hdpi-screen.png +0 -0
- package/resources/Android/splash/drawable-land-ldpi-screen.png +0 -0
- package/resources/Android/splash/drawable-land-mdpi-screen.png +0 -0
- package/resources/Android/splash/drawable-land-xhdpi-screen.png +0 -0
- package/resources/Android/splash/drawable-land-xxhdpi-screen.png +0 -0
- package/resources/Android/splash/drawable-land-xxxhdpi-screen.png +0 -0
- package/resources/Android/splash/drawable-port-hdpi-screen.png +0 -0
- package/resources/Android/splash/drawable-port-ldpi-screen.png +0 -0
- package/resources/Android/splash/drawable-port-mdpi-screen.png +0 -0
- package/resources/Android/splash/drawable-port-xhdpi-screen.png +0 -0
- package/resources/Android/splash/drawable-port-xxhdpi-screen.png +0 -0
- package/resources/Android/splash/drawable-port-xxxhdpi-screen.png +0 -0
- package/resources/Android/splash.png +0 -0
- package/src/app/app-routing.module.ts +21 -17
- package/src/app/app.component.html +6 -3
- package/src/app/app.component.ts +259 -55
- package/src/app/app.module.ts +16 -8
- package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.html +1 -1
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +4 -4
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +8 -2
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +6 -1
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +7 -2
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +47 -2
- package/src/app/chatlib/conversation-detail/message/image/image.component.html +7 -6
- package/src/app/chatlib/conversation-detail/message/image/image.component.ts +20 -1
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +39 -9
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.scss +8 -144
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +14 -17
- package/src/app/chatlib/list-conversations-component/list-conversations/list-conversations.component.html +1 -1
- package/src/app/components/authentication/login/login.component.html +10 -10
- package/src/app/components/authentication/login/login.component.ts +2 -1
- package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.ts +1 -1
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.ts +1 -1
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +17 -12
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +12 -0
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +21 -5
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +3 -2
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +22 -17
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +46 -5
- package/src/app/components/ddp-header/ddp-header.component.html +1 -1
- package/src/app/components/ddp-header/ddp-header.component.ts +4 -2
- package/src/app/components/image-viewer/image-viewer.component.html +23 -0
- package/src/app/components/image-viewer/image-viewer.component.scss +107 -0
- package/src/app/components/image-viewer/image-viewer.component.spec.ts +24 -0
- package/src/app/components/image-viewer/image-viewer.component.ts +38 -0
- package/src/app/components/project-item/project-item.component.html +147 -0
- package/src/app/components/project-item/project-item.component.scss +669 -0
- package/src/app/components/project-item/project-item.component.spec.ts +24 -0
- package/src/app/components/project-item/project-item.component.ts +317 -0
- package/src/app/components/utils/avatar-profile/avatar-profile.component.html +7 -0
- package/src/app/components/utils/avatar-profile/avatar-profile.component.ts +22 -5
- package/src/app/pages/authentication/login/login.page.html +1 -2
- package/src/app/pages/authentication/login/login.page.ts +1 -1
- package/src/app/pages/conversation-detail/conversation-detail.page.html +5 -3
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +122 -30
- package/src/app/pages/conversations-list/conversations-list.page.html +44 -23
- package/src/app/pages/conversations-list/conversations-list.page.scss +290 -127
- package/src/app/pages/conversations-list/conversations-list.page.ts +172 -12
- package/src/app/pages/unassigned-conversations/unassigned-conversations-routing.module.ts +17 -0
- package/src/app/pages/unassigned-conversations/unassigned-conversations.module.ts +22 -0
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.html +22 -0
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.scss +79 -0
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.spec.ts +24 -0
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.ts +108 -0
- package/src/app/services/nav-proxy.service.ts +1 -1
- package/src/app/services/tiledesk/tiledesk.service.ts +22 -1
- package/src/app/services/websocket/websocket-js.ts +557 -0
- package/src/app/services/websocket/websocket.service.spec.ts +12 -0
- package/src/app/services/websocket/websocket.service.ts +274 -0
- package/src/app/shared/shared.module.ts +7 -1
- package/src/assets/i18n/en.json +9 -1
- package/src/assets/i18n/it.json +9 -1
- package/src/assets/js/chat21client.js +141 -67
- package/src/assets/transparent.png +0 -0
- package/src/chat-config-pre-test.json +3 -1
- package/src/chat-config-template.json +3 -1
- package/src/chat-config.json +3 -1
- package/src/chat21-core/providers/chat-manager.ts +3 -3
- package/src/chat21-core/providers/firebase/firebase-archivedconversations-handler.ts +1 -1
- package/src/chat21-core/providers/firebase/firebase-auth-service.ts +6 -6
- package/src/chat21-core/providers/firebase/firebase-conversation-handler.ts +1 -1
- package/src/chat21-core/providers/firebase/firebase-notifications.ts +1 -1
- package/src/chat21-core/providers/firebase/firebase-presence.service.ts +2 -2
- package/src/chat21-core/providers/firebase/firebase-typing.service.ts +1 -1
- package/src/chat21-core/providers/firebase/firebase-upload.service.ts +1 -1
- package/src/chat21-core/providers/mqtt/mqtt-auth-service.ts +27 -27
- package/src/chat21-core/providers/mqtt/mqtt-conversations-handler.ts +13 -5
- package/src/chat21-core/providers/mqtt/mqtt-notifications.ts +101 -11
- package/src/chat21-core/providers/tiledesk/tiledesk-auth.service.ts +13 -4
- package/src/chat21-core/utils/utils.ts +1 -1
- package/src/firebase-messaging-sw-template.js +1 -1
|
@@ -6,7 +6,7 @@ import { ImageRepoService } from 'src/chat21-core/providers/abstract/image-repo.
|
|
|
6
6
|
import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
|
|
7
7
|
import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
|
|
8
8
|
import { setConversationAvatar, setChannelType } from 'src/chat21-core/utils/utils';
|
|
9
|
-
|
|
9
|
+
import { Platform } from '@ionic/angular';
|
|
10
10
|
@Component({
|
|
11
11
|
selector: 'app-header-conversation-detail',
|
|
12
12
|
templateUrl: './header-conversation-detail.component.html',
|
|
@@ -31,7 +31,9 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
|
|
|
31
31
|
membersConversation = ['SYSTEM'];
|
|
32
32
|
fullNameConv: string;
|
|
33
33
|
idConv: string;
|
|
34
|
-
|
|
34
|
+
conversation_with_fullname: string;
|
|
35
|
+
platformName: string;
|
|
36
|
+
|
|
35
37
|
private logger: LoggerService = LoggerInstance.getInstance();
|
|
36
38
|
|
|
37
39
|
/**
|
|
@@ -41,6 +43,7 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
|
|
|
41
43
|
constructor(
|
|
42
44
|
public imageRepoService: ImageRepoService,
|
|
43
45
|
private route: ActivatedRoute,
|
|
46
|
+
public platform: Platform
|
|
44
47
|
) {
|
|
45
48
|
this.route.paramMap.subscribe(params => {
|
|
46
49
|
|
|
@@ -59,7 +62,8 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
|
|
|
59
62
|
// ----------------------------------------------------
|
|
60
63
|
ngOnInit() {
|
|
61
64
|
this.logger.log('[CONVS-DETAIL][HEADER] - (ngOnInit) - idLoggedUser', this.idLoggedUser);
|
|
62
|
-
|
|
65
|
+
this.logger.log('[CONVS-DETAIL][HEADER] - (ngOnInit) - conversationAvatar', this.conversationAvatar);
|
|
66
|
+
this.conversation_with_fullname = this.conversationAvatar.conversation_with_fullname
|
|
63
67
|
|
|
64
68
|
this.initialize();
|
|
65
69
|
}
|
|
@@ -79,7 +83,7 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
|
|
|
79
83
|
if (this.conversationAvatar) {
|
|
80
84
|
this.conversationAvatar.imageurl = this.imageRepoService.getImagePhotoUrl(this.conversationAvatar.uid)
|
|
81
85
|
}
|
|
82
|
-
this.logger.log('[CONVS-DETAIL][HEADER] - (ngOnChanges) - conversationAvatar usecase UNDEFINED conversationAvatar',
|
|
86
|
+
this.logger.log('[CONVS-DETAIL][HEADER] - (ngOnChanges) - conversationAvatar usecase UNDEFINED conversationAvatar', this.conversationAvatar);
|
|
83
87
|
}
|
|
84
88
|
|
|
85
89
|
this.logger.log('[CONVS-DETAIL][HEADER] - (ngOnChanges) - isOpenInfoConversation', this.isOpenInfoConversation);
|
|
@@ -91,7 +95,7 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
|
|
|
91
95
|
// @ Initialize (called in ngOnInit)
|
|
92
96
|
// ----------------------------------------------------
|
|
93
97
|
initialize() {
|
|
94
|
-
|
|
98
|
+
this.getPlatformName()
|
|
95
99
|
if (this.conversationAvatar && this.conversationAvatar.channelType === this.DIRECT) {
|
|
96
100
|
this.isDirect = true;
|
|
97
101
|
} else if (this.idLoggedUser) {
|
|
@@ -99,6 +103,18 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
|
|
|
99
103
|
}
|
|
100
104
|
}
|
|
101
105
|
|
|
106
|
+
getPlatformName() {
|
|
107
|
+
this.logger.log('getPlatformName this.platform', this.platform)
|
|
108
|
+
if (this.platform.is('ios')) {
|
|
109
|
+
this.platformName = 'ios'
|
|
110
|
+
this.logger.log('getPlatformName platformName', this.platformName)
|
|
111
|
+
} else if (this.platform.is('android')){
|
|
112
|
+
this.platformName = 'android'
|
|
113
|
+
this.logger.log('getPlatformName platformName', this.platformName)
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
}
|
|
117
|
+
|
|
102
118
|
onOpenCloseInfoConversation() {
|
|
103
119
|
this.openInfoMessage = false;
|
|
104
120
|
this.openInfoConversation = !this.openInfoConversation;
|
package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html
CHANGED
|
@@ -48,9 +48,10 @@
|
|
|
48
48
|
</div>
|
|
49
49
|
|
|
50
50
|
<div class="buttons-right">
|
|
51
|
-
|
|
51
|
+
<!-- [disabled]="conversationEnabled === false" -->
|
|
52
|
+
<ion-button [disabled]="conversationEnabled === false" class="send-button right active" ion-button fill="clear"
|
|
52
53
|
(click)="sendMessage(messageString)">
|
|
53
|
-
<ion-icon slot="icon-only" name="send"></ion-icon>
|
|
54
|
+
<ion-icon [ngClass]="{'send-msg-disabled': conversationEnabled === false,'send-msg-activated': conversationEnabled === true }" slot="icon-only" name="send"></ion-icon>
|
|
54
55
|
</ion-button>
|
|
55
56
|
</div>
|
|
56
57
|
</ion-col>
|
package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss
CHANGED
|
@@ -21,8 +21,6 @@
|
|
|
21
21
|
--padding-start: 0;
|
|
22
22
|
--padding-end: 0;
|
|
23
23
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
24
|
}
|
|
27
25
|
.buttons-right {
|
|
28
26
|
position: absolute;
|
|
@@ -56,7 +54,7 @@
|
|
|
56
54
|
// min-height: 30px;
|
|
57
55
|
min-height: 37px; // NK edited
|
|
58
56
|
max-height: 184px;
|
|
59
|
-
background-color: rgba(0, 0, 0, .05);
|
|
57
|
+
background-color: rgba(0, 0, 0, 0.05);
|
|
60
58
|
// --padding-top: 5px; // NK edited
|
|
61
59
|
--padding-top: 8px;
|
|
62
60
|
--padding-bottom: 5px;
|
|
@@ -69,21 +67,21 @@
|
|
|
69
67
|
}
|
|
70
68
|
}
|
|
71
69
|
|
|
72
|
-
#fileInput{
|
|
70
|
+
#fileInput {
|
|
73
71
|
position: absolute;
|
|
74
72
|
opacity: 0;
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
#file-input {
|
|
78
76
|
// width: 0.1px;
|
|
79
77
|
// height: 0.1px;
|
|
80
78
|
opacity: 0;
|
|
81
79
|
overflow: hidden;
|
|
82
80
|
position: absolute;
|
|
83
81
|
// z-index: -1;
|
|
84
|
-
|
|
82
|
+
}
|
|
85
83
|
|
|
86
|
-
|
|
84
|
+
.upload-image-btn {
|
|
87
85
|
// margin-bottom: 0px;
|
|
88
86
|
// margin-top: 5px;
|
|
89
87
|
// margin-left: 0px;
|
|
@@ -99,21 +97,28 @@
|
|
|
99
97
|
--border-radius: 50%;
|
|
100
98
|
--padding-end: 1px;
|
|
101
99
|
--padding-start: 1px;
|
|
102
|
-
|
|
100
|
+
|
|
103
101
|
height: 33px !important;
|
|
104
|
-
|
|
102
|
+
}
|
|
105
103
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
104
|
+
.upload-image-btn .button-native {
|
|
105
|
+
border-radius: 50%;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.send-msg-activated {
|
|
109
|
+
color: #3880ff !important;
|
|
110
|
+
}
|
|
109
111
|
|
|
112
|
+
.send-msg-disabled {
|
|
113
|
+
cursor: default;
|
|
114
|
+
opacity: 0.8;
|
|
115
|
+
pointer-events: none;
|
|
116
|
+
}
|
|
110
117
|
|
|
111
118
|
// input[placeholder] { text-overflow: ellipsis; }
|
|
112
119
|
// ::-moz-placeholder { text-overflow: ellipsis; } /* firefox 19+ */
|
|
113
120
|
// input:-moz-placeholder { text-overflow: ellipsis; }
|
|
114
121
|
|
|
115
|
-
|
|
116
|
-
|
|
117
122
|
// #ion-textarea > div > textarea[placeholder]{ text-overflow: ellipsis; }
|
|
118
123
|
// #ion-textarea > div > textarea:-moz-placeholder { text-overflow: ellipsis; }
|
|
119
|
-
// ::-moz-placeholder { text-overflow: ellipsis; } /* firefox 19+ */
|
|
124
|
+
// ::-moz-placeholder { text-overflow: ellipsis; } /* firefox 19+ */
|
package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts
CHANGED
|
@@ -43,6 +43,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
43
43
|
@Input() loggedUser: UserModel;
|
|
44
44
|
@Input() conversationWith: string;
|
|
45
45
|
@Input() tagsCannedFilter: any = [];
|
|
46
|
+
|
|
46
47
|
@Input() events: Observable<void>;
|
|
47
48
|
@Input() fileUploadAccept: string
|
|
48
49
|
@Input() isOpenInfoConversation: boolean;
|
|
@@ -102,6 +103,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
102
103
|
|
|
103
104
|
|
|
104
105
|
ngOnChanges() {
|
|
106
|
+
|
|
105
107
|
if (this.translationMap) {
|
|
106
108
|
this.LONG_TEXAREA_PLACEHOLDER = this.translationMap.get('LABEL_ENTER_MSG')
|
|
107
109
|
this.SHORT_TEXAREA_PLACEHOLDER = this.translationMap.get('LABEL_ENTER_MSG_SHORT')
|
|
@@ -110,6 +112,8 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
110
112
|
|
|
111
113
|
this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges DROP EVENT ", this.dropEvent);
|
|
112
114
|
this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges tagsCannedFilter ", this.tagsCannedFilter);
|
|
115
|
+
this.logger.log('[CONVS-DETAIL] - returnChangeTextArea ngOnChanges in [MSG-TEXT-AREA] this.tagsCannedFilter.length ', this.tagsCannedFilter.length)
|
|
116
|
+
|
|
113
117
|
// use case drop
|
|
114
118
|
if (this.dropEvent) {
|
|
115
119
|
this.presentModal(this.dropEvent)
|
|
@@ -136,11 +140,11 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
136
140
|
|
|
137
141
|
const elTextAreaWrapper = elTextArea.children[0]
|
|
138
142
|
// this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngAfterViewInit elTextAreaWrapper", elTextAreaWrapper);
|
|
139
|
-
|
|
143
|
+
|
|
140
144
|
if (elTextAreaWrapper.children.length === 1) {
|
|
141
145
|
const elNativeTearea = elTextAreaWrapper.children[0]
|
|
142
146
|
// this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngAfterViewInit elNativeTearea", elNativeTearea);
|
|
143
|
-
|
|
147
|
+
elNativeTearea.setAttribute("style", "height: 37px !important; ");
|
|
144
148
|
}
|
|
145
149
|
}
|
|
146
150
|
|
|
@@ -481,7 +485,10 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
481
485
|
// if the message is not empty it is passed to the control method
|
|
482
486
|
// ------------------------------------------------------------------------
|
|
483
487
|
onKeydown(e: any, text: string) {
|
|
488
|
+
this.logger.log("[CONVS-DETAIL] - returnChangeTextArea - onKeydown in MSG-TEXT-AREA event", e)
|
|
489
|
+
this.logger.log("[CONVS-DETAIL] - returnChangeTextArea - onKeydown in MSG-TEXT-AREA text", text)
|
|
484
490
|
e.preventDefault(); // Prevent press enter from creating new line
|
|
491
|
+
// console.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea * event: ", e);
|
|
485
492
|
|
|
486
493
|
this.countClicks++;
|
|
487
494
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - countClicks: ', this.countClicks);
|
|
@@ -489,9 +496,18 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
489
496
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - event target: ', e.target);
|
|
490
497
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - event target textContent: ', e.target.textContent);
|
|
491
498
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - tagsCannedFilter: ', this.tagsCannedFilter);
|
|
499
|
+
|
|
492
500
|
// this.logger.error("[CONVS-DETAIL][MSG-TEXT-AREA] pressedOnKeyboard e.keyCode ", e.keyCode);
|
|
501
|
+
// this.events.subscribe((cannedmessage) => {
|
|
502
|
+
|
|
503
|
+
// console.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea * cannedmessage: ", cannedmessage);
|
|
504
|
+
// });
|
|
505
|
+
|
|
506
|
+
// user and time are the same arguments passed in `events.publish(user, time)`
|
|
507
|
+
|
|
493
508
|
|
|
494
|
-
|
|
509
|
+
|
|
510
|
+
let message = e.target.textContent.trim();
|
|
495
511
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - event target textContent (message): ', message);
|
|
496
512
|
// e.inputType === 'insertLineBreak' &&
|
|
497
513
|
if (e.inputType === 'insertLineBreak' && message === '') {
|
|
@@ -501,13 +517,37 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
501
517
|
} else {
|
|
502
518
|
var pos = text.lastIndexOf("/");
|
|
503
519
|
this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - POSITION OF '/': ", pos);
|
|
520
|
+
this.logger.log("[CONVS-DETAIL] returnChangeTextArea onKeydown in msg-texarea POSITION OF '/': ", pos);
|
|
521
|
+
this.logger.log("[CONVS-DETAIL] returnChangeTextArea onKeydown in msg-texarea this.tagsCannedFilter.length': ", this.tagsCannedFilter.length);
|
|
504
522
|
if (!text.includes("/")) {
|
|
505
523
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - SEND MESSAGE 1 message: ', message);
|
|
524
|
+
this.logger.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea SEND MESSAGE 1 message: ", message);
|
|
506
525
|
this.messageString = '';
|
|
507
526
|
this.sendMessage(text);
|
|
508
527
|
this.countClicks = 0
|
|
509
|
-
} else if (text.includes("/") && pos
|
|
528
|
+
} else if (text.includes("/") && pos === 0 && this.countClicks > 1 && this.tagsCannedFilter.length > 0) {
|
|
510
529
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - tagsCannedFilter.length 2: ', this.tagsCannedFilter.length);
|
|
530
|
+
this.logger.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea SEND MESSAGE 2 message: ", message);
|
|
531
|
+
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - SEND MESSAGE 2 message value: ', message.value);
|
|
532
|
+
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - SEND MESSAGE 2 text: ', text);
|
|
533
|
+
|
|
534
|
+
this.logger.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea SEND MESSAGE 2 this.tagsCannedFilter.length: ", this.tagsCannedFilter.length);
|
|
535
|
+
this.logger.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea SEND MESSAGE 2 this.countClicks: ", this.countClicks);
|
|
536
|
+
this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown in msg-texarea SEND MESSAGE 2 this.countClicks: ", this.countClicks);
|
|
537
|
+
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - SEND MESSAGE 2 message: ', message);
|
|
538
|
+
this.messageString = '';
|
|
539
|
+
|
|
540
|
+
this.sendMessage(text);
|
|
541
|
+
this.countClicks = 0
|
|
542
|
+
} else if (text.includes("/") && pos > 0 && this.countClicks > 1 && this.tagsCannedFilter.length > 0 && text.substr(-1) !== '/' ) {
|
|
543
|
+
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - tagsCannedFilter.length 3: ', this.tagsCannedFilter.length);
|
|
544
|
+
this.logger.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea SEND MESSAGE 3 message: ", message);
|
|
545
|
+
// this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - SEND MESSAGE 3 message value: ', message.value);
|
|
546
|
+
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - SEND MESSAGE 3 text: ', text);
|
|
547
|
+
|
|
548
|
+
this.logger.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea SEND MESSAGE 2 this.tagsCannedFilter.length: ", this.tagsCannedFilter.length);
|
|
549
|
+
this.logger.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea SEND MESSAGE 2 this.countClicks: ", this.countClicks);
|
|
550
|
+
this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown in msg-texarea SEND MESSAGE 2 this.countClicks: ", this.countClicks);
|
|
511
551
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - SEND MESSAGE 2 message: ', message);
|
|
512
552
|
this.messageString = '';
|
|
513
553
|
|
|
@@ -516,6 +556,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
516
556
|
} else if (text.includes("/") && this.tagsCannedFilter.length === 0) {
|
|
517
557
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - tagsCannedFilter.length 3: ', this.tagsCannedFilter.length);
|
|
518
558
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - SEND MESSAGE 3 message: ', message);
|
|
559
|
+
this.logger.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea SEND MESSAGE 3 message: ", message);
|
|
519
560
|
this.messageString = '';
|
|
520
561
|
|
|
521
562
|
this.sendMessage(text);
|
|
@@ -586,7 +627,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
586
627
|
if (event.key === 'Enter' && event.altKey || event.key === 'Enter' && event.ctrlKey || event.key === 'Enter' && event.metaKey) {
|
|
587
628
|
|
|
588
629
|
|
|
589
|
-
|
|
630
|
+
|
|
590
631
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] HAS PRESSED COMBO KEYS this.messageString', this.messageString);
|
|
591
632
|
|
|
592
633
|
if (this.messageString !== undefined && this.messageString.trim() !== '') {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
<ion-buttons slot="end">
|
|
16
16
|
|
|
17
|
-
<ion-button *ngIf="
|
|
17
|
+
<ion-button *ngIf="supportMode" ion-button fill="clear" (click)="onOpenContactsDirectory($event)">
|
|
18
18
|
<ion-icon slot="icon-only" name="create-outline"></ion-icon>
|
|
19
19
|
</ion-button>
|
|
20
20
|
|
|
@@ -7,14 +7,16 @@ import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
|
|
|
7
7
|
})
|
|
8
8
|
export class DdpHeaderComponent implements OnInit {
|
|
9
9
|
@Input() numberOpenConv: number;
|
|
10
|
-
@Input() supportMode
|
|
10
|
+
@Input() supportMode: boolean;
|
|
11
11
|
@Output() openContactsDirectory = new EventEmitter();
|
|
12
12
|
@Output() openProfileInfo = new EventEmitter();
|
|
13
13
|
|
|
14
14
|
constructor(
|
|
15
15
|
) { }
|
|
16
16
|
|
|
17
|
-
ngOnInit() {
|
|
17
|
+
ngOnInit() {
|
|
18
|
+
// console.log('DDP HEADER SUPPORT MODE ', this.supportMode)
|
|
19
|
+
}
|
|
18
20
|
|
|
19
21
|
// START @Output() //
|
|
20
22
|
/** */
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<div id="image-viewer-modal" class="modal">
|
|
2
|
+
|
|
3
|
+
<!-- The Close Button -->
|
|
4
|
+
<span class="close" (click)="closeImageViewerModal()">
|
|
5
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000">
|
|
6
|
+
<path d="M0 0h24v24H0z" fill="none" />
|
|
7
|
+
<path
|
|
8
|
+
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 12z" />
|
|
9
|
+
</svg>
|
|
10
|
+
</span>
|
|
11
|
+
<span class="download-image" (click)="downloadImage()">
|
|
12
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000">
|
|
13
|
+
<path d="M0 0h24v24H0z" fill="none" />
|
|
14
|
+
<path
|
|
15
|
+
d="M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-6 .67l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z" />
|
|
16
|
+
</svg>
|
|
17
|
+
</span>
|
|
18
|
+
<!-- Modal Content (The Image) [src]="metadata.src"-->
|
|
19
|
+
<img class="modal-content" id="image-viewer-img">
|
|
20
|
+
|
|
21
|
+
<!-- Modal Caption (Image Text) -->
|
|
22
|
+
<div id="caption"></div>
|
|
23
|
+
</div>
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
// --- MODAL PREVIEW IMAGE
|
|
2
|
+
.modal {
|
|
3
|
+
display: none; /* Hidden by default */
|
|
4
|
+
position: fixed; /* Stay in place */
|
|
5
|
+
z-index: 1050; /* Sit on top */
|
|
6
|
+
padding-top: 100px; /* Location of the box */
|
|
7
|
+
left: 0;
|
|
8
|
+
top: 0;
|
|
9
|
+
width: 100%; /* Full width */
|
|
10
|
+
height: 100%; /* Full height */
|
|
11
|
+
overflow: auto; /* Enable scroll if needed */
|
|
12
|
+
background-color: rgb(0,0,0); /* Fallback color */
|
|
13
|
+
background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* Modal Content (Image) */
|
|
17
|
+
.modal-content {
|
|
18
|
+
margin: auto;
|
|
19
|
+
display: block;
|
|
20
|
+
// width: 80%;
|
|
21
|
+
// max-width: 700px;
|
|
22
|
+
padding: 0px 5px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* Caption of Modal Image (Image Text) - Same Width as the Image */
|
|
26
|
+
#caption {
|
|
27
|
+
margin: auto;
|
|
28
|
+
display: block;
|
|
29
|
+
width: 80%;
|
|
30
|
+
max-width: 700px;
|
|
31
|
+
text-align: center;
|
|
32
|
+
color: #ccc;
|
|
33
|
+
padding: 10px 0;
|
|
34
|
+
height: 150px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* Add Animation - Zoom in the Modal */
|
|
38
|
+
.modal-content, #caption {
|
|
39
|
+
animation-name: zoom;
|
|
40
|
+
// animation-duration: 0.6s;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@keyframes zoom {
|
|
44
|
+
from {transform:scale(0)}
|
|
45
|
+
to {transform:scale(1)}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* The Close Button */
|
|
49
|
+
.close {
|
|
50
|
+
position: absolute;
|
|
51
|
+
top: 15px;
|
|
52
|
+
right: 35px;
|
|
53
|
+
// color: #f1f1f1;
|
|
54
|
+
// font-size: 40px;
|
|
55
|
+
// font-weight: bold;
|
|
56
|
+
transition: 0.3s;
|
|
57
|
+
border-radius: 50px;
|
|
58
|
+
padding:7px 8.5px
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.close svg {
|
|
62
|
+
background-color: transparent;
|
|
63
|
+
fill: rgba(255,255,255,.5);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.close:hover,
|
|
67
|
+
.close:focus {
|
|
68
|
+
// color: #bbb;
|
|
69
|
+
background-color: rgba(255,255,255,.3);
|
|
70
|
+
text-decoration: none;
|
|
71
|
+
cursor: pointer;
|
|
72
|
+
svg {
|
|
73
|
+
fill: rgba(255,255,255);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.download-image {
|
|
78
|
+
position: absolute;
|
|
79
|
+
top: 15px;
|
|
80
|
+
right: 78px;
|
|
81
|
+
transition: 0.3s;
|
|
82
|
+
border-radius: 50px;
|
|
83
|
+
padding:7px 8.5px
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.download-image svg {
|
|
87
|
+
background-color: transparent;
|
|
88
|
+
fill: rgba(255,255,255,.5);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.download-image:hover,
|
|
92
|
+
.download-image:focus {
|
|
93
|
+
|
|
94
|
+
background-color: rgba(255,255,255,.3);
|
|
95
|
+
text-decoration: none;
|
|
96
|
+
cursor: pointer;
|
|
97
|
+
svg {
|
|
98
|
+
fill: rgba(255,255,255);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* 100% Image Width on Smaller Screens */
|
|
103
|
+
@media only screen and (max-width: 700px){
|
|
104
|
+
.modal-content {
|
|
105
|
+
// width: 100%;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
import { IonicModule } from '@ionic/angular';
|
|
3
|
+
|
|
4
|
+
import { ImageViewerComponent } from './image-viewer.component';
|
|
5
|
+
|
|
6
|
+
describe('ImageViewerComponent', () => {
|
|
7
|
+
let component: ImageViewerComponent;
|
|
8
|
+
let fixture: ComponentFixture<ImageViewerComponent>;
|
|
9
|
+
|
|
10
|
+
beforeEach(async(() => {
|
|
11
|
+
TestBed.configureTestingModule({
|
|
12
|
+
declarations: [ ImageViewerComponent ],
|
|
13
|
+
imports: [IonicModule.forRoot()]
|
|
14
|
+
}).compileComponents();
|
|
15
|
+
|
|
16
|
+
fixture = TestBed.createComponent(ImageViewerComponent);
|
|
17
|
+
component = fixture.componentInstance;
|
|
18
|
+
fixture.detectChanges();
|
|
19
|
+
}));
|
|
20
|
+
|
|
21
|
+
it('should create', () => {
|
|
22
|
+
expect(component).toBeTruthy();
|
|
23
|
+
});
|
|
24
|
+
});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Component, OnInit } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Component({
|
|
4
|
+
selector: 'app-image-viewer',
|
|
5
|
+
templateUrl: './image-viewer.component.html',
|
|
6
|
+
styleUrls: ['./image-viewer.component.scss'],
|
|
7
|
+
})
|
|
8
|
+
export class ImageViewerComponent implements OnInit {
|
|
9
|
+
|
|
10
|
+
constructor() { }
|
|
11
|
+
|
|
12
|
+
ngOnInit() {}
|
|
13
|
+
|
|
14
|
+
closeImageViewerModal() {
|
|
15
|
+
// console.log('HAS CLICKED CLOSE MODAL')
|
|
16
|
+
var modal = document.getElementById("image-viewer-modal");
|
|
17
|
+
// var span = document.getElementsByClassName("close")[0];
|
|
18
|
+
modal.style.display = "none";
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
downloadImage() {
|
|
22
|
+
var modalImg = <HTMLImageElement>document.getElementById("image-viewer-img")
|
|
23
|
+
// console.log('HAS CLICKED CLOSE DWNLD IMG modalImg ', modalImg)
|
|
24
|
+
var modalImgURL = modalImg.src;
|
|
25
|
+
// console.log('HAS CLICKED CLOSE DWNLD IMG modalImgURL ', modalImgURL)
|
|
26
|
+
var captionText = document.getElementById("caption").innerHTML;
|
|
27
|
+
// console.log('HAS CLICKED CLOSE DWNLD IMG captionText ', captionText)
|
|
28
|
+
|
|
29
|
+
const a: any = document.createElement('a');
|
|
30
|
+
a.href = modalImgURL;
|
|
31
|
+
a.download = captionText;
|
|
32
|
+
document.body.appendChild(a);
|
|
33
|
+
a.style = 'display: none';
|
|
34
|
+
a.click();
|
|
35
|
+
a.remove();
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
}
|