@chat21/chat21-ionic 3.0.61-rc2 → 3.0.61-rc21
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 +90 -0
- package/angular.json +2 -0
- package/config.xml +4 -5
- package/deploy_pre.sh +27 -27
- package/deploy_prod.sh +5 -1
- package/env.sample +1 -1
- package/package.json +8 -8
- package/resources/{Android → android}/icon/drawable-hdpi-icon.png +0 -0
- package/resources/{Android → android}/icon/drawable-ldpi-icon.png +0 -0
- package/resources/{Android → android}/icon/drawable-mdpi-icon.png +0 -0
- package/resources/{Android → android}/icon/drawable-xhdpi-icon.png +0 -0
- package/resources/{Android → android}/icon/drawable-xxhdpi-icon.png +0 -0
- package/resources/{Android → android}/icon/drawable-xxxhdpi-icon.png +0 -0
- package/resources/{Android → android}/icon.png +0 -0
- package/resources/{Android → android}/splash/drawable-land-hdpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-land-ldpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-land-mdpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-land-xhdpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-land-xxhdpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-land-xxxhdpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-port-hdpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-port-ldpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-port-mdpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-port-xhdpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-port-xxhdpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-port-xxxhdpi-screen.png +0 -0
- package/resources/{Android → android}/splash.png +0 -0
- package/src/app/app-routing.module.ts +15 -0
- package/src/app/app.component.html +4 -3
- package/src/app/app.component.scss +6 -1
- package/src/app/app.component.ts +29 -18
- package/src/app/app.module.ts +11 -3
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +36 -25
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +160 -50
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +101 -18
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +21 -36
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.scss +19 -7
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +35 -40
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.scss +1 -1
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +6 -1
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +89 -21
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +37 -33
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +7 -1
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +148 -63
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +59 -22
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +32 -9
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +102 -23
- package/src/app/components/conversation-info/info-content/info-content.component.html +2 -2
- package/src/app/components/ddp-header/ddp-header.component.html +11 -4
- package/src/app/components/ddp-header/ddp-header.component.ts +94 -19
- package/src/app/components/project-item/project-item.component.html +2 -2
- package/src/app/components/project-item/project-item.component.scss +1 -1
- package/src/app/components/project-item/project-item.component.ts +1 -1
- package/src/app/components/sidebar/sidebar.component.html +151 -86
- package/src/app/components/sidebar/sidebar.component.scss +72 -4
- package/src/app/components/sidebar/sidebar.component.ts +211 -72
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +29 -10
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.scss +53 -29
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +176 -97
- package/src/app/pages/conversation-detail/conversation-detail.module.ts +6 -1
- package/src/app/pages/conversation-detail/conversation-detail.page.html +20 -10
- package/src/app/pages/conversation-detail/conversation-detail.page.scss +28 -0
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +1124 -777
- package/src/app/pages/conversations-list/conversations-list.module.ts +2 -1
- package/src/app/pages/conversations-list/conversations-list.page.html +9 -6
- package/src/app/pages/conversations-list/conversations-list.page.scss +9 -1
- package/src/app/pages/conversations-list/conversations-list.page.ts +724 -436
- package/src/app/pages/create-canned-response/create-canned-response-routing.module.ts +17 -0
- package/src/app/pages/create-canned-response/create-canned-response.module.ts +30 -0
- package/src/app/pages/create-canned-response/create-canned-response.page.html +150 -0
- package/src/app/pages/create-canned-response/create-canned-response.page.scss +55 -0
- package/src/app/pages/create-canned-response/create-canned-response.page.spec.ts +24 -0
- package/src/app/pages/create-canned-response/create-canned-response.page.ts +319 -0
- package/src/app/pages/create-requester/create-requester-routing.module.ts +17 -0
- package/src/app/pages/create-requester/create-requester.module.ts +28 -0
- package/src/app/pages/create-requester/create-requester.page.html +67 -0
- package/src/app/pages/create-requester/create-requester.page.scss +30 -0
- package/src/app/pages/create-requester/create-requester.page.spec.ts +24 -0
- package/src/app/pages/create-requester/create-requester.page.ts +138 -0
- package/src/app/pages/create-ticket/create-ticket-routing.module.ts +17 -0
- package/src/app/pages/create-ticket/create-ticket.module.ts +28 -0
- package/src/app/pages/create-ticket/create-ticket.page.html +171 -0
- package/src/app/pages/create-ticket/create-ticket.page.scss +52 -0
- package/src/app/pages/create-ticket/create-ticket.page.spec.ts +24 -0
- package/src/app/pages/create-ticket/create-ticket.page.ts +432 -0
- package/src/app/pages/loader-preview/loader-preview.page.ts +226 -166
- package/src/app/pages/profile-info/profile-info.page.html +2 -2
- package/src/app/pages/profile-info/profile-info.page.scss +13 -2
- package/src/app/services/tiledesk/tiledesk.service.ts +209 -0
- package/src/app/shared/shared.module.ts +1 -1
- package/src/app/utils/scrollbar-theme.directive.ts +58 -24
- package/src/assets/i18n/de.json +46 -7
- package/src/assets/i18n/en.json +42 -3
- package/src/assets/i18n/es.json +42 -3
- package/src/assets/i18n/fr.json +45 -6
- package/src/assets/i18n/it.json +42 -3
- package/src/assets/i18n/pt.json +42 -3
- package/src/assets/i18n/ru.json +43 -4
- package/src/assets/i18n/sr.json +265 -0
- package/src/assets/i18n/tr.json +42 -4
- package/src/assets/images/default-avatar-x-select.png +0 -0
- package/src/assets/images/language_flag/hr.png +0 -0
- package/src/assets/images/language_flag/sr.png +0 -0
- package/src/assets/images/priority_icons/high.svg +3 -0
- package/src/assets/images/priority_icons/high_v2.svg +14 -0
- package/src/assets/images/priority_icons/low.svg +10 -0
- package/src/assets/images/priority_icons/low_v2.svg +14 -0
- package/src/assets/images/priority_icons/medium.svg +16 -0
- package/src/assets/images/priority_icons/medium_v2.svg +11 -0
- package/src/assets/images/priority_icons/urgent.svg +4 -0
- package/src/assets/images/priority_icons/urgent_v2.svg +16 -0
- package/src/chat-config-pre-test.json +1 -1
- package/src/chat-config-template.json +1 -1
- package/src/chat-config.json +1 -1
- package/src/chat21-core/providers/firebase/firebase-conversation-handler.ts +8 -3
- package/src/chat21-core/utils/constants.ts +6 -1
- package/src/chat21-core/utils/utils-message.ts +19 -0
- package/src/global.scss +65 -111
- package/publish_pre.sh +0 -33
- package/publish_prod.sh +0 -33
package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts
CHANGED
|
@@ -18,6 +18,7 @@ import { checkPlatformIsMobile } from 'src/chat21-core/utils/utils';
|
|
|
18
18
|
// Logger
|
|
19
19
|
import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
|
|
20
20
|
import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
|
|
21
|
+
import { EventsService } from 'src/app/services/events-service';
|
|
21
22
|
|
|
22
23
|
|
|
23
24
|
@Component({
|
|
@@ -45,6 +46,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
45
46
|
@Input() tagsCannedFilter: any = [];
|
|
46
47
|
@Input() tagsCannedCount: number;
|
|
47
48
|
@Input() areVisibleCAR: boolean;
|
|
49
|
+
@Input() support_mode: boolean;
|
|
48
50
|
@Input() events: Observable<void>;
|
|
49
51
|
@Input() fileUploadAccept: string
|
|
50
52
|
@Input() isOpenInfoConversation: boolean;
|
|
@@ -54,6 +56,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
54
56
|
@Output() hasClickedOpenCannedResponses = new EventEmitter<boolean>();
|
|
55
57
|
@Output() eventSendMessage = new EventEmitter<object>();
|
|
56
58
|
@Output() onPresentModalScrollToBottom = new EventEmitter<boolean>();
|
|
59
|
+
@Input() disableTextarea: boolean;
|
|
57
60
|
|
|
58
61
|
public conversationEnabled = false;
|
|
59
62
|
public messageString: string;
|
|
@@ -67,8 +70,9 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
67
70
|
private logger: LoggerService = LoggerInstance.getInstance();
|
|
68
71
|
public countClicks: number = 0;
|
|
69
72
|
public IS_SUPPORT_GROUP_CONVERSATION: boolean;
|
|
70
|
-
|
|
73
|
+
public IS_ON_MOBILE_DEVICE: boolean;
|
|
71
74
|
TYPE_MSG_TEXT = TYPE_MSG_TEXT;
|
|
75
|
+
msg: string
|
|
72
76
|
|
|
73
77
|
tooltipOptions = {
|
|
74
78
|
'show-delay': 500,
|
|
@@ -80,7 +84,9 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
80
84
|
'hide-delay': 200
|
|
81
85
|
};
|
|
82
86
|
|
|
83
|
-
|
|
87
|
+
showEmojiPicker: boolean = false; //To show/hide emoji picker
|
|
88
|
+
addWhiteSpaceBefore: boolean;
|
|
89
|
+
emojiPerLine: number = 9
|
|
84
90
|
/**
|
|
85
91
|
* Constructor
|
|
86
92
|
* @param chooser
|
|
@@ -94,6 +100,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
94
100
|
public uploadService: UploadService,
|
|
95
101
|
public toastController: ToastController,
|
|
96
102
|
private renderer: Renderer2,
|
|
103
|
+
public eventsService: EventsService
|
|
97
104
|
) { }
|
|
98
105
|
|
|
99
106
|
// ---------------------------------------------------------
|
|
@@ -110,12 +117,24 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
110
117
|
// this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] LONG_TEXAREA_PLACEHOLDER ", this.LONG_TEXAREA_PLACEHOLDER);
|
|
111
118
|
// this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] SHORT_TEXAREA_PLACEHOLDER ", this.SHORT_TEXAREA_PLACEHOLDER);
|
|
112
119
|
// this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] SHORTER_TEXAREA_PLACEHOLDER ", this.SHORTER_TEXAREA_PLACEHOLDER);
|
|
113
|
-
|
|
120
|
+
this.listenToNewCannedResponseCreated()
|
|
114
121
|
this.getWindowWidth();
|
|
122
|
+
this.isOnMobileDevice()
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
isOnMobileDevice() {
|
|
126
|
+
this.IS_ON_MOBILE_DEVICE = false;
|
|
127
|
+
if (/Android|iPhone/i.test(window.navigator.userAgent)) {
|
|
128
|
+
this.IS_ON_MOBILE_DEVICE = true;
|
|
129
|
+
this.emojiPerLine = 7
|
|
130
|
+
}
|
|
131
|
+
// this.logger.log('[APP-COMP] IS_ON_MOBILE_DEVICE', this.IS_ON_MOBILE_DEVICE)
|
|
132
|
+
return this.IS_ON_MOBILE_DEVICE;
|
|
115
133
|
}
|
|
116
134
|
|
|
117
135
|
|
|
118
136
|
|
|
137
|
+
|
|
119
138
|
ngOnChanges() {
|
|
120
139
|
if (this.translationMap) {
|
|
121
140
|
// this.LONG_TEXAREA_PLACEHOLDER = this.translationMap.get('LABEL_ENTER_MSG')
|
|
@@ -123,6 +142,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
123
142
|
// this.SHORTER_TEXAREA_PLACEHOLDER = this.translationMap.get('LABEL_ENTER_MSG_SHORTER')
|
|
124
143
|
|
|
125
144
|
this.TEXAREA_PLACEHOLDER = this.translationMap.get('LABEL_ENTER_MSG_SHORT')
|
|
145
|
+
|
|
126
146
|
}
|
|
127
147
|
|
|
128
148
|
if (this.conversationWith.startsWith("support-group")) {
|
|
@@ -130,11 +150,12 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
130
150
|
} else {
|
|
131
151
|
this.IS_SUPPORT_GROUP_CONVERSATION = false
|
|
132
152
|
}
|
|
133
|
-
|
|
153
|
+
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges support_mode ', this.support_mode)
|
|
154
|
+
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges disableTextarea ', this.disableTextarea)
|
|
134
155
|
this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges DROP EVENT ", this.dropEvent);
|
|
135
156
|
this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges tagsCannedFilter ", this.tagsCannedFilter);
|
|
136
157
|
this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges areVisibleCAR; ", this.areVisibleCAR);
|
|
137
|
-
|
|
158
|
+
|
|
138
159
|
|
|
139
160
|
this.logger.log('[CONVS-DETAIL] - returnChangeTextArea ngOnChanges in [MSG-TEXT-AREA] this.tagsCannedFilter.length ', this.tagsCannedFilter.length)
|
|
140
161
|
|
|
@@ -215,8 +236,8 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
215
236
|
@HostListener('window:resize', ['$event'])
|
|
216
237
|
onResize(event) {
|
|
217
238
|
// this.getIfTexareaIsEmpty('onResize')
|
|
218
|
-
|
|
219
|
-
|
|
239
|
+
// console.log("[CONVS-DETAIL][MSG-TEXT-AREA] event.target.innerWidth; ", event.target.innerWidth);
|
|
240
|
+
|
|
220
241
|
|
|
221
242
|
|
|
222
243
|
// if (event.target.innerWidth >= 844 && this.isOpenInfoConversation === false && this.conversationWith.startsWith("support-group")) {
|
|
@@ -269,6 +290,8 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
269
290
|
|
|
270
291
|
let content = event.clipboardData.getData('text/plain');
|
|
271
292
|
this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] onPaste content ", content);
|
|
293
|
+
this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] onPaste this.messageString ", this.messageString);
|
|
294
|
+
this.msg = this.messageString
|
|
272
295
|
setTimeout(() => {
|
|
273
296
|
this.messageString = "";
|
|
274
297
|
}, 100);
|
|
@@ -301,6 +324,11 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
301
324
|
|
|
302
325
|
onFileSelected(e: any) {
|
|
303
326
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] - onFileSelected event', e);
|
|
327
|
+
this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] - onFileSelected this.messageString ", this.messageString);
|
|
328
|
+
this.msg = this.messageString
|
|
329
|
+
setTimeout(() => {
|
|
330
|
+
this.messageString = "";
|
|
331
|
+
}, 100);
|
|
304
332
|
this.presentModal(e);
|
|
305
333
|
|
|
306
334
|
}
|
|
@@ -339,7 +367,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
339
367
|
}
|
|
340
368
|
// this.logger.log('presentModal e.target.files.length', e.target.files.length);
|
|
341
369
|
|
|
342
|
-
const attributes = { files: dataFiles, enableBackdropDismiss: false };
|
|
370
|
+
const attributes = { files: dataFiles, enableBackdropDismiss: false, msg: this.msg };
|
|
343
371
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] attributes', attributes);
|
|
344
372
|
const modal: HTMLIonModalElement =
|
|
345
373
|
await this.modalController.create({
|
|
@@ -536,28 +564,21 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
536
564
|
}
|
|
537
565
|
}
|
|
538
566
|
}
|
|
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
567
|
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
// this.logger.log("[MSG-TEXT-AREA] textArea value", textArea.value)
|
|
568
|
+
listenToNewCannedResponseCreated() {
|
|
569
|
+
this.eventsService.subscribe('newcannedresponse:created', (openCannedResponses) => {
|
|
570
|
+
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] - listenToNewCannedResponseCreated - openUserDetailsSidebar', openCannedResponses);
|
|
571
|
+
this.openCannedResponses()
|
|
572
|
+
});
|
|
573
|
+
}
|
|
555
574
|
|
|
575
|
+
openCannedResponses() {
|
|
556
576
|
this.hasClickedOpenCannedResponses.emit(true);
|
|
557
577
|
}
|
|
558
578
|
|
|
559
579
|
|
|
560
580
|
sendMessage(text: string) {
|
|
581
|
+
this.showEmojiPicker = false;
|
|
561
582
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] sendMessage text', text);
|
|
562
583
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] sendMessage conve width', this.conversationWith);
|
|
563
584
|
// text.replace(/\s/g, "")
|
|
@@ -568,6 +589,64 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
568
589
|
}
|
|
569
590
|
}
|
|
570
591
|
|
|
592
|
+
addEmoji($event) {
|
|
593
|
+
// console.log('[CONVS-DETAIL][MSG-TEXT-AREA] ADD EMOJI $event', $event)
|
|
594
|
+
// console.log('[CONVS-DETAIL][MSG-TEXT-AREA] ADD EMOJI $event > emoji', $event.emoji)
|
|
595
|
+
// console.log('[CONVS-DETAIL][MSG-TEXT-AREA] ADD EMOJI $event > emoji > native', $event.emoji.native)
|
|
596
|
+
// console.log('[CONVS-DETAIL][MSG-TEXT-AREA] ADD EMOJI messageString', this.messageString)
|
|
597
|
+
if (this.messageString === undefined) {
|
|
598
|
+
this.addWhiteSpaceBefore = false;
|
|
599
|
+
// console.log('[CONVS-DETAIL][MSG-TEXT-AREA] ADD EMOJI addWhiteSpaceBefore ', this.addWhiteSpaceBefore)
|
|
600
|
+
} else {
|
|
601
|
+
this.addWhiteSpaceBefore = true
|
|
602
|
+
// console.log('[CONVS-DETAIL][MSG-TEXT-AREA] ADD EMOJI addWhiteSpaceBefore ', this.addWhiteSpaceBefore)
|
|
603
|
+
}
|
|
604
|
+
const elTextArea = this.message_text_area['el'];
|
|
605
|
+
// console.log('[CONVS-DETAIL][MSG-TEXT-AREA] ADD EMOJI elTextArea ', elTextArea)
|
|
606
|
+
this.insertAtCursor(elTextArea, $event.emoji.native)
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
insertAtCursor(myField, myValue) {
|
|
610
|
+
this.logger.log('[CANNED-RES-EDIT-CREATE] - insertAtCursor - myValue ', myValue );
|
|
611
|
+
|
|
612
|
+
if (this.addWhiteSpaceBefore === true) {
|
|
613
|
+
myValue = ' ' + myValue;
|
|
614
|
+
this.logger.log('[CANNED-RES-EDIT-CREATE] - GET TEXT AREA - QUI ENTRO myValue ', myValue );
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
//IE support
|
|
618
|
+
if (myField.selection) {
|
|
619
|
+
myField.focus();
|
|
620
|
+
let sel = myField.selection.createRange();
|
|
621
|
+
sel.text = myValue;
|
|
622
|
+
// this.cannedResponseMessage = sel.text;
|
|
623
|
+
}
|
|
624
|
+
//MOZILLA and others
|
|
625
|
+
else if (myField.selectionStart || myField.selectionStart == '0') {
|
|
626
|
+
var startPos = myField.selectionStart;
|
|
627
|
+
this.logger.log('[CANNED-RES-EDIT-CREATE] - insertAtCursor - startPos ', startPos);
|
|
628
|
+
|
|
629
|
+
var endPos = myField.selectionEnd;
|
|
630
|
+
this.logger.log('[CANNED-RES-EDIT-CREATE] - insertAtCursor - endPos ', endPos);
|
|
631
|
+
|
|
632
|
+
myField.value = myField.value.substring(0, startPos) + myValue + myField.value.substring(endPos, myField.value.length);
|
|
633
|
+
|
|
634
|
+
// place cursor at end of text in text input element
|
|
635
|
+
myField.focus();
|
|
636
|
+
var val = myField.value; //store the value of the element
|
|
637
|
+
myField.value = ''; //clear the value of the element
|
|
638
|
+
myField.value = val + ' '; //set that value back.
|
|
639
|
+
|
|
640
|
+
|
|
641
|
+
// myField.select();
|
|
642
|
+
} else {
|
|
643
|
+
myField.value += myValue;
|
|
644
|
+
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
|
|
649
|
+
|
|
571
650
|
// --------------------------------
|
|
572
651
|
// on mobile !
|
|
573
652
|
// --------------------------------
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
[groupDetail]="groupDetail">
|
|
11
11
|
</app-info-group>
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
<app-info-support-group *ngIf="panelType === 'support-group-panel'"
|
|
14
14
|
[urlConversationSupportGroup]="urlConversationSupportGroup">
|
|
15
|
-
</app-info-support-group>
|
|
15
|
+
</app-info-support-group>
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
</ion-content>
|
|
@@ -13,15 +13,22 @@
|
|
|
13
13
|
|
|
14
14
|
<ion-buttons slot="end">
|
|
15
15
|
|
|
16
|
-
<ion-button
|
|
16
|
+
<ion-button ion-button fill="clear" (click)="presentCreateTicketModal()"
|
|
17
|
+
tooltip="{{translationMap?.get('CreateTicket')}}" [options]="tooltipOptions" placement="bottom">
|
|
18
|
+
<ion-icon slot="icon-only" name="ticket-outline"></ion-icon>
|
|
19
|
+
</ion-button>
|
|
20
|
+
|
|
21
|
+
<ion-button *ngIf="archived_btn" ion-button fill="clear" (click)="onClickArchivedConversation()"
|
|
22
|
+
tooltip="{{translationMap?.get('ViewArchivedConversations')}}" [options]="tooltipOptions" placement="bottom">
|
|
17
23
|
<ion-icon slot="icon-only" name="file-tray-full-outline"></ion-icon>
|
|
18
24
|
<!-- <ion-icon name="file-tray-stacked-outline"></ion-icon> -->
|
|
19
25
|
<!-- <ion-icon name="file-tray-full-outline"></ion-icon> -->
|
|
20
26
|
</ion-button>
|
|
21
27
|
|
|
22
|
-
<ion-button *ngIf="
|
|
23
|
-
|
|
24
|
-
<ion-icon slot="icon-only" name="
|
|
28
|
+
<ion-button *ngIf="writeto_btn" ion-button fill="clear" (click)="onOpenContactsDirectory($event)"
|
|
29
|
+
tooltip="{{translationMap?.get('ViewContactsList')}}" [options]="tooltipOptions" placement="bottom">
|
|
30
|
+
<ion-icon slot="icon-only" name="create-outline"></ion-icon>
|
|
31
|
+
<!-- <ion-icon slot="icon-only" name="people-outline"></ion-icon> -->
|
|
25
32
|
|
|
26
33
|
</ion-button>
|
|
27
34
|
|
|
@@ -1,32 +1,76 @@
|
|
|
1
|
-
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'
|
|
2
|
-
import {
|
|
1
|
+
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'
|
|
2
|
+
import { ModalController } from '@ionic/angular'
|
|
3
|
+
import { EventsService } from 'src/app/services/events-service'
|
|
4
|
+
import { CreateTicketPage } from 'src/app/pages/create-ticket/create-ticket.page'
|
|
5
|
+
import { CustomTranslateService } from 'src/chat21-core/providers/custom-translate.service'
|
|
3
6
|
@Component({
|
|
4
7
|
selector: 'app-ddp-header',
|
|
5
8
|
templateUrl: './ddp-header.component.html',
|
|
6
9
|
styleUrls: ['./ddp-header.component.scss'],
|
|
7
10
|
})
|
|
8
11
|
export class DdpHeaderComponent implements OnInit {
|
|
9
|
-
@Input() numberOpenConv: number
|
|
10
|
-
@Input() supportMode: boolean
|
|
11
|
-
@Input() archived_btn: boolean
|
|
12
|
-
@Input()
|
|
13
|
-
@Output() openContactsDirectory = new EventEmitter()
|
|
14
|
-
@Output() openProfileInfo = new EventEmitter()
|
|
15
|
-
IS_ON_MOBILE_DEVICE: boolean
|
|
16
|
-
|
|
12
|
+
@Input() numberOpenConv: number
|
|
13
|
+
@Input() supportMode: boolean
|
|
14
|
+
@Input() archived_btn: boolean
|
|
15
|
+
@Input() writeto_btn: boolean
|
|
16
|
+
@Output() openContactsDirectory = new EventEmitter()
|
|
17
|
+
@Output() openProfileInfo = new EventEmitter()
|
|
18
|
+
IS_ON_MOBILE_DEVICE: boolean
|
|
19
|
+
createTicketModal = null
|
|
20
|
+
public translationMap: Map<string, string>;
|
|
21
|
+
tooltipOptions = {
|
|
22
|
+
'show-delay': 0,
|
|
23
|
+
'tooltip-class': 'chat-tooltip',
|
|
24
|
+
'theme': 'light',
|
|
25
|
+
'shadow': false,
|
|
26
|
+
'hide-delay-mobile': 0,
|
|
27
|
+
'hideDelayAfterClick': 3000,
|
|
28
|
+
'hide-delay': 0
|
|
29
|
+
};
|
|
17
30
|
constructor(
|
|
18
31
|
public events: EventsService,
|
|
19
|
-
|
|
20
|
-
|
|
32
|
+
public modalController: ModalController,
|
|
33
|
+
private translateService: CustomTranslateService,
|
|
34
|
+
) {
|
|
35
|
+
this.isOnMobileDevice();
|
|
36
|
+
this.translations();
|
|
37
|
+
// this.listenToCloseCreateTicketModal() // published from create ticket page
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
public translations() {
|
|
41
|
+
const keys = [
|
|
42
|
+
'CreateTicket',
|
|
43
|
+
'ViewArchivedConversations',
|
|
44
|
+
'ViewContactsList'
|
|
45
|
+
];
|
|
46
|
+
this.translationMap = this.translateService.translateLanguage(keys);
|
|
21
47
|
}
|
|
22
48
|
|
|
49
|
+
// listenToCloseCreateTicketModal() {
|
|
50
|
+
// this.events.subscribe('closeModalCreateTicket', (bool) => {
|
|
51
|
+
// console.log('[HEADER-CONV] closeModalCreateTicket ', bool)
|
|
52
|
+
// if (bool === true) {
|
|
53
|
+
// this.closeCreateTicketModal()
|
|
54
|
+
|
|
55
|
+
// }
|
|
56
|
+
// })
|
|
57
|
+
// }
|
|
58
|
+
|
|
59
|
+
// closeCreateTicketModal() {
|
|
60
|
+
// if (this.createTicketModal) {
|
|
61
|
+
// this.createTicketModal.dismiss().then(() => {
|
|
62
|
+
// this.createTicketModal = null;
|
|
63
|
+
// });
|
|
64
|
+
// }
|
|
65
|
+
// }
|
|
66
|
+
|
|
23
67
|
isOnMobileDevice() {
|
|
24
|
-
this.IS_ON_MOBILE_DEVICE = false
|
|
68
|
+
this.IS_ON_MOBILE_DEVICE = false
|
|
25
69
|
if (/Android|iPhone/i.test(window.navigator.userAgent)) {
|
|
26
|
-
this.IS_ON_MOBILE_DEVICE = true
|
|
70
|
+
this.IS_ON_MOBILE_DEVICE = true
|
|
27
71
|
}
|
|
28
|
-
console.log('[DDP-HEADER] IS_ON_MOBILE_DEVICE', this.IS_ON_MOBILE_DEVICE)
|
|
29
|
-
return this.IS_ON_MOBILE_DEVICE
|
|
72
|
+
// console.log('[DDP-HEADER] IS_ON_MOBILE_DEVICE', this.IS_ON_MOBILE_DEVICE)
|
|
73
|
+
return this.IS_ON_MOBILE_DEVICE
|
|
30
74
|
}
|
|
31
75
|
|
|
32
76
|
ngOnInit() {
|
|
@@ -36,17 +80,48 @@ export class DdpHeaderComponent implements OnInit {
|
|
|
36
80
|
// START @Output() //
|
|
37
81
|
/** */
|
|
38
82
|
onOpenProfileInfo(e: any) {
|
|
39
|
-
this.openProfileInfo.emit(e)
|
|
83
|
+
this.openProfileInfo.emit(e)
|
|
40
84
|
}
|
|
41
85
|
|
|
42
86
|
/** */
|
|
43
87
|
onOpenContactsDirectory(e: any) {
|
|
44
|
-
this.openContactsDirectory.emit(e)
|
|
88
|
+
this.openContactsDirectory.emit(e)
|
|
45
89
|
}
|
|
46
90
|
// END @Output() //
|
|
47
91
|
|
|
48
92
|
onClickArchivedConversation() {
|
|
49
|
-
this.events.publish('profileInfoButtonClick:changed', 'displayArchived')
|
|
93
|
+
this.events.publish('profileInfoButtonClick:changed', 'displayArchived')
|
|
50
94
|
}
|
|
51
95
|
|
|
96
|
+
// PRESENT MODAL CREATE TICKET
|
|
97
|
+
// async presentCreateTicketModal(): Promise<any>{
|
|
98
|
+
|
|
99
|
+
// // const attributes = { enableBackdropDismiss: false };
|
|
100
|
+
// const modal: HTMLIonModalElement =
|
|
101
|
+
// await this.modalController.create({
|
|
102
|
+
// component: CreateTicketPage,
|
|
103
|
+
// // componentProps: attributes,
|
|
104
|
+
// swipeToClose: false,
|
|
105
|
+
// backdropDismiss: false
|
|
106
|
+
// });
|
|
107
|
+
// modal.onDidDismiss().then((detail: any) => {
|
|
108
|
+
// console.log('[DDP-HEADER] ', detail.data);
|
|
109
|
+
// });
|
|
110
|
+
// return await modal.present();
|
|
111
|
+
// }
|
|
112
|
+
|
|
113
|
+
async presentCreateTicketModal() {
|
|
114
|
+
// const attributes = { enableBackdropDismiss: false };
|
|
115
|
+
const modal = await this.modalController.create({
|
|
116
|
+
component: CreateTicketPage,
|
|
117
|
+
// componentProps: attributes,
|
|
118
|
+
swipeToClose: false,
|
|
119
|
+
backdropDismiss: false,
|
|
120
|
+
})
|
|
121
|
+
modal.onDidDismiss().then((detail: any) => {
|
|
122
|
+
// console.log('[DDP-HEADER] ', detail.data)
|
|
123
|
+
})
|
|
124
|
+
modal.present()
|
|
125
|
+
this.createTicketModal = modal
|
|
126
|
+
}
|
|
52
127
|
}
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
</g>
|
|
24
24
|
</svg>
|
|
25
25
|
</div>
|
|
26
|
-
<div class="unassigned-notifications-badge">
|
|
26
|
+
<div class="unassigned-notifications-badge" *ngIf="unservedRequestCount > 0">
|
|
27
27
|
<!-- || currentUserRequestCount > 0 -->
|
|
28
28
|
<!-- <span *ngIf="unservedRequestCount > 0 "> -->
|
|
29
29
|
<!-- + currentUserRequestCount -->
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
{{translationMap?.get('Unavailable')}}
|
|
89
89
|
</span>
|
|
90
90
|
|
|
91
|
-
<div class="project-item--isBusy-icon-wpr" *ngIf="project?.ws_projct_user_isBusy === true" tooltip="
|
|
91
|
+
<div class="project-item--isBusy-icon-wpr" *ngIf="project?.ws_projct_user_isBusy === true" tooltip="{{translationMap?.get('Busy')}}"
|
|
92
92
|
[options]="tooltipOptions" placement="top" >
|
|
93
93
|
<!-- <span class="material-icons project-item--isBusy-icon">
|
|
94
94
|
access_time
|
|
@@ -71,7 +71,7 @@ export class ProjectItemComponent implements OnInit {
|
|
|
71
71
|
if (/Android|iPhone/i.test(window.navigator.userAgent)) {
|
|
72
72
|
this.IS_ON_MOBILE_DEVICE = true;
|
|
73
73
|
}
|
|
74
|
-
console.log('[PROJECT-ITEM] IS_ON_MOBILE_DEVICE', this.IS_ON_MOBILE_DEVICE)
|
|
74
|
+
// console.log('[PROJECT-ITEM] IS_ON_MOBILE_DEVICE', this.IS_ON_MOBILE_DEVICE)
|
|
75
75
|
return this.IS_ON_MOBILE_DEVICE;
|
|
76
76
|
}
|
|
77
77
|
|