@chat21/chat21-ionic 3.0.97-rc.1 → 3.0.97-rc.3
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 +19 -0
- package/Dockerfile +1 -1
- package/GoogleService-Info.plist +36 -0
- package/config.xml +6 -3
- package/google-services.json +40 -0
- package/package.json +8 -13
- package/resources/ios/icon/icon-1024.png +0 -0
- package/resources/ios/icon/icon-108@2x.png +0 -0
- package/resources/ios/icon/icon-20.png +0 -0
- package/resources/ios/icon/icon-20@2x.png +0 -0
- package/resources/ios/icon/icon-20@3x.png +0 -0
- package/resources/ios/icon/icon-24@2x.png +0 -0
- package/resources/ios/icon/icon-27.5@2x.png +0 -0
- package/resources/ios/icon/icon-29.png +0 -0
- package/resources/ios/icon/icon-29@2x.png +0 -0
- package/resources/ios/icon/icon-29@3x.png +0 -0
- package/resources/ios/icon/icon-40.png +0 -0
- package/resources/ios/icon/icon-40@2x.png +0 -0
- package/resources/ios/icon/icon-40@3x.png +0 -0
- package/resources/ios/icon/icon-44@2x.png +0 -0
- package/resources/ios/icon/icon-50.png +0 -0
- package/resources/ios/icon/icon-50@2x.png +0 -0
- package/resources/ios/icon/icon-60.png +0 -0
- package/resources/ios/icon/icon-60@2x.png +0 -0
- package/resources/ios/icon/icon-60@3x.png +0 -0
- package/resources/ios/icon/icon-72.png +0 -0
- package/resources/ios/icon/icon-72@2x.png +0 -0
- package/resources/ios/icon/icon-76.png +0 -0
- package/resources/ios/icon/icon-76@2x.png +0 -0
- package/resources/ios/icon/icon-83.5@2x.png +0 -0
- package/resources/ios/icon/icon-86@2x.png +0 -0
- package/resources/ios/icon/icon-98@2x.png +0 -0
- package/resources/ios/icon/icon.png +0 -0
- package/resources/ios/icon/icon@2x.png +0 -0
- package/resources/ios/icon.jpg +0 -0
- package/resources/ios/splash/Default-1792h~iphone.png +0 -0
- package/resources/ios/splash/Default-2436h.png +0 -0
- package/resources/ios/splash/Default-2688h~iphone.png +0 -0
- package/resources/ios/splash/Default-568h@2x~iphone.png +0 -0
- package/resources/ios/splash/Default-667h.png +0 -0
- package/resources/ios/splash/Default-736h.png +0 -0
- package/resources/ios/splash/Default-Landscape-1792h~iphone.png +0 -0
- package/resources/ios/splash/Default-Landscape-2436h.png +0 -0
- package/resources/ios/splash/Default-Landscape-2688h~iphone.png +0 -0
- package/resources/ios/splash/Default-Landscape-736h.png +0 -0
- package/resources/ios/splash/Default-Landscape@2x~ipad.png +0 -0
- package/resources/ios/splash/Default-Landscape@~ipadpro.png +0 -0
- package/resources/ios/splash/Default-Landscape~ipad.png +0 -0
- package/resources/ios/splash/Default-Portrait@2x~ipad.png +0 -0
- package/resources/ios/splash/Default-Portrait@~ipadpro.png +0 -0
- package/resources/ios/splash/Default-Portrait~ipad.png +0 -0
- package/resources/ios/splash/Default@2x~iphone.png +0 -0
- package/resources/ios/splash/Default@2x~universal~anyany.png +0 -0
- package/resources/ios/splash/Default~iphone.png +0 -0
- package/src/app/app-routing.module.ts +6 -5
- package/src/app/app.component.html +0 -1
- package/src/app/app.component.ts +58 -26
- package/src/app/app.module.ts +3 -7
- package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.spec.ts +0 -4
- package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.ts +0 -38
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +10 -11
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +1 -37
- package/src/app/chatlib/conversation-detail/message/image/image.component.html +0 -4
- package/src/app/chatlib/conversation-detail/message/image/image.component.ts +0 -21
- package/src/app/chatlib/conversation-detail/message/info-message/info-message.component.html +3 -3
- package/src/app/chatlib/conversation-detail/message/info-message/info-message.component.ts +0 -10
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +14 -12
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.scss +4 -0
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +13 -13
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +14 -9
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +4 -0
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +20 -14
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +11 -13
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +12 -9
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +3 -24
- package/src/app/components/conversation-info/advanced-info-accordion/advanced-info-accordion.component.html +0 -13
- package/src/app/components/conversation-info/advanced-info-accordion/advanced-info-accordion.component.ts +0 -9
- package/src/app/components/conversation-info/conversation-info.module.ts +0 -2
- package/src/app/components/conversation-info/info-content/info-content.component.ts +0 -1
- package/src/app/components/conversation-info/info-group/info-group.component.ts +0 -11
- package/src/app/components/conversations-list/header-conversations-list/header-conversations-list.component.html +4 -10
- package/src/app/components/conversations-list/header-conversations-list/header-conversations-list.component.ts +1 -9
- package/src/app/components/project-item/project-item.component.html +2 -4
- package/src/app/components/project-item/project-item.component.ts +1 -19
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +1 -1
- package/src/app/directives/tooltip.directive.spec.ts +20 -0
- package/src/app/directives/tooltip.directive.ts +134 -0
- package/src/app/pages/authentication/login/login.page.ts +1 -1
- package/src/app/pages/conversation-detail/conversation-detail.module.ts +0 -4
- package/src/app/pages/conversation-detail/conversation-detail.page.html +3 -3
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +63 -33
- package/src/app/pages/conversations-list/conversations-list.page.scss +0 -1
- package/src/app/pages/conversations-list/conversations-list.page.ts +101 -19
- package/src/app/pages/profile-info/profile-info.module.ts +4 -2
- package/src/app/pages/profile-info/profile-info.page.html +76 -16
- package/src/app/pages/profile-info/profile-info.page.scss +71 -0
- package/src/app/pages/profile-info/profile-info.page.ts +89 -18
- package/src/app/shared/shared.module.ts +4 -4
- package/src/assets/chat21-logo.png +0 -0
- package/src/assets/images/channel_icons/chat21.svg +3 -0
- package/src/assets/images/channel_icons/direct.svg +3 -0
- package/src/assets/images/channel_icons/email-logo.svg +9 -0
- package/src/assets/images/channel_icons/form-logo_v2.svg +13 -0
- package/src/assets/images/channel_icons/group.svg +3 -0
- package/src/assets/images/channel_icons/messenger-logo.svg +8 -0
- package/src/assets/images/channel_icons/telegram-logo.svg +7 -0
- package/src/assets/images/channel_icons/whatsapp-logo.svg +12 -0
- package/src/assets/logo.png +0 -0
- package/src/assets/tiledesk-solo-logo.png +0 -0
- package/src/chat21-core/providers/firebase/firebase-auth-service.ts +1 -16
- package/src/chat21-core/providers/mqtt/mqtt-conversation-handler.ts +1 -0
- package/src/chat21-core/providers/mqtt/mqtt-notifications.ts +2 -2
- package/src/chat21-core/utils/constants.ts +7 -0
- package/src/chat21-core/utils/utils.ts +22 -12
- package/src/global.scss +134 -22
- package/src/index.html +1 -2
- package/resources/ios/icon.png +0 -0
- package/src/app/pages/details/details-routing.module.ts +0 -17
- package/src/app/pages/details/details.module.ts +0 -21
- package/src/app/pages/details/details.page.html +0 -28
- package/src/app/pages/details/details.page.scss +0 -23
- package/src/app/pages/details/details.page.spec.ts +0 -24
- package/src/app/pages/details/details.page.ts +0 -65
- package/src/assets/chat21-logo.svg +0 -78
package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss
CHANGED
|
@@ -79,11 +79,13 @@
|
|
|
79
79
|
color: var(--basic-blue);
|
|
80
80
|
}
|
|
81
81
|
.buttons-left {
|
|
82
|
-
position: absolute;
|
|
83
|
-
top: 2px;
|
|
84
|
-
right: 0;
|
|
82
|
+
// position: absolute;
|
|
83
|
+
// top: 2px;
|
|
84
|
+
// right: 0;
|
|
85
85
|
// width: 30px;
|
|
86
86
|
// height: 100%;
|
|
87
|
+
display: flex;
|
|
88
|
+
align-items: flex-end;
|
|
87
89
|
.attach-button {
|
|
88
90
|
font-size: 24px;
|
|
89
91
|
position: absolute;
|
|
@@ -98,9 +100,10 @@
|
|
|
98
100
|
}
|
|
99
101
|
.buttons-right {
|
|
100
102
|
display: flex;
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
103
|
+
align-items: flex-end;
|
|
104
|
+
// position: absolute;
|
|
105
|
+
// top: 2px;
|
|
106
|
+
// right: 0;
|
|
104
107
|
// width: 30px;
|
|
105
108
|
// height: 100%;
|
|
106
109
|
.send-button {
|
|
@@ -126,8 +129,8 @@
|
|
|
126
129
|
// margin: 0 70px;
|
|
127
130
|
// width: calc(100% - 100px);
|
|
128
131
|
// ----- new after adding emoji picker
|
|
129
|
-
margin: 0 108px;
|
|
130
|
-
width: calc(100% - 140px);
|
|
132
|
+
// margin: 0 108px;
|
|
133
|
+
width: 100%; //calc(100% - 140px);
|
|
131
134
|
ion-textarea {
|
|
132
135
|
// border-radius: 4px;
|
|
133
136
|
border-radius: 20px; // NK edited
|
|
@@ -253,7 +256,7 @@
|
|
|
253
256
|
.emoji-mart-desktop {
|
|
254
257
|
position: absolute;
|
|
255
258
|
bottom: 53px;
|
|
256
|
-
right: -246px;
|
|
259
|
+
// right: -246px;
|
|
257
260
|
}
|
|
258
261
|
.emoji-mart-mobile {
|
|
259
262
|
position: absolute;
|
package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts
CHANGED
|
@@ -19,6 +19,7 @@ import { UploadModel } from 'src/chat21-core/models/upload';
|
|
|
19
19
|
import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
|
|
20
20
|
import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
|
|
21
21
|
import { EventsService } from 'src/app/services/events-service';
|
|
22
|
+
import { isOnMobileDevice } from 'src/chat21-core/utils/utils';
|
|
22
23
|
|
|
23
24
|
|
|
24
25
|
@Component({
|
|
@@ -75,16 +76,6 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
75
76
|
|
|
76
77
|
section: string= 'chat'
|
|
77
78
|
|
|
78
|
-
tooltipOptions = {
|
|
79
|
-
'show-delay': 500,
|
|
80
|
-
'tooltip-class': 'chat-tooltip',
|
|
81
|
-
'theme': 'light',
|
|
82
|
-
'shadow': false,
|
|
83
|
-
'hide-delay-mobile': 0,
|
|
84
|
-
'hideDelayAfterClick': 3000,
|
|
85
|
-
'hide-delay': 200
|
|
86
|
-
};
|
|
87
|
-
|
|
88
79
|
showEmojiPicker: boolean = false; //To show/hide emoji picker
|
|
89
80
|
addWhiteSpaceBefore: boolean;
|
|
90
81
|
emojiPerLine: number = 9
|
|
@@ -139,20 +130,9 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
139
130
|
}
|
|
140
131
|
|
|
141
132
|
this.listenToNewCannedResponseCreated()
|
|
142
|
-
this.isOnMobileDevice()
|
|
133
|
+
this.IS_ON_MOBILE_DEVICE = isOnMobileDevice()
|
|
143
134
|
}
|
|
144
135
|
|
|
145
|
-
isOnMobileDevice() {
|
|
146
|
-
this.IS_ON_MOBILE_DEVICE = false;
|
|
147
|
-
if (/Android|iPhone/i.test(window.navigator.userAgent)) {
|
|
148
|
-
this.IS_ON_MOBILE_DEVICE = true;
|
|
149
|
-
this.emojiPerLine = 7
|
|
150
|
-
}
|
|
151
|
-
// this.logger.log('[APP-COMP] IS_ON_MOBILE_DEVICE', this.IS_ON_MOBILE_DEVICE)
|
|
152
|
-
return this.IS_ON_MOBILE_DEVICE;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
|
|
156
136
|
ngOnChanges(changes: SimpleChanges) {
|
|
157
137
|
if (this.translationMap) {
|
|
158
138
|
// this.LONG_TEXAREA_PLACEHOLDER = this.translationMap.get('LABEL_ENTER_MSG')
|
|
@@ -166,7 +146,6 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
166
146
|
if (this.dropEvent) {
|
|
167
147
|
this.presentModal(this.dropEvent)
|
|
168
148
|
}
|
|
169
|
-
|
|
170
149
|
}
|
|
171
150
|
|
|
172
151
|
// ngAfterViewInit() {
|
|
@@ -423,7 +402,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
423
402
|
if (form && form.text && form.text.trim() !== '') {
|
|
424
403
|
const text = '**' + form.subject + '**\r\n' + form.text
|
|
425
404
|
const attributes = {
|
|
426
|
-
|
|
405
|
+
offline_channel: TYPE_MSG_EMAIL
|
|
427
406
|
}
|
|
428
407
|
this.eventSendMessage.emit({ msg: text, type: TYPE_MSG_TEXT, metadata: null, attributes: attributes });
|
|
429
408
|
}
|
|
@@ -12,19 +12,6 @@
|
|
|
12
12
|
<div id="{{'advanced-info-panel_'+ teammateID}}" class="advanced-info-panel">
|
|
13
13
|
<div *ngFor="let attr of advancedAttributes">
|
|
14
14
|
|
|
15
|
-
<!-- <span [tooltip]="HtmlContent" [options]="tooltipOptions" placement="top" content-type="template">
|
|
16
|
-
<span class="material-icons icon-with-background">
|
|
17
|
-
{{ attr.icon }}
|
|
18
|
-
</span>
|
|
19
|
-
</span>
|
|
20
|
-
<ng-template #HtmlContent>
|
|
21
|
-
<span>{{ attr.key }}</span>
|
|
22
|
-
</ng-template>
|
|
23
|
-
{{ attr.value}} -->
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
15
|
<div class="attributes-wpr">
|
|
29
16
|
<div class="attributes-icon-wpr-1">
|
|
30
17
|
<div class="attributes-icon-wpr-2">
|
|
@@ -13,15 +13,6 @@ export class AdvancedInfoAccordionComponent implements OnInit, OnChanges {
|
|
|
13
13
|
@Input() translationMap: Map<string, string>;
|
|
14
14
|
public teammateID: string;
|
|
15
15
|
|
|
16
|
-
tooltipOptions = {
|
|
17
|
-
'show-delay': 100,
|
|
18
|
-
'tooltip-class': 'chat-tooltip',
|
|
19
|
-
'theme': 'light',
|
|
20
|
-
'shadow': false,
|
|
21
|
-
'hide-delay-mobile': 0,
|
|
22
|
-
'hideDelayAfterClick': 3000,
|
|
23
|
-
'hide-delay': 200
|
|
24
|
-
};
|
|
25
16
|
private logger: LoggerService = LoggerInstance.getInstance()
|
|
26
17
|
|
|
27
18
|
constructor() { }
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { NgModule } from '@angular/core';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { TooltipModule } from 'ng2-tooltip-directive';
|
|
4
3
|
|
|
5
4
|
|
|
6
5
|
@NgModule({
|
|
7
6
|
declarations: [],
|
|
8
7
|
imports: [
|
|
9
8
|
CommonModule,
|
|
10
|
-
TooltipModule,
|
|
11
9
|
]
|
|
12
10
|
})
|
|
13
11
|
export class ConversationInfoModule { }
|
|
@@ -27,7 +27,6 @@ import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance'
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
export class InfoContentComponent implements OnInit {
|
|
30
|
-
@Input() openInfoConversation: boolean;
|
|
31
30
|
// @Input() member: UserModel;
|
|
32
31
|
@Input() loggedUser: UserModel
|
|
33
32
|
@Input() tenant: string
|
|
@@ -30,17 +30,6 @@ export class InfoGroupComponent implements OnInit, AfterViewInit, OnChanges {
|
|
|
30
30
|
private unsubscribe$: Subject<any> = new Subject<any>();
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
tooltip: HTMLElement;
|
|
34
|
-
tooltipOptions = {
|
|
35
|
-
'show-delay': 100,
|
|
36
|
-
'tooltip-class': 'chat-tooltip',
|
|
37
|
-
'theme': 'light',
|
|
38
|
-
'shadow': false,
|
|
39
|
-
'hide-delay-mobile': 0,
|
|
40
|
-
'hideDelayAfterClick': 3000,
|
|
41
|
-
'hide-delay': 200
|
|
42
|
-
};
|
|
43
|
-
|
|
44
33
|
private logger: LoggerService = LoggerInstance.getInstance();
|
|
45
34
|
route: string;
|
|
46
35
|
previousUrl: string;
|
|
@@ -23,26 +23,20 @@
|
|
|
23
23
|
|
|
24
24
|
<ion-buttons slot="end">
|
|
25
25
|
|
|
26
|
-
<ion-button ion-button fill="clear" (click)="presentCreateTicketModal()"
|
|
27
|
-
tooltip="{{translationMap?.get('CreateTicket')}}"
|
|
28
|
-
[options]="tooltipOptions"
|
|
29
|
-
placement="bottom">
|
|
26
|
+
<ion-button *ngIf="!isMobile" ion-button fill="clear" (click)="presentCreateTicketModal()"
|
|
27
|
+
tooltip="{{translationMap?.get('CreateTicket')}}" placement="bottom">
|
|
30
28
|
<ion-icon slot="icon-only" name="ticket-outline"></ion-icon>
|
|
31
29
|
</ion-button>
|
|
32
30
|
|
|
33
31
|
<ion-button *ngIf="archived_btn" ion-button fill="clear" (click)="onClickArchivedConversation()"
|
|
34
|
-
tooltip="{{translationMap?.get('ViewArchivedConversations')}}"
|
|
35
|
-
[options]="tooltipOptions"
|
|
36
|
-
placement="bottom">
|
|
32
|
+
tooltip="{{translationMap?.get('ViewArchivedConversations')}}" placement="bottom">
|
|
37
33
|
<ion-icon slot="icon-only" name="file-tray-full-outline"></ion-icon>
|
|
38
34
|
<!-- <ion-icon name="file-tray-stacked-outline"></ion-icon> -->
|
|
39
35
|
<!-- <ion-icon name="file-tray-full-outline"></ion-icon> -->
|
|
40
36
|
</ion-button>
|
|
41
37
|
|
|
42
38
|
<ion-button *ngIf="writeto_btn" ion-button fill="clear" (click)="onOpenContactsDirectory($event)"
|
|
43
|
-
tooltip="{{translationMap?.get('ViewContactsList')}}"
|
|
44
|
-
[options]="tooltipOptions"
|
|
45
|
-
placement="bottom">
|
|
39
|
+
tooltip="{{translationMap?.get('ViewContactsList')}}" placement="bottom">
|
|
46
40
|
<ion-icon slot="icon-only" name="create-outline"></ion-icon>
|
|
47
41
|
<!-- <ion-icon slot="icon-only" name="people-outline"></ion-icon> -->
|
|
48
42
|
</ion-button>
|
|
@@ -22,15 +22,7 @@ export class HeaderConversationsList implements OnInit {
|
|
|
22
22
|
|
|
23
23
|
createTicketModal = null
|
|
24
24
|
public translationMap: Map<string, string>;
|
|
25
|
-
|
|
26
|
-
'show-delay': 0,
|
|
27
|
-
'tooltip-class': 'chat-tooltip',
|
|
28
|
-
'theme': 'light',
|
|
29
|
-
'shadow': false,
|
|
30
|
-
'hide-delay-mobile': 0,
|
|
31
|
-
'hideDelayAfterClick': 3000,
|
|
32
|
-
'hide-delay': 0
|
|
33
|
-
};
|
|
25
|
+
|
|
34
26
|
constructor(
|
|
35
27
|
public events: EventsService,
|
|
36
28
|
public modalController: ModalController,
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
<!-- <div class="pinned-project">Pinned project </div> margin-left:4px -->
|
|
4
4
|
<div *ngIf="project?.id_project?.status !== 0" class="flex-container-project-for-panel project-row">
|
|
5
|
-
<div class="flex-child-left"
|
|
6
|
-
content-type="template" (click)="openUnservedConvs()">
|
|
5
|
+
<div class="flex-child-left" tooltip="({{ unservedRequestCount }}) {{translationMap?.get('UnassignedConversations') }}" placement="top" (click)="openUnservedConvs()">
|
|
7
6
|
<div class="unassigned-notifications-icon-wpr">
|
|
8
7
|
<svg viewBox="0 0 24 24" preserveAspectRatio="xMidYMid meet" focusable="false" class="style-scope yt-icon">
|
|
9
8
|
<g class="style-scope yt-icon">
|
|
@@ -23,8 +22,7 @@
|
|
|
23
22
|
|
|
24
23
|
|
|
25
24
|
<div class="flex-child-right">
|
|
26
|
-
<div class="project-name-project-for-panel"
|
|
27
|
-
[options]="tooltipOptions" placement="top" content-type="template" (click)="openUnservedConvs()">
|
|
25
|
+
<div class="project-name-project-for-panel" tooltip="({{ unservedRequestCount }}) {{translationMap?.get('UnassignedConversations') }}" placement="top" (click)="openUnservedConvs()">
|
|
28
26
|
<div class="unassigned_label"> <a>{{ translationMap?.get('UnassignedConversations') }}</a> </div>
|
|
29
27
|
</div>
|
|
30
28
|
|
|
@@ -40,16 +40,7 @@ export class ProjectItemComponent implements OnInit {
|
|
|
40
40
|
window_width_is_60: boolean;
|
|
41
41
|
newInnerWidth: any;
|
|
42
42
|
avaialble_status_for_tooltip: string;
|
|
43
|
-
|
|
44
|
-
'show-delay': 500,
|
|
45
|
-
'tooltip-class': 'chat-tooltip',
|
|
46
|
-
'theme': 'light',
|
|
47
|
-
'shadow': false,
|
|
48
|
-
'hide-delay-mobile': 0,
|
|
49
|
-
'hideDelayAfterClick': 3000,
|
|
50
|
-
'hide-delay': 200
|
|
51
|
-
};
|
|
52
|
-
IS_ON_MOBILE_DEVICE: boolean;
|
|
43
|
+
|
|
53
44
|
constructor(
|
|
54
45
|
public wsService: WebsocketService,
|
|
55
46
|
public appStorageService: AppStorageService,
|
|
@@ -68,7 +59,6 @@ export class ProjectItemComponent implements OnInit {
|
|
|
68
59
|
this.translations();
|
|
69
60
|
this.listenToPostMsgs();
|
|
70
61
|
this.onInitWindowWidth();
|
|
71
|
-
this.isOnMobileDevice();
|
|
72
62
|
}
|
|
73
63
|
|
|
74
64
|
ngOnDestroy() {
|
|
@@ -78,14 +68,6 @@ export class ProjectItemComponent implements OnInit {
|
|
|
78
68
|
|
|
79
69
|
}
|
|
80
70
|
|
|
81
|
-
isOnMobileDevice() {
|
|
82
|
-
this.IS_ON_MOBILE_DEVICE = false;
|
|
83
|
-
if (/Android|iPhone/i.test(window.navigator.userAgent)) {
|
|
84
|
-
this.IS_ON_MOBILE_DEVICE = true;
|
|
85
|
-
}
|
|
86
|
-
return this.IS_ON_MOBILE_DEVICE;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
71
|
openUnservedConvs() {
|
|
90
72
|
this.openUnsevedConvsEvent.emit({event: 'notificationsorprjctbtn', data: this.unservedConversations})
|
|
91
73
|
}
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
<ng-select style="text-align: left;"
|
|
75
75
|
(change)="changeAvailabilityStateInUserDetailsSidebar(selectedStatus)"
|
|
76
76
|
[(ngModel)]="selectedStatus"
|
|
77
|
-
class="teammate-status-in-drawer"
|
|
77
|
+
class="teammate-status-in-drawer sidebar"
|
|
78
78
|
[items]="teammateStatus"
|
|
79
79
|
bindLabel="name" bindValue="id"
|
|
80
80
|
[clearable]="false"
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ElementRef, Renderer2 } from '@angular/core';
|
|
2
|
+
import { async, TestBed } from '@angular/core/testing';
|
|
3
|
+
import { TooltipDirective } from './tooltip.directive';
|
|
4
|
+
|
|
5
|
+
describe('TooltipNewDirective', () => {
|
|
6
|
+
let el: ElementRef;
|
|
7
|
+
let renderer: Renderer2;
|
|
8
|
+
beforeEach(async(() => {
|
|
9
|
+
TestBed.configureTestingModule({
|
|
10
|
+
declarations: [ ],
|
|
11
|
+
imports: [ElementRef, Renderer2]
|
|
12
|
+
}).compileComponents();
|
|
13
|
+
|
|
14
|
+
}));
|
|
15
|
+
|
|
16
|
+
it('should create an instance', () => {
|
|
17
|
+
const directive = new TooltipDirective(el, renderer);
|
|
18
|
+
expect(directive).toBeTruthy();
|
|
19
|
+
});
|
|
20
|
+
});
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { Directive, ElementRef, HostListener, Input, Renderer2 } from '@angular/core';
|
|
2
|
+
import { isOnMobileDevice } from 'src/chat21-core/utils/utils';
|
|
3
|
+
|
|
4
|
+
@Directive({
|
|
5
|
+
selector: '[tooltip]'
|
|
6
|
+
})
|
|
7
|
+
export class TooltipDirective {
|
|
8
|
+
|
|
9
|
+
@Input('tooltip') tooltipTitle: string;
|
|
10
|
+
@Input() placement: string;
|
|
11
|
+
@Input() delay: string;
|
|
12
|
+
tooltip: HTMLElement;
|
|
13
|
+
|
|
14
|
+
offset = 10;
|
|
15
|
+
isMobile = isOnMobileDevice()
|
|
16
|
+
|
|
17
|
+
constructor(private el: ElementRef, private renderer: Renderer2) {}
|
|
18
|
+
|
|
19
|
+
@HostListener('mouseenter') onMouseEnter() {
|
|
20
|
+
if (!this.tooltip && !this.isMobile) { this.show(); }
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@HostListener('mouseleave') onMouseLeave() {
|
|
24
|
+
if (this.tooltip) { this.hide(); }
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
show() {
|
|
28
|
+
this.create();
|
|
29
|
+
this.setPosition();
|
|
30
|
+
this.renderer.addClass(this.tooltip, 'ng-tooltip-show');
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
hide() {
|
|
34
|
+
this.renderer.removeClass(this.tooltip, 'ng-tooltip-show');
|
|
35
|
+
window.setTimeout(() => {
|
|
36
|
+
this.renderer.removeChild(document.body, this.tooltip);
|
|
37
|
+
this.tooltip = null;
|
|
38
|
+
}, +this.delay);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
create() {
|
|
42
|
+
this.tooltip = this.renderer.createElement('span');
|
|
43
|
+
|
|
44
|
+
this.renderer.appendChild(
|
|
45
|
+
this.tooltip,
|
|
46
|
+
this.renderer.createText(this.tooltipTitle) // textNode
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
this.renderer.appendChild(document.body, this.tooltip);
|
|
50
|
+
// this.renderer.appendChild(this.el.nativeElement, this.tooltip);
|
|
51
|
+
|
|
52
|
+
this.renderer.addClass(this.tooltip, 'ng-tooltip');
|
|
53
|
+
this.renderer.addClass(this.tooltip, `ng-tooltip-${this.placement}`);
|
|
54
|
+
|
|
55
|
+
// delay 설정
|
|
56
|
+
this.renderer.setStyle(this.tooltip, '-webkit-transition', `opacity ${this.delay}ms`);
|
|
57
|
+
this.renderer.setStyle(this.tooltip, '-moz-transition', `opacity ${this.delay}ms`);
|
|
58
|
+
this.renderer.setStyle(this.tooltip, '-o-transition', `opacity ${this.delay}ms`);
|
|
59
|
+
this.renderer.setStyle(this.tooltip, 'transition', `opacity ${this.delay}ms`);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
setPosition() {
|
|
63
|
+
const hostPos = this.el.nativeElement.getBoundingClientRect();
|
|
64
|
+
const tooltipPos = this.tooltip.getBoundingClientRect();
|
|
65
|
+
|
|
66
|
+
const scrollPos = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
|
|
67
|
+
|
|
68
|
+
let top, left;
|
|
69
|
+
|
|
70
|
+
if (this.placement === 'top') {
|
|
71
|
+
top = hostPos.top - tooltipPos.height - this.offset;
|
|
72
|
+
left = hostPos.left + (hostPos.width - tooltipPos.width) / 2;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if (this.placement === 'bottom') {
|
|
76
|
+
top = hostPos.bottom + this.offset;
|
|
77
|
+
left = hostPos.left + (hostPos.width - tooltipPos.width) / 2;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if (this.placement === 'left') {
|
|
81
|
+
top = hostPos.top + (hostPos.height - tooltipPos.height) / 2;
|
|
82
|
+
left = hostPos.left - tooltipPos.width - this.offset;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if (this.placement === 'right') {
|
|
86
|
+
top = hostPos.top + (hostPos.height - tooltipPos.height) / 2;
|
|
87
|
+
left = hostPos.right + this.offset;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
this.renderer.setStyle(this.tooltip, 'top', `${top + scrollPos}px`);
|
|
91
|
+
this.renderer.setStyle(this.tooltip, 'left', `${left}px`);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
// @Input() tooltip2: any; // The text for the tooltip to display
|
|
97
|
+
// @Input() delay? = 190; // Optional delay input, in ms
|
|
98
|
+
|
|
99
|
+
// private myPopup;
|
|
100
|
+
// private timer;
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
// ngOnDestroy(): void {
|
|
104
|
+
// if (this.myPopup) { this.myPopup.remove() }
|
|
105
|
+
// }
|
|
106
|
+
|
|
107
|
+
// @HostListener('mouseenter') onMouseEnter() {
|
|
108
|
+
// this.timer = setTimeout(() => {
|
|
109
|
+
// let x = this.el.nativeElement.getBoundingClientRect().left + this.el.nativeElement.offsetWidth / 2; // Get the middle of the element
|
|
110
|
+
// let y = this.el.nativeElement.getBoundingClientRect().top + this.el.nativeElement.offsetHeight + 6; // Get the bottom of the element, plus a little extra
|
|
111
|
+
// this.createTooltipPopup(x, y);
|
|
112
|
+
// }, this.delay)
|
|
113
|
+
// }
|
|
114
|
+
|
|
115
|
+
// @HostListener('mouseleave') onMouseLeave() {
|
|
116
|
+
// if (this.timer) clearTimeout(this.timer);
|
|
117
|
+
// if (this.myPopup) { this.myPopup.remove() }
|
|
118
|
+
// }
|
|
119
|
+
|
|
120
|
+
// private createTooltipPopup(x: number, y: number) {
|
|
121
|
+
// let popup = document.createElement('div');
|
|
122
|
+
// popup.innerHTML = this.tooltip2;
|
|
123
|
+
// popup.setAttribute("class", "tooltip-container");
|
|
124
|
+
// popup.style.top = y.toString() + "px";
|
|
125
|
+
// popup.style.left = x.toString() + "px";
|
|
126
|
+
// document.body.appendChild(popup);
|
|
127
|
+
// this.myPopup = popup;
|
|
128
|
+
// setTimeout(() => {
|
|
129
|
+
// if (this.myPopup) this.myPopup.remove();
|
|
130
|
+
// }, 5000); // Remove tooltip after 5 seconds
|
|
131
|
+
// }
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
}
|
|
@@ -60,7 +60,7 @@ export class LoginPage implements OnInit {
|
|
|
60
60
|
|
|
61
61
|
/** */
|
|
62
62
|
initialize() {
|
|
63
|
-
this.companyLogoBlackUrl = 'assets/chat21-logo.
|
|
63
|
+
this.companyLogoBlackUrl = 'assets/chat21-logo.png';
|
|
64
64
|
this.companyName = 'Tiledesk'; // this.chatManager.getTenant();
|
|
65
65
|
this.translations();
|
|
66
66
|
this.events.subscribe('sign-in', this.signIn);
|
|
@@ -3,7 +3,6 @@ import { BubbleMessageComponent } from './../../chatlib/conversation-detail/mess
|
|
|
3
3
|
import { CannedResponseComponent } from './../../components/canned-response/canned-response.component';
|
|
4
4
|
import { TruncatePipe } from './../../directives/truncate.pipe';
|
|
5
5
|
import { IonConversationDetailComponent } from '../../chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component';
|
|
6
|
-
import { TooltipModule } from 'ng2-tooltip-directive';
|
|
7
6
|
import { NgModule } from '@angular/core';
|
|
8
7
|
import { CommonModule } from '@angular/common';
|
|
9
8
|
import { FormsModule } from '@angular/forms';
|
|
@@ -32,7 +31,6 @@ import { InfoGroupComponent } from 'src/app/components/conversation-info/info-gr
|
|
|
32
31
|
|
|
33
32
|
|
|
34
33
|
import { SharedModule } from 'src/app/shared/shared.module';
|
|
35
|
-
import { NgxLinkifyjsModule } from 'ngx-linkifyjs';
|
|
36
34
|
import { ScrollbarThemeModule } from '../../utils/scrollbar-theme.directive';
|
|
37
35
|
import { PickerModule } from '@ctrl/ngx-emoji-mart';
|
|
38
36
|
|
|
@@ -42,7 +40,6 @@ import { PickerModule } from '@ctrl/ngx-emoji-mart';
|
|
|
42
40
|
CommonModule,
|
|
43
41
|
FormsModule,
|
|
44
42
|
IonicModule,
|
|
45
|
-
TooltipModule,
|
|
46
43
|
ConversationDetailPageRoutingModule,
|
|
47
44
|
ScrollbarThemeModule,
|
|
48
45
|
PickerModule,
|
|
@@ -54,7 +51,6 @@ import { PickerModule } from '@ctrl/ngx-emoji-mart';
|
|
|
54
51
|
},
|
|
55
52
|
}),
|
|
56
53
|
SharedModule,
|
|
57
|
-
NgxLinkifyjsModule,
|
|
58
54
|
],
|
|
59
55
|
// entryComponents: [MessageTextAreaComponent],
|
|
60
56
|
entryComponents: [ BubbleInfoPopoverComponent],
|
|
@@ -45,7 +45,8 @@
|
|
|
45
45
|
[conversationAvatar]="conversationAvatar"
|
|
46
46
|
[liveInfo]="liveInfo"
|
|
47
47
|
[translationsMap]="translationsHeaderMap"
|
|
48
|
-
[conv_type]="conv_type"
|
|
48
|
+
[conv_type]="conv_type"
|
|
49
|
+
(onOpenInfoConversation)="onOpenCloseInfoConversation($event)">
|
|
49
50
|
</app-header-conversation-detail>
|
|
50
51
|
|
|
51
52
|
<ion-content id="conv-details" [class.mobile]="isMobile">
|
|
@@ -250,8 +251,7 @@
|
|
|
250
251
|
|
|
251
252
|
<ion-col id="chat21-info-conversation" [class.mobile]="isMobile" [class.open]="openInfoConversation"
|
|
252
253
|
[ngClass]="{'info-convs-apps-sidebar-wide': appsidebarIsWide === true}">
|
|
253
|
-
<app-info-content
|
|
254
|
-
[openInfoConversation]="openInfoConversation"
|
|
254
|
+
<app-info-content
|
|
255
255
|
[loggedUser]="loggedUser"
|
|
256
256
|
[tenant]="tenant"
|
|
257
257
|
[groupDetail]="groupDetail"
|