@chat21/chat21-ionic 3.4.27-rc12 → 3.4.27-rc14
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 +7 -0
- package/package.json +1 -1
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +9 -0
- package/src/app/components/sidebar/sidebar.component.ts +18 -0
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +1 -1
- package/src/app/pages/conversations-list/conversations-list.page.ts +7 -0
- package/src/app/utils/utils-resources.ts +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,13 @@
|
|
|
8
8
|
### **Copyrigth**:
|
|
9
9
|
*Tiledesk SRL*
|
|
10
10
|
|
|
11
|
+
# 3.4.27-rc14
|
|
12
|
+
- **added**: DISPLAY_EDIT_PROFILE brand variable
|
|
13
|
+
- **bug-fixed**: emojii is sent also if is not allowed
|
|
14
|
+
|
|
15
|
+
# 3.4.27-rc13
|
|
16
|
+
- **added**: ability to mantain logout parameter when redirect to dashboard urls from sidebar component
|
|
17
|
+
|
|
11
18
|
# 3.4.27-rc12
|
|
12
19
|
- **added**: ability to manage logOut option in sidebar-user-detail with tiledesk_logOut url query params
|
|
13
20
|
|
package/package.json
CHANGED
package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts
CHANGED
|
@@ -548,6 +548,10 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
548
548
|
e.preventDefault(); // Prevent press enter from creating new line
|
|
549
549
|
// console.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea * event: ", e);
|
|
550
550
|
|
|
551
|
+
if(this.showAlertEmoji || this.showAlertUrl){
|
|
552
|
+
return;
|
|
553
|
+
}
|
|
554
|
+
|
|
551
555
|
this.countClicks++;
|
|
552
556
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - countClicks: ', this.countClicks);
|
|
553
557
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - event: ', e);
|
|
@@ -652,6 +656,11 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
652
656
|
return
|
|
653
657
|
}
|
|
654
658
|
|
|
659
|
+
let check = this.checkForEmojii(text)
|
|
660
|
+
if(!check){
|
|
661
|
+
return;
|
|
662
|
+
}
|
|
663
|
+
|
|
655
664
|
this.messageString = '';
|
|
656
665
|
// text = text.replace(/(\r\n|\n|\r)/gm, '');
|
|
657
666
|
|
|
@@ -123,8 +123,26 @@ export class SidebarComponent implements OnInit {
|
|
|
123
123
|
TILEDESK: 'https://www.tiledesk.com'
|
|
124
124
|
};
|
|
125
125
|
|
|
126
|
+
this.setQueryParamsForAll({ tiledesk_logOut: BRAND_BASE_INFO['LOGOUT_ENABLED'] });
|
|
127
|
+
|
|
126
128
|
}
|
|
127
129
|
|
|
130
|
+
// Funzione helper per aggiungere query params a tutte le URL
|
|
131
|
+
setQueryParamsForAll(queryParams: any) {
|
|
132
|
+
if (!queryParams) return;
|
|
133
|
+
|
|
134
|
+
const queryString = new URLSearchParams(queryParams).toString();
|
|
135
|
+
|
|
136
|
+
// Cicla tutte le chiavi di URLS
|
|
137
|
+
Object.keys(this.URLS).forEach(key => {
|
|
138
|
+
if (this.URLS[key]) {
|
|
139
|
+
// Controlla se già ci sono query params
|
|
140
|
+
const separator = this.URLS[key].includes('?') ? '&' : '?';
|
|
141
|
+
this.URLS[key] = `${this.URLS[key]}${queryString ? separator + queryString : ''}`;
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
|
|
128
146
|
subcribeToAuthStateChanged() {
|
|
129
147
|
this.messagingAuthService.BSAuthStateChanged.subscribe((state) => {
|
|
130
148
|
this.logger.log('[SIDEBAR] BSAuthStateChanged ', state)
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
<div class="user-details-role">
|
|
52
52
|
<h3>{{ USER_ROLE_LABEL }} </h3>
|
|
53
53
|
|
|
54
|
-
<div class="user-details-view-profile" (click)="goToUserProfile()">
|
|
54
|
+
<div *ngIf="BRAND_BASE_INFO['DISPLAY_EDIT_PROFILE']" class="user-details-view-profile" (click)="goToUserProfile()">
|
|
55
55
|
{{translationsMap.get('EditProfile')}}
|
|
56
56
|
</div>
|
|
57
57
|
|
|
@@ -916,12 +916,17 @@ export class ConversationListPage implements OnInit {
|
|
|
916
916
|
|
|
917
917
|
this.logger.log('[CONVS-LIST-PAGE] navigateByUrl this.uidConvSelected ', this.uidConvSelected)
|
|
918
918
|
|
|
919
|
+
const queryParams = this.route.snapshot.queryParams;
|
|
920
|
+
const queryString = new URLSearchParams(queryParams).toString();
|
|
921
|
+
|
|
922
|
+
|
|
919
923
|
this.setUidConvSelected(uidConvSelected, converationType)
|
|
920
924
|
if (checkPlatformIsMobile()) {
|
|
921
925
|
this.logger.log('[CONVS-LIST-PAGE] checkPlatformIsMobile(): ', checkPlatformIsMobile())
|
|
922
926
|
this.logger.log('[CONVS-LIST-PAGE] DESKTOP (window < 768)', this.navService)
|
|
923
927
|
this.logger.log('[CONVS-LIST-PAGE] navigateByUrl this.conversationSelected conversation_with_fullname ', this.conversationSelected)
|
|
924
928
|
let pageUrl = 'conversation-detail/' + this.uidConvSelected + '/' + this.conversationSelected.conversation_with_fullname + '/' + converationType
|
|
929
|
+
pageUrl += queryString ? `?${queryString}` : '';
|
|
925
930
|
this.logger.log('[CONVS-LIST-PAGE] pageURL', pageUrl)
|
|
926
931
|
// replace(/\(/g, '%28').replace(/\)/g, '%29') -> used for the encoder of any round brackets
|
|
927
932
|
this.router.navigateByUrl(pageUrl.replace(/\(/g, '%28').replace(/\)/g, '%29').replace( /#/g, "%23" ), {replaceUrl: true})
|
|
@@ -933,8 +938,10 @@ export class ConversationListPage implements OnInit {
|
|
|
933
938
|
if (this.conversationSelected && this.conversationSelected.conversation_with_fullname) {
|
|
934
939
|
pageUrl = 'conversation-detail/' + this.uidConvSelected + '/' + this.conversationSelected.conversation_with_fullname + '/' + converationType
|
|
935
940
|
}
|
|
941
|
+
pageUrl += queryString ? `?${queryString}` : '';
|
|
936
942
|
this.logger.log('[CONVS-LIST-PAGE] setUidConvSelected navigateByUrl--->: ', pageUrl)
|
|
937
943
|
// replace(/\(/g, '%28').replace(/\)/g, '%29') -> used for the encoder of any round brackets
|
|
944
|
+
|
|
938
945
|
this.router.navigateByUrl(pageUrl.replace(/\(/g, '%28').replace(/\)/g, '%29').replace( /#/g, "%23" ), {replaceUrl: true})
|
|
939
946
|
}
|
|
940
947
|
}
|
|
@@ -7,7 +7,8 @@ export const BRAND_BASE_INFO: { [key: string] : string | boolean} ={
|
|
|
7
7
|
FAVICON: "https://tiledesk.com/wp-content/uploads/2022/07/tiledesk_v13-300x300.png",
|
|
8
8
|
META_TITLE:"Tiledesk - Open Source Live Chat",
|
|
9
9
|
DOCS: true,
|
|
10
|
-
LOGOUT_ENABLED: true
|
|
10
|
+
LOGOUT_ENABLED: true,
|
|
11
|
+
DISPLAY_EDIT_PROFILE: true
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
export var LOGOS_ITEMS: { [key: string] : { label: string | boolean, icon: string }} ={
|