@chat21/chat21-ionic 3.0.59 → 3.0.60-rc8
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 +50 -1
- package/deploy_pre.sh +45 -6
- package/deploy_prod.sh +34 -9
- package/env.sample +1 -1
- package/package.json +1 -1
- package/src/app/app.component.ts +51 -50
- package/src/app/app.module.ts +2 -2
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +62 -36
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +1 -1
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +42 -13
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +64 -39
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +50 -2
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +80 -94
- package/src/app/components/image-viewer/image-viewer.component.scss +2 -2
- package/src/app/components/project-item/project-item.component.html +140 -118
- package/src/app/components/project-item/project-item.component.scss +145 -83
- package/src/app/components/project-item/project-item.component.ts +67 -26
- package/src/app/pages/conversation-detail/conversation-detail.module.ts +3 -1
- package/src/app/pages/conversation-detail/conversation-detail.page.html +9 -3
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +201 -86
- package/src/app/pages/conversations-list/conversations-list.page.html +11 -5
- package/src/app/pages/conversations-list/conversations-list.page.scss +12 -1
- package/src/app/pages/conversations-list/conversations-list.page.ts +27 -7
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.html +16 -11
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.scss +157 -63
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.ts +51 -16
- package/src/app/services/app-config.ts +14 -14
- package/src/app/services/websocket/websocket-js.ts +7 -4
- package/src/app/services/websocket/websocket.service.ts +1 -1
- package/src/app/shared/shared.module.ts +8 -7
- package/src/assets/i18n/de.json +208 -0
- package/src/assets/i18n/en.json +24 -7
- package/src/assets/i18n/es.json +208 -0
- package/src/assets/i18n/fr.json +208 -0
- package/src/assets/i18n/it.json +42 -33
- package/src/assets/i18n/pt.json +208 -0
- package/src/assets/i18n/ru.json +208 -0
- package/src/assets/i18n/tr.json +208 -0
- package/src/assets/js/chat21client.js +16 -3
- package/src/chat-config-mqtt.json +2 -1
- package/src/chat-config-pre-test.json +2 -0
- package/src/chat-config-template.json +1 -0
- package/src/chat-config.json +1 -0
- package/src/chat21-core/providers/firebase/firebase-conversation-handler.ts +54 -43
- package/src/chat21-core/providers/firebase/firebase-conversations-handler.ts +23 -0
- package/src/chat21-core/providers/mqtt/mqtt-archivedconversations-handler.ts +1 -1
- package/src/chat21-core/utils/constants.ts +2 -0
- package/src/chat21-core/utils/utils.ts +12 -1
- package/src/global.scss +4 -0
package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html
CHANGED
|
@@ -1,64 +1,89 @@
|
|
|
1
|
-
<ion-grid>
|
|
1
|
+
<!-- <ion-grid>
|
|
2
2
|
<ion-row id="message-text-area">
|
|
3
|
-
|
|
4
3
|
<ion-col col-auto>
|
|
5
|
-
|
|
6
4
|
<div class="buttons-left">
|
|
7
|
-
|
|
8
|
-
<!-- <ion-button class="attach-button" ion-button fill="clear" style="display: none;">
|
|
9
|
-
<input type="file" accept="image/*" capture="camera" (change)="onFileSelected($event)" id="fileInput" />
|
|
10
|
-
<label for="fileInput" icon-only ion-button>
|
|
11
|
-
<ion-icon slot="icon-only" name="attach"></ion-icon>
|
|
12
|
-
</label>
|
|
13
|
-
</ion-button> -->
|
|
14
5
|
|
|
15
6
|
<ion-button ion-button fill="clear" class="upload-image-btn">
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
<!-- <ion-label slot="end">Upload Image</ion-label> -->
|
|
19
|
-
<!-- <input #fileInput type="file" (change)="onFileSelected($event)" capture="camera" id="file-input" accept="image/*, .pdf,.zip"> -->
|
|
20
|
-
<!-- https://stackoverflow.com/questions/11832930/html-input-file-accept-attribute-file-type-csv?rq=1 -->
|
|
21
|
-
<!-- <input #fileInput type="file" (change)="onFileSelected($event)" capture="camera" id="file-input" accept="image/*, audio/* ,video/*, text/html, text/plain, .csv, .pdf,.doc,.docx,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document, .scss, .css, .json"> -->
|
|
7
|
+
<ion-icon slot="icon-only" lazy="true" name="attach-outline"
|
|
8
|
+
style="font-size: 30px;transform: rotate(42deg);"></ion-icon>
|
|
22
9
|
<input #fileInput type="file" (change)="onFileSelected($event)" capture="camera" id="file-input"
|
|
23
10
|
[accept]="fileUploadAccept">
|
|
24
|
-
|
|
25
11
|
</ion-button>
|
|
26
12
|
</div>
|
|
27
13
|
|
|
28
|
-
|
|
29
14
|
<div class="text-message">
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
<!-- autoFocus="true" // directive -->
|
|
35
|
-
|
|
36
|
-
<ion-textarea id="ion-textarea" #messageTextArea #message_text_area #textArea rows="1"
|
|
37
|
-
[placeholder]="TEXAREA_PLACEHOLDER"
|
|
38
|
-
autosize="false"
|
|
39
|
-
auto-grow="true"
|
|
40
|
-
autofocus="true"
|
|
41
|
-
[value]=""
|
|
42
|
-
[(ngModel)]="messageString"
|
|
43
|
-
(ionChange)="ionChange($event);"
|
|
44
|
-
(keydown.enter)="onKeydown($event, messageString)"
|
|
45
|
-
(paste)="onPaste($event)">
|
|
15
|
+
<ion-textarea id="ion-textarea" #messageTextArea #message_text_area #textArea rows="1"
|
|
16
|
+
[placeholder]="TEXAREA_PLACEHOLDER" autosize="false" auto-grow="true" autofocus="true" [value]=""
|
|
17
|
+
[(ngModel)]="messageString" (ionChange)="ionChange($event);"
|
|
18
|
+
(keydown.enter)="onKeydown($event, messageString)" (paste)="onPaste($event)">
|
|
46
19
|
</ion-textarea>
|
|
47
|
-
<!-- (ionInput)="onChange($event);" -->
|
|
48
20
|
</div>
|
|
49
21
|
|
|
50
22
|
<div class="buttons-right">
|
|
51
|
-
|
|
52
|
-
<ion-button [disabled]="conversationEnabled === false" class="send-button right active" ion-button fill="clear"
|
|
23
|
+
<ion-button [disabled]="conversationEnabled === false" class="send-button right active" ion-button fill="clear"
|
|
53
24
|
(click)="sendMessage(messageString)">
|
|
54
|
-
<ion-icon
|
|
25
|
+
<ion-icon
|
|
26
|
+
[ngClass]="{'send-msg-disabled': conversationEnabled === false,'send-msg-activated': conversationEnabled === true }"
|
|
27
|
+
slot="icon-only" name="send"></ion-icon>
|
|
55
28
|
</ion-button>
|
|
56
29
|
</div>
|
|
57
30
|
</ion-col>
|
|
31
|
+
</ion-row>
|
|
32
|
+
</ion-grid> -->
|
|
58
33
|
|
|
34
|
+
<!-- --------------------------------------------------------------------------------------------------------------------- -->
|
|
35
|
+
<!-- ----------new -->
|
|
36
|
+
<ion-grid>
|
|
37
|
+
<ion-row id="message-text-area">
|
|
59
38
|
|
|
39
|
+
<ion-col col-auto>
|
|
60
40
|
|
|
41
|
+
<div class="start-buttons" style="position: absolute;display: flex;">
|
|
42
|
+
|
|
43
|
+
<ng-container *ngIf="areVisibleCAR">
|
|
44
|
+
<div class="canned-responses-btn-wpr" style="margin-left: -5px;" tooltip="{{translationMap?.get('CANNED_RESPONSES')}}" [options]="tooltipOptions" placement="top">
|
|
45
|
+
<ion-button ion-button fill="clear" class="canned-responses-btn" (click)="openCannedResponses()" [disabled]="!IS_SUPPORT_GROUP_CONVERSATION">
|
|
46
|
+
<ion-icon slot="icon-only" lazy="true" name="flash-outline" style="font-size: 24px;"></ion-icon>
|
|
47
|
+
</ion-button>
|
|
48
|
+
</div>
|
|
49
|
+
<div *ngIf="IS_SUPPORT_GROUP_CONVERSATION && tagsCannedCount === 0" tooltip="{{translationMap?.get('NO_CANNED_RESPONSES')}}" [options]="tooltipOptions" placement="top" class="no-canned-responses-btn-badge">
|
|
50
|
+
<ion-icon name="alert-sharp" style="vertical-align: middle;"></ion-icon>
|
|
51
|
+
</div>
|
|
52
|
+
<div *ngIf="IS_SUPPORT_GROUP_CONVERSATION && tagsCannedCount > 0" tooltip="{{translationMap?.get('YES_CANNED_RESPONSES')}}" [options]="tooltipOptions" placement="top" class="canned-responses-btn-badge">
|
|
53
|
+
<ion-icon name="information-sharp" style="vertical-align: middle;"></ion-icon>
|
|
54
|
+
</div>
|
|
55
|
+
</ng-container>
|
|
61
56
|
|
|
62
|
-
|
|
57
|
+
|
|
58
|
+
<div class="upload-image-btn-wpr" tooltip="{{translationMap?.get('UPLOAD')}}" [options]="tooltipOptions" placement="top">
|
|
59
|
+
<ion-button ion-button fill="clear" class="upload-image-btn">
|
|
60
|
+
<ion-icon slot="icon-only" lazy="true" name="attach-outline"
|
|
61
|
+
style="font-size: 30px;transform: rotate(42deg);"></ion-icon>
|
|
62
|
+
<input #fileInput type="file" (change)="onFileSelected($event)" capture="camera" id="file-input"
|
|
63
|
+
[accept]="fileUploadAccept">
|
|
64
|
+
|
|
65
|
+
</ion-button>
|
|
66
|
+
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
<div class="text-message" [ngClass]="{'text-message-no-cr': areVisibleCAR === false}">
|
|
71
|
+
<ion-textarea id="ion-textarea" #messageTextArea #message_text_area #textArea rows="1"
|
|
72
|
+
[placeholder]="TEXAREA_PLACEHOLDER" autosize="false" auto-grow="true" autofocus="true" [value]=""
|
|
73
|
+
[(ngModel)]="messageString" (ionChange)="ionChange($event);"
|
|
74
|
+
(keydown.enter)="onKeydown($event, messageString)" (paste)="onPaste($event)">
|
|
75
|
+
</ion-textarea>
|
|
76
|
+
</div>
|
|
63
77
|
|
|
78
|
+
<div class="buttons-right">
|
|
79
|
+
<ion-button [disabled]="conversationEnabled === false" class="send-button right active" ion-button fill="clear"
|
|
80
|
+
(click)="sendMessage(messageString)">
|
|
81
|
+
<ion-icon
|
|
82
|
+
[ngClass]="{'send-msg-disabled': conversationEnabled === false,'send-msg-activated': conversationEnabled === true }"
|
|
83
|
+
slot="icon-only" name="send"></ion-icon>
|
|
84
|
+
</ion-button>
|
|
85
|
+
</div>
|
|
86
|
+
</ion-col>
|
|
87
|
+
|
|
88
|
+
</ion-row>
|
|
64
89
|
</ion-grid>
|
package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss
CHANGED
|
@@ -42,8 +42,10 @@
|
|
|
42
42
|
}
|
|
43
43
|
.text-message {
|
|
44
44
|
position: relative;
|
|
45
|
-
margin: 0 35px;
|
|
46
|
-
width: calc(100% - 70px);
|
|
45
|
+
// margin: 0 35px;
|
|
46
|
+
// width: calc(100% - 70px);
|
|
47
|
+
margin: 0 70px;
|
|
48
|
+
width: calc(100% - 100px);
|
|
47
49
|
ion-textarea {
|
|
48
50
|
// border-radius: 4px;
|
|
49
51
|
border-radius: 20px; // NK edited
|
|
@@ -65,6 +67,10 @@
|
|
|
65
67
|
font-size: 15px;
|
|
66
68
|
}
|
|
67
69
|
}
|
|
70
|
+
.text-message-no-cr {
|
|
71
|
+
margin: 0 35px !important;
|
|
72
|
+
width: calc(100% - 70px) !important;
|
|
73
|
+
}
|
|
68
74
|
}
|
|
69
75
|
|
|
70
76
|
#fileInput {
|
|
@@ -97,10 +103,52 @@
|
|
|
97
103
|
--border-radius: 50%;
|
|
98
104
|
--padding-end: 1px;
|
|
99
105
|
--padding-start: 1px;
|
|
106
|
+
height: 33px !important;
|
|
107
|
+
}
|
|
100
108
|
|
|
109
|
+
|
|
110
|
+
.canned-responses-btn {
|
|
111
|
+
--padding-bottom: 0px;
|
|
112
|
+
--padding-top: 0px;
|
|
113
|
+
--border-radius: 50%;
|
|
114
|
+
--padding-end: 2px;
|
|
115
|
+
--padding-start: 2px;
|
|
101
116
|
height: 33px !important;
|
|
117
|
+
width: 33px;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.no-canned-responses-btn-badge {
|
|
121
|
+
position: absolute;
|
|
122
|
+
font-size: 12px;
|
|
123
|
+
background-color: transparent;
|
|
124
|
+
border-radius: 50%;
|
|
125
|
+
padding: 1px 2px;
|
|
126
|
+
top: 4px;
|
|
127
|
+
color: red;
|
|
128
|
+
left: -3px;
|
|
129
|
+
cursor: pointer;
|
|
130
|
+
}
|
|
131
|
+
.no-canned-responses-btn-badge:hover {
|
|
132
|
+
background-color: rgba(0, 0, 0, 0.05);;
|
|
102
133
|
}
|
|
103
134
|
|
|
135
|
+
.canned-responses-btn-badge {
|
|
136
|
+
position: absolute;
|
|
137
|
+
font-size: 12px;
|
|
138
|
+
background-color: transparent;
|
|
139
|
+
border-radius: 50%;
|
|
140
|
+
padding: 1px 2px;
|
|
141
|
+
top: 4px;
|
|
142
|
+
color: #92949c;
|
|
143
|
+
left: -3px;
|
|
144
|
+
cursor: pointer;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.canned-responses-btn-badge:hover {
|
|
148
|
+
background-color: rgba(0, 0, 0, 0.05);;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
|
|
104
152
|
.upload-image-btn .button-native {
|
|
105
153
|
border-radius: 50%;
|
|
106
154
|
}
|
package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts
CHANGED
|
@@ -43,13 +43,15 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
43
43
|
@Input() loggedUser: UserModel;
|
|
44
44
|
@Input() conversationWith: string;
|
|
45
45
|
@Input() tagsCannedFilter: any = [];
|
|
46
|
-
|
|
46
|
+
@Input() tagsCannedCount: number;
|
|
47
|
+
@Input() areVisibleCAR: boolean;
|
|
47
48
|
@Input() events: Observable<void>;
|
|
48
49
|
@Input() fileUploadAccept: string
|
|
49
50
|
@Input() isOpenInfoConversation: boolean;
|
|
50
51
|
@Input() translationMap: Map<string, string>;
|
|
51
52
|
@Input() dropEvent: any;
|
|
52
53
|
@Output() eventChangeTextArea = new EventEmitter<object>();
|
|
54
|
+
@Output() hasClickedOpenCannedResponses = new EventEmitter<boolean>();
|
|
53
55
|
@Output() eventSendMessage = new EventEmitter<object>();
|
|
54
56
|
@Output() onPresentModalScrollToBottom = new EventEmitter<boolean>();
|
|
55
57
|
|
|
@@ -64,9 +66,21 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
64
66
|
public currentWindowWidth: any;
|
|
65
67
|
private logger: LoggerService = LoggerInstance.getInstance();
|
|
66
68
|
public countClicks: number = 0;
|
|
69
|
+
public IS_SUPPORT_GROUP_CONVERSATION: boolean;
|
|
67
70
|
|
|
68
71
|
TYPE_MSG_TEXT = TYPE_MSG_TEXT;
|
|
69
72
|
|
|
73
|
+
tooltipOptions = {
|
|
74
|
+
'show-delay': 500,
|
|
75
|
+
'tooltip-class': 'chat-tooltip',
|
|
76
|
+
'theme': 'light',
|
|
77
|
+
'shadow': false,
|
|
78
|
+
'hide-delay-mobile': 0,
|
|
79
|
+
'hideDelayAfterClick': 3000,
|
|
80
|
+
'hide-delay': 200
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
|
|
70
84
|
/**
|
|
71
85
|
* Constructor
|
|
72
86
|
* @param chooser
|
|
@@ -103,15 +117,25 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
103
117
|
|
|
104
118
|
|
|
105
119
|
ngOnChanges() {
|
|
106
|
-
|
|
107
120
|
if (this.translationMap) {
|
|
108
|
-
this.LONG_TEXAREA_PLACEHOLDER = this.translationMap.get('LABEL_ENTER_MSG')
|
|
109
|
-
this.SHORT_TEXAREA_PLACEHOLDER = this.translationMap.get('LABEL_ENTER_MSG_SHORT')
|
|
110
|
-
this.SHORTER_TEXAREA_PLACEHOLDER = this.translationMap.get('LABEL_ENTER_MSG_SHORTER')
|
|
121
|
+
// this.LONG_TEXAREA_PLACEHOLDER = this.translationMap.get('LABEL_ENTER_MSG')
|
|
122
|
+
// this.SHORT_TEXAREA_PLACEHOLDER = this.translationMap.get('LABEL_ENTER_MSG_SHORT')
|
|
123
|
+
// this.SHORTER_TEXAREA_PLACEHOLDER = this.translationMap.get('LABEL_ENTER_MSG_SHORTER')
|
|
124
|
+
|
|
125
|
+
this.TEXAREA_PLACEHOLDER = this.translationMap.get('LABEL_ENTER_MSG_SHORT')
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
if (this.conversationWith.startsWith("support-group")) {
|
|
129
|
+
this.IS_SUPPORT_GROUP_CONVERSATION = true
|
|
130
|
+
} else {
|
|
131
|
+
this.IS_SUPPORT_GROUP_CONVERSATION = false
|
|
111
132
|
}
|
|
112
133
|
|
|
113
134
|
this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges DROP EVENT ", this.dropEvent);
|
|
114
135
|
this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges tagsCannedFilter ", this.tagsCannedFilter);
|
|
136
|
+
this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges areVisibleCAR; ", this.areVisibleCAR);
|
|
137
|
+
|
|
138
|
+
|
|
115
139
|
this.logger.log('[CONVS-DETAIL] - returnChangeTextArea ngOnChanges in [MSG-TEXT-AREA] this.tagsCannedFilter.length ', this.tagsCannedFilter.length)
|
|
116
140
|
|
|
117
141
|
// use case drop
|
|
@@ -120,21 +144,20 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
120
144
|
}
|
|
121
145
|
// if (this.isOpenInfoConversation === true) {
|
|
122
146
|
// this.getIfTexareaIsEmpty('ngOnChanges')
|
|
123
|
-
this.getWindowWidth();
|
|
147
|
+
// this.getWindowWidth();
|
|
124
148
|
// }
|
|
125
149
|
}
|
|
126
150
|
|
|
127
151
|
// ngAfterViewInit() {
|
|
128
152
|
ngAfterViewInit() {
|
|
129
153
|
|
|
130
|
-
|
|
131
|
-
|
|
154
|
+
// console.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngAfterViewInit message_text_area ", this.message_text_area);
|
|
155
|
+
// console.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngAfterViewInit messageTextArea ", this.messageTextArea);
|
|
132
156
|
if (this.messageTextArea) {
|
|
133
157
|
setTimeout(() => {
|
|
134
158
|
|
|
135
|
-
|
|
136
159
|
const elTextArea = this.message_text_area['el'];
|
|
137
|
-
//
|
|
160
|
+
// console.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngAfterViewInit elTextArea ", elTextArea);
|
|
138
161
|
// this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngAfterViewInit elTextArea children", elTextArea.children);
|
|
139
162
|
if (elTextArea.children.length === 1) {
|
|
140
163
|
|
|
@@ -148,10 +171,8 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
148
171
|
}
|
|
149
172
|
}
|
|
150
173
|
|
|
151
|
-
|
|
152
174
|
// this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] set focus on ", this.messageTextArea);
|
|
153
175
|
// Keyboard.show() // for android
|
|
154
|
-
|
|
155
176
|
this.messageTextArea.setFocus();
|
|
156
177
|
|
|
157
178
|
}, 1500); //a least 150ms.
|
|
@@ -162,46 +183,19 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
162
183
|
getWindowWidth(): any {
|
|
163
184
|
this.currentWindowWidth = window.innerWidth;
|
|
164
185
|
|
|
165
|
-
// if ((this.currentWindowWidth < 1045 && this.currentWindowWidth > 835) && this.isOpenInfoConversation === true) {
|
|
166
|
-
// this.logger.log("[CONVS-DETAIL] [MSG-TEXT-AREA] DISPLAY SHORT_TEXAREA_PLACEHOLDER ");
|
|
167
|
-
// // this.TEXAREA_PLACEHOLDER = '';
|
|
168
|
-
// this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
|
|
169
|
-
// } else if (this.currentWindowWidth < 835 && this.isOpenInfoConversation === true) {
|
|
170
|
-
// this.logger.log("[CONVS-DETAIL] [MSG-TEXT-AREA] DISPLAY SHORTER_TEXAREA_PLACEHOLDER ");
|
|
171
|
-
|
|
172
186
|
|
|
187
|
+
// if (this.currentWindowWidth >= 844 && this.isOpenInfoConversation === false && this.conversationWith.startsWith("support-group")) {
|
|
188
|
+
// this.TEXAREA_PLACEHOLDER = this.LONG_TEXAREA_PLACEHOLDER;
|
|
189
|
+
// this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] currentWindowWidth', this.currentWindowWidth, ' - DISPLAY LONG_TEXAREA_PLACEHOLDER ');
|
|
190
|
+
// } else if (this.currentWindowWidth >= 844 && this.isOpenInfoConversation === true && this.conversationWith.startsWith("support-group")) {
|
|
191
|
+
// this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
|
|
192
|
+
// } else if (this.currentWindowWidth < 844 && this.isOpenInfoConversation === false && this.conversationWith.startsWith("support-group")) {
|
|
193
|
+
// this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
|
|
194
|
+
// } else if (this.currentWindowWidth < 844 && this.isOpenInfoConversation === true && this.conversationWith.startsWith("support-group")) {
|
|
173
195
|
// this.TEXAREA_PLACEHOLDER = this.SHORTER_TEXAREA_PLACEHOLDER;
|
|
174
|
-
//
|
|
175
|
-
|
|
176
|
-
// }
|
|
177
|
-
// this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] currentWindowWidth ", this.currentWindowWidth);
|
|
178
|
-
// this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] isOpenInfoConversation', this.isOpenInfoConversation);
|
|
179
|
-
// this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] this.conversationWith.startsWith("support-group")', this.conversationWith.startsWith("support-group"));
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
if (this.currentWindowWidth >= 844 && this.isOpenInfoConversation === false && this.conversationWith.startsWith("support-group")) {
|
|
183
|
-
|
|
184
|
-
this.TEXAREA_PLACEHOLDER = this.LONG_TEXAREA_PLACEHOLDER;
|
|
185
|
-
|
|
186
|
-
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] currentWindowWidth', this.currentWindowWidth, ' - DISPLAY LONG_TEXAREA_PLACEHOLDER ');
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
} else if (this.currentWindowWidth >= 844 && this.isOpenInfoConversation === true && this.conversationWith.startsWith("support-group")) {
|
|
190
|
-
this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
} else if (this.currentWindowWidth < 844 && this.isOpenInfoConversation === false && this.conversationWith.startsWith("support-group")) {
|
|
194
|
-
|
|
195
|
-
this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
|
|
196
|
-
|
|
197
|
-
} else if (this.currentWindowWidth < 844 && this.isOpenInfoConversation === true && this.conversationWith.startsWith("support-group")) {
|
|
198
|
-
|
|
199
|
-
this.TEXAREA_PLACEHOLDER = this.SHORTER_TEXAREA_PLACEHOLDER;
|
|
200
|
-
|
|
201
|
-
} else if (!this.conversationWith.startsWith("support-group")) {
|
|
202
|
-
this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
|
|
203
|
-
|
|
204
|
-
}
|
|
196
|
+
// } else if (!this.conversationWith.startsWith("support-group")) {
|
|
197
|
+
// this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
|
|
198
|
+
// }
|
|
205
199
|
|
|
206
200
|
// this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] checkPlatformIsMobile() ", checkPlatformIsMobile());
|
|
207
201
|
if (checkPlatformIsMobile() === true) {
|
|
@@ -212,13 +206,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
212
206
|
} else if (this.currentWindowWidth <= 273) {
|
|
213
207
|
this.TEXAREA_PLACEHOLDER = this.SHORTER_TEXAREA_PLACEHOLDER;
|
|
214
208
|
}
|
|
215
|
-
|
|
216
209
|
}
|
|
217
|
-
// if (checkPlatformIsMobile && this.currentWindowWidth <= 430) {
|
|
218
|
-
// this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
|
|
219
|
-
// } else if (checkPlatformIsMobile && this.currentWindowWidth > 430) {
|
|
220
|
-
// this.TEXAREA_PLACEHOLDER = this.LONG_TEXAREA_PLACEHOLDER;
|
|
221
|
-
// }
|
|
222
210
|
}
|
|
223
211
|
|
|
224
212
|
// -------------------------------------------------------------------------------------------
|
|
@@ -228,36 +216,20 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
228
216
|
onResize(event) {
|
|
229
217
|
// this.getIfTexareaIsEmpty('onResize')
|
|
230
218
|
this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] event.target.innerWidth; ", event.target.innerWidth);
|
|
231
|
-
|
|
232
|
-
// this.logger.log("[CONVS-DETAIL] [MSG-TEXT-AREA] ON RESIZE DISPAY SHORT_TEXAREA_PLACEHOLDER");
|
|
233
|
-
// this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
|
|
234
|
-
// } else if (event.target.innerWidth < 835 && this.isOpenInfoConversation === true) {
|
|
235
|
-
// this.TEXAREA_PLACEHOLDER = this.SHORTER_TEXAREA_PLACEHOLDER;
|
|
236
|
-
// } else {
|
|
237
|
-
// this.TEXAREA_PLACEHOLDER = this.LONG_TEXAREA_PLACEHOLDER;
|
|
238
|
-
|
|
219
|
+
|
|
239
220
|
|
|
240
|
-
if (event.target.innerWidth >= 844 && this.isOpenInfoConversation === false && this.conversationWith.startsWith("support-group")) {
|
|
241
|
-
this.TEXAREA_PLACEHOLDER = this.LONG_TEXAREA_PLACEHOLDER;
|
|
242
|
-
// this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] - else - DISPLAY LONG_TEXAREA_PLACEHOLDER ');
|
|
243
|
-
// this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] - else - this.currentWindowWidth ', this.currentWindowWidth);
|
|
244
221
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
} else if (event.target.innerWidth < 844 && this.isOpenInfoConversation === false && this.conversationWith.startsWith("support-group")) {
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
} else if (
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
} else if (!this.conversationWith.startsWith("support-group")) {
|
|
258
|
-
this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
|
|
259
|
-
|
|
260
|
-
}
|
|
222
|
+
// if (event.target.innerWidth >= 844 && this.isOpenInfoConversation === false && this.conversationWith.startsWith("support-group")) {
|
|
223
|
+
// this.TEXAREA_PLACEHOLDER = this.LONG_TEXAREA_PLACEHOLDER;
|
|
224
|
+
// } else if (event.target.innerWidth >= 844 && this.isOpenInfoConversation === true && this.conversationWith.startsWith("support-group")) {
|
|
225
|
+
// this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
|
|
226
|
+
// } else if (event.target.innerWidth < 844 && this.isOpenInfoConversation === false && this.conversationWith.startsWith("support-group")) {
|
|
227
|
+
// this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
|
|
228
|
+
// } else if (event.target.innerWidth < 844 && this.isOpenInfoConversation === true && this.conversationWith.startsWith("support-group")) {
|
|
229
|
+
// this.TEXAREA_PLACEHOLDER = this.SHORTER_TEXAREA_PLACEHOLDER;
|
|
230
|
+
// } else if (!this.conversationWith.startsWith("support-group")) {
|
|
231
|
+
// this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
|
|
232
|
+
// }
|
|
261
233
|
|
|
262
234
|
// this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] checkPlatformIsMobile() ', checkPlatformIsMobile());
|
|
263
235
|
if (checkPlatformIsMobile() === true) {
|
|
@@ -459,7 +431,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
459
431
|
// this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ionChange detail.value ", e.detail.value);
|
|
460
432
|
|
|
461
433
|
const message = e.detail.value
|
|
462
|
-
|
|
434
|
+
this.logger.log("[CONVS-DETAIL] [MSG-TEXT-AREA] ionChange message ", message);
|
|
463
435
|
// this.logger.log("[CONVS-DETAIL] [MSG-TEXT-AREA] ionChange this.messageString ", this.messageString);
|
|
464
436
|
const height = e.target.offsetHeight + 20; // nk added +20
|
|
465
437
|
// this.logger.log("[CONVS-DETAIL] [MSG-TEXT-AREA] ionChange text-area height ", height);
|
|
@@ -476,7 +448,6 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
476
448
|
this.conversationEnabled = false;
|
|
477
449
|
}
|
|
478
450
|
|
|
479
|
-
|
|
480
451
|
this.eventChangeTextArea.emit({ msg: message, offsetHeight: height });
|
|
481
452
|
}
|
|
482
453
|
|
|
@@ -530,7 +501,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
530
501
|
this.logger.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea SEND MESSAGE 2 message: ", message);
|
|
531
502
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - SEND MESSAGE 2 message value: ', message.value);
|
|
532
503
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - SEND MESSAGE 2 text: ', text);
|
|
533
|
-
|
|
504
|
+
|
|
534
505
|
this.logger.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea SEND MESSAGE 2 this.tagsCannedFilter.length: ", this.tagsCannedFilter.length);
|
|
535
506
|
this.logger.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea SEND MESSAGE 2 this.countClicks: ", this.countClicks);
|
|
536
507
|
this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown in msg-texarea SEND MESSAGE 2 this.countClicks: ", this.countClicks);
|
|
@@ -539,7 +510,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
539
510
|
|
|
540
511
|
this.sendMessage(text);
|
|
541
512
|
this.countClicks = 0
|
|
542
|
-
} else if (text.includes("/") && pos > 0 && this.countClicks > 1 && this.tagsCannedFilter.length > 0 && text.substr(-1) !== '/'
|
|
513
|
+
} else if (text.includes("/") && pos > 0 && this.countClicks > 1 && this.tagsCannedFilter.length > 0 && text.substr(-1) !== '/') {
|
|
543
514
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - tagsCannedFilter.length 3: ', this.tagsCannedFilter.length);
|
|
544
515
|
this.logger.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea SEND MESSAGE 3 message: ", message);
|
|
545
516
|
// this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - SEND MESSAGE 3 message value: ', message.value);
|
|
@@ -565,15 +536,34 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
565
536
|
}
|
|
566
537
|
}
|
|
567
538
|
}
|
|
539
|
+
openCannedResponses() {
|
|
540
|
+
// console.log('[MSG-TEXT-AREA] has clicked OPEN-CANNED-RESPONSES messageString ', this.messageString)
|
|
541
|
+
// if (this.messageString) {
|
|
542
|
+
// console.log('[MSG-TEXT-AREA] has clicked OPEN-CANNED-RESPONSES messageString.trim ', this.messageString.trim)
|
|
543
|
+
// }
|
|
544
|
+
// if (this.messageString === undefined) {
|
|
545
|
+
// this.messageString = '/'
|
|
546
|
+
// } else {
|
|
547
|
+
|
|
548
|
+
// }
|
|
549
|
+
|
|
550
|
+
// const elTextArea = this.message_text_area['el'];
|
|
551
|
+
// console.log('[MSG-TEXT-AREA] textArea elTextArea ', elTextArea)
|
|
552
|
+
// const textArea = elTextArea.getElementsByTagName('ion-textarea')[0];
|
|
553
|
+
// console.log("[MSG-TEXT-AREA] textArea textArea ", textArea);
|
|
554
|
+
// this.logger.log("[MSG-TEXT-AREA] textArea value", textArea.value)
|
|
555
|
+
|
|
556
|
+
this.hasClickedOpenCannedResponses.emit(true);
|
|
557
|
+
}
|
|
568
558
|
|
|
569
559
|
|
|
570
560
|
sendMessage(text: string) {
|
|
571
|
-
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] sendMessage', text);
|
|
561
|
+
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] sendMessage text', text);
|
|
572
562
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] sendMessage conve width', this.conversationWith);
|
|
573
563
|
// text.replace(/\s/g, "")
|
|
574
564
|
this.messageString = '';
|
|
575
565
|
// text = text.replace(/(\r\n|\n|\r)/gm, '');
|
|
576
|
-
if (text.trim() !== '') {
|
|
566
|
+
if (text && text.trim() !== '') {
|
|
577
567
|
this.eventSendMessage.emit({ message: text, type: TYPE_MSG_TEXT });
|
|
578
568
|
}
|
|
579
569
|
}
|
|
@@ -625,11 +615,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
625
615
|
|
|
626
616
|
// Note: on mac keyboard "metakey" matches "cmd"
|
|
627
617
|
if (event.key === 'Enter' && event.altKey || event.key === 'Enter' && event.ctrlKey || event.key === 'Enter' && event.metaKey) {
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
618
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] HAS PRESSED COMBO KEYS this.messageString', this.messageString);
|
|
632
|
-
|
|
633
619
|
if (this.messageString !== undefined && this.messageString.trim() !== '') {
|
|
634
620
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] HAS PRESSED Enter + ALT this.messageString', this.messageString);
|
|
635
621
|
this.messageString = this.messageString + "\r\n"
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
text-decoration: none;
|
|
71
71
|
cursor: pointer;
|
|
72
72
|
svg {
|
|
73
|
-
fill: rgba(255,255,255);
|
|
73
|
+
fill: rgba(255,255,255, 1);
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
text-decoration: none;
|
|
96
96
|
cursor: pointer;
|
|
97
97
|
svg {
|
|
98
|
-
fill: rgba(255,255,255);
|
|
98
|
+
fill: rgba(255,255,255, 1);
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
|