@chat21/chat21-ionic 3.4.30-rc2 → 3.4.30
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 +4 -119
- package/angular.json +0 -1
- package/package.json +1 -1
- package/src/app/app.component.html +1 -3
- package/src/app/app.component.ts +16 -71
- package/src/app/chatlib/conversation-detail/message/image/image.component.html +0 -1
- package/src/app/chatlib/conversation-detail/message/image/image.component.ts +0 -19
- package/src/app/components/canned-response/canned-response.component.html +23 -26
- package/src/app/components/canned-response/canned-response.component.scss +2 -0
- package/src/app/components/canned-response/canned-response.component.ts +1 -3
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +1 -24
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +0 -30
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +9 -39
- package/src/app/components/conversation-info/info-content/info-content.component.ts +2 -2
- package/src/app/components/conversation-info/info-group/info-group.component.ts +21 -23
- package/src/app/components/conversations-list/header-conversations-list/header-conversations-list.component.html +1 -1
- package/src/app/components/conversations-list/header-conversations-list/header-conversations-list.component.ts +1 -5
- package/src/app/components/navbar/navbar.component.html +3 -3
- package/src/app/components/navbar/navbar.component.ts +38 -29
- package/src/app/components/project-item/project-item.component.ts +11 -11
- package/src/app/components/sidebar/sidebar.component.html +45 -65
- package/src/app/components/sidebar/sidebar.component.ts +117 -110
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +2 -2
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +7 -10
- package/src/app/modals/create-ticket/create-ticket.page.ts +2 -4
- package/src/app/pages/conversation-detail/conversation-detail.page.html +3 -7
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +7 -95
- package/src/app/pages/conversations-list/conversations-list.page.html +0 -2
- package/src/app/pages/conversations-list/conversations-list.page.ts +2 -40
- package/src/app/services/global-settings/global-settings.service.ts +3 -11
- package/src/app/services/nav-proxy.service.ts +1 -0
- package/src/app/services/tiledesk/tiledesk.service.ts +16 -0
- package/src/app/services/triggerEvents/triggerEvents.ts +0 -28
- package/src/app/services/websocket/websocket-js.ts +534 -59
- package/src/app/services/websocket/websocket.service.ts +10 -9
- package/src/app/shared/shared.module.ts +2 -11
- package/src/app/utils/globals.ts +0 -2
- package/src/app/utils/project-utils.ts +2 -2
- package/src/app/utils/utils.ts +1 -18
- package/src/assets/i18n/ar.json +1 -11
- package/src/assets/i18n/az.json +1 -11
- package/src/assets/i18n/de.json +1 -11
- package/src/assets/i18n/en.json +1 -11
- package/src/assets/i18n/es.json +1 -11
- package/src/assets/i18n/fr.json +1 -11
- package/src/assets/i18n/it.json +3 -13
- package/src/assets/i18n/kk.json +1 -11
- package/src/assets/i18n/pt.json +1 -11
- package/src/assets/i18n/ru.json +1 -11
- package/src/assets/i18n/sr.json +1 -11
- package/src/assets/i18n/sv.json +1 -11
- package/src/assets/i18n/tr.json +1 -11
- package/src/assets/i18n/uk.json +1 -11
- package/src/assets/i18n/uz.json +1 -12
- package/src/assets/js/chat21client.js +0 -36
- package/src/assets/test.html +2 -5
- package/src/chat-config-template.json +0 -1
- package/src/chat-config.json +0 -1
- package/src/chat21-core/providers/abstract/upload.service.ts +1 -5
- package/src/chat21-core/providers/firebase/firebase-conversation-handler.ts +1 -1
- package/src/chat21-core/providers/firebase/firebase-upload.service.ts +9 -136
- package/src/chat21-core/providers/mqtt/mqtt-conversation-handler.ts +1 -1
- package/src/chat21-core/providers/native/native-image-repo.ts +1 -1
- package/src/chat21-core/providers/native/native-upload-service.ts +45 -143
- package/src/chat21-core/providers/tiledesk/tiledesk-auth.service.ts +0 -3
- package/src/chat21-core/utils/utils.ts +2 -16
- package/src/app/services/project_users/project-users.service.spec.ts +0 -16
- package/src/app/services/project_users/project-users.service.ts +0 -63
- package/src/app/services/websocket/websocket-js_old.ts +0 -578
- package/src/app/services/websocket/websocket.worker.ts +0 -242
- package/src/app/utils/permissions.constants.ts +0 -138
- package/src/assets/img/no_data_found.png +0 -0
- package/src/assets/js/agentDesktop-sdk.js +0 -55
- package/src/assets/js/mqtt-keepalive-worker.js +0 -53
- package/src/chat21-core/models/projectUsers.ts +0 -19
package/CHANGELOG.md
CHANGED
|
@@ -8,11 +8,8 @@
|
|
|
8
8
|
### **Copyrigth**:
|
|
9
9
|
*Tiledesk SRL*
|
|
10
10
|
|
|
11
|
-
# 3.4.
|
|
12
|
-
- **changed**:
|
|
13
|
-
|
|
14
|
-
# 3.4.29-rc1
|
|
15
|
-
- **changed**: API for upload a file/image into chat
|
|
11
|
+
# 3.4.30 in PROD
|
|
12
|
+
- **changed**: when the app is in background, play a sound whenever a new message arrives.
|
|
16
13
|
|
|
17
14
|
# 3.4.29 in PROD
|
|
18
15
|
- **bug-fixed**: web (Chrome >= 144) `ion-content` stopped scrolling on some pages (conversation list / contacts directory / unassigned); removed the forced `--overflow: hidden` and handled scrolling on Ionic’s internal scroll container via `ion-content::part(scroll)`
|
|
@@ -23,99 +20,6 @@
|
|
|
23
20
|
# 3.4.27 in PROD
|
|
24
21
|
- **bug-fixed**: cannot find route if userFullname contains /
|
|
25
22
|
|
|
26
|
-
# 3.4.29-rc1
|
|
27
|
-
- **bug-fixed**: web (Chrome >= 144) `ion-content` stopped scrolling on some pages (conversation list / contacts directory / unassigned); removed the forced `--overflow: hidden` and handled scrolling on Ionic’s internal scroll container via `ion-content::part(scroll)`
|
|
28
|
-
|
|
29
|
-
# 3.4.28-rc1
|
|
30
|
-
- **bug-fixed**: cannot do project subscription if last_project object is not a project_user obj
|
|
31
|
-
|
|
32
|
-
# 3.4.27-rc26
|
|
33
|
-
- **bug-fixed**: wss push requests twice
|
|
34
|
-
|
|
35
|
-
# 3.4.27-rc25
|
|
36
|
-
- **bug-fixed**: projectUserService is not initialized
|
|
37
|
-
|
|
38
|
-
# 3.4.27-rc24
|
|
39
|
-
- **added**: implementation of multiple message in wss onmessage
|
|
40
|
-
|
|
41
|
-
# 3.4.27-rc23
|
|
42
|
-
- **added**: keepAlive worker for MQTT connection
|
|
43
|
-
|
|
44
|
-
# 3.4.27-rc22
|
|
45
|
-
- **added**: new WsWorker to manage iframe chrome throttling while tab is in background or hidden
|
|
46
|
-
|
|
47
|
-
# 3.4.27-rc21
|
|
48
|
-
- **changed**: new wss reconnect and timeout keepalive
|
|
49
|
-
- **bug-fixed**: cannot route if senderFullaname contains /
|
|
50
|
-
|
|
51
|
-
# 3.4.27-rc20
|
|
52
|
-
- **added**: onOpenTicketExternally event in triggerEvents service
|
|
53
|
-
|
|
54
|
-
# 3.4.27-rc19
|
|
55
|
-
- **added**: window.parent['openTicketOnHDA']
|
|
56
|
-
|
|
57
|
-
# 3.4.27-rc18
|
|
58
|
-
- **added**: triggerOnUpdateNewConversationBadge to update conversation badge count in parent component
|
|
59
|
-
|
|
60
|
-
# 3.4.27-rc17
|
|
61
|
-
- **bug-fixed**: setNotification not called when click on a conversation
|
|
62
|
-
|
|
63
|
-
# 3.4.27-rc16
|
|
64
|
-
- **bug-fixed**: setNotification not called when resolve a conversation
|
|
65
|
-
|
|
66
|
-
# 3.4.27-rc15
|
|
67
|
-
- **changed**: /images with /img in assets folder
|
|
68
|
-
|
|
69
|
-
# 3.4.27-rc14
|
|
70
|
-
- **added**: DISPLAY_EDIT_PROFILE brand variable
|
|
71
|
-
- **bug-fixed**: emojii is sent also if is not allowed
|
|
72
|
-
|
|
73
|
-
# 3.4.27-rc13
|
|
74
|
-
- **added**: ability to mantain logout parameter when redirect to dashboard urls from sidebar component
|
|
75
|
-
|
|
76
|
-
# 3.4.27-rc12
|
|
77
|
-
- **added**: ability to manage logOut option in sidebar-user-detail with tiledesk_logOut url query params
|
|
78
|
-
|
|
79
|
-
# 3.4.27-rc11
|
|
80
|
-
- **bug-fixed**: fixed infinite loading in contact list
|
|
81
|
-
|
|
82
|
-
# 3.4.27-rc10
|
|
83
|
-
- **added**: ability to manage header-conversation-list with roles
|
|
84
|
-
- **bug-fixed**: members in group list not loaded
|
|
85
|
-
|
|
86
|
-
# 3.4.27-rc9
|
|
87
|
-
- **bug-fixed**: Scrolling to the last message when opening a conversation
|
|
88
|
-
- **bug-fixed**: Loading in the conversation list disabled when removing the last conversation
|
|
89
|
-
|
|
90
|
-
# 3.4.27-rc8
|
|
91
|
-
- **added**: ability to open ticket to external service
|
|
92
|
-
- **added**: ticketSection env var
|
|
93
|
-
|
|
94
|
-
# 3.4.27-rc7
|
|
95
|
-
- **bug-fixed**: Scrolling to the last message when opening a conversation
|
|
96
|
-
- **bug-fixed**: Loading in the conversation list disabled when removing the last conversation
|
|
97
|
-
|
|
98
|
-
# 3.4.27-rc6
|
|
99
|
-
- **bug-fixed**: user for dashboard app is incorrect
|
|
100
|
-
|
|
101
|
-
# 3.4.27-rc5
|
|
102
|
-
- **added**: managed roles in sidebar e navbar
|
|
103
|
-
- **bug-fixed**: projectId and supportMode url is not saved in localstorage
|
|
104
|
-
|
|
105
|
-
# 3.4.27-rc4
|
|
106
|
-
- **bug-fixed**: extractUrls function is not able to detect url start with www or without https/http
|
|
107
|
-
- **bug-fixed**: if message is sent with keydown, error on domain check is not showed
|
|
108
|
-
|
|
109
|
-
# 3.4.27-rc3
|
|
110
|
-
- **bug-fixed**: cannot set user availability if supportMode is enabled and tiledesk_projectID url params is set
|
|
111
|
-
|
|
112
|
-
# 3.4.27-rc2
|
|
113
|
-
- **bug-fixed**: cannede responses role
|
|
114
|
-
|
|
115
|
-
# 3.4.27-rc1
|
|
116
|
-
- **added**: managed canned responses with roles
|
|
117
|
-
- **changed**: name in info mesage
|
|
118
|
-
|
|
119
23
|
# 3.4.26 in PROD
|
|
120
24
|
|
|
121
25
|
# 3.4.26-rc2
|
|
@@ -124,7 +28,6 @@
|
|
|
124
28
|
# 3.4.26-rc1
|
|
125
29
|
- **added**: tiledesk_projectID query param to manage user status
|
|
126
30
|
- **added**: token to managane ticket feature
|
|
127
|
-
- **added**: getOsCode login into utils.ts
|
|
128
31
|
|
|
129
32
|
# 3.4.25 in PROD
|
|
130
33
|
- **changed**: pipe marked to support malicious text input
|
|
@@ -147,24 +50,6 @@
|
|
|
147
50
|
# 3.4.22 in PROD
|
|
148
51
|
- **added**: managed allowed_upload_extentions from project settings
|
|
149
52
|
|
|
150
|
-
# 3.4.21-rc6
|
|
151
|
-
- **added**: managed allowed_upload_extentions from project settings
|
|
152
|
-
|
|
153
|
-
# 3.4.21-rc5
|
|
154
|
-
- **added**: setConversation as read when agent click on it
|
|
155
|
-
|
|
156
|
-
# 3.4.21-rc4
|
|
157
|
-
- **added**: ability to init and decrement new conversation count badge
|
|
158
|
-
|
|
159
|
-
# 3.4.21-rc3
|
|
160
|
-
- **changed**: badge notification for agentDesktop
|
|
161
|
-
|
|
162
|
-
# 3.4.21-rc2
|
|
163
|
-
- **added**: count in newConversation handler event
|
|
164
|
-
|
|
165
|
-
# 3.4.21-rc1
|
|
166
|
-
- **added**: implement badge notification for agentDesktop sw when new conversation is assigned to logged agent
|
|
167
|
-
|
|
168
53
|
# 3.4.21 in PROD
|
|
169
54
|
|
|
170
55
|
# 3.4.20 in PROD
|
|
@@ -178,8 +63,8 @@
|
|
|
178
63
|
- **bug-fixed**: minor fix on ion-texarea element with allowed url domain
|
|
179
64
|
|
|
180
65
|
# 3.4.19-rc1
|
|
181
|
-
-
|
|
182
|
-
-
|
|
66
|
+
- added: ability to check for if emoji is allowd to be sent in message textarea
|
|
67
|
+
- added: ability to check for if url domain is allowd to be sent in message textarea
|
|
183
68
|
|
|
184
69
|
# 3.4.18 in PROD
|
|
185
70
|
|
package/angular.json
CHANGED
package/package.json
CHANGED
|
@@ -21,9 +21,7 @@
|
|
|
21
21
|
</div> -->
|
|
22
22
|
|
|
23
23
|
<div class="user-details-sidebar" [ngClass]="{'hide-sidebar': IS_ONLINE === false || IS_ON_MOBILE_DEVICE || SUPPORT_MODE === false}">
|
|
24
|
-
<app-sidebar-user-details
|
|
25
|
-
[logOut]="g?.logOut">
|
|
26
|
-
</app-sidebar-user-details>
|
|
24
|
+
<app-sidebar-user-details> </app-sidebar-user-details>
|
|
27
25
|
</div>
|
|
28
26
|
|
|
29
27
|
<ion-split-pane when="md" contentId="main" [ngClass]="{'mobile': IS_ON_MOBILE_DEVICE, 'sidebar-hidden': IS_ON_MOBILE_DEVICE || SUPPORT_MODE === false}">
|
package/src/app/app.component.ts
CHANGED
|
@@ -44,9 +44,6 @@ import { conversationToMessage } from 'src/chat21-core/utils/utils-message';
|
|
|
44
44
|
import { ProjectService } from './services/projects/project.service';
|
|
45
45
|
import { ContactsService } from './services/contacts/contacts.service';
|
|
46
46
|
import { TiledeskService } from './services/tiledesk/tiledesk.service';
|
|
47
|
-
import { Project } from 'src/chat21-core/models/projects';
|
|
48
|
-
import { BRAND_BASE_INFO } from './utils/utils-resources';
|
|
49
|
-
import { ProjectUsersService } from './services/project_users/project-users.service';
|
|
50
47
|
|
|
51
48
|
@Component({
|
|
52
49
|
selector: 'app-root',
|
|
@@ -122,6 +119,7 @@ export class AppComponent implements OnInit {
|
|
|
122
119
|
private navService: NavProxyService,
|
|
123
120
|
// public chatPresenceHandler: ChatPresenceHandler,
|
|
124
121
|
public typingService: TypingService,
|
|
122
|
+
public uploadService: UploadService,
|
|
125
123
|
public appStorageService: AppStorageService,
|
|
126
124
|
|
|
127
125
|
// public chatConversationsHandler: ChatConversationsHandler,
|
|
@@ -144,7 +142,6 @@ export class AppComponent implements OnInit {
|
|
|
144
142
|
/**TILEDESK SERVICES */
|
|
145
143
|
private tiledeskService: TiledeskService,
|
|
146
144
|
private projectService: ProjectService,
|
|
147
|
-
private projectUsersService: ProjectUsersService,
|
|
148
145
|
private contactsService: ContactsService
|
|
149
146
|
) {
|
|
150
147
|
|
|
@@ -171,7 +168,6 @@ export class AppComponent implements OnInit {
|
|
|
171
168
|
}, { capture: true });
|
|
172
169
|
}
|
|
173
170
|
|
|
174
|
-
|
|
175
171
|
listenChatAlreadyOpenWithoutParamsInMobileMode() {
|
|
176
172
|
this.events.subscribe('noparams:mobile', (isAlreadyOpenInMobileMode) => {
|
|
177
173
|
// console.log('[APP-COMP] Chat is Already Open In Mobile Mode ', isAlreadyOpenInMobileMode)
|
|
@@ -300,10 +296,6 @@ export class AppComponent implements OnInit {
|
|
|
300
296
|
this.zone = new NgZone({}); // a cosa serve?
|
|
301
297
|
|
|
302
298
|
this.SUPPORT_MODE = this.g.supportMode
|
|
303
|
-
this.logger.info('[APP-COMP] this.SUPPORT_MODE', this.SUPPORT_MODE)
|
|
304
|
-
|
|
305
|
-
BRAND_BASE_INFO['LOGOUT_ENABLED'] = this.g.logOut
|
|
306
|
-
this.logger.info('[APP-COMP] this.logOut', BRAND_BASE_INFO['LOGOUT_ENABLED'])
|
|
307
299
|
}
|
|
308
300
|
|
|
309
301
|
});
|
|
@@ -340,7 +332,7 @@ export class AppComponent implements OnInit {
|
|
|
340
332
|
|
|
341
333
|
listenToPostMsgs() {
|
|
342
334
|
window.addEventListener("message", (event) => {
|
|
343
|
-
|
|
335
|
+
this.logger.log("[APP-COMP] message event ", event);
|
|
344
336
|
|
|
345
337
|
if (event && event.data && event.data.action && event.data.parameter) {
|
|
346
338
|
if (event.data.action === 'openJoinConversationModal') {
|
|
@@ -542,10 +534,10 @@ export class AppComponent implements OnInit {
|
|
|
542
534
|
this.statusBar.styleLightContent();
|
|
543
535
|
this.navService.init(this.sidebarNav, this.detailNav);
|
|
544
536
|
this.tiledeskAuthService.initialize(this.appConfigProvider.getConfig().apiUrl);
|
|
545
|
-
|
|
537
|
+
this.messagingAuthService.initialize();
|
|
538
|
+
|
|
546
539
|
// this.currentUserService.initialize();
|
|
547
540
|
this.chatManager.initialize();
|
|
548
|
-
this.messagingAuthService.initialize();
|
|
549
541
|
this.presenceService.initialize(this.tenant);
|
|
550
542
|
this.typingService.initialize(this.tenant);
|
|
551
543
|
|
|
@@ -555,6 +547,7 @@ export class AppComponent implements OnInit {
|
|
|
555
547
|
if (pushEngine && pushEngine !== 'none') {
|
|
556
548
|
this.notificationsService.initialize(this.tenant, vap_id_Key, platform)
|
|
557
549
|
}
|
|
550
|
+
this.uploadService.initialize();
|
|
558
551
|
|
|
559
552
|
this.setLanguage(null)
|
|
560
553
|
this.initAuthentication();
|
|
@@ -871,8 +864,7 @@ export class AppComponent implements OnInit {
|
|
|
871
864
|
// console.log('[APP-COMP] PLATFORM', PLATFORM_MOBILE, 'route.snapshot', this.route.snapshot);
|
|
872
865
|
if (!IDConv) {
|
|
873
866
|
this.logger.log('[APP-COMP] navigateByUrl -- conversations-list');
|
|
874
|
-
|
|
875
|
-
this.router.navigateByUrl('conversations-list' + queryString);
|
|
867
|
+
this.router.navigateByUrl('conversations-list')
|
|
876
868
|
}
|
|
877
869
|
// this.router.navigateByUrl(pageUrl);
|
|
878
870
|
// this.navService.setRoot(ConversationListPage, {});
|
|
@@ -1123,19 +1115,13 @@ export class AppComponent implements OnInit {
|
|
|
1123
1115
|
if (conversation && conversation.is_new === true && this.isInitialized) {
|
|
1124
1116
|
this.manageTabNotification('conv_added', conversation.sound)
|
|
1125
1117
|
this.manageEventNewConversation(conversation)
|
|
1126
|
-
//UPDATE NOTIFICATION FOR NEW CONVERSATION COUNT
|
|
1127
|
-
this.triggerOnUpdateNewConversationBadge(this.conversationsHandlerService.countIsNew());
|
|
1128
1118
|
}
|
|
1129
1119
|
if(conversation) this.updateConversationsOnStorage()
|
|
1130
1120
|
});
|
|
1131
1121
|
|
|
1132
1122
|
this.conversationsHandlerService.conversationChanged.subscribe((conversation: ConversationModel) => {
|
|
1133
1123
|
// console.log('[APP-COMP] ***** subscribeConversationChanged conversation: ', conversation);
|
|
1134
|
-
if(conversation)
|
|
1135
|
-
this.updateConversationsOnStorage();
|
|
1136
|
-
//UPDATE NOTIFICATION FOR NEW CONVERSATION COUNT
|
|
1137
|
-
this.triggerOnUpdateNewConversationBadge(this.conversationsHandlerService.countIsNew());
|
|
1138
|
-
}
|
|
1124
|
+
if(conversation) this.updateConversationsOnStorage();
|
|
1139
1125
|
});
|
|
1140
1126
|
|
|
1141
1127
|
this.conversationsHandlerService.conversationChangedDetailed.subscribe((changes: {value: ConversationModel, previousValue: ConversationModel}) => {
|
|
@@ -1146,6 +1132,10 @@ export class AppComponent implements OnInit {
|
|
|
1146
1132
|
if (changes.value && changes.value.sender !== currentUser.uid) {
|
|
1147
1133
|
let checkIfStatusChanged = changes.value.is_new === changes.previousValue.is_new? true: false
|
|
1148
1134
|
let checkIfUidChanged = changes.value.uid === changes.previousValue.uid? true: false
|
|
1135
|
+
if(!this.isTabVisible){
|
|
1136
|
+
this.manageTabNotification('new_message', true);
|
|
1137
|
+
return
|
|
1138
|
+
}
|
|
1149
1139
|
if(changes.value.is_new && checkIfStatusChanged && checkIfUidChanged){
|
|
1150
1140
|
this.manageTabNotification('new_message', true);
|
|
1151
1141
|
}
|
|
@@ -1159,8 +1149,6 @@ export class AppComponent implements OnInit {
|
|
|
1159
1149
|
if(conversation) {
|
|
1160
1150
|
this.updateConversationsOnStorage();
|
|
1161
1151
|
this.segmentResolved(conversation);
|
|
1162
|
-
//UPDATE NOTIFICATION FOR NEW CONVERSATION COUNT
|
|
1163
|
-
this.triggerOnUpdateNewConversationBadge(this.conversationsHandlerService.countIsNew());
|
|
1164
1152
|
this.router.navigateByUrl('conversation-detail/'); //redirect to basePage
|
|
1165
1153
|
}
|
|
1166
1154
|
});
|
|
@@ -1194,7 +1182,6 @@ export class AppComponent implements OnInit {
|
|
|
1194
1182
|
this.chatManager.setCurrentUser(currentUser);
|
|
1195
1183
|
|
|
1196
1184
|
this.tiledeskService.initialize(serverBaseURL)
|
|
1197
|
-
this.projectUsersService.initialize(serverBaseURL)
|
|
1198
1185
|
this.projectService.initialize(serverBaseURL)
|
|
1199
1186
|
this.contactsService.initialize(serverBaseURL)
|
|
1200
1187
|
|
|
@@ -1202,14 +1189,11 @@ export class AppComponent implements OnInit {
|
|
|
1202
1189
|
this.events.publish('go:online', true);
|
|
1203
1190
|
// this.chatManager.startApp();
|
|
1204
1191
|
|
|
1205
|
-
|
|
1206
|
-
//INIT WEBSOCKET
|
|
1207
|
-
this.connetWebsocket(tiledeskToken)
|
|
1208
|
-
|
|
1209
1192
|
// ----------------------------------------------
|
|
1210
1193
|
// PUSH NOTIFICATIONS
|
|
1211
1194
|
// ----------------------------------------------
|
|
1212
1195
|
const pushEngine = this.appConfigProvider.getConfig().pushEngine
|
|
1196
|
+
|
|
1213
1197
|
if (currentUser) {
|
|
1214
1198
|
if (pushEngine && pushEngine !== 'none') {
|
|
1215
1199
|
this.notificationsService.getNotificationPermissionAndSaveToken(currentUser.uid);
|
|
@@ -1231,24 +1215,6 @@ export class AppComponent implements OnInit {
|
|
|
1231
1215
|
} catch (err) {
|
|
1232
1216
|
this.logger.error('[APP-COMP] -> error:', err);
|
|
1233
1217
|
}
|
|
1234
|
-
|
|
1235
|
-
// ----------------------------------------------
|
|
1236
|
-
// LAST PROJECT FROM URL
|
|
1237
|
-
// ----------------------------------------------
|
|
1238
|
-
if(this.g.projectID){
|
|
1239
|
-
this.projectService.getProjects().subscribe({ next: (projects: Project[]) => {
|
|
1240
|
-
const project = projects.find(prjct => prjct.id_project._id === this.g.projectID)
|
|
1241
|
-
if(project){
|
|
1242
|
-
this.logger.log('[APP-COMP] - GET PROJECT - project found with this.projectID', project);
|
|
1243
|
-
localStorage.setItem('last_project', JSON.stringify(project))
|
|
1244
|
-
this.events.publish('storage:last_project', project)
|
|
1245
|
-
}
|
|
1246
|
-
}, error: (error) => {
|
|
1247
|
-
this.logger.log('[APP-COMP] - GET PROJECT - project NOT found with this.projectID', this.g.projectID, error);
|
|
1248
|
-
}, complete: () => {
|
|
1249
|
-
|
|
1250
|
-
}});
|
|
1251
|
-
}
|
|
1252
1218
|
}
|
|
1253
1219
|
|
|
1254
1220
|
|
|
@@ -1289,21 +1255,9 @@ export class AppComponent implements OnInit {
|
|
|
1289
1255
|
}
|
|
1290
1256
|
|
|
1291
1257
|
goToDashboardLogin(){
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
}
|
|
1296
|
-
|
|
1297
|
-
connetWebsocket(tiledeskToken) {
|
|
1298
|
-
|
|
1299
|
-
this.logger.log('[WEBSOCKET-JS] connetWebsocket called in [PROJECT-ITEM] tiledeskToken ', tiledeskToken)
|
|
1300
|
-
const appconfig = this.appConfigProvider.getConfig();
|
|
1301
|
-
this.logger.log('[WEBSOCKET-JS] connetWebsocket called in [PROJECT-ITEM] wsUrl ', appconfig.wsUrl)
|
|
1302
|
-
const WS_URL = appconfig.wsUrl + '?token=' + tiledeskToken
|
|
1303
|
-
this.logger.log('[WEBSOCKET-JS] connetWebsocket called in [PROJECT-ITEM] wsUrl ', WS_URL)
|
|
1304
|
-
this.webSocketJs.init(
|
|
1305
|
-
WS_URL
|
|
1306
|
-
);
|
|
1258
|
+
let DASHBOARD_URL = this.appConfigProvider.getConfig().dashboardUrl + '#/login'
|
|
1259
|
+
const myWindow = window.open(DASHBOARD_URL, '_self');
|
|
1260
|
+
myWindow.focus();
|
|
1307
1261
|
}
|
|
1308
1262
|
|
|
1309
1263
|
|
|
@@ -1402,8 +1356,7 @@ export class AppComponent implements OnInit {
|
|
|
1402
1356
|
|
|
1403
1357
|
subscribeConversationSelected= (conversation: ConversationModel) => {
|
|
1404
1358
|
if(conversation && conversation.is_new){
|
|
1405
|
-
this.audio_NewConv.pause()
|
|
1406
|
-
this.conversationsHandlerService.setConversationRead(conversation.uid)
|
|
1359
|
+
this.audio_NewConv.pause()
|
|
1407
1360
|
}
|
|
1408
1361
|
}
|
|
1409
1362
|
|
|
@@ -1479,9 +1432,6 @@ export class AppComponent implements OnInit {
|
|
|
1479
1432
|
this.logger.debug('[APP-COMP]-CONVS - INIT CONV CONVS 2', conversations)
|
|
1480
1433
|
this.events.publish('appcompSubscribeToConvs:loadingIsActive', false);
|
|
1481
1434
|
}
|
|
1482
|
-
|
|
1483
|
-
//INIT NOTIFICATION FOR NEW CONVERSATION COUNT
|
|
1484
|
-
this.triggerOnUpdateNewConversationBadge(this.conversationsHandlerService.countIsNew());
|
|
1485
1435
|
});
|
|
1486
1436
|
|
|
1487
1437
|
}
|
|
@@ -1764,11 +1714,6 @@ export class AppComponent implements OnInit {
|
|
|
1764
1714
|
this.triggerEvents.triggerOnInit(detailOBJ)
|
|
1765
1715
|
}
|
|
1766
1716
|
|
|
1767
|
-
private triggerOnUpdateNewConversationBadge(count: number){
|
|
1768
|
-
const detailOBJ = { event: 'onUpdateNewConversationBadge', count: count.toString() }
|
|
1769
|
-
this.triggerEvents.triggerOnUpdateNewConversationBadge(detailOBJ)
|
|
1770
|
-
}
|
|
1771
|
-
|
|
1772
1717
|
|
|
1773
1718
|
// @HostListener('mouseenter', ['$event'])
|
|
1774
1719
|
// onMouseEnter(event: any) {
|
|
@@ -15,7 +15,6 @@ export class ImageComponent implements OnInit {
|
|
|
15
15
|
loading: boolean = true
|
|
16
16
|
modal: any
|
|
17
17
|
span: any
|
|
18
|
-
private readonly fallbackSrc = 'assets/img/no_data_found.png'
|
|
19
18
|
|
|
20
19
|
constructor() { }
|
|
21
20
|
|
|
@@ -27,24 +26,6 @@ export class ImageComponent implements OnInit {
|
|
|
27
26
|
this.onElementRendered.emit({element: "image", status:true})
|
|
28
27
|
}
|
|
29
28
|
|
|
30
|
-
onError(event: Event) {
|
|
31
|
-
this.loading = false
|
|
32
|
-
const img = event?.target as HTMLImageElement | null
|
|
33
|
-
if (!img) {
|
|
34
|
-
return
|
|
35
|
-
}
|
|
36
|
-
// avoid infinite loop if fallback image fails too
|
|
37
|
-
if (img.src && img.src.includes(this.fallbackSrc)) {
|
|
38
|
-
return
|
|
39
|
-
}
|
|
40
|
-
img.src = this.fallbackSrc
|
|
41
|
-
// also update metadata so click-to-open uses the fallback consistently
|
|
42
|
-
if (this.metadata) {
|
|
43
|
-
this.metadata.src = this.fallbackSrc
|
|
44
|
-
}
|
|
45
|
-
this.onElementRendered.emit({ element: 'image', status: true })
|
|
46
|
-
}
|
|
47
|
-
|
|
48
29
|
_downloadImage(url: string, fileName: string) {
|
|
49
30
|
// console.log('Image COMP - IMAGE URL ', url)
|
|
50
31
|
// console.log('Image COMP - IMAGE FILENAME ', fileName)
|
|
@@ -1,30 +1,20 @@
|
|
|
1
1
|
<div>
|
|
2
|
-
<div class="canned-list" *ngIf="
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
<ion-input [class.readonly]="canned?.disabled" [readonly]="canned?.disabled" type="text" [(ngModel)]="canned.text" class="text truncate"></ion-input>
|
|
11
|
-
</div>
|
|
12
|
-
<!-- <ion-icon class="canned-item-icon" name="pin" src="assets/img/pin.svg" slot=end *ngIf="canned.pinned" (click)="onPinCanned(canned, $event)"></ion-icon>
|
|
13
|
-
<ion-icon class="canned-item-icon" name="pin" src="assets/img/pinned.svg" slot=end (click)="onUnPinCanned(canned, $event)"></ion-icon> -->
|
|
14
|
-
<ion-icon class="canned-item-icon" name="checkmark-sharp" slot=end *ngIf="(canned.createdBy === loggedUser.uid && !canned.disabled) && roles[PERMISSIONS.CANNED_RESPONSES_UPDATE]" (click)="onConfirmEditCanned(canned, $event)"></ion-icon>
|
|
15
|
-
<ion-icon class="canned-item-icon" name="pencil-sharp" slot=end *ngIf="(canned.createdBy === loggedUser.uid && canned.disabled) && roles[PERMISSIONS.CANNED_RESPONSES_UPDATE]" (click)="onEditCanned(canned, $event)"></ion-icon>
|
|
16
|
-
<ion-icon class="canned-item-icon" name="trash-bin-outline" slot=end *ngIf="(canned.createdBy === loggedUser.uid) && roles[PERMISSIONS.CANNED_RESPONSES_DELETE]" (click)="onDeleteCanned(canned, $event)"></ion-icon>
|
|
17
|
-
</ion-item>
|
|
18
|
-
</span>
|
|
19
|
-
<div class="no-data" *ngIf="tagsCannedFilter.length === 0">
|
|
20
|
-
<div class="container">
|
|
21
|
-
<ion-item button="false" lines="none" class="canned-item no-ripple border">
|
|
22
|
-
<ion-icon name="cloud-offline" slot="start"></ion-icon>
|
|
23
|
-
<ion-label>{{translationMap.get('THERE_ARE_NO_CANNED_RESPONSES_AVAILABLE')}}</ion-label>
|
|
24
|
-
</ion-item>
|
|
2
|
+
<div class="canned-list" *ngIf="tagsCannedFilter.length > 0">
|
|
3
|
+
<ion-item button="true" [ngClass]="{'is_active_item': i == arrowkeyLocation}" lines="none"
|
|
4
|
+
class="canned-item no-ripple border" id="{{'canned-item_'+ i }}"
|
|
5
|
+
*ngFor="let canned of tagsCannedFilter; let i = index;"
|
|
6
|
+
(click)="onClickCannedFN(canned, $event)">
|
|
7
|
+
<div class="cannedContent">
|
|
8
|
+
<ion-input [class.readonly]="canned?.disabled" [readonly]="canned?.disabled" type="text" [(ngModel)]="canned.title" class="title" id="{{'titleCanned_'+canned._id}}" #title></ion-input>
|
|
9
|
+
<ion-input [class.readonly]="canned?.disabled" [readonly]="canned?.disabled" type="text" [(ngModel)]="canned.text" class="text truncate"></ion-input>
|
|
25
10
|
</div>
|
|
26
|
-
|
|
27
|
-
|
|
11
|
+
<!-- <ion-icon class="canned-item-icon" name="pin" src="assets/img/pin.svg" slot=end *ngIf="canned.pinned" (click)="onPinCanned(canned, $event)"></ion-icon>
|
|
12
|
+
<ion-icon class="canned-item-icon" name="pin" src="assets/img/pinned.svg" slot=end (click)="onUnPinCanned(canned, $event)"></ion-icon> -->
|
|
13
|
+
<ion-icon class="canned-item-icon" name="checkmark-sharp" slot=end *ngIf="canned.createdBy === loggedUser.uid && !canned.disabled" (click)="onConfirmEditCanned(canned, $event)"></ion-icon>
|
|
14
|
+
<ion-icon class="canned-item-icon" name="pencil-sharp" slot=end *ngIf="canned.createdBy === loggedUser.uid && canned.disabled" (click)="onEditCanned(canned, $event)"></ion-icon>
|
|
15
|
+
<ion-icon class="canned-item-icon" name="trash-bin-outline" slot=end *ngIf="canned.createdBy === loggedUser.uid" (click)="onDeleteCanned(canned, $event)"></ion-icon>
|
|
16
|
+
</ion-item>
|
|
17
|
+
<ion-item class="canned-item add-canned-response-wpr" button="true" lines="none" (click)="onClickAddCannedResponseFN()">
|
|
28
18
|
<ion-icon class="add-canned-response-icon" name="flash-outline"></ion-icon>
|
|
29
19
|
<span class="add-canned-response-add-icon">+</span>
|
|
30
20
|
<label class="add-canned-response-label" >{{translationMap?.get('AddNewCannedResponse')}}</label>
|
|
@@ -43,5 +33,12 @@
|
|
|
43
33
|
<div class="label">{{translationMap.get('LABEL_LOADING')}}</div>
|
|
44
34
|
</div>
|
|
45
35
|
</div>
|
|
46
|
-
|
|
36
|
+
<div class="no-data" *ngIf="tagsCannedFilter.length === 0 && !showLoading">
|
|
37
|
+
<div class="container">
|
|
38
|
+
<ion-item button="false" lines="none" class="canned-item no-ripple border">
|
|
39
|
+
<ion-icon name="cloud-offline" slot="start"></ion-icon>
|
|
40
|
+
<ion-label>{{translationMap.get('THERE_ARE_NO_CANNED_RESPONSES_AVAILABLE')}}</ion-label>
|
|
41
|
+
</ion-item>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
47
44
|
</div>
|
|
@@ -9,7 +9,6 @@ import { TiledeskAuthService } from 'src/chat21-core/providers/tiledesk/tiledesk
|
|
|
9
9
|
import { compareValues, htmlEntities } from 'src/chat21-core/utils/utils';
|
|
10
10
|
import { getProjectIdSelectedConversation } from 'src/chat21-core/utils/utils-message';
|
|
11
11
|
import { PLAN_NAME } from 'src/chat21-core/utils/constants';
|
|
12
|
-
import { PERMISSIONS } from 'src/app/utils/permissions.constants';
|
|
13
12
|
|
|
14
13
|
@Component({
|
|
15
14
|
selector: 'app-canned-response',
|
|
@@ -22,7 +21,7 @@ export class CannedResponseComponent implements OnInit {
|
|
|
22
21
|
@Input() conversationWith: string;
|
|
23
22
|
@Input() conversationWithFullname: string;
|
|
24
23
|
@Input() currentString: string;
|
|
25
|
-
@Input()
|
|
24
|
+
@Input() canShowCanned: boolean = true;
|
|
26
25
|
@Input() stylesMap: Map<string, string>;
|
|
27
26
|
@Input() translationMap: Map<string, string>;
|
|
28
27
|
@Output() onLoadedCannedResponses = new EventEmitter<[any]>();
|
|
@@ -37,7 +36,6 @@ export class CannedResponseComponent implements OnInit {
|
|
|
37
36
|
|
|
38
37
|
public arrowkeyLocation = -1
|
|
39
38
|
|
|
40
|
-
PERMISSIONS = PERMISSIONS
|
|
41
39
|
|
|
42
40
|
private logger: LoggerService = LoggerInstance.getInstance();
|
|
43
41
|
constructor(
|
package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html
CHANGED
|
@@ -22,13 +22,6 @@
|
|
|
22
22
|
{{translationMap?.get('WHATSAPP.LABEL_TEMPLATES')}}
|
|
23
23
|
</ion-button>
|
|
24
24
|
</div>
|
|
25
|
-
<!-- OPEN TICKET -->
|
|
26
|
-
<div *ngIf="ticketSection" class="section-option" id="template" tooltip="{{translationMap?.get('TICKET.OPEN_TICKET')}}" placement="top">
|
|
27
|
-
<ion-button fill="clear" [class.active]="section==='ticket'" (click)="onOpenSection('ticket')" [disabled]="channelType === 'direct'">
|
|
28
|
-
<ion-icon name="ticket"></ion-icon>
|
|
29
|
-
{{translationMap?.get('TICKET.OPEN_TICKET')}}
|
|
30
|
-
</ion-button>
|
|
31
|
-
</div>
|
|
32
25
|
</div>
|
|
33
26
|
|
|
34
27
|
<div class="footerContainerAlert">
|
|
@@ -57,22 +50,6 @@
|
|
|
57
50
|
</ion-col>
|
|
58
51
|
</ion-row>
|
|
59
52
|
|
|
60
|
-
<ion-row id="ticket" [style.display]="section==='ticket'? 'flex': 'none'">
|
|
61
|
-
<ion-col col-auto>
|
|
62
|
-
<div class="placeholder">{{translationMap.get('TICKET.DESCRIPTION')}}</div>
|
|
63
|
-
<div class="buttons-container">
|
|
64
|
-
<ion-button name="add" size="small" (click)="onClickTicket('open')">
|
|
65
|
-
<ion-icon name="add"></ion-icon>
|
|
66
|
-
{{translationMap?.get('TICKET.CONFIRM')}}
|
|
67
|
-
</ion-button>
|
|
68
|
-
<ion-button size="small" color="danger" (click)="onClickTicket('close')">
|
|
69
|
-
<ion-icon name="close"></ion-icon>
|
|
70
|
-
{{translationMap?.get('TICKET.CLOSE')}}
|
|
71
|
-
</ion-button>
|
|
72
|
-
</div>
|
|
73
|
-
</ion-col>
|
|
74
|
-
</ion-row>
|
|
75
|
-
|
|
76
53
|
<ion-row id="message-text-area" [style.display]="section==='chat' || section ==='templates' || section ==='copilot'? 'flex': 'none'">
|
|
77
54
|
|
|
78
55
|
<ion-col col-auto style="display: flex;">
|
|
@@ -80,7 +57,7 @@
|
|
|
80
57
|
<div class="buttons-left">
|
|
81
58
|
|
|
82
59
|
<!-- CANNED RESPONSES -->
|
|
83
|
-
<ng-container *ngIf="areVisibleCAR && supportMode
|
|
60
|
+
<ng-container *ngIf="areVisibleCAR && supportMode">
|
|
84
61
|
<div class="canned-responses-btn-wpr" tooltip="{{translationMap?.get('CANNED_RESPONSES')}}" placement="top">
|
|
85
62
|
<ion-button ion-button fill="clear" class="canned-responses-btn" (click)="openCannedResponses()"
|
|
86
63
|
[disabled]="!conversationWith?.startsWith(CHANNEL_TYPE.SUPPORT_GROUP) || disableTextarea">
|
package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss
CHANGED
|
@@ -183,36 +183,6 @@
|
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
185
|
|
|
186
|
-
#ticket{
|
|
187
|
-
text-align: center;
|
|
188
|
-
font-size: 12px;
|
|
189
|
-
|
|
190
|
-
.buttons-container{
|
|
191
|
-
display: flex;
|
|
192
|
-
justify-content: center;
|
|
193
|
-
gap: 10px;
|
|
194
|
-
|
|
195
|
-
ion-button{
|
|
196
|
-
font-size: 12px;
|
|
197
|
-
--padding-top: 4px;
|
|
198
|
-
--padding-bottom: 4px;
|
|
199
|
-
--padding-start: 6px;
|
|
200
|
-
--padding-end: 6px;
|
|
201
|
-
--ripple-color: transparent;
|
|
202
|
-
text-transform: unset;
|
|
203
|
-
height: auto;
|
|
204
|
-
|
|
205
|
-
ion-icon{
|
|
206
|
-
margin-right: 4px;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
&[name="add"]{
|
|
210
|
-
--background: var(--basic-blue);
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
|
|
216
186
|
#fileInput {
|
|
217
187
|
position: absolute;
|
|
218
188
|
opacity: 0;
|