@chat21/chat21-ionic 3.0.82-rc.7 → 3.0.82
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 +5 -99
- package/README.md +2 -2
- package/package.json +3 -4
- package/src/app/app.component.html +1 -7
- package/src/app/app.component.scss +2 -20
- package/src/app/app.component.ts +18 -129
- package/src/app/app.module.ts +1 -3
- package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.ts +1 -8
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +23 -77
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +88 -171
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +2 -40
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +24 -11
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.scss +10 -6
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.spec.ts +2 -2
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +25 -16
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.html +1 -5
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.scss +15 -22
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.ts +5 -25
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.html +1 -2
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.scss +15 -14
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.ts +5 -24
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.html +1 -6
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.scss +13 -12
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.ts +5 -26
- package/src/app/chatlib/conversation-detail/message/frame/frame.component.html +2 -8
- package/src/app/chatlib/conversation-detail/message/frame/frame.component.scss +0 -36
- package/src/app/chatlib/conversation-detail/message/frame/frame.component.ts +2 -2
- package/src/app/chatlib/conversation-detail/message/html/html.component.ts +1 -0
- package/src/app/chatlib/conversation-detail/message/image/image.component.html +2 -3
- package/src/app/chatlib/conversation-detail/message/image/image.component.scss +5 -17
- 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 +2 -3
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.html +6 -16
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.scss +3 -1
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.ts +0 -2
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +52 -78
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.scss +20 -63
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +10 -14
- package/src/app/components/canned-response/canned-response.component.html +9 -9
- package/src/app/components/canned-response/canned-response.component.scss +7 -14
- package/src/app/components/canned-response/canned-response.component.ts +1 -1
- package/src/app/components/contacts-directory/contacts-directory.component.html +26 -22
- package/src/app/components/contacts-directory/contacts-directory.component.scss +6 -8
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.html +3 -0
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.scss +21 -0
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.spec.ts +24 -0
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.ts +14 -0
- package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.html +54 -0
- package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.scss +98 -0
- package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.spec.ts → conversation-detail/bubble-my-message/bubble-my-message.component.spec.ts} +6 -6
- package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.ts +84 -0
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.html +30 -0
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.scss +83 -0
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.spec.ts +24 -0
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.ts +68 -0
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.html +3 -0
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.scss +10 -0
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.spec.ts +24 -0
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.ts +14 -0
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +42 -61
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +61 -98
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +25 -9
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +8 -17
- 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 +84 -24
- package/src/app/components/conversation-detail/option-header/option-header.component.html +13 -0
- package/src/app/components/conversation-detail/option-header/option-header.component.scss +0 -0
- package/src/app/components/{conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.spec.ts → conversation-detail/option-header/option-header.component.spec.ts} +5 -5
- package/src/app/components/{conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.ts → conversation-detail/option-header/option-header.component.ts} +4 -5
- package/src/app/components/conversation-info/info-content/info-content.component.html +4 -8
- package/src/app/components/conversation-info/info-content/info-content.component.ts +6 -3
- package/src/app/components/conversation-info/info-direct/info-direct.component.html +13 -7
- package/src/app/components/conversation-info/info-direct/info-direct.component.scss +0 -23
- package/src/app/components/conversation-info/info-direct/info-direct.component.ts +6 -1
- package/src/app/components/conversation-info/info-group/info-group.component.html +108 -44
- package/src/app/components/conversation-info/info-group/info-group.component.scss +61 -101
- package/src/app/components/conversation-info/info-group/info-group.component.ts +0 -1
- package/src/app/components/conversation-info/info-support-group/info-support-group.component.html +1 -2
- package/src/app/components/conversation-info/info-support-group/info-support-group.component.ts +1 -0
- package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.html → ddp-header/ddp-header.component.html} +3 -3
- package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.scss → ddp-header/ddp-header.component.scss} +4 -16
- package/src/app/components/{navbar/navbar.component.spec.ts → ddp-header/ddp-header.component.spec.ts} +6 -6
- package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.ts → ddp-header/ddp-header.component.ts} +16 -7
- package/src/app/components/project-item/project-item.component.html +149 -98
- package/src/app/components/project-item/project-item.component.scss +35 -43
- package/src/app/components/project-item/project-item.component.ts +4 -16
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +5 -5
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +10 -23
- package/src/app/components/utils/user-presence/user-presence.component.html +2 -7
- package/src/app/components/utils/user-presence/user-presence.component.scss +18 -35
- package/src/app/components/utils/user-presence/user-presence.component.ts +10 -6
- package/src/app/pages/contacts-directory/contacts-directory.page.html +1 -1
- package/src/app/pages/contacts-directory/contacts-directory.page.scss +0 -47
- package/src/app/pages/contacts-directory/contacts-directory.page.ts +0 -2
- package/src/app/pages/conversation-detail/conversation-detail.module.ts +8 -0
- package/src/app/pages/conversation-detail/conversation-detail.page.html +23 -41
- package/src/app/pages/conversation-detail/conversation-detail.page.scss +250 -40
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +112 -186
- package/src/app/pages/conversations-list/conversations-list.page.html +8 -11
- package/src/app/pages/conversations-list/conversations-list.page.scss +2 -18
- package/src/app/pages/conversations-list/conversations-list.page.ts +22 -25
- package/src/app/pages/create-canned-response/create-canned-response.page.ts +13 -13
- package/src/app/pages/loader-preview/loader-preview.page.html +1 -1
- package/src/app/pages/loader-preview/loader-preview.page.scss +0 -4
- package/src/app/pages/loader-preview/loader-preview.page.ts +2 -1
- package/src/app/pages/profile-info/profile-info.page.html +4 -2
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.html +1 -1
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.scss +0 -42
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.ts +0 -1
- package/src/app/services/canned-responses/canned-responses.service.ts +0 -26
- package/src/app/services/tiledesk/tiledesk.service.ts +25 -1
- package/src/app/services/websocket/websocket.service.ts +1 -1
- package/src/app/shared/shared.module.ts +33 -24
- package/src/assets/i18n/ar.json +265 -278
- package/src/assets/i18n/az.json +1 -14
- package/src/assets/i18n/de.json +2 -15
- package/src/assets/i18n/en.json +2 -15
- package/src/assets/i18n/es.json +2 -15
- package/src/assets/i18n/fr.json +1 -14
- package/src/assets/i18n/it.json +1 -14
- package/src/assets/i18n/kk.json +2 -15
- package/src/assets/i18n/pt.json +2 -15
- package/src/assets/i18n/ru.json +1 -14
- package/src/assets/i18n/sr.json +264 -277
- package/src/assets/i18n/sv.json +2 -15
- package/src/assets/i18n/tr.json +2 -15
- package/src/assets/i18n/uk.json +2 -15
- package/src/assets/i18n/uz.json +1 -14
- package/src/assets/js/chat21client.js +148 -175
- package/src/chat-config-mqtt-localhost.json +2 -2
- package/src/chat-config-native-mqtt.json +0 -3
- package/src/chat21-core/models/conversation.ts +1 -0
- package/src/chat21-core/providers/firebase/firebase-typing.service.ts +9 -7
- package/src/chat21-core/providers/mqtt/mqtt-auth-service.ts +8 -7
- package/src/chat21-core/utils/constants.ts +1 -6
- package/src/chat21-core/utils/user-typing/user-typing.component.html +5 -8
- package/src/chat21-core/utils/user-typing/user-typing.component.scss +17 -87
- package/src/chat21-core/utils/user-typing/user-typing.component.ts +94 -12
- package/src/chat21-core/utils/utils.ts +10 -38
- package/src/global.scss +255 -52
- package/src/index.html +9 -0
- package/src/variables.scss +10 -30
- package/deploy_amazon_beta.sh +0 -29
- package/deploy_amazon_prod.sh +0 -30
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component_2.html +0 -116
- package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.html +0 -12
- package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.scss +0 -14
- package/src/app/components/navbar/navbar.component.html +0 -103
- package/src/app/components/navbar/navbar.component.scss +0 -249
- package/src/app/components/navbar/navbar.component.ts +0 -190
- package/src/app/services/projects/projects.service.spec.ts +0 -12
- package/src/app/services/projects/projects.service.ts +0 -43
- package/src/assets/sounds/interface-start.mp3 +0 -0
- package/src/assets/sounds/wheep-wheep.mp3 +0 -0
- package/src/chat21-core/models/projects.ts +0 -27
- package/src/chat21-core/utils/convertRequestToConversation.ts +0 -41
package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { LoaderPreviewPage } from 'src/app/pages/loader-preview/loader-preview.p
|
|
|
9
9
|
// Services
|
|
10
10
|
import { UploadService } from 'src/chat21-core/providers/abstract/upload.service';
|
|
11
11
|
// utils
|
|
12
|
-
import { TYPE_MSG_TEXT
|
|
12
|
+
import { TYPE_MSG_TEXT } from 'src/chat21-core/utils/constants';
|
|
13
13
|
// Models
|
|
14
14
|
import { UploadModel } from 'src/chat21-core/models/upload';
|
|
15
15
|
import { Observable } from 'rxjs';
|
|
@@ -62,11 +62,15 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
62
62
|
public messageString: string;
|
|
63
63
|
public HAS_PASTED: boolean = false;
|
|
64
64
|
public toastMsg: string;
|
|
65
|
+
public TEXAREA_PLACEHOLDER: string;
|
|
66
|
+
public LONG_TEXAREA_PLACEHOLDER: string;
|
|
67
|
+
public SHORT_TEXAREA_PLACEHOLDER: string;
|
|
68
|
+
public SHORTER_TEXAREA_PLACEHOLDER: string;
|
|
69
|
+
public currentWindowWidth: any;
|
|
65
70
|
private logger: LoggerService = LoggerInstance.getInstance();
|
|
66
71
|
public countClicks: number = 0;
|
|
72
|
+
public IS_SUPPORT_GROUP_CONVERSATION: boolean;
|
|
67
73
|
public IS_ON_MOBILE_DEVICE: boolean;
|
|
68
|
-
|
|
69
|
-
TYPE_SUPPORT_GROUP = TYPE_SUPPORT_GROUP;
|
|
70
74
|
TYPE_MSG_TEXT = TYPE_MSG_TEXT;
|
|
71
75
|
msg: string
|
|
72
76
|
|
|
@@ -84,26 +88,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
84
88
|
addWhiteSpaceBefore: boolean;
|
|
85
89
|
emojiPerLine: number = 9
|
|
86
90
|
emojiColor: string ="#3880ff"
|
|
87
|
-
emojiiCategories = [ 'recent', 'people', 'nature', 'activity']
|
|
88
|
-
|
|
89
|
-
customEmojis = [
|
|
90
|
-
{
|
|
91
|
-
name: 'Customer-Service',
|
|
92
|
-
shortNames: ['customer'],
|
|
93
|
-
text: 'ee',
|
|
94
|
-
emoticons: [],
|
|
95
|
-
keywords: ['github'],
|
|
96
|
-
imageUrl: 'https://tiledesk.com/wp-content/uploads/2022/11/Customer-Service.png',
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
name: 'Octocat',
|
|
100
|
-
shortNames: ['octocat'],
|
|
101
|
-
text: 'rr',
|
|
102
|
-
emoticons: [],
|
|
103
|
-
keywords: ['github'],
|
|
104
|
-
imageUrl: 'https://tiledesk.com/wp-content/uploads/2022/11/FAQ-Chatbot.png',
|
|
105
|
-
}
|
|
106
|
-
];
|
|
91
|
+
emojiiCategories = [ 'recent', 'people', 'nature', 'activity']
|
|
107
92
|
/**
|
|
108
93
|
* Constructor
|
|
109
94
|
* @param chooser
|
|
@@ -132,8 +117,15 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
132
117
|
if (this.areVisibleCAR === false) {
|
|
133
118
|
this.emojiPerLine = 7
|
|
134
119
|
}
|
|
120
|
+
// this.events.subscribe((cannedmessage) => {
|
|
121
|
+
// this.logger.log("[CONVS-DETAIL] [MSG-TEXT-AREA] events.subscribe cannedmessage ", cannedmessage);
|
|
122
|
+
// })
|
|
135
123
|
|
|
124
|
+
// this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] LONG_TEXAREA_PLACEHOLDER ", this.LONG_TEXAREA_PLACEHOLDER);
|
|
125
|
+
// this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] SHORT_TEXAREA_PLACEHOLDER ", this.SHORT_TEXAREA_PLACEHOLDER);
|
|
126
|
+
// this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] SHORTER_TEXAREA_PLACEHOLDER ", this.SHORTER_TEXAREA_PLACEHOLDER);
|
|
136
127
|
this.listenToNewCannedResponseCreated()
|
|
128
|
+
this.getWindowWidth();
|
|
137
129
|
this.isOnMobileDevice()
|
|
138
130
|
}
|
|
139
131
|
|
|
@@ -154,8 +146,15 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
154
146
|
// this.SHORT_TEXAREA_PLACEHOLDER = this.translationMap.get('LABEL_ENTER_MSG_SHORT')
|
|
155
147
|
// this.SHORTER_TEXAREA_PLACEHOLDER = this.translationMap.get('LABEL_ENTER_MSG_SHORTER')
|
|
156
148
|
|
|
149
|
+
this.TEXAREA_PLACEHOLDER = this.translationMap.get('LABEL_ENTER_MSG_SHORT')
|
|
150
|
+
|
|
157
151
|
}
|
|
158
152
|
|
|
153
|
+
if (this.conversationWith.startsWith("support-group")) {
|
|
154
|
+
this.IS_SUPPORT_GROUP_CONVERSATION = true
|
|
155
|
+
} else {
|
|
156
|
+
this.IS_SUPPORT_GROUP_CONVERSATION = false
|
|
157
|
+
}
|
|
159
158
|
// this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges supportMode ', this.supportMode)
|
|
160
159
|
// this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges disableTextarea ', this.disableTextarea)
|
|
161
160
|
// this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges DROP EVENT ", this.dropEvent);
|
|
@@ -206,6 +205,36 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
206
205
|
}
|
|
207
206
|
}
|
|
208
207
|
|
|
208
|
+
|
|
209
|
+
getWindowWidth(): any {
|
|
210
|
+
this.currentWindowWidth = window.innerWidth;
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
// if (this.currentWindowWidth >= 844 && this.isOpenInfoConversation === false && this.conversationWith.startsWith("support-group")) {
|
|
214
|
+
// this.TEXAREA_PLACEHOLDER = this.LONG_TEXAREA_PLACEHOLDER;
|
|
215
|
+
// this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] currentWindowWidth', this.currentWindowWidth, ' - DISPLAY LONG_TEXAREA_PLACEHOLDER ');
|
|
216
|
+
// } else if (this.currentWindowWidth >= 844 && this.isOpenInfoConversation === true && this.conversationWith.startsWith("support-group")) {
|
|
217
|
+
// this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
|
|
218
|
+
// } else if (this.currentWindowWidth < 844 && this.isOpenInfoConversation === false && this.conversationWith.startsWith("support-group")) {
|
|
219
|
+
// this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
|
|
220
|
+
// } else if (this.currentWindowWidth < 844 && this.isOpenInfoConversation === true && this.conversationWith.startsWith("support-group")) {
|
|
221
|
+
// this.TEXAREA_PLACEHOLDER = this.SHORTER_TEXAREA_PLACEHOLDER;
|
|
222
|
+
// } else if (!this.conversationWith.startsWith("support-group")) {
|
|
223
|
+
// this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
|
|
224
|
+
// }
|
|
225
|
+
|
|
226
|
+
// this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] checkPlatformIsMobile() ", checkPlatformIsMobile());
|
|
227
|
+
if (checkPlatformIsMobile() === true) {
|
|
228
|
+
|
|
229
|
+
if (this.currentWindowWidth <= 430 && this.currentWindowWidth >= 274) {
|
|
230
|
+
this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
|
|
231
|
+
|
|
232
|
+
} else if (this.currentWindowWidth <= 273) {
|
|
233
|
+
this.TEXAREA_PLACEHOLDER = this.SHORTER_TEXAREA_PLACEHOLDER;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
209
238
|
// -------------------------------------------------------------------------------------------
|
|
210
239
|
// Change the placeholder of the 'send message' textarea according to the width of the window
|
|
211
240
|
// -------------------------------------------------------------------------------------------
|
|
@@ -213,6 +242,37 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
213
242
|
onResize(event) {
|
|
214
243
|
// this.getIfTexareaIsEmpty('onResize')
|
|
215
244
|
// console.log("[CONVS-DETAIL][MSG-TEXT-AREA] event.target.innerWidth; ", event.target.innerWidth);
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
// if (event.target.innerWidth >= 844 && this.isOpenInfoConversation === false && this.conversationWith.startsWith("support-group")) {
|
|
249
|
+
// this.TEXAREA_PLACEHOLDER = this.LONG_TEXAREA_PLACEHOLDER;
|
|
250
|
+
// } else if (event.target.innerWidth >= 844 && this.isOpenInfoConversation === true && this.conversationWith.startsWith("support-group")) {
|
|
251
|
+
// this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
|
|
252
|
+
// } else if (event.target.innerWidth < 844 && this.isOpenInfoConversation === false && this.conversationWith.startsWith("support-group")) {
|
|
253
|
+
// this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
|
|
254
|
+
// } else if (event.target.innerWidth < 844 && this.isOpenInfoConversation === true && this.conversationWith.startsWith("support-group")) {
|
|
255
|
+
// this.TEXAREA_PLACEHOLDER = this.SHORTER_TEXAREA_PLACEHOLDER;
|
|
256
|
+
// } else if (!this.conversationWith.startsWith("support-group")) {
|
|
257
|
+
// this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
|
|
258
|
+
// }
|
|
259
|
+
|
|
260
|
+
// this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] checkPlatformIsMobile() ', checkPlatformIsMobile());
|
|
261
|
+
if (checkPlatformIsMobile() === true) {
|
|
262
|
+
|
|
263
|
+
if (event.target.innerWidth <= 430 && event.target.innerWidth >= 274) {
|
|
264
|
+
this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
|
|
265
|
+
} else if (this.currentWindowWidth <= 273) {
|
|
266
|
+
this.TEXAREA_PLACEHOLDER = this.SHORTER_TEXAREA_PLACEHOLDER;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
// if (checkPlatformIsMobile && event.target.innerWidth <= 430) {
|
|
272
|
+
// this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
|
|
273
|
+
// } else if (checkPlatformIsMobile && event.target.innerWidth > 430) {
|
|
274
|
+
// this.TEXAREA_PLACEHOLDER = this.LONG_TEXAREA_PLACEHOLDER;
|
|
275
|
+
// }
|
|
216
276
|
}
|
|
217
277
|
|
|
218
278
|
|
|
@@ -636,7 +696,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
636
696
|
|
|
637
697
|
@HostListener('document:keydown', ['$event'])
|
|
638
698
|
handleKeyboardEvent(event: KeyboardEvent) {
|
|
639
|
-
|
|
699
|
+
this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] handleKeyboardEvent event.key ", event);
|
|
640
700
|
// Note: on mac keyboard "metakey" matches "cmd"
|
|
641
701
|
|
|
642
702
|
if (event.key === 'Enter' && event.altKey || event.key === 'Enter' && event.ctrlKey || event.key === 'Enter' && event.metaKey) {
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
2
|
import { IonicModule } from '@ionic/angular';
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { OptionHeaderComponent } from './option-header.component';
|
|
5
5
|
|
|
6
6
|
describe('OptionHeaderComponent', () => {
|
|
7
|
-
let component:
|
|
8
|
-
let fixture: ComponentFixture<
|
|
7
|
+
let component: OptionHeaderComponent;
|
|
8
|
+
let fixture: ComponentFixture<OptionHeaderComponent>;
|
|
9
9
|
|
|
10
10
|
beforeEach(async(() => {
|
|
11
11
|
TestBed.configureTestingModule({
|
|
12
|
-
declarations: [
|
|
12
|
+
declarations: [ OptionHeaderComponent ],
|
|
13
13
|
imports: [IonicModule.forRoot()]
|
|
14
14
|
}).compileComponents();
|
|
15
15
|
|
|
16
|
-
fixture = TestBed.createComponent(
|
|
16
|
+
fixture = TestBed.createComponent(OptionHeaderComponent);
|
|
17
17
|
component = fixture.componentInstance;
|
|
18
18
|
fixture.detectChanges();
|
|
19
19
|
}));
|
|
@@ -2,14 +2,13 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
@Component({
|
|
5
|
-
selector: '
|
|
6
|
-
templateUrl: './header
|
|
7
|
-
styleUrls: ['./header
|
|
5
|
+
selector: 'app-option-header',
|
|
6
|
+
templateUrl: './option-header.component.html',
|
|
7
|
+
styleUrls: ['./option-header.component.scss'],
|
|
8
8
|
})
|
|
9
|
-
export class
|
|
9
|
+
export class OptionHeaderComponent implements OnInit {
|
|
10
10
|
|
|
11
11
|
@Input() headerTitle: string
|
|
12
|
-
@Input() isMobile: boolean;
|
|
13
12
|
@Output() onBackButton = new EventEmitter<boolean>();
|
|
14
13
|
static UserPresenceComponent: any[] | any;
|
|
15
14
|
|
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
<ion-content [style.display]="openInfoConversation ? 'block' : 'none'">
|
|
2
2
|
|
|
3
|
-
<app-info-direct
|
|
4
|
-
[style.display]="panelType === 'direct-panel' ? 'content' : 'none'"
|
|
3
|
+
<app-info-direct *ngIf="panelType === 'direct-panel'"
|
|
5
4
|
[member]=member
|
|
6
5
|
[translationMap]=translationMap
|
|
7
6
|
[conversationWith]= "conversationWith">
|
|
8
7
|
</app-info-direct>
|
|
9
8
|
|
|
10
|
-
<app-info-group
|
|
11
|
-
[
|
|
12
|
-
[groupDetail]="groupDetail"
|
|
13
|
-
[isMobile]="isMobile">
|
|
9
|
+
<app-info-group *ngIf="panelType === 'group-panel' && IS_GROUP_PANEL === true"
|
|
10
|
+
[groupDetail]="groupDetail">
|
|
14
11
|
</app-info-group>
|
|
15
12
|
|
|
16
|
-
<app-info-support-group
|
|
17
|
-
[style.display]="panelType === 'support-group-panel' ? 'block' : 'none'"
|
|
13
|
+
<app-info-support-group *ngIf="panelType === 'support-group-panel'"
|
|
18
14
|
[urlConversationSupportGroup]="urlConversationSupportGroup">
|
|
19
15
|
</app-info-support-group>
|
|
20
16
|
|
|
@@ -28,12 +28,11 @@ import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance'
|
|
|
28
28
|
|
|
29
29
|
export class InfoContentComponent implements OnInit {
|
|
30
30
|
@Input() openInfoConversation: boolean;
|
|
31
|
+
@Input() translationMap: Map<string, string>;
|
|
31
32
|
// @Input() member: UserModel;
|
|
32
33
|
@Input() loggedUser: UserModel
|
|
33
34
|
@Input() tenant: string
|
|
34
|
-
@Input() groupDetail: any
|
|
35
|
-
@Input() isMobile: boolean;
|
|
36
|
-
@Input() translationMap: Map<string, string>;
|
|
35
|
+
@Input() groupDetail: any
|
|
37
36
|
|
|
38
37
|
|
|
39
38
|
public member: UserModel;
|
|
@@ -63,6 +62,9 @@ export class InfoContentComponent implements OnInit {
|
|
|
63
62
|
public tiledeskService: TiledeskService
|
|
64
63
|
|
|
65
64
|
) {
|
|
65
|
+
this.logger.log('[INFO-CONTENT-COMP] HELLO (CONSTUCTOR) !!!!!');
|
|
66
|
+
// this.loggedUser = this.authService.getCurrentUser();
|
|
67
|
+
// this.logger.log('INFO-CONTENT-COMP loggedUser: ', this.loggedUser);
|
|
66
68
|
|
|
67
69
|
const appconfig = appConfigProvider.getConfig()
|
|
68
70
|
// this.tenant = appconfig.tenant;
|
|
@@ -73,6 +75,7 @@ export class InfoContentComponent implements OnInit {
|
|
|
73
75
|
this.route.paramMap.subscribe(params => {
|
|
74
76
|
this.logger.log('[INFO-CONTENT-COMP] initialize params: ', params);
|
|
75
77
|
this.conversationWith = params.get('IDConv');
|
|
78
|
+
this.logger.log('[INFO-CONTENT-COMP] - paramMap.subscribe conversationWith: ', this.conversationWith);
|
|
76
79
|
this.conversationWithFullname = params.get('FullNameConv');
|
|
77
80
|
this.conv_type = params.get('Convtype');
|
|
78
81
|
|
|
@@ -8,7 +8,15 @@
|
|
|
8
8
|
<div class="image-profile">
|
|
9
9
|
<app-avatar-profile [itemAvatar]='member'></app-avatar-profile>
|
|
10
10
|
</div>
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
<div class="user-presence">
|
|
13
|
+
<app-user-presence
|
|
14
|
+
[idUser]='member.uid'
|
|
15
|
+
[translationMap]='translationMap'
|
|
16
|
+
[borderColor]='borderColor'
|
|
17
|
+
[fontColor]='fontColor'>
|
|
18
|
+
</app-user-presence>
|
|
19
|
+
</div>
|
|
12
20
|
<!-- -> {{member |json}} -->
|
|
13
21
|
<div class="info-profile">
|
|
14
22
|
<div class="name">
|
|
@@ -29,12 +37,10 @@
|
|
|
29
37
|
|
|
30
38
|
|
|
31
39
|
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
</app-advanced-info-accordion>
|
|
37
|
-
</div>
|
|
40
|
+
<app-advanced-info-accordion
|
|
41
|
+
[advancedAttributes]="advancedAttributes"
|
|
42
|
+
[translationMap]="translationMap">
|
|
43
|
+
</app-advanced-info-accordion>
|
|
38
44
|
|
|
39
45
|
|
|
40
46
|
</ion-content>
|
|
@@ -59,27 +59,4 @@
|
|
|
59
59
|
.member-email {
|
|
60
60
|
text-align: center;
|
|
61
61
|
margin-top: 8px;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.info-accordion-container{
|
|
65
|
-
margin-left: 8px !important;
|
|
66
|
-
margin-right: 8px !important;
|
|
67
|
-
|
|
68
|
-
margin-top: 12px !important;
|
|
69
|
-
background-color: #fff;
|
|
70
|
-
border-radius: 4px;
|
|
71
|
-
box-shadow: rgba(0, 27, 71, 0.08) 0px 3px;
|
|
72
|
-
|
|
73
|
-
display: flex;
|
|
74
|
-
.info-accordion{
|
|
75
|
-
padding: 16px 12px !important;
|
|
76
|
-
cursor: pointer;
|
|
77
|
-
position: relative;
|
|
78
|
-
transition: all 0.2s ease-in-out 0s;
|
|
79
|
-
|
|
80
|
-
&:hover{
|
|
81
|
-
background-color: #f5f7f9;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
62
|
}
|
|
@@ -15,6 +15,8 @@ export class InfoDirectComponent implements OnInit, AfterViewInit, OnChanges {
|
|
|
15
15
|
@Input() translationMap: Map<string, string>;
|
|
16
16
|
@Input() conversationWith: string;
|
|
17
17
|
|
|
18
|
+
borderColor = '#ffffff';
|
|
19
|
+
fontColor = '#949494';
|
|
18
20
|
advancedAttributes: Array<any> = [];
|
|
19
21
|
private logger: LoggerService = LoggerInstance.getInstance();
|
|
20
22
|
|
|
@@ -26,6 +28,8 @@ export class InfoDirectComponent implements OnInit, AfterViewInit, OnChanges {
|
|
|
26
28
|
|
|
27
29
|
ngOnInit() {
|
|
28
30
|
this.logger.log('InfoDirectComponent - ngOnInit');
|
|
31
|
+
|
|
32
|
+
this.initialize();
|
|
29
33
|
}
|
|
30
34
|
|
|
31
35
|
ngAfterViewInit() {
|
|
@@ -39,11 +43,12 @@ export class InfoDirectComponent implements OnInit, AfterViewInit, OnChanges {
|
|
|
39
43
|
this.logger.log('InfoDirectComponent - ngOnDestroy ' );
|
|
40
44
|
// this.unsubscribe$.next();
|
|
41
45
|
// this.unsubscribe$.complete();
|
|
46
|
+
|
|
47
|
+
|
|
42
48
|
}
|
|
43
49
|
|
|
44
50
|
ngOnChanges(){
|
|
45
51
|
if(this.member){
|
|
46
|
-
this.initialize();
|
|
47
52
|
this.member.imageurl = this.imageRepoService.getImagePhotoUrl(this.conversationWith)
|
|
48
53
|
}
|
|
49
54
|
}
|
|
@@ -1,51 +1,115 @@
|
|
|
1
1
|
<!-- <pre style="font-size: 12px;"> {{ groupDetail | json }} </pre> -->
|
|
2
2
|
|
|
3
3
|
<ion-content class="group-profile">
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
</div>
|
|
4
|
+
<ion-card class="first-card">
|
|
5
|
+
<div class="chat21-box-profile chat21-box">
|
|
6
|
+
<div class="chat21-content">
|
|
7
|
+
<div class="image-profile">
|
|
8
|
+
<app-avatar-profile [itemAvatar]="groupDetail"></app-avatar-profile>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<div class="info-profile">
|
|
12
|
+
<div class="name">
|
|
13
|
+
<span class="read">{{groupDetail?.name}}</span>
|
|
15
14
|
</div>
|
|
16
15
|
</div>
|
|
17
|
-
|
|
16
|
+
<!-- <div class="member-email">
|
|
17
|
+
<a [href]="'mailto:' + member.email + '?Subject='">
|
|
18
|
+
{{member.email}}
|
|
19
|
+
</a>
|
|
20
|
+
</div> -->
|
|
18
21
|
</div>
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
<ion-item lines="none" *ngFor="let fake of generateFake(membersObjectLength)" style="margin-left:-3px">
|
|
23
|
-
<ion-avatar slot="start">
|
|
24
|
-
<ion-skeleton-text animated style="width: 44px; height: 44px;"></ion-skeleton-text>
|
|
25
|
-
</ion-avatar>
|
|
26
|
-
<ion-label>
|
|
27
|
-
<h3>
|
|
28
|
-
<ion-skeleton-text animated style="width: 60%;position: relative;top: 2px;height: 16px;"></ion-skeleton-text>
|
|
29
|
-
</h3>
|
|
30
|
-
</ion-label>
|
|
31
|
-
</ion-item>
|
|
32
|
-
</ion-list>
|
|
33
|
-
|
|
34
|
-
<!-- <pre style="font-size: 8px;"> {{member_array | json }} </pre> <pre style="font-size: 8px;"> {{displaySkeletonScreen}} </pre> -->
|
|
35
|
-
<ion-list id="members-list" *ngIf="groupDetail?.member_array?.length > 0 && !displaySkeletonScreen">
|
|
36
|
-
<ion-item lines="none" *ngFor='let member of groupDetail?.member_array'>
|
|
37
|
-
<ion-avatar slot="start" style="margin-right: 12px;">
|
|
38
|
-
<app-avatar-profile [itemAvatar]=member></app-avatar-profile>
|
|
39
|
-
<div class="status-icon-container" [class.mobile]="isMobile" >
|
|
40
|
-
<svg xmlns="http://www.w3.org/2000/svg" [class.online]="(member?.userOnline)" height="15" width="15" viewBox="0 0 24 24" fill="#000000"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>
|
|
41
|
-
</div>
|
|
42
|
-
</ion-avatar>
|
|
43
|
-
<ion-label>
|
|
44
|
-
<h3>
|
|
45
|
-
{{ member.fullname }}
|
|
46
|
-
</h3>
|
|
47
|
-
</ion-label>
|
|
48
|
-
</ion-item>
|
|
49
|
-
</ion-list>
|
|
22
|
+
|
|
23
|
+
</div>
|
|
24
|
+
</ion-card>
|
|
50
25
|
|
|
51
|
-
|
|
26
|
+
<ion-list id="fake-members-list" *ngIf="displaySkeletonScreen">
|
|
27
|
+
<ion-item lines="none" *ngFor="let fake of generateFake(membersObjectLength)" style="margin-left:-3px">
|
|
28
|
+
<ion-avatar slot="start">
|
|
29
|
+
<ion-skeleton-text animated style="width: 44px; height: 44px;"></ion-skeleton-text>
|
|
30
|
+
</ion-avatar>
|
|
31
|
+
<ion-label>
|
|
32
|
+
<h3>
|
|
33
|
+
<ion-skeleton-text animated style="width: 60%;position: relative;top: 2px;height: 16px;"></ion-skeleton-text>
|
|
34
|
+
</h3>
|
|
35
|
+
</ion-label>
|
|
36
|
+
</ion-item>
|
|
37
|
+
</ion-list>
|
|
38
|
+
|
|
39
|
+
<!-- <pre style="font-size: 8px;"> {{member_array | json }} </pre> <pre style="font-size: 8px;"> {{displaySkeletonScreen}} </pre> -->
|
|
40
|
+
<ion-list id="members-list" *ngIf="groupDetail?.member_array?.length > 0 && !displaySkeletonScreen">
|
|
41
|
+
<ion-item lines="none" *ngFor='let member of groupDetail?.member_array'>
|
|
42
|
+
<ion-avatar slot="start" style="margin-right: 12px;">
|
|
43
|
+
<app-avatar-profile [itemAvatar]=member></app-avatar-profile>
|
|
44
|
+
<div class="user-online" [ngStyle]="{ 'background-color':(member?.userOnline)?'#24d066':'#db4437' }"></div>
|
|
45
|
+
</ion-avatar>
|
|
46
|
+
<ion-label>
|
|
47
|
+
<h3>
|
|
48
|
+
{{ member.fullname }}
|
|
49
|
+
</h3>
|
|
50
|
+
</ion-label>
|
|
51
|
+
</ion-item>
|
|
52
|
+
</ion-list>
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
<div *ngIf="groupDetail" style="display:none">
|
|
58
|
+
<div *ngFor='let member of groupDetail?.member_array'>
|
|
59
|
+
<ion-grid>
|
|
60
|
+
<ion-row class="ion-align-items-center">
|
|
61
|
+
<ion-col size="3">
|
|
62
|
+
<div class="member-profile">
|
|
63
|
+
<!-- (click)="copyLoggedUserUID({member.userid)" -->
|
|
64
|
+
<!-- <div class="avatar-container" [tooltip]="useruidTooltip" [options]="tooltipOptions" placement="top"
|
|
65
|
+
content-type="template" > -->
|
|
66
|
+
<app-avatar-profile [itemAvatar]=member></app-avatar-profile>
|
|
67
|
+
<!-- </div> -->
|
|
68
|
+
<!-- <ng-template #useruidTooltip>
|
|
69
|
+
<span> {{member.userid}}</span>
|
|
70
|
+
</ng-template> -->
|
|
71
|
+
|
|
72
|
+
<div class="user-online" [ngStyle]="{ 'background-color':(member?.userOnline)?'#24d066':'#db4437' }">
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
</ion-col>
|
|
78
|
+
<ion-col>
|
|
79
|
+
<ion-label>
|
|
80
|
+
{{ member.fullname }}
|
|
81
|
+
</ion-label>
|
|
82
|
+
|
|
83
|
+
<!-- <div class="info-group-member-email">
|
|
84
|
+
<a [href]="'mailto:' + member.email + '?Subject='">
|
|
85
|
+
{{member.email}}
|
|
86
|
+
</a>
|
|
87
|
+
</div> -->
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
</ion-col>
|
|
91
|
+
</ion-row>
|
|
92
|
+
</ion-grid>
|
|
93
|
+
<!-- </ion-avatar>
|
|
94
|
+
</ion-item> -->
|
|
95
|
+
<!-- {{member | json}}
|
|
96
|
+
|
|
97
|
+
>>> {{member?.avatar}} -->
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
100
|
+
|
|
101
|
+
<!-- <ion-list>
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
</ion-list> -->
|
|
105
|
+
|
|
106
|
+
<!-- </div> -->
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
<!-- <app-advanced-info-accordion
|
|
110
|
+
[advancedAttributes]="advancedAttributes"
|
|
111
|
+
[translationMap]="translationMap">
|
|
112
|
+
|
|
113
|
+
</app-advanced-info-accordion> -->
|
|
114
|
+
|
|
115
|
+
</ion-content>
|